10 #ifdef epicsExportSharedSymbols
11 # define rpcServerEpicsExportSharedSymbols
12 # undef epicsExportSharedSymbols
15 #include <pv/sharedPtr.h>
17 #ifdef rpcServerEpicsExportSharedSymbols
18 # define epicsExportSharedSymbols
19 # undef rpcServerEpicsExportSharedSymbols
22 #include <pv/pvAccess.h>
23 #include <pv/rpcService.h>
24 #include <pv/serverContext.h>
32 class RPCChannelProvider;
36 public std::tr1::enable_shared_from_this<RPCServer>
40 std::tr1::shared_ptr<ServerContext> m_serverContext;
41 std::tr1::shared_ptr<RPCChannelProvider> m_channelProviderImpl;
46 explicit RPCServer(
const Configuration::const_shared_pointer& conf = Configuration::const_shared_pointer());
50 void registerService(
std::string const & serviceName, RPCServiceAsync::shared_pointer
const & service);
52 void unregisterService(
std::string const & serviceName);
58 void runInNewThread(
int seconds = 0);
67 const std::tr1::shared_ptr<ServerContext>& getServer()
const {
return m_serverContext; }
70 epicsShareFunc Channel::shared_pointer createRPCChannel(ChannelProvider::shared_pointer
const & provider,
72 ChannelRequester::shared_pointer
const & channelRequester,
73 RPCServiceAsync::shared_pointer
const & rpcService);
duration< int64_t > seconds
Serves (only) RPCServiceAsync and RPCService instances.