8#include "Arp/System/Rsc/Services/Rsc.h"
9#include "Arp/System/Security/SecurityToken.hpp"
12namespace CommonRemoting
19namespace Arp {
namespace System {
namespace Rsc {
namespace Client
21class RemoteServiceManager;
24namespace Arp {
namespace System {
namespace Rsc {
namespace Services
28class IRscServiceProxy;
38 friend class IpcTransaction;
39 friend class Arp::System::Rsc::Client::RemoteServiceManager;
42 using Ptr = std::shared_ptr<RscClient>;
43 using RemotingClient = CommonRemoting::RemotingClient;
44 using RemotingSession = CommonRemoting::RemotingSession;
45 using RemotingClientPtr = std::shared_ptr<RemotingClient>;
46 using ITransactionPtr = std::shared_ptr<ITransaction>;
62 IRscServiceProxy& proxy;
70 virtual void Begin(IRscServiceProxy& proxy) = 0;
71 virtual void End(IRscServiceProxy& proxy) = 0;
76 RscClient(
const String& appName, RemotingClientPtr remotingClientPtr);
78 RscClient(
const String& url, RemotingClientPtr remotingClientPtr, ITransactionPtr transactionPtr);
80 RscClient(
const RscClient& arg) =
delete;
82 RscClient(RscClient&& arg)
noexcept =
default;
84 RscClient& operator=(
const RscClient& arg) =
delete;
86 RscClient& operator=(RscClient&& arg)
noexcept =
default;
91 bool IsConnected(
void)
const;
92 RemotingSession& GetSession(
void)
const;
96 RscHandle GetServiceProviderHandle(
const char* serviceProviderName);
97 RscHandle GetServiceHandle(RscHandle serviceProviderHandle,
const char* serviceName);
98 RscHandle GetServiceHandle(
const char* serviceProviderName,
const char* serviceName);
99 void GetServiceHandles(
const char* serviceProviderName,
const char* serviceName, RscHandle& serviceProviderHandle, RscHandle& serviceHandle);
100 void Close(
bool disconnectRemoting =
true);
103 void BeginTransaction(IRscServiceProxy& proxy);
104 void EndTransaction(IRscServiceProxy& proxy);
105 void BeginRemotingTransaction(
void);
106 void EndRemotingTransaction(
void);
110 RemotingClientPtr remotingClientPtr;
111 ITransactionPtr transactionPtr;
116inline RscClient::TransactionGuard::TransactionGuard(RscClient& client, IRscServiceProxy& proxy)
120 this->client.BeginTransaction(this->proxy);
123inline RscClient::TransactionGuard::~TransactionGuard()
125 this->client.EndTransaction(this->proxy);
Definition: RscClient.hpp:67
Definition: RscClient.hpp:51
Definition: SecurityToken.hpp:12
@ System
System components used by the System, Device, Plc or Io domains.
Root namespace for the PLCnext API