tmedia_content_cpim.h 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  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 tmedia_content_cpim.h
  23. * @brief Common Presence and Instant Messaging (CPIM): Message Format (RFC 3862)
  24. *
  25. * @author Mamadou Diop <diopmamadou(at)doubango[dot]org>
  26. *
  27. */
  28. #ifndef TINYMEDIA_CONTENT_CPIM_H
  29. #define TINYMEDIA_CONTENT_CPIM_H
  30. #include "tinymedia_config.h"
  31. #include "tmedia_content.h"
  32. TMEDIA_BEGIN_DECLS
  33. #define TMEDIA_CONTENT_CPIM_TYPE "message/CPIM"
  34. /** message/CPIM content */
  35. typedef struct tmedia_content_cpim_s {
  36. TMEDIA_DECLARE_CONTENT;
  37. tmedia_content_headers_L_t* m_headers; /**< MIME headers for the overall message */
  38. tmedia_content_headers_L_t* h_headers; /**< message headers */
  39. tsk_buffer_t* e; /**< encapsulated MIME object containing the message content */
  40. tsk_buffer_t* x; /**< MIME security multipart message wrapper */
  41. }
  42. tmedia_content_cpim_t;
  43. #define TMEDIA_CONTENT_CPIM(self) ((tmedia_content_cpim_t*)(self))
  44. #define TMEDIA_CONTENT_IS_CPIM(self) ( (self) && (TMEDIA_CONTENT((self))->plugin==tmedia_content_cpim_plugin_def_t) )
  45. TINYMEDIA_GEXTERN const tmedia_content_plugin_def_t *tmedia_content_cpim_plugin_def_t;
  46. TMEDIA_END_DECLS
  47. #endif /* TINYMEDIA_CONTENT_CPIM_H */