xref: /trunk/main/basic/source/runtime/ddectrl.hxx (revision 234bd5c5)
1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 
23 
24 #ifndef _DDECTRL_HXX
25 #define _DDECTRL_HXX
26 
27 #include <tools/link.hxx>
28 #ifndef _SBERRORS_HXX
29 #include <basic/sberrors.hxx>
30 #endif
31 #include <tools/string.hxx>
32 
33 class DdeConnection;
34 class DdeConnections;
35 class DdeData;
36 
37 class SbiDdeControl
38 {
39 private:
40 	DECL_LINK( Data, DdeData* );
41 	SbError GetLastErr( DdeConnection* );
42 	sal_Int16 GetFreeChannel();
43 	DdeConnections*	pConvList;
44 	String aData;
45 
46 public:
47 
48 	SbiDdeControl();
49 	~SbiDdeControl();
50 
51 	SbError Initiate( const String& rService, const String& rTopic,
52 					 sal_Int16& rnHandle );
53 	SbError Terminate( sal_Int16 nChannel );
54 	SbError TerminateAll();
55 	SbError Request( sal_Int16 nChannel, const String& rItem, String& rResult );
56 	SbError Execute( sal_Int16 nChannel, const String& rCommand );
57 	SbError Poke( sal_Int16 nChannel, const String& rItem, const String& rData );
58 };
59 
60 #endif
61