2 * Copyright (c) 2014 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_NOTIFICATION_WRAPPER_H
18 #define MSG_NOTIFICATION_WRAPPER_H
20 /*==================================================================================================
22 ==================================================================================================*/
23 #include "MsgInternalTypes.h"
25 /*==================================================================================================
27 ==================================================================================================*/
28 #define MSG_APP_PACKAGE_NAME "message"
30 #define MSG_APP_LOCALEDIR TZ_SYS_RO_APP_PATH "/" MSG_DEFAULT_APP_ID "/res/locale"
33 #ifndef TIZEN_I586_ENABLED
34 /* message app string for ticker noti */
35 #define SENDING_MULTIMEDIA_MESSAGE_FAILED "IDS_MSGF_POP_SENDING_MULTIMEDIA_MESSAGE_FAILED"
36 #define MULTIMEDIA_MESSAGE_SENT "IDS_MSGF_POP_MULTIMEDIA_MESSAGE_SENT"
37 #define RETRIEVING_MESSAGE_FAILED "IDS_MSGF_POP_RETRIEVING_MESSAGE_FAILED"
38 #define MESSAGE_RETRIEVED "IDS_MSGF_BODY_MESSAGE_RETRIEVED"
39 #define SMS_MESSAGE_SENT "IDS_MSGC_POP_MESSAGESENT"
40 #define SMS_MESSAGE_SENDING_FAIL "IDS_MSGF_POP_SENDING_MESSAGE_FAILED"
41 #define SMS_MESSAGE_SENDING_PENDING "IDS_MSG_TPOP_NETWORK_NOT_AVAILABLE_MESSAGE_WILL_BE_SENT_WHEN_CONNECTED_TO_NETWORK"
42 #define SMS_MESSAGE_SIM_MESSAGE_FULL "IDS_MSGF_BODY_SIM_MEMORY_FULL_DELETE_SOME_ITEMS"
43 #define SMS_MESSAGE_MEMORY_FULL "IDS_MSGF_POP_NOT_ENOUGH_MEMORY_DELETE_SOME_ITEMS"
44 #define SMS_FDN_RESTRICTED "IDS_MSGF_POP_FDN_ENABLED_CANT_SEND_MSG"
45 #define SMS_MESSAGE_SIZE_OVER_SIM_SLOT_SIZE "IDS_MSGF_BODY_MESSAGE_IS_TOO_LARGE_TO_STORE_AS_A_SINGLE_MESSAGE_TO_SIM_CARD"
48 /* message app string for ticker noti */
49 #define SENDING_MULTIMEDIA_MESSAGE_FAILED "Sending multimedia message failed"
50 #define MULTIMEDIA_MESSAGE_SENT "Multimedia message sent."
51 #define RETRIEVING_MESSAGE_FAILED "Retrieving message failed"
52 #define MESSAGE_RETRIEVED "Message retrieved"
53 #define SMS_MESSAGE_SENT "Message sent."
54 #define SMS_MESSAGE_SENDING_FAIL "Sending message failed."
55 #define SMS_MESSAGE_SENDING_PENDING "Network not available. Message will be sent when connected to network."
56 #define SMS_MESSAGE_SIM_MESSAGE_FULL "SIM memory full. Delete some items."
57 #define SMS_MESSAGE_MEMORY_FULL "Not enough memory. Delete some items."
58 #define SMS_FDN_RESTRICTED "Unable to send the message while Fixed dialling mode is enabled."
59 #define SMS_MESSAGE_SIZE_OVER_SIM_SLOT_SIZE "Message is too large to store as a single message to SIM card."
63 enum _msg_notification_type_e {
64 MSG_NOTI_TYPE_ALL = 0x00,
66 /* Refresh single/multiple notification */
72 /* Add only single notification */
73 MSG_NOTI_TYPE_VOICE_1,
74 MSG_NOTI_TYPE_VOICE_2,
77 MSG_NOTI_TYPE_SMS_DELIVERY_REPORT,
78 MSG_NOTI_TYPE_MMS_READ_REPORT,
79 MSG_NOTI_TYPE_MMS_DELIVERY_REPORT,
80 MSG_NOTI_TYPE_MMS_READ_REPORT_SENT,
82 MSG_NOTI_TYPE_SIM_FULL,
85 enum _msg_active_notification_type_e {
86 MSG_ACTIVE_NOTI_TYPE_NONE,
87 MSG_ACTIVE_NOTI_TYPE_ACTIVE,
88 MSG_ACTIVE_NOTI_TYPE_INSTANT,
91 enum _MSG_SOUND_TYPE_E {
92 MSG_SOUND_PLAY_DEFAULT = 0,
94 MSG_SOUND_PLAY_EMERGENCY,
95 MSG_SOUND_PLAY_VOICEMAIL,
98 typedef unsigned char msg_notification_type_t; /* _msg_notification_type_e */
99 typedef unsigned char msg_active_notification_type_t; /* _msg_active_notification_type_e */
100 typedef unsigned char MSG_SOUND_TYPE_T;
102 msg_error_t MsgInsertNotification(MSG_MESSAGE_INFO_S *msg_info);
104 msg_error_t MsgAddNotification(msg_notification_type_t noti_type, MSG_MESSAGE_INFO_S *msg_info);
105 msg_error_t MsgRefreshNotification(msg_notification_type_t noti_type, bool bFeedback, msg_active_notification_type_t active_type);
106 msg_error_t MsgAddReportNotification(msg_notification_type_t noti_type, MSG_MESSAGE_INFO_S *msg_info);
107 msg_error_t MsgInsertOnlyActiveNotification(msg_notification_type_t noti_type, MSG_MESSAGE_INFO_S *pMsgInfo);
108 msg_error_t MsgDeleteReportNotification(const char *addr);
109 msg_error_t MsgIsSentReadReportNotificationExist(int threadId, int *msgId);
110 msg_error_t MsgDeleteSentReadReportNotification(int msgId);
112 msg_error_t MsgInsertTicker(const char* pTickerMsg, const char* pLocaleTickerMsg, bool bPlayFeedback, int msgId);
113 msg_error_t MsgDeleteNoti(msg_notification_type_t noti_type, int simIndex);
115 void MsgSoundPlayStart(const MSG_ADDRESS_INFO_S *pAddrInfo, MSG_SOUND_TYPE_T soundType);
117 void MsgRefreshAllNotification(bool bWithSimNoti, bool bFeedback, msg_active_notification_type_t active_type);
119 void MsgBootMsgMgr();