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.
 
 
 
 
 
 

111 lines
1.9 KiB

#ifndef _W3HANDLER_HXX_
#define _W3HANDLER_HXX_
class W3_HANDLER
{
public:
W3_HANDLER( W3_CONTEXT * pW3Context,
META_SCRIPT_MAP_ENTRY * pScriptMapEntry = NULL )
{
DBG_ASSERT( pW3Context != NULL );
_pW3Context = pW3Context;
_pScriptMapEntry = pScriptMapEntry;
}
virtual ~W3_HANDLER()
{
}
virtual
WCHAR *
QueryName(
VOID
) = 0;
virtual
BOOL
QueryIsUlCacheable(
VOID
)
{
return FALSE;
}
virtual
BOOL
QueryManagesOwnHead(
VOID
)
{
return FALSE;
}
virtual
HRESULT
SetupUlCachedResponse(
W3_CONTEXT *,
HTTP_CACHE_POLICY *
)
{
return HRESULT_FROM_WIN32(ERROR_NOT_SUPPORTED);
}
virtual
CONTEXT_STATUS
DoWork(
VOID
) = 0;
virtual
CONTEXT_STATUS
OnCompletion(
DWORD,
DWORD
)
{
return CONTEXT_STATUS_CONTINUE;
}
//
// Non-virtual member functions
//
CONTEXT_STATUS
MainDoWork(
VOID
);
CONTEXT_STATUS
MainOnCompletion(
DWORD cbCompletion,
DWORD dwCompletionStatus
);
W3_CONTEXT *
QueryW3Context(
VOID
) const
{
return _pW3Context;
}
META_SCRIPT_MAP_ENTRY *
QueryScriptMapEntry(
VOID
) const
{
return _pScriptMapEntry;
}
private:
W3_CONTEXT * _pW3Context;
META_SCRIPT_MAP_ENTRY * _pScriptMapEntry;
};
#define IS_ACCESS_ALLOWED(pRequest, dwFilePerms, op) \
((dwFilePerms & VROOT_MASK_## op) && \
((!(dwFilePerms & VROOT_MASK_NO_REMOTE_## op)) || \
pRequest->IsLocalRequest()))
#endif