|
@@ -180,6 +180,15 @@ ErrorCodeEnum CITCtrlEntity::__OnStart(ErrorCodeEnum preOperationError)
|
|
|
}
|
|
|
|
|
|
m_eDeviceType = RvcGetDeviceType();
|
|
|
+
|
|
|
+ if (eMobilePadType == m_eDeviceType)
|
|
|
+ {
|
|
|
+ Error = pFunc->RegistSysVarEvent("CameraState", this);
|
|
|
+ if (Error != Error_Succeed){
|
|
|
+ DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("register sysvar %s failed!", "CameraState");
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
if (eStand2sType == m_eDeviceType)
|
|
|
{
|
|
@@ -231,6 +240,10 @@ ErrorCodeEnum CITCtrlEntity::__OnClose(ErrorCodeEnum preOperationError)
|
|
|
CSmartPointer<IEntityFunction> pFunc = GetFunction();
|
|
|
pFunc->UnregistSysVarEvent("UIState");
|
|
|
pFunc->UnregistSysVarEvent("CustomerHandle");
|
|
|
+ if (eMobilePadType == m_eDeviceType)
|
|
|
+ {
|
|
|
+ pFunc->UnregistSysVarEvent("CameraState");
|
|
|
+ }
|
|
|
|
|
|
pFunc->UnregistSysVarEvent(SYSVAR_CALLTYPE);
|
|
|
if (NULL != m_pChannelClient) {
|
|
@@ -352,18 +365,21 @@ void CITCtrlEntity::OnSysVarEvent(const char *pszKey, const char *pszValue,const
|
|
|
if (m_bAdvOnFlag) {
|
|
|
AdverPlayManage(pszValue, pszOldValue);
|
|
|
}
|
|
|
+#else
|
|
|
+ AdverPlayManage(pszValue, pszOldValue);
|
|
|
#endif
|
|
|
BcastCustomerState(pszValue, pszOldValue, pszEntityName);
|
|
|
DbgWithLink(LOG_LEVEL_DEBUG, LOG_TYPE_SYSTEM)("CustomerState change to %c",pszValue[0]);
|
|
|
}
|
|
|
}
|
|
|
- else if (_stricmp(pszKey, "UIState") == 0) {
|
|
|
#ifdef RVC_OS_LINUX
|
|
|
+ else if (_stricmp(pszKey, "UIState") == 0) {
|
|
|
+
|
|
|
if (_strnicmp(pszValue, "M", strlen("M")) == 0){
|
|
|
LogEvent(Severity_Middle, LOG_EVT_UI_RETURNMENU, NULL);
|
|
|
}
|
|
|
-#endif
|
|
|
}
|
|
|
+#endif
|
|
|
else if(_stricmp(pszKey,"SessionID")==0)
|
|
|
{
|
|
|
CSimpleStringA strSessionID;
|
|
@@ -392,8 +408,6 @@ void CITCtrlEntity::OnSysVarEvent(const char *pszKey, const char *pszValue,const
|
|
|
if (strValue == CSimpleStringA("U")) {
|
|
|
#ifdef _WIN32
|
|
|
MessageBoxA(NULL, (LPCSTR)CSimpleStringA::Format("%s摄像头故障!", (strlen(pszValue) <= 1 ? "" : pszValue + 1)), NULL, MB_SYSTEMMODAL);
|
|
|
- #else
|
|
|
-
|
|
|
#endif
|
|
|
}
|
|
|
}
|
|
@@ -435,8 +449,12 @@ void CITCtrlEntity::SyncMenuTree(int tree, int path)
|
|
|
{
|
|
|
SpBuffer buf;
|
|
|
buf.OpenWrite(32 + m_strMenuTree.GetLength() * 2);
|
|
|
- CSimpleString16Bit menuTree = CSimpleStringW216Bit(m_strMenuTree);
|
|
|
- buf& menuTree;
|
|
|
+#if defined(RVC_OS_WIN)
|
|
|
+ buf& m_strMenuTree;
|
|
|
+#else
|
|
|
+ CSimpleString16Bit menuTree = CSimpleStringW216Bit(m_strMenuTree);
|
|
|
+ buf& menuTree;
|
|
|
+#endif //RVC_OS_WIN
|
|
|
ChannelService_Send_Info Info;
|
|
|
Info.sub_type = ACM_IM_MENUTREE;
|
|
|
Info.type = ACM_TYPE_IM;
|
|
@@ -464,8 +482,12 @@ void CITCtrlEntity::SyncMenuTree(int tree, int path)
|
|
|
{
|
|
|
SpBuffer buf;
|
|
|
buf.OpenWrite(32 + m_strMenuPath.GetLength()*2);
|
|
|
- CSimpleString16Bit menuPath = CSimpleStringW216Bit(m_strMenuPath);
|
|
|
- buf& menuPath;
|
|
|
+#if defined(RVC_OS_WIN)
|
|
|
+ buf& m_strMenuPath;
|
|
|
+#else
|
|
|
+ CSimpleString16Bit menuPath = CSimpleStringW216Bit(m_strMenuPath);
|
|
|
+ buf& menuPath;
|
|
|
+#endif //RVC_OS_WIN
|
|
|
ChannelService_Send_Info Info;
|
|
|
Info.sub_type = ACM_IM_MENUPATH;
|
|
|
Info.type = ACM_TYPE_IM;
|
|
@@ -496,8 +518,12 @@ ErrorCodeEnum CITCtrlEntity::SendAgentText(CSimpleStringW strText)
|
|
|
{
|
|
|
SpBuffer buf;
|
|
|
buf.OpenWrite(32 + strText.GetLength()*2);
|
|
|
- CSimpleString16Bit convertData = CSimpleStringW216Bit(strText);
|
|
|
- buf& convertData;
|
|
|
+#if defined(RVC_OS_WIN)
|
|
|
+ buf& strText;
|
|
|
+#else
|
|
|
+ CSimpleString16Bit convertData = CSimpleStringW216Bit(strText);
|
|
|
+ buf& convertData;
|
|
|
+#endif //RVC_OS_WIN
|
|
|
ChannelService_Send_Info Info;
|
|
|
Info.sub_type = ACM_IM_SHOWTEXT;
|
|
|
Info.type = ACM_TYPE_IM;
|
|
@@ -759,8 +785,12 @@ void CITCtrlEntity::SendAnswertoMobile(CSimpleStringW packet)
|
|
|
|
|
|
SpBuffer buf;
|
|
|
buf.OpenWrite();
|
|
|
- CSimpleString16Bit convertedData = CSimpleStringW216Bit(packet);
|
|
|
- buf& convertedData;
|
|
|
+#if defined(RVC_OS_WIN)
|
|
|
+ buf& packet;
|
|
|
+#else
|
|
|
+ CSimpleString16Bit convertedData = CSimpleStringW216Bit(packet);
|
|
|
+ buf& convertedData;
|
|
|
+#endif //RVC_OS_WIN
|
|
|
ChannelService_Send_Info Info;
|
|
|
Info.sub_type = ACM_SUBTYPE_ANS_FLOW;
|
|
|
Info.compress = true;
|
|
@@ -2113,7 +2143,7 @@ void UIServiceSession::Handle_SetLocalAudioVolume(SpReqAnsContext<UIService_SetL
|
|
|
void UIServiceSession::Handle_SendBusinessDesktopCmd(SpReqAnsContext<UIService_SendBusinessDesktopCmd_Req, UIService_SendBusinessDesktopCmd_Ans>::Pointer ctx)
|
|
|
{
|
|
|
DbgToBeidou(ctx->link, __FUNCTION__)();
|
|
|
- DbgWithLink(LOG_LEVEL_DEBUG, LOG_TYPE_SYSTEM)("Handle_SendBusinessDesktopCmd : %s %s", ctx->Req.xapName, ctx->Req.command);
|
|
|
+ DbgWithLink(LOG_LEVEL_DEBUG, LOG_TYPE_SYSTEM)("Handle_SendBusinessDesktopCmd : %s %s", ctx->Req.xapName.GetData(), ctx->Req.command.GetData());
|
|
|
ErrorCodeEnum error = m_pEntity->SendBusinessDesktopCmd(ctx->Req.xapName, ctx->Req.command);
|
|
|
ctx->Answer(error);
|
|
|
}
|
|
@@ -2369,7 +2399,6 @@ void UIServiceSession::Handle_StartTransactionRecord(SpReqAnsContext<UIService_S
|
|
|
if (m_pEntity->GetRecordMode()) {
|
|
|
LogEvent(Severity_Middle, LOG_EVT_BEGIN_HANDLE_BUSINESS, "begin handle business.");
|
|
|
|
|
|
- ErrorCodeEnum rc = Error_DevNotAvailable;
|
|
|
CSimpleStringA camstate;
|
|
|
m_pEntity->GetFunction()->GetSysVar("CameraState", camstate);
|
|
|
DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("start transaction record, camstate=%s.", camstate.GetData());
|