Mtk10a text message function explanation

Source: Internet
Author: User

When talking about text messages, most people want to know about saving the text message list. I have been searching for it for a long time. There is a smsfolderlistsrv under plutommi \ service \ smssrv. the text message list is defined here.

Static 2010srv_sms_inbox_size;

Static 2010srv_sms_outbox_size;

Static 2010srv_sms_drafts_size;

# Ifdef _ srv_sms_unsent_list __

Static 2010srv_sms_unsent_size;

# Endif

# Ifdef _ srv_sms_simbox_support __

Static 2010srv_sms_sim_size;

# Endif

# Ifdef _ srv_sms_archive __

Static 2010srv_sms_archive_size;

# Endif/* _ srv_sms_archive __*/

The above section defines the number of text messages in each text box.

Static 2010srv_sms_inbox_list [srv_sms_max_sms_entry];

Static 2010srv_sms_outbox_list [srv_sms_max_sms_entry];

Static 2010srv_sms_drafts_list [srv_sms_max_sms_entry];

# Ifdef _ srv_sms_unsent_list __

Static 2010srv_sms_unsent_list [srv_sms_max_sms_entry];

# Endif/* _ srv_sms_unsent_list __*/

# Ifdef _ srv_sms_simbox_support __

Static 16srv_sms_sim_list [srv_sms_max_sms_entry];

# Endif/* _ srv_sms_simbox_support __*/

# Ifdef _ srv_sms_archive __

Static 2010srv_sms_archive_list [srv_sms_max_arch_entry];

# Endif/* _ srv_sms_archive __*/

The preceding section defines an array of information IDs in each SMS box. The above is the core part of the SMS array and the list of SMS messages that users are most concerned about. The following describes the list operation functions.

Void srv_sms_list_init (void): List initialization Function

B2srv_sms_get_unread_sms_num (void): function for obtaining the number of unread SMS messages

B2srv_sms_get_unread_sim_sms_num (void): function for obtaining the number of unread SMS messages in the SIM card

Srv_sms_get_msg_id (srv_sms_box_enum msg_box_type, 2010list_index): Obtain the Short Message ID through the text message box type and List index number. Here, the List index number is the subscript of the corresponding array just defined.

Srv_sms_get_list_size (srv_sms_box_enum msg_box_type): A common function that obtains the number of elements through the SMS box type.

Srv_sms_box_enum srv_sms_get_list_type (srv_sms_status_enum status, srv_sms_storage_enum storage_type, invalid folder_id): either the SMS type, storage location, or folder attribute, or the text message box type

Srv_sms_get_msg_list_index (srv_sms_box_enum * msg_box_type, 2010msg_id): obtains the index value of the SMS box type and short message in the corresponding text box by using the Short Message ID. The return value of this function is often not used during programming, but this return value is a way to associate the index value with the Information id value, and sometimes plays a major role. You cannot only view srv_sms_get_msg_list_index (& msg_box_type, msg_id). This function can only obtain the mail type of short messages.

Void seek (srv_sms_box_enum msg_box_type, includest_storage, srv_sms_sim_enum sim_id, srvsmscallbackfunc callback_func, void * user_data): Copy all source messages (mobile phone or sim1, sim2 card) to target location

Void dispatch (srv_sms_box_enum msg_box_type, includest_storage, srv_sms_sim_enum sim_id, srvsmscallbackfunc callback_func, void * user_data): Move all source text messages to the target location

Void complete (srv_sms_box_enum msg_box_type, srv_sms_sim_enum sim_id, srvsmscallbackfunc callback_func, void * user_data): delete all specified locations (mobile phone or sim1, sim2 card) SMS

Let's take a look at the smsstorageinterfacesrv. c file:

Mmi_bool srv_sms_is_msg_exist (2010msg_id): determines whether information with the ID of msg_id exists.

Void srv_sms_read_msg (2010msg_id, mmi_bool change_status, callback * msg_data, srvsmscallbackfunc callback_func, void * user_data): read information to the queue through or msg_id and register the callback function. This function does not display information. The general information is displayed in the callback function.

Void srv_sms_change_msg_status (2010msg_id, srv_sms_status_enum status, srvsmscallbackfunc callback_func, void * user_data): Modify the Information Status and register the callback function.

Void srv_sms_sort_msg (2010* msg_id_array, 2010msg_num, srv_sms_sort_enum sort_flag, srv_sms_order_enum order_flag): Information sorting. Currently, only chronological sorting is supported. If you need other sorting methods.

Const S8 * srv_sms_get_msg_asc_address (2010msg_id): read information address, returned as an ASCII string

Void srv_sms_get_msg_address (2010msg_id, S8 * ucs2_addr_buff)

Void srv_sms_get_msg_timestamp (2010msg_id, mytime * time_stamp)

U32 srv_sms_get_msg_timestamp_utc_sec (2010msg_id): the time when the information is obtained, which is returned in UTC seconds.

Srv_sms_pid_enum srv_sms_get_msg_pid (2010msg_id): obtains the information protocol id.

Srv_sms_status_enum srv_sms_get_msg_status (2010msg_id): Get Information Status

Srv_sms_sim_enum srv_sms_get_msg_sim_id (2010msg_id): gets the SIM card to which the information belongs.

2010srv_sms_get_msg_size (2010msg_id): obtains the information size.

Transfer http://hi.baidu.com/surfmygod/blog/item/dd6a5821da5531208744f93c.html

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.