本文整理汇总了C++中AnscEqualString函数的典型用法代码示例。如果您正苦于以下问题:C++ AnscEqualString函数的具体用法?C++ AnscEqualString怎么用?C++ AnscEqualString使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了AnscEqualString函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: CosaDmlUpnpDevEnable
/**********************************************************************
caller: owner of this object
prototype:
BOOL
Device_SetParamBoolValue
(
ANSC_HANDLE hInsContext,
char* ParamName,
BOOL bValue
);
description:
This function is called to set BOOL parameter value;
argument: ANSC_HANDLE hInsContext,
The instance handle;
char* ParamName,
The parameter name;
BOOL bValue
The updated BOOL value;
return: TRUE if succeeded.
**********************************************************************/
BOOL
Device_SetParamBoolValue
(
ANSC_HANDLE hInsContext,
char* ParamName,
BOOL bValue
)
{
PCOSA_DATAMODEL_UPNP pMyObject = (PCOSA_DATAMODEL_UPNP)g_pCosaBEManager->hUpnp;
/* check the parameter name and set the corresponding value */
if( AnscEqualString(ParamName, "Enable", TRUE))
{
/* save update to backup */
pMyObject->bUpnpDevEnable = bValue;
CosaDmlUpnpDevEnable(NULL, pMyObject->bUpnpDevEnable);
return TRUE;
}
if( AnscEqualString(ParamName, "UPnPIGD", TRUE))
{
/* save update to backup */
pMyObject->bUpnpDevIgdEnable = bValue;
CosaDmlUpnpDevEnableIgd(NULL, pMyObject->bUpnpDevIgdEnable);
return TRUE;
}
/* CcspTraceWarning(("Unsupported parameter '%s'\n", ParamName)); */
return FALSE;
}
示例2:
/**********************************************************************
caller: owner of this object
prototype:
BOOL
Device_GetParamBoolValue
(
ANSC_HANDLE hInsContext,
char* ParamName,
BOOL* pBool
);
description:
This function is called to retrieve Boolean parameter value;
argument: ANSC_HANDLE hInsContext,
The instance handle;
char* ParamName,
The parameter name;
BOOL* pBool
The buffer of returned boolean value;
return: TRUE if succeeded.
**********************************************************************/
BOOL
Device_GetParamBoolValue
(
ANSC_HANDLE hInsContext,
char* ParamName,
BOOL* pBool
)
{
PCOSA_DATAMODEL_UPNP pMyObject = (PCOSA_DATAMODEL_UPNP)g_pCosaBEManager->hUpnp;
/* check the parameter name and return the corresponding value */
if( AnscEqualString(ParamName, "Enable", TRUE))
{
/* collect value */
*pBool = pMyObject->bUpnpDevEnable;
return TRUE;
}
if( AnscEqualString(ParamName, "UPnPIGD", TRUE))
{
/* collect value */
*pBool = pMyObject->bUpnpDevIgdEnable;
return TRUE;
}
/* CcspTraceWarning(("Unsupported parameter '%s'\n", ParamName)); */
return FALSE;
}
示例3: CosaDmlUpnpDevGetAdvPeriod
/**********************************************************************
caller: owner of this object
prototype:
BOOL
Device_GetParamUlongValue
(
ANSC_HANDLE hInsContext,
char* ParamName,
ULONG* puLong
);
description:
This function is called to retrieve ULONG parameter value;
argument: ANSC_HANDLE hInsContext,
The instance handle;
char* ParamName,
The parameter name;
ULONG* puLong
The buffer of returned ULONG value;
return: TRUE if succeeded.
**********************************************************************/
BOOL
Device_GetParamUlongValue
(
ANSC_HANDLE hInsContext,
char* ParamName,
ULONG* puLong
)
{
PCOSA_DATAMODEL_UPNP pMyObject = (PCOSA_DATAMODEL_UPNP)g_pCosaBEManager->hUpnp;
/* check the parameter name and return the corresponding value */
if( AnscEqualString(ParamName, "X_CISCO_COM_IGD_AdvertisementPeriod", TRUE) )
{
/* collect value */
CosaDmlUpnpDevGetAdvPeriod(NULL, &pMyObject->AdvertisementPeriod);
*puLong = pMyObject->AdvertisementPeriod;
return TRUE;
}
if( AnscEqualString(ParamName, "X_CISCO_COM_IGD_TTL", TRUE) )
{
/* collect value */
CosaDmlUpnpDevGetTTL(NULL, &pMyObject->TTL);
*puLong = pMyObject->TTL;
return TRUE;
}
/* CcspTraceWarning(("Unsupported parameter '%s'\n", ParamName)); */
return FALSE;
}
示例4:
/**********************************************************************
caller: owner of this object
prototype:
BOOL
Time_SetParamBoolValue
(
ANSC_HANDLE hInsContext,
char* ParamName,
BOOL bValue
);
description:
This function is called to set BOOL parameter value;
argument: ANSC_HANDLE hInsContext,
The instance handle;
char* ParamName,
The parameter name;
BOOL bValue
The updated BOOL value;
return: TRUE if succeeded.
**********************************************************************/
BOOL
Time_SetParamBoolValue
(
ANSC_HANDLE hInsContext,
char* ParamName,
BOOL bValue
)
{
PCOSA_DATAMODEL_TIME pMyObject = (PCOSA_DATAMODEL_TIME)g_pCosaBEManager->hTime;
/* check the parameter name and set the corresponding value */
if( AnscEqualString(ParamName, "Enable", TRUE))
{
/* save update to backup */
pMyObject->TimeCfg.bEnabled = bValue;
return TRUE;
}
if( AnscEqualString(ParamName, "DaylightSaving", TRUE))
{
/* save update to backup */
pMyObject->TimeCfg.bDaylightSaving = bValue;
return TRUE;
}
/* CcspTraceWarning(("Unsupported parameter '%s'\n", ParamName)); */
return FALSE;
}
示例5: CosaDmlTimeGetState
/**********************************************************************
caller: owner of this object
prototype:
BOOL
Time_GetParamUlongValue
(
ANSC_HANDLE hInsContext,
char* ParamName,
ULONG* puLong
);
description:
This function is called to retrieve ULONG parameter value;
argument: ANSC_HANDLE hInsContext,
The instance handle;
char* ParamName,
The parameter name;
ULONG* puLong
The buffer of returned ULONG value;
return: TRUE if succeeded.
**********************************************************************/
BOOL
Time_GetParamUlongValue
(
ANSC_HANDLE hInsContext,
char* ParamName,
ULONG* puLong
)
{
PCOSA_DATAMODEL_TIME pMyObject = (PCOSA_DATAMODEL_TIME)g_pCosaBEManager->hTime;
/* check the parameter name and return the corresponding value */
if( AnscEqualString(ParamName, "Status", TRUE))
{
/* collect value */
CosaDmlTimeGetState(NULL, &pMyObject->TimeStatus, &pMyObject->CurrLocalTime);
*puLong = pMyObject->TimeStatus;
return TRUE;
}
/* check the parameter name and return the corresponding value */
if( AnscEqualString(ParamName, "CityIndex", TRUE))
{
/* collect value */
*puLong = pMyObject->TimeCfg.cityIndex;
return TRUE;
}
/* CcspTraceWarning(("Unsupported parameter '%s'\n", ParamName)); */
return FALSE;
}
示例6:
/**********************************************************************
caller: owner of this object
prototype:
BOOL
MemoryStatus_GetParamUlongValue
(
ANSC_HANDLE hInsContext,
char* ParamName,
ULONG* puLong
);
description:
This function is called to retrieve ULONG parameter value;
argument: ANSC_HANDLE hInsContext,
The instance handle;
char* ParamName,
The parameter name;
ULONG* puLong
The buffer of returned ULONG value;
return: TRUE if succeeded.
**********************************************************************/
BOOL
MemoryStatus_GetParamUlongValue
(
ANSC_HANDLE hInsContext,
char* ParamName,
ULONG* puLong
)
{
/* check the parameter name and return the corresponding value */
if( AnscEqualString(ParamName, "Total", TRUE))
{
/* collect value */
*puLong = COSADmlGetMemoryStatus(ParamName);
return TRUE;
}
if( AnscEqualString(ParamName, "Free", TRUE))
{
/* collect value */
*puLong = COSADmlGetMemoryStatus(ParamName);
return TRUE;
}
/* AnscTraceWarning(("Unsupported parameter '%s'\n", ParamName)); */
return FALSE;
}
示例7: CosaDmlUpnpDevSetAdvPeriod
/**********************************************************************
caller: owner of this object
prototype:
BOOL
Device_SetParamUlongValue
(
ANSC_HANDLE hInsContext,
char* ParamName,
ULONG uValue
);
description:
This function is called to set ULONG parameter value;
argument: ANSC_HANDLE hInsContext,
The instance handle;
char* ParamName,
The parameter name;
ULONG uValue
The updated ULONG value;
return: TRUE if succeeded.
**********************************************************************/
BOOL
Device_SetParamUlongValue
(
ANSC_HANDLE hInsContext,
char* ParamName,
ULONG uValue
)
{
PCOSA_DATAMODEL_UPNP pMyObject = (PCOSA_DATAMODEL_UPNP)g_pCosaBEManager->hUpnp;
/* check the parameter name and set the corresponding value */
if( AnscEqualString(ParamName, "X_CISCO_COM_IGD_AdvertisementPeriod", TRUE) )
{
/* save update to backup */
pMyObject->AdvertisementPeriod = uValue;
CosaDmlUpnpDevSetAdvPeriod(NULL, pMyObject->AdvertisementPeriod);
return TRUE;
}
if( AnscEqualString(ParamName, "X_CISCO_COM_IGD_TTL", TRUE) )
{
/* save update to backup */
pMyObject->TTL = uValue;
CosaDmlUpnpDevSetTTL(NULL, pMyObject->TTL);
return TRUE;
}
/* CcspTraceWarning(("Unsupported parameter '%s'\n", ParamName)); */
return FALSE;
}
示例8: if
/**********************************************************************
caller: owner of this object
prototype:
ANSC_STATUS
CcspCwmpsoSaveCwmpEvent
(
ANSC_HANDLE hThisObject
);
description:
This function is called to save Cwmp Events before reboot
argument: ANSC_HANDLE hThisObject
This handle is actually the pointer of this object
itself.
return: status of operation.
**********************************************************************/
BOOL
CcspCwmpIsUndiscardedEvent
(
char* eventName
)
{
/*
* According to WT151, the events "2 PERIODIC", "3 SCHEDULED", "7 TRANSFERCOMPLETE"
* and the ones start with "M" won't be discarded
*/
if( AnscEqualString(eventName, CCSP_CWMP_INFORM_EVENT_NAME_Peroidic, TRUE))
{
return TRUE;
}
else if( AnscEqualString(eventName, CCSP_CWMP_INFORM_EVENT_NAME_Scheduled, TRUE))
{
return TRUE;
}
else if( AnscEqualString(eventName, CCSP_CWMP_INFORM_EVENT_NAME_TransferComplete, TRUE))
{
return TRUE;
}
else if( eventName[0] == 'M')
{
return TRUE;
}
return FALSE;
}
示例9:
BOOL ANSC_EXPORT_API
COSA_IsObjSupported
(
char* pObjName
)
{
/* COSA XML file will be generated based on standard TR-xxx data model definition.
* By default, all the objects are expected to supported in the libraray.
* Realistically, we will have certain ones cannot be supported at the early stage of development.
* We can rule them out by return FALSE even if they're defined in COSA XML file.
*/
#if 0
if( AnscEqualString(pObjName, "InternetGatewayDevice.UserInterface.",TRUE))
{
/* all the objects/parameters under "UserInterface" will not be populated in Data Model Tree. */
return FALSE;
}
#endif
#if (defined(_COSA_DRG_CNS_))
if(AnscEqualString(pObjName, "Device.DNS.Client.", TRUE))
{
return FALSE;
}
#endif
return TRUE;
}
示例10:
/**********************************************************************
caller: owner of this object
prototype:
BOOL
Host_GetParamBoolValue
(
ANSC_HANDLE hInsContext,
char* ParamName,
BOOL* pBool
);
description:
This function is called to retrieve Boolean parameter value;
argument: ANSC_HANDLE hInsContext,
The instance handle;
char* ParamName,
The parameter name;
BOOL* pBool
The buffer of returned boolean value;
return: TRUE if succeeded.
**********************************************************************/
BOOL
Host_GetParamBoolValue
(
ANSC_HANDLE hInsContext,
char* ParamName,
BOOL* pBool
)
{
//printf("Host_GetParamBoolValue %p, %s\n", hInsContext, ParamName);
PLmObjectHost pHost = (PLmObjectHost) hInsContext;
int i = 0;
for(; i<LM_HOST_NumBoolPara; i++){
if( AnscEqualString(ParamName, lmHosts.pHostBoolParaName[i], TRUE))
{
/* collect value */
*pBool = pHost->bBoolParaValue[i];
return TRUE;
}
}
if( AnscEqualString(ParamName, "X_CISCO_COM_TrueStaticIPClient", TRUE))
{
/* collect value */
*pBool = pHost->bTrueStaticIPClient;
return TRUE;
}
/* AnscTraceWarning(("Unsupported parameter '%s'\n", ParamName)); */
return FALSE;
}
示例11: IPv6rdIF_GetParamBoolValue
BOOL
IPv6rdIF_GetParamBoolValue(
ANSC_HANDLE hInsContext,
char *ParamName,
BOOL *pBool)
{
PCOSA_CONTEXT_LINK_OBJECT pLinkObject = (PCOSA_CONTEXT_LINK_OBJECT)hInsContext;
PCOSA_DML_IPV6RD_IF pEntry = (PCOSA_DML_IPV6RD_IF)pLinkObject->hContext;
if (!pLinkObject || !pEntry)
return FALSE;
CosaDml_IPv6rdGetEntry(NULL, pEntry->InstanceNumber, pEntry);
if (AnscEqualString(ParamName, "Enable", TRUE))
{
*pBool = pEntry->Enable;
return TRUE;
}
else if (AnscEqualString(ParamName, "AllTrafficToBorderRelay", TRUE))
{
*pBool = pEntry->AllTrafficToBorderRelay;
return TRUE;
}
return FALSE;
}
示例12: CcspLMLiteConsoleTrace
BOOL
NetworkDevicesTraffic_Default_GetParamUlongValue
(
ANSC_HANDLE hInsContext,
char* ParamName,
ULONG* puLong
)
{
CcspLMLiteConsoleTrace(("RDK_LOG_DEBUG, LMLite %s : ENTER \n", __FUNCTION__ ));
if ( AnscEqualString(ParamName, "PollingPeriod", TRUE))
{
*puLong = GetNDTPollingPeriodDefault();
CcspLMLiteConsoleTrace(("RDK_LOG_DEBUG, LMLite %s : ParamName[%s] Value[%d] \n", __FUNCTION__ , ParamName, *puLong ));
return TRUE;
}
if ( AnscEqualString(ParamName, "ReportingPeriod", TRUE))
{
*puLong = GetNDTReportingPeriodDefault();
CcspLMLiteConsoleTrace(("RDK_LOG_DEBUG, LMLite %s : ParamName[%s] Value[%d] \n", __FUNCTION__ , ParamName, *puLong ));
return TRUE;
}
if ( AnscEqualString(ParamName, "OverrideTTL", TRUE))
{
*puLong = GetNDTOverrideTTLDefault();
CcspLMLiteConsoleTrace(("RDK_LOG_DEBUG, LMLite %s : ParamName[%s] Value[%d] \n", __FUNCTION__ , ParamName, *puLong ));
return TRUE;
}
CcspLMLiteConsoleTrace(("RDK_LOG_DEBUG, LMLite %s : EXIT \n", __FUNCTION__ ));
return FALSE;
}
示例13: sizeof
BOOL
ConnectivityTest_GetParamIntValue
(
ANSC_HANDLE hInsContext,
char* ParamName,
int* pInt
)
{
PCOSA_DATAMODEL_SELFHEAL pMyObject = (PCOSA_DATAMODEL_SELFHEAL)g_pCosaBEManager->hSelfHeal;
if( AnscEqualString(ParamName, "X_RDKCENTRAL-COM_RebootInterval", TRUE))
{
/* collect value */
*pInt = pMyObject->pConnTest->RouterRebootInterval ;
return TRUE;
}
if( AnscEqualString(ParamName, "X_RDKCENTRAL-COM_CurrentCount", TRUE))
{
/* collect value */
char buf[16]={0};
syscfg_get( NULL, "todays_reset_count", buf, sizeof(buf));
if( buf[0] != '\0' )
{
*pInt = atoi(buf);
return TRUE;
}
}
return FALSE;
}
示例14:
/**********************************************************************
caller: owner of this object
prototype
BOOL
ResourceMonitor_GetParamUlongValue
(
ANSC_HANDLE hInsContext,
char* ParamName,
ULONG* puLong
);
description:
This function is called to retrieve ULONG parameter value;
argument: ANSC_HANDLE hInsContext,
The instance handle;
char* ParamName,
The parameter name;
ULONG* puLong
The buffer of returned ULONG value;
return: TRUE if succeeded.
**********************************************************************/
BOOL
ResourceMonitor_GetParamUlongValue
(
ANSC_HANDLE hInsContext,
char* ParamName,
ULONG* puLong
)
{
PCOSA_DATAMODEL_SELFHEAL pMyObject = (PCOSA_DATAMODEL_SELFHEAL)g_pCosaBEManager->hSelfHeal;
PCOSA_DML_RESOUCE_MONITOR pRescMonitor = pMyObject->pResMonitor;
if( AnscEqualString(ParamName, "X_RDKCENTRAL-COM_UsageComputeWindow", TRUE))
{
*puLong = pRescMonitor->MonIntervalTime;
return TRUE;
}
if( AnscEqualString(ParamName, "X_RDKCENTRAL-COM_AvgCPUThreshold", TRUE))
{
*puLong = pRescMonitor->AvgCpuThreshold;
return TRUE;
}
if( AnscEqualString(ParamName, "X_RDKCENTRAL-COM_AvgMemoryThreshold", TRUE))
{
*puLong = pRescMonitor->AvgMemThreshold;
return TRUE;
}
return FALSE;
}
示例15: IPv6rdIF_SetParamBoolValue
BOOL
IPv6rdIF_SetParamBoolValue(
ANSC_HANDLE hInsContext,
char *ParamName,
BOOL bValue
)
{
PCOSA_CONTEXT_LINK_OBJECT pLinkObject = (PCOSA_CONTEXT_LINK_OBJECT)hInsContext;
PCOSA_DML_IPV6RD_IF pEntry = (PCOSA_DML_IPV6RD_IF)pLinkObject->hContext;
if (!pLinkObject || !pEntry)
return FALSE;
if (AnscEqualString(ParamName, "Enable", TRUE))
{
pEntry->Enable = bValue;
return TRUE;
}
else if (AnscEqualString(ParamName, "AllTrafficToBorderRelay", TRUE))
{
pEntry->AllTrafficToBorderRelay = bValue;
return TRUE;
}
return FALSE;
}