int32_t app_dvt_cas_api_init_operator_data(void) { poperatorCount = 5; memset(&pOperatorInfo[0],0,sizeof(SDVTCATvsInfo)*5); if (DVTCA_OK == DVTCASTB_GetOperatorInfo((WORD)-1, &poperatorCount, &pOperatorInfo[0])) { pbyCount = poperatorCount; return 1; } return 0; }
//查询运营商信息 CDCA_U16 CDCASTB_GetOperatorInfo( CDCA_U16 wTVSID, SCDCAOperatorInfo* pOperatorInfo ) { CDCA_U8 byCount = 1; // 最大支持5 个运营商 SDVTCATvsInfo info; memset(&info, 0, sizeof(SDVTCATvsInfo)); HRESULT res = DVTCASTB_GetOperatorInfo(wTVSID, &byCount, &info); if(res == DVTCA_OK) { strcpy(pOperatorInfo->m_szTVSPriInfo, info.m_szTVSName); return CDCA_RC_OK; } return CDCA_RC_UNKNOWN; }
//获取运营商列表 CDCA_U16 CDCASTB_GetOperatorIds( CDCA_U16* pwTVSID ) { //这里数码最多有5个运营商,永新最多有4个 //如果使用5,有可能越界使用外边传进来的数组###################注意 BYTE count = DVTCA_MAXNUMBER_TVSID; SDVTCATvsInfo info[DVTCA_MAXNUMBER_TVSID]; dxreport("CDCASTB_GetOperatorIds begin <<<\n"); HRESULT ret = DVTCASTB_GetOperatorInfo(-1, &count,info); dxreport("operator size is %d\n", count); if(ret == DVTCA_OK) { for(int i = 0; i < count; i++) { pwTVSID[i] = info[i].m_wTVSID; } return CDCA_RC_OK; } return CDCA_RC_UNKNOWN; }
U32 DvtCAGetOperatorInfo(U8 * pCount, SDVTCATvsInfo * pInfo) { HRESULT ret = DVTCASTB_GetOperatorInfo((WORD)-1, pCount,pInfo); return ret; }