tsdp_header_T.h 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  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_T.h
  23. * @brief SDP "t=" header (Timing).
  24. *
  25. * @author Mamadou Diop <diopmamadou(at)doubango[dot]org>
  26. *
  27. *
  28. */
  29. #ifndef _TSDP_HEADER_T_H_
  30. #define _TSDP_HEADER_T_H_
  31. #include "tinysdp_config.h"
  32. #include "tinysdp/headers/tsdp_header.h"
  33. #include "tinysdp/headers/tsdp_header_R.h"
  34. TSDP_BEGIN_DECLS
  35. #define TSDP_HEADER_T_VA_ARGS(start, stop) tsdp_header_T_def_t, (uint64_t)start, (uint64_t)stop
  36. ////////////////////////////////////////////////////////////////////////////////////////////////////
  37. /// @struct
  38. ///
  39. /// @brief SDP "t=" header (Timing).
  40. /// The "t=" lines specify the start and stop times for a session.
  41. /// Multiple "t=" lines MAY be used if a session is active at multiple
  42. /// irregularly spaced times; each additional "t=" line specifies an
  43. /// additional period of time for which the session will be active. If
  44. /// the session is active at regular times, an "r=" line (see below)
  45. /// should be used in addition to, and following, a "t=" line -- in which
  46. /// case the "t=" line specifies the start and stop times of the repeat
  47. /// sequence.
  48. ///
  49. ///
  50. /// @par ABNF : t= start-time SP stop-time *( CRLF repeat-fields )
  51. ///
  52. ////////////////////////////////////////////////////////////////////////////////////////////////////
  53. typedef struct tsdp_header_T_s {
  54. TSDP_DECLARE_HEADER;
  55. uint64_t start;
  56. uint64_t stop;
  57. tsdp_headers_R_L_t* repeat_fields;
  58. }
  59. tsdp_header_T_t;
  60. typedef tsk_list_t tsdp_headers_T_L_t;
  61. TINYSDP_API tsdp_header_T_t* tsdp_header_T_create(uint64_t start, uint64_t stop);
  62. TINYSDP_API tsdp_header_T_t* tsdp_header_T_create_null();
  63. TINYSDP_API tsdp_header_T_t *tsdp_header_T_parse(const char *data, tsk_size_t size);
  64. TINYSDP_GEXTERN const tsk_object_def_t *tsdp_header_T_def_t;
  65. TSDP_END_DECLS
  66. #endif /* _TSDP_HEADER_P_H_ */