コード例 #1
0
BOOL
SlapEcoUoaVerifyProxyObject
    (
        ANSC_HANDLE                 hThisObject,
        char*                       obj_name
    )
{
    ANSC_STATUS                     returnStatus   = ANSC_STATUS_SUCCESS;
    PSLAP_ENV_CONTROLLER_OBJECT     pMyObject      = (PSLAP_ENV_CONTROLLER_OBJECT)hThisObject;
    PSLAP_OBJ_MAPPER_OBJECT         pSlapObjMapper = (PSLAP_OBJ_MAPPER_OBJECT    )pMyObject->hSlapObjMapper;
    PSLAP_OBJ_PROXY_OBJECT          pSlapObjProxy  = (PSLAP_OBJ_PROXY_OBJECT     )NULL;

    pSlapObjProxy =
        (PSLAP_OBJ_PROXY_OBJECT)pSlapObjMapper->GetObjProxy1
            (
                (ANSC_HANDLE)pSlapObjMapper,
                obj_name
            );

    if ( !pSlapObjProxy )
    {
        return  FALSE;
    }

    return  TRUE;
}
コード例 #2
0
ANSC_HANDLE
SlapEcoUoaCreateProxyObject
    (
        ANSC_HANDLE                 hThisObject,
        ANSC_HANDLE                 hSlapContainer,
        char*                       obj_name,
        ANSC_HANDLE                 hSlapGoaObj
    )
{
    ANSC_STATUS                     returnStatus      = ANSC_STATUS_SUCCESS;
    PSLAP_ENV_CONTROLLER_OBJECT     pMyObject         = (PSLAP_ENV_CONTROLLER_OBJECT)hThisObject;
    PSLAP_OBJ_MAPPER_OBJECT         pSlapObjMapper    = (PSLAP_OBJ_MAPPER_OBJECT    )pMyObject->hSlapObjMapper;
    PSLAP_OBJ_CONTAINER_OBJECT      pSlapObjContainer = (PSLAP_OBJ_CONTAINER_OBJECT )hSlapContainer;
    PSLAP_OBJ_PROXY_OBJECT          pSlapObjProxy     = (PSLAP_OBJ_PROXY_OBJECT     )NULL;
    PSLAP_SRV_PROXY_OBJECT          pSlapSrvProxy     = (PSLAP_SRV_PROXY_OBJECT     )NULL;

    if ( !obj_name || (AnscSizeOfString(obj_name) == 0) )
    {
        return  (ANSC_HANDLE)NULL;
    }

    pSlapObjProxy =
        (PSLAP_OBJ_PROXY_OBJECT)pSlapObjMapper->GetObjProxy1
            (
                (ANSC_HANDLE)pSlapObjMapper,
                obj_name
            );

    if ( !pSlapObjProxy )
    {
        return  (ANSC_HANDLE)NULL;
    }
    else
    {
        pSlapSrvProxy =
            (PSLAP_SRV_PROXY_OBJECT)pSlapObjProxy->NewSrvProxy
                (
                    (ANSC_HANDLE)pSlapObjProxy,
                    hSlapGoaObj
                );
    }

    if ( !pSlapSrvProxy )
    {
        return  (ANSC_HANDLE)NULL;
    }

    return  (ANSC_HANDLE)pSlapSrvProxy;
}