|
@@ -53,19 +53,6 @@ ErrorCodeEnum CCounterConnectorEntity ::__OnStart(ErrorCodeEnum preOperationErro
|
|
|
CSmartPointer<IEntityFunction> spFunction = GetFunction();
|
|
|
CSystemStaticInfo stStaticinfo;
|
|
|
spFunction->GetSystemStaticInfo(stStaticinfo);
|
|
|
- if (_stricmp(stStaticinfo.strMachineType,"RVC.PAD")==0){
|
|
|
- m_bIsPadType = TRUE;
|
|
|
- }
|
|
|
- else{
|
|
|
- m_bIsPadType = FALSE;
|
|
|
- }
|
|
|
-
|
|
|
- m_IsStandType = TRUE;
|
|
|
-
|
|
|
- DeviceTypeEnum eDeviceType = RvcGetDeviceType();
|
|
|
- if (eStand1SPlusType != eDeviceType && eStand2sType != eDeviceType) {
|
|
|
- m_IsStandType = FALSE;
|
|
|
- }
|
|
|
|
|
|
m_fsm.Init(this);
|
|
|
|
|
@@ -107,8 +94,8 @@ void CCounterConnectorEntity::OnStarted()
|
|
|
CSimpleStringA uiState;
|
|
|
GetFunction()->GetSysVar("UIState", uiState);
|
|
|
if (uiState.GetLength() > 0 && uiState[0] == 'M'){
|
|
|
- if (FALSE == m_bHasLaunched) {
|
|
|
- m_bHasLaunched = TRUE;
|
|
|
+ if (false == m_bHasLaunched) {
|
|
|
+ m_bHasLaunched = true;
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -116,14 +103,14 @@ void CCounterConnectorEntity::OnStarted()
|
|
|
|
|
|
m_pCounterConnectorChannel = new ChannelCounterConnectorClient(this);
|
|
|
if (Error_Succeed == ConnectAssistChannel()){
|
|
|
- m_bConnectAssist = TRUE;
|
|
|
+ m_bConnectAssist = true;
|
|
|
}
|
|
|
else {
|
|
|
GetFunction()->SetTimer(1, this, 3600);
|
|
|
}
|
|
|
|
|
|
if (m_fsm.ReConnectionAssistchan()){
|
|
|
- m_fsm.m_bConAssist = TRUE;
|
|
|
+ m_fsm.m_bConAssist = true;
|
|
|
}
|
|
|
else {
|
|
|
GetFunction()->SetTimer(2, this, 3900);
|
|
@@ -132,7 +119,7 @@ void CCounterConnectorEntity::OnStarted()
|
|
|
Sleep(500);
|
|
|
|
|
|
if (m_fsm.ReConnectionSipphone()){
|
|
|
- m_fsm.m_bConSipphone = TRUE;
|
|
|
+ m_fsm.m_bConSipphone = true;
|
|
|
}
|
|
|
else {
|
|
|
GetFunction()->SetTimer(3, this, 3700);
|
|
@@ -154,6 +141,9 @@ ErrorCodeEnum CCounterConnectorEntity::ConnectAssistChannel()
|
|
|
ErrorCodeEnum Error = m_pCounterConnectorChannel->Connect();
|
|
|
if (Error != Error_Succeed) {
|
|
|
LogWarn(Severity_Low, Error_Debug, EVENT_MOD_CONNECT_ASSIST_ERROR, "connect assistant channel error");
|
|
|
+#ifdef RVC_OS_WIN
|
|
|
+ m_pCounterConnectorChannel->SafeDelete();
|
|
|
+#endif
|
|
|
m_pCounterConnectorChannel = NULL;
|
|
|
return Error;
|
|
|
}
|
|
@@ -164,6 +154,9 @@ ErrorCodeEnum CCounterConnectorEntity::ConnectAssistChannel()
|
|
|
if (Error != Error_Succeed){
|
|
|
DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("BeginState biz channel failed!");
|
|
|
m_pCounterConnectorChannel->GetFunction()->CloseSession();
|
|
|
+#ifdef RVC_OS_WIN
|
|
|
+ m_pCounterConnectorChannel->SafeDelete();
|
|
|
+#endif
|
|
|
m_pCounterConnectorChannel = NULL;
|
|
|
return Error;
|
|
|
}
|
|
@@ -176,6 +169,9 @@ ErrorCodeEnum CCounterConnectorEntity::ConnectAssistChannel()
|
|
|
if (Error != Error_Succeed) {
|
|
|
DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("Begin BeginRecv ACM_TYPE_DEVICE failed!");
|
|
|
m_pCounterConnectorChannel->GetFunction()->CloseSession();
|
|
|
+#ifdef RVC_OS_WIN
|
|
|
+ m_pCounterConnectorChannel->SafeDelete();
|
|
|
+#endif
|
|
|
m_pCounterConnectorChannel = NULL;
|
|
|
return Error;
|
|
|
}
|
|
@@ -188,6 +184,9 @@ ErrorCodeEnum CCounterConnectorEntity::ConnectAssistChannel()
|
|
|
if (Error != Error_Succeed){
|
|
|
DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("Begin BeginRecv ACM_TYPE_AGENTVIDEOTYPE failed!");
|
|
|
m_pCounterConnectorChannel->GetFunction()->CloseSession();
|
|
|
+#ifdef RVC_OS_WIN
|
|
|
+ m_pCounterConnectorChannel->SafeDelete();
|
|
|
+#endif
|
|
|
m_pCounterConnectorChannel = NULL;
|
|
|
return Error;
|
|
|
}
|
|
@@ -200,6 +199,9 @@ ErrorCodeEnum CCounterConnectorEntity::ConnectAssistChannel()
|
|
|
if (Error != Error_Succeed){
|
|
|
DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("Begin BeginRecv ACM_TYPE_CALLTRANS failed!");
|
|
|
m_pCounterConnectorChannel->GetFunction()->CloseSession();
|
|
|
+#ifdef RVC_OS_WIN
|
|
|
+ m_pCounterConnectorChannel->SafeDelete();
|
|
|
+#endif
|
|
|
m_pCounterConnectorChannel = NULL;
|
|
|
return Error;
|
|
|
}
|
|
@@ -215,8 +217,8 @@ void CCounterConnectorEntity::OnSysVarEvent(const char *pszKey, const char *psz
|
|
|
{
|
|
|
if (pszValue[0] == 'M')
|
|
|
{
|
|
|
- if (FALSE == m_bHasLaunched){
|
|
|
- m_bHasLaunched = TRUE;
|
|
|
+ if (false == m_bHasLaunched){
|
|
|
+ m_bHasLaunched = true;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -271,7 +273,7 @@ void CCounterConnectorEntity::HandlePickUpCallEvent()
|
|
|
}
|
|
|
else {
|
|
|
m_fsm.PostEventFIFO(new FSMEvent(USER_EVT_PICKUP_CALL));
|
|
|
- m_fsm.m_bNeedQueueName = FALSE;
|
|
|
+ m_fsm.m_bNeedQueueName = false;
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -290,7 +292,7 @@ void CCounterConnectorEntity::HandleGetVideoFailedEvent()
|
|
|
char strinfo[MAX_PATH] = { 0 };
|
|
|
|
|
|
if (pMSClient->Connect() != Error_Succeed){
|
|
|
- _snprintf(strmsg, MAX_PATH, "%s", "connect mediacontroller entity failed");
|
|
|
+ snprintf(strmsg, MAX_PATH, "%s", "connect mediacontroller entity failed");
|
|
|
pMSClient->SafeDelete();
|
|
|
pMSClient = NULL;
|
|
|
|
|
@@ -342,10 +344,10 @@ void CCounterConnectorEntity ::OnLog(const CAutoArray<CUUID> &SubIDs, const CUUI
|
|
|
{
|
|
|
case EVENT_MOD_CONNECT_GPIO_PICKUP:
|
|
|
{
|
|
|
- m_fsm.m_bHandFree = FALSE;
|
|
|
+ m_fsm.m_bHandFree = false;
|
|
|
if (!m_fsm.m_bIsAgentControl)
|
|
|
{
|
|
|
- m_fsm.m_bAgentHandFree = FALSE;
|
|
|
+ m_fsm.m_bAgentHandFree = false;
|
|
|
}
|
|
|
CSimpleStringA strValue;
|
|
|
GetFunction()->GetSysVar("CallState", strValue);
|
|
@@ -355,10 +357,10 @@ void CCounterConnectorEntity ::OnLog(const CAutoArray<CUUID> &SubIDs, const CUUI
|
|
|
break;
|
|
|
case EVENT_MOD_CONNECT_GPIO_HANDFREE:
|
|
|
{
|
|
|
- m_fsm.m_bHandFree = TRUE;
|
|
|
+ m_fsm.m_bHandFree = true;
|
|
|
if (!m_fsm.m_bIsAgentControl)
|
|
|
{
|
|
|
- m_fsm.m_bAgentHandFree = TRUE;
|
|
|
+ m_fsm.m_bAgentHandFree = true;
|
|
|
}
|
|
|
CSimpleStringA strValue;
|
|
|
GetFunction()->GetSysVar("CallState", strValue);
|
|
@@ -378,7 +380,7 @@ void CCounterConnectorEntity ::OnLog(const CAutoArray<CUUID> &SubIDs, const CUUI
|
|
|
}
|
|
|
break;
|
|
|
case EVENT_MOD_CONNECT_HANDFREE_CALL: // 免提呼叫
|
|
|
- m_fsm.m_bNeedQueueName = TRUE;
|
|
|
+ m_fsm.m_bNeedQueueName = true;
|
|
|
if (m_fsm.m_bHandFree)
|
|
|
{
|
|
|
LogEvent(Severity_Middle,EVENT_MOD_CONNECT_SLV_HANDFREECALL,"handfree call");
|
|
@@ -430,7 +432,7 @@ void CCounterConnectorEntity ::OnLog(const CAutoArray<CUUID> &SubIDs, const CUUI
|
|
|
//DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("免提->提机");
|
|
|
m_fsm.PostEventFIFO(new FSMEvent(USER_EVT_TO_PICKUP));
|
|
|
if (strcmp(m_fsm.GetCurrStateName(),"HandFree")==0){
|
|
|
- m_fsm.m_bAgentHandFree = FALSE;
|
|
|
+ m_fsm.m_bAgentHandFree = false;
|
|
|
}
|
|
|
SendCurAudioDevice();
|
|
|
}
|
|
@@ -440,7 +442,7 @@ void CCounterConnectorEntity ::OnLog(const CAutoArray<CUUID> &SubIDs, const CUUI
|
|
|
//DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("提机->免提");
|
|
|
m_fsm.PostEventFIFO(new FSMEvent(USER_EVT_TO_HANDFREE));
|
|
|
if (strcmp(m_fsm.GetCurrStateName(),"Pickup")==0){
|
|
|
- m_fsm.m_bAgentHandFree = TRUE;
|
|
|
+ m_fsm.m_bAgentHandFree = true;
|
|
|
}
|
|
|
SendCurAudioDevice();
|
|
|
}
|
|
@@ -458,7 +460,7 @@ void CCounterConnectorEntity ::OnLog(const CAutoArray<CUUID> &SubIDs, const CUUI
|
|
|
case EVENT_MOD_CONNECT_BEGAIN_RECORD_CALL:
|
|
|
{
|
|
|
//DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("开始远程双录呼叫.");
|
|
|
- m_fsm.m_bNeedQueueName = TRUE;
|
|
|
+ m_fsm.m_bNeedQueueName = true;
|
|
|
m_fsm.PostEventFIFO(new FSMEvent(USER_EVT_DOUBLE_RECORD_CALL));
|
|
|
if (TRUE == m_fsm.m_bHandFree){
|
|
|
LogEvent(Severity_Middle,LOG_EVT_HANDFREE_MODE_REMOTE_CALL,"remote double call start with hand free mode.");
|
|
@@ -476,14 +478,14 @@ void CCounterConnectorEntity ::OnLog(const CAutoArray<CUUID> &SubIDs, const CUUI
|
|
|
{
|
|
|
//DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("断开呼叫");
|
|
|
m_fsm.PostEventFIFO(new FSMEvent(USER_EVT_HANGUP));
|
|
|
- m_fsm.m_bHangup=TRUE;
|
|
|
+ m_fsm.m_bHangup=true;
|
|
|
}
|
|
|
break;
|
|
|
case EVENT_MOD_CONNECT_HANNUP_BY_CONNECTING: // 话筒未接通时挂机
|
|
|
//DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("话筒未接通时断开呼叫");
|
|
|
m_fsm.PostEventFIFO(new FSMEvent(USER_EVT_HANGUP));
|
|
|
//m_fsm.m_bHandFree = TRUE;
|
|
|
- m_fsm.m_bHangup=TRUE;
|
|
|
+ m_fsm.m_bHangup=true;
|
|
|
break;
|
|
|
case EVENT_MOD_CONNECT_HANNUP_BY_AGENT: // 授权操作
|
|
|
m_fsm.PostEventFIFO(new FSMEvent(USER_EVT_AGENT_WRITABLE));
|
|
@@ -493,21 +495,24 @@ void CCounterConnectorEntity ::OnLog(const CAutoArray<CUUID> &SubIDs, const CUUI
|
|
|
//DbgWithLink(LOG_LEVEL_DEBUG, LOG_TYPE_SYSTEM)("current state name is %s.", m_fsm.GetCurrStateName());
|
|
|
Sleep(500);
|
|
|
m_fsm.PostEventFIFO(new FSMEvent(USER_EVT_ASSISTCHAN_IDEL));
|
|
|
- m_fsm.m_bConAssist = FALSE;
|
|
|
+ m_fsm.m_bConAssist = false;
|
|
|
GetFunction()->SetTimer(2, this, 3900);
|
|
|
if(NULL != m_pCounterConnectorChannel){
|
|
|
- m_bConnectAssist = FALSE;
|
|
|
+ m_bConnectAssist = false;
|
|
|
m_pCounterConnectorChannel->GetFunction()->CloseSession();
|
|
|
+#ifdef RVC_OS_WIN
|
|
|
+ m_pCounterConnectorChannel->SafeDelete();
|
|
|
+#endif
|
|
|
m_pCounterConnectorChannel = NULL;
|
|
|
//DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("Close AssistChannel Session.");
|
|
|
}
|
|
|
|
|
|
if(NULL == m_pCounterConnectorChannel){
|
|
|
if (Error_Succeed == ConnectAssistChannel()){
|
|
|
- m_bConnectAssist = TRUE;
|
|
|
+ m_bConnectAssist = true;
|
|
|
}
|
|
|
else{
|
|
|
- m_bConnectAssist = FALSE;
|
|
|
+ m_bConnectAssist = false;
|
|
|
GetFunction()->SetTimer(1, this, 3600);
|
|
|
}
|
|
|
}
|
|
@@ -517,7 +522,7 @@ void CCounterConnectorEntity ::OnLog(const CAutoArray<CUUID> &SubIDs, const CUUI
|
|
|
//DbgWithLink(LOG_LEVEL_DEBUG, LOG_TYPE_SYSTEM)("recv LOG_EVT_MOD_SIPPHONE_STARTED_SUCCESS");
|
|
|
Sleep(890);
|
|
|
m_fsm.PostEventFIFO(new FSMEvent(USER_EVT_SIPPHONE_IDEL));
|
|
|
- m_fsm.m_bConSipphone = FALSE;
|
|
|
+ m_fsm.m_bConSipphone = false;
|
|
|
GetFunction()->SetTimer(3, this, 3700);
|
|
|
break;
|
|
|
|
|
@@ -537,13 +542,13 @@ void CCounterConnectorEntity ::OnLog(const CAutoArray<CUUID> &SubIDs, const CUUI
|
|
|
case LOG_EVT_UI_STOPRECORD:
|
|
|
//DbgWithLink(LOG_LEVEL_DEBUG, LOG_TYPE_SYSTEM)("begin stop sales record video.");
|
|
|
m_fsm.PostEventFIFO(new FSMEvent(USER_EVT_STOPLOCALVIDEO));
|
|
|
- m_bIsSalesRecord = FALSE;
|
|
|
+ m_bIsSalesRecord = false;
|
|
|
break;
|
|
|
|
|
|
case LOG_EVT_UI_STOPREMOTERECORD:
|
|
|
//DbgWithLink(LOG_LEVEL_DEBUG, LOG_TYPE_SYSTEM)("begin stop double record video,and cur state name is %s.",m_fsm.GetCurrStateName());
|
|
|
m_fsm.PostEventFIFO(new FSMEvent(USER_EVT_STOPLOACALREMOTEVIDEO));
|
|
|
- m_bIsRemoteRecord = FALSE;
|
|
|
+ m_bIsRemoteRecord = false;
|
|
|
break;
|
|
|
|
|
|
case LOG_EVT_UI_RETURNMENU:
|
|
@@ -551,7 +556,7 @@ void CCounterConnectorEntity ::OnLog(const CAutoArray<CUUID> &SubIDs, const CUUI
|
|
|
{
|
|
|
//DbgWithLink(LOG_LEVEL_DEBUG, LOG_TYPE_SYSTEM)("stop sales record video by return menu");
|
|
|
m_fsm.PostEventFIFO(new FSMEvent(USER_EVT_STOPLOCALVIDEO));
|
|
|
- m_bIsSalesRecord = FALSE;
|
|
|
+ m_bIsSalesRecord = false;
|
|
|
}
|
|
|
if (m_bIsRemoteRecord)
|
|
|
{
|
|
@@ -562,9 +567,9 @@ void CCounterConnectorEntity ::OnLog(const CAutoArray<CUUID> &SubIDs, const CUUI
|
|
|
else{
|
|
|
//DbgWithLink(LOG_LEVEL_DEBUG, LOG_TYPE_SYSTEM)("hangup call by return menu, CurrStateName is %s.", m_fsm.GetCurrStateName());
|
|
|
m_fsm.PostEventFIFO(new FSMEvent(USER_EVT_HANGUP));
|
|
|
- m_fsm.m_bHangup=TRUE;
|
|
|
+ m_fsm.m_bHangup=true;
|
|
|
}
|
|
|
- m_bIsRemoteRecord = FALSE;
|
|
|
+ m_bIsRemoteRecord = false;
|
|
|
}
|
|
|
break;
|
|
|
case LOG_EVT_UI_STARTPHOTOGRAPH:
|
|
@@ -598,31 +603,31 @@ bool CCounterConnectorEntity ::IsService() const
|
|
|
void CCounterConnectorEntity::OnTimeout(DWORD dwTimerID)
|
|
|
{
|
|
|
if (1 == dwTimerID){
|
|
|
- if (FALSE == m_bConnectAssist) {
|
|
|
+ if (false == m_bConnectAssist) {
|
|
|
if (Error_Succeed == ConnectAssistChannel()) {
|
|
|
- m_bConnectAssist = TRUE;
|
|
|
+ m_bConnectAssist = true;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- if (TRUE == m_bConnectAssist) {
|
|
|
+ if (m_bConnectAssist) {
|
|
|
GetFunction()->KillTimer(1);
|
|
|
}
|
|
|
}
|
|
|
else if(2 == dwTimerID) {
|
|
|
- if (FALSE == m_fsm.m_bConAssist) {
|
|
|
+ if (false == m_fsm.m_bConAssist) {
|
|
|
if (m_fsm.ReConnectionAssistchan()) {
|
|
|
- m_fsm.m_bConAssist = TRUE;
|
|
|
+ m_fsm.m_bConAssist = true;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- if (TRUE == m_fsm.m_bConAssist) {
|
|
|
+ if (true == m_fsm.m_bConAssist) {
|
|
|
GetFunction()->KillTimer(2);
|
|
|
}
|
|
|
}
|
|
|
else if (3 == dwTimerID) {
|
|
|
- if (FALSE == m_fsm.m_bConSipphone) {
|
|
|
+ if (false == m_fsm.m_bConSipphone) {
|
|
|
if (m_fsm.ReConnectionSipphone(false)) {
|
|
|
- m_fsm.m_bConSipphone = TRUE;
|
|
|
+ m_fsm.m_bConSipphone = true;
|
|
|
}
|
|
|
else {
|
|
|
m_iConSipphoneFaileTimes++;
|
|
@@ -630,7 +635,7 @@ void CCounterConnectorEntity::OnTimeout(DWORD dwTimerID)
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- if (TRUE == m_fsm.m_bConSipphone || m_iConSipphoneFaileTimes >= 5) {
|
|
|
+ if (m_fsm.m_bConSipphone || m_iConSipphoneFaileTimes >= 5) {
|
|
|
GetFunction()->KillTimer(3);
|
|
|
}
|
|
|
}
|
|
@@ -640,7 +645,7 @@ void CCounterConnectorEntity::OnTimeout(DWORD dwTimerID)
|
|
|
void CCounterConnectorEntity ::OnReceivePkt(int type, int sub_type, const char *buffer, int size)
|
|
|
{
|
|
|
//DbgWithLink(LOG_LEVEL_DEBUG, LOG_TYPE_SYSTEM)("recv pkt type=%d,subtype=%d",type,sub_type);
|
|
|
- if ((type == ACM_TYPE_DEVICE)&&!m_bIsPadType)
|
|
|
+ if (type == ACM_TYPE_DEVICE)
|
|
|
{
|
|
|
switch (sub_type)
|
|
|
{
|
|
@@ -651,7 +656,7 @@ void CCounterConnectorEntity ::OnReceivePkt(int type, int sub_type, const char *
|
|
|
if (!m_fsm.m_bAgentHandFree)
|
|
|
{
|
|
|
LogEvent(Severity_Middle,EVENT_MOD_CONNECT_AGENT_PICKUP_HANDFREE,"agent change audio device to handfree");
|
|
|
- m_fsm.m_bAgentHandFree = TRUE;
|
|
|
+ m_fsm.m_bAgentHandFree = true;
|
|
|
}
|
|
|
else
|
|
|
{
|
|
@@ -664,7 +669,7 @@ void CCounterConnectorEntity ::OnReceivePkt(int type, int sub_type, const char *
|
|
|
if (m_fsm.m_bAgentHandFree)
|
|
|
{
|
|
|
LogEvent(Severity_Middle,EVENT_MOD_CONNECT_AGENT_HANDFREE_PICKUP,"agent change audio device to pickup");
|
|
|
- m_fsm.m_bAgentHandFree = FALSE;
|
|
|
+ m_fsm.m_bAgentHandFree = false;
|
|
|
}
|
|
|
else
|
|
|
{
|
|
@@ -793,27 +798,35 @@ void CCounterConnectorEntity::Handle_StartRecord(const char* pszMessage)
|
|
|
CSimpleStringA strMsg = pszMessage;
|
|
|
|
|
|
CSimpleStringA strVideo;
|
|
|
- strVideo = ConstructVideoRenderParam(strMsg, false);
|
|
|
+#ifdef RVC_OS_WIN
|
|
|
+ strVideo = ConstructVideoParam(strMsg, false);
|
|
|
+#else
|
|
|
+ strVideo = ConstructVideoRenderParam(strMsg, false);
|
|
|
+#endif
|
|
|
m_fsm.PostEventFIFO(new ShowLocalVideoEvent(strVideo)); // 非连坐席双录
|
|
|
- m_bIsSalesRecord = TRUE;
|
|
|
+ m_bIsSalesRecord = true;
|
|
|
}
|
|
|
|
|
|
void CCounterConnectorEntity::Handle_StartRemoteRecord(const char* pszMessage)
|
|
|
{
|
|
|
CSimpleStringA strMsg = pszMessage;
|
|
|
- CSimpleStringA strVideo = ConstructVideoRenderParam(strMsg, true);
|
|
|
+#ifdef RVC_OS_WIN
|
|
|
+ CSimpleStringA strVideo = ConstructVideoParam(strMsg, true);
|
|
|
+#else
|
|
|
+ CSimpleStringA strVideo = ConstructVideoRenderParam(strMsg, true);
|
|
|
+#endif
|
|
|
m_fsm.PostEventFIFO(new ShowLocalAndRemoteVideoEvent(strVideo)); // 连坐席双录
|
|
|
- m_bIsRemoteRecord = TRUE;
|
|
|
- m_bIsRemoteRecordStopSpeakerCapture = FALSE;
|
|
|
+ m_bIsRemoteRecord = true;
|
|
|
+ m_bIsRemoteRecordStopSpeakerCapture = false;
|
|
|
}
|
|
|
|
|
|
void CCounterConnectorEntity::StopRemoteRecordSpeakerAudioCapture()
|
|
|
{
|
|
|
if(DOUBLERECORD_CALLTYPE == m_fsm.m_CallingParam.nCallType){
|
|
|
- if (TRUE == m_IsStandType){
|
|
|
- if (FALSE == m_bIsRemoteRecordStopSpeakerCapture){
|
|
|
+ if (m_IsStandType){
|
|
|
+ if (false == m_bIsRemoteRecordStopSpeakerCapture){
|
|
|
if (Error_Succeed == m_fsm.StopSpeakerAudioCapture()){
|
|
|
- m_bIsRemoteRecordStopSpeakerCapture = TRUE;
|
|
|
+ m_bIsRemoteRecordStopSpeakerCapture = true;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -825,9 +838,13 @@ void CCounterConnectorEntity::Handle_StartRecordPreview(const char* pszMessage)
|
|
|
CSimpleStringA strMsg = pszMessage;
|
|
|
|
|
|
CSimpleStringA strVideo;
|
|
|
- strVideo = ConstructVideoRenderParam(strMsg, false);
|
|
|
+#ifdef RVC_OS_WIN
|
|
|
+ strVideo = ConstructVideoParam(strMsg, false);
|
|
|
+#else
|
|
|
+ strVideo = ConstructVideoRenderParam(strMsg, false);
|
|
|
+#endif
|
|
|
m_fsm.PostEventFIFO(new ShowLocalVideoEvent(strVideo)); // 非连坐席双录
|
|
|
- m_bIsSalesRecord = TRUE;
|
|
|
+ m_bIsSalesRecord = true;
|
|
|
}
|
|
|
|
|
|
//send cur audio device to agent
|
|
@@ -921,7 +938,7 @@ void ChannelCounterConnectorClient::OnMessage(ErrorCodeEnum Error, ChannelServic
|
|
|
CCounterConnectorEntity *pEntity = static_cast<CCounterConnectorEntity*>(m_pEntityBase);
|
|
|
if (Msg.state == eChannelState_Idle)
|
|
|
{
|
|
|
- pEntity->m_fsm.m_bIsAgentControl = FALSE;
|
|
|
+ pEntity->m_fsm.m_bIsAgentControl = false;
|
|
|
//DbgWithLink(LOG_LEVEL_DEBUG, LOG_TYPE_SYSTEM)("ChannelState is eChannelState_Idle");
|
|
|
|
|
|
if (eChannelState_Connected == m_eLastState){
|
|
@@ -934,7 +951,7 @@ void ChannelCounterConnectorClient::OnMessage(ErrorCodeEnum Error, ChannelServic
|
|
|
}
|
|
|
else if (Msg.state == eChannelState_Connected)
|
|
|
{
|
|
|
- pEntity->m_fsm.m_bIsAgentControl = TRUE;
|
|
|
+ pEntity->m_fsm.m_bIsAgentControl = true;
|
|
|
pEntity->SendCurAudioDevice();
|
|
|
//DbgWithLink(LOG_LEVEL_DEBUG, LOG_TYPE_SYSTEM)("ChannelState is eChannelState_Connected");
|
|
|
m_uConnectTime = y2k_time_now();
|
|
@@ -973,7 +990,7 @@ void CCounterConnectorSession::Handle_StartCall(SpReqAnsContext<ConnectService_S
|
|
|
m_pEntity->m_fsm.m_CallingParam.assistant_port = ctx->Req.assistant_port;
|
|
|
m_pEntity->m_fsm.m_CallingParam.subid = ctx->Req.subid;
|
|
|
m_pEntity->m_fsm.PostEventFIFO(new FSMEvent(USER_EVT_COMMAND_CALL));
|
|
|
- m_pEntity->m_fsm.m_bNeedQueueName = TRUE;
|
|
|
+ m_pEntity->m_fsm.m_bNeedQueueName = true;
|
|
|
ctx->Answer((ErrorCodeEnum)rc);
|
|
|
}
|
|
|
|