at_mn.h 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. /* Copyright (C) 2018 RDA Technologies Limited and/or its affiliates("RDA").
  2. * All rights reserved.
  3. *
  4. * This software is supplied "AS IS" without any warranties.
  5. * RDA assumes no responsibility or liability for the use of the software,
  6. * conveys no license or title under any patent, copyright, or mask work
  7. * right to the product. RDA reserves the right to make changes in the
  8. * software without notification. RDA also make no representation or
  9. * warranty that such application will be suitable for the specified use
  10. * without further testing or modification.
  11. */
  12. #ifndef __AT_MN_H__
  13. #define __AT_MN_H__
  14. #ifdef __cplusplus
  15. extern "C" {
  16. #endif
  17. typedef enum
  18. {
  19. MN_SYS_SIM_1 = 0,
  20. MN_SYS_SIM_2 = 1,
  21. MN_SYS_SIM_MAX
  22. } MN_SYS_SIM_E;
  23. typedef enum _MN_PLMN_STATUS_E
  24. {
  25. PLMN_NO_SERVICE = 0,
  26. PLMN_NORMAL_GSM_ONLY = 0x01,
  27. PLMN_NORMAL_GPRS_ONLY = 0x02,
  28. PLMN_NORMAL_GSM_GPRS_BOTH = 0x03,
  29. PLMN_EMERGENCY_ONLY = 0x04
  30. } MN_PHONE_PLMN_STATUS_E;
  31. typedef enum MN_GMMREG_RAT_E
  32. {
  33. MN_GMMREG_RAT_GPRS = 0,
  34. MN_GMMREG_RAT_3G = 1,
  35. MN_GMMREG_RAT_TD = MN_GMMREG_RAT_3G, // 2
  36. MN_GMMREG_RAT_GPRS_AND_3G, // 3
  37. MN_GMMREG_RAT_UNKNOWN, // 4
  38. MN_GMMREG_RAT_VDS_GSM = 5,
  39. MN_GMMREG_RAT_LTE = 0x10,
  40. MN_GMMREG_RAT_GPRS_LTE = MN_GMMREG_RAT_LTE + 1,
  41. MN_GMMREG_RAT_3G_LTE = MN_GMMREG_RAT_LTE + 2,
  42. MN_GMMREG_RAT_GPRS_3G_LTE = MN_GMMREG_RAT_LTE + 3,
  43. MN_GMMREG_RAT_CDMA = 0x14
  44. } MN_GMMREG_RAT_E;
  45. typedef struct MN_PHONE_CURR_CELL_CAPABILITY_T
  46. {
  47. bool mbms_support;
  48. bool hsdpa_support;
  49. bool hsupa_support;
  50. bool edge_support;
  51. bool hspa_plus_support;
  52. bool fast_dormancy_supported_flag;
  53. uint8_t fast_dormancy_supported;
  54. bool e_utran_ca_supported_flag;
  55. bool e_utran_ca_supported;
  56. } MN_PHONE_CURR_CELL_CAPABILITY_T;
  57. // struct current plmn info
  58. typedef struct MN_PHONE_CURRENT_PLMN_INFO_T
  59. {
  60. MN_PHONE_PLMN_STATUS_E plmn_status; // plmn statue
  61. bool plmn_is_roaming; // if plmn is roaming plmn
  62. uint16_t mcc;
  63. uint16_t mnc;
  64. uint16_t mnc_digit_num;
  65. uint16_t lac;
  66. uint32_t cell_id;
  67. MN_GMMREG_RAT_E rat;
  68. MN_PHONE_CURR_CELL_CAPABILITY_T cell_capability;
  69. uint16_t rnc_id;
  70. uint16_t tai;
  71. bool is_rnc_id_flag;
  72. bool is_plmn_valid;
  73. } MN_PHONE_CURRENT_PLMN_INFO_T;
  74. extern MN_PHONE_CURRENT_PLMN_INFO_T MNPHONE_GetCurrentPLMNInfoEx(MN_SYS_SIM_E dual_sys);
  75. #ifndef MN_MAX_IMSI_ARR_LEN
  76. #define MN_MAX_IMSI_ARR_LEN 8
  77. typedef struct _MN_IMSI_T
  78. {
  79. uint8_t imsi_len;
  80. uint8_t imsi_val[MN_MAX_IMSI_ARR_LEN];
  81. } MN_IMSI_T;
  82. #endif
  83. extern MN_IMSI_T MNSIM_GetImsiEx(MN_SYS_SIM_E dual_sys);
  84. #ifdef __cplusplus
  85. }
  86. #endif
  87. #endif