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.
 
 
 
 
 
 

104 lines
2.3 KiB

//reqfail.h
//Sends an error response denoted by the statusCode
#ifndef __sipcli_reqfail_h__
#define __sipcli_reqfail_h__
#include "sipcall.h"
class REQFAIL_MSGPROC;
class INCOMING_REQFAIL_TRANSACTION : public INCOMING_TRANSACTION
{
public:
INCOMING_REQFAIL_TRANSACTION(
IN SIP_MSG_PROCESSOR *pSipMsgProc,
IN SIP_METHOD_ENUM MethodId,
IN ULONG CSeq,
IN ULONG StatusCode
);
~INCOMING_REQFAIL_TRANSACTION();
HRESULT SetMethodStr(
IN PSTR MethodStr,
IN ULONG MethodStrLen
);
HRESULT ProcessRequest(
IN SIP_MESSAGE *pSipMsg,
IN ASYNC_SOCKET *pResponseSocket
);
HRESULT ProcessRequest(
IN SIP_MESSAGE *pSipMsg,
IN ASYNC_SOCKET *pResponseSocket,
IN SIP_HEADER_ARRAY_ELEMENT *pAdditionalHeaderArray,
IN ULONG AdditionalHeaderCount
);
// HRESULT SendResponse(
// IN ULONG StatusCode,
// IN PSTR ReasonPhrase,
// IN ULONG ReasonPhraseLen
// );
VOID OnTimerExpire();
HRESULT RetransmitResponse();
private:
ULONG m_StatusCode;
// In case the method is not known
PSTR m_MethodStr;
//virtual fn
HRESULT TerminateTransactionOnByeOrCancel(
OUT BOOL *pCallDisconnected
);
};
// This class processes error messages (400 class)
class REQFAIL_MSGPROC :
public SIP_MSG_PROCESSOR
{
public:
REQFAIL_MSGPROC(
IN SIP_STACK *pSipStack
);
~REQFAIL_MSGPROC();
STDMETHODIMP_(ULONG) AddRef();
STDMETHODIMP_(ULONG) Release();
BOOL IsSessionDisconnected();
HRESULT StartIncomingCall(
IN SIP_TRANSPORT Transport,
IN SIP_MESSAGE *pSipMsg,
IN ASYNC_SOCKET *pResponseSocket,
IN ULONG StatusCode,
SIP_HEADER_ARRAY_ELEMENT *pAdditionalHeaderArray = NULL,
ULONG AdditionalHeaderCount = 0
);
private:
//Variables
ULONG m_StatusCode;
//Virtual fns
HRESULT CreateIncomingTransaction(
IN SIP_MESSAGE *pSipMsg,
IN ASYNC_SOCKET *pResponseSocket
);
VOID OnError();
};
#endif // __sipcli_reqfail_h__