Bladeren bron

#IQRV #comment 健康实体跨平台标注

80374374 5 maanden geleden
bovenliggende
commit
c826f7902c

+ 1 - 0
Module/mod_guiconsole/mod_guiconsole.cpp

@@ -456,6 +456,7 @@ std::pair<DWORD, std::string> CGUIConsoleEntity::VTMSystemControl(SpReqAnsContex
 		msg.message = "正在重启系统";
 		SpSendBroadcast(GetFunction(), eMsg_LogInfo, eMsgSig_LogInfo, msg);
 
+		//TODO: CrossPlaform  [Gifur@2025630]
 #ifdef RVC_OS_WIN
 		rc = pFuncPrivilege->Reboot(RebootTrigger_ManualLocal, RebootWayEnum::RebootWay_OS);
 #else

+ 2 - 0
Module/mod_healthmanager/HealthManagerFSM.cpp

@@ -1055,6 +1055,8 @@ void CHealthManagerFSM::QueryHardwareInfo(SpReqAnsContext<HealthManagerService_Q
 		, ctx->Ans.machineType.GetData());
 	ctx->Answer(Error_Succeed);
 }
+
+//TODO: CrossPlaform  [Gifur@2025630]
 bool CHealthManagerFSM::CheckProcessExistByName(CSimpleStringA procName)
 {
 	if (procName.IsNullOrEmpty())

+ 5 - 28
Module/mod_healthmanager/mod_healthmanager.cpp

@@ -445,6 +445,9 @@ bool FindGuardianPid(CAutoArray<int> &pIDArr)
 	return false;
 }
 #endif //RVC_OS_LINUX
+
+
+//TODO: CrossPlaform  [Gifur@2025630]
 int CHealthManagerEntity::CheckGuardianIsRun(bool bStart)
 {
 #ifdef RVC_OS_WIN
@@ -543,6 +546,8 @@ int CHealthManagerEntity::CheckGuardianIsRun(bool bStart)
 	}
 #endif //RVC_OS_WIN
 }
+
+//TODO: CrossPlaform  [Gifur@2025630]
 bool CHealthManagerEntity::StopGuardian()
 {
 #ifdef RVC_OS_WIN
@@ -1418,34 +1423,6 @@ void CHealthManagerEntity::WarnAndRestartFunc(RebootTriggerEnum eTrigger, Reboot
 	m_fsm.QuitFrameworkAndSaveInfo(eTrigger, eWay);
 }
 
-namespace
-{
-
-	ErrorCodeEnum SplitAdapterFileName(CSimpleStringA strFileName, CAutoArray<CSimpleStringA>& values)
-	{
-#ifdef RVC_OS_WIN
-		CSimpleStringA strPrefix("");
-		CSimpleStringA strSuffix(".dll");
-#else
-		CSimpleStringA strPrefix("lib");
-		CSimpleStringA strSuffix(".so");
-#endif //RVC_OS_WIN
-
-		if (strFileName.GetLength() < strPrefix.GetLength() + strSuffix.GetLength()) {
-			return Error_Param;
-		}
-
-		CSimpleStringA pureAdapterName = strFileName.SubString(
-			strPrefix.GetLength(), strFileName.GetLength() - strPrefix.GetLength() - strSuffix.GetLength());
-
-		values = pureAdapterName.Split('.');
-		if (values.GetCount() != 4) {
-			return Error_DataCheck;
-		}
-		return Error_Succeed;
-	}
-}
-
 void CHealthManagerEntity::OnEntityStateHook(const char* pszEntityName, const char* pszTriggerEntity, EntityStateEnum eState, EntityStateEnum eLastState)
 {
 	if (m_fsm.CheckIsRebooting())//oilyang@20250415 no need to process entity state changing event while in rebooting