这篇教程C++ AnscSizeOfString函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中AnscSizeOfString函数的典型用法代码示例。如果您正苦于以下问题:C++ AnscSizeOfString函数的具体用法?C++ AnscSizeOfString怎么用?C++ AnscSizeOfString使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了AnscSizeOfString函数的28个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: AnscCopyStringULONGIPv6PingServerTable_GetParamStringValue ( ANSC_HANDLE hInsContext, char* ParamName, char* pValue, ULONG* pUlSize ){ PCOSA_CONTEXT_SELFHEAL_LINK_OBJECT pSelfHealCxtLink = (PCOSA_CONTEXT_SELFHEAL_LINK_OBJECT)hInsContext; PCOSA_DML_SELFHEAL_IPv6_SERVER_TABLE pServerIpv6 = (PCOSA_DML_SELFHEAL_IPv6_SERVER_TABLE)pSelfHealCxtLink->hContext; PUCHAR pString = NULL; /* check the parameter name and return the corresponding value */ if( AnscEqualString(ParamName, "X_RDKCENTRAL-COM_Ipv6PingServerURI", TRUE)) { /* collect value */ if ( AnscSizeOfString(pServerIpv6->Ipv6PingServerURI) < *pUlSize) { AnscCopyString(pValue, pServerIpv6->Ipv6PingServerURI); return 0; } else { *pUlSize = AnscSizeOfString(pServerIpv6->Ipv6PingServerURI)+1; return 1; } } return -1;}
开发者ID:rdkcmf,项目名称:rdkb-TestAndDiagnostic,代码行数:30,
示例2: Utopia_Get_Prov_CodeANSC_STATUSCosaDmlDiGetProvisioningCode ( ANSC_HANDLE hContext, char* pValue, ULONG* pulSize ){#if 0 UtopiaContext ctx; int rc = -1; char temp[64]; if (!Utopia_Init(&ctx)) return ERR_UTCTX_INIT; rc = Utopia_Get_Prov_Code(&ctx,temp); Utopia_Free(&ctx,0); AnscCopyString(pValue,temp); *pulSize = AnscSizeOfString(pValue);#endif// Provisioning Code sent to ACS is Serial Number of the device#ifdef _COSA_DRG_TPG_ plat_GetFlashValue("unitsn", unitsn); sprintf(pValue, "%c%c%c%c%c%c%c",unitsn[0],unitsn[1],unitsn[2],unitsn[3],unitsn[4],unitsn[5],unitsn[6]);#elif _COSA_INTEL_USG_ARM_ if (platform_hal_GetSerialNumber(pValue) != RETURN_OK ) return ANSC_STATUS_FAILURE;#endif *pulSize = AnscSizeOfString(pValue); return ANSC_STATUS_SUCCESS; }
开发者ID:rdkcmf,项目名称:rdkb-CcspPandM,代码行数:35,
示例3: AnscSizeOfStringstaticchar*Bmc2EnvcoFindSubStrNoCase ( char* pString, char* pSub ){ int i, nStringLen, nSubLen; if ( !pString || !pSub ) { return NULL; } nStringLen = AnscSizeOfString(pString); nSubLen = AnscSizeOfString(pSub); for ( i = 0; i <= nStringLen - nSubLen; i ++ ) { if ( AnscEqualString2(pString+i, pSub, nSubLen, FALSE) ) { return pString+i; } } return NULL;}
开发者ID:rdkcmf,项目名称:rdkb-CcspCommonLibrary,代码行数:28,
示例4: AnscSizeOfStringBOOLBmc2ComeoSoaIsBuiltInObject ( ANSC_HANDLE hThisObject, char* obj_name ){ PBMC2_PEC_INTERFACE pBmc2PecIf = (PBMC2_PEC_INTERFACE)hThisObject; ULONG i; ULONG ulLen; ULONG ulObjNameLen = obj_name ? AnscSizeOfString(obj_name) : 0; PUCHAR pObjName; for (i = 0; i < sizeof(s_Bmc2BuiltinObjs)/sizeof(s_Bmc2BuiltinObjs[0]); i ++) { pObjName = (PUCHAR)s_Bmc2BuiltinObjs[i]; ulLen = AnscSizeOfString(pObjName); if ( ulObjNameLen != ulLen ) { continue; } if ( AnscEqualString2(obj_name, pObjName, ulLen, TRUE) ) { return TRUE; } } return FALSE;}
开发者ID:rdkcmf,项目名称:rdkb-CcspCommonLibrary,代码行数:31,
示例5: AnscCopyString/********************************************************************** caller: owner of this object prototype: ULONG Process_GetParamStringValue ( ANSC_HANDLE hInsContext, char* ParamName, char* pValue, ULONG* pUlSize ); description: This function is called to retrieve string parameter value; argument: ANSC_HANDLE hInsContext, The instance handle; char* ParamName, The parameter name; char* pValue, The string value buffer; ULONG* pUlSize The buffer of length of string value; Usually size of 1023 will be used. If it's not big enough, put required size here and return 1; return: 0 if succeeded; 1 if short of buffer size; (*pUlSize = required size) -1 if not supported.**********************************************************************/ULONGProcess_GetParamStringValue ( ANSC_HANDLE hInsContext, char* ParamName, char* pValue, ULONG* pUlSize ){ PCOSA_PROCESS_ENTRY p_proc = (PCOSA_PROCESS_ENTRY)hInsContext; /* check the parameter name and return the corresponding value */ if( AnscEqualString(ParamName, "Command", TRUE)) { /* collect value */ if ( AnscSizeOfString(p_proc->Command) < *pUlSize) { AnscCopyString(pValue, p_proc->Command); return 0; } else { *pUlSize = AnscSizeOfString(p_proc->Command)+1; return 1; } } /* CcspTraceWarning(("Unsupported parameter '%s'/n", ParamName)); */ return -1;}
开发者ID:davekimble,项目名称:TestAndDiagnostic,代码行数:69,
示例6: memsetANSC_STATUSCosaDmlDiGetHardwareVersion ( ANSC_HANDLE hContext, char* pValue, ULONG* pulSize ){#ifdef _COSA_INTEL_USG_ARM_ if (platform_hal_GetHardwareVersion(pValue) != RETURN_OK ) return ANSC_STATUS_FAILURE; else { *pulSize = AnscSizeOfString(pValue); return ANSC_STATUS_SUCCESS; }#elif _COSA_DRG_TPG_//Replace this with syscfg if we are pulling this from Cable modem later on UCHAR hwVersion[128]; memset(hwVersion,0,128); plat_GetFlashValue("hwid", hwVersion); sprintf(pValue, "%X%X",hwVersion[0],hwVersion[1]); *pulSize = AnscSizeOfString(pValue); return ANSC_STATUS_SUCCESS;#endif }
开发者ID:rdkcmf,项目名称:rdkb-CcspPandM,代码行数:28,
示例7: buffer/********************************************************************** caller: owner of this object prototype: BOOL NetworkDevicesTraffic_Default_Validate ( ANSC_HANDLE hInsContext, char* pReturnParamName, ULONG* puLength ); description: This function is called to finally commit all the update. argument: ANSC_HANDLE hInsContext, The instance handle; char* pReturnParamName, The buffer (128 bytes) of parameter name if there's a validation. ULONG* puLength The output length of the param name. return: TRUE if there's no validation.**********************************************************************/BOOLNetworkDevicesTraffic_Default_Validate ( ANSC_HANDLE hInsContext, char* pReturnParamName, ULONG* puLength ){ CcspLMLiteConsoleTrace(("RDK_LOG_DEBUG, LMLite %s : ENTER /n", __FUNCTION__ )); if(g_pReports->bNDTDefPollingPeriodChanged) { BOOL validated = ValidateNDTPeriod(g_pReports->uNDTPollingPeriodDefault); if(!validated) { CcspLMLiteTrace(("RDK_LOG_ERROR, LMLite %s : Default PollingPeriod Validation Failed : [%d] Value not Allowed /n", __FUNCTION__ , g_pReports->uNDTPollingPeriodDefault)); AnscCopyString(pReturnParamName, "PollingPeriod"); *puLength = AnscSizeOfString("PollingPeriod"); return FALSE; } ULONG period = (g_pReports->bNDTDefReportingPeriodChanged == TRUE) ? g_pReports->uNDTReportingPeriodDefault : GetNDTReportingPeriodDefault(); if (g_pReports->uNDTPollingPeriodDefault > period) { CcspLMLiteTrace(("RDK_LOG_ERROR, LMLite %s : Default PollingPeriod Validation Failed : New Default Polling Period [%d] > Current Default Reporting Period [%d] /n", __FUNCTION__ , g_pReports->uNDTPollingPeriodDefault, period )); AnscCopyString(pReturnParamName, "PollingPeriod"); *puLength = AnscSizeOfString("PollingPeriod"); return FALSE; } } if(g_pReports->bNDTDefReportingPeriodChanged) { BOOL validated = ValidateNDTPeriod(g_pReports->uNDTReportingPeriodDefault); if(!validated) { CcspLMLiteTrace(("RDK_LOG_ERROR, LMLite %s : Default ReportingPeriod Validation Failed : [%d] Value not Allowed /n", __FUNCTION__ , g_pReports->uNDTReportingPeriodDefault)); AnscCopyString(pReturnParamName, "ReportingPeriod"); *puLength = AnscSizeOfString("ReportingPeriod"); return FALSE; } ULONG period = (g_pReports->bNDTDefPollingPeriodChanged == TRUE) ? g_pReports->uNDTPollingPeriodDefault : GetNDTPollingPeriodDefault(); if (g_pReports->uNDTReportingPeriodDefault < period) { CcspLMLiteTrace(("RDK_LOG_ERROR, LMLite %s : Default ReportingPeriod Validation Failed : New Default Reporting Period [%d] < Current Default Polling Period [%d] /n", __FUNCTION__ , g_pReports->uNDTReportingPeriodDefault, period )); AnscCopyString(pReturnParamName, "ReportingPeriod"); *puLength = AnscSizeOfString("ReportingPeriod"); return FALSE; } } CcspLMLiteConsoleTrace(("RDK_LOG_DEBUG, LMLite %s : EXIT /n", __FUNCTION__ )); return TRUE;}
开发者ID:rdkcmf,项目名称:rdkb-CcspLMLite,代码行数:87,
示例8: AnscSizeOfString/********************************************************************** prototype: ANSC_STATUS CcspCwmpAcscoConnect ( ANSC_HANDLE hThisObject ); description: This function is called to connect to ACS. argument: ANSC_HANDLE hThisObject The caller object. return: the status of the operation;**********************************************************************/ANSC_STATUSCcspCwmpAcscoConnect ( ANSC_HANDLE hThisObject ){ PCCSP_CWMP_ACS_CONNECTION_OBJECT pMyObject = (PCCSP_CWMP_ACS_CONNECTION_OBJECT)hThisObject; PHTTP_SIMPLE_CLIENT_OBJECT pHttpClient = (PHTTP_SIMPLE_CLIENT_OBJECT)pMyObject->hHttpSimpleClient; ANSC_STATUS returnStatus = ANSC_STATUS_SUCCESS; PCCSP_CWMP_SESSION_OBJECT pWmpSession = (PCCSP_CWMP_SESSION_OBJECT )pMyObject->hCcspCwmpSession; if ( pWmpSession ) { PCCSP_CWMP_CPE_CONTROLLER_OBJECT pCcspCwmpCpeController = (PCCSP_CWMP_CPE_CONTROLLER_OBJECT)pWmpSession->hCcspCwmpCpeController; if ( pCcspCwmpCpeController ) { PCCSP_CWMP_CFG_INTERFACE pCcspCwmpCfgIf = (PCCSP_CWMP_CFG_INTERFACE)pCcspCwmpCpeController->hCcspCwmpCfgIf; PHTTP_SIMPLE_CLIENT_OBJECT pHttpClient = (PHTTP_SIMPLE_CLIENT_OBJECT)pMyObject->hHttpSimpleClient; ULONG ulSessionIdleTimeout = 0; if ( pCcspCwmpCfgIf && pCcspCwmpCfgIf->GetHttpSessionIdleTimeout ) { ulSessionIdleTimeout = pCcspCwmpCfgIf->GetHttpSessionIdleTimeout(pCcspCwmpCfgIf->hOwnerContext); } pHttpClient->SetSessionIdleTimeout((ANSC_HANDLE)pHttpClient, ulSessionIdleTimeout); // fprintf(stderr, "<RT> %s: OutboundIfName = '%s'/n", __FUNCTION__, pCcspCwmpCpeController->OutboundIfName ? pCcspCwmpCpeController->OutboundIfName : "NULL"); if ( pCcspCwmpCpeController->OutboundIfName && pCcspCwmpCpeController->OutboundIfName[0] && AnscSizeOfString(pCcspCwmpCpeController->OutboundIfName) < HTTP_MAX_DEVICE_NAME_SIZE) { AnscCopyString(pHttpClient->Property.BindToDevice.DeviceName, pCcspCwmpCpeController->OutboundIfName); } else { pHttpClient->Property.BindToDevice.DeviceName[0] = '/0'; } } } if( pMyObject->AcsUrl == NULL || AnscSizeOfString(pMyObject->AcsUrl) <= 10) { return ANSC_STATUS_NOT_READY; } returnStatus = pHttpClient->Engage ((ANSC_HANDLE)pHttpClient); if( returnStatus == ANSC_STATUS_SUCCESS) { pMyObject->bActive = TRUE; } return returnStatus;}
开发者ID:rdkcmf,项目名称:rdkb-CcspTr069Pa,代码行数:77,
示例9: AnscAllocateMemory/********************************************************************** prototype: char* DslhVarroMacAddrListToString ( SLAP_UCHAR_ARRAY* mac_addr_list ); description: This function is called to export MAC address list to a string. argument: SLAP_UCHAR_ARRAY* mac_addr_list The input mac address list; return: The exported string;**********************************************************************/char*DslhVarroMacAddrListToString ( SLAP_UCHAR_ARRAY* mac_addr_list ){ char* var_string = (char* )(mac_addr_list? AnscAllocateMemory(mac_addr_list->VarCount * 24 / 6 + 1) : NULL); ULONG i = 0; if ( !var_string ) { return NULL; } else if ( !mac_addr_list || (mac_addr_list->VarCount == 0) ) { return var_string; } for ( i = 0; i < mac_addr_list->VarCount; i++ ) { if( i != 0 ) { if ( (i % 6) == 0) { _ansc_sprintf ( &var_string[AnscSizeOfString(var_string)], "," ); } else if( i % 6 ) { _ansc_sprintf ( &var_string[AnscSizeOfString(var_string)], ":" ); } } _ansc_sprintf ( &var_string[AnscSizeOfString(var_string)], "%02X", mac_addr_list->Array.arrayUchar[i] ); } return var_string;}
开发者ID:davekimble,项目名称:CcspCommonLibrary,代码行数:70,
示例10: sizeofstatic ANSC_STATUSLocal_CosaDmlGetParamValueByPathName ( const char *pathName, char *pValue, PULONG pulSize ){ ANSC_STATUS retval = ANSC_STATUS_FAILURE; parameterValStruct_t varStruct; char outdata[80]; int size = sizeof(outdata); varStruct.parameterName = pathName; varStruct.parameterValue = outdata; retval = COSAGetParamValueByPathName(bus_handle, &varStruct, &size); if ( retval != ANSC_STATUS_SUCCESS) { return ANSC_STATUS_FAILURE; } else { AnscCopyString(pValue, outdata); *pulSize = AnscSizeOfString(pValue); return ANSC_STATUS_SUCCESS; }}
开发者ID:rdkcmf,项目名称:rdkb-CcspPandM,代码行数:30,
示例11: AnscSizeOfStringchar*DslhVarroGetFullName ( ANSC_HANDLE hThisObject ){ ANSC_STATUS returnStatus = ANSC_STATUS_SUCCESS; PDSLH_VAR_RECORD_OBJECT pMyObject = (PDSLH_VAR_RECORD_OBJECT)hThisObject; PDSLH_VAR_ENTITY_OBJECT pVarEntity = (PDSLH_VAR_ENTITY_OBJECT)pMyObject->hDslhVarEntity; PDSLH_OBJ_RECORD_OBJECT pObjRecord = (PDSLH_OBJ_RECORD_OBJECT)pMyObject->hDslhObjRecord; char* pLastName = (char* )pVarEntity->ParamDescr->Name; char* pFullName = (char* )NULL; ULONG ulFullNameSize = (ULONG )0; ulFullNameSize = (pObjRecord->FullName? AnscSizeOfString(pObjRecord->FullName) : 0) + AnscSizeOfString(pLastName) + 4; pFullName = (char*)AnscAllocateMemory(ulFullNameSize); if ( !pFullName ) { return NULL; } else { _ansc_sprintf ( pFullName, "%s%s", pObjRecord->FullName, pLastName ); } return pFullName;}
开发者ID:rdkcmf,项目名称:rdkb-CcspCommonLibrary,代码行数:34,
示例12: AnscSizeOfStringvoidAnscStringCOTrimRightString ( ANSC_HANDLE hThisObject, PUCHAR pTrimStr ){ PANSC_STRING_OBJECT pStringObj = (PANSC_STRING_OBJECT)hThisObject; PUCHAR pValue; ULONG ulStrLen; ULONG TrimLen; PUCHAR pRightStr; if (pStringObj && pTrimStr) { pValue = pStringObj->pValue; ulStrLen = pStringObj->ulValueLen; TrimLen = AnscSizeOfString(pTrimStr); if (TrimLen > ulStrLen || TrimLen == 0) return; pRightStr = pValue + (ulStrLen - TrimLen); if (AnscEqualMemory(pRightStr, pTrimStr, TrimLen)) { *pRightStr = 0; pStringObj->ulValueLen -= TrimLen; } }}
开发者ID:davekimble,项目名称:CcspCommonLibrary,代码行数:31,
示例13: Utopia_Get_First_Use_DateANSC_STATUSCosaDmlDiGetFirstUseDate ( ANSC_HANDLE hContext, char* pValue, PULONG pulSize ){ UtopiaContext ctx; int rc = -1; char firstUseDate[64]; if (!Utopia_Init(&ctx)) return ERR_UTCTX_INIT; rc = Utopia_Get_First_Use_Date(&ctx,firstUseDate); Utopia_Free(&ctx,0); // fprintf(stderr, "<RT> rc=%d, First Use Date = '%s'/n", rc, firstUseDate); if(rc || firstUseDate[0] == '/0') _ansc_sprintf(firstUseDate, "2013-11-22T00:00:00"); AnscCopyString(pValue,firstUseDate); *pulSize = AnscSizeOfString(pValue); return ANSC_STATUS_SUCCESS;}
开发者ID:rdkcmf,项目名称:rdkb-CcspPandM,代码行数:28,
示例14: AnscSizeOfStringBOOLDslhVarroIsValidMacAddress ( PCHAR pAddress ){ ULONG length = 0; ULONG i = 0; char c = 0; if( pAddress == NULL) { return TRUE; /* empty string is fine */ } length = AnscSizeOfString(pAddress); if( length == 0) { return TRUE; /* empty string is fine */ } /* * Mac address such as "12:BB:AA:99:34:89" is fine, and mac adress * with Mask is also OK, such as "12:BB:AA:99:34:89/FF:FF:FF:FF:FF:00". */ if( length != 17 && length != 35) { return FALSE; } if( length > 17 && pAddress[17] != '/') { return FALSE; } for( i = 0; i < length ; i ++) { c = pAddress[i]; if( i % 3 == 2) { if( i != 17 && c != ':') { return FALSE; } } else { if ( AnscIsAlphaOrDigit(c) ) { continue; } return FALSE; } } return TRUE;}
开发者ID:davekimble,项目名称:CcspCommonLibrary,代码行数:60,
示例15: AnscSizeOfStringvoidAnscStringArraySetAt ( ANSC_HANDLE hThisObject, ULONG ulIndex, ANSC_OBJECT_ARRAY_DATA Data ){ PANSC_STRING_ARRAY_OBJECT pStringArray = (PANSC_STRING_ARRAY_OBJECT)hThisObject; if (!pStringArray || pStringArray->ulMaxItemCount <= ulIndex) return; else { PUCHAR *pStorage; PUCHAR pData, pStr; ULONG ulStrLen; pStorage = (PUCHAR *)pStringArray->hStorage; pData = (PUCHAR)Data; ulStrLen = AnscSizeOfString(pData); pStr = (PUCHAR)AnscAllocateMemory(ulStrLen + 1); AnscCopyString(pStr, pData); pStorage[ulIndex] = pStr; }}
开发者ID:davekimble,项目名称:CcspCommonLibrary,代码行数:28,
示例16: AnscTrace/********************************************************************** caller: owner of this object prototype: ANSC_HANDLE DslhCpecoGetInterfaceByName ( ANSC_HANDLE hThisObject, char* ifName ); description: This function is called to retrieve the interface handle specified by the interface name; argument: ANSC_HANDLE hThisObject This handle is actually the pointer of this object itself. char* ifName The specified interface name; return: status of operation.**********************************************************************/ANSC_HANDLEDslhCpecoGetInterfaceByName ( ANSC_HANDLE hThisObject, char* ifName ){ PDSLH_CPE_CONTROLLER_OBJECT pMyObject = (PDSLH_CPE_CONTROLLER_OBJECT )hThisObject; PANSC_INTERFACE_OBJECT pInterface = (PANSC_INTERFACE_OBJECT)NULL; ULONG i = 0; if( ifName == NULL || AnscSizeOfString(ifName) == 0) { AnscTrace("Unable to retrieve interface in DslhCpeController./n"); return NULL; } for( i = 0; i < pMyObject->uIfCount; i ++) { pInterface = (PANSC_INTERFACE_OBJECT)pMyObject->hIfArray[i]; if( pInterface != NULL && AnscEqualString(pInterface->Name, ifName, TRUE)) { return (ANSC_HANDLE)pInterface; } } AnscTrace("Unable to retrieve interface '%s' in DslhCpeController./n", ifName); return NULL;}
开发者ID:rdkcmf,项目名称:rdkb-CcspCommonLibrary,代码行数:61,
示例17: AnscCopyStringchar*HttpBmoReqRcpGetPathTranslated ( ANSC_HANDLE hThisObject, ANSC_HANDLE hBmoReq ){ ANSC_STATUS returnStatus = ANSC_STATUS_SUCCESS; PHTTP_BMO_REQ_OBJECT pMyObject = (PHTTP_BMO_REQ_OBJECT )hThisObject; PHTTP_REQUEST_INFO pReqInfo = (PHTTP_REQUEST_INFO )pMyObject->hReqInfo; char* pPathInfo = (char* )pMyObject->RcpBpad; ULONG ulPathLen = 0; ULONG i = 0; for ( i = 0; i < pReqInfo->RequestUri.PathLevel; i++ ) { AnscCopyString((char*)(pPathInfo + ulPathLen), pReqInfo->RequestUri.PathArray[i]); ulPathLen += AnscSizeOfString(pReqInfo->RequestUri.PathArray[i]); pPathInfo[ulPathLen++] = '/'; } if ( ulPathLen > 1 ) { pPathInfo[--ulPathLen] = 0; } return pPathInfo;}
开发者ID:rdkcmf,项目名称:rdkb-CcspCommonLibrary,代码行数:29,
示例18: AnscQueueGetFirstEntry/********************************************************************** prototype: char* CcspCrLookforRemoteCR ( ANSC_HANDLE hCcspCr, char* pPrefix ); description: This function is called to look for remote cr path specified by name. argument: ANSC_HANDLE hCcspCr the handle of CCSP CR component; char* pPrefix The specified subsystem prefix; return: The dbus path if found;**********************************************************************/char*CcspCrLookforRemoteCR ( ANSC_HANDLE hThisObject, char* pPrefix ){ PCCSP_CR_MANAGER_OBJECT pMyObject = (PCCSP_CR_MANAGER_OBJECT)hThisObject; PCCSP_REMOTE_CRINFO pCompInfo = (PCCSP_REMOTE_CRINFO)NULL; PSINGLE_LINK_ENTRY pSLinkEntry = (PSINGLE_LINK_ENTRY)NULL; if( pPrefix == NULL || AnscSizeOfString(pPrefix) == 0) { return NULL; } pSLinkEntry = AnscQueueGetFirstEntry(&pMyObject->RemoteCRQueue); while ( pSLinkEntry ) { pCompInfo = ACCESS_CCSP_REMOTE_CRINFO(pSLinkEntry); pSLinkEntry = AnscQueueGetNextEntry(pSLinkEntry); if ( AnscEqualString(pCompInfo->pPrefix, (char*)pPrefix, TRUE)) { return pCompInfo->pID; } } return NULL;}
开发者ID:rdkcmf,项目名称:rdkb-CcspCr,代码行数:56,
示例19: AnscSizeOfStringULONGAnscGetIanaMediaSubtypeByName ( ULONG ulMediaType, PUCHAR pMediaSubtype ){ ULONG ulCount, i; for (i = 0; i < sizeof(g_IanaMediaSubtypeLists)/sizeof(g_IanaMediaSubtypeLists[0]); i ++) { if (ulMediaType == g_IanaMediaSubtypeLists[i].MediaType) { ulCount = g_IanaMediaSubtypeLists[i].Count; return AnscGetIanaTypeByName ( (PANSC_UTILBOX_IANA_MEDIA)g_IanaMediaSubtypeLists[i].pSubtypes, ulCount, pMediaSubtype, AnscSizeOfString(pMediaSubtype) ); } } return 0;}
开发者ID:rdkcmf,项目名称:rdkb-CcspCommonLibrary,代码行数:28,
示例20: AnscCopyStringANSC_STATUSCosaDmlGetTCPImplementation ( ANSC_HANDLE hContext, char* pValue, ULONG* pulSize ){ char value[25]; FILE *fp; AnscCopyString(pValue, _ERROR_); memset(value,0,10); fp = popen("cat /proc/sys/net/ipv4/tcp_congestion_control", "r"); if (fp == NULL) { CcspTraceWarning(("ERROR '%s'/n","ERROR")); return ANSC_STATUS_FAILURE; } while(fgets(value, 25, fp) != NULL) { AnscCopyString(pValue ,value); } pclose(fp); *pulSize = AnscSizeOfString(pValue); return ANSC_STATUS_SUCCESS;}
开发者ID:rdkcmf,项目名称:rdkb-CcspPandM,代码行数:30,
示例21: whileANSC_STATUSCosaDmlDiGetFirmwareBuildTime ( ANSC_HANDLE hContext, char* pValue, PULONG pulSize ){ FILE *fp; char line[512]; if ((fp = fopen("/etc/versions", "rb")) == NULL) return ANSC_STATUS_FAILURE; while (fgets(line, sizeof(line), fp) != NULL) { if (strncmp(line, "FSSTAMP", strlen("FSSTAMP")) != 0) continue; snprintf(pValue, pulSize, "%s", line); *pulSize = AnscSizeOfString(pValue); if(pValue[*pulSize-1] == '/n') pValue[--(*pulSize)] = '/0'; fclose(fp); return ANSC_STATUS_SUCCESS; } fclose(fp); return ANSC_STATUS_FAILURE;}
开发者ID:rdkcmf,项目名称:rdkb-CcspPandM,代码行数:29,
示例22: nameANSC_STATUSAnscXmlDomNodeSetName ( ANSC_HANDLE hThisObject, char* name ){ ANSC_STATUS returnStatus = ANSC_STATUS_SUCCESS; PANSC_XML_DOM_NODE_OBJECT pXmlNode = (PANSC_XML_DOM_NODE_OBJECT)hThisObject; if( name == NULL) { return ANSC_STATUS_FAILURE; } if( ANSC_OBJECT_NAME_SIZE <= AnscSizeOfString(name)) { AnscXmlWarning ( "Invalid XML node name (too big)- '%s'/n", name ); return ANSC_STATUS_FAILURE; } AnscCopyString(pXmlNode->Name, name); return ANSC_STATUS_SUCCESS;}
开发者ID:rdkcmf,项目名称:rdkb-CcspCommonLibrary,代码行数:30,
示例23: AnscSizeOfStringPUCHARAnscDupString ( PUCHAR pStr ){ if (!pStr) { return NULL; } else { ULONG ulStrLen; PUCHAR pDupStr; ulStrLen = AnscSizeOfString(pStr); pDupStr = (PUCHAR)AnscAllocateMemory(ulStrLen + 1); if (ulStrLen != 0) AnscCopyString(pDupStr, pStr); else pDupStr[0] = 0; return pDupStr; }}
开发者ID:davekimble,项目名称:CcspCommonLibrary,代码行数:26,
示例24: AnscFreeMemoryANSC_STATUSSlapScoSetObjName ( ANSC_HANDLE hThisObject, char* obj_name ){ ANSC_STATUS returnStatus = ANSC_STATUS_SUCCESS; PSLAP_SRV_COMPONENT_OBJECT pMyObject = (PSLAP_SRV_COMPONENT_OBJECT)hThisObject; if ( pMyObject->ObjName ) { AnscFreeMemory(pMyObject->ObjName); pMyObject->ObjName = NULL; } if ( obj_name ) { pMyObject->ObjName = (char*)AnscAllocateMemory(AnscSizeOfString(obj_name) + 1); if ( pMyObject->ObjName ) { AnscCopyString(pMyObject->ObjName, obj_name); } } else { pMyObject->ObjName = (char*)AnscAllocateMemory(1); } return ANSC_STATUS_SUCCESS;}
开发者ID:rdkcmf,项目名称:rdkb-CcspCommonLibrary,代码行数:33,
示例25: AnscSizeOfStringANSC_STATUSHttpFcoAddFormElement ( ANSC_HANDLE hThisObject, ANSC_HANDLE hFeo ){ ANSC_STATUS returnStatus = ANSC_STATUS_SUCCESS; PHTTP_FORM_CONTENT_OBJECT pMyObject = (PHTTP_FORM_CONTENT_OBJECT)hThisObject; PHTTP_HFP_INTERFACE pHfpIf = (PHTTP_HFP_INTERFACE )pMyObject->hHfpIf; PHTTP_FORM_ELEMENT pFormElement = (PHTTP_FORM_ELEMENT )hFeo; ULONG ulHashIndex = 0; ulHashIndex = AnscHashString ( pFormElement->Name, AnscSizeOfString(pFormElement->Name), HTTP_FCO_FEO_TABLE_SIZE ); pFormElement->FormIndex = pMyObject->FormIndex++; pFormElement->HashIndex = ulHashIndex; AnscAcquireLock (&pMyObject->FeoTableLock); AnscQueuePushEntry(&pMyObject->FeoTable[ulHashIndex], &pFormElement->Linkage); AnscReleaseLock (&pMyObject->FeoTableLock); return ANSC_STATUS_SUCCESS;}
开发者ID:davekimble,项目名称:CcspCommonLibrary,代码行数:30,
示例26: AnscHashStringANSC_HANDLEHttpFcoGetFormElement ( ANSC_HANDLE hThisObject, char* name ){ ANSC_STATUS returnStatus = ANSC_STATUS_SUCCESS; PHTTP_FORM_CONTENT_OBJECT pMyObject = (PHTTP_FORM_CONTENT_OBJECT)hThisObject; PHTTP_HFP_INTERFACE pHfpIf = (PHTTP_HFP_INTERFACE )pMyObject->hHfpIf; PHTTP_FORM_ELEMENT pFormElement = NULL; PSINGLE_LINK_ENTRY pSLinkEntry = NULL; ULONG ulHashIndex = AnscHashString(name, AnscSizeOfString(name), HTTP_FCO_FEO_TABLE_SIZE); AnscAcquireLock(&pMyObject->FeoTableLock); pSLinkEntry = AnscQueueGetFirstEntry(&pMyObject->FeoTable[ulHashIndex]); while ( pSLinkEntry ) { pFormElement = ACCESS_HTTP_FORM_ELEMENT(pSLinkEntry); pSLinkEntry = AnscQueueGetNextEntry(pSLinkEntry); if ( AnscEqualString(pFormElement->Name, name, TRUE) ) { AnscReleaseLock(&pMyObject->FeoTableLock); return (ANSC_HANDLE)pFormElement; } } AnscReleaseLock(&pMyObject->FeoTableLock); return (ANSC_HANDLE)NULL;}
开发者ID:davekimble,项目名称:CcspCommonLibrary,代码行数:35,
示例27: AnscSizeOfStringintCcspCwmpAcscoHttpFindCookie ( ANSC_HANDLE hThisObject, PCHAR pCookieName ){ PCCSP_CWMP_ACS_CONNECTION_OBJECT pMyObject = (PCCSP_CWMP_ACS_CONNECTION_OBJECT)hThisObject; ULONG i; PCHAR pValue; ULONG ulCookieNameLen = AnscSizeOfString(pCookieName); for ( i = 0; i < pMyObject->NumCookies; i ++ ) { if ( pMyObject->Cookies[i] ) { pValue = _ansc_strstr(pMyObject->Cookies[i], pCookieName); if ( !pValue ) continue; if ( ( pValue == pMyObject->Cookies[i] || *(pValue-1) == ' ' || *(pValue-1) == ';' ) && *(pValue + ulCookieNameLen) == '=' ) { return (int)i; } } } return -1;}
开发者ID:davekimble,项目名称:CcspTr069Pa,代码行数:30,
示例28: _ansc_sprintfANSC_STATUSCosaDmlDiGetProductClass ( ANSC_HANDLE hContext, char* pValue, ULONG* pulSize ){/* char val[64] = {0}; char param_name[256] = {0}; _ansc_sprintf(param_name, "%s%s", DMSB_TR181_PSM_DeviceInfo_Root, DMSB_TR181_PSM_DeviceInfo_ProductClass); if (PsmGet(param_name, val, sizeof(val)) != 0) { pValue[0] = '/0'; *pulSize = 0; return ANSC_STATUS_FAILURE; } else { AnscCopyString(pValue, val); *pulSize = AnscSizeOfString(pValue); return ANSC_STATUS_SUCCESS; }*/ AnscCopyString(pValue, "XB3"); *pulSize = AnscSizeOfString(pValue); return ANSC_STATUS_SUCCESS;}
开发者ID:rdkcmf,项目名称:rdkb-CcspPandM,代码行数:28,
注:本文中的AnscSizeOfString函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 C++ Any函数代码示例 C++ AnscReleaseLock函数代码示例 |