Explorar el Código

Z991239-4753 #comment 归并信创的新接口

oilyang hace 2 años
padre
commit
c394632695

+ 5 - 14
Module/mod_healthmanager/GuardianBase.h

@@ -2,16 +2,7 @@
 #define __GUARDIAN_BASE_H
 #pragma once
 
-//#include "SpBase.h"
-//#include "ErrorCode.h"
-#ifdef linux
-//typedef unsigned long DWORD;
-//typedef char CHAR;
-//typedef char* PCHAR;
-//typedef bool BOOL;
-//typedef unsigned long long ULONGLONG;
-#else
-#endif
+#include "ErrorCode.h"
 enum WorkStateEnum
 {
 	WorkStateUpgrading=0,
@@ -59,11 +50,11 @@ extern "C" {
 #   define GUARDIANBASE_API
 #endif
 
-GUARDIANBASE_API int ShakeHands(WorkStateEnum &eState);
-GUARDIANBASE_API int PushUpdateTask(const char *pszPackName);
+GUARDIANBASE_API ErrorCodeEnum ShakeHands(WorkStateEnum &eState);
+GUARDIANBASE_API ErrorCodeEnum PushUpdateTask(const char *pszPackName);
 GUARDIANBASE_API bool IsInstalling();
-GUARDIANBASE_API int UpgradeRestart(const DWORD dwParam1,const DWORD dwParam2);
-GUARDIANBASE_API int FrameworkQuit(int eReason);
+GUARDIANBASE_API ErrorCodeEnum UpgradeRestart(const DWORD dwParam1,const DWORD dwParam2);
+GUARDIANBASE_API ErrorCodeEnum FrameworkQuit(int eReason);
 
 
 #ifdef __cplusplus

+ 30 - 1
Module/mod_healthmanager/HealthManager_client_g.h

@@ -275,7 +275,36 @@ public:
 		}
 		return Error;
 	}
-
+	ErrorCodeEnum GetAuthErrMsg(HealthManagerService_GetAuthErrMsg_Req &Req, CSmartPointer<IAsynWaitSp> &spAsyncWait, DWORD dwTimeout)
+	{
+		CSmartPointer<IClientSessionFunction> pFunc = GetFunction();
+		CAutoBuffer Buf = SpObject2Buffer(Req);
+		auto ret = pFunc->AsyncRequest(HealthManagerService_Method_GetAuthErrMsg, HealthManagerService_MethodSignature_GetAuthErrMsg, Buf, spAsyncWait, m_context, dwTimeout);
+		m_context.clear();
+		return ret;
+	}
+	ErrorCodeEnum GetAuthErrMsg(HealthManagerService_GetAuthErrMsg_Req &Req, HealthManagerService_GetAuthErrMsg_Ans &Ans, DWORD dwTimeout)
+	{
+		CSmartPointer<IAsynWaitSp> spAsyncWait;
+		ErrorCodeEnum Error = GetAuthErrMsg(Req, spAsyncWait, dwTimeout);
+		if (Error == Error_Succeed) {
+			bool bEnd = false;
+			Error = SpWaitAnswerObject(spAsyncWait, Ans, bEnd, dwTimeout);
+			LOG_ASSERT(Error || bEnd);
+		}
+		return Error;
+	}
+	ErrorCodeEnum GetAuthErrMsg(HealthManagerService_GetAuthErrMsg_Req &Req, HealthManagerService_GetAuthErrMsg_Ans &Ans, DWORD dwTimeout, DWORD &dwUserError)
+	{
+		CSmartPointer<IAsynWaitSp> spAsyncWait;
+		ErrorCodeEnum Error = GetAuthErrMsg(Req, spAsyncWait, dwTimeout);
+		if (Error == Error_Succeed) {
+			bool bEnd = false;
+			Error = SpWaitAnswerObject(spAsyncWait, Ans, bEnd, dwUserError, dwTimeout);
+			LOG_ASSERT(Error || bEnd);
+		}
+		return Error;
+	}
 	ErrorCodeEnum ControlTerminalLife(HealthManagerService_ControlTerminalLife_Req &Req, CSmartPointer<IAsynWaitSp> &spAsyncWait, DWORD dwTimeout)
 	{
 		CSmartPointer<IClientSessionFunction> pFunc = GetFunction();

+ 37 - 4
Module/mod_healthmanager/HealthManager_def_g.h

@@ -28,10 +28,11 @@ namespace HealthManager {
 #define HealthManagerService_Method_GetNetworkState 4
 #define HealthManagerService_Method_QueryHardwareInfo 5
 #define HealthManagerService_Method_ReadCenterConfigStr 6
-#define HealthManagerService_Method_ControlTerminalLife 7
-#define HealthManagerService_Method_DeployTerminal 8
-#define HealthManagerService_Method_ControlEntityLife 9
-#define HealthManagerService_Method_Gateway 10
+#define HealthManagerService_Method_GetAuthErrMsg 7
+#define HealthManagerService_Method_ControlTerminalLife 8
+#define HealthManagerService_Method_DeployTerminal 9
+#define HealthManagerService_Method_ControlEntityLife 10
+#define HealthManagerService_Method_Gateway 11
 
 #define HealthManagerService_MethodSignature_EnterState 1738606772
 #define HealthManagerService_MethodSignature_ExitState -1969000942
@@ -40,11 +41,22 @@ namespace HealthManager {
 #define HealthManagerService_MethodSignature_GetNetworkState -947427417
 #define HealthManagerService_MethodSignature_QueryHardwareInfo 1308469188
 #define HealthManagerService_MethodSignature_ReadCenterConfigStr 1222672990
+#define HealthManagerService_MethodSignature_GetAuthErrMsg -462279661
 #define HealthManagerService_MethodSignature_ControlTerminalLife 397251033
 #define HealthManagerService_MethodSignature_DeployTerminal -1435088905
 #define HealthManagerService_MethodSignature_ControlEntityLife 1220598826
 #define HealthManagerService_MethodSignature_Gateway -1816595817
 
+
+#define HealthManagerService_LogCode_EnterState "QLR040250100"
+#define HealthManagerService_LogCode_ExitState "QLR040250101"
+#define HealthManagerService_LogCode_DoEvent "QLR040250102"
+#define HealthManagerService_LogCode_GetEntityCfgInfo "QLR040250103"
+#define HealthManagerService_LogCode_GetNetworkState "QLR040250104"
+#define HealthManagerService_LogCode_QueryHardwareInfo "QLR040250105"
+#define HealthManagerService_LogCode_ReadCenterConfigStr "QLR040250106"
+#define HealthManagerService_LogCode_GetAuthErrMsg "QLR040250107"
+
 struct HealthManagerService_EnterState_Req
 {
 	CSimpleStringA state;
@@ -220,6 +232,27 @@ struct HealthManagerService_ReadCenterConfigStr_Ans
 
 };
 
+struct HealthManagerService_GetAuthErrMsg_Req
+{
+
+	void Serialize(SpBuffer &Buf)
+	{
+	}
+
+};
+
+struct HealthManagerService_GetAuthErrMsg_Ans
+{
+	CSimpleStringA errMsg;
+	CSimpleStringA reserved1;
+	CSimpleStringA reserved2;
+
+	void Serialize(SpBuffer &Buf)
+	{
+		auto & buf = Buf & errMsg & reserved1 & reserved2;
+	}
+
+};
 struct HealthManagerService_ControlTerminalLife_Req
 {
 	int cmdType;

+ 10 - 0
Module/mod_healthmanager/Healthmanager.xml

@@ -71,6 +71,7 @@
 				<param name="ip" type="array_string" />
 				<param name="mac" type="array_string" />
 				<param name="reserved1" type="int" />
+				<!-- 用于判断安装的搜狗输入法是SDK版本还是普通调用版本,1表示新输入法,0表示旧输入法,其他情况也一律返回0 -->
 				<param name="reserved2" type="int" />				
 				<param name="reserved3" type="string" />
 				<param name="reserved4" type="string" />
@@ -93,6 +94,15 @@
 				<param name="reserved4" type="string" />
 			</res>			
 		</twoway>
+		<twoway name="GetAuthErrMsg" overlap="true">
+			<req>
+			</req>
+			<res>
+				<param name="errMsg" type="string" />
+				<param name="reserved1" type="string" />
+				<param name="reserved2" type="string" />
+			</res>			
+		</twoway>
 		<twoway name="ControlTerminalLife" overlap="true">
 			<req>
         <!--1:restart app; 2: shutdown app; 3:shutdown app and guardian; 4: restart pc; 5: poweroff; 6:poweroff with ups-->