2 * Copyright 2012-2013 Samsung Electronics Co., Ltd
4 * Licensed under the Flora License, Version 1.1 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://floralicense.org/license/
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
17 #ifndef MSG_TRANSPORT_TYPES_H_
18 #define MSG_TRANSPORT_TYPES_H_
20 /*==================================================================================================
22 ==================================================================================================*/
24 #include "msg_types.h"
25 #include "msg_storage_types.h"
28 /*==================================================================================================
30 ==================================================================================================*/
32 /** @brief Prototype of the function that will be called when the status of the message which is already sent is changed.
33 * Applications SHOULD implement this callback function and register it into Message handle.
34 * For how to register this callback function, please refer to msg_reg_sent_status_callback.
35 * If the application sends a message, this callback function will be called to report its sending status.
36 * The application can get the request ID from sent_status to know which request is bound.
37 * The callback function runs in the application process, not in the framework process.
38 * The memory of sent_status is managed by MAPI, when the callback function is finished.
39 * @param[in] handle is Message handle.
40 * @param[in] sent_status is a pointer to an MSG_SENT_STATUS_S structure.
41 * @param[in] user_param is a pointer to user data.
44 typedef void (*msg_sent_status_cb)(msg_handle_t handle, msg_struct_t sent_status, void *user_param);
47 /** @brief Prototype of the function that will be called when the status of the message which is already sent is changed.
48 * Applications SHOULD implement this callback function and register it into Message handle.
49 * For how to register this callback function, please refer to msg_reg_sent_status_callback.
50 * If the application sends a message, this callback function will be called to report its sending status.
51 * The application can get the request ID from sent_status to know which request is bound.
52 * The callback function runs in the application process, not in the framework process.
53 * The memory of sent_status is managed by MAPI, when the callback function is finished.
54 * @param[in] sent_status is a pointer to an MSG_SENT_STATUS_S structure.
55 * @param[in] user_param is a pointer to user data.
58 typedef void (*msg_simple_sent_status_cb)(msg_struct_t sent_status, void *user_param);
61 /** @brief Prototype of the function that will be called when a new message is received.
62 * Applications SHOULD implement this callback function and register it into Message handle.
63 * For how to register this callback function, please refer to msg_reg_sms_message_callback.
64 * This callback function will be called when a new message is received and the message satisfies the filter list.
65 * The callback function runs in the application process, not in the framework process.
66 * The memory for msg is managed by MAPI, when the callback function is finished.
67 * @param[in] handle is Message handle.
68 * @param[in] msg is a pointer to an msg_message_t structure.
69 * @param[in] user_param is a pointer to user data.
72 typedef void (*msg_sms_incoming_cb)(msg_handle_t handle, msg_struct_t msg, void *user_param);
75 /** @brief Prototype of the function that will be called when a new MMS message is received.
76 * Applications SHOULD implement this callback function and register it into Message handle.
77 * For how to register this callback function, please refer to msg_reg_mms_conf_message_callback.
78 * This callback function will be called when a new MMS message is received and the message satisfies the filter list.
79 * The callback function runs in the application process, not in the framework process.
80 * The memory for msg is managed by MAPI, when the callback function is finished.
81 * @param[in] handle is Message handle.
82 * @param[in] msg is a pointer to an msg_message_t structure.
83 * @param[in] user_param is a pointer to user data.
86 typedef void (*msg_mms_conf_msg_incoming_cb)(msg_handle_t handle, msg_struct_t msg, void *user_param);
89 /** @brief Prototype of the function that will be called when a new SyncML message is received.
90 * Applications SHOULD implement this callback function and register it into Message handle.
91 * For how to register this callback function, please refer to msg_reg_syncml_message_callback.
92 * This callback function will be called when a new message is received and the message satisfies the filter list.
93 * The callback function runs in the application process, not in the framework process.
94 * @param[in] handle is Message handle.
95 * @param[in] msg_type is msg_syncml_message_type_t structure.
96 * @param[in] push_body is WAP Push body data.
97 * @param[in] push_body_len is the length of WAP Push body data.
98 * @param[in] user_param is a pointer to user data.
101 typedef void (*msg_syncml_msg_incoming_cb)(msg_handle_t handle, msg_syncml_message_type_t msg_type, const char *push_body, int push_body_len, const char* wsp_header, int wsp_header_len, void *user_param);
104 /** @brief Prototype of the function that will be called when a new LBS message is received.
105 * Applications SHOULD implement this callback function and register it into Message handle.
106 * For how to register this callback function, please refer to msg_reg_lbs_message_callback.
107 * This callback function will be called when a new message is received and the message satisfies the filter list.
108 * The callback function runs in the application process, not in the framework process.
109 * @param[in] hMsgHandle is Message handle.
110 * @param[in] push_header is push message header data.
111 * @param[in] push_body is push message body data.
112 * @param[in] push_body_len is push message body length.
113 * @param[in] user_param is a pointer to user data.
116 typedef void (*msg_lbs_msg_incoming_cb)(msg_handle_t handle, const char *push_header, const char *push_body, int push_body_len, void *user_param);
119 /** @brief Prototype of the function that will be called when a new SyncML message is received.
120 * Applications SHOULD implement this callback function and register it into Message handle.
121 * For how to register this callback function, please refer to msg_reg_syncml_message_callback.
122 * This callback function will be called when a new message is received and the message satisfies the filter list.
123 * The callback function runs in the application process, not in the framework process.
124 * @param[in] handle is Message handle.
125 * @param[in] user_param is a pointer to user data.
128 typedef void (*msg_syncml_msg_operation_cb)(msg_handle_t handle, int msgId, int extId, void *user_param);
131 typedef void (*msg_push_msg_incoming_cb)(msg_handle_t handle, const char *push_header, const char *push_body, int push_body_len, void *user_param);
134 typedef void (*msg_cb_incoming_cb)(msg_handle_t handle, msg_struct_t msg, void *user_param);
136 #endif /* MSG_TRANSPORT_TYPES_H_ */