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

  1. //reqfail.h
  2. //Sends an error response denoted by the statusCode
  3. #ifndef __sipcli_reqfail_h__
  4. #define __sipcli_reqfail_h__
  5. #include "sipcall.h"
  6. class REQFAIL_MSGPROC;
  7. class INCOMING_REQFAIL_TRANSACTION : public INCOMING_TRANSACTION
  8. {
  9. public:
  10. INCOMING_REQFAIL_TRANSACTION(
  11. IN SIP_MSG_PROCESSOR *pSipMsgProc,
  12. IN SIP_METHOD_ENUM MethodId,
  13. IN ULONG CSeq,
  14. IN ULONG StatusCode
  15. );
  16. ~INCOMING_REQFAIL_TRANSACTION();
  17. HRESULT SetMethodStr(
  18. IN PSTR MethodStr,
  19. IN ULONG MethodStrLen
  20. );
  21. HRESULT ProcessRequest(
  22. IN SIP_MESSAGE *pSipMsg,
  23. IN ASYNC_SOCKET *pResponseSocket
  24. );
  25. HRESULT ProcessRequest(
  26. IN SIP_MESSAGE *pSipMsg,
  27. IN ASYNC_SOCKET *pResponseSocket,
  28. IN SIP_HEADER_ARRAY_ELEMENT *pAdditionalHeaderArray,
  29. IN ULONG AdditionalHeaderCount
  30. );
  31. // HRESULT SendResponse(
  32. // IN ULONG StatusCode,
  33. // IN PSTR ReasonPhrase,
  34. // IN ULONG ReasonPhraseLen
  35. // );
  36. VOID OnTimerExpire();
  37. HRESULT RetransmitResponse();
  38. private:
  39. ULONG m_StatusCode;
  40. // In case the method is not known
  41. PSTR m_MethodStr;
  42. //virtual fn
  43. HRESULT TerminateTransactionOnByeOrCancel(
  44. OUT BOOL *pCallDisconnected
  45. );
  46. };
  47. // This class processes error messages (400 class)
  48. class REQFAIL_MSGPROC :
  49. public SIP_MSG_PROCESSOR
  50. {
  51. public:
  52. REQFAIL_MSGPROC(
  53. IN SIP_STACK *pSipStack
  54. );
  55. ~REQFAIL_MSGPROC();
  56. STDMETHODIMP_(ULONG) AddRef();
  57. STDMETHODIMP_(ULONG) Release();
  58. BOOL IsSessionDisconnected();
  59. HRESULT StartIncomingCall(
  60. IN SIP_TRANSPORT Transport,
  61. IN SIP_MESSAGE *pSipMsg,
  62. IN ASYNC_SOCKET *pResponseSocket,
  63. IN ULONG StatusCode,
  64. SIP_HEADER_ARRAY_ELEMENT *pAdditionalHeaderArray = NULL,
  65. ULONG AdditionalHeaderCount = 0
  66. );
  67. private:
  68. //Variables
  69. ULONG m_StatusCode;
  70. //Virtual fns
  71. HRESULT CreateIncomingTransaction(
  72. IN SIP_MESSAGE *pSipMsg,
  73. IN ASYNC_SOCKET *pResponseSocket
  74. );
  75. VOID OnError();
  76. };
  77. #endif // __sipcli_reqfail_h__