Remote Call Framework 3.2
RcfFwd.hpp
Go to the documentation of this file.
1 
2 //******************************************************************************
3 // RCF - Remote Call Framework
4 //
5 // Copyright (c) 2005 - 2020, 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: 3.2
15 // Contact: support <at> deltavsoft.com
16 //
17 //******************************************************************************
18 
20 
21 #ifndef INCLUDE_RCF_RCFFWD_HPP
22 #define INCLUDE_RCF_RCFFWD_HPP
23 
24 #include <functional>
25 #include <memory>
26 #include <vector>
27 
28 #include <RCF/Enums.hpp>
29 
30 namespace RCF
31 {
32 
33  class RcfServer;
34  class RcfSession;
35  class ClientTransport;
36  class ServerTransport;
37  class Endpoint;
38  class I_RcfClient;
39  typedef std::shared_ptr<I_RcfClient> RcfClientPtr;
40  typedef std::shared_ptr<RcfSession> RcfSessionPtr;
41  typedef std::weak_ptr<RcfSession> RcfSessionWeakPtr;
42 
44  typedef std::unique_ptr<ClientTransport> ClientTransportUniquePtr;
45 
47  typedef std::shared_ptr<ServerTransport> ServerTransportPtr;
48 
49  class Exception;
50  typedef std::shared_ptr<Exception> ExceptionPtr;
51 
52  template<typename T> class RcfClient;
53  class I_RequestSubscription;
54  class I_Null;
55 
56  class PublisherBase;
57  typedef std::shared_ptr<PublisherBase> PublisherPtr;
58  typedef std::weak_ptr<PublisherBase> PublisherWeakPtr;
59 
60  class PublishingService;
61 
62  class SubscriptionService;
63  class SubscriptionParms;
64  class Subscription;
65  typedef std::shared_ptr<Subscription> SubscriptionPtr;
66  typedef std::weak_ptr<Subscription> SubscriptionWeakPtr;
67 
68  typedef std::shared_ptr<Subscription> SubscriptionPtr;
69  typedef std::weak_ptr<Subscription> SubscriptionWeakPtr;
70 
72  typedef std::function<bool(RcfSession &, const std::string &)> OnSubscriberConnect;
73 
75  typedef std::function<void(RcfSession &, const std::string &)> OnSubscriberDisconnect;
76 
78  typedef std::function<void(RcfSession &)> OnSubscriptionDisconnect;
79 
81  typedef std::function<void(SubscriptionPtr, ExceptionPtr)> OnAsyncSubscribeCompleted;
82 
83  enum RemoteCallAction;
85 
87  typedef std::function<void(const RemoteCallProgressInfo&, RemoteCallAction&)> RemoteCallProgressCallback;
88 
89  template<typename T>
90  class Future;
91 
92  template<typename T>
93  class FutureConverter;
94 
95  struct Void;
96  class CallOptions;
97  class ConnectionResetGuard;
98  class I_Parameters;
99  class Certificate;
100  class ClientStub;
101  class ClientProgress;
102  class I_Future;
103  class IpClientTransport;
104  class FileTransferProgress;
105  class OpenSslEncryptionFilter;
106  class SspiFilter;
107  class OverlappedAmi;
108  class FileManifest;
109  class Filter;
110 
112  typedef std::shared_ptr<Certificate> CertificatePtr;
113 
115  typedef std::function<bool(Certificate *)> CertificateValidationCallback;
116 
118  typedef std::shared_ptr<Endpoint> EndpointPtr;
119 
120  typedef std::shared_ptr<Filter> FilterPtr;
121  typedef std::shared_ptr<ClientStub> ClientStubPtr;
122  typedef std::shared_ptr<ClientProgress> ClientProgressPtr;
123  typedef std::shared_ptr<OverlappedAmi> OverlappedAmiPtr;
124 
125  class FileDownloadInfo;
126  class FileUploadInfo;
127 
129  typedef std::shared_ptr<BandwidthQuota> BandwidthQuotaPtr;
130 
132  typedef std::function<void(const FileTransferProgress &, RemoteCallAction&)> FileProgressCallback;
133 
135  typedef std::function<void(RcfSession&, FileDownloadInfo &)> DownloadProgressCallback;
136 
138  typedef std::function<void(RcfSession&, FileUploadInfo &)> UploadProgressCallback;
139 
141  typedef std::function<BandwidthQuotaPtr(RcfSession &)> BandwidthQuotaCallback;
142 
144  typedef BandwidthQuotaCallback UploadBandwidthQuotaCallback;
145 
147  typedef BandwidthQuotaCallback DownloadBandwidthQuotaCallback;
148 
149 
150  template<
151  typename R,
152  typename A1,
153  typename A2,
154  typename A3,
155  typename A4,
156  typename A5,
157  typename A6,
158  typename A7,
159  typename A8,
160  typename A9,
161  typename A10,
162  typename A11,
163  typename A12,
164  typename A13,
165  typename A14,
166  typename A15>
167  class AllocateClientParameters;
168 
169  template<
170  typename R,
171  typename A1,
172  typename A2,
173  typename A3,
174  typename A4,
175  typename A5,
176  typename A6,
177  typename A7,
178  typename A8,
179  typename A9,
180  typename A10,
181  typename A11,
182  typename A12,
183  typename A13,
184  typename A14,
185  typename A15>
186  class ClientParameters;
187 
188  class I_Service;
189  class IpServerTransport;
190  class PingBackService;
191  class FileTransferService;
192  class FilterService;
193  class SessionTimeoutService;
194  class PublishingService;
195  class CallbackConnectionService;
196  class ServerObjectService;
197  class ProxyEndpointService;
198 
199  typedef std::shared_ptr<I_Service> ServicePtr;
200  typedef std::shared_ptr<PingBackService> PingBackServicePtr;
201  typedef std::shared_ptr<FileTransferService> FileTransferServicePtr;
202  typedef std::shared_ptr<FilterService> FilterServicePtr;
203  typedef std::shared_ptr<SessionTimeoutService> SessionTimeoutServicePtr;
204  typedef std::shared_ptr<PublishingService> PublishingServicePtr;
205  typedef std::shared_ptr<SubscriptionService> SubscriptionServicePtr;
206  typedef std::shared_ptr<CallbackConnectionService> CallbackConnectionServicePtr;
207  typedef std::shared_ptr<ServerObjectService> ServerObjectServicePtr;
208  typedef std::shared_ptr<ProxyEndpointService> ProxyEndpointServicePtr;
209 
210  template<typename Interface>
211  class Publisher;
212 
213  class BandwidthQuota;
214 
216  typedef std::shared_ptr<BandwidthQuota> BandwidthQuotaPtr;
217 
218  class FileDownloadInfo;
219  class FileUploadInfo;
220 
221  class JsonRpcRequest;
222  class JsonRpcResponse;
223 
224  class HttpSession;
225  typedef std::shared_ptr<HttpSession> HttpSessionPtr;
226 
227  class HttpCookie;
228 
229  typedef std::function<void(RcfSessionPtr, ClientTransportUniquePtr)> OnCallbackConnectionCreated;
230 
231  typedef RcfSessionPtr SessionPtr;
232 
233  enum TransportProtocol;
234  enum SslImplementation;
235  enum TransportType;
236  enum CertificateImplementationType;
237 
238  class PublisherParms;
239 
240  class I_CreateCallbackConnection;
241 
242  typedef std::shared_ptr<ClientTransport> ClientTransportPtr;
243 
244  typedef std::shared_ptr< ClientTransportUniquePtr > ClientTransportUniquePtrPtr;
245 
246  typedef std::unique_ptr<ServerTransport> ServerTransportUniquePtr;
247 
248 
250 
251  typedef std::shared_ptr<ServerBinding> ServerBindingPtr;
252 
253  class MethodInvocationRequest;
254 
255  class NetworkSession;
256  class ByteBuffer;
257 
259 
261  typedef std::shared_ptr<Win32Certificate> Win32CertificatePtr;
262 
263  class X509Certificate;
264  typedef std::shared_ptr<X509Certificate> X509CertificatePtr;
265 
266  class UdpServerTransport;
267  class UdpNetworkSession;
268 
269  class FileStreamImpl;
270 
271  typedef std::shared_ptr<FileUploadInfo> FileUploadInfoPtr;
272  typedef std::shared_ptr<FileDownloadInfo> FileDownloadInfoPtr;
273 
274  typedef std::pair<std::uint32_t, RcfSessionWeakPtr> PingBackTimerEntry;
275 
276  class RemoteAddress;
277  class RemoteCallInfo;
278  class FileStream;
279  class FileUpload;
280  class FileDownload;
281 
282  class AsioNetworkSession;
283 
284  template<
285  typename R,
286  typename A1,
287  typename A2,
288  typename A3,
289  typename A4,
290  typename A5,
291  typename A6,
292  typename A7,
293  typename A8,
294  typename A9,
295  typename A10,
296  typename A11,
297  typename A12,
298  typename A13,
299  typename A14,
300  typename A15>
301  class AllocateServerParameters;
302 
303  template<
304  typename R,
305  typename A1,
306  typename A2,
307  typename A3,
308  typename A4,
309  typename A5,
310  typename A6,
311  typename A7,
312  typename A8,
313  typename A9,
314  typename A10,
315  typename A11,
316  typename A12,
317  typename A13,
318  typename A14,
319  typename A15>
320  class ServerParameters;
321 
322  class ServerBinding;
323 
325  typedef std::shared_ptr<ServerBinding> ServerBindingPtr;
326 
328  typedef std::function<bool(int)> AccessControlCallback;
329 
330  // List of HTTP headers in a HTTP message.
331  typedef std::vector< std::pair< std::string, std::string > > HttpHeaderList;
332 
334  typedef std::function<void(const std::string & statusLine, const HttpHeaderList& headerList)> HttpRedirectHandler;
335 
336  class HttpMessageVerifier;
337 
339  typedef std::shared_ptr<HttpMessageVerifier> HttpMessageVerifierPtr;
340 
341 } // namespace RCF
342 
343 #endif // ! INCLUDE_RCF_RCFFWD_HPP
Describes the network address of a remote peer.
Definition: ServerTransport.hpp:37
Contains details about the currently executing remote call.
Definition: MethodInvocation.hpp:63
std::function< BandwidthQuotaPtr(RcfSession &)> BandwidthQuotaCallback
Describes user-provided callback functions for assigning custom bandwidth quotas to a RcfSession...
Definition: RcfFwd.hpp:141
std::function< void(RcfSession &, FileDownloadInfo &)> DownloadProgressCallback
Describes user-provided callback functions for server-side monitoring of a file download.
Definition: RcfFwd.hpp:135
Represents the binding of a server-side servant object to a RCF interface.
Definition: ServerStub.hpp:326
Describes the status of a remote call while in progress. See RCF::ClientStub::setRemoteCallProgressCa...
Definition: ClientProgress.hpp:32
std::function< void(const RemoteCallProgressInfo &, RemoteCallAction &)> RemoteCallProgressCallback
Describes a user-provided callback function to be called periodically on the client side...
Definition: RcfFwd.hpp:84
std::shared_ptr< BandwidthQuota > BandwidthQuotaPtr
Reference counted wrapper for RCF::BandwidthQuota.
Definition: RcfFwd.hpp:128
Controls the client side of a RCF connection.
Definition: ClientStub.hpp:83
std::shared_ptr< Endpoint > EndpointPtr
Reference counted wrapper for RCF::Endpoint.
Definition: RcfFwd.hpp:118
std::shared_ptr< Certificate > CertificatePtr
Reference counted wrapper for RCF::Certificate.
Definition: RcfFwd.hpp:109
std::unique_ptr< ClientTransport > ClientTransportUniquePtr
Unique pointer wrapper for RCF::ClientTransport.
Definition: RcfFwd.hpp:44
std::shared_ptr< Win32Certificate > Win32CertificatePtr
Reference counted wrapper for RCF::Win32Certificate.
Definition: RcfFwd.hpp:258
Server-side information about a file download taking place from a RcfServer.
Definition: FileTransferService.hpp:98
std::function< void(RcfSession &, const std::string &)> OnSubscriberDisconnect
Describes a user-provided callback function to be called on the publisher side, whenever a subscriber...
Definition: RcfFwd.hpp:75
BandwidthQuotaCallback DownloadBandwidthQuotaCallback
Describes user-provided callback functions for assigning custom bandwidth quotas to a RcfSession...
Definition: RcfFwd.hpp:147
std::function< bool(Certificate *)> CertificateValidationCallback
Describes user-provided callback functions for validating a certificate.
Definition: RcfFwd.hpp:115
Provides the ability for remote calls to be executed asynchronously.
Definition: Future.hpp:51
Base class for all RCF exceptions.
Definition: Exception.hpp:64
std::function< void(const FileTransferProgress &, RemoteCallAction &)> FileProgressCallback
Describes user-provided callback functions for client-side monitoring of a file transfer (download or...
Definition: RcfFwd.hpp:132
std::shared_ptr< HttpMessageVerifier > HttpMessageVerifierPtr
Reference counted wrapper for RCF::HttpMessageVerifier.
Definition: HttpFrameFilter.hpp:61
BandwidthQuotaCallback UploadBandwidthQuotaCallback
Describes user-provided callback functions for assigning custom bandwidth quotas to a RcfSession...
Definition: RcfFwd.hpp:144
std::function< bool(int)> AccessControlCallback
Describes a user-provided function for determining whether a client connections should be able to acc...
Definition: RcfFwd.hpp:328
SslImplementation
Describes which SSL implementation to use.
Definition: Enums.hpp:85
Represents an in-memory certificate, either from a remote peer or loaded from a local certificate sto...
Definition: Win32Certificate.hpp:38
Utility class used by RCF to determine whether a remote call should be performed synchronously or asy...
Definition: Future.hpp:35
std::shared_ptr< ServerBinding > ServerBindingPtr
Reference counted wrapper for RCF::ServerBinding.
Definition: RcfFwd.hpp:249
Describes a unit of bandwidth, to be used by downloads or uploads, for a single connection or a group...
Definition: FileStream.hpp:337
Base class for IP-based client transports. Provides IP-related functionality.
Definition: IpClientTransport.hpp:28
std::function< void(RcfSession &, FileUploadInfo &)> UploadProgressCallback
Describes user-provided callback functions for server-side monitoring of a file upload.
Definition: RcfFwd.hpp:138
Represents an in-memory certificate, usually from a remote peer. Only applicable to OpenSSL...
Definition: OpenSslEncryptionFilter.hpp:73
std::function< void(RcfSession &)> OnSubscriptionDisconnect
Describes a user-provided callback function to be called on the subscriber side, whenever a subscribe...
Definition: RcfFwd.hpp:78
Represents a single publisher within a RcfServer. To create a publisher, use RcfServer::createPublish...
Definition: PublishingService.hpp:94
Base class for IP-based server transports. Provides IP-related functionality.
Definition: IpServerTransport.hpp:37
Definition: ByteBuffer.hpp:40
HTTP message verification mechanism, to allow applications to verify HTTP message payloads using cust...
Definition: HttpFrameFilter.hpp:50
TransportProtocol
Describes the transport protocols used by a RCF connection. Transport protocols are layered on top of...
Definition: Enums.hpp:63
General configuration of a subscription.
Definition: SubscriptionService.hpp:91
Definition: AmiIoHandler.hpp:24
TransportType
Describes the transport types used by a RCF connection.
Definition: Enums.hpp:34
Server-side information about a file upload taking place to a RcfServer.
Definition: FileTransferService.hpp:66
Base class for all RCF certificate classes.
Definition: Certificate.hpp:30
General configuration of a publisher.
Definition: PublishingService.hpp:38
std::function< bool(RcfSession &, const std::string &)> OnSubscriberConnect
Describes a user-provided callback function to be called on the publisher side, whenever a subscriber...
Definition: RcfFwd.hpp:72
std::shared_ptr< ServerTransport > ServerTransportPtr
Unique pointer wrapper for RCF::ServerTransport.
Definition: RcfFwd.hpp:47
std::function< void(const std::string &statusLine, const HttpHeaderList &headerList)> HttpRedirectHandler
Describes a user-provided function for handling HTTP redirect responses when connecting to a HTTP/HTT...
Definition: RcfFwd.hpp:334
Describes progress of a file download or upload.
Definition: FileStream.hpp:266
Base class of all publishers.
Definition: PublishingService.hpp:64
RemoteCallAction
Describes whether a remote call should continue or be canceled.
Definition: Enums.hpp:196
Represents a subscription to a RCF publisher. To create a subscription, use RcfServer::createSubscrip...
Definition: SubscriptionService.hpp:40
std::function< void(SubscriptionPtr, ExceptionPtr)> OnAsyncSubscribeCompleted
Describes a user-provided callback function to be called on the subscriber side, when an subscription...
Definition: RcfFwd.hpp:81