ql_api_stk.h 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597
  1. /** @file
  2. ql_api_stk.h
  3. @brief
  4. This file is used to define stk api for different Quectel Project.
  5. */
  6. /*================================================================
  7. Copyright (c) 2020 Quectel Wireless Solution, Co., Ltd. All Rights Reserved.
  8. Quectel Wireless Solution Proprietary and Confidential.
  9. =================================================================*/
  10. /*=================================================================
  11. EDIT HISTORY FOR MODULE
  12. This section contains comments describing changes made to the module.
  13. Notice that changes are listed in reverse chronological order.
  14. WHEN WHO WHAT, WHERE, WHY
  15. ------------ ------- -------------------------------------------------------------------------------
  16. =================================================================*/
  17. #ifndef QL_API_STK_H
  18. #define QL_API_STK_H
  19. #include <stdbool.h>
  20. #include <stdint.h>
  21. #include "ql_api_common.h"
  22. #ifdef __cplusplus
  23. extern "C" {
  24. #endif
  25. /*===========================================================================
  26. * Macro Definition
  27. ===========================================================================*/
  28. #define QL_STK_ERRCODE_BASE (QL_COMPONENT_STK<<16)
  29. /* The default cid of BIP is 3 */
  30. #define QL_STK_BIP_DEFAULT_CID (3)
  31. #define QL_STK_STRING_LENGTH_MAX (512)
  32. #define QL_STK_MAX_MENU_ITEMS (50)
  33. #define QL_STK_AUTO_RESPONSE_TIMEOUT_DEF (300)
  34. #define QL_STK_AUTO_RESPONSE_TIMEOUT_MAX (65535)
  35. #define QSTK_SIM_ENVELOPE_MENU_SELECTION (253) /* used to select setup menu item */
  36. #define QSTK_TERMINATE_STK_SESSION (254) /* terminate current STK proactive command */
  37. /*========================================================================
  38. * Enumeration Definition
  39. *========================================================================*/
  40. typedef enum
  41. {
  42. QL_STK_SUCCESS = 0,
  43. QL_STK_EXECUTE_ERR = 1 | QL_STK_ERRCODE_BASE,
  44. QL_STK_MEM_ADDR_NULL_ERR,
  45. QL_STK_INVALID_PARAM_ERR,
  46. QL_STK_MALLOC_MEM_ERROR,
  47. QL_STK_OPERATION_NOT_SUPPORTED = 5 | QL_STK_ERRCODE_BASE,
  48. QL_STK_OPERATION_NOT_ALLOWED,
  49. } ql_stk_errcode_e;
  50. typedef enum
  51. {
  52. QL_STK_BIP_CONFIG_MODE_DISABLE, /* will disable BIP function */
  53. QL_STK_BIP_CONFIG_MODE_AUTO, /* When the specified cid is not available, find the available cid automatically, default value */
  54. QL_STK_BIP_CONFIG_MODE_FIXED, /* When the specified cid is not available, BIP function is not useable */
  55. }ql_stk_bip_config_mode_e;
  56. typedef enum
  57. {
  58. QL_STK_MODE_DISABLE, /**< disable STK functionality */
  59. QL_STK_MODE_ENABLE /**< enable STK functionality */
  60. } ql_stk_mode_e;
  61. typedef enum
  62. {
  63. QL_STK_ALPHABET_SET_GSM, /**< gsm */
  64. QL_STK_ALPHABET_SET_UCS2 /**< ucs2 */
  65. } ql_stk_alphabet_set_e;
  66. typedef enum
  67. {
  68. QL_STK_PROACTIVE_CMD_NONE = 0x00,
  69. QL_STK_PROACTIVE_CMD_PLAY_TONE = 0x20,
  70. QL_STK_PROACTIVE_CMD_DISPLAY_TEXT = 0x21,
  71. QL_STK_PROACTIVE_CMD_GET_INKEY = 0x22,
  72. QL_STK_PROACTIVE_CMD_GET_INPUT = 0x23,
  73. QL_STK_PROACTIVE_CMD_SELECT_ITEM = 0x24,
  74. QL_STK_PROACTIVE_CMD_SETUP_MENU = 0x25,
  75. QL_STK_PROACTIVE_CMD_SETUP_IDLE_MODE_TEXT = 0x28,
  76. QL_STK_PROACTIVE_CMD_LANGUAGE_NOTIFICATION = 0x35,
  77. } ql_stk_proactive_cmd_e;
  78. typedef enum
  79. {
  80. /* Results '0X' and '1X' indicate that the command has been performed. */
  81. QL_STK_PERFORMED_SUCCESSFULLY = 0x00,
  82. QL_STK_PERFORMED_WITH_PARTIAL_COMPREHENSION = 0x01,
  83. QL_STK_PERFORMED_WITH_MISSING_INFORMATION = 0x02,
  84. QL_STK_REFRESH_PERFORMED_WITH_ADDITIONAL_EFS_READ = 0x03,
  85. QL_STK_PERFORMED_SUCCESSFULLY_BUT_REQUESTED_ICON_NOT_DISPLAYED = 0x04,
  86. QL_STK_PERFORMED_BUT_MODIFIED_BY_CALL_CONTROL_BY_SIM = 0x05,
  87. QL_STK_PERFORMED_SUCCESSFULLY_LIMITED_SERVICE = 0x06,
  88. QL_STK_PERFORMED_WITH_MODIFICATION = 0x07,
  89. QL_STK_PROACTIVE_SIM_SESSION_TERMINATED_BY_THE_USER = 0x10,
  90. QL_STK_BACKWARD_MOVE_IN_THE_PROACTIVE_SIM_SESSION_REQUESTED_BY_THE_USER = 0x11,
  91. QL_STK_NO_RESPONSE_FROM_USER = 0x12,
  92. QL_STK_HELP_INFORMATION_REQUIRED_BY_THE_USER = 0x13,
  93. QL_STK_USSD_OR_SS_TRANSACTION_TERMINATED_BY_THE_USER = 0x14,
  94. /* Results '2X' indicate to the SIM that it may be worth re-trying the command at a later opportunity. */
  95. QL_STK_ME_CURRENTLY_UNABLE_TO_PROCESS_COMMAND = 0x20,
  96. QL_STK_NETWORK_CURRENTLY_UNABLE_TO_PROCESS_COMMAND = 0x21,
  97. QL_STK_USER_DID_NOT_ACCEPT_THE_PROACTIVE_COMMAND = 0x22,
  98. QL_STK_USER_CLEARED_DOWN_CALL_BEFORE_CONNECTION_OR_NETWORK_RELEASE = 0x23,
  99. QL_STK_ACTION_IN_CONTRADICTION_WITH_THE_CURRENT_TIMER_STATE = 0x24,
  100. QL_STK_INTERACTION_WITH_CALL_CONTROL_BY_SIM_TEMPORARY_PROBLEM = 0x25,
  101. QL_STK_LAUNCH_BROWSER_GENERIC_ERROR_CODE = 0x26,
  102. /* Results '3X' indicate that it is not worth the SIM re-trying with an identical command, as it will only get the same
  103. response. However, the decision to retry lies with the SIM application. */
  104. QL_STK_COMMAND_BEYOND_ME_CAPABILITIES = 0x30,
  105. QL_STK_COMMAND_TYPE_NOT_UNDERSTOOD_BY_ME = 0x31,
  106. QL_STK_COMMAND_DATA_NOT_UNDERSTOOD_BY_ME = 0x32,
  107. QL_STK_COMMAND_NUMBER_NOT_KNOWN_BY_ME = 0x33,
  108. QL_STK_SS_RETURN_ERROR = 0x34,
  109. QL_STK_SMS_RP_ERROR = 0x35,
  110. QL_STK_ERROR_REQUIRED_VALUES_ARE_MISSING = 0x36,
  111. QL_STK_USSD_RETURN_ERROR = 0x37,
  112. QL_STK_MULTIPLECARD_COMMANDS_ERROR = 0x38,
  113. QL_STK_INTERACTION_WITH_CALL_CONTROL_BY_SIM_OR_MO_SHORT_MESSAGE_CONTROL_BY_SIM = 0x39,
  114. QL_STK_BEARER_INDEPENDENT_PROTOCOL_ERROR = 0x3A,
  115. QL_STK_COMMAND_RESULT_MAX = 0XFF,
  116. }ql_stk_command_result_e;
  117. typedef enum
  118. {
  119. QL_STK_PRESENTATION_NOT_SPECIFIED = 0x00, /* presentation type is not specified */
  120. QL_STK_DATA_VALUE_PRESENTATION = 0x01, /* presentation as a choice of data values */
  121. QL_STK_PRESENTATION_NOT_SPECIFIED_2 = 0x02, /* presentation type is not specified */
  122. QL_STK_NAVIGATION_PRESENTATION = 0x03, /* presentation as a choice of navigation options */
  123. } ql_stk_item_presentation_e;
  124. typedef enum
  125. {
  126. QL_STK_DIGITS_ONLY = 0x00, /* digits (0-9, *, #, and +) only */
  127. QL_STK_ALPHABET_SET = 0x01, /* alphabet set */
  128. } ql_stk_input_type_e;
  129. typedef enum
  130. {
  131. QL_STK_SMS_DEFAULT_ALPHABET = 0x00,
  132. QL_STK_UCS2_ALPHABET = 0x01,
  133. } ql_stk_input_alphabet_e;
  134. typedef enum
  135. {
  136. QL_STK_INPUT_UNPACKED = 0x00,
  137. QL_STK_INPUT_SMS_PACKED = 0x01,
  138. } ql_stk_input_pack_format_e;
  139. typedef enum
  140. {
  141. QL_STK_PROACTIVE_CMD_AUTO_RSP_STATE = 0x00, /* qstk is disabled, will reply proactive command automaticaly */
  142. QL_STK_PROACTIVE_CMD_TERMINAL_RSP_STATE = 0x01, /* qstk is enabled, a proactive command needs to be handled or a SETUP MENU item can be selected */
  143. QL_STK_PROACTIVE_CMD_WAIT_STATE = 0x02 /* qstk is enabled, and a terminal response message has been sent to SIM, waiting for response */
  144. } ql_stk_state_e;
  145. typedef enum
  146. {
  147. QL_STK_TONE_DIAL_TONE = 0x01,
  148. QL_STK_TONE_CALLED_SUBSCRIBER_BUSY = 0x02,
  149. QL_STK_TONE_CONGESTION = 0x03,
  150. QL_STK_TONE_RADIO_PATH_ACKNOWLEDGE = 0x04,
  151. QL_STK_TONE_RADIO_PATH_NOT_AVAILABLE = 0x05,
  152. QL_STK_TONE_ERROR_OR_SPECIAL_INFORMATION = 0x06,
  153. QL_STK_TONE_CALL_WAITING_TONE = 0x07,
  154. QL_STK_TONE_RINGING_TONE = 0x08,
  155. QL_STK_TONE_GENERAL_BEEP = 0x10,
  156. QL_STK_TONE_POSITIVE_ACKNOWLEDGEMENT_TONE = 0x11,
  157. QL_STK_TONE_NEGATIVE_ACKNOWLEDGEMENT_OR_ERROR_TONE = 0x12
  158. } ql_stk_tone_e;
  159. /*===========================================================================
  160. * Struct
  161. ===========================================================================*/
  162. typedef struct
  163. {
  164. bool status_report;
  165. ql_stk_bip_config_mode_e mode; /* BIP cid mode */
  166. uint8_t cid; /* the cid used by BIP, start from 1, max is PROFILE_IDX_VOLTE_MAX or PROFILE_IDX_MAX */
  167. } ql_stk_bip_config_s;
  168. typedef struct
  169. {
  170. uint8_t profile_len;
  171. uint8_t profile_buf[34];
  172. } ql_stk_profile_s;
  173. typedef struct
  174. {
  175. uint16_t length; /**< Length of the text. */
  176. uint8_t *text; /**< Text string. */
  177. } ql_stk_string_s;
  178. typedef struct
  179. {
  180. uint8_t qualifier; /**< Qualifiers specific to the command */
  181. uint8_t num_items; /**< Number of items. */
  182. uint8_t item_id[QL_STK_MAX_MENU_ITEMS]; /**< array list for items. */
  183. ql_stk_string_s title; /**< Title string. */
  184. } ql_stk_setup_menu_s;
  185. typedef struct
  186. {
  187. uint8_t item_id; /**< array list for items. */
  188. ql_stk_string_s item_text; /**< Title string. */
  189. } ql_stk_item_s;
  190. typedef struct
  191. {
  192. uint8_t qualifier; /**< Qualifiers specific to the command */
  193. uint8_t num_items; /**< Number of items. */
  194. uint8_t item_id[QL_STK_MAX_MENU_ITEMS]; /**< array list for items. */
  195. ql_stk_string_s title; /**< Title. */
  196. } ql_stk_select_item_s;
  197. typedef struct
  198. {
  199. uint8_t alpha2[2];
  200. } ql_stk_iso6391_s;
  201. typedef struct
  202. {
  203. uint8_t qualifier; /**< Qualifiers specific to the command */
  204. ql_stk_string_s text_string; /**< Title string. */
  205. } ql_stk_display_text_s;
  206. typedef struct
  207. {
  208. uint8_t qualifier; /**< Qualifiers specific to the command */
  209. uint8_t minimum_user_input; /**< Minimum number of user input. */
  210. uint8_t maximum_user_input; /**< Maximum number of user input. */
  211. ql_stk_string_s text_string; /**< Title string. */
  212. ql_stk_string_s default_text; /**< Default text. */
  213. } ql_stk_get_input_s;
  214. typedef struct
  215. {
  216. uint8_t qualifier; /**< Qualifiers specific to the command */
  217. ql_stk_string_s text_string; /**< Title string. */
  218. } ql_stk_get_inkey_s;
  219. typedef struct
  220. {
  221. uint8_t qualifier; /**< Qualifiers specific to the command */
  222. ql_stk_string_s text_string; /**< Title string. */
  223. } ql_stk_setup_idle_mode_text_s;
  224. typedef struct
  225. {
  226. uint8_t qualifier; /**< Qualifiers specific to the command */
  227. ql_stk_iso6391_s language; /**< language, each language code is a pair of alpha-numeric characters, defined in ISO 639 [29]. */
  228. } ql_stk_language_notification_s;
  229. typedef struct
  230. {
  231. uint8_t qualifier; /**< Qualifiers specific to the command */
  232. ql_stk_tone_e tone; /**< Standard supervisory tones */
  233. uint8_t duration_unit; /**< duration unit */
  234. uint8_t duration; /**< the length of time for which the ME shall generate the tone, if the tone is continuous or repeatable. */
  235. ql_stk_string_s title; /**< Title string. */
  236. } ql_stk_play_tone_s;
  237. typedef struct
  238. {
  239. ql_stk_proactive_cmd_e proactive_cmd_id;
  240. } ql_stk_proactive_cmd_s; /**< QUEC_STK_PROACTIVE_CMD_IND event content */
  241. typedef struct
  242. {
  243. ql_stk_proactive_cmd_e proactive_cmd_id;
  244. } ql_stk_timeout_s; /**< QUEC_STK_NO_PROACTIVE_CMD_IND event content */
  245. #ifdef CONFIG_QUEC_PROJECT_FEATURE_BIP
  246. /*****************************************************************
  247. * Function: ql_stk_get_bip_config
  248. *
  249. * Description:
  250. * Get BIP configuration parameters
  251. *
  252. *
  253. * Parameters:
  254. * config [out] BIP configuration parameters
  255. *
  256. * Return:ql_stk_errcode_e
  257. *
  258. *****************************************************************/
  259. ql_stk_errcode_e ql_stk_get_bip_config(ql_stk_bip_config_s *config);
  260. /*****************************************************************
  261. * Function: ql_stk_get_bip_config
  262. *
  263. * Description:
  264. * Set BIP configuration parameters
  265. *
  266. *
  267. * Parameters:
  268. * config [in] BIP configuration parameters
  269. *
  270. * Return:ql_stk_errcode_e
  271. *
  272. *****************************************************************/
  273. ql_stk_errcode_e ql_stk_set_bip_config(const ql_stk_bip_config_s* config);
  274. #endif
  275. /*===========================================================================
  276. * Functions declaration
  277. ===========================================================================*/
  278. /*****************************************************************
  279. * Function: ql_stk_callback
  280. *
  281. * Description:
  282. * stk event callback, stk module will notify the occurrence of the event through this callback
  283. *
  284. * Parameters:
  285. * nSim [in] Index of sim, range:0-1.
  286. * ind_type [in] event type,
  287. * QUEC_STK_PROACTIVE_CMD_IND: stk module fetched a proactive command from SIM.
  288. * QUEC_STK_NO_PROACTIVE_CMD_IND: no more proactive command
  289. * QUEC_STK_TIMEOUT_IND: If the proactive command is not replied through ql_stk_send_command_result
  290. * within the set time, this timeout event will be triggered, and the module will automatically
  291. * reply to the proactive command.
  292. * QUEC_STK_SIM_LOST_IND: sim card removed
  293. * ctx [in] event content
  294. *
  295. * Return:void
  296. *****************************************************************/
  297. typedef void (*ql_stk_callback)(uint8_t nSim, uint32_t ind_type, void *ctx);
  298. /*****************************************************************
  299. * Function: ql_stk_register_cb
  300. *
  301. * Description:
  302. * register stk module callback
  303. *
  304. * Parameters:
  305. * stk_cb [in] event callback
  306. *
  307. * Return:ql_stk_errcode_e
  308. *****************************************************************/
  309. ql_stk_errcode_e ql_stk_register_cb(ql_stk_callback stk_cb);
  310. /*****************************************************************
  311. * Function: ql_stk_cfg_get
  312. *
  313. * Description:
  314. * get stk module configuration parameter
  315. *
  316. * Parameters:
  317. * stk_mode [out] stk mode
  318. * stk_alphabet_type [out] stk_alphabet_type
  319. * stk_auto_response_timeout [out] stk_auto_response_timeout , unit:second
  320. *
  321. * Return:ql_stk_errcode_e
  322. *****************************************************************/
  323. ql_stk_errcode_e ql_stk_cfg_get(ql_stk_mode_e *stk_mode, ql_stk_alphabet_set_e *stk_alphabet_type, uint16_t *stk_auto_response_timeout);
  324. /*****************************************************************
  325. * Function: ql_stk_cfg_set
  326. *
  327. * Description:
  328. * set stk module configuration parameter
  329. *
  330. * Parameters:
  331. * stk_mode [in] stk mode, enable or disable stk function, by enable stk function, related stk
  332. * feature will be enabled in terminal profile.
  333. * stk_alphabet_type [in] stk_alphabet_type
  334. * stk_auto_response_timeout [in] stk_auto_response_timeout , unit:second
  335. *
  336. * Return:ql_stk_errcode_e
  337. *****************************************************************/
  338. ql_stk_errcode_e ql_stk_cfg_set(ql_stk_mode_e stk_mode, ql_stk_alphabet_set_e stk_alphabet_type, uint16_t stk_auto_response_timeout);
  339. /*****************************************************************
  340. * Function: ql_stk_get_terminal_profile
  341. *
  342. * Description:
  343. * get terminal profile data
  344. *
  345. * Parameters:
  346. * nSim [in] Index of sim, range:0-1.
  347. * profile [out] profile data
  348. *
  349. * Return:ql_stk_errcode_e
  350. *****************************************************************/
  351. ql_stk_errcode_e ql_stk_get_terminal_profile(uint8_t nSim, ql_stk_profile_s *profile);
  352. /*****************************************************************
  353. * Function: ql_stk_acquire_setup_menu_info
  354. *
  355. * Description:
  356. * get proactive command SET UP MENU without items
  357. *
  358. * Parameters:
  359. * nSim [in] Index of sim, range:0-1.
  360. * info [out] command information
  361. *
  362. * Return:ql_stk_errcode_e
  363. *****************************************************************/
  364. ql_stk_errcode_e ql_stk_acquire_setup_menu_info(uint8_t nSim, ql_stk_setup_menu_s *info);
  365. /*****************************************************************
  366. * Function: ql_stk_acquire_setup_menu_item_list
  367. *
  368. * Description:
  369. * get proactive command SET UP MENU items
  370. *
  371. * Parameters:
  372. * nSim [in] Index of sim, range:0-1.
  373. * item_identifier [in] setup menu item ID
  374. * info [out] item information
  375. *
  376. * Return:ql_stk_errcode_e
  377. *****************************************************************/
  378. ql_stk_errcode_e ql_stk_acquire_setup_menu_item_list(uint8_t nSim, uint8_t item_identifier, ql_stk_item_s *info);
  379. /*****************************************************************
  380. * Function: ql_stk_acquire_sub_menu_info
  381. *
  382. * Description:
  383. * get proactive command SELECT ITEM without items
  384. *
  385. * Parameters:
  386. * nSim [in] Index of sim, range:0-1.
  387. * info [out] command information
  388. *
  389. * Return:ql_stk_errcode_e
  390. *****************************************************************/
  391. ql_stk_errcode_e ql_stk_acquire_sub_menu_info(uint8_t nSim, ql_stk_select_item_s *info);
  392. /*****************************************************************
  393. * Function: ql_stk_acquire_sub_menu_item_list
  394. *
  395. * Description:
  396. * get proactive command SELECT ITEM items
  397. *
  398. * Parameters:
  399. * nSim [in] Index of sim, range:0-1.
  400. * item_identifier [in] setup menu item ID
  401. * info [out] item information
  402. *
  403. * Return:ql_stk_errcode_e
  404. *****************************************************************/
  405. ql_stk_errcode_e ql_stk_acquire_sub_menu_item_list(uint8_t nSim, uint8_t item_identifier, ql_stk_item_s *info);
  406. /*****************************************************************
  407. * Function: ql_stk_acquire_display_text_info
  408. *
  409. * Description:
  410. * get proactive command DISPLAY TEXT
  411. *
  412. * Parameters:
  413. * nSim [in] Index of sim, range:0-1.
  414. * info [out] command information
  415. *
  416. * Return:ql_stk_errcode_e
  417. *****************************************************************/
  418. ql_stk_errcode_e ql_stk_acquire_display_text_info(uint8_t nSim, ql_stk_display_text_s *info);
  419. /*****************************************************************
  420. * Function: ql_stk_acquire_get_input_info
  421. *
  422. * Description:
  423. * get proactive command GET INPUT
  424. *
  425. * Parameters:
  426. * nSim [in] Index of sim, range:0-1.
  427. * info [out] command information
  428. *
  429. * Return:ql_stk_errcode_e
  430. *****************************************************************/
  431. ql_stk_errcode_e ql_stk_acquire_get_input_info(uint8_t nSim, ql_stk_get_input_s *info);
  432. /*****************************************************************
  433. * Function: ql_stk_acquire_get_input_info
  434. *
  435. * Description:
  436. * get proactive command GET INKEY
  437. *
  438. * Parameters:
  439. * nSim [in] Index of sim, range:0-1.
  440. * info [out] command information
  441. *
  442. * Return:ql_stk_errcode_e
  443. *****************************************************************/
  444. ql_stk_errcode_e ql_stk_acquire_get_inkey_info(uint8_t nSim, ql_stk_get_inkey_s *info);
  445. /*****************************************************************
  446. * Function: ql_stk_acquire_get_input_info
  447. *
  448. * Description:
  449. * get proactive command SET UP IDLE MODE TEXT
  450. *
  451. * Parameters:
  452. * nSim [in] Index of sim, range:0-1.
  453. * info [out] command information
  454. *
  455. * Return:ql_stk_errcode_e
  456. *****************************************************************/
  457. ql_stk_errcode_e ql_stk_acquire_setup_idle_mode_text_info(uint8_t nSim, ql_stk_setup_idle_mode_text_s *info);
  458. /*****************************************************************
  459. * Function: ql_stk_acquire_get_input_info
  460. *
  461. * Description:
  462. * get proactive command LANGUAGE NOTIFICATION
  463. *
  464. * Parameters:
  465. * nSim [in] Index of sim, range:0-1.
  466. * info [out] command information
  467. *
  468. * Return:ql_stk_errcode_e
  469. *****************************************************************/
  470. ql_stk_errcode_e ql_stk_acquire_language_notification_info(uint8_t nSim, ql_stk_language_notification_s *info);
  471. /*****************************************************************
  472. * Function: ql_stk_acquire_get_input_info
  473. *
  474. * Description:
  475. * get proactive command PLAY TONE
  476. *
  477. * Parameters:
  478. * nSim [in] Index of sim, range:0-1.
  479. * info [out] command information
  480. *
  481. * Return:ql_stk_errcode_e
  482. *****************************************************************/
  483. ql_stk_errcode_e ql_stk_acquire_play_tone_info(uint8_t nSim, ql_stk_play_tone_s *info);
  484. /*****************************************************************
  485. * Function: ql_stk_send_command_result
  486. *
  487. * Description:
  488. * respond to the proactive command or select setup menu item
  489. *
  490. * Parameters:
  491. * nSim [in] Index of sim, range:0-1.
  492. * stk_cmd_id [in] command information, nSim is requested in all scenes
  493. stk_cmd_id is filled with proactive command PLAY_TONE: result is requested
  494. stk_cmd_id is filled with proactive command SETUP_IDLE_MODE: result is requested
  495. stk_cmd_id is filled with proactive command LANGUAGE_NOTIFICATION: result is requested
  496. stk_cmd_id is filled with proactive command SETUP_MENU: result is requested
  497. stk_cmd_id is filled with proactive command DISPLAY_TEXT: result is requested
  498. stk_cmd_id is filled with proactive command GET_INKEY: result and string is requested
  499. stk_cmd_id is filled with proactive command GET_INPUT: result and string is requested
  500. stk_cmd_id is filled with proactive command SELECT_ITEM: result and item_id are requested
  501. stk_cmd_id is filled with QSTK_SIM_ENVELOPE_MENU_SELECTION: result and item_id are requested
  502. result: QL_STK_PERFORMED_SUCCESSFULLY, send ENVELOPE (MENU SELECTION) without Help request
  503. result: QL_STK_HELP_INFORMATION_REQUIRED_BY_THE_USER, send ENVELOPE (MENU SELECTION) with Help request
  504. stk_cmd_id is filled with QSTK_TERMINATE_STK_SESSION: will terminate current proactive command
  505. with result QL_STK_PROACTIVE_SIM_SESSION_TERMINATED_BY_THE_USER.
  506. * result [in] general result, ql_stk_command_result_e
  507. * item_id [in] item identifier, used in SELECT_ITEM or QSTK_SIM_ENVELOPE_MENU_SELECTION
  508. * string [in] input string, used in GET_INKEY or GET_INPUT
  509. *
  510. * Return:ql_stk_errcode_e
  511. *****************************************************************/
  512. ql_stk_errcode_e ql_stk_send_command_result(uint8_t nSim, uint8_t stk_cmd_id, uint8_t result, uint8_t item_id, ql_stk_string_s *string);
  513. /*****************************************************************
  514. * Function: ql_stk_get_stk_proactive_cmd
  515. *
  516. * Description:
  517. * get current proactive command id and stk state
  518. *
  519. * Parameters:
  520. * nSim [in] Index of sim, range:0-1.
  521. * proactive_cmd [out] current proactive command
  522. * state [out] current qstk module state
  523. *
  524. * Return:ql_stk_errcode_e
  525. *****************************************************************/
  526. ql_stk_errcode_e ql_stk_get_stk_proactive_cmd(uint8_t nSim, ql_stk_proactive_cmd_e *proactive_cmd, ql_stk_state_e *state);
  527. #ifdef __cplusplus
  528. } /*"C" */
  529. #endif
  530. #endif /* QL_API_STK_H */