// // IMS network support reporting // BOOL CSilo_IMS::ParseCIREPI(CResponse* const pResponse, const char*& rszPointer) { RIL_LOG_VERBOSE("CSilo_IMS::ParseCIREPI() - Enter\r\n"); BOOL fRet = FALSE; UINT32 uiNwimsvops = 0; char szAlpha[MAX_BUFFER_SIZE]; int pos = 0; sOEM_HOOK_RAW_UNSOL_IMS_SUPPORT_STATUS data; if (NULL == pResponse) { RIL_LOG_CRITICAL("CSilo_IMS::ParseCIREPI() - pResponse is NULL.\r\n"); goto Error; } pResponse->SetUnsolicitedFlag(TRUE); // Throw out the alpha chars if there are any (void)ExtractQuotedString(rszPointer, szAlpha, MAX_BUFFER_SIZE, rszPointer); // Parse "<nwimsvops>" if (!ExtractUInt32(rszPointer, uiNwimsvops, rszPointer)) { RIL_LOG_CRITICAL("CSilo_IMS::ParseCIREPI() - Could not parse IMS Voice over PS" "support indication\r\n"); goto Error; } data.command = RIL_OEM_HOOK_RAW_UNSOL_IMS_SUPPORT_STATUS; data.status = uiNwimsvops; // Framework will trigger IMS registration depending on this information. RIL_LOG_INFO("CSilo_IMS::ParseCIREPI() - CIREPI=[%d]\r\n", uiNwimsvops); pResponse->SetResultCode(RIL_UNSOL_OEM_HOOK_RAW); if (!pResponse->SetData((void*)&data, sizeof(sOEM_HOOK_RAW_UNSOL_IMS_SUPPORT_STATUS), TRUE)) { goto Error; } fRet = TRUE; Error: RIL_LOG_VERBOSE("CSilo_IMS::ParseCIREPI() - Exit\r\n"); return fRet; }
// // IMS-SRVCC sync notification // BOOL CSilo_IMS::ParseXISRVCCI(CResponse* const pResponse, const char*& rszPointer) { RIL_LOG_VERBOSE("CSilo_IMS::ParseXISRVCCI() - Enter\r\n"); BOOL fRet = FALSE; UINT32 uiSrvccHoStatus = 0; char szAlpha[MAX_BUFFER_SIZE]; sOEM_HOOK_RAW_UNSOL_IMS_SRVCC_HO_STATUS data; if (NULL == pResponse) { RIL_LOG_CRITICAL("CSilo_IMS::ParseXISRVCCI() - pResponse is NULL.\r\n"); goto Error; } pResponse->SetUnsolicitedFlag(TRUE); // Throw out the alpha chars if there are any (void)ExtractQuotedString(rszPointer, szAlpha, MAX_BUFFER_SIZE, rszPointer); // Parse "<srvcc_ho_status>" if (!ExtractUInt32(rszPointer, uiSrvccHoStatus, rszPointer)) { RIL_LOG_CRITICAL("CSilo_IMS::ParseXISRVCCI() - Could not parse SRVCC HO" "status indication\r\n"); goto Error; } data.command = RIL_OEM_HOOK_RAW_UNSOL_IMS_SRVCC_HO_STATUS; data.status = uiSrvccHoStatus; RIL_LOG_VERBOSE("CSilo_IMS::ParseXISRVCCI() - XISRVCC=[%u]\r\n", uiSrvccHoStatus); pResponse->SetResultCode(RIL_UNSOL_OEM_HOOK_RAW); if (!pResponse->SetData((void*)&data, sizeof(sOEM_HOOK_RAW_UNSOL_IMS_SRVCC_HO_STATUS), TRUE)) { goto Error; } fRet = TRUE; Error: RIL_LOG_VERBOSE("CSilo_IMS::ParseXISRVCCI() - Exit\r\n"); return fRet; }
int AnalyzeXMLRequest(char *szXML, RecordingData *rdata) { char *p1=NULL; char *p2=NULL; char *p3=NULL; char szcommand[264]=""; char szonidsid[264]=""; char szapid[264]=""; char szvpid[264]=""; char szmode[3]=""; char szchannelname[264]=""; char szepgtitle[264]=""; int hr=false; if ( (szXML==NULL) || (rdata==NULL) ) return(false); rdata->apid=0; rdata->vpid=0; rdata->cmd=CMD_VCR_UNKNOWN; rdata->onidsid=0; strcpy(rdata->channelname,""); p1=ParseForString(szXML,"<record ", 1); if (p1!=NULL) { p2=ParseForString(p1,"command=", 1); p1=NULL; if (p2!=NULL) p3=ExtractQuotedString(p2, szcommand, 1); if (p3!=NULL) p1=ParseForString(p3,">", 1); } if (p1!=NULL) { p2=ParseForString(p1,"<channelname>", 1); p3=p2; p1=NULL; if (p2!=NULL) { p1=ParseForString(p2,"</channelname>", 0); if (p1!=NULL) { memcpy(szchannelname,p3,p1-p3); szchannelname[p1-p3]=0; hr=true; } } } if (p1!=NULL) { p2=ParseForString(p1,"<epgtitle>", 1); p3=p2; p1=NULL; if (p2!=NULL) { p1=ParseForString(p2,"</epgtitle>", 0); if (p1!=NULL) { memcpy(szepgtitle,p3,p1-p3); szepgtitle[p1-p3]=0; hr=true; } } } if (p1!=NULL) { p2=ParseForString(p1,"<onidsid>", 1); p3=p2; p1=NULL; if (p2!=NULL) { p1=ParseForString(p2,"</onidsid>", 0); if (p1!=NULL) { memcpy(szonidsid,p3,p1-p3); szonidsid[p1-p3]=0; hr=true; } } } if (p1!=NULL) { p2=ParseForString(p1,"<mode>", 1); p3=p2; p1=NULL; if (p2!=NULL) { p1=ParseForString(p2,"</mode>", 0); if (p1!=NULL) { memcpy(szmode,p3,p1-p3); szmode[p1-p3]=0; hr=true; } } } p2=ParseForString(szXML,"<videopid>", 1); if (p2!=NULL) { p3=p2; p1=NULL; p1=ParseForString(p2,"</videopid>", 0); if (p1!=NULL) { memcpy(szvpid,p3,p1-p3); szvpid[p1-p3]=0; hr=true; } } p2=ParseForString(szXML,"<audiopids selected=", 1); if (p2!=NULL) { p3=ExtractQuotedString(p2, szapid, 1); if (p3!=NULL) p1=ParseForString(p3,">", 1); } if (!hr) return(hr); strcpy(rdata->channelname, szchannelname); strcpy(rdata->epgtitle, szepgtitle); if (strlen(szvpid)>0) rdata->vpid=atoi(szvpid); if (strlen(szapid)>0) rdata->apid=atoi(szapid); if (!strcmp(szcommand,"record")) rdata->cmd=CMD_VCR_RECORD; if (!strcmp(szcommand,"stop")) rdata->cmd=CMD_VCR_STOP; if (!strcmp(szcommand,"pause")) rdata->cmd=CMD_VCR_PAUSE; if (!strcmp(szcommand,"resume")) rdata->cmd=CMD_VCR_RESUME; if (!strcmp(szcommand,"available")) rdata->cmd=CMD_VCR_AVAILABLE; rdata->onidsid=atol(szonidsid); return(hr); }
// // IMS-Register notification // BOOL CSilo_IMS::ParseCIREGU(CResponse* const pResponse, const char*& rszPointer) { RIL_LOG_VERBOSE("CSilo_IMS::ParseCIREGU() - Enter\r\n"); BOOL fRet = FALSE; UINT32 uiRegInfo = 0; char szExtInfo[MAX_BUFFER_SIZE]; char szAlpha[MAX_BUFFER_SIZE]; int pos = 0; sOEM_HOOK_RAW_UNSOL_IMS_REG_STATUS data; if (NULL == pResponse) { RIL_LOG_CRITICAL("CSilo_IMS::ParseCIREGU() - pResponse is NULL.\r\n"); goto Error; } pResponse->SetUnsolicitedFlag(TRUE); // Throw out the alpha chars if there are any (void)ExtractQuotedString(rszPointer, szAlpha, MAX_BUFFER_SIZE, rszPointer); // Parse "<reg_info>" if (!ExtractUInt32(rszPointer, uiRegInfo, rszPointer)) { RIL_LOG_CRITICAL("CSilo_IMS::ParseCIREGU() - Could not parse IMS registration" "status indication\r\n"); goto Error; } // Parse ",<ext_info>" if any. Debug purpose only. if (SkipString(rszPointer, ",", rszPointer) && ExtractUnquotedString(rszPointer, m_cTerminator, szExtInfo, MAX_BUFFER_SIZE, rszPointer)) { RIL_LOG_INFO("CSilo_IMS::ParseCIREGU() - IMS capabilities: %s", szExtInfo); } data.command = RIL_OEM_HOOK_RAW_UNSOL_IMS_REG_STATUS; data.status = uiRegInfo; CTE::GetTE().SetImsRegistrationStatus(uiRegInfo); RIL_LOG_VERBOSE("CSilo_IMS::ParseCIREGU() - CIREGU=[%d]\r\n", uiRegInfo); pResponse->SetResultCode(RIL_UNSOL_OEM_HOOK_RAW); if (!pResponse->SetData((void*)&data, sizeof(sOEM_HOOK_RAW_UNSOL_IMS_REG_STATUS), TRUE)) { goto Error; } /* * When the IMS registration status change force the framework to query the data * registration state by completing RIL_UNSOL_RESPONSE_VOICE_NETWORK_STATE_CHANGED. */ RIL_onUnsolicitedResponse(RIL_UNSOL_RESPONSE_VOICE_NETWORK_STATE_CHANGED, NULL, 0); fRet = TRUE; Error: RIL_LOG_VERBOSE("CSilo_IMS::ParseCIREGU() - Exit\r\n"); return fRet; }