diff options
author | seunggi.hong <seunggi.hong@samsung.com> | 2015-04-03 17:44:25 +0900 |
---|---|---|
committer | seunggi.hong <seunggi.hong@samsung.com> | 2015-04-03 17:46:03 +0900 |
commit | 873b33b178b7b31d1074e5c1f93b2f68f839416b (patch) | |
tree | 6a084331009e4d82c6351b2690e76161fd0a485b /include | |
parent | 1cd776d274fc36821557958fca79abeec457a703 (diff) | |
download | msg-service-873b33b178b7b31d1074e5c1f93b2f68f839416b.tar.gz msg-service-873b33b178b7b31d1074e5c1f93b2f68f839416b.tar.bz2 msg-service-873b33b178b7b31d1074e5c1f93b2f68f839416b.zip |
Sync with tizen 2.4submit/tizen_wearable/20150403.085015submit/tizen_tv/20150403.085001submit/tizen_mobile/20150403.084952submit/tizen_common/20150403.085023
Change-Id: I73019c4c236709be9c36c1744a3bcce4b98076e4
Signed-off-by: seunggi.hong <seunggi.hong@samsung.com>
Diffstat (limited to 'include')
48 files changed, 4819 insertions, 4515 deletions
diff --git a/include/common/MsgCmdTypes.h b/include/common/MsgCmdTypes.h index 7b24a1d..9b6ff41 100755 --- a/include/common/MsgCmdTypes.h +++ b/include/common/MsgCmdTypes.h @@ -1,20 +1,17 @@ /* - * msg-service - * - * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved + * Copyright (c) 2014 Samsung Electronics Co., Ltd. All rights reserved * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * 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. - * */ #ifndef MSG_CMD_TYPES_H @@ -173,13 +170,21 @@ enum _MSG_CMD_TYPE_E MSG_CMD_UPDATE_PUSH_EVENT, MSG_CMD_DELETE_MESSAGE_BY_LIST, MSG_CMD_SET_FILTER_ACTIVATION, - MSG_CMD_CONTACT_SYNC, + MSG_CMD_ADD_SIM_MSG, +// 85 + MSG_CMD_PLG_RESEND_MESSAGE, + MSG_CMD_SEND_PENDING_PUSH_MESSAGE, + MSG_CMD_REG_REPORT_MSG_INCOMING_CB, + MSG_CMD_UPDATE_IMSI, + +#ifdef FEATURE_SMS_CDMA + MSG_CMD_PLG_CHECK_UNIQUENESS, +#endif // end of MSG_CMD; new CMD should be defined before MSG_CMD_NUM MSG_CMD_NUM }; - enum _MSG_EVENT_TYPE_E { MSG_EVENT_OPEN_HANDLE = 0, @@ -290,11 +295,23 @@ enum _MSG_EVENT_TYPE_E MSG_EVENT_UPDATE_PUSH_EVENT, MSG_EVENT_DELETE_MESSAGE_BY_LIST, MSG_EVENT_SET_FILTER_ACTIVATION, - MSG_EVNET_CONTACT_SYNC, + MSG_EVENT_ADD_SIM_MSG, + +// 85 + MSG_EVENT_PLG_RESEND_MESSAGE, + MSG_EVENT_SEND_PENDING_PUSH_MESSAGE, + MSG_EVENT_REG_REPORT_MSG_INCOMING_CB, + MSG_EVENT_PLG_REPORT_MSG_INCOMING_IND, + +#ifdef FEATURE_SMS_CDMA + MSG_EVENT_PLG_CHECK_UNIQUENESS, +#endif + MSG_EVENT_UPDATE_IMSI, // end of MSG_EVENT; new EVENT should be defined before MSG_EVENT_NUM MSG_EVENT_NUM }; + #endif // MSG_CMD_TYPES_H diff --git a/include/common/MsgCppTypes.h b/include/common/MsgCppTypes.h index 96c4f7c..d4d63a1 100755 --- a/include/common/MsgCppTypes.h +++ b/include/common/MsgCppTypes.h @@ -1,20 +1,17 @@ /* - * msg-service - * - * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved + * Copyright (c) 2014 Samsung Electronics Co., Ltd. All rights reserved * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * 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. - * */ #ifndef __MSG_CPP_TYPES_H__ diff --git a/include/common/MsgFilterTypes.h b/include/common/MsgFilterTypes.h index 488611d..cb453eb 100755 --- a/include/common/MsgFilterTypes.h +++ b/include/common/MsgFilterTypes.h @@ -1,20 +1,17 @@ /* - * msg-service - * - * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved + * Copyright (c) 2014 Samsung Electronics Co., Ltd. All rights reserved * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * 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. - * */ #ifndef MSG_FILTER_TYPES_H diff --git a/include/common/MsgInternalTypes.h b/include/common/MsgInternalTypes.h index 800d17d..8b6db87 100755 --- a/include/common/MsgInternalTypes.h +++ b/include/common/MsgInternalTypes.h @@ -1,20 +1,17 @@ /* - * msg-service - * - * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved + * Copyright (c) 2014 Samsung Electronics Co., Ltd. All rights reserved * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * 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. - * */ #ifndef MSG_INTERNAL_TYPES_H @@ -30,38 +27,54 @@ INCLUDE FILES ==================================================================================================*/ #include "MsgMmsTypes.h" -#include <inttypes.h> -#include <tzplatform_config.h> + /*================================================================================================== DEFINES ==================================================================================================*/ -#define MSG_DATA_ROOT_PATH tzplatform_mkpath(TZ_USER_DATA,"msg-service") -#define MSG_DATA_PATH tzplatform_mkpath3(TZ_USER_DATA,"msg-service","msgdata") -#define MSG_SMIL_FILE_PATH tzplatform_mkpath3(TZ_USER_DATA,"msg-service","smildata") -#define MSG_IPC_DATA_PATH tzplatform_mkpath3(TZ_USER_DATA,"msg-service","ipcdata") -#define MSG_THUMBNAIL_PATH tzplatform_mkpath4(TZ_USER_DATA,"msg-service","ipcdata","thumbnails") +#define MSG_DATA_ROOT_PATH "/opt/usr/data/msg-service/" +#define MSG_DATA_PATH MSG_DATA_ROOT_PATH"msgdata/" +#define MSG_SMIL_FILE_PATH MSG_DATA_ROOT_PATH"smildata/" +#define MSG_IPC_DATA_PATH MSG_DATA_ROOT_PATH"ipcdata/" +#define MSG_THUMBNAIL_PATH MSG_DATA_PATH"thumbnails/" + + // temporary -#define TPDU_LOG_FILE tzplatform_mkpath3(TZ_USER_DATA,"msg-service","tpduLog.txt") #define MSG_NATIONAL_SIM "memory/private/msg-service/national_sim" #define MSG_SIM_MSISDN "memory/private/msg-service/msisdn" +#define MSG_SIM_ICCID "memory/private/msg-service/iccid" +#define MSG_FMM_SIM_CHANGE_NUM "db/SyncML/oma-dm-service/fmmSimChangeNum" + #define MAX_FULL_PATH_SIZE 320 // max length for internal file path -#define MAX_PRECONFIG_NUM 8 #define MAX_THREAD_ADDR_LEN 40 #define MAX_THREAD_NAME_LEN 195 #define MAX_THREAD_DATA_LEN 128 #define MAX_CB_MSG_TEXT_LEN 4200 // 1page max char(93)*max page(15)*max bytes of UTF8 1 char(3) #define MAX_CB_MSG_LANGUAGE_TYPE_LEN 3 #define MAX_ETWS_WARNING_SECURITY_INFO_LEN 50 +#define MAX_ME_IMEI_LEN 20 +#define MAX_SIM_MSISDN_LEN 26 +#define MAX_COMMON_INFO_SIZE 20 +#define MAX_VCONFKEY_NAME_LEN 128 +#define MAX_SIM_IMSI_LEN 16 +#define MAX_TAPI_SIM_API_TIMEOUT 70 -#define SMS_MINIMUM_SPACE (3 * 1024) -#define MMS_MINIMUM_SPACE (600 * 1024) +#define SMS_MINIMUM_SPACE (1 * 1024 * 1024) +#define MMS_MINIMUM_SPACE (1 * 1024 * 1024) /*vconf keys*/ -#define MSG_SIM_IMSI "memory/private/msg-service/sim_imsi" -#define MSG_SIM_CHANGED "memory/private/msg-service/sim_changed" - #define DEFAULT_SETTING_PATH "db/private/msg-service" +#define DEFAULT_MSG_MEMORY_PATH "memory/private/msg-service" + +#ifdef FEATURE_SMS_CDMA +#define MSG_SIM_IMSI DEFAULT_MSG_MEMORY_PATH"/sim_imsi" +#endif +#define MSG_SIM_SUBS_ID DEFAULT_MSG_MEMORY_PATH"/sim_subs_id" +#define MSG_SIM_CHANGED DEFAULT_MSG_MEMORY_PATH"/sim_changed" + +#define MSG_SIM_SERVICE_TABLE DEFAULT_MSG_MEMORY_PATH"/sim_st" +#define MSG_SIM_MO_CONTROL DEFAULT_MSG_MEMORY_PATH"/sim_mo_ctrl" +#define MSG_NETWORK_SIM DEFAULT_MSG_MEMORY_PATH"/default_network_sim" #define DEFAULT_GENERAL_OPT_PATH DEFAULT_SETTING_PATH"/general" #define DEFAULT_SMS_SEND_OPT_PATH DEFAULT_SETTING_PATH"/sms_send" @@ -76,10 +89,22 @@ #define DEFAULT_SIM_COUNT_PATH DEFAULT_SETTING_PATH"/sim_count" #define MSG_KEEP_COPY DEFAULT_GENERAL_OPT_PATH"/keep_copy" -#define MSG_ALERT_TONE VCONFKEY_SETAPPL_NOTI_MSG_ALERT_REP_TYPE_INT +#define MSG_ALERT_REP_TYPE DEFAULT_GENERAL_OPT_PATH"/alert_rep_type" #define MSG_AUTO_ERASE DEFAULT_GENERAL_OPT_PATH"/auto_erase" #define MSG_BLOCK_MESSAGE DEFAULT_GENERAL_OPT_PATH"/block_msg" #define CONTACT_SYNC_TIME DEFAULT_GENERAL_OPT_PATH"/contact_sync_time" +#define MSG_SEARCH_TAGS DEFAULT_GENERAL_OPT_PATH"/search_tags" + +#define MSG_BLOCK_UNKNOWN_MSG DEFAULT_GENERAL_OPT_PATH"/block_unknown_msg" +#define MSG_SMS_LIMIT DEFAULT_GENERAL_OPT_PATH"/sms_limit" +#define MSG_MMS_LIMIT DEFAULT_GENERAL_OPT_PATH"/mms_limit" +#define MSG_SETTING_NOTIFICATION DEFAULT_GENERAL_OPT_PATH"/notification" +#define MSG_SETTING_VIBRATION DEFAULT_GENERAL_OPT_PATH"/vibration" +#define MSG_SETTING_PREVIEW DEFAULT_GENERAL_OPT_PATH"/preview" +#define MSG_SETTING_RINGTONE_PATH DEFAULT_GENERAL_OPT_PATH"/ringtone_path" +#define MSG_SETTING_RINGTONE_TYPE DEFAULT_GENERAL_OPT_PATH"/ringtone_type" +#define MSG_MMS_UA_PROFILE DEFAULT_GENERAL_OPT_PATH"/ua_profile" +#define MSG_MMS_UA_AGENT DEFAULT_GENERAL_OPT_PATH"/ua_agent" #define SMS_SEND_DCS DEFAULT_SMS_SEND_OPT_PATH"/dcs" #define SMS_SEND_NETWORK_MODE VCONFKEY_MESSAGE_NETWORK_MODE @@ -142,7 +167,6 @@ #define CB_RECEIVE DEFAULT_CB_MSG_OPT_PATH"/receive" #define CB_SAVE DEFAULT_CB_MSG_OPT_PATH"/save" #define CB_MAX_SIM_COUNT DEFAULT_CB_MSG_OPT_PATH"/max_sim_count" -#define CB_CHANNEL_COUNT DEFAULT_CB_MSG_OPT_PATH"/channel_count" #define CB_CHANNEL_ACTIVATE DEFAULT_CB_MSG_OPT_PATH"/channel_activate" #define CB_CHANNEL_ID_FROM DEFAULT_CB_MSG_OPT_PATH"/channel_id_from" #define CB_CHANNEL_ID_TO DEFAULT_CB_MSG_OPT_PATH"/channel_id_to" @@ -151,12 +175,23 @@ #define VOICEMAIL_NUMBER DEFAULT_VOICE_MAIL_OPT_PATH"/voice_mail_number" #define VOICEMAIL_COUNT DEFAULT_VOICE_MAIL_OPT_PATH"/voice_mail_count" +#define VOICEMAIL_ALPHA_ID DEFAULT_VOICE_MAIL_OPT_PATH"/voice_mail_alphaid" +#define VOICEMAIL_DEFAULT_NUMBER "" +#define VOICEMAIL_DEFAULT_ALPHA_ID "" #define MSGSIZE_OPTION DEFAULT_MSGSIZE_OPT_PATH"/msg_size" #define SIM_USED_COUNT DEFAULT_SIM_COUNT_PATH"/used_cnt" #define SIM_TOTAL_COUNT DEFAULT_SIM_COUNT_PATH"/total_cnt" +#ifdef FEATURE_SMS_CDMA +#define MSG_MESSAGE_ID_COUNTER DEFAULT_GENERAL_OPT_PATH"/msg_id_counter" +#endif + +#define MSG_DEFAULT_APP_ID "org.tizen.message" +#define MSG_QUICKPANEL_APP_ID "org.tizen.quickpanel" +#define MSG_TELEPHONY_FEATURE "http://tizen.org/feature/network.telephony" +#define MSG_TELEPHONY_MMS_FEATURE "http://tizen.org/feature/network.telephony.mms" /*================================================================================================== TYPES @@ -179,6 +214,15 @@ typedef unsigned char MSG_SUB_TYPE_T; /** + * @brief Represents a message tag type. \n + * Each main type of a message can be divided into some tag types. \n + * For instance of SMS, the message sub type can be one of the Priority, Finance, and so on. \n + * The values for this type SHOULD be in _MSG_SUB_TYPE_E. + */ +typedef unsigned int MSG_TAG_TYPE_T; + + +/** * @brief Represents a message class. \n * The values for this type SHOULD be in _MSG_CLASS_TYPE_E. */ @@ -218,7 +262,8 @@ typedef struct MSG_MESSAGE_TYPE_S msgType; /**< Indicates the message type such as SMS and MMS */ msg_storage_id_t storageId; /**< Indicates where the message is saved. */ int nAddressCnt; /**< Indicates the count of addresses. */ - MSG_ADDRESS_INFO_S addressList[MAX_TO_ADDRESS_CNT]; /**< Indicates the address information list. */ +// MSG_ADDRESS_INFO_S addressList[MAX_TO_ADDRESS_CNT]; /**< Indicates the address information list. */ + MSG_ADDRESS_INFO_S *addressList; /**< Indicates the address information list. */ char replyAddress[MAX_PHONE_NUMBER_LEN+1]; /**< Indicates the reply address. */ char subject[MAX_SUBJECT_LEN+1]; /**< Indicates the message subject. */ time_t displayTime; /**< Indicates the display time related to the specific operation. */ @@ -236,8 +281,10 @@ typedef struct char msgText[MAX_MSG_TEXT_LEN+1]; char thumbPath[MSG_FILEPATH_LEN_MAX+1]; bool bStore; /**< Indicates whether the message is stored or not if it is MWI message. */ + int sim_idx; } MSG_MESSAGE_INFO_S; + typedef struct { msg_message_id_t msgId; /**< Indicates the message ID of this message. */ @@ -248,6 +295,7 @@ typedef struct MSG_CLASS_TYPE_T classType; /**< Message class type. See enum _MSG_CLASS_TYPE_E */ msg_storage_id_t storageId; /**< Indicates where the message is saved. see enum _MSG_FOLDER_TYPE_E*/ msg_struct_list_s *addr_list; + GList *addressList; char replyAddress[MAX_PHONE_NUMBER_LEN+1]; /**< Indicates the reply address. */ char subject[MAX_SUBJECT_LEN+1]; /**< Indicates the message subject. */ time_t displayTime; /**< Indicates the display time related to the specific operation. */ @@ -267,8 +315,10 @@ typedef struct void *pData; /**< Indicates the message payload information as a body. default character encoding is UTF-8*/ void *pMmsData; /**< Indicates the message payload information as a body. default character encoding is UTF-8*/ size_t mmsDataSize; + int simIndex; } MSG_MESSAGE_HIDDEN_S; + /** * @brief Represents message information for thread view. */ @@ -284,7 +334,11 @@ typedef struct int unreadCnt; /**< Indicates the unread messages from the Peer. */ int smsCnt; /**< Indicates the SMS messages from the Peer. */ int mmsCnt; /**< Indicates the MMS messages from the Peer. */ - bool bProtected; /**< Indicates whether the thread includes protected messages. */ + bool bProtected; /**< Indicates whether the thread includes protected messages. */ + bool bDraft; + bool bSendFailed; + bool bSending; + int simIndex; } MSG_THREAD_VIEW_S; @@ -314,8 +368,24 @@ typedef struct char subject[MAX_SUBJECT_LEN+1]; /**< Indicates the message subject. */ size_t textSize; /**< Indicates the data size. The unit is byte. */ char *pText; /**< Indicates the message payload information as a body. default character encoding is UTF-8*/ + int tcs_bc_level; + char firstMediaPath[MSG_FILEPATH_LEN_MAX+1]; // First Media Path in mms; + msg_list_handle_t multipart_list; + int simIndex; } MSG_CONVERSATION_VIEW_S; +typedef struct +{ + MimeType type; /**< Indicates the multipart mime type. see enum MimeType */ + char szContentType[MSG_MSG_ID_LEN + 1]; /**< Indicates the content type */ + char szFileName[MSG_FILENAME_LEN_MAX + 1]; /**< Indicates the file name */ + char szFilePath[MSG_FILEPATH_LEN_MAX + 1]; /**< Indicates the file path */ + char szContentID[MSG_MSG_ID_LEN + 1]; /**< Indicates the content id */ + char szContentLocation[MSG_MSG_ID_LEN + 1]; /**< Indicates the content Location */ + + int tcs_bc_level; /** detect malware type **/ + char szThumbFilePath[MSG_FILEPATH_LEN_MAX + 1]; /**< Indicates the thumbnail file path */ +} MSG_MMS_MULTIPART_S; /** * @brief Represents sim message informatioin list. @@ -349,15 +419,11 @@ typedef struct typedef struct { int listenerFd; /**< Rx fd for status cnf */ -#if defined(__x86_64__) || defined(__aarch64__) - uint64_t handleAddr; /**< Handle address for status cnf */ -#else unsigned int handleAddr; /**< Handle address for status cnf */ -#endif msg_message_id_t sentMsgId; /**< The ID of a sent message for updating message status */ - } MSG_PROXY_INFO_S; + /** * @brief Aux data structure for MSG_CMD_REG_INCOMING_MSG_CB. \n * This stucture contains the information about the receiver for msgType and port. @@ -474,6 +540,24 @@ typedef struct unsigned char language_type[MAX_CB_MSG_LANGUAGE_TYPE_LEN]; } MSG_CB_MSG_S; +#ifdef FEATURE_SMS_CDMA +typedef struct _MSG_UNIQUE_INDEX_S +{ + unsigned short tele_msgId; + char address[MAX_ADDRESS_VAL_LEN+1]; + char sub_address[MAX_ADDRESS_VAL_LEN+1]; + char time_stamp[MAX_COMMON_INFO_SIZE+1]; + int telesvc_id; +} MSG_UNIQUE_INDEX_S; + +typedef struct +{ + time_t receivedTime; + unsigned short serialNum; + unsigned short messageId; // Message Identifier +} MSG_CB_DUPLICATE_S; +#endif + /*================================================================================================== ENUMS @@ -544,8 +628,18 @@ enum _MSG_SUB_TYPE_E MSG_SENDREQ_JAVA_MMS, /**< MMS Send Request message for JAVA MMS */ MSG_ETWS_SMS, + MSG_MWI_VOICE2_SMS, /**< MWI Message Voice for line 2(CPHS)*/ + + MSG_CMAS_PRESIDENTIAL, /**< CMAS CLASS */ + MSG_CMAS_EXTREME, + MSG_CMAS_SEVERE, + MSG_CMAS_AMBER, + MSG_CMAS_TEST, + MSG_CMAS_EXERCISE, + MSG_CMAS_OPERATOR_DEFINED, }; + /** * @brief Represents the values of a message transaction type. \n * This enum is used as the value of MSG_MMS_TRANSACTION_TYPE_T. @@ -568,6 +662,10 @@ enum _MSG_MMS_ITEM_TYPE_E MSG_MMS_ITEM_TYPE_VIDEO, /**< Indicates the video media */ MSG_MMS_ITEM_TYPE_ATTACH, /**< Indicates the attach file */ MSG_MMS_ITEM_TYPE_PAGE, /**< Indicates the page count */ + MSG_MMS_ITEM_TYPE_MALWARE, /**< Indicates the tcs bc level*/ + MSG_MMS_ITEM_TYPE_1ST_MEDIA, /**< Indicates the 1st media path*/ }; + + #endif diff --git a/include/common/MsgMmsTypes.h b/include/common/MsgMmsTypes.h index dda8f8e..2ce1da6 100755 --- a/include/common/MsgMmsTypes.h +++ b/include/common/MsgMmsTypes.h @@ -1,20 +1,17 @@ /* - * msg-service - * - * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved + * Copyright (c) 2014 Samsung Electronics Co., Ltd. All rights reserved * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * 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. - * */ #ifndef MSG_MMS_TYPES_H @@ -48,6 +45,7 @@ * @{ */ +typedef GList MMSList; /*================================================================================================== STRUCTURES @@ -108,8 +106,7 @@ typedef struct char szContentType[MSG_MSG_ID_LEN + 1]; char szContentLocation[MSG_MSG_ID_LEN + 1]; - -}MMS_MEDIA_S; +} MMS_MEDIA_S; /** * @brief Represents attachment information. @@ -124,7 +121,7 @@ typedef struct char szDrm2FullPath[MSG_FILEPATH_LEN_MAX + 1]; /**< Indicates the fullpath of the DRM */ char szContentType[MSG_MSG_ID_LEN + 1]; -}MMS_ATTACH_S; +} MMS_ATTACH_S; /** * @brief Represents SMIL page information. @@ -149,7 +146,7 @@ typedef struct { bool bUnitPercent; /**< Indicates the length is in percentage(%) or not */ int value; /**< Indicates the value for length */ -}MMS_LENGTH; +} MMS_LENGTH; /** * @brief Represents SMIL region information. @@ -165,7 +162,7 @@ typedef struct int bgColor; /**< Indicates the background color of the region */ REGION_FIT_TYPE_T fit; /**< Indicates the fit type. see enum REGION_FIT_TYPE_T */ -}MMS_SMIL_REGION; +} MMS_SMIL_REGION; /** * @brief Represents SMIL root layout information. @@ -224,28 +221,102 @@ typedef struct MMS_APPID_INFO_S msgAppId; }MMS_RECV_DATA_S; +typedef struct _MMS_ADDRESS_DATA_S { + int address_type; + char *address_val; +} MMS_ADDRESS_DATA_S; + +/** + * @brief Represents MMS header data. + */ typedef struct _MMS_HEADER_DATA_S { - char messageID[MSG_MSG_ID_LEN + 1]; - char trID[MSG_MSG_ID_LEN + 1]; - char contentLocation[MSG_MSG_ID_LEN + 1]; + MMSList *bcc;// Bcc + MMSList *cc;// Cc + char contentLocation[MMS_LOCATION_LEN + 1]; char szContentType[MSG_MSG_ID_LEN + 1];//string : ex) application/vnd.wap.multipart.related - int contentType;//MimeType : ex) application/vnd.wap.multipart.related + unsigned long int date; + bool bDeliveryReport; // X-Mms-Delivery-Report + MmsTimeStruct delivery; // X-Mms-Delivery-Time + MmsTimeStruct expiry; + char szFrom[254 * 3 + 11]; //"/TYPE=PLMN", /"TYPE=IPv4", "/TYPE=IPv6" // From + int messageClass;//Personal | Advertisement | Informational | Auto + char messageID[MSG_MSG_ID_LEN + 1]; int messageType;//MmsMsgType : ex) sendreq int mmsVersion;//1.0 1.3 - int messageClass;//Personal | Advertisement | Informational | Auto - int contentClass;//text | image-basic| image-rich | video-basic | video-rich | megapixel | content-basic | content-rich + int messageSize; //X-Mms-Message-Size int mmsPriority;//_MSG_PRIORITY_TYPE_E : Low | Normal | High + bool bReadReport;// X-Mms-Read-Report +// X-Mms-Report-Allowed +// X-Mms-Response-Status +// X-Mms-Response-Text + bool bHideAddress;// X-Mms-Sender-Visibility + msg_delivery_report_status_t mmsStatus;// X-Mms-Status + char szSubject[MAX_SUBJECT_LEN + 1];// Subject + MMSList *to;// Cc// To + char trID[MSG_MSG_ID_LEN + 1]; +// X-Mms-Retrieve-Status +// X-Mms-Retrieve-Text +// X-Mms-Read-Status +// X-Mms-Reply-Charging +// X-Mms-Reply-Charging-Deadline +// X-Mms-Reply-Charging-ID +// X-Mms-Reply-Charging-Size +// X-Mms-Previously-Sent-By +// X-Mms-Previously-Sent-Date +// X-Mms-Store +// X-Mms-MM-State +// X-Mms-MM-Flags +// X-Mms-Store-Status +// X-Mms-Store-Status-Text +// X-Mms-Stored +// X-Mms-Attributes +// X-Mms-Totals +// X-Mms-Mbox-Totals +// X-Mms-Quotas +// X-Mms-Mbox-Quotas +// X-Mms-Message-Count +// Content +// X-Mms-Start +// Additional-headers +// X-Mms-Distribution-Indicator +// X-Mms-Element-Descriptor +// X-Mms-Limit +// X-Mms-Recommended-Retrieval-Mode +// X-Mms-Recommended-Retrieval-Mode-Text +// X-Mms-Status-Text +// X-Mms-Applic-ID +// X-Mms-Reply-Applic-ID +// X-Mms-Aux-Applic-Info + int contentClass;//text | image-basic| image-rich | video-basic | video-rich | megapixel | content-basic | content-rich +// X-Mms-DRM-Content +// X-Mms-Adaptation-Allowed +// X-Mms-Replace-ID +// X-Mms-Cancel-ID +// X-Mms-Cancel-Status +//------------------------------------------------------------------ + int contentType;//MimeType : ex) application/vnd.wap.multipart.related + } MMS_HEADER_DATA_S; +/** + * @brief Represents MMS multipart data. + */ typedef struct { MimeType type; /**< Indicates the multipart mime type. see enum MimeType */ char szContentType[MSG_MSG_ID_LEN + 1]; /**< Indicates the content type */ char szFileName[MSG_FILENAME_LEN_MAX + 1]; /**< Indicates the file name */ - char szFilePath[MSG_FILEPATH_LEN_MAX + 1]; /**< Indicates the file path */ char szContentID[MSG_MSG_ID_LEN + 1]; /**< Indicates the content id */ char szContentLocation[MSG_MSG_ID_LEN + 1]; /**< Indicates the content Location */ + MsgDrmType drmType; /**< Indicates the drm type. see enum MsgDrmType */ + + char szFilePath[MSG_FILEPATH_LEN_MAX + 1]; /**< Indicates the file path */ + char *pMultipartData; + size_t nMultipartDataLen; + int tcs_bc_level; /** detect malware type **/ + int malware_allow; + char szThumbFilePath[MSG_FILEPATH_LEN_MAX + 1]; /**< Indicates the thubnail file path */ } MMS_MULTIPART_DATA_S; /** @@ -267,8 +338,19 @@ typedef struct _MMS_MESSAGE_DATA_S GList *metalist; /**< The pointer to SMIL meta list */ MMS_SMIL_ROOTLAYOUT rootlayout; /**< Indicates the root layout information */ MMS_APPID_INFO_S msgAppId; - MMS_HEADER_DATA_S header; - MMS_MULTIPART_DATA_S smil; + MMS_HEADER_DATA_S header;//use for scloud + MMS_MULTIPART_DATA_S smil;//use for scloud } MMS_MESSAGE_DATA_S; +/** + * @brief Represents MMS message data. + */ +typedef struct +{ + int backup_type; //none = 0 || scloud backup = 1 || kies backup = 2; + MMS_HEADER_DATA_S *header; /**< The header struct of MMS*/ + MMS_MULTIPART_DATA_S *smil; + MMSList *multipartlist; /**< list of MMS_MULTIPART_DATA_S*/ +} MMS_DATA_S; + #endif diff --git a/include/common/MsgPluginInterface.h b/include/common/MsgPluginInterface.h index a674cf9..a761501 100755 --- a/include/common/MsgPluginInterface.h +++ b/include/common/MsgPluginInterface.h @@ -1,21 +1,19 @@ /* - * msg-service - * - * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved + * Copyright (c) 2014 Samsung Electronics Co., Ltd. All rights reserved * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * 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. - * */ + /** * @file MsgPluginInterface.h * @brief Defines plug-ins API of messaging framework @@ -526,7 +524,11 @@ typedef msg_error_t (*MsgPlgSaveSimMessage)(const MSG_MESSAGE_INFO_S *pMsgInfo, * */ /*================================================================================================*/ +#ifdef FEATURE_SMS_CDMA typedef msg_error_t (*MsgPlgDeleteSimMessage)(msg_sim_id_t SimMsgId); +#else +typedef msg_error_t (*MsgPlgDeleteSimMessage)(msg_sim_slot_id_t sim_idx, msg_sim_id_t SimMsgId); +#endif /** @@ -567,8 +569,11 @@ typedef msg_error_t (*MsgPlgDeleteSimMessage)(msg_sim_id_t SimMsgId); * */ /*================================================================================================*/ +#ifdef FEATURE_SMS_CDMA typedef msg_error_t (*MsgPlgSetReadStatus)(msg_sim_id_t SimMsgId); - +#else +typedef msg_error_t (*MsgPlgSetReadStatus)(msg_sim_slot_id_t sim_idx, msg_sim_id_t SimMsgId); +#endif /** @@ -608,8 +613,11 @@ typedef msg_error_t (*MsgPlgSetReadStatus)(msg_sim_id_t SimMsgId); * */ /*================================================================================================*/ +#ifdef FEATURE_SMS_CDMA typedef msg_error_t (*MsgPlgSetMemoryStatus)(msg_error_t Error); - +#else +typedef msg_error_t (*MsgPlgSetMemoryStatus)(msg_sim_slot_id_t sim_idx, msg_error_t Error); +#endif // Setting API /** @@ -893,7 +901,6 @@ typedef msg_error_t (*MsgPlgUpdateMessage)(MSG_MESSAGE_INFO_S *pMsgInfo, MSG_SEN * * \param output - pMsg is information of MMS message. * \param output - pSendOptInfo is information of sending options. -* \param output - pMmsMsg is information of MMS messages detail data. * \param output - pDestMsg is file path of MMS message. * * \return Return Type (int(msg_error_t)) \n @@ -911,7 +918,7 @@ typedef msg_error_t (*MsgPlgUpdateMessage)(MSG_MESSAGE_INFO_S *pMsgInfo, MSG_SEN * */ /*================================================================================================*/ -typedef msg_error_t (*MsgPlgGetMmsMessage)(MSG_MESSAGE_INFO_S* pMsg, MSG_SENDINGOPT_INFO_S* pSendOptInfo, MMS_MESSAGE_DATA_S* pMmsMsg, char** pDestMsg); +typedef msg_error_t (*MsgPlgGetMmsMessage)(MSG_MESSAGE_INFO_S* pMsg, MSG_SENDINGOPT_INFO_S* pSendOptInfo, char** pDestMsg); /** @@ -1037,6 +1044,10 @@ typedef msg_error_t (*MsgPlgComposeReadReport)(MSG_MESSAGE_INFO_S *pMsgInfo); /*================================================================================================*/ typedef msg_error_t (*MsgPlgRestoreMsg)(MSG_MESSAGE_INFO_S *pMsg, char* pRcvdBody, int rcvdBodyLen, char* filePath); +typedef msg_error_t (*MsgPlgGetMeImei) (char *pImei); + +typedef msg_error_t (*MsgPlgGetDefaultNetworkSimId) (int *simId); + // framework defined callbacks. typedef void (*MsgPlgOnSentStatus)(MSG_SENT_STATUS_S *pSentStatus); @@ -1046,24 +1057,35 @@ typedef msg_error_t (*MsgPlgOnInitSimBySat)(void); typedef msg_error_t (*MsgPlgOnSyncMLMsgIncoming)(MSG_SYNCML_MESSAGE_DATA_S *pSyncMLData); typedef msg_error_t (*MsgPlgOnLBSMsgIncoming)(MSG_LBS_MESSAGE_DATA_S *pLBSData); typedef msg_error_t (*MsgPlgOnPushMsgIncoming)(MSG_PUSH_MESSAGE_DATA_S *pPushData); -typedef msg_error_t (*MsgPlgOnCBMsgIncoming)(MSG_CB_MSG_S *pCbMsg); +typedef msg_error_t (*MsgPlgOnCBMsgIncoming)(MSG_CB_MSG_S *pCbMsg, MSG_MESSAGE_INFO_S *pMsgInfo); typedef msg_error_t (*MsgPlgOnMmsConfIncoming)(MSG_MESSAGE_INFO_S *pMsgInfo, msg_request_id_t *pRequest); - +typedef msg_error_t (*MsgPlgOnSimMessageIncoming)(MSG_MESSAGE_INFO_S *pMsgInfo, int *simIdList, msg_message_id_t *retMsgId, int listSize); +typedef msg_error_t (*MsgPlgOnResendMessage)(void); +#ifdef FEATURE_SMS_CDMA +typedef bool (*MsgPlgCheckUniqueness)(MSG_UNIQUE_INDEX_S *p_msg, msg_message_id_t msgId, bool ischecked); +#endif +typedef msg_error_t (*MsgPlgOnInitImsi)(int sim_idx); /*================================================================================================== STRUCTURES ==================================================================================================*/ struct _MSG_PLUGIN_LISTENER_S { - MsgPlgOnSentStatus pfSentStatusCb; /** The function pointer of sent status callback. */ - MsgPlgOnStorageChange pfStorageChangeCb; /** The function pointer of storage change callback. */ - MsgPlgOnMsgIncoming pfMsgIncomingCb; /** The function pointer of receive message callback. */ - MsgPlgOnInitSimBySat pfInitSimBySatCb; /** The function pointer of init SIM callback. */ + MsgPlgOnSentStatus pfSentStatusCb; /** The function pointer of sent status callback. */ + MsgPlgOnStorageChange pfStorageChangeCb; /** The function pointer of storage change callback. */ + MsgPlgOnMsgIncoming pfMsgIncomingCb; /** The function pointer of receive message callback. */ + MsgPlgOnInitSimBySat pfInitSimBySatCb; /** The function pointer of init SIM callback. */ MsgPlgOnSyncMLMsgIncoming pfSyncMLMsgIncomingCb; /** The function pointer of receive syncML message callback. */ - MsgPlgOnLBSMsgIncoming pfLBSMsgIncomingCb; /** The function pointer of receive LBS message callback. */ + MsgPlgOnLBSMsgIncoming pfLBSMsgIncomingCb; /** The function pointer of receive LBS message callback. */ MsgPlgOnPushMsgIncoming pfPushMsgIncomingCb; /** The function pointer of receive Push message callback. */ - MsgPlgOnCBMsgIncoming pfCBMsgIncomingCb; /** The function pointer of receive cb message callback. */ - MsgPlgOnMmsConfIncoming pfMmsConfIncomingCb; /** The function pointer of receive MMS conf */ + MsgPlgOnCBMsgIncoming pfCBMsgIncomingCb; /** The function pointer of receive cb message callback. */ + MsgPlgOnMmsConfIncoming pfMmsConfIncomingCb; /** The function pointer of receive MMS conf */ + MsgPlgOnSimMessageIncoming pfSimMsgIncomingCb; /** The function pointer of sim message callback */ + MsgPlgOnResendMessage pfResendMessageCb; +#ifdef FEATURE_SMS_CDMA + MsgPlgCheckUniqueness pfCheckUniquenessCb; +#endif + MsgPlgOnInitImsi pfSimInitImsiCb; }; @@ -1072,15 +1094,11 @@ struct _MSG_PLUGIN_HANDLER_S MsgPlgInitialize pfInitialize; /**< The function pointer of initialize. */ MsgPlgFinalize pfFinalize; /**< The function pointer of finalize. */ MsgPlgRegisterListener pfRegisterListener; /**< The function pointer of register listener. */ - MsgPlgCheckSimStatus pfCheckSimStatus; /**< The function pointer of check SIM status. */ - MsgPlgCheckDeviceStatus pfCheckDeviceStatus; /**< The function pointer of check device status. */ MsgPlgSubmitRequest pfSubmitRequest; /**< The function pointer of submit request. */ - MsgPlgInitSimMessage pfInitSimMessage; /**< The function pointer of initialize SIM msg. */ MsgPlgSaveSimMessage pfSaveSimMessage; /**< The function pointer of save SIM msg. */ MsgPlgDeleteSimMessage pfDeleteSimMessage; /**< The function pointer of delete SIM msg. */ MsgPlgSetReadStatus pfSetReadStatus; /**< The function pointer of set read status. */ MsgPlgSetMemoryStatus pfSetMemoryStatus; /**< The function pointer of set memory status. */ - MsgPlgInitConfigData pfInitConfigData; /**< The function pointer of initialize of setting. */ MsgPlgSetConfigData pfSetConfigData; /**< The function pointer of save setting. */ MsgPlgGetConfigData pfGetConfigData; /**< The function pointer of get setting. */ MsgPlgRestoreMsg pfRestoreMsg; @@ -1090,6 +1108,7 @@ struct _MSG_PLUGIN_HANDLER_S MsgPlgGetMmsMessage pfGetMmsMessage; MsgPlgUpdateRejectStatus pfUpdateRejectStatus; MsgPlgComposeReadReport pfComposeReadReport; + MsgPlgGetDefaultNetworkSimId pfGetDefaultNetworkSimId; }; #ifdef __cplusplus diff --git a/include/common/MsgQueue.h b/include/common/MsgQueue.h index 3ca740a..69cb8f2 100755 --- a/include/common/MsgQueue.h +++ b/include/common/MsgQueue.h @@ -1,33 +1,31 @@ /* - * msg-service - * - * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved + * Copyright (c) 2014 Samsung Electronics Co., Ltd. All rights reserved * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * 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. - * */ #ifndef __MsgThdSafeQ_H__ #define __MsgThdSafeQ_H__ -#include <queue> #include "MsgMutex.h" #include <list> -template <typename T> class MsgThdSafeQ + +template <typename T> +class MsgSimpleQ { public: - MsgThdSafeQ(){}; + MsgSimpleQ(){}; void pop_front (); bool front(T* qItem); void push_front(T const & input); @@ -36,28 +34,22 @@ public: bool empty(); void clear(); bool checkExist(T const & qItem, bool(cmp)(T const &, T const &)); + void remove(T const & qItem, bool(cmp)(T const &, T const &) ); private: - Mutex mx; std::list <T> q; }; -/* - mx variable guarantees atomic operation in multi-threaded environment. - For example, when a thread is executing Pop(), other threads - trying to execute one of Pop, Push, Size, Empty are locked. -*/ - -template <typename T> void MsgThdSafeQ<T>::pop_front() +template <typename T> +void MsgSimpleQ<T>::pop_front() { - MutexLocker lock(mx); if( q.empty() ) return; q.pop_front(); } -template <typename T> bool MsgThdSafeQ<T>::front(T* qItem) +template <typename T> +bool MsgSimpleQ<T>::front(T* qItem) { - MutexLocker lock(mx); if( qItem == NULL || q.empty() ) return false; // Fail @@ -67,41 +59,40 @@ template <typename T> bool MsgThdSafeQ<T>::front(T* qItem) } -template <typename T> void MsgThdSafeQ<T>::push_back(T const & qItem) +template <typename T> +void MsgSimpleQ<T>::push_back(T const & qItem) { - MutexLocker lock(mx); q.push_back(qItem); } -template <typename T> void MsgThdSafeQ<T>::push_front(T const & qItem) +template <typename T> void +MsgSimpleQ<T>::push_front(T const & qItem) { - MutexLocker lock(mx); q.push_front(qItem); } -template <typename T> int MsgThdSafeQ<T>::size() +template <typename T> +int MsgSimpleQ<T>::size() { - MutexLocker lock(mx); return q.size(); } -template <typename T> bool MsgThdSafeQ<T>::empty() +template <typename T> +bool MsgSimpleQ<T>::empty() { - MutexLocker lock(mx); return q.empty(); } -template <typename T> void MsgThdSafeQ<T>::clear() +template <typename T> +void MsgSimpleQ<T>::clear() { - MutexLocker lock(mx); q.clear(); } -template <typename T> bool MsgThdSafeQ<T>::checkExist(T const & qItem, bool(cmp)(T const &, T const &)) +template <typename T> +bool MsgSimpleQ<T>::checkExist(T const & qItem, bool(cmp)(T const &, T const &)) { - MutexLocker lock(mx); - for(typename list<T>::iterator iterPos = q.begin(); iterPos != q.end(); ++iterPos) { if (cmp(qItem, *iterPos) == true) @@ -111,5 +102,16 @@ template <typename T> bool MsgThdSafeQ<T>::checkExist(T const & qItem, bool(cmp) return false; } +template <typename T> +void MsgSimpleQ<T>::remove(T const & qItem, bool(cmp)(T const &, T const &)) +{ + for(typename list<T>::iterator iterPos = q.begin(); iterPos != q.end(); ) { + + if (cmp(qItem, *iterPos) == true) + q.erase(iterPos++); + else + ++iterPos; + } +} #endif // __MsgThdSafeQ_H__ diff --git a/include/common/MsgSettingTypes.h b/include/common/MsgSettingTypes.h index 8b36ca0..733096d 100755 --- a/include/common/MsgSettingTypes.h +++ b/include/common/MsgSettingTypes.h @@ -1,20 +1,17 @@ /* - * msg-service - * - * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved + * Copyright (c) 2014 Samsung Electronics Co., Ltd. All rights reserved * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * 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. - * */ #ifndef MSG_SETTING_TYPES_H @@ -37,6 +34,7 @@ INCLUDE FILES ==================================================================================================*/ #include "MsgTypes.h" +#include "MsgStorageTypes.h" /** * @ingroup MESSAGING_FRAMEWORK @@ -182,11 +180,18 @@ typedef unsigned char MSG_CB_LANGUAGE_TYPE_T; /** * @brief Represents the SIM status from telephony. \n - * The values for this type SHOULD be in \ref _MSG_SIM_STATUS_E. + * The values for this type SHOULD be in _MSG_SIM_STATUS_E. */ typedef unsigned char MSG_SIM_STATUS_T; +/** + * @brief Represents the ringtone type of message. \n + * The values for this type SHOULD be in _MSG_RINGTONE_TYPE_E. + */ +typedef int MSG_RINGTONE_TYPE_T; + + /*================================================================================================== STRUCTURES ==================================================================================================*/ @@ -213,25 +218,32 @@ typedef struct MSG_SMSC_ADDRESS_S smscAddr; /**< SMSC address structure */ } MSG_SMSC_DATA_S; + /** * @brief Represents an SMSC list. */ typedef struct { - int selected; /**< Selected SMSC index */ + int index; /**< SMSC index for Updating information */ + int selected; /**< Selected SMSC index */ int totalCnt; /**< The count of total SMSC addresses */ - MSG_SMSC_DATA_S smscData[SMSC_LIST_MAX]; /**< SMSC data information list*/ + MSG_SMSC_DATA_S smscData[SMSC_LIST_MAX]; /**< SMSC data information list*/ + msg_sim_slot_id_t simIndex; }MSG_SMSC_LIST_S; + /** * @brief Represents an SMSC list. */ typedef struct { + int index; /**< SMSC index for Updating information */ int selected; /**< Selected SMSC index */ - msg_struct_list_s *smsc_list; /**< SMSC data information list*/ + msg_struct_list_s *smsc_list; /**< SMSC data information list*/ + msg_sim_slot_id_t simIndex; }MSG_SMSC_LIST_HIDDEN_S; + /** * @brief Represents the information of a cell broadcasting channel. */ @@ -240,6 +252,8 @@ typedef struct bool bActivate; /**< Indicates whether the CB channel is activate or passive. */ unsigned int from; /**< Indicates the start ID of a CB channel range. */ unsigned int to; /**< Indicates the end ID of a CB channel range. */ + unsigned short ctg; /**< Indicates the category of a CB. (for 3gpp2)*/ + unsigned short lang; /**< Indicates the language of a CB. (for 3gpp2)*/ char name[CB_CHANNEL_NAME_MAX+1]; /**< Indicates the name of a CB channel. */ } MSG_CB_CHANNEL_INFO_S; @@ -253,14 +267,24 @@ typedef struct MSG_CB_CHANNEL_INFO_S channelInfo[CB_CHANNEL_MAX]; /**< The structure of CB channel information */ } MSG_CB_CHANNEL_S; + /** * @brief Represents an general option. */ typedef struct { - bool bKeepCopy; /**< Indicates whether the SMS message copy is kept or not. */ - MSG_ALERT_TONE_T alertTone; /**< Indicates the period of playing alert tone. */ - bool bAutoErase; /**< Indicates whether the auto-erase option is enabled or not. */ + bool bKeepCopy; /**< Indicates whether the SMS message copy is kept or not. */ + MSG_ALERT_TONE_T alertTone; /**< Indicates the period of playing alert tone. */ + bool bAutoErase; /**< Indicates whether the auto-erase option is enabled or not. */ + bool bBlockUnknownMsg; /**< Indicates whether unknown sender message is blocked or not. */ + int smsLimitCnt; /**< Indicates the count limitation of sms messages in one conversation */ + int mmsLimitCnt; /**< Indicates the count limitation of sms messages in one conversation */ + bool bNotification; /**< Indicates whether notification for incoming message is shown or not. */ + bool bVibration; /**< Indicates whether vibration for incoming message is run or not. */ + bool bPreview; /**< Indicates whether preview for incoming message is shown or not. */ + char ringtonePath[MSG_FILEPATH_LEN_MAX+1]; /**< Indicates the message ringtone path */ + int ringtoneType; /**< Indicates the message ringtone type. */ + int searchTags; /**< Indicates the tags to be enabled for search ex) MSG_MESSAGE_TAG_PRIMARY | MSG_MESSAGE_TAG_PROMOTION. See enum _MSG_TAG_TYPE_E */ }MSG_GENERAL_OPT_S; @@ -359,6 +383,7 @@ typedef struct int maxSimCnt; /**< Indicates the number of channels which can be stored in SIM. */ MSG_CB_CHANNEL_S channelData; /**< Indicates the cell broadcasting channel information. */ bool bLanguage[CB_LANG_TYPE_MAX]; /**< Indicates whether the language name of a cell broadcasting message is set or not. */ + msg_sim_slot_id_t simIndex; } MSG_CBMSG_OPT_S; typedef struct @@ -367,14 +392,19 @@ typedef struct int maxSimCnt; /**< Indicates the number of channels which can be stored in SIM. */ msg_struct_list_s *channelData; /**< Indicates the cell broadcasting channel information. */ bool bLanguage[CB_LANG_TYPE_MAX]; /**< Indicates whether the language name of a cell broadcasting message is set or not. */ + msg_sim_slot_id_t simIndex; } MSG_CBMSG_OPT_HIDDEN_S; + /** * @brief Represents a voice mail number option. */ typedef struct { char mailNumber[MAX_PHONE_NUMBER_LEN+1]; + char alpahId[MAX_SIM_XDN_ALPHA_ID_LEN+1]; + msg_sim_slot_id_t simIndex; + int voiceCnt; } MSG_VOICEMAIL_OPT_S; diff --git a/include/common/MsgStorageTypes.h b/include/common/MsgStorageTypes.h index d8e02cf..ca6c3d0 100755 --- a/include/common/MsgStorageTypes.h +++ b/include/common/MsgStorageTypes.h @@ -1,20 +1,17 @@ /* - * msg-service - * - * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved + * Copyright (c) 2014 Samsung Electronics Co., Ltd. All rights reserved * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * 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. - * */ #ifndef MSG_STORAGE_TYPES_H @@ -94,10 +91,15 @@ typedef struct typedef struct { msg_contact_id_t contactId; /**< Indicates the unique contact ID. */ - char firstName[MAX_DISPLAY_NAME_LEN+1]; /**< Indicates the first name of contact. */ - char lastName[MAX_DISPLAY_NAME_LEN+1]; /**< Indicates the last name of contact. */ - char displayName[MAX_DISPLAY_NAME_LEN+1]; /**< Indicates the display name of contact. */ - char imagePath[MAX_IMAGE_PATH_LEN+1]; /**< Indicates the image path of contact. */ + int addrbookId; /**< Indicates the address book ID. */ + char firstName[MAX_DISPLAY_NAME_LEN+1]; /**< Indicates the first name of contact. */ + char lastName[MAX_DISPLAY_NAME_LEN+1]; /**< Indicates the last name of contact. */ + char middleName[MAX_DISPLAY_NAME_LEN+1]; /**< Indicates the middle name of contact. */ + char prefix[MAX_DISPLAY_NAME_LEN+1]; /**< Indicates the prefix of contact. */ + char suffix[MAX_DISPLAY_NAME_LEN+1]; /**< Indicates the suffix of contact. */ + char imagePath[MAX_IMAGE_PATH_LEN+1]; /**< Indicates the image path of contact. */ + char alerttonePath[MSG_FILEPATH_LEN_MAX+1]; /**< Indicates the message alert tone path of contact. */ + char vibrationPath[MSG_FILEPATH_LEN_MAX+1]; /**< Indicates the vibration path of contact. */ } MSG_CONTACT_INFO_S; @@ -108,7 +110,7 @@ typedef struct */ typedef struct { - msg_sort_type_t sortType; /**< Indicates the sort type */ + msg_sort_type_t sortType; /**< Indicates the sort type, See enum _MSG_SORT_TYPE_E */ bool bAscending; /**< Indicates the sort order which is ascending or descending */ }MSG_SORT_RULE_S; @@ -146,6 +148,29 @@ typedef struct } MSG_SEARCH_CONDITION_S; +/** + * @brief Represents Message list condition values. + */ +typedef struct +{ + msg_folder_id_t folderId; + msg_thread_id_t threadId; + msg_storage_id_t storageId; + msg_message_type_t msgType; + bool bProtected; + bool bScheduled; + char *pAddressVal; + char *pTextVal; + bool bAnd; + time_t fromTime; + time_t toTime; + int offset; + int limit; + msg_struct_t sortRule; + int simIndex; +} MSG_LIST_CONDITION_S; + + typedef struct { int appcode; diff --git a/include/common/MsgThread.h b/include/common/MsgThread.h index d3312c7..c3c5ed6 100755 --- a/include/common/MsgThread.h +++ b/include/common/MsgThread.h @@ -1,20 +1,17 @@ /* - * msg-service - * - * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved + * Copyright (c) 2014 Samsung Electronics Co., Ltd. All rights reserved * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * 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. - * */ #ifndef __MSG_THREAD_H__ diff --git a/include/common/MsgTransportTypes.h b/include/common/MsgTransportTypes.h index e6f6dcc..e4cf048 100755 --- a/include/common/MsgTransportTypes.h +++ b/include/common/MsgTransportTypes.h @@ -1,20 +1,17 @@ /* - * msg-service - * - * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved + * Copyright (c) 2014 Samsung Electronics Co., Ltd. All rights reserved * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * 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. - * */ #ifndef MSG_TRANSPORT_TYPES_H diff --git a/include/common/MsgTypes.h b/include/common/MsgTypes.h index f43bc4f..ae49fde 100755 --- a/include/common/MsgTypes.h +++ b/include/common/MsgTypes.h @@ -1,20 +1,17 @@ /* - * msg-service - * - * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved + * Copyright (c) 2014 Samsung Electronics Co., Ltd. All rights reserved * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * 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. - * */ #ifndef MSG_TYPES_H @@ -58,6 +55,17 @@ */ #define MMS_V1_2 // MMS Version : MMS_V1_0 / MMS_V1_1 / MMS_V1_2 + +/** + * @brief Defines the notification method + */ +#define MSG_NOTI_INTEGRATION + +/** + * @brief Defines the enabled drm + */ +#define MSG_DRM_SUPPORT (0) + /** * @brief Defines message struct handle. */ @@ -278,6 +286,7 @@ typedef struct char pushBody[MAX_WAPPUSH_CONTENTS_LEN + 1]; int wspHeaderLen; char wspHeader[MAX_WAPPUSH_CONTENTS_LEN + 1]; + int simIndex; }MSG_SYNCML_MESSAGE_DATA_S; @@ -321,6 +330,15 @@ typedef struct bool bLaunch; }MSG_PUSH_EVENT_INFO_S; + +typedef struct +{ + msg_message_id_t msg_id; + char mime_type[MAX_MIME_TYPE_LEN+1]; + char media_item[MSG_FILEPATH_LEN_MAX+1]; + char thumb_path[MSG_FILEPATH_LEN_MAX+1]; +} MSG_MEDIA_INFO_S; + /** * @} */ diff --git a/include/framework/MsgCmdHandler.h b/include/framework/MsgCmdHandler.h index b601a70..8add308 100755 --- a/include/framework/MsgCmdHandler.h +++ b/include/framework/MsgCmdHandler.h @@ -1,20 +1,17 @@ /* - * msg-service - * - * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved + * Copyright (c) 2014 Samsung Electronics Co., Ltd. All rights reserved * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * 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. - * */ #ifndef MSG_CMD_HANDLER_H @@ -85,6 +82,7 @@ int MsgRegIncomingLBSMsgCallbackHandler(const MSG_CMD_S *pCmd, char **ppEvent); int MsgRegSyncMLMsgOperationCallbackHandler(const MSG_CMD_S *pCmd, char **ppEvent); int MsgRegStorageChangeCallbackHandler(const MSG_CMD_S *pCmd, char **ppEvent); int MsgStorageChangeHandler(const MSG_CMD_S *pCmd, char **ppEvent); +int MsgRegIncomingReportMsgCallbackHandler(const MSG_CMD_S *pCmd, char **ppEvent); int MsgSentStatusHandler(const MSG_CMD_S *pCmd, char **ppEvent); int MsgIncomingMsgHandler(const MSG_CMD_S *pCmd, char **ppEvent); @@ -107,7 +105,13 @@ int MsgAddPushEventHandler(const MSG_CMD_S *pCmd, char **ppEvent); int MsgDeletePushEventHandler(const MSG_CMD_S *pCmd, char **ppEvent); int MsgUpdatePushEventHandler(const MSG_CMD_S *pCmd, char **ppEvent); -int MsgContactSyncEventHandler(const MSG_CMD_S *pCmd, char **ppEvent); - - +int MsgAddSimMessageHandler(const MSG_CMD_S *pCmd, char **ppEvent); +int MsgResendMessageHandler(const MSG_CMD_S *pCmd, char **ppEvent); +int MsgUpdateIMSIHandler(const MSG_CMD_S *pCmd, char **ppEvent); +#ifdef MSG_PENDING_PUSH_MESSAGE +int MsgSendPendingPushMsgHandler(const MSG_CMD_S *pCmd, char **ppEvent); +#endif +#ifdef FEATURE_SMS_CDMA +int MsgCheckUniquenessHandler(const MSG_CMD_S *pCmd, char **ppEvent); +#endif #endif // MSG_CMD_HANDLER_H diff --git a/include/framework/MsgDeliverHandler.h b/include/framework/MsgDeliverHandler.h index 772b809..c8f3cb8 100755 --- a/include/framework/MsgDeliverHandler.h +++ b/include/framework/MsgDeliverHandler.h @@ -1,20 +1,17 @@ /* - * msg-service - * - * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved + * Copyright (c) 2014 Samsung Electronics Co., Ltd. All rights reserved * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * 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. - * */ #ifndef MSG_DELIVER_HANDLER_H diff --git a/include/framework/MsgPluginConfig.h b/include/framework/MsgPluginConfig.h deleted file mode 100755 index 928c2fb..0000000 --- a/include/framework/MsgPluginConfig.h +++ /dev/null @@ -1,96 +0,0 @@ -/* - * msg-service - * - * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * 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. - * -*/ -#ifndef MSG_PLUGIN_CONFIG_H -#define MSG_PLUGIN_CONFIG_H - - -/*================================================================================================== - INCLUDE FILES -==================================================================================================*/ -#include <map> -#include <list> -#include <stdio.h> -#include <string.h> -#include "MsgDebug.h" -#include "MsgTypes.h" -#include "MsgCppTypes.h" - -class MsgPlgToken -{ - int tokenType; // not defined 0, title: 1, msgtype: 2, libpath: 3 - char tokenVal[256]; // null-terminated char array - -public: - MsgPlgToken(char* pstr=NULL) : tokenType(TOK_UNDEFINED) - { - if(pstr) - { - tokenize(pstr); - } - else - { - bzero(tokenVal, 256); - } - } - - MsgPlgToken& operator = (const MsgPlgToken& rhs) - { - if (this != &rhs) - { - tokenType = rhs.tokenType; - strncpy(tokenVal, rhs.tokenVal, 255); - } - - return *this; - } - - int getType() const { return tokenType; } // not defined 0, title: 1, msgtype: 2, libpath: 3 - const char* getVal(void) const { return tokenVal; } - void getVal(CharVector& vec) const { vec.assign(tokenVal, tokenVal+strlen(tokenVal));} - int tokenize(char* pStr); - - enum { TOK_UNDEFINED=0, TOK_PLG_TITLE, TOK_PLG_TYPE, TOK_PLG_PATH }; - - void reset() { tokenType = TOK_UNDEFINED; } - operator void*() const { - return (tokenType==TOK_UNDEFINED)? NULL:(void*) this; - } -}; - -typedef std::vector<MsgPlgToken> MsgPlgTokenVec; -typedef std::map<CharVector, MsgPlgTokenVec> MsgConfigMap; - -class MsgPlgConfig -{ - MsgConfigMap configMap; - void insert(const MsgPlgToken& tokTitle, const MsgPlgToken& tokMsgType, const MsgPlgToken& tokLibPath); - -public: - MsgPlgConfig(FILE* fp); - - /* access method for tokens */ - const CharVector& title(unsigned int pos);// const; // iteration with ith position i=0, .. , itemCount-1 - inline int titleCount() const { return configMap.size(); } - - void token(const CharVector& key, unsigned int pos, MsgPlgToken& retTok);// const; - void token(int i, unsigned int pos, MsgPlgToken& retTok);// const; - int tokenCount(const CharVector& key) { return configMap[key].size(); } // const leads to error why? -}; - -#endif // MSG_PLUGIN_CONFIG_H diff --git a/include/framework/MsgPluginManager.h b/include/framework/MsgPluginManager.h index 140163e..9d49a33 100755 --- a/include/framework/MsgPluginManager.h +++ b/include/framework/MsgPluginManager.h @@ -1,21 +1,19 @@ /* - * msg-service - * - * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved + * Copyright (c) 2014 Samsung Electronics Co., Ltd. All rights reserved * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * 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. - * */ + #ifndef MSG_PLUGIN_MANAGER_H #define MSG_PLUGIN_MANAGER_H @@ -26,14 +24,11 @@ #include "MsgTypes.h" #include "MsgPluginInterface.h" -#include "MsgPluginConfig.h" - +#include "MsgCppTypes.h" /*================================================================================================== DEFINES ==================================================================================================*/ -#define MSG_PLUGIN_CFG_PATH "/usr/share/msg-service/" -#define MSG_PLUGIN_CFG_NAME "plugin.cfg" /*================================================================================================== @@ -50,24 +45,27 @@ public: msg_error_t submitReq(MSG_REQUEST_INFO_S *pReqInfo); msg_error_t registerListener(MSG_PLUGIN_LISTENER_S *pListener); - msg_error_t checkSimStatus(MSG_SIM_STATUS_T *pStatus); - msg_error_t checkDeviceStatus(); - msg_error_t initSimMessage(); msg_error_t saveSimMessage(MSG_MESSAGE_INFO_S *pMsgInfo, SMS_SIM_ID_LIST_S *pSimIdList); +#ifndef FEATURE_SMS_CDMA + msg_error_t deleteSimMessage(msg_sim_slot_id_t sim_idx, msg_sim_id_t SimMsgId); + msg_error_t setReadStatus(msg_sim_slot_id_t sim_idx, msg_sim_id_t SimMsgId); + msg_error_t setMemoryStatus(msg_sim_slot_id_t sim_idx, msg_error_t Error); +#else msg_error_t deleteSimMessage(msg_sim_id_t SimMsgId); msg_error_t setReadStatus(msg_sim_id_t SimMsgId); msg_error_t setMemoryStatus(msg_error_t Error); - - msg_error_t initConfigData(MSG_SIM_STATUS_T SimStatus); +#endif msg_error_t setConfigData(const MSG_SETTING_S *pSetting); msg_error_t getConfigData(MSG_SETTING_S *pSetting); + msg_error_t getDefaultNetworkSimId(int *simId); + // MMS handlers msg_error_t addMessage(MSG_MESSAGE_INFO_S *pMsgInfo, MSG_SENDINGOPT_INFO_S *pSendOptInfo, char *pFileData); msg_error_t updateMessage(MSG_MESSAGE_INFO_S *pMsgInfo, MSG_SENDINGOPT_INFO_S *pSendOptInfo, char *pFileData); msg_error_t processReceivedInd(MSG_MESSAGE_INFO_S *pMsgInfo, MSG_REQUEST_INFO_S *pRequest, bool *bReject); - msg_error_t getMmsMessage(MSG_MESSAGE_INFO_S *pMsg, MSG_SENDINGOPT_INFO_S *pSendOptInfo, MMS_MESSAGE_DATA_S *pMmsMsg, char **pDestMsg); + msg_error_t getMmsMessage(MSG_MESSAGE_INFO_S *pMsg, MSG_SENDINGOPT_INFO_S *pSendOptInfo, char **pDestMsg); msg_error_t updateRejectStatus(MSG_MESSAGE_INFO_S *pMsgInfo); msg_error_t composeReadReport(MSG_MESSAGE_INFO_S *pMsgInfo); @@ -90,6 +88,16 @@ private: ==================================================================================================*/ typedef std::map<MSG_MAIN_TYPE_T, MsgPlugin*> MsgPluginMap; +typedef struct { + MSG_MAIN_TYPE_T type; + const char *path; +} MSG_PLG_TABLE_T; + +const static MSG_PLG_TABLE_T __msg_plg_items[] = { + { MSG_SMS_TYPE, "/usr/lib/libmsg_sms_plugin.so" }, + { MSG_MMS_TYPE, "/usr/lib/libmsg_mms_plugin.so" } +}; + /*================================================================================================== CLASS DEFINITIONS @@ -101,8 +109,8 @@ public: void initialize(); void finalize(); + MsgPlugin* checkPlugin(MSG_MAIN_TYPE_T mainType); MsgPlugin* getPlugin(MSG_MAIN_TYPE_T mainType); - void loadPlugins(const char* path); private: MsgPluginManager(); diff --git a/include/framework/MsgSettingHandler.h b/include/framework/MsgSettingHandler.h index 044d374..54ba7ba 100755 --- a/include/framework/MsgSettingHandler.h +++ b/include/framework/MsgSettingHandler.h @@ -1,20 +1,17 @@ /* - * msg-service - * - * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved + * Copyright (c) 2014 Samsung Electronics Co., Ltd. All rights reserved * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * 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. - * */ #ifndef MSG_SETTING_HANDLER_H @@ -30,8 +27,6 @@ /*================================================================================================== FUNCTION PROTOTYPES ==================================================================================================*/ -msg_error_t MsgInitSimConfig(MSG_SIM_STATUS_T SimStatus); - msg_error_t MsgSetConfigData(const MSG_SETTING_S *pSetting); msg_error_t MsgGetConfigData(MSG_SETTING_S *pSetting); @@ -55,10 +50,12 @@ void MsgGetMMSRecvOpt(MSG_SETTING_S *pSetting); void MsgGetMMSStyleOpt(MSG_SETTING_S *pSetting); void MsgGetPushMsgOpt(MSG_SETTING_S *pSetting); void MsgGetCBMsgOpt(MSG_SETTING_S *pSetting); + void MsgGetVoiceMailOpt(MSG_SETTING_S *pSetting); void MsgGetMsgSizeOpt(MSG_SETTING_S *pSetting); msg_error_t MsgSetConfigInSim(const MSG_SETTING_S *pSetting); +msg_error_t MsgGetConfigInSim(MSG_SETTING_S *pSetting); //void MsgSetDefaultConfig(); diff --git a/include/framework/MsgStorageHandler.h b/include/framework/MsgStorageHandler.h index 4d8ef3e..488935c 100755 --- a/include/framework/MsgStorageHandler.h +++ b/include/framework/MsgStorageHandler.h @@ -1,20 +1,17 @@ /* - * msg-service - * - * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved + * Copyright (c) 2014 Samsung Electronics Co., Ltd. All rights reserved * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * 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. - * */ #ifndef MSG_STORAGE_HANDLER_H @@ -54,12 +51,13 @@ msg_error_t MsgAddDefaultAddress(); msg_error_t MsgStoResetDatabase(); msg_error_t MsgStoBackupMessage(msg_message_backup_type_t type, const char *filepath); -msg_error_t MsgStoRestoreMessage(const char *filepath); +msg_error_t MsgStoRestoreMessage(const char *filepath, msg_id_list_s**result_id_list); msg_error_t MsgStoAddMessage(MSG_MESSAGE_INFO_S *pMsg, MSG_SENDINGOPT_INFO_S* pSendOptInfo); +msg_error_t MsgStoRestoreMessage(MSG_MESSAGE_INFO_S *pMsg, MSG_SENDINGOPT_INFO_S *pSendOptInfo); msg_error_t MsgStoUpdateMessage(MSG_MESSAGE_INFO_S *pMsg, MSG_SENDINGOPT_INFO_S* pSendOptInfo); msg_error_t MsgStoUpdateReadStatus(msg_message_id_t MsgId, bool bRead); -msg_error_t MsgStoUpdateThreadReadStatus(msg_thread_id_t ThreadId); +msg_error_t MsgStoUpdateThreadReadStatus(msg_thread_id_t ThreadId, msg_id_list_s *pMsgIdList); msg_error_t MsgStoUpdateProtectedStatus(msg_message_id_t MsgId, bool bProtected); msg_error_t MsgStoDeleteMessage(msg_message_id_t MsgId, bool bCheckIndication); msg_error_t MsgStoDeleteAllMessageInFolder(msg_folder_id_t FolderId, bool bOnlyDB, msg_id_list_s *pMsgIdList); @@ -69,26 +67,18 @@ msg_error_t MsgStoMoveMessageToStorage(const msg_message_id_t MsgId, const msg_s msg_error_t MsgStoCountMessage(msg_folder_id_t FolderId, MSG_COUNT_INFO_S *pCountInfo); msg_error_t MsgStoCountMsgByType(const MSG_MESSAGE_TYPE_S *pMsgType, int *pMsgCount); msg_error_t MsgStoGetMessage(msg_message_id_t MsgId, MSG_MESSAGE_INFO_S *pMsg, MSG_SENDINGOPT_INFO_S* pSendOptInfo); -msg_error_t MsgStoGetConversationViewItem(msg_message_id_t msgId, MSG_CONVERSATION_VIEW_S *pConv); -msg_error_t MsgStoGetFolderViewList(msg_folder_id_t FolderId, const MSG_SORT_RULE_S *pSortRule, msg_struct_list_s *pMsgFolderViewList); msg_error_t MsgStoAddSyncMLMessage(MSG_MESSAGE_INFO_S *pMsgInfo, int ExtId, int PinCode); msg_error_t MsgStoGetMsgType(msg_message_id_t msgId, MSG_MESSAGE_TYPE_S* pMsgType); msg_error_t MsgStoGetText(msg_message_id_t MsgId, char *pSubject, char *pMsgText); msg_error_t MsgStoGetQuickPanelData(msg_quickpanel_type_t Type, MSG_MESSAGE_INFO_S *pMsg); -msg_error_t MsgStoGetThreadViewList(const MSG_SORT_RULE_S *pSortRule, msg_struct_list_s *pThreadViewList); -msg_error_t MsgStoGetConversationViewList(msg_thread_id_t ThreadId, msg_struct_list_s *pConvViewList); msg_error_t MsgStoDeleteThreadMessageList(msg_thread_id_t ThreadId, bool bIncludeProtect, msg_id_list_s *pMsgIdList); msg_error_t MsgStoCountMsgByContact(const MSG_THREAD_LIST_INDEX_S *pAddrInfo, MSG_THREAD_COUNT_INFO_S *pThreadCountInfo); -msg_error_t MsgStoSearchMessage(const char *pSearchString, msg_struct_list_s *pThreadViewList); -msg_error_t MsgStoSearchMessage(const MSG_SEARCH_CONDITION_S *pSearchCon, int offset, int limit, msg_struct_list_s *pMsgList); -msg_error_t MsgStoGetRejectMsgList(const char *pNumber, msg_struct_list_s *pRejectMsgList); -msg_error_t MsgStoGetReportStatus(msg_message_id_t msgId, int *count, MSG_REPORT_STATUS_INFO_S **pReportStatus); +msg_error_t MsgStoGetSmsReportStatus(msg_message_id_t msgId, int *count, MSG_REPORT_STATUS_INFO_S **pReportStatus); +msg_error_t MsgStoGetMmsReportStatus(msg_message_id_t msgId, int *count, MSG_REPORT_STATUS_INFO_S **pReportStatus); msg_error_t MsgStoGetThreadIdByAddress(const MSG_MESSAGE_INFO_S *pMsg, msg_thread_id_t *pThreadId); msg_error_t MsgStoGetThreadUnreadCnt(msg_thread_id_t ThreadId, int *cnt); -msg_error_t MsgStoGetAddressList(const msg_thread_id_t threadId, msg_struct_list_s *pAddrList); msg_error_t MsgStoGetThreadInfo(msg_thread_id_t threadId, MSG_THREAD_VIEW_S *pThreadInfo); -msg_error_t MsgStoGetMessageList(msg_folder_id_t folderId, msg_thread_id_t threadId, msg_message_type_t msgType, msg_storage_id_t storageId, msg_struct_list_s *pMsgList); // Folder msg_error_t MsgStoAddFolder(const MSG_FOLDER_INFO_S *pFolderInfo); @@ -104,12 +94,10 @@ msg_error_t MsgStoGetFilterList(msg_struct_list_s *pFilterList); msg_error_t MsgStoSetFilterActivation(msg_filter_id_t filterId, bool bActive); // Sim Operation related Functions -msg_error_t MsgInitSimMessage(MSG_SIM_STATUS_T SimStatus); msg_error_t MsgStoClearSimMessageInDB(); // Internal Function -msg_error_t MsgMakeSortRule(const MSG_SORT_RULE_S *pSortRule, char *pSqlSort); -msg_error_t MsgStoGetSmsSendOpt(msg_message_id_t MsgId, MSG_SENDINGOPT_INFO_S* pSendOpt); +msg_error_t MsgStoGetSmsSendOpt(MSG_MESSAGE_INFO_S *pMsg, MSG_SENDINGOPT_INFO_S* pSendOpt); msg_error_t MsgStoGetMmsSendOpt(msg_message_id_t MsgId, MSG_SENDINGOPT_INFO_S* pSendOpt); // SyncML Msg @@ -119,7 +107,7 @@ bool MsgStoCheckSyncMLMsgInThread(msg_thread_id_t threadId); msg_error_t MsgStoUpdateMMSMessage(MSG_MESSAGE_INFO_S *pMsg); msg_error_t MsgStoGetContentLocation(MSG_MESSAGE_INFO_S* pMsgInfo); msg_error_t MsgStoSetReadReportSendStatus(msg_message_id_t msgId, int readReportSendStatus); - +msg_error_t MsgStoGetReadReportSendStatus(msg_message_id_t msgId, int *pReadReportSendStatus); /////////////////////////////////////////////////////////////////////////////////// // For MMS - will be removed @@ -132,12 +120,30 @@ msg_error_t MsgStoGetAddrInfo(msg_message_id_t MsgId, MSG_ADDRESS_INFO_S *pAddrI /////////////////////////////////////////////////////////////////////////////////// msg_error_t MsgStoResetNetworkStatus(); +#if 0 +msg_error_t MsgStoResetCBMessage(); +#endif msg_error_t MsgStoCleanAbnormalMmsData(); msg_error_t MsgStoCheckReadReportStatus(msg_message_id_t msgId); +msg_error_t MsgStoAutoDeleteConversation(msg_thread_id_t threadId, msg_id_list_s *msgIdList); msg_error_t MsgStoAddPushEvent(MSG_PUSH_EVENT_INFO_S* pPushEvent); msg_error_t MsgStoDeletePushEvent(MSG_PUSH_EVENT_INFO_S* pPushEvent); msg_error_t MsgStoUpdatePushEvent(MSG_PUSH_EVENT_INFO_S* pSrc, MSG_PUSH_EVENT_INFO_S* pDst); +msg_message_id_t MsgStoAddSimMessage(MSG_MESSAGE_INFO_S *pMsg, int *simIdList, int listSize); +msg_error_t MsgStoGetFailedMessage(int **failed_msg_list, int *count); + +msg_error_t MsgStoGetReplaceMsgId(MSG_MESSAGE_INFO_S *pMsgInfo); +msg_error_t MsgStoAddWAPMsg(MSG_MESSAGE_INFO_S *pMsgInfo); +msg_error_t MsgStoAddCOWAPMsg(MSG_MESSAGE_INFO_S *pMsgInfo); +msg_error_t MsgStoAddCBMsg(MSG_MESSAGE_INFO_S *pMsgInfo); +msg_error_t MsgStoCheckPushMsgValidation(MSG_PUSH_MESSAGE_S *pPushMsg, bool *pbProceed); +msg_error_t MsgStoUpdateAllAddress(); +#ifdef FEATURE_SMS_CDMA +msg_error_t MsgCheckUniqueness(bool bInsert, msg_message_id_t msgId, MSG_UNIQUE_INDEX_S *p_msg); +#endif +msg_error_t MsgStoUpdateIMSI(int sim_idx); + #endif // MSG_STORAGE_HANDLER_H diff --git a/include/framework/MsgSubmitHandler.h b/include/framework/MsgSubmitHandler.h index 7914933..d3d9591 100755 --- a/include/framework/MsgSubmitHandler.h +++ b/include/framework/MsgSubmitHandler.h @@ -1,20 +1,17 @@ /* - * msg-service - * - * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved + * Copyright (c) 2014 Samsung Electronics Co., Ltd. All rights reserved * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * 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. - * */ #ifndef MSG_SUBMIT_HANDLER_H diff --git a/include/framework/MsgTransManager.h b/include/framework/MsgTransManager.h index 153d393..f9eeb94 100755 --- a/include/framework/MsgTransManager.h +++ b/include/framework/MsgTransManager.h @@ -1,20 +1,17 @@ /* - * msg-service - * - * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved + * Copyright (c) 2014 Samsung Electronics Co., Ltd. All rights reserved * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * 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. - * */ #ifndef MSG_TRANSACTION_MANAGER_H @@ -28,6 +25,7 @@ #include <map> #include "MsgMutex.h" +#include "MsgQueue.h" #include "MsgIpcSocket.h" #include "MsgCmdTypes.h" #include "MsgInternalTypes.h" @@ -35,11 +33,15 @@ + /*================================================================================================== DEFINITION ==================================================================================================*/ typedef std::map<MSG_CMD_TYPE_T, int (*)(const MSG_CMD_S*, char**)> handler_map; typedef std::map<int, MSG_PROXY_INFO_S> sentmsg_map; +#ifdef MSG_PENDING_PUSH_MESSAGE +typedef std::list<MSG_PUSH_MESSAGE_DATA_S> pushpending_list; +#endif typedef std::map<int, bool> fd_map; typedef std::list<MSG_CMD_REG_INCOMING_MSG_CB_S> newmsg_list; typedef std::list<MSG_CMD_REG_INCOMING_MMS_CONF_MSG_CB_S> mmsconf_list; @@ -52,11 +54,6 @@ typedef std::list<MSG_CMD_REG_SYNCML_MSG_OPERATION_CB_S> syncmlop_list; /*================================================================================================== - FUNCTION PROTOTYPES -==================================================================================================*/ -void MsgContactChangedCallback(); - -/*================================================================================================== CLASS DEFINITIONS ==================================================================================================*/ class MsgTransactionManager @@ -65,6 +62,7 @@ public: static MsgTransactionManager* instance(); void run(); + void workerEventQueue(); void write(int fd, const char* buf, int len); // methods for sent status event @@ -82,6 +80,10 @@ public: void setJavaMMSList(MSG_CMD_REG_INCOMING_JAVAMMS_TRID_S *pTrId); void setSyncMLMsgOperationCB(MSG_CMD_REG_SYNCML_MSG_OPERATION_CB_S *pCbinfo); void setStorageChangeCB(int listenerFd); + void setReportMsgCB(int listenerFd); +#ifdef MSG_PENDING_PUSH_MESSAGE + void sendPendingPushMsg(void); +#endif javamms_list& getJavaMMSList(); @@ -93,7 +95,7 @@ public: void broadcastLBSMsgCB(const msg_error_t err, const MSG_LBS_MESSAGE_DATA_S *lbsData); void broadcastSyncMLMsgOperationCB(const msg_error_t err, const int msgId, const int extId); void broadcastStorageChangeCB(const msg_error_t err, const msg_storage_change_type_t storageChangeType, const msg_id_list_s *pMsgIdList); - + void broadcastReportMsgCB(const msg_error_t err, const msg_report_type_t reportMsgType, const MSG_MESSAGE_INFO_S *pMsgInfo); void setTMStatus(); void getTMStatus(); @@ -103,6 +105,7 @@ private: void handleRequest(int fd); void cleanup(int fd); +// bool checkPrivilege(MSG_CMD_TYPE_T CmdType, const char *pCookie); bool checkPrivilege(int fd, MSG_CMD_TYPE_T CmdType); static MsgTransactionManager* pInstance; @@ -111,7 +114,9 @@ private: bool running; handler_map handlerMap; - +#ifdef MSG_PENDING_PUSH_MESSAGE + pushpending_list pushMsgList; +#endif sentmsg_map sentMsgMap; // req_id, listener_fd, msghandle_addr fd_map statusCBFdMap; // src_fd, true if registered @@ -125,9 +130,11 @@ private: syncmlop_list operationSyncMLMsgCBList; // src_fd, msgType, port if registered fd_map storageChangeFdMap; // src_fd, true if registered + fd_map reportMsgCBFdMap; // src_fd, true if registered Mutex mx; CndVar cv; + MsgSimpleQ<MSG_CMD_S*> eventQueue; }; #endif //MSG_TRANSACTION_MANAGER_H diff --git a/include/mapi/msg.h b/include/mapi/msg.h index bf7725f..7b2b7bb 100755 --- a/include/mapi/msg.h +++ b/include/mapi/msg.h @@ -1,20 +1,17 @@ /* - * msg-service - * - * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved + * Copyright (c) 2014 Samsung Electronics Co., Ltd. All rights reserved * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * 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. - * */ #ifndef MSG_H_ @@ -27,218 +24,1200 @@ #include "msg_types.h" +/*================================================================================================== + DEFINES +==================================================================================================*/ + +/** + * @brief Defines macro for privilege name http://tizen.org/privilege/message.read + */ +#define MSG_SERVICE_READ_PRIV_NAME "http://tizen.org/privilege/message.read" + +/** + * @brief Defines macro for privilege name http://tizen.org/privilege/message.write + */ +#define MSG_SERVICE_WRITE_PRIV_NAME "http://tizen.org/privilege/message.write" + #ifdef __cplusplus extern "C" { #endif -/** - * @ingroup MESSAGING_FRAMEWORK - * @defgroup MESSAGING_CONTROL_API Messaging Control API - * @{ - */ - /*================================================================================================== FUNCTION PROTOTYPES ==================================================================================================*/ /** - - * \par Description: - * Opens a channel between an application and messaging framework. + * @internal + * @ingroup MSG_SERVICE_FRAMEWORK + * @defgroup MSG_SERVICE_FRAMEWORK_CONTROL_MODULE Control API + * @brief The Control API provides functions to manage message handle and set or get each structure. * - * \par Purpose: - * For application to utilize the services of Messaging Framework, this API should be called to establish connection between the application and Messaging Framework. + * @internal + * @addtogroup MSG_SERVICE_FRAMEWORK_CONTROL_MODULE + * @{ * - * \par Typical use case: - * Any application which utilizes the services of Messaging Framework needs to call this API. + * @section MSG_SERVICE_FRAMEWORK_CONTROL_MODULE_HEADER Required Header + * \#include <msg.h> * - * \par Method of function operation: - * Check for Message Server ready status. If ready connect to the Messaging Server socket and pass the handle application. + * @section MSG_SERVICE_FRAMEWORK_CONTROL_MODULE_OVERVIEW Overview * - * \par Sync (or) Async: - * This is a Synchronous API. + * The CONTROL API provides the following functionalities: + * - Handles message handle + * - Get/Set message and setting values * - * \par Important notes: - * - The handle parameter returned must be used by application for further API calls to Messaging Service \n - * - memory for the handle need not be allocated by the application \n - * - An error will be returned in case Messaging Service is not running. + * @section MSG_SERVICE_FRAMEWORK_CONTROL_MODULE_FEATURE Related Features + * This API is related with the following features:\n + * - http://tizen.org/feature/network.telephony\n * - * \param msg_handle_t input - handle to be passed for all Messaging Services . + * It is recommended to design feature related codes in your application for reliability.\n * - * \return Return Type (int) \n - * - MSG_SUCCESS - Successfully connected to Messaging Service \n - * - MSG_ERR_NULL_POINTER - Input parameter is NULL. - * - MSG_ERR_MEMORY_ERROR - Memory error. - * - MSG_ERR_COMMUNICATION_ERROR - Communication error between client and server \n + * You can check if a device supports the related features for this API by using @ref CAPI_SYSTEM_SYSTEM_INFO_MODULE, thereby controlling the procedure of your application.\n * - * \par Prospective clients: - * External/Native Apps using Messaging Services. + * To ensure your application is only running on the device with specific features, please define the features in your manifest file using the manifest editor in the SDK.\n * - * \par Related functions: - * None + * More details on featuring your application can be found from <a href="../org.tizen.mobile.native.appprogramming/html/ide_sdk_tools/feature_element.htm"><b>Feature Element</b>.</a> * - * \par Known issues/bugs: - * None - * - * \par Sample code: - * \code - * ... - * - * msg_handle_t msgHandle = NULL; - * msg_error_t err = MSG_SUCCESS; + */ + +/** + * @brief Opens a channel between an application and messaging framework. + * @details For application to utilize the services of Messaging Framework, this API should be called to establish + * connection between the application and Messaging Framework. + * @since_tizen 2.3 + * @privlevel public + * @privilege %http://tizen.org/privilege/message.read * - * err = msg_open_msg_handle(&msgHandle); + * @remarks The handle parameter returned must be used by application for further API calls to Messaging Service. + * @remarks The memory for the handle need not be allocated by the application. + * @remarks An error will be returned in case Messaging Service is not running. * - * if (err != MSG_SUCCESS) - * { - * sprintf(str, "msg_open_msg_handle() Fail [%d]", err); - * print(str); + * @param[in] handle The Message handle to be passed for all messaging services * - * return err; // if success, return OPERATION_SUCCESS. Or if fail, return related error code. - * } + * @return @c 0 on success, + * otherwise a negative error value * - * ... - * \endcode + * @retval MSG_SUCCESS Success in operation + * @retval MSG_ERR_INVALID_PARAMETER Input parameter is invalid + * @retval MSG_ERR_MEMORY_ERROR Memory error + * @retval MSG_ERR_COMMUNICATION_ERROR Communication error between client and server + * @retval MSG_ERR_PERMISSION_DENIED The application does not have the privilege to call this method + * @retval MSG_ERR_NOT_SUPPORTED Not supported */ -/*================================================================================================*/ + int msg_open_msg_handle(msg_handle_t *handle); /** - - * \par Description: - * Closes the channel between application and messaging framework. + * @brief Closes the channel between application and messaging framework. + * @details Once application utilizes services of Messaging Service, this API needs to be invoked + * to close the channel between application and Messaging Service. * - * \par Purpose: - * Once application utilizes services of Messaging Service, this API needs to be invoked the close the channel between application and Messaging Service. + * @since_tizen 2.3 + * @privlevel public + * @privilege %http://tizen.org/privilege/message.read + * + * @remarks The handle parameter returned must be used by application for further API calls to Messaging Service. + * @remarks The memory for the handle need not be allocated by the application \n + * @remarks An error will be returned in case Messaging Service is not running. + * + * @param[in] handle The Message handle to be passed for all messaging services + * + * @return @c 0 on success, + * otherwise a negative error value + * + * @retval MSG_SUCCESS Success in operation + * @retval MSG_ERR_INVALID_PARAMETER Input parameter is invalid + * @retval MSG_ERR_COMMUNICATION_ERROR Communication error between client and server + * @retval MSG_ERR_PERMISSION_DENIED The application does not have the privilege to call this method + * @retval MSG_ERR_NOT_SUPPORTED Not supported + */ + +int msg_close_msg_handle(msg_handle_t *handle); + + +/** + * @brief Create structure pointer to get/set message framework data. + * @details Get/set message framework data with this structure pointer. * - * \par Typical use case: - * Any application which has completed using services of Messaging Framework needs to call this API. + * @since_tizen 2.3 * - * \par Method of function operation: - * Closes the connection to Messaging Service and deleted the reference to the handle object + * @remarks It should use defined enumerations. + * @remarks You must release handle after operations. * - * \par Sync (or) Async: - * This is a Synchronous API. + * @param[in] field The enumerations to create the structure pointer * - * \par Important notes: - * - The handle parameter returned must be used by application for further API calls to Messaging Service \n - * - memory for the handle need not be allocated by the application \n - * - An error will be returned in case Messaging Service is not running. + * @return The created structure pointer on success, + * otherwise null value * - * \param msg_handle_t input - handle to be passed for all Messaging Services . + * @retval #msg_struct_t Successfully created structure pointer + * @retval NULL Invalid parameter * - * \return Return Type (int) \n - * - MSG_SUCCESS - Successfully connected to Messaging Service \n - * - MSG_ERR_NULL_POINTER - Input parameter is NULL. - * - MSG_ERR_COMMUNICATION_ERROR - Communication error between client and server \n + */ + +msg_struct_t msg_create_struct(int field); + + +/** + * @brief Release memory for message data structure. + * @details You must release memory of message data structure that is allocated by msg_create_struct(). * - * \par Prospective clients: - * External/Native Apps using Messaging Services. + * @since_tizen 2.3 * - * \par Related functions: - * None + * @remarks It should not be used after this API. * - * \par Known issues/bugs: - * None + * @param[in] msg_struct_handle The structure pointer to release * - * \par Sample code: - * \code - * ... + * @return @c 0 on success, + * otherwise a negative error value * - * msg_handle_t msgHandle = NULL; - * msg_error_t err = MSG_SUCCESS; + * @retval MSG_SUCCESS Success in operation + * @retval MSG_ERR_NULL_POINTER Input parameter is NULL + * @retval MSG_ERR_NOT_SUPPORTED Not supported * - * ... + */ + +int msg_release_struct(msg_struct_t *msg_struct_handle); + + +/** + * @brief Release memory for list structure. + * @details You must release memory of list structure that is allocated by getting list API. * - * err = msg_open_msg_handle(&msgHandle); + * @since_tizen 2.3 * - * ... + * @remarks It should not be used after this API * - * err = msg_close_msg_handle(&msgHandle); + * @param[in] msg_struct_list The list structure pointer to release * - * if (err != MSG_SUCCESS) - * { - * sprintf(str, "msg_close_msg_handle() Fail [%d]", err); - * print(str); + * @return @c 0 on success, + * otherwise a negative error value * - * return err; // if success, return OPERATION_SUCCESS. Or if fail, return related error code. - * } + * @retval MSG_SUCCESS Success in operation + * @retval MSG_ERR_NULL_POINTER Input parameter is NULL + * @retval MSG_ERR_NOT_SUPPORTED Not supported * - * ... - * \endcode */ -/*================================================================================================*/ -int msg_close_msg_handle(msg_handle_t *handle); +int msg_release_list_struct(msg_struct_list_s *msg_struct_list); -msg_struct_t msg_create_struct(int field); -int msg_release_struct(msg_struct_t *msg_struct_handle); -int msg_release_list_struct(msg_struct_list_s *msg_struct_list); +/** + * @brief Get a specific integer value from message structure data. + * + * @since_tizen 2.3 + * + * @remarks Use valid enumerations. + * + * @param[in] msg_struct_handle A pointer of message structure type + * @param[in] field The enumeration to get a value of specific field + * @param[out] value The requested integer value + * + * @return @c 0 on success, + * otherwise a negative error value + * + * @retval MSG_SUCCESS Successfully done + * @retval MSG_ERR_NULL_POINTER Input parameter (msg_struct_handle/value) is NULL + * @retval MSG_ERR_INVALID_PARAMETER Input parameter (field) is not valid + * @retval MSG_ERR_NOT_SUPPORTED Not supported + * + */ int msg_get_int_value(msg_struct_t msg_struct_handle, int field, int *value); + + +/** + * @brief Gets a specific string value from message structure data. + * + * @since_tizen 2.3 + * + * @remarks Use valid enumerations. + * + * @param[in] msg_struct_handle A pointer of message structure type + * @param[in] field The enumeration to get a value of specific field + * @param[out] value The requested string value + * @param[in] size The allocated buffer size of application side + * + * @return @c 0 on success, + * otherwise a negative error value + * + * @retval MSG_SUCCESS Successfully done + * @retval MSG_ERR_NULL_POINTER Input parameter (msg_struct_handle/value) is NULL + * @retval MSG_ERR_INVALID_PARAMETER Input parameter (field) is not valid + * @retval MSG_ERR_NOT_SUPPORTED Not supported + * + */ + int msg_get_str_value(msg_struct_t msg_struct_handle, int field, char *value, int size); + + +/** + * @brief Gets a specific boolean value from message structure data. + * + * @since_tizen 2.3 + * + * @remarks Use valid enumerations. + * + * @param[in] msg_struct_handle A pointer of message structure type + * @param[in] field The enumeration to get a value of specific field + * @param[out] value The requested boolean value + * + * @return @c 0 on success, + * otherwise a negative error value + * + * @retval MSG_SUCCESS Successfully done + * @retval MSG_ERR_NULL_POINTER Input parameter (msg_struct_handle/value) is NULL + * @retval MSG_ERR_INVALID_PARAMETER Input parameter (field) is not valid + * @retval MSG_ERR_NOT_SUPPORTED Not supported + * + */ + int msg_get_bool_value(msg_struct_t msg_struct_handle, int field, bool *value); + + +/** + * @brief Gets an inner structure handle from message structure data. + * + * @since_tizen 2.3 + * + * @remarks Use valid enumerations. + * + * @param[in] msg_struct_handle A pointer of message structure type + * @param[in] field The enumeration to get a value of specific field + * @param[out] value The requested structure handle + * + * @return @c 0 on success, + * otherwise a negative error value + * + * @retval MSG_SUCCESS Successfully done + * @retval MSG_ERR_NULL_POINTER Input parameter (msg_struct_handle/value) is NULL + * @retval MSG_ERR_INVALID_PARAMETER Input parameter (field) is not valid + * @retval MSG_ERR_NOT_SUPPORTED Not supported + * + */ + int msg_get_struct_handle(msg_struct_t msg_struct_handle, int field, msg_struct_t *value); + + +/** + * @brief Gets a list handle from message structure data. + * + * @since_tizen 2.3 + * + * @remarks Use valid enumerations. + * + * @param[in] msg_struct_handle A pointer of message structure type + * @param[in] field The enumeration to get a value of specific field + * @param[out] value The requested list handle + * + * @return @c 0 on success, + * otherwise a negative error value + * + * @retval MSG_SUCCESS Successfully done + * @retval MSG_ERR_NULL_POINTER Input parameter (msg_struct_handle/value) is NULL + * @retval MSG_ERR_INVALID_PARAMETER Input parameter (field) is not valid + * @retval MSG_ERR_NOT_SUPPORTED Not supported + * + */ +/*================================================================================================*/ int msg_get_list_handle(msg_struct_t msg_struct_handle, int field, void **value); + +/** + * @brief Sets a specific integer value to message structure data. + * + * @since_tizen 2.3 + * + * @remarks Use valid enumerations. + * + * @param[in] msg_struct_handle A pointer of message structure type + * @param[in] field The enumeration to get a value of specific field + * @param[out] value The requested integer value + * + * @return @c 0 on success, + * otherwise a negative error value + * + * @retval MSG_SUCCESS Successfully done + * @retval MSG_ERR_NULL_POINTER Input parameter (msg_struct_handle/value) is NULL + * @retval MSG_ERR_INVALID_PARAMETER Input parameter (field) is not valid + * @retval MSG_ERR_NOT_SUPPORTED Not supported + * + */ + int msg_set_int_value(msg_struct_t msg_struct_handle, int field, int value); + + +/** + * @brief Sets a specific string to message structure data. + * + * @since_tizen 2.3 + * + * @remarks Use valid enumerations. + * + * @param[in] msg_struct_handle A pointer of message structure type + * @param[in] field The enumeration to get a value of specific field + * @param[out] value The requested string + * @param[in] size The requested size of string to set + * + * @return @c 0 on success, + * otherwise a negative error value + * + * @retval MSG_SUCCESS Successfully done + * @retval MSG_ERR_NULL_POINTER Input parameter (msg_struct_handle/value) is NULL + * @retval MSG_ERR_INVALID_PARAMETER Input parameter (field) is not valid + * @retval MSG_ERR_NOT_SUPPORTED Not supported + * + */ + int msg_set_str_value(msg_struct_t msg_struct_handle, int field, char *value, int size); + + +/** + * @brief Sets a specific boolean value to message structure data. + * + * @since_tizen 2.3 + * + * @details Set a specific boolean value to message structure data. + * + * @remarks Use valid enumerations. + * + * @param[in] msg_struct_handle A pointer of message structure type + * @param[in] field The enumeration to get a value of specific field + * @param[out] value The requested boolean value + * + * @return @c 0 on success, + * otherwise a negative error value + * + * @retval MSG_SUCCESS Successfully done + * @retval MSG_ERR_NULL_POINTER Input parameter (msg_struct_handle/value) is NULL + * @retval MSG_ERR_INVALID_PARAMETER Input parameter (field) is not valid + * @retval MSG_ERR_NOT_SUPPORTED Not supported + * + */ + int msg_set_bool_value(msg_struct_t msg_struct_handle, int field, bool value); + + +/** + * @brief Sets a inner structure handle to message structure data. + * + * @since_tizen 2.3 + * + * @remarks Use valid enumerations. + * + * @param[in] msg_struct_handle A pointer of message structure type + * @param[in] field The enumeration to get a value of specific field + * @param[out] value The requested structure handle to set + * + * @return @c 0 on success, + * otherwise a negative error value + * + * @retval MSG_SUCCESS Successfully done + * @retval MSG_ERR_NULL_POINTER Input parameter (msg_struct_handle/value) is NULL + * @retval MSG_ERR_INVALID_PARAMETER Input parameter (field) is not valid + * @retval MSG_ERR_NOT_SUPPORTED Not supported + * + */ + int msg_set_struct_handle(msg_struct_t msg_struct_handle, int field, msg_struct_t value); + + +/** + * @brief Set a list handle to message structure data. + * + * @since_tizen 2.3 + * + * @remarks Use valid enumerations. + * + * @param[in] msg_struct_handle A pointer of message structure type + * @param[in] field The enumeration to get a value of specific field + * @param[out] value The requested list handle to set + * + * @return @c 0 on success, + * otherwise a negative error value + * + * @retval MSG_SUCCESS Successfully done + * @retval MSG_ERR_NULL_POINTER Input parameter (msg_struct_handle/value) is NULL + * @retval MSG_ERR_INVALID_PARAMETER Input parameter (field) is not valid + * @retval MSG_ERR_NOT_SUPPORTED Not supported + * + */ + int msg_set_list_handle(msg_struct_t msg_struct_handle, int field, void *value); -int msg_mms_add_item(msg_struct_t msg_struct_handle, int field, msg_struct_t *item); + +/** + * @brief Gets a MMS structure handle from message structure. + * + * @since_tizen 2.3 + * + * @remarks Use valid structure handle. + * + * @param[in] msg_struct_handle A pointer of message structure type + * @param[out] mms_struct_handle The MMS structure handle to get + * + * @return @c 0 on success, + * otherwise a negative error value + * + * @retval MSG_SUCCESS Successfully done + * @retval MSG_ERR_INVALID_PARAMETER Input parameter is not valid + * @retval MSG_ERR_NOT_SUPPORTED Not supported + * + */ int msg_get_mms_struct(msg_struct_t msg_struct_handle, msg_struct_t mms_struct_handle); + + +/** + * @brief Sets a MMS structure handle to message structure. + * + * @since_tizen 2.3 + * + * @remarks Use valid structure handle. + * + * @param[in] msg_struct_handle A pointer of message structure type + * @param[out] mms_struct_handle The MMS structure handle to set + * + * @return @c 0 on success, + * otherwise a negative error value + * + * @retval MSG_SUCCESS Successfully done + * @retval MSG_ERR_INVALID_PARAMETER Input parameter is not valid + * @retval MSG_ERR_NOT_SUPPORTED Not supported + * + */ + int msg_set_mms_struct(msg_struct_t msg_struct_handle, msg_struct_t mms_struct_handle); -//list + +/** + * @brief Adds an item to list handle of message structure type. + * + * @since_tizen 2.3 + * + * @remarks Use valid list_handle. + * + * @param[in] msg_struct_handle A pointer of message structure type + * @param[in] field The field to set item + * @param[in] item The #msg_struct_t structure to be added to list handle + * + * @return @c 0 on success, + * otherwise a negative error value + * + * @retval MSG_SUCCESS Successfully done + * @retval MSG_ERR_INVALID_PARAMETER Input parameter is not valid + * @retval MSG_ERR_NOT_SUPPORTED Not supported + * + */ + +int msg_list_add_item(msg_struct_t msg_struct_handle, int field, msg_struct_t *item); + + +/** + * @brief Gets n-th data from list handle. + * + * @since_tizen 2.3 + * + * @remarks Use valid list_handle. + * + * @param[in] list_handle A pointer of message structure type + * @param[in] index The index of list structure + * + * @return #msg_struct_t value on success, + * otherwise @c NULL value + * + * @retval #msg_struct_t Successfully done + * @retval NULL Input parameter (list_handle) is not valid + * + */ + msg_struct_t msg_list_nth_data(msg_list_handle_t list_handle, int index); + + +/** + * @brief Gets the length(count) of list handle. + * + * @since_tizen 2.3 + * + * @remarks Use valid list_handle. + * If there is an error, it will be returned as below values. + * + * @param[in] list_handle A pointer of message structure type + * + * @return The length of message list (int) + * @retval MSG_ERR_NOT_SUPPORTED Not supported + * + */ + int msg_list_length(msg_list_handle_t list_handle); -// filter + +/** + * @brief Releases entire data of list handle in message structure. + * + * @since_tizen 2.3 + * + * @remarks Use valid msg_struct_handle and enumeration. + * + * @param[in] msg_struct_handle A pointer of message structure type + * @param[in] field The enumeration to release (list handle) + * + * @return @c 0 on success, + * otherwise a negative error value + * + * @retval MSG_SUCCESS Successfully done + * @retval MSG_ERR_NULL_POINTER Input parameter is NULL + * @retval MSG_ERR_INVALID_PARAMETER Input parameter is invalid + * @retval MSG_ERR_NOT_SUPPORTED Not supported + * + */ + +int msg_list_clear(msg_struct_t msg_struct_handle, int field); + + +/** + * @brief Adds a filter to block messages by address or word. + * + * @since_tizen 2.3 + * @privlevel public + * @privilege %http://tizen.org/privilege/message.write + * + * @remarks #msg_struct_t MUST be valid, otherwise the function will fail. + * + * @param[in] handle The message handle + * @param[in] filter A pointer to message filter structure + * + * @return @c 0 on success, + * otherwise a negative error value + * + * @retval MSG_SUCCESS Successfully done + * @retval MSG_ERR_INVALID_PARAMETER Input parameter is invalid + * @retval MSG_ERR_FILTER_ERROR Filter operation error + * @retval MSG_ERR_PERMISSION_DENIED The application does not have the privilege to call this method + * @retval MSG_ERR_NOT_SUPPORTED Not supported + */ + int msg_add_filter(msg_handle_t handle, const msg_struct_t filter); + + +/** + * @brief Updates filter to block messages by address or word. + * + * @since_tizen 2.3 + * @privlevel public + * @privilege %http://tizen.org/privilege/message.write + * + * @remarks #msg_handle_t MUST be valid, otherwise the function will fail. + * @remarks #msg_struct_t MUST be valid, otherwise the function will fail. + * + * @param[in] handle The message handle + * @param[in] filter A pointer to message filter structure + * + * @return @c 0 on success, + * otherwise a negative error value + * + * @retval MSG_SUCCESS Successfully done + * @retval MSG_ERR_INVALID_PARAMETER Input parameter is invalid + * @retval MSG_ERR_FILTER_ERROR Filter operation error + * @retval MSG_ERR_PERMISSION_DENIED The application does not have the privilege to call this method + * @retval MSG_ERR_NOT_SUPPORTED Not supported + */ + int msg_update_filter(msg_handle_t handle, const msg_struct_t filter); + + +/** + * @brief Deletes the filter to block messages by address or word. + * + * @since_tizen 2.3 + * @privlevel public + * @privilege %http://tizen.org/privilege/message.write + * + * @param[in] handle The message handle + * @param[in] filter_id The filter index to delete from filter DB + * + * @return @c 0 on success, + * otherwise a negative error value + * + * @retval MSG_SUCCESS Successfully done + * @retval MSG_ERR_INVALID_PARAMETER Input parameter is invalid + * @retval MSG_ERR_FILTER_ERROR Filter operation error + * @retval MSG_ERR_PERMISSION_DENIED The application does not have the privilege to call this method + * @retval MSG_ERR_NOT_SUPPORTED Not supported + */ + int msg_delete_filter(msg_handle_t handle, msg_filter_id_t filter_id); + + +/** + * @brief Gets all filter list. + * @details This API is used to get a filter list that is already added filter set. + * + * @since_tizen 2.3 + * @privlevel public + * @privilege %http://tizen.org/privilege/message.read + * + * @remarks #msg_handle_t MUST be valid, otherwise the function will fail. + * + * @param[in] handle The message handle + * @param[out] filter_list A pointer to list of message filter structure + * + * @return @c 0 on success, + * otherwise a negative error value + * + * @retval MSG_SUCCESS Successfully done + * @retval MSG_ERR_INVALID_PARAMETER Input parameter is invalid + * @retval MSG_ERR_FILTER_ERROR Filter operation error + * @retval MSG_ERR_PERMISSION_DENIED The application does not have the privilege to call this method + * @retval MSG_ERR_NOT_SUPPORTED Not supported + */ + int msg_get_filter_list(msg_handle_t handle, msg_struct_list_s *filter_list); + + +/** + * @brief Sets the flag of message blocking. + * @details This API is used to set a flag of block operation. + * + * @since_tizen 2.3 + * @privlevel public + * @privilege %http://tizen.org/privilege/message.write + * + * @remarks #msg_handle_t MUST be valid, otherwise the function will fail. + * + * @param[in] handle The message handle + * @param[in] set_flag Set @c true to enable block operation, + * otherwise set @c false to disable block operation + * + * @return @c 0 on success, + * otherwise a negative error value + * + * @retval MSG_SUCCESS Successfully done + * @retval MSG_ERR_INVALID_PARAMETER Input parameter is invalid + * @retval MSG_ERR_FILTER_ERROR Filter operation error + * @retval MSG_ERR_PERMISSION_DENIED The application does not have the privilege to call this method + * @retval MSG_ERR_NOT_SUPPORTED Not supported + */ + int msg_set_filter_operation(msg_handle_t handle, bool set_flag); + + +/** + * @brief Gets the flag value of message blocking. + * + * @since_tizen 2.3 + * @privlevel public + * @privilege %http://tizen.org/privilege/message.read + * + * @remarks #msg_handle_t MUST be valid, otherwise the function will fail. + * + * @param[in] handle The message handle + * @param[out] set_flag @c true if message blocking is enabled, + * otherwise @c false if message blocking is not enabled + * + * @return @c 0 on success, + * otherwise a negative error value + * + * @retval MSG_SUCCESS Successfully done + * @retval MSG_ERR_INVALID_PARAMETER Input parameter is invalid + * @retval MSG_ERR_FILTER_ERROR Filter operation error + * @retval MSG_ERR_PERMISSION_DENIED The application does not have the privilege to call this method + * @retval MSG_ERR_NOT_SUPPORTED Not supported + */ + int msg_get_filter_operation(msg_handle_t handle, bool *set_flag); + + +/** + * @brief Sets the flag of message blocking for specific filter. + * + * @since_tizen 2.3 + * @privlevel public + * @privilege %http://tizen.org/privilege/message.write + * + * @remarks #msg_handle_t MUST be valid, otherwise the function will fail. + * + * @param[in] handle The message handle + * @param[in] filter_id The specific index to set flag + * @param[in] active Set @c true to enable the block operation, + * otherwise @c false to not enable the block operation + * + * @return @c 0 on success, + * otherwise a negative error value + * + * @retval MSG_SUCCESS Successfully done + * @retval MSG_ERR_INVALID_PARAMETER Input parameter is invalid + * @retval MSG_ERR_FILTER_ERROR Filter operation error + * @retval MSG_ERR_PERMISSION_DENIED The application does not have the privilege to call this method + * @retval MSG_ERR_NOT_SUPPORTED Not supported + */ + int msg_set_filter_active(msg_handle_t handle, msg_filter_id_t filter_id, bool active); -//setting + +/** + * @brief Gets SMSC list and informations. + * + * @since_tizen 2.3 + * @privlevel public + * @privilege %http://tizen.org/privilege/message.read + * + * @remarks #msg_handle_t MUST be valid, otherwise the function will fail. + * + * @param[in] handle The message handle + * @param[in] msg_struct A structure pointer of SMSC data + * + * @return @c 0 on success, + * otherwise a negative error value + * + * @retval MSG_SUCCESS Successfully done + * @retval MSG_ERR_INVALID_PARAMETER Input parameter is invalid + * @retval MSG_ERR_PERMISSION_DENIED The application does not have the privilege to call this method + * @retval MSG_ERR_NOT_SUPPORTED Not supported + */ + int msg_get_smsc_opt(msg_handle_t handle, msg_struct_t msg_struct); + + +/** + * @brief Sets SMSC list and informations. + * + * @since_tizen 2.3 + * @privlevel public + * @privilege %http://tizen.org/privilege/message.write + * + * @remarks #msg_handle_t MUST be valid, otherwise the function will fail. + * + * @param[in] handle The message handle + * @param[in] msg_struct A structure pointer of SMSC data + * + * @return @c 0 on success, + * otherwise a negative error value + * + * @retval MSG_SUCCESS Successfully done + * @retval MSG_ERR_INVALID_PARAMETER Input parameter is invalid + * @retval MSG_ERR_PERMISSION_DENIED The application does not have the privilege to call this method + * @retval MSG_ERR_NOT_SUPPORTED Not supported + */ + int msg_set_smsc_opt(msg_handle_t handle, msg_struct_t msg_struct); + + +/** + * @brief Gets CB channel list and informations. + * + * @since_tizen 2.3 + * @privlevel public + * @privilege %http://tizen.org/privilege/message.read + * + * @remarks #msg_handle_t MUST be valid, otherwise the function will fail. + * + * @param[in] handle The message handle + * @param[in] msg_struct A structure pointer of CB data + * + * @return @c 0 on success, + * otherwise a negative error value + * + * @retval MSG_SUCCESS Successfully done + * @retval MSG_ERR_INVALID_PARAMETER Input parameter is invalid + * @retval MSG_ERR_PERMISSION_DENIED The application does not have the privilege to call this method + * @retval MSG_ERR_NOT_SUPPORTED Not supported + */ + int msg_get_cb_opt(msg_handle_t handle, msg_struct_t msg_struct); + + +/** + * @brief Sets CB channel list and informations. + * + * @since_tizen 2.3 + * @privlevel public + * @privilege %http://tizen.org/privilege/message.write + * + * @remarks #msg_handle_t MUST be valid, otherwise the function will fail. + * + * @param[in] handle The message handle + * @param[in] msg_struct A structure pointer of CB data + * + * @return @c 0 on success, + * otherwise a negative error value + * + * @retval MSG_SUCCESS Successfully done + * @retval MSG_ERR_INVALID_PARAMETER Input parameter is invalid + * @retval MSG_ERR_PERMISSION_DENIED The application does not have the privilege to call this method + * @retval MSG_ERR_NOT_SUPPORTED Not supported + */ + int msg_set_cb_opt(msg_handle_t handle, msg_struct_t msg_struct); + +/** + * @brief Gets SMS sending options. + * + * @since_tizen 2.3 + * @privlevel public + * @privilege %http://tizen.org/privilege/message.read + * + * @remarks #msg_handle_t MUST be valid, otherwise the function will fail. + * + * @param[in] handle The message handle + * @param[in] msg_struct A structure pointer of sending option data + * + * @return @c 0 on success, + * otherwise a negative error value + * + * @retval MSG_SUCCESS Successfully done + * @retval MSG_ERR_INVALID_PARAMETER Input parameter is invalid + * @retval MSG_ERR_PERMISSION_DENIED The application does not have the privilege to call this method + * @retval MSG_ERR_NOT_SUPPORTED Not supported + */ + int msg_get_sms_send_opt(msg_handle_t handle, msg_struct_t msg_struct); + + +/** + * @brief Sets SMS sending options. + * + * @since_tizen 2.3 + * @privlevel public + * @privilege %http://tizen.org/privilege/message.write + * + * @remarks #msg_handle_t MUST be valid, otherwise the function will fail. + * + * @param[in] handle The message handle + * @param[in] msg_struct A structure pointer of sending option data + * + * @return @c 0 on success, + * otherwise a negative error value + * + * @retval MSG_SUCCESS Successfully done + * @retval MSG_ERR_INVALID_PARAMETER Input parameter is invalid + * @retval MSG_ERR_PERMISSION_DENIED The application does not have the privilege to call this method + * @retval MSG_ERR_NOT_SUPPORTED Not supported + */ + int msg_set_sms_send_opt(msg_handle_t handle, msg_struct_t msg_struct); + +/** + * @brief Gets MMS sending options. + * + * @since_tizen 2.3 + * @privlevel public + * @privilege %http://tizen.org/privilege/message.read + * + * @remarks #msg_handle_t MUST be valid, otherwise the function will fail. + * + * @param[in] handle The message handle + * @param[in] msg_struct A structure pointer of sending option data + * + * @return @c 0 on success, + * otherwise a negative error value + * + * @retval MSG_SUCCESS Successfully done + * @retval MSG_ERR_INVALID_PARAMETER Input parameter is invalid + * @retval MSG_ERR_PERMISSION_DENIED The application does not have the privilege to call this method + * @retval MSG_ERR_NOT_SUPPORTED Not supported + */ + int msg_get_mms_send_opt(msg_handle_t handle, msg_struct_t msg_struct); + + +/** + * @brief Sets MMS sending options. + * + * @since_tizen 2.3 + * @privlevel public + * @privilege %http://tizen.org/privilege/message.write + * + * @remarks #msg_handle_t MUST be valid, otherwise the function will fail. + * + * @param[in] handle The message handle + * @param[in] msg_struct A structure pointer of sending option data + * + * @return @c 0 on success, + * otherwise a negative error value + * + * @retval MSG_SUCCESS Successfully done + * @retval MSG_ERR_INVALID_PARAMETER Input parameter is invalid + * @retval MSG_ERR_PERMISSION_DENIED The application does not have the privilege to call this method + * @retval MSG_ERR_NOT_SUPPORTED Not supported + */ + int msg_set_mms_send_opt(msg_handle_t handle, msg_struct_t msg_struct); + +/** + * @brief Gets MMS receiving options. + * + * @since_tizen 2.3 + * @privlevel public + * @privilege %http://tizen.org/privilege/message.read + * + * @remarks #msg_handle_t MUST be valid, otherwise the function will fail. + * + * @param[in] handle The message handle + * @param[in] msg_struct A structure pointer of receiving option data + * + * @return @c 0 on success, + * otherwise a negative error value + * + * @retval MSG_SUCCESS Successfully done + * @retval MSG_ERR_INVALID_PARAMETER Input parameter is invalid + * @retval MSG_ERR_PERMISSION_DENIED The application does not have the privilege to call this method + * @retval MSG_ERR_NOT_SUPPORTED Not supported + */ + int msg_get_mms_recv_opt(msg_handle_t handle, msg_struct_t msg_struct); + + +/** + * @brief Sets MMS receiving options. + * + * @since_tizen 2.3 + * @privlevel public + * @privilege %http://tizen.org/privilege/message.write + * + * @remarks #msg_handle_t MUST be valid, otherwise the function will fail. + * + * @param[in] handle The message handle + * @param[in] msg_struct A structure pointer of receiving option data + * + * @return @c 0 on success, + * otherwise a negative error value + * + * @retval MSG_SUCCESS Successfully done + * @retval MSG_ERR_INVALID_PARAMETER Input parameter is invalid + * @retval MSG_ERR_PERMISSION_DENIED The application does not have the privilege to call this method + * @retval MSG_ERR_NOT_SUPPORTED Not supported + */ + int msg_set_mms_recv_opt(msg_handle_t handle, msg_struct_t msg_struct); + +/** + * @brief Gets push message options. + * + * @since_tizen 2.3 + * @privlevel public + * @privilege %http://tizen.org/privilege/message.read + * + * @remarks #msg_handle_t MUST be valid, otherwise the function will fail. + * + * @param[in] handle The message handle + * @param[in] msg_struct A structure pointer of push message option data + * + * @return @c 0 on success, + * otherwise a negative error value + * + * @retval MSG_SUCCESS Successfully done + * @retval MSG_ERR_INVALID_PARAMETER Input parameter is invalid + * @retval MSG_ERR_PERMISSION_DENIED The application does not have the privilege to call this method + * @retval MSG_ERR_NOT_SUPPORTED Not supported + */ + int msg_get_push_msg_opt(msg_handle_t handle, msg_struct_t msg_struct); + + +/** + * @brief Sets push message options. + * + * @since_tizen 2.3 + * @privlevel public + * @privilege %http://tizen.org/privilege/message.write + * + * @remarks #msg_handle_t MUST be valid, otherwise the function will fail. + * + * @param[in] handle The message handle + * @param[in] msg_struct A structure pointer of push message option data + * + * @return @c 0 on success, + * otherwise a negative error value + * + * @retval MSG_SUCCESS Successfully done + * @retval MSG_ERR_INVALID_PARAMETER Input parameter is invalid + * @retval MSG_ERR_PERMISSION_DENIED The application does not have the privilege to call this method + * @retval MSG_ERR_NOT_SUPPORTED Not supported + */ + int msg_set_push_msg_opt(msg_handle_t handle, msg_struct_t msg_struct); + +/** + * @brief Gets voice message options. + * + * @since_tizen 2.3 + * @privlevel public + * @privilege %http://tizen.org/privilege/message.read + * + * @remarks #msg_handle_t MUST be valid, otherwise the function will fail. + * + * @param[in] handle The message handle + * @param[in] msg_struct A structure pointer of voice message option data + * + * @return @c 0 on success, + * otherwise a negative error value + * + * @retval MSG_SUCCESS Successfully done + * @retval MSG_ERR_INVALID_PARAMETER Input parameter is invalid + * @retval MSG_ERR_PERMISSION_DENIED The application does not have the privilege to call this method + * @retval MSG_ERR_NOT_SUPPORTED Not supported + */ + int msg_get_voice_msg_opt(msg_handle_t handle, msg_struct_t msg_struct); + + +/** + * @brief Sets voice message options. + * + * @since_tizen 2.3 + * @privlevel public + * @privilege %http://tizen.org/privilege/message.write + * + * @remarks #msg_handle_t MUST be valid, otherwise the function will fail. + * + * @param[in] handle The message handle + * @param[in] msg_struct A structure pointer of voice message option data + * + * @return @c 0 on success, + * otherwise a negative error value + * + * @retval MSG_SUCCESS Successfully done + * @retval MSG_ERR_INVALID_PARAMETER Input parameter is invalid + * @retval MSG_ERR_PERMISSION_DENIED The application does not have the privilege to call this method + * @retval MSG_ERR_NOT_SUPPORTED Not supported + */ + int msg_set_voice_msg_opt(msg_handle_t handle, msg_struct_t msg_struct); + +/** + * @brief Gets message general options. + * + * @since_tizen 2.3 + * @privlevel public + * @privilege %http://tizen.org/privilege/message.read + * + * @remarks #msg_handle_t MUST be valid, otherwise the function will fail. + * + * @param[in] handle The message handle + * @param[in] msg_struct A structure pointer of message general option data + * + * @return @c 0 on success, + * otherwise a negative error value + * + * @retval MSG_SUCCESS Successfully done + * @retval MSG_ERR_INVALID_PARAMETER Input parameter is invalid + * @retval MSG_ERR_PERMISSION_DENIED The application does not have the privilege to call this method + * @retval MSG_ERR_NOT_SUPPORTED Not supported + */ + int msg_get_general_opt(msg_handle_t handle, msg_struct_t msg_struct); + + +/** + * @brief Sets message general options. + * + * @since_tizen 2.3 + * @privlevel public + * @privilege %http://tizen.org/privilege/message.write + * + * @remarks #msg_handle_t MUST be valid, otherwise the function will fail. + * + * @param[in] handle The message handle + * @param[in] msg_struct A structure pointer of message general option data + * + * @return @c 0 on success, + * otherwise a negative error value + * + * @retval MSG_SUCCESS Successfully done + * @retval MSG_ERR_INVALID_PARAMETER Input parameter is invalid + * @retval MSG_ERR_PERMISSION_DENIED The application does not have the privilege to call this method + * @retval MSG_ERR_NOT_SUPPORTED Not supported + */ + int msg_set_general_opt(msg_handle_t handle, msg_struct_t msg_struct); + +/** + * @brief Gets message size. + * + * @since_tizen 2.3 + * @privlevel public + * @privilege %http://tizen.org/privilege/message.read + * + * @remarks #msg_handle_t MUST be valid, otherwise the function will fail. + * + * @param[in] handle The message handle + * @param[in] msg_struct A structure pointer of message size data + * + * @return @c 0 on success, + * otherwise a negative error value + * + * @retval MSG_SUCCESS Successfully done + * @retval MSG_ERR_INVALID_PARAMETER Input parameter is invalid + * @retval MSG_ERR_PERMISSION_DENIED The application does not have the privilege to call this method + * @retval MSG_ERR_NOT_SUPPORTED Not supported + */ + int msg_get_msgsize_opt(msg_handle_t handle, msg_struct_t msg_struct); + + +/** + * @brief Sets message size. + * + * @since_tizen 2.3 + * @privlevel public + * @privilege %http://tizen.org/privilege/message.write + * + * @remarks #msg_handle_t MUST be valid, otherwise the function will fail. + * + * @param[in] handle The message handle + * @param[in] msg_struct A structure pointer of message size data + * + * @return @c 0 on success, + * otherwise a negative error value + * + * @retval MSG_SUCCESS Successfully done + * @retval MSG_ERR_INVALID_PARAMETER Input parameter is invalid + * @retval MSG_ERR_PERMISSION_DENIED The application does not have the privilege to call this method + * @retval MSG_ERR_NOT_SUPPORTED Not supported + */ + int msg_set_msgsize_opt(msg_handle_t handle, msg_struct_t msg_struct); -// text length calculate + +/** + * @brief Calculates input text length by encode type. + * + * @since_tizen 2.3 + * + * @remarks #msg_handle_t MUST be valid, otherwise the function will fail. + * + * @param[in] msg_text The string to calculate length + * @param[in] msg_encode_type_to The current encode type + * @param[out] text_size The calculated text size + * @param[out] segment_size The message segment size + * @param[out] msg_encode_type_in The encode type it should be changed to + * + * @return @c 0 on success, + * otherwise a negative error value + * + * @retval MSG_SUCCESS Successfully done + * @retval MSG_ERR_INVALID_PARAMETER Input parameter is not valid. + * @retval MSG_ERR_NOT_SUPPORTED Not supported + * + */ + int msg_util_calculate_text_length(const char* msg_text, msg_encode_type_t msg_encode_type_to, unsigned int *text_size, unsigned int *segment_size, msg_encode_type_t *msg_encode_type_in); + +/** + * @} +*/ + + #ifdef __cplusplus } #endif diff --git a/include/mapi/msg_private.h b/include/mapi/msg_private.h index 1850e93..92168ba 100755 --- a/include/mapi/msg_private.h +++ b/include/mapi/msg_private.h @@ -1,20 +1,17 @@ /* - * msg-service - * - * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved + * Copyright (c) 2014 Samsung Electronics Co., Ltd. All rights reserved * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * 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. - * */ #ifndef MSG_PRIVATE_H_ @@ -24,13 +21,39 @@ INCLUDE FILES ==================================================================================================*/ +#include "MsgDebug.h" +#include "MsgGconfWrapper.h" #include "MsgTypes.h" #include "MsgStorageTypes.h" #include "MsgTransportTypes.h" #include "MsgMmsTypes.h" #include "MsgFilterTypes.h" #include "MsgSettingTypes.h" +#include "MsgUtilFunction.h" + +/*================================================================================================== + DEFINES +==================================================================================================*/ +#define CHECK_MSG_SUPPORTED(feature_name) \ + do { \ + bool bSupported = false; \ + bSupported = MsgCheckFeatureSupport(feature_name); \ + if (bSupported == false) {\ + MSG_ERR("Feature [%s] not supported", feature_name);\ + return MSG_ERR_NOT_SUPPORTED; \ + } \ + } while(0) + +#define CHECK_MSG_SUPPORTED_RETURN_NULL(feature_name) \ + do { \ + bool bSupported = false; \ + bSupported = MsgCheckFeatureSupport(feature_name); \ + if (bSupported == false) {\ + MSG_ERR("Feature [%s] not supported", feature_name);\ + return NULL; \ + } \ + } while(0) /*================================================================================================== FUNCTION PROTOTYPES @@ -56,6 +79,9 @@ void msg_message_copy_message(MSG_MESSAGE_HIDDEN_S *pSrc, MSG_MESSAGE_HIDDEN_S * int msg_cb_message_get_int_value(void *data, int field, int *value); int msg_cb_message_get_str_value(void *data, int field, char *value, int size); +int msg_message_list_append(msg_struct_t msg_struct_handle, int field, msg_struct_t *item); +int msg_message_list_clear(msg_struct_t msg_struct_handle, int field); + @@ -85,9 +111,12 @@ int msg_mms_set_bool_value(msg_struct_s *msg_struct, int field, bool value); int msg_mms_set_struct_handle(msg_struct_s *msg_struct, int field, msg_struct_s *value); int msg_mms_set_list_handle(msg_struct_s *msg_struct, int field, msg_list_handle_t value); +int msg_mms_list_append(msg_struct_t msg_struct_handle, int field, msg_struct_t *item); + void convert_to_mmsdata(const msg_struct_s *pSrc, MMS_MESSAGE_DATA_S *pDest); void convert_from_mmsdata(const MMS_MESSAGE_DATA_S *pSrc, msg_struct_s *pDest); - +void convert_to_hidden_mmsdata(MMS_DATA_S *pSrc, msg_struct_s *pDest); +void convert_from_hidden_mmsdata(msg_struct_s *pSrc, MMS_DATA_S *pDest); // setting int msg_setting_get_int_value(msg_struct_s *msg_struct, int field, int *value); int msg_setting_get_str_value(msg_struct_s *msg_struct, int field, char *src, int size); @@ -140,6 +169,8 @@ int msg_set_push_msg_opt_int(void *push_msg_opt, int field, int value); bool msg_get_push_msg_opt_bool(void *push_msg_opt, int field); int msg_set_push_msg_opt_bool(void *push_msg_opt, int field, bool value); +int msg_get_voice_msg_opt_int(void *voice_msg_opt, int field); +int msg_set_voice_msg_opt_int(void *voice_msg_opt, int field, int value); char *msg_get_voice_msg_opt_str(void *voice_msg_opt, int field); int msg_set_voice_msg_opt_str(void *voice_msg_opt, int field, char *val, int size); @@ -147,7 +178,8 @@ int msg_get_general_opt_int(void *general_opt, int field); int msg_set_general_opt_int(void *general_opt, int field, int value); bool msg_get_general_opt_bool(void *general_opt, int field); int msg_set_general_opt_bool(void *general_opt, int field, bool value); - +char *msg_get_general_opt_str(void *general_opt, int field); +int msg_set_general_opt_str(void *general_opt, int field, char *val, int size); int msg_get_msgsize_opt_int(void *size_opt, int field); int msg_set_msgsize_opt_int(void *size_opt, int field, int value); @@ -168,19 +200,23 @@ int msg_folder_info_get_int(void *folder_info, int field); int msg_thread_info_get_int(void *data, int field); int msg_conv_info_get_int(void *data, int field); int msg_search_condition_get_int(void *condition_info, int field); +int msg_list_condition_get_int(void *condition_info, int field); int msg_report_status_get_int(void *report_info, int field); char* msg_report_status_get_str(void *report_info, int field); char* msg_folder_info_get_str(void *folder_info, int field); char *msg_thread_info_get_str(void *data, int field); char *msg_conv_info_get_str(void *data, int field); char* msg_search_condition_get_str(void *condition_info, int field, int size); +char* msg_list_condition_get_str(void *condition_info, int field, int size); bool msg_sendopt_get_bool(void *send_opt, int field); bool msg_sortrule_get_bool(void *sort_rule, int field); bool msg_conv_get_bool(void *data, int field); bool msg_thread_info_get_bool(void *data, int field); +bool msg_list_condition_get_bool(void *data, int field); int msg_sendopt_get_struct_handle(msg_struct_s *msg_struct, int field, void **value); int msg_syncml_get_struct_handle(msg_struct_s *msg_struct, int field, void **value); int msg_thread_index_get_struct_handle(msg_struct_s *msg_struct, int field, void **value); +int msg_list_condition_get_struct_handle(msg_struct_s *msg_struct, int field, void **value); int msg_address_info_get_int(void *addr_info, int field); int msg_mms_sendopt_get_int(void *opt_info, int field); int msg_reject_message_get_int(void *msg_info, int field); @@ -196,18 +232,23 @@ int msg_thread_index_set_int(void *index_info, int field, int value); int msg_sortrule_set_int(void *sort_info, int field, int value); int msg_folder_info_set_int(void *folder_info, int field, int value); int msg_search_condition_set_int(void *condition_info, int field, int value); +int msg_list_condition_set_int(void *condition_info, int field, int value); int msg_report_status_set_int(void *report_info, int field, int value); int msg_folder_info_set_str(void *folder_info, int field, char *value, int size); int msg_search_condition_set_str(void *condition_info, int field, char *value, int size); +int msg_list_condition_set_str(void *condition_info, int field, char *value, int size); int msg_sendopt_set_bool(void *send_opt, int field, bool value); int msg_sortrule_set_bool(void *sort_rule, int field, bool value); +int msg_list_condition_set_bool(void *data, int field, bool value); int msg_sendopt_set_struct_handle(msg_struct_s *msg_struct, int field, msg_struct_s *value); int msg_syncml_set_struct_handle(msg_struct_s *msg_struct, int field, msg_struct_s *value); int msg_thread_index_set_struct_handle(msg_struct_s *msg_struct, int field, msg_struct_s *value); +int msg_list_condition_set_struct_handle(msg_struct_s *msg_struct, int field, msg_struct_s *value); int msg_address_info_set_int(void *addrinfo, int field, int value); int msg_mms_sendopt_set_int(void *opt_info, int field, int value); int msg_reject_message_set_int(void *msg_info, int field, int value); int msg_address_info_set_str(void *addr_info, int field, char *value, int size); +int msg_media_info_set_str(void *media_info, int field, char *value, int size); int msg_reject_message_set_str(void *msg_info, int field, char *value, int size); int msg_mms_sendopt_set_bool(void *option, int field, bool value); int msg_sms_sendopt_set_bool(void *option, int field, bool value); @@ -219,5 +260,11 @@ int msg_request_set_int(void *request_info, int field, int value); int msg_request_set_struct_handle(msg_struct_s *msg_struct, int field, msg_struct_s *value); int msg_sent_status_get_int(MSG_SENT_STATUS_S *sent_status_info, int field); +char* msg_media_item_get_str(void *data, int field, int size); +int msg_media_item_get_int(void *data, int field, int *value); +int msg_conversation_get_list_hnd(void *data, int field, void **value); +int msg_multipart_get_str_value(void *data, int field, char *value, int size); +int msg_multipart_get_int_value(void *data, int field, int *value); +int msg_multipart_set_str_value(void *data, int field, char *value, int size); #endif /* MSG_PRIVATE_H_ */ diff --git a/include/mapi/msg_storage.h b/include/mapi/msg_storage.h index 7faa28a..837af02 100755 --- a/include/mapi/msg_storage.h +++ b/include/mapi/msg_storage.h @@ -1,38 +1,22 @@ /* - * msg-service - * - * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved + * Copyright (c) 2014 Samsung Electronics Co., Ltd. All rights reserved * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * 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. - * */ -/** - * @file MapiStorage.h - * @brief Defines storage API of messaging framework - * @version 1.0 - */ - #ifndef MAPI_STORAGE_H #define MAPI_STORAGE_H -/** - * @section Introduction - * - Introduction : Overview on Messaging Storage API - * @section Program - * - Program : Messaging Storage API Reference - */ - /*================================================================================================== INCLUDE FILES ==================================================================================================*/ @@ -44,2073 +28,1103 @@ extern "C" { #endif -/** - * @ingroup MESSAGING_FRAMEWORK - * @defgroup MESSAGING_STORAGE_API Messaging Storage API - * @{ - */ - -/*================================================================================================== - FUNCTION PROTOTYPES -==================================================================================================*/ /** - - * \par Description: - * Saves a message to the database. + * @internal + * @ingroup MSG_SERVICE_FRAMEWORK + * @defgroup MSG_SERVICE_FRAMEWORK_STORAGE_MODULE Storage API + * @brief The Storage API provides functions to get message information with multiple types. * - * \par Purpose: - * This API is used to save Message object to the database. + * @internal + * @addtogroup MSG_SERVICE_FRAMEWORK_STORAGE_MODULE + * @{ * - * \par Typical use case: - * Save Message feature is used when the message is to be stored to persistent memory for later reference. + * @section MSG_SERVICE_FRAMEWORK_STORAGE_MODULE_HEADER Required Header + * \#include <msg_storage.h> * - * \par Method of function operation: - * Sets up the database connection and inserts the message to message table. + * @section MSG_SERVICE_FRAMEWORK_STORAGE_MODULE_OVERVIEW Overview * - * \par Sync (or) Async: - * This is a Synchronous API. + * The Storage API provides the following functionalities: * - * \par Important notes: - * - Mandatory fields of a message structure MUST be valid, otherwise the function will be failed. + * - Get message information * - * \param input - msg_handle_t handle is Message handle. - * \param input - msg_message_t msg is a pointer to an msg_message_t structure. - * \param input - send_opt is a pointer to an MSG_SENDINGOPT_S structure. + * @section MSG_SERVICE_FRAMEWORK_STORAGE_MODULE_FEATURE Related Features + * This API is related with the following features:\n + * - http://tizen.org/feature/network.telephony\n * - * \return Return Type (int(msg_error_t)) \n - * - MSG_SUCCESS - Successfully connected to Messaging Service \n - * - MSG_ERR_NULL_POINTER - Input parameter is NULL. - * - MSG_ERR_STORAGE_ERROR - Storage is error. + * It is recommended to design feature related codes in your application for reliability.\n * - * \par Prospective clients: - * External/Native Apps using Messaging Services. + * You can check if a device supports the related features for this API by using @ref CAPI_SYSTEM_SYSTEM_INFO_MODULE, thereby controlling the procedure of your application.\n * - * \par Related functions: - * None + * To ensure your application is only running on the device with specific features, please define the features in your manifest file using the manifest editor in the SDK.\n * - * \par Known issues/bugs: - * None + * More details on featuring your application can be found from <a href="../org.tizen.mobile.native.appprogramming/html/ide_sdk_tools/feature_element.htm"><b>Feature Element</b>.</a> * - * \par Sample code: - * \code - * ... - * - * msg_handle_t msgHandle = NULL; - * msg_message_t msg; - * MSG_SENDINGOPT_S sendingOpt = {0}; + */ + + +/*================================================================================================== + FUNCTION PROTOTYPES +==================================================================================================*/ + +/** + * @brief Saves a message to the database. * - * ... + * @since_tizen 2.3 + * @privlevel public + * @privilege %http://tizen.org/privilege/message.write * - * err = msg_open_msg_handle(&msgHandle); + * @remarks Mandatory fields of a message structure MUST be valid, otherwise the function will fail. * - * ... + * @param[in] handle The Message handle + * @param[in] msg A pointer to a message structure + * @param[in] send_opt A pointer to a message structure for sending option * - * err = msg_add_message(handle, (msg_message_t) &msg, &sendingOpt); - * if( err != MSG_SUCCESS ) - * { - * printf("err [%d]", err); - * return err; - * } + * @return The message ID on success, + * otherwise a negative error value * - * ... - * \endcode + * @retval MESSAGE_ID Success in operation + * @retval MSG_ERR_INVALID_PARAMETER(-9) Invalid parameter + * @retval MSG_ERR_STORAGE_ERROR Storage error + * @retval MSG_ERR_PERMISSION_DENIED The application does not have the privilege to call this method + * @retval MSG_ERR_NOT_SUPPORTED Not supported */ -/*================================================================================================*/ + int msg_add_message(msg_handle_t handle, const msg_struct_t msg, const msg_struct_t send_opt); /** - - * \par Description: - * Adds a SyncML message to the database. - * - * \par Purpose: - * This API is used to save a SyncML message to the database. - * - * \par Typical use case: - * Save Message feature is used when the message is to be stored to persistent memory for later reference. - * - * \par Method of function operation: - * Sets up the database connection and inserts the syncml message to message table. - * - * \par Sync (or) Async: - * This is a Synchronous API. + * @brief Adds a SyncML message to the database. * - * \par Important notes: - * - Mandatory fields of a message structure MUST be valid, otherwise the function will be failed. + * @since_tizen 2.3 + * @privlevel public + * @privilege %http://tizen.org/privilege/message.write * - * \param input - msg_handle_t handle is Message handle. - * \param input - MSG_SYNCML_MESSAGE_S syncml_msg is a pointer to an MSG_SYNCML_MESSAGE_S structure. + * @remarks Mandatory fields of a message structure MUST be valid, otherwise the function will fail. * - * \return Return Type (int(msg_error_t)) \n - * - MSG_SUCCESS - Success in operation. - * - MSG_ERR_NULL_POINTER - pMsg is NULL. - * - MSG_ERR_INVALID_MSGHANDLE - Message handle is invalid. - * - MSG_ERR_MSGHANDLE_NOT_CONNECTED - Message handle is not connected. - * - MSG_ERR_STORAGE_FULL - Storage is FULL. - * - MSG_ERR_COMMUNICATION_ERROR - Communication between client and server is error. - * - MSG_ERR_MEMORY_ERROR - Memory is error. - * - MSG_ERR_MAX_NUMBER_REACHED - Max number is reached. - * - MSG_ERR_PLUGIN - Generic error code for plugin. + * @param[in] handle The Message handle + * @param[in] syncml_msg A pointer to a syncml message structure * - * \par Prospective clients: - * External/Native Apps using Messaging Services. + * @return @c 0 on success, + * otherwise a negative error value * - * \par Related functions: - * None - * - * \par Known issues/bugs: - * None - * - * \par Sample code: - * \code - * ... - * - * msg_handle_t msgHandle = NULL; - * MSG_SYNCML_MESSAGE_S syncMLMsg; - * - * ... - * - * err = msg_open_msg_handle(&msgHandle); - * - * ... - * - * int err = msg_add_syncml_message(msgHandle, &syncMLMsg); - * if( err != MSG_SUCCESS ) - * { - * printf("err [%d]", err); - * return err; - * } - * - * ... - * \endcode + * @retval MSG_SUCCESS Success in operation + * @retval MSG_ERR_INVALID_PARAMETER Input parameter is invalid + * @retval MSG_ERR_STORAGE_ERROR Storage error + * @retval MSG_ERR_PERMISSION_DENIED The application does not have the privilege to call this method + * @retval MSG_ERR_NOT_SUPPORTED Not supported */ -/*================================================================================================*/ + int msg_add_syncml_message(msg_handle_t handle, const msg_struct_t syncml_msg); /** - - * \par Description: - * Updates a message in the database. - * - * \par Purpose: - * This API is used to update a message in the database. - * - * \par Typical use case: - * Update message feature is used when a previously saved message is to be updated. - * - * \par Method of function operation: - * Sets up the database connection and set the message's new values to message table. - * - * \par Sync (or) Async: - * This is a Synchronous API. - * - * \par Important notes: - * - The function is to update message data for the message indentified by the given msgId as long as the given values are valid. - * - msg->msgId MUST NOT be updated because msg->msgId is a unique Id on platform. - * - If applications want to move a message between folders, applications SHOULD call msg_move_to_folder. - * - msg->storageId MUST NOT be updated. - * - The function will return MSG_ERR_INVALID_MESSAGE, if inputting a new msg->storageId. - * - If applications want to move the message between storages, applications SHOULD call msg_move_to_storage. - * - * \param input - handle is Message handle. - * \param input - msg is a pointer to an msg_message_t structure. - * \param input - send_opt is a pointer to an MSG_SENDINGOPT_S structure. - * - * \return Return Type (int(msg_error_t)) \n - * - MSG_SUCCESS - Success in operation. - * - MSG_ERR_INVALID_PARAMETER - Parameter is invalid. - * - MSG_ERR_STORAGE_ERROR - Storage is error. - * - * \par Prospective clients: - * External/Native Apps using Messaging Services. - * - * \par Related functions: - * None - * - * \par Known issues/bugs: - * None - * - * \par Sample code: - * \code - * ... - * - * msg_handle_t msgHandle = NULL; - * MSG_SYNCML_MESSAGE_S syncMLMsg; - * MSG_SENDINGOPT_S sendingOpt = {0}; - * - * ... - * - * err = msg_open_msg_handle(&msgHandle); - * - * ... - * - * err = msg_update_message(hMsgHandle, pMsg, &sendOpt); - * if( err != MSG_SUCCESS ) - * { - * printf("err [%d]", err); - * return err; - * } - * - * ... - * \endcode + * @brief Updates a message in the database. + * + * @since_tizen 2.3 + * @privlevel public + * @privilege %http://tizen.org/privilege/message.write + * + * @remarks The function is to update message data for the message identified by the given msgId as long as the given values are valid. + * @remarks Message ID MUST NOT be updated because that is a unique ID on platform. + * @remarks If applications want to move a message between folders, applications SHOULD call msg_move_to_folder(). + * @remarks Storage ID MUST NOT be updated. + * @remarks If applications want to move the message between storages, applications SHOULD call msg_move_to_storage(). + * + * @param[in] handle The Message handle + * @param[in] msg A pointer to a message structure + * @param[in] send_opt A pointer to a message sending option structure + * + * @return @c 0 on success, + * otherwise a negative error value + * + * @retval MSG_SUCCESS Success in operation + * @retval MSG_ERR_INVALID_PARAMETER Input parameter is invalid + * @retval MSG_ERR_STORAGE_ERROR Storage error + * @retval MSG_ERR_PERMISSION_DENIED The application does not have the privilege to call this method + * @retval MSG_ERR_NOT_SUPPORTED Not supported */ -/*================================================================================================*/ + int msg_update_message(msg_handle_t handle, const msg_struct_t msg, const msg_struct_t send_opt); /** - - * \par Description: - * Updates a message's read status in the database. + * @brief Updates a message's read status in the database. * - * \par Purpose: - * This API is used to Updates a message's read status in the database. + * @since_tizen 2.3 + * @privlevel public + * @privilege %http://tizen.org/privilege/message.write * - * \par Typical use case: - * Update message's read status for a previously saved message. + * @param[in] handle The message handle + * @param[in] msg_id The message ID + * @param[in] read Set @c true if the message is read, + * otherwise set @c false if the message is not read * - * \par Method of function operation: - * Sets up the database connection and updates the message's read status to message table. + * @return @c 0 on success, + * otherwise a negative error value * - * \par Sync (or) Async: - * This is a Synchronous API. - * - * \par Important notes: - * - None - * - * \param input - handle is Message handle. - * \param input - msg_id is Message ID. - * \parem input - read is boolean for indicating whether a message is read or not. - * - * \return Return Type (int(msg_error_t)) \n - * - MSG_SUCCESS - Success in operation. - * - MSG_ERR_INVALID_PARAMETER - Parameter is invalid. - * - MSG_ERR_STORAGE_ERROR - Storage is error. - * - * \par Prospective clients: - * External/Native Apps using Messaging Services. - * - * \par Related functions: - * None - * - * \par Known issues/bugs: - * None - * - * \par Sample code: - * \code - * ... - * - * msg_handle_t msgHandle = NULL; - * MSG_SYNCML_MESSAGE_S syncMLMsg; - * MSG_SENDINGOPT_S sendingOpt = {0}; - * - * ... - * - * err = msg_open_msg_handle(&msgHandle); - * - * ... - * - * err = msg_update_message(hMsgHandle, pMsg, &sendOpt); - * if( err != MSG_SUCCESS ) - * { - * printf("err [%d]", err); - * return err; - * } - * - * ... - * \endcode + * @retval MSG_SUCCESS Success in operation + * @retval MSG_ERR_INVALID_PARAMETER Parameter is invalid + * @retval MSG_ERR_STORAGE_ERROR Storage error + * @retval MSG_ERR_PERMISSION_DENIED The application does not have the privilege to call this method + * @retval MSG_ERR_NOT_SUPPORTED Not supported */ -/*================================================================================================*/ + int msg_update_read_status(msg_handle_t handle, msg_message_id_t msg_id, bool read); /** - - * \par Description: - * Updates a message's protected status in the database. + * @brief Updates a message's protected status in the database. * - * \par Purpose: - * This API is used to Updates a message's protected status in the database. + * @since_tizen 2.3 + * @privlevel public + * @privilege %http://tizen.org/privilege/message.write * - * \par Typical use case: - * Update message's protected status for a previously saved message. + * @param[in] handle The message handle + * @param[in] msg_id The message ID + * @parem[in] is_protected Set @c true if a message is protected, + * otherwise set @c false if message is not protected * - * \par Method of function operation: - * Sets up the database connection and updates the message's protected status to message table. + * @return @c 0 on success, + * otherwise a negative error value * - * \par Sync (or) Async: - * This is a Synchronous API. - * - * \par Important notes: - * - None - * - * \param input - handle is Message handle. - * \param input - msg_id is Message ID. - * \parem input - is_protected is boolean for indicating whether a message is protected or not. - * - * \return Return Type (int(msg_error_t)) \n - * - MSG_SUCCESS - Success in operation. - * - MSG_ERR_INVALID_PARAMETER - Parameter is invalid. - * - MSG_ERR_STORAGE_ERROR - Storage is error. - * - * \par Prospective clients: - * External/Native Apps using Messaging Services. - * - * \par Related functions: - * None - * - * \par Known issues/bugs: - * None - * - * \par Sample code: - * \code - * ... - * - * msg_handle_t msgHandle = NULL; - * MSG_SYNCML_MESSAGE_S syncMLMsg; - * MSG_SENDINGOPT_S sendingOpt = {0}; - * - * ... - * - * err = msg_open_msg_handle(&msgHandle); - * - * ... - * - * err = msg_update_protected_status(hMsgHandle, 0, true); - * if( err != MSG_SUCCESS ) - * { - * printf("err [%d]", err); - * return err; - * } - * - * ... - * \endcode + * @retval MSG_SUCCESS Success in operation + * @retval MSG_ERR_INVALID_PARAMETER Parameter is invalid + * @retval MSG_ERR_STORAGE_ERROR Storage error + * @retval MSG_ERR_PERMISSION_DENIED The application does not have the privilege to call this method + * @retval MSG_ERR_NOT_SUPPORTED Not supported */ -/*================================================================================================*/ + int msg_update_protected_status(msg_handle_t handle, msg_message_id_t msg_id, bool is_protected); /** - - * \par Description: - * Deletes a message by Message ID from the database. + * @brief Deletes a message by Message ID from the database. * - * \par Purpose: - * This API is used to delete a message by Message ID from the database. + * @since_tizen 2.3 + * @privlevel public + * @privilege %http://tizen.org/privilege/message.write * - * \par Typical use case: - * Deletes a previously saved message from the database. + * @param[in] handle The message handle + * @param[in] msg_id The message ID of the message to be deleted * - * \par Method of function operation: - * Sets up the database connection and deletes a message by Message ID from the message table. + * @return @c 0 on success, + * otherwise a negative error value * - * \par Sync (or) Async: - * This is a Synchronous API. - * - * \par Important notes: - * - None - * - * \param input - handle is Message handle. - * \param input - msg_id is the ID of the Message to be deleted. - * - * \return Return Type (int(msg_error_t)) \n - * - MSG_SUCCESS - Success in operation. - * - MSG_ERR_INVALID_PARAMETER - Parameter is invalid. - * - MSG_ERR_STORAGE_ERROR - Storage is error. - * - * \par Prospective clients: - * External/Native Apps using Messaging Services. - * - * \par Related functions: - * None - * - * \par Known issues/bugs: - * None - * - * \par Sample code: - * \code - * ... - * - * msg_handle_t msgHandle = NULL; - * MSG_SYNCML_MESSAGE_S syncMLMsg; - * MSG_SENDINGOPT_S sendingOpt = {0}; - * - * ... - * - * err = msg_open_msg_handle(&msgHandle); - * - * ... - * - * err = msg_delete_message(msgHandle, 0); - * if( err != MSG_SUCCESS ) - * { - * printf("err [%d]", err); - * return err; - * } - * - * ... - * \endcode + * @retval MSG_SUCCESS Success in operation + * @retval MSG_ERR_INVALID_PARAMETER Parameter is invalid + * @retval MSG_ERR_STORAGE_ERROR Storage error + * @retval MSG_ERR_PERMISSION_DENIED The application does not have the privilege to call this method + * @retval MSG_ERR_NOT_SUPPORTED Not supported */ -/*================================================================================================*/ + int msg_delete_message(msg_handle_t handle, msg_message_id_t msg_id); /** - - * \par Description: - * Deletes all messages in the specified folder from the database. + * @brief Deletes all messages in the specified folder from the database. * - * \par Purpose: - * This API is used to delete all messages in the specified folder from the database. + * @since_tizen 2.3 + * @privlevel public + * @privilege %http://tizen.org/privilege/message.write * - * \par Typical use case: - * Deletes all messages in the specified folder from the database. + * @param[in] handle Message handle + * @param[in] msg_id Message ID of the message to be deleted + * @param[in] bOnlyDB Set @c true to not delete messages in SIM, + * otherwise set @c false to delete messages in SIM * - * \par Method of function operation: - * Sets up the database connection and Deletes all messages in the specified folder from the message table. + * @return @c 0 on success, + * otherwise a negative error value * - * \par Sync (or) Async: - * This is a Synchronous API. - * - * \par Important notes: - * - None - * - * \param input - handle is Message handle. - * \param input - folder_id is the ID of the folder to be deleted. - * - * \return Return Type (int(msg_error_t)) \n - * - MSG_SUCCESS - Success in operation. - * - MSG_ERR_INVALID_PARAMETER - Parameter is invalid. - * - MSG_ERR_STORAGE_ERROR - Storage is error. - * - * \par Prospective clients: - * External/Native Apps using Messaging Services. - * - * \par Related functions: - * None - * - * \par Known issues/bugs: - * None - * - * \par Sample code: - * \code - * ... - * - * msg_handle_t msgHandle = NULL; - * MSG_SYNCML_MESSAGE_S syncMLMsg; - * MSG_SENDINGOPT_S sendingOpt = {0}; - * - * ... - * - * err = msg_open_msg_handle(&msgHandle); - * - * ... - * - * err = msg_delete_all_msgs_in_folder(msgHandle, MSG_DRAFT_ID); - * if( err != MSG_SUCCESS ) - * { - * printf("err [%d]", err); - * return err; - * } - * - * ... - * \endcode + * @retval MSG_SUCCESS Success in operation + * @retval MSG_ERR_INVALID_PARAMETER Parameter is invalid + * @retval MSG_ERR_STORAGE_ERROR Storage error + * @retval MSG_ERR_PERMISSION_DENIED The application does not have the privilege to call this method + * @retval MSG_ERR_NOT_SUPPORTED Not supported */ -/*================================================================================================*/ + int msg_delete_all_msgs_in_folder(msg_handle_t handle, msg_folder_id_t folder_id, bool bOnlyDB); /** - - * \par Description: - * Moves a message to the specified folder in the database. - * - * \par Purpose: - * This API is used to move a message to the specified folder the database. - * - * \par Typical use case: - * Deletes all messages in the specified folder from the database. - * - * \par Method of function operation: - * Sets up the database connection and Deletes all messages in the specified folder from the message table. - * - * \par Sync (or) Async: - * This is a Synchronous API. - * - * \par Important notes: - * - None - * - * \param input - handle is Message handle. - * \param input - msg_id is the ID of the message to be moved. - * \param input - dest_folder_id is the ID of the destination folder. - * - * \return Return Type (int(msg_error_t)) \n - * - MSG_SUCCESS - Success in operation. - * - MSG_ERR_INVALID_PARAMETER - Parameter is invalid. - * - MSG_ERR_STORAGE_ERROR - Storage is error. + * @brief Moves a message to the specified folder in the database. * - * \par Prospective clients: - * External/Native Apps using Messaging Services. + * @since_tizen 2.3 + * @privlevel public + * @privilege %http://tizen.org/privilege/message.write * - * \par Related functions: - * None + * @param[in] handle The message handle + * @param[in] msg_id The message ID of the message to be moved + * @param[in] dest_folder_id The ID of the destination folder * - * \par Known issues/bugs: - * None + * @return @c 0 on success, + * otherwise a negative error value * - * \par Sample code: - * \code - * ... - * - * msg_handle_t msgHandle = NULL; - * MSG_SYNCML_MESSAGE_S syncMLMsg; - * MSG_SENDINGOPT_S sendingOpt = {0}; - * - * ... - * - * err = msg_open_msg_handle(&msgHandle); - * - * ... - * - * err = msg_move_msg_to_folder(hMsgHandle, 0, MSG_OUTBOX_ID); - * if( err != MSG_SUCCESS ) - * { - * printf("err [%d]", err); - * return err; - * } - * - * ... - * \endcode + * @retval MSG_SUCCESS Success in operation + * @retval MSG_ERR_INVALID_PARAMETER Parameter is invalid + * @retval MSG_ERR_STORAGE_ERROR Storage error + * @retval MSG_ERR_PERMISSION_DENIED The application does not have the privilege to call this method + * @retval MSG_ERR_NOT_SUPPORTED Not supported */ -/*================================================================================================*/ + int msg_move_msg_to_folder(msg_handle_t handle, msg_message_id_t msg_id, msg_folder_id_t dest_folder_id); /** - - * \par Description: - * Moves a message to the other storage. - * - * \par Purpose: - * This API is usd to move a message to the other storage. - * - * \par Typical use case: - * Moves a message to the other storage type. - * - * \par Method of function operation: - * Sets up the database connection and moves a messages to specified storage type. - * - * \par Sync (or) Async: - * This is a Synchronous API. - * - * \par Important notes: - * - None - * - * \param input - handle is Message handle. - * \param input - msg_id is the ID of the message to be moved. - * \param input - storage_id is the ID of the destination storage. - * - * \return Return Type (int(msg_error_t)) \n - * - MSG_SUCCESS - Success in operation. - * - MSG_ERR_INVALID_PARAMETER - Parameter is invalid. - * - MSG_ERR_STORAGE_ERROR - Storage is error. + * @brief Moves a message to the other storage. * - * \par Prospective clients: - * External/Native Apps using Messaging Services. + * @since_tizen 2.3 + * @privlevel public + * @privilege %http://tizen.org/privilege/message.write * - * \par Related functions: - * None + * @param[in] handle The message handle + * @param[in] msg_id The message ID of the message to be moved + * @param[in] storage_id The ID of the destination storage * - * \par Known issues/bugs: - * None + * @return @c 0 on success, + * otherwise a negative error value * - * \par Sample code: - * \code - * ... - * - * msg_handle_t msgHandle = NULL; - * MSG_SYNCML_MESSAGE_S syncMLMsg; - * MSG_SENDINGOPT_S sendingOpt = {0}; - * - * ... - * - * err = msg_open_msg_handle(&msgHandle); - * - * ... - * - * err = msg_move_msg_to_storage( msgHandle, 0, MSG_STORAGE_PHONE); - * if( err != MSG_SUCCESS ) - * { - * printf("err [%d]", err); - * return err; - * } - * - * ... - * \endcode + * @retval MSG_SUCCESS Success in operation + * @retval MSG_ERR_INVALID_PARAMETER Parameter is invalid + * @retval MSG_ERR_STORAGE_ERROR Storage error + * @retval MSG_ERR_PERMISSION_DENIED The application does not have the privilege to call this method + * @retval MSG_ERR_NOT_SUPPORTED Not supported */ -/*================================================================================================*/ + int msg_move_msg_to_storage(msg_handle_t handle, msg_message_id_t msg_id, msg_storage_id_t storage_id); /** - - * \par Description: - * Gets the number of messages in the specified folder from the database. - * - * \par Purpose: - * This API is used to get the number of messages in the specified folder from the database. - * - * \par Typical use case: - * Gets the number of messages in the specified folder from the database. - * - * \par Method of function operation: - * Sets up the database connection and Gets the number of messages in the specified folder from the message table. - * - * \par Sync (or) Async: - * This is a Synchronous API. - * - * \par Important notes: - * - None - * - * \param input - handle is Message handle. - * \param input - folder_id is the ID of the folder to be counted. - * \param output - count_info is a pointer to an MSG_COUNT_INFO_S structure. - * - * \return Return Type (int(msg_error_t)) \n - * - MSG_SUCCESS - Success in operation. - * - MSG_ERR_INVALID_PARAMETER - Parameter is invalid. - * - MSG_ERR_STORAGE_ERROR - Storage is error. + * @brief Gets the number of messages in the specified folder from the database. * - * \par Prospective clients: - * External/Native Apps using Messaging Services. + * @since_tizen 2.3 + * @privlevel public + * @privilege %http://tizen.org/privilege/message.read * - * \par Related functions: - * None + * @param[in] handle The message handle + * @param[in] msg_id The message ID of the message to be counted + * @param[out] count_info A pointer to an #MSG_COUNT_INFO_S structure * - * \par Known issues/bugs: - * None + * @return @c 0 on success, + * otherwise a negative error value * - * \par Sample code: - * \code - * ... - * - * msg_handle_t msgHandle = NULL; - * MSG_COUNT_INFO_S countInfo; - * - * ... - * - * err = msg_open_msg_handle(&msgHandle); - * - * ... - * - * err = msg_count_message(msgHandle, MSG_OUTBOX_ID, &countInfo) -* if( err != MSG_SUCCESS ) - * { - * printf("err [%d]", err); - * return err; - * } - * - * ... - * \endcode + * @retval MSG_SUCCESS Success in operation + * @retval MSG_ERR_INVALID_PARAMETER Parameter is invalid + * @retval MSG_ERR_STORAGE_ERROR Storage error + * @retval MSG_ERR_PERMISSION_DENIED The application does not have the privilege to call this method + * @retval MSG_ERR_NOT_SUPPORTED Not supported */ -/*================================================================================================*/ + int msg_count_message(msg_handle_t handle, msg_folder_id_t folder_id, msg_struct_t count_info); /** - - * \par Description: - * Gets the number of messages of specific message type. - * - * \par Purpose: - * This API is used to get the number of messages of specific type. - * - * \par Typical use case: - * Gets the count of message of specific types such as SMS, MMS. - * - * \par Method of function operation: - * Sets up the database connection and queries the number of messages in the specified folder from the message table based on required message type. - * - * \par Sync (or) Async: - * This is a Synchronous API. - * - * \par Important notes: - * - None - * - * \param input - handle is Message handle. - * \param input - msg_type is the message type to be counted. - * \param output - msg_count is a pointer to the number of message. - * - * \return Return Type (int(msg_error_t)) \n - * - MSG_SUCCESS - Success in operation. - * - MSG_ERR_INVALID_PARAMETER - Parameter is invalid. - * - MSG_ERR_STORAGE_ERROR - Storage is error. - * - * \par Prospective clients: - * External/Native Apps using Messaging Services. - * - * \par Related functions: - * None - * - * \par Known issues/bugs: - * None - * - * \par Sample code: - * \code - * ... - * - * msg_handle_t msgHandle = NULL; - * MSG_COUNT_INFO_S countInfo; - * - * ... + * @brief Gets the number of messages of specific message type. * - * err = msg_open_msg_handle(&msgHandle); + * @since_tizen 2.3 + * @privlevel public + * @privilege %http://tizen.org/privilege/message.read * - * ... + * @param[in] handle The message handle + * @param[in] msg_type The message type to be counted + * @param[out] msg_count A pointer to the number of message * - * err = msg_count_msg_by_type(msgHandle, MSG_TYPE_SMS, &countInfo); - * if( err != MSG_SUCCESS ) - * { - * printf("err [%d]", err); - * return err; - * } + * @return @c 0 on success, + * otherwise a negative error value * - * ... - * \endcode + * @retval MSG_SUCCESS Success in operation + * @retval MSG_ERR_INVALID_PARAMETER Parameter is invalid + * @retval MSG_ERR_STORAGE_ERROR Storage error + * @retval MSG_ERR_PERMISSION_DENIED The application does not have the privilege to call this method + * @retval MSG_ERR_NOT_SUPPORTED Not supported */ -/*================================================================================================*/ + int msg_count_msg_by_type(msg_handle_t handle, msg_message_type_t msg_type, int *msg_count); /** - - * \par Description: - * Gets the number of messages of specific address. - * - * \par Purpose: - * This API is used to get the number of messages from a specific address. - * - * \par Typical use case: - * Get the count of messages from the specified address - * - * \par Method of function operation: - * Sets up the database connection and queries the number of messages based on address from the message table. - * - * \par Sync (or) Async: - * This is a Synchronous API. - * - * \par Important notes: - * - If addr_info is NULL, nothing happens. - * - * \param input - handle is Message handle. - * \param input - addr_info is a pointer to an MSG_ADDRESS_INFO_LIST_S structure. - * \param input - msg_thread_count_list is a pointer to an MSG_THREAD_COUNT_INFO_S structure. + * @brief Gets the number of messages of specific address. * - * \return Return Type (int(msg_error_t)) \n - * - MSG_SUCCESS - Success in operation. - * - MSG_ERR_INVALID_PARAMETER - Parameter is invalid. - * - MSG_ERR_STORAGE_ERROR - Storage is error. + * @since_tizen 2.3 + * @privlevel public + * @privilege %http://tizen.org/privilege/message.read * - * \par Prospective clients: - * External/Native Apps using Messaging Services. + * @remarks If @a addr_info is @c NULL, nothing happens. * - * \par Related functions: - * None + * @param[in] handle The message handle + * @param[in] addr_info A pointer to an address list information structure + * @param[in] msg_thread_count_list A pointer to an thread count information structure * - * \par Known issues/bugs: - * None + * @return @c 0 on success, + * otherwise a negative error value * - * \par Sample code: - * \code - * ... - * - * msg_handle_t msgHandle = NULL; - * MSG_COUNT_INFO_S countInfo; - * - * ... - * - * err = msg_open_msg_handle(&msgHandle); - * - * ... - * - * err = msg_count_msg_by_type(msgHandle, MSG_TYPE_SMS, &countInfo); - * if( err != MSG_SUCCESS ) - * { - * printf("err [%d]", err); - * return err; - * } - * - * ... - * \endcode + * @retval MSG_SUCCESS Success in operation + * @retval MSG_ERR_INVALID_PARAMETER Parameter is invalid + * @retval MSG_ERR_STORAGE_ERROR Storage error + * @retval MSG_ERR_PERMISSION_DENIED The application does not have the privilege to call this method + * @retval MSG_ERR_NOT_SUPPORTED Not supported */ -/*================================================================================================*/ + int msg_count_msg_by_contact(msg_handle_t handle, const msg_struct_t addr_info, msg_struct_t msg_thread_count_list); /** - - * \par Description: - * Gets the detail information of a message from the database. - * - * \par Purpose: - * This API is used to get the number of messages from a specific address. - * - * \par Typical use case: - * Get the count of messages from the specified address - * - * \par Method of function operation: - * Sets up the database connection and queries the number of messages based on address from the message table. - * - * \par Sync (or) Async: - * This is a Synchronous API. - * - * \par Important notes: - * - If addr_info is NULL, nothing happens. - * - Applications need to call msg_release_message to free the memory. - * - However, if this function is failed, the memory for the message is NOT allocated in this function. - * -handle is Message handle. - * \param input - handle is Message handle. - * \param input - msg_id is the ID of the Message to be returned. - * \param output - msg is a pointer to an msg_message_t structure. - * \param input - send_opt is a pointer to an MSG_SENDINGOPT_S structure. + * @brief Gets the detail information of a message from the database. + * @details This API is used to get the detail information of message by message ID. * - * \return Return Type (int(msg_error_t)) \n - * - MSG_SUCCESS - Success in operation. - * - MSG_ERR_INVALID_PARAMETER - Parameter is invalid. - * - MSG_ERR_STORAGE_ERROR - Storage is error. + * @since_tizen 2.3 + * @privlevel public + * @privilege %http://tizen.org/privilege/message.read * - * \par Prospective clients: - * External/Native Apps using Messaging Services. + * @remarks Applications need to call msg_release_struct() to free the memory. + * @remarks However, if this function fails, the memory for the message is NOT allocated in this function. * - * \par Related functions: - * - None + * @param[in] handle The Message handle + * @param[in] msg_id The ID of the Message to be returned + * @param[out] msg A pointer to a #msg_struct_t message structure + * @param[in] send_opt A pointer to a #msg_struct_t sending option structure * - * \par Known issues/bugs: - * None + * @return @c 0 on success, + * otherwise a negative error value * - * \par Sample code: - * \code - * ... - * - * msg_handle_t msgHandle = NULL; - * - * ... - * msg_message_t msg = msg_new_message(); - * MSG_SENDINGOPT_S sendOpt = {0, }; - * ... - * err = msg_get_message(msgHandle, 0, msg, &sendOpt); - * if( err != MSG_SUCCESS ) - * { - * printf("err [%d]", err); - * return err; - * } - * - * ... - * \endcode + * @retval MSG_SUCCESS Success in operation + * @retval MSG_ERR_INVALID_PARAMETER Parameter is invalid + * @retval MSG_ERR_STORAGE_ERROR Storage error + * @retval MSG_ERR_PERMISSION_DENIED The application does not have the privilege to call this method + * @retval MSG_ERR_NOT_SUPPORTED Not supported */ -/*================================================================================================*/ + int msg_get_message(msg_handle_t handle, msg_message_id_t msg_id, msg_struct_t msg, msg_struct_t send_opt); -int msg_get_conversation(msg_handle_t handle, msg_message_id_t msg_id, msg_struct_t conv); -int msg_get_vobject_data(msg_handle_t handle, msg_message_id_t msg_id, void** encoded_data); /** - - * \par Description: - * Returns the common information list of messages with selected folder id. + * @brief Gets the detail information of a message on conversation list. + * @details This API is used to get the conversation informations of message by message ID. * - * \par Purpose: - * This API is used to get the common information list of messages with selected folder id from database. + * @since_tizen 2.3 + * @privlevel public + * @privilege %http://tizen.org/privilege/message.read * - * \par Typical use case: - * Get the common information from the specified folder from database. + * @param[in] handle The Message handle + * @param[in] msg_id The ID of the Message to be returned + * @param[out] conv A pointer to a #msg_struct_t of message structure * - * \par Method of function operation: - * Sets up the database connection and queries the common information based on selected folder id from the message and folder tables. + * @return @c 0 on success, + * otherwise a negative error value * - * \par Sync (or) Async: - * This is a Synchronous API. - * - * \par Important notes: - * - The memory for a message will be allocated in this function. - * - Applications need to call msg_release_folder_view_list to free the memory. - * - However, if this function is failed, the memory for the message is NOT allocated in this function. - * - * \param input - handle is Message handle. - * \param input - folder_id is the ID of the folder to be returned. - * \param input - sort_rule indicates a sort type and sort order for querying messages. - * \param output - msg_folder_view_list is a pointer to an MSG_FOLDER_VIEW_LIST_S structure. - * - * \return Return Type (int(msg_error_t)) \n - * - MSG_SUCCESS - Success in operation. - * - MSG_ERR_INVALID_PARAMETER - Parameter is invalid. - * - MSG_ERR_STORAGE_ERROR - Storage is error. - * - * \par Prospective clients: - * External/Native Apps using Messaging Services. - * - * \par Related functions: - * - None - * - * \par Known issues/bugs: - * None + * @retval MSG_SUCCESS Success in operation + * @retval MSG_ERR_INVALID_PARAMETER Parameter is invalid + * @retval MSG_ERR_STORAGE_ERROR Storage error + * @retval MSG_ERR_PERMISSION_DENIED The application does not have the privilege to call this method + * @retval MSG_ERR_NOT_SUPPORTED Not supported + */ + +int msg_get_conversation(msg_handle_t handle, msg_message_id_t msg_id, msg_struct_t conv); + + +/** + * @brief Gets the v-object data of message. + * @details This API is used to get the v-object data of message by message ID. * - * \par Sample code: - * \code - * ... + * @since_tizen 2.3 + * @privlevel public + * @privilege %http://tizen.org/privilege/message.read * - * msg_handle_t msgHandle = NULL; + * @param[in] handle The Message handle + * @param[in] msg_id The ID of the Message to be returned + * @param[out] encoded_data A pointer to a encoded v-object data of message * - * ... - * MSG_FOLDER_VIEW_LIST_S folderViewList; - * ... - * err = msg_get_folder_view_list(hMsgHandle, 0, NULL, &folderViewList); - * if( err != MSG_SUCCESS ) - * { - * printf("err [%d]", err); - * return err; - * } + * @return @c 0 on success, + * otherwise a negative error value * - * ... - * \endcode + * @retval MSG_SUCCESS Success in operation + * @retval MSG_ERR_INVALID_PARAMETER Parameter is invalid + * @retval MSG_ERR_STORAGE_ERROR Storage error + * @retval MSG_ERR_PERMISSION_DENIED The application does not have the privilege to call this method + * @retval MSG_ERR_NOT_SUPPORTED Not supported */ -/*================================================================================================*/ -int msg_get_folder_view_list(msg_handle_t handle, msg_folder_id_t folder_id, const msg_struct_t sort_rule, msg_struct_list_s *msg_folder_view_list); +int msg_get_vobject_data(msg_handle_t handle, msg_message_id_t msg_id, void** encoded_data); -/** - * \par Description: - * Returns the information of all peers to whom messages have been sent or recieved. - * - * \par Purpose: - * This API is used to get the information of all peers to whom messages have been sent or recieved. - * - * \par Typical use case: - * Get the common information from the specified folder from database. - * - * \par Method of function operation: - * Frees the memory occupied by MSG_FOLDER_VIEW_LIST_S object and its members. +/** + * @brief Gets the information of all peers to whom messages have been sent or received. * - * \par Sync (or) Async: - * This is a Synchronous API. + * @since_tizen 2.3 + * @privlevel public + * @privilege %http://tizen.org/privilege/message.read * - * \par Important notes: - * - The memory for a list will be allocated in this function. - * - Applications need to call msg_release_thread_view_list to free the memory. - * - However, if this function is failed, the memory for a list is NOT allocated in this function. + * @remarks The memory for a list will be allocated in this function. + * @remarks Applications need to call msg_release_thread_view_list() to free the memory. + * @remarks However, if this function fails, the memory for a list is NOT allocated in this function. * - * \param input - handle is Message handle. - * \param input - sort_rule indicates a sort type and sort order for querying messages. - * \param output - msg_thread_view_list is a pointer to an msg_struct_list_s structure. + * @param[in] handle The Message handle + * @param[in] sourt_rule This indicates a sort type and sort order for querying messages + * @param[out] msg_thread_view_list A pointer to an #msg_struct_list_s structure * - * \return Return Type (int(msg_error_t)) \n - * - MSG_SUCCESS - Success in operation. - * - MSG_ERR_INVALID_PARAMETER - Parameter is invalid. - * - MSG_ERR_STORAGE_ERROR - Storage is error. + * @return @c 0 on success, + * otherwise a negative error value * - * \par Prospective clients: - * External/Native Apps using Messaging Services. + * @retval MSG_SUCCESS Success in operation + * @retval MSG_ERR_INVALID_PARAMETER Parameter is invalid + * @retval MSG_ERR_STORAGE_ERROR Storage error + * @retval MSG_ERR_PERMISSION_DENIED The application does not have the privilege to call this method + * @retval MSG_ERR_NOT_SUPPORTED Not supported + */ + +int msg_get_thread_view_list(msg_handle_t handle, const msg_struct_t sort_rule, msg_struct_list_s *msg_thread_view_list); + + +/** + * @briefs Gets the common information list of messages with the selected thread ID. * - * \par Related functions: - * None + * @since_tizen 2.3 + * @privlevel public + * @privilege %http://tizen.org/privilege/message.read * - * \par Known issues/bugs: - * None + * @remarks The memory for a list will be allocated in this function. + * @remarks Applications need to call msg_release_conversation_view_list() to free the memory. + * @remarks However, if this function is failed, the memory for a list is NOT allocated in this function. * - * \par Sample code: - * \code - * ... + * @param[in] hMsgHandle The Message handle + * @param[in] thread_id The ID of the thread to be returned + * @param[out] msg_conv_view_list A pointer to a structure of conversational message list * - * msg_handle_t msgHandle = NULL; + * @return @c 0 on success, + * otherwise a negative error value * - * ... - * msg_struct_list_s threadViewList; - * ... - * err = msg_get_thread_view_list(hMsgHandle, NULL, &threadViewList); - * ... - * msg_release_thread_view_list(&threadViewList); - * if( err != MSG_SUCCESS ) - * { - * printf("err [%d]", err); - * return err; - * } - * \endcode + * @retval MSG_SUCCESS Success in operation + * @retval MSG_ERR_INVALID_PARAMETER Parameter is invalid + * @retval MSG_ERR_STORAGE_ERROR Storage error + * @retval MSG_ERR_PERMISSION_DENIED The application does not have the privilege to call this method + * @retval MSG_ERR_NOT_SUPPORTED Not supported */ -/*================================================================================================*/ -int msg_get_thread_view_list(msg_handle_t handle, const msg_struct_t sort_rule, msg_struct_list_s *msg_thread_view_list); - -/** - - * \par Description: - * Returns the common information list of messages with selected thread_id. - * - * \par Purpose: - * This API is used to get the common information list of messages with selected thread_id. - * - * \par Typical use case: - * Gets the common information list of messages with the selected thread id from the database. - * - * \par Method of function operation: - * Connects to the database and queries the common infomation of list messages with the provided thread id. - * - * \par Sync (or) Async: - * This is a Synchronous API. - * - * \par Important notes: - * - The memory for a list will be allocated in this function. - * - Applications need to call msg_release_conversation_view_list to free the memory. - * - However, if this function is failed, the memory for a list is NOT allocated in this function. - * - * \param input - hMsgHandle is Message handle. - * \param input - thread_id is the ID of the thread to be returned. - * \param output - msg_conv_view_list is a pointer to an MSG_CONV_VIEW_LIST_S structure. - * - * \return Return Type (int(msg_error_t)) \n - * - MSG_SUCCESS - Success in operation. - * - MSG_ERR_INVALID_PARAMETER - Parameter is invalid. - * - MSG_ERR_STORAGE_ERROR - Storage is error. - * - * \par Prospective clients: - * External/Native Apps using Messaging Services. - * - * \par Related functions: - * - None - * - * \par Known issues/bugs: - * None - * - * \par Sample code: - * \code - * ... - * - * msg_handle_t msgHandle = NULL; - * msg_error_t err = MSG_SUCCESS; - * ... - * MSG_CONV_VIEW_LIST_S convViewList; - * ... - * err = msg_get_conversation_view_list(hMsgHandle, ThreadId, &convViewList); - * if( err != MSG_SUCCESS ) - * { - * printf("err [%d]", err); - * return err; - * } - * msg_release_conversation_view_list(&convViewList); - * ... - * \endcode - */ -/*================================================================================================*/ int msg_get_conversation_view_list(msg_handle_t handle, msg_thread_id_t thread_id, msg_struct_list_s *msg_conv_view_list); /** - - * \par Description: - * Deletes all the Messages Sent/Received from the selected list. - * - * \par Purpose: - * This API is used to delete all the Messages Sent/Received from the selected list. - * - * \par Typical use case: - * Deletes all messages sent/received from the selected list. - * - * \par Method of function operation: - * Sets up the database connection and deletes all messages sent/received from a selected list. - * - * \par Sync (or) Async: - * This is a Synchronous API. - * - * \par Important notes: - * - If addr_info is NULL, nothing happens. - * - * \param input - handle is Message handle. - * \param input - thread_id is the ID of the thread to be deleted. - * - * \return Return Type (int(msg_error_t)) \n - * - MSG_SUCCESS - Success in operation. - * - MSG_ERR_INVALID_PARAMETER - Parameter is invalid. - * - MSG_ERR_STORAGE_ERROR - Storage is error. + * @brief Deletes all the Messages Sent/Received from the selected list. * - * \par Prospective clients: - * External/Native Apps using Messaging Services. + * @since_tizen 2.3 + * @privlevel public + * @privilege %http://tizen.org/privilege/message.write * - * \par Related functions: - * None + * @param[in] handle The Message handle + * @param[in] thread_id The ID of the thread to be deleted + * @param[in] include_protected_msg Set @c true to delete protected messages, + * otherwise @c false to not delete protected messages * - * \par Known issues/bugs: - * None + * @return @c 0 on success, + * otherwise a negative error value * - * \par Sample code: - * \code - * ... - * - * msg_handle_t msgHandle = NULL; - * MSG_SYNCML_MESSAGE_S syncMLMsg; - * MSG_SENDINGOPT_S sendingOpt = {0}; - * - * ... - * - * err = msg_open_msg_handle(&msgHandle); - * - * ... - * - * err = msg_delete_thread_message_list(hMsgHandle, 0); - * if( err != MSG_SUCCESS ) - * { - * printf("err [%d]", err); - * return err; - * } - * ... - * \endcode + * @retval MSG_SUCCESS Success in operation + * @retval MSG_ERR_INVALID_PARAMETER Parameter is invalid + * @retval MSG_ERR_STORAGE_ERROR Storage error + * @retval MSG_ERR_PERMISSION_DENIED The application does not have the privilege to call this method + * @retval MSG_ERR_NOT_SUPPORTED Not supported */ -/*================================================================================================*/ + int msg_delete_thread_message_list(msg_handle_t handle, msg_thread_id_t thread_id, bool include_protected_msg); /** - - * \par Description: - * Adds a new folder. + * @brief Adds a new folder. * - * \par Purpose: - * This API is used to add a new folder. + * @since_tizen 2.3 + * @privlevel public + * @privilege %http://tizen.org/privilege/message.write * - * \par Typical use case: - * Adds a new folder with the specified folder info + * @param[in] handle The Message handle + * @param[in] folder_info A pointer to an #MSG_FOLDER_INFO_S structure * - * \par Method of function operation: - * Sets up the database connection and add a new folder to the folder table. + * @return @c 0 on success, + * otherwise a negative error value * - * \par Sync (or) Async: - * This is a Synchronous API. - * - * \par Important notes: - * - None. - * - * \param - handle is Message handle. - * \param - folder_info is a pointer to an MSG_FOLDER_INFO_S structure. - * - * \return Return Type (int(msg_error_t)) \n - * - MSG_SUCCESS - Success in operation. - * - MSG_ERR_INVALID_PARAMETER - Parameter is invalid. - * - MSG_ERR_STORAGE_ERROR - Storage is error. - * - * \par Prospective clients: - * External/Native Apps using Messaging Services. - * - * \par Related functions: - * None - * - * \par Known issues/bugs: - * None - * - * \par Sample code: - * \code - * ... - * - * msg_handle_t msgHandle = NULL; - * Make Folder - * MSG_FOLDER_INFO_S folderInfo; - * ... - * err = msg_open_msg_handle(&msgHandle); - * - * folderInfo.folderId = 1; - * folderInfo.folderType = MSG_FOLDER_TYPE_USER_DEF; - * ... - * - * err = msg_add_folder(hMsgHandle, &folderInfo); - * if( err != MSG_SUCCESS ) - * { - * printf("err [%d]", err); - * return err; - * } - * ... - * \endcode + * @retval MSG_SUCCESS Success in operation + * @retval MSG_ERR_INVALID_PARAMETER Parameter is invalid + * @retval MSG_ERR_STORAGE_ERROR Storage error + * @retval MSG_ERR_PERMISSION_DENIED The application does not have the privilege to call this method + * @retval MSG_ERR_NOT_SUPPORTED Not supported */ -/*================================================================================================*/ + int msg_add_folder(msg_handle_t handle, const msg_struct_t folder_info); /** - - * \par Description: - * Updates the folder info. - * - * \par Purpose: - * This API is used to add a new folder. - * - * \par Typical use case: - * Adds a new folder with the specified folder info - * - * \par Method of function operation: - * Sets up the database connection and add a new folder to the folder table. + * @brief Updates the folder info. * - * \par Sync (or) Async: - * This is a Synchronous API. + * @since_tizen 2.3 + * @privlevel public + * @privilege %http://tizen.org/privilege/message.write * - * \par Important notes: - * - None. + * @param[in] handle The Message handle + * @param[in] folder_info A pointer to an #MSG_FOLDER_INFO_S structure * - * \param - handle is Message handle. - * \param - folder_info is a pointer to an MSG_FOLDER_INFO_S structure. + * @return @c 0 on success, + * otherwise a negative error value * - * \return Return Type (int(msg_error_t)) \n - * - MSG_SUCCESS - Success in operation. - * - MSG_ERR_INVALID_PARAMETER - Parameter is invalid. - * - MSG_ERR_STORAGE_ERROR - Storage is error. - * - * \par Prospective clients: - * External/Native Apps using Messaging Services. - * - * \par Related functions: - * None - * - * \par Known issues/bugs: - * None - * - * \par Sample code: - * \code - * ... - * - * msg_handle_t msgHandle = NULL; - * Make Folder - * MSG_FOLDER_INFO_S folderInfo; - * ... - * err = msg_open_msg_handle(&msgHandle); - * - * folderInfo.folderId = 2; - * folderInfo.folderType = MSG_FOLDER_TYPE_USER_DEF; - * ... - * err = msg_update_folder(msgHandle, &folderInfo); - * if( err != MSG_SUCCESS ) - * { - * printf("err [%d]", err); - * return err; - * } - * ... - * \endcode + * @retval MSG_SUCCESS Success in operation + * @retval MSG_ERR_INVALID_PARAMETER Parameter is invalid + * @retval MSG_ERR_STORAGE_ERROR Storage error + * @retval MSG_ERR_PERMISSION_DENIED The application does not have the privilege to call this method + * @retval MSG_ERR_NOT_SUPPORTED Not supported */ -/*================================================================================================*/ + int msg_update_folder(msg_handle_t handle, const msg_struct_t folder_info); /** - - * \par Description: - * Deletes an exisiting folder. - * - * \par Purpose: - * This API is used to delete an existing folder. - * - * \par Typical use case: - * Deletes an existing folder. - * - * \par Method of function operation: - * Sets up the database connection and deletes an existing folder to the folder table. - * - * \par Sync (or) Async: - * This is a Synchronous API. - * - * \par Important notes: - * - None. - * - * \param input - handle is Message handle. - * \param input - folder_id is the ID of the folder to be deleted. - * - * \return Return Type (int(msg_error_t)) \n - * - MSG_SUCCESS - Success in operation. - * - MSG_ERR_INVALID_PARAMETER - Parameter is invalid. - * - MSG_ERR_STORAGE_ERROR - Storage is error. + * @brief Deletes an existing folder. * - * \par Prospective clients: - * External/Native Apps using Messaging Services. + * @since_tizen 2.3 + * @privlevel public + * @privilege %http://tizen.org/privilege/message.write * - * \par Related functions: - * None + * @param[in] handle The Message handle + * @param[in] folder_id The ID of the folder to be deleted * - * \par Known issues/bugs: - * None + * @return @c 0 on success, + * otherwise a negative error value * - * \par Sample code: - * \code - * ... - * - * msg_handle_t msgHandle = NULL; - * err = msg_open_msg_handle(&msgHandle); - * - * ... - * err = msg_delete_folder(hMsgHandle, MSG_INBOX_ID); - * if( err != MSG_SUCCESS ) - * { - * printf("err [%d]", err); - * return err; - * } - * ... - * \endcode + * @retval MSG_SUCCESS Success in operation + * @retval MSG_ERR_INVALID_PARAMETER Parameter is invalid + * @retval MSG_ERR_STORAGE_ERROR Storage error + * @retval MSG_ERR_PERMISSION_DENIED The application does not have the privilege to call this method + * @retval MSG_ERR_NOT_SUPPORTED Not supported */ -/*================================================================================================*/ + int msg_delete_folder(msg_handle_t handle, msg_folder_id_t folder_id); /** - - * \par Description: - * Returns the information list of folders. - * - * \par Purpose: - * This API is used to get the information list of folders. - * - * \par Typical use case: - * Gets the folder list information. - * - * \par Method of function operation: - * Sets up the database connection and queries for the folder list information. + * @brief Gets the information list of folders. * - * \par Sync (or) Async: - * This is a Synchronous API. + * @since_tizen 2.3 + * @privlevel public + * @privilege %http://tizen.org/privilege/message.read * - * \par Important notes: - * - None. + * @param[in] handle The Message handle + * @param[out] folder_list A pointer to a #msg_struct_list_s structure * - * \param input - handle is Message handle. - * \param output - folder_list is a pointer to an msg_struct_list_s structure. - * - * \return Return Type (int(msg_error_t)) \n - * - MSG_SUCCESS - Success in operation. - * - MSG_ERR_INVALID_PARAMETER - Parameter is invalid. - * - MSG_ERR_STORAGE_ERROR - Storage is error. - * - * \par Prospective clients: - * External/Native Apps using Messaging Services. - * - * \par Related functions: - * None - * - * \par Known issues/bugs: - * None - * - * \par Sample code: - * \code - * ... - * - * msg_handle_t msgHandle = NULL; - * msg_struct_list_s folderList; - - * err = msg_open_msg_handle(&msgHandle); + * @return @c 0 on success, + * otherwise a negative error value * - * ... - * err = msg_get_folder_list(msgHandle, &folderList); - * if( err != MSG_SUCCESS ) - * { - * printf("err [%d]", err); - * return err; - * } - * ... - * msg_release_folder_list(&folderList); - * \endcode + * @retval MSG_SUCCESS Success in operation + * @retval MSG_ERR_INVALID_PARAMETER Parameter is invalid + * @retval MSG_ERR_STORAGE_ERROR Storage error + * @retval MSG_ERR_PERMISSION_DENIED The application does not have the privilege to call this method + * @retval MSG_ERR_NOT_SUPPORTED Not supported */ -/*================================================================================================*/ + int msg_get_folder_list(msg_handle_t handle, msg_struct_list_s *folder_list); /** - - * \par Description: - * Creates the specified number of messages in database. - * - * \par Purpose: - * This API is used to generate specified number of messages in the database - * - * \par Typical use case: - * Generate large number of messages in the database. - * - * \par Method of function operation: - * Creates the specified number of messages in database for specified message type in the specified folder - * - * \par Sync (or) Async: - * This is a Synchronous API. - * - * \par Important notes: - * - None - * - * \param input - handle is Message handle. - * \param input - msg_type is one of enum _MSG_MESSAGE_TYPE_E. - * \param input - folder_id is the folder for the test messages. - * \param input - num_msg is the number of messages. - * - * \return Return Type (int(msg_error_t)) \n - * - MSG_SUCCESS Success in operation. - * - MSG_ERR_INVALID_MSGHANDLE Parameter is invalid. - * - MSG_ERR_INVALID_FOLDER_ID Storage is error. - * - * \par Prospective clients: - * External/Native Apps using Messaging Services. - * - * \par Related functions: - * None - * - * \par Known issues/bugs: - * None - * - * \par Sample code: - * \code - * ... - * - * msg_handle_t msgHandle = NULL; - * msg_struct_list_s folderList; - - * err = msg_open_msg_handle(&msgHandle); - * - * ... - * err = msg_generate_message(msgHandle, MSG_TYPE_SMS, MSG_INBOX_ID, 100); - * if( err != MSG_SUCCESS ) - * { - * printf("err [%d]", err); - * return err; - * } - * ... - * \endcode + * @brief Creates the specified number of messages in database. + * @details This API is used to generate specified number of messages in the database + * + * @since_tizen 2.3 + * @privlevel public + * @privilege %http://tizen.org/privilege/message.write + * + * @param[in] handle The Message handle + * @param[in] msg_type The message type \n + * One of enum _MSG_MESSAGE_TYPE_E. + * @param[in] folder_id The folder for the test messages + * @param[in] num_msg The number of messages + * + * @return @c 0 on success, + * otherwise a negative error value + * + * @retval MSG_SUCCESS Success in operation + * @retval MSG_ERR_INVALID_MSGHANDLE Parameter is invalid + * @retval MSG_ERR_STORAGE_ERROR Storage error + * @retval MSG_ERR_PERMISSION_DENIED The application does not have the privilege to call this method + * @retval MSG_ERR_NOT_SUPPORTED Not supported */ -/*================================================================================================*/ + int msg_generate_message(msg_handle_t handle, msg_message_type_t msg_type, msg_folder_id_t folder_id, unsigned int num_msg); -int msg_generate_sms(msg_handle_t handle, msg_folder_id_t folder_id, unsigned int num_msg) DEPRECATED; /** - - * \par Description: - * Returns the Message Data to be used by the Quick Panel. - * - * \par Purpose: - * This API is used to get the Message Datato be used by the Quick Panel. - * - * \par Typical use case: - * Quick panel needs the message information to show new message notification. - * - * \par Method of function operation: - * Connects to database and queries for information needed by the quick panel. - * - * \par Sync (or) Async: - * This is a Synchronous API. + * @brief Returns the Message Data to be used by the Quick Panel. * - * \par Important notes: - * - None + * @since_tizen 2.3 + * @privlevel public + * @privilege %http://tizen.org/privilege/message.read * - * \param input - handle is Message handle. - * \param input - type is the type of message that Quick Panel need. - * \param output - msg is a pointer to an msg_message_t structure. + * @param[in] handle The Message handle + * @param[in] type The type of message that Quick Panel needs + * @param[out] msg A pointer to a #msg_struct_t structure * - * \return Return Type (int(msg_error_t)) \n - * - MSG_SUCCESS Success in operation. - * - MSG_ERR_INVALID_MSGHANDLE Parameter is invalid. - * - MSG_ERR_INVALID_FOLDER_ID Storage is error. + * @return @c 0 on success, + * otherwise a negative error value * - * \par Prospective clients: - * External/Native Apps using Messaging Services. - * - * \par Related functions: - * None - * - * \par Known issues/bugs: - * None - * - * \par Sample code: - * \code - * ... - * - * msg_handle_t msgHandle = NULL; - * msg_message_t msgInfo; - - * err = msg_open_msg_handle(&msgHandle); - * - * ... - * err = msg_get_quick_panel_data(msgHandle, MSG_QUICKPANEL_SMS, msgInfo); - * if( err != MSG_SUCCESS ) - * { - * printf("err [%d]", err); - * return err; - * } - * ... - * \endcode + * @retval MSG_SUCCESS Success in operation + * @retval MSG_ERR_DB_STEP There is no Quick Panel message + * @retval MSG_ERR_INVALID_PARAMETER(-9) Parameter is invalid + * @retval MSG_ERR_STORAGE_ERROR Storage error + * @retval MSG_ERR_PERMISSION_DENIED The application does not have the privilege to call this method + * @retval MSG_ERR_NOT_SUPPORTED Not supported */ -/*================================================================================================*/ + int msg_get_quick_panel_data(msg_handle_t handle, msg_quickpanel_type_t type, msg_struct_t msg); /** - - * \par Description: - * Resets the Messaging database. - * - * \par Purpose: - * This API is used to reset the messaging database. - * - * \par Typical use case: - * Completely delete the messaging database. - * - * \par Method of function operation: - * Connects to database and deletes all the messaging tables. - * - * \par Sync (or) Async: - * This is a Synchronous API. - * - * \par Important notes: - * - None - * - * \param input - handle is Message handle. - * - * \return Return Type (int(msg_error_t)) \n - * - MSG_SUCCESS Success in operation. - * - MSG_ERR_INVALID_PARAMETER Parameter is invalid. - * - MSG_ERR_STORAGE_ERROR Storage is error. + * @brief Resets the Messaging database. * - * \par Prospective clients: - * External/Native Apps using Messaging Services. + * @since_tizen 2.3 + * @privlevel public + * @privilege %http://tizen.org/privilege/message.write * - * \par Related functions: - * None + * @param[in] handle The Message handle * - * \par Known issues/bugs: - * None + * @return @c 0 on success, + * otherwise a negative error value * - * \par Sample code: - * \code - * ... - * - * msg_handle_t msgHandle = NULL; - * msg_error_t err = MSG_SUCCESS; - * err = msg_open_msg_handle(&msgHandle); - * - * ... - * err = msg_reset_database(msgHandle); - * if (err != MSG_SUCCESS) - *{ - * printf("err [%d]", err); - * return err; - * } - * ... - * \endcode + * @retval MSG_SUCCESS Success in operation + * @retval MSG_ERR_INVALID_PARAMETER Parameter is invalid + * @retval MSG_ERR_STORAGE_ERROR Storage error + * @retval MSG_ERR_PERMISSION_DENIED The application does not have the privilege to call this method + * @retval MSG_ERR_NOT_SUPPORTED Not supported */ -/*================================================================================================*/ + int msg_reset_database(msg_handle_t handle); /** - - * \par Description: - * Returns the total size used for message contents. - * - * \par Purpose: - * This API is used to get the total size used for message contents. - * - * \par Typical use case: - * To get the total space used by message contents. - * - * \par Method of function operation: - * Uses linux system calls to query the space used by message contents. + * @brief Gets the total size used for message contents. * - * \par Sync (or) Async: - * This is a Synchronous API. + * @since_tizen 2.3 + * @privlevel public + * @privilege %http://tizen.org/privilege/message.read * - * \par Important notes: - * - None + * @param[in] handle The Message handle + * @param[out] memsize A pointer to the size * - * \param input - handle is Message handle. - * \param output - memsize is a pointer to the size. + * @return @c 0 on success, + * otherwise a negative error value * - * \return Return Type (int(msg_error_t)) \n - * - MSG_SUCCESS Success in operation. - * - MSG_ERR_INVALID_PARAMETER Parameter is invalid. - * - MSG_ERR_STORAGE_ERROR Storage is error. - * - * \par Prospective clients: - * External/Native Apps using Messaging Services. - * - * \par Related functions: - * None - * - * \par Known issues/bugs: - * None - * - * \par Sample code: - * \code - * ... - * - * msg_handle_t msgHandle = NULL; - * int memsize = 0; - * err = msg_open_msg_handle(&msgHandle); - * - * ... - * err = msg_get_mem_size(msgHandle, &memsize); - * if( err != MSG_SUCCESS ) - * { - * printf("err [%d]", err); - * return err; - * } - * ... - * \endcode + * @retval MSG_SUCCESS Success in operation + * @retval MSG_ERR_INVALID_PARAMETER Parameter is invalid + * @retval MSG_ERR_STORAGE_ERROR Storage error + * @retval MSG_ERR_PERMISSION_DENIED The application does not have the privilege to call this method + * @retval MSG_ERR_NOT_SUPPORTED Not supported */ -/*================================================================================================*/ + int msg_get_mem_size(msg_handle_t handle, unsigned int* memsize); /** - - * \par Description: - * Backup messages to storage. - * - * \par Purpose: - * This API is used to backup messages to storage. - * - * \par Typical use case: - * Backup messages to storage. - * - * \par Method of function operation: - * Reads all the messages from Messaging database and writes to storage in V-Message format - * - * \par Sync (or) Async: - * This is a Synchronous API. - * - * \par Important notes: - * None - * - * \param input - msg_handle_t handle is Message handle. - * \param input - msg_message_backup_type_t type is backup_type. - * \param input - backup_filepath is path to backup message. + * @brief Backs up messages to storage. * - * \return Return Type int (msg_error_t) \n - * - MSG_SUCCESS Success in operation. - * - MSG_ERR_INVALID_PARAMETER Parameter is invalid. - * - MSG_ERR_STORAGE_ERROR Storage is error. + * @since_tizen 2.3 + * @privlevel public + * @privilege %http://tizen.org/privilege/message.read * - * \par Prospective clients: - * External/Native Apps using Messaging Services. + * @param[in] handle The Message handle + * @param[in] type The backup type + * @param[in] backup_filepath The path to backup message * - * \par Related functions: - * None + * @return @c 0 on success, + * otherwise a negative error value * - * \par Known issues/bugs: - * None - * - * \par Sample code: - * \code - * ... - * - * msg_handle_t msgHandle = NULL; - * msg_error_t err; - * msg_message_backup_type_t type = MSG_BACKUP_TYPE_MMS; - * const char *filepath = "/backup_mms" - * - * ... - * err = msg_backup_message(&msgHandle, type, filepath); - * ... - * \endcode + * @retval MSG_SUCCESS Success in operation + * @retval MSG_ERR_INVALID_PARAMETER Parameter is invalid + * @retval MSG_ERR_STORAGE_ERROR Storage error + * @retval MSG_ERR_PERMISSION_DENIED The application does not have the privilege to call this method + * @retval MSG_ERR_NOT_SUPPORTED Not supported */ -/*================================================================================================*/ + int msg_backup_message(msg_handle_t handle, msg_message_backup_type_t type, const char *backup_filepath); /** - - * \par Description: - * Restore messages from backed up messages. - * - * \par Purpose: - * This API is used to restore messages from backed up messages. - * - * \par Typical use case: - * Restore messages from previously backed up messages. - * - * \par Method of function operation: - * Reads the previously backup up messages and restores the database. + * @brief Restores messages from backed up messages. * - * \par Sync (or) Async: - * This is a Synchronous API. + * @since_tizen 2.3 + * @privlevel public + * @privilege %http://tizen.org/privilege/message.write * - * \par Important notes: - * None + * @param[in] handle The Message handle + * @param[in] backup_filepath The path to backup message * - * \param input - msg_handle_t handle is Message handle. - * \param input - backup_filepath is path of backup file for restore. + * @return @c 0 on success, + * otherwise a negative error value * - * - * \return Return Type int (msg_error_t) \n - * - MSG_SUCCESS Success in operation. - * - MSG_ERR_INVALID_PARAMETER Parameter is invalid. - * - MSG_ERR_STORAGE_ERROR Storage is error. - * - * \par Prospective clients: - * External/Native Apps using Messaging Services. - * - * \par Related functions: - * None - * - * \par Known issues/bugs: - * None - * - * \par Sample code: - * \code - * ... - * - * msg_handle_t msgHandle = NULL; - * msg_error_t err; - * const char *filepath = "/backup_mms" - * ... - * err = msg_restore_message(&msgHandle, filepath); - * ... - * \endcode + * @retval MSG_SUCCESS Success in operation + * @retval MSG_ERR_INVALID_PARAMETER Parameter is invalid + * @retval MSG_ERR_STORAGE_ERROR Storage error + * @retval MSG_ERR_PERMISSION_DENIED The application does not have the privilege to call this method + * @retval MSG_ERR_NOT_SUPPORTED Not supported */ -/*================================================================================================*/ + int msg_restore_message(msg_handle_t handle, const char *backup_filepath); /** - - * \par Description: - * Search messages or addresses which including a string that applcation want to find. + * @brief Searches messages or addresses for the specified string. + * @details This API is used to search messages or addresses from storage. * - * \par Purpose: - * This API is used to search messages or addresses from storage. + * @since_tizen 2.3 + * @privlevel public + * @privilege %http://tizen.org/privilege/message.read * - * \par Typical use case: - * Search messages or addresses from storage. + * @param[in] handle The Message handle + * @param[in] search_string The string to search + * @param[out] msg_thread_view_list A pointer to an #msg_struct_list_s structure * - * \par Method of function operation: - * search messages or addresses from storage. + * @return @c 0 on success, + * otherwise a negative error value * - * \par Sync (or) Async: - * This is a Synchronous API. + * @retval MSG_SUCCESS Success in operation + * @retval MSG_ERR_INVALID_PARAMETER Parameter is invalid + * @retval MSG_ERR_STORAGE_ERROR Storage error + * @retval MSG_ERR_PERMISSION_DENIED The application does not have the privilege to call this method + * @retval MSG_ERR_NOT_SUPPORTED Not supported + */ + +int msg_search_message_for_thread_view(msg_handle_t handle, const char *search_string, msg_struct_list_s *msg_thread_view_list); + + +/** + * @brief Gets reject message list by phone number. + * @details This API is used to get reject message list from storage. * - * \par Important notes: - * None + * @since_tizen 2.3 + * @privlevel public + * @privilege %http://tizen.org/privilege/message.read * - * \param input - msg_handle_t handle is Message handle. - * \param input - search_string is the string to search. - * \param output - msg_thread_view_list is a pointer to an msg_struct_list_s structure. + * @param[in] handle The Message handle + * @param[in] phone_num The string of phone number to find + * @param[out] msg_reject_msg_list A pointer to a #msg_struct_list_s structure * - * \return Return Type int (msg_error_t) \n - * - MSG_SUCCESS Success in operation. - * - MSG_ERR_INVALID_PARAMETER Parameter is invalid. - * - MSG_ERR_STORAGE_ERROR Storage is error. + * @return @c 0 on success, + * otherwise a negative error value * - * \par Prospective clients: - * External/Native Apps using Messaging Services. + * @retval MSG_SUCCESS Success in operation + * @retval MSG_ERR_INVALID_PARAMETER Parameter is invalid + * @retval MSG_ERR_STORAGE_ERROR Storage error + * @retval MSG_ERR_PERMISSION_DENIED The application does not have the privilege to call this method + * @retval MSG_ERR_NOT_SUPPORTED Not supported + */ + +int msg_get_reject_msg_list(msg_handle_t handle, const char* phone_num, msg_struct_list_s *msg_reject_msg_list); + + +/** + * @brief Registers a callback function about the change of storage status to Message handle. + * @details This API is used to register a callback function about the change of storage status "msg_storage_change_cb" to Message handle. * - * \par Related functions: - * None + * @since_tizen 2.3 + * @privlevel public + * @privilege %http://tizen.org/privilege/message.read * - * \par Known issues/bugs: - * None + * @remarks This function MUST be called after Message handle is opened. * - * \par Sample code: - * \code - * ... + * @param[in] handle The Message handle + * @param[in] cb The function to be called + * @param[in] user_param A pointer to user data * - * msg_handle_t msgHandle = NULL; - * msg_error_t err = MSG_SUCCESS; - * ... - * char* search_string = "hello"; - * msg_struct_list_s threadViewList; - * ... - * err = msg_search_message_for_thread_view(&msgHandle, search_string, &threadViewList); + * @return @c 0 on success, + * otherwise a negative error value * - * if( err != MSG_SUCCESS ) - * { - * printf("err [%d]", err); - * return err; - * } - * ... - * \endcode + * @retval MSG_SUCCESS Success in operation + * @retval MSG_ERR_INVALID_PARAMETER Parameter is invalid + * @retval MSG_ERR_MSGHANDLE_NOT_CONNECTED Message handle is not connected + * @retval MSG_ERR_MEMORY_ERROR Memory is error + * @retval MSG_ERR_PERMISSION_DENIED The application does not have the privilege to call this method + * @retval MSG_ERR_NOT_SUPPORTED Not supported */ -/*================================================================================================*/ -int msg_search_message_for_thread_view(msg_handle_t handle, const char *search_string, msg_struct_list_s *msg_thread_view_list); +int msg_reg_storage_change_callback(msg_handle_t handle, msg_storage_change_cb cb, void *user_param); -/** - * \par Description: - * Search messages or addresses which including a string that applcation want to find. - * - * \par Purpose: - * This API is used to search messages or addresses from storage. - * - * \par Typical use case: - * Search messages or addresses from storage. - * - * \par Method of function operation: - * search messages or addresses from storage. - * - * \par Sync (or) Async: - * This is a Synchronous API. +/** + * @brief Gets the report status information of message. * - * \par Important notes: - * None + * @since_tizen 2.3 + * @privlevel public + * @privilege %http://tizen.org/privilege/message.read * - * \param input - msg_handle_t handle is Message handle. - * \param input - search_string is the string to search. - * \param input - offset is the offset of the search result. - * \param input - limit is the limit of the search result. - * \param output - msg_list is a pointer to an msg_struct_list_s structure. + * @param[in] handle The Message handle + * @param[in] msg_id The ID of the message + * @param[out] report_status A pointer to a #msg_struct_list_s structure * - * \return Return Type int (msg_error_t) \n - * - MSG_SUCCESS Success in operation. - * - MSG_ERR_INVALID_PARAMETER Parameter is invalid. - * - MSG_ERR_STORAGE_ERROR Storage is error. + * @return @c 0 on success, + * otherwise a negative error value * - * \par Prospective clients: - * External/Native Apps using Messaging Services. + * @retval MSG_SUCCESS Success in operation + * @retval MSG_ERR_INVALID_PARAMETER Parameter is invalid + * @retval MSG_ERR_STORAGE_ERROR Storage error + * @retval MSG_ERR_PERMISSION_DENIED The application does not have the privilege to call this method + * @retval MSG_ERR_NOT_SUPPORTED Not supported + */ + +int msg_get_report_status(msg_handle_t handle, msg_message_id_t msg_id, msg_struct_list_s *report_list); + + +/** + * @brief Gets the address list for specific thread ID. * - * \par Related functions: - * None + * @since_tizen 2.3 + * @privlevel public + * @privilege %http://tizen.org/privilege/message.read * - * \par Known issues/bugs: - * None + * @param[in] handle The Message handle + * @param[in] msg_id The ID of the message + * @param[out] msg_address_list A pointer to a #msg_struct_list_s structure * - * \par Sample code: - * \code - * ... + * @return @c 0 on success, + * otherwise a negative error value * - * msg_handle_t msgHandle = NULL; - * msg_error_t err = MSG_SUCCESS; - * ... - * msg_struct_list_s msg_list; - * int offset = 0; - * int limit = 10; + * @retval MSG_SUCCESS Success in operation + * @retval MSG_ERR_INVALID_PARAMETER Parameter is invalid + * @retval MSG_ERR_STORAGE_ERROR Storage error + * @retval MSG_ERR_PERMISSION_DENIED The application does not have the privilege to call this method + * @retval MSG_ERR_NOT_SUPPORTED Not supported + */ + +int msg_get_address_list(msg_handle_t handle, msg_thread_id_t thread_id, msg_struct_list_s *msg_address_list); + + +/** + * @brief Gets the thread ID by address. * - * MSG_SEARCH_CONDITION_S searchCon; + * @since_tizen 2.3 + * @privlevel public + * @privilege %http://tizen.org/privilege/message.read * - * searchCon.msgType = MSG_TYPE_SMS; - * searchCon.folderId = MSG_INBOX_ID; - * searchCon.pSearchVal = "keyString"; - * searchCon.pAddressVal = "01000000000"; + * @param[in] handle The Message handle + * @param[in] msg_address_list A pointer to a #msg_struct_list_s structure + * @param[out] thread_id The thread ID of the message * - * ... - * err = msg_search_message(hMsgHandle, &searchCon, offset, limit, &msgList); + * @return @c 0 on success, + * otherwise a negative error value * - * if( err != MSG_SUCCESS ) - * { - * printf("err [%d]", err); - * return err; - * } - * ... - * \endcode + * @retval MSG_SUCCESS Success in operation + * @retval MSG_ERR_INVALID_PARAMETER Parameter is invalid + * @retval MSG_ERR_STORAGE_ERROR Storage error + * @retval MSG_ERR_PERMISSION_DENIED The application does not have the privilege to call this method + * @retval MSG_ERR_NOT_SUPPORTED Not supported */ -/*================================================================================================*/ -int msg_search_message(msg_handle_t handle, const msg_struct_t msg_search_conditions, int offset, int limit, msg_struct_list_s *msg_list); -/** +int msg_get_thread_id_by_address(msg_handle_t handle, msg_struct_list_s *msg_address_list, msg_thread_id_t *thread_id); - * \par Description: - * Get reject message list that application wants to find by phone number. - * - * \par Purpose: - * This API is used to get reject message list from storage. - * - * \par Typical use case: - * Get reject message list from storage. +/** + * @brief Gets the thread ID by address. * - * \par Method of function operation: - * Get reject message list from storage. + * @since_tizen 2.3 + * @privlevel public + * @privilege %http://tizen.org/privilege/message.read * - * \par Sync (or) Async: - * This is a Synchronous API. + * @param[in] handle The Message handle + * @param[in] msg_address_list A pointer to a #msg_list_handle structure + * @param[out] thread_id The thread ID of the message * - * \par Important notes: - * None + * @return @c 0 on success, + * otherwise a negative error value * - * \param input - msg_handle_t handle is Message handle. - * \param input - phone_num is the string of phone number to find. - * \param output - msg_reject_msg_list is a pointer to an msg_struct_list_s structure. + * @retval MSG_SUCCESS Success in operation + * @retval MSG_ERR_INVALID_PARAMETER Parameter is invalid + * @retval MSG_ERR_STORAGE_ERROR Storage error + * @retval MSG_ERR_PERMISSION_DENIED The application does not have the privilege to call this method + * @retval MSG_ERR_NOT_SUPPORTED Not supported + */ - * \return Return Type int (msg_error_t) \n - * - MSG_SUCCESS Success in operation. - * - MSG_ERR_INVALID_PARAMETER Parameter is invalid. - * - MSG_ERR_STORAGE_ERROR Storage is error. - * - * \par Prospective clients: - * External/Native Apps using Messaging Services. - * - * \par Related functions: - * None +int msg_get_thread_id_by_address2(msg_handle_t handle, msg_list_handle_t msg_address_list, msg_thread_id_t *thread_id); + + + +/** + * @brief Gets the thread information. * - * \par Known issues/bugs: - * None + * @since_tizen 2.3 + * @privlevel public + * @privilege %http://tizen.org/privilege/message.read * - * \par Sample code: - * \code - * ... + * @param[in] handle The Message handle + * @param[in] thread_id The ID of the thread + * @param[out] msg_thread A pointer to a #msg_struct_t structure * - * msg_handle_t msgHandle = NULL; - * msg_error_t err = MSG_SUCCESS; - * ... - * char* phone_num = "01030016057"; - * msg_struct_list_s rejectMsgList; - * ... - * err = msg_get_reject_msg_list(hMsgHandle, phone_num, &rejectMsgList); + * @return @c 0 on success, + * otherwise a negative error value * - * if( err != MSG_SUCCESS ) - * { - * printf("err [%d]", err); - * return err; - * } - * ... - * \endcode + * @retval MSG_SUCCESS Success in operation + * @retval MSG_ERR_INVALID_PARAMETER Parameter is invalid + * @retval MSG_ERR_STORAGE_ERROR Storage error + * @retval MSG_ERR_PERMISSION_DENIED The application does not have the privilege to call this method + * @retval MSG_ERR_NOT_SUPPORTED Not supported */ -/*================================================================================================*/ -int msg_get_reject_msg_list(msg_handle_t handle, const char* phone_num, msg_struct_list_s *msg_reject_msg_list); +int msg_get_thread(msg_handle_t handle, msg_thread_id_t thread_id, msg_struct_t msg_thread); -/** - * \par Description: - * Registers a callback function about the change of storage status to Message handle. - * - * \par Purpose: - * This API is used to register a callback function about the change of storage status "msg_storage_change_cb" to Message handle. +/** + * @brief Gets the information list of messages. * - * \par Typical use case: - * Register a callback function about the change of storage status. + * @since_tizen 2.3 + * @privlevel public + * @privilege %http://tizen.org/privilege/message.read * - * \par Method of function operation: - * Adds the msg_storage_change_cb API to a callback function list. + * @param[in] handle The Message handle + * @param[in] msg_list_conditions A pointer to a #msg_struct_t structure for getting conditions + * @param[out] msg_list A pointer to a #msg_struct_list_s structure * - * \par Sync (or) Async: - * This is a Synchronous API. + * @return @c 0 on success, + * otherwise a negative error value * - * \par Important notes: - * This function MUST be called after Message handle is opened. + * @retval MSG_SUCCESS Success in operation + * @retval MSG_ERR_INVALID_PARAMETER Parameter is invalid + * @retval MSG_ERR_STORAGE_ERROR Storage error + * @retval MSG_ERR_PERMISSION_DENIED The application does not have the privilege to call this method + * @retval MSG_ERR_NOT_SUPPORTED Not supported + */ + +int msg_get_message_list2(msg_handle_t handle, const msg_struct_t msg_list_conditions, msg_struct_list_s *msg_list); + + +/** + * @brief A function to get media list of a chat room. * - * \param input - handle is Message handle. - * \param input - cb is a function to be called. - * \param input - user_param is a pointer to user data. + * @since_tizen 2.3.1 + * @privlevel public + * @privilege %http://tizen.org/privilege/message.read * - * \return Return Type (int(msg_error_t)) \n - * - MSG_SUCCESS Success in operation. - * - MSG_ERR_MSGHANDLE_NOT_CONNECTED Message handle is not connected. - * - MSG_ERR_MEMORY_ERROR Memory is error. + * @remarks This function MUST be called after Message handle is opened. * - * \par Prospective clients: - * External/Native Apps using Messaging Services. + * @param[in] handle The Message handle + * @param[in] thread_id The thread id of conversation to get media list + * @param[out] msg_list The media file list in a conversation * - * \par Related functions: - * None + * @return @c 0 on success, + * otherwise a negative error value * - * \par Known issues/bugs: - * None + * @retval MSG_SUCCESS Success in operation + * @retval MSG_ERR_INVALID_PARAMETER Parameter is invalid + * @retval MSG_ERR_CALLBACK_ERROR Callback registration error + * @retval MSG_ERR_PERMISSION_DENIED The application does not have the privilege to call this method + */ + +int msg_get_media_list(msg_handle_t handle, msg_thread_id_t thread_id, msg_list_handle_t *msg_list); + + +/** + * @brief Adds a new push event. * - * \par Sample code: - * \code - * ... + * @since_tizen 2.3 + * @privlevel public + * @privilege %http://tizen.org/privilege/message.write * - * int err = MSG_SUCCESS; + * @param[in] handle The Message handle + * @param[in] push_event A pointer to a #msg_struct_t structure for push event * - * err = msg_reg_storage_change_callback(msgHandle, &storageCB, NULL); - * if (err != MSG_SUCCESS) - * { - * ... - * } - * return; - * } + * @return @c 0 on success, + * otherwise a negative error value * - * void storageCB(msg_handle_t handle, msg_thread_id_t threadId, msg_message_id_t msgId, void *user_param) - * { - * ... - * } - * ... - * \endcode + * @retval MSG_SUCCESS Success in operation + * @retval MSG_ERR_INVALID_PARAMETER Parameter is invalid + * @retval MSG_ERR_STORAGE_ERROR Storage error + * @retval MSG_ERR_PERMISSION_DENIED The application does not have the privilege to call this method + * @retval MSG_ERR_NOT_SUPPORTED Not supported */ -/*================================================================================================*/ -int msg_reg_storage_change_callback(msg_handle_t handle, msg_storage_change_cb cb, void *user_param); +int msg_add_push_event(msg_handle_t handle, const msg_struct_t push_event); -/** - * \par Description: - * Gets the report status information of message. - * - * \par Purpose: - * This API is used to get the report status information of specified message. +/** + * @brief Deletes a push event. * - * \par Typical use case: - * Gets the report status information of specified message from the database. + * @since_tizen 2.3 + * @privlevel public + * @privilege %http://tizen.org/privilege/message.write * - * \par Method of function operation: - * Sets up the database connection and Gets the report status information of specified message from the report table. + * @param[in] handle The Message handle + * @param[in] push_event A pointer to a #msg_struct_t structure for push event * - * \par Sync (or) Async: - * This is a Synchronous API. + * @return @c 0 on success, + * otherwise a negative error value * - * \par Important notes: - * - None + * @retval MSG_SUCCESS Success in operation + * @retval MSG_ERR_INVALID_PARAMETER Parameter is invalid + * @retval MSG_ERR_STORAGE_ERROR Storage error + * @retval MSG_ERR_PERMISSION_DENIED The application does not have the privilege to call this method + * @retval MSG_ERR_NOT_SUPPORTED Not supported + */ + +int msg_delete_push_event(msg_handle_t handle, const msg_struct_t push_event); + + +/** + * @brief Updates a push event. * - * \param input - handle is Message handle. - * \param input - msg_id is the ID of the message. - * \param output - report_status is a pointer to a MSG_REPORT_STATUS_INFO_S structure. + * @since_tizen 2.3 + * @privlevel public + * @privilege %http://tizen.org/privilege/message.write * - * \return Return Type (int(msg_error_t)) \n - * - MSG_SUCCESS - Success in operation. - * - MSG_ERR_INVALID_PARAMETER - Parameter is invalid. - * - MSG_ERR_STORAGE_ERROR - Storage is error. + * @param[in] handle The Message handle + * @param[in] src_event A pointer to a #msg_struct_t structure for source push event + * @param[in] dst_event A pointer to a #msg_struct_t structure for destination push event * - * \par Prospective clients: - * External/Native Apps using Messaging Services. + * @return @c 0 on success, + * otherwise a negative error value * - * \par Related functions: - * None + * @retval MSG_SUCCESS Success in operation + * @retval MSG_ERR_INVALID_PARAMETER Parameter is invalid + * @retval MSG_ERR_STORAGE_ERROR Storage error + * @retval MSG_ERR_PERMISSION_DENIED The application does not have the privilege to call this method + * @retval MSG_ERR_NOT_SUPPORTED Not supported + */ + +int msg_update_push_event(msg_handle_t handle, const msg_struct_t src_event, const msg_struct_t dst_event); + + +/** + * @brief Deletes messages by Message ID list from the database. * - * \par Known issues/bugs: - * None + * @since_tizen 2.3 + * @privlevel public + * @privilege %http://tizen.org/privilege/message.write * - * \par Sample code: - * \code - * ... + * @param[in] handle sThe Message handle + * @param[in] msg_id_list The message ID list to be deleted * - * msg_handle_t msgHandle = NULL; - * MSG_REPORT_STATUS_INFO_S reportStatus; + * @return @c 0 on success, + * otherwise a negative error value * - * ... + * @retval MSG_SUCCESS Success in operation + * @retval MSG_ERR_INVALID_PARAMETER Parameter is invalid + * @retval MSG_ERR_STORAGE_ERROR Storage error + * @retval MSG_ERR_PERMISSION_DENIED The application does not have the privilege to call this method + * @retval MSG_ERR_NOT_SUPPORTED Not supported + */ + +int msg_delete_msgs_by_list(msg_handle_t handle, msg_id_list_s *msg_id_list); + + +/** + * @brief Marks a conversation given by thread ID as read. * - * err = msg_open_msg_handle(&msgHandle); + * @since_tizen 2.3 + * @privlevel public + * @privilege %http://tizen.org/privilege/message.write * - * ... + * @param[in] handle The Message handle + * @param[in] thread_id The thread ID to be updated * - * err = msg_get_report_status(msgHandle, msgID, &reportStatus) -* if( err != MSG_SUCCESS ) - * { - * printf("err [%d]", err); - * return err; - * } + * @return @c 0 on success, + * otherwise a negative error value * - * ... - * \endcode + * @retval MSG_SUCCESS Success in operation + * @retval MSG_ERR_INVALID_PARAMETER Parameter is invalid + * @retval MSG_ERR_STORAGE_ERROR Storage error + * @retval MSG_ERR_PERMISSION_DENIED The application does not have the privilege to call this method + * @retval MSG_ERR_NOT_SUPPORTED Not supported */ -/*================================================================================================*/ -int msg_get_report_status(msg_handle_t handle, msg_message_id_t msg_id, msg_struct_list_s *report_list); -int msg_get_address_list(msg_handle_t handle, msg_thread_id_t thread_id, msg_struct_list_s *msg_address_list); - - -int msg_get_thread_id_by_address(msg_handle_t handle, msg_struct_list_s *msg_address_list, msg_thread_id_t *thread_id); - - -int msg_get_thread(msg_handle_t handle, msg_thread_id_t thread_id, msg_struct_t msg_thread); - - -int msg_get_message_list(msg_handle_t handle, msg_folder_id_t folder_id, msg_thread_id_t thread_id, msg_message_type_t msg_type, msg_storage_id_t storage_id, msg_struct_list_s *msg_list); - - -int msg_add_push_event(msg_handle_t handle, const msg_struct_t push_event); - -int msg_delete_push_event(msg_handle_t handle, const msg_struct_t push_event); - -int msg_update_push_event(msg_handle_t handle, const msg_struct_t src_event, const msg_struct_t dst_event); - -int msg_delete_msgs_by_list(msg_handle_t handle, msg_id_list_s *msg_id_list); +int msg_set_conversation_to_read(msg_handle_t handle, msg_thread_id_t thread_id); /** * @} */ diff --git a/include/mapi/msg_storage_types.h b/include/mapi/msg_storage_types.h index 5af9827..792d6ef 100755 --- a/include/mapi/msg_storage_types.h +++ b/include/mapi/msg_storage_types.h @@ -1,20 +1,17 @@ /* - * msg-service - * - * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved + * Copyright (c) 2014 Samsung Electronics Co., Ltd. All rights reserved * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * 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. - * */ #ifndef MSG_STORAGE_TYPES_H_ @@ -31,12 +28,19 @@ ==================================================================================================*/ /** - * @brief Represents message id list. + * @internal + * @addtogroup MSG_SERVICE_FRAMEWORK_STORAGE_MODULE + * @{ + */ + + +/** + * @brief The structure type that represents message ID list. */ typedef struct { - int nCount; /**< The count of message id informatioin */ - msg_message_id_t *msgIdList; /**< The pointer to message id informatioin */ + int nCount; /**< The count of message ID informatioin */ + msg_message_id_t *msgIdList; /**< The pointer to message ID informatioin */ }msg_id_list_s; @@ -45,46 +49,50 @@ typedef struct ==================================================================================================*/ /** - * @brief Represents a folder type. \n - * The values for this type SHOULD be in _MSG_FOLDER_TYPE_E. + * @brief The structure type that represents a folder type. \n + * The values for this type SHOULD be in @ref _MSG_FOLDER_TYPE_E. */ typedef unsigned char msg_folder_type_t; /** - * @brief Represents a sort type. \n - * The values for this type SHOULD be in \ref _MSG_SORT_TYPE_E. + * @brief The structure type that represents a sort type. \n + * The values for this type SHOULD be in @ref _MSG_SORT_TYPE_E. */ typedef unsigned char msg_sort_type_t; /** - * @brief Represents a Saved SIM message ID. + * @brief The structure type that represents a saved SIM message ID. */ typedef signed short msg_sim_id_t; +/** + * @brief The structure type that represents a Saved SIM slot ID. + */ +typedef int msg_sim_slot_id_t; + /** - * @brief Represents a message type for quick panel. \n - * The values for this type SHOULD be in \ref _MSG_QUICKPANEL_TYPE_E. + * @brief The structure type that represents a message type for quick panel. \n + * The values for this type SHOULD be in @ref _MSG_QUICKPANEL_TYPE_E. */ typedef unsigned char msg_quickpanel_type_t; /** - * @brief Represents a storage change CB type. \n - * The values for this type SHOULD be in \ref _MSG_STORAGE_CHANGE_TYPE_E. + * @brief The structure type that represents a storage change CB type. \n + * The values for this type SHOULD be in @ref _MSG_STORAGE_CHANGE_TYPE_E. */ typedef unsigned char msg_storage_change_type_t; -/** @brief Prototype of the function that will be called when the database of message framework is changed. - * Applications SHOULD implement this callback function and register it into Message handle. - * For how to register this callback function, please refer to msg_reg_storage_change_callback. - * The callback function runs in the application process, not in the framework process. - * @param[in] handle is Message handle. - * @param[in] user_param is a pointer to user data. - * @return void +/** @brief Called when the database of message framework is changed. + * Applications SHOULD implement this callback function and register it into Message handle. + * For how to register this callback function, please refer to msg_reg_storage_change_callback(). + * The callback function runs in the application process, not in the framework process. + * @param[in] handle The Message handle. + * @param[in] user_param A pointer to user data */ typedef void (*msg_storage_change_cb)(msg_handle_t handle, msg_storage_change_type_t storageChangeType, msg_id_list_s *pMsgIdList, void *user_param); @@ -94,119 +102,129 @@ typedef void (*msg_storage_change_cb)(msg_handle_t handle, msg_storage_change_ty ==================================================================================================*/ /** - * @brief Represents the values of a storage type. \n - * This enum is used as the value of msg_storage_id_t. + * @brief Enumeration for the values of a storage type. \n + * This enum is used as the value of msg_storage_id_t. */ enum _MSG_STORAGE_ID_E { - MSG_STORAGE_UNKNOWN = 0, /**< Storage Id is unknown. */ - MSG_STORAGE_PHONE, /**< Storage Id is Phone. */ - MSG_STORAGE_SIM, /**< Storage Id is SIM card. */ + MSG_STORAGE_UNKNOWN = 0, /**< Storage ID is unknown. */ + MSG_STORAGE_PHONE, /**< Storage ID is Phone. */ + MSG_STORAGE_SIM, /**< Storage ID is SIM card in slot 1. */ + MSG_STORAGE_SIM2, /**< Storage ID is SIM card in slot 2. */ }; /** - * @brief Represents the values of a storage type. \n - * This enum is used as the value of msg_folder_id_t. + * @brief Enumeration for the values of a storage type. \n + * This enum is used as the value of msg_folder_id_t. */ enum _MSG_FOLDER_ID_E { - MSG_IOSBOX_ID = -1, /**< Indicates INBOX, OUTBOX and SENTBOX group folder id. (Only for search option.) */ - MSG_ALLBOX_ID = 0, /**< Indicates INBOX, OUTBOX, SENTBOX and DRAFTBOX group folder id. (Only for search option.) */ - MSG_INBOX_ID = 1, - MSG_OUTBOX_ID = 2, - MSG_SENTBOX_ID = 3, - MSG_DRAFT_ID = 4, - MSG_CBMSGBOX_ID = 5, - MSG_SPAMBOX_ID = 6, - - // new folder should be placed here - - MSG_MAX_FOLDER_ID + MSG_IOSBOX_ID = -1, /**< Indicates INBOX, OUTBOX and SENTBOX group folder ID. (Only for search option.) */ + MSG_ALLBOX_ID = 0, /**< Indicates INBOX, OUTBOX, SENTBOX and DRAFTBOX group folder ID. (Only for search option.) */ + MSG_INBOX_ID = 1, /**< Indicates INBOX folder ID */ + MSG_OUTBOX_ID = 2, /**< Indicates OUTBOX folder ID */ + MSG_SENTBOX_ID = 3, /**< Indicates SENTBOX folder ID */ + MSG_DRAFT_ID = 4, /**< Indicates DRAFT folder ID */ + MSG_CBMSGBOX_ID = 5, /**< Indicates CALLBACK message folder ID */ + MSG_SPAMBOX_ID = 6, /**< Indicates SPAM message folder ID */ + MSG_MAX_FOLDER_ID /**< Indicates MAX folder ID. Folder ID to be accessed should be smaller than this */ }; /** - * @brief Represents the values of a folder type. \n - * This enum is used as the value of msg_folder_type_t. + * @brief Enumeration for the values of a folder type. \n + * This enum is used as the value of msg_folder_type_t. */ enum _MSG_FOLDER_TYPE_E { MSG_FOLDER_TYPE_INBOX = 1, /**< Inbox folder */ - MSG_FOLDER_TYPE_OUTBOX, /**< Outbox folder */ - MSG_FOLDER_TYPE_DRAFT, /**< Draft folder */ + MSG_FOLDER_TYPE_OUTBOX, /**< Outbox folder */ + MSG_FOLDER_TYPE_DRAFT, /**< Draft folder */ MSG_FOLDER_TYPE_SPAMBOX, /**< Spambox folder */ - MSG_FOLDER_TYPE_TEMPLATE, /**< Template folder */ MSG_FOLDER_TYPE_USER_DEF /**< Folder which is created by a user */ }; /** - * @brief Represents the values of a sort type. \n - * This enum is used as the value of msg_sort_type_t. + * @brief Enumeration for the values of a sort type. \n + * This enum is used as the value of msg_sort_type_t. */ enum _MSG_SORT_TYPE_E { MSG_SORT_BY_UNKNOWN = 0, /**< Unknown sort type */ - MSG_SORT_BY_DISPLAY_FROM, /**< Sort by display from */ - MSG_SORT_BY_DISPLAY_TO, /**< Sort by display to */ + MSG_SORT_BY_DISPLAY_FROM, /**< Sort by display from */ + MSG_SORT_BY_DISPLAY_TO, /**< Sort by display to */ MSG_SORT_BY_DISPLAY_TIME, /**< Sort by display time */ MSG_SORT_BY_MSG_TYPE, /**< Sort by msg type */ MSG_SORT_BY_READ_STATUS, /**< Sort by read status */ - MSG_SORT_BY_STORAGE_TYPE, /**< Sort by storage type */ + MSG_SORT_BY_STORAGE_TYPE, /**< Sort by storage type */ MSG_SORT_BY_THREAD_NAME, /**< Sort by name for thread view*/ MSG_SORT_BY_THREAD_DATE, /**< Sort by date for thread view*/ - MSG_SORT_BY_THREAD_COUNT, /**< Sort by count for thread view*/ + MSG_SORT_BY_THREAD_COUNT, /**< Sort by count for thread view*/ }; /** - * @brief Represents the values of a message type for quick panel. \n - * This enum is used as the value of msg_quickpanel_type_t. + * @brief Enumeration for the values of a message type for quick panel. \n + * This enum is used as the value of msg_quickpanel_type_t. */ enum _MSG_QUICKPANEL_TYPE_E { - MSG_QUICKPANEL_SMS = 0, - MSG_QUICKPANEL_MMS, - MSG_QUICKPANEL_DELIVER_REP, - MSG_QUICKPANEL_READ_REP, - MSG_QUICKPANEL_VOICEMAIL, - MSG_QUICKPANEL_MMS_NOTI, + MSG_QUICKPANEL_SMS = 0, /**< Quickpanel SMS */ + MSG_QUICKPANEL_MMS, /**< Quickpanel MMS */ + MSG_QUICKPANEL_DELIVER_REP, /**< Quickpanel delivery report */ + MSG_QUICKPANEL_READ_REP, /**< Quickpanel message read report */ + MSG_QUICKPANEL_VOICEMAIL, /**< Quickpanel voicemail */ + MSG_QUICKPANEL_MMS_NOTI, /**< Quickpanel MMS notification */ }; + /** - * @} + * @brief Enumeration for the values of a count limit for each mailbox. */ enum _MSG_COUNT_LIMIT_MAILBOX_TYPE_E { - MSG_COUNT_LIMIT_INBOX_TYPE, - MSG_COUNT_LIMIT_OUTBOX_TYPE, - MSG_COUNT_LIMIT_SENTBOX_TYPE, - MSG_COUNT_LIMIT_DRAFTBOX_TYPE, - MSG_COUNT_LIMIT_CBMSGBOX_TYPE, - MSG_COUNT_LIMIT_MAILBOX_TYPE_MAX, + MSG_COUNT_LIMIT_INBOX_TYPE, /**< Message count limit of inbox folder*/ + MSG_COUNT_LIMIT_OUTBOX_TYPE, /**< Message count limit of outbox folder*/ + MSG_COUNT_LIMIT_SENTBOX_TYPE, /**< Message count limit of sentbox folder*/ + MSG_COUNT_LIMIT_DRAFTBOX_TYPE, /**< Message count limit of draftbox folder*/ + MSG_COUNT_LIMIT_CBMSGBOX_TYPE, /**< Message count limit of call-back-message-box folder */ + MSG_COUNT_LIMIT_MAILBOX_TYPE_MAX, /**< Indicates the maximum number of types of folder message count limits */ }; + +/** + * @brief Enumeration for the values of a count limit for each message type. + */ enum _MSG_COUNT_LIMIT_MSG_TYPE_E { - MSG_COUNT_LIMIT_SMS_TYPE, - MSG_COUNT_LIMIT_MMS_TYPE, - MSG_COUNT_LIMIT_CB_TYPE, - MSG_COUNT_LIMIT_WAPPUSH_TYPE, - MSG_COUNT_LIMIT_PROVISION_TYPE, - MSG_COUNT_LIMIT_MSG_TYPE_MAX, + MSG_COUNT_LIMIT_SMS_TYPE, /**< Message count limit for SMS */ + MSG_COUNT_LIMIT_MMS_TYPE, /**< Message count limit for MMS */ + MSG_COUNT_LIMIT_CB_TYPE, /**< Message count limit for callback messages */ + MSG_COUNT_LIMIT_WAPPUSH_TYPE, /**< Message count limit for wappush messages */ + MSG_COUNT_LIMIT_PROVISION_TYPE, /**< Message count limit for provision messages */ + MSG_COUNT_LIMIT_MSG_TYPE_MAX, /**< Indicates maximum number of types of message count limits */ }; + +/** + * @brief Enumeration for the values of a storage change type. \n + * This enum is used with storage change callback functions. + */ enum _MSG_STORAGE_CHANGE_TYPE_E { // msg data - MSG_STORAGE_CHANGE_INSERT = 1, - MSG_STORAGE_CHANGE_UPDATE, - MSG_STORAGE_CHANGE_DELETE, + MSG_STORAGE_CHANGE_INSERT = 1, /**< Indicates storage change by an INSERT operation*/ + MSG_STORAGE_CHANGE_UPDATE, /**< Indicates storage change by an UPDATE operation*/ + MSG_STORAGE_CHANGE_DELETE, /**< Indicates storage change by a DELETE operation*/ // thread data - MSG_STORAGE_CHANGE_CONTACT, + MSG_STORAGE_CHANGE_CONTACT, /**< Indicates storage change by a CHANGE CONTACT operation*/ }; +/** + * @} + */ #endif /* MSG_STORAGE_TYPES_H_ */ diff --git a/include/mapi/msg_transport.h b/include/mapi/msg_transport.h index 9766bed..6dd003c 100755 --- a/include/mapi/msg_transport.h +++ b/include/mapi/msg_transport.h @@ -1,38 +1,22 @@ /* - * msg-service - * - * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved + * Copyright (c) 2014 Samsung Electronics Co., Ltd. All rights reserved * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * 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. - * */ -/** - * @file MapiTransport.h - * @brief Defines transport API of messaging framework - * @version 1.0 - */ - #ifndef MAPI_TRANSPORT_H #define MAPI_TRANSPORT_H -/** - * @section Introduction - * - Introduction : Overview on Messaging Transport API - * @section Program - * - Program : Messaging Transport API Reference - */ - /*================================================================================================== INCLUDE FILES ==================================================================================================*/ @@ -45,937 +29,521 @@ extern "C" #endif /** - * @ingroup MESSAGING_FRAMEWORK - * @defgroup MESSAGING_TRANSPORT_API Messaging Transport API - * @{ - */ - -/*================================================================================================== - FUNCTION PROTOTYPES -==================================================================================================*/ - -/** - - * \par Description: - * Submits a request to the Messaging Framework. - * - * \par Purpose: - * This API is used to submit a request to the Messaging Framework. - * - * \par Typical use case: - * Submit a request to Messaging Service such as Send Message, Forward etc. + * @internal + * @ingroup MSG_SERVICE_FRAMEWORK + * @defgroup MSG_SERVICE_FRAMEWORK_TRANSPORT_MODULE Transport API + * @brief The Transport API provides functions to send SMS/MMS and register incoming/sending/syncML/report callback. * - * \par Method of function operation: - * Sets up the database connection and inserts the message to message table. + * @internal + * @addtogroup MSG_SERVICE_FRAMEWORK_TRANSPORT_MODULE + * @{ * - * \par Sync (or) Async: - * This is a Synchronous API. + * @section MSG_SERVICE_FRAMEWORK_TRANSPORT_MODULE_HEADER Required Header + * \#include <msg_transport.h> * - * \par Important notes: - * - The result information will be sent back by using the callback function, msg_sent_status_cb. - * - Applications MUST fill in the valid message type. - * - reqId will be filled in the framework. + * @section MSG_SERVICE_FRAMEWORK_TRANSPORT_MODULE_OVERVIEW Overview * - * \param input - handle is Message handle. - * \param input - req is a pointer to an MSG_REQUEST_S structure. + * The Transport API provides the following functionalities: * - * \return Return Type (int(msg_error_t)) \n - * - MSG_SUCCESS Success in operation. - * - MSG_ERR_INVALID_MSGHANDLE Message handle is invalid. - * - MSG_ERR_NULL_POINTER Pointer is NULL. - * - * \par Prospective clients: - * External/Native Apps using Messaging Services. + * - Sending SMS/MMS messages + * - Register incoming message callback + * - Register sent status callback + * - Register push message application + * - Register syncML message callback + * - Managing the registration * - * \par Related functions: - * None + * @section MSG_SERVICE_FRAMEWORK_TRANSPORT_MODULE_FEATURE Related Features + * This API is related with the following features:\n + * - http://tizen.org/feature/network.telephony\n + * - http://tizen.org/feature/network.telephony.mms\n * - * \par Known issues/bugs: - * None + * It is recommended to design feature related codes in your application for reliability.\n * - * \par Sample code: - * \code - * ... + * You can check if a device supports the related features for this API by using @ref CAPI_SYSTEM_SYSTEM_INFO_MODULE, thereby controlling the procedure of your application.\n * - * int err = MSG_SUCCESS; - * MSG_REQUEST_S req; + * To ensure your application is only running on the device with specific features, please define the features in your manifest file using the manifest editor in the SDK.\n * - * req.msg = msg; - * req.sendOpt = sendOpt; - - * err = msg_submit_req(msgHandle, &req); - * if (err != MSG_SUCCESS) - * { - * ... - * } + * More details on featuring your application can be found from <a href="../org.tizen.mobile.native.appprogramming/html/ide_sdk_tools/feature_element.htm"><b>Feature Element</b>.</a> * - * ... - * \endcode */ -/*================================================================================================*/ -int msg_submit_req(msg_handle_t handle, msg_struct_t req); +/*================================================================================================== + FUNCTION PROTOTYPES +==================================================================================================*/ /** - - * \par Description: - * Registers sent status callback function to Message handle. - * - * \par Purpose: - * This API is used to register sent status callback function "msg_sent_status_cb" to Message handle. + * @brief Submits a request to the Messaging Framework. * - * \par Typical use case: - * Register for sent status callback. + * @since_tizen 2.3 + * @privlevel public + * @privilege %http://tizen.org/privilege/message.write * - * \par Method of function operation: - * Adds the msg_sent_status_cb API to sent status callback list. + * @remarks The result information will be sent back by using the callback function, msg_sent_status_cb(). + * @remarks Applications MUST fill in the valid message type. + * @remarks reqId will be filled in the framework. * - * \par Sync (or) Async: - * This is a Synchronous API. + * @param[in] handle The message handle + * @param[in] req The pointer to an #MSG_REQUEST_S structure * - * \par Important notes: - * This function MUST be called after Message handle is opened. + * @return @c 0 on success, + * otherwise a negative error value * - * \param input - handle is Message handle. - * \param input - cb is a function to be called. - * \param input - user_param is a pointer to user data. - * - * \return Return Type (int(msg_error_t)) \n - * - MSG_SUCCESS Success in operation. - * - MSG_ERR_INVALID_MSGHANDLE Message handle is invalid. - * - * \par Prospective clients: - * External/Native Apps using Messaging Services. + * @retval MSG_SUCCESS Success in operation + * @retval MSG_ERR_TRANSPORT_ERROR Transport error + * @retval MSG_ERR_INVALID_PARAMETER Input parameter is invalid + * @retval MSG_ERR_PERMISSION_DENIED The application does not have the privilege to call this method + * @retval MSG_ERR_NOT_SUPPORTED Not supported + */ + +int msg_submit_req(msg_handle_t handle, msg_struct_t req); + + +/** + * @brief Registers sent status callback function to Message handle. + * @details This API is used to register sent status callback function msg_sent_status_cb() to Message handle. * - * \par Related functions: - * None + * @since_tizen 2.3 + * @privlevel public + * @privilege %http://tizen.org/privilege/message.read * - * \par Known issues/bugs: - * None + * @remarks This function MUST be called after Message handle is opened. * - * \par Sample code: - * \code - * ... + * @param[in] handle The message handle + * @param[in] cb The function to be called + * @param[in] user_param A pointer to user data * - * int err = MSG_SUCCESS; - * MSG_REQUEST_S req; + * @return @c 0 on success, + * otherwise a negative error value * - * req.msg = msg; - * req.sendOpt = sendOpt; - - * err = msg_reg_sent_status_callback(msgHandle, &sentStatusCB, (void*)"sent status callback"); - * if (err != MSG_SUCCESS) - * { - * ... - * } - * return; - * } - - * void sentStatusCB(msg_handle_t Handle, MSG_SENT_STATUS_S *pStatus, void *pUserParam) - * { - * ... - * } - * ... - * \endcode + * @retval MSG_SUCCESS Success in operation + * @retval MSG_ERR_INVALID_PARAMETER Input parameter is invalid + * @retval MSG_ERR_CALLBACK_ERROR Callback registration error + * @retval MSG_ERR_PERMISSION_DENIED The application does not have the privilege to call this method + * @retval MSG_ERR_NOT_SUPPORTED Not supported */ -/*================================================================================================*/ + int msg_reg_sent_status_callback(msg_handle_t handle, msg_sent_status_cb cb, void *user_param); /** - - * \par Description: - * Registers incoming SMS callback to Message handle. + * @brief Registers incoming SMS callback to Message handle. + * @details This API is used to Registers incoming SMS callback function msg_sms_incoming_cb() to Message handle. * - * \par Purpose: - * This API is used to Registers incoming SMS callback function "msg_sms_incoming_cb" to Message handle. + * @since_tizen 2.3 + * @privlevel public + * @privilege %http://tizen.org/privilege/message.read * - * \par Typical use case: - * Register incoming SMS message callback. + * @remarks This function MUST be called after Message handle is opened. * - * \par Method of function operation: - * Adds the msg_sms_incoming_cb API to incoming SMS callback list. + * @param[in] handle The message handle + * @param[in] cb The function to be called + * @param[in] port The port used for listening \n + * If port is not used, set to @c 0. + * @param[in] user_param A pointer to user data * - * \par Sync (or) Async: - * This is a Synchronous API. + * @return @c 0 on success, + * otherwise a negative error value * - * \par Important notes: - * This function MUST be called after Message handle is opened. - * - * \param input - handle is Message handle. - * \param input - cb is a function to be called. - * \param input - port is used for listening. If port is not used, please assign 0 to it. - * \param input - user_param is a pointer to user data. - * - * \return Return Type (int(msg_error_t)) \n - * - MSG_SUCCESS Success in operation. - * - MSG_ERR_INVALID_MSGHANDLE Message handle is invalid. - * - * \par Prospective clients: - * External/Native Apps using Messaging Services. - * - * \par Related functions: - * None - * - * \par Known issues/bugs: - * None - * - * \par Sample code: - * \code - * ... - * - * int err = MSG_SUCCESS; - * MSG_REQUEST_S req; - * - * req.msg = msg; - * req.sendOpt = sendOpt; - - * err = msg_reg_sms_message_callback(msgHandle, &incomingSmsCB, 0, (void*)"sms message callback"); - * if (err != MSG_SUCCESS) - * { - * ... - * } - * return; - * } - * - * void incomingSmsCB(msg_handle_t Handle, msg_message_t msg, void *pUserParam) - * { - * ... - * } - * ... - * \endcode + * @retval MSG_SUCCESS Success in operation + * @retval MSG_ERR_INVALID_PARAMETER Input parameter is invalid + * @retval MSG_ERR_CALLBACK_ERROR Callback registration error + * @retval MSG_ERR_PERMISSION_DENIED The application does not have the privilege to call this method + * @retval MSG_ERR_NOT_SUPPORTED Not supported */ -/*================================================================================================*/ + int msg_reg_sms_message_callback(msg_handle_t handle, msg_sms_incoming_cb cb, unsigned short port, void *user_param); /** - - * \par Description: - * Registers incoming MMS callback to Message handle. + * @brief Registers incoming MMS conf callback to Message handle. + * @details This API is used to Registers incoming MMS conf callback function msg_mms_conf_msg_incoming_cb() to Message handle. * - * \par Purpose: - * This API is used to Registers incoming MMS callback function "msg_mms_conf_msg_incoming_cb" to Message handle. + * @since_tizen 2.3 + * @privlevel public + * @privilege %http://tizen.org/privilege/message.read * - * \par Typical use case: - * Register incoming SMS message callback. + * @remarks This function MUST be called after Message handle is opened. * - * \par Method of function operation: - * Adds the msg_mms_conf_msg_incoming_cb API to incoming MMS callback list. + * @param[in] handle The message handle + * @param[in] cb The function to be called + * @param[in] app_id The app ID used for listening \n + * If appId is not used, set to @c NULL. + * @param[in] user_param A pointer to user data * - * \par Sync (or) Async: - * This is a Synchronous API. + * @return @c 0 on success, + * otherwise a negative error value * - * \par Important notes: - * This function MUST be called after Message handle is opened. - * - * \param input - handle is Message handle. - * \param input - handle is Message handle. - * \param input - cb is a function to be called. - * \param input - app_id is used for listening. If appId is not used, please assign NULL to it. - * \param input - user_param is a pointer to user data. - * - * \return Return Type (int(msg_error_t)) \n - * - MSG_SUCCESS Success in operation. - * - MSG_ERR_INVALID_MSGHANDLE Message handle is invalid. - * - * \par Prospective clients: - * External/Native Apps using Messaging Services. - * - * \par Related functions: - * None - * - * \par Known issues/bugs: - * None - * - * \par Sample code: - * \code - * ... - * - * int err = MSG_SUCCESS; - * MSG_REQUEST_S req; - * - * req.msg = msg; - * req.sendOpt = sendOpt; - - * err = msg_reg_mms_conf_message_callback(msgHandle, &incomingMmsConfCB, NULL, NULL); - * if (err != MSG_SUCCESS) - * { - * ... - * } - * return; - * } - * - * void incomingMmsConfCB(msg_handle_t Handle, msg_message_t msg, void *pUserParam) - * { - * ... - * } - * ... - * \endcode + * @retval MSG_SUCCESS Success in operation + * @retval MSG_ERR_INVALID_PARAMETER Input parameter is invalid + * @retval MSG_ERR_CALLBACK_ERROR Callback registration error + * @retval MSG_ERR_PERMISSION_DENIED The application does not have the privilege to call this method + * @retval MSG_ERR_NOT_SUPPORTED Not supported */ -/*================================================================================================*/ + int msg_reg_mms_conf_message_callback(msg_handle_t handle, msg_mms_conf_msg_incoming_cb cb, const char *app_id, void *user_param); /** - - * \par Description: - * Registers incoming SyncML Message callback to Message handle. + * @brief Registers incoming SyncML Message callback to Message handle. + * @details This API is used to register incoming SyncML Message callback function msg_syncml_msg_incoming_cb() to Message handle. * - * \par Purpose: - * This API is used to Registers incoming SyncML Message callback function "msg_syncml_msg_incoming_cb" to Message handle. + * @since_tizen 2.3 + * @privlevel public + * @privilege %http://tizen.org/privilege/message.read * - * \par Typical use case: - * Register incoming SMS message callback. + * @remarks This function MUST be called after Message handle is opened. * - * \par Method of function operation: - * Adds the msg_syncml_msg_incoming_cb API to incoming SyncML callback list. + * @param[in] handle The message handle + * @param[in] cb The function to be called + * @param[in] user_param A pointer to user data * - * \par Sync (or) Async: - * This is a Synchronous API. + * @return @c 0 on success, + * otherwise a negative error value * - * \par Important notes: - * This function MUST be called after Message handle is opened. - * - * \param input - handle is Message handle. - * \param input - cb is a function to be called. - * \param input - user_param is a pointer to user data. - * - * \return Return Type (int(msg_error_t)) \n - * - MSG_SUCCESS Success in operation. - * - MSG_ERR_MSGHANDLE_NOT_CONNECTED Message handle is not connected. - * - MSG_ERR_MEMORY_ERROR Memory is error. - * - * \par Prospective clients: - * External/Native Apps using Messaging Services. - * - * \par Related functions: - * None - * - * \par Known issues/bugs: - * None - * - * \par Sample code: - * \code - * ... - * - * int err = MSG_SUCCESS; - * - * err = err = msg_reg_syncml_message_callback(msgHandle, &syncMLCB, NULL); - * if (err != MSG_SUCCESS) - * { - * ... - * } - * return; - * } - * - * void syncMLCB(msg_handle_t hMsgHandle, msg_syncml_message_type_t msgType, const char* pPushHeader, int PushHeaderLen, const char* pPushBody, int PushBodyLen, void *pUserParam) - * { - * ... - * } - * ... - * \endcode + * @retval MSG_SUCCESS Success in operation + * @retval MSG_ERR_INVALID_PARAMETER Input parameter is invalid + * @retval MSG_ERR_CALLBACK_ERROR Callback registration error + * @retval MSG_ERR_PERMISSION_DENIED The application does not have the privilege to call this method + * @retval MSG_ERR_NOT_SUPPORTED Not supported */ -/*================================================================================================*/ + int msg_reg_syncml_message_callback(msg_handle_t handle, msg_syncml_msg_incoming_cb cb, void *user_param); /** - - * \par Description: - * Registers incoming LBS Message callback to Message handle. - * - * \par Purpose: - * This API is used to Registers incoming LBS Message callback function "msg_lbs_msg_incoming_cb" to Message handle. + * @brief Registers incoming LBS Message callback to Message handle. + * @details This API is used to register incoming LBS Message callback function msg_lbs_msg_incoming_cb() to Message handle. * - * \par Typical use case: - * Register incoming SMS message callback. + * @since_tizen 2.3 + * @privlevel public + * @privilege %http://tizen.org/privilege/message.read * - * \par Method of function operation: - * Adds the msg_lbs_msg_incoming_cb API to incoming LBS Message callback list. + * @remarks This function MUST be called after Message handle is opened. * - * \par Sync (or) Async: - * This is a Synchronous API. + * @param[in] handle The message handle + * @param[in] cb The function to be called + * @param[in] user_param A pointer to user data * - * \par Important notes: - * This function MUST be called after Message handle is opened. + * @return @c 0 on success, + * otherwise a negative error value * - * \param input - handle is Message handle. - * \param input - cb is a function to be called. - * \param input - user_param is a pointer to user data. - * - * \return Return Type (int(msg_error_t)) \n - * - MSG_SUCCESS Success in operation. - * - MSG_ERR_MSGHANDLE_NOT_CONNECTED Message handle is not connected. - * - MSG_ERR_MEMORY_ERROR Memory is error. - * - * \par Prospective clients: - * External/Native Apps using Messaging Services. - * - * \par Related functions: - * None - * - * \par Known issues/bugs: - * None - * - * \par Sample code: - * \code - * ... - * - * int err = MSG_SUCCESS; - * - * err = msg_reg_lbs_message_callback(msgHandle, &lbsCB, NULL); - * if (err != MSG_SUCCESS) - * { - * ... - * } - * return; - * } - * - * void lbsCB(msg_handle_t hMsgHandle, const char* pPushHeader, const char* pPushBody, int pushBodyLen, void *pUserParam) - * { - * ... - * } - * ... - * \endcode + * @retval MSG_SUCCESS Success in operation + * @retval MSG_ERR_INVALID_PARAMETER Input parameter is invalid + * @retval MSG_ERR_CALLBACK_ERROR Callback registration error + * @retval MSG_ERR_PERMISSION_DENIED The application does not have the privilege to call this method + * @retval MSG_ERR_NOT_SUPPORTED Not supported */ -/*================================================================================================*/ + int msg_reg_lbs_message_callback(msg_handle_t handle, msg_lbs_msg_incoming_cb cb, void *user_param); /** - - * \par Description: - * Registers incoming LBS Message callback to Message handle. - * - * \par Purpose: - * This API is used to Registers incoming LBS Message callback function "msg_lbs_msg_incoming_cb" to Message handle. - * - * \par Typical use case: - * Register incoming SMS message callback. + * @brief Registers SyncML operation callback to Message handle. + * @details This API is used to register SyncML operation callback function msg_syncml_msg_operation_cb() to Message handle. * - * \par Method of function operation: - * Adds the msg_lbs_msg_incoming_cb API to incoming LBS Message callback list. + * @since_tizen 2.3 + * @privlevel public + * @privilege %http://tizen.org/privilege/message.read * - * \par Sync (or) Async: - * This is a Synchronous API. + * @remarks This function MUST be called after Message handle is opened. * - * \par Important notes: - * This function MUST be called after Message handle is opened. + * @param[in] handle The message handle + * @param[in] cb The function to be called + * @param[in] user_param A pointer to user data * - * \param input - handle is Message handle. - * \param input - cb is a function to be called. - * \param input - user_param is a pointer to user data. + * @return @c 0 on success, + * otherwise a negative error value * - * \return Return Type (int(msg_error_t)) \n - * - MSG_SUCCESS Success in operation. - * - MSG_ERR_MSGHANDLE_NOT_CONNECTED Message handle is not connected. - * - MSG_ERR_MEMORY_ERROR Memory is error. - * - * \par Prospective clients: - * External/Native Apps using Messaging Services. - * - * \par Related functions: - * None + * @retval MSG_SUCCESS Success in operation + * @retval MSG_ERR_INVALID_PARAMETER Input parameter is invalid + * @retval MSG_ERR_CALLBACK_ERROR Callback registration error + * @retval MSG_ERR_PERMISSION_DENIED The application does not have the privilege to call this method + * @retval MSG_ERR_NOT_SUPPORTED Not supported + */ + +int msg_reg_syncml_message_operation_callback(msg_handle_t handle, msg_syncml_msg_operation_cb cb, void *user_param); + + +/** + * @brief Registers incoming push Message callback to Message handle. + * @details This API is used to register incoming push Message callback function msg_push_msg_incoming_cb() to Message handle. * - * \par Known issues/bugs: - * None + * @since_tizen 2.3 + * @privlevel public + * @privilege %http://tizen.org/privilege/message.read * - * \par Sample code: - * \code - * ... + * @remarks This function MUST be called after Message handle is opened. * - * int err = MSG_SUCCESS; + * @param[in] handle The message handle + * @param[in] cb The function to be called + * @param[in] app_id The app ID for listening \n + * If appId is not used, set to @c NULL. + * @param[in] user_param A pointer to user data * - * err = msg_reg_lbs_message_callback(msgHandle, &lbsCB, NULL); - * if (err != MSG_SUCCESS) - * { - * ... - * } - * return; - * } + * @return @c 0 on success, + * otherwise a negative error value * - * void lbsCB(msg_handle_t hMsgHandle, const char* pPushHeader, const char* pPushBody, int pushBodyLen, void *pUserParam) - * { - * ... - * } - * ... - * \endcode + * @retval MSG_SUCCESS Success in operation + * @retval MSG_ERR_INVALID_PARAMETER Input parameter is invalid + * @retval MSG_ERR_CALLBACK_ERROR Callback registration error + * @retval MSG_ERR_PERMISSION_DENIED The application does not have the privilege to call this method + * @retval MSG_ERR_NOT_SUPPORTED Not supported */ -/*================================================================================================*/ -int msg_reg_syncml_message_operation_callback(msg_handle_t handle, msg_syncml_msg_operation_cb cb, void *user_param); - int msg_reg_push_message_callback(msg_handle_t handle, msg_push_msg_incoming_cb cb, const char *app_id, void *user_param); -int msg_reg_cb_message_callback(msg_handle_t handle, msg_cb_incoming_cb cb, bool bsave, void *user_param); /** - - * \par Description: - * Registers incoming LBS Message callback to Message handle. + * @brief Registers incoming CB Message callback to Message handle. + * @details This API is used to register incoming CB Message callback function msg_cb_incoming_cb() to Message handle. * - * \par Purpose: - * This API is used to Registers incoming LBS Message callback function "msg_lbs_msg_incoming_cb" to Message handle. + * @since_tizen 2.3 + * @privlevel public + * @privilege %http://tizen.org/privilege/message.read * - * \par Typical use case: - * Register incoming SMS message callback. + * @remarks This function MUST be called after Message handle is opened. * - * \par Method of function operation: - * Adds the msg_lbs_msg_incoming_cb API to incoming LBS Message callback list. + * @param[in] handle The message handle + * @param[in] cb The function to be called + * @param[in] bsave A bool flag to indicate whether CB message is to be saved or not \n + * CB message will be saved if this flag is true + * @param[in] user_param A pointer to user data * - * \par Sync (or) Async: - * This is a Synchronous API. + * @return @c 0 on success, + * otherwise a negative error value * - * \par Important notes: - * This function MUST be called after Message handle is opened. + * @retval MSG_SUCCESS Success in operation + * @retval MSG_ERR_INVALID_PARAMETER Input parameter is invalid + * @retval MSG_ERR_CALLBACK_ERROR Callback registration error + * @retval MSG_ERR_PERMISSION_DENIED The application does not have the privilege to call this method + * @retval MSG_ERR_NOT_SUPPORTED Not supported + */ + +int msg_reg_cb_message_callback(msg_handle_t handle, msg_cb_incoming_cb cb, bool bsave, void *user_param); + + + +/** + * @brief Registers incoming Report Message callback to Message handle. + * @details This API is used to register incoming Report Message callback function msg_report_msg_incoming_cb() to Message handle. * - * \param input - handle is Message handle. - * \param input - cb is a function to be called. - * \param input - user_param is a pointer to user data. + * @since_tizen 2.3 + * @privlevel public + * @privilege %http://tizen.org/privilege/message.read * - * \return Return Type (int(msg_error_t)) \n - * - MSG_SUCCESS Success in operation. - * - MSG_ERR_MSGHANDLE_NOT_CONNECTED Message handle is not connected. - * - MSG_ERR_MEMORY_ERROR Memory is error. + * @remarks This function MUST be called after Message handle is opened. * - * \par Prospective clients: - * External/Native Apps using Messaging Services. + * @param[in] handle The message handle + * @param[in] cb The function to be called + * @param[in] user_param A pointer to user data * - * \par Related functions: - * None + * @return @c 0 on success, + * otherwise a negative error value + * + * @retval MSG_SUCCESS Success in operation + * @retval MSG_ERR_INVALID_PARAMETER Input parameter is invalid + * @retval MSG_ERR_CALLBACK_ERROR Callback registration error + * @retval MSG_ERR_PERMISSION_DENIED The application does not have the privilege to call this method + * @retval MSG_ERR_NOT_SUPPORTED Not supported + */ + +int msg_reg_report_message_callback(msg_handle_t handle, msg_report_msg_incoming_cb cb, void *user_param); + + +/** + * @brief Operates SyncML message. + * @details This API is used to run SyncML operation. * - * \par Known issues/bugs: - * None + * @since_tizen 2.3 + * @privlevel public + * @privilege %http://tizen.org/privilege/message.read * - * \par Sample code: - * \code - * ... + * @remarks This function MUST be called after Message handle is opened. * - * int err = MSG_SUCCESS; + * @param[in] handle The message handle + * @param[in] msgId The message ID to run SycnML operation * - * err = msg_reg_lbs_message_callback(msgHandle, &lbsCB, NULL); - * if (err != MSG_SUCCESS) - * { - * ... - * } - * return; - * } + * @return @c 0 on success, + * otherwise a negative error value * - * void lbsCB(msg_handle_t hMsgHandle, const char* pPushHeader, const char* pPushBody, int pushBodyLen, void *pUserParam) - * { - * ... - * } - * ... - * \endcode + * @retval MSG_SUCCESS Success in operation + * @retval MSG_ERR_INVALID_PARAMETER Input parameter is invalid + * @retval MSG_ERR_TRANSPORT_ERROR Transport error + * @retval MSG_ERR_PERMISSION_DENIED The application does not have the privilege to call this method + * @retval MSG_ERR_NOT_SUPPORTED Not supported */ -/*================================================================================================*/ + int msg_syncml_message_operation(msg_handle_t handle, msg_message_id_t msgId); /** - - * \par Description: - * Sends SMS. It is a synchronous API which has been blocked until sent status arrives. - * - * \par Purpose: - * This API is used to sends SMS. + * @brief Sends SMS. + * @details This API is used to send SMS. It is a synchronous API which has been blocked until sent status arrives. * - * \par Typical use case: - * Sends a SMS Message + * @since_tizen 2.3 + * @privlevel public + * @privilege %http://tizen.org/privilege/message.write * - * \par Method of function operation: - * It is a synchronous API which has been blocked until sent status arrives. + * @param[in] phone_num The list of phone numbers \n + * It is separated by ",". + * @param[in] sms_text The SMS text + * @param[in] cb The function to be called + * @param[in] user_param The user data * - * \par Sync (or) Async: - * This is a Synchronous API. + * @return @c 0 on success, + * otherwise a negative error value * - * \par Important notes: - * - None - * - * \param input - phone_num is the list of phone numbers. It is separated by ",". - * \param input - sms_text is a SMS text. - * \param input - cb is a function to be called. - * \param input - user_param is for user data. - * - * \return Return Type (int(msg_error_t)) \n - * - MSG_SUCCESS Success in operation. - * - MSG_ERR_NULL_POINTER Invalid parameter. - * - MSG_ERR_MEMORY_ERROR Memory is error. + * @retval MSG_SUCCESS Success in operation + * @retval MSG_ERR_INVALID_PARAMETER Input parameter is invalid + * @retval MSG_ERR_PERMISSION_DENIED The application does not have the privilege to call this method + * @retval MSG_ERR_NOT_SUPPORTED Not supported * * \par Prospective clients: * External/Native Apps using Messaging Services. * - * \par Related functions: - * None - * - * \par Known issues/bugs: - * None - * - * \par Sample code: - * \code - * ... - * - * int err = MSG_SUCCESS; - * - * err = msg_sms_send("01000000000,01000000000", "1234567890", sentStatusCB, NULL); - * if (err != MSG_SUCCESS) - * { - * ... - * } - * - * ... - * \endcode */ -/*================================================================================================*/ + int msg_sms_send(const char *phone_num, const char *sms_text, msg_simple_sent_status_cb cb, void *user_param); /** - - * \par Description: - * Submits request to send SMS message. - * - * \par Purpose: - * This API is used to submit request to send SMS message. + * @brief Submits request to send SMS message. + * @details This API is used to submit request to send SMS message. * - * \par Typical use case: - * Submits request to send SMS message. + * @since_tizen 2.3 + * @privlevel public + * @privilege %http://tizen.org/privilege/message.write * - * \par Method of function operation: - * Submits a request to send SMS. + * @param[in] handle The message handle + * @param[in] req A pointer to #msg_struct_t structure for SMS request information * - * \par Sync (or) Async: - * This is a Synchronous API. + * @return @c 0 on success, + * otherwise a negative error value * - * \par Important notes: - * - None - * - * \param input - phone_num is the list of phone numbers. It is separated by ",". - * \param input - sms_text is a SMS text. - * \param input - cb is a function to be called. - * \param input - user_param is for user data. - * - * \return Return Type (int(msg_error_t)) \n - * - MSG_SUCCESS Success in operation. - * - MSG_ERR_NULL_POINTER Invalid parameter. - * - MSG_ERR_MEMORY_ERROR Memory is error. - * - * \par Prospective clients: - * External/Native Apps using Messaging Services. - * - * \par Related functions: - * None - * - * \par Known issues/bugs: - * None - * - * \par Sample code: - * \code - * ... - * - * int err = MSG_SUCCESS; - * MSG_REQUEST_S req; - * - * req.msg = msg; - * req.sendOpt = sendOpt; - * - * err = msg_sms_send_message(msgHandle, &req); - * if (err != MSG_SUCCESS) - * { - * ... - * } - * - * ... - * \endcode + * @retval MSG_SUCCESS Success in operation + * @retval MSG_ERR_NULL_POINTER Null parameter + * @retval MSG_ERR_INVALID_PARAMETER Input parameter is invalid + * @retval MSG_ERR_PERMISSION_DENIED The application does not have the privilege to call this method + * @retval MSG_ERR_NOT_SUPPORTED Not supported */ -/*================================================================================================*/ + int msg_sms_send_message(msg_handle_t handle, msg_struct_t req); /** - - * \par Description: - * Submits request to send MMS message. + * @brief Submits request to send MMS message. + * @details This API is used to submit request to send MMS message. * - * \par Purpose: - * This API is used to submit request to send MMS message. + * @since_tizen 2.3 + * @privlevel public + * @privilege %http://tizen.org/privilege/message.write * - * \par Typical use case: - * Submits request to send MMS message. + * @param[in] handle The message handle + * @param[in] req A pointer to #msg_struct_t structure for MMS request information * - * \par Method of function operation: - * Submits a request to send MMS. + * @return @c 0 on success, + * otherwise a negative error value * - * \par Sync (or) Async: - * This is a Synchronous API. - * - * \par Important notes: - * - None - * - * \param input - handle is Message handle. - * \param input - req is a pointer to an MSG_REQUEST_S structure. - * - * \return Return Type (int(msg_error_t)) \n - * - MSG_SUCCESS Success in operation. - * - MSG_ERR_NULL_POINTER Invalid parameter. - * - MSG_ERR_MEMORY_ERROR Memory is error. - * - * \par Prospective clients: - * External/Native Apps using Messaging Services. - * - * \par Related functions: - * None - * - * \par Known issues/bugs: - * None - * - * \par Sample code: - * \code - * ... - * - * int err = MSG_SUCCESS; - * MSG_REQUEST_S req; - * - * req.msg = msg; - * req.sendOpt = sendOpt; - * - * err = msg_mms_send_message(msgHandle, &req); - * if (err != MSG_SUCCESS) - * { - * ... - * } - * - * ... - * \endcode + * @retval MSG_SUCCESS Success in operation + * @retval MSG_ERR_INVALID_PARAMETER Input parameter is invalid + * @retval MSG_ERR_PERMISSION_DENIED The application does not have the privilege to call this method + * @retval MSG_ERR_NOT_SUPPORTED Not supported */ -/*================================================================================================*/ + int msg_mms_send_message(msg_handle_t handle, msg_struct_t req); /** - - * \par Description: - * Submits request to send MMS read report request. - * - * \par Purpose: - * This API is used to submit request to send MMS read report request. - * - * \par Typical use case: - * Submits request to send MMS read report request. - * - * \par Method of function operation: - * Submits a request to send MMS read report request. - * - * \par Sync (or) Async: - * This is a Synchronous API. - * - * \par Important notes: - * - None - * - * \param input - handle is Message handle. - * \param input - msg_id is a message id, which is a positive integer. - * \param input - mms_read_status is status whether message was read or not. + * @brief Submits request to send MMS read report request. + * @details This API is used to submit request to send MMS read report request. * - * \return Return Type (int(msg_error_t)) \n - * - MSG_SUCCESS Success in operation. - * - MSG_ERR_NULL_POINTER Invalid parameter. - * - MSG_ERR_MEMORY_ERROR Memory is error. + * @since_tizen 2.3 + * @privlevel public + * @privilege %http://tizen.org/privilege/message.write * - * \par Prospective clients: - * External/Native Apps using Messaging Services. - * - * \par Related functions: - * None - * - * \par Known issues/bugs: - * None + * @param[in] handle The message handle + * @param[in] msg_id The message ID \n + * This is a positive integer. + * @param[in] mms_read_status This is status whether message was read or not * - * \par Sample code: - * \code - * ... + * @return @c 0 on success, + * otherwise a negative error value * - * int err = MSG_SUCCESS; - * - * err = err = msg_mms_send_read_report(NULL, 0, MSG_READ_REPORT_IS_READ); - * if (err != MSG_SUCCESS) - * { - * ... - * } - * - * ... - * \endcode + * @retval MSG_SUCCESS Success in operation + * @retval MSG_ERR_INVALID_PARAMETER Input parameter is invalid + * @retval MSG_ERR_PERMISSION_DENIED The application does not have the privilege to call this method + * @retval MSG_ERR_NOT_SUPPORTED Not supported */ -/*================================================================================================*/ + int msg_mms_send_read_report(msg_handle_t handle, msg_message_id_t msgId, msg_read_report_status_t mms_read_status); /** - - * \par Description: - * Submits request to send forward MMS request. - * - * \par Purpose: - * This API is used to submit request to send forward MMS request. - * - * \par Typical use case: - * Submits request to send forward MMS request. - * - * \par Method of function operation: - * Submits a request to send forward MMS request. - * - * \par Sync (or) Async: - * This is a Synchronous API. - * - * \par Important notes: - * - None - * - * \param input - handle is Message handle. - * \param input - req is a pointer to an MSG_REQUEST_S structure. + * @brief Submits request to send forward MMS request. + * @details This API is used to submit request to send forward MMS request. * - * \return Return Type (int(msg_error_t)) \n - * - MSG_SUCCESS Success in operation. - * - MSG_ERR_INVALID_MSGHANDLE Message handle is invalid. - * - MSG_ERR_NULL_POINTER Pointer is NULL. + * @since_tizen 2.3 + * @privlevel public + * @privilege %http://tizen.org/privilege/message.write * - * \par Prospective clients: - * External/Native Apps using Messaging Services. - * - * \par Related functions: - * None - * - * \par Known issues/bugs: - * None + * @param[in] handle The message handle + * @param[in] req A pointer to #msg_struct_t structure for MMS * - * \par Sample code: - * \code - * ... + * @return @c 0 on success, + * otherwise a negative error value * - * int err = MSG_SUCCESS; - * - * err = err = msg_mms_send_read_report(NULL, 0, MSG_READ_REPORT_IS_READ); - * if (err != MSG_SUCCESS) - * { - * ... - * } - * - * ... - * \endcode + * @retval MSG_SUCCESS Success in operation + * @retval MSG_ERR_INVALID_PARAMETER Input parameter is invalid + * @retval MSG_ERR_PERMISSION_DENIED The application does not have the privilege to call this method + * @retval MSG_ERR_NOT_SUPPORTED Not supported */ -/*================================================================================================*/ + int msg_mms_forward_message(msg_handle_t handle, msg_struct_t req); /** - - * \par Description: - * Submits request to retrieve MMS request. - * - * \par Purpose: - * This API is used to submit request to retrieve MMS request. - * - * \par Typical use case: - * Submits request to retrieve MMS request. - * - * \par Method of function operation: - * Submits a request to send forward MMS request. - * - * \par Sync (or) Async: - * This is a Synchronous API. - * - * \par Important notes: - * - None - * - * \param input - handle is Message handle. - * \param input - req is a pointer to an MSG_REQUEST_S structure. + * @brief Submits request to retrieve MMS request. + * @details This API is used to submit request to retrieve MMS request. * - * \return Return Type (int(msg_error_t)) \n - * - MSG_SUCCESS Success in operation. - * - MSG_ERR_INVALID_MSGHANDLE Message handle is invalid. - * - MSG_ERR_NULL_POINTER Pointer is NULL. + * @since_tizen 2.3 + * @privlevel public + * @privilege %http://tizen.org/privilege/message.write * - * \par Prospective clients: - * External/Native Apps using Messaging Services. - * - * \par Related functions: - * None - * - * \par Known issues/bugs: - * None + * @param[in] handle The message handle + * @param[in] req A pointer to #msg_struct_t structure for MMS * - * \par Sample code: - * \code - * ... + * @return @c 0 on success, + * otherwise a negative error value * - * int err = MSG_SUCCESS; - * - * err = msg_mms_retrieve_message(handle, &req); - * if (err != MSG_SUCCESS) - * { - * ... - * } - * - * ... - * \endcode + * @retval MSG_SUCCESS Success in operation + * @retval MSG_ERR_INVALID_PARAMETER Input parameter is invalid + * @retval MSG_ERR_PERMISSION_DENIED The application does not have the privilege to call this method + * @retval MSG_ERR_NOT_SUPPORTED Not supported */ -/*================================================================================================*/ + int msg_mms_retrieve_message(msg_handle_t handle, msg_struct_t req); -/* reject_msg_support */ /** - - * \par Description: - * Submits request to reject MMS message. - * - * \par Purpose: - * This API is used to submit request to reject MMS message. - * - * \par Typical use case: - * Submits request to reject MMS message. - * - * \par Method of function operation: - * Submits a request to send forward reject MMS message. - * - * \par Sync (or) Async: - * This is a Synchronous API. - * - * \par Important notes: - * - None - * - * \param input - handle is Message handle. - * \param input - req is a pointer to an MSG_REQUEST_S structure. + * @brief Submits request to reject MMS message. + * @details This API is used to submit request to reject MMS message. * - * \return Return Type (int(msg_error_t)) \n - * - MSG_SUCCESS Success in operation. - * - MSG_ERR_INVALID_MSGHANDLE Message handle is invalid. - * - MSG_ERR_NULL_POINTER Pointer is NULL. + * @since_tizen 2.3 + * @privlevel public + * @privilege %http://tizen.org/privilege/message.write * - * \par Prospective clients: - * External/Native Apps using Messaging Services. - * - * \par Related functions: - * None - * - * \par Known issues/bugs: - * None + * @param[in] handle The message handle + * @param[in] req A pointer to #msg_struct_t structure for MMS * - * \par Sample code: - * \code - * ... + * @return @c 0 on success, + * otherwise a negative error value * - * int err = MSG_SUCCESS; - * - * err = msg_mms_reject_message(handle, &req); - * if (err != MSG_SUCCESS) - * { - * ... - * } - * - * ... - * \endcode + * @retval MSG_SUCCESS Success in operation + * @retval MSG_ERR_INVALID_PARAMETER Input parameter is invalid + * @retval MSG_ERR_PERMISSION_DENIED The application does not have the privilege to call this method + * @retval MSG_ERR_NOT_SUPPORTED Not supported */ -/*================================================================================================*/ + int msg_mms_reject_message(msg_handle_t handle, msg_struct_t req); /** diff --git a/include/mapi/msg_transport_types.h b/include/mapi/msg_transport_types.h index 14498aa..d27811f 100755 --- a/include/mapi/msg_transport_types.h +++ b/include/mapi/msg_transport_types.h @@ -1,20 +1,17 @@ /* - * msg-service - * - * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved + * Copyright (c) 2014 Samsung Electronics Co., Ltd. All rights reserved * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * 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. - * */ #ifndef MSG_TRANSPORT_TYPES_H_ @@ -27,113 +24,164 @@ #include "msg_types.h" #include "msg_storage_types.h" +/** + * @internal + * @addtogroup MSG_SERVICE_FRAMEWORK_TRANSPORT_MODULE + * @{ + */ + /*================================================================================================== DEFINES ==================================================================================================*/ -/** @brief Prototype of the function that will be called when the status of the message which is already sent is changed. - * Applications SHOULD implement this callback function and register it into Message handle. - * For how to register this callback function, please refer to msg_reg_sent_status_callback. - * If the application sends a message, this callback function will be called to report its sending status. - * The application can get the request ID from sent_status to know which request is bound. - * The callback function runs in the application process, not in the framework process. - * The memory of sent_status is managed by MAPI, when the callback function is finished. - * @param[in] handle is Message handle. - * @param[in] sent_status is a pointer to an MSG_SENT_STATUS_S structure. - * @param[in] user_param is a pointer to user data. - * @return void +/** @brief Called when the status of the message which is already sent is changed. + * Applications SHOULD implement this callback function and register it into Message handle. + * For how to register this callback function, please refer to msg_reg_sent_status_callback(). + * If the application sends a message, this callback function will be called to report its sending status. + * The application can get the request ID from sent_status to know which request is bound. + * The callback function runs in the application process, not in the framework process. + * The memory of @a sent_status is managed by MAPI, when the callback function is finished. + * + * @param[in] handle The Message handle + * @param[in] sent_status A pointer to #msg_struct_t structure for sent status + * @param[in] user_param The user data */ typedef void (*msg_sent_status_cb)(msg_handle_t handle, msg_struct_t sent_status, void *user_param); -/** @brief Prototype of the function that will be called when the status of the message which is already sent is changed. - * Applications SHOULD implement this callback function and register it into Message handle. - * For how to register this callback function, please refer to msg_reg_sent_status_callback. - * If the application sends a message, this callback function will be called to report its sending status. - * The application can get the request ID from sent_status to know which request is bound. - * The callback function runs in the application process, not in the framework process. - * The memory of sent_status is managed by MAPI, when the callback function is finished. - * @param[in] sent_status is a pointer to an MSG_SENT_STATUS_S structure. - * @param[in] user_param is a pointer to user data. - * @return void +/** @brief Called when the status of the message which is already sent is changed. + * Applications SHOULD implement this callback function and register it into Message handle. + * For how to register this callback function, please refer to msg_reg_sent_status_callback(). + * If the application sends a message, this callback function will be called to report its sending status. + * The application can get the request ID from sent_status to know which request is bound. + * The callback function runs in the application process, not in the framework process. + * The memory of @a sent_status is managed by MAPI, when the callback function is finished. + * + * @param[in] sent_status A pointer to #msg_struct_t structure for sent status + * @param[in] user_param The pointer to user data */ typedef void (*msg_simple_sent_status_cb)(msg_struct_t sent_status, void *user_param); -/** @brief Prototype of the function that will be called when a new message is received. - * Applications SHOULD implement this callback function and register it into Message handle. - * For how to register this callback function, please refer to msg_reg_sms_message_callback. - * This callback function will be called when a new message is received and the message satisfies the filter list. - * The callback function runs in the application process, not in the framework process. - * The memory for msg is managed by MAPI, when the callback function is finished. - * @param[in] handle is Message handle. - * @param[in] msg is a pointer to an msg_message_t structure. - * @param[in] user_param is a pointer to user data. - * @return void +/** @brief Called when a new message is received. + * Applications SHOULD implement this callback function and register it into Message handle. + * For how to register this callback function, please refer to msg_reg_sms_message_callback(). + * This callback function will be called when a new message is received and the message satisfies the filter list. + * The callback function runs in the application process, not in the framework process. + * The memory for msg is managed by MAPI, when the callback function is finished. + * + * @param[in] handle The Message handle + * @param[in] msg A pointer to #msg_struct_t structure for message details + * @param[in] user_param The user data */ typedef void (*msg_sms_incoming_cb)(msg_handle_t handle, msg_struct_t msg, void *user_param); -/** @brief Prototype of the function that will be called when a new MMS message is received. - * Applications SHOULD implement this callback function and register it into Message handle. - * For how to register this callback function, please refer to msg_reg_mms_conf_message_callback. - * This callback function will be called when a new MMS message is received and the message satisfies the filter list. - * The callback function runs in the application process, not in the framework process. - * The memory for msg is managed by MAPI, when the callback function is finished. - * @param[in] handle is Message handle. - * @param[in] msg is a pointer to an msg_message_t structure. - * @param[in] user_param is a pointer to user data. - * @return void +/** @brief Called when a new MMS message is received. + * Applications SHOULD implement this callback function and register it into Message handle. + * For how to register this callback function, please refer to msg_reg_mms_conf_message_callback(). + * This callback function will be called when a new MMS message is received and the message satisfies the filter list. + * The callback function runs in the application process, not in the framework process. + * The memory for @a msg is managed by MAPI, when the callback function is finished. + * + * @param[in] handle The Message handle + * @param[in] msg A pointer to #msg_struct_t structure for message details + * @param[in] user_param The user data */ typedef void (*msg_mms_conf_msg_incoming_cb)(msg_handle_t handle, msg_struct_t msg, void *user_param); -/** @brief Prototype of the function that will be called when a new SyncML message is received. - * Applications SHOULD implement this callback function and register it into Message handle. - * For how to register this callback function, please refer to msg_reg_syncml_message_callback. - * This callback function will be called when a new message is received and the message satisfies the filter list. - * The callback function runs in the application process, not in the framework process. - * @param[in] handle is Message handle. - * @param[in] msg_type is msg_syncml_message_type_t structure. - * @param[in] push_body is WAP Push body data. - * @param[in] push_body_len is the length of WAP Push body data. - * @param[in] user_param is a pointer to user data. - * @return void +/** @brief Called when a new SyncML message is received. + * Applications SHOULD implement this callback function and register it into Message handle. + * For how to register this callback function, please refer to msg_reg_syncml_message_callback(). + * This callback function will be called when a new message is received and the message satisfies the filter list. + * The callback function runs in the application process, not in the framework process. + * + * @param[in] handle The Message handle + * @param[in] msg_type The #msg_syncml_message_type_t structure + * @param[in] push_body The WAP Push body data + * @param[in] push_body_len The length of WAP Push body data + * @param[in] sim_index The index of the sim on which message is received. + * @param[in] user_param The user data */ -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); - - -/** @brief Prototype of the function that will be called when a new LBS message is received. - * Applications SHOULD implement this callback function and register it into Message handle. - * For how to register this callback function, please refer to msg_reg_lbs_message_callback. - * This callback function will be called when a new message is received and the message satisfies the filter list. - * The callback function runs in the application process, not in the framework process. - * @param[in] hMsgHandle is Message handle. - * @param[in] push_header is push message header data. - * @param[in] push_body is push message body data. - * @param[in] push_body_len is push message body length. - * @param[in] user_param is a pointer to user data. - * @return void +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, int sim_index, void *user_param); + + +/** @brief Called when a new LBS message is received. + * Applications SHOULD implement this callback function and register it into Message handle. + * For how to register this callback function, please refer to msg_reg_lbs_message_callback(). + * This callback function will be called when a new message is received and the message satisfies the filter list. + * The callback function runs in the application process, not in the framework process. + * + * @param[in] hMsgHandle The Message handle + * @param[in] push_header The push message header data + * @param[in] push_body The push message body data + * @param[in] push_body_len The push message body length + * @param[in] user_param The user data */ 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); -/** @brief Prototype of the function that will be called when a new SyncML message is received. - * Applications SHOULD implement this callback function and register it into Message handle. - * For how to register this callback function, please refer to msg_reg_syncml_message_callback. - * This callback function will be called when a new message is received and the message satisfies the filter list. - * The callback function runs in the application process, not in the framework process. - * @param[in] handle is Message handle. - * @param[in] user_param is a pointer to user data. - * @return void +/** @brief Called when a new SyncML message is received. + * Applications SHOULD implement this callback function and register it into Message handle. + * For how to register this callback function, please refer to msg_reg_syncml_message_callback(). + * This callback function will be called when a new message is received and the message satisfies the filter list. + * The callback function runs in the application process, not in the framework process. + * + * @param[in] handle The Message handle + * @param[in] msgId The message ID + * @param[in] extId The external ID + * @param[in] user_param The user data */ typedef void (*msg_syncml_msg_operation_cb)(msg_handle_t handle, int msgId, int extId, void *user_param); +/** @brief Called when a new push message is received. + * Applications SHOULD implement this callback function and register it into Message handle. + * For how to register this callback function, please refer to msg_reg_push_message_callback(). + * This callback function will be called when a new message is received and the message satisfies the filter list. + * The callback function runs in the application process, not in the framework process. + * + * @param[in] handle The Message handle + * @param[in] push_header The push message header data + * @param[in] push_body The push message body data + * @param[in] push_body_len The push message body length + * @param[in] user_param The user data + */ 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); +/** @brief Called when a new CB message is received. + * Applications SHOULD implement this callback function and register it into Message handle. + * For how to register this callback function, please refer to msg_reg_cb_message_callback(). + * This callback function will be called when a new message is received and the message satisfies the filter list. + * The callback function runs in the application process, not in the framework process. + * + * @param[in] handle The Message handle + * @param[in] msg A pointer to #msg_struct_t structure for message details + * @param[in] user_param The user data + */ typedef void (*msg_cb_incoming_cb)(msg_handle_t handle, msg_struct_t msg, void *user_param); + +/** @brief Called when a report message is received. + * Applications SHOULD implement this callback function and register it into Message handle. + * For how to register this callback function, please refer to msg_reg_report_message_callback(). + * This callback function will be called when a new message is received and the message satisfies the filter list. + * The callback function runs in the application process, not in the framework process. + * + * @param[in] handle The Message handle + * @param[in] reportMsgType The message type of incoming report message + * @param[in] MsgId The message ID of reported message + * @param[in] addr_len The incoming report message's address length + * @param[in] addr_val The incoming report message's address value + * @param[in] user_param The user data + */ +typedef void (*msg_report_msg_incoming_cb)(msg_handle_t handle, msg_report_type_t reportMsgType, msg_message_id_t MsgId, int addr_len, const char *addr_val, void *user_param); + +/** + * @} + */ + #endif /* MSG_TRANSPORT_TYPES_H_ */ diff --git a/include/mapi/msg_types.h b/include/mapi/msg_types.h index 45d0965..10e66a0 100755 --- a/include/mapi/msg_types.h +++ b/include/mapi/msg_types.h @@ -1,20 +1,17 @@ /* - * msg-service - * - * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved + * Copyright (c) 2014 Samsung Electronics Co., Ltd. All rights reserved * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * 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. - * */ #ifndef MSG_TYPES_H_ @@ -30,301 +27,424 @@ #define EXPORT_API __attribute__ ((visibility("default"))) #endif -#define MAX_TO_ADDRESS_CNT 10 -#define MAX_PHONE_NUMBER_LEN 20 +/** + * @internal + * @addtogroup MSG_SERVICE_FRAMEWORK + * @{ + */ + +/** + * @brief Definition for maximum address count + */ +#define MAX_TO_ADDRESS_CNT 10 + +/** + * @brief Definition for maximum phone number length + */ +#define MAX_PHONE_NUMBER_LEN 20 + +/** + * @brief Definition for maximum XDN alpha ID length + */ +#define MAX_SIM_XDN_ALPHA_ID_LEN 30 +/** + * @brief Definition for maximum address value length + */ #define MAX_ADDRESS_VAL_LEN 254 -#define MAX_SIGN_VAL_LEN 128 -#define MAX_SUBJECT_LEN 120 -#define MAX_DISPLAY_NAME_LEN 195 -#define MAX_IMAGE_PATH_LEN 1024 -#define MAX_MSG_DATA_LEN 320 -#define MAX_MSG_TEXT_LEN 1530 -#define MAX_FILTER_VALUE_LEN 40 -#define MAX_COMMAND_LEN 1024 -#define MAX_FOLDER_NAME_SIZE 20 - -#define MAX_WAPPUSH_ID_LEN 100 -#define MAX_WAPPUSH_CONTENT_TYPE_LEN 100 -#define MAX_WAPPUSH_HREF_LEN 300 -#define MAX_WAPPUSH_CONTENTS_LEN 2048 +/** + * @brief Definition for maximum subject length + */ +#define MAX_SUBJECT_LEN 120 + +/** + * @brief Definition for maximum display length length + */ +#define MAX_DISPLAY_NAME_LEN 195 + +/** + * @brief Definition for maximum image path length + */ +#define MAX_IMAGE_PATH_LEN 1024 + +/** + * @brief Definition for maximum message data length + */ +#define MAX_MSG_DATA_LEN 320 + +/** + * @brief Definition for maximum message text length + */ +#define MAX_MSG_TEXT_LEN 1530 + +/** + * @brief Definition for maximum filter value length + */ +#define MAX_FILTER_VALUE_LEN 128 + +/** + * @brief Definition for maximum command length + */ +#define MAX_COMMAND_LEN 1024 + +/** + * @brief Definition for maximum folder name size + */ +#define MAX_FOLDER_NAME_SIZE 20 + +/** + * @brief Definition for maximum ID length of push message + */ +#define MAX_WAPPUSH_ID_LEN 100 + +/** + * @brief Definition for maximum content type length of push message + */ +#define MAX_WAPPUSH_CONTENT_TYPE_LEN 100 + +/** + * @brief Definition for maximum href length of push message + */ +#define MAX_WAPPUSH_HREF_LEN 300 + +/** + * @brief Definition for maximum contents length of push message + */ +#define MAX_WAPPUSH_CONTENTS_LEN 2048 + +/** + * @brief Definition for maximum invalid object count of push message(CO) + */ #define MAX_PUSH_CACHEOP_INVALID_OBJECT_MAX 5 -#define MAX_PUSH_CACHEOP_INVALID_SERVICE_MAX 5 -#define MAX_PUSH_CACHEOP_MAX_URL_LEN 200 -#define MAX_COMMON_INFO_SIZE 20 +/** + * @brief Definition for maximum invalid service count of push message(CO) + */ +#define MAX_PUSH_CACHEOP_INVALID_SERVICE_MAX 5 + +/** + * @brief Definition for maximum URL length of push message(CO) + */ +#define MAX_PUSH_CACHEOP_MAX_URL_LEN 200 -#define MAX_SEGMENT_NUM 15 +/** + * @brief Definition for maximum segment count + */ +#define MAX_SEGMENT_NUM 15 /** - * @brief Defines the maximum file path length + * @brief Definition for maximum file path length */ -#define MSG_FILEPATH_LEN_MAX 1024 +#define MSG_FILEPATH_LEN_MAX 1024 // setting -#define SMSC_NAME_MAX 127 /* Max SMSC Name Length */ -#define SMSC_ADDR_MAX 20 /* Max SMSC Adress Length */ -#define SMSC_LIST_MAX 5 /* Max List Count of SMSC */ -#define CB_CHANNEL_NAME_MAX 32 /* cb channel name max size */ -#define CB_CHANNEL_MAX 30 /* cb channel max count */ -#define CB_LANG_TYPE_MAX 10 +/** + * @brief Definition for maximum SMSC name length + */ +#define SMSC_NAME_MAX 127 /** - * @brief Defines the maximum file name length + * @brief Definition for maximum SMSC address length */ -#define MSG_FILENAME_LEN_MAX 1024 +#define SMSC_ADDR_MAX 21 /** - * @brief Defines the maximum message id length + * @brief Definition for maximum SMSC list count */ -#define MSG_MSG_ID_LEN 100 +#define SMSC_LIST_MAX 5 /** - * @brief Defines the maximum in transition id length + * @brief Definition for maximum CB channel name length */ -#define MAX_SMIL_TRANSIN_ID 100 +#define CB_CHANNEL_NAME_MAX 32 /** - * @brief Defines the maximum out transition id length + * @brief Definition for maximum CB channel count */ -#define MAX_SMIL_TRANSOUT_ID 100 +#define CB_CHANNEL_MAX 30 /** - * @brief Defines the maximum region id length + * @brief Definition for maximum CB language type count */ -#define MAX_SMIL_REGION_ID 151 +#define CB_LANG_TYPE_MAX 10 /** - * @brief Defines the maximum transition id length + * @brief Definition for maximum file name length */ -#define MAX_SMIL_TRANSITION_ID 151 +#define MSG_FILENAME_LEN_MAX 1024 /** - * @brief Defines the maximum meta id length + * @brief Definition for maximum message id length */ -#define MAX_SMIL_META_ID 151 +#define MSG_MSG_ID_LEN 1024 /** - * @brief Defines the maximum meta name length + * @brief Definition for maximum in transition id length */ -#define MAX_SMIL_META_NAME 100 +#define MAX_SMIL_TRANSIN_ID 100 /** - * @brief Defines the maximum meta content length + * @brief Definition for maximum out transition id length */ -#define MAX_SMIL_META_CONTENT 255 +#define MAX_SMIL_TRANSOUT_ID 100 /** - * @brief Defines the maximum fit size + * @brief Definition for maximum region id length */ -#define MAX_SMIL_FIT_SIZE 31 +#define MAX_SMIL_REGION_ID 151 /** - * @brief Defines the maximum pages in a MMS + * @brief Definition for maximum transition id length */ -#define MMS_PAGE_MAX 20 +#define MAX_SMIL_TRANSITION_ID 151 /** - * @brief Defines the maximum media in a MMS + * @brief Definition for maximum meta id length */ -#define MMS_MEDIA_MAX 60 +#define MAX_SMIL_META_ID 151 /** - * @brief Defines the maximum alternate text length + * @brief Definition for maximum meta name length */ -#define MAX_SMIL_ALT_LEN 255 +#define MAX_SMIL_META_NAME 100 +/** + * @brief Definition for maximum meta content length + */ +#define MAX_SMIL_META_CONTENT 255 -//font size /** - * @brief Defines the small font size + * @brief Definition for maximum fit size */ -#define MMS_SMIL_FONT_SIZE_SMALL 24 +#define MAX_SMIL_FIT_SIZE 31 /** - * @brief Defines the normal font size + * @brief Definition for maximum pages in a MMS */ -#define MMS_SMIL_FONT_SIZE_NORMAL 30 +#define MMS_PAGE_MAX 20 /** - * @brief Defines the large font size + * @brief Definition for maximum media in a MMS */ -#define MMS_SMIL_FONT_SIZE_LARGE 36 +#define MMS_MEDIA_MAX 60 + +/** + * @brief Definition for maximum alternate text length + */ +#define MAX_SMIL_ALT_LEN 255 -#define MAX_SMIL_ANIMATE_ATTRIBUTE_NAME 100 -#define MAX_SMIL_ANIMATE_ATTRIBUTE_TYPE 100 -#define MAX_SMIL_ANIMATE_TARGET_ELEMENT 100 -#define MAX_SMIL_ANIMATE_CALC_MODE 100 +//font size +/** + * @brief Definition for small font size + */ +#define MMS_SMIL_FONT_SIZE_SMALL 24 + +/** + * @brief Definition for normal font size + */ +#define MMS_SMIL_FONT_SIZE_NORMAL 30 + +/** + * @brief Definition for large font size + */ +#define MMS_SMIL_FONT_SIZE_LARGE 36 + +/** + * @brief Definition for maximum length of java app ID + */ #define MAX_MMS_JAVA_APPID_LEN 32 -#define CONV_THUMB_WIDTH 250 -#define CONV_THUMB_HEIGHT 170 +/** + * @brief Definition for maximum length of MMS transaction ID + */ +#define MMS_TR_ID_LEN 40 + +/** + * @brief Definition for maximum length of MMS message ID + */ +#define MMS_MSG_ID_LEN 40 + +/** + * @brief Definition for maximum length of MMS contents location + */ +#define MMS_LOCATION_LEN 100 -#define MMS_TR_ID_LEN 40 -#define MMS_MSG_ID_LEN 40 -#define MMS_LOCATION_LEN 100 +/** + * @brief Definition for maximum mimeType length + */ +#define MAX_MIME_TYPE_LEN 64 -#define MAX_MMS_TEXT_LEN 2000 /*================================================================================================== TYPES ==================================================================================================*/ -typedef struct opq_msg_svc_s * msg_handle_t; -typedef struct opq_struct_s * msg_struct_t; +/** + * @brief The structure type representing an opaque pointer to message handle. + */ +typedef struct opq_msg_svc_s *msg_handle_t; +/** + * @brief The structure type representing an opaque pointer to message structure type. + */ +typedef struct opq_struct_s *msg_struct_t; +/** + * @brief The structure type representing a pointer to message list handle. + */ typedef struct msg_list_handle *msg_list_handle_t; - +/** + * @brief The structure type representing a message structure list. + */ typedef struct { - int nCount; /**< Indicates the count of msg_struct_t. */ - msg_struct_t *msg_struct_info; /**< Indicates the msg_struct_t information list. */ + int nCount; /**< The count of #msg_struct_t */ + msg_struct_t *msg_struct_info; /**< The #msg_struct_t information list */ }msg_struct_list_s; /** - * @brief Represents a messsage ID. + * @brief The message ID. */ typedef unsigned int msg_message_id_t; /** - * @brief Represents a storage type. - See enum _MSG_STORAGE_ID_E + * @brief The storage type. + * See enum _MSG_STORAGE_ID_E. */ typedef unsigned char msg_storage_id_t; /** - * @brief Represents a folder ID. - See enum _MSG_FOLDER_ID_E + * @brief The folder ID. + * See enum _MSG_FOLDER_ID_E. */ typedef char msg_folder_id_t; /** - * @brief Represents a request ID, which is unique for each request. + * @brief The request ID, which is unique for each request. */ typedef unsigned int msg_request_id_t; /** - * @brief Represents a message priority. \n - * The values for this type SHOULD be in _MSG_PRIORITY_TYPE_E. + * @brief The message priority. \n + * The values for this type SHOULD be in _MSG_PRIORITY_TYPE_E. */ typedef unsigned char msg_priority_type_t; /** - * @brief Represents the network status of a message. \n - * The values for this type SHOULD be in _MSG_NETWORK_STATUS_E. + * @brief The network status of a message. \n + * The values for this type SHOULD be in _MSG_NETWORK_STATUS_E. */ typedef unsigned char msg_network_status_t; /** - * @brief Represents an address type. \n - * The values for this type SHOULD be in _MSG_ADDRESS_TYPE_E. + * @brief The address type. \n + * The values for this type SHOULD be in _MSG_ADDRESS_TYPE_E. */ typedef unsigned char msg_address_type_t; /** - * @brief Represents an recipient type. \n - * The values for this type SHOULD be in _MSG_RECIPIENT_TYPE_E. + * @brief The recipient type. \n + * The values for this type SHOULD be in _MSG_RECIPIENT_TYPE_E. */ typedef unsigned char msg_recipient_type_t; /** - * @brief Represents the type of a message direction. \n - * The values for this type SHOULD be in _MSG_DIRECTION_TYPE_E. + * @brief The type of a message direction. \n + * The values for this type SHOULD be in _MSG_DIRECTION_TYPE_E. */ typedef unsigned char msg_direction_type_t; /** - * @brief Represents an encoding type. \n - * The values for this type SHOULD be in _MSG_ENCODE_TYPE_E. + * @brief The encoding type. \n + * The values for this type SHOULD be in _MSG_ENCODE_TYPE_E. */ typedef unsigned char msg_encode_type_t; /** - * @brief Represents an error code. \n - * The values for this type SHOULD be in _MSG_ERROR_E + * @brief The error code. \n + * The values for this type SHOULD be in _MSG_ERROR_E. */ typedef int msg_error_t; /** -\brief Represents WAP Push App Code. +* @brief The WAP Push App Code. */ typedef unsigned char msg_push_action_t; /** -\brief Represents SyncML Message Type. +* @brief The SyncML Message Type. */ typedef unsigned short msg_syncml_message_type_t; /** - * @brief Represents a Contact ID. + * @brief The Contact ID. */ typedef unsigned int msg_contact_id_t; /** - * @brief Represents a Report Type. - * The values for this type SHOULD be in _MSG_REPORT_TYPE_E - */ + * @brief The Report Type. \n + * The values for this type SHOULD be in _MSG_REPORT_TYPE_E. + */ typedef int msg_report_type_t; /** - * @brief Represents a Delivery Report Status. - * The values for this type SHOULD be in _MSG_DELIVERY_REPORT_STATUS_E - */ + * @brief The Delivery Report Status. \n + * The values for this type SHOULD be in _MSG_DELIVERY_REPORT_STATUS_E. + */ typedef int msg_delivery_report_status_t; /** - * @brief Represents a Read Report Status. - * The values for this type SHOULD be in _MSG_READ_REPORT_STATUS_E + * @brief The Read Report Status.\n + * The values for this type SHOULD be in _MSG_READ_REPORT_STATUS_E */ typedef int msg_read_report_status_t; /** - * @brief Represents a Message Type. - * The values for this type SHOULD be in _MSG_MESSAGE_TYPE_E + * @brief The Message Type. \n + * The values for this type SHOULD be in _MSG_MESSAGE_TYPE_E. */ typedef unsigned short msg_message_type_t; /** - * @brief Represents a Message Backup Type. - * The values for this type SHOULD be in _MSG_MESSAGE_BACKUP_TYPE_E + * @brief The Message Backup Type. \n + * The values for this type SHOULD be in _MSG_MESSAGE_BACKUP_TYPE_E. */ typedef unsigned int msg_message_backup_type_t; /** - * @brief Represents a thread ID. \n + * @brief The thread ID. */ typedef unsigned int msg_thread_id_t; // filter /** - * @brief Represents a filter ID. + * @brief The filter ID. */ typedef unsigned char msg_filter_id_t; /** - * @brief Represents a filter Type. \n - * The filter Type represents a unique filter type. \n - * The values for this type SHOULD be in _MSG_FILTER_TYPE_E. + * @brief The filter Type. \n + * The filter type represents a unique filter type. \n + * The values for this type SHOULD be in _MSG_FILTER_TYPE_E. */ typedef unsigned char msg_filter_type_t; @@ -334,441 +454,708 @@ typedef unsigned char msg_filter_type_t; ENUMS ==================================================================================================*/ +/** + * @brief Enumeration for the values of a structure type for #msg_sturuct_t. \n + */ enum _MSG_STRUCT_E { - MSG_STRUCT_FILTER = 0X0000, /**< Indicates the MSG_STRUCT_FILTER */ - - MSG_STRUCT_MESSAGE_INFO = 0x0200, /**< Indicates the MSG_STRUCT_MESSAGE_INFO */ - MSG_STRUCT_THREAD_INFO = 0x0300, - MSG_STRUCT_CONV_INFO = 0x0400, - MSG_STRUCT_MMS = 0x0500, /**< Indicates the MSG_STRUCT_MMS */ - MSG_STRUCT_MMS_PAGE = 0x0600, /**< Indicates the MSG_STRUCT_MMS_PAGE */ - MSG_STRUCT_MMS_MEDIA = 0x0700, /**< Indicates the MSG_STRUCT_MMS_MEDIA */ - MSG_STRUCT_MMS_ATTACH = 0x0800, /**< Indicates the MSG_STRUCT_MMS_ATTACH */ - MSG_STRUCT_MMS_REGION = 0x0900, /**< Indicates the MSG_STRUCT_MMS_REGION */ - MSG_STRUCT_MMS_TRANSITION = 0x0a00, /**< Indicates the MSG_STRUCT_MMS_TRANSITION */ - MSG_STRUCT_MMS_META = 0x0b00, /**< Indicates the MSG_STRUCT_MMS_META */ - MSG_STRUCT_MMS_SMIL_TEXT = 0x0c00, /**< Indicates the MSG_STRUCT_MMS_SMIL_TEXT */ - MSG_STRUCT_MMS_SMIL_AVI = 0x0d00, /**< Indicates the MSG_STRUCT_MMS_SMIL_AVI */ - - MSG_STRUCT_SETTING_SMSC_OPT = 0x2000, - MSG_STRUCT_SETTING_SMSC_INFO = 0x2100, /**< Indicates the MSG_STRUCT_SETTING_SMSC_INFO */ - MSG_STRUCT_SETTING_CB_OPT = 0x2200, /**< Indicates the MSG_STRUCT_SETTING_CB_OPT */ - MSG_STRUCT_SETTING_CB_CHANNEL_INFO = 0x2300, /**< Indicates the MSG_STRUCT_CB_CHANNEL_INFO */ - MSG_STRUCT_SETTING_SMS_SEND_OPT = 0x2400, /**< Indicates the MSG_STRUCT_SETTING_SMS_SEND_OPT */ - MSG_STRUCT_SETTING_MMS_SEND_OPT = 0x2500, /**< Indicates the MSG_STRUCT_SETTING_MMS_SEND_OPT */ - MSG_STRUCT_SETTING_MMS_RECV_OPT = 0x2600, /**< Indicates the MSG_STRUCT_SETTING_MMS_RECV_OPT */ - MSG_STRUCT_SETTING_PUSH_MSG_OPT = 0x2700, /**< Indicates the MSG_STRUCT_SETTING_PUSH_MSG_OPT */ - MSG_STRUCT_SETTING_VOICE_MSG_OPT = 0x2800, /**< Indicates the MSG_STRUCT_SETTING_VOICE_MSG_OPT */ - MSG_STRUCT_SETTING_GENERAL_OPT = 0x2900, /**< Indicates the MSG_STRUCT_SETTING_GENERAL_OPT */ - MSG_STRUCT_SETTING_MSGSIZE_OPT = 0x2c00, /**< Indicates the MSG_STRUCT_SETTING_MSGSIZE_OPT */ - - - MSG_STRUCT_SYNCML_INFO = 0x3100, /**< Indicates the MSG_STRUCT_SYNCML_INFO */ - MSG_STRUCT_COUNT_INFO = 0x3200, /**< Indicates the MSG_STRUCT_COUNT_INFO */ - MSG_STRUCT_THREAD_COUNT_INFO = 0x3300, /**< Indicates the MSG_STRUCT_THREAD_COUNT_INFO */ - MSG_STRUCT_THREAD_LIST_INDEX = 0x3400, /**< Indicates the MSG_STRUCT_THREAD_LIST_INDEX */ - MSG_STRUCT_SORT_RULE = 0x3500, /**< Indicates the MSG_STRUCT_SORT_RULE */ - MSG_STRUCT_FOLDER_INFO = 0x3600, /**< Indicates the MSG_STRUCT_FOLDER_INFO */ - MSG_STRUCT_SEARCH_CONDITION = 0x3700, /**< Indicates the MSG_STRUCT_SEARCH_CONDITION */ - MSG_STRUCT_REPORT_STATUS_INFO = 0x3800, /**< Indicates the MSG_STRUCT_REPORT_STATUS_INFO */ - - MSG_STRUCT_ADDRESS_INFO = 0x4000, /**< Indicates the MSG_STRUCT_ADDRESS_INFO */ - MSG_STRUCT_SENDOPT = 0x4100, /**< Indicates the MSG_STRUCT_SENDOPT */ - MSG_STRUCT_MMS_SENDOPT = 0x4200, /**< Indicates the MSG_STRUCT_MMS_SENDOPT */ - MSG_STRUCT_SMS_SENDOPT = 0x4300, /**< Indicates the MSG_STRUCT_SMS_SENDOPT */ - MSG_STRUCT_REJECT_MSG_INFO = 0x4400, /**< Indicates the MSG_STRUCT_REJECT_MSG_INFO */ - MSG_STRUCT_REQUEST_INFO = 0x4500, /**< Indicates the MSG_STRUCT_REQUEST_INFO */ - MSG_STRUCT_SENT_STATUS_INFO = 0x4600, /**< Indicates the MSG_STRUCT_SENT_STATUS_INFO */ - MSG_STRUCT_PUSH_CONFIG_INFO = 0x4700, /**< Indicates the MSG_STRUCT_PUSH_CONFIG_INFO */ - MSG_STRUCT_CB_MSG = 0x4800, /**< Indicates the MSG_STRUCT_CB_MSG */ -}; - + MSG_STRUCT_FILTER = 0X0000, /**< Indicates the MSG_STRUCT_FILTER */ + + MSG_STRUCT_MESSAGE_INFO = 0x0200, /**< Indicates the MSG_STRUCT_MESSAGE_INFO */ + MSG_STRUCT_THREAD_INFO = 0x0300, /**< Indicates the MSG_STRUCT_THREAD_INFO*/ + MSG_STRUCT_CONV_INFO = 0x0400, /**< Indicates the MSG_STRUCT_CONV_INFO*/ + MSG_STRUCT_MMS = 0x0500, /**< Indicates the MSG_STRUCT_MMS */ + MSG_STRUCT_MMS_PAGE = 0x0600, /**< Indicates the MSG_STRUCT_MMS_PAGE */ + MSG_STRUCT_MMS_MEDIA = 0x0700, /**< Indicates the MSG_STRUCT_MMS_MEDIA */ + MSG_STRUCT_MMS_ATTACH = 0x0800, /**< Indicates the MSG_STRUCT_MMS_ATTACH */ + MSG_STRUCT_MMS_REGION = 0x0900, /**< Indicates the MSG_STRUCT_MMS_REGION */ + MSG_STRUCT_MMS_TRANSITION = 0x0a00, /**< Indicates the MSG_STRUCT_MMS_TRANSITION */ + MSG_STRUCT_MMS_META = 0x0b00, /**< Indicates the MSG_STRUCT_MMS_META */ + MSG_STRUCT_MMS_SMIL_TEXT = 0x0c00, /**< Indicates the MSG_STRUCT_MMS_SMIL_TEXT */ + MSG_STRUCT_MMS_SMIL_AVI = 0x0d00, /**< Indicates the MSG_STRUCT_MMS_SMIL_AVI */ + + MSG_STRUCT_SETTING_SMSC_OPT = 0x2000, /**< Indicates the MSG_STRUCT_SETTING_SMSC_OPT */ + MSG_STRUCT_SETTING_SMSC_INFO = 0x2100, /**< Indicates the MSG_STRUCT_SETTING_SMSC_INFO */ + MSG_STRUCT_SETTING_CB_OPT = 0x2200, /**< Indicates the MSG_STRUCT_SETTING_CB_OPT */ + MSG_STRUCT_SETTING_CB_CHANNEL_INFO = 0x2300, /**< Indicates the MSG_STRUCT_CB_CHANNEL_INFO */ + MSG_STRUCT_SETTING_SMS_SEND_OPT = 0x2400, /**< Indicates the MSG_STRUCT_SETTING_SMS_SEND_OPT */ + MSG_STRUCT_SETTING_MMS_SEND_OPT = 0x2500, /**< Indicates the MSG_STRUCT_SETTING_MMS_SEND_OPT */ + MSG_STRUCT_SETTING_MMS_RECV_OPT = 0x2600, /**< Indicates the MSG_STRUCT_SETTING_MMS_RECV_OPT */ + MSG_STRUCT_SETTING_PUSH_MSG_OPT = 0x2700, /**< Indicates the MSG_STRUCT_SETTING_PUSH_MSG_OPT */ + MSG_STRUCT_SETTING_VOICE_MSG_OPT = 0x2800, /**< Indicates the MSG_STRUCT_SETTING_VOICE_MSG_OPT */ + MSG_STRUCT_SETTING_GENERAL_OPT = 0x2900, /**< Indicates the MSG_STRUCT_SETTING_GENERAL_OPT */ + + MSG_STRUCT_SETTING_MSGSIZE_OPT = 0x2c00, /**< Indicates the MSG_STRUCT_SETTING_MSGSIZE_OPT */ + + MSG_STRUCT_SYNCML_INFO = 0x3100, /**< Indicates the MSG_STRUCT_SYNCML_INFO */ + MSG_STRUCT_COUNT_INFO = 0x3200, /**< Indicates the MSG_STRUCT_COUNT_INFO */ + MSG_STRUCT_THREAD_COUNT_INFO = 0x3300, /**< Indicates the MSG_STRUCT_THREAD_COUNT_INFO */ + MSG_STRUCT_THREAD_LIST_INDEX = 0x3400, /**< Indicates the MSG_STRUCT_THREAD_LIST_INDEX */ + MSG_STRUCT_SORT_RULE = 0x3500, /**< Indicates the MSG_STRUCT_SORT_RULE */ + MSG_STRUCT_FOLDER_INFO = 0x3600, /**< Indicates the MSG_STRUCT_FOLDER_INFO */ + MSG_STRUCT_SEARCH_CONDITION = 0x3700, /**< Indicates the MSG_STRUCT_SEARCH_CONDITION */ + MSG_STRUCT_REPORT_STATUS_INFO = 0x3800, /**< Indicates the MSG_STRUCT_REPORT_STATUS_INFO */ + MSG_STRUCT_MSG_LIST_CONDITION = 0x3900, /**< Indicates the MSG_LIST_CONDITION */ + + MSG_STRUCT_ADDRESS_INFO = 0x4000, /**< Indicates the MSG_STRUCT_ADDRESS_INFO */ + MSG_STRUCT_SENDOPT = 0x4100, /**< Indicates the MSG_STRUCT_SENDOPT */ + MSG_STRUCT_MMS_SENDOPT = 0x4200, /**< Indicates the MSG_STRUCT_MMS_SENDOPT */ + MSG_STRUCT_SMS_SENDOPT = 0x4300, /**< Indicates the MSG_STRUCT_SMS_SENDOPT */ + MSG_STRUCT_REJECT_MSG_INFO = 0x4400, /**< Indicates the MSG_STRUCT_REJECT_MSG_INFO */ + MSG_STRUCT_REQUEST_INFO = 0x4500, /**< Indicates the MSG_STRUCT_REQUEST_INFO */ + MSG_STRUCT_SENT_STATUS_INFO = 0x4600, /**< Indicates the MSG_STRUCT_SENT_STATUS_INFO */ + MSG_STRUCT_PUSH_CONFIG_INFO = 0x4700, /**< Indicates the MSG_STRUCT_PUSH_CONFIG_INFO */ + MSG_STRUCT_CB_MSG = 0x4800, /**< Indicates the MSG_STRUCT_CB_MSG */ + MSG_STRUCT_MULTIPART_INFO = 0x4a00, /**< Indicates the MSG_STRUCT_MULTIPART_INFO */ + MSG_STRUCT_MEDIA_INFO = 0x5000, /**< Indicates the MSG_STRUCT_MEDIA_INFO*/ +}; + +/** + * @brief Enumeration for the values of message detail information. \n + * This enum is used as member of #msg_struct_t for MSG_STRUCT_MESSAGE_INFO. + */ enum _MSG_MESSAGE_INFO_E_ { - MSG_MESSAGE_ID_INT = MSG_STRUCT_MESSAGE_INFO+1, /**< Indicates the message ID of this message. */ - MSG_MESSAGE_THREAD_ID_INT, /**< Indicates the thread ID. */ - MSG_MESSAGE_FOLDER_ID_INT, /**< Indicates the folder ID. see enum _MSG_FOLDER_TYPE_E */ - MSG_MESSAGE_TYPE_INT, /**< Indicates the message type. See enum _MSG_MESSAGE_TYPE_E */ - MSG_MESSAGE_CLASS_TYPE_INT, /**< Message class type. See enum _MSG_CLASS_TYPE_E */ - MSG_MESSAGE_STORAGE_ID_INT, /**< Indicates where the message is saved. see enum _MSG_STORAGE_ID_E*/ - MSG_MESSAGE_ADDR_LIST_STRUCT, /**< Indicates the address information list. */ - MSG_MESSAGE_REPLY_ADDR_STR, /**< Indicates the reply address. */ - MSG_MESSAGE_SUBJECT_STR, /**< Indicates the message subject. */ - MSG_MESSAGE_DISPLAY_TIME_INT, /**< Indicates the display time related to the specific operation. */ - MSG_MESSAGE_NETWORK_STATUS_INT, /**< Indicates the network status of the message. See enum _MSG_NETWORK_STATUS_E */ - MSG_MESSAGE_ENCODE_TYPE_INT, /**< Indicates the string encoding type. See enum _MSG_ENCODE_TYPE_E */ - MSG_MESSAGE_READ_BOOL, /**< Indicates whether the message is read or not. */ - MSG_MESSAGE_PROTECTED_BOOL, /**< Indicates whether the message is protected or not. */ - MSG_MESSAGE_BACKUP_BOOL, /**< Indicates whether the message was restored from PC. */ - MSG_MESSAGE_PRIORITY_INT, /**< Indicates the priority of the message. See enum _MSG_PRIORITY_TYPE_E */ - MSG_MESSAGE_DIRECTION_INT, /**< Indicates whether the message is MO or MT, affecting address. See enum _MSG_DIRECTION_TYPE_E */ - MSG_MESSAGE_PORT_VALID_BOOL, /**< Indicates whether port information is used or not. */ - MSG_MESSAGE_DEST_PORT_INT, /**< Recipient port number, not greater than 16 bit */ - MSG_MESSAGE_SRC_PORT_INT, /**< Sender port number, not greater than 16 bit */ - MSG_MESSAGE_ATTACH_COUNT_INT, /**< Indicates the count of attached files in mms. */ - MSG_MESSAGE_THUMBNAIL_PATH_STR, /**< Indicates the thumbnail path of message. */ - MSG_MESSAGE_DATA_SIZE_INT, /**< Indicates the data size. The unit is byte. */ - MSG_MESSAGE_SMS_DATA_STR, /**< Indicates the message payload information as a body. default character encoding is UTF-8*/ - MSG_MESSAGE_MMS_TEXT_STR, -}; - + MSG_MESSAGE_ID_INT = MSG_STRUCT_MESSAGE_INFO+1, /**< Indicates the message ID of this message. */ + MSG_MESSAGE_THREAD_ID_INT, /**< Indicates the thread ID. */ + MSG_MESSAGE_FOLDER_ID_INT, /**< Indicates the folder ID. See enum _MSG_FOLDER_ID_E */ + MSG_MESSAGE_TYPE_INT, /**< Indicates the message type. See enum _MSG_MESSAGE_TYPE_E */ + MSG_MESSAGE_CLASS_TYPE_INT, /**< Indicates the message class type. See enum _MSG_CLASS_TYPE_E */ + MSG_MESSAGE_STORAGE_ID_INT, /**< Indicates where the message is saved. See enum _MSG_STORAGE_ID_E*/ + MSG_MESSAGE_ADDR_LIST_STRUCT, /**< Indicates the address information list. **DEPRECATED** */ + MSG_MESSAGE_REPLY_ADDR_STR, /**< Indicates the reply address. */ + MSG_MESSAGE_SUBJECT_STR, /**< Indicates the message subject. */ + MSG_MESSAGE_DISPLAY_TIME_INT, /**< Indicates the display time related to the specific operation. */ + MSG_MESSAGE_NETWORK_STATUS_INT, /**< Indicates the network status of the message. See enum _MSG_NETWORK_STATUS_E */ + MSG_MESSAGE_ENCODE_TYPE_INT, /**< Indicates the string encoding type. See enum _MSG_ENCODE_TYPE_E */ + MSG_MESSAGE_READ_BOOL, /**< Indicates whether the message is read or not. */ + MSG_MESSAGE_PROTECTED_BOOL, /**< Indicates whether the message is protected or not. */ + MSG_MESSAGE_BACKUP_BOOL, /**< Indicates whether the message was restored from PC. */ + MSG_MESSAGE_PRIORITY_INT, /**< Indicates the priority of the message. See enum _MSG_PRIORITY_TYPE_E */ + MSG_MESSAGE_DIRECTION_INT, /**< Indicates whether the message is MO or MT, affecting address. See enum _MSG_DIRECTION_TYPE_E */ + MSG_MESSAGE_PORT_VALID_BOOL, /**< Indicates whether port information is used or not. */ + MSG_MESSAGE_DEST_PORT_INT, /**< Indicates the recipient port number, not greater than 16 bit */ + MSG_MESSAGE_SRC_PORT_INT, /**< Indicates the sender port number, not greater than 16 bit */ + MSG_MESSAGE_ATTACH_COUNT_INT, /**< Indicates the count of attached files in MMS. */ + MSG_MESSAGE_THUMBNAIL_PATH_STR, /**< Indicates the thumbnail path of message. */ + MSG_MESSAGE_DATA_SIZE_INT, /**< Indicates the data size. The unit is byte. */ + MSG_MESSAGE_SMS_DATA_STR, /**< Indicates the message payload information as a body. default character encoding is UTF-8*/ + MSG_MESSAGE_MMS_TEXT_STR, /**< Indicates the text part of MMS message payload. default character encoding is UTF-8 */ + MSG_MESSAGE_ADDR_LIST_HND, /**< Indicates the address information list. */ + MSG_MESSAGE_REPLACE_BOOL, /**< Indicates whether the message is replace or not */ + MSG_MESSAGE_SIM_INDEX_INT, /**< Indicates the sim index */ + MSG_MESSAGE_INFO_MAX, /**< Placeholder for max value of this enum*/ +}; + +/** + * @brief Enumeration for the values of message filter information. \n + * This enum is used as member of #msg_struct_t for MSG_STRUCT_FILTER. + */ enum MSG_FILTER_INFO_E { - MSG_FILTER_ID_INT = MSG_STRUCT_FILTER+1, /**< Indicates the filter ID. */ - MSG_FILTER_TYPE_INT, /**< Indicates the filter type. See enum _MSG_FILTER_TYPE_E */ - MSG_FILTER_VALUE_STR, /**< The value of the filter. */ - MSG_FILTER_ACTIVE_BOOL, /**< Indicates the activation of the filter. */ + MSG_FILTER_ID_INT = MSG_STRUCT_FILTER+1, /**< Indicates the filter ID. */ + MSG_FILTER_TYPE_INT, /**< Indicates the filter type. See enum _MSG_FILTER_TYPE_E */ + MSG_FILTER_VALUE_STR, /**< Indicates the value of the filter. */ + MSG_FILTER_ACTIVE_BOOL, /**< Indicates the activation of the filter. */ }; +/** + * @brief Enumeration for the values of thread information. \n + * This enum is used as member of #msg_struct_t for MSG_STRUCT_THREAD_INFO. + */ enum MSG_STRUCT_THREAD_INFO_E { - MSG_THREAD_ID_INT = MSG_STRUCT_THREAD_INFO+1, /**< Indicates the message thread ID. */ - MSG_THREAD_NAME_STR, /**< Indicates the message thread name */ - MSG_THREAD_MSG_TYPE_INT, /**< Indicates the message type. See enum _MSG_MESSAGE_TYPE_E */ - MSG_THREAD_MSG_DATA_STR, /**< The latest message text. */ - MSG_THREAD_MSG_TIME_INT, /**< The latest message time */ - MSG_THREAD_DIRECTION_INT, /**< The latest message direction See enum _MSG_DIRECTION_TYPE_E */ - MSG_THREAD_UNREAD_COUNT_INT, /**< Indicates unread count of thread */ - MSG_THREAD_SMS_COUNT_INT, /**< Indicates sms message count of thread */ - MSG_THREAD_MMS_COUNT_INT, /**< Indicates mms message count of thread */ - MSG_THREAD_PROTECTED_BOOL /**< Indicates whether thread includes protected messages. */ -}; + MSG_THREAD_ID_INT = MSG_STRUCT_THREAD_INFO+1, /**< Indicates the message thread ID. */ + MSG_THREAD_NAME_STR, /**< Indicates the message thread name */ + MSG_THREAD_MSG_TYPE_INT, /**< Indicates the message type. See enum _MSG_MESSAGE_TYPE_E */ + MSG_THREAD_MSG_DATA_STR, /**< The latest message text. */ + MSG_THREAD_MSG_TIME_INT, /**< The latest message time */ + MSG_THREAD_DIRECTION_INT, /**< The latest message direction See enum _MSG_DIRECTION_TYPE_E */ + MSG_THREAD_UNREAD_COUNT_INT, /**< Indicates unread count of thread */ + MSG_THREAD_SMS_COUNT_INT, /**< Indicates SMS message count of thread */ + MSG_THREAD_MMS_COUNT_INT, /**< Indicates MMS message count of thread */ + MSG_THREAD_PROTECTED_BOOL, /**< Indicates whether thread includes protected message. */ + MSG_THREAD_DRAFT_BOOL, /**< Indicates whether thread includes draft message. */ + MSG_THREAD_SEND_FAILED_BOOL, /**< Indicates whether thread includes send failed message. */ + MSG_THREAD_SENDING_BOOL, /**< Indicates whether thread includes sending message. */ -enum MSG_STRUCT_CONV_INFO_E { - MSG_CONV_MSG_ID_INT = MSG_STRUCT_CONV_INFO+1, /**< Indicates the message ID of this message. */ - MSG_CONV_MSG_THREAD_ID_INT, /**< Indicates the thread ID. */ - MSG_CONV_MSG_TYPE_INT, /**< Indicates the message type. See enum _MSG_MESSAGE_TYPE_E */ - MSG_CONV_MSG_FOLDER_ID_INT, /**< Indicates the folder ID. see enum _MSG_FOLDER_TYPE_E */ - MSG_CONV_MSG_STORAGE_ID_INT, /**< Indicates where the message is saved. see enum _MSG_STORAGE_ID_E*/ - MSG_CONV_MSG_SUBJECT_STR, /**< Indicates the message subject. */ - MSG_CONV_MSG_DISPLAY_TIME_INT, /**< Indicates the display time related to the specific operation. */ - MSG_CONV_MSG_SCHEDULED_TIME_INT, /**< Indicates the time to send scheduled message. */ - MSG_CONV_MSG_NETWORK_STATUS_INT, /**< Indicates the network status of the message. See enum _MSG_NETWORK_STATUS_E */ - MSG_CONV_MSG_READ_BOOL, /**< Indicates whether the message is read or not. */ - MSG_CONV_MSG_PROTECTED_BOOL, /**< Indicates whether the message is protected or not. */ - MSG_CONV_MSG_DIRECTION_INT, /**< Indicates whether the message is MO or MT, affecting address. See enum _MSG_DIRECTION_TYPE_E */ - MSG_CONV_MSG_PAGE_COUNT_INT, /**< Indicates the count of pages in mms. */ - MSG_CONV_MSG_ATTACH_COUNT_INT, /**< Indicates the count of attached files in mms. */ - MSG_CONV_MSG_ATTACH_NAME_STR, /**< Indicates the attached file name of message. */ - MSG_CONV_MSG_AUDIO_NAME_STR, /**< Indicates the audio file name of message. */ - MSG_CONV_MSG_IMAGE_THUMB_PATH_STR, /**< Indicates the image thumbnail path of message. */ - MSG_CONV_MSG_VIDEO_THUMB_PATH_STR, /**< Indicates the video thumbnail path of message. */ - MSG_CONV_MSG_TEXT_SIZE_INT, /**< Indicates the data size. The unit is byte. */ - MSG_CONV_MSG_TEXT_STR /**< Indicates the message payload information as a body. default character encoding is UTF-8*/ + MSG_THREAD_INFO_MAX /**< Placeholder for max value of this enum */ }; +/** + * @brief Enumeration for the values of conversation information. \n + * This enum is used as member of #msg_struct_t for MSG_STRUCT_CONV_INFO. + */ +enum MSG_STRUCT_CONV_INFO_E { + MSG_CONV_MSG_ID_INT = MSG_STRUCT_CONV_INFO+1, /**< Indicates the message ID of this message. */ + MSG_CONV_MSG_THREAD_ID_INT, /**< Indicates the thread ID. */ + MSG_CONV_MSG_TYPE_INT, /**< Indicates the message type. See enum _MSG_MESSAGE_TYPE_E */ + MSG_CONV_MSG_FOLDER_ID_INT, /**< Indicates the folder ID. See enum _MSG_FOLDER_TYPE_E */ + MSG_CONV_MSG_STORAGE_ID_INT, /**< Indicates where the message is saved. See enum _MSG_STORAGE_ID_E*/ + MSG_CONV_MSG_SUBJECT_STR, /**< Indicates the message subject. */ + MSG_CONV_MSG_DISPLAY_TIME_INT, /**< Indicates the display time related to the specific operation. */ + MSG_CONV_MSG_SCHEDULED_TIME_INT, /**< Indicates the time to send scheduled message. */ + MSG_CONV_MSG_NETWORK_STATUS_INT, /**< Indicates the network status of the message. See enum _MSG_NETWORK_STATUS_E */ + MSG_CONV_MSG_READ_BOOL, /**< Indicates whether the message is read or not. */ + MSG_CONV_MSG_PROTECTED_BOOL, /**< Indicates whether the message is protected or not. */ + MSG_CONV_MSG_DIRECTION_INT, /**< Indicates whether the message is MO or MT, affecting address. See enum _MSG_DIRECTION_TYPE_E */ + MSG_CONV_MSG_PAGE_COUNT_INT, /**< Indicates the count of pages in MMS. */ + MSG_CONV_MSG_ATTACH_COUNT_INT, /**< Indicates the count of attached files in MMS. */ + MSG_CONV_MSG_ATTACH_NAME_STR, /**< Indicates the attached file name of message. */ + MSG_CONV_MSG_AUDIO_NAME_STR, /**< Indicates the audio file name of message. */ + MSG_CONV_MSG_IMAGE_THUMB_PATH_STR, /**< Indicates the image thumbnail path of message. */ + MSG_CONV_MSG_VIDEO_THUMB_PATH_STR, /**< Indicates the video thumbnail path of message. */ + MSG_CONV_MSG_TEXT_SIZE_INT, /**< Indicates the data size. The unit is byte. */ + MSG_CONV_MSG_TEXT_STR, /**< Indicates the message payload information as a body. default character encoding is UTF-8*/ + MSG_CONV_MSG_TCS_BC_LEVEL_INT, /**< Indicates the Behavior Level of malware. @c -1 is None*/ + MSG_CONV_MSG_1ST_MEDIA_PATH_STR, /**< Indicates the First Media path of MMS */ + MSG_CONV_MSG_MULTIPART_HND, + MSG_CONV_MSG_SIM_INDEX_INT, /**< Indicates the sim index */ + + MSG_CONV_INFO_MAX /**< Placeholder for max value of this enum */ +}; + +/** + * @brief Enumeration for the values of setting for SMSC options. \n + * This enum is used as member of #msg_struct_t for MSG_STRUCT_SETTING_SMSC_OPT. + */ enum _MSG_STRUCT_SETTING_SMSC_OPT_E { - MSG_SMSC_SELECTED_ID_INT = MSG_STRUCT_SETTING_SMSC_OPT+1, - MSG_SMSC_LIST_STRUCT + MSG_SMSC_SELECTED_ID_INT = MSG_STRUCT_SETTING_SMSC_OPT+1, /**< Indicates Selected SMSC index option */ + MSG_SMSC_LIST_STRUCT, /**< Indicates SMSC data information list option*/ + MSG_SMSC_LIST_INDEX_INT, /**< Indicates SMSC index option for Updating information */ + MSG_SMSC_LIST_SIM_INDEX_INT /**< Indicates the sim index */ }; +/** + * @brief Enumeration for the values of setting for SMSC informations. \n + * This enum is used as member of #msg_struct_t for MSG_STRUCT_SETTING_SMSC_INFO. + */ enum _MSG_STRUCT_SETTING_SMSC_INFO_E { - MSG_SMSC_ADDR_TON_INT = MSG_STRUCT_SETTING_SMSC_INFO+1, /**< Type of number. See enum _MSG_SMS_TON_E */ - MSG_SMSC_ADDR_NPI_INT, /**< Numbering plan ID. See enum _MSG_SMS_NPI_E */ - MSG_SMSC_ADDR_STR, /**< SMSC address */ - MSG_SMSC_NAME_STR, /**< SMSC name */ - MSG_SMSC_PID_INT, /**< Protocol idendifier See enum _MSG_SMS_PID_E */ - MSG_SMSC_VAL_PERIOD_INT /**< Validity period value. See enum _MSG_VAL_PERIOD_E*/ + MSG_SMSC_ADDR_TON_INT = MSG_STRUCT_SETTING_SMSC_INFO+1, /**< Type of number. See enum _MSG_SMS_TON_E */ + MSG_SMSC_ADDR_NPI_INT, /**< Numbering plan ID. See enum _MSG_SMS_NPI_E */ + MSG_SMSC_ADDR_STR, /**< SMSC address */ + MSG_SMSC_NAME_STR, /**< SMSC name */ + MSG_SMSC_PID_INT, /**< Protocol idendifier See enum _MSG_SMS_PID_E */ + MSG_SMSC_VAL_PERIOD_INT /**< Validity period value. See enum _MSG_VAL_PERIOD_E*/ }; +/** + * @brief Enumeration for the values of setting for CB channel options. \n + * This enum is used as member of #msg_struct_t for MSG_STRUCT_SETTING_CB_OPT. + */ enum _MSG_STRUCT_CB_OPT_E { - MSG_CB_RECEIVE_BOOL = MSG_STRUCT_SETTING_CB_OPT+1, /**< Indicates whether the CB message is received or not. */ - MSG_CB_MAX_SIM_COUNT_INT, /**< Indicates the number of channels which can be stored in SIM. */ - MSG_CB_CHANNEL_LIST_STRUCT, /**< Indicates the cell broadcasting channel information. */ - MSG_CB_LANGUAGE_TYPE_ALL_BOOL, - MSG_CB_LANGUAGE_TYPE_ENG_BOOL, /**< CB message English */ - MSG_CB_LANGUAGE_TYPE_GER_BOOL, /**< CB message Germany */ - MSG_CB_LANGUAGE_TYPE_FRE_BOOL, /**< CB message France */ - MSG_CB_LANGUAGE_TYPE_ITA_BOOL, /**< CB message Italy */ - MSG_CB_LANGUAGE_TYPE_NED_BOOL, /**< CB message Netherland */ - MSG_CB_LANGUAGE_TYPE_SPA_BOOL, /**< CB message Spain */ - MSG_CB_LANGUAGE_TYPE_POR_BOOL, /**< CB message Portugal */ - MSG_CB_LANGUAGE_TYPE_SWE_BOOL, /**< CB message Sweden */ - MSG_CB_LANGUAGE_TYPE_TUR_BOOL, /**< CB message Turkey */ -}; - + MSG_CB_RECEIVE_BOOL = MSG_STRUCT_SETTING_CB_OPT+1, /**< Indicates whether the CB message is received or not. */ + MSG_CB_MAX_SIM_COUNT_INT, /**< Indicates the number of channels which can be stored in SIM. */ + MSG_CB_CHANNEL_LIST_STRUCT, /**< Indicates the cell broadcasting channel information. */ + MSG_CB_LANGUAGE_TYPE_ALL_BOOL, /**< CB message all languages */ + MSG_CB_LANGUAGE_TYPE_ENG_BOOL, /**< CB message English */ + MSG_CB_LANGUAGE_TYPE_GER_BOOL, /**< CB message Germany */ + MSG_CB_LANGUAGE_TYPE_FRE_BOOL, /**< CB message France */ + MSG_CB_LANGUAGE_TYPE_ITA_BOOL, /**< CB message Italy */ + MSG_CB_LANGUAGE_TYPE_NED_BOOL, /**< CB message Netherland */ + MSG_CB_LANGUAGE_TYPE_SPA_BOOL, /**< CB message Spain */ + MSG_CB_LANGUAGE_TYPE_POR_BOOL, /**< CB message Portugal */ + MSG_CB_LANGUAGE_TYPE_SWE_BOOL, /**< CB message Sweden */ + MSG_CB_LANGUAGE_TYPE_TUR_BOOL, /**< CB message Turkey */ + MSG_CB_SIM_INDEX_INT, /**< Indicates the sim index */ +}; + +/** + * @brief Enumeration for the values of setting for CB channel informations. \n + * This enum is used as member of #msg_struct_t for MSG_STRUCT_SETTING_CB_CHANNEL_INFO. + */ enum _MSG_STRUCT_CB_CHANNEL_INFO_E { - MSG_CB_CHANNEL_ACTIVATE_BOOL = MSG_STRUCT_SETTING_CB_CHANNEL_INFO+1, /**< Indicates whether the CB channel is activate or passive. */ - MSG_CB_CHANNEL_ID_FROM_INT, /**< Indicates the ID of a CB channel. */ - MSG_CB_CHANNEL_ID_TO_INT, /**< Indicates the ID of a CB channel. */ - MSG_CB_CHANNEL_NAME_STR /**< Indicates the name of a CB channel. */ + MSG_CB_CHANNEL_ACTIVATE_BOOL = MSG_STRUCT_SETTING_CB_CHANNEL_INFO+1, /**< Indicates whether the CB channel is activate or passive. */ + MSG_CB_CHANNEL_ID_FROM_INT, /**< Indicates the From ID of a CB channel. */ + MSG_CB_CHANNEL_ID_TO_INT, /**< Indicates the To ID of a CB channel. */ + MSG_CB_CHANNEL_NAME_STR /**< Indicates the name of a CB channel. */ }; +/** + * @brief Enumeration for the values of setting for SMS sending options. \n + * This enum is used as member of #msg_struct_t for MSG_STRUCT_SETTING_SMS_SEND_OPT. + */ enum _MSG_STRUCT_SMS_SEND_OPT_E { - MSG_SMS_SENDOPT_ENCODE_TYPE_INT = MSG_STRUCT_SETTING_SMS_SEND_OPT+1, /**< Indicates the string encoding type. See enum _MSG_ENCODE_TYPE_E*/ - MSG_SMS_SENDOPT_NETWORK_MODE_INT, /**< Indicates the network mode (CS/PS) to send SMS. See enum _MSG_SMS_NETWORK_MODE_E*/ - MSG_SMS_SENDOPT_REPLY_PATH_BOOL, /**< Indicates whether the SMS reply path is set or not. */ - MSG_SMS_SENDOPT_DELIVERY_REPORT_BOOL, /**< Indicates whether the SMS delivery report will be sent or not. */ - MSG_SMS_SENDOPT_SAVE_STORAGE_INT /**< Indicates the default storage to save SMS. See enum _MSG_SMS_SAVE_STORAGE_E */ + MSG_SMS_SENDOPT_ENCODE_TYPE_INT = MSG_STRUCT_SETTING_SMS_SEND_OPT+1, /**< Indicates the string encoding type. See enum _MSG_ENCODE_TYPE_E*/ + MSG_SMS_SENDOPT_NETWORK_MODE_INT, /**< Indicates the network mode (CS/PS) to send SMS. See enum _MSG_SMS_NETWORK_MODE_E*/ + MSG_SMS_SENDOPT_REPLY_PATH_BOOL, /**< Indicates whether the SMS reply path is set or not. */ + MSG_SMS_SENDOPT_DELIVERY_REPORT_BOOL, /**< Indicates whether the SMS delivery report will be sent or not. */ + MSG_SMS_SENDOPT_SAVE_STORAGE_INT /**< Indicates the default storage to save SMS. See enum _MSG_SMS_SAVE_STORAGE_E */ }; +/** + * @brief Enumeration for the values of setting for MMS sending options. \n + * This enum is used as member of #msg_struct_t for MSG_STRUCT_SETTING_MMS_SEND_OPT. + */ enum _MSG_STRUCT_MMS_SEND_OPT_E { - MSG_MMS_SENDOPT_CLASS_TYPE_INT = MSG_STRUCT_SETTING_MMS_SEND_OPT+1, /**< Indicates the class type of message. See enum _MSG_MMS_MSG_CLASS_TYPE_E */ - MSG_MMS_SENDOPT_PRIORITY_TYPE_INT, /**< Indicates the priority of the message. See enum _MSG_PRIORITY_TYPE_E */ - MSG_MMS_SENDOPT_EXPIRY_TIME_INT, /**< Indicates the time when the message is to be removed from the MMSC. See enum _MSG_MMS_EXPIRY_TIME_E */ - MSG_MMS_SENDOPT_DELIVERY_TIME_INT, /**< Indicates the message transmission time which is set in the MMSC. See enum _MSG_MMS_DELIVERY_TIME_E */ - MSG_MMS_SENDOPT_CUSTOM_DELIVERY_TIME_INT, /**< Indicates the message transmission time which is set in the MMSC. */ - MSG_MMS_SENDOPT_SENDER_VISIBILITY_BOOL, /**< Indicates whether the address is hidden or not. */ - MSG_MMS_SENDOPT_DELIVERY_REPORT_BOOL, /**< Indicates whether the delivery report will be sent or not. */ - MSG_MMS_SENDOPT_READ_REPLY_BOOL, /**< Indicates whether the read report will be sent or not. */ - MSG_MMS_SENDOPT_KEEP_COPY_BOOL, /**< Indicates whether the message copy is kept or not. */ - MSG_MMS_SENDOPT_BODY_REPLYING_BOOL, /**< Indicates whether the body is included when replying or not. */ - MSG_MMS_SENDOPT_HIDE_RECIPIENTS_BOOL, /**< Indicates whether the recipients are hidden or not. */ - MSG_MMS_SENDOPT_REPLY_CHARGING_INT, /**< Indicates the reply charging type of message. See enum _MSG_MMS_REPLY_CHARGING_TYPE_E */ - MSG_MMS_SENDOPT_REPLY_CHARGING_DEADLINE_INT, /**< Indicates the deadline for replying charging. is set in the MMSC. */ - MSG_MMS_SENDOPT_REPLY_CHARGING_SIZE_INT, /**< Indicates the reply charging size. */ - MSG_MMS_SENDOPT_CREATION_MODE_INT /**< Indicates the creation mode of MMS. See enum _MSG_MMS_CREATION_MODE_E */ -}; - + MSG_MMS_SENDOPT_CLASS_TYPE_INT = MSG_STRUCT_SETTING_MMS_SEND_OPT+1, /**< Indicates the class type of message. See enum _MSG_MMS_MSG_CLASS_TYPE_E */ + MSG_MMS_SENDOPT_PRIORITY_TYPE_INT, /**< Indicates the priority of the message. See enum _MSG_PRIORITY_TYPE_E */ + MSG_MMS_SENDOPT_EXPIRY_TIME_INT, /**< Indicates the time when the message is to be removed from the MMSC. See enum _MSG_MMS_EXPIRY_TIME_E */ + MSG_MMS_SENDOPT_DELIVERY_TIME_INT, /**< Indicates the message transmission time which is set in the MMSC. See enum _MSG_MMS_DELIVERY_TIME_E */ + MSG_MMS_SENDOPT_CUSTOM_DELIVERY_TIME_INT, /**< Indicates the message transmission time which is set in the MMSC. */ + MSG_MMS_SENDOPT_SENDER_VISIBILITY_BOOL, /**< Indicates whether the address is hidden or not. */ + MSG_MMS_SENDOPT_DELIVERY_REPORT_BOOL, /**< Indicates whether the delivery report will be sent or not. */ + MSG_MMS_SENDOPT_READ_REPLY_BOOL, /**< Indicates whether the read report will be sent or not. */ + MSG_MMS_SENDOPT_KEEP_COPY_BOOL, /**< Indicates whether the message copy is kept or not. */ + MSG_MMS_SENDOPT_BODY_REPLYING_BOOL, /**< Indicates whether the body is included when replying or not. */ + MSG_MMS_SENDOPT_HIDE_RECIPIENTS_BOOL, /**< Indicates whether the recipients are hidden or not. */ + MSG_MMS_SENDOPT_REPLY_CHARGING_INT, /**< Indicates the reply charging type of message. See enum _MSG_MMS_REPLY_CHARGING_TYPE_E */ + MSG_MMS_SENDOPT_REPLY_CHARGING_DEADLINE_INT, /**< Indicates the deadline for replying charging. is set in the MMSC. */ + MSG_MMS_SENDOPT_REPLY_CHARGING_SIZE_INT, /**< Indicates the reply charging size. */ + MSG_MMS_SENDOPT_CREATION_MODE_INT /**< Indicates the creation mode of MMS. See enum _MSG_MMS_CREATION_MODE_E */ +}; + +/** + * @brief Enumeration for the values of setting for MMS receiving options. \n + * This enum is used as member of #msg_struct_t for MSG_STRUCT_SETTING_MMS_RECV_OPT. + */ enum _MSG_STRUCT_MMS_RECV_OPT_E { - MSG_MMS_RECVOPT_HOME_RETRIEVE_TYPE_INT = MSG_STRUCT_SETTING_MMS_RECV_OPT+1, /**< Indicates the retrieve type for MMS home network. See enum _MSG_MMS_HOME_RETRIEVE_TYPE_E */ - MSG_MMS_RECVOPT_ABROAD_RETRIEVE_TYPE_INT, /**< Indicates the retrieve type for MMS abroad network. See enum _MSG_MMS_ABROAD_RETRIEVE_TYPE_E */ - MSG_MMS_RECVOPT_READ_REPORT_BOOL, /**< Indicates whether the read report will be sent or not. */ - MSG_MMS_RECVOPT_DELIVERY_REPORT_BOOL, /**< Indicates whether the delivery report will be sent or not. */ - MSG_MMS_RECVOPT_REJECT_UNKNOWN_BOOL, /**< Indicates whether unknown addresses are rejected or not. */ - MSG_MMS_RECVOPT_REJECT_ADVERTISEMENT_BOOL /**< Indicates whether advertisement is rejected or not. */ + MSG_MMS_RECVOPT_HOME_RETRIEVE_TYPE_INT = MSG_STRUCT_SETTING_MMS_RECV_OPT+1, /**< Indicates the retrieve type for MMS home network. See enum _MSG_MMS_HOME_RETRIEVE_TYPE_E */ + MSG_MMS_RECVOPT_ABROAD_RETRIEVE_TYPE_INT, /**< Indicates the retrieve type for MMS abroad network. See enum _MSG_MMS_ABROAD_RETRIEVE_TYPE_E */ + MSG_MMS_RECVOPT_READ_REPORT_BOOL, /**< Indicates whether the read report will be sent or not. */ + MSG_MMS_RECVOPT_DELIVERY_REPORT_BOOL, /**< Indicates whether the delivery report will be sent or not. */ + MSG_MMS_RECVOPT_REJECT_UNKNOWN_BOOL, /**< Indicates whether unknown addresses are rejected or not. */ + MSG_MMS_RECVOPT_REJECT_ADVERTISEMENT_BOOL /**< Indicates whether advertisement is rejected or not. */ }; +/** + * @brief Enumeration for the values of setting for general options. \n + * This enum is used as member of #msg_struct_t for MSG_STRUCT_SETTING_GENERAL_OPT. + */ enum _MSG_STRUCT_GENERAL_OPT_E { - MSG_GENERAL_KEEP_COPY_BOOL = MSG_STRUCT_SETTING_GENERAL_OPT+1, /**< Indicates whether the SMS message copy is kept or not. */ - MSG_GENERAL_ALERT_TONE_INT, /**< Indicates the period of playing alert tone. See enum _MSG_ALERT_TONE_E */ - MSG_GENERAL_AUTO_ERASE_BOOL /**< Indicates whether the auto-erase option is enabled or not. */ + MSG_GENERAL_KEEP_COPY_BOOL = MSG_STRUCT_SETTING_GENERAL_OPT+1, /**< Indicates whether the SMS message copy is kept or not. */ + MSG_GENERAL_ALERT_TONE_INT, /**< Indicates the period of playing alert tone. See enum _MSG_ALERT_TONE_E */ + MSG_GENERAL_AUTO_ERASE_BOOL, /**< Indicates whether the auto-erase option is enabled or not. */ + MSG_GENERAL_BLOCK_UNKNOWN_NUMBER_BOOL, /**< Indicates whether unknown sender message is blocked or not. */ + MSG_GENERAL_SMS_LIMIT_CNT_INT, /**< Indicates the count limitation of SMS messages in one conversation */ + MSG_GENERAL_MMS_LIMIT_CNT_INT, /**< Indicates the count limitation of MMS messages in one conversation */ + MSG_GENERAL_MSG_NOTIFICATION_BOOL, /**< Indicates whether notification for incoming message is shown or not. */ + MSG_GENERAL_MSG_VIBRATION_BOOL, /**< Indicates whether vibration for incoming message is run or not. */ + MSG_GENERAL_MSG_PREVIEW_BOOL, /**< Indicates whether preview for incoming message is shown or not. */ + MSG_GENERAL_RINGTONE_TYPE_INT, /**< Indicates the message ringtone type. */ + MSG_GENERAL_RINGTONE_PATH_STR /**< Indicates the message ringtone path */ }; +/** + * @brief Enumeration for the values of setting for push message options. \n + * This enum is used as member of #msg_struct_t for MSG_STRUCT_SETTING_PUSH_MSG_OPT. + */ enum _MSG_STRUCT_PUSH_MSG_OPT_E { - MSG_PUSHMSG_RECEIVE_BOOL = MSG_STRUCT_SETTING_PUSH_MSG_OPT+1, /**< Indicates whether the push message is received or not. */ - MSG_PUSHMSG_SERVICE_TYPE_INT /**< Indicates the service type of a push message. See enum _MSG_PUSH_SERVICE_TYPE_E */ + MSG_PUSHMSG_RECEIVE_BOOL = MSG_STRUCT_SETTING_PUSH_MSG_OPT+1, /**< Indicates whether the push message is received or not. */ + MSG_PUSHMSG_SERVICE_TYPE_INT /**< Indicates the service type of a push message. See enum _MSG_PUSH_SERVICE_TYPE_E */ }; +/** + * @brief Enumeration for the values of setting for voice message options. \n + * This enum is used as member of #msg_struct_t for MSG_STRUCT_SETTING_VOICE_MSG_OPT. + */ enum _MSG_STRUCT_VOICE_MSG_OPT_E { - MSG_VOICEMSG_ADDRESS_STR = MSG_STRUCT_SETTING_VOICE_MSG_OPT+1, /**< Indicates the address for voice message. */ + MSG_VOICEMSG_ADDRESS_STR = MSG_STRUCT_SETTING_VOICE_MSG_OPT+1, /**< Indicates the address for voice message. */ + MSG_VOICEMSG_ALPHA_ID_STR, /**< Indicates the alpha id for voice message address. */ + MSG_VOICEMSG_SIM_INDEX_INT, /**< Indicates the SIM index for voice message. */ + MSG_VOICEMSG_VOICE_COUNT_INT, /**< Indicates the count of voice messages. */ }; + +/** + * @brief Enumeration for the values of setting for message size option. \n + * This enum is used as member of #msg_struct_t for MSG_STRUCT_SETTING_MSGSIZE_OPT. + */ enum _MSG_STRUCT_MSGSISE_OPT_E { - MSG_MESSAGE_SIZE_INT = MSG_STRUCT_SETTING_MSGSIZE_OPT+1, /**< Indicates the message size */ + MSG_MESSAGE_SIZE_INT = MSG_STRUCT_SETTING_MSGSIZE_OPT+1, /**< Indicates the message size */ }; -//MSG_MMS_DATA +/** + * @brief Enumeration for the values of MMS detail informations. \n + * This enum is used as member of #msg_struct_t for MSG_STRUCT_MMS. + */ enum MSG_MMS_INFO_E { - MSG_MMS_PAGE_LIST_HND = MSG_STRUCT_MMS+1, /**< The pointer to SMIL pages list */ - MSG_MMS_REGION_LIST_HND, /**< The pointer to SMIL regions list */ - MSG_MMS_ATTACH_LIST_HND, /**< The pointer to attachment list */ - MSG_MMS_TRANSITION_LIST_HND, /**< The pointer to SMIL transitions list */ - MSG_MMS_META_LIST_HND, /**< The pointer to SMIL meta list */ - MSG_MMS_ROOTLAYOUT_WIDTH_INT, /**< Indicates the width of the root layout */ - MSG_MMS_ROOTLAYOUT_WIDTH_PERCENT_BOOL, /**< Indicates the length is in percentage(%) or not */ - MSG_MMS_ROOTLAYOUT_HEIGHT_INT, /**< Indicates the height of the root layout */ - MSG_MMS_ROOTLAYOUT_HEIGHT_PERCENT_BOOL, /**< Indicates the length is in percentage(%) or not */ - MSG_MMS_ROOTLAYOUT_BGCOLOR_INT, /**< Indicates the background color of the root layout */ - MSG_MMS_ROOTLAYOUT_BGCOLOR_BOOL, /**< Indicates the background color is set in the root layout */ -}; - -//MSG_MMS_PAGE + MSG_MMS_PAGE_LIST_HND = MSG_STRUCT_MMS+1, /**< The pointer to SMIL pages list */ + MSG_MMS_REGION_LIST_HND, /**< The pointer to SMIL regions list */ + MSG_MMS_ATTACH_LIST_HND, /**< The pointer to attachment list */ + MSG_MMS_TRANSITION_LIST_HND, /**< The pointer to SMIL transitions list */ + MSG_MMS_META_LIST_HND, /**< The pointer to SMIL meta list */ + MSG_MMS_ROOTLAYOUT_WIDTH_INT, /**< Indicates the width of the root layout */ + MSG_MMS_ROOTLAYOUT_WIDTH_PERCENT_BOOL, /**< Indicates the length is in percentage(%) or not */ + MSG_MMS_ROOTLAYOUT_HEIGHT_INT, /**< Indicates the height of the root layout */ + MSG_MMS_ROOTLAYOUT_HEIGHT_PERCENT_BOOL, /**< Indicates the length is in percentage(%) or not */ + MSG_MMS_ROOTLAYOUT_BGCOLOR_INT, /**< Indicates the background color of the root layout */ + MSG_MMS_ROOTLAYOUT_BGCOLOR_BOOL, /**< Indicates the background color is set in the root layout */ + MSG_MMS_HEADER_BCC_ADDRESS_LIST_HND, /**< The pointer to BCC address list */ + MSG_MMS_HEADER_CC_ADDRESS_LIST_HND, /**< The pointer to CC address list */ + MSG_MMS_HEADER_CONTENT_LOCATION_STR, /**< Indicates contentLocation in MMS header */ + MSG_MMS_HEADER_CONTENT_TYPE_STR, /**< Indicates szContentType in MMS header. ex) application/vnd.wap.multipart.related */ + MSG_MMS_HEADER_DATE_INT, /**< Indicates date in MMS header */ + MSG_MMS_HEADER_DELIVERY_REPORT_INT, /**< Indicates X-Mms-Delivery-Report */ + MSG_MMS_HEADER_DELIVERY_TIME_INT, /**< Indicates X-Mms-Delivery-Time */ + MSG_MMS_HEADER_EXPIRY_TIME_INT, /**< Indicates X-Mms-Expiry-Time */ + MSG_MMS_HEADER_FROM_STR, /**< Indicates FROM address in header */ + MSG_MMS_HEADER_MESSAGE_CLASS_INT, /**< Indicates messageClassin in header. ex) Personal | Advertisement | Informational | Auto */ + MSG_MMS_HEADER_MESSAGE_ID_STR, /**< Indicates messageID in header*/ + MSG_MMS_HEADER_MESSAGE_TYPE_INT, /**< Indicates MmsMsgTypein header. ex) sendreq */ + MSG_MMS_HEADER_VERSION_INT, /**< Indicates mmsVersion in header. ex) 1.0 1.3 etc */ + MSG_MMS_HEADER_SIZE_INT, /**< Indicates X-Mms-Message-Size */ + MSG_MMS_HEADER_PRIORITY_INT, /**< Indicates _MSG_PRIORITY_TYPE_E in header: Low | Normal | High */ + MSG_MMS_HEADER_READ_REPORT_INT, /**< Indicates X-Mms-Read-Report */ + MSG_MMS_HEADER_HIDE_ADDRESS_INT, /**< Indicates X-Mms-Sender-Visibility */ + MSG_MMS_HEADER_MMS_STATUS_INT, /**< Indicates X-Mms-Status */ + MSG_MMS_HEADER_TO_ADDRESS_LIST_HND, /**< The pointer to 'TO' address list in header*/ + MSG_MMS_HEADER_TR_ID_STR, /**< Indicates thread ID in header */ + MSG_MMS_HEADER_CONTENT_CLASS_INT, /**< Indicates contentClass in header. ex) text | image-basic| image-rich | video-basic | video-rich | megapixel | content-basic | content-rich */ + MSG_MMS_SMIL_MULTIPART_CONTENT_TYPE_STR, /**< Indicates multipart content type in header*/ + MSG_MMS_SMIL_MULTIPART_NAME_STR, /**<Indicates multipart file name in header*/ + MSG_MMS_SMIL_MULTIPART_FILEPATH_STR, /**< Indicates multipart file path in header*/ + MSG_MMS_SMIL_MULTIPART_CONTENT_ID_STR, /**< Indicates multipart content id in header*/ + MSG_MMS_SMIL_MULTIPART_CONTENT_LOCATION_STR, /**< Indicates multipart content Location in header*/ + MSG_MMS_MULTIPART_LIST_HND, /**< The pointer to MMS multipart list */ + MSG_MMS_INFO_MAX, /**< Placeholder for max value of this enum */ +}; + +/** + * @brief Enumeration for the values of MMS multipart informations. \n + * This enum is used as member of #msg_struct_t for MMS_MULTIPART_DATA_S. + */ +enum _MSG_STRUCT_MULTIPART_INFO_E { + MSG_MMS_MULTIPART_CONTENT_TYPE_STR = MSG_STRUCT_MULTIPART_INFO+1, /**< Indicates multipart content type */ + MSG_MMS_MULTIPART_NAME_STR, /**< Indicates multipart file name */ + MSG_MMS_MULTIPART_FILEPATH_STR, /**< Indicates multipart file path */ + MSG_MMS_MULTIPART_CONTENT_ID_STR, /**< Indicates mutipart content ID */ + MSG_MMS_MULTIPART_CONTENT_LOCATION_STR, /**< Indicates multipart content Location */ + MSG_MMS_MULTIPART_TCS_LEVEL_INT, /**< Indicates detection of malware type */ + MSG_MMS_MULTIPART_MALWARE_ALLOW_INT, /**< Indicates malware allowed */ + MSG_MMS_MULTIPART_THUMBNAIL_FILEPATH_STR, /**< Indicates the thumbnail filepath */ +}; + +/** + * @brief Enumeration for the values of MMS page informations. \n + * This enum is used as member of #msg_struct_t for MSG_STRUCT_MMS_PAGE. + */ enum MSG_MMS_PAGE_INFO_E { - MSG_MMS_PAGE_MEDIA_LIST_HND = MSG_STRUCT_MMS_PAGE+1, /**< The pointer to media list */ - MSG_MMS_PAGE_PAGE_DURATION_INT, /**< Indicates the duration of the page */ - MSG_MMS_PAGE_BEGIN_TIME_INT, /**< Indicates the begin time of the page */ - MSG_MMS_PAGE_END_TIME_INT, /**< Indicates the end time of the page */ - MSG_MMS_PAGE_MIN_INT, /**< Indicates the min attribute of the page */ - MSG_MMS_PAGE_MAX_INT, /**< Indicates the max attribute of the page */ - MSG_MMS_PAGE_REPEAT_INT, /**< Indicates the page needs to be displayed repeatedly */ + MSG_MMS_PAGE_MEDIA_LIST_HND = MSG_STRUCT_MMS_PAGE+1, /**< The pointer to media list */ + MSG_MMS_PAGE_PAGE_DURATION_INT, /**< Indicates the duration of the page */ + MSG_MMS_PAGE_BEGIN_TIME_INT, /**< Indicates the begin time of the page */ + MSG_MMS_PAGE_END_TIME_INT, /**< Indicates the end time of the page */ + MSG_MMS_PAGE_MIN_INT, /**< Indicates the min attribute of the page */ + MSG_MMS_PAGE_MAX_INT, /**< Indicates the max attribute of the page */ + MSG_MMS_PAGE_REPEAT_INT, /**< Indicates the page needs to be displayed repeatedly */ }; +/** + * @brief Enumeration for the values of MMS media informations. \n + * This enum is used as member of #msg_struct_t for MSG_STRUCT_MMS_MEDIA. + */ enum MSG_MMS_MEDIA_INFO { - MSG_MMS_MEDIA_TYPE_INT = MSG_STRUCT_MMS_MEDIA+1, /**< Indicates the SMIL media type. see enum MmsSmilMediaType */ - MSG_MMS_MEDIA_SRC_STR, /**< Indicates the media source name */ - MSG_MMS_MEDIA_FILENAME_STR, /**< Indicates the file name */ - MSG_MMS_MEDIA_FILEPATH_STR, /**< Indicates the file path */ - MSG_MMS_MEDIA_CONTENT_ID_STR, /**< Indicates the content id */ - MSG_MMS_MEDIA_REGION_ID_STR, /**< Indicates the region id */ - MSG_MMS_MEDIA_ALTERNATIVE_STR, /**< Indicates the alternative text to be displayed in failure case */ - MSG_MMS_MEDIA_DRM_TYPE_INT, /**< Indicates the drm type. see enum MsgDrmType */ - MSG_MMS_MEDIA_DRM_FULLPATH_STR, /**< Indicates the fullpath of the DRM */ - MSG_MMS_MEDIA_SMIL_TEXT_HND, /**< Indicates the text attributes */ - MSG_MMS_MEDIA_SMIL_AVI_HND, /**< Indicates the video attributes */ -}; - -//MSG_MMS_ATTACH + MSG_MMS_MEDIA_TYPE_INT = MSG_STRUCT_MMS_MEDIA+1, /**< Indicates the SMIL media type. See enum MmsSmilMediaType */ + MSG_MMS_MEDIA_SRC_STR, /**< Indicates the media source name */ + MSG_MMS_MEDIA_FILENAME_STR, /**< Indicates the file name */ + MSG_MMS_MEDIA_FILEPATH_STR, /**< Indicates the file path */ + MSG_MMS_MEDIA_CONTENT_ID_STR, /**< Indicates the content ID */ + MSG_MMS_MEDIA_REGION_ID_STR, /**< Indicates the region ID */ + MSG_MMS_MEDIA_ALTERNATIVE_STR, /**< Indicates the alternative text to be displayed in failure case */ + MSG_MMS_MEDIA_DRM_TYPE_INT, /**< Indicates the DRM type. See enum MsgDrmType */ + MSG_MMS_MEDIA_DRM_FULLPATH_STR, /**< Indicates the fullpath of the DRM */ + MSG_MMS_MEDIA_SMIL_TEXT_HND, /**< Indicates the text attributes */ + MSG_MMS_MEDIA_SMIL_AVI_HND, /**< Indicates the video attributes */ + MSG_MMS_MEDIA_CONTENT_LOCATION_STR, /**< Indicates the content location */ + MSG_MMS_MEDIA_CONTENT_TYPE_STR, /**< Indicates the content type */ + MSG_MMS_MEDIA_INFO_MAX, /**< Placeholder for max value of this enum*/ +}; + +/** + * @brief Enumeration for the values of MMS attachment informations. \n + * This enum is used as member of #msg_struct_t for MSG_STRUCT_MMS_ATTACH. + */ enum MSG_MMS_ATTACH_INFO_E { - MSG_MMS_ATTACH_MIME_TYPE_INT = MSG_STRUCT_MMS_ATTACH+1, /**< Indicates the file mime type. see enum MimeType */ - MSG_MMS_ATTACH_FILENAME_STR, /**< Indicates the file name */ - MSG_MMS_ATTACH_FILEPATH_STR, /**< Indicates the file path */ - MSG_MMS_ATTACH_FILESIZE_INT, /**< Indicates the size of the file */ - MSG_MMS_ATTACH_DRM_TYPE_INT, /**< Indicates the drm type. see enum MsgDrmType */ - MSG_MMS_ATTACH_DRM_FULLPATH_STR, /**< Indicates the fullpath of the DRM */ + MSG_MMS_ATTACH_MIME_TYPE_INT = MSG_STRUCT_MMS_ATTACH+1, /**< Indicates the file mime type. See enum MimeType */ + MSG_MMS_ATTACH_FILENAME_STR, /**< Indicates the file name */ + MSG_MMS_ATTACH_FILEPATH_STR, /**< Indicates the file path */ + MSG_MMS_ATTACH_FILESIZE_INT, /**< Indicates the size of the file */ + MSG_MMS_ATTACH_DRM_TYPE_INT, /**< Indicates the DRM type. See enum MsgDrmType */ + MSG_MMS_ATTACH_DRM_FULLPATH_STR, /**< Indicates the fullpath of the DRM */ + MSG_MMS_ATTACH_CONTENT_TYPE_STR, /**< Indicates the content type */ + MSG_MMS_ATTACH_INFO_MAX, /**< Placeholder for max value of this enum*/ }; +/** + * @brief Enumeration for the values of MMS region informations. \n + * This enum is used as member of #msg_struct_t for MSG_STRUCT_MMS_REGION. + */ enum MSG_MMS_REGION_INFO_E { - MSG_MMS_REGION_ID_STR = MSG_STRUCT_MMS_REGION+1, /**< Indicates the ID of region information */ - MSG_MMS_REGION_LENGTH_LEFT_INT, /**< Indicates the left co-ordinate of the region */ - MSG_MMS_REGION_LENGTH_LEFT_PERCENT_BOOL, /**< Indicates the length is in percentage(%) or not */ - MSG_MMS_REGION_LENGTH_TOP_INT, /**< Indicates the top co-ordinate of the region */ - MSG_MMS_REGION_LENGTH_TOP_PERCENT_BOOL, /**< Indicates the length is in percentage(%) or not */ - MSG_MMS_REGION_LENGTH_WIDTH_INT, /**< Indicates the width of the region */ - MSG_MMS_REGION_LENGTH_WIDTH_PERCENT_BOOL, /**< Indicates the length is in percentage(%) or not */ - MSG_MMS_REGION_LENGTH_HEIGHT_INT, /**< Indicates the width of the region */ - MSG_MMS_REGION_LENGTH_HEIGHT_PERCENT_BOOL, /**< Indicates the length is in percentage(%) or not */ - MSG_MMS_REGION_BGCOLOR_INT, /**< Indicates the background color of the region */ - MSG_MMS_REGION_FIT_TYPE_INT, /**< Indicates the fit type. see enum REGION_FIT_TYPE_T */ - MSG_MMS_REGION_BGCOLOR_BOOL, /**< Indicates the background color is set in the region */ + MSG_MMS_REGION_ID_STR = MSG_STRUCT_MMS_REGION+1, /**< Indicates the ID of region information */ + MSG_MMS_REGION_LENGTH_LEFT_INT, /**< Indicates the left co-ordinate of the region */ + MSG_MMS_REGION_LENGTH_LEFT_PERCENT_BOOL, /**< Indicates the length is in percentage(%) or not */ + MSG_MMS_REGION_LENGTH_TOP_INT, /**< Indicates the top co-ordinate of the region */ + MSG_MMS_REGION_LENGTH_TOP_PERCENT_BOOL, /**< Indicates the length is in percentage(%) or not */ + MSG_MMS_REGION_LENGTH_WIDTH_INT, /**< Indicates the width of the region */ + MSG_MMS_REGION_LENGTH_WIDTH_PERCENT_BOOL, /**< Indicates the length is in percentage(%) or not */ + MSG_MMS_REGION_LENGTH_HEIGHT_INT, /**< Indicates the width of the region */ + MSG_MMS_REGION_LENGTH_HEIGHT_PERCENT_BOOL, /**< Indicates the length is in percentage(%) or not */ + MSG_MMS_REGION_BGCOLOR_INT, /**< Indicates the background color of the region */ + MSG_MMS_REGION_FIT_TYPE_INT, /**< Indicates the fit type. See enum REGION_FIT_TYPE_T */ + MSG_MMS_REGION_BGCOLOR_BOOL, /**< Indicates the background color is set in the region */ }; +/** + * @brief Enumeration for the values of MMS meta data informations. \n + * This enum is used as member of #msg_struct_t for MSG_STRUCT_MMS_META. + */ enum MSG_MMS_META_INFO_E { - MSG_MMS_META_ID_STR = MSG_STRUCT_MMS_META+1, /**< Indicates the ID of meta information */ - MSG_MMS_META_NAME_STR, /**< Indicates the Name */ - MSG_MMS_META_CONTENT_STR, /**< Indicates the content */ + MSG_MMS_META_ID_STR = MSG_STRUCT_MMS_META+1, /**< Indicates the ID of meta information */ + MSG_MMS_META_NAME_STR, /**< Indicates the Name */ + MSG_MMS_META_CONTENT_STR, /**< Indicates the content */ }; -enum MSG_MMS_TRANSION_INFO_E { - MSG_MMS_TRANSITION_ID_STR = MSG_STRUCT_MMS_TRANSITION+1, /**< Indicates the ID of transition information */ - MSG_MMS_TRANSITION_TYPE_INT, /**< Indicates the transition type. see enum MmsSmilTransType */ - MSG_MMS_TRANSITION_SUBTYPE_INT, /**< Indicates the transition sub type. see enum MmsSmilTransSubType */ - MSG_MMS_TRANSITION_DURATION_INT, /**< Indicates the transition duration */ +/** + * @brief Enumeration for the values of MMS transition informations. \n + * This enum is used as member of #msg_struct_t for MSG_STRUCT_MMS_TRANSITION. + */ +enum MSG_MMS_TRANSITION_INFO_E { + MSG_MMS_TRANSITION_ID_STR = MSG_STRUCT_MMS_TRANSITION+1, /**< Indicates the ID of transition information */ + MSG_MMS_TRANSITION_TYPE_INT, /**< Indicates the transition type. See enum MmsSmilTransType */ + MSG_MMS_TRANSITION_SUBTYPE_INT, /**< Indicates the transition sub type. See enum MmsSmilTransSubType */ + MSG_MMS_TRANSITION_DURATION_INT, /**< Indicates the transition duration */ }; +/** + * @brief Enumeration for the values of MMS SMIL text informations. \n + * This enum is used as member of #msg_struct_t for MSG_STRUCT_MMS_SMIL_TEXT. + */ enum MSG_MMS_SMIL_TEXT_INFO_E { - MSG_MMS_SMIL_TEXT_TRANSITION_IN_ID_STR = MSG_STRUCT_MMS_SMIL_TEXT+1, /**< Indicates the In SMIL transition id */ - MSG_MMS_SMIL_TEXT_TRANSITION_OUT_ID_STR, /**< Indicates the Out SMIL transition id */ - MSG_MMS_SMIL_TEXT_REPEAT_INT, /**< Indicates the text needs to be displayed repeatedly */ - MSG_MMS_SMIL_TEXT_BEGIN_INT, /**< Indicates the begin time */ - MSG_MMS_SMIL_TEXT_END_INT, /**< Indicates the end time */ - MSG_MMS_SMIL_TEXT_DURTIME_INT, /**< Indicates the duration */ - MSG_MMS_SMIL_TEXT_BGCOLOR_INT, /**< Indicates the background color of the text */ - MSG_MMS_SMIL_TEXT_BOLD_BOOL, /**< Indicates whether the text is bold */ - MSG_MMS_SMIL_TEXT_UNDERLINE_BOOL, /**< Indicates whether the text is underlined */ - MSG_MMS_SMIL_TEXT_ITALIC_BOOL, /**< Indicates whether the text is Italic */ - MSG_MMS_SMIL_TEXT_REVERSE_BOOL, /**< Indicates whether the text is reversed */ - MSG_MMS_SMIL_TEXT_DIRECTION_TYPE_INT, /**< Indicates the text direction type. see enum MmsTextDirection */ - MSG_MMS_SMIL_TEXT_SIZE_INT, /**< Indicates the font size */ - MSG_MMS_SMIL_TEXT_COLOR_INT, /**< Indicates the font color */ -}; - + MSG_MMS_SMIL_TEXT_TRANSITION_IN_ID_STR = MSG_STRUCT_MMS_SMIL_TEXT+1, /**< Indicates the In SMIL transition ID */ + MSG_MMS_SMIL_TEXT_TRANSITION_OUT_ID_STR, /**< Indicates the Out SMIL transition ID */ + MSG_MMS_SMIL_TEXT_REPEAT_INT, /**< Indicates the text needs to be displayed repeatedly */ + MSG_MMS_SMIL_TEXT_BEGIN_INT, /**< Indicates the begin time */ + MSG_MMS_SMIL_TEXT_END_INT, /**< Indicates the end time */ + MSG_MMS_SMIL_TEXT_DURTIME_INT, /**< Indicates the duration */ + MSG_MMS_SMIL_TEXT_BGCOLOR_INT, /**< Indicates the background color of the text */ + MSG_MMS_SMIL_TEXT_BOLD_BOOL, /**< Indicates whether the text is bold */ + MSG_MMS_SMIL_TEXT_UNDERLINE_BOOL, /**< Indicates whether the text is underlined */ + MSG_MMS_SMIL_TEXT_ITALIC_BOOL, /**< Indicates whether the text is Italic */ + MSG_MMS_SMIL_TEXT_REVERSE_BOOL, /**< Indicates whether the text is reversed */ + MSG_MMS_SMIL_TEXT_DIRECTION_TYPE_INT, /**< Indicates the text direction type. see enum MmsTextDirection */ + MSG_MMS_SMIL_TEXT_SIZE_INT, /**< Indicates the font size */ + MSG_MMS_SMIL_TEXT_COLOR_INT, /**< Indicates the font color */ +}; + +/** + * @brief Enumeration for the values of MMS SMIL avi informations. \n + * This enum is used as member of #msg_struct_t for MSG_STRUCT_MMS_SMIL_AVI. + */ enum MSG_MMS_SMIL_AVI_INFO_E { - MSG_MMS_SMIL_AVI_TRANSITION_IN_ID_STR = MSG_STRUCT_MMS_SMIL_AVI+1, /**< Indicates the In SMIL transition id */ - MSG_MMS_SMIL_AVI_TRANSITION_OUT_ID_STR, /**< Indicates the Out SMIL transition id */ - MSG_MMS_SMIL_AVI_REPEAT_INT, /**< Indicates the video needs to be displayed repeatedly */ - MSG_MMS_SMIL_AVI_BEGIN_INT, /**< Indicates the begin time */ - MSG_MMS_SMIL_AVI_END_INT, /**< Indicates the end time */ - MSG_MMS_SMIL_AVI_DURTIME_INT, /**< Indicates the duration */ - MSG_MMS_SMIL_AVI_BGCOLOR_INT, /**< Indicates the background color of the text */ + MSG_MMS_SMIL_AVI_TRANSITION_IN_ID_STR = MSG_STRUCT_MMS_SMIL_AVI+1, /**< Indicates the In SMIL transition ID */ + MSG_MMS_SMIL_AVI_TRANSITION_OUT_ID_STR, /**< Indicates the Out SMIL transition ID */ + MSG_MMS_SMIL_AVI_REPEAT_INT, /**< Indicates the video needs to be displayed repeatedly */ + MSG_MMS_SMIL_AVI_BEGIN_INT, /**< Indicates the begin time */ + MSG_MMS_SMIL_AVI_END_INT, /**< Indicates the end time */ + MSG_MMS_SMIL_AVI_DURTIME_INT, /**< Indicates the duration */ + MSG_MMS_SMIL_AVI_BGCOLOR_INT, /**< Indicates the background color of the text */ }; +/** + * @brief Enumeration for the values of message sending options. \n + * This enum is used as member of #msg_struct_t for MSG_STRUCT_SENDOPT. + */ enum MSG_SEND_OPT_E { - MSG_SEND_OPT_SETTING_BOOL = MSG_STRUCT_SENDOPT+1, /**< Indicates whether the sending option is set ot not for a message */ - MSG_SEND_OPT_DELIVER_REQ_BOOL, /**< Indicates whether the delivey custom time is used or not */ - MSG_SEND_OPT_KEEPCOPY_BOOL, /**< Indicates whether the message copy is kept or not */ - MSG_SEND_OPT_MMS_OPT_HND, /**< The handle of MMS sending option for a message */ - MSG_SEND_OPT_SMS_OPT_HND, /**< The handle of SMS sending option for a message */ + MSG_SEND_OPT_SETTING_BOOL = MSG_STRUCT_SENDOPT+1, /**< Indicates whether the sending option is set or not for a message */ + MSG_SEND_OPT_DELIVER_REQ_BOOL, /**< Indicates whether the delivery custom time is used or not */ + MSG_SEND_OPT_KEEPCOPY_BOOL, /**< Indicates whether the message copy is kept or not */ + MSG_SEND_OPT_MMS_OPT_HND, /**< The handle of MMS sending option for a message */ + MSG_SEND_OPT_SMS_OPT_HND, /**< The handle of SMS sending option for a message */ }; +/** + * @brief Enumeration for the values of SyncML informations. \n + * This enum is used as member of #msg_struct_t for MSG_STRUCT_SYNCML_INFO. + */ enum MSG_SYNCML_INFO_E { - MSG_SYNCML_INFO_EXTID_INT = MSG_STRUCT_SYNCML_INFO+1, /**< Indicates the ext ID */ - MSG_SYNCML_INFO_PINCODE_INT, /**< Indicates the PIN code */ - MSG_SYNCML_INFO_MESSAGE_HND, /**< Indicate the handle of a message */ + MSG_SYNCML_INFO_EXTID_INT = MSG_STRUCT_SYNCML_INFO+1, /**< Indicates the ext ID */ + MSG_SYNCML_INFO_PINCODE_INT, /**< Indicates the PIN code */ + MSG_SYNCML_INFO_MESSAGE_HND, /**< Indicate the handle of a message */ }; +/** + * @brief Enumeration for the values of message count status. \n + * This enum is used as member of #msg_struct_t for MSG_STRUCT_COUNT_INFO. + */ enum MSG_COUNT_INFO_E { - MSG_COUNT_INFO_READ_INT = MSG_STRUCT_COUNT_INFO+1, /**< The count of read messages */ - MSG_COUNT_INFO_UNREAD_INT, /**< The count of unread messages */ - MSG_COUNT_INFO_SMS_INT, /**< The count of sms type messages */ - MSG_COUNT_INFO_MMS_INT, /**< The count of mms type messages */ + MSG_COUNT_INFO_READ_INT = MSG_STRUCT_COUNT_INFO+1, /**< The count of read messages */ + MSG_COUNT_INFO_UNREAD_INT, /**< The count of unread messages */ + MSG_COUNT_INFO_SMS_INT, /**< The count of SMS type messages */ + MSG_COUNT_INFO_MMS_INT, /**< The count of MMS type messages */ }; +/** + * @brief Enumeration for the values of message count in a thread. \n + * This enum is used as member of #msg_struct_t for MSG_STRUCT_THREAD_COUNT_INFO. + */ enum MSG_THREAD_COUNT_INFO_E { - MSG_THREAD_COUNT_TOTAL_INT = MSG_STRUCT_THREAD_COUNT_INFO+1, /**< Indicates the total number of messages from the Peer. */ - MSG_THREAD_COUNT_UNREAD_INT, /**< Indicates the unread messages from the Peer. */ - MSG_THREAD_COUNT_SMS_INT, /**< Indicates the SMS messages from the Peer. */ - MSG_THREAD_COUNT_MMS_INT, /**< Indicates the MMS messages from the Peer. */ + MSG_THREAD_COUNT_TOTAL_INT = MSG_STRUCT_THREAD_COUNT_INFO+1, /**< Indicates the total number of messages from the Peer. */ + MSG_THREAD_COUNT_UNREAD_INT, /**< Indicates the unread messages from the peer. */ + MSG_THREAD_COUNT_SMS_INT, /**< Indicates the SMS messages from the peer. */ + MSG_THREAD_COUNT_MMS_INT, /**< Indicates the MMS messages from the peer. */ }; +/** + * @brief Enumeration for the values of thread informations for address. \n + * This enum is used as member of #msg_struct_t for MSG_STRUCT_THREAD_LIST_INDEX. + */ enum MSG_THREAD_LIST_INDEX_E { - MSG_THREAD_LIST_INDEX_CONTACTID_INT = MSG_STRUCT_THREAD_LIST_INDEX+1, /**< The contact id of message common informatioin */ - MSG_THREAD_LIST_INDEX_ADDR_INFO_HND, /**< The pointer to message common informatioin */ + MSG_THREAD_LIST_INDEX_CONTACTID_INT = MSG_STRUCT_THREAD_LIST_INDEX+1, /**< The contact ID of message common informatioin */ + MSG_THREAD_LIST_INDEX_ADDR_INFO_HND, /**< The pointer to message common informatioin */ }; +/** + * @brief Enumeration for the values of sort rule for getting message list. \n + * This enum is used as member of #msg_struct_t for MSG_STRUCT_SORT_RULE. + */ enum MSG_SORT_RULE_E { - MSG_SORT_RULE_SORT_TYPE_INT = MSG_STRUCT_SORT_RULE+1, /**< Indicates the sort type. See enum _MSG_SORT_TYPE_E */ - MSG_SORT_RULE_ACSCEND_BOOL, /**< Indicates the sort order which is ascending or descending */ + MSG_SORT_RULE_SORT_TYPE_INT = MSG_STRUCT_SORT_RULE+1, /**< Indicates the sort type. See enum _MSG_SORT_TYPE_E */ + MSG_SORT_RULE_ACSCEND_BOOL, /**< Indicates the sort order which is ascending or descending */ }; +/** + * @brief Enumeration for the values of message folder information. \n + * This enum is used as member of #msg_struct_t for MSG_STRUCT_FOLDER_INFO. + */ enum MSG_FOLDER_INFO_E { - MSG_FOLDER_INFO_ID_INT = MSG_STRUCT_FOLDER_INFO+1, /**< Indicates the unique folder ID. */ - MSG_FOLDER_INFO_NAME_STR, /**< Indicates the name of the folder. */ - MSG_FOLDER_INFO_TYPE_INT, /**< Indicates the folder type. */ + MSG_FOLDER_INFO_ID_INT = MSG_STRUCT_FOLDER_INFO+1, /**< Indicates the unique folder ID. */ + MSG_FOLDER_INFO_NAME_STR, /**< Indicates the name of the folder. */ + MSG_FOLDER_INFO_TYPE_INT, /**< Indicates the folder type. */ }; +/** + * @brief Enumeration for the values of conditions for searching message. \n + * This enum is used as member of #msg_struct_t for MSG_STRUCT_SEARCH_CONDITION. + */ enum MSG_SEARCH_CONDITION_E { - MSG_SEARCH_CONDITION_FOLDERID_INT = MSG_STRUCT_SEARCH_CONDITION+1, /**< Indicates the folder ID for searching messages. See enum _MSG_FOLDER_ID_E */ - MSG_SEARCH_CONDITION_MSGTYPE_INT, /**< Indicates the message type for searching messages. See enum _MSG_MESSAGE_TYPE_E */ - MSG_SEARCH_CONDITION_ADDRESS_VALUE_STR, /**< The address value for searching messages. */ - MSG_SEARCH_CONDITION_SEARCH_VALUE_STR, /**< The string to search */ - MSG_SEARCH_CONDITION_RESERVED_INT, + MSG_SEARCH_CONDITION_FOLDERID_INT = MSG_STRUCT_SEARCH_CONDITION+1, /**< The folder ID for searching messages. See enum _MSG_FOLDER_ID_E */ + MSG_SEARCH_CONDITION_MSGTYPE_INT, /**< The message type for searching messages. See enum _MSG_MESSAGE_TYPE_E */ + MSG_SEARCH_CONDITION_ADDRESS_VALUE_STR, /**< The address value for searching messages. */ + MSG_SEARCH_CONDITION_SEARCH_VALUE_STR, /**< The string to search */ + MSG_SEARCH_CONDITION_RESERVED_INT, /**< The search condition reserved*/ }; +/** + * @brief Enumeration for the values of report message status. \n + * This enum is used as member of #msg_struct_t for MSG_STRUCT_REPORT_STATUS_INFO. + */ enum MSG_REPORT_E { - MSG_REPORT_ADDRESS_STR = MSG_STRUCT_REPORT_STATUS_INFO+1, /**< Indicates Report address */ - MSG_REPORT_TYPE_INT, /**< Indicates Report type. See the msg_report_type_t type*/ - MSG_REPORT_STATUS_INT, /**< Indicates Report status. See the msg_delivery_report_status_t or msg_read_report_status_t type*/ - MSG_REPORT_TIME_INT, /**< Indicates Report time */ + MSG_REPORT_ADDRESS_STR = MSG_STRUCT_REPORT_STATUS_INFO+1, /**< Indicates Report address */ + MSG_REPORT_TYPE_INT, /**< Indicates Report type. See the msg_report_type_t type*/ + MSG_REPORT_STATUS_INT, /**< Indicates Report status. See the msg_delivery_report_status_t or msg_read_report_status_t type*/ + MSG_REPORT_TIME_INT, /**< Indicates Report time */ +}; + +/** + * @brief Enumeration for the values of conditions for getting message list. \n + * This enum is used as member of #msg_struct_t for MSG_STRUCT_MSG_LIST_CONDITION. + */ +enum MSG_LIST_CONDITION_E { + MSG_LIST_CONDITION_FOLDER_ID_INT = MSG_STRUCT_MSG_LIST_CONDITION+1, /**< Indicates the folder ID for searching messages. See enum _MSG_FOLDER_ID_E */ + MSG_LIST_CONDITION_THREAD_ID_INT, /**< Indicates the thread ID for searching messages. */ + MSG_LIST_CONDITION_STORAGE_ID_INT, /**< Indicates the storage ID for searching messages. See enum _MSG_STORAGE_ID_E */ + MSG_LIST_CONDITION_MSGTYPE_INT, /**< Indicates the message type for searching messages. See enum _MSG_MESSAGE_TYPE_E */ + MSG_LIST_CONDITION_PROTECTED_BOOL, /**< Indicates the protected flag for searching messages*/ + MSG_LIST_CONDITION_SCHEDULED_BOOL, /**< Indicates the scheduled flag for searching messages*/ + MSG_LIST_CONDITION_ADDRESS_VALUE_STR, /**< The address value for searching messages. */ + MSG_LIST_CONDITION_TEXT_VALUE_STR, /**< The string to search */ + MSG_LIST_CONDITION_AND_OPERATER_BOOL, /**< Indicates presence of 'AND' operator for searching messages*/ + MSG_LIST_CONDITION_FROM_TIME_INT, /**< Indicates the 'FROM TIME' for searching messages*/ + MSG_LIST_CONDITION_TO_TIME_INT, /**< Indicates the 'TO TIME' for searching messages*/ + MSG_LIST_CONDITION_OFFSET_INT, /**< Indicates Search Result offset*/ + MSG_LIST_CONDITION_LIMIT_INT, /**< Indicates Search Result limit*/ + MSG_LIST_CONDITION_SORT_RULE_HND, /**< The pointer to sort rule to apply*/ + MSG_LIST_CONDITION_SIM_INDEX_INT, }; +/** + * @brief Enumeration for the values of address informations. \n + * This enum is used as member of #msg_struct_t for MSG_STRUCT_ADDRESS_INFO. + */ enum MSG_ADDRESS_INFO_E { - MSG_ADDRESS_INFO_ADDRESS_TYPE_INT = MSG_STRUCT_ADDRESS_INFO+1, /**< The type of an address in case of an Email or a mobile phone. See enum _MSG_ADDRESS_TYPE_E */ - MSG_ADDRESS_INFO_RECIPIENT_TYPE_INT, /**< The type of recipient address in case of To, Cc, and Bcc. See enum _MSG_RECIPIENT_TYPE_E */ - MSG_ADDRESS_INFO_CONTACT_ID_INT, /**< The contact ID of address */ - MSG_ADDRESS_INFO_ADDRESS_VALUE_STR, /**< The actual value of an address */ - MSG_ADDRESS_INFO_DISPLAYNAME_STR, /**< The display name of an address */ + MSG_ADDRESS_INFO_ADDRESS_TYPE_INT = MSG_STRUCT_ADDRESS_INFO+1, /**< The type of an address in case of an Email or a mobile phone. See enum _MSG_ADDRESS_TYPE_E */ + MSG_ADDRESS_INFO_RECIPIENT_TYPE_INT, /**< The type of recipient address in case of To, Cc, and Bcc. See enum _MSG_RECIPIENT_TYPE_E */ + MSG_ADDRESS_INFO_CONTACT_ID_INT, /**< The contact ID of address **DEPRECATED** */ + MSG_ADDRESS_INFO_ADDRESS_VALUE_STR, /**< The actual value of an address */ + MSG_ADDRESS_INFO_DISPLAYNAME_STR, /**< The display name of an address **DEPRECATED** */ }; +/** + * @brief Enumeration for the values of MMS sending options for sent message. \n + * This enum is used as member of #msg_struct_t for MSG_STRUCT_MMS_SENDOPT. + */ enum MSG_MMS_SENDOPT_E { - MSG_MMS_SENDOPTION_READ_REQUEST_BOOL = MSG_STRUCT_MMS_SENDOPT+1, /**< Indicates whether it requests read report or not */ - MSG_MMS_SENDOPTION_EXPIRY_TIME_INT, /**< Indicates MMS expiry time */ - MSG_MMS_SENDOPTION_DELIVERY_CUSTOMTIME_BOOL, /**< Indicates whether is use MMS delivery custom time */ - MSG_MMS_SENDOPTION_DELIVERY_TIME_INT, /**< Indicates MMS delivery time */ - MSG_MMS_SENDOPTION_PRIORITY_INT, /**< Indicates MMS priority. See enum _MSG_PRIORITY_TYPE_E */ + MSG_MMS_SENDOPTION_READ_REQUEST_BOOL = MSG_STRUCT_MMS_SENDOPT+1, /**< Indicates whether it requests read report or not */ + MSG_MMS_SENDOPTION_EXPIRY_TIME_INT, /**< Indicates MMS expiry time */ + MSG_MMS_SENDOPTION_DELIVERY_CUSTOMTIME_BOOL, /**< Indicates whether is use MMS delivery custom time */ + MSG_MMS_SENDOPTION_DELIVERY_TIME_INT, /**< Indicates MMS delivery time */ + MSG_MMS_SENDOPTION_PRIORITY_INT, /**< Indicates MMS priority. See enum _MSG_PRIORITY_TYPE_E */ }; +/** + * @brief Enumeration for the values of SMS sending options for sent message. \n + * This enum is used as member of #msg_struct_t for MSG_STRUCT_SMS_SENDOPT. + */ enum MSG_SMS_SENDOPT_E { - MSG_SMS_SENDOPT_REPLYPATH_BOOL = MSG_STRUCT_SMS_SENDOPT+1, /**< Indicates whether reply path is set */ + MSG_SMS_SENDOPT_REPLYPATH_BOOL = MSG_STRUCT_SMS_SENDOPT+1, /**< Indicates whether reply path is set */ }; +/** + * @brief Enumeration for the values of reject message informations. \n + * This enum is used as member of #msg_struct_t for MSG_STRUCT_REJECT_MSG_INFO. + */ enum MSG_REJECT_MESSAGE_E { - MSG_REJECT_MESSAGE_MSGID_INT = MSG_STRUCT_REJECT_MSG_INFO+1, /**< Indicates the font type none */ - MSG_REJECT_MESSAGE_MSGTEXT_STR, /**< Indicates the font type none */ - MSG_REJECT_MESSAGE_DISPLAY_TIME_INT, /**< Indicates the font type none */ + MSG_REJECT_MESSAGE_MSGID_INT = MSG_STRUCT_REJECT_MSG_INFO+1, /**< Indicates the ID of rejected message */ + MSG_REJECT_MESSAGE_MSGTEXT_STR, /**< Indicates the text of rejected message */ + MSG_REJECT_MESSAGE_DISPLAY_TIME_INT, /**< Indicates the display time of rejected message */ }; +/** + * @brief Enumeration for the values of requested message informations. \n + * This enum is used as member of #msg_struct_t for MSG_STRUCT_REQUEST_INFO. + */ enum MSG_REQUEST_INFO_E { - MSG_REQUEST_REQUESTID_INT = MSG_STRUCT_REQUEST_INFO+1, /**< Indicates the request ID, which is unique. When applications submit a request to the framework, this value will be set by the framework. */ - MSG_REQUEST_MESSAGE_HND, /**< Indicates the message structure to be sent by applications. */ - MSG_REQUEST_SENDOPT_HND, + MSG_REQUEST_REQUESTID_INT = MSG_STRUCT_REQUEST_INFO+1, /**< Indicates the request ID, which is unique. When applications submit a request to the framework, this value will be set by the framework. */ + MSG_REQUEST_MESSAGE_HND, /**< Indicates the message structure to be sent by applications. */ + MSG_REQUEST_SENDOPT_HND, /**< Indicates the send options to be sent by applications*/ }; +/** + * @brief Enumeration for the values of sent status informations. \n + * This enum is used as member of #msg_struct_t for MSG_STRUCT_SENT_STATUS_INFO. + */ enum MSG_SENT_STATUS_INFO_E { - MSG_SENT_STATUS_REQUESTID_INT = MSG_STRUCT_SENT_STATUS_INFO+1, /**< Indicates the corresponding request Id. */ - MSG_SENT_STATUS_NETWORK_STATUS_INT, /**< Indicates the status of the corresponding request. Refer to enum _MSG_NETWORK_STATUS_E*/ + MSG_SENT_STATUS_REQUESTID_INT = MSG_STRUCT_SENT_STATUS_INFO+1, /**< Indicates the corresponding request ID. */ + MSG_SENT_STATUS_NETWORK_STATUS_INT, /**< Indicates the status of the corresponding request. See enum _MSG_NETWORK_STATUS_E*/ }; +/** + * @brief Enumeration for the values of push configurations. \n + * This enum is used as member of #msg_struct_t for MSG_STRUCT_PUSH_CONFIG_INFO. + */ enum MSG_PUSH_CONFIG_INFO_E { - MSG_PUSH_CONFIG_CONTENT_TYPE_STR = MSG_STRUCT_PUSH_CONFIG_INFO+1, - MSG_PUSH_CONFIG_APPLICATON_ID_STR, - MSG_PUSH_CONFIG_PACKAGE_NAME_STR, - MSG_PUSH_CONFIG_LAUNCH_BOOL, + MSG_PUSH_CONFIG_CONTENT_TYPE_STR = MSG_STRUCT_PUSH_CONFIG_INFO+1, /**< Indicates the content type*/ + MSG_PUSH_CONFIG_APPLICATON_ID_STR, /**< Indicates the application ID*/ + MSG_PUSH_CONFIG_PACKAGE_NAME_STR, /**< Indicates the package name*/ + MSG_PUSH_CONFIG_LAUNCH_BOOL, /**< Indicates launch*/ }; +/** + * @brief Enumeration for the values of CB message informations. \n + * This enum is used as member of #msg_struct_t for MSG_STRUCT_CB_MSG. + */ enum MSG_CB_MSG_E { - MSG_CB_MSG_TYPE_INT = MSG_STRUCT_CB_MSG+1, /**< MSG_TYPE_SMS_CB/ETWS_PRIMARY/ETWS_SECONDARY (see _MSG_MESSAGE_TYPE_E) */ - MSG_CB_MSG_RECV_TIME_INT, - MSG_CB_MSG_SERIAL_NUM_INT, /**< serial number of CB/ETWS Primary Noti. : 2 bytes binary data */ - MSG_CB_MSG_MSG_ID_INT, /**< message identifier of CB/ETWS Primary Noti. */ - MSG_CB_MSG_DCS_INT, /**< Data coding scheme of CB MSG. */ - MSG_CB_MSG_CB_TEXT_LEN_INT, /**< length of CB text (except NULL) */ - MSG_CB_MSG_CB_TEXT_STR, /**< CB text */ - MSG_CB_MSG_ETWS_WARNING_TYPE_INT, /**< warning type of ETWS Primary Noti. : 2 bytes binary data */ - MSG_CB_MSG_ETWS_WARNING_SECU_INFO_STR, /**< warning security information of ETWS Primary Noti. : 50 bytes binary data */ - MSG_CB_MSG_LANGUAGE_TYPE_STR, /**< Language type of CB message data */ + MSG_CB_MSG_TYPE_INT = MSG_STRUCT_CB_MSG+1, /**< MSG_TYPE_SMS_CB/ETWS_PRIMARY/ETWS_SECONDARY (see _MSG_MESSAGE_TYPE_E) */ + MSG_CB_MSG_RECV_TIME_INT, /**< Received time*/ + MSG_CB_MSG_SERIAL_NUM_INT, /**< Serial number of CB/ETWS Primary Noti. : 2 bytes binary data */ + MSG_CB_MSG_MSG_ID_INT, /**< Message identifier of CB/ETWS Primary Noti. */ + MSG_CB_MSG_DCS_INT, /**< Data coding scheme of CB MSG. */ + MSG_CB_MSG_CB_TEXT_LEN_INT, /**< Length of CB text (except NULL) */ + MSG_CB_MSG_CB_TEXT_STR, /**< CB text */ + MSG_CB_MSG_ETWS_WARNING_TYPE_INT, /**< Warning type of ETWS Primary Noti. : 2 bytes binary data */ + MSG_CB_MSG_ETWS_WARNING_SECU_INFO_STR, /**< Warning security information of ETWS Primary Noti. : 50 bytes binary data */ + MSG_CB_MSG_LANGUAGE_TYPE_STR, /**< Language type of CB message data */ }; /** - * @brief Represents the values of a message class type. \n - * This enum is used as the value of MSG_CLASS_TYPE_T. + * @brief Enumeration for the values of a message class type. \n + * This enum is used as the value of MSG_CLASS_TYPE_T. */ enum _MSG_CLASS_TYPE_E { @@ -776,137 +1163,152 @@ enum _MSG_CLASS_TYPE_E MSG_CLASS_1, /**< Stored in the mobile equipment or SIM (depending on memory availability) */ MSG_CLASS_2, /**< Stored in SIM */ MSG_CLASS_3, /**< Transferred to the terminal equipment (such as PDA or PC) which is connected to the mobile equipment */ - MSG_CLASS_NONE, + MSG_CLASS_NONE, /**< Message class none*/ }; /** - * @brief Represents the type of Message. More members maybe added if needed \n - * This enum is used as the value of msg_message_type_t. + * @brief Enumeration for the type of Message. \n + * More members maybe added if needed. \n + * This enum is used as the value of msg_message_type_t. */ enum _MSG_MESSAGE_TYPE_E { - MSG_TYPE_INVALID = 0, /** < Invalid Type Message */ + MSG_TYPE_INVALID = 0, /** < Invalid Type Message */ + + MSG_TYPE_SMS, /** < Normal SMS Message */ + MSG_TYPE_SMS_CB, /** < Cell Broadcasting SMS Message */ + MSG_TYPE_SMS_JAVACB, /** < JAVA Cell Broadcasting SMS Message */ + MSG_TYPE_SMS_WAPPUSH, /** < WAP Push SMS Message */ + MSG_TYPE_SMS_MWI, /** < MWI SMS Message */ + MSG_TYPE_SMS_SYNCML, /** < SyncML CP SMS Message */ + MSG_TYPE_SMS_REJECT, /** < Reject Message */ - MSG_TYPE_SMS, /** < Normal SMS Message */ - MSG_TYPE_SMS_CB, /** < Cell Broadcasting SMS Message */ - MSG_TYPE_SMS_JAVACB, /** < JAVA Cell Broadcasting SMS Message */ - MSG_TYPE_SMS_WAPPUSH, /** < WAP Push SMS Message */ - MSG_TYPE_SMS_MWI, /** < MWI SMS Message */ - MSG_TYPE_SMS_SYNCML, /** < SyncML CP SMS Message */ - MSG_TYPE_SMS_REJECT, /** < Reject Message */ + MSG_TYPE_MMS, /** < Normal MMS Message */ + MSG_TYPE_MMS_JAVA, /** < JAVA MMS Message */ + MSG_TYPE_MMS_NOTI, /** < MMS Notification Message */ - MSG_TYPE_MMS, /** < Normal MMS Message */ - MSG_TYPE_MMS_JAVA, /** < JAVA MMS Message */ - MSG_TYPE_MMS_NOTI, /** < MMS Notification Message */ + MSG_TYPE_SMS_ETWS_PRIMARY, /** < CB - ETWS Primary Notification */ + MSG_TYPE_SMS_ETWS_SECONDARY, /** < CB - ETWS Secondary Notification */ - MSG_TYPE_SMS_ETWS_PRIMARY, /** < CB - ETWS Primary Notification */ - MSG_TYPE_SMS_ETWS_SECONDARY, /** < CB - ETWS Secondary Notification */ + MSG_TYPE_SMS_CMAS_PRESIDENTIAL, /** < CB - CMAS Presidential Alerts */ + MSG_TYPE_SMS_CMAS_EXTREME, /** < CB - CMAS Extreme Alerts */ + MSG_TYPE_SMS_CMAS_SEVERE, /** < CB - CMAS Severe Alerts */ + MSG_TYPE_SMS_CMAS_AMBER, /** < CB - CMAS AMBER Alerts (Child Abduction Emergency) */ + MSG_TYPE_SMS_CMAS_TEST, /** < CB - CMAS Test */ + MSG_TYPE_SMS_CMAS_OPERATOR_DEFINED, /** < CB - CMAS Operator defined */ + MSG_MESSAGE_TYPE_MAX, /** < Placeholder for max value of this enum */ }; /** - * @brief Represents the backup type of Message. More members maybe added if needed \n - * This enum is used as the value of msg_message_backup_type_t. + * @brief Enumeration for the backup type of Message. More members maybe added if needed \n + * This enum is used as the value of msg_message_backup_type_t. */ enum _MSG_MESSAGE_BACKUP_TYPE_E { - MSG_BACKUP_TYPE_ALL = 0, - MSG_BACKUP_TYPE_SMS, - MSG_BACKUP_TYPE_MMS, + MSG_BACKUP_TYPE_ALL = 0, /**< Backup all*/ + MSG_BACKUP_TYPE_SMS, /**< Backup SMS*/ + MSG_BACKUP_TYPE_MMS, /**< Backup MMS*/ }; /** - * @brief Represents the values of an error code. \n - * Success code is zero, but all error codes SHOULD be negative and smaller than MSG_ERROR_BEGIN. \n - * This enum is used as the value of msg_error_t. + * @brief Enumeration for the values of an error code. \n + * Success code is zero, but all error codes SHOULD be negative and smaller than MSG_SUCCESS. \n + * This enum is used as the value of msg_error_t. */ enum _MSG_ERROR_E { - MSG_SUCCESS = 0, /**< Successful */ - - MSG_ERR_NULL_MSGHANDLE = -1, /**< Message handle is NULL */ - MSG_ERR_NULL_POINTER = -2, /**< Pointer is NULL */ - MSG_ERR_NULL_MESSAGE = -3, /**< Message is NULL */ - MSG_ERR_INVALID_STORAGE_ID = -4, /**< Storage ID is invalid */ - MSG_ERR_INVALID_MSG_TYPE = -5, /**< Message type is invalid */ - - MSG_ERR_INVALID_STORAGE_REG= -6, /**< Storage registry is invalid */ - MSG_ERR_INVALID_MESSAGE_ID = -7, /**< Message ID is invalid */ - MSG_ERR_INVALID_MSGHANDLE = -8, /**< Message handle is invalid */ - MSG_ERR_INVALID_PARAMETER = -9, /**< Parameter is invalid */ - MSG_ERR_INVALID_MESSAGE = -10, /**< Message is invalid */ - - MSG_ERR_INVALID_PLUGIN_HANDLE = -11, /**< Plugin handle is invalid */ - MSG_ERR_MEMORY_ERROR = -12, /**< Memory is error */ - MSG_ERR_COMMUNICATION_ERROR = -13, /**< Communication between client and server is error */ - MSG_ERR_SIM_STORAGE_FULL = -14, /**< SIM Storage is full */ - MSG_ERR_TRANSPORT_ERROR = -15, /**< Transport event error */ - - MSG_ERR_CALLBACK_ERROR = -16, /**< Callback event error */ - MSG_ERR_STORAGE_ERROR = -17, /**< Storage event error */ - MSG_ERR_FILTER_ERROR = -18, /**< Filter event error */ - MSG_ERR_MMS_ERROR = -19, /**< MMS event error */ - MSG_ERR_MMPLAYER_CREATE = -20, /**< Multimedia Error*/ - - MSG_ERR_MMPLAYER_SET_ATTRS = -21, /**< Multimedia Error*/ - MSG_ERR_MMPLAYER_REALIZE = -22, /**< Multimedia Error*/ - MSG_ERR_MMPLAYER_PLAY = -23, /**< Multimedia Error*/ - MSG_ERR_MMPLAYER_STOP = -24, /**< Multimedia Error*/ - MSG_ERR_MMPLAYER_DESTROY = -25, /**< Multimedia Error*/ - - MSG_ERR_UNKNOWN = -26, /**< Unknown errors */ + MSG_SUCCESS = 0, /**< Successful */ + + MSG_ERR_NULL_MSGHANDLE = -1, /**< Message handle is NULL */ + MSG_ERR_NULL_POINTER = -2, /**< Pointer is NULL */ + MSG_ERR_NULL_MESSAGE = -3, /**< Message is NULL */ + MSG_ERR_INVALID_STORAGE_ID = -4, /**< Storage ID is invalid */ + MSG_ERR_INVALID_MSG_TYPE = -5, /**< Message type is invalid */ + + MSG_ERR_INVALID_STORAGE_REG= -6, /**< Storage registry is invalid */ + MSG_ERR_INVALID_MESSAGE_ID = -7, /**< Message ID is invalid */ + MSG_ERR_INVALID_MSGHANDLE = -8, /**< Message handle is invalid */ + MSG_ERR_INVALID_PARAMETER = -9, /**< Parameter is invalid */ + MSG_ERR_INVALID_MESSAGE = -10, /**< Message is invalid */ + + MSG_ERR_INVALID_PLUGIN_HANDLE = -11, /**< Plugin handle is invalid */ + MSG_ERR_MEMORY_ERROR = -12, /**< Memory is error */ + MSG_ERR_COMMUNICATION_ERROR = -13, /**< Communication between client and server is error */ + MSG_ERR_SIM_STORAGE_FULL = -14, /**< SIM Storage is full */ + MSG_ERR_TRANSPORT_ERROR = -15, /**< Transport event error */ + + MSG_ERR_CALLBACK_ERROR = -16, /**< Callback event error */ + MSG_ERR_STORAGE_ERROR = -17, /**< Storage event error */ + MSG_ERR_FILTER_ERROR = -18, /**< Filter event error */ + MSG_ERR_MMS_ERROR = -19, /**< MMS event error */ + MSG_ERR_MMPLAYER_CREATE = -20, /**< Multimedia Error*/ + + MSG_ERR_MMPLAYER_SET_ATTRS = -21, /**< Multimedia Error*/ + MSG_ERR_MMPLAYER_REALIZE = -22, /**< Multimedia Error*/ + MSG_ERR_MMPLAYER_PLAY = -23, /**< Multimedia Error*/ + MSG_ERR_MMPLAYER_STOP = -24, /**< Multimedia Error*/ + MSG_ERR_MMPLAYER_DESTROY = -25, /**< Multimedia Error*/ + + MSG_ERR_UNKNOWN = -26, /**< Unknown errors */ /* Start Database Errors */ - MSG_ERR_DB_CONNECT = -27, - MSG_ERR_DB_DISCONNECT = -28, - MSG_ERR_DB_EXEC = -29, - MSG_ERR_DB_GETTABLE = -30, - - MSG_ERR_DB_PREPARE = -31, - MSG_ERR_DB_STEP = -32, - MSG_ERR_DB_NORECORD= -33, - MSG_ERR_DB_STORAGE_INIT = -34, - MSG_ERR_DB_MAKE_DIR = -35, - - MSG_ERR_DB_ROW = -36, - MSG_ERR_DB_DONE = -37, - MSG_ERR_DB_GENERIC= -38, - MSG_ERR_DB_END = -39, + MSG_ERR_DB_CONNECT = -27, /**< DB connect error*/ + MSG_ERR_DB_DISCONNECT = -28, /**< DB disconnect error*/ + MSG_ERR_DB_EXEC = -29, /**< DB command execute error*/ + MSG_ERR_DB_GETTABLE = -30, /**< DB get-table error*/ + + MSG_ERR_DB_PREPARE = -31, /**< DB prepare query error*/ + MSG_ERR_DB_STEP = -32, /**< DB step query error*/ + MSG_ERR_DB_NORECORD= -33, /**< DB no-record error*/ + MSG_ERR_DB_STORAGE_INIT = -34, /**< DB storage init error*/ + MSG_ERR_DB_MAKE_DIR = -35, /**< mkdir error*/ + + MSG_ERR_DB_ROW = -36, /**< DB step() has another row ready */ + MSG_ERR_DB_DONE = -37, /**< DB step() has finished executing */ + MSG_ERR_DB_GENERIC= -38, /**< Generic DB error*/ + MSG_ERR_DB_END = -39, /**< DB end error*/ /* End Database Errors */ /* Start Setting Errors */ - MSG_ERR_SET_SETTING = -40, - MSG_ERR_SET_SIM_SET = -41, - MSG_ERR_SET_READ_ERROR = -42, - MSG_ERR_SET_WRITE_ERROR = -43, - MSG_ERR_SET_DELETE_ERROR = -44, + MSG_ERR_SET_SETTING = -40, /**< Error setting config data*/ + MSG_ERR_SET_SIM_SET = -41, /**< Error setting config data in SIM*/ + MSG_ERR_SET_READ_ERROR = -42, /**< Error reading config settings*/ + MSG_ERR_SET_WRITE_ERROR = -43, /**< Error in writing config settings*/ + MSG_ERR_SET_DELETE_ERROR = -44, /**< Error in deleting config settings*/ /* End Setting Errors */ /* Start Plugin Errors */ - MSG_ERR_PLUGIN_TAPIINIT = -45, - MSG_ERR_PLUGIN_REGEVENT = -46, - MSG_ERR_PLUGIN_TRANSPORT = -47, - MSG_ERR_PLUGIN_STORAGE = -48, - MSG_ERR_PLUGIN_SETTING = -49, - - MSG_ERR_PLUGIN_WAPDECODE = -50, - MSG_ERR_PLUGIN_TAPI_FAILED = -51, - MSG_ERR_PLUGIN_SIM_MSG_FULL = -52, + MSG_ERR_PLUGIN_TAPIINIT = -45, /**< Telephony init error*/ + MSG_ERR_PLUGIN_REGEVENT = -46, /**< Register even error*/ + MSG_ERR_PLUGIN_TRANSPORT = -47, /**< Transport (send/receive) error*/ + MSG_ERR_PLUGIN_STORAGE = -48, /**< Storage error*/ + MSG_ERR_PLUGIN_SETTING = -49, /**< Error setting config data*/ + + MSG_ERR_PLUGIN_WAPDECODE = -50, /**< WAP decode error*/ + MSG_ERR_PLUGIN_TAPI_FAILED = -51, /**< TAPI failure*/ + MSG_ERR_PLUGIN_SIM_MSG_FULL = -52, /**< SIM message full error*/ /* End Plugin Errors */ - MSG_ERR_MESSAGE_COUNT_FULL = -53, - MSG_ERR_READREPORT_NOT_REQUESTED = -54, - MSG_ERR_READREPORT_ALEADY_SENT = -55, + MSG_ERR_MESSAGE_COUNT_FULL = -53, /**< Message count full*/ + MSG_ERR_READREPORT_NOT_REQUESTED = -54, /**< Read report not requested*/ + MSG_ERR_READREPORT_ALEADY_SENT = -55, /**< Read report already sent*/ - MSG_ERR_FILTER_DUPLICATED = -56, /**< Filter duplicate error */ - MSG_ERR_SECURITY_ERROR = -57, - MSG_ERR_NO_SIM = -58, - MSG_ERR_SERVER_NOT_READY= -59, + MSG_ERR_FILTER_DUPLICATED = -56, /**< Filter duplicate error */ + MSG_ERR_PERMISSION_DENIED = -57, /**< Permission denied*/ + MSG_ERR_NO_SIM = -58, /**< No SIM*/ + + MSG_ERR_SERVER_NOT_READY = -59, /**< Message server not ready*/ + + MSG_ERR_STORE_RESTRICT = -60, /**< Storage restricted error*/ + MSG_ERR_DB_BUSY = -61, /**< DB file locked*/ + MSG_ERR_NOT_SUPPORTED = -63, /**< Not supported */ + MSG_ERR_NOT_ALLOWED_ZONE = -100, /**< Not allowed zone */ }; /** - * @brief Represents the values of a message priority. \n - * This enum is used as the value of msg_priority_type_t. + * @brief Enumeration for the values of a message priority. \n + * This enum is used as the value of msg_priority_type_t. */ enum _MSG_PRIORITY_TYPE_E { @@ -917,29 +1319,42 @@ enum _MSG_PRIORITY_TYPE_E /** - * @brief Represents the values of a network status. \n - * This enum is used as the value of msg_network_status_t. + * @brief Enumeration for the values of a network status. \n + * This enum is used as the value of msg_network_status_t. */ enum _MSG_NETWORK_STATUS_E { - MSG_NETWORK_NOT_SEND = 0, /**< Message is not sending */ - MSG_NETWORK_SENDING, /**< Message is sending */ - MSG_NETWORK_SEND_SUCCESS, /**< Message is sent successfully */ - MSG_NETWORK_SEND_FAIL, /**< Message is failed to send */ - MSG_NETWORK_DELIVER_SUCCESS, /**< Message is delivered */ - MSG_NETWORK_DELIVER_FAIL, /**< Message is failed to deliver */ - MSG_NETWORK_RECEIVED, /**< Message is received */ - MSG_NETWORK_REQ_CANCELLED, /**< Request is cancelled */ - MSG_NETWORK_RETRIEVING, /**< Message is retrieving */ - MSG_NETWORK_RETRIEVE_SUCCESS, /**< Message is retrieved successfully */ - MSG_NETWORK_RETRIEVE_FAIL, /**< Message is failed to retrieve */ - MSG_NETWORK_SEND_TIMEOUT, /**< Message is failed to send by timeout */ + MSG_NETWORK_NOT_SEND = 0, /**< Message is not sending */ + MSG_NETWORK_SENDING, /**< Sending message */ + MSG_NETWORK_SEND_SUCCESS, /**< Message is sent successfully */ + MSG_NETWORK_SEND_FAIL, /**< Failed to send message */ + MSG_NETWORK_DELIVER_SUCCESS, /**< Message is delivered */ + MSG_NETWORK_DELIVER_FAIL, /**< Failed to deliver message */ + MSG_NETWORK_RECEIVED, /**< Message is received */ + MSG_NETWORK_REQ_CANCELLED, /**< Request is cancelled */ + MSG_NETWORK_RETRIEVING, /**< Retrieving message */ + MSG_NETWORK_RETRIEVE_SUCCESS, /**< Message is retrieved successfully */ + MSG_NETWORK_RETRIEVE_FAIL, /**< Failed to retrieve */ + MSG_NETWORK_SEND_TIMEOUT, /**< Send timed-out*/ // WILL BE REMOVED + MSG_NETWORK_SEND_FAIL_MANDATORY_INFO_MISSING, /**< Send failed due to mandatory info missing*/ // WILL BE REMOVED + MSG_NETWORK_SEND_FAIL_TEMPORARY, /**<Send failed temporarily*/ // WILL BE REMOVED + MSG_NETWORK_SEND_FAIL_BY_MO_CONTROL_WITH_MOD, /**< Send failed by MO control- ALLOWED WITH MOD*/ // WILL BE REMOVED + MSG_NETWORK_SEND_FAIL_BY_MO_CONTROL_NOT_ALLOWED, /**< Send failed by MO control*/ // WILL BE REMOVED + MSG_NETWORK_DELIVER_PENDING, /**< Delivery pending*/ + MSG_NETWORK_DELIVER_EXPIRED, /**< Delivery expired*/ + MSG_NETWORK_SEND_PENDING, /**< Send is pending*/ +#ifdef FEATURE_SMS_CDMA + MSG_NETWORK_SEND_FAIL_UNKNOWN_SUBSCRIBER, /**< Unknown subscriber(destination) */ + MSG_NETWORK_SEND_FAIL_MS_DISABLED, /**< Mobile station originated SMS disabled */ + MSG_NETWORK_SEND_FAIL_NETWORK_NOT_READY, /**< Network not ready */ + MSG_NETWORK_RETRIEVE_PENDING, /**< Retrieve is pending*/ +#endif }; /** - * @brief Represents the values of an address type. \n - * This enum is used as the value of msg_address_type_t. + * @brief Enumeration for the values of an address type. \n + * This enum is used as the value of msg_address_type_t. */ enum _MSG_ADDRESS_TYPE_E { @@ -950,21 +1365,21 @@ enum _MSG_ADDRESS_TYPE_E /** - * @brief Represents the values of a recipient type. \n - * This enum is used as the value of msg_recipient_type_t. + * @brief Enumeration for the values of a recipient type. \n + * This enum is used as the value of msg_recipient_type_t. */ enum _MSG_RECIPIENT_TYPE_E { - MSG_RECIPIENTS_TYPE_UNKNOWN = 0, /**< The recipient type is unknown. */ - MSG_RECIPIENTS_TYPE_TO, /**< The recipient type is for "To". */ - MSG_RECIPIENTS_TYPE_CC, /**< The recipient type is for "Cc". */ - MSG_RECIPIENTS_TYPE_BCC, /**< The recipient type is for "Bcc". */ + MSG_RECIPIENTS_TYPE_UNKNOWN = 0, /**< The recipient type is unknown. */ + MSG_RECIPIENTS_TYPE_TO, /**< The recipient type is for "To". */ + MSG_RECIPIENTS_TYPE_CC, /**< The recipient type is for "Cc". */ + MSG_RECIPIENTS_TYPE_BCC, /**< The recipient type is for "Bcc". */ }; /** - * @brief Represents the values of a direction type. \n - * This enum is used as the value of msg_direction_type_t. + * @brief Enumeration for the values of a direction type. \n + * This enum is used as the value of msg_direction_type_t. */ enum _MSG_DIRECTION_TYPE_E { @@ -974,43 +1389,48 @@ enum _MSG_DIRECTION_TYPE_E /** - * @brief Represents the values of a string encoding type. \n - * This enum is used as the value of msg_encode_type_t. + * @brief Enumeration for the values of a string encoding type. \n + * This enum is used as the value of msg_encode_type_t. */ enum _MSG_ENCODE_TYPE_E { - MSG_ENCODE_GSM7BIT = 0, /**< The string encoding type is GSM7BIT */ - MSG_ENCODE_8BIT, /**< The string encoding type is 8 BIT */ - MSG_ENCODE_UCS2, /**< The string encoding type is UCS2 */ - MSG_ENCODE_AUTO, /**< The string encoding type is AUTO */ + MSG_ENCODE_GSM7BIT = 0, /**< The string encoding type is GSM7BIT */ + MSG_ENCODE_8BIT, /**< The string encoding type is 8 BIT */ + MSG_ENCODE_UCS2, /**< The string encoding type is UCS2 */ + MSG_ENCODE_AUTO, /**< The string encoding type is AUTO */ MSG_ENCODE_GSM7BIT_ABNORMAL, /**< The string encoding type is GSM7BIT, but abnormal character included */ +#ifdef FEATURE_SMS_CDMA + MSG_ENCODE_EUCKR, /**< For EUC-KR(Korean) */ + MSG_ENCODE_SHIFT_JIS, /**< For Shift-JIS(Japanese) */ + MSG_ENCODE_ASCII7BIT, /**< the string encoding type is ASCII 7 BIT */ +#endif }; /** - * @brief Represents the action type of Push Message. \n - * This enum is used as the value of msg_push_action_t. + * @brief Enumeration for the action type of Push Message. \n + * This enum is used as the value of msg_push_action_t. */ enum _MSG_PUSH_ACTION_E { // SI Action - MSG_PUSH_SI_ACTION_SIGNAL_NONE = 0x00, - MSG_PUSH_SI_ACTION_SIGNAL_LOW, - MSG_PUSH_SI_ACTION_SIGNAL_MEDIUM, - MSG_PUSH_SI_ACTION_SIGNAL_HIGH, - MSG_PUSH_SI_ACTION_DELETE, + MSG_PUSH_SI_ACTION_SIGNAL_NONE = 0x00, /**< No signal for push message action */ + MSG_PUSH_SI_ACTION_SIGNAL_LOW, /**< Low signal for push message action */ + MSG_PUSH_SI_ACTION_SIGNAL_MEDIUM, /**< Medium signal for push message action */ + MSG_PUSH_SI_ACTION_SIGNAL_HIGH, /**< High signal for push message action */ + MSG_PUSH_SI_ACTION_DELETE, /**< Delete push message */ // SL Action - MSG_PUSH_SL_ACTION_EXECUTE_LOW, - MSG_PUSH_SL_ACTION_EXECUTE_HIGH, - MSG_PUSH_SL_ACTION_CACHE, + MSG_PUSH_SL_ACTION_EXECUTE_LOW, /**< Action: execute-low*/ + MSG_PUSH_SL_ACTION_EXECUTE_HIGH, /**< Action: execute-high*/ + MSG_PUSH_SL_ACTION_CACHE, /**< Action: cache*/ }; /** - * @brief Represents the type of SyncML Message. \n - * This enum is used as the value of msg_syncml_message_type_t. + * @brief Enumeration for the type of SyncML Message. \n + * This enum is used as the value of msg_syncml_message_type_t. */ enum _MSG_SYNCML_MESSAGE_TYPE_E { @@ -1029,18 +1449,18 @@ enum _MSG_PUSH_ACTION_E /** - * @brief Represents the values of a Delivery Report Status. \n - * This enum is used as the value of msg_delivery_report_status_t. + * @brief Enumeration for the values of a Delivery Report Status. \n + * This enum is used as the value of msg_delivery_report_status_t. */ enum _MSG_DELIVERY_REPORT_STATUS_E { MSG_DELIVERY_REPORT_NONE = -1, /**< Indicates the status unavailable */ MSG_DELIVERY_REPORT_EXPIRED = 0, /**< Indicates the expired status of message */ - MSG_DELIVERY_REPORT_SUCCESS = 1, /**< Indicates the success status of message */ + MSG_DELIVERY_REPORT_SUCCESS = 1, /**< Indicates the success status of message */ MSG_DELIVERY_REPORT_REJECTED = 2, /**< Indicates the rejected status of message */ MSG_DELIVERY_REPORT_DEFERRED = 3, /**< Indicates the deferred status of message */ - MSG_DELIVERY_REPORT_UNRECOGNISED = 4, /**< Indicates the unrecongnised status of message */ - MSG_DELIVERY_REPORT_INDETERMINATE = 5, /**< Indicates the unrecongnised status of message */ + MSG_DELIVERY_REPORT_UNRECOGNISED = 4, /**< Indicates the unrecognized status of message */ + MSG_DELIVERY_REPORT_INDETERMINATE = 5, /**< Indicates the intermediate status of message */ MSG_DELIVERY_REPORT_FORWARDED = 6, /**< Indicates the forwarded status of message */ MSG_DELIVERY_REPORT_UNREACHABLE = 7, /**< Indicates the unreachable status of message */ MSG_DELIVERY_REPORT_ERROR = 8, /**< Indicates the error status of message */ @@ -1048,271 +1468,274 @@ enum _MSG_PUSH_ACTION_E /** - * @brief Represents the values of a Read Report Status. \n - * This enum is used as the value of msg_read_report_status_t. + * @brief Enumeration for the values of a Read Report Status. \n + * This enum is used as the value of msg_read_report_status_t. */ enum _MSG_READ_REPORT_STATUS_E { MSG_READ_REPORT_NONE = -1, /**< Indicates the status unavailable */ MSG_READ_REPORT_IS_READ = 0, /**< Indicates the message is read */ - MSG_READ_REPORT_IS_DELETED = 1 /**< Indicates the message is deleted */ + MSG_READ_REPORT_IS_DELETED = 1, /**< Indicates the message is deleted */ + MSG_READ_REPORT_REJECT_BY_USER = 2, /**< Indicates read report reject by user*/ }; /** - * @brief Represents the values of a Report Type. \n - * This enum is used as the value of msg_read_report_status_t. + * @brief Enumeration for the values of a Report Type. \n + * This enum is used as the value of msg_read_report_status_t. */ enum _MSG_REPORT_TYPE_E { - MSG_REPORT_TYPE_DELIVERY = 0, /**< Indicates the type is delivery report*/ - MSG_REPORT_TYPE_READ = 1, /**< Indicates the type is read report */ - + MSG_REPORT_TYPE_DELIVERY = 0, /**< Indicates the type is delivery report*/ + MSG_REPORT_TYPE_READ = 1, /**< Indicates the type is read report*/ + MSG_REPORT_TYPE_READ_REPORT_SENT = 2, /**< Indicates the type is read report sent*/ }; // filter /** - * @brief Represents the values of a filter type. \n - * This enum is used as the value of msg_filter_type_t. + * @brief Enumeration for the values of a filter type. \n + * This enum is used as the value of msg_filter_type_t. */ enum _MSG_FILTER_TYPE_E { - MSG_FILTER_BY_WORD = 0, /**< Filtered by sub string in the text */ - MSG_FILTER_BY_ADDRESS_SAME, /**< Filtered by address exactly same as */ - MSG_FILTER_BY_ADDRESS_START, /**< Filtered by address start with */ - MSG_FILTER_BY_ADDRESS_INCLUDE, /**< Filtered by address include */ + MSG_FILTER_BY_WORD = 0, /**< Filtered by sub string in the text */ + MSG_FILTER_BY_ADDRESS_SAME, /**< Filtered by address exactly same as */ + MSG_FILTER_BY_ADDRESS_START, /**< Filtered by address start with */ + MSG_FILTER_BY_ADDRESS_INCLUDE, /**< Filtered by address include */ + MSG_FILTER_BY_ADDRESS_END, /**< Filtered by address end with */ }; // mms /** - * @brief Represents the values of a mime type. + * @brief Enumeration for the values of a MIME type. */ typedef enum _MimeType { // 0 - MIME_ASTERISK = 0x0000, /**< Indicates the valid default mime type */ + MIME_ASTERISK = 0x0000, /**< Indicates the valid default MIME type */ // 1 - MIME_APPLICATION_XML = 0x1000, /**< Indicates the application xml type */ - MIME_APPLICATION_WML_XML = 0x1001, /**< Indicates the application wml xml type */ - MIME_APPLICATION_XHTML_XML = 0x1002, /**< Indicates the application xhtml xml type */ - MIME_APPLICATION_JAVA_VM = 0x1003, /**< Indicates the application java vm type */ - MIME_APPLICATION_SMIL = 0x1004, /**< Indicates the application smil type */ - MIME_APPLICATION_JAVA_ARCHIVE = 0x1005, /**< Indicates the application java archive type */ - MIME_APPLICATION_JAVA = 0x1006, /**< Indicates the application java type */ - MIME_APPLICATION_OCTET_STREAM = 0x1007, /**< Indicates the application octect stream type */ - MIME_APPLICATION_STUDIOM = 0x1008, /**< Indicates the application studiom type */ - MIME_APPLICATION_FUNMEDIA = 0x1009, /**< Indicates the application fun media type */ - MIME_APPLICATION_MSWORD = 0x100a, /**< Indicates the application ms word type */ - MIME_APPLICATION_PDF = 0x100b, /**< Indicates the application pdf type */ - MIME_APPLICATION_SDP = 0x100c, /**< Indicates the application sdp type */ - MIME_APPLICATION_RAM = 0x100d, /**< Indicates the application ram type */ - MIME_APPLICATION_ASTERIC = 0x100e, /**< Indicates the application as main type and generic sub type */ + MIME_APPLICATION_XML = 0x1000, /**< Indicates the application XML type */ + MIME_APPLICATION_WML_XML = 0x1001, /**< Indicates the application WML XML type */ + MIME_APPLICATION_XHTML_XML = 0x1002, /**< Indicates the application XHTML XML type */ + MIME_APPLICATION_JAVA_VM = 0x1003, /**< Indicates the application Java VM type */ + MIME_APPLICATION_SMIL = 0x1004, /**< Indicates the application SMIL type */ + MIME_APPLICATION_JAVA_ARCHIVE = 0x1005, /**< Indicates the application Java archive type */ + MIME_APPLICATION_JAVA = 0x1006, /**< Indicates the application Java type */ + MIME_APPLICATION_OCTET_STREAM = 0x1007, /**< Indicates the application octect stream type */ + MIME_APPLICATION_STUDIOM = 0x1008, /**< Indicates the application studiom type */ + MIME_APPLICATION_FUNMEDIA = 0x1009, /**< Indicates the application fun media type */ + MIME_APPLICATION_MSWORD = 0x100a, /**< Indicates the application MS Word type */ + MIME_APPLICATION_PDF = 0x100b, /**< Indicates the application PDF type */ + MIME_APPLICATION_SDP = 0x100c, /**< Indicates the application SDP type */ + MIME_APPLICATION_RAM = 0x100d, /**< Indicates the application RAM type */ + MIME_APPLICATION_ASTERIC = 0x100e, /**< Indicates the application as main type and generic sub type */ // 16 - MIME_APPLICATION_VND_WAP_XHTMLXML = 0x1100, /**< Indicates the application wap xhtml xml type */ - MIME_APPLICATION_VND_WAP_WMLC = 0x1101, /**< Indicates the application wap wmlc type */ - MIME_APPLICATION_VND_WAP_WMLSCRIPTC = 0x1102, /**< Indicates the application wap wmlscrpitc type */ - MIME_APPLICATION_VND_WAP_WTA_EVENTC = 0x1103, /**< Indicates the application wap wta event type */ - MIME_APPLICATION_VND_WAP_UAPROF = 0x1104, /**< Indicates the application wap uaprof type */ - MIME_APPLICATION_VND_WAP_SIC = 0x1105, /**< Indicates the application wap sic type */ - MIME_APPLICATION_VND_WAP_SLC = 0x1106, /**< Indicates the application wap slc type */ - MIME_APPLICATION_VND_WAP_COC = 0x1107, /**< Indicates the application wap coc type */ - MIME_APPLICATION_VND_WAP_SIA = 0x1108, /**< Indicates the application wap sia type */ - MIME_APPLICATION_VND_WAP_CONNECTIVITY_WBXML = 0x1109, /**< Indicates the application wap connectivity wbxml type */ - MIME_APPLICATION_VND_WAP_MULTIPART_FORM_DATA = 0x110a, /**< Indicates the application wap multipart data type */ - MIME_APPLICATION_VND_WAP_MULTIPART_BYTERANGES = 0x110b, /**< Indicates the application wap multipart byte type */ - MIME_APPLICATION_VND_WAP_MULTIPART_MIXED = 0x110c, /**< Indicates the application wap multipart mixed type */ - MIME_APPLICATION_VND_WAP_MULTIPART_RELATED = 0x110d, /**< Indicates the application wap multipart related type */ - MIME_APPLICATION_VND_WAP_MULTIPART_ALTERNATIVE = 0x110e, /**< Indicates the application wap multipart alternative type */ - MIME_APPLICATION_VND_WAP_MULTIPART_ASTERIC = 0x110f, /**< Indicates the application wap mulitpart as main type and generic sub type */ - MIME_APPLICATION_VND_WAP_WBXML = 0x1110, /**< Indicates the application wap wbxml type */ - MIME_APPLICATION_VND_OMA_DD_XML = 0x1111, /**< Indicates the application oma dd xml type */ - MIME_APPLICATION_VND_OMA_DRM_MESSAGE = 0x1112, /**< Indicates the application oma drm message type */ - MIME_APPLICATION_VND_OMA_DRM_CONTENT = 0x1113, /**< Indicates the application oma drm content type */ - MIME_APPLICATION_VND_OMA_DRM_RIGHTS_XML = 0x1114, /**< Indicates the application oma drm rights xml type */ - MIME_APPLICATION_VND_OMA_DRM_RIGHTS_WBXML = 0x1115, /**< Indicates the application oma drm rights wbxml type */ - MIME_APPLICATION_VND_OMA_DRM_RO_XML = 0x1116, /**< Indicates the application oma drm ro xml type */ - MIME_APPLICATION_VND_OMA_DRM_DCF = 0x1117, /**< Indicates the application oma drm dcf type */ - MIME_APPLICATION_VND_OMA_ROAPPDU_XML = 0x1118, /**< Indicates the application oma roap pdu xml type */ - MIME_APPLICATION_VND_OMA_ROAPTRIGGER_XML = 0x1119, /**< Indicates the application oma roap trigger xml type */ - MIME_APPLICATION_VND_SMAF = 0x111a, /**< Indicates the application smaf type */ - MIME_APPLICATION_VND_RN_REALMEDIA = 0x111b, /**< Indicates the application rn real media type */ - MIME_APPLICATION_VND_SUN_J2ME_JAVA_ARCHIVE = 0x111c, /**< Indicates the application j2me java archive type */ - MIME_APPLICATION_VND_SAMSUNG_THEME = 0x111d, /**< Indicates the application samsung theme type */ - MIME_APPLICATION_VND_EXCEL = 0x111e, /**< Indicates the application excel type */ - MIME_APPLICATION_VND_POWERPOINT = 0x111f, /**< Indicates the application power point type */ - MIME_APPLICATION_VND_MSWORD = 0x1120, /**< Indicates the application ms word type */ + MIME_APPLICATION_VND_WAP_XHTMLXML = 0x1100, /**< Indicates the application wap xhtml xml type */ + MIME_APPLICATION_VND_WAP_WMLC = 0x1101, /**< Indicates the application wap wmlc type */ + MIME_APPLICATION_VND_WAP_WMLSCRIPTC = 0x1102, /**< Indicates the application wap wmlscrpitc type */ + MIME_APPLICATION_VND_WAP_WTA_EVENTC = 0x1103, /**< Indicates the application wap wta event type */ + MIME_APPLICATION_VND_WAP_UAPROF = 0x1104, /**< Indicates the application wap uaprof type */ + MIME_APPLICATION_VND_WAP_SIC = 0x1105, /**< Indicates the application wap sic type */ + MIME_APPLICATION_VND_WAP_SLC = 0x1106, /**< Indicates the application wap slc type */ + MIME_APPLICATION_VND_WAP_COC = 0x1107, /**< Indicates the application wap coc type */ + MIME_APPLICATION_VND_WAP_SIA = 0x1108, /**< Indicates the application wap sia type */ + MIME_APPLICATION_VND_WAP_CONNECTIVITY_WBXML = 0x1109, /**< Indicates the application wap connectivity wbxml type */ + MIME_APPLICATION_VND_WAP_MULTIPART_FORM_DATA = 0x110a, /**< Indicates the application wap multipart data type */ + MIME_APPLICATION_VND_WAP_MULTIPART_BYTERANGES = 0x110b, /**< Indicates the application wap multipart byte type */ + MIME_APPLICATION_VND_WAP_MULTIPART_MIXED = 0x110c, /**< Indicates the application wap multipart mixed type */ + MIME_APPLICATION_VND_WAP_MULTIPART_RELATED = 0x110d, /**< Indicates the application wap multipart related type */ + MIME_APPLICATION_VND_WAP_MULTIPART_ALTERNATIVE = 0x110e, /**< Indicates the application wap multipart alternative type */ + MIME_APPLICATION_VND_WAP_MULTIPART_ASTERIC = 0x110f, /**< Indicates the application wap mulitpart as main type and generic sub type */ + MIME_APPLICATION_VND_WAP_WBXML = 0x1110, /**< Indicates the application wap wbxml type */ + MIME_APPLICATION_VND_OMA_DD_XML = 0x1111, /**< Indicates the application oma dd xml type */ + MIME_APPLICATION_VND_OMA_DRM_MESSAGE = 0x1112, /**< Indicates the application oma drm message type */ + MIME_APPLICATION_VND_OMA_DRM_CONTENT = 0x1113, /**< Indicates the application oma drm content type */ + MIME_APPLICATION_VND_OMA_DRM_RIGHTS_XML = 0x1114, /**< Indicates the application oma drm rights xml type */ + MIME_APPLICATION_VND_OMA_DRM_RIGHTS_WBXML = 0x1115, /**< Indicates the application oma drm rights wbxml type */ + MIME_APPLICATION_VND_OMA_DRM_RO_XML = 0x1116, /**< Indicates the application oma drm ro xml type */ + MIME_APPLICATION_VND_OMA_DRM_DCF = 0x1117, /**< Indicates the application oma drm dcf type */ + MIME_APPLICATION_VND_OMA_ROAPPDU_XML = 0x1118, /**< Indicates the application oma roap pdu xml type */ + MIME_APPLICATION_VND_OMA_ROAPTRIGGER_XML = 0x1119, /**< Indicates the application oma roap trigger xml type */ + MIME_APPLICATION_VND_SMAF = 0x111a, /**< Indicates the application smaf type */ + MIME_APPLICATION_VND_RN_REALMEDIA = 0x111b, /**< Indicates the application rn real media type */ + MIME_APPLICATION_VND_SUN_J2ME_JAVA_ARCHIVE = 0x111c, /**< Indicates the application J2ME Java archive type */ + MIME_APPLICATION_VND_SAMSUNG_THEME = 0x111d, /**< Indicates the application Samsung theme type */ + MIME_APPLICATION_VND_EXCEL = 0x111e, /**< Indicates the application Excel type */ + MIME_APPLICATION_VND_POWERPOINT = 0x111f, /**< Indicates the application Power point type */ + MIME_APPLICATION_VND_MSWORD = 0x1120, /**< Indicates the application MS Word type */ // 49 - MIME_APPLICATION_X_HDMLC = 0x1200, /**< Indicates the application x hdmlc type */ - MIME_APPLICATION_X_X968_USERCERT = 0x1201, /**< Indicates the application x x968 user certified type */ - MIME_APPLICATION_X_WWW_FORM_URLENCODED = 0x1202, /**< Indicates the application x www form url encoded type */ - MIME_APPLICATION_X_SMAF = 0x1203, /**< Indicates the application x smaf type */ - MIME_APPLICATION_X_FLASH = 0x1204, /**< Indicates the application x flash type */ - MIME_APPLICATION_X_EXCEL = 0x1205, /**< Indicates the application x excel type */ - MIME_APPLICATION_X_POWERPOINT = 0x1206, /**< Indicates the application x power point type */ + MIME_APPLICATION_X_HDMLC = 0x1200, /**< Indicates the application x hdmlc type */ + MIME_APPLICATION_X_X968_USERCERT = 0x1201, /**< Indicates the application x x968 user certified type */ + MIME_APPLICATION_X_WWW_FORM_URLENCODED = 0x1202, /**< Indicates the application x www form url encoded type */ + MIME_APPLICATION_X_SMAF = 0x1203, /**< Indicates the application x smaf type */ + MIME_APPLICATION_X_FLASH = 0x1204, /**< Indicates the application x flash type */ + MIME_APPLICATION_X_EXCEL = 0x1205, /**< Indicates the application x excel type */ + MIME_APPLICATION_X_POWERPOINT = 0x1206, /**< Indicates the application x power point type */ // 56 - MIME_AUDIO_BASIC = 0x2000, /**< Indicates the audio basic type */ - MIME_AUDIO_MPEG = 0x2001, /**< Indicates the audio mpeg type */ - MIME_AUDIO_MP3 = 0x2002, /**< Indicates the audio mp3 type */ - MIME_AUDIO_MPG3 = 0x2003, /**< Indicates the audio mpg3 type */ - MIME_AUDIO_MPEG3 = 0x2004, /**< Indicates the audio mpeg3 type */ - MIME_AUDIO_MPG = 0x2005, /**< Indicates the audio mpg type */ - MIME_AUDIO_AAC = 0x2006, /**< Indicates the audio aac type */ - MIME_AUDIO_G72 = 0x2007, /**< Indicates the audio g72 type */ - MIME_AUDIO_AMR = 0x2008, /**< Indicates the audio amr type */ - MIME_AUDIO_AMR_WB = 0x2009, /**< Indicates the audio amr wb type */ - MIME_AUDIO_MMF = 0x200a, /**< Indicates the audio mmf type */ - MIME_AUDIO_SMAF = 0x200b, /**< Indicates the audio smaf type */ - MIME_AUDIO_IMELODY = 0x200c, /**< Indicates the audio imelody type */ - MIME_AUDIO_IMELODY2 = 0x200d, /**< Indicates the audio imelody2 type */ - MIME_AUDIO_MELODY = 0x200e, /**< Indicates the audio melody type */ - MIME_AUDIO_MID = 0x200f, /**< Indicates the audio mid type */ - MIME_AUDIO_MIDI = 0x2010, /**< Indicates the audio midi type */ - MIME_AUDIO_SP_MIDI = 0x2011, /**< Indicates the audio sp midi type */ - MIME_AUDIO_WAVE = 0x2012, /**< Indicates the audio wave type */ - MIME_AUDIO_WAV = 0x2013, /**< Indicates the audio wav type */ - MIME_AUDIO_3GPP = 0x2014, /**< Indicates the audio 3gpp type */ - MIME_AUDIO_MP4 = 0x2015, /**< Indicates the audio mp4 type */ - MIME_AUDIO_MP4A_LATM = 0x2016, /**< Indicates the audio mp4 latm type */ - MIME_AUDIO_M4A = 0x2017, /**< Indicates the audio m4a type */ - MIME_AUDIO_MPEG4 = 0x2018, /**< Indicates the audio mpeg4 type */ - MIME_AUDIO_WMA = 0x2019, /**< Indicates the audio wma type */ - MIME_AUDIO_XMF = 0x201a, /**< Indicates the audio xmf type */ - MIME_AUDIO_IMY = 0x201b, /**< Indicates the audio imy type */ - MIME_AUDIO_MOBILE_XMF = 0x201c, /**< Indicates the audio mobile xmf type */ + MIME_AUDIO_BASIC = 0x2000, /**< Indicates the audio basic type */ + MIME_AUDIO_MPEG = 0x2001, /**< Indicates the audio mpeg type */ + MIME_AUDIO_MP3 = 0x2002, /**< Indicates the audio mp3 type */ + MIME_AUDIO_MPG3 = 0x2003, /**< Indicates the audio mpg3 type */ + MIME_AUDIO_MPEG3 = 0x2004, /**< Indicates the audio mpeg3 type */ + MIME_AUDIO_MPG = 0x2005, /**< Indicates the audio mpg type */ + MIME_AUDIO_AAC = 0x2006, /**< Indicates the audio aac type */ + MIME_AUDIO_G72 = 0x2007, /**< Indicates the audio g72 type */ + MIME_AUDIO_AMR = 0x2008, /**< Indicates the audio amr type */ + MIME_AUDIO_AMR_WB = 0x2009, /**< Indicates the audio amr wb type */ + MIME_AUDIO_MMF = 0x200a, /**< Indicates the audio mmf type */ + MIME_AUDIO_SMAF = 0x200b, /**< Indicates the audio smaf type */ + MIME_AUDIO_IMELODY = 0x200c, /**< Indicates the audio imelody type */ + MIME_AUDIO_IMELODY2 = 0x200d, /**< Indicates the audio imelody2 type */ + MIME_AUDIO_MELODY = 0x200e, /**< Indicates the audio melody type */ + MIME_AUDIO_MID = 0x200f, /**< Indicates the audio mid type */ + MIME_AUDIO_MIDI = 0x2010, /**< Indicates the audio midi type */ + MIME_AUDIO_SP_MIDI = 0x2011, /**< Indicates the audio sp midi type */ + MIME_AUDIO_WAVE = 0x2012, /**< Indicates the audio wave type */ + MIME_AUDIO_WAV = 0x2013, /**< Indicates the audio wav type */ + MIME_AUDIO_3GPP = 0x2014, /**< Indicates the audio 3gpp type */ + MIME_AUDIO_MP4 = 0x2015, /**< Indicates the audio mp4 type */ + MIME_AUDIO_MP4A_LATM = 0x2016, /**< Indicates the audio mp4 latm type */ + MIME_AUDIO_M4A = 0x2017, /**< Indicates the audio m4a type */ + MIME_AUDIO_MPEG4 = 0x2018, /**< Indicates the audio mpeg4 type */ + MIME_AUDIO_WMA = 0x2019, /**< Indicates the audio wma type */ + MIME_AUDIO_XMF = 0x201a, /**< Indicates the audio xmf type */ + MIME_AUDIO_IMY = 0x201b, /**< Indicates the audio imy type */ + MIME_AUDIO_MOBILE_XMF = 0x201c, /**< Indicates the audio mobile xmf type */ //85 - MIME_AUDIO_VND_RN_REALAUDIO = 0x2100, /**< Indicates the audio rn real audio type */ + MIME_AUDIO_VND_RN_REALAUDIO = 0x2100, /**< Indicates the audio rn real audio type */ // 86 - MIME_AUDIO_X_MPEG = 0x2200, /**< Indicates the audio x mpeg type */ - MIME_AUDIO_X_MP3 = 0x2201, /**< Indicates the audio x mp3 type */ - MIME_AUDIO_X_MPEG3 = 0x2202, /**< Indicates the audio x mpeg3 type */ - MIME_AUDIO_X_MPG = 0x2203, /**< Indicates the audio x mpg type */ - MIME_AUDIO_X_AMR = 0x2204, /**< Indicates the audio x amr type */ - MIME_AUDIO_X_MMF = 0x2205, /**< Indicates the audio x mmf type */ - MIME_AUDIO_X_SMAF = 0x2206, /**< Indicates the audio x smaf type */ - MIME_AUDIO_X_IMELODY = 0x2207, /**< Indicates the audio x imelody type */ - MIME_AUDIO_X_MIDI = 0x2208, /**< Indicates the audio x midi type */ - MIME_AUDIO_X_MPEGAUDIO = 0x2209, /**< Indicates the audio x mpeg type */ - MIME_AUDIO_X_PN_REALAUDIO = 0x220a, /**< Indicates the audio x pn real audio type */ - MIME_AUDIO_X_PN_MULTIRATE_REALAUDIO = 0x220b, /**< Indicates the audio x pn multirate real audio type */ - MIME_AUDIO_X_PN_MULTIRATE_REALAUDIO_LIVE = 0x220c, /**< Indicates the audio x pn multirate real audio live type */ - MIME_AUDIO_X_WAVE = 0x220d, /**< Indicates the audio x wave type */ - MIME_AUDIO_X_WAV = 0x220e, /**< Indicates the audio x wav type */ - MIME_AUDIO_X_MS_WMA = 0x220f, /**< Indicates the audio ms wma type */ - MIME_AUDIO_X_MID = 0x2210, /**< Indicates the audio mid type */ - MIME_AUDIO_X_MS_ASF = 0x2211, /**< Indicates the audio ms asf type */ - MIME_AUDIO_X_XMF = 0x2212, /**< Indicates the audio x xmf type */ + MIME_AUDIO_X_MPEG = 0x2200, /**< Indicates the audio x mpeg type */ + MIME_AUDIO_X_MP3 = 0x2201, /**< Indicates the audio x mp3 type */ + MIME_AUDIO_X_MPEG3 = 0x2202, /**< Indicates the audio x mpeg3 type */ + MIME_AUDIO_X_MPG = 0x2203, /**< Indicates the audio x mpg type */ + MIME_AUDIO_X_AMR = 0x2204, /**< Indicates the audio x amr type */ + MIME_AUDIO_X_MMF = 0x2205, /**< Indicates the audio x mmf type */ + MIME_AUDIO_X_SMAF = 0x2206, /**< Indicates the audio x smaf type */ + MIME_AUDIO_X_IMELODY = 0x2207, /**< Indicates the audio x imelody type */ + MIME_AUDIO_X_MIDI = 0x2208, /**< Indicates the audio x midi type */ + MIME_AUDIO_X_MPEGAUDIO = 0x2209, /**< Indicates the audio x mpeg type */ + MIME_AUDIO_X_PN_REALAUDIO = 0x220a, /**< Indicates the audio x pn real audio type */ + MIME_AUDIO_X_PN_MULTIRATE_REALAUDIO = 0x220b, /**< Indicates the audio x pn multirate real audio type */ + MIME_AUDIO_X_PN_MULTIRATE_REALAUDIO_LIVE = 0x220c, /**< Indicates the audio x pn multirate real audio live type */ + MIME_AUDIO_X_WAVE = 0x220d, /**< Indicates the audio x wave type */ + MIME_AUDIO_X_WAV = 0x220e, /**< Indicates the audio x wav type */ + MIME_AUDIO_X_MS_WMA = 0x220f, /**< Indicates the audio ms wma type */ + MIME_AUDIO_X_MID = 0x2210, /**< Indicates the audio mid type */ + MIME_AUDIO_X_MS_ASF = 0x2211, /**< Indicates the audio ms asf type */ + MIME_AUDIO_X_XMF = 0x2212, /**< Indicates the audio x xmf type */ // 105 - MIME_IMAGE_GIF = 0x3000, /**< Indicates the image gif type */ - MIME_IMAGE_JPEG = 0x3001, /**< Indicates the image jpeg type */ - MIME_IMAGE_JPG = 0x3002, /**< Indicates the image jpg type */ - MIME_IMAGE_TIFF = 0x3003, /**< Indicates the image tiff type */ - MIME_IMAGE_TIF = 0x3004, /**< Indicates the image tif type */ - MIME_IMAGE_PNG = 0x3005, /**< Indicates the image png type */ - MIME_IMAGE_WBMP = 0x3006, /**< Indicates the image wbmp type */ - MIME_IMAGE_PJPEG = 0x3007, /**< Indicates the image pjpeg type */ - MIME_IMAGE_BMP = 0x3008, /**< Indicates the image bmp type */ - MIME_IMAGE_SVG = 0x3009, /**< Indicates the image svg type */ - MIME_IMAGE_SVG1 = 0x300a, /**< Indicates the image svg1 type */ + MIME_IMAGE_GIF = 0x3000, /**< Indicates the image gif type */ + MIME_IMAGE_JPEG = 0x3001, /**< Indicates the image jpeg type */ + MIME_IMAGE_JPG = 0x3002, /**< Indicates the image jpg type */ + MIME_IMAGE_TIFF = 0x3003, /**< Indicates the image tiff type */ + MIME_IMAGE_TIF = 0x3004, /**< Indicates the image tif type */ + MIME_IMAGE_PNG = 0x3005, /**< Indicates the image png type */ + MIME_IMAGE_WBMP = 0x3006, /**< Indicates the image wbmp type */ + MIME_IMAGE_PJPEG = 0x3007, /**< Indicates the image pjpeg type */ + MIME_IMAGE_BMP = 0x3008, /**< Indicates the image bmp type */ + MIME_IMAGE_SVG = 0x3009, /**< Indicates the image svg type */ + MIME_IMAGE_SVG1 = 0x300a, /**< Indicates the image svg1 type */ // 116 - MIME_IMAGE_VND_WAP_WBMP = 0x3100, /**< Indicates the image vnd wap wbmp type */ - MIME_IMAGE_VND_TMO_GIF = 0x3101, /**< Indicates the image vnd tmo gif type */ - MIME_IMAGE_VND_TMO_JPG = 0x3102, /**< Indicates the image vnd tmo jpg type */ + MIME_IMAGE_VND_WAP_WBMP = 0x3100, /**< Indicates the image vnd wap wbmp type */ + MIME_IMAGE_VND_TMO_GIF = 0x3101, /**< Indicates the image vnd tmo gif type */ + MIME_IMAGE_VND_TMO_JPG = 0x3102, /**< Indicates the image vnd tmo jpg type */ // 119 - MIME_IMAGE_X_BMP = 0x3200, /**< Indicates the image x bmp type */ + MIME_IMAGE_X_BMP = 0x3200, /**< Indicates the image x bmp type */ // 120 - MIME_MESSAGE_RFC822 = 0x4000, /**< Indicates the message rfc822 type */ + MIME_MESSAGE_RFC822 = 0x4000, /**< Indicates the message rfc822 type */ // 121 - MIME_MULTIPART_MIXED = 0x5000, /**< Indicates the multipart mixed type */ - MIME_MULTIPART_RELATED = 0x5001, /**< Indicates the multipart related type */ - MIME_MULTIPART_ALTERNATIVE = 0x5002, /**< Indicates the multipart alternative type */ - MIME_MULTIPART_FORM_DATA = 0x5003, /**< Indicates the multipart form data type */ - MIME_MULTIPART_BYTERANGE = 0x5004, /**< Indicates the multipart byte range type */ - MIME_MULTIPART_REPORT = 0x5005, /**< Indicates the multipart report type */ - MIME_MULTIPART_VOICE_MESSAGE = 0x5006, /**< Indicates the multipart voice message type */ + MIME_MULTIPART_MIXED = 0x5000, /**< Indicates the multipart mixed type */ + MIME_MULTIPART_RELATED = 0x5001, /**< Indicates the multipart related type */ + MIME_MULTIPART_ALTERNATIVE = 0x5002, /**< Indicates the multipart alternative type */ + MIME_MULTIPART_FORM_DATA = 0x5003, /**< Indicates the multipart form data type */ + MIME_MULTIPART_BYTERANGE = 0x5004, /**< Indicates the multipart byte range type */ + MIME_MULTIPART_REPORT = 0x5005, /**< Indicates the multipart report type */ + MIME_MULTIPART_VOICE_MESSAGE = 0x5006, /**< Indicates the multipart voice message type */ // 128 - MIME_TEXT_TXT = 0x6000, /**< Indicates the text txt type */ - MIME_TEXT_HTML = 0x6001, /**< Indicates the text html type */ - MIME_TEXT_PLAIN = 0x6002, /**< Indicates the text plain type */ - MIME_TEXT_CSS = 0x6003, /**< Indicates the text css type */ - MIME_TEXT_XML = 0x6004, /**< Indicates the text xml type */ - MIME_TEXT_IMELODY = 0x6005, /**< Indicates the text imelody type */ + MIME_TEXT_TXT = 0x6000, /**< Indicates the text txt type */ + MIME_TEXT_HTML = 0x6001, /**< Indicates the text html type */ + MIME_TEXT_PLAIN = 0x6002, /**< Indicates the text plain type */ + MIME_TEXT_CSS = 0x6003, /**< Indicates the text css type */ + MIME_TEXT_XML = 0x6004, /**< Indicates the text xml type */ + MIME_TEXT_IMELODY = 0x6005, /**< Indicates the text imelody type */ + MIME_TEXT_CALENDAR = 0x6006, /**< Indicates the text calendar type */ // 134 - MIME_TEXT_VND_WAP_WMLSCRIPT = 0x6100, /**< Indicates the text wap wmlscript type */ - MIME_TEXT_VND_WAP_WML = 0x6101, /**< Indicates the text wap wml type */ - MIME_TEXT_VND_WAP_WTA_EVENT = 0x6102, /**< Indicates the text wap wta event type */ - MIME_TEXT_VND_WAP_CONNECTIVITY_XML = 0x6103, /**< Indicates the text wap connectivity xml type */ - MIME_TEXT_VND_WAP_SI = 0x6104, /**< Indicates the text wap si type */ - MIME_TEXT_VND_WAP_SL = 0x6105, /**< Indicates the text wap sl type */ - MIME_TEXT_VND_WAP_CO = 0x6106, /**< Indicates the text wap co type */ - MIME_TEXT_VND_SUN_J2ME_APP_DESCRIPTOR = 0x6107, /**< Indicates the text sun j2me type */ + MIME_TEXT_VND_WAP_WMLSCRIPT = 0x6100, /**< Indicates the text wap wmlscript type */ + MIME_TEXT_VND_WAP_WML = 0x6101, /**< Indicates the text wap wml type */ + MIME_TEXT_VND_WAP_WTA_EVENT = 0x6102, /**< Indicates the text wap wta event type */ + MIME_TEXT_VND_WAP_CONNECTIVITY_XML = 0x6103, /**< Indicates the text wap connectivity xml type */ + MIME_TEXT_VND_WAP_SI = 0x6104, /**< Indicates the text wap si type */ + MIME_TEXT_VND_WAP_SL = 0x6105, /**< Indicates the text wap sl type */ + MIME_TEXT_VND_WAP_CO = 0x6106, /**< Indicates the text wap co type */ + MIME_TEXT_VND_SUN_J2ME_APP_DESCRIPTOR = 0x6107, /**< Indicates the text sun j2me type */ // 142 - MIME_TEXT_X_HDML = 0x6200, /**< Indicates the x html type */ - MIME_TEXT_X_VCALENDAR = 0x6201, /**< Indicates the x calendar type */ - MIME_TEXT_X_VCARD = 0x6202, /**< Indicates the x vcard type */ - MIME_TEXT_X_IMELODY = 0x6203, /**< Indicates the x imelody type */ - MIME_TEXT_X_IMELODY2 = 0x6204, /**< Indicates the x imelody2 type */ - MIME_TEXT_X_VNOTE = 0x6205, /**< Indicates the x vnote type */ - - // 148 - MIME_VIDEO_MPEG4 = 0x7000, /**< Indicates the mpeg4 type */ - MIME_VIDEO_MP4 = 0x7001, /**< Indicates the mp4 type */ - MIME_VIDEO_H263 = 0x7002, /**< Indicates the h263 type */ - MIME_VIDEO_3GPP = 0x7003, /**< Indicates the 3gpp type */ - MIME_VIDEO_3GP = 0x7004, /**< Indicates the 3gp type */ - MIME_VIDEO_AVI = 0x7005, /**< Indicates the avi type */ - MIME_VIDEO_SDP = 0x7006, /**< Indicates the sdp type */ - MIME_VIDEO_MP4_ES = 0x7007, /**< Indicates the mp4 es type */ - MIME_VIDEO_MPEG = 0x7008, /**< Indicates the mpeg type */ - - // 157 - MIME_VIDEO_VND_RN_REALVIDEO = 0x7100, /**< Indicates the pn real video type */ - MIME_VIDEO_VND_RN_REALMEDIA = 0x7101, /**< Indicates the pn multi rate real media type */ - - // 159 - MIME_VIDEO_X_MP4 = 0x7200, /**< Indicates the video x mp4 type */ - MIME_VIDEO_X_PV_MP4 = 0x7201, /**< Indicates the video x pv mp4 type */ - MIME_VIDEO_X_PN_REALVIDEO = 0x7202, /**< Indicates the x pn real video type */ - MIME_VIDEO_X_PN_MULTIRATE_REALVIDEO = 0x7203, /**< Indicates the x pn multi rate real video type */ - MIME_VIDEO_X_MS_WMV = 0x7204, /**< Indicates the x ms wmv type */ - MIME_VIDEO_X_MS_ASF = 0x7205, /**< Indicates the x ms asf type */ - MIME_VIDEO_X_PV_PVX = 0x7206, /**< Indicates the x pv pvx type */ - - MIME_TYPE_VALUE_MAX = 0x7207, /**< Indicates the maximum mime type */ - MIME_UNKNOWN = 0xffff /**< Indicates the unknown mime type */ + MIME_TEXT_X_HDML = 0x6200, /**< Indicates the x html type */ + MIME_TEXT_X_VCALENDAR = 0x6201, /**< Indicates the x calendar type */ + MIME_TEXT_X_VCARD = 0x6202, /**< Indicates the x vcard type */ + MIME_TEXT_X_IMELODY = 0x6203, /**< Indicates the x imelody type */ + MIME_TEXT_X_IMELODY2 = 0x6204, /**< Indicates the x imelody2 type */ + MIME_TEXT_X_VNOTE = 0x6205, /**< Indicates the x vnote type */ + MIME_TEXT_X_VTODO = 0x6206, /**< Indicates the x todo type */ + + // 149 + MIME_VIDEO_MPEG4 = 0x7000, /**< Indicates the mpeg4 type */ + MIME_VIDEO_MP4 = 0x7001, /**< Indicates the mp4 type */ + MIME_VIDEO_H263 = 0x7002, /**< Indicates the h263 type */ + MIME_VIDEO_3GPP = 0x7003, /**< Indicates the 3gpp type */ + MIME_VIDEO_3GP = 0x7004, /**< Indicates the 3gp type */ + MIME_VIDEO_AVI = 0x7005, /**< Indicates the avi type */ + MIME_VIDEO_SDP = 0x7006, /**< Indicates the sdp type */ + MIME_VIDEO_MP4_ES = 0x7007, /**< Indicates the mp4 es type */ + MIME_VIDEO_MPEG = 0x7008, /**< Indicates the mpeg type */ + MIME_VIDEO_MOV = 0x7009, /**< Indicates the mov type */ + + // 158 + MIME_VIDEO_VND_RN_REALVIDEO = 0x7100, /**< Indicates the pn real video type */ + MIME_VIDEO_VND_RN_REALMEDIA = 0x7101, /**< Indicates the pn multi rate real media type */ + + // 160 + MIME_VIDEO_X_MP4 = 0x7200, /**< Indicates the video x mp4 type */ + MIME_VIDEO_X_PV_MP4 = 0x7201, /**< Indicates the video x pv mp4 type */ + MIME_VIDEO_X_PN_REALVIDEO = 0x7202, /**< Indicates the x pn real video type */ + MIME_VIDEO_X_PN_MULTIRATE_REALVIDEO = 0x7203, /**< Indicates the x pn multi rate real video type */ + MIME_VIDEO_X_MS_WMV = 0x7204, /**< Indicates the x ms wmv type */ + MIME_VIDEO_X_MS_ASF = 0x7205, /**< Indicates the x ms asf type */ + MIME_VIDEO_X_PV_PVX = 0x7206, /**< Indicates the x pv pvx type */ + + MIME_TYPE_VALUE_MAX = 0x7207, /**< Indicates the maximum MIME type */ + MIME_UNKNOWN = 0xffff /**< Indicates the unknown MIME type */ } MimeType; /** - * @brief Represents the values of a DRM type. + * @brief Enumeration for the values of a DRM type. */ -//#ifdef __SUPPORT_DRM__ typedef enum { - MSG_DRM_TYPE_NONE = 0, /**< Indicates the drm type none */ + MSG_DRM_TYPE_NONE = 0, /**< Indicates the DRM type none */ MSG_DRM_TYPE_FL = 1, /**< Indicates the forward lock */ /* 2004-07-09: forwardLock type */ MSG_DRM_TYPE_CD = 2, /**< Indicates the combined delivery */ /* 2004-07-09: combined delivery type */ MSG_DRM_TYPE_SD = 3, /**< Indicates the separate delivery */ /* 2004-07-09: seperate delivery type */ - MSG_DRM_TYPE_SSD = 4 /**< Indicates the special separate delivery */ // 2005-02-28: add Special Sperate Delivery + MSG_DRM_TYPE_SSD = 4 /**< Indicates the special separate delivery */ // 2005-02-28: add Special Sperate Delivery }MsgDrmType; -//#endif /** - * @brief Represents the values of a SMIL region type. + * @brief Enumeration for the values of a SMIL region type. */ typedef enum _REGION_FIT_TYPE_T { @@ -1322,344 +1745,412 @@ typedef enum _REGION_FIT_TYPE_T /** - * @brief Represents the values of a SMIL media type. + * @brief Enumeration for the values of a SMIL media type. */ typedef enum { - MMS_SMIL_MEDIA_INVALID = 0, /**< Indicates the invalid media type */ - MMS_SMIL_MEDIA_IMG, /**< Indicates the image media */ - MMS_SMIL_MEDIA_AUDIO, /**< Indicates the audio media */ - MMS_SMIL_MEDIA_VIDEO, /**< Indicates the video media */ - MMS_SMIL_MEDIA_TEXT, /**< Indicates the text media */ - MMS_SMIL_MEDIA_ANIMATE, /**< Indicates the animation media */ - MMS_SMIL_MEDIA_IMG_OR_VIDEO , /**< Indicates the image or video media */ - MMS_SMIL_MEDIA_MAX = 0xffffffff, /**< Indicates the maximum media type */ + MMS_SMIL_MEDIA_INVALID = 0, /**< Indicates the invalid media type */ + MMS_SMIL_MEDIA_IMG, /**< Indicates the image media */ + MMS_SMIL_MEDIA_AUDIO, /**< Indicates the audio media */ + MMS_SMIL_MEDIA_VIDEO, /**< Indicates the video media */ + MMS_SMIL_MEDIA_TEXT, /**< Indicates the text media */ + MMS_SMIL_MEDIA_ANIMATE, /**< Indicates the animation media */ + MMS_SMIL_MEDIA_IMG_OR_VIDEO , /**< Indicates the image or video media */ + MMS_SMIL_MEDIA_MAX = 0xffffffff, /**< Indicates the maximum media type */ }MmsSmilMediaType; /** - * @brief Represents the values of a SMIL transition type. + * @brief Enumeration for the values of a SMIL transition type. */ typedef enum { - MMS_SMIL_TRANS_NONE = 0, /**< Indicates the transition type none */ /* default */ - MMS_SMIL_TRANS_SLIDEWIPE = 1, /**< Indicates the slide wipe transition */ - MMS_SMIL_TRANS_BARWIPE = 2, /**< Indicates the bar wipe transition */ + MMS_SMIL_TRANS_NONE = 0, /**< Indicates the transition type none */ /* default */ + MMS_SMIL_TRANS_SLIDEWIPE = 1, /**< Indicates the slide wipe transition */ + MMS_SMIL_TRANS_BARWIPE = 2, /**< Indicates the bar wipe transition */ MMS_SMIL_TRANS_BARNDOORWIPE = 3, /**< Indicates the bar and door wipe transition */ - MMS_SMIL_TRANS_FADE = 4, /**< Indicates the fade transition */ - MMS_SMIL_TRANS_RANDOMBLOCK = 5, /**< Indicates the random block transition */ - MMS_SMIL_TRANS_ZOOMIN = 6, /**< Indicates the zoom in transition */ - MMS_SMIL_TRANS_IRISWIPE = 7, /**< Indicates the iris wipe transition */ - MMS_SMIL_TRANS_BOXWIPE = 8, /**< Indicates the box wipe transition */ - MMS_SMIL_TRANS_FOURBOXWIPE = 9, /**< Indicates the four box wipe transition */ - MMS_SMIL_TRANS_PUSHWIPE =10, /**< Indicates the push wipe transition */ + MMS_SMIL_TRANS_FADE = 4, /**< Indicates the fade transition */ + MMS_SMIL_TRANS_RANDOMBLOCK = 5, /**< Indicates the random block transition */ + MMS_SMIL_TRANS_ZOOMIN = 6, /**< Indicates the zoom in transition */ + MMS_SMIL_TRANS_IRISWIPE = 7, /**< Indicates the iris wipe transition */ + MMS_SMIL_TRANS_BOXWIPE = 8, /**< Indicates the box wipe transition */ + MMS_SMIL_TRANS_FOURBOXWIPE = 9, /**< Indicates the four box wipe transition */ + MMS_SMIL_TRANS_PUSHWIPE =10, /**< Indicates the push wipe transition */ MMS_SMIL_TRANS_ELLIPSEWIPE = 11 /**< Indicates the ellipse wipe transition */ }MmsSmilTransType; /** - * @brief Represents the values of a SMIL transition sub type. + * @brief Enumeration for the values of a SMIL transition sub type. */ typedef enum { - MMS_SMIL_TRANS_SUB_NONE = 0, /**< Indicates the transition sub type none */ - MMS_SMIL_TRANS_SUB_FROM_LEFT = 1, /**< Indicates the from left transition */ /* slideWipe's default */ - MMS_SMIL_TRANS_SUB_FROM_TOP = 2, /**< Indicates the from top transition */ - MMS_SMIL_TRANS_SUB_FROM_BOTTOM = 3, /**< Indicates the from bottom transition */ + MMS_SMIL_TRANS_SUB_NONE = 0, /**< Indicates the transition sub type none */ + MMS_SMIL_TRANS_SUB_FROM_LEFT = 1, /**< Indicates the from left transition */ /* slideWipe's default */ + MMS_SMIL_TRANS_SUB_FROM_TOP = 2, /**< Indicates the from top transition */ + MMS_SMIL_TRANS_SUB_FROM_BOTTOM = 3, /**< Indicates the from bottom transition */ MMS_SMIL_TRANS_SUB_TOP_TO_BOTTOM = 4, /**< Indicates the from top to bottom transition */ /* barWipe's default */ MMS_SMIL_TRANS_SUB_BOTTOM_TO_TOP = 5, /**< Indicates the from bottom to top transition */ - MMS_SMIL_TRANS_SUB_HORIZONTAL = 6, /**< Indicates the horizontal transition */ /* barDoorWipe's default */ - MMS_SMIL_TRANS_SUB_FROM_RIGHT = 7, /**< Indicates the from right transition */ - MMS_SMIL_TRANS_SUB_VERTICAL = 8 /**< Indicates the vertical transition */ + MMS_SMIL_TRANS_SUB_HORIZONTAL = 6, /**< Indicates the horizontal transition */ /* barDoorWipe's default */ + MMS_SMIL_TRANS_SUB_FROM_RIGHT = 7, /**< Indicates the from right transition */ + MMS_SMIL_TRANS_SUB_VERTICAL = 8 /**< Indicates the vertical transition */ }MmsSmilTransSubType; /** - * @brief Represents the values of a text font type. + * @brief Enumeration for the values of a text font type. */ typedef enum { - MMS_SMIL_FONT_TYPE_NONE = 0, /**< Indicates the font type none */ - MMS_SMIL_FONT_TYPE_NORMAL = 1, /**< Indicates the font type normal */ - MMS_SMIL_FONT_TYPE_ITALIC = 2, /**< Indicates the font type italic */ - MMS_SMIL_FONT_TYPE_BOLD = 3, /**< Indicates the font type bold */ + MMS_SMIL_FONT_TYPE_NONE = 0, /**< Indicates the font type none */ + MMS_SMIL_FONT_TYPE_NORMAL = 1, /**< Indicates the font type normal */ + MMS_SMIL_FONT_TYPE_ITALIC = 2, /**< Indicates the font type italic */ + MMS_SMIL_FONT_TYPE_BOLD = 3, /**< Indicates the font type bold */ MMS_SMIL_FONT_TYPE_UNDERLINE = 4 /**< Indicates the font type underline */ }MmsSmilFontType; /** - * @brief Represents the values of a MMS text direction. + * @brief Enumeration for the values of a MMS text direction. */ typedef enum _MmsTextDir{ MMS_TEXT_DIRECTION_INVALID = -1, /**< Indicates the invalid direction */ - MMS_TEXT_DIRECTION_RIGHT = 0, /**< Indicates the right direction */ - MMS_TEXT_DIRECTION_DOWN, /**< Indicates the down direction */ // supported to GC + MMS_TEXT_DIRECTION_RIGHT = 0, /**< Indicates the right direction */ + MMS_TEXT_DIRECTION_DOWN, /**< Indicates the down direction */ // supported to GC } MmsTextDirection; /** - * @brief Represents the values of MMS Read Report Sent Status. + * @brief Enumeration for the values of MMS Read Report Sent Status. */ typedef enum { - MMS_RECEIVE_READ_REPORT_NO_SEND, // didn't send yet - MMS_RECEIVE_READ_REPORT_MUST_SEND, // didn't send yet but will send - MMS_RECEIVE_READ_REPORT_SENT, // sent - MMS_RECEIVE_READ_REPORT_NO_SENT, // required but, didn't send by user's choice + MMS_RECEIVE_READ_REPORT_NO_SEND, /**< Not sent yet */ + MMS_RECEIVE_READ_REPORT_MUST_SEND, /**< Not sent yet, but will be sent */ + MMS_RECEIVE_READ_REPORT_SENT, /**< Sent */ + MMS_RECEIVE_READ_REPORT_NO_SENT, /**< Must be sent, but did not send by user's choice */ } MmsRecvReadReportSendStatus ; // setting /** - * @brief Represents the values of an option type. \n - * This enum is used as the value of MSG_OPTION_TYPE_T. + * @brief Enumeration for the values of an option type. \n + * This enum is used as the value of MSG_OPTION_TYPE_T. */ enum _MSG_OPTION_TYPE_E { - MSG_GENERAL_OPT, /**< General option */ - MSG_SMS_SENDOPT, /**< SMS send option */ - MSG_SMSC_LIST, /**< SMSC list option */ - MSG_MMS_SENDOPT, /**< MMS send option */ - MSG_MMS_RECVOPT, /**< MMS receive option */ - MSG_MMS_CLASSOPT, /**< MMS class option such as personal, advertisement, and informational */ - MSG_MMS_STYLEOPT, /**< MMS style option */ - MSG_PUSHMSG_OPT, /**< Push message option */ - MSG_CBMSG_OPT, /**< Cell broadcasting message option */ - MSG_VOICEMAIL_OPT, /**< Voice mail option */ - MSG_MSGSIZE_OPT, /**< Message size option */ + MSG_GENERAL_OPT, /**< General option */ + MSG_SMS_SENDOPT, /**< SMS send option */ + MSG_SMSC_LIST, /**< SMSC list option */ + MSG_MMS_SENDOPT, /**< MMS send option */ + MSG_MMS_RECVOPT, /**< MMS receive option */ + MSG_MMS_CLASSOPT, /**< MMS class option such as personal, advertisement, and informational */ + MSG_MMS_STYLEOPT, /**< MMS style option */ + MSG_PUSHMSG_OPT, /**< Push message option */ + MSG_CBMSG_OPT, /**< Cell broadcasting message option */ + MSG_VOICEMAIL_OPT, /**< Voice mail option */ + MSG_MSGSIZE_OPT, /**< Message size option */ + MSG_OPTION_TYPE_MAX, /**< Placeholder for max value of this enum*/ }; /** - * @brief Represents the values of an SMS network mode. \n - * This enum is used as the value of MSG_SMS_NETWORK_MODE_T. + * @brief Enumeration for the values of an SMS network mode. \n + * This enum is used as the value of MSG_SMS_NETWORK_MODE_T. */ enum _MSG_SMS_NETWORK_MODE_E { - MSG_SMS_NETWORK_PS_ONLY = 0x01, /**< Packet switched */ - MSG_SMS_NETWORK_CS_ONLY = 0x02, /**< Circuit switched */ - MSG_SMS_NETWORK_PS_FIRST = 0x03, /**< Packet switching preferred */ + MSG_SMS_NETWORK_PS_ONLY = 0x01, /**< Packet switched */ + MSG_SMS_NETWORK_CS_ONLY = 0x02, /**< Circuit switched */ + MSG_SMS_NETWORK_PS_FIRST = 0x03, /**< Packet switching preferred */ }; /** - * @brief Represents the value of period of playing alert tone. \n - * The values for this type SHOULD be in MSG_ALERT_TONE_T. + * @brief Enumeration for the value of period of playing alert tone. \n + * The values for this type SHOULD be in MSG_ALERT_TONE_T. */ enum _MSG_ALERT_TONE_E { - MSG_ALERT_TONE_ONCE, - MSG_ALERT_TONE_2MINS, - MSG_ALERT_TONE_5MINS, - MSG_ALERT_TONE_10MINS, + MSG_ALERT_TONE_ONCE, /**< Play alert tone once*/ + MSG_ALERT_TONE_2MINS, /**< Repeat alarm in 2 mins*/ + MSG_ALERT_TONE_5MINS, /**< Repeat alarm in 5 mins*/ + MSG_ALERT_TONE_10MINS, /**< Repeat alarm in 10 mins*/ }; /** - * @brief Represents the value of a default storage to save SMS. \n - * The values for this type SHOULD be in MSG_SMS_SAVE_STORAGE_T. + * @brief Enumeration for the value of a default storage to save SMS. \n + * The values for this type SHOULD be in MSG_SMS_SAVE_STORAGE_T. */ enum _MSG_SMS_SAVE_STORAGE_E { - MSG_SMS_SAVE_STORAGE_SIM, - MSG_SMS_SAVE_STORAGE_PHONE, + MSG_SMS_SAVE_STORAGE_SIM, /**< Save SMS to SIM*/ + MSG_SMS_SAVE_STORAGE_PHONE, /**< Save SMS to phone*/ }; /** - * @brief Represents the values of the type of number for SMS center address. \n - * This enum is used as the value of MSG_SMS_TON_T. + * @brief Enumeration for the values of the type of number for SMS center address. \n + * This enum is used as the value of MSG_SMS_TON_T. */ enum _MSG_SMS_TON_E { - MSG_TON_UNKNOWN = 0, /**< Unknown */ - MSG_TON_INTERNATIONAL, /**< International */ - MSG_TON_NATIONAL, /**< National */ - MSG_TON_NETWORK, /**< Network */ - MSG_TON_SUBSCRIBER, /**< Subscriber */ - MSG_TON_ALPHANUMERIC, /**< Alpha numeric */ - MSG_TON_ABBREVIATED, /**< Abbreviated */ - MSG_TON_RESERVE, /**< Reserve */ + MSG_TON_UNKNOWN = 0, /**< Unknown */ + MSG_TON_INTERNATIONAL, /**< International */ + MSG_TON_NATIONAL, /**< National */ + MSG_TON_NETWORK, /**< Network */ + MSG_TON_SUBSCRIBER, /**< Subscriber */ + MSG_TON_ALPHANUMERIC, /**< Alpha numeric */ + MSG_TON_ABBREVIATED, /**< Abbreviated */ + MSG_TON_RESERVE, /**< Reserve */ }; /** - * @brief Represents the values of the numbering plan ID for SMS center address. \n - * This enum is used as the value of MSG_SMS_NPI_T. + * @brief Enumeration for the values of the numbering plan ID for SMS center address. \n + * This enum is used as the value of MSG_SMS_NPI_T. */ enum _MSG_SMS_NPI_E { - MSG_NPI_UNKNOWN = 0, /**< Unknown */ - MSG_NPI_ISDN = 1, /**< ISDN */ - MSG_NPI_DATA = 3, /**< Data */ - MSG_NPI_TELEX = 4, /**< Telex */ - MSG_NPI_SMSC = 5, /**< SMSC */ - MSG_NPI_NATIONAL = 8, /**< National */ - MSG_NPI_PRIVATE = 9, /**< Private */ - MSG_NPI_IDENTIFICATION_ERMES = 10, /**< Identification ermes */ - MSG_NPI_IDENTIFICATION_RESERVED = 0xF /**< Identification reserved */ + MSG_NPI_UNKNOWN = 0, /**< Unknown */ + MSG_NPI_ISDN = 1, /**< ISDN */ + MSG_NPI_DATA = 3, /**< Data */ + MSG_NPI_TELEX = 4, /**< Telex */ + MSG_NPI_SMSC = 5, /**< SMSC */ + MSG_NPI_NATIONAL = 8, /**< National */ + MSG_NPI_PRIVATE = 9, /**< Private */ + MSG_NPI_IDENTIFICATION_ERMES = 10, /**< Identification ermes */ + MSG_NPI_IDENTIFICATION_RESERVED = 0xF /**< Identification reserved */ }; /** - * @brief Represents the values of the protocol ID for SMS center address. \n - * This enum is used as the value of MSG_SMS_PID_T. + * @brief Enumeration for the values of the protocol ID for SMS center address. \n + * This enum is used as the value of MSG_SMS_PID_T. */ enum _MSG_SMS_PID_E { - MSG_PID_NONE, /**< None */ - MSG_PID_TEXT, /**< Text */ - MSG_PID_VOICE, /**< Voice */ - MSG_PID_FAX, /**< Fax */ - MSG_PID_X400, /**< X400 */ - MSG_PID_ERMES, /**< Ermes */ - MSG_PID_EMAIL, /**< Email */ - MSG_PID_MAX /**< Default */ + MSG_PID_NONE, /**< None */ + MSG_PID_TEXT, /**< Text */ + MSG_PID_VOICE, /**< Voice */ + MSG_PID_FAX, /**< Fax */ + MSG_PID_X400, /**< X400 */ + MSG_PID_ERMES, /**< Ermes */ + MSG_PID_EMAIL, /**< Email */ + MSG_PID_MAX /**< Default */ }; /** - * @brief Represents the values of the Validity Period for SMS center. \n - * This enum is used as the value of MSG_VAL_PERIOD_T. + * @brief Enumeration for the values of the Validity Period for SMS center. \n + * This enum is used as the value of MSG_VAL_PERIOD_T. + * + * 0 to 143 : (TP-VP + 1) x 5 minutes (i.e. 5 minutes intervals up to 12 hours) + * 144 to 167 : 12 hours + ((TP-VP -143) x 30 minutes) + * 168 to 196 : (TP-VP - 166) x 1 day + * 197 to 255 : (TP-VP - 192) x 1 week + * */ enum _MSG_VAL_PERIOD_E { - MSG_VAL_1DAY = 167, - MSG_VAL_2DAYS = 168, - MSG_VAL_1WEEK = 173, - MSG_VAL_2WEEKS = 180, - MSG_VAL_MAXIMUM = 255, + MSG_VAL_ZERO = 0, /**< Validity period is zero */ + MSG_VAL_1DAY = 167, /**< Validity period is 1 day */ + MSG_VAL_2DAYS = 168, /**< Validity period is 2 days */ + MSG_VAL_3DAYS = 169, /**< Validity period is 3 days */ + MSG_VAL_4DAYS = 170, /**< Validity period is 4 days */ + MSG_VAL_5DAYS = 171, /**< Validity period is 5 days */ + MSG_VAL_6DAYS = 172, /**< Validity period is 6 days */ + MSG_VAL_1WEEK = 173, /**< Validity period is 1 week */ + MSG_VAL_2WEEKS = 180, /**< Validity period is 2 weeks */ + MSG_VAL_3WEEKS = 187, /**< Validity period is 3 weeks */ + MSG_VAL_MAXIMUM = 255, /**< Validity period is maximum */ }; +/** + * @brief Enumeration for the values of the MMS expiry time. \n + * This enum is used as the value of MSG_MMS_EXPIRY_TIME_T. + */ enum _MSG_MMS_EXPIRY_TIME_E { - MSG_EXPIRY_TIME_MAXIMUM = 0, - MSG_EXPIRY_TIME_1DAY = 86400, - MSG_EXPIRY_TIME_2DAYS = 2*86400, - MSG_EXPIRY_TIME_1WEEK = 604800, - MSG_EXPIRY_TIME_2WEEKS = 2*604800, + MSG_EXPIRY_TIME_MAXIMUM = 0, /**< Expiry time is zero */ + MSG_EXPIRY_TIME_1DAY = 86400, /**< Expiry time is 1 day */ + MSG_EXPIRY_TIME_2DAYS = 2*86400, /**< Expiry time is 2 days */ + MSG_EXPIRY_TIME_1WEEK = 604800, /**< Expiry time is 1 week */ + MSG_EXPIRY_TIME_2WEEKS = 2*604800, /**< Expiry time is 2 weeks */ }; +/** + * @brief Enumeration for the values of the MMS delivery time. \n + * This enum is used as the value of MSG_MMS_DELIVERY_TIME_T. + */ enum _MSG_MMS_DELIVERY_TIME_E { - MSG_DELIVERY_TIME_IMMEDIATLY = 0, - MSG_DELIVERY_TIME_1HOUR = 3600, - MSG_DELIVERY_TIME_1DAY = 86400, - MSG_DELIVERY_TIME_1WEEK = 604800, - MSG_DELIVERY_TIME_CUSTOM + MSG_DELIVERY_TIME_IMMEDIATLY = 0, /**< Immediate MMS delivery */ + MSG_DELIVERY_TIME_1HOUR = 3600, /**< MMS delivery in 1 hour */ + MSG_DELIVERY_TIME_1DAY = 86400, /**< MMS delivery in 1 day */ + MSG_DELIVERY_TIME_1WEEK = 604800, /**< MMS delivery in 1 week */ + MSG_DELIVERY_TIME_CUSTOM /**< MMS delivery in custom time */ }; +/** + * @brief Enumeration for the values of the MMS class type. \n + * This enum is used as the value of MSG_MMS_MSG_CLASS_TYPE_T. + */ enum _MSG_MMS_MSG_CLASS_TYPE_E { - MSG_CLASS_PERSONAL, /**<Personal message class*/ - MSG_CLASS_ADVERTISEMENT, /**<Advertisement message class*/ - MSG_CLASS_INFORMATIONAL, /**<Informational message class */ - MSG_CLASS_AUTO, /**<Automatic */ - MSG_CLASS_MAX /**< */ + MSG_CLASS_PERSONAL, /**<Personal message class*/ + MSG_CLASS_ADVERTISEMENT, /**<Advertisement message class*/ + MSG_CLASS_INFORMATIONAL, /**<Informational message class */ + MSG_CLASS_AUTO, /**<Automatic */ + MSG_CLASS_MAX /**< Place-holder to indicate max number of MMS class types*/ }; +/** + * @brief Enumeration for the values of the MMS reply charging type. \n + * This enum is used as the value of MSG_MMS_REPLY_CHARGING_TYPE_T. + */ enum _MSG_MMS_REPLY_CHARGING_TYPE_E { - MSG_REPLY_CHARGING_NONE, /**<Reply-Charging none */ - MSG_REPLY_CHARGING_REQUESTED, /**<Reply-Charging requested */ - MSG_REPLY_CHARGING_REQUESTED_TEXT_ONLY, /**<Reply-Charging requested text-only */ - MSG_REPLY_CHARGING_ACCEPTED, /**<Reply-Charging accepted */ - MSG_REPLY_CHARGING_ACCEPTED_TEXT_ONLY, /**<Reply-Charging accepted text-only */ - MSG_REPLY_CHARGING_MAX + MSG_REPLY_CHARGING_NONE, /**<Reply-Charging none */ + MSG_REPLY_CHARGING_REQUESTED, /**<Reply-Charging requested */ + MSG_REPLY_CHARGING_REQUESTED_TEXT_ONLY, /**<Reply-Charging requested text-only */ + MSG_REPLY_CHARGING_ACCEPTED, /**<Reply-Charging accepted */ + MSG_REPLY_CHARGING_ACCEPTED_TEXT_ONLY, /**<Reply-Charging accepted text-only */ + MSG_REPLY_CHARGING_MAX /**< Place-holder to indicate max number of MMS reply charging types*/ }; +/** + * @brief Enumeration for the values of the MMS creation mode. \n + * This enum is used as the value of MSG_MMS_CREATION_MODE_T. + */ enum _MSG_MMS_CREATION_MODE_E { - MSG_CREATION_MODE_RESTRICTED, - MSG_CREATION_MODE_WARNING, - MSG_CREATION_MODE_FREE + MSG_CREATION_MODE_RESTRICTED, /**< MMS created in restricted mode */ + MSG_CREATION_MODE_WARNING, /**< MMS created in warning mode */ + MSG_CREATION_MODE_FREE /**< MMS created in free mode */ }; /** - * @brief Represents the values of the retrieve type for MMS home network. \n - * This enum is used as the value of MSG_MMS_HOME_RETRIEVE_TYPE_T. + * @brief Enumeration for the values of the retrieve type for MMS home network. \n + * This enum is used as the value of MSG_MMS_HOME_RETRIEVE_TYPE_T. */ enum _MSG_MMS_HOME_RETRIEVE_TYPE_E { - MSG_HOME_AUTO_DOWNLOAD, /**< Home auto download */ - MSG_HOME_MANUAL, /**< Home manual */ - MSG_HOME_RESTRICTED, /**< Home restricted */ - MSG_HOME_REJECT, /**< Home reject */ - MSG_HOME_MAX /**< Default */ + MSG_HOME_AUTO_DOWNLOAD, /**< Home auto download */ + MSG_HOME_MANUAL, /**< Home manual */ + MSG_HOME_RESTRICTED, /**< Home restricted */ + MSG_HOME_REJECT, /**< Home reject */ + MSG_HOME_MAX /**< Default */ }; /** - * @brief Represents the values of the retrieve type for MMS abroad network. \n - * This enum is used as the value of MSG_MMS_ABROAD_RETRIEVE_TYPE_T. + * @brief Enumeration for the values of the retrieve type for MMS abroad network. \n + * This enum is used as the value of MSG_MMS_ABROAD_RETRIEVE_TYPE_T. */ enum _MSG_MMS_ABROAD_RETRIEVE_TYPE_E { - MSG_ABROAD_AUTO_DOWNLOAD, /**< Abroad auto download */ - MSG_ABROAD_MANUAL, /**< Abroad manual */ - MSG_ABROAD_RESTRICTED, /**< Abroad restricted */ - MSG_ABROAD_REJECT, /**< Abroad reject */ - MSG_ABROAD_MAX /**< Default */ + MSG_ABROAD_AUTO_DOWNLOAD, /**< Abroad auto download */ + MSG_ABROAD_MANUAL, /**< Abroad manual */ + MSG_ABROAD_RESTRICTED, /**< Abroad restricted */ + MSG_ABROAD_REJECT, /**< Abroad reject */ + MSG_ABROAD_MAX /**< Default */ }; /** - * @brief Represents the values of the frequency of sending MMS read report. \n - * This enum is used as the value of MSG_MMS_SEND_READ_REPORT_T. + * @brief Enumeration for the values of the frequency of sending MMS read report. \n + * This enum is used as the value of MSG_MMS_SEND_READ_REPORT_T. */ enum _MSG_MMS_SEND_READ_REPORT_E { - MSG_SEND_READ_REPORT_ALWAYS, /**< Read report always */ - MSG_SEND_READ_REPORT_NEVER, /**< Read report never */ - MSG_SEND_READ_REPORT_REQUEST, /**< Read report request */ - MSG_SEND_READ_REPORT_MAX /**< Default */ + MSG_SEND_READ_REPORT_ALWAYS, /**< Read report always */ + MSG_SEND_READ_REPORT_NEVER, /**< Read report never */ + MSG_SEND_READ_REPORT_REQUEST, /**< Read report request */ + MSG_SEND_READ_REPORT_MAX /**< Default */ }; /** - * @brief Represents the values of the service type for a push message. \n - * This enum is used as the value of MSG_PUSH_SERVICE_TYPE_T. + * @brief Enumeration for the values of the service type for a push message. \n + * This enum is used as the value of MSG_PUSH_SERVICE_TYPE_T. */ enum _MSG_PUSH_SERVICE_TYPE_E { - MSG_PUSH_SERVICE_ALWAYS, /**< Push message service always */ - MSG_PUSH_SERVICE_PROMPT, /**< Push message service prompt */ - MSG_PUSH_SERVICE_NEVER, /**< Push message service never */ + MSG_PUSH_SERVICE_ALWAYS, /**< Push message service always */ + MSG_PUSH_SERVICE_PROMPT, /**< Push message service prompt */ + MSG_PUSH_SERVICE_NEVER, /**< Push message service never */ }; /** - * @brief Represents the values of the language type for a cell broadcasting message. \n - * This enum is used as the value of MSG_CB_LANGUAGE_TYPE_T. + * @brief Enumeration for the values of the language type for a cell broadcasting message. \n + * This enum is used as the value of MSG_CB_LANGUAGE_TYPE_T. */ enum _MSG_CB_LANGUAGE_TYPE_E { - MSG_CBLANG_TYPE_ALL, /**< CB check all */ - MSG_CBLANG_TYPE_ENG, /**< CB message English */ - MSG_CBLANG_TYPE_GER, /**< CB message Germany */ - MSG_CBLANG_TYPE_FRE, /**< CB message France */ - MSG_CBLANG_TYPE_ITA, /**< CB message Italy */ - MSG_CBLANG_TYPE_NED, /**< CB message Netherland */ - MSG_CBLANG_TYPE_SPA, /**< CB message Spain */ - MSG_CBLANG_TYPE_POR, /**< CB message Portugal */ - MSG_CBLANG_TYPE_SWE, /**< CB message Sweden */ - MSG_CBLANG_TYPE_TUR, /**< CB message Turkey */ - MSG_CBLANG_TYPE_MAX /**< Default */ + MSG_CBLANG_TYPE_ALL, /**< CB check all */ + MSG_CBLANG_TYPE_ENG, /**< CB message English */ + MSG_CBLANG_TYPE_GER, /**< CB message Germany */ + MSG_CBLANG_TYPE_FRE, /**< CB message France */ + MSG_CBLANG_TYPE_ITA, /**< CB message Italy */ + MSG_CBLANG_TYPE_NED, /**< CB message Netherland */ + MSG_CBLANG_TYPE_SPA, /**< CB message Spain */ + MSG_CBLANG_TYPE_POR, /**< CB message Portugal */ + MSG_CBLANG_TYPE_SWE, /**< CB message Sweden */ + MSG_CBLANG_TYPE_TUR, /**< CB message Turkey */ + MSG_CBLANG_TYPE_MAX /**< Default */ }; - /** - * @brief Represents the values of SIM status. \n - * This enum is used as the value of MSG_SIM_STATUS_T. + * @brief Enumeration for the values of SIM status. \n + * This enum is used as the value of MSG_SIM_STATUS_T. */ enum _MSG_SIM_STATUS_E { - MSG_SIM_STATUS_NORMAL = 0, - MSG_SIM_STATUS_CHANGED, - MSG_SIM_STATUS_NOT_FOUND, + MSG_SIM_STATUS_NORMAL = 0, /**< SIM normal */ + MSG_SIM_STATUS_CHANGED, /**< SIM changed */ + MSG_SIM_STATUS_NOT_FOUND, /**< SIM not found */ +}; + +/** + * @brief Enumeration for the values of a message ringtone type. \n + * This enum is used as the value of MSG_RINGTONE_TYPE_T. + */ +enum _MSG_RINGTONE_TYPE_E +{ + MSG_RINGTONE_TYPE_DEFAULT = 0, /**< Default ringtone type */ + MSG_RINGTONE_TYPE_USER, /**< User defined ringtone type */ + MSG_RINGTONE_TYPE_SILENT /**< Silent type */ +}; + +/** + * @brief Enumeration for the values of a SIM index(SIM slot number). \n + * This enum is used as the value of msg_sim_slot_id_t. + */ +enum _MSG_SIM_SLOT_ID_E +{ + MSG_SIM_SLOT_ID_1 = 1, /**SIM Slot #1 */ + MSG_SIM_SLOT_ID_2, /**SIM Slot #2 */ }; +/** + * @brief Enumeration for the values of media informations. \n + * This enum is used as member of #msg_struct_t for MSG_STRUCT_MEDIA_INFO. + */ +enum MSG_MEDIA_INFO_E { + MSG_MEDIA_ITEM_STR = MSG_STRUCT_MEDIA_INFO+1, /**< Indicates the local path, sticker Id of a media file */ + MSG_MEDIA_MIME_TYPE_STR, /**< Indicates the mimetype of a media file */ + MSG_MEDIA_THUMB_PATH_STR, /**< Indicates the thumbnail path of a media file */ + MSG_MEDIA_MESSAGE_ID_INT, /**< Indicates the message id */ +}; + +/** + * @} + */ + #endif /* MSG_TYPES_H_ */ diff --git a/include/msg_helper/MsgHelper.h b/include/msg_helper/MsgHelper.h deleted file mode 100755 index 748d4a4..0000000 --- a/include/msg_helper/MsgHelper.h +++ /dev/null @@ -1,61 +0,0 @@ -/* - * msg-service - * - * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * 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. - * -*/ - -#ifndef MSG_HELPER_H -#define MSG_HELPER_H - - -#include "MsgTypes.h" - -/*================================================================================================== - DEFINES -==================================================================================================*/ - -#define MSG_NORMAL_SOUND_START "NORMAL_SOUND_START" -#define MSG_EMERGENCY_SOUND_START "EMERGENCY_SOUND_START" -#define MSG_SOUND_STOP "SOUND_STOP" - -#define MAX_SOUND_FILE_LEN 1024 - -#define DEFAULT_FILE "/usr/share/media/Sherbet.wav" -//#define ALERT_ON_CALL_TONE "/opt/etc/msg-service/alert_on_call.mp3" - -#define HAPTIC_TEST_ITERATION 1 -#define MSG_VIBRATION_INTERVAL 3000 - -typedef void (*msg_sensor_cb)(); - -/*================================================================================================== - FUNCTION PROTOTYPES -==================================================================================================*/ - -// SoundPlayer -msg_error_t MsgSoundPlayUninit(); -void MsgSoundPlayStart(bool isEmergency); -void MsgSoundPlayStop(); -int MsgSoundPlayMelody(char *pMsgToneFilePath, bool bIncreasing); -void MsgSoundPlayVibration(bool isOnCall); -void MsgSoundPlayDtmf(); - -//Sensor FW wrapper. -msg_error_t MsgSensorConnect(); -void MsgSensorDisconnect(); -msg_error_t MsgRegSensorCB(msg_sensor_cb cb); - -#endif // MSG_HELPER_H diff --git a/include/proxy/MsgHandle.h b/include/proxy/MsgHandle.h index 73eed75..eeb2204 100755 --- a/include/proxy/MsgHandle.h +++ b/include/proxy/MsgHandle.h @@ -1,20 +1,17 @@ /* - * msg-service - * - * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved + * Copyright (c) 2014 Samsung Electronics Co., Ltd. All rights reserved * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * 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. - * */ #ifndef MSG_HANDLE_H @@ -61,6 +58,7 @@ class MsgHandle msg_error_t regPushMessageCallback(msg_push_msg_incoming_cb onPushMsgIncoming, const char *pAppId, void *pUserParam); msg_error_t regCBMessageCallback(msg_cb_incoming_cb onCBIncoming, bool bSave, void *pUserParam); msg_error_t regSyncMLMessageOperationCallback(msg_syncml_msg_operation_cb onSyncMLMsgOperation, void *pUserParam); + msg_error_t regReportMessageCallback(msg_report_msg_incoming_cb onReportMsgCB, void *pUserParam); msg_error_t operateSyncMLMessage(msg_message_id_t msgId); @@ -69,6 +67,7 @@ class MsgHandle msg_error_t addSyncMLMessage(const MSG_SYNCML_MESSAGE_S *pSyncMLMsg); msg_error_t updateMessage(const MSG_MESSAGE_HIDDEN_S *pMsg, const MSG_SENDINGOPT_S *pSendOpt); msg_error_t updateReadStatus(msg_message_id_t MsgId, bool bRead); + msg_error_t setConversationToRead(msg_thread_id_t ThreadId); msg_error_t updateProtectedStatus(msg_message_id_t MsgId, bool bProtected); msg_error_t deleteMessage(msg_message_id_t MsgId); msg_error_t deleteAllMessagesInFolder(msg_folder_id_t FolderId, bool bOnlyDB); @@ -114,7 +113,7 @@ class MsgHandle msg_error_t getMmsSendOpt(msg_struct_t msg_struct); msg_error_t setMmsSendOpt(msg_struct_t msg_struct); msg_error_t getMmsRecvOpt(msg_struct_t msg_struct); - msg_error_t setMmsRecvOpt(msg_struct_t msg_struct);; + msg_error_t setMmsRecvOpt(msg_struct_t msg_struct); msg_error_t getPushMsgOpt(msg_struct_t msg_struct); msg_error_t setPushMsgOpt(msg_struct_t msg_struct); msg_error_t getVoiceMsgOpt(msg_struct_t msg_struct); @@ -130,13 +129,15 @@ class MsgHandle msg_error_t getVobject(msg_message_id_t MsgId, void** encodedData); // ETC msg_error_t searchMessage(const char *pSearchString, msg_struct_list_s *pThreadViewList); - msg_error_t searchMessage(const MSG_SEARCH_CONDITION_S *pSearchCon, int offset, int limit, msg_struct_list_s *pMsgList); + msg_error_t getRejectMsgList(const char *pNumber, msg_struct_list_s *pRejectMsgList); msg_error_t regStorageChangeCallback(msg_storage_change_cb onStorageChange, void *pUserParam); msg_error_t getReportStatus(msg_message_id_t msg_id, msg_struct_list_s *report_list); msg_error_t getThreadIdByAddress(msg_struct_list_s *pAddrList, msg_thread_id_t *pThreadId); + msg_error_t getThreadIdByAddress(msg_list_handle_t msg_address_list, msg_thread_id_t *pThreadId); msg_error_t getThread(msg_thread_id_t threadId, MSG_THREAD_VIEW_S* pThreadInfo); - msg_error_t getMessageList(msg_folder_id_t folderId, msg_thread_id_t threadId, msg_message_type_t msgType, msg_storage_id_t storageId, msg_struct_list_s *pMsgList); + msg_error_t getMessageList(const MSG_LIST_CONDITION_S *pListCond, msg_struct_list_s *pMsgList); + msg_error_t getMediaList(const msg_thread_id_t thread_id, msg_list_handle_t *pMediaList); // Push Event msg_error_t addPushEvent(MSG_PUSH_EVENT_INFO_S *push_event); diff --git a/include/proxy/MsgProxyListener.h b/include/proxy/MsgProxyListener.h index 188c125..7b4fc39 100755 --- a/include/proxy/MsgProxyListener.h +++ b/include/proxy/MsgProxyListener.h @@ -1,20 +1,17 @@ /* - * msg-service - * - * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved + * Copyright (c) 2014 Samsung Electronics Co., Ltd. All rights reserved * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * 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. - * */ #ifndef __MSG_PROXY_LISTENER_H__ @@ -29,7 +26,7 @@ #include "MsgMutex.h" #include "MsgHandle.h" -#include <map> +#include <set> #include <list> #include <glib.h> @@ -105,6 +102,14 @@ typedef struct } MSG_STORAGE_CHANGE_CB_ITEM_S; +typedef struct +{ + MsgHandle* hAddr; + msg_report_msg_incoming_cb pfReportMsgIncomingCB; + void* userParam; +} MSG_REPORT_INCOMING_CB_ITEM_S; + + typedef std::list<MSG_SENT_STATUS_CB_ITEM_S> MsgSentStatusCBList; typedef std::list<MSG_INCOMING_CB_ITEM_S> MsgNewMessageCBList; typedef std::list<MSG_MMS_CONF_INCOMING_CB_ITEM_S> MsgNewMMSConfMessageCBList; @@ -114,7 +119,8 @@ typedef std::list<MSG_SYNCML_INCOMING_CB_ITEM_S> MsgNewSyncMLMessageCBList; typedef std::list<MSG_LBS_INCOMING_CB_ITEM_S> MsgNewLBSMessageCBList; typedef std::list<MSG_SYNCML_OPERATION_CB_ITEM_S> MsgOperationSyncMLMessageCBList; typedef std::list<MSG_STORAGE_CHANGE_CB_ITEM_S> MsgStorageChangeCBList; - +typedef std::list<MSG_REPORT_INCOMING_CB_ITEM_S> MsgReportMessageCBList; +typedef std::set<MsgHandle*> handle_set; /*================================================================================================== CLASS DEFINITIONS @@ -124,7 +130,7 @@ class MsgProxyListener public: static MsgProxyListener* instance(); - void start(); + void start(MsgHandle* pMsgHandle); void stop(); bool regSentStatusEventCB(MsgHandle* pMsgHandle, msg_sent_status_cb pfSentStatus, void *pUserParam); @@ -136,6 +142,7 @@ public: bool regLBSMessageIncomingEventCB(MsgHandle* pMsgHandle, msg_lbs_msg_incoming_cb pfNewLBSMsgIncoming, void *pUserParam); bool regSyncMLMessageOperationEventCB(MsgHandle* pMsgHandle, msg_syncml_msg_operation_cb pfSyncMLMessageOperation, void *pUserParam); bool regStorageChangeEventCB(MsgHandle* pMsgHandle, msg_storage_change_cb pfStorageChangeOperation, void *pUserParam); + bool regReportMsgIncomingCB(MsgHandle* pMsgHandle, msg_report_msg_incoming_cb pfReportMessage, void *pUserParam); void clearListOfClosedHandle(MsgHandle* pMsgHandle); @@ -143,6 +150,7 @@ public: int getRemoteFd(); int readFromSocket(char** buf, unsigned int* len); + void resetProxyListener(); #ifdef CHECK_SENT_STATUS_CALLBACK int getSentStatusCbCnt(); #endif @@ -155,6 +163,8 @@ private: unsigned int running; + handle_set openHandleSet; + MsgIpcClientSocket cliSock; Mutex mx; @@ -169,6 +179,7 @@ private: MsgNewLBSMessageCBList newLBSMessageCBList; MsgOperationSyncMLMessageCBList operationSyncMLMessageCBList; MsgStorageChangeCBList storageChangeCBList; + MsgReportMessageCBList reportMessageCBList; GIOChannel *channel; guint eventSourceId; diff --git a/include/utils/MsgContact.h b/include/utils/MsgContact.h index 579a97a..717d9d9 100755 --- a/include/utils/MsgContact.h +++ b/include/utils/MsgContact.h @@ -1,20 +1,17 @@ /* - * msg-service - * - * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved + * Copyright (c) 2014 Samsung Electronics Co., Ltd. All rights reserved * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * 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. - * */ #ifndef MSG_CONTACT_H @@ -29,6 +26,8 @@ typedef void (*MsgContactChangeCB)(); +//contacts-service is not used for gear +#ifndef MSG_CONTACTS_SERVICE_NOT_SUPPORTED /*================================================================================================== FUNCTION PROTOTYPES ==================================================================================================*/ @@ -38,7 +37,9 @@ msg_error_t MsgCloseContactSvc(); msg_error_t MsgInitContactSvc(MsgContactChangeCB cb); msg_error_t MsgGetContactInfo(const MSG_ADDRESS_INFO_S *pAddrInfo, MSG_CONTACT_INFO_S *pContactInfo); +msg_error_t MsgGetContactSearchList(const char *pSearchVal, MSG_ADDRESS_INFO_S **pAddrInfo, int *count); +void MsgSyncAddressbook(); void MsgSyncContact(); bool MsgInsertContact(MSG_CONTACT_INFO_S *pContactInfo, const char *pNumber); @@ -46,6 +47,7 @@ bool MsgUpdateContact(int index, int type); bool MsgDeleteContact(int index); int MsgGetContactNameOrder(); +msg_error_t MsgGetContactStyleDisplayName(const char *first, const char *last, const char *middle, const char *prefix, const char *suffix, int contactNameOrder, char *displayName, unsigned int size); void MsgAddPhoneLog(const MSG_MESSAGE_INFO_S *pMsgInfo); void MsgDeletePhoneLog(msg_message_id_t msgId); @@ -53,6 +55,11 @@ void MsgDeletePhoneLog(msg_message_id_t msgId); int MsgContactSVCBeginTrans(); int MsgContactSVCEndTrans(bool bSuccess); +bool checkBlockingMode(char *address, bool *pisFavorites); +#endif //MSG_CONTACTS_SERVICE_NOT_SUPPORTED +int MsgContactGetMinMatchDigit(); +void MsgConvertNumber(const char* pSrcNum, char* pDestNum, int destSize); +bool MsgIsNumber(const char* pSrc); #endif //MSG_CONTACT_H diff --git a/include/utils/MsgDebug.h b/include/utils/MsgDebug.h index dfbe0f4..8cb07d5 100755 --- a/include/utils/MsgDebug.h +++ b/include/utils/MsgDebug.h @@ -1,20 +1,17 @@ /* - * msg-service - * - * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved + * Copyright (c) 2014 Samsung Electronics Co., Ltd. All rights reserved * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * 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. - * */ #ifndef __MSG_DEBUG_H__ @@ -28,15 +25,9 @@ #include <string.h> #include <sys/time.h> #include <time.h> +#include <dlog.h> -#include "MsgTypes.h" #include "MsgCmdTypes.h" -#include "MsgFilterTypes.h" - -extern "C"{ - #include <dlog.h> -}; - /*================================================================================================== DEFINES @@ -48,107 +39,66 @@ extern "C"{ #define MSG_MMS_VALID_TAG "VLD_MMS" #define DLOG_ENABLE -//#define LOG_ENABLE - - -/*================================================================================================== - FUNCTION PROTOTYPES -==================================================================================================*/ -int get_tid(); - #if defined(DLOG_ENABLE) -#define MSG_FATAL(fmt, ...) \ - do \ +/*log macros*/ +#define MSG_BEGIN()\ + do\ {\ - SLOGD(" ERROR << " fmt " >>\n\n", ##__VA_ARGS__);\ - } while (0) + SLOGD(" BEGIN >>>> \n");\ + } while(0) -#define MSG_DEBUG(fmt, ...)\ +#define MSG_END()\ do\ {\ - SLOGD(fmt"\n\n", ##__VA_ARGS__);\ - } while (0) + SLOGD(" END <<<< \n");\ + } while(0) -#define MSG_BEGIN() \ +#define MSG_DEBUG(fmt, ...)\ do\ - {\ - SLOGD(" BEGIN >>>> \n\n");\ - } while( 0 ) + {\ + SLOGD(fmt"\n", ##__VA_ARGS__);\ + } while(0) -#define MSG_END() \ +#define MSG_INFO(fmt, ...)\ do\ - {\ - SLOGD(" END <<<< \n\n");\ - } while( 0 ) + {\ + SLOGI("* Info * " fmt "\n", ##__VA_ARGS__);\ + } while(0) -#define MSG_INFO(fmt, args...)\ +#define MSG_WARN(fmt, ...)\ do\ {\ - SLOGI("* Info * " fmt "\n\n", ##args);\ - } while( 0 ) - -#define MSG_WARN(fmt, args...)\ - do {\ - SLOGW("* Warning * " fmt "\n\n", ##args)\ - } while( 0 ) - -#define MSG_ERR(fmt, args...)\ - do {\ - SLOGE("* Error * " fmt "\n\n", ##args);\ - } while( 0 ) + SLOGW("* Warning * " fmt "\n", ##__VA_ARGS__);\ + } while(0) +#define MSG_ERR(fmt, ...)\ + do\ + {\ + SLOGE("* Error * " fmt "\n", ##__VA_ARGS__);\ + } while(0) -#define MSG_ERR_RET_VM(expr, val, fmt, arg...)\ - do {\ - if (expr) {\ - MSG_ERR(fmt, ##arg);\ - return (val);\ - }\ - } while (0) - -#define MSG_ERR_RET_M(expr, fmt, arg...)\ - do {\ - if (expr) {\ - MSG_ERR(fmt, ##arg);\ - return;\ - }\ - } while (0) - -#define MSG_WARN_M(expr, fmt, arg...)\ - do {\ - if (expr) {\ - MSG_WARN(fmt, ##arg);\ - }\ - } while (0) +#define MSG_FATAL(fmt, ...)\ + do\ + {\ + SLOGE(" ERROR << " fmt " >>\n", ##__VA_ARGS__);\ + } while(0) -#define MSG_PROFILE_BEGIN(pfid) \ - unsigned int __prf_l1_##pfid = __LINE__; \ - struct timeval __prf_1_##pfid; \ - struct timeval __prf_2_##pfid; \ - do { \ - gettimeofday(&__prf_1_##pfid, 0); \ +/*secure log macros*/ +#define MSG_SEC_DEBUG(fmt, ...)\ + do\ + {\ + SECURE_SLOGD(fmt"\n", ##__VA_ARGS__);\ } while (0) -#define MSG_PROFILE_END(pfid) \ - unsigned int __prf_l2_##pfid = __LINE__;\ - do { \ - gettimeofday(&__prf_2_##pfid, 0);\ - long __ds = __prf_2_##pfid.tv_sec - __prf_1_##pfid.tv_sec;\ - long __dm = __prf_2_##pfid.tv_usec - __prf_1_##pfid.tv_usec;\ - if ( __dm < 0 ) { __ds--; __dm = 1000000 + __dm; } \ - SLOG(LOG_DEBUG, USER_TAG, "**PROFILE** [MSGFW: %s: %s() %u ~ %u] " #pfid \ - " -> Elapsed Time: %u.%06u seconds\n", \ - rindex(__FILE__, '/')+1, \ - __FUNCTION__, \ - __prf_l1_##pfid, \ - __prf_l2_##pfid, \ - (unsigned int)(__ds), \ - (unsigned int)(__dm)); \ +#define MSG_SEC_INFO(fmt, ...)\ + do\ + {\ + SECURE_SLOGI("* Info * " fmt"\n", ##__VA_ARGS__);\ } while (0) - +/*valid data log macros*/ #define MSG_SMS_VLD_INFO(fmt, ...)\ do\ {\ @@ -179,8 +129,62 @@ int get_tid(); SLOG(LOG_DEBUG, MSG_MMS_VALID_TAG, "[MMS FILE]%s, "fmt"\n", __TIMESTAMP__, ##__VA_ARGS__);\ } while (0) +/*err & warn return message log macros*/ +#define MSG_ERR_RET_VM(expr, val, fmt, ...)\ + do\ + {\ + if (expr) {\ + MSG_ERR(fmt, ##__VA_ARGS__);\ + return (val);\ + }\ + } while(0) + +#define MSG_ERR_RET_M(expr, fmt, ...)\ + do\ + {\ + if (expr) {\ + MSG_ERR(fmt, ##__VA_ARGS__);\ + return;\ + }\ + } while(0) + +#define MSG_WARN_M(expr, fmt, ...)\ + do\ + {\ + if (expr) {\ + MSG_WARN(fmt, ##__VA_ARGS__);\ + }\ + } while(0) + +/*profile log macros*/ +#define MSG_PROFILE_BEGIN(pfid) \ + unsigned int __prf_l1_##pfid = __LINE__;\ + struct timeval __prf_1_##pfid;\ + struct timeval __prf_2_##pfid;\ + do {\ + gettimeofday(&__prf_1_##pfid, 0);\ + } while (0) + +#define MSG_PROFILE_END(pfid) \ + unsigned int __prf_l2_##pfid = __LINE__;\ + do { \ + gettimeofday(&__prf_2_##pfid, 0);\ + long __ds = __prf_2_##pfid.tv_sec - __prf_1_##pfid.tv_sec;\ + long __dm = __prf_2_##pfid.tv_usec - __prf_1_##pfid.tv_usec;\ + if ( __dm < 0 ) { __ds--; __dm = 1000000 + __dm; } \ + SLOGD("**PROFILE** [MSGFW: %s: %s() %u ~ %u] " #pfid " -> Elapsed Time: %u.%06u seconds\n",\ + rindex(__FILE__, '/')+1,\ + __FUNCTION__, \ + __prf_l1_##pfid,\ + __prf_l2_##pfid,\ + (unsigned int)(__ds),\ + (unsigned int)(__dm));\ + } while (0) + #elif defined(LOG_ENABLE) +int get_tid(); + #define MSG_FATAL(fmt, ...) \ do \ {\ @@ -265,6 +269,19 @@ int get_tid(); #endif + +#define MSG_FREE(x) \ + ({\ + if (x != NULL){\ + free(x);\ + x = NULL;}\ + }) + + +/*================================================================================================== + FUNCTION PROTOTYPES +==================================================================================================*/ + const char * MsgDbgCmdStr(MSG_CMD_TYPE_T cmdType); const char * MsgDbgEvtStr(MSG_EVENT_TYPE_T evtType); diff --git a/include/utils/MsgDrmWrapper.h b/include/utils/MsgDrmWrapper.h index ce0ce70..b1a8779 100755 --- a/include/utils/MsgDrmWrapper.h +++ b/include/utils/MsgDrmWrapper.h @@ -1,20 +1,17 @@ /* - * msg-service - * - * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved + * Copyright (c) 2014 Samsung Electronics Co., Ltd. All rights reserved * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * 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. - * */ #ifndef __MSG_DRM_WRAPPER_H_ @@ -44,6 +41,7 @@ bool MsgDrmGetMimeTypeEx(const char *szFileName, char *szMimeType, int nMimeType bool MsgDrmGetContentID(const char *szFileName, char *szContentID, int nContentIDLen); bool MsgDrmGetDrmType(const char *szFileName, MSG_DRM_TYPE *eDRMType); bool MsgDrmConvertDmtoDcfType(char *inputFile, char *outputFile); +bool MsgDrmCheckRingtone(const char *ringtonePath); #ifdef __cplusplus } diff --git a/include/utils/MsgException.h b/include/utils/MsgException.h index 534b939..5d4c73f 100755 --- a/include/utils/MsgException.h +++ b/include/utils/MsgException.h @@ -1,20 +1,17 @@ /* - * msg-service - * - * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved + * Copyright (c) 2014 Samsung Electronics Co., Ltd. All rights reserved * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * 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. - * */ #ifndef MSG_EXCEPTION_H diff --git a/include/utils/MsgGconfWrapper.h b/include/utils/MsgGconfWrapper.h index 061d25e..0c9793a 100755 --- a/include/utils/MsgGconfWrapper.h +++ b/include/utils/MsgGconfWrapper.h @@ -1,20 +1,17 @@ /* - * msg-service - * - * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved + * Copyright (c) 2014 Samsung Electronics Co., Ltd. All rights reserved * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * 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. - * */ #ifndef MSG_GCONF_WRAPPER_H @@ -57,11 +54,10 @@ char* MsgSettingGetString(const char *pKey); int MsgSettingGetInt(const char *pKey); int MsgSettingGetBool(const char *pKey, bool *pVal); -void MsgChangePmState(); msg_error_t MsgSettingHandleNewMsg(int SmsCnt, int MmsCnt); msg_error_t MsgSettingSetIndicator(int SmsCnt, int MmsCnt); -bool MsgSettingGetAutoReject(); +int MsgSettingGetAutoReject(); bool MsgSettingGetUnknownAutoReject(); void MsgSettingRegVconfCB(); @@ -70,4 +66,7 @@ void MsgSettingRemoveVconfCB(); void MsgSettingRegVconfCBCommon(const char *pKey, _vconf_change_cb pCb); void MsgSettingRemoveVconfCBCommon(const char *pKey, _vconf_change_cb pCb); +#ifdef MSG_PENDING_PUSH_MESSAGE +msg_error_t MsgSendPendingPushMsg(void); +#endif #endif // MSG_GCONF_WRAPPER_H diff --git a/include/utils/MsgIpcSocket.h b/include/utils/MsgIpcSocket.h index 512cf6d..8795d48 100755 --- a/include/utils/MsgIpcSocket.h +++ b/include/utils/MsgIpcSocket.h @@ -1,20 +1,17 @@ /* - * msg-service - * - * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved + * Copyright (c) 2014 Samsung Electronics Co., Ltd. All rights reserved * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * 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. - * */ #ifndef __IPCSocket_H__ @@ -76,6 +73,7 @@ public: private: int readn(char *buf, unsigned int len ); int writen (const char *buf, unsigned int len); + bool wait_for_reply(); int sockfd, remotefd, maxfd; fd_set fds; diff --git a/include/utils/MsgMemory.h b/include/utils/MsgMemory.h index 0733e2a..7fa9522 100755 --- a/include/utils/MsgMemory.h +++ b/include/utils/MsgMemory.h @@ -1,20 +1,17 @@ /* - * msg-service - * - * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved + * Copyright (c) 2014 Samsung Electronics Co., Ltd. All rights reserved * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * 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. - * */ #ifndef __MSG_MEMORY_H__ diff --git a/include/utils/MsgMmsMessage.h b/include/utils/MsgMmsMessage.h index a3dd249..e08e2bd 100755 --- a/include/utils/MsgMmsMessage.h +++ b/include/utils/MsgMmsMessage.h @@ -1,20 +1,17 @@ /* - * msg-service - * - * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved + * Copyright (c) 2014 Samsung Electronics Co., Ltd. All rights reserved * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * 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. - * */ #ifndef MSG_MMS_MESSAGE_H @@ -47,10 +44,51 @@ int _MsgMmsGetMetaCount(MMS_MESSAGE_DATA_S *pMsgData); void MsgMmsReleaseMmsLists(MMS_MESSAGE_DATA_S *pMsgData); -char *_MsgMmsSerializeMessageData(const MMS_MESSAGE_DATA_S *pMsgData, size_t *pSize); +char *_MsgMmsSerializeMessageData(const MMS_MESSAGE_DATA_S *pMsgData, unsigned int *pSize); bool _MsgMmsDeserializeMessageData(MMS_MESSAGE_DATA_S *pMsgData, const char *pData); bool _MsgMmsSetRootLayout(MMS_MESSAGE_DATA_S *pMsgData, MMS_SMIL_ROOTLAYOUT *pRootlayout); +void _MsgMmsPrint(MMS_MESSAGE_DATA_S *pMsgData); +void _MsgMmsAttachPrint(MMS_ATTACH_S *attach); +void _MsgMmsMediaPrint(MMS_MEDIA_S *media); +void _MsgMmsPagePrint(MMS_PAGE_S *page); + +MMS_HEADER_DATA_S *MsgMmsCreateHeader(); +void MsgMmsInitHeader(MMS_HEADER_DATA_S *pMmsHeaderData); +void MsgMmsReleaseHeader(MMS_HEADER_DATA_S **ppMmHeadersData); + +MMS_MULTIPART_DATA_S *MsgMmsCreateMultipart(); +void MsgMmsInitMultipart(MMS_MULTIPART_DATA_S *pMmsMultipart); +void MsgMmsReleaseMultipart(MMS_MULTIPART_DATA_S **ppMmsMultipart); + +MMS_DATA_S *MsgMmsCreate(); + +void MsgMmsRelease(MMS_DATA_S **ppMmsData); + +int MsgMmsReleaseMultipartList(MMSList **ppMultipartList); + +int MsgMmsGetSmilMultipart(MMSList *pMultipartList, MMS_MULTIPART_DATA_S **smil_multipart);//TODO : delete + +int MsgMmsConvertMmsDataToMmsMessageData(MMS_DATA_S *pSrc, MMS_MESSAGE_DATA_S *pDst); + +int MsgMmsConvertMmsMessageDataToMmsData(MMS_MESSAGE_DATA_S *pSrc, MMS_DATA_S *pDst); + +MMS_ADDRESS_DATA_S *MsgMmsCreateAddress(int addressType, const char *addressVal); +void MsgMmsReleaseAddress(MMS_ADDRESS_DATA_S **ppMmsAddressData); +int MsgMmsReleaseAddressList(MMSList **ppAddressList); + +int MsgMmsSetMultipartData(MMS_MULTIPART_DATA_S *pMultipart); +int MsgMmsSetMultipartFilePath(const char *dirPath, MMS_MULTIPART_DATA_S *pMultipart); + +int MsgMmsSetMultipartListData(MMS_DATA_S *pMmsData); +int MsgMmsSetMultipartListFilePath(const char *dirPath, MMS_DATA_S *pMmsData); + +int printMultipart(MMS_MULTIPART_DATA_S *multipart); +int printMultipartList(MMSList *pMultipartList);//for debug + +void _MsgMmsMultipartPrint(MMS_MULTIPART_DATA_S *multipart); + +bool _MsgMmsRemoveEmptyObject(MMS_MESSAGE_DATA_S *pMmsMsg); #endif // MSG_MMS_MESSAGE_H diff --git a/include/utils/MsgMutex.h b/include/utils/MsgMutex.h index 45ea049..c3b1cc6 100755 --- a/include/utils/MsgMutex.h +++ b/include/utils/MsgMutex.h @@ -1,20 +1,17 @@ /* - * msg-service - * - * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved + * Copyright (c) 2014 Samsung Electronics Co., Ltd. All rights reserved * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * 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. - * */ #ifndef __MSG_MUTEX_H__ @@ -36,8 +33,23 @@ void WaitMsgReady(int sec); class Mutex { public: - Mutex(){ pthread_mutex_init(&m, 0); } + Mutex(){ + pthread_mutexattr_t mattr; + pthread_mutexattr_init(&mattr); + pthread_mutexattr_settype(&mattr, PTHREAD_MUTEX_RECURSIVE); + pthread_mutex_init(&m, &mattr); + pthread_mutexattr_destroy(&mattr); + } + ~Mutex(){ pthread_mutex_destroy(&m); } void lock(){ pthread_mutex_lock(&m); } + + int timedlock(){ + struct timespec abs_time; + clock_gettime(CLOCK_REALTIME, &abs_time); + abs_time.tv_sec += 1; + return pthread_mutex_timedlock(&m, &abs_time); + } + void unlock(){ pthread_mutex_unlock(&m); } pthread_mutex_t* pMutex() { return &m; } diff --git a/include/utils/MsgNotificationWrapper.h b/include/utils/MsgNotificationWrapper.h deleted file mode 100755 index 9ac5054..0000000 --- a/include/utils/MsgNotificationWrapper.h +++ /dev/null @@ -1,72 +0,0 @@ -/* - * msg-service - * - * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * 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. - * -*/ - -#ifndef MSG_QUICKPANEL_WRAPPER_H -#define MSG_QUICKPANEL_WRAPPER_H - -/*================================================================================================== - INCLUDE FILES -==================================================================================================*/ -#include "MsgInternalTypes.h" -#include "MsgSqliteWrapper.h" - - -/*================================================================================================== - DEFINES -==================================================================================================*/ -#define MSG_APP_PACKAGE_NAME "message" -#define MSG_SYS_PACKAGE_NAME "sys_string" -#define NORMAL_MSG_ICON_PATH tzplatform_mkpath(TZ_USER_APP,"8r4r5ddzzn/shared/res/screen-density-xhigh/mainmenu.png") - -#define MSG_APP_LOCALEDIR "/usr/apps/org.tizen.message/res/locale" - -#define SENDING_MULTIMEDIA_MESSAGE_FAILED "Sending multimedia message failed" -#define MULTIMEDIA_MESSAGE_SENT "Multimedia message sent" -#define RETRIEVING_MESSAGE_FAILED "Retrieving message failed" -#define MESSAGE_RETRIEVED "Message retrieved" -#define SMS_MESSAGE_SENT "Message sent" -#define SMS_MESSAGE_SENDING_FAIL "Sending message failed" - -#define MESSAGE "Message" -#define NEW_MESSAGE "New message" -#define NEW_MESSAGES "New messages" - -#define MSG_SYS_LOCALEDIR "/usr/share/locale" - -#define NOTIFICATION_PRIV_ID DEFAULT_SETTING_PATH"/notification_priv_id" -#define VOICE_NOTI_ID_1 DEFAULT_SETTING_PATH"/voice_noti_id1" -#define CB_NOTI_PRIV_ID DEFAULT_SETTING_PATH"/cb_noti_priv_id" - -/*================================================================================================== - FUNCTION PROTOTYPES -==================================================================================================*/ -msg_error_t MsgInsertNoti(MSG_MESSAGE_INFO_S* pMsg); - -msg_error_t MsgInsertMmsReportToNoti(MsgDbHandler *pDbHandle, MSG_MESSAGE_INFO_S* pMsg); - -msg_error_t MsgRefreshNoti(bool bWithTicker); -msg_error_t MsgRefreshCBNoti(bool bWithTicker); -msg_error_t MsgCleanAndResetNoti(); - -msg_error_t MsgInsertTicker(const char* pTickerMsg, const char* pLocaleTickerMsg); -msg_error_t MsgInsertBadge(unsigned int unreadMsgCnt); - -msg_error_t MsgClearVoiceNoti(MSG_SUB_TYPE_T subType); - -#endif // MSG_QUICKPANEL_WRAPPER_H diff --git a/include/utils/MsgSoundPlayer.h b/include/utils/MsgSoundPlayer.h deleted file mode 100755 index 9e1fa9a..0000000 --- a/include/utils/MsgSoundPlayer.h +++ /dev/null @@ -1,48 +0,0 @@ -/* - * msg-service - * - * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * 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. - * -*/ - -#ifndef MSG_SOUND_PLAYER_H -#define MSG_SOUND_PLAYER_H - - -/*================================================================================================== - DEFINES -==================================================================================================*/ - - -/*================================================================================================== - INCLUDE FILES -==================================================================================================*/ - - - -/*================================================================================================== - FUNCTION PROTOTYPES -==================================================================================================*/ -void MsgSoundPlayStart(bool isEmergency); -void MsgSoundPlayStop(); - -bool MsgSoundSetRepeatAlarm(); -bool MsgSoundCreateRepeatAlarm(int RepeatTime); -int MsgSoundRepeatAlarmCB(int TimerId, void *pUserParam); -int MsgSoundGetUnreadMsgCnt(); -void MsgSoundInitRepeatAlarm(); - -#endif // MSG_SOUND_PLAYER_H - diff --git a/include/utils/MsgSpamFilter.h b/include/utils/MsgSpamFilter.h deleted file mode 100755 index 7361505..0000000 --- a/include/utils/MsgSpamFilter.h +++ /dev/null @@ -1,40 +0,0 @@ -/* - * msg-service - * - * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * 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. - * -*/ - -#ifndef MSG_SPAM_FILTER_H -#define MSG_SPAM_FILTER_H - -/*================================================================================================== - INCLUDE FILES -==================================================================================================*/ -#include "MsgFilterTypes.h" -#include "MsgStorageTypes.h" -#include "MsgInternalTypes.h" -#include "MsgSqliteWrapper.h" - - -/*================================================================================================== - FUNCTION PROTOTYPES -==================================================================================================*/ -msg_error_t MsgSetFilterOperation(bool bSetFlag); -msg_error_t MsgGetFilterOperation(bool *pSetFlag); - -bool MsgCheckFilter(MsgDbHandler *pDbHandle, MSG_MESSAGE_INFO_S *pMsgInfo); - -#endif // MSG_SPAM_FILTER_H diff --git a/include/utils/MsgSqliteWrapper.h b/include/utils/MsgSqliteWrapper.h index 975a31c..ef2e99a 100755 --- a/include/utils/MsgSqliteWrapper.h +++ b/include/utils/MsgSqliteWrapper.h @@ -1,20 +1,17 @@ /* - * msg-service - * - * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved + * Copyright (c) 2014 Samsung Electronics Co., Ltd. All rights reserved * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * 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. - * */ #ifndef MSG_SQLITE_WRAPPER_H @@ -23,14 +20,14 @@ /*================================================================================================== INCLUDE FILES ==================================================================================================*/ -#include <tzplatform_config.h> #include "MsgTypes.h" - +#include <db-util.h> +#include "MsgMutex.h" /*================================================================================================== DEFINES ==================================================================================================*/ -#define MSGFW_DB_NAME tzplatform_mkpath(TZ_USER_DB,".msg_service.db") +#define MSGFW_DB_NAME "/opt/usr/dbspace/.msg_service.db" #define MSGFW_MESSAGE_TABLE_NAME "MSG_MESSAGE_TABLE" #define MSGFW_FOLDER_TABLE_NAME "MSG_FOLDER_TABLE" @@ -42,25 +39,45 @@ #define MSGFW_CB_MSG_TABLE_NAME "MSG_CBMSG_TABLE" #define MMS_PLUGIN_MESSAGE_TABLE_NAME "MSG_MMS_MESSAGE_TABLE" #define MSGFW_SYNCML_MSG_TABLE_NAME "MSG_SYNCML_TABLE" + +#if 0 +#define MSGFW_RECEIVED_CB_MSG_TABLE_NAME "MSG_CB_MESSAGE_TABLE" +#endif + +#define MSGFW_CB_CHANNEL_INFO_TABLE_NAME "MSG_CB_CHANNEL_INFO_TABLE" +#ifdef FEATURE_SMS_CDMA +#define MSGFW_CDMA_CB_CHANNEL_INFO_TABLE_NAME "MSG_CDMA_CB_CHANNEL_INFO_TABLE" +#endif + #define MSGFW_SMS_SENDOPT_TABLE_NAME "MSG_SMS_SENDOPT_TABLE" -#define MSGFW_REPORT_TABLE_NAME "MSG_REPORT_TABLE" -#define MSGFW_PUSH_CONFIG_TABLE_NAME "MSG_PUSHCFG_TABLE" -#define MSGFW_MMS_PREVIEW_TABLE_NAME "MSG_MMS_PREVIEW_INFO_TABLE" +#define MSGFW_SMS_REPORT_TABLE_NAME "MSG_SMS_REPORT_TABLE" +#define MSGFW_REPORT_TABLE_NAME "MSG_REPORT_TABLE" +#define MSGFW_PUSH_CONFIG_TABLE_NAME "MSG_PUSHCFG_TABLE" +#define MSGFW_MMS_PREVIEW_TABLE_NAME "MSG_MMS_PREVIEW_INFO_TABLE" +#define MSGFW_MMS_MULTIPART_TABLE_NAME "MSG_MULTIPART_TABLE" + +#ifdef FEATURE_SMS_CDMA +#define MSGFW_UNIQUENESS_INFO_TABLE_NAME "MSG_UNIQUENESS_INFO_TABLE" +#endif #define MSGFW_TMP_MSGID_TABLE_NAME "MSG_TMP_MSGID_TABLE" +#define MSGFW_ADDRESS_TEMP_TABLE_NAME "MSG_ADDRESS_TEMP_TABLE" + #define MAX_QUERY_LEN 3072 #define MAX_FOLDER_NAME_LEN 20 #define MAX_ACCOUNT_NAME_LEN 51 #define MSGFW_DB_ESCAPE_CHAR '\\' +#define SHM_FILE_FOR_DB_LOCK "/.msg_shm_db_lock" + /*================================================================================================== FUNCTION PROTOTYPES ==================================================================================================*/ void MsgReleaseMemoryDB(); msg_error_t MsgConvertStrWithEscape(const char *input, char **output); -int XSystem(const char *argv[]); + /*================================================================================================== CLASS DEFINITIONS @@ -79,9 +96,11 @@ public: msg_error_t getTable(const char *pQuery, int *pRowCnt); void freeTable(); msg_error_t bindText(const char *pBindStr, int index); + msg_error_t bindInt(const int pBindint, int index); msg_error_t bindBlob(const void * pBindBlob, int size, int index); msg_error_t prepareQuery(const char *pQuery); msg_error_t stepQuery(); + void resetQuery(); void finalizeQuery(); int columnInt(int ColumnIndex); const unsigned char* columnText(int ColumnIndex); @@ -90,14 +109,24 @@ public: msg_error_t endTrans(bool Success); int getColumnToInt(int RowIndex); char getColumnToChar(int RowIndex); + char* getColumnToString(int RowIndex); void getColumnToString(int RowIndex, int Length, char *pString); msg_error_t getRowId(const char *pTableName, unsigned int *pRowId); + void getMmapMutex(const char *shm_file_name); + void shm_mutex_timedlock (int sec); + void shm_mutex_unlock(); private: - char **result; - + sqlite3 *handle; + sqlite3_stmt *stmt; + pthread_mutex_t *mmapMx; + int shm_fd; + static Mutex mx; }; + +MsgDbHandler *getDbHandle(); +void removeDbHandle(); #endif // MSG_SQLITE_WRAPPER_H diff --git a/include/utils/MsgTextConvert.h b/include/utils/MsgTextConvert.h index 23f693a..3401874 100755 --- a/include/utils/MsgTextConvert.h +++ b/include/utils/MsgTextConvert.h @@ -1,20 +1,17 @@ /* - * msg-service - * - * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved + * Copyright (c) 2014 Samsung Electronics Co., Ltd. All rights reserved * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * 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. - * */ #ifndef MSG_TEXT_CONVERT_H @@ -38,7 +35,7 @@ #define MAX_DUMP_COLUMN 16 -typedef unsigned short WCHAR; +typedef unsigned long WCHAR; typedef unsigned char MSG_CHAR_TYPE_T; @@ -257,31 +254,43 @@ static const WCHAR g_PortuLockingToUCS2[] = class MsgTextConvert { public: - MsgTextConvert(); - ~MsgTextConvert(); + static MsgTextConvert* instance(); int convertUTF8ToGSM7bit(OUT unsigned char *pDestText, IN int maxLength, IN const unsigned char *pSrcText, IN int srcTextLen, OUT MSG_LANGUAGE_ID_T *pLangId, OUT bool *bIncludeAbnormalChar); int convertUTF8ToUCS2(OUT unsigned char *pDestText, IN int maxLength, IN const unsigned char *pSrcText, IN int srcTextLen); +#ifndef FEATURE_SMS_CDMA + int convertUTF8ToAuto(OUT unsigned char *pDestText, IN int maxLength, IN const unsigned char *pSrcText, IN int srcTextLen, OUT MSG_LANGUAGE_ID_T *pLangId, OUT msg_encode_type_t *pCharType); +#else int convertUTF8ToAuto(OUT unsigned char *pDestText, IN int maxLength, IN const unsigned char *pSrcText, IN int srcTextLen, OUT msg_encode_type_t *pCharType); +#endif int convertGSM7bitToUTF8(OUT unsigned char *pDestText, IN int maxLength, IN const unsigned char *pSrcText, IN int srcTextLen, IN MSG_LANG_INFO_S *pLangInfo); int convertUCS2ToUTF8(OUT unsigned char *pDestText, IN int maxLength, IN const unsigned char *pSrcText, IN int srcTextLen); int convertEUCKRToUTF8(OUT unsigned char *pDestText, IN int maxLength, IN const unsigned char *pSrcText, IN int srcTextLen); + int convertSHIFTJISToUTF8(OUT unsigned char *pDestText, IN int maxLength, IN const unsigned char *pSrcText, IN int srcTextLen); private: + MsgTextConvert(); + ~MsgTextConvert(); + int convertUCS2ToGSM7bit(OUT unsigned char *pDestText, IN int maxLength, IN const unsigned char *pSrcText, IN int srcTextLen, OUT MSG_LANGUAGE_ID_T *pLangId, OUT bool *bIncludeAbnormalChar); - int convertUCS2ToGSM7bitAuto(OUT unsigned char *pDestText, IN int maxLength, IN const unsigned char *pSrcText, IN int srcTextLen, OUT bool *pUnknown); + int convertUCS2ToASCII(OUT unsigned char *pDestText, IN int maxLength, IN const unsigned char *pSrcText, IN int srcTextLen, OUT bool *pUnknown); int convertGSM7bitToUCS2(OUT unsigned char *pDestText, IN int maxLength, IN const unsigned char *pSrcText, IN int srcTextLen, IN MSG_LANG_INFO_S *pLangInfo); void convertDumpTextToHex(const unsigned char *pText, int length); + static MsgTextConvert* pInstance; + std::map<unsigned short, unsigned char> extCharList; std::map<unsigned short, unsigned char> ucs2toGSM7DefList; std::map<unsigned short, unsigned char> ucs2toGSM7ExtList; std::map<unsigned short, unsigned char> ucs2toTurkishList; std::map<unsigned short, unsigned char> ucs2toSpanishList; std::map<unsigned short, unsigned char> ucs2toPortuList; + + std::map<unsigned short, unsigned char> replaceCharList; + }; #endif //MSG_TEXT_CONVERT_H diff --git a/include/utils/MsgUtilFile.h b/include/utils/MsgUtilFile.h index 0ed4951..8600b2a 100755 --- a/include/utils/MsgUtilFile.h +++ b/include/utils/MsgUtilFile.h @@ -1,20 +1,17 @@ /* - * msg-service - * - * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved + * Copyright (c) 2014 Samsung Electronics Co., Ltd. All rights reserved * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * 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. - * */ #ifndef MSG_UTIL_FILE_H @@ -58,6 +55,11 @@ unsigned int MsgDu(const char *pDirPath); bool MsgAppendFile(const char *pFilePath, const char *pData, int DataSize); void MsgMmsInitDir(); bool MsgAccessFile(const char *filepath, int mode); +bool MsgChmod(const char *filepath, int mode); +bool MsgChown(const char *filepath, int uid, int gid); +bool MsgCreateFile(const char *pFilePath,char *pData, int DataSize); +char *MsgGetDirName(char *file_path); +char *MsgGetFileName(char *file_path); #endif // MSG_UTIL_FILE_H diff --git a/include/utils/MsgUtilFunction.h b/include/utils/MsgUtilFunction.h index 2f8fa31..5595a01 100755 --- a/include/utils/MsgUtilFunction.h +++ b/include/utils/MsgUtilFunction.h @@ -1,25 +1,23 @@ /* - * msg-service - * - * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved + * Copyright (c) 2014 Samsung Electronics Co., Ltd. All rights reserved * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * 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. - * */ #ifndef MSG_UTIL_FUNCTION_H #define MSG_UTIL_FUNCTION_H +#define MSG_UTIL_CH_EMAIL_AT '@' /*================================================================================================== INCLUDE FILES @@ -34,6 +32,8 @@ FUNCTION PROTOTYPES ==================================================================================================*/ +bool MsgCheckFeatureSupport(const char *feature_name); + // Encoders int MsgEncodeCountInfo(MSG_COUNT_INFO_S *pCountInfo, char **ppDest); @@ -43,7 +43,7 @@ int MsgEncodeRecipientList(MSG_RECIPIENTS_LIST_S *pRecipientList, char **ppDest) int MsgEncodeMsgId(msg_message_id_t *pMsgId, char **ppDest); -int MsgEncodeMsgInfo(MSG_MESSAGE_INFO_S *pMsgInfo, char **ppDest); +int MsgEncodeMsgInfo(const MSG_MESSAGE_INFO_S *pMsgInfo, char **ppDest); int MsgEncodeMsgInfo(MSG_MESSAGE_INFO_S *pMsgInfo, MSG_SENDINGOPT_INFO_S* pSendOptInfo, char **ppDest); @@ -71,6 +71,8 @@ int MsgEncodeSyncMLOperationData(int msgId, int extId, char **ppDest); int MsgEncodeStorageChangeData(const msg_storage_change_type_t storageChangeType, const msg_id_list_s *pMsgIdList, char **ppDest); +int MsgEncodeReportMsgData(const msg_report_type_t msgReportType, const MSG_MESSAGE_INFO_S *pMsgInfo, char **ppDest); + int MsgEncodeReportStatus(MSG_REPORT_STATUS_INFO_S* pReportStatus, int count, char **ppDest); int MsgEncodeThreadId(msg_thread_id_t *pThreadId, char **ppDest); @@ -83,6 +85,8 @@ void MsgDecodeMsgId(char *pSrc, msg_message_id_t *pMsgId); void MsgDecodeCountInfo(char *pSrc, MSG_COUNT_INFO_S *pCountInfo); +void MsgDecodeMsgInfo(char *pSrc, MSG_MESSAGE_INFO_S *pMsgInfo); + void MsgDecodeMsgInfo(char *pSrc, MSG_MESSAGE_INFO_S *pMsgInfo, MSG_SENDINGOPT_INFO_S* pSendOptInfo); void MsgDecodeFolderViewList(char *pSrc, msg_struct_list_s *pFolderViewList); @@ -114,8 +118,16 @@ void MsgDecodeThreadInfo(char *pSrc, MSG_THREAD_VIEW_S *pThreadInfo); int MsgMakeEvent(const void *pData, int DataSize, MSG_EVENT_TYPE_T MsgEvent, msg_error_t MsgError, void **ppEvent); +// Utin functions int msg_verify_number(const char *raw, char *trimmed); int msg_verify_email(const char *raw); +char* msg_clean_country_code(char *src); + +char* msg_normalize_number(char *src); + +msg_error_t MsgMakeSortRule(const MSG_SORT_RULE_S *pSortRule, char *pSqlSort); + +bool msg_is_valid_email(char *pAddress); #endif // MSG_UTIL_FUNCTION_H diff --git a/include/utils/MsgUtilStorage.h b/include/utils/MsgUtilStorage.h index 194d77e..1a8cffd 100755 --- a/include/utils/MsgUtilStorage.h +++ b/include/utils/MsgUtilStorage.h @@ -1,20 +1,17 @@ /* - * msg-service - * - * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved + * Copyright (c) 2014 Samsung Electronics Co., Ltd. All rights reserved * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * 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. - * */ #ifndef MSG_UTIL_STORAGE_H @@ -27,40 +24,80 @@ #include "MsgInternalTypes.h" #include "MsgStorageTypes.h" #include "MsgSqliteWrapper.h" - +#include "MsgSettingTypes.h" /*================================================================================================== FUNCTION PROTOTYPES ==================================================================================================*/ // Common Function + unsigned int MsgStoAddMessageTable(MsgDbHandler *pDbHandle, const MSG_MESSAGE_INFO_S *pMsgInfo); msg_error_t MsgStoSetReadStatus(MsgDbHandler *pDbHandle, msg_message_id_t MsgId, bool bRead); msg_error_t MsgStoGetOldestMessage(MsgDbHandler *pDbHandle, const MSG_MESSAGE_INFO_S *pMsgInfo, msg_message_id_t *pMsgId); msg_error_t MsgStoCheckMsgCntFull(MsgDbHandler *pDbHandle, const MSG_MESSAGE_TYPE_S* pMsgType, msg_folder_id_t FolderId); msg_error_t MsgStoCountMsgByLimitCategory(MsgDbHandler *pDbHandle, const MSG_MESSAGE_TYPE_S *pMsgType, int *pMsgCount, msg_folder_id_t folderId ); +msg_error_t MsgStocheckMemoryStatus(); int MsgStoCheckMsgCntLimit(const MSG_MESSAGE_TYPE_S* pMsgType, msg_folder_id_t FolderId); msg_error_t MsgStoAddAddress(MsgDbHandler *pDbHandle, const MSG_MESSAGE_INFO_S *pMsg, msg_thread_id_t *pConvId); -msg_error_t MsgStoGetAddressByMsgId(MsgDbHandler *pDbHandle, msg_message_id_t msgId, int contactNameOrder, int *nAddressCnt, MSG_ADDRESS_INFO_S *pAddress); + +//contacts-service is not used for gear +#ifndef MSG_CONTACTS_SERVICE_NOT_SUPPORTED +msg_error_t MsgStoGetAddressByMsgId(MsgDbHandler *pDbHandle, msg_message_id_t msgId, int contactNameOrder, int *nAddressCnt, MSG_ADDRESS_INFO_S **pAddress); msg_error_t MsgStoGetAddressByMsgId(MsgDbHandler *pDbHandle, msg_message_id_t msgId, int contactNameOrder, msg_struct_list_s *pAddress); msg_error_t MsgStoGetAddressByConvId(MsgDbHandler *pDbHandle, msg_thread_id_t convId, int contactNameOrder, msg_struct_list_s *pAddrlist); +#else +//contactNameOrder is never used +msg_error_t MsgStoGetAddressByMsgId(MsgDbHandler *pDbHandle, msg_message_id_t msgId, int *nAddressCnt, MSG_ADDRESS_INFO_S **pAddress); +msg_error_t MsgStoGetAddressByMsgId(MsgDbHandler *pDbHandle, msg_message_id_t msgId, msg_struct_list_s *pAddress); +msg_error_t MsgStoGetAddressByConvId(MsgDbHandler *pDbHandle, msg_thread_id_t convId, msg_struct_list_s *pAddrlist); +#endif //MSG_CONTACTS_SERVICE_NOT_SUPPORTED + +void MsgStoUpdateAddress(MsgDbHandler *pDbHandle, const MSG_MESSAGE_INFO_S *pMsg, msg_thread_id_t convId); msg_error_t MsgStoAddConversation(MsgDbHandler *pDbHandle, msg_thread_id_t *pConvId); msg_error_t MsgStoUpdateConversation(MsgDbHandler *pDbHandle, msg_thread_id_t convId); msg_error_t MsgStoSetConversationDisplayName(MsgDbHandler *pDbHandle, int contactId); msg_error_t MsgStoSetConversationDisplayName(MsgDbHandler *pDbHandle, msg_thread_id_t convId); msg_error_t MsgStoClearConversationTable(MsgDbHandler *pDbHandle); + +#ifdef FEATURE_SMS_CDMA +msg_error_t MsgStoAddCBChannelInfo(MsgDbHandler *pDbHandle, MSG_CB_CHANNEL_S *pCBChannel); +msg_error_t MsgStoGetCBChannelInfo(MsgDbHandler *pDbHandle, MSG_CB_CHANNEL_S *pCBChannel); +#else +msg_error_t MsgStoAddCBChannelInfo(MsgDbHandler *pDbHandle, MSG_CB_CHANNEL_S *pCBChannel, msg_sim_slot_id_t simIndex); +msg_error_t MsgStoGetCBChannelInfo(MsgDbHandler *pDbHandle, MSG_CB_CHANNEL_S *pCBChannel, msg_sim_slot_id_t simIndex); +#endif + bool MsgExistAddress(MsgDbHandler *pDbHandle, const MSG_MESSAGE_INFO_S *pMsg, msg_thread_id_t *pConvId); +bool MsgExistAddress(MsgDbHandler *pDbHandle, MSG_MESSAGE_INFO_S *pMsg, msg_thread_id_t convId, int index); +bool MsgExistConversation(MsgDbHandler *pDbHandle, msg_thread_id_t convId); +bool MsgExistMessage(MsgDbHandler *pDbHandle, MSG_MESSAGE_INFO_S *pMsg); int MsgStoGetUnreadCnt(MsgDbHandler *pDbHandle, MSG_MAIN_TYPE_T MsgType); msg_error_t MsgStoAddContactInfo(MsgDbHandler *pDbHandle, MSG_CONTACT_INFO_S *pContactInfo, const char *pNumber); -msg_error_t MsgStoResetContactInfo(MsgDbHandler *pDbHandle, int ContactId); -msg_error_t MsgStoClearContactInfo(MsgDbHandler *pDbHandle, int ContactId, const char *pNumber); +msg_error_t MsgStoClearContactInfoByAddrbookIdList(MsgDbHandler *pDbHandle, int* addrbookList, int addrbookCnt); +msg_error_t MsgStoClearContactInfo(MsgDbHandler *pDbHandle, int ContactId); +msg_error_t MsgStoResetContactInfo(MsgDbHandler *pDbHandle, int contactId); msg_error_t MsgStoGetMmsRawFilePath(MsgDbHandler *pDbHandle, msg_message_id_t msgId, char *pFilePath); bool MsgStoCheckReadReportRequested(MsgDbHandler *pDbHandle, msg_message_id_t MsgId); bool MsgStoCheckReadReportIsSent(MsgDbHandler *pDbHandle, msg_message_id_t MsgId); msg_error_t MsgStoUpdateNetworkStatus(MsgDbHandler *pDbHandle, MSG_MESSAGE_INFO_S *pMsgInfo, msg_network_status_t status); -char *MsgStoReplaceString(const char *org_str, const char *old_str, const char *new_str); -void MsgConvertNumber(const char* pSrcNum, char* pDestNum); -msg_error_t MsgStoRefreshConversationDisplayName(); + +// Lists +msg_error_t MsgStoGetFolderViewList(msg_folder_id_t FolderId, const MSG_SORT_RULE_S *pSortRule, msg_struct_list_s *pMsgFolderViewList); +msg_error_t MsgStoGetThreadViewList(const MSG_SORT_RULE_S *pSortRule, msg_struct_list_s *pThreadViewList); +msg_error_t MsgStoGetConversationViewItem(msg_message_id_t msgId, MSG_CONVERSATION_VIEW_S *pConv); +msg_error_t MsgStoGetConversationViewList(msg_thread_id_t ThreadId, msg_struct_list_s *pConvViewList); +msg_error_t MsgStoSearchMessage(const char *pSearchString, msg_struct_list_s *pThreadViewList); + +msg_error_t MsgStoGetRejectMsgList(const char *pNumber, msg_struct_list_s *pRejectMsgList); +msg_error_t MsgStoGetAddressList(const msg_thread_id_t threadId, msg_struct_list_s *pAddrList); +msg_error_t MsgStoGetMessageList(const MSG_LIST_CONDITION_S *pListCond, msg_struct_list_s *pMsgList); +msg_error_t MsgStoGetMediaList(const msg_thread_id_t threadId, msg_list_handle_t *pMediaList); + +#ifdef FEATURE_SMS_CDMA +msg_error_t MsgStoClearUniquenessTable(); +#endif + #endif // MSG_UTIL_STORAGE_H diff --git a/include/utils/MsgVMessage.h b/include/utils/MsgVMessage.h index 1f9aa00..ad9f3e3 100755 --- a/include/utils/MsgVMessage.h +++ b/include/utils/MsgVMessage.h @@ -1,20 +1,17 @@ /* - * msg-service - * - * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved + * Copyright (c) 2014 Samsung Electronics Co., Ltd. All rights reserved * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * 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. - * */ #ifndef MSG_VMESSAGE_H |