コード例 #1
0
ANSC_STATUS
DslhWmpdoReset
(
    ANSC_HANDLE                 hThisObject
)
{
    ANSC_STATUS                     returnStatus   = ANSC_STATUS_SUCCESS;
    PDSLH_WMP_DATABASE_OBJECT       pMyObject      = (PDSLH_WMP_DATABASE_OBJECT  )hThisObject;
    PDSLH_WMP_DATABASE_PROPERTY     pProperty      = (PDSLH_WMP_DATABASE_PROPERTY)&pMyObject->Property;
    PDSLH_OBJ_RECORD_OBJECT         pRootObjRecord = (PDSLH_OBJ_RECORD_OBJECT    )pMyObject->hRootObjRecord;
    PDSLH_OBJ_ENTITY_OBJECT         pRootObjEntity = (PDSLH_OBJ_ENTITY_OBJECT    )pMyObject->hRootObjEntity;
    PDSLH_WMPDO_MONITOR_PARAM       pMonitorParam  = (PDSLH_WMPDO_MONITOR_PARAM  )NULL;
    PSINGLE_LINK_ENTRY              pSLinkEntry    = (PSINGLE_LINK_ENTRY         )NULL;

    pMyObject->ResetObjVarArray(hThisObject);

    if ( pMyObject->LockedEntity )
    {
        AnscFreeMemory(pMyObject->LockedEntity);

        pMyObject->LockedEntity = NULL;
    }

    if ( pMyObject->pRootObjName)
    {
        AnscFreeMemory(pMyObject->pRootObjName);

        pMyObject->pRootObjName = NULL;
    }

    if ( pRootObjRecord )
    {
        pRootObjRecord->Remove((ANSC_HANDLE)pRootObjRecord);

        pMyObject->hRootObjRecord = (ANSC_HANDLE)NULL;
    }

    if ( pRootObjEntity )
    {
        pRootObjEntity->Remove((ANSC_HANDLE)pRootObjEntity);

        pMyObject->hRootObjEntity = (ANSC_HANDLE)NULL;
    }

    AnscAcquireLock(&pMyObject->MpoQueueLock);

    pSLinkEntry = AnscQueuePopEntry(&pMyObject->MpoQueue);

    while ( pSLinkEntry )
    {
        pMonitorParam = ACCESS_DSLH_WMPDO_MONITOR_PARAM(pSLinkEntry);
        pSLinkEntry   = AnscQueuePopEntry(&pMyObject->MpoQueue);

        DslhWmpdoFreeMonitorParam(pMonitorParam);
    }

    AnscReleaseLock(&pMyObject->MpoQueueLock);

    return  ANSC_STATUS_SUCCESS;
}
コード例 #2
0
ANSC_STATUS
DslhWmpdoCancel
    (
        ANSC_HANDLE                 hThisObject
    )
{
    ANSC_STATUS                     returnStatus       = ANSC_STATUS_SUCCESS;
    PDSLH_WMP_DATABASE_OBJECT       pMyObject          = (PDSLH_WMP_DATABASE_OBJECT    )hThisObject;
    PDSLH_WMP_DATABASE_PROPERTY     pProperty          = (PDSLH_WMP_DATABASE_PROPERTY  )&pMyObject->Property;
    PDSLH_CPE_CONTROLLER_OBJECT     pDslhCpeController = (PDSLH_CPE_CONTROLLER_OBJECT  )pMyObject->hDslhCpeController;
    PDSLH_OBJ_RECORD_OBJECT         pRootObjRecord     = (PDSLH_OBJ_RECORD_OBJECT      )pMyObject->hRootObjRecord;
    PDSLH_OBJ_ENTITY_OBJECT         pRootObjEntity     = (PDSLH_OBJ_ENTITY_OBJECT      )pMyObject->hRootObjEntity;
    PANSC_TIMER_DESCRIPTOR_OBJECT   pMonitorTimerObj   = (PANSC_TIMER_DESCRIPTOR_OBJECT)pMyObject->hMonitorTimerObj;

    if ( !pMyObject->bActive )
    {
        return  ANSC_STATUS_SUCCESS;
    }
    else
    {
        pMyObject->bActive = FALSE;
    }

    pMonitorTimerObj->Stop((ANSC_HANDLE)pMonitorTimerObj);

    if ( pRootObjRecord )
    {
        pRootObjRecord->Remove((ANSC_HANDLE)pRootObjRecord);

        pMyObject->hRootObjRecord = (ANSC_HANDLE)NULL;
    }

    if ( pRootObjEntity )
    {
        pRootObjEntity->Remove((ANSC_HANDLE)pRootObjEntity);

        pMyObject->hRootObjEntity = (ANSC_HANDLE)NULL;
    }

    returnStatus = pMyObject->CloseEnv((ANSC_HANDLE)pMyObject);

    return  returnStatus;
}
コード例 #3
0
ANSC_STATUS
DslhObjeoEnableForbidNotify
    (
        ANSC_HANDLE                 hThisObject,
        BOOL                        bEnabled
    )
{
    ANSC_STATUS                     returnStatus     = ANSC_STATUS_SUCCESS;
    PDSLH_OBJ_ENTITY_OBJECT         pMyObject        = (PDSLH_OBJ_ENTITY_OBJECT)hThisObject;
    PDSLH_OBJ_ENTITY_OBJECT         pParentObjEntity = (PDSLH_OBJ_ENTITY_OBJECT)pMyObject->hParentObjEntity;

    pMyObject->bForbidNotify = bEnabled;

    if ( bEnabled && pParentObjEntity )
    {
        pParentObjEntity->EnableForbidNotify((ANSC_HANDLE)pParentObjEntity, bEnabled);
    }

    return  ANSC_STATUS_SUCCESS;
}
コード例 #4
0
ANSC_STATUS
DslhObjeoReset
    (
        ANSC_HANDLE                 hThisObject
    )
{
    ANSC_STATUS                     returnStatus    = ANSC_STATUS_SUCCESS;
    PDSLH_OBJ_ENTITY_OBJECT         pMyObject       = (PDSLH_OBJ_ENTITY_OBJECT)hThisObject;
    PDSLH_OBJ_ENTITY_OBJECT         pChildObjEntity = (PDSLH_OBJ_ENTITY_OBJECT)NULL;
    PDSLH_VAR_ENTITY_OBJECT         pChildVarEntity = (PDSLH_VAR_ENTITY_OBJECT)NULL;
    PDSLH_OBJEO_INSTANCE            pObjeoInstance  = (PDSLH_OBJEO_INSTANCE   )NULL;
    PSINGLE_LINK_ENTRY              pSLinkEntry     = (PSINGLE_LINK_ENTRY     )NULL;
    ULONG                           i               = 0;

    /* reset the child objects/parameters */
    if ( TRUE )
    {
        pSLinkEntry = AnscQueuePopEntry(&pMyObject->ObjInsQueue);

        while ( pSLinkEntry )
        {
            pObjeoInstance = ACCESS_DSLH_OBJEO_INSTANCE(pSLinkEntry);
            pSLinkEntry    = AnscQueuePopEntry(&pMyObject->ObjInsQueue);

            AnscFreeMemory(pObjeoInstance);
        }
    }

    if ( TRUE )
    {
        pSLinkEntry = AnscQueuePopEntry(&pMyObject->ObjeoQueue);

        while ( pSLinkEntry )
        {
            pChildObjEntity = ACCESS_DSLH_OBJ_ENTITY_OBJECT(pSLinkEntry);
            pSLinkEntry     = AnscQueuePopEntry(&pMyObject->ObjeoQueue);

            pChildObjEntity->Reset ((ANSC_HANDLE)pChildObjEntity);
            pChildObjEntity->Remove((ANSC_HANDLE)pChildObjEntity);
        }
    }

    if ( TRUE )
    {
        pSLinkEntry = AnscQueuePopEntry(&pMyObject->VareoTable);

        while ( pSLinkEntry )
        {
            pChildVarEntity = ACCESS_DSLH_VAR_ENTITY_OBJECT(pSLinkEntry);
            pSLinkEntry     = AnscQueuePopEntry(&pMyObject->VareoTable);

            DslhVareoReset ((ANSC_HANDLE)pChildVarEntity);
            DslhVareoRemove((ANSC_HANDLE)pChildVarEntity);
        }
    }

    /* reset itself */
    if ( pMyObject->ObjDescr )
    {
        if( pMyObject->ObjDescr->hParamArray != NULL)
        {
            AnscFreeMemory(pMyObject->ObjDescr->hParamArray);

            pMyObject->ObjDescr->hParamArray = NULL;
        }

    	DslhCwmpFreeObjectDescr(pMyObject->ObjDescr );
    	pMyObject->ObjDescr = NULL;
    }

    if ( pMyObject->LastName )
    {
        AnscFreeMemory(pMyObject->LastName);

        pMyObject->LastName = NULL;
    }

    return  ANSC_STATUS_SUCCESS;
}