diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/messages.h | 1063 | ||||
-rw-r--r-- | include/messages_error.h | 16 | ||||
-rw-r--r-- | include/messages_private.h | 60 | ||||
-rw-r--r-- | include/messages_types.h | 171 |
4 files changed, 574 insertions, 736 deletions
diff --git a/include/messages.h b/include/messages.h index 0404c37..e3e32b9 100644 --- a/include/messages.h +++ b/include/messages.h @@ -11,7 +11,7 @@ * distributed under the License is distributed on an AS IS BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and - * limitations under the License. + * limitations under the License. */ #ifndef __TIZEN_MESSAGING_H__ @@ -40,17 +40,25 @@ extern "C" /** - * @brief Opens a handle for messaging service. + * @brief Opens a handle for the messaging service. * - * @remark @a service must be released with messages_close_service() by you. + * @since_tizen 2.3 + * @privlevel public + * @privilege %http://tizen.org/privilege/message.read + * + * @remarks You must release @a service using messages_close_service(). * * @param[out] service The message service handle * - * @return 0 on success, otherwise a negative error value. - * @retval #MESSAGES_ERROR_NONE Successful - * @retval #MESSAGES_ERROR_INVALID_PARAMETER Invalid parameter - * @retval #MESSAGES_ERROR_SERVER_NOT_READY Server is not read + * @return @c 0 on success, + * otherwise a negative error value + * + * @retval #MESSAGES_ERROR_NONE Successful + * @retval #MESSAGES_ERROR_INVALID_PARAMETER Invalid parameter + * @retval #MESSAGES_ERROR_SERVER_NOT_READY Server is not read * @retval #MESSAGES_ERROR_COMMUNICATION_WITH_SERVER_FAILED Communication with server failed + * @retval #MESSAGES_ERROR_PERMISSION_DENIED The application does not have the privilege to call this method + * @retval #MESSAGES_ERROR_NOT_SUPPORTED Not supported * * @see messages_close_service() */ @@ -58,14 +66,22 @@ int messages_open_service(messages_service_h *service); /** - * @brief Closes a handle for messaging service. + * @brief Closes a handle for the messaging service. + * + * @since_tizen 2.3 + * @privlevel public + * @privilege %http://tizen.org/privilege/message.read * * @param[in] service The message service handle * - * @return 0 on success, otherwise a negative error value. - * @retval #MESSAGES_ERROR_NONE Successful - * @retval #MESSAGES_ERROR_INVALID_PARAMETER Invalid parameter + * @return @c 0 on success, + * otherwise a negative error value + * + * @retval #MESSAGES_ERROR_NONE Successful + * @retval #MESSAGES_ERROR_INVALID_PARAMETER Invalid parameter * @retval #MESSAGES_ERROR_COMMUNICATION_WITH_SERVER_FAILED Communication with server failed + * @retval #MESSAGES_ERROR_PERMISSION_DENIED The application does not have the privilege to call this method + * @retval #MESSAGES_ERROR_NOT_SUPPORTED Not supported * * @see messages_open_service() */ @@ -75,16 +91,21 @@ int messages_close_service(messages_service_h service); /** * @brief Creates a message handle. * - * @remark @a msg must be released with messages_destroy_message() by you. + * @since_tizen 2.3 + * + * @remarks You must release @a msg using messages_destroy_message(). + * + * @param[in] type The message type (#MESSAGES_TYPE_SMS or #MESSAGES_TYPE_MMS) \n + * If @a type is #MESSAGES_TYPE_UNKNOWN, #MESSAGES_ERROR_INVALID_PARAMETER occurs. + * @param[out] msg The message handle that is newly created if successful * - * @param[in] type A message type (MESSAGES_TYPE_SMS or MESSAGES_TYPE_MMS) \n - * If @a type is #MESSAGES_TYPE_UNKNOWN, #MESSAGES_ERROR_INVALID_PARAMETER occurs. - * @param[out] msg A message handle to be newly created if successful + * @return @c 0 on success, + * otherwise a negative error value * - * @return 0 on success, otherwise a negative error value. - * @retval #MESSAGES_ERROR_NONE Successful + * @retval #MESSAGES_ERROR_NONE Successful * @retval #MESSAGES_ERROR_INVALID_PARAMETER Invalid parameter - * @retval #MESSAGES_ERROR_OUT_OF_MEMORY Out of memory + * @retval #MESSAGES_ERROR_OUT_OF_MEMORY Out of memory + * @retval #MESSAGES_ERROR_NOT_SUPPORTED Not supported * * @see messages_destroy_message() */ @@ -92,54 +113,117 @@ int messages_create_message(messages_message_type_e type, messages_message_h *ms /** - * @brief Destroys a message handle and release all its resources. + * @brief Destroys a message handle and releases all its resources. * - * @param[in] msg A message handle to destroy + * @since_tizen 2.3 * - * @return 0 on success, otherwise a negative error value. - * @retval #MESSAGES_ERROR_NONE Successful - * @retval #MESSAGES_ERROR_INVALID_PARAMETER Invalid parameter + * @param[in] msg The message handle to destroy + * + * @return @c 0 on success, + * otherwise a negative error value + * + * @retval #MESSAGES_ERROR_NONE Successful + * @retval #MESSAGES_ERROR_INVALID_PARAMETER Invalid parameter + * @retval #MESSAGES_ERROR_NOT_SUPPORTED Not supported * * @see messages_create_message() */ int messages_destroy_message(messages_message_h msg); /** - * @brief Gets the message id of the message. + * @brief Gets the message ID of the message. * - * @param[in] msg The message handle - * @param[out] msg_id The message id + * @since_tizen 2.3 * - * @return 0 on success, otherwise a negative error value. - * @retval #MESSAGES_ERROR_NONE Successful - * @retval #MESSAGES_ERROR_INVALID_PARAMETER Invalid parameter - * @retval #MESSAGES_ERROR_OPERATION_FAILED Messaging operation failed + * @param[in] msg The message handle + * @param[out] msg_id The message ID + * + * @return @c 0 on success, + * otherwise a negative error value + * + * @retval #MESSAGES_ERROR_NONE Successful + * @retval #MESSAGES_ERROR_INVALID_PARAMETER Invalid parameter + * @retval #MESSAGES_ERROR_OPERATION_FAILED Messaging operation failed + * @retval #MESSAGES_ERROR_NOT_SUPPORTED Not supported * * @see messages_search_message_by_id() */ int messages_get_message_id(messages_message_h msg, int *msg_id); + +/** + * @brief Sets the SIM ID of the sending message. + * + * @since_tizen 2.3 + * + * @param[in] msg The message handle + * @param[in] sim_id The SIM id to send message + * + * @return @c 0 on success, + * otherwise a negative error value + * + * @retval #MESSAGES_ERROR_NONE Successful + * @retval #MESSAGES_ERROR_INVALID_PARAMETER Invalid parameter + * @retval #MESSAGES_ERROR_OPERATION_FAILED Messaging operation failed + * @retval #MESSAGES_ERROR_NOT_SUPPORTED Not supported + * + * @see messages_get_sim_id() + */ +int messages_set_sim_id(messages_message_h msg, int sim_id); + + +/** + * @brief Gets the SIM ID of the message. + * + * @since_tizen 2.3 + * + * @param[in] msg The message handle + * @param[out] sim_id The SIM id of message + * + * @return @c 0 on success, + * otherwise a negative error value + * + * @retval #MESSAGES_ERROR_NONE Successful + * @retval #MESSAGES_ERROR_INVALID_PARAMETER Invalid parameter + * @retval #MESSAGES_ERROR_OPERATION_FAILED Messaging operation failed + * @retval #MESSAGES_ERROR_NOT_SUPPORTED Not supported + * + * @see messages_set_sim_id() + */ +int messages_get_sim_id(messages_message_h msg, int *sim_id); + + /** * @brief Gets the message box type of the message. * - * @param[in] msg The message handle - * @param[out] mbox The message box type + * @since_tizen 2.3 * - * @return 0 on success, otherwise a negative error value. - * @retval #MESSAGES_ERROR_NONE Successful - * @retval #MESSAGES_ERROR_INVALID_PARAMETER Invalid parameter + * @param[in] msg The message handle + * @param[out] mbox The message box type + * + * @return @c 0 on success, + * otherwise a negative error value + * + * @retval #MESSAGES_ERROR_NONE Successful + * @retval #MESSAGES_ERROR_INVALID_PARAMETER Invalid parameter + * @retval #MESSAGES_ERROR_NOT_SUPPORTED Not supported */ int messages_get_mbox_type(messages_message_h msg, messages_message_box_e *mbox); /** * @brief Gets the destination port of the message. * - * @param[in] msg The message handle - * @param[out] port The destination port of the message + * @since_tizen 2.3 * - * @return 0 on success, otherwise a negative error value. - * @retval #MESSAGES_ERROR_NONE Successful - * @retval #MESSAGES_ERROR_INVALID_PARAMETER Invalid parameter + * @param[in] msg The message handle + * @param[out] port The destination port of the message + * + * @return @c 0 on success, + * otherwise a negative error value + * + * @retval #MESSAGES_ERROR_NONE Successful + * @retval #MESSAGES_ERROR_INVALID_PARAMETER Invalid parameter + * @retval #MESSAGES_ERROR_NOT_SUPPORTED Not supported * * @see messages_add_sms_listening_port() */ @@ -148,12 +232,17 @@ int messages_get_message_port(messages_message_h msg, int *port); /** * @brief Gets the type of the message. * - * @param[in] msg The message handle + * @since_tizen 2.3 + * + * @param[in] msg The message handle * @param[out] type The message type * - * @return 0 on success, otherwise a negative error value. - * @retval #MESSAGES_ERROR_NONE Successful - * @retval #MESSAGES_ERROR_INVALID_PARAMETER Invalid parameter + * @return @c 0 on success, + * otherwise a negative error value + * + * @retval #MESSAGES_ERROR_NONE Successful + * @retval #MESSAGES_ERROR_INVALID_PARAMETER Invalid parameter + * @retval #MESSAGES_ERROR_NOT_SUPPORTED Not supported */ int messages_get_message_type(messages_message_h msg, messages_message_type_e *type); @@ -162,14 +251,19 @@ int messages_get_message_type(messages_message_h msg, messages_message_type_e *t * @brief Adds an recipient's address(phone number) to the message. * @details The maximum number of recipients per a message is 10. * - * @param[in] msg The message handle - * @param[in] address The recipient's address to receive a message \n - * The maximum length of @a address is 254. - * @param[in] type The recipient's type of the @a address + * @since_tizen 2.3 * - * @return 0 on success, otherwise a negative error value. - * @retval #MESSAGES_ERROR_NONE Successful - * @retval #MESSAGES_ERROR_INVALID_PARAMETER Invalid parameter + * @param[in] msg The message handle + * @param[in] address The recipient's address to receive a message \n + * The maximum length of @a address is @c 254. + * @param[in] type The recipient's type of the @a address + * + * @return @c 0 on success, + * otherwise a negative error value + * + * @retval #MESSAGES_ERROR_NONE Successful + * @retval #MESSAGES_ERROR_INVALID_PARAMETER Invalid parameter + * @retval #MESSAGES_ERROR_NOT_SUPPORTED Not supported * * @see messages_get_address() * @see messages_remove_all_addresses() @@ -180,12 +274,17 @@ int messages_add_address(messages_message_h msg, const char *address, messages_r /** * @brief Gets the total number of recipients in the message. * - * @param[in] msg The message handle - * @param[out] count The total number of recipients + * @since_tizen 2.3 * - * @return 0 on success, otherwise a negative error value. - * @retval #MESSAGES_ERROR_NONE Successful - * @retval #MESSAGES_ERROR_INVALID_PARAMETER Invalid parameter + * @param[in] msg The message handle + * @param[out] count The total number of recipients + * + * @return @c 0 on success, + * otherwise a negative error value + * + * @retval #MESSAGES_ERROR_NONE Successful + * @retval #MESSAGES_ERROR_INVALID_PARAMETER Invalid parameter + * @retval #MESSAGES_ERROR_NOT_SUPPORTED Not supported * * @see messages_add_address() * @see messages_remove_all_addresses() @@ -196,17 +295,22 @@ int messages_get_address_count(messages_message_h msg, int *count); /** * @brief Gets a recipient's address with specified index. * - * @remarks @a address must be released with @c free() by you. + * @since_tizen 2.3 * - * @param[in] msg The message handle - * @param[in] index The zero-based index of address to receive a message. - * @param[out] address The recipient's address with specified index - * @param[out] type The recipient's type of the @a address. + * @remarks You must release @a address using free(). * - * @return 0 on success, otherwise a negative error value. - * @retval #MESSAGES_ERROR_NONE Successful - * @retval #MESSAGES_ERROR_INVALID_PARAMETER Invalid parameter - * @retval #MESSAGES_ERROR_OUT_OF_MEMORY Out of memory + * @param[in] msg The message handle + * @param[in] index The zero-based index of an address to receive a message. + * @param[out] address The recipient's address with specified index + * @param[out] type The recipient's type of the @a address + * + * @return @c 0 on success, + * otherwise a negative error value + * + * @retval #MESSAGES_ERROR_NONE Successful + * @retval #MESSAGES_ERROR_INVALID_PARAMETER Invalid parameter + * @retval #MESSAGES_ERROR_OUT_OF_MEMORY Out of memory + * @retval #MESSAGES_ERROR_NOT_SUPPORTED Not supported * * @see messages_add_address() * @see messages_remove_all_addresses() @@ -217,11 +321,16 @@ int messages_get_address(messages_message_h msg, int index, char **address, mess /** * @brief Removes all recipients in the message. * + * @since_tizen 2.3 + * * @param[in] msg The message handle * - * @return 0 on success, otherwise a negative error value. - * @retval #MESSAGES_ERROR_NONE Successful - * @retval #MESSAGES_ERROR_INVALID_PARAMETER Invalid parameter + * @return @c 0 on success, + * otherwise a negative error value + * + * @retval #MESSAGES_ERROR_NONE Successful + * @retval #MESSAGES_ERROR_INVALID_PARAMETER Invalid parameter + * @retval #MESSAGES_ERROR_NOT_SUPPORTED Not supported * * @see messages_add_address() * @see messages_get_address() @@ -232,14 +341,19 @@ int messages_remove_all_addresses(messages_message_h msg); /** * @brief Sets the text of the message. * - * @param[in] msg The message handle + * @since_tizen 2.3 + * + * @param[in] msg The message handle * @param[in] text The text of the message \n - * The maximum length of @a text is 1530. + * The maximum length of @a text is @c 1530. * - * @return 0 on success, otherwise a negative error value. - * @retval #MESSAGES_ERROR_NONE Successful - * @retval #MESSAGES_ERROR_INVALID_PARAMETER Invalid parameter - * @retval #MESSAGES_ERROR_OUT_OF_MEMORY Out of memory + * @return @c 0 on success, + * otherwise a negative error value + * + * @retval #MESSAGES_ERROR_NONE Successful + * @retval #MESSAGES_ERROR_INVALID_PARAMETER Invalid parameter + * @retval #MESSAGES_ERROR_OUT_OF_MEMORY Out of memory + * @retval #MESSAGES_ERROR_NOT_SUPPORTED Not supported * * @see messages_get_text() */ @@ -249,15 +363,20 @@ int messages_set_text(messages_message_h msg, const char *text); /** * @brief Gets the text of the message. * - * @remarks @a text must be released with @c free() by you. + * @since_tizen 2.3 * - * @param[in] msg The message handle - * @param[out] text The text of the message + * @remarks You must release @a text using free(). * - * @return 0 on success, otherwise a negative error value. - * @retval #MESSAGES_ERROR_NONE Successful - * @retval #MESSAGES_ERROR_INVALID_PARAMETER Invalid parameter - * @retval #MESSAGES_ERROR_OUT_OF_MEMORY Out of memory + * @param[in] msg The message handle + * @param[out] text The text of the message + * + * @return @c 0 on success, + * otherwise a negative error value + * + * @retval #MESSAGES_ERROR_NONE Successful + * @retval #MESSAGES_ERROR_INVALID_PARAMETER Invalid parameter + * @retval #MESSAGES_ERROR_OUT_OF_MEMORY Out of memory + * @retval #MESSAGES_ERROR_NOT_SUPPORTED Not supported * * @see messages_set_text() */ @@ -267,52 +386,72 @@ int messages_get_text(messages_message_h msg, char **text); /** * @brief Gets the time of the message. * - * @param[in] msg The message handle - * @param[out] time The time of the message + * @since_tizen 2.3 * - * @return 0 on success, otherwise a negative error value. - * @retval #MESSAGES_ERROR_NONE Successful - * @retval #MESSAGES_ERROR_INVALID_PARAMETER Invalid parameter + * @param[in] msg The message handle + * @param[out] time The time of the message + * + * @return @c 0 on success, + * otherwise a negative error value + * + * @retval #MESSAGES_ERROR_NONE Successful + * @retval #MESSAGES_ERROR_INVALID_PARAMETER Invalid parameter + * @retval #MESSAGES_ERROR_NOT_SUPPORTED Not supported */ int messages_get_time(messages_message_h msg, time_t *time); /** * @brief Sends the message to all recipients. * - * @remarks In order to check whether sending a message succeeds, - * you should register messages_sent_cb() using messages_set_message_sent_cb(). + * @since_tizen 2.3 + * @privlevel public + * @privilege %http://tizen.org/privilege/message.write * - * @param[in] service The message service handle - * @param[in] msg The message handle - * @param[in] save_to_sentbox Set to true to save the message in the sentbox, else false - * @param[in] callback The callback function - * @param[in] user_data The user data to be passed to the callback function + * @param[in] service The message service handle + * @param[in] msg The message handle + * @param[in] save_to_sentbox Set to @c true to save the message in the sentbox, + * otherwise set to @c false to not save the message in the sentbox + * @param[in] callback The callback function + * @param[in] user_data The user data to be passed to the callback function + * + * @return @c 0 on success, + * otherwise a negative error value * - * @return 0 on success, otherwise a negative error value. - * @retval #MESSAGES_ERROR_NONE Successful + * @retval #MESSAGES_ERROR_NONE Successful * @retval #MESSAGES_ERROR_INVALID_PARAMETER Invalid parameter - * @retval #MESSAGES_ERROR_SENDING_FAILED Sending a message failed - * @retval #MESSAGES_ERROR_OPERATION_FAILED Messaging operation failed + * @retval #MESSAGES_ERROR_SENDING_FAILED Sending a message failed + * @retval #MESSAGES_ERROR_OPERATION_FAILED Messaging operation failed + * @retval #MESSAGES_ERROR_PERMISSION_DENIED The application does not have the privilege to call this method + * @retval #MESSAGES_ERROR_NOT_SUPPORTED Not supported * * @see messages_sent_cb() */ int messages_send_message(messages_service_h service, messages_message_h msg, bool save_to_sentbox, messages_sent_cb callback, void *user_data); /** - * @brief Gets the message count in the specific message box + * @brief Gets the message count in the specific message box. + * @since_tizen 2.3 * - * @param[in] service The message service handle - * @param[in] mbox The message box type - * @param[in] type The message type \n - * If @a type is #MESSAGES_TYPE_UNKNOWN, all sms and mms messages are counted. - * @param[out] count The number of messages + * @privlevel public + * @privilege %http://tizen.org/privilege/message.read + * + * @param[in] service The message service handle + * @param[in] mbox The message box type + * @param[in] type The message type \n + * If @a type is #MESSAGES_TYPE_UNKNOWN, all SMS and MMS messages are counted. + * @param[out] count The number of messages * - * @return 0 on success, otherwise a negative error value. - * @retval #MESSAGES_ERROR_NONE Successful + * @return @c 0 on success, + * otherwise a negative error value + * + * @retval #MESSAGES_ERROR_NONE Successful * @retval #MESSAGES_ERROR_INVALID_PARAMETER Invalid parameter - * @retval #MESSAGES_ERROR_OPERATION_FAILED Messaging operation failed + * @retval #MESSAGES_ERROR_OPERATION_FAILED Messaging operation failed + * @retval #MESSAGES_ERROR_PERMISSION_DENIED The application does not have the privilege to call this method + * @retval #MESSAGES_ERROR_NOT_SUPPORTED Not supported + * */ -int messages_get_message_count(messages_service_h service, +int messages_get_message_count(messages_service_h service, messages_message_box_e mbox, messages_message_type_e type, int *count); @@ -321,27 +460,36 @@ int messages_get_message_count(messages_service_h service, /** * @brief Searches for messages. * - * @details @a message_array must be released with messages_free_message_array() by you. - * - * @param[in] service The message service handle - * @param[in] mbox The message box type - * @param[in] type The message type \n - * If @a type is #MESSAGES_TYPE_UNKNOWN, all sms and mms messages are searched. - * @param[in] keyword The keyword search in text and subject - * @param[in] address The recipient address - * @param[in] offset The start position (base 0) - * @param[in] limit The maximum amount of messages to get (In case of 0, this method passes to the callback all searched messages.) - * @param[out] message_array The array of the message handle - * @param[out] length The number of messages of the message_array - * @param[out] total The count of the messages that have been retrieved as a result without applying @a limit and @a offset. \n - * The value can be used to calculate the total number of page views for the searched messages.\n - * For example, if the count of message search is 50 and the limit is 20, then using this value, you can notice the total page is 3. - * - * @return 0 on success, otherwise a negative error value. - * @retval #MESSAGES_ERROR_NONE Successful - * @retval #MESSAGES_ERROR_INVALID_PARAMETER Invalid parameter - * @retval #MESSAGES_ERROR_OUT_OF_MEMORY Out of memory - * @retval #MESSAGES_ERROR_OPERATION_FAILED Messaging operation failed + * @since_tizen 2.3 + * @privlevel public + * @privilege %http://tizen.org/privilege/message.read + * + * @remarks You must release @a message_array using messages_free_message_array(). + * + * @param[in] service The message service handle + * @param[in] mbox The message box type + * @param[in] type The message type \n + * If @a type is #MESSAGES_TYPE_UNKNOWN, all SMS and MMS messages are searched. + * @param[in] keyword The keyword search in the text and subject + * @param[in] address The recipient address + * @param[in] offset The start position (base @c 0) + * @param[in] limit The maximum amount of messages to get \n + * In case of @c 0, this method passes to the callback all searched messages. + * @param[out] message_array The array of the message handle + * @param[out] length The number of messages of the @a message_array + * @param[out] total The count of the messages that have been retrieved as a result without applying @a limit and @a offset\ n + * The value can be used to calculate the total number of page views for the searched messages\ n + * For example, if the count of message search is @c 50 and the limit is @c 20, then using this value, you can notice the total page is @c 3. + * + * @return @c 0 on success, + * otherwise a negative error value + * + * @retval #MESSAGES_ERROR_NONE Successful + * @retval #MESSAGES_ERROR_INVALID_PARAMETER Invalid parameter + * @retval #MESSAGES_ERROR_OUT_OF_MEMORY Out of memory + * @retval #MESSAGES_ERROR_OPERATION_FAILED Messaging operation failed + * @retval #MESSAGES_ERROR_PERMISSION_DENIED The application does not have the privilege to call this method + * @retval #MESSAGES_ERROR_NOT_SUPPORTED Not supported * * @see messages_free_message_array() */ @@ -351,20 +499,28 @@ int messages_search_message(messages_service_h service, const char *keyword, const char *address, int offset, int limit, messages_message_h **message_array, int *length, int *total); - + /** - * @brief Searches a message with the given message id. + * @brief Searches a message with the given message ID. * - * @remark @a msg must be released with messages_destroy_message() by you. + * @since_tizen 2.3 + * @privlevel public + * @privilege %http://tizen.org/privilege/message.read * - * @param[in] service The message service handle - * @param[in] msg_id The message id - * @param[out] msg A message handle to be newly created if successful + * @remarks You must release @a msg using messages_destroy_message(). + * + * @param[in] service The message service handle + * @param[in] msg_id The message ID + * @param[out] msg The message handle that is newly created if successful * - * @return 0 on success, otherwise a negative error value. - * @retval #MESSAGES_ERROR_NONE Successful + * @return @c 0 on success, + * otherwise a negative error value + * + * @retval #MESSAGES_ERROR_NONE Successful * @retval #MESSAGES_ERROR_INVALID_PARAMETER Invalid parameter - * @retval #MESSAGES_ERROR_OUT_OF_MEMORY Out of memory + * @retval #MESSAGES_ERROR_OUT_OF_MEMORY Out of memory + * @retval #MESSAGES_ERROR_PERMISSION_DENIED The application does not have the privilege to call this method + * @retval #MESSAGES_ERROR_NOT_SUPPORTED Not supported * * @see messages_get_message_id() */ @@ -372,13 +528,18 @@ int messages_search_message_by_id(messages_service_h service, int msg_id, messag /** - * @brief Frees message array. + * @brief Frees the message array. + * + * @since_tizen 2.3 * * @param[in] message_array The array of the message handle * - * @return 0 on success, otherwise a negative error value. - * @retval #MESSAGES_ERROR_NONE Successful + * @return @c 0 on success, + * otherwise a negative error value + * + * @retval #MESSAGES_ERROR_NONE Successful * @retval #MESSAGES_ERROR_INVALID_PARAMETER Invalid parameter + * @retval #MESSAGES_ERROR_NOT_SUPPORTED Not supported * * @see messages_search_message() */ @@ -388,24 +549,34 @@ int messages_free_message_array(messages_message_h *message_array); /** * @brief Retrieves the searched messages by invoking the given callback function iteratively. * - * @param[in] service The message service handle - * @param[in] mbox The message box type - * @param[in] type The message type \n - * If @a type is #MESSAGES_TYPE_UNKNOWN, all sms and mms messages are searched. - * @param[in] keyword The keyword search in text and subject - * @param[in] address The recipient address - * @param[in] offset The start position (base 0) - * @param[in] limit The maximum amount of messages to get (In case of 0, this method passes to the callback all searched messages.) - * @param[in] callback The callback function to get a message + * @since_tizen 2.3 + * @privlevel public + * @privilege %http://tizen.org/privilege/message.read + * + * @param[in] service The message service handle + * @param[in] mbox The message box type + * @param[in] type The message type \n + * If @a type is #MESSAGES_TYPE_UNKNOWN, all SMS and MMS messages are searched. + * @param[in] keyword The keyword search in the text and subject + * @param[in] address The recipient address + * @param[in] offset The start position (base 0) + * @param[in] limit The maximum amount of messages to get \n + * In case of @c 0, this method passes to the callback all searched messages. + * @param[in] callback The callback function to get a message * @param[in] user_data The user data to be passed to the callback function * - * @return 0 on success, otherwise a negative error value. - * @retval #MESSAGES_ERROR_NONE Successful + * @return @c 0 on success, + * otherwise a negative error value + * + * @retval #MESSAGES_ERROR_NONE Successful * @retval #MESSAGES_ERROR_INVALID_PARAMETER Invalid parameter - * @retval #MESSAGES_ERROR_OUT_OF_MEMORY Out of memory - * @retval #MESSAGES_ERROR_OPERATION_FAILED Messaging operation failed + * @retval #MESSAGES_ERROR_OUT_OF_MEMORY Out of memory + * @retval #MESSAGES_ERROR_OPERATION_FAILED Messaging operation failed + * @retval #MESSAGES_ERROR_PERMISSION_DENIED The application does not have the privilege to call this method + * @retval #MESSAGES_ERROR_NOT_SUPPORTED Not supported * * @post It invokes messages_search_cb(). + * * @see messages_search_cb() */ int messages_foreach_message(messages_service_h service, @@ -418,14 +589,22 @@ int messages_foreach_message(messages_service_h service, /** * @brief Registers a callback to be invoked when an incoming message is received. * - * @param[in] service The message service handle - * @param[in] callback The callback function + * @since_tizen 2.3 + * @privlevel public + * @privilege %http://tizen.org/privilege/message.read + * + * @param[in] service The message service handle + * @param[in] callback The callback function * @param[in] user_data The user data to be passed to the callback function * - * @return 0 on success, otherwise a negative error value. - * @retval #MESSAGES_ERROR_NONE Successful + * @return @c 0 on success, + * otherwise a negative error value + * + * @retval #MESSAGES_ERROR_NONE Successful * @retval #MESSAGES_ERROR_INVALID_PARAMETER Invalid parameter - * @retval #MESSAGES_ERROR_OPERATION_FAILED Messaging operation failed + * @retval #MESSAGES_ERROR_OPERATION_FAILED Messaging operation failed + * @retval #MESSAGES_ERROR_PERMISSION_DENIED The application does not have the privilege to call this method + * @retval #MESSAGES_ERROR_NOT_SUPPORTED Not supported * * @post It will invoke messages_incoming_cb(). * @@ -438,11 +617,19 @@ int messages_set_message_incoming_cb(messages_service_h service, messages_incomi /** * @brief Unregisters the callback function. * + * @since_tizen 2.3 + * @privlevel public + * @privilege %http://tizen.org/privilege/message.write + * * @param[in] service The message service handle * - * @return 0 on success, otherwise a negative error value. - * @retval #MESSAGES_ERROR_NONE Successful + * @return @c 0 on success, + * otherwise a negative error value + * + * @retval #MESSAGES_ERROR_NONE Successful * @retval #MESSAGES_ERROR_INVALID_PARAMETER Invalid parameter + * @retval #MESSAGES_ERROR_PERMISSION_DENIED The application does not have the privilege to call this method + * @retval #MESSAGES_ERROR_NOT_SUPPORTED Not supported * * @see messages_set_message_incoming_cb() * @see messages_incoming_cb() @@ -452,12 +639,20 @@ int messages_unset_message_incoming_cb(messages_service_h service); /** * @brief Adds an additional listening port for the incoming SMS messages. * + * @since_tizen 2.3 + * @privlevel public + * @privilege %http://tizen.org/privilege/message.read + * * @param[in] service The message service handle - * @param[in] port The listening port for the SMS messages + * @param[in] port The listening port for the SMS messages * - * @return 0 on success, otherwise a negative error value. - * @retval #MESSAGES_ERROR_NONE Successful + * @return @c 0 on success, + * otherwise a negative error value + * + * @retval #MESSAGES_ERROR_NONE Successful * @retval #MESSAGES_ERROR_INVALID_PARAMETER Invalid parameter + * @retval #MESSAGES_ERROR_PERMISSION_DENIED The application does not have the privilege to call this method + * @retval #MESSAGES_ERROR_NOT_SUPPORTED Not supported * * @see messages_set_message_incoming_cb() * @see messages_get_message_port() @@ -471,13 +666,18 @@ int messages_add_sms_listening_port(messages_service_h service, int port); /** * @brief Sets the subject of the message. * - * @param[in] msg The message handle + * @since_tizen 2.3 + * + * @param[in] msg The message handle * @param[in] subject The subject of the message \n - * The maximum length of @a subject is 120. + * The maximum length of @a subject is @c 120. * - * @return 0 on success, otherwise a negative error value. - * @retval #MESSAGES_ERROR_NONE Successful + * @return @c 0 on success, + * otherwise a negative error value + * + * @retval #MESSAGES_ERROR_NONE Successful * @retval #MESSAGES_ERROR_INVALID_PARAMETER Invalid parameter + * @retval #MESSAGES_ERROR_NOT_SUPPORTED Not supported * * @pre @a msg is created as a #MESSAGES_TYPE_MMS. * @@ -489,15 +689,20 @@ int messages_mms_set_subject(messages_message_h msg, const char *subject); /** * @brief Gets the subject of the message. * - * @remarks @a subject must be released with @c free() by you. + * @since_tizen 2.3 * - * @param[in] msg The message handle + * @remarks You must release @a subject using free(). + * + * @param[in] msg The message handle * @param[out] subject The subject of the message * - * @return 0 on success, otherwise a negative error value. - * @retval #MESSAGES_ERROR_NONE Successful + * @return @c 0 on success, + * otherwise a negative error value + * + * @retval #MESSAGES_ERROR_NONE Successful * @retval #MESSAGES_ERROR_INVALID_PARAMETER Invalid parameter - * @retval #MESSAGES_ERROR_OUT_OF_MEMORY Out of memory + * @retval #MESSAGES_ERROR_OUT_OF_MEMORY Out of memory + * @retval #MESSAGES_ERROR_NOT_SUPPORTED Not supported * * @pre @a msg is created as a #MESSAGES_TYPE_MMS. * @@ -509,21 +714,26 @@ int messages_mms_get_subject(messages_message_h msg, char **subject); /** * @brief Adds the attachment to the MMS message. * - * @param[in] msg The message handle + * @since_tizen 2.3 + * + * @param[in] msg The message handle * @param[in] type The attachment type * @param[in] path The file path to attach \n - * The maximum length of @a path is 1024. + * The maximum length of @a path is @c 1024. + * + * @return @c 0 on success, + * otherwise a negative error value * - * @return 0 on success, otherwise a negative error value. - * @retval #MESSAGES_ERROR_NONE Successful + * @retval #MESSAGES_ERROR_NONE Successful * @retval #MESSAGES_ERROR_INVALID_PARAMETER Invalid parameter - * @retval #MESSAGES_ERROR_OUT_OF_MEMORY Out of memory + * @retval #MESSAGES_ERROR_OUT_OF_MEMORY Out of memory + * @retval #MESSAGES_ERROR_NOT_SUPPORTED Not supported * * @pre @a msg is created as a #MESSAGES_TYPE_MMS. * * @see messages_mms_get_attachment() * @see messages_mms_get_attachment_count() - * @see messages_mms_remove_all_attachments() + * @see messages_mms_remove_all_attachments() */ int messages_mms_add_attachment(messages_message_h msg, messages_media_type_e type, const char *path); @@ -531,23 +741,28 @@ int messages_mms_add_attachment(messages_message_h msg, messages_media_type_e ty /** * @brief Gets the file path of the attachment with the specified index. * - * @remark @a path must be released with @c free() by you. + * @since_tizen 2.3 * - * @param[in] msg The message handle - * @param[in] index The zero-based index of attachment - * @param[out] type The attachment type - * @param[out] path The file path to attach + * @remarks You must release @a path using free(). + * + * @param[in] msg The message handle + * @param[in] index The zero-based index of the attachment + * @param[out] type The attachment type + * @param[out] path The file path to attach + * + * @return @c 0 on success, + * otherwise a negative error value * - * @return 0 on success, otherwise a negative error value. - * @retval #MESSAGES_ERROR_NONE Successful + * @retval #MESSAGES_ERROR_NONE Successful * @retval #MESSAGES_ERROR_INVALID_PARAMETER Invalid parameter - * @retval #MESSAGES_ERROR_OUT_OF_MEMORY Out of memory + * @retval #MESSAGES_ERROR_OUT_OF_MEMORY Out of memory + * @retval #MESSAGES_ERROR_NOT_SUPPORTED Not supported * * @pre @a msg is created as a #MESSAGES_TYPE_MMS. * * @see messages_mms_add_attachment() * @see messages_mms_get_attachment_count() - * @see messages_mms_remove_all_attachments() + * @see messages_mms_remove_all_attachments() */ int messages_mms_get_attachment(messages_message_h msg, int index, messages_media_type_e *type, char **path); @@ -555,18 +770,23 @@ int messages_mms_get_attachment(messages_message_h msg, int index, messages_medi /** * @brief Gets the attachment with the specified index. * - * @param[in] msg The message handle + * @since_tizen 2.3 + * + * @param[in] msg The message handle * @param[out] count The total number of attachments * - * @return 0 on success, otherwise a negative error value. - * @retval #MESSAGES_ERROR_NONE Successful + * @return @c 0 on success, + * otherwise a negative error value + * + * @retval #MESSAGES_ERROR_NONE Successful * @retval #MESSAGES_ERROR_INVALID_PARAMETER Invalid parameter + * @retval #MESSAGES_ERROR_NOT_SUPPORTED Not supported * * @pre @a msg is created as a #MESSAGES_TYPE_MMS. * * @see messages_mms_add_attachment() * @see messages_mms_get_attachment() - * @see messages_mms_remove_all_attachments() + * @see messages_mms_remove_all_attachments() */ int messages_mms_get_attachment_count(messages_message_h msg, int *count); @@ -574,17 +794,22 @@ int messages_mms_get_attachment_count(messages_message_h msg, int *count); /** * @brief Removes all attachments to the MMS message. * + * @since_tizen 2.3 + * * @param[in] msg The message handle * - * @return 0 on success, otherwise a negative error value. - * @retval #MESSAGES_ERROR_NONE Successful + * @return @c 0 on success, + * otherwise a negative error value + * + * @retval #MESSAGES_ERROR_NONE Successful * @retval #MESSAGES_ERROR_INVALID_PARAMETER Invalid parameter + * @retval #MESSAGES_ERROR_NOT_SUPPORTED Not supported * * @pre @a msg is created as a #MESSAGES_TYPE_MMS. * * @see messages_mms_add_attachment() * @see messages_mms_get_attachment() - * @see messages_mms_get_attachment_count() + * @see messages_mms_get_attachment_count() */ int messages_mms_remove_all_attachments(messages_message_h msg); /** @@ -599,28 +824,41 @@ int messages_mms_remove_all_attachments(messages_message_h msg); /** * @brief Registers a callback to be invoked when an WAP Push message is received. * - * @param[in] service The message service handle - * @param[in] app_id The "X-WAP-Application-ID" to indicate a destination WAP Push application id. - * @param[in] callback The callback function + * @since_tizen 2.3 + * @privlevel public + * @privilege %http://tizen.org/privilege/message.read + * + * @param[in] service The message service handle + * @param[in] app_id The "X-WAP-Application-ID" to indicate a destination WAP Push application ID + * @param[in] callback The callback function * @param[in] user_data The user data to be passed to the callback function * - * @return 0 on success, otherwise a negative error value. - * @retval #MESSAGES_ERROR_NONE Successful + * @return @c 0 on success, + * otherwise a negative error value + * + * @retval #MESSAGES_ERROR_NONE Successful * @retval #MESSAGES_ERROR_INVALID_PARAMETER Invalid parameter + * @retval #MESSAGES_ERROR_PERMISSION_DENIED The application does not have the privilege to call this method + * @retval #MESSAGES_ERROR_NOT_SUPPORTED Not supported */ -int messages_push_add_incoming_cb(messages_service_h service, const char *app_id, +int messages_push_add_incoming_cb(messages_service_h service, const char *app_id, messages_push_incoming_cb callback, void *user_data); /** * @brief Unregisters the WAP push incoming callback function. * + * @since_tizen 2.3 + * * @param[in] service The message service handle - * @param[in] app_id The "X-WAP-Application-ID" to indicate a destination WAP Push application id + * @param[in] app_id The "X-WAP-Application-ID" to indicate a destination WAP Push application ID * - * @return 0 on success, otherwise a negative error value. - * @retval #MESSAGES_ERROR_NONE Successful + * @return @c 0 on success, + * otherwise a negative error value + * + * @retval #MESSAGES_ERROR_NONE Successful * @retval #MESSAGES_ERROR_INVALID_PARAMETER Invalid parameter + * @retval #MESSAGES_ERROR_NOT_SUPPORTED Not supported */ int messages_push_remove_incoming_cb(messages_service_h service, const char *app_id); @@ -628,416 +866,83 @@ int messages_push_remove_incoming_cb(messages_service_h service, const char *app /** * @brief Registers an application to the mapping table of the WAP Push service. * - * @param[in] service The message service handle - * @param[in] content_type The MIME content type of the content - * @param[in] app_id The "X-WAP-Application-ID" to indicate a destination WAP Push application id - * - * @return 0 on success, otherwise a negative error value. - * @retval #MESSAGES_ERROR_NONE Successful - * @retval #MESSAGES_ERROR_INVALID_PARAMETER Invalid parameter - */ -int messages_push_register(messages_service_h service, const char *content_type, const char *app_id); - - -/** - * @brief Deregisters an application from the mapping table of the WAP Push service. + * @since_tizen 2.3 + * @privlevel public + * @privilege %http://tizen.org/privilege/message.write * - * @param[in] service The message service handle + * @param[in] service The message service handle * @param[in] content_type The MIME content type of the content - * @param[in] app_id The "X-WAP-Application-ID" to indicate a destination WAP Push application id - * - * @return 0 on success, otherwise a negative error value. - * @retval #MESSAGES_ERROR_NONE Successful - * @retval #MESSAGES_ERROR_INVALID_PARAMETER Invalid parameter - */ -int messages_push_deregister(messages_service_h service, const char *content_type, const char *app_id); - - -/** - * @brief Re-registers an application to the mapping table of the WAP Push service. - * - * @param[in] service The message service handle - * @param[in] content_type An element of the composite key for searching registered entry.\n - * The MIME content type of the content. - * @param[in] app_id The The composite key for searching mapping information.\n - * "X-WAP-Application-ID" to indicate a destination WAP Push application id. - * @param[in] dst_content_type The MIME content type of the content. - * @param[in] dst_app_id The "X-WAP-Application-ID" to indicate a destination WAP Push application id. - * - * @return 0 on success, otherwise a negative error value. - * @retval #MESSAGES_ERROR_NONE Successful - * @retval #MESSAGES_ERROR_INVALID_PARAMETER Invalid parameter - */ -int messages_push_reregister(messages_service_h service, const char *content_type, const char *app_id, - const char *dst_content_type, const char *dst_app_id); - -/** - * @} - */ - - -/** - * @addtogroup CAPI_MESSAGING_MESSAGES_CB_MODULE - * @{ - */ - -/** - * @brief Gets the message id of the CB message. + * @param[in] app_id The "X-WAP-Application-ID" to indicate a destination WAP Push application ID * - * @param[in] msg The CB message handle - * @param[out] msg_id The message id of the CB message + * @return @c 0 on success, + * otherwise a negative error value * - * @return 0 on success, otherwise a negative error value. - * @retval #MESSAGES_ERROR_NONE Successful + * @retval #MESSAGES_ERROR_NONE Successful * @retval #MESSAGES_ERROR_INVALID_PARAMETER Invalid parameter + * @retval #MESSAGES_ERROR_PERMISSION_DENIED The application does not have the privilege to call this method + * @retval #MESSAGES_ERROR_NOT_SUPPORTED Not supported */ -int messages_cb_get_message_id(messages_cb_message_h msg, int *msg_id); - -/** - * @brief Gets the serial number of the CB message. - * - * @param[in] msg The CB message handle - * @param[out] serial The serial number of the CB message (16-bit integer) - * - * @return 0 on success, otherwise a negative error value. - * @retval #MESSAGES_ERROR_NONE Successful - * @retval #MESSAGES_ERROR_INVALID_PARAMETER Invalid parameter - */ -int messages_cb_get_serial_number(messages_cb_message_h msg, int *serial); - -/** - * @brief Gets the DCS(Data Coding Scheme) value of the CB message. - * - * @param[in] msg The CB message handle - * @param[out] dcs The DCS value of the CB message (8-bit integer) - * - * @return 0 on success, otherwise a negative error value. - * @retval #MESSAGES_ERROR_NONE Successful - * @retval #MESSAGES_ERROR_INVALID_PARAMETER Invalid parameter - */ -int messages_cb_get_dcs(messages_cb_message_h msg, int *dcs); - -/** - * @brief Gets the message type of the CB message. - * - * @param[in] msg The CB message handle - * @param[out] type The message type of the CB message - * - * @return 0 on success, otherwise a negative error value. - * @retval #MESSAGES_ERROR_NONE Successful - * @retval #MESSAGES_ERROR_INVALID_PARAMETER Invalid parameter - */ -int messages_cb_get_message_type(messages_cb_message_h msg, messages_message_type_e *type); - - -/** - * @brief Gets the language type of the CB message. - * - * @remarks @a type must be released with @c free() by you. - * - * @param[in] msg The CB message handle - * @param[out] text The language type of the CB message - * - * @return 0 on success, otherwise a negative error value. - * @retval #MESSAGES_ERROR_NONE Successful - * @retval #MESSAGES_ERROR_INVALID_PARAMETER Invalid parameter - * @retval #MESSAGES_ERROR_OUT_OF_MEMORY Out of memory - */ -int messages_cb_get_language_type(messages_cb_message_h msg, char **type); - -/** - * @brief Gets the text contents of the CB message. - * - * @remarks @a text must be released with @c free() by you. - * - * @param[in] msg The CB message handle - * @param[out] text The the text of the CB message - * - * @return 0 on success, otherwise a negative error value. - * @retval #MESSAGES_ERROR_NONE Successful - * @retval #MESSAGES_ERROR_INVALID_PARAMETER Invalid parameter - * @retval #MESSAGES_ERROR_OPERATION_FAILED if the type of @a msg is MESSAGES_CB_TYPE_ETWS_PRIMARY - * @retval #MESSAGES_ERROR_OUT_OF_MEMORY Out of memory - */ -int messages_cb_get_text(messages_cb_message_h msg, char **text); - - -/** - * @brief Gets the received time of the CB message. - * - * @param[in] msg The CB message handle - * @param[out] time The recieved time of the CB message - * - * @return 0 on success, otherwise a negative error value. - * @retval #MESSAGES_ERROR_NONE Successful - * @retval #MESSAGES_ERROR_INVALID_PARAMETER Invalid parameter - */ -int messages_cb_get_time(messages_cb_message_h msg, time_t *time); - - -/** - * @brief Registers a callback to be invoked when an CB message is received. - * - * @param[in] service The message service handle - * @param[in] save Set to true to save the message, else false. - * @param[in] callback The callback function - * @param[in] user_data The user data to be passed to the callback function - * - * @return 0 on success, otherwise a negative error value. - * @retval #MESSAGES_ERROR_NONE Successful - * @retval #MESSAGES_ERROR_INVALID_PARAMETER Invalid parameter - */ -int messages_cb_set_incoming_cb(messages_service_h service, bool save, - messages_cb_incoming_cb callback, void *user_data); - - -/** - * @brief Unregisters the callback function for cb incoming message. - * - * @param[in] service The message service handle - * - * @return 0 on success, otherwise a negative error value. - * @retval #MESSAGES_ERROR_NONE Successful - * @retval #MESSAGES_ERROR_INVALID_PARAMETER Invalid parameter - */ -int messages_cb_unset_incoming_cb(messages_service_h service); - -/** - * @brief Registers a callback to be invoked when an ETWS primary notification message is received. - * - * @param[in] service The message service handle - * @param[in] callback The callback function - * @param[in] user_data The user data to be passed to the callback function - * - * @return 0 on success, otherwise a negative error value. - * @retval #MESSAGES_ERROR_NONE Successful - * @retval #MESSAGES_ERROR_INVALID_PARAMETER Invalid parameter - */ -int messages_cb_set_etws_primary_noti_cb(messages_service_h service, - messages_cb_etws_primary_noti_cb callback, void *user_data); - -/** - * @brief Unregisters the callback function for ETWS primary notification message is received. - * - * @param[in] service The message service handle - * - * @return 0 on success, otherwise a negative error value. - * @retval #MESSAGES_ERROR_NONE Successful - * @retval #MESSAGES_ERROR_INVALID_PARAMETER Invalid parameter - */ -int messages_cb_unset_etws_primary_noti_cb(messages_service_h service); - - -/** - * @brief Loads the settings for CB messaging. - * - * @remark The @a settings will be free automatically when the @a service is destroyed. - * - * @param[in] service The message service handle - * @param[out] settings The settings handle - * - * @return 0 on success, otherwise a negative error value. - * @retval #MESSAGES_ERROR_NONE Successful - * @retval #MESSAGES_ERROR_INVALID_PARAMETER Invalid parameter - * @retval #MESSAGES_ERROR_OUT_OF_MEMORY Out of memory - */ -int messages_cb_load_settings(messages_service_h service, messages_cb_settings_h *settings); - -/** - * @brief Saves the settings for CB messaging. - * - * @param[in] service The message service handle - * @param[in] settings The settings handle - * - * @return 0 on success, otherwise a negative error value. - * @retval #MESSAGES_ERROR_NONE Successful - * @retval #MESSAGES_ERROR_INVALID_PARAMETER Invalid parameter - */ -int messages_cb_save_settings(messages_service_h service, messages_cb_settings_h settings); - -/** - * @brief Enables or disables the CB messaging. - * - * @param[in] settings The settings handle - * @param[in] enabled If true, the CB messaging is enabled. otherwise the CB messaging is disabled. - * - * @return 0 on success, otherwise a negative error value. - * @retval #MESSAGES_ERROR_NONE Successful - * @retval #MESSAGES_ERROR_INVALID_PARAMETER Invalid parameter - */ -int messages_cb_settings_set_enabled(messages_cb_settings_h settings, bool enabled); - -/** - * @brief Determines whether the CB messaging is enabled. - * - * @param[in] settings The settings handle - * @param[out] enabled true if the CB messaging is enabled, false otherwise. - * - * @return 0 on success, otherwise a negative error value. - * @retval #MESSAGES_ERROR_NONE Successful - * @retval #MESSAGES_ERROR_INVALID_PARAMETER Invalid parameter - */ -int messages_cb_settings_is_enabled(messages_cb_settings_h settings, bool *enabled); - -/** - * @brief Adds a channel to the CB messaging settings. - * - * @param[in] settings The settings handle - * @param[in] channel The channel handle to add - * - * @return 0 on success, otherwise a negative error value. - * @retval #MESSAGES_ERROR_NONE Successful - * @retval #MESSAGES_ERROR_INVALID_PARAMETER Invalid parameter - * @retval #MESSAGES_ERROR_OUT_OF_RANGE Maximum cb channels exceeded - */ -int messages_cb_settings_add_channel(messages_cb_settings_h settings, messages_cb_channel_h channel); - -/** - * @brief Removes a channel from the CB messaging settings. - * - * @param[in] settings The settings handle - * @param[in] channel The channel handle to remove - * - * @return 0 on success, otherwise a negative error value. - * @retval #MESSAGES_ERROR_NONE Successful - * @retval #MESSAGES_ERROR_INVALID_PARAMETER Invalid parameter - */ -int messages_cb_settings_remove_channel(messages_cb_settings_h settings, messages_cb_channel_h channel); +int messages_push_register(messages_service_h service, const char *content_type, const char *app_id); -/** - * @brief Gets a channel from the CB messaging settings. - * - * @param[in] settings The settings handle - * @param[in] index The zero-based index of channel to receive - * @param[out] channel The channel with specified index - * - * @return 0 on success, otherwise a negative error value. - * @retval #MESSAGES_ERROR_NONE Successful - * @retval #MESSAGES_ERROR_INVALID_PARAMETER Invalid parameter - * @retval #MESSAGES_ERROR_OPERATION_FAILED Messaging operation failed - */ -int messages_cb_settings_get_channel(messages_cb_settings_h settings, int index, messages_cb_channel_h *channel); /** - * @brief Gets the total number of channels in the settings. + * @brief De-registers an application from the mapping table of the WAP Push service. * - * @param[in] settings The settings handle - * @param[out] count The total number of channels + * @since_tizen 2.3 + * @privlevel public + * @privilege %http://tizen.org/privilege/message.write * - * @return 0 on success, otherwise a negative error value. - * @retval #MESSAGES_ERROR_NONE Successful - * @retval #MESSAGES_ERROR_INVALID_PARAMETER Invalid parameter - */ -int messages_cb_settings_get_channel_count(messages_cb_settings_h settings, int *count); - -/** - * @brief Creates a channel handle. - * - * @remark @a channel must be released with messages_cb_destroy_channel() by you. + * @param[in] service The message service handle + * @param[in] content_type The MIME content type of the content + * @param[in] app_id The "X-WAP-Application-ID" to indicate a destination WAP Push application ID * - * @param[out] channel A message handle to be newly created if successful + * @return @c 0 on success, + * otherwise a negative error value * - * @return 0 on success, otherwise a negative error value. - * @retval #MESSAGES_ERROR_NONE Successful + * @retval #MESSAGES_ERROR_NONE Successful * @retval #MESSAGES_ERROR_INVALID_PARAMETER Invalid parameter - * @retval #MESSAGES_ERROR_OUT_OF_MEMORY Out of memory + * @retval #MESSAGES_ERROR_PERMISSION_DENIED The application does not have the privilege to call this method + * @retval #MESSAGES_ERROR_NOT_SUPPORTED Not supported */ -int messages_cb_create_channel(messages_cb_channel_h *channel); +int messages_push_deregister(messages_service_h service, const char *content_type, const char *app_id); -/** - * @brief Destroys a channel handle and release all its resource. - * - * @param[in] channel A channel handle to destroy - * - * @return 0 on success, otherwise a negative error value. - * @retval #MESSAGES_ERROR_NONE Successful - * @retval #MESSAGES_ERROR_INVALID_PARAMETER Invalid parameter - */ -int messages_cb_destroy_channel(messages_cb_channel_h channel); /** - * @brief Sets the range of channel id values for the CB messaging. + * @brief Re-registers an application to the mapping table of the WAP Push service. * - * @param[in] channel The channel handle - * @param[in] from_id The start of the range of channel id values. - * @param[in] to_id The end of the range of channel id values. + * @since_tizen 2.3 + * @privlevel public + * @privilege %http://tizen.org/privilege/message.write * - * @return 0 on success, otherwise a negative error value. - * @retval #MESSAGES_ERROR_NONE Successful - * @retval #MESSAGES_ERROR_INVALID_PARAMETER Invalid parameter - */ -int messages_cb_channel_set_id(messages_cb_channel_h channel, int from_id, int to_id); - -/** - * @brief Gets the range of channel id values for the CB messaging. + * @param[in] service The message service handle + * @param[in] content_type An element of the composite key for searching registered entry \n + * The MIME content type of the content. + * @param[in] app_id The composite key for searching mapping information \n + * The "X-WAP-Application-ID" to indicate a destination WAP Push application ID. + * @param[in] dst_content_type The MIME content type of the content + * @param[in] dst_app_id The "X-WAP-Application-ID" to indicate a destination WAP Push application ID * - * @param[in] channel The channel handle - * @param[out] from_id The start of the range of channel id values. - * @param[out] to_id The end of the range of channel id values. + * @return @c 0 on success, + * otherwise a negative error value * - * @return 0 on success, otherwise a negative error value. - * @retval #MESSAGES_ERROR_NONE Successful + * @retval #MESSAGES_ERROR_NONE Successful * @retval #MESSAGES_ERROR_INVALID_PARAMETER Invalid parameter - */ -int messages_cb_channel_get_id(messages_cb_channel_h channel, int *from_id, int *to_id); - -/** - * @brief Sets the name of the channel. - * - * @param[in] channel The channel handle - * @param[in] name The name of the channel + * @retval #MESSAGES_ERROR_PERMISSION_DENIED The application does not have the privilege to call this method + * @retval #MESSAGES_ERROR_NOT_SUPPORTED Not supported * - * @return 0 on success, otherwise a negative error value. - * @retval #MESSAGES_ERROR_NONE Successful - * @retval #MESSAGES_ERROR_INVALID_PARAMETER Invalid parameter - * @retval #MESSAGES_ERROR_OUT_OF_RANGE Maximum length of name exceeded - */ -int messages_cb_channel_set_name(messages_cb_channel_h channel, const char *name); - -/** - * @brief Gets the name of the channel. - * - * @param[in] channel The channel handle - * @param[out] name The name of the channel - * - * @return 0 on success, otherwise a negative error value. - * @retval #MESSAGES_ERROR_NONE Successful - * @retval #MESSAGES_ERROR_INVALID_PARAMETER Invalid parameter */ -int messages_cb_channel_get_name(messages_cb_channel_h channel, char **name); +int messages_push_reregister(messages_service_h service, const char *content_type, const char *app_id, + const char *dst_content_type, const char *dst_app_id); /** - * @brief Activates or deactivates a specific channel. - * - * @param[in] channel The channel handle - * @param[in] activated If true, the channel is activated. otherwise, the channel is deactivated. - * - * @return 0 on success, otherwise a negative error value. - * @retval #MESSAGES_ERROR_NONE Successful - * @retval #MESSAGES_ERROR_INVALID_PARAMETER Invalid parameter + * @} */ -int messages_cb_channel_set_activated(messages_cb_channel_h channel, bool activated); /** - * @brief Determines whether the channel is activated. - * - * @param[in] channel The channel handle - * @param[out] activated true If the channel is activated, false otherwise. - * - * @return 0 on success, otherwise a negative error value. - * @retval #MESSAGES_ERROR_NONE Successful - * @retval #MESSAGES_ERROR_INVALID_PARAMETER Invalid parameter - */ -int messages_cb_channel_is_activated(messages_cb_channel_h channel, bool *activated); - - - -/** * @} */ - #ifdef __cplusplus } #endif diff --git a/include/messages_error.h b/include/messages_error.h index 41b6217..b156936 100644 --- a/include/messages_error.h +++ b/include/messages_error.h @@ -38,13 +38,15 @@ typedef enum { MESSAGES_ERROR_NONE = TIZEN_ERROR_NONE, /**< Successful */ MESSAGES_ERROR_OUT_OF_MEMORY = TIZEN_ERROR_OUT_OF_MEMORY, /**< Out of memory */ MESSAGES_ERROR_INVALID_PARAMETER = TIZEN_ERROR_INVALID_PARAMETER, /**< Invalid parameter */ - MESSAGES_ERROR_SERVER_NOT_READY = TIZEN_ERROR_MESSAGING_CLASS|0x501, /**< Server is not read */ - MESSAGES_ERROR_COMMUNICATION_WITH_SERVER_FAILED = TIZEN_ERROR_MESSAGING_CLASS|0x502, /**< Communication with server failed */ - MESSAGES_ERROR_OUT_OF_RANGE = TIZEN_ERROR_MESSAGING_CLASS|0x503, /**< Index out of range */ - MESSAGES_ERROR_SENDING_FAILED = TIZEN_ERROR_MESSAGING_CLASS|0x504, /**< Sending a message failed */ - MESSAGES_ERROR_OPERATION_FAILED = TIZEN_ERROR_MESSAGING_CLASS|0x505, /**< Messaging operation failed */ - MESSAGES_ERROR_NO_SIM_CARD = TIZEN_ERROR_MESSAGING_CLASS|0x506, /**< No SIM Card */ - MESSAGES_ERROR_NO_DATA = TIZEN_ERROR_MESSAGING_CLASS|0x507, /**< No data available */ + MESSAGES_ERROR_SERVER_NOT_READY = TIZEN_ERROR_MESSAGING_SERVICE|0x501, /**< Server is not read */ + MESSAGES_ERROR_COMMUNICATION_WITH_SERVER_FAILED = TIZEN_ERROR_MESSAGING_SERVICE|0x502, /**< Communication with server failed */ + MESSAGES_ERROR_OUT_OF_RANGE = TIZEN_ERROR_MESSAGING_SERVICE|0x503, /**< Index out of range */ + MESSAGES_ERROR_SENDING_FAILED = TIZEN_ERROR_MESSAGING_SERVICE|0x504, /**< Sending a message failed */ + MESSAGES_ERROR_OPERATION_FAILED = TIZEN_ERROR_MESSAGING_SERVICE|0x505, /**< Messaging operation failed */ + MESSAGES_ERROR_NO_SIM_CARD = TIZEN_ERROR_MESSAGING_SERVICE|0x506, /**< No SIM Card */ + MESSAGES_ERROR_NO_DATA = TIZEN_ERROR_MESSAGING_SERVICE|0x507, /**< No data available */ + MESSAGES_ERROR_PERMISSION_DENIED = TIZEN_ERROR_PERMISSION_DENIED, /**< Permission denied */ + MESSAGES_ERROR_NOT_SUPPORTED = TIZEN_ERROR_NOT_SUPPORTED, /**< Not supported */ } messages_error_e; /** diff --git a/include/messages_private.h b/include/messages_private.h index f557646..53ac983 100644 --- a/include/messages_private.h +++ b/include/messages_private.h @@ -11,7 +11,7 @@ * distributed under the License is distributed on an AS IS BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and - * limitations under the License. + * limitations under the License. */ #ifndef __TIZEN_MESSAGING_PRIVATE_H__ @@ -22,6 +22,8 @@ extern "C" { #endif +#include <system_info.h> + typedef struct _messages_service_s { msg_handle_t service_h; void* incoming_cb; @@ -29,17 +31,6 @@ typedef struct _messages_service_s { bool incoming_cb_enabled; GSList* sent_cb_list; GSList* push_incoming_cb_list; - - bool cbs_enabled_cb; - - void* cbs_incoming_cb; - void* cbs_incoming_cb_user_data; - bool cbs_incoming_cb_save; - - void* etws_incoming_cb; - void* etws_incoming_cb_user_data; - - messages_cb_settings_h cbs_settings_h; } messages_service_s; typedef struct _messages_message_s { @@ -65,29 +56,11 @@ typedef struct _messages_push_incoming_callback_s { void* user_data; } messages_push_incoming_callback_s; +#define MESSAGES_PRIVILEGE_READ "http://tizen.org/privilege/message.read" +#define MESSAGES_PRIVILEGE_WRITE "http://tizen.org/privilege/message.write" - -// CBS - -#define MESSAGES_ETWS_WARNING_INFO_LEN 50 - -typedef struct _messages_cb_message_s { - msg_struct_t cb_msg_h; -} messages_cb_message_s; - -typedef struct _messages_cb_settings_s { - msg_struct_t _struct; - GSList* channel_list; -} messages_cb_settings_s; - -typedef struct _messages_cb_channel_s { - int from_id; - int to_id; - char name[CB_CHANNEL_NAME_MAX + 1]; - bool activated; -} messages_cb_channel_s; - - +#define MESSAGES_TELEPHONY_FEATURE "http://tizen.org/feature/network.telephony" +#define MESSAGES_TELEPHONY_MMS_FEATURE "http://tizen.org/feature/network.telephony.mms" #define ERROR_CONVERT(err) _messages_error_converter(err, __FUNCTION__, __LINE__); #define CHECK_NULL(p) \ @@ -96,18 +69,29 @@ typedef struct _messages_cb_channel_s { __FUNCTION__, MESSAGES_ERROR_INVALID_PARAMETER, #p); \ return MESSAGES_ERROR_INVALID_PARAMETER; \ } - + #define IS_SMS(x) ((x & MESSAGES_TYPE_SMS) == MESSAGES_TYPE_SMS) #define IS_MMS(x) ((x & MESSAGES_TYPE_MMS) == MESSAGES_TYPE_MMS) - +#define CHECK_MESSAGES_SUPPORTED(feature_name) \ + do { \ + bool is_supported = false; \ + if (!system_info_get_platform_bool(feature_name, &is_supported)) { \ + if (is_supported == false) { \ + LOGE("[%s] feature is disabled", feature_name); \ + return MESSAGES_ERROR_NOT_SUPPORTED; \ + } \ + } else { \ + LOGE("Error - Feature getting from System Info"); \ + return MESSAGES_ERROR_OPERATION_FAILED; \ + } \ + } while(0) + int _messages_convert_mbox_to_fw(messages_message_box_e mbox); int _messages_convert_msgtype_to_fw(messages_message_type_e type); int _messages_convert_recipient_to_fw(messages_recipient_type_e type); int _messages_error_converter(int err, const char *func, int line); -int _messages_cb_clear_settings(messages_cb_settings_s *settings); - #ifdef __cplusplus } #endif diff --git a/include/messages_types.h b/include/messages_types.h index 7b1d44c..1bfcb0b 100644 --- a/include/messages_types.h +++ b/include/messages_types.h @@ -11,7 +11,7 @@ * distributed under the License is distributed on an AS IS BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and - * limitations under the License. + * limitations under the License. */ #ifndef __TIZEN_MESSAGING_TYPES_H__ @@ -41,69 +41,76 @@ typedef struct messages_service_s *messages_service_h; typedef struct messages_message_s *messages_message_h; /** - * @brief The message box type. + * @brief Enumeration for the message box type. */ typedef enum { - MESSAGES_MBOX_ALL = 0, /**< All message box type */ - MESSAGES_MBOX_INBOX = 1, /**< Inbox type */ - MESSAGES_MBOX_OUTBOX = 2, /**< Outbox type*/ - MESSAGES_MBOX_SENTBOX = 3, /**< Sentbox type */ - MESSAGES_MBOX_DRAFT = 4, /**< Draft type */ + MESSAGES_MBOX_ALL = 0, /**< All message box type */ + MESSAGES_MBOX_INBOX = 1, /**< Inbox type */ + MESSAGES_MBOX_OUTBOX = 2, /**< Outbox type*/ + MESSAGES_MBOX_SENTBOX = 3, /**< Sentbox type */ + MESSAGES_MBOX_DRAFT = 4, /**< Draft type */ } messages_message_box_e; /** - * @brief The message type. + * @brief Enumeration for the message type. */ typedef enum { - MESSAGES_TYPE_UNKNOWN = 0, /**< Unknown type */ - MESSAGES_TYPE_SMS = 1, /**< SMS type */ - MESSAGES_TYPE_MMS = 2, /**< MMS type */ - MESSAGES_TYPE_SMS_CB = MESSAGES_TYPE_SMS | 1 << 4, /**< CB(Cell Broadcast) Type */ - MESSAGES_TYPE_SMS_PUSH = MESSAGES_TYPE_SMS | 10 << 4, /**< WAP Push Type */ - MESSAGES_TYPE_SMS_ETWS_PRIMARY = MESSAGES_TYPE_SMS | 21 << 4, /**< ETWS(Earthquake and Tsunami Warning System) Primary Type */ - MESSAGES_TYPE_SMS_ETWS_SECONDARY = MESSAGES_TYPE_SMS | 22 << 4, /**< ETWS(Earthquake and Tsunami Warning System) Secondary Type */ + MESSAGES_TYPE_UNKNOWN = 0, /**< Unknown type */ + MESSAGES_TYPE_SMS = 1, /**< SMS type */ + MESSAGES_TYPE_MMS = 2, /**< MMS type */ + MESSAGES_TYPE_SMS_CB = MESSAGES_TYPE_SMS | 1 << 4, /**< CB(Cell Broadcast) Type */ + MESSAGES_TYPE_SMS_PUSH = MESSAGES_TYPE_SMS | 10 << 4, /**< WAP Push Type */ + MESSAGES_TYPE_SMS_ETWS_PRIMARY = MESSAGES_TYPE_SMS | 21 << 4, /**< ETWS(Earthquake and Tsunami Warning System) Primary Type */ + MESSAGES_TYPE_SMS_ETWS_SECONDARY = MESSAGES_TYPE_SMS | 22 << 4, /**< ETWS(Earthquake and Tsunami Warning System) Secondary Type */ } messages_message_type_e; /** - * @brief The attachment type for MMS messaging. + * @brief Enumeration for the attachment type for MMS messaging. */ typedef enum { - MESSAGES_MEDIA_UNKNOWN = 0, /**< Unknown */ - MESSAGES_MEDIA_IMAGE = 1, /**< The image */ - MESSAGES_MEDIA_AUDIO = 2, /**< The audio */ - MESSAGES_MEDIA_VIDEO = 3, /**< The video */ + MESSAGES_MEDIA_UNKNOWN = 0, /**< Unknown */ + MESSAGES_MEDIA_IMAGE = 1, /**< The image */ + MESSAGES_MEDIA_AUDIO = 2, /**< The audio */ + MESSAGES_MEDIA_VIDEO = 3, /**< The video */ } messages_media_type_e; /** - * @brief The recipient type of a message. + * @brief Enumeration for the recipient type of a message. */ typedef enum { MESSAGES_RECIPIENT_UNKNOWN = 0, /**< Unknown */ - MESSAGES_RECIPIENT_TO = 1, /**< The 'To' recipient */ - MESSAGES_RECIPIENT_CC = 2, /**< The 'Cc' (carbon copy) recipient */ - MESSAGES_RECIPIENT_BCC = 3, /**< The 'Bcc' (blind carbon copy) recipient */ + MESSAGES_RECIPIENT_TO = 1, /**< The 'To' recipient */ + MESSAGES_RECIPIENT_CC = 2, /**< The 'Cc' (carbon copy) recipient */ + MESSAGES_RECIPIENT_BCC = 3, /**< The 'Bcc' (blind carbon copy) recipient */ } messages_recipient_type_e; /** - * @brief The result of sending a message. + * @brief Enumeration for the result of sending a message. */ typedef enum { - MESSAGES_SENDING_FAILED = -1, /**< Message sending is failed */ - MESSAGES_SENDING_SUCCEEDED = 0, /**< Message sending is succeeded */ + MESSAGES_SENDING_FAILED = -1, /**< Message sending failed */ + MESSAGES_SENDING_SUCCEEDED = 0, /**< Message sending succeeded */ } messages_sending_result_e; /** - * @brief Called when the process of sending a message to all recipients finishes. + * @brief Enumeration for the SIM index of a message. + */ +typedef enum { + MESSAGES_SIM_INDEX_UNKNOWN = 0, /**< Unknown SIM Index*/ + MESSAGES_SIM_INDEX_1 = 1, /**< SIM Index 1 */ + MESSAGES_SIM_INDEX_2 = 2, /**< SIM Index 2 */ +} messages_sim_index_e; + +/** + * @brief Called when the process of sending a message to all recipients finishes. * - * @param[in] result The result of message sending. - * @param[in] user_data The user data passed from the callback registration function + * @param[in] result The result of message sending + * @param[in] user_data The user data passed from the callback registration function * - * @pre messages_send_message() will invoke this callback if you register this callback using messages_set_message_sent_cb(). + * @pre messages_send_message() will invoke this callback function. * - * @see messages_set_message_sent_cb() - * @see messages_unset_message_sent_cb() * @see messages_send_message() */ typedef void (* messages_sent_cb)(messages_sending_result_e result, void *user_data); @@ -112,8 +119,8 @@ typedef void (* messages_sent_cb)(messages_sending_result_e result, void *user_d /** * @brief Called when an incoming message is received. * - * @param[in] incoming_msg An incoming message - * @param[in] user_data The user data passed from the callback registration function + * @param[in] incoming_msg The incoming message + * @param[in] user_data The user data passed from the callback registration function * * @pre You register this callback using messages_set_message_incoming_cb() for getting an incoming message. * @@ -126,18 +133,20 @@ typedef void (* messages_incoming_cb)(messages_message_h incoming_msg, void *use /** * @brief Called when a message is retrieved from a search request. * - * @remark You should not call messages_destroy_message() with @a msg. + * @remarks You should not call messages_destroy_message() with @a msg. * - * @param[in] msg The message handle (It can be NULL if nothing is found) - * @param[in] user_data The user data passed from the foreach function - * @param[in] index The index of a message from the messages that have been retrieved as a search result - * @param[in] result_count The count of the messages that have been retrieved as a result applying @a limit and @a offset.\n - * If the search has a @a limit, then this value is always equal or less than the limit. - * @param[in] total_count The count of the messages that have been retrieved as a result without applying @a limit and @a offset. \n - * The value can be used to calculate the total number of page views for the searched meessages.\n - * For example, if the count of message search is 50 and the limit is 20, then using this value, you can notice the total page is 3. + * @param[in] msg The message handle \n + * It can be @c NULL if nothing is found. + * @param[in] user_data The user data passed from the foreach function + * @param[in] index The index of a message from the messages that have been retrieved as a search result + * @param[in] result_count The count of the messages that have been retrieved as a result applying @a limit and @a offset \n + * If the search has a @a limit, then this value is always equal or less than the limit. + * @param[in] total_count The count of the messages that have been retrieved as a result without applying @a limit and @a offset \n + * The value can be used to calculate the total number of page views for the searched messages. \n + * For example, if the count of message search is @c 50 and the limit is @c 20, then using this value, you can notice the total page is @c 3. * - * @return @c true to continue with the next iteration of the loop or return @c false to break out of the loop. + * @return @c true to continue with the next iteration of the loop, + * otherwise return @c false to break out of the loop * * @pre messages_foreach_message() will invoke this callback function. * @@ -150,14 +159,15 @@ typedef bool (* messages_search_cb)(messages_message_h msg, int index, int resul * @addtogroup CAPI_MESSAGING_MESSAGES_PUSH_MODULE * @{ */ - + /** * @brief Called when an incoming push message is received. * - * @param[in] header The header of the push message - * @param[in] body The body of the push message. (It's not a null-terminated string) + * @param[in] header The header of the push message + * @param[in] body The body of the push message \n + * It is not a null-terminated string. * @param[in] body_length The length of @a body - * @param[in] user_data The user data to be passed to the callback function + * @param[in] user_data The user data to be passed to the callback function * * @pre You register this callback using messages_push_set_incoming_cb() for getting an incoming message. * @@ -172,69 +182,6 @@ typedef void (* messages_push_incoming_cb)(const char *header, const char *body, /** - * @addtogroup CAPI_MESSAGING_MESSAGES_CB_MODULE - * @{ - */ - -/** - * @brief The CB Message handle. - */ -typedef struct messages_cb_message_s *messages_cb_message_h; - -/** - * @brief The CB Settings handle. - */ -typedef struct messages_cb_settings_s *messages_cb_settings_h; - - /** - * @brief The CB Channel handle. - */ -typedef struct messages_cb_channel_s *messages_cb_channel_h; - -/** - * @brief Called when an incoming cb message is received. - * - * @param[in] msg The incoming CB message handle. \n - This handle will be destroyed when exiting this callback function automatically. - * @param[in] user_data The user data to be passed to the callback function - * - * @pre You register this callback using messages_cb_set_incoming_cb() for getting an incoming message. - * - * @see messages_cb_set_incoming_cb() - * @see messages_cb_unset_incoming_cb() - */ -typedef void (* messages_cb_incoming_cb)(messages_cb_message_h msg, void *user_data); - - -/** - * @brief Called when an incoming ETWS primary notification message is received. - * - * @details The ETWS primary notification message doesn't have text contents, but two parameters about ETWS are provided more. \n - * - * @remark The @a etws_security_info is 50 bytes binary data. - * - * @param[in] msg The incoming CB message handle. \n - This handle will be destroyed when exiting this callback function automatically. - * @param[in] etws_warning_type The ETWS warning type - * @param[in] etws_security_info The ETWS security info (50 bytes binary data) - * @param[in] user_data The user data to be passed to the callback function - * - * @pre You register this callback using messages_cb_set_incoming_cb() for getting an incoming message. - * - * @see messages_cb_set_etws_primary_noti_cb() - * @see messages_cb_unset_etws_primary_noti_cb() - */ -typedef void (* messages_cb_etws_primary_noti_cb)(messages_cb_message_h msg, - int etws_warning_type, const char *etws_security_info, void *user_data); - - -/** - * @} - */ - - - -/** * @} */ |