本文整理汇总了C++中PHTTP_BMO_REQ_OBJECT::GetRecvContext方法的典型用法代码示例。如果您正苦于以下问题:C++ PHTTP_BMO_REQ_OBJECT::GetRecvContext方法的具体用法?C++ PHTTP_BMO_REQ_OBJECT::GetRecvContext怎么用?C++ PHTTP_BMO_REQ_OBJECT::GetRecvContext使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PHTTP_BMO_REQ_OBJECT
的用法示例。
在下文中一共展示了PHTTP_BMO_REQ_OBJECT::GetRecvContext方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1:
ANSC_STATUS
WebRooDoPost
(
ANSC_HANDLE hThisObject,
ANSC_HANDLE hBmoReq,
ANSC_HANDLE hBmoRep
)
{
ANSC_STATUS returnStatus = ANSC_STATUS_SUCCESS;
PWEB_RESOURCE_OWNER_OBJECT pMyObject = (PWEB_RESOURCE_OWNER_OBJECT )hThisObject;
PWEB_RESOURCE_OWNER_PROPERTY pProperty = (PWEB_RESOURCE_OWNER_PROPERTY)&pMyObject->Property;
PHTTP_RCP_INTERFACE pRcpIf = (PHTTP_RCP_INTERFACE )pMyObject->hRcpIf;
PHTTP_BMO_REQ_OBJECT pBmoReq = (PHTTP_BMO_REQ_OBJECT )hBmoReq;
PHTTP_BMO_REP_OBJECT pBmoRep = (PHTTP_BMO_REP_OBJECT )hBmoRep;
PHTTP_REQUEST_INFO pReqInfo = (PHTTP_REQUEST_INFO )pBmoReq->GetReqInfo ((ANSC_HANDLE)pBmoReq);
PANSC_TOKEN_CHAIN pPathTokenChain = (PANSC_TOKEN_CHAIN )pBmoReq->GetRecvContext((ANSC_HANDLE)pBmoReq);
PWEB_GENERAL_SESSION_OBJECT pSession = (PWEB_GENERAL_SESSION_OBJECT )pBmoRep->GetRecvContext((ANSC_HANDLE)pBmoRep);
returnStatus =
pMyObject->ReplyReq
(
(ANSC_HANDLE)pMyObject,
(ANSC_HANDLE)pBmoReq,
(ANSC_HANDLE)pBmoRep,
HTTP_STATUS_OK,
(ANSC_HANDLE)NULL
);
return returnStatus;
}
示例2:
ANSC_STATUS
BwspWsoDoHead
(
ANSC_HANDLE hThisObject,
ANSC_HANDLE hBmoReq,
ANSC_HANDLE hBmoRep
)
{
ANSC_STATUS returnStatus = ANSC_STATUS_SUCCESS;
PBWSP_WEB_SERVLET_OBJECT pMyObject = (PBWSP_WEB_SERVLET_OBJECT )hThisObject;
PBWSP_WEB_SERVLET_PROPERTY pProperty = (PBWSP_WEB_SERVLET_PROPERTY )&pMyObject->Property;
PBWSP_WSH_INTERFACE pBwspWshIf = (PBWSP_WSH_INTERFACE )pMyObject->hBwspWshIf;
PHTTP_RCP_INTERFACE pRcpIf = (PHTTP_RCP_INTERFACE )pMyObject->hRcpIf;
PHTTP_BMO_REQ_OBJECT pBmoReq = (PHTTP_BMO_REQ_OBJECT )hBmoReq;
PHTTP_BMO_REP_OBJECT pBmoRep = (PHTTP_BMO_REP_OBJECT )hBmoRep;
PHTTP_REQUEST_INFO pReqInfo = (PHTTP_REQUEST_INFO )pBmoReq->GetReqInfo ((ANSC_HANDLE)pBmoReq);
PANSC_TOKEN_CHAIN pPathTokenChain = (PANSC_TOKEN_CHAIN )pBmoReq->GetRecvContext((ANSC_HANDLE)pBmoReq);
PWEB_GENERAL_SESSION_OBJECT pSession = (PWEB_GENERAL_SESSION_OBJECT)pBmoRep->GetRecvContext((ANSC_HANDLE)pBmoRep);
if ( pBwspWshIf->DoHead )
{
returnStatus =
pBwspWshIf->DoHead
(
pBwspWshIf->hOwnerContext,
(ANSC_HANDLE)pMyObject,
(ANSC_HANDLE)pBmoReq,
(ANSC_HANDLE)pBmoRep
);
}
else
{
returnStatus =
pMyObject->ReplyReq
(
(ANSC_HANDLE)pMyObject,
(ANSC_HANDLE)pBmoReq,
(ANSC_HANDLE)pBmoRep,
HTTP_STATUS_OK,
(ANSC_HANDLE)NULL
);
}
return returnStatus;
}
示例3: if
ANSC_STATUS
WebRooProcess
(
ANSC_HANDLE hThisObject,
ANSC_HANDLE hBmoReq,
ANSC_HANDLE hBmoRep
)
{
ANSC_STATUS returnStatus = ANSC_STATUS_SUCCESS;
PWEB_RESOURCE_OWNER_OBJECT pMyObject = (PWEB_RESOURCE_OWNER_OBJECT )hThisObject;
PWEB_RESOURCE_OWNER_PROPERTY pProperty = (PWEB_RESOURCE_OWNER_PROPERTY)&pMyObject->Property;
PHTTP_RCP_INTERFACE pRcpIf = (PHTTP_RCP_INTERFACE )pMyObject->hRcpIf;
PHTTP_BMO_REQ_OBJECT pBmoReq = (PHTTP_BMO_REQ_OBJECT )hBmoReq;
PHTTP_BMO_REP_OBJECT pBmoRep = (PHTTP_BMO_REP_OBJECT )hBmoRep;
PHTTP_REQUEST_INFO pReqInfo = (PHTTP_REQUEST_INFO )pBmoReq->GetReqInfo ((ANSC_HANDLE)pBmoReq);
PANSC_TOKEN_CHAIN pPathTokenChain = (PANSC_TOKEN_CHAIN )pBmoReq->GetRecvContext((ANSC_HANDLE)pBmoReq);
PWEB_GENERAL_SESSION_OBJECT pSession = (PWEB_GENERAL_SESSION_OBJECT )pBmoRep->GetRecvContext((ANSC_HANDLE)pBmoRep);
PWEB_AUTH_SERVER_OBJECT pAuthServer = (PWEB_AUTH_SERVER_OBJECT )pMyObject->hAuthServer;
BOOL bAuthenticated = TRUE;
pBmoReq->SetRcpIf ((ANSC_HANDLE)pBmoReq, (ANSC_HANDLE)pRcpIf );
pBmoRep->SetWebServlet((ANSC_HANDLE)pBmoReq, (ANSC_HANDLE)pMyObject);
if ( pReqInfo->MajorVersion != HTTP_CURRENT_MAJOR_VERSION )
{
returnStatus =
pMyObject->ReplyReq
(
(ANSC_HANDLE)pMyObject,
(ANSC_HANDLE)pBmoReq,
(ANSC_HANDLE)pBmoRep,
HTTP_STATUS_VERSION_NOT_SUPPORTED,
(ANSC_HANDLE)NULL
);
goto EXIT1;
}
if ( pAuthServer )
{
returnStatus =
pAuthServer->AuthenticateReq
(
(ANSC_HANDLE)pAuthServer,
(ANSC_HANDLE)pBmoReq,
(ANSC_HANDLE)pBmoRep
);
bAuthenticated = ( returnStatus == ANSC_STATUS_SUCCESS );
returnStatus = ANSC_STATUS_SUCCESS;
}
if ( bAuthenticated )
{
switch ( pBmoReq->GetMethod((ANSC_HANDLE)pBmoReq) )
{
case HTTP_METHOD_CODE_OPTIONS :
returnStatus =
pMyObject->DoOptions
(
(ANSC_HANDLE)pMyObject,
(ANSC_HANDLE)pBmoReq,
(ANSC_HANDLE)pBmoRep
);
break;
case HTTP_METHOD_CODE_GET :
returnStatus =
pMyObject->DoGet
(
(ANSC_HANDLE)pMyObject,
(ANSC_HANDLE)pBmoReq,
(ANSC_HANDLE)pBmoRep
);
break;
case HTTP_METHOD_CODE_HEAD :
returnStatus =
pMyObject->DoHead
(
(ANSC_HANDLE)pMyObject,
(ANSC_HANDLE)pBmoReq,
(ANSC_HANDLE)pBmoRep
);
break;
case HTTP_METHOD_CODE_POST :
returnStatus =
pMyObject->DoPost
(
(ANSC_HANDLE)pMyObject,
(ANSC_HANDLE)pBmoReq,
(ANSC_HANDLE)pBmoRep
//.........这里部分代码省略.........