|
|
@@ -72,6 +72,9 @@ using namespace Initializer;
|
|
|
#include "CameraConfigManage_def_g.h"
|
|
|
using namespace CameraConfigManage;
|
|
|
|
|
|
+#include "Chromium_client_g.h"
|
|
|
+using namespace Chromium;
|
|
|
+
|
|
|
template<class T>
|
|
|
class TimerOutHelper : public ITimerListener
|
|
|
{
|
|
|
@@ -233,6 +236,12 @@ void CHealthManagerEntity::OnStarted()
|
|
|
break;
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ CSimpleStringA strUrl;
|
|
|
+ result = GetGuidePageUrlWithStep(curStep, strUrl);
|
|
|
+ Dbg("Url:{%s}", (LPCTSTR)strUrl);
|
|
|
+ result = TellChromiumOpenGuidePage(strUrl);
|
|
|
+
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@@ -2200,14 +2209,40 @@ ErrorCodeEnum CHealthManagerEntity::GetGuidePageUrlWithStep(int whichStep, CSimp
|
|
|
CSimpleStringA pagePath;
|
|
|
ErrorCodeEnum ec = GetFunction()->GetPath("Base", pagePath);
|
|
|
pagePath.Append(SPLIT_SLASH_STR "res" SPLIT_SLASH_STR "ManagerDesktop" SPLIT_SLASH_STR "guide.html");
|
|
|
- if (whichStep <= 0) {
|
|
|
- strUrl = pagePath;
|
|
|
- } else {
|
|
|
- strUrl = CSimpleStringA::Format("%s#%d", pagePath.GetData(), whichStep);
|
|
|
+ if (whichStep > 0) {
|
|
|
+ pagePath = CSimpleStringA::Format("%s#%d", pagePath.GetData(), whichStep);
|
|
|
}
|
|
|
+ strUrl = CSimpleStringA("\'file:///") + pagePath + CSimpleStringA("\'");
|
|
|
return ec;
|
|
|
}
|
|
|
|
|
|
+ErrorCodeEnum CHealthManagerEntity::TellChromiumOpenGuidePage(const CSimpleStringA& pageUrl)
|
|
|
+{
|
|
|
+ ErrorCodeEnum result(Error_Succeed);
|
|
|
+ auto pClient = new ChromiumSrv_ClientBase(this);
|
|
|
+ result = pClient->Connect();
|
|
|
+ if (result == Error_Succeed) {
|
|
|
+ ChromiumSrv_OpenBrowser_Req req;
|
|
|
+ ChromiumSrv_OpenBrowser_Ans ans;
|
|
|
+ req.mainUrl = pageUrl;
|
|
|
+ req.viceUrl = "";
|
|
|
+ req.exclusiveMode = true;
|
|
|
+ req.type = 0;
|
|
|
+
|
|
|
+ result = pClient->OpenBrowser(req, ans, 10000);
|
|
|
+ if (result == Error_Succeed) {
|
|
|
+ Dbg("Request Chromium::OpenBrowser succ!");
|
|
|
+ } else {
|
|
|
+ Dbg("Request Chromium::OpenBrowser failed: %s", SpStrError(result));
|
|
|
+ }
|
|
|
+ pClient->GetFunction()->CloseSession();
|
|
|
+ } else {
|
|
|
+ pClient->SafeDelete();
|
|
|
+ Dbg("Connect to Chromium entity failed: %s", SpStrError(result));
|
|
|
+ }
|
|
|
+ return result;
|
|
|
+}
|
|
|
+
|
|
|
void CHealthManagerEntity::DeployTerminal(SpReqAnsContext<HealthManagerService_DeployTerminal_Req, HealthManagerService_DeployTerminal_Ans>::Pointer ctx)
|
|
|
{
|
|
|
|