| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677 |
- #ifndef __INITIATIVETRANSFER_CLIENT_G_H
- #define __INITIATIVETRANSFER_CLIENT_G_H
- #pragma once
- // This code is generated by spgen tool!
- #include "InitiativeTransfer_def_g.h"
- namespace InitiativeTransfer {
- class FlowService_ClientBase : public CClientSessionBase {
- public:
- FlowService_ClientBase(CEntityBase *pEntity) : m_pEntityBase(pEntity), m_bSysManaged(false) {}
- protected:
- virtual ~FlowService_ClientBase() {}
- public:
- ErrorCodeEnum Connect(CSmartPointer<IAsynWaitSp> &spAsyncWait)
- {
- CSmartPointer<IEntityFunction> pFunc = m_pEntityBase->GetFunction();
- ErrorCodeEnum Error = pFunc->ConnectRemoteEntity(this, "InitiativeTransfer", "FlowService", spAsyncWait);
- if (Error == Error_Succeed) {
- m_bSysManaged = true;
- }
- return Error;
- }
- ErrorCodeEnum Connect()
- {
- CSmartPointer<IAsynWaitSp> spAsyncWait;
- ErrorCodeEnum Error = Connect(spAsyncWait);
- if (Error == Error_Succeed) {
- Error = spAsyncWait->WaitAnswer();
- }
- return Error;
- }
- ErrorCodeEnum SwitchToAgentFlow(FlowService_SwitchToAgentFlow_Info &Info)
- {
- CSmartPointer<IClientSessionFunction> pFunc = GetFunction();
- CAutoBuffer Buf = SpObject2Buffer(Info);
- return pFunc->OnewayCall(FlowService_Method_SwitchToAgentFlow, FlowService_MethodSignature_SwitchToAgentFlow, Buf);
- }
- ErrorCodeEnum DisallowControl(FlowService_DisallowControl_Info &Info)
- {
- CSmartPointer<IClientSessionFunction> pFunc = GetFunction();
- CAutoBuffer Buf = SpObject2Buffer(Info);
- return pFunc->OnewayCall(FlowService_Method_DisallowControl, FlowService_MethodSignature_DisallowControl, Buf);
- }
- ErrorCodeEnum ReturnAgent(FlowService_ReturnAgent_Info &Info)
- {
- CSmartPointer<IClientSessionFunction> pFunc = GetFunction();
- CAutoBuffer Buf = SpObject2Buffer(Info);
- return pFunc->OnewayCall(FlowService_Method_ReturnAgent, FlowService_MethodSignature_ReturnAgent, Buf);
- }
- bool SafeDelete()
- {
- if (!m_bSysManaged) {
- delete this;
- }
- return m_bSysManaged;
- }
- protected:
- bool m_bSysManaged;
- CEntityBase *m_pEntityBase;
- };
- ///////////////////////////
- } // namespace InitiativeTransfer
- #endif // __INITIATIVETRANSFER_CLIENT_G_H
|