3 * Copyright (c) 2000-2012 Samsung Electronics Co., Ltd. All Rights Reserved.
5 * This file is part of msg-service.
7 * Contact: Jaeyun Jeong <jyjeong@samsung.com>
8 * Sangkoo Kim <sangkoo.kim@samsung.com>
9 * Seunghwan Lee <sh.cat.lee@samsung.com>
10 * SoonMin Jung <sm0415.jung@samsung.com>
11 * Jae-Young Lee <jy4710.lee@samsung.com>
12 * KeeBum Kim <keebum.kim@samsung.com>
14 * PROPRIETARY/CONFIDENTIAL
16 * This software is the confidential and proprietary information of
17 * SAMSUNG ELECTRONICS ("Confidential Information"). You shall not
18 * disclose such Confidential Information and shall use it only in
19 * accordance with the terms of the license agreement you entered
20 * into with SAMSUNG ELECTRONICS.
22 * SAMSUNG make no representations or warranties about the suitability
23 * of the software, either express or implied, including but not limited
24 * to the implied warranties of merchantability, fitness for a particular
25 * purpose, or non-infringement. SAMSUNG shall not be liable for any
26 * damages suffered by licensee as a result of using, modifying or
27 * distributing this software or its derivatives.
33 * @brief Defines message data API of messaging framework
37 #ifndef MAPI_MESSAGE_H
38 #define MAPI_MESSAGE_H
41 * @section Introduction
42 * - Introduction : Overview on message data related API
44 * - Program : message data related API Reference
47 /*==================================================================================================
49 ==================================================================================================*/
52 #include "MsgMmsTypes.h"
61 * @ingroup MESSAGING_FRAMEWORK
62 * @defgroup MESSAGING_DATA_API Messaging Data API
66 /*==================================================================================================
68 ==================================================================================================*/
73 * Allocate the memory for new message, which is used for composing SMS or MMS.
76 * This API is used to create Message object and should be called before any operation on the message object.
78 * \par Typical use case:
79 * Before performing common operations on Messages such as Send, Save, Load, etc., this API should be called to create the message object.
81 * \par Method of function operation:
82 * Creates the Message Object and initiaizes the members to default values.
84 * \par Sync (or) Async:
85 * This is a Synchronous API.
87 * \par Important notes:
88 * - The type msg_message_t represents message object and hides the details of message object.
89 * - Memory for the Message abject need NOT be created by the called \n
90 * - You can set or get the value of message object using the below APIs.
91 * - You should release the memory using msg_release_message(), unless memory leaks.
95 * \return Return Type (msg_message_t) \n
96 * - msg_message_t - valid message object is returned upon success \n
97 * - NULL - In case of error in allocation of message object \n
99 * \par Prospective clients:
100 * External/Native Apps using Messaging Services.
102 * \par Related functions:
105 * \par Known issues/bugs:
112 * MSG_HANDLE_T msgHandle = NULL;
117 * err = msg_open_msg_handle(&msgHandle);
121 * msg = msg_new_message();
125 * sprintf(str, "msg_new_message() Fail");
132 /*================================================================================================*/
133 msg_message_t msg_new_message(void);
139 * Free the memory of msg_message_t, which is created by msg_new_message().
142 * This API is used to release memory created by message creation.
144 * \par Typical use case:
145 * After using message object for send/save scenario, release message need to be called.
147 * \par Method of function operation:
148 * Frees the memory allocated to message object and deletes the object.
150 * \par Sync (or) Async:
151 * This is a Synchronous API.
153 * \par Important notes:
156 * \param msg_message_t input - message object to be destroyed .
158 * \return Return Type (int(MSG_ERROR_T)) \n
159 * - MSG_SUCCESS - Successfully connected to Messaging Service \n
160 * - MSG_ERR_NULL_POINTER - Input parameter is NULL.
162 * \par Prospective clients:
163 * External/Native Apps using Messaging Services.
165 * \par Related functions:
168 * \par Known issues/bugs:
175 * MSG_HANDLE_T msgHandle = NULL;
176 * MSG_ERROR_T err = MSG_SUCCESS;
181 * err = msg_open_msg_handle(&msgHandle);
185 * msg = msg_new_message();
187 * err = msg_release_message(&msg);
189 * if (err != MSG_SUCCESS)
191 * sprintf(str, "msg_release_message() Fail [%d]", err);
194 * return err; // if success, return OPERATION_SUCCESS. Or if fail, return related error code.
200 /*================================================================================================*/
201 int msg_release_message(msg_message_t *msg);
208 * Set message id field to the passed msg_id.
211 * This API is used to set the Message Id of the message object
213 * \par Typical use case:
214 * Explicitly set the msgId member of message object.
216 * \par Method of function operation:
217 * Set the msgId member of msg_message_t to the passed msgId.
219 * \par Sync (or) Async:
220 * This is a Synchronous API.
222 * \par Important notes:
223 * - If msg is NULL, no action is done
224 * - If msg is invalid, behavior is undefined
226 * \param msg_message_t input - message object whose msgId is to be set.
227 * \param int input - Message Id to be set to the message id.
229 * \return Return Type (int(MSG_ERROR_T)) \n
230 * - MSG_SUCCESS - Successfully connected to Messaging Service \n
231 * - MSG_ERR_NULL_POINTER - Input parameter is NULL.
233 * \par Prospective clients:
234 * External/Native Apps using Messaging Services.
236 * \par Related functions:
239 * \par Known issues/bugs:
246 * MSG_HANDLE_T msgHandle = NULL;
247 * MSG_ERROR_T err = MSG_SUCCESS;
252 * err = msg_open_msg_handle(&msgHandle);
256 * msg_add_message(msgHandle, msg, &sendOpt);
258 * err = msg_set_message_id(msg, 0);
259 * if (err != MSG_SUCCESS)
261 * sprintf(str, "msg_release_message() Fail [%d]", err);
264 * return err; // if success, return OPERATION_SUCCESS. Or if fail, return related error code.
266 * err = msg_release_message(&msg);
270 /*================================================================================================*/
271 int msg_set_message_id(msg_message_t msg, int msg_id);
277 * Get the message id in message object.
280 * This API is used to get the Message Id of the message object
282 * \par Typical use case:
283 * Msg Id is needed to perform many operations on the message object.
285 * \par Method of function operation:
286 * Returns the Message Id of the message object.
288 * \par Sync (or) Async:
289 * This is a Synchronous API.
291 * \par Important notes:
294 * \param msg_message_t input - message object whose msgId is returned.
296 * \return Return Type (int(MSG_ERROR_T)) \n
297 * - MSG_SUCCESS - Successfully connected to Messaging Service \n
298 * - MSG_ERR_NULL_POINTER - Input parameter is NULL.
300 * \par Prospective clients:
301 * External/Native Apps using Messaging Services.
303 * \par Related functions:
306 * \par Known issues/bugs:
313 * MSG_HANDLE_T msgHandle = NULL;
314 * MSG_ERROR_T err = MSG_SUCCESS;
320 * err = msg_open_msg_handle(&msgHandle);
324 * msg_add_message(msgHandle, msg, &sendOpt);
326 * msgId = msg_get_message_id(msg);
328 * err = msg_release_message(&msg);
332 /*================================================================================================*/
333 int msg_get_message_id(msg_message_t msg);
339 * Check if the message object is an SMS Message
342 * This API is used to to check if the message object is SMS type message
344 * \par Typical use case:
345 * To check if the message object type is SMS.
347 * \par Method of function operation:
348 * Compares the message object against SMS message type.
350 * \par Sync (or) Async:
351 * This is a Synchronous API.
353 * \par Important notes:
354 * - If msg is NULL, nothing happens.
355 * - If msg is invalid, undefined behavior happens.
357 * \param msg_message_t input - message object which is to be decided if its SMS.
359 * \return Return Type (bool) \n
360 * - true - If message object is SMS \n
361 * - false - If message object is not SMS.
363 * \par Prospective clients:
364 * External/Native Apps using Messaging Services.
366 * \par Related functions:
369 * \par Known issues/bugs:
376 * MSG_HANDLE_T msgHandle = NULL;
377 * MSG_ERROR_T err = MSG_SUCCESS;
383 * err = msg_open_msg_handle(&msgHandle);
387 * msg_add_message(msgHandle, msg, &sendOpt);
389 * if( msg_is_sms(msg) )
391 * sprintf(str, "Message object is SMS");
395 * err = msg_release_message(&msg);
399 /*================================================================================================*/
400 bool msg_is_sms(msg_message_t msg);
407 * Check if the message object is an MMS Message
410 * This API is used to to check if the message object is MMS type message
412 * \par Typical use case:
413 * To check if the message object type is MMS.
415 * \par Method of function operation:
416 * Compares the message object against MMS message type.
418 * \par Sync (or) Async:
419 * This is a Synchronous API.
421 * \par Important notes:
424 * \param msg_message_t input - message object which is to be decided if its MMS.
426 * \return Return Type (bool) \n
427 * - true - If message object is MMS \n
428 * - false - If message object is not MMS.
430 * \par Prospective clients:
431 * External/Native Apps using Messaging Services.
433 * \par Related functions:
436 * \par Known issues/bugs:
443 * MSG_HANDLE_T msgHandle = NULL;
444 * MSG_ERROR_T err = MSG_SUCCESS;
450 * err = msg_open_msg_handle(&msgHandle);
454 * msg_add_message(msgHandle, msg, &sendOpt);
456 * if( msg_is_mms(msg) )
458 * sprintf(str, "Message object is MMS");
462 * err = msg_release_message(&msg);
466 /*================================================================================================*/
467 bool msg_is_mms(msg_message_t msg);
473 * Set storage id field to the passed storage_id.
476 * This API is used to set the Storage Id of the message object
478 * \par Typical use case:
479 * Message objects can be saved in either phone memory or SIM card, this API helps in setting the same.
481 * \par Method of function operation:
482 * Set the storageId member of msg_message_t to the passed Storage Id.
484 * \par Sync (or) Async:
485 * This is a Synchronous API.
487 * \par Important notes:
488 * - If msg is NULL, no action is done
489 * - If msg is invalid, behavior is undefined
491 * \param msg_message_t input - message object whose msgId is to be set.
492 * \param MSG_STORAGE_ID_T input - Storage Id to be set to the message storage id.
494 * \return Return Type (int(MSG_ERROR_T)) \n
495 * - MSG_SUCCESS - Successfully connected to Messaging Service \n
496 * - MSG_ERR_NULL_POINTER - Input parameter is NULL.
498 * \par Prospective clients:
499 * External/Native Apps using Messaging Services.
501 * \par Related functions:
504 * \par Known issues/bugs:
511 * MSG_HANDLE_T msgHandle = NULL;
512 * MSG_ERROR_T err = MSG_SUCCESS;
514 * MSG_STORAGE_ID_T storageId = 0;
518 * err = msg_open_msg_handle(&msgHandle);
522 * msg_add_message(msgHandle, msg, &sendOpt);
524 * err = msg_set_storage_id(msg, storageId);
525 * if (err != MSG_SUCCESS)
527 * sprintf(str, "msg_set_storage_id() Fail [%d]", err);
530 * return err; // if success, return OPERATION_SUCCESS. Or if fail, return related error code.
532 * err = msg_release_message(&msg);
536 /*================================================================================================*/
537 int msg_set_storage_id(msg_message_t opq_msg, MSG_STORAGE_ID_T storage_id);
543 * Gets storage id field of the message object.
546 * This API is used to get Storage Id of the message object
548 * \par Typical use case:
549 * * Message objects can be saved in either phone memory or SIM card, this API helps in getting the same.
551 * \par Method of function operation:
552 * Returnsthe storageId member of msg_message_t.
554 * \par Sync (or) Async:
555 * This is a Synchronous API.
557 * \par Important notes:
558 * - If msg is invalid, behavior is undefined
560 * \param msg_message_t input - message object whose msgId is to be set.
562 * \return Return Type (int (MSG_ERROR_T when negative, enum _MSG_STORAGE_ID_E when positive)) \n
563 * - storageId - Returns the storage Id defined by enum _MSG_STORAGE_ID_E. \n
564 * - MSG_ERR_NULL_POINTER msg is NULL.
566 * \par Prospective clients:
567 * External/Native Apps using Messaging Services.
569 * \par Related functions:
572 * \par Known issues/bugs:
579 * MSG_HANDLE_T msgHandle = NULL;
580 * MSG_ERROR_T err = MSG_SUCCESS;
582 * MSG_STORAGE_ID_T storageId = 0;
586 * err = msg_open_msg_handle(&msgHandle);
590 * msg_add_message(msgHandle, msg, &sendOpt);
592 * storageId = msg_get_storage_id(msg);
594 * sprintf(str, "msg_set_storage_id() storageId [%d]", storageId);
597 * err = msg_release_message(&msg);
601 /*================================================================================================*/
602 int msg_get_storage_id(msg_message_t opq_msg);
608 * Check if the message object is saved in SIM card
611 * This API is used to to check if the message object is saved in SIM card
613 * \par Typical use case:
614 * Message can be stored in Phone memory or SIM card, to check this we can use this API.
616 * \par Method of function operation:
617 * Checks if storage Id is SIM and returns boolean.
619 * \par Sync (or) Async:
620 * This is a Synchronous API.
622 * \par Important notes:
625 * \param msg_message_t input - message object.
627 * \return Return Type (bool) \n
628 * - true - If message object is stored in SIM \n
629 * - false - If message object is not stored in SIM.
631 * \par Prospective clients:
632 * External/Native Apps using Messaging Services.
634 * \par Related functions:
637 * \par Known issues/bugs:
644 * MSG_HANDLE_T msgHandle = NULL;
645 * MSG_ERROR_T err = MSG_SUCCESS;
651 * err = msg_open_msg_handle(&msgHandle);
655 * msg_add_message(msgHandle, msg, &sendOpt);
657 * if( msg_is_in_sim(msg) )
659 * sprintf(str, "Message object stored in SIM");
663 * err = msg_release_message(&msg);
667 /*================================================================================================*/
668 bool msg_is_in_sim(msg_message_t msg);
674 * Set the message type field to msg_type.
677 * This API is used to set the Message Type of the message object
679 * \par Typical use case:
680 * Message Objects can be SMS, MMS, etc message types, this API helps to set the message type.
682 * \par Method of function operation:
683 * Set the msgType member of msg_message_t to the passed msgType.
685 * \par Sync (or) Async:
686 * This is a Synchronous API.
688 * \par Important notes:
689 * - If msg is NULL, no action is done
690 * - If msg is invalid, behavior is undefined
692 * \param msg_message_t input - message object whose msgId is to be set.
693 * \param MSG_MESSAGE_TYPE_T input - Message type to be set.
695 * \return Return Type (int(MSG_ERROR_T)) \n
696 * - MSG_SUCCESS - Successfully connected to Messaging Service \n
697 * - MSG_ERR_NULL_POINTER - Input parameter is NULL.
699 * \par Prospective clients:
700 * External/Native Apps using Messaging Services.
702 * \par Related functions:
705 * \par Known issues/bugs:
712 * MSG_HANDLE_T msgHandle = NULL;
714 * MSG_ERROR_T err = MSG_SUCCESS;
718 * err = msg_open_msg_handle(&msgHandle);
722 * msg_add_message(msgHandle, msg, &sendOpt);
724 * err = msg_set_message_type(msg, MSG_TYPE_SMS);
725 * if (err != MSG_SUCCESS)
727 * sprintf(str, "msg_set_message_type() Fail [%d]", err);
730 * return err; // if success, return OPERATION_SUCCESS. Or if fail, return related error code.
732 * err = msg_release_message(&msg);
736 /*================================================================================================*/
737 int msg_set_message_type(msg_message_t msg, MSG_MESSAGE_TYPE_T msg_type);
743 * Gets Message type field of the message object.
746 * This API is used to get Message Type of the message object
748 * \par Typical use case:
749 * Message Objects can be SMS, MMS, etc message types, this API helps to get the message type.
751 * \par Method of function operation:
752 * Returns the msgType member of msg_message_t.
754 * \par Sync (or) Async:
755 * This is a Synchronous API.
757 * \par Important notes:
758 * - If msg is invalid, behavior is undefined
760 * \param msg_message_t input - message object whose msgType is to be set.
762 * \return Return Type (int) \n
763 * - msgType - Returns the Message type of the Message object passed \n
765 * \par Prospective clients:
766 * External/Native Apps using Messaging Services.
768 * \par Related functions:
771 * \par Known issues/bugs:
778 * MSG_HANDLE_T msgHandle = NULL;
780 * MSG_ERROR_T err = MSG_SUCCESS;
786 * err = msg_open_msg_handle(&msgHandle);
790 * msg_add_message(msgHandle, msg, &sendOpt);
792 * msgType = msg_get_message_type(msg);
794 * sprintf(str, "msg_get_message_type() Type [%d]", msgType);
797 * err = msg_release_message(&msg);
801 /*================================================================================================*/
802 int msg_get_message_type(msg_message_t msg);
808 * Set the folder id field to folder_id.
811 * This API is used to sets the Folder Id of the message object
813 * \par Typical use case:
814 * Message Objects can be associated with different folders such as Inbox, Outbox, Sent, etc. this API enables to set the folder id.
816 * \par Method of function operation:
817 * Set the folderId member of msg_message_t to the passed folder_id.
819 * \par Sync (or) Async:
820 * This is a Synchronous API.
822 * \par Important notes:
823 * - If msg is NULL, no action is done
824 * - If msg is invalid, behavior is undefined
826 * \param msg_message_t input - message object whose msgId is to be set.
827 * \param MSG_FOLDER_ID_T input - Folder Id to be set.
829 * \return Return Type (int(MSG_ERROR_T)) \n
830 * - MSG_SUCCESS - Successfully connected to Messaging Service \n
831 * - MSG_ERR_NULL_POINTER - Input parameter is NULL.
833 * \par Prospective clients:
834 * External/Native Apps using Messaging Services.
836 * \par Related functions:
839 * \par Known issues/bugs:
846 * MSG_HANDLE_T msgHandle = NULL;
847 * MSG_ERROR_T err = MSG_SUCCESS;
849 * MSG_FOLDER_ID_T folder_id = MSG_INBOX_ID;
853 * err = msg_open_msg_handle(&msgHandle);
857 * msg_add_message(msgHandle, msg, &sendOpt);
859 * err = msg_set_folder_id(msg, folder_id);
860 * if (err != MSG_SUCCESS)
862 * sprintf(str, "msg_set_folder_id() Fail [%d]", err);
865 * return err; // if success, return OPERATION_SUCCESS. Or if fail, return related error code.
867 * err = msg_release_message(&msg);
871 /*================================================================================================*/
872 int msg_set_folder_id(msg_message_t msg, MSG_FOLDER_ID_T folder_id);
878 * Gets Folder Id field of the message object.
881 * This API is used to get Folder Id of the message object
883 * \par Typical use case:
884 * Message Objects can be associated with different folders such as Inbox, Outbox, Sent, etc. this API enables to get the folder id.
886 * \par Method of function operation:
887 * Returns the folderId member of msg_message_t.
889 * \par Sync (or) Async:
890 * This is a Synchronous API.
892 * \par Important notes:
893 * - If msg is invalid, behavior is undefined
895 * \param msg_message_t input - message object.
897 * \return Return Type (int) \n
898 * - storageId - Returns the Folder Id of the Message object passed \n
899 * - MSG_ERR_NULL_POINTER - Input parameter is NULL.
901 * \par Prospective clients:
902 * External/Native Apps using Messaging Services.
904 * \par Related functions:
907 * \par Known issues/bugs:
914 * MSG_HANDLE_T msgHandle = NULL;
915 * MSG_ERROR_T err = MSG_SUCCESS;
921 * err = msg_open_msg_handle(&msgHandle);
925 * msg_add_message(msgHandle, msg, &sendOpt);
927 * folderId = msg_get_folder_id(msg);
929 * sprintf(str, "msg_get_folder_id() Folder Id [%d]", folderId);
932 * err = msg_release_message(&msg);
936 /*================================================================================================*/
937 int msg_get_folder_id(msg_message_t msg);
943 * Reset address field in message object.
946 * This API is used for modifying the message object, such as forwarding a message.
948 * \par Typical use case:
949 * Message Object address field might be needed to reset. This API helps in the same.
951 * \par Method of function operation:
952 * Flushes the already set address list and reset to defaults.
954 * \par Sync (or) Async:
955 * This is a Synchronous API.
957 * \par Important notes:
960 * \param msg_message_t input - message object.
962 * \return Return Type (bool) \n
963 * - MSG_SUCCESS - Successfully connected to Messaging Service \n
964 * - MSG_ERR_NULL_POINTER - Input parameter is NULL.
966 * \par Prospective clients:
967 * External/Native Apps using Messaging Services.
969 * \par Related functions:
972 * \par Known issues/bugs:
979 * MSG_HANDLE_T msgHandle = NULL;
980 * MSG_ERROR_T err = MSG_SUCCESS;
986 * err = msg_open_msg_handle(&msgHandle);
990 * msg = msg_new_message();
991 * MSG_SENDINGOPT_S sendOpt = {0};
992 * err = msg_get_message(msgHandle, (MSG_MESSAGE_ID_T)msgId, msg, &sendOpt);
993 * err = msg_reset_address(msg);
994 * if (err != MSG_SUCCESS)
996 * sprintf(str, "msg_release_message() Fail [%d]", err);
999 * return err; // if success, return OPERATION_SUCCESS. Or if fail, return related error code.
1002 * err = msg_release_message(&msg);
1006 /*================================================================================================*/
1007 int msg_reset_address(msg_message_t msg);
1013 * Add recipient address in message object.
1016 * This API is used for adding address to the message object.
1018 * \par Typical use case:
1019 * Message Object recipient address field should be filled before message can be sent over the network.
1021 * \par Method of function operation:
1022 * The phone_num_list is added to the addressList member of the message object structure.
1024 * \par Sync (or) Async:
1025 * This is a Synchronous API.
1027 * \par Important notes:
1030 * \param msg_message_t input - message object.
1031 * \param phone_num_list input - concatenated number string, which is separated by ",", such as "1112223333, 4445556666".
1032 * \param to_type input - to_type is one of enum _MSG_RECIPIENT_TYPE_E.
1034 * \return Return Type (bool) \n
1035 * - MSG_SUCCESS - Successfully connected to Messaging Service \n
1036 * - MSG_ERR_NULL_POINTER - Input parameter is NULL.
1038 * \par Prospective clients:
1039 * External/Native Apps using Messaging Services.
1041 * \par Related functions:
1044 * \par Known issues/bugs:
1051 * MSG_HANDLE_T msgHandle = NULL;
1052 * MSG_ERROR_T err = MSG_SUCCESS;
1053 * msg_message_t msg;
1058 * err = msg_open_msg_handle(&msgHandle);
1062 * msg = msg_new_message();
1063 * MSG_SENDINGOPT_S sendOpt = {0};
1064 * err = msg_get_message(msgHandle, (MSG_MESSAGE_ID_T)msgId, msg, &sendOpt);
1065 * err = msg_add_address(msg, "+1004", MSG_RECIPIENTS_TYPE_TO);
1066 * if (err != MSG_SUCCESS)
1068 * sprintf(str, "msg_release_message() Fail [%d]", err);
1071 * return err; // if success, return OPERATION_SUCCESS. Or if fail, return related error code.
1074 * err = msg_release_message(&msg);
1078 /*================================================================================================*/
1079 int msg_add_address(msg_message_t msg, const char* phone_num_list, MSG_RECIPIENT_TYPE_T to_type);
1085 * Return count of recipient address in message object.
1088 * This API is used for getting the count of recipient addresses in the message object.
1090 * \par Typical use case:
1091 * To get the count of the recipient list in the message object.
1093 * \par Method of function operation:
1094 * Returns the address count member of the message object..
1096 * \par Sync (or) Async:
1097 * This is a Synchronous API.
1099 * \par Important notes:
1102 * \param msg_message_t input - message object.
1104 * \return Return Type (int) \n
1105 * - recipient count \n
1106 * - MSG_ERR_NULL_POINTER - Input parameter is NULL.
1108 * \par Prospective clients:
1109 * External/Native Apps using Messaging Services.
1111 * \par Related functions:
1114 * \par Known issues/bugs:
1121 * MSG_HANDLE_T msgHandle = NULL;
1122 * MSG_ERROR_T err = MSG_SUCCESS;
1123 * msg_message_t msg;
1128 * err = msg_open_msg_handle(&msgHandle);
1132 * msg = msg_new_message();
1133 * MSG_SENDINGOPT_S sendOpt = {0};
1134 * nCount = msg_get_address_count(msg);
1135 * sprintf(str, "msg_add_address() nCount [%d]", nCount);
1138 * err = msg_release_message(&msg);
1142 /*================================================================================================*/
1143 int msg_get_address_count(msg_message_t msg);
1149 * Return ith thread id in message object.
1152 * This API is used for getting the ith thread id in message object.
1154 * \par Typical use case:
1155 * Get the requested thread id from the message object.
1157 * \par Method of function operation:
1158 * Returns the ith thread id from the message object address list.
1160 * \par Sync (or) Async:
1161 * This is a Synchronous API.
1163 * \par Important notes:
1166 * \param msg_message_t input - message object.
1167 * \param int input - thread id.
1169 * \return Return Type (int) \n
1171 * - MSG_ERR_NULL_POINTER - Input parameter is NULL.
1173 * \par Prospective clients:
1174 * External/Native Apps using Messaging Services.
1176 * \par Related functions:
1179 * \par Known issues/bugs:
1186 * MSG_HANDLE_T msgHandle = NULL;
1187 * MSG_ERROR_T err = MSG_SUCCESS;
1188 * msg_message_t msg;
1193 * err = msg_open_msg_handle(&msgHandle);
1197 * err = msg_get_ith_thread_id(msg, 0);
1198 * if(err != MSG_SUCCESS)
1200 * sprintf(str, "msg_get_ith_thread_id() Fail [%d]", err);
1202 * return err; // if success, return OPERATION_SUCCESS. Or if fail, return related error code.
1205 * err = msg_release_message(&msg);
1209 /*================================================================================================*/
1210 int msg_get_ith_thread_id(msg_message_t msg, int ith);
1216 * Return ith recipient address in message object.
1219 * This API is used for getting the ith recipient address in message object.
1221 * \par Typical use case:
1222 * To get the requested recipient address index from the message object.
1224 * \par Method of function operation:
1225 * Returns the ith recipient address in address list from the message object.
1227 * \par Sync (or) Async:
1228 * This is a Synchronous API.
1230 * \par Important notes:
1231 * - You do not need to free the return value. It will be freed when you call msg_release_message().
1232 * - Also, the value is valid until msg_message_t is freed by calling msg_release_message().
1234 * \param msg_message_t input - message object.
1235 * \param int input - recipient address index.
1237 * \return Return Type (int) \n
1239 * - MSG_ERR_NULL_POINTER - Input parameter is NULL.
1241 * \par Prospective clients:
1242 * External/Native Apps using Messaging Services.
1244 * \par Related functions:
1247 * \par Known issues/bugs:
1254 * MSG_HANDLE_T msgHandle = NULL;
1255 * MSG_ERROR_T err = MSG_SUCCESS;
1256 * msg_message_t msg;
1257 * const char* address;
1261 * err = msg_open_msg_handle(&msgHandle);
1265 * address = msg_get_ith_address(msg, 0);
1266 * if(address != NULL && strlen(address) > 0)
1268 * sprintf(str, "msg_get_ith_address() address [%s]", address);
1272 * err = msg_release_message(&msg);
1276 /*================================================================================================*/
1277 const char* msg_get_ith_address(msg_message_t msg, int ith);
1283 * Return ith recipient type in message object.
1286 * This API is used for getting the ith recipient type in message object.
1288 * \par Typical use case:
1289 * To get the requested recipient type from the message object.
1291 * \par Method of function operation:
1292 * Returns the ith recipient type in address list from the message object.
1294 * \par Sync (or) Async:
1295 * This is a Synchronous API.
1297 * \par Important notes:
1300 * \param msg_message_t input - message object.
1301 * \param int input - recipient address index.
1303 * \return Return Type (int) \n
1305 * - MSG_ERR_NULL_POINTER - Input parameter is NULL.
1307 * \par Prospective clients:
1308 * External/Native Apps using Messaging Services.
1310 * \par Related functions:
1313 * \par Known issues/bugs:
1320 * MSG_HANDLE_T msgHandle = NULL;
1321 * MSG_ERROR_T err = MSG_SUCCESS;
1322 * msg_message_t msg;
1327 * err = msg_open_msg_handle(&msgHandle);
1331 * r_type = msg_get_ith_recipient_type(msg, 0);
1332 * sprintf(str, "msg_get_ith_recipient_type() r_type [%s]", r_type);
1335 * err = msg_release_message(&msg);
1339 /*================================================================================================*/
1340 int msg_get_ith_recipient_type(msg_message_t msg, int ith);
1346 * Return ith recipient name which is associated with contact engine.
1349 * This API is used for getting the ith recipient name which is associated with contact engine.
1351 * \par Typical use case:
1352 * To get the requested recipient name from the message object which is associated with the contact engine.
1354 * \par Method of function operation:
1355 * Returns the ith recipient name of the address list from the message object.
1357 * \par Sync (or) Async:
1358 * This is a Synchronous API.
1360 * \par Important notes:
1361 * - You do not need to free the return value. It will be freed when you call msg_release_message().
1362 * - Also, the value is valid until msg_message_t is freed by calling msg_release_message().
1364 * \param msg_message_t input - message object.
1365 * \param int input - recipient address index.
1367 * \return Return Type (int) \n
1369 * - MSG_ERR_NULL_POINTER - Input parameter is NULL.
1371 * \par Prospective clients:
1372 * External/Native Apps using Messaging Services.
1374 * \par Related functions:
1377 * \par Known issues/bugs:
1384 * MSG_HANDLE_T msgHandle = NULL;
1385 * MSG_ERROR_T err = MSG_SUCCESS;
1386 * msg_message_t msg;
1391 * err = msg_open_msg_handle(&msgHandle);
1395 * name = msg_get_ith_name(msg, 0);
1396 * if(name != NULL && strlen(name) > 0)
1398 * sprintf(str, "msg_get_ith_recipient_type() name [%s]", name);
1402 * err = msg_release_message(&msg);
1406 /*================================================================================================*/
1407 const char* msg_get_ith_name(msg_message_t msg, int ith);
1413 * Return ith recipient contact id which is associated with contact engine.
1416 * This API is used for getting the ith recipient contact id which is associated with contact engine.
1418 * \par Typical use case:
1419 * To get the requested recipient contact id from the message object which is associated with the contact engine.
1421 * \par Method of function operation:
1422 * Returns the ith recipient contact id in address list from the message object.
1424 * \par Sync (or) Async:
1425 * This is a Synchronous API.
1427 * \par Important notes:
1428 * - If msg is NULL, nothing happens.
1429 * - If msg is invalid, undefined behavior happens.
1431 * \param msg_message_t input - message object.
1432 * \param int input - recipient address index.
1434 * \return Return Type (int) \n
1436 * - MSG_ERR_NULL_POINTER - Input parameter is NULL.
1438 * \par Prospective clients:
1439 * External/Native Apps using Messaging Services.
1441 * \par Related functions:
1444 * \par Known issues/bugs:
1451 * MSG_HANDLE_T msgHandle = NULL;
1452 * MSG_ERROR_T err = MSG_SUCCESS;
1453 * msg_message_t msg;
1458 * err = msg_open_msg_handle(&msgHandle);
1460 * contact_id = msg_get_ith_contact_id(msg, 0);
1461 * sprintf(str, "msg_get_ith_contact_id() contact_id [%d]", contact_id);
1464 * err = msg_release_message(&msg);
1468 /*================================================================================================*/
1469 int msg_get_ith_contact_id(msg_message_t msg, int ith);
1475 * Add reply address in message object.
1478 * This API is used for adding reply address to the message object.
1480 * \par Typical use case:
1481 * Message Object reply address field should be filled before message can be sent over the network.
1483 * \par Method of function operation:
1484 * The phone_num is set to the replyAddress of the message object structure.
1486 * \par Sync (or) Async:
1487 * This is a Synchronous API.
1489 * \par Important notes:
1492 * \param msg_message_t input - message object.
1493 * \param phone_num input - phone number such as "1112223333, 4445556666".
1495 * \return Return Type (bool) \n
1496 * - MSG_SUCCESS - Successfully connected to Messaging Service \n
1497 * - MSG_ERR_NULL_POINTER - Input parameter is NULL.
1498 * - MSG_ERR_INVALID_PARAMETER - Input parameter is too long.
1500 * \par Prospective clients:
1501 * External/Native Apps using Messaging Services.
1503 * \par Related functions:
1506 * \par Known issues/bugs:
1513 * MSG_HANDLE_T msgHandle = NULL;
1514 * MSG_ERROR_T err = MSG_SUCCESS;
1515 * msg_message_t msg;
1520 * err = msg_open_msg_handle(&msgHandle);
1524 * msg = msg_new_message();
1525 * MSG_SENDINGOPT_S sendOpt = {0};
1526 * err = msg_get_message(msgHandle, (MSG_MESSAGE_ID_T)msgId, msg, &sendOpt);
1527 * err = msg_set_reply_address(msg, "+821030016057");
1528 * if (err != MSG_SUCCESS)
1530 * sprintf(str, "msg_release_message() Fail [%d]", err);
1533 * return err; // if success, return OPERATION_SUCCESS. Or if fail, return related error code.
1536 * err = msg_release_message(&msg);
1540 /*================================================================================================*/
1541 int msg_set_reply_address(msg_message_t opq_msg, const char* phone_num);
1547 * Set data field to mdata of size. SMS data is used for either of text or binary data.
1550 * This API is used to set the Message data field of the message object to the passed mdata parameter of size bytes.
1552 * \par Typical use case:
1553 * Message Object needs to be filled with the data member, in case of SMS data can be text or binary and in case of MMS data is the MIME encoded buffer.
1555 * \par Method of function operation:
1556 * Copies "size" bytes of mdata to the pData member of the message object.
1558 * \par Sync (or) Async:
1559 * This is a Synchronous API.
1561 * \par Important notes:
1562 * - If msg is NULL, no action is done
1563 * - If msg is invalid, behavior is undefined
1565 * \param msg_message_t input - message object whose msgId is to be set.
1566 * \param const char* input - data to be set.
1567 * \param int input - size of mdata to be set to message object
1569 * \return Return Type (int(MSG_ERROR_T)) \n
1570 * - MSG_SUCCESS - Successfully connected to Messaging Service \n
1571 * - MSG_ERR_NULL_POINTER - Input parameter is NULL.
1572 * - MSG_ERR_INVALID_PARAMETER class_type is not one of enum _MSG_CLASS_TYPE_E.
1574 * \par Prospective clients:
1575 * External/Native Apps using Messaging Services.
1577 * \par Related functions:
1580 * \par Known issues/bugs:
1587 * MSG_HANDLE_T msgHandle = NULL;
1588 * MSG_ERROR_T err = MSG_SUCCESS;
1589 * msg_message_t msg;
1590 * const char *msg_body = "Sample Message Body";
1594 * err = msg_open_msg_handle(&msgHandle);
1596 * msg = msg_new_message();
1600 * err = msg_sms_set_message_body(msg, msg_body, strlen(msg_body));
1601 * if (err != MSG_SUCCESS)
1603 * sprintf(str, "msg_sms_set_message_body() Fail [%d]", err);
1606 * return err; // if success, return OPERATION_SUCCESS. Or if fail, return related error code.
1608 * err = msg_release_message(&msg);
1612 /*================================================================================================*/
1613 int msg_sms_set_message_body(msg_message_t msg, const char* mdata, int size);
1619 * Return data field in message object. SMS data is used for either of text or binary data.
1622 * This API is used for getting the data field of the message object.
1624 * \par Typical use case:
1625 * Message Object needs to be filled with the data member, in case of SMS data can be text or binary and in case of MMS data is the MIME encoded buffer.
1627 * \par Method of function operation:
1628 * Returns the storageId member of msg_message_t.
1630 * \par Sync (or) Async:
1631 * This is a Synchronous API.
1633 * \par Important notes:
1634 * - If msg is invalid, behavior is undefined
1636 * \param msg_message_t input - message object whose msgId is to be set.
1638 * \return Return Type (const char* (message body)) \n
1639 * - char array - Message body data \n
1642 * \par Prospective clients:
1643 * External/Native Apps using Messaging Services.
1645 * \par Related functions:
1648 * \par Known issues/bugs:
1655 * MSG_HANDLE_T msgHandle = NULL;
1656 * MSG_ERROR_T err = MSG_SUCCESS;
1657 * msg_message_t msg;
1658 * const char *msg_body;
1662 * err = msg_open_msg_handle(&msgHandle);
1666 * msg_message_t msg = msg_new_message();
1667 * MSG_SENDINGOPT_S sendOpt = {0, };
1668 * msg_get_message(hMsgHandle, 1, msg, &sendOpt);
1670 * msg_body = msg_sms_get_message_body(msg);
1671 * if (msg_body != NULL && strlen(msg_body) > 0)
1673 * sprintf(str, "msg_sms_set_message_body() msg_body [%s]", msg_body);
1677 * err = msg_release_message(&msg);
1681 /*================================================================================================*/
1682 const char* msg_sms_get_message_body(msg_message_t msg);
1688 * Return data field in message object. MMS data is used for text.
1691 * This API is used for getting the data field of the message object.
1693 * \par Typical use case:
1694 * Message Object needs to be filled with the data member, in case of SMS data can be text or binary and in case of MMS data is the MIME encoded buffer.
1696 * \par Method of function operation:
1697 * Returns the storageId member of msg_message_t.
1699 * \par Sync (or) Async:
1700 * This is a Synchronous API.
1702 * \par Important notes:
1703 * - If msg is invalid, behavior is undefined
1705 * \param msg_message_t input - message object whose msgId is to be set.
1707 * \return Return Type (const char* (message body)) \n
1708 * - char array - Message body data \n
1711 * \par Prospective clients:
1712 * External/Native Apps using Messaging Services.
1714 * \par Related functions:
1717 * \par Known issues/bugs:
1724 * MSG_HANDLE_T msgHandle = NULL;
1725 * MSG_ERROR_T err = MSG_SUCCESS;
1726 * msg_message_t msg;
1727 * const char *msg_body;
1731 * err = msg_open_msg_handle(&msgHandle);
1735 * msg_message_t msg = msg_new_message();
1736 * MSG_SENDINGOPT_S sendOpt = {0, };
1737 * msg_get_message(hMsgHandle, 1, msg, &sendOpt);
1739 * msg_body = msg_mms_get_text_contents(msg);
1740 * if (msg_body != NULL && strlen(msg_body) > 0)
1742 * sprintf(str, "msg_mms_get_text_contents() msg_body [%s]", msg_body);
1746 * err = msg_release_message(&msg);
1750 /*================================================================================================*/
1751 const char* msg_mms_get_text_contents(msg_message_t msg);
1757 * Gets the size of data field in message object.
1760 * This API is used for getting the size of data field in message object.
1762 * \par Typical use case:
1763 * Size of the Message data field can be useful in various scenarios such as restrict sending large MMS, display size to user, etc.
1765 * \par Method of function operation:
1766 * Returns the dataSize member of msg_message_t.
1768 * \par Sync (or) Async:
1769 * This is a Synchronous API.
1771 * \par Important notes:
1772 * - If msg is invalid, behavior is undefined
1774 * \param msg_message_t input - message object.
1776 * \return Return Type (int) \n
1777 * - int - Size of the data in the Message Object
1779 * \par Prospective clients:
1780 * External/Native Apps using Messaging Services.
1782 * \par Related functions:
1785 * \par Known issues/bugs:
1792 * MSG_HANDLE_T msgHandle = NULL;
1793 * MSG_ERROR_T err = MSG_SUCCESS;
1794 * msg_message_t msg;
1795 * int msg_body_size;
1799 * err = msg_open_msg_handle(&msgHandle);
1803 * msg_message_t msg = msg_new_message();
1804 * MSG_SENDINGOPT_S sendOpt = {0, };
1805 * msg_get_message(hMsgHandle, 1, msg, &sendOpt);
1807 * msg_body_size = msg_get_message_body_size(msg);
1808 * sprintf(str, "msg_sms_set_message_body() msg_body_size [%d]", msg_body_size);
1811 * err = msg_release_message(&msg);
1815 /*================================================================================================*/
1816 int msg_get_message_body_size(msg_message_t msg);
1822 * Sets subject field of the message object to subject. This API is used for MMS.
1825 * This API is used for setting the subject field of the message object
1827 * \par Typical use case:
1828 * MMS message object may contain subject field, this API enables to set the same.
1830 * \par Method of function operation:
1831 * Set the subject member of msg_message_t to the passed subject.
1833 * \par Sync (or) Async:
1834 * This is a Synchronous API.
1836 * \par Important notes:
1837 * - If msg is NULL, no action is done
1838 * - If msg is invalid, behavior is undefined
1840 * \param msg_message_t input - message object whose msgId is to be set.
1841 * \param const char* input - Subject to be set.
1843 * \return Return Type (int(MSG_ERROR_T)) \n
1844 * - MSG_SUCCESS - Successfully connected to Messaging Service \n
1845 * - MSG_ERR_NULL_POINTER - Input parameter is NULL.
1847 * \par Prospective clients:
1848 * External/Native Apps using Messaging Services.
1850 * \par Related functions:
1853 * \par Known issues/bugs:
1860 * MSG_HANDLE_T msgHandle = NULL;
1861 * MSG_ERROR_T err = MSG_SUCCESS;
1862 * msg_message_t msg;
1863 * const char* subject = "Test Subject";
1867 * err = msg_open_msg_handle(&msgHandle);
1871 * err = msg_set_subject(msg, subject);
1872 * if (err != MSG_SUCCESS)
1874 * sprintf(str, "msg_set_subject() Fail [%d]", err);
1877 * return err; // if success, return OPERATION_SUCCESS. Or if fail, return related error code.
1879 * err = msg_release_message(&msg);
1883 /*================================================================================================*/
1884 int msg_set_subject(msg_message_t msg, const char* subject);
1890 * Returns the subject field of the message object. This API is used for MMS.
1893 * This API is used for getting the subject field of the message object
1895 * \par Typical use case:
1896 * MMS message object may contain subject field, this API enables to get the same.
1898 * \par Method of function operation:
1899 * Returns the subject member of msg_message_t.
1901 * \par Sync (or) Async:
1902 * This is a Synchronous API.
1904 * \par Important notes:
1905 * - If msg is invalid, behavior is undefined
1907 * \param msg_message_t input - message object.
1909 * \return Return Type (const char*) \n
1910 * - const char - MMS message subject \n
1911 * - NULL - Message object/Subject field is NULL.
1913 * \par Prospective clients:
1914 * External/Native Apps using Messaging Services.
1916 * \par Related functions:
1919 * \par Known issues/bugs:
1926 * MSG_HANDLE_T msgHandle = NULL;
1927 * MSG_ERROR_T err = MSG_SUCCESS;
1928 * msg_message_t msg;
1929 * char* msg_subject;
1933 * err = msg_open_msg_handle(&msgHandle);
1937 * msg_message_t msg = msg_new_message();
1938 * MSG_SENDINGOPT_S sendOpt = {0, };
1939 * msg_get_message(hMsgHandle, 1, msg, &sendOpt);
1941 * msg_subject = msg_get_subject(msg);
1942 * if(msg_subject != NULL && strlen(msg_subject) > 0)
1944 * sprintf(str, "msg_get_subject() msg_subject [%s]", msg_subject);
1948 * err = msg_release_message(&msg);
1952 /*================================================================================================*/
1953 const char* msg_get_subject(msg_message_t msg);
1959 * Set time field to msg_time of the message object. \n
1960 * If you need to update time in message object, use this API with passing time() in time.h.
1963 * This API is used for setting the message time of the message object
1965 * \par Typical use case:
1966 * Message object should contain the time field before it is sent over the network.
1968 * \par Method of function operation:
1969 * Set the msg_time member of msg_message_t to the passed msg_time.
1971 * \par Sync (or) Async:
1972 * This is a Synchronous API.
1974 * \par Important notes:
1975 * - If msg is NULL, no action is done
1976 * - If msg is invalid, behavior is undefined
1978 * \param msg_message_t input - message object whose msgId is to be set.
1979 * \param const char* input - Subject to be set.
1981 * \return Return Type (int(MSG_ERROR_T)) \n
1982 * - MSG_SUCCESS - Successfully connected to Messaging Service \n
1983 * - MSG_ERR_NULL_POINTER - Input parameter is NULL.
1985 * \par Prospective clients:
1986 * External/Native Apps using Messaging Services.
1988 * \par Related functions:
1991 * \par Known issues/bugs:
1998 * MSG_HANDLE_T msgHandle = NULL;
1999 * MSG_ERROR_T err = MSG_SUCCESS;
2000 * msg_message_t msg;
2001 * time_t curTime = time(NULL);
2005 * err = msg_open_msg_handle(&msgHandle);
2008 * msg = msg_new_message();
2009 * err = msg_set_time(msgInfo, curTime);
2010 * if (err != MSG_SUCCESS)
2012 * sprintf(str, "msg_set_time() Fail [%d]", err);
2015 * return err; // if success, return OPERATION_SUCCESS. Or if fail, return related error code.
2017 * err = msg_release_message(&msg);
2021 /*================================================================================================*/
2022 int msg_set_time(msg_message_t msg, time_t msg_time);
2028 * Return the time field in message object.
2031 * This API is used for getting the time field of the message object
2033 * \par Typical use case:
2034 * Message object should contain the time field before it is sent over the network.
2036 * \par Method of function operation:
2037 * Returns the msg_time member of msg_message_t.
2039 * \par Sync (or) Async:
2040 * This is a Synchronous API.
2042 * \par Important notes:
2043 * - If msg is invalid, behavior is undefined
2045 * \param msg_message_t input - message object.
2047 * \return Return Type (time_t) \n
2048 * - time_t - Message time value \n
2049 * - NULL - Message object is NULL.
2051 * \par Prospective clients:
2052 * External/Native Apps using Messaging Services.
2054 * \par Related functions:
2057 * \par Known issues/bugs:
2064 * MSG_HANDLE_T msgHandle = NULL;
2065 * MSG_ERROR_T err = MSG_SUCCESS;
2066 * msg_message_t msg;
2071 * err = msg_open_msg_handle(&msgHandle);
2075 * msg_message_t msg = msg_new_message();
2076 * MSG_SENDINGOPT_S sendOpt = {0, };
2077 * msg_get_message(hMsgHandle, 1, msg, &sendOpt);
2079 * msg_time = msg_get_time(msg);
2080 * sprintf(str, "msg_get_time() msg_time [%s]", ctime(msg_time));
2083 * err = msg_release_message(&msg);
2087 /*================================================================================================*/
2088 time_t* msg_get_time(msg_message_t msg);
2094 * Set network status to status. Network status represents the status result when you send/receive the message.
2097 * This API is used for setting the network status field of the message object
2099 * \par Typical use case:
2100 * Network status represents the status result when you send/receive the message.
2102 * \par Method of function operation:
2103 * Set the networkStatus member of msg_message_t to the passed status.
2105 * \par Sync (or) Async:
2106 * This is a Synchronous API.
2108 * \par Important notes:
2109 * - If msg is NULL, no action is done
2110 * - If msg is invalid, behavior is undefined
2112 * \param msg_message_t input - message object whose msgId is to be set.
2113 * \param int input - status is one of enum _MSG_NETWORK_STATUS_E.
2115 * \return Return Type (int(MSG_ERROR_T)) \n
2116 * - MSG_SUCCESS - Successfully connected to Messaging Service \n
2117 * - MSG_ERR_NULL_POINTER - Input parameter is NULL.
2119 * \par Prospective clients:
2120 * External/Native Apps using Messaging Services.
2122 * \par Related functions:
2125 * \par Known issues/bugs:
2132 * MSG_HANDLE_T msgHandle = NULL;
2133 * MSG_ERROR_T err = MSG_SUCCESS;
2134 * msg_message_t msg;
2138 * err = msg_open_msg_handle(&msgHandle);
2142 * err= msg_set_network_status(msg, MSG_NETWORK_SEND_SUCCESS);
2143 * if (err != MSG_SUCCESS)
2145 * sprintf(str, "msg_set_network_status() Fail [%d]", err);
2148 * return err; // if success, return OPERATION_SUCCESS. Or if fail, return related error code.
2150 * err = msg_release_message(&msg);
2154 /*================================================================================================*/
2155 int msg_set_network_status(msg_message_t msg, MSG_NETWORK_STATUS_T status);
2161 * Returns the network status of message object. Network status represents the status result when you send/receive the message.
2164 * This API is used for getting the networkStatus field of the message object
2166 * \par Typical use case:
2167 * Network status represents the status result when you send/receive the message.
2169 * \par Method of function operation:
2170 * Returns the networkStatus member of msg_message_t.
2172 * \par Sync (or) Async:
2173 * This is a Synchronous API.
2175 * \par Important notes:
2176 * - If msg is invalid, behavior is undefined
2178 * \param msg_message_t input - message object.
2180 * \return Return Type (int (MSG_ERROR_T when negative, enum _MSG_NETWORK_STATUS_E when positive)) \n
2181 * - positive int enum _MSG_NETWORK_STATUS_E.
2182 * - MSG_ERR_NULL_POINTER msg is NULL.
2184 * \par Prospective clients:
2185 * External/Native Apps using Messaging Services.
2187 * \par Related functions:
2190 * \par Known issues/bugs:
2197 * MSG_HANDLE_T msgHandle = NULL;
2198 * MSG_ERROR_T err = MSG_SUCCESS;
2199 * msg_message_t msg;
2200 * int network_status;
2204 * err = msg_open_msg_handle(&msgHandle);
2208 * msg_message_t msg = msg_new_message();
2209 * MSG_SENDINGOPT_S sendOpt = {0, };
2210 * msg_get_message(hMsgHandle, 1, msg, &sendOpt);
2212 * network_status = msg_get_network_status(msg);
2213 *sprintf(str, "msg_get_network_status() network_status [%d]", network_status);
2216 * err = msg_release_message(&msg);
2220 /*================================================================================================*/
2221 int msg_get_network_status(msg_message_t msg);
2227 * Set message data encode type to encoding_type. The message data is encoded with one of GSM-7, ascii, ucs2, or auto.
2230 * This API is used for setting the encode type field of the message object
2232 * \par Typical use case:
2233 * The message data is encoded with one of GSM-7, ascii, ucs2, or auto.
2235 * \par Method of function operation:
2236 * Set the encodeType member of msg_message_t to the passed encoding_type.
2238 * \par Sync (or) Async:
2239 * This is a Synchronous API.
2241 * \par Important notes:
2242 * - If msg is NULL, no action is done
2243 * - If msg is invalid, behavior is undefined
2245 * \param msg_message_t input - message object.
2246 * \param MSG_ENCODE_TYPE_T input - encode type to be set.
2248 * \return Return Type (int(MSG_ERROR_T)) \n
2249 * - MSG_SUCCESS - Successfully connected to Messaging Service \n
2250 * - MSG_ERR_NULL_POINTER - Input parameter is NULL.
2252 * \par Prospective clients:
2253 * External/Native Apps using Messaging Services.
2255 * \par Related functions:
2258 * \par Known issues/bugs:
2265 * MSG_HANDLE_T msgHandle = NULL;
2266 * MSG_ERROR_T err = MSG_SUCCESS;
2267 * msg_message_t msg;
2271 * err = msg_open_msg_handle(&msgHandle);
2275 * err = msg_set_encode_type(msgInfo, MSG_ENCODE_GSM7BIT);
2276 * if (err != MSG_SUCCESS)
2278 * sprintf(str, "msg_set_encode_type() Fail [%d]", err);
2281 * return err; // if success, return OPERATION_SUCCESS. Or if fail, return related error code.
2283 * err = msg_release_message(&msg);
2287 /*================================================================================================*/
2288 int msg_set_encode_type(msg_message_t msg, MSG_ENCODE_TYPE_T encoding_type);
2294 * Return message data encode type. The message data is encoded with one of GSM-7, ascii, ucs2, or auto.
2297 * This API is used for getting the encode type field of the message object
2299 * \par Typical use case:
2300 * The message data is encoded with one of GSM-7, ascii, ucs2, or auto.
2302 * \par Method of function operation:
2303 * Returns the encodeType member of msg_message_t.
2305 * \par Sync (or) Async:
2306 * This is a Synchronous API.
2308 * \par Important notes:
2309 * - If msg is invalid, behavior is undefined
2311 * \param msg_message_t input - message object.
2313 * \return Return Type (int) \n
2314 * - positive int enum MSG_ENCODE_TYPE_T.
2315 * - MSG_ERR_NULL_POINTER msg is NULL.
2317 * \par Prospective clients:
2318 * External/Native Apps using Messaging Services.
2320 * \par Related functions:
2323 * \par Known issues/bugs:
2330 * MSG_HANDLE_T msgHandle = NULL;
2331 * MSG_ERROR_T err = MSG_SUCCESS;
2332 * msg_message_t msg;
2337 * err = msg_open_msg_handle(&msgHandle);
2341 * msg_message_t msg = msg_new_message();
2342 * MSG_SENDINGOPT_S sendOpt = {0, };
2343 * msg_get_message(hMsgHandle, 1, msg, &sendOpt);
2345 * encode_type = msg_get_encode_type(msg);
2346 * sprintf(str, "msg_get_network_status() encode_type [%d]", encode_type);
2349 * err = msg_release_message(&msg);
2353 /*================================================================================================*/
2354 int msg_get_encode_type(msg_message_t msg);
2360 * Set message read status to read_flag.
2363 * This API is used to set read status to bRead field of the message object
2365 * \par Typical use case:
2366 * Read status can be set using this API.
2368 * \par Method of function operation:
2369 * Set the bRead member of msg_message_t to the passed read_flag.
2371 * \par Sync (or) Async:
2372 * This is a Synchronous API.
2374 * \par Important notes:
2375 * - If msg is NULL, no action is done
2376 * - If msg is invalid, behavior is undefined
2378 * \param msg_message_t input - message object.
2379 * \param bool input - read status to be set.
2381 * \return Return Type (int(MSG_ERROR_T)) \n
2382 * - MSG_SUCCESS - Successfully connected to Messaging Service \n
2383 * - MSG_ERR_NULL_POINTER - Input parameter is NULL.
2385 * \par Prospective clients:
2386 * External/Native Apps using Messaging Services.
2388 * \par Related functions:
2391 * \par Known issues/bugs:
2398 * MSG_HANDLE_T msgHandle = NULL;
2399 * MSG_ERROR_T err = MSG_SUCCESS;
2400 * msg_message_t msg;
2404 * err = msg_open_msg_handle(&msgHandle);
2408 * err = msg_set_read_status(msg, true);
2409 * if (err != MSG_SUCCESS)
2411 * sprintf(str, "msg_set_read_status() Fail [%d]", err);
2414 * return err; // if success, return OPERATION_SUCCESS. Or if fail, return related error code.
2417 * err = msg_release_message(&msg);
2421 /*================================================================================================*/
2422 int msg_set_read_status(msg_message_t msg, bool read_flag);
2428 * Return true if the message is read.
2431 * This API is used to check if the message object is read.
2433 * \par Typical use case:
2434 * Read status can be checked using this API.
2436 * \par Method of function operation:
2437 * Checks if message object is read and returns bool.
2439 * \par Sync (or) Async:
2440 * This is a Synchronous API.
2442 * \par Important notes:
2445 * \param msg_message_t input - message object.
2447 * \return Return Type (bool) \n
2448 * - true - If message object is read \n
2449 * - false - If message object is not read.
2451 * \par Prospective clients:
2452 * External/Native Apps using Messaging Services.
2454 * \par Related functions:
2457 * \par Known issues/bugs:
2464 * MSG_HANDLE_T msgHandle = NULL;
2465 * MSG_ERROR_T err = MSG_SUCCESS;
2466 * msg_message_t msg;
2471 * err = msg_open_msg_handle(&msgHandle);
2475 * if( msg_is_read(msgInfo) )
2477 * sprintf(str, "Message object is read");
2481 * err = msg_release_message(&msg);
2485 /*================================================================================================*/
2486 bool msg_is_read(msg_message_t msg);
2492 * Set message protect status to protect_flag.
2495 * This API is used to set message protect status to protect_flag.
2497 * \par Typical use case:
2498 * Message protect status can be set using this API.
2500 * \par Method of function operation:
2501 * Set the bProtected member of msg_message_t to the passed protect_flag.
2503 * \par Sync (or) Async:
2504 * This is a Synchronous API.
2506 * \par Important notes:
2507 * - If msg is NULL, no action is done
2508 * - If msg is invalid, behavior is undefined
2510 * \param msg_message_t input - message object.
2511 * \param bool input - protect status to be set.
2513 * \return Return Type (int(MSG_ERROR_T)) \n
2514 * - MSG_SUCCESS - Successfully connected to Messaging Service \n
2515 * - MSG_ERR_NULL_POINTER - Input parameter is NULL.
2517 * \par Prospective clients:
2518 * External/Native Apps using Messaging Services.
2520 * \par Related functions:
2523 * \par Known issues/bugs:
2530 * MSG_HANDLE_T msgHandle = NULL;
2531 * MSG_ERROR_T err = MSG_SUCCESS;
2532 * msg_message_t msg;
2536 * err = msg_open_msg_handle(&msgHandle);
2540 * err = msg_set_protect_status(msg, true);
2541 * if (err != MSG_SUCCESS)
2543 * sprintf(str, "msg_set_protect_status() Fail [%d]", err);
2546 * return err; // if success, return OPERATION_SUCCESS. Or if fail, return related error code.
2549 * err = msg_release_message(&msg);
2553 /*================================================================================================*/
2554 int msg_set_protect_status(msg_message_t msg, bool protect_flag);
2560 * Return true if the message is protected.
2563 * This API is used to check if the message object is protected.
2565 * \par Typical use case:
2566 * Protected status can be checked using this API.
2568 * \par Method of function operation:
2569 * Checks if message object is protected and returns bool.
2571 * \par Sync (or) Async:
2572 * This is a Synchronous API.
2574 * \par Important notes:
2577 * \param msg_message_t input - message object.
2579 * \return Return Type (bool) \n
2580 * - true - If message object is protected \n
2581 * - false - If message object is not protected.
2583 * \par Prospective clients:
2584 * External/Native Apps using Messaging Services.
2586 * \par Related functions:
2589 * \par Known issues/bugs:
2596 * MSG_HANDLE_T msgHandle = NULL;
2597 * MSG_ERROR_T err = MSG_SUCCESS;
2598 * msg_message_t msg;
2603 * err = msg_open_msg_handle(&msgHandle);
2607 * if( msg_is_protected(msgInfo) )
2609 * sprintf(str, "Message object is protected");
2613 * err = msg_release_message(&msg);
2617 /*================================================================================================*/
2618 bool msg_is_protected(msg_message_t msg);
2624 * Set message backup status to backup_flag.
2627 * This API is used to set message backup status to backup_flag.
2629 * \par Typical use case:
2630 * Message backup status can be set using this API.
2632 * \par Method of function operation:
2633 * Set the bBackup member of msg_message_t to the passed backup_flag.
2635 * \par Sync (or) Async:
2636 * This is a Synchronous API.
2638 * \par Important notes:
2639 * - If msg is NULL, no action is done
2640 * - If msg is invalid, behavior is undefined
2642 * \param msg_message_t input - message object.
2643 * \param bool input - backup status to be set.
2645 * \return Return Type (int(MSG_ERROR_T)) \n
2646 * - MSG_SUCCESS - Successfully connected to Messaging Service \n
2647 * - MSG_ERR_NULL_POINTER - Input parameter is NULL.
2649 * \par Prospective clients:
2650 * External/Native Apps using Messaging Services.
2652 * \par Related functions:
2655 * \par Known issues/bugs:
2662 * MSG_HANDLE_T msgHandle = NULL;
2663 * MSG_ERROR_T err = MSG_SUCCESS;
2664 * msg_message_t msg;
2668 * err = msg_open_msg_handle(&msgHandle);
2672 * err = msg_set_backup_status(msg, true);
2673 * if (err != MSG_SUCCESS)
2675 * sprintf(str, "msg_set_backup_status() Fail [%d]", err);
2678 * return err; // if success, return OPERATION_SUCCESS. Or if fail, return related error code.
2681 * err = msg_release_message(&msg);
2685 /*================================================================================================*/
2686 int msg_set_backup_status(msg_message_t opq_msg, bool backup_flag);
2692 * Return true if the message is a backup.
2695 * This API is used to check if the message object is a backup.
2697 * \par Typical use case:
2698 * Backup status can be checked using this API.
2700 * \par Method of function operation:
2701 * Checks if message object is a backup and returns bool.
2703 * \par Sync (or) Async:
2704 * This is a Synchronous API.
2706 * \par Important notes:
2709 * \param msg_message_t input - message object.
2711 * \return Return Type (bool) \n
2712 * - true - If message object is a backup \n
2713 * - false - If message object is not a backup.
2715 * \par Prospective clients:
2716 * External/Native Apps using Messaging Services.
2718 * \par Related functions:
2721 * \par Known issues/bugs:
2728 * MSG_HANDLE_T msgHandle = NULL;
2729 * MSG_ERROR_T err = MSG_SUCCESS;
2730 * msg_message_t msg;
2735 * err = msg_open_msg_handle(&msgHandle);
2739 * if( msg_is_backup(msgInfo) )
2741 * sprintf(str, "Message object is a backup");
2745 * err = msg_release_message(&msg);
2749 /*================================================================================================*/
2750 bool msg_is_backup(msg_message_t opq_msg);
2756 * Set message priority to priority.
2759 * This API is used to set message priority to priority.
2761 * \par Typical use case:
2762 * Message priority can be set using this API.
2764 * \par Method of function operation:
2765 * Set the priority member of msg_message_t to the passed priority.
2767 * \par Sync (or) Async:
2768 * This is a Synchronous API.
2770 * \par Important notes:
2771 * - If msg is NULL, no action is done
2772 * - If msg is invalid, behavior is undefined
2774 * \param msg_message_t input - message object.
2775 * \param bool input - priority status to be set.
2777 * \return Return Type (int(MSG_ERROR_T)) \n
2778 * - MSG_SUCCESS - Successfully connected to Messaging Service \n
2779 * - MSG_ERR_NULL_POINTER - Input parameter is NULL.
2781 * \par Prospective clients:
2782 * External/Native Apps using Messaging Services.
2784 * \par Related functions:
2787 * \par Known issues/bugs:
2794 * MSG_HANDLE_T msgHandle = NULL;
2795 * MSG_ERROR_T err = MSG_SUCCESS;
2796 * msg_message_t msg;
2800 * err = msg_open_msg_handle(&msgHandle);
2804 * err = msg_set_priority_info(msgInfo, MSG_MESSAGE_PRIORITY_NORMAL);
2805 * if (err != MSG_SUCCESS)
2807 * sprintf(str, "msg_set_priority_info() Fail [%d]", err);
2810 * return err; // if success, return OPERATION_SUCCESS. Or if fail, return related error code.
2813 * err = msg_release_message(&msg);
2817 /*================================================================================================*/
2818 int msg_set_priority_info(msg_message_t msg, MSG_PRIORITY_TYPE_T priority);
2824 * Return priority value in message object.
2827 * This API is used for getting the priority field of the message object
2829 * \par Typical use case:
2830 * Message priority can be got using this API.
2832 * \par Method of function operation:
2833 * Returns the priority member of msg_message_t.
2835 * \par Sync (or) Async:
2836 * This is a Synchronous API.
2838 * \par Important notes:
2839 * - If msg is invalid, behavior is undefined
2841 * \param msg_message_t input - message object.
2843 * \return Return Type int (MSG_ERROR_T when negative, enum _MSG_PRIORITY_TYPE_E) \n
2844 * - positive int enum _MSG_PRIORITY_TYPE_E.
2845 * - MSG_ERR_NULL_POINTER msg is NULL.
2847 * \par Prospective clients:
2848 * External/Native Apps using Messaging Services.
2850 * \par Related functions:
2853 * \par Known issues/bugs:
2860 * MSG_HANDLE_T msgHandle = NULL;
2861 * MSG_ERROR_T err = MSG_SUCCESS;
2862 * msg_message_t msg;
2867 * err = msg_open_msg_handle(&msgHandle);
2871 * msg_message_t msg = msg_new_message();
2872 * MSG_SENDINGOPT_S sendOpt = {0, };
2873 * msg_get_message(hMsgHandle, 1, msg, &sendOpt);
2875 * priority = msg_get_priority_info(msg);
2876 * sprintf(str, "msg_get_priority_info() priority [%d]", priority);
2879 * err = msg_release_message(&msg);
2883 /*================================================================================================*/
2884 int msg_get_priority_info(msg_message_t msg);
2890 * Set message direction to direction.
2893 * This API is used to set message direction to direction.
2895 * \par Typical use case:
2896 * Message direction can be set using this API.
2898 * \par Method of function operation:
2899 * Set the direction member of msg_message_t to the passed direction.
2901 * \par Sync (or) Async:
2902 * This is a Synchronous API.
2904 * \par Important notes:
2905 * - If msg is NULL, no action is done
2906 * - If msg is invalid, behavior is undefined
2908 * \param msg_message_t input - message object.
2909 * \param int input - defined in enum _MSG_DIRECTION_TYPE_E.
2911 * \return Return Type (int(MSG_ERROR_T)) \n
2912 * - MSG_SUCCESS - Successfully connected to Messaging Service \n
2913 * - MSG_ERR_NULL_POINTER - Input parameter is NULL.
2915 * \par Prospective clients:
2916 * External/Native Apps using Messaging Services.
2918 * \par Related functions:
2921 * \par Known issues/bugs:
2928 * MSG_HANDLE_T msgHandle = NULL;
2929 * MSG_ERROR_T err = MSG_SUCCESS;
2930 * msg_message_t msg;
2934 * err = msg_open_msg_handle(&msgHandle);
2938 * err = msg_set_direction_info(msgInfo, MSG_DIRECTION_TYPE_MT);
2939 * if (err != MSG_SUCCESS)
2941 * sprintf(str, "msg_set_direction_info() Fail [%d]", err);
2944 * return err; // if success, return OPERATION_SUCCESS. Or if fail, return related error code.
2947 * err = msg_release_message(&msg);
2951 /*================================================================================================*/
2952 int msg_set_direction_info(msg_message_t msg, MSG_DIRECTION_TYPE_T direction);
2958 * Return direction information in message object.
2961 * This API is used for getting the direction information in message object.
2963 * \par Typical use case:
2964 * Message direction can be got using this API.
2966 * \par Method of function operation:
2967 * Returns the direction member of msg_message_t.
2969 * \par Sync (or) Async:
2970 * This is a Synchronous API.
2972 * \par Important notes:
2973 * - If msg is invalid, behavior is undefined
2975 * \param msg_message_t input - message object.
2977 * \return Return Type int (MSG_ERROR_T when negative, enum _MSG_DIRECTION_TYPE_E when positive) \n
2978 * - positive int enum _MSG_DIRECTION_TYPE_E.
2979 * - MSG_ERR_NULL_POINTER msg is NULL.
2981 * \par Prospective clients:
2982 * External/Native Apps using Messaging Services.
2984 * \par Related functions:
2987 * \par Known issues/bugs:
2994 * MSG_HANDLE_T msgHandle = NULL;
2995 * MSG_ERROR_T err = MSG_SUCCESS;
2996 * msg_message_t msg;
3001 * err = msg_open_msg_handle(&msgHandle);
3005 * msg_message_t msg = msg_new_message();
3006 * MSG_SENDINGOPT_S sendOpt = {0, };
3007 * msg_get_message(hMsgHandle, 1, msg, &sendOpt);
3009 * direction = msg_get_direction_info(msg);
3010 * sprintf(str, "msg_get_direction_info() direction [%d]", direction);
3013 * err = msg_release_message(&msg);
3017 /*================================================================================================*/
3018 int msg_get_direction_info(msg_message_t msg);
3024 * Set message port to dst_prt and src_port.
3027 * This API is used to set message port to dst_prt and src_port.
3029 * \par Typical use case:
3030 * Message source and destinatin ports are used in case of Push message.
3032 * \par Method of function operation:
3033 * Set the msgPort member of msg_message_t to the passed source and destination port.
3035 * \par Sync (or) Async:
3036 * This is a Synchronous API.
3038 * \par Important notes:
3039 * - If msg is NULL, no action is done
3040 * - If msg is invalid, behavior is undefined
3042 * \param msg_message_t input - message object.
3043 * \param src_port is the port of origin.
3044 * \param dst_port is the destination port for recipient.
3046 * \return Return Type (int(MSG_ERROR_T)) \n
3047 * - MSG_SUCCESS - Successfully connected to Messaging Service \n
3048 * - MSG_ERR_NULL_POINTER - Input parameter is NULL.
3050 * \par Prospective clients:
3051 * External/Native Apps using Messaging Services.
3053 * \par Related functions:
3056 * \par Known issues/bugs:
3063 * MSG_HANDLE_T msgHandle = NULL;
3064 * MSG_ERROR_T err = MSG_SUCCESS;
3065 * msg_message_t msg;
3069 * err = msg_open_msg_handle(&msgHandle);
3073 * err = msg_set_port(msg, 656, 656);
3074 * if (err != MSG_SUCCESS)
3076 * sprintf(str, "msg_set_port() Fail [%d]", err);
3079 * return err; // if success, return OPERATION_SUCCESS. Or if fail, return related error code.
3082 * err = msg_release_message(&msg);
3086 /*================================================================================================*/
3087 int msg_set_port(msg_message_t msg, unsigned short dst_port, unsigned short src_port);
3093 * Return destination port number in message object.
3096 * This API is used for getting destination port number in message object.
3098 * \par Typical use case:
3099 * Recipient destinatin port be got using this API.
3101 * \par Method of function operation:
3102 * Returns the destination port from msgPort member of msg_message_t.
3104 * \par Sync (or) Async:
3105 * This is a Synchronous API.
3107 * \par Important notes:
3108 * - If msg is invalid, behavior is undefined
3110 * \param msg_message_t input - message object.
3112 * \return Return Type (int (MSG_ERROR_T when negative, destination port number when positive)) \n
3113 * - positive int Destination port
3114 * - MSG_ERR_NULL_POINTER msg is NULL.
3116 * \par Prospective clients:
3117 * External/Native Apps using Messaging Services.
3119 * \par Related functions:
3122 * \par Known issues/bugs:
3129 * MSG_HANDLE_T msgHandle = NULL;
3130 * MSG_ERROR_T err = MSG_SUCCESS;
3131 * msg_message_t msg;
3136 * err = msg_open_msg_handle(&msgHandle);
3140 * msg_message_t msg = msg_new_message();
3141 * MSG_SENDINGOPT_S sendOpt = {0, };
3142 * msg_get_message(hMsgHandle, 1, msg, &sendOpt);
3144 * dest_port = msg_get_dest_port(msg);
3145 * sprintf(str, "msg_get_dest_port() dest_port [%d]", dest_port);
3148 * err = msg_release_message(&msg);
3152 /*================================================================================================*/
3153 int msg_get_dest_port(msg_message_t msg);
3159 * Return source port number in message object.
3162 * This API is used for getting source port number in message object.
3164 * \par Typical use case:
3165 * Recipient source port be got using this API.
3167 * \par Method of function operation:
3168 * Returns the source port from msgPort member of msg_message_t.
3170 * \par Sync (or) Async:
3171 * This is a Synchronous API.
3173 * \par Important notes:
3174 * - If msg is invalid, behavior is undefined
3176 * \param msg_message_t input - message object.
3178 * \return Return Type int (MSG_ERROR_T when negative, destination port number when positive) \n
3179 * - positive int source port.
3180 * - MSG_ERR_NULL_POINTER msg is NULL.
3182 * \par Prospective clients:
3183 * External/Native Apps using Messaging Services.
3185 * \par Related functions:
3188 * \par Known issues/bugs:
3195 * MSG_HANDLE_T msgHandle = NULL;
3196 * MSG_ERROR_T err = MSG_SUCCESS;
3197 * msg_message_t msg;
3202 * err = msg_open_msg_handle(&msgHandle);
3206 * msg_message_t msg = msg_new_message();
3207 * MSG_SENDINGOPT_S sendOpt = {0, };
3208 * msg_get_message(hMsgHandle, 1, msg, &sendOpt);
3210 * source_port = msg_get_src_port(msg);
3211 * sprintf(str, "msg_get_src_port() source_port [%d]", source_port);
3214 * err = msg_release_message(&msg);
3218 /*================================================================================================*/
3219 int msg_get_src_port(msg_message_t msg);
3225 * Set scheduled time to time_to_send, which is used for scheduled send.
3228 * This API is used to set scheduled time to time_to_send, which is used for scheduled send.
3230 * \par Typical use case:
3231 * Used to set Schedule Message feature on Message object
3233 * \par Method of function operation:
3234 * Set the scheduledTime member of msg_message_t to the passed time_to_send.
3236 * \par Sync (or) Async:
3237 * This is a Synchronous API.
3239 * \par Important notes:
3240 * - If msg is NULL, no action is done
3241 * - If msg is invalid, behavior is undefined
3243 * \param msg_message_t input - message object.
3244 * \param int input - defined in enum _MSG_DIRECTION_TYPE_E.
3246 * \return Return Type (int(MSG_ERROR_T)) \n
3247 * - MSG_SUCCESS - Successfully connected to Messaging Service \n
3248 * - MSG_ERR_NULL_POINTER - Input parameter is NULL.
3250 * \par Prospective clients:
3251 * External/Native Apps using Messaging Services.
3253 * \par Related functions:
3256 * \par Known issues/bugs:
3263 * MSG_HANDLE_T msgHandle = NULL;
3264 * MSG_ERROR_T err = MSG_SUCCESS;
3265 * msg_message_t msg;
3266 * time_t scheduledTime;
3270 * err = msg_open_msg_handle(&msgHandle);
3274 * time(&scheduledTime);
3276 * err = msg_set_scheduled_time(msgInfo, scheduledTime);
3277 * if (err != MSG_SUCCESS)
3279 * sprintf(str, "msg_set_scheduled_time() Fail [%d]", err);
3282 * return err; // if success, return OPERATION_SUCCESS. Or if fail, return related error code.
3285 * err = msg_release_message(&msg);
3289 /*================================================================================================*/
3290 int msg_set_scheduled_time(msg_message_t msg, time_t time_to_send);
3297 * Return pointer to scheduled time in message object, which can be used for ctime(time_t*) parameter
3300 * This API is used for getting the scheduled time in message object.
3302 * \par Typical use case:
3303 * Used to get Schedule Message feature on Message object
3305 * \par Method of function operation:
3306 * Returns the scheduledTime member of msg_message_t.
3308 * \par Sync (or) Async:
3309 * This is a Synchronous API.
3311 * \par Important notes:
3312 * - If msg is invalid, behavior is undefined
3314 * \param msg_message_t input - message object.
3316 * \return Return Type time_t \n
3317 * - time_t Message scheduled time.
3319 * \par Prospective clients:
3320 * External/Native Apps using Messaging Services.
3322 * \par Related functions:
3325 * \par Known issues/bugs:
3332 * MSG_HANDLE_T msgHandle = NULL;
3333 * MSG_ERROR_T err = MSG_SUCCESS;
3334 * msg_message_t msg;
3335 * time_t time_to_send;
3339 * err = msg_open_msg_handle(&msgHandle);
3343 * msg_message_t msg = msg_new_message();
3344 * MSG_SENDINGOPT_S sendOpt = {0, };
3345 * msg_get_message(hMsgHandle, 1, msg, &sendOpt);
3347 * time_to_send = msg_get_scheduled_time(msg);
3348 * sprintf(str, "msg_get_scheduled_time() time_to_send [%d]", time_to_send);
3351 * err = msg_release_message(&msg);
3355 /*================================================================================================*/
3356 time_t* msg_get_scheduled_time(msg_message_t msg);
3363 * Get attachment count from MMS message.
3366 * This API is used for getting the attachment count in message object.
3368 * \par Typical use case:
3369 * Used to get attachment count feature on Message object
3371 * \par Method of function operation:
3372 * Returns the attachCount member of msg_message_t.
3374 * \par Sync (or) Async:
3375 * This is a Synchronous API.
3377 * \par Important notes:
3378 * - If msg is invalid, behavior is undefined
3380 * \param msg_message_t input - message object.
3382 * \return Return Type int \n
3383 * - int Message attachment count.
3385 * \par Prospective clients:
3386 * External/Native Apps using Messaging Services.
3388 * \par Related functions:
3391 * \par Known issues/bugs:
3398 * MSG_HANDLE_T msgHandle = NULL;
3399 * MSG_ERROR_T err = MSG_SUCCESS;
3400 * msg_message_t msg;
3405 * err = msg_open_msg_handle(&msgHandle);
3409 * msg_message_t msg = msg_new_message();
3410 * MSG_SENDINGOPT_S sendOpt = {0, };
3411 * msg_get_message(hMsgHandle, 1, msg, &sendOpt);
3413 * attach_count = msg_get_attachment_count(msg);
3414 * sprintf(str, "msg_get_attachment_count() attach_count [%d]", attach_count);
3417 * err = msg_release_message(&msg);
3421 /*================================================================================================*/
3422 int msg_get_attachment_count(msg_message_t opq_msg);
3428 * Returns the thumbnail path field of the message object. This API is used for MMS.
3431 * This API is used for getting the thumbnail path field of the message object
3433 * \par Typical use case:
3434 * MMS message object may contain thumbnail path field, this API enables to get the same.
3436 * \par Method of function operation:
3437 * Returns the thumbnail path member of msg_message_t.
3439 * \par Sync (or) Async:
3440 * This is a Synchronous API.
3442 * \par Important notes:
3443 * - If msg is invalid, behavior is undefined
3445 * \param msg_message_t input - message object.
3447 * \return Return Type (const char*) \n
3448 * - const char - MMS message thumbnail path \n
3449 * - NULL - Message object/thumbnail path field is NULL.
3451 * \par Prospective clients:
3452 * External/Native Apps using Messaging Services.
3454 * \par Related functions:
3457 * \par Known issues/bugs:
3464 * MSG_HANDLE_T msgHandle = NULL;
3465 * MSG_ERROR_T err = MSG_SUCCESS;
3466 * msg_message_t msg;
3467 * char* msg_thumbnail_path;
3471 * err = msg_open_msg_handle(&msgHandle);
3475 * msg_message_t msg = msg_new_message();
3476 * MSG_SENDINGOPT_S sendOpt = {0, };
3477 * msg_get_message(hMsgHandle, 1, msg, &sendOpt);
3479 * msg_thumbnail_path = msg_get_thumbnail_path(msg);
3480 * if(msg_subject != NULL && strlen(msg_subject) > 0)
3482 * sprintf(str, "msg_get_thumbnail_path() msg_thumbnail_path [%s]", msg_thumbnail_path);
3486 * err = msg_release_message(&msg);
3490 /*================================================================================================*/
3491 const char* msg_get_thumbnail_path(msg_message_t opq_msg);
3498 * Set message data to MMS msg_data. This API is used for constructing MMS data.
3501 * This API is used to set the Message data field of the message object to the passed MMS message data.
3503 * \par Typical use case:
3504 * Compose the MMS_MESSAGE_DATA_S structure using msg_mms_* API and then this API can be called to set the MMS body.
3506 * \par Method of function operation:
3507 * Serialized "size" bytes of mdata to the pData member of the message object.
3509 * \par Sync (or) Async:
3510 * This is a Synchronous API.
3512 * \par Important notes:
3513 * - If msg is NULL, no action is done
3514 * - If msg is invalid, behavior is undefined
3516 * \param msg_message_t input - message object whose msgId is to be set.
3517 * \param const char* input - data to be set.
3518 * \param int input - size of mdata to be set to message object
3520 * \return Return Type (int(MSG_ERROR_T)) \n
3521 * - MSG_SUCCESS - Successfully connected to Messaging Service \n
3522 * - MSG_ERR_NULL_POINTER - Input parameter is NULL.
3523 * - MSG_ERR_INVALID_PARAMETER class_type is not one of enum _MSG_CLASS_TYPE_E.
3525 * \par Prospective clients:
3526 * External/Native Apps using Messaging Services.
3528 * \par Related functions:
3529 * Refer to msg_mms_* APIs.
3531 * \par Known issues/bugs:
3538 * MSG_HANDLE_T msgHandle = NULL;
3539 * MSG_ERROR_T err = MSG_SUCCESS;
3540 * MMS_MESSAGE_DATA_S* mms_data;
3544 * err = msg_open_msg_handle(&msgHandle);
3546 * mms_data = msg_mms_create_message();
3549 * err = msg_mms_set_message_body(msgInfo, mms_data);
3550 * if (err != MSG_SUCCESS)
3552 * sprintf(str, "msg_mms_set_message_body() Fail [%d]", err);
3555 * return err; // if success, return OPERATION_SUCCESS. Or if fail, return related error code.
3557 * err = msg_mms_destroy_message(mms_data);
3561 /*================================================================================================*/
3562 int msg_mms_set_message_body(msg_message_t msg, const MMS_MESSAGE_DATA_S *msg_data);
3568 * Return pointer to MMS data in message object.
3571 * This API is used for getting pointer to MMS data in message object.
3573 * \par Typical use case:
3574 * Get the filled MMS data fromthe Message Object.
3576 * \par Method of function operation:
3577 * Returns the storageId member of msg_message_t.
3579 * \par Sync (or) Async:
3580 * This is a Synchronous API.
3582 * \par Important notes:
3583 * - If msg is invalid, behavior is undefined
3585 * \param msg_message_t input - message object whose msgId is to be set.
3586 * \param MMS_MESSAGE_DATA_S - body is passed by pointer, which contains MMS message data.
3588 * \return Return Type (int(MSG_ERROR_T)) \n
3589 * - MSG_SUCCESS - Successfully connected to Messaging Service \n
3590 * - MSG_ERR_NULL_POINTER - Input parameter is NULL.
3591 * - MSG_ERR_INVALID_PARAMETER class_type is not one of enum _MSG_CLASS_TYPE_E.
3593 * \par Prospective clients:
3594 * External/Native Apps using Messaging Services.
3596 * \par Related functions:
3599 * \par Known issues/bugs:
3606 * MSG_HANDLE_T msgHandle = NULL;
3607 * MSG_ERROR_T err = MSG_SUCCESS;
3608 * msg_message_t msg;
3609 * MMS_MESSAGE_DATA_S msgBody = {0};
3613 * err = msg_open_msg_handle(&msgHandle);
3617 * msg_message_t msg = msg_new_message();
3618 * MSG_SENDINGOPT_S sendOpt = {0, };
3619 * msg_get_message(msgHandle, 1, msg, &sendOpt);
3622 * err = msg_mms_get_message_body(msg, &msgBody);
3623 * // access msgBody members using msg_mms_get_* APIs
3626 * err = msg_release_message(&msg);
3630 /*================================================================================================*/
3631 int msg_mms_get_message_body(msg_message_t msg, MMS_MESSAGE_DATA_S *body );
3637 * Adds a SMIL page to MMS message data.
3640 * This API is used for adding a SMIL page to MMS message data.
3642 * \par Typical use case:
3643 * Add SMIL Page information to the MMS Message Object.
3645 * \par Method of function operation:
3646 * Returns the storageId member of msg_message_t.
3648 * \par Sync (or) Async:
3649 * This is a Synchronous API.
3651 * \par Important notes:
3652 * The memory for a SMIL page will be allocated and copied in this function. \n
3653 * Applications need to call msg_mms_release_page_list to free the memory. \n
3654 * However, if this function is failed, the memory for a SMIL page is NOT allocated in this function.
3656 * \param MMS_MESSAGE_DATA_S - msg_data is a pointer to MMS message data.
3657 * \param int - duration is time interval to play MMS SMIL page.
3659 * \return Return Type (int(MSG_ERROR_T)) \n
3660 * - MMS_PAGE_S* - Newly added MMS_PAGE_S object is returned \n
3662 * \par Prospective clients:
3663 * External/Native Apps using Messaging Services.
3665 * \par Related functions:
3668 * \par Known issues/bugs:
3675 * MSG_HANDLE_T msgHandle = NULL;
3676 * MSG_ERROR_T err = MSG_SUCCESS;
3677 * MMS_PAGE_S* page[2];
3678 * MMS_MESSAGE_DATA_S* mms_data;
3682 * err = msg_open_msg_handle(&msgHandle);
3686 * mms_data = msg_mms_create_message();
3689 * page[0] = msg_mms_add_page(mms_data, 5440);
3692 * msg_mms_destroy_message(mms_data);
3696 /*================================================================================================*/
3697 MMS_PAGE_S* msg_mms_add_page(MMS_MESSAGE_DATA_S *msg_data, const int duration);
3703 * Adds a SMIL region to MMS message data.
3706 * This API is used for adding a SMIL page to MMS message data.
3708 * \par Typical use case:
3709 * Add SMIL Page information to the MMS Message Object.
3711 * \par Method of function operation:
3712 * Allocates and assigns MMS_SMIL_REGION to region list member of MMS Message data object.
3714 * \par Sync (or) Async:
3715 * This is a Synchronous API.
3717 * \par Important notes:
3718 * The memory for a SMIL page will be allocated and copied in this function. \n
3719 * Applications need to call msg_mms_release_page_list to free the memory. \n
3720 * However, if this function is failed, the memory for a SMIL page is NOT allocated in this function.
3722 * \param MMS_MESSAGE_DATA_S - msg_data is a pointer to MMS message data.
3723 * \param const char* - szID is a pointer to SMIL region.
3724 * \param const int - x coordinate of SMIL region.
3725 * \param const int - y coordinate of SMIL region.
3726 * \param const int - width of SMIL region.
3727 * \param const int - height of SMIL region.
3728 * \param int - background color of SMIL region.
3730 * \return Return Type (int(MSG_ERROR_T)) \n
3731 * - MMS_SMIL_REGION* - Newly added MMS_SMIL_REGION object is returned \n
3733 * \par Prospective clients:
3734 * External/Native Apps using Messaging Services.
3736 * \par Related functions:
3739 * \par Known issues/bugs:
3746 * MSG_HANDLE_T msgHandle = NULL;
3747 * MSG_ERROR_T err = MSG_SUCCESS;
3748 * MMS_PAGE_S* page[2];
3749 * MMS_MESSAGE_DATA_S* mms_data;
3750 * MMS_SMIL_REGION *mms_region;
3754 * err = msg_open_msg_handle(&msgHandle);
3758 * mms_data = msg_mms_create_message();
3760 * msg_mms_set_rootlayout(mms_data, 100, 100, 0xffffff);
3761 * mms_region = msg_mms_add_region(mms_data, "Image", 0, 50, 100, 50, 0xffffff);
3762 * page[0] = msg_mms_add_page(mms_data, 5440);
3765 * msg_mms_destroy_message(mms_data);
3769 /*================================================================================================*/
3770 MMS_SMIL_REGION* msg_mms_add_region(MMS_MESSAGE_DATA_S *msg_data, const char* szID, const int x, const int y, const int width, const int height, int bgcolor);
3776 * Adds a media to SMIL page.
3779 * This API is used for adding media to SMIL page of the MMS Message Data object.
3781 * \par Typical use case:
3782 * Add media to SMIL Page information of the MMS Message Object.
3784 * \par Method of function operation:
3785 * Allocates and assigns MMS_MEDIA_S to media list member of MMS Message data object.
3787 * \par Sync (or) Async:
3788 * This is a Synchronous API.
3790 * \par Important notes:
3791 * The memory for a SMIL page will be allocated and copied in this function. \n
3792 * Applications need to call msg_mms_release_page_list to free the memory. \n
3793 * However, if this function is failed, the memory for a SMIL page is NOT allocated in this function.
3795 * \param MMS_PAGE_S* - page is a pointer to SMIL page.
3796 * \param const MmsSmilMediaType - mediatype is a value to point the media category.
3797 * \param const char* - regionid is a pointer of region, media to be displayed.
3798 * \param char* - filepath is a pointer of media file location.
3800 * \return Return Type (int(MSG_ERROR_T)) \n
3801 * - MMS_MEDIA_S* - Newly added MMS_MEDIA_S object is returned \n
3803 * \par Prospective clients:
3804 * External/Native Apps using Messaging Services.
3806 * \par Related functions:
3809 * \par Known issues/bugs:
3816 * MSG_HANDLE_T msgHandle = NULL;
3817 * MSG_ERROR_T err = MSG_SUCCESS;
3818 * MMS_PAGE_S* page[2];
3819 * MMS_MESSAGE_DATA_S* mms_data;
3820 * MMS_SMIL_REGION *mms_region;
3821 * MMS_MEDIA_S* media[5];
3825 * err = msg_open_msg_handle(&msgHandle);
3829 * mms_data = msg_mms_create_message();
3832 * page[0] = msg_mms_add_page(mms_data, 5440);
3833 * media [0] = msg_mms_add_media(page[0], MMS_SMIL_MEDIA_IMG, "Image", (char*)"/opt/abc/xyz.jpg");
3836 * msg_mms_destroy_message(mms_data);
3840 /*================================================================================================*/
3841 MMS_MEDIA_S* msg_mms_add_media(MMS_PAGE_S *page, const MmsSmilMediaType mediatype, const char* regionid, char* filepath);
3847 * Adds an attachment to MMS message data.
3850 * This API is used for adding an attachment to MMS message data.
3852 * \par Typical use case:
3853 * Adds attachment to SMIL Page information of the MMS Message Object.
3855 * \par Method of function operation:
3856 * Adds the filepath to attach list member of MMS Message data object.
3858 * \par Sync (or) Async:
3859 * This is a Synchronous API.
3861 * \par Important notes:
3862 * The memory for a SMIL page will be allocated and copied in this function. \n
3863 * Applications need to call msg_mms_release_page_list to free the memory. \n
3864 * However, if this function is failed, the memory for a SMIL page is NOT allocated in this function.
3866 * \param MMS_PAGE_S* - page is a pointer to SMIL page.
3867 * \param const MmsSmilMediaType - mediatype is a value to point the media category.
3868 * \param const char* - regionid is a pointer of region, media to be displayed.
3869 * \param char* - filepath is a pointer of media file location.
3871 * \return Return Type (int(MSG_ERROR_T)) \n
3872 * - MMS_MEDIA_S* - Newly added MMS_MEDIA_S object is returned \n
3874 * \par Prospective clients:
3875 * External/Native Apps using Messaging Services.
3877 * \par Related functions:
3880 * \par Known issues/bugs:
3887 * MSG_HANDLE_T msgHandle = NULL;
3888 * MSG_ERROR_T err = MSG_SUCCESS;
3889 * MMS_MESSAGE_DATA_S* mms_data;
3890 * MMS_ATTACH_S* attachment[1];
3894 * err = msg_open_msg_handle(&msgHandle);
3898 * mms_data = msg_mms_create_message();
3901 * attachment[0] = msg_mms_add_attachment(mms_data, (char*)"/opt/abc/xyz.jpg");
3904 * msg_mms_destroy_message(mms_data);
3908 /*================================================================================================*/
3909 MMS_ATTACH_S* msg_mms_add_attachment(MMS_MESSAGE_DATA_S *msg_data, char *filepath);
3915 * Adds a SMIL transition information to MMS message data.
3918 * This API is used for adding a SMIL transition information to MMS message data.
3920 * \par Typical use case:
3921 * Adds SMIL transition information of the MMS Message data.
3923 * \par Method of function operation:
3924 * Allocates and assigns MMS_SMIL_TRANSITION to transition list member of MMS Message data object.
3926 * \par Sync (or) Async:
3927 * This is a Synchronous API.
3929 * \par Important notes:
3930 * The memory for a SMIL page will be allocated and copied in this function. \n
3931 * Applications need to call msg_mms_release_page_list to free the memory. \n
3932 * However, if this function is failed, the memory for a SMIL page is NOT allocated in this function.
3934 * \param MMS_MESSAGE_DATA_S - msg_data is a pointer to MMS message data.
3935 * \param MMS_SMIL_TRANSITION * - transition is a pointer to SMIL transition information.
3937 * \return Return Type (int(MSG_ERROR_T)) \n
3938 * MSG_SUCCESS Success in operation.
3939 * MSG_ERR_INVALID_PARAMETER Parameter is invalid.
3941 * \par Prospective clients:
3942 * External/Native Apps using Messaging Services.
3944 * \par Related functions:
3947 * \par Known issues/bugs:
3954 * MSG_HANDLE_T msgHandle = NULL;
3955 * MSG_ERROR_T err = MSG_SUCCESS;
3956 * MMS_MESSAGE_DATA_S* mms_data;
3960 * err = msg_open_msg_handle(&msgHandle);
3964 * mms_data = msg_mms_create_message();
3967 * MMS_SMIL_TRANSITION transition;
3968 * err = msg_mms_add_transition(mms_data, &transition);
3970 * msg_mms_destroy_message(mms_data);
3974 /*================================================================================================*/
3975 int msg_mms_add_transition(MMS_MESSAGE_DATA_S *msg_data, MMS_SMIL_TRANSITION *transition);
3981 * Adds SMIL meta information to MMS message data.
3984 * This API is used for adding SMIL meta information to MMS message data.
3986 * \par Typical use case:
3987 * Adds SMIL meta information of the MMS Message data.
3989 * \par Method of function operation:
3990 * Allocates and assigns MMS_SMIL_META to meta list member of MMS Message data object.
3992 * \par Sync (or) Async:
3993 * This is a Synchronous API.
3995 * \par Important notes:
3996 * The memory for a SMIL page will be allocated and copied in this function. \n
3997 * Applications need to call msg_mms_release_page_list to free the memory. \n
3998 * However, if this function is failed, the memory for a SMIL page is NOT allocated in this function.
4000 * \param MMS_MESSAGE_DATA_S - msg_data is a pointer to MMS message data.
4001 * \param MMS_SMIL_META * - meta is a pointer to SMIL meta information.
4003 * \return Return Type (int(MSG_ERROR_T)) \n
4004 * MSG_SUCCESS Success in operation.
4005 * MSG_ERR_INVALID_PARAMETER Parameter is invalid.
4007 * \par Prospective clients:
4008 * External/Native Apps using Messaging Services.
4010 * \par Related functions:
4013 * \par Known issues/bugs:
4020 * MSG_HANDLE_T msgHandle = NULL;
4021 * MSG_ERROR_T err = MSG_SUCCESS;
4022 * MMS_MESSAGE_DATA_S* mms_data;
4023 * MMS_SMIL_META meta;
4027 * err = msg_open_msg_handle(&msgHandle);
4031 * mms_data = msg_mms_create_message();
4034 * MMS_MEDIA_S* media = NULL;
4035 * media = msg_mms_add_meta(mms_data, &meta);
4037 * msg_mms_destroy_message(mms_data);
4041 /*================================================================================================*/
4042 int msg_mms_add_meta(MMS_MESSAGE_DATA_S *msg_data, MMS_SMIL_META *meta);
4045 /* MMS-1.3-con-601 */
4049 * Gets a SMIL page information of the current MMS message.
4052 * This API is used to get a SMIL page information
4054 * \par Typical use case:
4055 * Gets SMIL Page information of the MMS Message Object.
4057 * \par Method of function operation:
4058 * Returns the page_idx page from the pagelist member of msg_message_t.
4060 * \par Sync (or) Async:
4061 * This is a Synchronous API.
4063 * \par Important notes:
4064 * This function MUST be called only after SMIL page is added. \n
4066 * \param MMS_MESSAGE_DATA_S - msg_data is a pointer to MMS message data.
4067 * \param int page_idx - page_idx is the index of the SMIL page to be returned.
4069 * \return Return Type (MMS_PAGE_S*) \n
4070 * - MMS_PAGE_S* - page_idx MMS_PAGE_S object is returned \n
4072 * \par Prospective clients:
4073 * External/Native Apps using Messaging Services.
4075 * \par Related functions:
4078 * \par Known issues/bugs:
4085 * MSG_HANDLE_T msgHandle = NULL;
4086 * MSG_ERROR_T err = MSG_SUCCESS;
4087 * MMS_PAGE_S* page[2];
4088 * MMS_MESSAGE_DATA_S* mms_data;
4092 * err = msg_open_msg_handle(&msgHandle);
4096 * mms_data = msg_mms_create_message();
4099 * page[0] = msg_mms_get_page(mms_data, 0);
4102 * msg_mms_destroy_message(mms_data);
4106 /*================================================================================================*/
4107 MMS_PAGE_S* msg_mms_get_page(MMS_MESSAGE_DATA_S *msg_data, int page_idx);
4113 * Gets a SMIL region information of the current MMS message.
4116 * This API is used to gets a SMIL region information.
4118 * \par Typical use case:
4119 * Gets SMIL region information of the current MMS Message Object.
4121 * \par Method of function operation:
4122 * Returns the media_idx media from the current media list.
4124 * \par Sync (or) Async:
4125 * This is a Synchronous API.
4127 * \par Important notes:
4128 * This function MUST be called only after SMIL region is added.
4130 * \param MMS_MESSAGE_DATA_S - msg_data is a pointer to MMS message data.
4131 * \param int input - region_idx is the index of the SMIL region to be returned.
4133 * \return Return Type (MMS_SMIL_REGION*) \n
4134 * - MMS_SMIL_REGION* - pointer to MMS_SMIL_REGION structure.
4136 * \par Prospective clients:
4137 * External/Native Apps using Messaging Services.
4139 * \par Related functions:
4142 * \par Known issues/bugs:
4149 * MSG_HANDLE_T msgHandle = NULL;
4150 * MSG_ERROR_T err = MSG_SUCCESS;
4151 * MMS_SMIL_REGION* region[2];
4152 * MMS_MESSAGE_DATA_S* mms_data;
4156 * err = msg_open_msg_handle(&msgHandle);
4160 * mms_data = msg_mms_create_message();
4163 * region[0] = msg_mms_get_smil_region(mms_data, 0);
4166 * msg_mms_destroy_message(mms_data);
4170 /*================================================================================================*/
4171 MMS_SMIL_REGION* msg_mms_get_smil_region(MMS_MESSAGE_DATA_S *msg_data, int region_idx);
4177 * Gets a media information in a SMIL page of the current MMS message.
4180 * This API is used to get a media information in a SMIL page
4182 * \par Typical use case:
4183 * Gets media information of the current MMS Message Object.
4185 * \par Method of function operation:
4186 * Returns the media_idx media from the current media list.
4188 * \par Sync (or) Async:
4189 * This is a Synchronous API.
4191 * \par Important notes:
4192 * This function MUST be called only after media is added. \n
4194 * \param int input - media_idx is the index of the media to be returned. \n
4195 * \param MMS_PAGE_S* - page is a pointer to SMIL page.
4197 * \return Return Type (MMS_MEDIA_S*) \n
4198 * - MMS_MEDIA_S* - pointer to MMS_MEDIA_S structure.
4200 * \par Prospective clients:
4201 * External/Native Apps using Messaging Services.
4203 * \par Related functions:
4206 * \par Known issues/bugs:
4213 * MSG_HANDLE_T msgHandle = NULL;
4214 * MSG_ERROR_T err = MSG_SUCCESS;
4215 * MMS_MEDIA_S* media[2];
4216 * MMS_PAGE_S *page[2];
4217 * MMS_MESSAGE_DATA_S* mms_data;
4221 * err = msg_open_msg_handle(&msgHandle);
4225 * mms_data = msg_mms_create_message();
4228 * media[0] = msg_mms_get_media(page, 0);
4231 * msg_mms_destroy_message(mms_data);
4235 /*================================================================================================*/
4236 MMS_MEDIA_S* msg_mms_get_media(MMS_PAGE_S *page, int media_idx);
4241 * Gets a attachment information of the current MMS message.
4244 * This API is used to get a attachment information
4246 * \par Typical use case:
4247 * Gets attachment information of the MMS Message Object.
4249 * \par Method of function operation:
4250 * Returns the attach_idx attachment from the attachlist member of msg_message_t.
4252 * \par Sync (or) Async:
4253 * This is a Synchronous API.
4255 * \par Important notes:
4256 * This function MUST be called only after attachment is added. \n
4258 * \param MMS_MESSAGE_DATA_S - msg_data is a pointer to MMS message data.
4259 * \param int input - attach_idx is the index of the attachment to be returned.
4261 * \return Return Type (MMS_ATTACH_S*) \n
4262 * - MMS_ATTACH_S* - pointer to MMS_ATTACH_S structure.
4264 * \par Prospective clients:
4265 * External/Native Apps using Messaging Services.
4267 * \par Related functions:
4270 * \par Known issues/bugs:
4277 * MSG_HANDLE_T msgHandle = NULL;
4278 * MSG_ERROR_T err = MSG_SUCCESS;
4279 * MMS_ATTACH_S* attachment[2];
4280 * MMS_MESSAGE_DATA_S* mms_data;
4284 * err = msg_open_msg_handle(&msgHandle);
4288 * mms_data = msg_mms_create_message();
4291 * attachment[0] = msg_mms_get_attachment(mms_data, 0);
4294 * msg_mms_destroy_message(mms_data);
4298 /*================================================================================================*/
4299 MMS_ATTACH_S* msg_mms_get_attachment(MMS_MESSAGE_DATA_S *msg_data, int attach_idx);
4305 * Gets a SMIL transition information of the current MMS message.
4308 * This API is used to get a SMIL transition information.
4310 * \par Typical use case:
4311 * Gets SMIL transition information of the current MMS Message Object.
4313 * \par Method of function operation:
4314 * Returns the transition_idx transition from the current transition list.
4316 * \par Sync (or) Async:
4317 * This is a Synchronous API.
4319 * \par Important notes:
4320 * This function MUST be called only after SMIL transition is added.
4322 * \param MMS_MESSAGE_DATA_S - msg_data is a pointer to MMS message data.
4323 * \param int input - transition_idx is the index of the SMIL transition to be returned.
4325 * \return Return Type (MMS_SMIL_TRANSITION*) \n
4326 * - MMS_SMIL_TRANSITION* - pointer to MMS_SMIL_TRANSITION structure.
4328 * \par Prospective clients:
4329 * External/Native Apps using Messaging Services.
4331 * \par Related functions:
4334 * \par Known issues/bugs:
4341 * MSG_HANDLE_T msgHandle = NULL;
4342 * MSG_ERROR_T err = MSG_SUCCESS;
4343 * MMS_MESSAGE_DATA_S* mms_data;
4346 * err = msg_open_msg_handle(&msgHandle);
4350 * mms_data = msg_mms_create_message();
4353 * MMS_SMIL_TRANSITION* pTrans = msg_mms_get_transition(mms_data, 0);
4356 * msg_mms_destroy_message(mms_data);
4360 /*================================================================================================*/
4361 MMS_SMIL_TRANSITION* msg_mms_get_transition(MMS_MESSAGE_DATA_S *msg_data, int transition_idx);
4367 * Gets a SMIL meta information of the current MMS message.
4370 * This API is used to get a SMIL meta information.
4372 * \par Typical use case:
4373 * Gets SMIL meta information of the current MMS Message Object.
4375 * \par Method of function operation:
4376 * Returns the meta_idx meta from the current meta list.
4378 * \par Sync (or) Async:
4379 * This is a Synchronous API.
4381 * \par Important notes:
4382 * This function MUST be called only after SMIL meta is added.
4384 * \param MMS_MESSAGE_DATA_S - msg_data is a pointer to MMS message data.
4385 * \param int input - meta_idx is the index of the SMIL meta to be returned.
4387 * \return Return Type (MMS_SMIL_META*) \n
4388 * - MMS_SMIL_META* - pointer to MMS_SMIL_META structure.
4390 * \par Prospective clients:
4391 * External/Native Apps using Messaging Services.
4393 * \par Related functions:
4396 * \par Known issues/bugs:
4403 * MSG_HANDLE_T msgHandle = NULL;
4404 * MSG_ERROR_T err = MSG_SUCCESS;
4405 * MMS_MESSAGE_DATA_S* mms_data;
4409 * err = msg_open_msg_handle(&msgHandle);
4413 * mms_data = msg_mms_create_message();
4416 * MMS_SMIL_META* pMeta = msg_mms_get_meta(mms_data, 0);
4419 * msg_mms_destroy_message(mms_data);
4423 /*================================================================================================*/
4424 MMS_SMIL_META* msg_mms_get_meta(MMS_MESSAGE_DATA_S *msg_data, int meta_idx);
4430 * Release a SMIL page list of the current MMS message.
4433 * This API is used to release a SMIL page list
4435 * \par Typical use case:
4436 * Release SMIL page list of the MMS message object
4438 * \par Method of function operation:
4439 * Release SMIL page list of MMS_MESSAGE_DATA_S object
4441 * \par Sync (or) Async:
4442 * This is a Synchronous API.
4444 * \par Important notes:
4445 * This function MUST be called only after SMIL page is added. \n
4447 * \param MMS_MESSAGE_DATA_S - msg_data is a pointer to MMS message data.
4449 * \return Return Type (int(MSG_ERROR_T)) \n
4450 * MSG_SUCCESS Success in operation.
4451 * MSG_ERR_NULL_POINTER Parameter is NULL.
4453 * \par Prospective clients:
4454 * External/Native Apps using Messaging Services.
4456 * \par Related functions:
4459 * \par Known issues/bugs:
4466 * MSG_HANDLE_T msgHandle = NULL;
4467 * MSG_ERROR_T err = MSG_SUCCESS;
4468 * MMS_PAGE_S* page[2];
4469 * MMS_MESSAGE_DATA_S* mms_data;
4473 * err = msg_open_msg_handle(&msgHandle);
4477 * mms_data = msg_mms_create_message();
4479 * page[0] = msg_mms_add_page(mms_data, 5440);
4481 * page[0] = msg_mms_get_page(0);
4483 * msg_mms_release_page_list(mms_data);
4487 /*================================================================================================*/
4488 int msg_mms_release_page_list(MMS_MESSAGE_DATA_S *msg_data);
4494 * Release a SMIL region list of the current MMS message.
4497 * This API is used to release a SMIL region list
4499 * \par Typical use case:
4500 * Release SMIL region list of the MMS message object
4502 * \par Method of function operation:
4503 * Release SMIL region list of MMS_MESSAGE_DATA_S object
4505 * \par Sync (or) Async:
4506 * This is a Synchronous API.
4508 * \par Important notes:
4509 * This function MUST be called only after SMIL region is added. \n
4511 * \param MMS_MESSAGE_DATA_S - msg_data is a pointer to MMS message data.
4513 * \return Return Type (int(MSG_ERROR_T)) \n
4514 * MSG_SUCCESS Success in operation.
4515 * MSG_ERR_NULL_POINTER Parameter is NULL.
4517 * \par Prospective clients:
4518 * External/Native Apps using Messaging Services.
4520 * \par Related functions:
4523 * \par Known issues/bugs:
4530 * MSG_HANDLE_T msgHandle = NULL;
4531 * MSG_ERROR_T err = MSG_SUCCESS;
4532 * MMS_PAGE_S* page[2];
4533 * MMS_MESSAGE_DATA_S* mms_data;
4534 * MMS_SMIL_REGION *mms_region;
4538 * err = msg_open_msg_handle(&msgHandle);
4542 * mms_data = msg_mms_create_message();
4544 * msg_mms_set_rootlayout(mms_data, 100, 100, 0xffffff);
4545 * mms_region = msg_mms_add_region(mms_data, "Image", 0, 50, 100, 50, 0xffffff);
4546 * page[0] = msg_mms_add_page(mms_data, 5440);
4548 * msg_mms_release_region_list(mms_data);
4552 /*================================================================================================*/
4553 int msg_mms_release_region_list(MMS_MESSAGE_DATA_S *msg_data);
4559 * Release an attachment list of the current MMS message.
4562 * This API is used to release an attachment list
4564 * \par Typical use case:
4565 * Release an attachment list of the MMS message object
4567 * \par Method of function operation:
4568 * Release an attachment list of MMS_MESSAGE_DATA_S object
4570 * \par Sync (or) Async:
4571 * This is a Synchronous API.
4573 * \par Important notes:
4574 * This function MUST be called only after attachment is added. \n
4576 * \param MMS_MESSAGE_DATA_S - msg_data is a pointer to MMS message data.
4578 * \return Return Type (int(MSG_ERROR_T)) \n
4579 * MSG_SUCCESS Success in operation.
4580 * MSG_ERR_NULL_POINTER Parameter is NULL.
4582 * \par Prospective clients:
4583 * External/Native Apps using Messaging Services.
4585 * \par Related functions:
4588 * \par Known issues/bugs:
4595 * MSG_HANDLE_T msgHandle = NULL;
4596 * MSG_ERROR_T err = MSG_SUCCESS;
4597 * MMS_MESSAGE_DATA_S* mms_data;
4598 * MMS_ATTACH_S* attachment[1];
4602 * err = msg_open_msg_handle(&msgHandle);
4606 * mms_data = msg_mms_create_message();
4609 * attachment[0] = msg_mms_add_attachment(mms_data, (char*)"/opt/abc/xyz.jpg");
4612 * msg_mms_release_attachment_list(mms_data);
4616 /*================================================================================================*/
4617 int msg_mms_release_attachment_list(MMS_MESSAGE_DATA_S *msg_data);
4623 * Release a SMIL transition list of the current MMS message.
4626 * This API is used to release a SMIL transition list
4628 * \par Typical use case:
4629 * Release a SMIL transition list of the MMS message object
4631 * \par Method of function operation:
4632 * Release a SMIL transition list of MMS_MESSAGE_DATA_S object
4634 * \par Sync (or) Async:
4635 * This is a Synchronous API.
4637 * \par Important notes:
4638 * This function MUST be called only after SMIL transition is added. \n
4640 * \param MMS_MESSAGE_DATA_S - msg_data is a pointer to MMS message data.
4642 * \return Return Type (int(MSG_ERROR_T)) \n
4643 * MSG_SUCCESS Success in operation.
4644 * MSG_ERR_NULL_POINTER Parameter is NULL.
4646 * \par Prospective clients:
4647 * External/Native Apps using Messaging Services.
4649 * \par Related functions:
4652 * \par Known issues/bugs:
4659 * MSG_HANDLE_T msgHandle = NULL;
4660 * MSG_ERROR_T err = MSG_SUCCESS;
4661 * MMS_MESSAGE_DATA_S* mms_data;
4662 * MMS_ATTACH_S* attachment[1];
4666 * err = msg_open_msg_handle(&msgHandle);
4670 * mms_data = msg_mms_create_message();
4673 * MMS_SMIL_TRANSITION transition;
4674 * err = msg_mms_add_transition(mms_data, &transition);
4676 * msg_mms_release_transition_list(mms_data);
4680 /*================================================================================================*/
4681 int msg_mms_release_transition_list(MMS_MESSAGE_DATA_S *msg_data);
4687 * Release a SMIL meta list of the current MMS message.
4690 * This API is used to release a SMIL meta list
4692 * \par Typical use case:
4693 * Release a SMIL meta list of the MMS message object
4695 * \par Method of function operation:
4696 * Release a SMIL meta list of MMS_MESSAGE_DATA_S object
4698 * \par Sync (or) Async:
4699 * This is a Synchronous API.
4701 * \par Important notes:
4702 * This function MUST be called only after SMIL meta is added. \n
4704 * \param MMS_MESSAGE_DATA_S - msg_data is a pointer to MMS message data.
4706 * \return Return Type (int(MSG_ERROR_T)) \n
4707 * MSG_SUCCESS Success in operation.
4708 * MSG_ERR_NULL_POINTER Parameter is NULL.
4710 * \par Prospective clients:
4711 * External/Native Apps using Messaging Services.
4713 * \par Related functions:
4716 * \par Known issues/bugs:
4723 * MSG_HANDLE_T msgHandle = NULL;
4724 * MSG_ERROR_T err = MSG_SUCCESS;
4725 * MMS_MESSAGE_DATA_S* mms_data;
4726 * MMS_SMIL_META meta;
4730 * err = msg_open_msg_handle(&msgHandle);
4734 * mms_data = msg_mms_create_message();
4737 * MMS_MEDIA_S* media = NULL;
4738 * media = msg_mms_add_meta(mms_data, &meta);
4740 * msg_mms_release_meta_list(mms_data);
4744 /*================================================================================================*/
4745 int msg_mms_release_meta_list(MMS_MESSAGE_DATA_S *msg_data);
4751 * Creates a MMS message data
4754 * This API creates a MMS message data
4756 * \par Typical use case:
4757 * MMS Message object should be created before adding Page, SMIL, attachment information.
4759 * \par Method of function operation:
4760 * Allocates and returns a pointer to MMS_MESSAGE_DATA_S.
4762 * \par Sync (or) Async:
4763 * This is a Synchronous API.
4765 * \par Important notes:
4766 * The created MMS_MESSAGE_DATA_S object should be explicitly destroyed using msg_mms_destroy_message()
4770 * \return Return Type (MMS_MESSAGE_DATA_S*) \n
4771 * - MMS_MESSAGE_DATA_S* - pointer to newly created MMS_MESSAGE_DATA_S structure.
4773 * \par Prospective clients:
4774 * External/Native Apps using Messaging Services.
4776 * \par Related functions:
4779 * \par Known issues/bugs:
4786 * MSG_HANDLE_T msgHandle = NULL;
4787 * MSG_ERROR_T err = MSG_SUCCESS;
4791 * err = msg_open_msg_handle(&msgHandle);
4795 * mms_data = msg_mms_create_message();
4798 * msg_mms_destroy_message(mms_data);
4802 /*================================================================================================*/
4803 MMS_MESSAGE_DATA_S* msg_mms_create_message(void);
4809 * Set the MMS root-layout
4812 * This API is used for adding a SMIL page to MMS message data.
4814 * \par Typical use case:
4815 * Add SMIL Page information to the MMS Message Object.
4817 * \par Method of function operation:
4818 * Sets the rootlayout member to the passed root layout.
4820 * \par Sync (or) Async:
4821 * This is a Synchronous API.
4823 * \par Important notes:
4826 * \param MMS_MESSAGE_DATA_S* - msg is a pointer to mms message data.
4827 * \param const int - width of root-layout
4828 * \param const int - height of root-layout
4829 * \param int - background color of root-layout
4831 * \return Return Type (MMS_SMIL_ROOTLAYOUT*) \n
4832 * - MMS_SMIL_ROOTLAYOUT* - pointer to MMS_SMIL_ROOTLAYOUT object is returned \n
4834 * \par Prospective clients:
4835 * External/Native Apps using Messaging Services.
4837 * \par Related functions:
4840 * \par Known issues/bugs:
4847 * MSG_HANDLE_T msgHandle = NULL;
4848 * MSG_ERROR_T err = MSG_SUCCESS;
4849 * MMS_MESSAGE_DATA_S* mms_data;
4853 * err = msg_open_msg_handle(&msgHandle);
4857 * mms_data = msg_mms_create_message();
4859 * msg_mms_set_rootlayout(mms_data, 100, 100, 0xffffff);
4861 * msg_mms_destroy_message(mms_data);
4865 /*================================================================================================*/
4866 MMS_SMIL_ROOTLAYOUT* msg_mms_set_rootlayout(MMS_MESSAGE_DATA_S* msg, const int width, const int height, const int bgcolor);
4872 * Destroy the created MMS message data.
4875 * This API destroys the created MMS message data.
4877 * \par Typical use case:
4878 * To free memory allocated with create message API.
4880 * \par Method of function operation:
4881 * Frees the memory associated with MMS_MESSAGE_DATA_S object .
4883 * \par Sync (or) Async:
4884 * This is a Synchronous API.
4886 * \par Important notes:
4887 *This function MUST be called only after MMS message is created by msg_mms_create_message.
4890 * MMS_MESSAGE_DATA_S input - msg is a pointer to MMS message data.
4892 * \return Return Type (int(MSG_ERROR_T)) \n
4893 * MSG_SUCCESS Success in operation.
4894 * MSG_ERR_NULL_POINTER Parameter is NULL.
4896 * \par Prospective clients:
4897 * External/Native Apps using Messaging Services.
4899 * \par Related functions:
4902 * \par Known issues/bugs:
4909 * MSG_HANDLE_T msgHandle = NULL;
4910 * MSG_ERROR_T err = MSG_SUCCESS;
4914 * err = msg_open_msg_handle(&msgHandle);
4918 * mms_data = msg_mms_create_message();
4921 * msg_mms_destroy_message(mms_data);
4925 /*================================================================================================*/
4926 int msg_mms_destroy_message(MMS_MESSAGE_DATA_S* msg);