rt_Enums.h 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334
  1. /*Copyright (C) 2013 Doubango Telecom <http://www.doubango.org>
  2. *
  3. * This file is part of Open Source Doubango Framework.
  4. *
  5. * DOUBANGO is free software: you can redistribute it and/or modify
  6. * it under the terms of the GNU General Public License as published by
  7. * the Free Software Foundation, either version 3 of the License, or
  8. * (at your option) any later version.
  9. *
  10. * DOUBANGO is distributed in the hope that it will be useful,
  11. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. * GNU General Public License for more details.
  14. *
  15. * You should have received a copy of the GNU General Public License
  16. * along with DOUBANGO.
  17. */
  18. #pragma once
  19. #include "rt_config.h"
  20. #include "tinysip.h"
  21. #include "tinymsrp.h"
  22. #include "tinymedia.h"
  23. #include "Common.h"
  24. namespace doubango_rt
  25. {
  26. namespace BackEnd
  27. {
  28. public enum class rtConstants
  29. {
  30. rt_tsip_event_code_dialog_transport_error = tsip_event_code_dialog_transport_error,
  31. rt_tsip_event_code_dialog_global_error = tsip_event_code_dialog_global_error,
  32. rt_tsip_event_code_dialog_message_error = tsip_event_code_dialog_message_error,
  33. // 8xx ==> success
  34. rt_tsip_event_code_dialog_request_incoming = tsip_event_code_dialog_request_incoming,
  35. rt_tsip_event_code_dialog_request_outgoing = tsip_event_code_dialog_request_outgoing,
  36. rt_tsip_event_code_dialog_request_cancelled = tsip_event_code_dialog_request_cancelled,
  37. rt_tsip_event_code_dialog_request_sent = tsip_event_code_dialog_request_sent,
  38. // 9xx ==> Informational
  39. rt_tsip_event_code_dialog_connecting = tsip_event_code_dialog_connecting,
  40. rt_tsip_event_code_dialog_connected = tsip_event_code_dialog_connected,
  41. rt_tsip_event_code_dialog_terminating = tsip_event_code_dialog_terminating,
  42. rt_tsip_event_code_dialog_terminated = tsip_event_code_dialog_terminated,
  43. rt_tsip_event_code_stack_starting = tsip_event_code_stack_starting,
  44. rt_tsip_event_code_stack_started = tsip_event_code_stack_started,
  45. rt_tsip_event_code_stack_stopping = tsip_event_code_stack_stopping,
  46. rt_tsip_event_code_stack_stopped = tsip_event_code_stack_stopped,
  47. rt_tsip_event_code_stack_failed_to_start = tsip_event_code_stack_failed_to_start,
  48. rt_tsip_event_code_stack_failed_to_stop = tsip_event_code_stack_failed_to_stop
  49. };
  50. public enum class rt_twrap_media_type_t
  51. {
  52. twrap_media_none = twrap_media_none,
  53. twrap_media_audio = twrap_media_audio,
  54. twrap_media_video = twrap_media_video,
  55. twrap_media_msrp = twrap_media_msrp,
  56. twrap_media_t140 = twrap_media_t140,
  57. twrap_media_bfcp = twrap_media_bfcp,
  58. twrap_media_bfcp_audio = twrap_media_bfcp_audio,
  59. twrap_media_bfcp_video = twrap_media_bfcp_video,
  60. twrap_media_audiovideo = twrap_media_audiovideo, /* @deprecated */
  61. twrap_media_audio_video = twrap_media_audio_video,
  62. };
  63. public enum class rt_tmedia_bandwidth_level_t
  64. {
  65. tmedia_bl_low = tmedia_bl_low,
  66. tmedia_bl_medium = tmedia_bl_medium,
  67. tmedia_bl_hight = tmedia_bl_hight,
  68. tmedia_bl_unrestricted = tmedia_bl_unrestricted
  69. };
  70. public enum class rt_tmedia_pref_video_size_t
  71. {
  72. /* must be sorted like this */
  73. tmedia_pref_video_size_sqcif = tmedia_pref_video_size_sqcif, // 128 x 98
  74. tmedia_pref_video_size_qcif = tmedia_pref_video_size_qcif, // 176 x 144
  75. tmedia_pref_video_size_qvga = tmedia_pref_video_size_qvga, // 320 x 240
  76. tmedia_pref_video_size_cif = tmedia_pref_video_size_cif, // 352 x 288
  77. tmedia_pref_video_size_hvga = tmedia_pref_video_size_hvga, // 480 x 320
  78. tmedia_pref_video_size_vga = tmedia_pref_video_size_vga, // 640 x 480
  79. tmedia_pref_video_size_4cif = tmedia_pref_video_size_4cif, // 704 x 576
  80. tmedia_pref_video_size_wvga = tmedia_pref_video_size_wvga, // 800 x 480
  81. tmedia_pref_video_size_svga = tmedia_pref_video_size_svga, // 800 x 600
  82. tmedia_pref_video_size_480p = tmedia_pref_video_size_480p, // 852 x 480
  83. tmedia_pref_video_size_xga = tmedia_pref_video_size_xga, // 1024 x 768
  84. tmedia_pref_video_size_720p = tmedia_pref_video_size_720p, // 1280 x 720
  85. tmedia_pref_video_size_16cif = tmedia_pref_video_size_16cif, // 1408 x 1152
  86. tmedia_pref_video_size_1080p = tmedia_pref_video_size_1080p, // 1920 x 1080
  87. };
  88. public enum class rt_tmedia_profile_t
  89. {
  90. tmedia_profile_default = tmedia_profile_default,
  91. tmedia_profile_rtcweb = tmedia_profile_rtcweb
  92. };
  93. public enum class rt_tmedia_qos_strength_t
  94. {
  95. tmedia_qos_strength_none = tmedia_qos_strength_none,
  96. tmedia_qos_strength_failure = tmedia_qos_strength_failure,
  97. tmedia_qos_strength_unknown = tmedia_qos_strength_unknown,
  98. tmedia_qos_strength_optional = tmedia_qos_strength_optional,
  99. tmedia_qos_strength_mandatory = tmedia_qos_strength_mandatory
  100. };
  101. public enum class rt_tmedia_qos_stype_t
  102. {
  103. tmedia_qos_stype_none = tmedia_qos_stype_none,
  104. tmedia_qos_stype_segmented = tmedia_qos_stype_segmented,
  105. tmedia_qos_stype_e2e = tmedia_qos_stype_e2e,
  106. };
  107. public enum class rt_tmedia_srtp_mode_t
  108. {
  109. tmedia_srtp_mode_none = tmedia_srtp_mode_none,
  110. tmedia_srtp_mode_optional = tmedia_srtp_mode_optional,
  111. tmedia_srtp_mode_mandatory = tmedia_srtp_mode_mandatory
  112. };
  113. public enum class rt_tmedia_srtp_type_t
  114. {
  115. tmedia_srtp_type_none = tmedia_srtp_type_none,
  116. tmedia_srtp_type_sdes = tmedia_srtp_type_sdes,
  117. tmedia_srtp_type_dtls = tmedia_srtp_type_dtls,
  118. tmedia_srtp_type_sdes_dtls = tmedia_srtp_type_sdes_dtls
  119. };
  120. public enum class rt_tmedia_t140_data_type_t
  121. {
  122. tmedia_t140_data_type_utf8 = tmedia_t140_data_type_utf8,
  123. tmedia_t140_data_type_zero_width_no_break_space = tmedia_t140_data_type_zero_width_no_break_space,
  124. tmedia_t140_data_type_backspace = tmedia_t140_data_type_backspace,
  125. tmedia_t140_data_type_esc = tmedia_t140_data_type_esc,
  126. tmedia_t140_data_type_cr = tmedia_t140_data_type_cr,
  127. tmedia_t140_data_type_lf = tmedia_t140_data_type_lf,
  128. tmedia_t140_data_type_cr_lf = tmedia_t140_data_type_cr_lf,
  129. tmedia_t140_data_type_bell = tmedia_t140_data_type_bell,
  130. tmedia_t140_data_type_sos = tmedia_t140_data_type_sos,
  131. tmedia_t140_data_type_string_term = tmedia_t140_data_type_string_term,
  132. tmedia_t140_data_type_graphic_start = tmedia_t140_data_type_graphic_start,
  133. tmedia_t140_data_type_graphic_end = tmedia_t140_data_type_graphic_end,
  134. tmedia_t140_data_type_loss_char_char = tmedia_t140_data_type_loss_char_char,
  135. tmedia_t140_data_type_loss_utf8 = tmedia_t140_data_type_loss_utf8,
  136. };
  137. public enum class rt_tmedia_type_t
  138. {
  139. tmedia_none = tmedia_none,
  140. tmedia_ghost = tmedia_ghost,
  141. tmedia_audio = tmedia_audio,
  142. tmedia_video = tmedia_video,
  143. tmedia_chat = tmedia_chat,
  144. tmedia_file = tmedia_file,
  145. tmedia_t38 = tmedia_t38,
  146. tmedia_t140 = tmedia_t140,
  147. tmedia_msrp = tmedia_msrp,
  148. tmedia_audiovideo = tmedia_audiovideo,
  149. tmedia_all = tmedia_all
  150. };
  151. public enum class rt_tmsrp_event_type_t
  152. {
  153. tmsrp_event_type_none = tmsrp_event_type_none,
  154. tmsrp_event_type_connected = tmsrp_event_type_connected,
  155. tmsrp_event_type_disconnected = tmsrp_event_type_disconnected,
  156. tmsrp_event_type_message = tmsrp_event_type_message,
  157. };
  158. public enum class rt_tmsrp_request_type_t
  159. {
  160. tmsrp_NONE = tmsrp_NONE,
  161. tmsrp_SEND = tmsrp_SEND,
  162. tmsrp_REPORT = tmsrp_REPORT,
  163. tmsrp_AUTH = tmsrp_AUTH
  164. };
  165. public enum class rt_tsip_info_event_type_t
  166. {
  167. tsip_i_info = tsip_i_info,
  168. tsip_ao_info = tsip_ao_info,
  169. };
  170. public enum class rt_tsip_invite_event_type_t
  171. {
  172. tsip_i_newcall = tsip_i_newcall,
  173. tsip_i_request = tsip_i_request,
  174. tsip_ao_request = tsip_ao_request,
  175. tsip_o_ect_trying = tsip_o_ect_trying,
  176. tsip_o_ect_accepted = tsip_o_ect_accepted,
  177. tsip_o_ect_completed = tsip_o_ect_completed,
  178. tsip_o_ect_failed = tsip_o_ect_failed,
  179. tsip_o_ect_notify = tsip_o_ect_notify,
  180. tsip_i_ect_requested = tsip_i_ect_requested,
  181. tsip_i_ect_newcall = tsip_i_ect_newcall,
  182. tsip_i_ect_completed = tsip_i_ect_completed,
  183. tsip_i_ect_failed = tsip_i_ect_failed,
  184. tsip_i_ect_notify = tsip_i_ect_notify,
  185. tsip_m_early_media = tsip_m_early_media,
  186. tsip_m_updating = tsip_m_updating,
  187. tsip_m_updated = tsip_m_updated,
  188. tsip_m_local_hold_ok = tsip_m_local_hold_ok,
  189. tsip_m_local_hold_nok = tsip_m_local_hold_nok,
  190. tsip_m_local_resume_ok = tsip_m_local_resume_ok,
  191. tsip_m_local_resume_nok = tsip_m_local_resume_nok,
  192. tsip_m_remote_hold = tsip_m_remote_hold,
  193. tsip_m_remote_resume = tsip_m_remote_resume,
  194. };
  195. public enum class rt_tsip_message_event_type_t
  196. {
  197. tsip_i_message = tsip_i_message,
  198. tsip_ao_message = tsip_ao_message,
  199. };
  200. public enum class rt_tsip_options_event_type_t
  201. {
  202. tsip_i_options = tsip_i_options,
  203. tsip_ao_options = tsip_ao_options,
  204. };
  205. public enum class rt_tsip_publish_event_type_t
  206. {
  207. tsip_i_publish = tsip_i_publish,
  208. tsip_ao_publish = tsip_ao_publish,
  209. tsip_i_unpublish = tsip_i_unpublish,
  210. tsip_ao_unpublish = tsip_ao_unpublish
  211. };
  212. public enum class rt_tsip_register_event_type_t
  213. {
  214. tsip_i_newreg = tsip_i_newreg,
  215. tsip_i_register = tsip_i_register,
  216. tsip_ao_register = tsip_ao_register,
  217. tsip_i_unregister = tsip_i_unregister,
  218. tsip_ao_unregister = tsip_ao_unregister,
  219. };
  220. public enum class rt_tsip_request_type_t
  221. {
  222. tsip_NONE = tsip_NONE,
  223. tsip_ACK = tsip_ACK,
  224. tsip_BYE = tsip_BYE,
  225. tsip_CANCEL = tsip_CANCEL,
  226. tsip_INVITE = tsip_INVITE,
  227. tsip_OPTIONS = tsip_OPTIONS,
  228. tsip_REGISTER = tsip_REGISTER,
  229. tsip_SUBSCRIBE = tsip_SUBSCRIBE,
  230. tsip_NOTIFY = tsip_NOTIFY,
  231. tsip_REFER = tsip_REFER,
  232. tsip_INFO = tsip_INFO,
  233. tsip_UPDATE = tsip_UPDATE,
  234. tsip_MESSAGE = tsip_MESSAGE,
  235. tsip_PUBLISH = tsip_PUBLISH,
  236. tsip_PRACK = tsip_PRACK
  237. };
  238. public enum class rt_tsip_subscribe_event_type_t
  239. {
  240. tsip_i_subscribe = tsip_i_subscribe,
  241. tsip_ao_subscribe = tsip_ao_subscribe,
  242. tsip_i_unsubscribe = tsip_i_unsubscribe,
  243. tsip_ao_unsubscribe = tsip_ao_unsubscribe,
  244. tsip_i_notify = tsip_i_notify,
  245. tsip_ao_notify = tsip_ao_notify
  246. };
  247. public enum class rt_tdav_codec_id_t
  248. {
  249. tdav_codec_id_none = tmedia_codec_id_none,
  250. tdav_codec_id_amr_nb_oa = tmedia_codec_id_amr_nb_oa,
  251. tdav_codec_id_amr_nb_be = tmedia_codec_id_amr_nb_be,
  252. tdav_codec_id_amr_wb_oa = tmedia_codec_id_amr_wb_oa,
  253. tdav_codec_id_amr_wb_be = tmedia_codec_id_amr_wb_be,
  254. tdav_codec_id_gsm = tmedia_codec_id_gsm,
  255. tdav_codec_id_pcma = tmedia_codec_id_pcma,
  256. tdav_codec_id_pcmu = tmedia_codec_id_pcmu,
  257. tdav_codec_id_ilbc = tmedia_codec_id_ilbc,
  258. tdav_codec_id_speex_nb = tmedia_codec_id_speex_nb,
  259. tdav_codec_id_speex_wb = tmedia_codec_id_speex_wb,
  260. tdav_codec_id_speex_uwb = tmedia_codec_id_speex_uwb,
  261. tdav_codec_id_bv16 = tmedia_codec_id_bv16,
  262. tdav_codec_id_bv32 = tmedia_codec_id_bv32,
  263. tdav_codec_id_opus = tmedia_codec_id_opus,
  264. tdav_codec_id_g729ab = tmedia_codec_id_g729ab,
  265. tdav_codec_id_g722 = tmedia_codec_id_g722,
  266. tdav_codec_id_h261 = tmedia_codec_id_h261,
  267. tdav_codec_id_h263 = tmedia_codec_id_h263,
  268. tdav_codec_id_h263p = tmedia_codec_id_h263p,
  269. tdav_codec_id_h263pp = tmedia_codec_id_h263pp,
  270. tdav_codec_id_h264_bp = tmedia_codec_id_h264_bp,
  271. tdav_codec_id_h264_mp = tmedia_codec_id_h264_mp,
  272. tdav_codec_id_h264_hp = tmedia_codec_id_h264_hp,
  273. tdav_codec_id_h264_bp10 = tmedia_codec_id_h264_bp, // @deprecated
  274. tdav_codec_id_h264_bp20 = tmedia_codec_id_h264_bp, // @deprecated
  275. tdav_codec_id_h264_bp30 = tmedia_codec_id_h264_bp, // @deprecated
  276. tdav_codec_id_h264_svc = tmedia_codec_id_h264_svc,
  277. tdav_codec_id_theora = tmedia_codec_id_theora,
  278. tdav_codec_id_mp4ves_es = tmedia_codec_id_mp4ves_es,
  279. tdav_codec_id_vp8 = tmedia_codec_id_vp8,
  280. tdav_codec_id_t140 = tmedia_codec_id_t140,
  281. #if !COM_VISIBLE
  282. tdav_codec_id_red = tmedia_codec_id_red,
  283. #endif
  284. tdav_codec_id_all = tmedia_codec_id_all,
  285. };
  286. }
  287. }