apply Tizen 3.0 Message UX Guide
[platform/core/messaging/msg-service.git] / include / externals / MsgNotificationWrapper.h
1 /*
2  * Copyright (c) 2014 Samsung Electronics Co., Ltd. All rights reserved
3  *
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
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
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.
15 */
16
17 #ifndef MSG_NOTIFICATION_WRAPPER_H
18 #define MSG_NOTIFICATION_WRAPPER_H
19
20 /*==================================================================================================
21                                                                                         INCLUDE FILES
22 ==================================================================================================*/
23 #include "MsgInternalTypes.h"
24
25 /*==================================================================================================
26                                                                                         DEFINES
27 ==================================================================================================*/
28 #define MSG_APP_PACKAGE_NAME    "message"
29
30 #define MSG_APP_LOCALEDIR                       TZ_SYS_RO_APP_PATH "/" MSG_DEFAULT_APP_ID "/res/locale"
31
32
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"
46
47 #else
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."
60
61 #endif
62
63 enum _msg_notification_type_e {
64         MSG_NOTI_TYPE_ALL = 0x00,
65
66         /* Refresh single/multiple notification */
67         MSG_NOTI_TYPE_NORMAL,
68         MSG_NOTI_TYPE_CB,
69         MSG_NOTI_TYPE_SIM,
70         MSG_NOTI_TYPE_FAILED,
71
72         /* Add only single notification */
73         MSG_NOTI_TYPE_VOICE_1,
74         MSG_NOTI_TYPE_VOICE_2,
75         MSG_NOTI_TYPE_MWI,
76         MSG_NOTI_TYPE_CLASS0,
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,
81
82         MSG_NOTI_TYPE_SIM_FULL,
83 };
84
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,
89 };
90
91 enum _MSG_SOUND_TYPE_E {
92         MSG_SOUND_PLAY_DEFAULT = 0,
93         MSG_SOUND_PLAY_USER,
94         MSG_SOUND_PLAY_EMERGENCY,
95         MSG_SOUND_PLAY_VOICEMAIL,
96 };
97
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;
101
102 msg_error_t MsgInsertNotification(MSG_MESSAGE_INFO_S *msg_info);
103
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);
111
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);
114
115 void MsgSoundPlayStart(const MSG_ADDRESS_INFO_S *pAddrInfo, MSG_SOUND_TYPE_T soundType);
116
117 void MsgRefreshAllNotification(bool bWithSimNoti, bool bFeedback, msg_active_notification_type_t active_type);
118
119 void MsgBootMsgMgr();
120
121 #endif