/* Function not verified */ {"SETAPN:", 7, mmi_protocol_sms_parse_set_apn}, /* Function not verified */
{"ts#", 3, mmi_protocol_sms_parse_get_info},
{"TS#", 3, mmi_protocol_sms_parse_get_info},
+ {"SETWHITEPHB:", 12, mmi_protocol_sms_parse_set_white_list_switch},
/*******add before this line*******/
return true;
}
+//SETWHITEPHB:0 / 1
+static uint32_t white_list_switch = 0;
+static void mmi_protocol_sms_set_white_list_switch_cb(watch_app_adp_sms_send_result_type_t result)
+{
+ SMS_DEBUG_PRINTF("[@CHENG_DEBUG][%s][%d]: %d\n", __FUNCTION__, __LINE__, result);
+
+ if(APP_SMS_SEND_SUCCESS == result)
+ {
+ mmi_white_list_switch_set(white_list_switch);
+ }
+ else if(APP_SMS_SEND_FAIL == result)
+ {
+ //
+ }
+}
+
+bool mmi_protocol_sms_parse_set_white_list_switch(char * fixed_str, char * data, char * number)
+{
+ SMS_DEBUG_PRINTF("[@CHENG_DEBUG][%s][%d]: num=%s\n", __FUNCTION__, __LINE__, number);
+ SMS_DEBUG_PRINTF("[@CHENG_DEBUG][%d]: %s\n", __LINE__, data);
+
+ if(0 == strlen(data))
+ {
+ SMS_DEBUG_PRINTF("[@CHENG_DEBUG][%s][%d]: \n", __FUNCTION__, __LINE__);
+ return false;
+ }
+
+ if(0 == atoi(data))
+ white_list_switch = 0;
+ else
+ white_list_switch = 2;
+
+ mmi_protocol_sms_parse_sms_reply(NULL, fixed_str, number, mmi_protocol_sms_set_white_list_switch_cb);
+
+ return true;
+}
#endif
bool mmi_protocol_sms_parse_unbind(char * fixed_str, char * data, char * number);
bool mmi_protocol_sms_parse_set_apn(char * fixed_str, char * data, char * number);
bool mmi_protocol_sms_parse_get_info(char * fixed_str, char * data, char * number);
+bool mmi_protocol_sms_parse_set_white_list_switch(char * fixed_str, char * data, char * number);
#ifdef __cplusplus