RCFProto
 All Classes Functions Typedefs
ServerInterfaces_NoHeaderGuard.hpp
1 
2 //******************************************************************************
3 // RCF - Remote Call Framework
4 //
5 // Copyright (c) 2005 - 2013, Delta V Software. All rights reserved.
6 // http://www.deltavsoft.com
7 //
8 // RCF is distributed under dual licenses - closed source or GPL.
9 // Consult your particular license for conditions of use.
10 //
11 // If you have not purchased a commercial license, you are using RCF
12 // under GPL terms.
13 //
14 // Version: 2.0
15 // Contact: support <at> deltavsoft.com
16 //
17 //******************************************************************************
18 
19 #include <RCF/Config.hpp>
20 
21 #if RCF_FEATURE_LEGACY==0
22 #error This header is only supported in builds with RCF_FEATURE_LEGACY=1.
23 #endif
24 
25 #include <RCF/Idl.hpp>
26 #include <RCF/SerializationProtocol.hpp>
27 #include <RCF/TypeTraits.hpp>
28 
29 #if RCF_FEATURE_SF==1
30 #include <SF/string.hpp>
31 #include <SF/vector.hpp>
32 #endif
33 
34 #if RCF_FEATURE_BOOST_SERIALIZATION==1
35 #include <boost/serialization/vector.hpp>
36 #include <boost/serialization/string.hpp>
37 #endif
38 
39 #if RCF_FEATURE_FILETRANSFER==1
40 #include <RCF/FileTransferService.hpp>
41 #include <RCF/FileStream.hpp>
42 #endif
43 
44 namespace RCF {
45 
46  //--------------------------------------------------------------------------
47  // I_Null
48 
49  RCF_BEGIN(I_Null, "")
50  RCF_END(I_Null)
51 
52 
53  //--------------------------------------------------------------------------
54  // I_ObjectFactory
55 
56  RCF_BEGIN(I_ObjectFactory, "")
57 
58  RCF_METHOD_R2(
59  boost::int32_t,
60  CreateObject,
61  const std::string &,
62  Token &)
63 
64  // Deprecated (use I_SessionObjectFactory)
65  RCF_METHOD_R1(
66  boost::int32_t,
67  CreateSessionObject,
68  const std::string &)
69 
70  RCF_METHOD_R1(
71  boost::int32_t,
72  DeleteObject,
73  const Token &)
74 
75  // Deprecated (use I_SessionObjectFactory)
76  RCF_METHOD_R0(
77  boost::int32_t,
78  DeleteSessionObject)
79 
80  RCF_END(I_ObjectFactory)
81 
82 
83  //--------------------------------------------------------------------------
84  // I_SessionObjectFactory
85 
86  RCF_BEGIN(I_SessionObjectFactory, "")
87 
88  RCF_METHOD_R1(
89  boost::int32_t,
90  CreateSessionObject,
91  const std::string &)
92 
93  RCF_METHOD_R0(
94  boost::int32_t,
95  DeleteSessionObject)
96 
97  RCF_END(I_SessionObjectFactory)
98 
99 
100  //--------------------------------------------------------------------------
101  // I_EndpointBroker
102 
103  RCF_BEGIN(I_EndpointBroker, "")
104 
105  RCF_METHOD_R3(
106  boost::int32_t,
107  OpenEndpoint,
108  const std::string &,
109  const std::string &,
110  std::string &)
111 
112  RCF_METHOD_R2(
113  boost::int32_t,
114  CloseEndpoint,
115  const std::string &,
116  const std::string &)
117 
118  RCF_METHOD_R2(
119  boost::int32_t,
120  EstablishEndpointConnection,
121  const std::string &,
122  const std::string &)
123 
124  RCF_METHOD_R2(
125  boost::int32_t,
126  ConnectToEndpoint,
127  const std::string &,
128  const std::string &)
129 
130  RCF_END(I_EndpointBroker)
131 
132 
133  //--------------------------------------------------------------------------
134  // I_EndpointServer
135 
136  RCF_BEGIN(I_EndpointServer, "")
137 
138  RCF_METHOD_V1(
139  void,
140  SpawnConnections,
141  boost::uint32_t)
142 
143  RCF_END(I_EndpointServer)
144 
145 
146  //--------------------------------------------------------------------------
147  // I_RequestSubscription
148 
149  RCF_BEGIN( I_RequestSubscription, "" )
150 
151  RCF_METHOD_R1(
152  boost::int32_t,
153  RequestSubscription,
154  const std::string &)
155 
156  RCF_METHOD_R3(
157  boost::int32_t,
158  RequestSubscription,
159  const std::string &, // subscriber name
160  boost::uint32_t, // sub-to-pub ping interval
161  boost::uint32_t &) // pub-to-sub ping interval
162 
163  RCF_END(I_RequestSubscription)
164 
165 
166  //--------------------------------------------------------------------------
167  // I_RequestTransportFilters
168 
169  RCF_BEGIN(I_RequestTransportFilters, "")
170 
171  RCF_METHOD_R1(
172  boost::int32_t,
173  RequestTransportFilters,
174  const std::vector<boost::int32_t> &)
175 
176  // No longer supported but still present to improve error message.
177  RCF_METHOD_R1(
178  boost::int32_t,
179  QueryForTransportFilters,
180  const std::vector<boost::int32_t> &);
181 
182  RCF_END(I_RequestTransportFilters)
183 
184 
185  //--------------------------------------------------------------------------
186  // I_CreateCallback
187 
188  RCF_BEGIN(I_CreateCallbackConnection, "")
189 
190  RCF_METHOD_V0(
191  void,
192  CreateCallbackConnection)
193 
194  RCF_END(I_CreateCallbackConnection)
195 
196  //--------------------------------------------------------------------------
197  // I_ParentToChild
198 
199  RCF_BEGIN(I_ParentToChild, "I_ParentToChild")
200 
201  RCF_METHOD_V0(
202  void,
203  Ping)
204 
205  RCF_END(I_ParentToChild)
206 
207 } // namespace RCF
208 
209 #if RCF_FEATURE_FILETRANSFER==1
210 
211 namespace RCF {
212 
213  //--------------------------------------------------------------------------
214  // I_FileTransferService
215 
216  RCF_BEGIN(I_FileTransferService, "I_FileTransferService")
217 
218  RCF_METHOD_V7(
219  void,
220  BeginUpload,
221  const FileManifest &, // upload manifest
222  const std::vector<FileChunk> &, // optional first chunks
223  FileChunk &, // where to start uploading
224  boost::uint32_t &, // max message length
225  std::string &, // upload id
226  boost::uint32_t &, // bps
227  boost::uint32_t) // session local id
228 
229  RCF_METHOD_V2(
230  void,
231  UploadChunks,
232  const std::vector<FileChunk> &, // file chunks to upload
233  boost::uint32_t &) // bps
234 
235  RCF_METHOD_V6(
236  void,
237  BeginDownload,
238  FileManifest &, // download manifest
239  const FileTransferRequest &, // transfer request
240  std::vector<FileChunk> &, // optional first chunks
241  boost::uint32_t &, // max message length
242  boost::uint32_t &, // bps
243  boost::uint32_t) // session local id
244 
245  RCF_METHOD_V1(
246  void,
247  TrimDownload,
248  const FileChunk &) // where to start downloading
249 
250  RCF_METHOD_V4(
251  void,
252  DownloadChunks,
253  const FileTransferRequest &, // transfer request
254  std::vector<FileChunk> &, // file chunks to download
255  boost::uint32_t &, // advised wait for next call
256  boost::uint32_t &) // bps
257 
258  RCF_END(I_FileTransferService)
259 
260 } // namespace RCF
261 
262 #endif // RCF_FEATURE_FILETRANSFER
263