本文整理汇总了C++中PSLAP_OBJ_MAPPER_OBJECT::MakObjBroker方法的典型用法代码示例。如果您正苦于以下问题:C++ PSLAP_OBJ_MAPPER_OBJECT::MakObjBroker方法的具体用法?C++ PSLAP_OBJ_MAPPER_OBJECT::MakObjBroker怎么用?C++ PSLAP_OBJ_MAPPER_OBJECT::MakObjBroker使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PSLAP_OBJ_MAPPER_OBJECT
的用法示例。
在下文中一共展示了PSLAP_OBJ_MAPPER_OBJECT::MakObjBroker方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: AnscDelTokenChain
ANSC_STATUS
SlapOmoAddObjProxy
(
ANSC_HANDLE hThisObject,
char* path,
ANSC_HANDLE hObjProxy
)
{
ANSC_STATUS returnStatus = ANSC_STATUS_SUCCESS;
PSLAP_OBJ_MAPPER_OBJECT pMyObject = (PSLAP_OBJ_MAPPER_OBJECT )hThisObject;
PSLAP_OBJ_MAPPER_PROPERTY pProperty = (PSLAP_OBJ_MAPPER_PROPERTY)&pMyObject->Property;
PSLAP_OBJ_BROKER_OBJECT pRootObjBroker = (PSLAP_OBJ_BROKER_OBJECT )pMyObject->hRootObjBroker;
PSLAP_OBJ_PROXY_OBJECT pObjProxy = (PSLAP_OBJ_PROXY_OBJECT )hObjProxy;
PSLAP_OBJ_BROKER_OBJECT pThisObjBroker = NULL;
PANSC_TOKEN_CHAIN pPathTokenChain = NULL;
PANSC_STRING_TOKEN pPathToken = NULL;
pPathTokenChain = (PANSC_TOKEN_CHAIN)AnscAllocateMemory(sizeof(ANSC_TOKEN_CHAIN));
if ( !pPathTokenChain )
{
return ANSC_STATUS_RESOURCES;
}
else
{
returnStatus =
AnscSetTokenChain
(
(ANSC_HANDLE)pPathTokenChain,
path,
SLAP_OBJ_PATH_SEPARATORS
);
}
if ( returnStatus != ANSC_STATUS_SUCCESS )
{
AnscDelTokenChain((ANSC_HANDLE)pPathTokenChain);
AnscFreeMemory ((ANSC_HANDLE)pPathTokenChain);
return returnStatus;
}
else
{
pThisObjBroker =
(PSLAP_OBJ_BROKER_OBJECT)pMyObject->MakObjBroker
(
(ANSC_HANDLE)pMyObject,
(ANSC_HANDLE)pPathTokenChain
);
AnscDelTokenChain((ANSC_HANDLE)pPathTokenChain);
AnscFreeMemory ((ANSC_HANDLE)pPathTokenChain);
}
if ( pThisObjBroker )
{
if ( pThisObjBroker->hSlapObjProxy != (ANSC_HANDLE)NULL )
{
return ANSC_STATUS_COLLISION;
}
else
{
pThisObjBroker->hSlapObjProxy = (ANSC_HANDLE)pObjProxy;
}
}
else
{
return ANSC_STATUS_INTERNAL_ERROR;
}
return ANSC_STATUS_SUCCESS;
}