tdav_consumer_t140.h 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. /*
  2. * Copyright (C) 2012 Doubango Telecom <http://www.doubango.org>
  3. *
  4. * This file is part of Open Source Doubango Framework.
  5. *
  6. * DOUBANGO is free software: you can redistribute it and/or modify
  7. * it under the terms of the GNU General Public License as published by
  8. * the Free Software Foundation, either version 3 of the License, or
  9. * (at your option) any later version.
  10. *
  11. * DOUBANGO is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. * GNU General Public License for more details.
  15. *
  16. * You should have received a copy of the GNU General Public License
  17. * along with DOUBANGO.
  18. *
  19. */
  20. /**@file tdav_consumer_t140.h
  21. * @brief Consumer for T140 protocol (RFC 4103)
  22. */
  23. #ifndef TINYDAV_CONSUMER_T140_H
  24. #define TINYDAV_CONSUMER_T140_H
  25. #include "tinydav_config.h"
  26. #include "tinymedia/tmedia_consumer.h"
  27. #include "tinymedia/tmedia_session.h"
  28. #include "tsk_safeobj.h"
  29. TDAV_BEGIN_DECLS
  30. #define TDAV_CONSUMER_T140(self) ((tdav_consumer_t140_t*)(self))
  31. typedef struct tdav_consumer_t140_s {
  32. TMEDIA_DECLARE_CONSUMER;
  33. tsk_bool_t started;
  34. struct {
  35. const void* context;
  36. tmedia_session_t140_ondata_cb_f func;
  37. } cb_ondata;
  38. TSK_DECLARE_SAFEOBJ;
  39. }
  40. tdav_consumer_t140_t;
  41. int tdav_consumer_t140_set_ondata_cbfn(tdav_consumer_t140_t* self, const void* context, tmedia_session_t140_ondata_cb_f func);
  42. TINYDAV_GEXTERN const tmedia_consumer_plugin_def_t *tdav_consumer_t140_plugin_def_t;
  43. #endif /* TINYDAV_CONSUMER_T140_H */