rt_SipMessage.h 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. /*Copyright (C) 2013 Doubango Telecom <http://www.doubango.org>
  2. *
  3. * This file is part of Open Source Doubango Framework.
  4. *
  5. * DOUBANGO is free software: you can redistribute it and/or modify
  6. * it under the terms of the GNU General Public License as published by
  7. * the Free Software Foundation, either version 3 of the License, or
  8. * (at your option) any later version.
  9. *
  10. * DOUBANGO is distributed in the hope that it will be useful,
  11. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. * GNU General Public License for more details.
  14. *
  15. * You should have received a copy of the GNU General Public License
  16. * along with DOUBANGO.
  17. */
  18. #pragma once
  19. #include "rt_Enums.h"
  20. class SdpMessage;
  21. class SipMessage;
  22. struct tsdp_message_s;
  23. struct tsip_message_s;
  24. namespace doubango_rt
  25. {
  26. namespace BackEnd
  27. {
  28. public ref class rtSdpMessage sealed
  29. {
  30. internal:
  31. rtSdpMessage();
  32. rtSdpMessage(struct tsdp_message_s *message);
  33. public:
  34. virtual ~rtSdpMessage();
  35. public:
  36. Platform::String^ getSdpHeaderValue(Platform::String^ media, Platform::String^ name, unsigned index);
  37. Platform::String^ getSdpHeaderValue(Platform::String^ media, Platform::String^ name);
  38. Platform::String^ getSdpHeaderAValue(Platform::String^ media, Platform::String^ attributeName);
  39. private:
  40. SdpMessage* m_pSdpMessage;
  41. };
  42. public ref class rtSipMessage sealed
  43. {
  44. internal:
  45. rtSipMessage();
  46. rtSipMessage(struct tsip_message_s* message);
  47. public:
  48. virtual ~rtSipMessage();
  49. public:
  50. bool isResponse();
  51. rt_tsip_request_type_t getRequestType();
  52. short getResponseCode();
  53. Platform::String^ getResponsePhrase();
  54. Platform::String^ getSipHeaderValue(Platform::String^ name, unsigned index);
  55. Platform::String^ getSipHeaderValue(Platform::String^ name);
  56. Platform::String^ getSipHeaderParamValue(Platform::String^ name, Platform::String^ param, unsigned index);
  57. Platform::String^ getSipHeaderParamValue(Platform::String^ name, Platform::String^ param);
  58. unsigned getSipContentLength();
  59. #if COM_VISIBLE
  60. Platform::String^ getSipContent();
  61. #else
  62. unsigned getSipContent(Platform::IntPtr output, unsigned maxsize);
  63. #endif
  64. rtSdpMessage^ getSdpMessage();
  65. private:
  66. SipMessage* m_pSipMessage;
  67. };
  68. }
  69. }