lh | 9ed821d | 2023-04-07 01:36:19 -0700 | [diff] [blame] | 1 | #include "message.h" |
| 2 | |
| 3 | |
| 4 | #define ZTE_WMS_MESSAGE_LIST_MAX 255 |
| 5 | #define ZTE_WMS_DB_EXECSQL_LEN 1024 |
| 6 | #define ZTE_WMS_ADDRESS_LEN_MAX 32 |
| 7 | |
| 8 | /*support MAX COUNT NUMBER*/ |
| 9 | #define ZTE_WMS_RECEIVER_NUM_MAX (50) |
| 10 | #define ZTE_WMS_SMS_MSG_CONTENT_STORE_LEN_MAX (2 * ZTE_WMS_SMS_MSG_CONTENT_LEN_MAX) |
| 11 | #define ZTE_WMS_SMS_COUNT_MAX (10) |
| 12 | //#define ZTE_WMS_CONCAT_SMS_COUNT_MAX (1) |
| 13 | //#define ZTE_WMS_SMS_CONCAT_CONTENT_LEN_MAX (2 * ZTE_WMS_SMS_MSG_CONTENT_STORE_LEN_MAX * ZTE_WMS_CONCAT_SMS_COUNT_MAX) |
| 14 | |
| 15 | |
| 16 | #define ZTE_WMS_TP_SCTS_LEN_MAX (50) /*modified by crw*/ |
| 17 | #define ZTE_WMS_SMS_UD_HEADER_LEN_MAX (30) |
| 18 | #define ZTE_WMS_SMS_CONCAT_ELEMNT_MAX (3) |
| 19 | #define ZTE_WMS_SMS_CONCAT_ELEMNT_ASC_LEN (153) |
| 20 | #define ZTE_WMS_SMS_CONCAT_ELEMNT_UCS_LEN (67) |
| 21 | |
| 22 | #define DCS_ASC 1 |
| 23 | #define DCS_USC 2 |
| 24 | #define DCS_UNKNOW 0 |
| 25 | #define DCS_UNICODE 2 |
| 26 | #define DCS_SPANISH 3 |
| 27 | #define DCS_GSM7_DEFAULT 4 |
| 28 | #define DCS_TURKISH 6 |
| 29 | |
| 30 | #define SEPARATOR_CHARACTER ';' |
| 31 | #define WMS_MODULE_ID_LEN 11 |
| 32 | |
| 33 | #define SMS_READ_RECORD_MAX_NUM 10 |
| 34 | |
| 35 | #define SMS_CMD_STATUS_RESULT "sms_cmd_status_result" |
| 36 | #define SMS_CMD "sms_cmd" |
| 37 | |
| 38 | #define SMS_PARAMETER_SCA "sms_para_sca" |
| 39 | #define SMS_PARAMETER_MEM_STORE "sms_para_mem_store" |
| 40 | #define SMS_PARAMETER_VALIDITY_PERIOD "sms_para_validity_period" |
| 41 | #define SMS_PARAMETER_STATUS_REPORT "sms_para_status_report" |
| 42 | #define SMS_PARAMETER_SEND_RETRY "sendfail_retry" |
| 43 | #define SMS_PARAMETER_OUTDATE_DELETE "outdate_delete" |
| 44 | #define SMS_PARAMETER_DEFAULT_STORE "default_store" |
| 45 | |
| 46 | #define SMS_MESSAGES "messages" |
| 47 | |
| 48 | #define SMS_ID "id" |
| 49 | #define SMS_NUMBER "number" |
| 50 | #define SMS_NAME "name" |
| 51 | #define SMS_CONTENT "content" |
| 52 | #define SMS_TAG "tag" |
| 53 | #define SMS_DATE "date" |
| 54 | #define SMS_DRAFT_GROUP_ID "draft_group_id" |
| 55 | //capacity info |
| 56 | #define SMS_NV_TOTAL "sms_nv_total" |
| 57 | #define SMS_SIM_TOTAL "sms_sim_total" |
| 58 | #define SMS_NV_REV_TOTAL "sms_nv_rev_total" |
| 59 | #define SMS_NV_SEND_TOTAL "sms_nv_send_total" |
| 60 | #define SMS_NV_DRAFTBOX_TOTAL "sms_nv_draftbox_total" |
| 61 | #define SMS_SIM_REV_TOTAL "sms_sim_rev_total" |
| 62 | #define SMS_SIM_SEND_TOTAL "sms_sim_send_total" |
| 63 | #define SMS_SIM_DRAFTBOX_TOTAL "sms_sim_draftbox_total" |
| 64 | |
| 65 | //#define ZTE_WMS_SEND_NUM_MAX (1) |
| 66 | #define SMS_DEV_UNREAD_COUNT "sms_dev_unread_num" |
| 67 | #define SMS_SIM_UNREAD_COUNT "sms_sim_unread_num" |
| 68 | #define NUMBER_SIZE 8 |
| 69 | |
| 70 | typedef struct { |
| 71 | unsigned char page; |
| 72 | unsigned char data_per_page; |
| 73 | unsigned char mem_store; |
| 74 | unsigned char tags; |
| 75 | unsigned char order_by[256]; |
| 76 | } zte_sms_query_req ; |
| 77 | |
| 78 | typedef struct { |
| 79 | unsigned char year[5]; |
| 80 | unsigned char month[3]; |
| 81 | unsigned char day[3]; |
| 82 | unsigned char hour[3]; |
| 83 | unsigned char min[3]; |
| 84 | unsigned char sec[3]; |
| 85 | unsigned char timezone[4]; |
| 86 | } zte_wms_sms_date; |
| 87 | |
| 88 | //CONCAT_SMS |
| 89 | typedef struct { |
| 90 | char id[10]; |
| 91 | char number [ZTE_WMS_ADDRESS_LEN_MAX + 1]; |
| 92 | char sms_content[2 * ZTE_WMS_SMS_MSG_CONTENT_STORE_LEN_MAX * ZTE_WMS_CONCAT_SMS_COUNT_MAX + 1]; |
| 93 | char tag[10]; |
| 94 | zte_wms_sms_date date; |
| 95 | char draft_group_id[32]; |
| 96 | } zte_sms_data; |
| 97 | #if 0 // ÔÀ´²»Ö§³Ö¼¶Áª¶ÌÐŵĴúÂë |
| 98 | typedef struct { |
| 99 | char id[10]; |
| 100 | char number [ZTE_WMS_ADDRESS_LEN_MAX + 1]; |
| 101 | char sms_content[2 * ZTE_WMS_SMS_MSG_CONTENT_STORE_LEN_MAX + 1]; |
| 102 | char tag[10]; |
| 103 | zte_wms_sms_date date; |
| 104 | char draft_group_id[32]; |
| 105 | } zte_sms_data; |
| 106 | #endif |
| 107 | #if 0 |
| 108 | //¶ÌÏûÏ¢ÊÕ¼þÏä¡¢·¢¼þÏä¡¢²Ý¸åÏä¡¢Ô¤Éè¶ÌÏûÏ¢µÄö¾Ù |
| 109 | typedef enum _SMS_BOX_NAME { |
| 110 | SMS_ALLBOX = 1, |
| 111 | SMS_INBOX, |
| 112 | SMS_OUTBOX, |
| 113 | SMS_DRAFTBOX, |
| 114 | SMS_PRESETBOX |
| 115 | } SMS_BOX_NAME; |
| 116 | #endif |
| 117 | |
| 118 | /*¶ÌÐÅ´æ·ÅµÄλÖÃ*/ |
| 119 | typedef enum _SMS_LOCATION { |
| 120 | SMS_LOCATION_SIM = 0, //¿¨²à |
| 121 | SMS_LOCATION_ME, //É豸²à |
| 122 | SMS_LOCATION_PC, //PC²à |
| 123 | } SMS_LOCATION; |
| 124 | |
| 125 | typedef enum _SMS_BOX_NAME { |
| 126 | SMS_ALLBOX = 1, |
| 127 | SMS_INBOX, |
| 128 | SMS_OUTBOX, |
| 129 | SMS_DRAFTBOX, |
| 130 | SMS_PRESETBOX |
| 131 | } SMS_BOX_NAME; |
| 132 | |
| 133 | /*Ò³ÃæÇëÇóɾ³ýijһÀà¶ÌÐÅ*/ |
| 134 | typedef struct tagWEB_DEL_SMS_BY_TYPE { |
| 135 | SMS_BOX_NAME eBoxName; /*´ýɾ³ýµÄBOX*/ |
| 136 | SMS_LOCATION eLocation; /*¶ÌÐÅ´æ·ÅµÄλÖÃ*/ |
| 137 | } WEB_DEL_SMS_BY_TYPE; |
| 138 | |
| 139 | |
| 140 | typedef struct { |
| 141 | unsigned char count; |
| 142 | zte_sms_data data[0]; /*lint !e1501*/ |
| 143 | } zte_sms_query_result; |
| 144 | |
| 145 | |
| 146 | typedef struct { |
| 147 | unsigned char content[1024]; |
| 148 | } zte_wms_cell_bro_s_type; |
| 149 | |
| 150 | |
| 151 | |
| 152 | |
| 153 | |