|
@@ -32,6 +32,7 @@ public:
|
|
|
}
|
|
|
void OnClose(ErrorCodeEnum)
|
|
|
{
|
|
|
+ Dbg("session closed.");
|
|
|
bSessionClosed = true;
|
|
|
}
|
|
|
bool QuerySessionClosed()
|
|
@@ -303,6 +304,55 @@ public:
|
|
|
return Error;
|
|
|
}
|
|
|
|
|
|
+ ErrorCodeEnum QueryLocalInfo(VtmLoaderService_QueryLocalInfo_Req &Req, CSmartPointer<IAsynWaitSp> &spAsyncWait, DWORD dwTimeout)
|
|
|
+ {
|
|
|
+ CSmartPointer<IClientSessionFunction> pFunc = GetFunction();
|
|
|
+ CAutoBuffer Buf = SpObject2Buffer(Req);
|
|
|
+ if (m_context.checkEmpty())
|
|
|
+ {
|
|
|
+ m_context.AutoGenerate();
|
|
|
+ DbgToBeidou(m_context, m_pEntityBase != NULL ? m_pEntityBase->GetEntityName() : "")();
|
|
|
+ m_context = m_context.upgradeLink();
|
|
|
+ }
|
|
|
+ auto ret = pFunc->AsyncRequest(VtmLoaderService_Method_QueryLocalInfo, VtmLoaderService_MethodSignature_QueryLocalInfo, Buf, spAsyncWait, m_context, dwTimeout);
|
|
|
+ m_context.clear();
|
|
|
+ return ret;
|
|
|
+ }
|
|
|
+ ErrorCodeEnum QueryLocalInfo(VtmLoaderService_QueryLocalInfo_Req &Req, VtmLoaderService_QueryLocalInfo_Ans &Ans, DWORD dwTimeout)
|
|
|
+ {
|
|
|
+ CSmartPointer<IAsynWaitSp> spAsyncWait;
|
|
|
+ ErrorCodeEnum Error = QueryLocalInfo(Req, spAsyncWait, dwTimeout);
|
|
|
+ if (Error == Error_Succeed) {
|
|
|
+ bool bEnd = false;
|
|
|
+ Error = SpWaitAnswerObject(spAsyncWait, Ans, bEnd, dwTimeout);
|
|
|
+ LOG_ASSERT(Error || bEnd);
|
|
|
+ }
|
|
|
+ return Error;
|
|
|
+ }
|
|
|
+ ErrorCodeEnum QueryLocalInfo(VtmLoaderService_QueryLocalInfo_Req &Req, VtmLoaderService_QueryLocalInfo_Ans &Ans, DWORD dwTimeout, DWORD &dwUserError, CSimpleString &str)
|
|
|
+ {
|
|
|
+ CSmartPointer<IAsynWaitSp> spAsyncWait;
|
|
|
+ ErrorCodeEnum Error = QueryLocalInfo(Req, spAsyncWait, dwTimeout);
|
|
|
+ if (Error == Error_Succeed) {
|
|
|
+ bool bEnd = false;
|
|
|
+ Error = SpWaitAnswerObject(spAsyncWait, Ans, bEnd, dwUserError, str, dwTimeout);
|
|
|
+ LOG_ASSERT(Error || bEnd);
|
|
|
+ }
|
|
|
+ return Error;
|
|
|
+ }
|
|
|
+ ErrorCodeEnum QueryLocalInfo(VtmLoaderService_QueryLocalInfo_Req &Req, VtmLoaderService_QueryLocalInfo_Ans &Ans, DWORD dwTimeout, DWORD &dwUserError)
|
|
|
+ {
|
|
|
+ CSmartPointer<IAsynWaitSp> spAsyncWait;
|
|
|
+ ErrorCodeEnum Error = QueryLocalInfo(Req, spAsyncWait, dwTimeout);
|
|
|
+ if (Error == Error_Succeed) {
|
|
|
+ bool bEnd = false;
|
|
|
+ CSimpleString str;
|
|
|
+ Error = SpWaitAnswerObject(spAsyncWait, Ans, bEnd, dwUserError, str, dwTimeout);
|
|
|
+ LOG_ASSERT(Error || bEnd);
|
|
|
+ }
|
|
|
+ return Error;
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
bool SafeDelete()
|
|
|
{
|