voice-cmtspeech.h 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. #ifndef VOICECMTSPEECH_H
  2. #define VOICECMTSPEECH_H
  3. #include "dbus/dbus.h"
  4. #include "pulsecore/dbus-shared.h"
  5. struct cmtspeech_dbus_conn
  6. {
  7. DBusBusType dbus_type;
  8. pa_dbus_connection *dbus_conn;
  9. char *dbus_match_rules[32];
  10. };
  11. struct cmtspeech_connection
  12. {
  13. pa_msgobject *cmt_handler;
  14. pa_atomic_t thread_state;
  15. pa_fdsem *thread_state_change;
  16. void *cmtspeech;
  17. pa_mutex *unk_mutex;
  18. pa_semaphore *cmtspeech_semaphore;
  19. void *cmtspeech_ctx;
  20. pa_mutex *cmtspeech_mutex;
  21. pa_rtpoll *rtpoll;
  22. pa_rtpoll_item *cmt_poll_item;
  23. pa_rtpoll_item *thread_state_poll_item;
  24. pa_thread *thread;
  25. pa_thread_mq thread_mq;
  26. pa_asyncq *dl_frame_queue;
  27. pa_bool_t call_ul;
  28. pa_bool_t call_dl;
  29. pa_bool_t call_emergency;
  30. int8_t first_dl_frame_received;
  31. int8_t record_running;
  32. int8_t playback_running;
  33. int8_t unk1_running;
  34. int8_t unk2_running;
  35. int8_t unk3_running;
  36. };
  37. #define CMTSPEECH_DBUS_CSCALL_CONNECT_IF "com.nokia.csd.Call.Instance"
  38. #define CMTSPEECH_DBUS_CSCALL_CONNECT_SIG "AudioConnect"
  39. #define CMTSPEECH_DBUS_CSCALL_STATUS_IF "com.nokia.csd.Call"
  40. #define CMTSPEECH_DBUS_CSCALL_STATUS_SIG "ServerStatus"
  41. #define CMTSPEECH_DBUS_PHONE_SSC_STATE_IF "com.nokia.phone.SSC"
  42. #define CMTSPEECH_DBUS_PHONE_SSC_STATE_SIG "modem_state_changed_ind"
  43. enum {
  44. CMTSPEECH_HANDLER_CLOSE_CONNECTION,
  45. };
  46. DBusHandlerResult voice_cmt_dbus_filter(DBusConnection *conn, DBusMessage *msg, void *arg);
  47. #endif // VOICECMTSPEECH_H