2 * Copyright 2012-2013 Samsung Electronics Co., Ltd
4 * Licensed under the Flora License, Version 1.1 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://floralicense.org/license/
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
19 * @brief Defines storage API of messaging framework
23 #ifndef MAPI_STORAGE_H
24 #define MAPI_STORAGE_H
27 * @section Introduction
28 * - Introduction : Overview on Messaging Storage API
30 * - Program : Messaging Storage API Reference
33 /*==================================================================================================
35 ==================================================================================================*/
37 #include "msg_storage_types.h"
45 * @ingroup MESSAGING_FRAMEWORK
46 * @defgroup MESSAGING_STORAGE_API Messaging Storage API
50 /*==================================================================================================
52 ==================================================================================================*/
57 * Saves a message to the database.
60 * This API is used to save Message object to the database.
62 * \par Typical use case:
63 * Save Message feature is used when the message is to be stored to persistent memory for later reference.
65 * \par Method of function operation:
66 * Sets up the database connection and inserts the message to message table.
68 * \par Sync (or) Async:
69 * This is a Synchronous API.
71 * \par Important notes:
72 * - Mandatory fields of a message structure MUST be valid, otherwise the function will be failed.
74 * \param input - msg_handle_t handle is Message handle.
75 * \param input - msg_message_t msg is a pointer to an msg_message_t structure.
76 * \param input - send_opt is a pointer to an MSG_SENDINGOPT_S structure.
78 * \return Return Type (int(msg_error_t)) \n
79 * - MSG_SUCCESS - Successfully connected to Messaging Service \n
80 * - MSG_ERR_NULL_POINTER - Input parameter is NULL.
81 * - MSG_ERR_STORAGE_ERROR - Storage is error.
83 * \par Prospective clients:
84 * External/Native Apps using Messaging Services.
86 * \par Related functions:
89 * \par Known issues/bugs:
96 * msg_handle_t msgHandle = NULL;
98 * MSG_SENDINGOPT_S sendingOpt = {0};
102 * err = msg_open_msg_handle(&msgHandle);
106 * err = msg_add_message(handle, (msg_message_t) &msg, &sendingOpt);
107 * if( err != MSG_SUCCESS )
109 * printf("err [%d]", err);
116 /*================================================================================================*/
117 int msg_add_message(msg_handle_t handle, const msg_struct_t msg, const msg_struct_t send_opt);
123 * Adds a SyncML message to the database.
126 * This API is used to save a SyncML message to the database.
128 * \par Typical use case:
129 * Save Message feature is used when the message is to be stored to persistent memory for later reference.
131 * \par Method of function operation:
132 * Sets up the database connection and inserts the syncml message to message table.
134 * \par Sync (or) Async:
135 * This is a Synchronous API.
137 * \par Important notes:
138 * - Mandatory fields of a message structure MUST be valid, otherwise the function will be failed.
140 * \param input - msg_handle_t handle is Message handle.
141 * \param input - MSG_SYNCML_MESSAGE_S syncml_msg is a pointer to an MSG_SYNCML_MESSAGE_S structure.
143 * \return Return Type (int(msg_error_t)) \n
144 * - MSG_SUCCESS - Success in operation.
145 * - MSG_ERR_NULL_POINTER - pMsg is NULL.
146 * - MSG_ERR_INVALID_MSGHANDLE - Message handle is invalid.
147 * - MSG_ERR_MSGHANDLE_NOT_CONNECTED - Message handle is not connected.
148 * - MSG_ERR_STORAGE_FULL - Storage is FULL.
149 * - MSG_ERR_COMMUNICATION_ERROR - Communication between client and server is error.
150 * - MSG_ERR_MEMORY_ERROR - Memory is error.
151 * - MSG_ERR_MAX_NUMBER_REACHED - Max number is reached.
152 * - MSG_ERR_PLUGIN - Generic error code for plugin.
154 * \par Prospective clients:
155 * External/Native Apps using Messaging Services.
157 * \par Related functions:
160 * \par Known issues/bugs:
167 * msg_handle_t msgHandle = NULL;
168 * MSG_SYNCML_MESSAGE_S syncMLMsg;
172 * err = msg_open_msg_handle(&msgHandle);
176 * int err = msg_add_syncml_message(msgHandle, &syncMLMsg);
177 * if( err != MSG_SUCCESS )
179 * printf("err [%d]", err);
186 /*================================================================================================*/
187 int msg_add_syncml_message(msg_handle_t handle, const msg_struct_t syncml_msg);
193 * Updates a message in the database.
196 * This API is used to update a message in the database.
198 * \par Typical use case:
199 * Update message feature is used when a previously saved message is to be updated.
201 * \par Method of function operation:
202 * Sets up the database connection and set the message's new values to message table.
204 * \par Sync (or) Async:
205 * This is a Synchronous API.
207 * \par Important notes:
208 * - The function is to update message data for the message indentified by the given msgId as long as the given values are valid.
209 * - msg->msgId MUST NOT be updated because msg->msgId is a unique Id on platform.
210 * - If applications want to move a message between folders, applications SHOULD call msg_move_to_folder.
211 * - msg->storageId MUST NOT be updated.
212 * - The function will return MSG_ERR_INVALID_MESSAGE, if inputting a new msg->storageId.
213 * - If applications want to move the message between storages, applications SHOULD call msg_move_to_storage.
215 * \param input - handle is Message handle.
216 * \param input - msg is a pointer to an msg_message_t structure.
217 * \param input - send_opt is a pointer to an MSG_SENDINGOPT_S structure.
219 * \return Return Type (int(msg_error_t)) \n
220 * - MSG_SUCCESS - Success in operation.
221 * - MSG_ERR_INVALID_PARAMETER - Parameter is invalid.
222 * - MSG_ERR_STORAGE_ERROR - Storage is error.
224 * \par Prospective clients:
225 * External/Native Apps using Messaging Services.
227 * \par Related functions:
230 * \par Known issues/bugs:
237 * msg_handle_t msgHandle = NULL;
238 * MSG_SYNCML_MESSAGE_S syncMLMsg;
239 * MSG_SENDINGOPT_S sendingOpt = {0};
243 * err = msg_open_msg_handle(&msgHandle);
247 * err = msg_update_message(hMsgHandle, pMsg, &sendOpt);
248 * if( err != MSG_SUCCESS )
250 * printf("err [%d]", err);
257 /*================================================================================================*/
258 int msg_update_message(msg_handle_t handle, const msg_struct_t msg, const msg_struct_t send_opt);
264 * Updates a message's read status in the database.
267 * This API is used to Updates a message's read status in the database.
269 * \par Typical use case:
270 * Update message's read status for a previously saved message.
272 * \par Method of function operation:
273 * Sets up the database connection and updates the message's read status to message table.
275 * \par Sync (or) Async:
276 * This is a Synchronous API.
278 * \par Important notes:
281 * \param input - handle is Message handle.
282 * \param input - msg_id is Message ID.
283 * \parem input - read is boolean for indicating whether a message is read or not.
285 * \return Return Type (int(msg_error_t)) \n
286 * - MSG_SUCCESS - Success in operation.
287 * - MSG_ERR_INVALID_PARAMETER - Parameter is invalid.
288 * - MSG_ERR_STORAGE_ERROR - Storage is error.
290 * \par Prospective clients:
291 * External/Native Apps using Messaging Services.
293 * \par Related functions:
296 * \par Known issues/bugs:
303 * msg_handle_t msgHandle = NULL;
304 * MSG_SYNCML_MESSAGE_S syncMLMsg;
305 * MSG_SENDINGOPT_S sendingOpt = {0};
309 * err = msg_open_msg_handle(&msgHandle);
313 * err = msg_update_message(hMsgHandle, pMsg, &sendOpt);
314 * if( err != MSG_SUCCESS )
316 * printf("err [%d]", err);
323 /*================================================================================================*/
324 int msg_update_read_status(msg_handle_t handle, msg_message_id_t msg_id, bool read);
330 * Updates a message's protected status in the database.
333 * This API is used to Updates a message's protected status in the database.
335 * \par Typical use case:
336 * Update message's protected status for a previously saved message.
338 * \par Method of function operation:
339 * Sets up the database connection and updates the message's protected status to message table.
341 * \par Sync (or) Async:
342 * This is a Synchronous API.
344 * \par Important notes:
347 * \param input - handle is Message handle.
348 * \param input - msg_id is Message ID.
349 * \parem input - is_protected is boolean for indicating whether a message is protected or not.
351 * \return Return Type (int(msg_error_t)) \n
352 * - MSG_SUCCESS - Success in operation.
353 * - MSG_ERR_INVALID_PARAMETER - Parameter is invalid.
354 * - MSG_ERR_STORAGE_ERROR - Storage is error.
356 * \par Prospective clients:
357 * External/Native Apps using Messaging Services.
359 * \par Related functions:
362 * \par Known issues/bugs:
369 * msg_handle_t msgHandle = NULL;
370 * MSG_SYNCML_MESSAGE_S syncMLMsg;
371 * MSG_SENDINGOPT_S sendingOpt = {0};
375 * err = msg_open_msg_handle(&msgHandle);
379 * err = msg_update_protected_status(hMsgHandle, 0, true);
380 * if( err != MSG_SUCCESS )
382 * printf("err [%d]", err);
389 /*================================================================================================*/
390 int msg_update_protected_status(msg_handle_t handle, msg_message_id_t msg_id, bool is_protected);
396 * Deletes a message by Message ID from the database.
399 * This API is used to delete a message by Message ID from the database.
401 * \par Typical use case:
402 * Deletes a previously saved message from the database.
404 * \par Method of function operation:
405 * Sets up the database connection and deletes a message by Message ID from the message table.
407 * \par Sync (or) Async:
408 * This is a Synchronous API.
410 * \par Important notes:
413 * \param input - handle is Message handle.
414 * \param input - msg_id is the ID of the Message to be deleted.
416 * \return Return Type (int(msg_error_t)) \n
417 * - MSG_SUCCESS - Success in operation.
418 * - MSG_ERR_INVALID_PARAMETER - Parameter is invalid.
419 * - MSG_ERR_STORAGE_ERROR - Storage is error.
421 * \par Prospective clients:
422 * External/Native Apps using Messaging Services.
424 * \par Related functions:
427 * \par Known issues/bugs:
434 * msg_handle_t msgHandle = NULL;
435 * MSG_SYNCML_MESSAGE_S syncMLMsg;
436 * MSG_SENDINGOPT_S sendingOpt = {0};
440 * err = msg_open_msg_handle(&msgHandle);
444 * err = msg_delete_message(msgHandle, 0);
445 * if( err != MSG_SUCCESS )
447 * printf("err [%d]", err);
454 /*================================================================================================*/
455 int msg_delete_message(msg_handle_t handle, msg_message_id_t msg_id);
461 * Deletes all messages in the specified folder from the database.
464 * This API is used to delete all messages in the specified folder from the database.
466 * \par Typical use case:
467 * Deletes all messages in the specified folder from the database.
469 * \par Method of function operation:
470 * Sets up the database connection and Deletes all messages in the specified folder from the message table.
472 * \par Sync (or) Async:
473 * This is a Synchronous API.
475 * \par Important notes:
478 * \param input - handle is Message handle.
479 * \param input - folder_id is the ID of the folder to be deleted.
481 * \return Return Type (int(msg_error_t)) \n
482 * - MSG_SUCCESS - Success in operation.
483 * - MSG_ERR_INVALID_PARAMETER - Parameter is invalid.
484 * - MSG_ERR_STORAGE_ERROR - Storage is error.
486 * \par Prospective clients:
487 * External/Native Apps using Messaging Services.
489 * \par Related functions:
492 * \par Known issues/bugs:
499 * msg_handle_t msgHandle = NULL;
500 * MSG_SYNCML_MESSAGE_S syncMLMsg;
501 * MSG_SENDINGOPT_S sendingOpt = {0};
505 * err = msg_open_msg_handle(&msgHandle);
509 * err = msg_delete_all_msgs_in_folder(msgHandle, MSG_DRAFT_ID);
510 * if( err != MSG_SUCCESS )
512 * printf("err [%d]", err);
519 /*================================================================================================*/
520 int msg_delete_all_msgs_in_folder(msg_handle_t handle, msg_folder_id_t folder_id, bool bOnlyDB);
527 * Moves a message to the specified folder in the database.
530 * This API is used to move a message to the specified folder the database.
532 * \par Typical use case:
533 * Deletes all messages in the specified folder from the database.
535 * \par Method of function operation:
536 * Sets up the database connection and Deletes all messages in the specified folder from the message table.
538 * \par Sync (or) Async:
539 * This is a Synchronous API.
541 * \par Important notes:
544 * \param input - handle is Message handle.
545 * \param input - msg_id is the ID of the message to be moved.
546 * \param input - dest_folder_id is the ID of the destination folder.
548 * \return Return Type (int(msg_error_t)) \n
549 * - MSG_SUCCESS - Success in operation.
550 * - MSG_ERR_INVALID_PARAMETER - Parameter is invalid.
551 * - MSG_ERR_STORAGE_ERROR - Storage is error.
553 * \par Prospective clients:
554 * External/Native Apps using Messaging Services.
556 * \par Related functions:
559 * \par Known issues/bugs:
566 * msg_handle_t msgHandle = NULL;
567 * MSG_SYNCML_MESSAGE_S syncMLMsg;
568 * MSG_SENDINGOPT_S sendingOpt = {0};
572 * err = msg_open_msg_handle(&msgHandle);
576 * err = msg_move_msg_to_folder(hMsgHandle, 0, MSG_OUTBOX_ID);
577 * if( err != MSG_SUCCESS )
579 * printf("err [%d]", err);
586 /*================================================================================================*/
587 int msg_move_msg_to_folder(msg_handle_t handle, msg_message_id_t msg_id, msg_folder_id_t dest_folder_id);
593 * Moves a message to the other storage.
596 * This API is usd to move a message to the other storage.
598 * \par Typical use case:
599 * Moves a message to the other storage type.
601 * \par Method of function operation:
602 * Sets up the database connection and moves a messages to specified storage type.
604 * \par Sync (or) Async:
605 * This is a Synchronous API.
607 * \par Important notes:
610 * \param input - handle is Message handle.
611 * \param input - msg_id is the ID of the message to be moved.
612 * \param input - storage_id is the ID of the destination storage.
614 * \return Return Type (int(msg_error_t)) \n
615 * - MSG_SUCCESS - Success in operation.
616 * - MSG_ERR_INVALID_PARAMETER - Parameter is invalid.
617 * - MSG_ERR_STORAGE_ERROR - Storage is error.
619 * \par Prospective clients:
620 * External/Native Apps using Messaging Services.
622 * \par Related functions:
625 * \par Known issues/bugs:
632 * msg_handle_t msgHandle = NULL;
633 * MSG_SYNCML_MESSAGE_S syncMLMsg;
634 * MSG_SENDINGOPT_S sendingOpt = {0};
638 * err = msg_open_msg_handle(&msgHandle);
642 * err = msg_move_msg_to_storage( msgHandle, 0, MSG_STORAGE_PHONE);
643 * if( err != MSG_SUCCESS )
645 * printf("err [%d]", err);
652 /*================================================================================================*/
653 int msg_move_msg_to_storage(msg_handle_t handle, msg_message_id_t msg_id, msg_storage_id_t storage_id);
659 * Gets the number of messages in the specified folder from the database.
662 * This API is used to get the number of messages in the specified folder from the database.
664 * \par Typical use case:
665 * Gets the number of messages in the specified folder from the database.
667 * \par Method of function operation:
668 * Sets up the database connection and Gets the number of messages in the specified folder from the message table.
670 * \par Sync (or) Async:
671 * This is a Synchronous API.
673 * \par Important notes:
676 * \param input - handle is Message handle.
677 * \param input - folder_id is the ID of the folder to be counted.
678 * \param output - count_info is a pointer to an MSG_COUNT_INFO_S structure.
680 * \return Return Type (int(msg_error_t)) \n
681 * - MSG_SUCCESS - Success in operation.
682 * - MSG_ERR_INVALID_PARAMETER - Parameter is invalid.
683 * - MSG_ERR_STORAGE_ERROR - Storage is error.
685 * \par Prospective clients:
686 * External/Native Apps using Messaging Services.
688 * \par Related functions:
691 * \par Known issues/bugs:
698 * msg_handle_t msgHandle = NULL;
699 * MSG_COUNT_INFO_S countInfo;
703 * err = msg_open_msg_handle(&msgHandle);
707 * err = msg_count_message(msgHandle, MSG_OUTBOX_ID, &countInfo)
708 * if( err != MSG_SUCCESS )
710 * printf("err [%d]", err);
717 /*================================================================================================*/
718 int msg_count_message(msg_handle_t handle, msg_folder_id_t folder_id, msg_struct_t count_info);
724 * Gets the number of messages of specific message type.
727 * This API is used to get the number of messages of specific type.
729 * \par Typical use case:
730 * Gets the count of message of specific types such as SMS, MMS.
732 * \par Method of function operation:
733 * Sets up the database connection and queries the number of messages in the specified folder from the message table based on required message type.
735 * \par Sync (or) Async:
736 * This is a Synchronous API.
738 * \par Important notes:
741 * \param input - handle is Message handle.
742 * \param input - msg_type is the message type to be counted.
743 * \param output - msg_count is a pointer to the number of message.
745 * \return Return Type (int(msg_error_t)) \n
746 * - MSG_SUCCESS - Success in operation.
747 * - MSG_ERR_INVALID_PARAMETER - Parameter is invalid.
748 * - MSG_ERR_STORAGE_ERROR - Storage is error.
750 * \par Prospective clients:
751 * External/Native Apps using Messaging Services.
753 * \par Related functions:
756 * \par Known issues/bugs:
763 * msg_handle_t msgHandle = NULL;
764 * MSG_COUNT_INFO_S countInfo;
768 * err = msg_open_msg_handle(&msgHandle);
772 * err = msg_count_msg_by_type(msgHandle, MSG_TYPE_SMS, &countInfo);
773 * if( err != MSG_SUCCESS )
775 * printf("err [%d]", err);
782 /*================================================================================================*/
783 int msg_count_msg_by_type(msg_handle_t handle, msg_message_type_t msg_type, int *msg_count);
789 * Gets the number of messages of specific address.
792 * This API is used to get the number of messages from a specific address.
794 * \par Typical use case:
795 * Get the count of messages from the specified address
797 * \par Method of function operation:
798 * Sets up the database connection and queries the number of messages based on address from the message table.
800 * \par Sync (or) Async:
801 * This is a Synchronous API.
803 * \par Important notes:
804 * - If addr_info is NULL, nothing happens.
806 * \param input - handle is Message handle.
807 * \param input - addr_info is a pointer to an MSG_ADDRESS_INFO_LIST_S structure.
808 * \param input - msg_thread_count_list is a pointer to an MSG_THREAD_COUNT_INFO_S structure.
810 * \return Return Type (int(msg_error_t)) \n
811 * - MSG_SUCCESS - Success in operation.
812 * - MSG_ERR_INVALID_PARAMETER - Parameter is invalid.
813 * - MSG_ERR_STORAGE_ERROR - Storage is error.
815 * \par Prospective clients:
816 * External/Native Apps using Messaging Services.
818 * \par Related functions:
821 * \par Known issues/bugs:
828 * msg_handle_t msgHandle = NULL;
829 * MSG_COUNT_INFO_S countInfo;
833 * err = msg_open_msg_handle(&msgHandle);
837 * err = msg_count_msg_by_type(msgHandle, MSG_TYPE_SMS, &countInfo);
838 * if( err != MSG_SUCCESS )
840 * printf("err [%d]", err);
847 /*================================================================================================*/
848 int msg_count_msg_by_contact(msg_handle_t handle, const msg_struct_t addr_info, msg_struct_t msg_thread_count_list);
854 * Gets the detail information of a message from the database.
857 * This API is used to get the number of messages from a specific address.
859 * \par Typical use case:
860 * Get the count of messages from the specified address
862 * \par Method of function operation:
863 * Sets up the database connection and queries the number of messages based on address from the message table.
865 * \par Sync (or) Async:
866 * This is a Synchronous API.
868 * \par Important notes:
869 * - If addr_info is NULL, nothing happens.
870 * - Applications need to call msg_release_message to free the memory.
871 * - However, if this function is failed, the memory for the message is NOT allocated in this function.
873 handle is Message handle.
874 * \param input - handle is Message handle.
875 * \param input - msg_id is the ID of the Message to be returned.
876 * \param output - msg is a pointer to an msg_message_t structure.
877 * \param input - send_opt is a pointer to an MSG_SENDINGOPT_S structure.
879 * \return Return Type (int(msg_error_t)) \n
880 * - MSG_SUCCESS - Success in operation.
881 * - MSG_ERR_INVALID_PARAMETER - Parameter is invalid.
882 * - MSG_ERR_STORAGE_ERROR - Storage is error.
884 * \par Prospective clients:
885 * External/Native Apps using Messaging Services.
887 * \par Related functions:
890 * \par Known issues/bugs:
897 * msg_handle_t msgHandle = NULL;
900 * msg_message_t msg = msg_new_message();
901 * MSG_SENDINGOPT_S sendOpt = {0, };
903 * err = msg_get_message(msgHandle, 0, msg, &sendOpt);
904 * if( err != MSG_SUCCESS )
906 * printf("err [%d]", err);
913 /*================================================================================================*/
914 int msg_get_message(msg_handle_t handle, msg_message_id_t msg_id, msg_struct_t msg, msg_struct_t send_opt);
916 int msg_get_conversation(msg_handle_t handle, msg_message_id_t msg_id, msg_struct_t conv);
917 int msg_get_vobject_data(msg_handle_t handle, msg_message_id_t msg_id, void** encoded_data);
922 * Returns the common information list of messages with selected folder id.
925 * This API is used to get the common information list of messages with selected folder id from database.
927 * \par Typical use case:
928 * Get the common information from the specified folder from database.
930 * \par Method of function operation:
931 * Sets up the database connection and queries the common information based on selected folder id from the message and folder tables.
933 * \par Sync (or) Async:
934 * This is a Synchronous API.
936 * \par Important notes:
937 * - The memory for a message will be allocated in this function.
938 * - Applications need to call msg_release_folder_view_list to free the memory.
939 * - However, if this function is failed, the memory for the message is NOT allocated in this function.
941 * \param input - handle is Message handle.
942 * \param input - folder_id is the ID of the folder to be returned.
943 * \param input - sort_rule indicates a sort type and sort order for querying messages.
944 * \param output - msg_folder_view_list is a pointer to an MSG_FOLDER_VIEW_LIST_S structure.
946 * \return Return Type (int(msg_error_t)) \n
947 * - MSG_SUCCESS - Success in operation.
948 * - MSG_ERR_INVALID_PARAMETER - Parameter is invalid.
949 * - MSG_ERR_STORAGE_ERROR - Storage is error.
951 * \par Prospective clients:
952 * External/Native Apps using Messaging Services.
954 * \par Related functions:
957 * \par Known issues/bugs:
964 * msg_handle_t msgHandle = NULL;
967 * MSG_FOLDER_VIEW_LIST_S folderViewList;
969 * err = msg_get_folder_view_list(hMsgHandle, 0, NULL, &folderViewList);
970 * if( err != MSG_SUCCESS )
972 * printf("err [%d]", err);
979 /*================================================================================================*/
980 int msg_get_folder_view_list(msg_handle_t handle, msg_folder_id_t folder_id, const msg_struct_t sort_rule, msg_struct_list_s *msg_folder_view_list);
986 * Returns the information of all peers to whom messages have been sent or recieved.
989 * This API is used to get the information of all peers to whom messages have been sent or recieved.
991 * \par Typical use case:
992 * Get the common information from the specified folder from database.
994 * \par Method of function operation:
995 * Frees the memory occupied by MSG_FOLDER_VIEW_LIST_S object and its members.
997 * \par Sync (or) Async:
998 * This is a Synchronous API.
1000 * \par Important notes:
1001 * - The memory for a list will be allocated in this function.
1002 * - Applications need to call msg_release_thread_view_list to free the memory.
1003 * - However, if this function is failed, the memory for a list is NOT allocated in this function.
1005 * \param input - handle is Message handle.
1006 * \param input - sort_rule indicates a sort type and sort order for querying messages.
1007 * \param output - msg_thread_view_list is a pointer to an msg_struct_list_s structure.
1009 * \return Return Type (int(msg_error_t)) \n
1010 * - MSG_SUCCESS - Success in operation.
1011 * - MSG_ERR_INVALID_PARAMETER - Parameter is invalid.
1012 * - MSG_ERR_STORAGE_ERROR - Storage is error.
1014 * \par Prospective clients:
1015 * External/Native Apps using Messaging Services.
1017 * \par Related functions:
1020 * \par Known issues/bugs:
1027 * msg_handle_t msgHandle = NULL;
1030 * msg_struct_list_s threadViewList;
1032 * err = msg_get_thread_view_list(hMsgHandle, NULL, &threadViewList);
1034 * msg_release_thread_view_list(&threadViewList);
1035 * if( err != MSG_SUCCESS )
1037 * printf("err [%d]", err);
1042 /*================================================================================================*/
1043 int msg_get_thread_view_list(msg_handle_t handle, const msg_struct_t sort_rule, msg_struct_list_s *msg_thread_view_list);
1049 * Returns the common information list of messages with selected thread_id.
1052 * This API is used to get the common information list of messages with selected thread_id.
1054 * \par Typical use case:
1055 * Gets the common information list of messages with the selected thread id from the database.
1057 * \par Method of function operation:
1058 * Connects to the database and queries the common infomation of list messages with the provided thread id.
1060 * \par Sync (or) Async:
1061 * This is a Synchronous API.
1063 * \par Important notes:
1064 * - The memory for a list will be allocated in this function.
1065 * - Applications need to call msg_release_conversation_view_list to free the memory.
1066 * - However, if this function is failed, the memory for a list is NOT allocated in this function.
1068 * \param input - hMsgHandle is Message handle.
1069 * \param input - thread_id is the ID of the thread to be returned.
1070 * \param output - msg_conv_view_list is a pointer to an MSG_CONV_VIEW_LIST_S structure.
1072 * \return Return Type (int(msg_error_t)) \n
1073 * - MSG_SUCCESS - Success in operation.
1074 * - MSG_ERR_INVALID_PARAMETER - Parameter is invalid.
1075 * - MSG_ERR_STORAGE_ERROR - Storage is error.
1077 * \par Prospective clients:
1078 * External/Native Apps using Messaging Services.
1080 * \par Related functions:
1083 * \par Known issues/bugs:
1090 * msg_handle_t msgHandle = NULL;
1091 * msg_error_t err = MSG_SUCCESS;
1093 * MSG_CONV_VIEW_LIST_S convViewList;
1095 * err = msg_get_conversation_view_list(hMsgHandle, ThreadId, &convViewList);
1096 * if( err != MSG_SUCCESS )
1098 * printf("err [%d]", err);
1101 * msg_release_conversation_view_list(&convViewList);
1105 /*================================================================================================*/
1106 int msg_get_conversation_view_list(msg_handle_t handle, msg_thread_id_t thread_id, msg_struct_list_s *msg_conv_view_list);
1112 * Deletes all the Messages Sent/Received from the selected list.
1115 * This API is used to delete all the Messages Sent/Received from the selected list.
1117 * \par Typical use case:
1118 * Deletes all messages sent/received from the selected list.
1120 * \par Method of function operation:
1121 * Sets up the database connection and deletes all messages sent/received from a selected list.
1123 * \par Sync (or) Async:
1124 * This is a Synchronous API.
1126 * \par Important notes:
1127 * - If addr_info is NULL, nothing happens.
1129 * \param input - handle is Message handle.
1130 * \param input - thread_id is the ID of the thread to be deleted.
1132 * \return Return Type (int(msg_error_t)) \n
1133 * - MSG_SUCCESS - Success in operation.
1134 * - MSG_ERR_INVALID_PARAMETER - Parameter is invalid.
1135 * - MSG_ERR_STORAGE_ERROR - Storage is error.
1137 * \par Prospective clients:
1138 * External/Native Apps using Messaging Services.
1140 * \par Related functions:
1143 * \par Known issues/bugs:
1150 * msg_handle_t msgHandle = NULL;
1151 * MSG_SYNCML_MESSAGE_S syncMLMsg;
1152 * MSG_SENDINGOPT_S sendingOpt = {0};
1156 * err = msg_open_msg_handle(&msgHandle);
1160 * err = msg_delete_thread_message_list(hMsgHandle, 0);
1161 * if( err != MSG_SUCCESS )
1163 * printf("err [%d]", err);
1169 /*================================================================================================*/
1170 int msg_delete_thread_message_list(msg_handle_t handle, msg_thread_id_t thread_id, bool include_protected_msg);
1176 * Adds a new folder.
1179 * This API is used to add a new folder.
1181 * \par Typical use case:
1182 * Adds a new folder with the specified folder info
1184 * \par Method of function operation:
1185 * Sets up the database connection and add a new folder to the folder table.
1187 * \par Sync (or) Async:
1188 * This is a Synchronous API.
1190 * \par Important notes:
1193 * \param - handle is Message handle.
1194 * \param - folder_info is a pointer to an MSG_FOLDER_INFO_S structure.
1196 * \return Return Type (int(msg_error_t)) \n
1197 * - MSG_SUCCESS - Success in operation.
1198 * - MSG_ERR_INVALID_PARAMETER - Parameter is invalid.
1199 * - MSG_ERR_STORAGE_ERROR - Storage is error.
1201 * \par Prospective clients:
1202 * External/Native Apps using Messaging Services.
1204 * \par Related functions:
1207 * \par Known issues/bugs:
1214 * msg_handle_t msgHandle = NULL;
1216 * MSG_FOLDER_INFO_S folderInfo;
1218 * err = msg_open_msg_handle(&msgHandle);
1220 * folderInfo.folderId = 1;
1221 * folderInfo.folderType = MSG_FOLDER_TYPE_USER_DEF;
1224 * err = msg_add_folder(hMsgHandle, &folderInfo);
1225 * if( err != MSG_SUCCESS )
1227 * printf("err [%d]", err);
1233 /*================================================================================================*/
1234 int msg_add_folder(msg_handle_t handle, const msg_struct_t folder_info);
1240 * Updates the folder info.
1243 * This API is used to add a new folder.
1245 * \par Typical use case:
1246 * Adds a new folder with the specified folder info
1248 * \par Method of function operation:
1249 * Sets up the database connection and add a new folder to the folder table.
1251 * \par Sync (or) Async:
1252 * This is a Synchronous API.
1254 * \par Important notes:
1257 * \param - handle is Message handle.
1258 * \param - folder_info is a pointer to an MSG_FOLDER_INFO_S structure.
1260 * \return Return Type (int(msg_error_t)) \n
1261 * - MSG_SUCCESS - Success in operation.
1262 * - MSG_ERR_INVALID_PARAMETER - Parameter is invalid.
1263 * - MSG_ERR_STORAGE_ERROR - Storage is error.
1265 * \par Prospective clients:
1266 * External/Native Apps using Messaging Services.
1268 * \par Related functions:
1271 * \par Known issues/bugs:
1278 * msg_handle_t msgHandle = NULL;
1280 * MSG_FOLDER_INFO_S folderInfo;
1282 * err = msg_open_msg_handle(&msgHandle);
1284 * folderInfo.folderId = 2;
1285 * folderInfo.folderType = MSG_FOLDER_TYPE_USER_DEF;
1287 * err = msg_update_folder(msgHandle, &folderInfo);
1288 * if( err != MSG_SUCCESS )
1290 * printf("err [%d]", err);
1296 /*================================================================================================*/
1297 int msg_update_folder(msg_handle_t handle, const msg_struct_t folder_info);
1303 * Deletes an exisiting folder.
1306 * This API is used to delete an existing folder.
1308 * \par Typical use case:
1309 * Deletes an existing folder.
1311 * \par Method of function operation:
1312 * Sets up the database connection and deletes an existing folder to the folder table.
1314 * \par Sync (or) Async:
1315 * This is a Synchronous API.
1317 * \par Important notes:
1320 * \param input - handle is Message handle.
1321 * \param input - folder_id is the ID of the folder to be deleted.
1323 * \return Return Type (int(msg_error_t)) \n
1324 * - MSG_SUCCESS - Success in operation.
1325 * - MSG_ERR_INVALID_PARAMETER - Parameter is invalid.
1326 * - MSG_ERR_STORAGE_ERROR - Storage is error.
1328 * \par Prospective clients:
1329 * External/Native Apps using Messaging Services.
1331 * \par Related functions:
1334 * \par Known issues/bugs:
1341 * msg_handle_t msgHandle = NULL;
1342 * err = msg_open_msg_handle(&msgHandle);
1345 * err = msg_delete_folder(hMsgHandle, MSG_INBOX_ID);
1346 * if( err != MSG_SUCCESS )
1348 * printf("err [%d]", err);
1354 /*================================================================================================*/
1355 int msg_delete_folder(msg_handle_t handle, msg_folder_id_t folder_id);
1361 * Returns the information list of folders.
1364 * This API is used to get the information list of folders.
1366 * \par Typical use case:
1367 * Gets the folder list information.
1369 * \par Method of function operation:
1370 * Sets up the database connection and queries for the folder list information.
1372 * \par Sync (or) Async:
1373 * This is a Synchronous API.
1375 * \par Important notes:
1378 * \param input - handle is Message handle.
1379 * \param output - folder_list is a pointer to an msg_struct_list_s structure.
1381 * \return Return Type (int(msg_error_t)) \n
1382 * - MSG_SUCCESS - Success in operation.
1383 * - MSG_ERR_INVALID_PARAMETER - Parameter is invalid.
1384 * - MSG_ERR_STORAGE_ERROR - Storage is error.
1386 * \par Prospective clients:
1387 * External/Native Apps using Messaging Services.
1389 * \par Related functions:
1392 * \par Known issues/bugs:
1399 * msg_handle_t msgHandle = NULL;
1400 * msg_struct_list_s folderList;
1402 * err = msg_open_msg_handle(&msgHandle);
1405 * err = msg_get_folder_list(msgHandle, &folderList);
1406 * if( err != MSG_SUCCESS )
1408 * printf("err [%d]", err);
1412 * msg_release_folder_list(&folderList);
1415 /*================================================================================================*/
1416 int msg_get_folder_list(msg_handle_t handle, msg_struct_list_s *folder_list);
1422 * Creates the specified number of messages in database.
1425 * This API is used to generate specified number of messages in the database
1427 * \par Typical use case:
1428 * Generate large number of messages in the database.
1430 * \par Method of function operation:
1431 * Creates the specified number of messages in database for specified message type in the specified folder
1433 * \par Sync (or) Async:
1434 * This is a Synchronous API.
1436 * \par Important notes:
1439 * \param input - handle is Message handle.
1440 * \param input - msg_type is one of enum _MSG_MESSAGE_TYPE_E.
1441 * \param input - folder_id is the folder for the test messages.
1442 * \param input - num_msg is the number of messages.
1444 * \return Return Type (int(msg_error_t)) \n
1445 * - MSG_SUCCESS Success in operation.
1446 * - MSG_ERR_INVALID_MSGHANDLE Parameter is invalid.
1447 * - MSG_ERR_INVALID_FOLDER_ID Storage is error.
1449 * \par Prospective clients:
1450 * External/Native Apps using Messaging Services.
1452 * \par Related functions:
1455 * \par Known issues/bugs:
1462 * msg_handle_t msgHandle = NULL;
1463 * msg_struct_list_s folderList;
1465 * err = msg_open_msg_handle(&msgHandle);
1468 * err = msg_generate_message(msgHandle, MSG_TYPE_SMS, MSG_INBOX_ID, 100);
1469 * if( err != MSG_SUCCESS )
1471 * printf("err [%d]", err);
1477 /*================================================================================================*/
1478 int msg_generate_message(msg_handle_t handle, msg_message_type_t msg_type, msg_folder_id_t folder_id, unsigned int num_msg);
1479 int msg_generate_sms(msg_handle_t handle, msg_folder_id_t folder_id, unsigned int num_msg) DEPRECATED;
1485 * Returns the Message Data to be used by the Quick Panel.
1488 * This API is used to get the Message Datato be used by the Quick Panel.
1490 * \par Typical use case:
1491 * Quick panel needs the message information to show new message notification.
1493 * \par Method of function operation:
1494 * Connects to database and queries for information needed by the quick panel.
1496 * \par Sync (or) Async:
1497 * This is a Synchronous API.
1499 * \par Important notes:
1502 * \param input - handle is Message handle.
1503 * \param input - type is the type of message that Quick Panel need.
1504 * \param output - msg is a pointer to an msg_message_t structure.
1506 * \return Return Type (int(msg_error_t)) \n
1507 * - MSG_SUCCESS Success in operation.
1508 * - MSG_ERR_INVALID_MSGHANDLE Parameter is invalid.
1509 * - MSG_ERR_INVALID_FOLDER_ID Storage is error.
1511 * \par Prospective clients:
1512 * External/Native Apps using Messaging Services.
1514 * \par Related functions:
1517 * \par Known issues/bugs:
1524 * msg_handle_t msgHandle = NULL;
1525 * msg_message_t msgInfo;
1527 * err = msg_open_msg_handle(&msgHandle);
1530 * err = msg_get_quick_panel_data(msgHandle, MSG_QUICKPANEL_SMS, msgInfo);
1531 * if( err != MSG_SUCCESS )
1533 * printf("err [%d]", err);
1539 /*================================================================================================*/
1540 int msg_get_quick_panel_data(msg_handle_t handle, msg_quickpanel_type_t type, msg_struct_t msg);
1546 * Resets the Messaging database.
1549 * This API is used to reset the messaging database.
1551 * \par Typical use case:
1552 * Completely delete the messaging database.
1554 * \par Method of function operation:
1555 * Connects to database and deletes all the messaging tables.
1557 * \par Sync (or) Async:
1558 * This is a Synchronous API.
1560 * \par Important notes:
1563 * \param input - handle is Message handle.
1565 * \return Return Type (int(msg_error_t)) \n
1566 * - MSG_SUCCESS Success in operation.
1567 * - MSG_ERR_INVALID_PARAMETER Parameter is invalid.
1568 * - MSG_ERR_STORAGE_ERROR Storage is error.
1570 * \par Prospective clients:
1571 * External/Native Apps using Messaging Services.
1573 * \par Related functions:
1576 * \par Known issues/bugs:
1583 * msg_handle_t msgHandle = NULL;
1584 * msg_error_t err = MSG_SUCCESS;
1585 * err = msg_open_msg_handle(&msgHandle);
1588 * err = msg_reset_database(msgHandle);
1589 * if (err != MSG_SUCCESS)
1591 * printf("err [%d]", err);
1597 /*================================================================================================*/
1598 int msg_reset_database(msg_handle_t handle);
1604 * Returns the total size used for message contents.
1607 * This API is used to get the total size used for message contents.
1609 * \par Typical use case:
1610 * To get the total space used by message contents.
1612 * \par Method of function operation:
1613 * Uses linux system calls to query the space used by message contents.
1615 * \par Sync (or) Async:
1616 * This is a Synchronous API.
1618 * \par Important notes:
1621 * \param input - handle is Message handle.
1622 * \param output - memsize is a pointer to the size.
1624 * \return Return Type (int(msg_error_t)) \n
1625 * - MSG_SUCCESS Success in operation.
1626 * - MSG_ERR_INVALID_PARAMETER Parameter is invalid.
1627 * - MSG_ERR_STORAGE_ERROR Storage is error.
1629 * \par Prospective clients:
1630 * External/Native Apps using Messaging Services.
1632 * \par Related functions:
1635 * \par Known issues/bugs:
1642 * msg_handle_t msgHandle = NULL;
1644 * err = msg_open_msg_handle(&msgHandle);
1647 * err = msg_get_mem_size(msgHandle, &memsize);
1648 * if( err != MSG_SUCCESS )
1650 * printf("err [%d]", err);
1656 /*================================================================================================*/
1657 int msg_get_mem_size(msg_handle_t handle, unsigned int* memsize);
1662 * Backup messages to storage.
1665 * This API is used to backup messages to storage.
1667 * \par Typical use case:
1668 * Backup messages to storage.
1670 * \par Method of function operation:
1671 * Reads all the messages from Messaging database and writes to storage in V-Message format
1673 * \par Sync (or) Async:
1674 * This is a Synchronous API.
1676 * \par Important notes:
1679 * \param input - msg_handle_t handle is Message handle.
1680 * \param input - msg_message_backup_type_t type is backup_type.
1681 * \param input - backup_filepath is path to backup message.
1683 * \return Return Type int (msg_error_t) \n
1684 * - MSG_SUCCESS Success in operation.
1685 * - MSG_ERR_INVALID_PARAMETER Parameter is invalid.
1686 * - MSG_ERR_STORAGE_ERROR Storage is error.
1688 * \par Prospective clients:
1689 * External/Native Apps using Messaging Services.
1691 * \par Related functions:
1694 * \par Known issues/bugs:
1701 * msg_handle_t msgHandle = NULL;
1703 * msg_message_backup_type_t type = MSG_BACKUP_TYPE_MMS;
1704 * const char *filepath = "/backup_mms"
1707 * err = msg_backup_message(&msgHandle, type, filepath);
1711 /*================================================================================================*/
1712 int msg_backup_message(msg_handle_t handle, msg_message_backup_type_t type, const char *backup_filepath);
1718 * Restore messages from backed up messages.
1721 * This API is used to restore messages from backed up messages.
1723 * \par Typical use case:
1724 * Restore messages from previously backed up messages.
1726 * \par Method of function operation:
1727 * Reads the previously backup up messages and restores the database.
1729 * \par Sync (or) Async:
1730 * This is a Synchronous API.
1732 * \par Important notes:
1735 * \param input - msg_handle_t handle is Message handle.
1736 * \param input - backup_filepath is path of backup file for restore.
1739 * \return Return Type int (msg_error_t) \n
1740 * - MSG_SUCCESS Success in operation.
1741 * - MSG_ERR_INVALID_PARAMETER Parameter is invalid.
1742 * - MSG_ERR_STORAGE_ERROR Storage is error.
1744 * \par Prospective clients:
1745 * External/Native Apps using Messaging Services.
1747 * \par Related functions:
1750 * \par Known issues/bugs:
1757 * msg_handle_t msgHandle = NULL;
1759 * const char *filepath = "/backup_mms"
1761 * err = msg_restore_message(&msgHandle, filepath);
1765 /*================================================================================================*/
1766 int msg_restore_message(msg_handle_t handle, const char *backup_filepath);
1772 * Search messages or addresses which including a string that applcation want to find.
1775 * This API is used to search messages or addresses from storage.
1777 * \par Typical use case:
1778 * Search messages or addresses from storage.
1780 * \par Method of function operation:
1781 * search messages or addresses from storage.
1783 * \par Sync (or) Async:
1784 * This is a Synchronous API.
1786 * \par Important notes:
1789 * \param input - msg_handle_t handle is Message handle.
1790 * \param input - search_string is the string to search.
1791 * \param output - msg_thread_view_list is a pointer to an msg_struct_list_s structure.
1793 * \return Return Type int (msg_error_t) \n
1794 * - MSG_SUCCESS Success in operation.
1795 * - MSG_ERR_INVALID_PARAMETER Parameter is invalid.
1796 * - MSG_ERR_STORAGE_ERROR Storage is error.
1798 * \par Prospective clients:
1799 * External/Native Apps using Messaging Services.
1801 * \par Related functions:
1804 * \par Known issues/bugs:
1811 * msg_handle_t msgHandle = NULL;
1812 * msg_error_t err = MSG_SUCCESS;
1814 * char* search_string = "hello";
1815 * msg_struct_list_s threadViewList;
1817 * err = msg_search_message_for_thread_view(&msgHandle, search_string, &threadViewList);
1819 * if( err != MSG_SUCCESS )
1821 * printf("err [%d]", err);
1827 /*================================================================================================*/
1828 int msg_search_message_for_thread_view(msg_handle_t handle, const char *search_string, msg_struct_list_s *msg_thread_view_list);
1834 * Search messages or addresses which including a string that applcation want to find.
1837 * This API is used to search messages or addresses from storage.
1839 * \par Typical use case:
1840 * Search messages or addresses from storage.
1842 * \par Method of function operation:
1843 * search messages or addresses from storage.
1845 * \par Sync (or) Async:
1846 * This is a Synchronous API.
1848 * \par Important notes:
1851 * \param input - msg_handle_t handle is Message handle.
1852 * \param input - search_string is the string to search.
1853 * \param input - offset is the offset of the search result.
1854 * \param input - limit is the limit of the search result.
1855 * \param output - msg_list is a pointer to an msg_struct_list_s structure.
1857 * \return Return Type int (msg_error_t) \n
1858 * - MSG_SUCCESS Success in operation.
1859 * - MSG_ERR_INVALID_PARAMETER Parameter is invalid.
1860 * - MSG_ERR_STORAGE_ERROR Storage is error.
1862 * \par Prospective clients:
1863 * External/Native Apps using Messaging Services.
1865 * \par Related functions:
1868 * \par Known issues/bugs:
1875 * msg_handle_t msgHandle = NULL;
1876 * msg_error_t err = MSG_SUCCESS;
1878 * msg_struct_list_s msg_list;
1882 * MSG_SEARCH_CONDITION_S searchCon;
1884 * searchCon.msgType = MSG_TYPE_SMS;
1885 * searchCon.folderId = MSG_INBOX_ID;
1886 * searchCon.pSearchVal = "keyString";
1887 * searchCon.pAddressVal = "01000000000";
1890 * err = msg_search_message(hMsgHandle, &searchCon, offset, limit, &msgList);
1892 * if( err != MSG_SUCCESS )
1894 * printf("err [%d]", err);
1900 /*================================================================================================*/
1901 int msg_search_message(msg_handle_t handle, const msg_struct_t msg_search_conditions, int offset, int limit, msg_struct_list_s *msg_list);
1906 * Get reject message list that application wants to find by phone number.
1909 * This API is used to get reject message list from storage.
1911 * \par Typical use case:
1912 * Get reject message list from storage.
1914 * \par Method of function operation:
1915 * Get reject message list from storage.
1917 * \par Sync (or) Async:
1918 * This is a Synchronous API.
1920 * \par Important notes:
1923 * \param input - msg_handle_t handle is Message handle.
1924 * \param input - phone_num is the string of phone number to find.
1925 * \param output - msg_reject_msg_list is a pointer to an msg_struct_list_s structure.
1927 * \return Return Type int (msg_error_t) \n
1928 * - MSG_SUCCESS Success in operation.
1929 * - MSG_ERR_INVALID_PARAMETER Parameter is invalid.
1930 * - MSG_ERR_STORAGE_ERROR Storage is error.
1932 * \par Prospective clients:
1933 * External/Native Apps using Messaging Services.
1935 * \par Related functions:
1938 * \par Known issues/bugs:
1945 * msg_handle_t msgHandle = NULL;
1946 * msg_error_t err = MSG_SUCCESS;
1948 * char* phone_num = "01030016057";
1949 * msg_struct_list_s rejectMsgList;
1951 * err = msg_get_reject_msg_list(hMsgHandle, phone_num, &rejectMsgList);
1953 * if( err != MSG_SUCCESS )
1955 * printf("err [%d]", err);
1961 /*================================================================================================*/
1962 int msg_get_reject_msg_list(msg_handle_t handle, const char* phone_num, msg_struct_list_s *msg_reject_msg_list);
1968 * Registers a callback function about the change of storage status to Message handle.
1971 * This API is used to register a callback function about the change of storage status "msg_storage_change_cb" to Message handle.
1973 * \par Typical use case:
1974 * Register a callback function about the change of storage status.
1976 * \par Method of function operation:
1977 * Adds the msg_storage_change_cb API to a callback function list.
1979 * \par Sync (or) Async:
1980 * This is a Synchronous API.
1982 * \par Important notes:
1983 * This function MUST be called after Message handle is opened.
1985 * \param input - handle is Message handle.
1986 * \param input - cb is a function to be called.
1987 * \param input - user_param is a pointer to user data.
1989 * \return Return Type (int(msg_error_t)) \n
1990 * - MSG_SUCCESS Success in operation.
1991 * - MSG_ERR_MSGHANDLE_NOT_CONNECTED Message handle is not connected.
1992 * - MSG_ERR_MEMORY_ERROR Memory is error.
1994 * \par Prospective clients:
1995 * External/Native Apps using Messaging Services.
1997 * \par Related functions:
2000 * \par Known issues/bugs:
2007 * int err = MSG_SUCCESS;
2009 * err = msg_reg_storage_change_callback(msgHandle, &storageCB, NULL);
2010 * if (err != MSG_SUCCESS)
2017 * void storageCB(msg_handle_t handle, msg_thread_id_t threadId, msg_message_id_t msgId, void *user_param)
2024 /*================================================================================================*/
2025 int msg_reg_storage_change_callback(msg_handle_t handle, msg_storage_change_cb cb, void *user_param);
2031 * Gets the report status information of message.
2034 * This API is used to get the report status information of specified message.
2036 * \par Typical use case:
2037 * Gets the report status information of specified message from the database.
2039 * \par Method of function operation:
2040 * Sets up the database connection and Gets the report status information of specified message from the report table.
2042 * \par Sync (or) Async:
2043 * This is a Synchronous API.
2045 * \par Important notes:
2048 * \param input - handle is Message handle.
2049 * \param input - msg_id is the ID of the message.
2050 * \param output - report_status is a pointer to a MSG_REPORT_STATUS_INFO_S structure.
2052 * \return Return Type (int(msg_error_t)) \n
2053 * - MSG_SUCCESS - Success in operation.
2054 * - MSG_ERR_INVALID_PARAMETER - Parameter is invalid.
2055 * - MSG_ERR_STORAGE_ERROR - Storage is error.
2057 * \par Prospective clients:
2058 * External/Native Apps using Messaging Services.
2060 * \par Related functions:
2063 * \par Known issues/bugs:
2070 * msg_handle_t msgHandle = NULL;
2071 * MSG_REPORT_STATUS_INFO_S reportStatus;
2075 * err = msg_open_msg_handle(&msgHandle);
2079 * err = msg_get_report_status(msgHandle, msgID, &reportStatus)
2080 * if( err != MSG_SUCCESS )
2082 * printf("err [%d]", err);
2089 /*================================================================================================*/
2090 int msg_get_report_status(msg_handle_t handle, msg_message_id_t msg_id, msg_struct_list_s *report_list);
2092 int msg_get_address_list(msg_handle_t handle, msg_thread_id_t thread_id, msg_struct_list_s *msg_address_list);
2095 int msg_get_thread_id_by_address(msg_handle_t handle, msg_struct_list_s *msg_address_list, msg_thread_id_t *thread_id);
2098 int msg_get_thread(msg_handle_t handle, msg_thread_id_t thread_id, msg_struct_t msg_thread);
2101 int msg_get_message_list(msg_handle_t handle, msg_folder_id_t folder_id, msg_thread_id_t thread_id, msg_message_type_t msg_type, msg_storage_id_t storage_id, msg_struct_list_s *msg_list);
2104 int msg_add_push_event(msg_handle_t handle, const msg_struct_t push_event);
2106 int msg_delete_push_event(msg_handle_t handle, const msg_struct_t push_event);
2108 int msg_update_push_event(msg_handle_t handle, const msg_struct_t src_event, const msg_struct_t dst_event);
2110 int msg_delete_msgs_by_list(msg_handle_t handle, msg_id_list_s *msg_id_list);
2119 #endif // MAPI_STORAGE_H