tsdp_header_C.h 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. /*
  2. * Copyright (C) 2010-2011 Mamadou Diop.
  3. *
  4. * Contact: Mamadou Diop <diopmamadou(at)doubango[dot]org>
  5. *
  6. * This file is part of Open Source Doubango Framework.
  7. *
  8. * DOUBANGO is free software: you can redistribute it and/or modify
  9. * it under the terms of the GNU General Public License as published by
  10. * the Free Software Foundation, either version 3 of the License, or
  11. * (at your option) any later version.
  12. *
  13. * DOUBANGO is distributed in the hope that it will be useful,
  14. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  16. * GNU General Public License for more details.
  17. *
  18. * You should have received a copy of the GNU General Public License
  19. * along with DOUBANGO.
  20. *
  21. */
  22. /**@file tsdp_header_C.h
  23. * @brief SDP "c=" header (Connection Data).
  24. *
  25. * @author Mamadou Diop <diopmamadou(at)doubango[dot]org>
  26. *
  27. *
  28. */
  29. #ifndef _TSDP_HEADER_C_H_
  30. #define _TSDP_HEADER_C_H_
  31. #include "tinysdp_config.h"
  32. #include "tinysdp/headers/tsdp_header.h"
  33. TSDP_BEGIN_DECLS
  34. #define TSDP_HEADER_C_VA_ARGS(nettype, addrtype, addr) tsdp_header_C_def_t, (const char*)(nettype), (const char*)(addrtype), (const char*)(addr)
  35. ////////////////////////////////////////////////////////////////////////////////////////////////////
  36. /// @struct
  37. ///
  38. /// @brief SDP "c=" header (Connection Data).
  39. /// A session description MUST contain either at least one "c=" field in
  40. /// each media description or a single "c=" field at the session level.
  41. /// It MAY contain a single session-level "c=" field and additional "c="
  42. /// field(s) per media description, in which case the per-media values
  43. /// override the session-level settings for the respective media.
  44. ///
  45. ///
  46. ///
  47. /// @par ABNF : c= nettype SP addrtype SP connection-address
  48. ///
  49. ////////////////////////////////////////////////////////////////////////////////////////////////////
  50. typedef struct tsdp_header_C_s {
  51. TSDP_DECLARE_HEADER;
  52. char* nettype;
  53. char* addrtype;
  54. char* addr;
  55. }
  56. tsdp_header_C_t;
  57. typedef tsk_list_t tsdp_headers_C_L_t;
  58. TINYSDP_API tsdp_header_C_t* tsdp_header_c_create(const char* nettype, const char* addrtype, const char* addr);
  59. TINYSDP_API tsdp_header_C_t* tsdp_header_c_create_null();
  60. TINYSDP_API tsdp_header_C_t *tsdp_header_C_parse(const char *data, tsk_size_t size);
  61. TINYSDP_GEXTERN const tsk_object_def_t *tsdp_header_C_def_t;
  62. TSDP_END_DECLS
  63. #endif /* _TSDP_HEADER_C_H_ */