ql_api_volte.h 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206
  1. /*============================================================================
  2. Copyright (c) 2020 Quectel Wireless Solution, Co., Ltd. All Rights Reserved.
  3. Quectel Wireless Solution Proprietary and Confidential.
  4. =============================================================================*/
  5. /*===========================================================================
  6. EDIT HISTORY FOR MODULE
  7. This section contains comments describing changes made to the module.
  8. Notice that changes are listed in reverse chronological order.
  9. WHEN WHO WHAT, WHERE, WHY
  10. ---------- ------------ ----------------------------------------------------
  11. marvin create
  12. =============================================================================*/
  13. #ifndef QL_API_VOLTE_H
  14. #define QL_API_VOLTE_H
  15. #include <stdint.h>
  16. #include <stdbool.h>
  17. #include "ql_api_common.h"
  18. #include "ql_api_osi.h"
  19. #ifdef __cplusplus
  20. extern "C" {
  21. #endif
  22. /*========================================================================
  23. * Marco Definition
  24. *========================================================================*/
  25. #define QL_VOLTE_LOG(msg, ...) QL_LOG_TAG(QL_LOG_LEVEL_INFO, QL_LOG_TAG_QVOLTE,"ql_volte", msg, ##__VA_ARGS__)
  26. /*========================================================================
  27. * Enumeration Definition
  28. *========================================================================*/
  29. typedef enum
  30. {
  31. QL_VOLTE_SUCCESS = 0,
  32. QL_VOLTE_ERROR = 1 | (QL_COMPONENT_IMS << 16),
  33. QL_VOLTE_PARA_ERR,
  34. }ql_volte_errcode_e;
  35. typedef struct
  36. {
  37. uint8_t volte_en; /* disable or enable VOLTE */
  38. uint8_t reg_info; /* register state, no set */
  39. uint8_t ext_info; /* IMS capability, no set */
  40. uint8_t vdp; /* voice domain preference */
  41. uint8_t usage; /* usage of the UE */
  42. } ql_volte_ctx_t;
  43. /*****************************************************************
  44. * Function: ql_voice_call_volte_set
  45. *
  46. * Description:
  47. * Disable or enable VOLTE.
  48. *
  49. * Parameters:
  50. * nSim [in] Index of Sim, range:0-1.
  51. * mode [in] 0:Disable VOLTE; 1:Enable VOLTE
  52. *
  53. * Return:ql_volte_errcode_e
  54. *****************************************************************/
  55. ql_volte_errcode_e ql_volte_set(uint8_t nSim, uint8_t mode);
  56. /*****************************************************************
  57. * Function: ql_voice_call_volte_get
  58. *
  59. * Description:
  60. * get VoLTE status
  61. *
  62. * Parameters:
  63. * nSim [in] Index of Sim, range:0-1.
  64. * mode [out] 0:Disable VOLTE; 1:Enable VOLTE
  65. *
  66. * Return:ql_volte_errcode_e
  67. *****************************************************************/
  68. ql_volte_errcode_e ql_volte_get(uint8_t nSim, uint8_t *mode);
  69. /*****************************************************************
  70. * Function: ql_volte_vdp_set
  71. *
  72. * Description:
  73. * set the specified voice domain preference
  74. *
  75. * Parameters:
  76. * nSim [in] Index of Sim, range:0-1.
  77. * setting [in] :
  78. * 1 CS Voice only
  79. * 2 CS Voice preferred, IMS PS Voice as secondary
  80. * 3 IMS PS Voice preferred, CS Voice as secondary
  81. * 4 IMS PS Voice only
  82. *
  83. * Return:ql_volte_errcode_e
  84. *****************************************************************/
  85. ql_volte_errcode_e ql_volte_vdp_set(uint8_t nSim, uint8_t setting);
  86. /*****************************************************************
  87. * Function: ql_volte_vdp_get
  88. *
  89. * Description:
  90. * get the specified voice domain preference
  91. *
  92. * Parameters:
  93. * Parameters:
  94. * nSim [in] Index of Sim, range:0-1.
  95. * setting [out] :
  96. * 1 CS Voice only
  97. * 2 CS Voice preferred, IMS PS Voice as secondary
  98. * 3 IMS PS Voice preferred, CS Voice as secondary
  99. * 4 IMS PS Voice only
  100. *
  101. * Return:ql_volte_errcode_e
  102. *****************************************************************/
  103. ql_volte_errcode_e ql_volte_vdp_get(uint8_t nSim, uint8_t *setting);
  104. /*****************************************************************
  105. * Function: ql_volte_usage_set
  106. *
  107. * Description:
  108. * set the usage of the UE
  109. *
  110. * Parameters:
  111. * nSim [in] Index of Sim, range:0-1.
  112. * setting [in] 0:voice centric 1:data centric
  113. *
  114. * Return:ql_volte_errcode_e
  115. *****************************************************************/
  116. ql_volte_errcode_e ql_volte_usage_set(uint8_t nSim, uint8_t setting);
  117. /*****************************************************************
  118. * Function: ql_volte_usage_get
  119. *
  120. * Description:
  121. * get the usage of the UE
  122. *
  123. * Parameters:
  124. * nSim [in] Index of Sim, range:0-1.
  125. * setting [out] 0:voice centric 1:data centric
  126. *
  127. * Return:ql_volte_errcode_e
  128. *****************************************************************/
  129. ql_volte_errcode_e ql_volte_usage_get(uint8_t nSim, uint8_t *setting);
  130. /*****************************************************************
  131. * Function: ql_volte_ctx_set
  132. *
  133. * Description:
  134. * set VOLTE context info.
  135. *
  136. * Parameters:
  137. * nSim [in] Index of Sim, range:0-1.
  138. * volte_ctx [in]
  139. * volte_en: disable or enable VOLTE
  140. * vdp: voice domain preference
  141. * usage: usage of the UE
  142. *
  143. * Return:ql_volte_errcode_e
  144. *****************************************************************/
  145. ql_volte_errcode_e ql_volte_ctx_set(uint8_t nSim, ql_volte_ctx_t *volte_ctx);
  146. /*****************************************************************
  147. * Function: ql_volte_ctx_get
  148. *
  149. * Description:
  150. * get VOLTE context info.
  151. *
  152. * Parameters:
  153. * nSim [in] Index of Sim, range:0-1.
  154. * volte_ctx [out]
  155. * volte_en: disable or enable VOLTE
  156. * reg_info:
  157. * 0 not registered
  158. * 1 registered
  159. * ext_info:
  160. * 1 RTP-based transfer of voice according to MMTEL
  161. * 2 RTP-based transfer of text according to MMTEL
  162. * 4 SMS using IMS functionality
  163. * 8 RTP-based transfer of video according to MMTEL
  164. * vdp: voice domain preference
  165. * usage: usage of the UE
  166. *
  167. * Return:ql_volte_errcode_e
  168. *****************************************************************/
  169. ql_volte_errcode_e ql_volte_ctx_get(uint8_t nSim, ql_volte_ctx_t *volte_ctx);
  170. #ifdef __cplusplus
  171. }/*"C" */
  172. #endif
  173. #endif