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/Idl.hpp>
20 #include <RCF/SerializationProtocol.hpp>
21 #include <RCF/TypeTraits.hpp>
22 
23 #ifdef RCF_USE_SF_SERIALIZATION
24 #include <SF/string.hpp>
25 #include <SF/vector.hpp>
26 #endif
27 
28 #ifdef RCF_USE_BOOST_SERIALIZATION
29 #include <boost/serialization/vector.hpp>
30 #include <boost/serialization/string.hpp>
31 #endif
32 
33 #if RCF_FEATURE_FILETRANSFER==1
34 #include <RCF/FileTransferService.hpp>
35 #include <RCF/FileStream.hpp>
36 #endif
37 
38 namespace RCF {
39 
40  //--------------------------------------------------------------------------
41  // I_Null
42 
43  RCF_BEGIN(I_Null, "")
44  RCF_END(I_Null)
45 
46 
47  //--------------------------------------------------------------------------
48  // I_ObjectFactory
49 
50  RCF_BEGIN(I_ObjectFactory, "")
51 
52  RCF_METHOD_R2(
53  boost::int32_t,
54  CreateObject,
55  const std::string &,
56  Token &)
57 
58  // Deprecated (use I_SessionObjectFactory)
59  RCF_METHOD_R1(
60  boost::int32_t,
61  CreateSessionObject,
62  const std::string &)
63 
64  RCF_METHOD_R1(
65  boost::int32_t,
66  DeleteObject,
67  const Token &)
68 
69  // Deprecated (use I_SessionObjectFactory)
70  RCF_METHOD_R0(
71  boost::int32_t,
72  DeleteSessionObject)
73 
74  RCF_END(I_ObjectFactory)
75 
76 
77  //--------------------------------------------------------------------------
78  // I_SessionObjectFactory
79 
80  RCF_BEGIN(I_SessionObjectFactory, "")
81 
82  RCF_METHOD_R1(
83  boost::int32_t,
84  CreateSessionObject,
85  const std::string &)
86 
87  RCF_METHOD_R0(
88  boost::int32_t,
89  DeleteSessionObject)
90 
91  RCF_END(I_SessionObjectFactory)
92 
93 
94  //--------------------------------------------------------------------------
95  // I_EndpointBroker
96 
97  RCF_BEGIN(I_EndpointBroker, "")
98 
99  RCF_METHOD_R3(
100  boost::int32_t,
101  OpenEndpoint,
102  const std::string &,
103  const std::string &,
104  std::string &)
105 
106  RCF_METHOD_R2(
107  boost::int32_t,
108  CloseEndpoint,
109  const std::string &,
110  const std::string &)
111 
112  RCF_METHOD_R2(
113  boost::int32_t,
114  EstablishEndpointConnection,
115  const std::string &,
116  const std::string &)
117 
118  RCF_METHOD_R2(
119  boost::int32_t,
120  ConnectToEndpoint,
121  const std::string &,
122  const std::string &)
123 
124  RCF_END(I_EndpointBroker)
125 
126 
127  //--------------------------------------------------------------------------
128  // I_EndpointServer
129 
130  RCF_BEGIN(I_EndpointServer, "")
131 
132  RCF_METHOD_V1(
133  void,
134  SpawnConnections,
135  boost::uint32_t)
136 
137  RCF_END(I_EndpointServer)
138 
139 
140  //--------------------------------------------------------------------------
141  // I_RequestSubscription
142 
143  RCF_BEGIN( I_RequestSubscription, "" )
144 
145  RCF_METHOD_R1(
146  boost::int32_t,
147  RequestSubscription,
148  const std::string &)
149 
150  RCF_METHOD_R3(
151  boost::int32_t,
152  RequestSubscription,
153  const std::string &, // subscriber name
154  boost::uint32_t, // sub-to-pub ping interval
155  boost::uint32_t &) // pub-to-sub ping interval
156 
157  RCF_END(I_RequestSubscription)
158 
159 
160  //--------------------------------------------------------------------------
161  // I_RequestTransportFilters
162 
163  RCF_BEGIN(I_RequestTransportFilters, "")
164 
165  RCF_METHOD_R1(
166  boost::int32_t,
167  RequestTransportFilters,
168  const std::vector<boost::int32_t> &)
169 
170  // Used to have QueryForTransportFilters() here.
171  //RCF_METHOD_PLACEHOLDER()
172 
173  RCF_END(I_RequestTransportFilters)
174 
175 
176  //--------------------------------------------------------------------------
177  // I_CreateCallback
178 
179  RCF_BEGIN(I_CreateCallbackConnection, "")
180 
181  RCF_METHOD_V0(
182  void,
183  CreateCallbackConnection)
184 
185  RCF_END(I_CreateCallbackConnection)
186 
187  //--------------------------------------------------------------------------
188  // I_ParentToChild
189 
190  RCF_BEGIN(I_ParentToChild, "I_ParentToChild")
191 
192  RCF_METHOD_V0(
193  void,
194  Ping)
195 
196  RCF_END(I_ParentToChild)
197 
198 } // namespace RCF
199 
200 #if RCF_FEATURE_FILETRANSFER==1
201 
202 namespace RCF {
203 
204  //--------------------------------------------------------------------------
205  // I_FileTransferService
206 
207  RCF_BEGIN(I_FileTransferService, "I_FileTransferService")
208 
209  RCF_METHOD_V7(
210  void,
211  BeginUpload,
212  const FileManifest &, // upload manifest
213  const std::vector<FileChunk> &, // optional first chunks
214  FileChunk &, // where to start uploading
215  boost::uint32_t &, // max message length
216  std::string &, // upload id
217  boost::uint32_t &, // bps
218  boost::uint32_t) // session local id
219 
220  RCF_METHOD_V2(
221  void,
222  UploadChunks,
223  const std::vector<FileChunk> &, // file chunks to upload
224  boost::uint32_t &) // bps
225 
226  RCF_METHOD_V6(
227  void,
228  BeginDownload,
229  FileManifest &, // download manifest
230  const FileTransferRequest &, // transfer request
231  std::vector<FileChunk> &, // optional first chunks
232  boost::uint32_t &, // max message length
233  boost::uint32_t &, // bps
234  boost::uint32_t) // session local id
235 
236  RCF_METHOD_V1(
237  void,
238  TrimDownload,
239  const FileChunk &) // where to start downloading
240 
241  RCF_METHOD_V4(
242  void,
243  DownloadChunks,
244  const FileTransferRequest &, // transfer request
245  std::vector<FileChunk> &, // file chunks to download
246  boost::uint32_t &, // advised wait for next call
247  boost::uint32_t &) // bps
248 
249  RCF_END(I_FileTransferService)
250 
251 } // namespace RCF
252 
253 #endif // RCF_FEATURE_FILETRANSFER