当前位置: 首页>>代码示例>>C++>>正文


C++ PDSLH_CPE_CONTROLLER_OBJECT::AddInterface方法代码示例

本文整理汇总了C++中PDSLH_CPE_CONTROLLER_OBJECT::AddInterface方法的典型用法代码示例。如果您正苦于以下问题:C++ PDSLH_CPE_CONTROLLER_OBJECT::AddInterface方法的具体用法?C++ PDSLH_CPE_CONTROLLER_OBJECT::AddInterface怎么用?C++ PDSLH_CPE_CONTROLLER_OBJECT::AddInterface使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在PDSLH_CPE_CONTROLLER_OBJECT的用法示例。


在下文中一共展示了PDSLH_CPE_CONTROLLER_OBJECT::AddInterface方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: AnscTrace

ANSC_STATUS
DslhDmagntEngage
    (
        ANSC_HANDLE                 hThisObject
    )
{
    ANSC_STATUS                     returnStatus           = ANSC_STATUS_SUCCESS;
    PDSLH_DATAMODEL_AGENT_OBJECT    pMyObject              = (PDSLH_DATAMODEL_AGENT_OBJECT)hThisObject;
    PANSC_ATOM_TABLE_OBJECT         pAtomFunctions         = (PANSC_ATOM_TABLE_OBJECT)pMyObject->hAtomFunctions;
    PDSLH_CPE_CONTROLLER_OBJECT     pDslhCpeController     = (PDSLH_CPE_CONTROLLER_OBJECT)pMyObject->hDslhCpeController;
    PSLAP_OBJECT_DESCRIPTOR         pObjDescriptor         = (PSLAP_OBJECT_DESCRIPTOR    )NULL;
    PPOAM_IREP_FOLDER_OBJECT        pPoamIrepFoRoot        = (PPOAM_IREP_FOLDER_OBJECT   )NULL;
    PPOAM_IREP_FOLDER_OBJECT        pPoamIrepFoProvision   = (PPOAM_IREP_FOLDER_OBJECT   )NULL;
    PPOAM_IREP_FOLDER_OBJECT        pPoamIrepFoCOSA        = (PPOAM_IREP_FOLDER_OBJECT   )pMyObject->hIrepFolderCOSA;

    PDSLH_MWS_INTERFACE             pDslhMwsIf             = (PDSLH_MWS_INTERFACE        )pMyObject->hDslhMwsIf;

    if ( pMyObject->bActive )
    {
        return  ANSC_STATUS_SUCCESS;
    }

    if( pDslhMwsIf != NULL)
    {
        pDslhCpeController->AddInterface(pDslhCpeController, pMyObject->hDslhMwsIf);
    }

    pMyObject->hDslhCcdIf = pDslhCpeController->GetInterfaceByName(pDslhCpeController, CCSP_CCD_INTERFACE_NAME);
    pMyObject->hDslhLcbIf = pDslhCpeController->GetInterfaceByName(pDslhCpeController, CCSP_LIBCBK_INTERFACE_NAME);

    /* register internal apis */
    if( pAtomFunctions == NULL)
    {
        pMyObject->hAtomFunctions =
            AnscCreateAtomTable
                (
                    pMyObject->hContainerContext,
                    (ANSC_HANDLE)pMyObject,
                    NULL
                );

        pAtomFunctions    = (PANSC_ATOM_TABLE_OBJECT)pMyObject->hAtomFunctions;
    }

    if( pAtomFunctions != NULL)
    {                                                                                         
        /* Register the API exported by framework */
        pMyObject->RegisterInternalApi(pMyObject, "COSANotifyValueChange",            COSANotifyValueChange);
        pMyObject->RegisterInternalApi(pMyObject, "COSANotifyDiagComplete",           COSANotifyDiagComplete);
        pMyObject->RegisterInternalApi(pMyObject, "COSAValidateHierarchyInterface",   COSAValidateHierarchyInterface);
        pMyObject->RegisterInternalApi(pMyObject, "COSAGetParamValueBool",            COSAGetParamValueBool);
        pMyObject->RegisterInternalApi(pMyObject, "COSAGetParamValueInt",             COSAGetParamValueInt);
        pMyObject->RegisterInternalApi(pMyObject, "COSAGetParamValueUlong",           COSAGetParamValueUlong);
        pMyObject->RegisterInternalApi(pMyObject, "COSAGetParamValueString",          COSAGetParamValueString);
        pMyObject->RegisterInternalApi(pMyObject, "COSAGetParamValue",                COSAGetParamValue);
        pMyObject->RegisterInternalApi(pMyObject, "COSASetParamValueBool",            COSASetParamValueBool);
        pMyObject->RegisterInternalApi(pMyObject, "COSASetParamValueInt",             COSASetParamValueInt);
        pMyObject->RegisterInternalApi(pMyObject, "COSASetParamValueUlong",           COSASetParamValueUlong);
        pMyObject->RegisterInternalApi(pMyObject, "COSASetParamValueString",          COSASetParamValueString);

        pMyObject->RegisterInternalApi(pMyObject, "COSAGetRegistryRootFolder",        COSAGetRegistryRootFolder);
        pMyObject->RegisterInternalApi(pMyObject, "COSAGetInstanceNumberByIndex",     COSAGetInstanceNumberByIndex);
        pMyObject->RegisterInternalApi(pMyObject, "COSAGetInterfaceByName",           COSAGetInterfaceByName);
        pMyObject->RegisterInternalApi(pMyObject, "COSAGetMessageBusHandle",          COSAGetMessageBusHandle);
        pMyObject->RegisterInternalApi(pMyObject, "COSARegisterCallBackAfterInitDml", COSARegisterCallBackAfterInitDml);
        pMyObject->RegisterInternalApi(pMyObject, "COSAGetSubsystemPrefix",           COSAGetSubsystemPrefix);
        pMyObject->RegisterInternalApi(pMyObject, "COSARepopulateTable",              COSARepopulateTable);
        pMyObject->RegisterInternalApi(pMyObject, "COSAGetParamValueByPathName",      COSAGetParamValueByPathName);
        pMyObject->RegisterInternalApi(pMyObject, "COSASetParamValueByPathName",      COSASetParamValueByPathName);
        pMyObject->RegisterInternalApi(pMyObject, "COSAGetInstanceNumbers",           COSAGetInstanceNumbers);

        /* Register the API  for CCSP Common Components*/
#if 0
        pMyObject->RegisterInternalApi(pMyObject, "CcspComp_GetParamUlongValue",      CcspComp_GetParamUlongValue);
        pMyObject->RegisterInternalApi(pMyObject, "CcspComp_GetParamStringValue",     CcspComp_GetParamStringValue);
#endif
        pMyObject->RegisterInternalApi(pMyObject, "CcspComp_GetBulkParamValues",      CcspComp_GetBulkParamValues);
        pMyObject->RegisterInternalApi(pMyObject, "CcspComp_SetParamBoolValue",       CcspComp_SetParamBoolValue);

        pMyObject->RegisterInternalApi(pMyObject, "CcspLog_GetParamBoolValue",        CcspLog_GetParamBoolValue);
        pMyObject->RegisterInternalApi(pMyObject, "CcspLog_GetParamUlongValue",       CcspLog_GetParamUlongValue);
        pMyObject->RegisterInternalApi(pMyObject, "CcspLog_SetParamBoolValue",        CcspLog_SetParamBoolValue);
        pMyObject->RegisterInternalApi(pMyObject, "CcspLog_SetParamUlongValue",       CcspLog_SetParamUlongValue);
        pMyObject->RegisterInternalApi(pMyObject, "CcspLog_Validate",                 CcspLog_Validate );
        pMyObject->RegisterInternalApi(pMyObject, "CcspLog_Commit",                   CcspLog_Commit );
        pMyObject->RegisterInternalApi(pMyObject, "CcspLog_Rollback",                 CcspLog_Rollback );
        pMyObject->RegisterInternalApi(pMyObject, "CcspMem_GetParamUlongValue",       CcspMem_GetParamUlongValue);
        pMyObject->RegisterInternalApi(pMyObject, "CcspLog_GetBulkParamValues",       CcspLog_GetBulkParamValues);
        pMyObject->RegisterInternalApi(pMyObject, "CcspLog_SetBulkParamValues",       CcspLog_SetBulkParamValues);

    }

    /*
     * Enroll and create PoamIrepFolder object.
     */
    if ( TRUE )
    {

        pPoamIrepFoRoot =
            (PPOAM_IREP_FOLDER_OBJECT)PoamIrepFoCreate(NULL, NULL, ""); 
//.........这里部分代码省略.........
开发者ID:rdkcmf,项目名称:rdkb-CcspCommonLibrary,代码行数:101,代码来源:dslh_dmagnt_operation.c

示例2: CcspComponentLoadDmXmlList

ANSC_STATUS
ssp_engage_wifi
    (
        PCCSP_COMPONENT_CFG         pStartCfg
    )
{
    ANSC_STATUS                     returnStatus    = ANSC_STATUS_SUCCESS;
    char                            CrName[256]     = {0};
    PCCSP_DM_XML_CFG_LIST           pXmlCfgList     = NULL;

    g_pComponent_Common_Dm->Health = CCSP_COMMON_COMPONENT_HEALTH_Yellow;


    if ( pWifiCcdIf )
    {
        pWifiFcContext->hCcspCcdIf = (ANSC_HANDLE)pWifiCcdIf;
        pWifiFcContext->hMessageBus = bus_handle;
    }

    g_DslhDataModelAgent->SetFcContext((ANSC_HANDLE)g_DslhDataModelAgent, (ANSC_HANDLE)pWifiFcContext);

    pDslhCpeController->AddInterface((ANSC_HANDLE)pDslhCpeController, (ANSC_HANDLE)MsgHelper_CreateCcdMbiIf((void*)bus_handle,g_Subsystem));
    pDslhCpeController->AddInterface((ANSC_HANDLE)pDslhCpeController, (ANSC_HANDLE)pWifiCcdIf);
    pDslhCpeController->SetDbusHandle((ANSC_HANDLE)pDslhCpeController, bus_handle);
    pDslhCpeController->Engage((ANSC_HANDLE)pDslhCpeController);

    if ( g_Subsystem[0] != 0 )
    {
        _ansc_sprintf(CrName, "%s%s", g_Subsystem, CCSP_DBUS_INTERFACE_CR);
    }
    else
    {
        _ansc_sprintf(CrName, "%s", CCSP_DBUS_INTERFACE_CR);
    }

    returnStatus = CcspComponentLoadDmXmlList(pStartCfg->DmXmlCfgFileName, &pXmlCfgList);

    if ( returnStatus != ANSC_STATUS_SUCCESS )
    {
        return  returnStatus;
    }

    returnStatus =
        pDslhCpeController->RegisterCcspDataModel
            (
                (ANSC_HANDLE)pDslhCpeController,
                CrName,                             /* CCSP CR ID */
                pXmlCfgList->FileList[0],           /* Data Model XML file. Can be empty if only base data model supported. */
                pStartCfg->ComponentName,           /* Component Name    */
                pStartCfg->Version,                 /* Component Version */
                pStartCfg->DbusPath,                /* Component Path    */
                g_Subsystem                         /* Component Prefix  */
            );

    if ( returnStatus == ANSC_STATUS_SUCCESS || returnStatus == CCSP_SUCCESS )
    {
        /* System is fully initialized */
        g_pComponent_Common_Dm->Health = CCSP_COMMON_COMPONENT_HEALTH_Green;
    }

    AnscFreeMemory(pXmlCfgList);

    return ANSC_STATUS_SUCCESS;
}
开发者ID:rdkcmf,项目名称:rdkb-CcspWifiAgent,代码行数:64,代码来源:ssp_action.c

示例3: DslhCreateCpeController

ANSC_STATUS
ssp_engage_tad
    (
    )
{
	ANSC_STATUS					    returnStatus                                         = ANSC_STATUS_SUCCESS;
        char                                                CrName[256];

    g_pComponent_Common_Dm->Health = CCSP_COMMON_COMPONENT_HEALTH_Yellow;

    if ( pTadCcdIf )
    {
        pTadFcContext->hCcspCcdIf = (ANSC_HANDLE)pTadCcdIf;
        pTadFcContext->hMessageBus = bus_handle;
    }

    g_DslhDataModelAgent->SetFcContext((ANSC_HANDLE)g_DslhDataModelAgent, (ANSC_HANDLE)pTadFcContext);

    /*RDKB-7459, CID-33428, null check before use */
    if(!pDslhCpeController)
    {
        pDslhCpeController = DslhCreateCpeController(NULL, NULL, NULL);
        if ( !pDslhCpeController )
        {
            CcspTraceWarning(("Null Value, CANNOT Create pDslhCpeController... Exit!\n"));
            return ANSC_STATUS_RESOURCES;
        }
    }

    pDslhCpeController->AddInterface((ANSC_HANDLE)pDslhCpeController, (ANSC_HANDLE)MsgHelper_CreateCcdMbiIf((void*)bus_handle, g_Subsystem));
    pDslhCpeController->AddInterface((ANSC_HANDLE)pDslhCpeController, (ANSC_HANDLE)pTadCcdIf);
    pDslhCpeController->SetDbusHandle((ANSC_HANDLE)pDslhCpeController, bus_handle);
    pDslhCpeController->Engage((ANSC_HANDLE)pDslhCpeController);

    if ( g_Subsystem[0] != 0 )
    {
        _ansc_sprintf(CrName, "%s%s", g_Subsystem, CCSP_DBUS_INTERFACE_CR);
    }
    else
    {
        _ansc_sprintf(CrName, "%s", CCSP_DBUS_INTERFACE_CR);
    }

    if ( TRUE )
    {

        /*RDKB-7459, CID-33428, Load Lib if handle is null */
        if( hDiagPlugin == NULL)
        {
            hDiagPlugin = (ANSC_HANDLE)AnscLoadLibrary(COSA_DIAG_PLUGIN_LIBRARY_NAME);
        }

        if( hDiagPlugin == NULL)
        {
            CcspTraceWarning(("Unable to load library -- %s\n", COSA_DIAG_PLUGIN_LIBRARY_NAME));
#ifdef _ANSC_LINUX
            CcspTraceWarning(("cause:%s\n",  dlerror() ));
#endif
            g_CosaDiagPluginInfo.uLoadStatus = COSA_STATUS_ERROR_LOAD_LIBRARY;
        }
        else
        {
            g_CosaDiagPluginInfo.InitProc = (COSADiagInitProc)
                AnscGetProcAddress
                    (
                        hDiagPlugin,
                        COSA_DIAG_PLUGIN_INIT_PROC
                    );

            if ( g_CosaDiagPluginInfo.InitProc == NULL )
            {
                AnscTraceWarning(("Unable to Get ProcAddress of  '%s'\n", COSA_DIAG_PLUGIN_INIT_PROC));

                g_CosaDiagPluginInfo.uLoadStatus = COSA_STATUS_ERROR_LOAD_LIBRARY;
            }
            else
            {
                g_CosaDiagPluginInfo.UnloadProc = (COSADiagUnloadProc)
                    AnscGetProcAddress
                        (
                            hDiagPlugin,
                            COSA_DIAG_PLUGIN_UNLOAD_PROC
                        );

                if ( g_CosaDiagPluginInfo.UnloadProc == NULL )
                {
                    AnscTraceWarning(("Unable to Get ProcAddress of  '%s'\n", COSA_DIAG_PLUGIN_UNLOAD_PROC));

                    g_CosaDiagPluginInfo.uLoadStatus = COSA_STATUS_ERROR_LOAD_LIBRARY;
                }
                else
                {
                    g_CosaDiagPluginInfo.GetResultsProc = (CosaDiagGetResultsProc)
                        AnscGetProcAddress
                            (
                                hDiagPlugin,
                                COSA_DIAG_PLUGIN_GETRESULTS_PROC
                            );

                    if ( g_CosaDiagPluginInfo.GetResultsProc == NULL )
//.........这里部分代码省略.........
开发者ID:rdkcmf,项目名称:rdkb-TestAndDiagnostic,代码行数:101,代码来源:ssp_action.c


注:本文中的PDSLH_CPE_CONTROLLER_OBJECT::AddInterface方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。