123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126 |
- #ifndef __INTERACTIVELOG_CLIENT_G_H
- #define __INTERACTIVELOG_CLIENT_G_H
- #pragma once
- // This code is generated by spgen tool!
- #include "InteractiveLog_def_g.h"
- namespace InteractiveLog {
- class LogService_ClientBase : public CClientSessionBase {
- public:
- LogService_ClientBase(CEntityBase *pEntity) : m_pEntityBase(pEntity), m_bSysManaged(false) {}
- protected:
- virtual ~LogService_ClientBase() {}
- public:
- ErrorCodeEnum Connect(CSmartPointer<IAsynWaitSp> &spAsyncWait)
- {
- CSmartPointer<IEntityFunction> pFunc = m_pEntityBase->GetFunction();
- ErrorCodeEnum Error = pFunc->ConnectRemoteEntity(this, "InteractiveLog", "LogService", 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 LogFunction(LogService_LogFunction_Info &Info)
- {
- CSmartPointer<IClientSessionFunction> pFunc = GetFunction();
- CAutoBuffer Buf = SpObject2Buffer(Info);
- return pFunc->OnewayCall(LogService_Method_LogFunction, LogService_MethodSignature_LogFunction, Buf);
- }
- ErrorCodeEnum LogCustomerID(LogService_LogCustomerID_Info &Info)
- {
- CSmartPointer<IClientSessionFunction> pFunc = GetFunction();
- CAutoBuffer Buf = SpObject2Buffer(Info);
- return pFunc->OnewayCall(LogService_Method_LogCustomerID, LogService_MethodSignature_LogCustomerID, Buf);
- }
- ErrorCodeEnum LogAgreement(LogService_LogAgreement_Info &Info)
- {
- CSmartPointer<IClientSessionFunction> pFunc = GetFunction();
- CAutoBuffer Buf = SpObject2Buffer(Info);
- return pFunc->OnewayCall(LogService_Method_LogAgreement, LogService_MethodSignature_LogAgreement, Buf);
- }
- ErrorCodeEnum LogReceipt(LogService_LogReceipt_Info &Info)
- {
- CSmartPointer<IClientSessionFunction> pFunc = GetFunction();
- CAutoBuffer Buf = SpObject2Buffer(Info);
- return pFunc->OnewayCall(LogService_Method_LogReceipt, LogService_MethodSignature_LogReceipt, Buf);
- }
- ErrorCodeEnum LogOperation(LogService_LogOperation_Info &Info)
- {
- CSmartPointer<IClientSessionFunction> pFunc = GetFunction();
- CAutoBuffer Buf = SpObject2Buffer(Info);
- return pFunc->OnewayCall(LogService_Method_LogOperation, LogService_MethodSignature_LogOperation, Buf);
- }
- ErrorCodeEnum LogResponse(LogService_LogResponse_Info &Info)
- {
- CSmartPointer<IClientSessionFunction> pFunc = GetFunction();
- CAutoBuffer Buf = SpObject2Buffer(Info);
- return pFunc->OnewayCall(LogService_Method_LogResponse, LogService_MethodSignature_LogResponse, Buf);
- }
- ErrorCodeEnum LogAgent(LogService_LogAgent_Info &Info)
- {
- CSmartPointer<IClientSessionFunction> pFunc = GetFunction();
- CAutoBuffer Buf = SpObject2Buffer(Info);
- return pFunc->OnewayCall(LogService_Method_LogAgent, LogService_MethodSignature_LogAgent, Buf);
- }
- ErrorCodeEnum LogBegin(LogService_LogBegin_Info &Info)
- {
- CSmartPointer<IClientSessionFunction> pFunc = GetFunction();
- CAutoBuffer Buf = SpObject2Buffer(Info);
- return pFunc->OnewayCall(LogService_Method_LogBegin, LogService_MethodSignature_LogBegin, Buf);
- }
- ErrorCodeEnum LogEnd(LogService_LogEnd_Info &Info)
- {
- CSmartPointer<IClientSessionFunction> pFunc = GetFunction();
- CAutoBuffer Buf = SpObject2Buffer(Info);
- return pFunc->OnewayCall(LogService_Method_LogEnd, LogService_MethodSignature_LogEnd, Buf);
- }
- ErrorCodeEnum LogCallID(LogService_LogCallID_Info &Info)
- {
- CSmartPointer<IClientSessionFunction> pFunc = GetFunction();
- CAutoBuffer Buf = SpObject2Buffer(Info);
- return pFunc->OnewayCall(LogService_Method_LogCallID, LogService_MethodSignature_LogCallID, Buf);
- }
- bool SafeDelete()
- {
- if (!m_bSysManaged) {
- delete this;
- }
- return m_bSysManaged;
- }
- protected:
- bool m_bSysManaged;
- CEntityBase *m_pEntityBase;
- };
- ///////////////////////////
- } // namespace InteractiveLog
- #endif // __INTERACTIVELOG_CLIENT_G_H
|