Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

130 lines
2.7 KiB

#ifndef _URLCONTEXT_HXX_
#define _URLCONTEXT_HXX_
class URL_CONTEXT
{
private:
W3_METADATA * _pMetaData;
W3_URL_INFO * _pUrlInfo;
//
// Physical path stored here in case of a SF_NOTIFY_URL_MAP filter
//
STRU _strPhysicalPath;
public:
URL_CONTEXT(
W3_METADATA * pMetaData,
W3_URL_INFO * pUrlInfo
)
{
_pMetaData = pMetaData;
_pUrlInfo = pUrlInfo;
}
~URL_CONTEXT()
{
if( _pUrlInfo )
{
_pUrlInfo->DereferenceCacheEntry();
_pUrlInfo = NULL;
}
}
VOID *
operator new(
size_t uiSize,
VOID * pPlacement
)
{
W3_CONTEXT * pContext;
pContext = (W3_CONTEXT*) pPlacement;
DBG_ASSERT( pContext != NULL );
DBG_ASSERT( pContext->CheckSignature() );
return pContext->ContextAlloc( (UINT)uiSize );
}
VOID
operator delete(
VOID *
)
{
}
W3_METADATA *
QueryMetaData(
VOID
) const
{
return _pMetaData;
}
W3_URL_INFO *
QueryUrlInfo(
VOID
) const
{
return _pUrlInfo;
}
STRU*
QueryPhysicalPath(
VOID
)
{
if ( _strPhysicalPath.QueryCCH() )
{
// From SF_NOTIFY_URL_MAP filter
return &_strPhysicalPath;
}
else
{
// If no filter
DBG_ASSERT( _pUrlInfo != NULL );
return _pUrlInfo->QueryPhysicalPath();
}
}
HRESULT
OpenFile(
CACHE_USER * pOpeningUser,
W3_FILE_INFO ** ppOpenFile,
FILE_CACHE_ASYNC_CONTEXT * pAsyncContext = NULL,
BOOL * pfHandledSync = NULL,
BOOL fAllowNoBuffering = FALSE,
BOOL fCheckForExistenceOnly = FALSE
);
HRESULT
SetPhysicalPath(
STRU &strPath
)
{
return _strPhysicalPath.Copy( strPath );
}
static
HRESULT
RetrieveUrlContext(
W3_CONTEXT * pContext,
W3_REQUEST * pRequest,
OUT URL_CONTEXT ** ppUrlContext,
BOOL * pfFinished,
BOOL fSetInW3Context = FALSE
);
static
HRESULT
Initialize(
VOID
);
static
VOID
Terminate(
VOID
);
};
#endif