pvAccessCPP  7.1.6
rpcServer.h
1 /**
2  * Copyright - See the COPYRIGHT that is included with this distribution.
3  * pvAccessCPP is distributed subject to a Software License Agreement found
4  * in file LICENSE that is included with this distribution.
5  */
6 
7 #ifndef RPCSERVER_H
8 #define RPCSERVER_H
9 
10 #ifdef epicsExportSharedSymbols
11 # define rpcServerEpicsExportSharedSymbols
12 # undef epicsExportSharedSymbols
13 #endif
14 
15 #include <pv/sharedPtr.h>
16 
17 #ifdef rpcServerEpicsExportSharedSymbols
18 # define epicsExportSharedSymbols
19 # undef rpcServerEpicsExportSharedSymbols
20 #endif
21 
22 #include <pv/pvAccess.h>
23 #include <pv/rpcService.h>
24 #include <pv/serverContext.h>
25 
26 #include <shareLib.h>
27 
28 namespace epics {
29 namespace pvAccess {
30 
31 class ServerContext;
32 class RPCChannelProvider;
33 
34 //! Serves (only) RPCServiceAsync and RPCService instances.
35 class epicsShareClass RPCServer :
37 {
38 private:
39 
42 
43 public:
45 
47 
48  virtual ~RPCServer();
49 
51 
52  void unregisterService(std::string const & serviceName);
53 
54  void run(int seconds = 0);
55 
56  /// Method requires usage of std::tr1::shared_ptr<RPCServer>. This instance must be
57  /// owned by a shared_ptr instance.
58  void runInNewThread(int seconds = 0);
59 
60  void destroy();
61 
62  /**
63  * Display basic information about the context.
64  */
65  void printInfo();
66 
67  const std::tr1::shared_ptr<ServerContext>& getServer() const { return m_serverContext; }
68 };
69 
71  std::string const & channelName,
74 
75 }
76 }
77 
78 #endif /* RPCSERVER_H */
Serves (only) RPCServiceAsync and RPCService instances.
Definition: rpcServer.h:35
virtual void authNZMessage(epics::pvData::PVStructure::shared_pointer const &data)=0
Pass data to the active security plug-in session.