InteractiveLog_client_g.h 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126
  1. #ifndef __INTERACTIVELOG_CLIENT_G_H
  2. #define __INTERACTIVELOG_CLIENT_G_H
  3. #pragma once
  4. // This code is generated by spgen tool!
  5. #include "InteractiveLog_def_g.h"
  6. namespace InteractiveLog {
  7. class LogService_ClientBase : public CClientSessionBase {
  8. public:
  9. LogService_ClientBase(CEntityBase *pEntity) : m_pEntityBase(pEntity), m_bSysManaged(false) {}
  10. protected:
  11. virtual ~LogService_ClientBase() {}
  12. public:
  13. ErrorCodeEnum Connect(CSmartPointer<IAsynWaitSp> &spAsyncWait)
  14. {
  15. CSmartPointer<IEntityFunction> pFunc = m_pEntityBase->GetFunction();
  16. ErrorCodeEnum Error = pFunc->ConnectRemoteEntity(this, "InteractiveLog", "LogService", spAsyncWait);
  17. if (Error == Error_Succeed) {
  18. m_bSysManaged = true;
  19. }
  20. return Error;
  21. }
  22. ErrorCodeEnum Connect()
  23. {
  24. CSmartPointer<IAsynWaitSp> spAsyncWait;
  25. ErrorCodeEnum Error = Connect(spAsyncWait);
  26. if (Error == Error_Succeed) {
  27. Error = spAsyncWait->WaitAnswer();
  28. }
  29. return Error;
  30. }
  31. ErrorCodeEnum LogFunction(LogService_LogFunction_Info &Info)
  32. {
  33. CSmartPointer<IClientSessionFunction> pFunc = GetFunction();
  34. CAutoBuffer Buf = SpObject2Buffer(Info);
  35. return pFunc->OnewayCall(LogService_Method_LogFunction, LogService_MethodSignature_LogFunction, Buf);
  36. }
  37. ErrorCodeEnum LogCustomerID(LogService_LogCustomerID_Info &Info)
  38. {
  39. CSmartPointer<IClientSessionFunction> pFunc = GetFunction();
  40. CAutoBuffer Buf = SpObject2Buffer(Info);
  41. return pFunc->OnewayCall(LogService_Method_LogCustomerID, LogService_MethodSignature_LogCustomerID, Buf);
  42. }
  43. ErrorCodeEnum LogAgreement(LogService_LogAgreement_Info &Info)
  44. {
  45. CSmartPointer<IClientSessionFunction> pFunc = GetFunction();
  46. CAutoBuffer Buf = SpObject2Buffer(Info);
  47. return pFunc->OnewayCall(LogService_Method_LogAgreement, LogService_MethodSignature_LogAgreement, Buf);
  48. }
  49. ErrorCodeEnum LogReceipt(LogService_LogReceipt_Info &Info)
  50. {
  51. CSmartPointer<IClientSessionFunction> pFunc = GetFunction();
  52. CAutoBuffer Buf = SpObject2Buffer(Info);
  53. return pFunc->OnewayCall(LogService_Method_LogReceipt, LogService_MethodSignature_LogReceipt, Buf);
  54. }
  55. ErrorCodeEnum LogOperation(LogService_LogOperation_Info &Info)
  56. {
  57. CSmartPointer<IClientSessionFunction> pFunc = GetFunction();
  58. CAutoBuffer Buf = SpObject2Buffer(Info);
  59. return pFunc->OnewayCall(LogService_Method_LogOperation, LogService_MethodSignature_LogOperation, Buf);
  60. }
  61. ErrorCodeEnum LogResponse(LogService_LogResponse_Info &Info)
  62. {
  63. CSmartPointer<IClientSessionFunction> pFunc = GetFunction();
  64. CAutoBuffer Buf = SpObject2Buffer(Info);
  65. return pFunc->OnewayCall(LogService_Method_LogResponse, LogService_MethodSignature_LogResponse, Buf);
  66. }
  67. ErrorCodeEnum LogAgent(LogService_LogAgent_Info &Info)
  68. {
  69. CSmartPointer<IClientSessionFunction> pFunc = GetFunction();
  70. CAutoBuffer Buf = SpObject2Buffer(Info);
  71. return pFunc->OnewayCall(LogService_Method_LogAgent, LogService_MethodSignature_LogAgent, Buf);
  72. }
  73. ErrorCodeEnum LogBegin(LogService_LogBegin_Info &Info)
  74. {
  75. CSmartPointer<IClientSessionFunction> pFunc = GetFunction();
  76. CAutoBuffer Buf = SpObject2Buffer(Info);
  77. return pFunc->OnewayCall(LogService_Method_LogBegin, LogService_MethodSignature_LogBegin, Buf);
  78. }
  79. ErrorCodeEnum LogEnd(LogService_LogEnd_Info &Info)
  80. {
  81. CSmartPointer<IClientSessionFunction> pFunc = GetFunction();
  82. CAutoBuffer Buf = SpObject2Buffer(Info);
  83. return pFunc->OnewayCall(LogService_Method_LogEnd, LogService_MethodSignature_LogEnd, Buf);
  84. }
  85. ErrorCodeEnum LogCallID(LogService_LogCallID_Info &Info)
  86. {
  87. CSmartPointer<IClientSessionFunction> pFunc = GetFunction();
  88. CAutoBuffer Buf = SpObject2Buffer(Info);
  89. return pFunc->OnewayCall(LogService_Method_LogCallID, LogService_MethodSignature_LogCallID, Buf);
  90. }
  91. bool SafeDelete()
  92. {
  93. if (!m_bSysManaged) {
  94. delete this;
  95. }
  96. return m_bSysManaged;
  97. }
  98. protected:
  99. bool m_bSysManaged;
  100. CEntityBase *m_pEntityBase;
  101. };
  102. ///////////////////////////
  103. } // namespace InteractiveLog
  104. #endif // __INTERACTIVELOG_CLIENT_G_H