2 * Copyright (c) 2016 Samsung Electronics Co., Ltd. All rights reserved
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
17 #ifndef __MSG_MGR_CONTACT_H__
18 #define __MSG_MGR_CONTACT_H__
20 /*==================================================================================================
22 ==================================================================================================*/
26 /*==================================================================================================
28 ==================================================================================================*/
29 #define MAX_CONTACT_TEXT_LEN 100
32 /*==================================================================================================
34 ==================================================================================================*/
35 typedef struct _contactInfo {
36 msg_message_id_t msgId;
40 char msgText[MAX_CONTACT_TEXT_LEN + 1];
41 char subject[MAX_CONTACT_TEXT_LEN + 1];
42 msg_list_handle_t addrList;
46 msg_contact_id_t contactId; /**< Indicates the unique contact ID. */
47 int addrbookId; /**< Indicates the address book ID. */
48 char firstName[MAX_DISPLAY_NAME_LEN+1]; /**< Indicates the first name of contact. */
49 char lastName[MAX_DISPLAY_NAME_LEN+1]; /**< Indicates the last name of contact. */
50 char middleName[MAX_DISPLAY_NAME_LEN+1]; /**< Indicates the middle name of contact. */
51 char prefix[MAX_DISPLAY_NAME_LEN+1]; /**< Indicates the prefix of contact. */
52 char suffix[MAX_DISPLAY_NAME_LEN+1]; /**< Indicates the suffix of contact. */
53 char imagePath[MSG_FILEPATH_LEN_MAX+1]; /**< Indicates the image path of contact. */
54 char alerttonePath[MSG_FILEPATH_LEN_MAX+1]; /**< Indicates the message alert tone path of contact. */
55 char vibrationPath[MSG_FILEPATH_LEN_MAX+1]; /**< Indicates the vibration path of contact. */
56 } MSG_MGR_CONTACT_INFO_S;
59 msg_address_type_t addressType; /**< The type of an address in case of an Email or a mobile phone */
60 msg_recipient_type_t recipientType; /**< The type of recipient address in case of To, Cc, and Bcc */
61 msg_contact_id_t contactId; /**< The contact ID of address */
62 char addressVal[MAX_ADDRESS_VAL_LEN+1]; /**< The actual value of an address */
63 char displayName[MAX_DISPLAY_NAME_LEN+1]; /**< The display name of an address */
64 } MSG_MGR_ADDRESS_INFO_S;
66 /*==================================================================================================
68 ==================================================================================================*/
70 int MsgMgrOpenContactSvc();
71 int MsgMgrCloseContactSvc();
72 int MsgMgrGetContactInfo(const MSG_MGR_ADDRESS_INFO_S *pAddrInfo, MSG_MGR_CONTACT_INFO_S *pContactInfo);
74 char* msg_mgr_clean_country_code(char *src);
75 char* msg_mgr_normalize_number(char *src);
77 #endif /*__MSG_MGR_CONTACT_H__ */