xref: /aoo42x/main/basic/source/runtime/ddectrl.hxx (revision cdf0e10c)
1 /*************************************************************************
2  *
3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4  *
5  * Copyright 2000, 2010 Oracle and/or its affiliates.
6  *
7  * OpenOffice.org - a multi-platform office productivity suite
8  *
9  * This file is part of OpenOffice.org.
10  *
11  * OpenOffice.org is free software: you can redistribute it and/or modify
12  * it under the terms of the GNU Lesser General Public License version 3
13  * only, as published by the Free Software Foundation.
14  *
15  * OpenOffice.org is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18  * GNU Lesser General Public License version 3 for more details
19  * (a copy is included in the LICENSE file that accompanied this code).
20  *
21  * You should have received a copy of the GNU Lesser General Public License
22  * version 3 along with OpenOffice.org.  If not, see
23  * <http://www.openoffice.org/license.html>
24  * for a copy of the LGPLv3 License.
25  *
26  ************************************************************************/
27 
28 #ifndef _DDECTRL_HXX
29 #define _DDECTRL_HXX
30 
31 #include <tools/link.hxx>
32 #ifndef _SBERRORS_HXX
33 #include <basic/sberrors.hxx>
34 #endif
35 #include <tools/string.hxx>
36 
37 class DdeConnection;
38 class DdeConnections;
39 class DdeData;
40 
41 class SbiDdeControl
42 {
43 private:
44 	DECL_LINK( Data, DdeData* );
45 	SbError GetLastErr( DdeConnection* );
46 	sal_Int16 GetFreeChannel();
47 	DdeConnections*	pConvList;
48 	String aData;
49 
50 public:
51 
52 	SbiDdeControl();
53 	~SbiDdeControl();
54 
55 	SbError Initiate( const String& rService, const String& rTopic,
56 					 sal_Int16& rnHandle );
57 	SbError Terminate( sal_Int16 nChannel );
58 	SbError TerminateAll();
59 	SbError Request( sal_Int16 nChannel, const String& rItem, String& rResult );
60 	SbError Execute( sal_Int16 nChannel, const String& rCommand );
61 	SbError Poke( sal_Int16 nChannel, const String& rItem, const String& rData );
62 };
63 
64 #endif
65