2 * Copyright 2012 Samsung Electronics Co., Ltd
4 * Licensed under the Flora License, Version 1.0 (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://www.tizenopensource.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);
920 * Returns the common information list of messages with selected folder id.
923 * This API is used to get the common information list of messages with selected folder id from database.
925 * \par Typical use case:
926 * Get the common information from the specified folder from database.
928 * \par Method of function operation:
929 * Sets up the database connection and queries the common information based on selected folder id from the message and folder tables.
931 * \par Sync (or) Async:
932 * This is a Synchronous API.
934 * \par Important notes:
935 * - The memory for a message will be allocated in this function.
936 * - Applications need to call msg_release_folder_view_list to free the memory.
937 * - However, if this function is failed, the memory for the message is NOT allocated in this function.
939 * \param input - handle is Message handle.
940 * \param input - folder_id is the ID of the folder to be returned.
941 * \param input - sort_rule indicates a sort type and sort order for querying messages.
942 * \param output - msg_folder_view_list is a pointer to an MSG_FOLDER_VIEW_LIST_S structure.
944 * \return Return Type (int(msg_error_t)) \n
945 * - MSG_SUCCESS - Success in operation.
946 * - MSG_ERR_INVALID_PARAMETER - Parameter is invalid.
947 * - MSG_ERR_STORAGE_ERROR - Storage is error.
949 * \par Prospective clients:
950 * External/Native Apps using Messaging Services.
952 * \par Related functions:
955 * \par Known issues/bugs:
962 * msg_handle_t msgHandle = NULL;
965 * MSG_FOLDER_VIEW_LIST_S folderViewList;
967 * err = msg_get_folder_view_list(hMsgHandle, 0, NULL, &folderViewList);
968 * if( err != MSG_SUCCESS )
970 * printf("err [%d]", err);
977 /*================================================================================================*/
978 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);
984 * Returns the information of all peers to whom messages have been sent or recieved.
987 * This API is used to get the information of all peers to whom messages have been sent or recieved.
989 * \par Typical use case:
990 * Get the common information from the specified folder from database.
992 * \par Method of function operation:
993 * Frees the memory occupied by MSG_FOLDER_VIEW_LIST_S object and its members.
995 * \par Sync (or) Async:
996 * This is a Synchronous API.
998 * \par Important notes:
999 * - The memory for a list will be allocated in this function.
1000 * - Applications need to call msg_release_thread_view_list to free the memory.
1001 * - However, if this function is failed, the memory for a list is NOT allocated in this function.
1003 * \param input - handle is Message handle.
1004 * \param input - sort_rule indicates a sort type and sort order for querying messages.
1005 * \param output - msg_thread_view_list is a pointer to an msg_struct_list_s structure.
1007 * \return Return Type (int(msg_error_t)) \n
1008 * - MSG_SUCCESS - Success in operation.
1009 * - MSG_ERR_INVALID_PARAMETER - Parameter is invalid.
1010 * - MSG_ERR_STORAGE_ERROR - Storage is error.
1012 * \par Prospective clients:
1013 * External/Native Apps using Messaging Services.
1015 * \par Related functions:
1018 * \par Known issues/bugs:
1025 * msg_handle_t msgHandle = NULL;
1028 * msg_struct_list_s threadViewList;
1030 * err = msg_get_thread_view_list(hMsgHandle, NULL, &threadViewList);
1032 * msg_release_thread_view_list(&threadViewList);
1033 * if( err != MSG_SUCCESS )
1035 * printf("err [%d]", err);
1040 /*================================================================================================*/
1041 int msg_get_thread_view_list(msg_handle_t handle, const msg_struct_t sort_rule, msg_struct_list_s *msg_thread_view_list);
1047 * Returns the common information list of messages with selected thread_id.
1050 * This API is used to get the common information list of messages with selected thread_id.
1052 * \par Typical use case:
1053 * Gets the common information list of messages with the selected thread id from the database.
1055 * \par Method of function operation:
1056 * Connects to the database and queries the common infomation of list messages with the provided thread id.
1058 * \par Sync (or) Async:
1059 * This is a Synchronous API.
1061 * \par Important notes:
1062 * - The memory for a list will be allocated in this function.
1063 * - Applications need to call msg_release_conversation_view_list to free the memory.
1064 * - However, if this function is failed, the memory for a list is NOT allocated in this function.
1066 * \param input - hMsgHandle is Message handle.
1067 * \param input - thread_id is the ID of the thread to be returned.
1068 * \param output - msg_conv_view_list is a pointer to an MSG_CONV_VIEW_LIST_S structure.
1070 * \return Return Type (int(msg_error_t)) \n
1071 * - MSG_SUCCESS - Success in operation.
1072 * - MSG_ERR_INVALID_PARAMETER - Parameter is invalid.
1073 * - MSG_ERR_STORAGE_ERROR - Storage is error.
1075 * \par Prospective clients:
1076 * External/Native Apps using Messaging Services.
1078 * \par Related functions:
1081 * \par Known issues/bugs:
1088 * msg_handle_t msgHandle = NULL;
1089 * msg_error_t err = MSG_SUCCESS;
1091 * MSG_CONV_VIEW_LIST_S convViewList;
1093 * err = msg_get_conversation_view_list(hMsgHandle, ThreadId, &convViewList);
1094 * if( err != MSG_SUCCESS )
1096 * printf("err [%d]", err);
1099 * msg_release_conversation_view_list(&convViewList);
1103 /*================================================================================================*/
1104 int msg_get_conversation_view_list(msg_handle_t handle, msg_thread_id_t thread_id, msg_struct_list_s *msg_conv_view_list);
1110 * Deletes all the Messages Sent/Received from the selected list.
1113 * This API is used to delete all the Messages Sent/Received from the selected list.
1115 * \par Typical use case:
1116 * Deletes all messages sent/received from the selected list.
1118 * \par Method of function operation:
1119 * Sets up the database connection and deletes all messages sent/received from a selected list.
1121 * \par Sync (or) Async:
1122 * This is a Synchronous API.
1124 * \par Important notes:
1125 * - If addr_info is NULL, nothing happens.
1127 * \param input - handle is Message handle.
1128 * \param input - thread_id is the ID of the thread to be deleted.
1130 * \return Return Type (int(msg_error_t)) \n
1131 * - MSG_SUCCESS - Success in operation.
1132 * - MSG_ERR_INVALID_PARAMETER - Parameter is invalid.
1133 * - MSG_ERR_STORAGE_ERROR - Storage is error.
1135 * \par Prospective clients:
1136 * External/Native Apps using Messaging Services.
1138 * \par Related functions:
1141 * \par Known issues/bugs:
1148 * msg_handle_t msgHandle = NULL;
1149 * MSG_SYNCML_MESSAGE_S syncMLMsg;
1150 * MSG_SENDINGOPT_S sendingOpt = {0};
1154 * err = msg_open_msg_handle(&msgHandle);
1158 * err = msg_delete_thread_message_list(hMsgHandle, 0);
1159 * if( err != MSG_SUCCESS )
1161 * printf("err [%d]", err);
1167 /*================================================================================================*/
1168 int msg_delete_thread_message_list(msg_handle_t handle, msg_thread_id_t thread_id);
1174 * Adds a new folder.
1177 * This API is used to add a new folder.
1179 * \par Typical use case:
1180 * Adds a new folder with the specified folder info
1182 * \par Method of function operation:
1183 * Sets up the database connection and add a new folder to the folder table.
1185 * \par Sync (or) Async:
1186 * This is a Synchronous API.
1188 * \par Important notes:
1191 * \param - handle is Message handle.
1192 * \param - folder_info is a pointer to an MSG_FOLDER_INFO_S structure.
1194 * \return Return Type (int(msg_error_t)) \n
1195 * - MSG_SUCCESS - Success in operation.
1196 * - MSG_ERR_INVALID_PARAMETER - Parameter is invalid.
1197 * - MSG_ERR_STORAGE_ERROR - Storage is error.
1199 * \par Prospective clients:
1200 * External/Native Apps using Messaging Services.
1202 * \par Related functions:
1205 * \par Known issues/bugs:
1212 * msg_handle_t msgHandle = NULL;
1214 * MSG_FOLDER_INFO_S folderInfo;
1216 * err = msg_open_msg_handle(&msgHandle);
1218 * folderInfo.folderId = 1;
1219 * folderInfo.folderType = MSG_FOLDER_TYPE_USER_DEF;
1222 * err = msg_add_folder(hMsgHandle, &folderInfo);
1223 * if( err != MSG_SUCCESS )
1225 * printf("err [%d]", err);
1231 /*================================================================================================*/
1232 int msg_add_folder(msg_handle_t handle, const msg_struct_t folder_info);
1238 * Updates the folder info.
1241 * This API is used to add a new folder.
1243 * \par Typical use case:
1244 * Adds a new folder with the specified folder info
1246 * \par Method of function operation:
1247 * Sets up the database connection and add a new folder to the folder table.
1249 * \par Sync (or) Async:
1250 * This is a Synchronous API.
1252 * \par Important notes:
1255 * \param - handle is Message handle.
1256 * \param - folder_info is a pointer to an MSG_FOLDER_INFO_S structure.
1258 * \return Return Type (int(msg_error_t)) \n
1259 * - MSG_SUCCESS - Success in operation.
1260 * - MSG_ERR_INVALID_PARAMETER - Parameter is invalid.
1261 * - MSG_ERR_STORAGE_ERROR - Storage is error.
1263 * \par Prospective clients:
1264 * External/Native Apps using Messaging Services.
1266 * \par Related functions:
1269 * \par Known issues/bugs:
1276 * msg_handle_t msgHandle = NULL;
1278 * MSG_FOLDER_INFO_S folderInfo;
1280 * err = msg_open_msg_handle(&msgHandle);
1282 * folderInfo.folderId = 2;
1283 * folderInfo.folderType = MSG_FOLDER_TYPE_USER_DEF;
1285 * err = msg_update_folder(msgHandle, &folderInfo);
1286 * if( err != MSG_SUCCESS )
1288 * printf("err [%d]", err);
1294 /*================================================================================================*/
1295 int msg_update_folder(msg_handle_t handle, const msg_struct_t folder_info);
1301 * Deletes an exisiting folder.
1304 * This API is used to delete an existing folder.
1306 * \par Typical use case:
1307 * Deletes an existing folder.
1309 * \par Method of function operation:
1310 * Sets up the database connection and deletes an existing folder to the folder table.
1312 * \par Sync (or) Async:
1313 * This is a Synchronous API.
1315 * \par Important notes:
1318 * \param input - handle is Message handle.
1319 * \param input - folder_id is the ID of the folder to be deleted.
1321 * \return Return Type (int(msg_error_t)) \n
1322 * - MSG_SUCCESS - Success in operation.
1323 * - MSG_ERR_INVALID_PARAMETER - Parameter is invalid.
1324 * - MSG_ERR_STORAGE_ERROR - Storage is error.
1326 * \par Prospective clients:
1327 * External/Native Apps using Messaging Services.
1329 * \par Related functions:
1332 * \par Known issues/bugs:
1339 * msg_handle_t msgHandle = NULL;
1340 * err = msg_open_msg_handle(&msgHandle);
1343 * err = msg_delete_folder(hMsgHandle, MSG_INBOX_ID);
1344 * if( err != MSG_SUCCESS )
1346 * printf("err [%d]", err);
1352 /*================================================================================================*/
1353 int msg_delete_folder(msg_handle_t handle, msg_folder_id_t folder_id);
1359 * Returns the information list of folders.
1362 * This API is used to get the information list of folders.
1364 * \par Typical use case:
1365 * Gets the folder list information.
1367 * \par Method of function operation:
1368 * Sets up the database connection and queries for the folder list information.
1370 * \par Sync (or) Async:
1371 * This is a Synchronous API.
1373 * \par Important notes:
1376 * \param input - handle is Message handle.
1377 * \param output - folder_list is a pointer to an msg_struct_list_s structure.
1379 * \return Return Type (int(msg_error_t)) \n
1380 * - MSG_SUCCESS - Success in operation.
1381 * - MSG_ERR_INVALID_PARAMETER - Parameter is invalid.
1382 * - MSG_ERR_STORAGE_ERROR - Storage is error.
1384 * \par Prospective clients:
1385 * External/Native Apps using Messaging Services.
1387 * \par Related functions:
1390 * \par Known issues/bugs:
1397 * msg_handle_t msgHandle = NULL;
1398 * msg_struct_list_s folderList;
1400 * err = msg_open_msg_handle(&msgHandle);
1403 * err = msg_get_folder_list(msgHandle, &folderList);
1404 * if( err != MSG_SUCCESS )
1406 * printf("err [%d]", err);
1410 * msg_release_folder_list(&folderList);
1413 /*================================================================================================*/
1414 int msg_get_folder_list(msg_handle_t handle, msg_struct_list_s *folder_list);
1420 * Creates the specified number of messages in database.
1423 * This API is used to generate specified number of messages in the database
1425 * \par Typical use case:
1426 * Generate large number of messages in the database.
1428 * \par Method of function operation:
1429 * Creates the specified number of messages in database for specified message type in the specified folder
1431 * \par Sync (or) Async:
1432 * This is a Synchronous API.
1434 * \par Important notes:
1437 * \param input - handle is Message handle.
1438 * \param input - msg_type is one of enum _MSG_MESSAGE_TYPE_E.
1439 * \param input - folder_id is the folder for the test messages.
1440 * \param input - num_msg is the number of messages.
1442 * \return Return Type (int(msg_error_t)) \n
1443 * - MSG_SUCCESS Success in operation.
1444 * - MSG_ERR_INVALID_MSGHANDLE Parameter is invalid.
1445 * - MSG_ERR_INVALID_FOLDER_ID Storage is error.
1447 * \par Prospective clients:
1448 * External/Native Apps using Messaging Services.
1450 * \par Related functions:
1453 * \par Known issues/bugs:
1460 * msg_handle_t msgHandle = NULL;
1461 * msg_struct_list_s folderList;
1463 * err = msg_open_msg_handle(&msgHandle);
1466 * err = msg_generate_message(msgHandle, MSG_TYPE_SMS, MSG_INBOX_ID, 100);
1467 * if( err != MSG_SUCCESS )
1469 * printf("err [%d]", err);
1475 /*================================================================================================*/
1476 int msg_generate_message(msg_handle_t handle, msg_message_type_t msg_type, msg_folder_id_t folder_id, unsigned int num_msg);
1477 int msg_generate_sms(msg_handle_t handle, msg_folder_id_t folder_id, unsigned int num_msg) DEPRECATED;
1483 * Returns the Message Data to be used by the Quick Panel.
1486 * This API is used to get the Message Datato be used by the Quick Panel.
1488 * \par Typical use case:
1489 * Quick panel needs the message information to show new message notification.
1491 * \par Method of function operation:
1492 * Connects to database and queries for information needed by the quick panel.
1494 * \par Sync (or) Async:
1495 * This is a Synchronous API.
1497 * \par Important notes:
1500 * \param input - handle is Message handle.
1501 * \param input - type is the type of message that Quick Panel need.
1502 * \param output - msg is a pointer to an msg_message_t structure.
1504 * \return Return Type (int(msg_error_t)) \n
1505 * - MSG_SUCCESS Success in operation.
1506 * - MSG_ERR_INVALID_MSGHANDLE Parameter is invalid.
1507 * - MSG_ERR_INVALID_FOLDER_ID Storage is error.
1509 * \par Prospective clients:
1510 * External/Native Apps using Messaging Services.
1512 * \par Related functions:
1515 * \par Known issues/bugs:
1522 * msg_handle_t msgHandle = NULL;
1523 * msg_message_t msgInfo;
1525 * err = msg_open_msg_handle(&msgHandle);
1528 * err = msg_get_quick_panel_data(msgHandle, MSG_QUICKPANEL_SMS, msgInfo);
1529 * if( err != MSG_SUCCESS )
1531 * printf("err [%d]", err);
1537 /*================================================================================================*/
1538 int msg_get_quick_panel_data(msg_handle_t handle, msg_quickpanel_type_t type, msg_struct_t msg);
1544 * Resets the Messaging database.
1547 * This API is used to reset the messaging database.
1549 * \par Typical use case:
1550 * Completely delete the messaging database.
1552 * \par Method of function operation:
1553 * Connects to database and deletes all the messaging tables.
1555 * \par Sync (or) Async:
1556 * This is a Synchronous API.
1558 * \par Important notes:
1561 * \param input - handle is Message handle.
1563 * \return Return Type (int(msg_error_t)) \n
1564 * - MSG_SUCCESS Success in operation.
1565 * - MSG_ERR_INVALID_PARAMETER Parameter is invalid.
1566 * - MSG_ERR_STORAGE_ERROR Storage is error.
1568 * \par Prospective clients:
1569 * External/Native Apps using Messaging Services.
1571 * \par Related functions:
1574 * \par Known issues/bugs:
1581 * msg_handle_t msgHandle = NULL;
1582 * msg_error_t err = MSG_SUCCESS;
1583 * err = msg_open_msg_handle(&msgHandle);
1586 * err = msg_reset_database(msgHandle);
1587 * if (err != MSG_SUCCESS)
1589 * printf("err [%d]", err);
1595 /*================================================================================================*/
1596 int msg_reset_database(msg_handle_t handle);
1602 * Returns the total size used for message contents.
1605 * This API is used to get the total size used for message contents.
1607 * \par Typical use case:
1608 * To get the total space used by message contents.
1610 * \par Method of function operation:
1611 * Uses linux system calls to query the space used by message contents.
1613 * \par Sync (or) Async:
1614 * This is a Synchronous API.
1616 * \par Important notes:
1619 * \param input - handle is Message handle.
1620 * \param output - memsize is a pointer to the size.
1622 * \return Return Type (int(msg_error_t)) \n
1623 * - MSG_SUCCESS Success in operation.
1624 * - MSG_ERR_INVALID_PARAMETER Parameter is invalid.
1625 * - MSG_ERR_STORAGE_ERROR Storage is error.
1627 * \par Prospective clients:
1628 * External/Native Apps using Messaging Services.
1630 * \par Related functions:
1633 * \par Known issues/bugs:
1640 * msg_handle_t msgHandle = NULL;
1642 * err = msg_open_msg_handle(&msgHandle);
1645 * err = msg_get_mem_size(msgHandle, &memsize);
1646 * if( err != MSG_SUCCESS )
1648 * printf("err [%d]", err);
1654 /*================================================================================================*/
1655 int msg_get_mem_size(msg_handle_t handle, unsigned int* memsize);
1660 * Backup messages to storage.
1663 * This API is used to backup messages to storage.
1665 * \par Typical use case:
1666 * Backup messages to storage.
1668 * \par Method of function operation:
1669 * Reads all the messages from Messaging database and writes to storage in V-Message format
1671 * \par Sync (or) Async:
1672 * This is a Synchronous API.
1674 * \par Important notes:
1677 * \param input - msg_handle_t handle is Message handle.
1679 * \return Return Type int (msg_error_t) \n
1680 * - MSG_SUCCESS Success in operation.
1681 * - MSG_ERR_INVALID_PARAMETER Parameter is invalid.
1682 * - MSG_ERR_STORAGE_ERROR Storage is error.
1684 * \par Prospective clients:
1685 * External/Native Apps using Messaging Services.
1687 * \par Related functions:
1690 * \par Known issues/bugs:
1697 * msg_handle_t msgHandle = NULL;
1701 * err = msg_backup_message(&msgHandle);
1705 /*================================================================================================*/
1706 int msg_backup_message(msg_handle_t handle);
1712 * Restore messages from backed up messages.
1715 * This API is used to restore messages from backed up messages.
1717 * \par Typical use case:
1718 * Restore messages from previously backed up messages.
1720 * \par Method of function operation:
1721 * Reads the previously backup up messages and restores the database.
1723 * \par Sync (or) Async:
1724 * This is a Synchronous API.
1726 * \par Important notes:
1729 * \param input - msg_handle_t handle is Message handle.
1731 * \return Return Type int (msg_error_t) \n
1732 * - MSG_SUCCESS Success in operation.
1733 * - MSG_ERR_INVALID_PARAMETER Parameter is invalid.
1734 * - MSG_ERR_STORAGE_ERROR Storage is error.
1736 * \par Prospective clients:
1737 * External/Native Apps using Messaging Services.
1739 * \par Related functions:
1742 * \par Known issues/bugs:
1749 * msg_handle_t msgHandle = NULL;
1752 * err = msg_restore_message(&msgHandle);
1756 /*================================================================================================*/
1757 int msg_restore_message(msg_handle_t handle);
1763 * Search messages or addresses which including a string that applcation want to find.
1766 * This API is used to search messages or addresses from storage.
1768 * \par Typical use case:
1769 * Search messages or addresses from storage.
1771 * \par Method of function operation:
1772 * search messages or addresses from storage.
1774 * \par Sync (or) Async:
1775 * This is a Synchronous API.
1777 * \par Important notes:
1780 * \param input - msg_handle_t handle is Message handle.
1781 * \param input - search_string is the string to search.
1782 * \param output - msg_thread_view_list is a pointer to an msg_struct_list_s structure.
1784 * \return Return Type int (msg_error_t) \n
1785 * - MSG_SUCCESS Success in operation.
1786 * - MSG_ERR_INVALID_PARAMETER Parameter is invalid.
1787 * - MSG_ERR_STORAGE_ERROR Storage is error.
1789 * \par Prospective clients:
1790 * External/Native Apps using Messaging Services.
1792 * \par Related functions:
1795 * \par Known issues/bugs:
1802 * msg_handle_t msgHandle = NULL;
1803 * msg_error_t err = MSG_SUCCESS;
1805 * char* search_string = "hello";
1806 * msg_struct_list_s threadViewList;
1808 * err = msg_search_message_for_thread_view(&msgHandle, search_string, &threadViewList);
1810 * if( err != MSG_SUCCESS )
1812 * printf("err [%d]", err);
1818 /*================================================================================================*/
1819 int msg_search_message_for_thread_view(msg_handle_t handle, const char *search_string, msg_struct_list_s *msg_thread_view_list);
1825 * Search messages or addresses which including a string that applcation want to find.
1828 * This API is used to search messages or addresses from storage.
1830 * \par Typical use case:
1831 * Search messages or addresses from storage.
1833 * \par Method of function operation:
1834 * search messages or addresses from storage.
1836 * \par Sync (or) Async:
1837 * This is a Synchronous API.
1839 * \par Important notes:
1842 * \param input - msg_handle_t handle is Message handle.
1843 * \param input - search_string is the string to search.
1844 * \param input - offset is the offset of the search result.
1845 * \param input - limit is the limit of the search result.
1846 * \param output - msg_list is a pointer to an msg_struct_list_s structure.
1848 * \return Return Type int (msg_error_t) \n
1849 * - MSG_SUCCESS Success in operation.
1850 * - MSG_ERR_INVALID_PARAMETER Parameter is invalid.
1851 * - MSG_ERR_STORAGE_ERROR Storage is error.
1853 * \par Prospective clients:
1854 * External/Native Apps using Messaging Services.
1856 * \par Related functions:
1859 * \par Known issues/bugs:
1866 * msg_handle_t msgHandle = NULL;
1867 * msg_error_t err = MSG_SUCCESS;
1869 * msg_struct_list_s msg_list;
1873 * MSG_SEARCH_CONDITION_S searchCon;
1875 * searchCon.msgType = MSG_TYPE_SMS;
1876 * searchCon.folderId = MSG_INBOX_ID;
1877 * searchCon.pSearchVal = "keyString";
1878 * searchCon.pAddressVal = "01000000000";
1881 * err = msg_search_message(hMsgHandle, &searchCon, offset, limit, &msgList);
1883 * if( err != MSG_SUCCESS )
1885 * printf("err [%d]", err);
1891 /*================================================================================================*/
1892 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);
1897 * Get reject message list that application wants to find by phone number.
1900 * This API is used to get reject message list from storage.
1902 * \par Typical use case:
1903 * Get reject message list from storage.
1905 * \par Method of function operation:
1906 * Get reject message list from storage.
1908 * \par Sync (or) Async:
1909 * This is a Synchronous API.
1911 * \par Important notes:
1914 * \param input - msg_handle_t handle is Message handle.
1915 * \param input - phone_num is the string of phone number to find.
1916 * \param output - msg_reject_msg_list is a pointer to an msg_struct_list_s structure.
1918 * \return Return Type int (msg_error_t) \n
1919 * - MSG_SUCCESS Success in operation.
1920 * - MSG_ERR_INVALID_PARAMETER Parameter is invalid.
1921 * - MSG_ERR_STORAGE_ERROR Storage is error.
1923 * \par Prospective clients:
1924 * External/Native Apps using Messaging Services.
1926 * \par Related functions:
1929 * \par Known issues/bugs:
1936 * msg_handle_t msgHandle = NULL;
1937 * msg_error_t err = MSG_SUCCESS;
1939 * char* phone_num = "01030016057";
1940 * msg_struct_list_s rejectMsgList;
1942 * err = msg_get_reject_msg_list(hMsgHandle, phone_num, &rejectMsgList);
1944 * if( err != MSG_SUCCESS )
1946 * printf("err [%d]", err);
1952 /*================================================================================================*/
1953 int msg_get_reject_msg_list(msg_handle_t handle, const char* phone_num, msg_struct_list_s *msg_reject_msg_list);
1959 * Registers a callback function about the change of storage status to Message handle.
1962 * This API is used to register a callback function about the change of storage status "msg_storage_change_cb" to Message handle.
1964 * \par Typical use case:
1965 * Register a callback function about the change of storage status.
1967 * \par Method of function operation:
1968 * Adds the msg_storage_change_cb API to a callback function list.
1970 * \par Sync (or) Async:
1971 * This is a Synchronous API.
1973 * \par Important notes:
1974 * This function MUST be called after Message handle is opened.
1976 * \param input - handle is Message handle.
1977 * \param input - cb is a function to be called.
1978 * \param input - user_param is a pointer to user data.
1980 * \return Return Type (int(msg_error_t)) \n
1981 * - MSG_SUCCESS Success in operation.
1982 * - MSG_ERR_MSGHANDLE_NOT_CONNECTED Message handle is not connected.
1983 * - MSG_ERR_MEMORY_ERROR Memory is error.
1985 * \par Prospective clients:
1986 * External/Native Apps using Messaging Services.
1988 * \par Related functions:
1991 * \par Known issues/bugs:
1998 * int err = MSG_SUCCESS;
2000 * err = msg_reg_storage_change_callback(msgHandle, &storageCB, NULL);
2001 * if (err != MSG_SUCCESS)
2008 * void storageCB(msg_handle_t handle, msg_thread_id_t threadId, msg_message_id_t msgId, void *user_param)
2015 /*================================================================================================*/
2016 int msg_reg_storage_change_callback(msg_handle_t handle, msg_storage_change_cb cb, void *user_param);
2022 * Gets the report status information of message.
2025 * This API is used to get the report status information of specified message.
2027 * \par Typical use case:
2028 * Gets the report status information of specified message from the database.
2030 * \par Method of function operation:
2031 * Sets up the database connection and Gets the report status information of specified message from the report table.
2033 * \par Sync (or) Async:
2034 * This is a Synchronous API.
2036 * \par Important notes:
2039 * \param input - handle is Message handle.
2040 * \param input - msg_id is the ID of the message.
2041 * \param output - report_status is a pointer to a MSG_REPORT_STATUS_INFO_S structure.
2043 * \return Return Type (int(msg_error_t)) \n
2044 * - MSG_SUCCESS - Success in operation.
2045 * - MSG_ERR_INVALID_PARAMETER - Parameter is invalid.
2046 * - MSG_ERR_STORAGE_ERROR - Storage is error.
2048 * \par Prospective clients:
2049 * External/Native Apps using Messaging Services.
2051 * \par Related functions:
2054 * \par Known issues/bugs:
2061 * msg_handle_t msgHandle = NULL;
2062 * MSG_REPORT_STATUS_INFO_S reportStatus;
2066 * err = msg_open_msg_handle(&msgHandle);
2070 * err = msg_get_report_status(msgHandle, msgID, &reportStatus)
2071 * if( err != MSG_SUCCESS )
2073 * printf("err [%d]", err);
2080 /*================================================================================================*/
2081 int msg_get_report_status(msg_handle_t handle, msg_message_id_t msg_id, msg_struct_t report_status);
2086 int msg_get_address_list(msg_handle_t handle, msg_thread_id_t thread_id, msg_struct_list_s *msg_address_list);
2089 int msg_get_thread_id_by_address(msg_handle_t handle, msg_struct_list_s *msg_address_list, msg_thread_id_t *thread_id);
2092 int msg_get_thread(msg_handle_t handle, msg_thread_id_t thread_id, msg_struct_t msg_thread);
2095 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);
2105 #endif // MAPI_STORAGE_H