summaryrefslogtreecommitdiff
path: root/manager
diff options
context:
space:
mode:
authorKyeonghun Lee <kh9090.lee@samsung.com>2016-06-16 17:51:45 +0900
committerKyeonghun Lee <kh9090.lee@samsung.com>2016-06-16 17:51:45 +0900
commitca7ecee4c05ef7d5e50ea8e533033ac1bed5f4e2 (patch)
tree088083ce9a17f0714bcee33de726e24a871580d6 /manager
parent27d5d95f853801c518270e83f3558e66ded53e50 (diff)
downloadmsg-service-ca7ecee4c05ef7d5e50ea8e533033ac1bed5f4e2.tar.gz
msg-service-ca7ecee4c05ef7d5e50ea8e533033ac1bed5f4e2.tar.bz2
msg-service-ca7ecee4c05ef7d5e50ea8e533033ac1bed5f4e2.zip
apply tizen c++ coding rule
Change-Id: If5b90dc8e774ccfc723f305267c9f1fd96755b9e Signed-off-by: Kyeonghun Lee <kh9090.lee@samsung.com>
Diffstat (limited to 'manager')
-rw-r--r--manager/src/msg-manager-notification.cpp30
-rw-r--r--manager/src/msg-manager-sound.cpp2
-rw-r--r--manager/src/msg-manager.cpp14
3 files changed, 20 insertions, 26 deletions
diff --git a/manager/src/msg-manager-notification.cpp b/manager/src/msg-manager-notification.cpp
index 0c417df..06902a6 100644
--- a/manager/src/msg-manager-notification.cpp
+++ b/manager/src/msg-manager-notification.cpp
@@ -388,7 +388,7 @@ int MsgMgrRefreshNotification(msg_mgr_notification_type_t noti_type, bool bFeedb
int bNotification = 1;
/* bool bReplyPopup = false; */
- MSG_MGR_NOTI_INFO_S noti_info = {0,};
+ MSG_MGR_NOTI_INFO_S noti_info = {0, };
noti_info.type = noti_type;
noti_info.id = getPrivId(noti_info.type, -1);
@@ -445,7 +445,7 @@ int MsgMgrAddReportNotification(msg_mgr_notification_type_t noti_type, MSG_MGR_M
report_notification_s *info = new report_notification_s;
memset(info, 0x00, sizeof(report_notification_s));
- MSG_MGR_NOTI_INFO_S noti_info = {0,};
+ MSG_MGR_NOTI_INFO_S noti_info = {0, };
noti_info.type = noti_type;
createInfoData(&noti_info, msg_info);
@@ -952,12 +952,6 @@ void setText(notification_h noti_h, MSG_MGR_NOTI_INFO_S *noti_info)
setNotiText(noti_h, NOTIFICATION_TEXT_TYPE_INFO_1, "Message unreachable", UNREACHABLE_MESSAGE);
else if (noti_info->extra_data == MSG_DELIVERY_REPORT_ERROR)
setNotiText(noti_h, NOTIFICATION_TEXT_TYPE_INFO_1, "Message error", NULL);
- /* CID 45672: noti_info->extra_data in unsigned char but MSG_READ_REPORT_NONE is -1. So the expression is always false */
-#if 0
- else if (noti_info->extra_data == MSG_DELIVERY_REPORT_NONE) {
- /* notification free */
- }
-#endif
else
setNotiText(noti_h, NOTIFICATION_TEXT_TYPE_INFO_1, "Message delivered", DELIVERED_MESSAGE);
@@ -1213,8 +1207,8 @@ void setSoundAndVibration(notification_h noti_h, char *addressVal, bool bVoiceMa
{
MSG_MGR_BEGIN();
- MSG_MGR_ADDRESS_INFO_S addrInfo = {0,};
- MSG_MGR_CONTACT_INFO_S contactInfo = {0,};
+ MSG_MGR_ADDRESS_INFO_S addrInfo = {0, };
+ MSG_MGR_CONTACT_INFO_S contactInfo = {0, };
if (addressVal != NULL) {
snprintf(addrInfo.addressVal, sizeof(addrInfo.addressVal), "%s", addressVal);
@@ -1239,9 +1233,9 @@ void setSoundAndVibration(notification_h noti_h, char *addressVal, bool bVoiceMa
MsgMgrGetPlayStatus(bVoiceMail, &bPlaySound, &bPlayVibration, &bOnCall);
if (bPlaySound) {
- if (msg_tone_file_path)
+ if (msg_tone_file_path) {
setNotiSound(noti_h, NOTIFICATION_SOUND_TYPE_USER_DATA, msg_tone_file_path);
- else {
+ } else {
int tmpVal = 0;
if (vconf_get_int(MSG_SETTING_RINGTONE_TYPE, &tmpVal) != 0) {
MSG_MGR_INFO("MsgSettingGetInt() is failed");
@@ -2057,11 +2051,11 @@ int getLatestMsgInfo(MSG_MGR_NOTI_INFO_S *noti_info, bool isForInstantMessage)
noti_info->count = atoi(db_res[col_cnt+6]);
if (noti_info->count > 0) {
- MSG_MGR_ADDRESS_INFO_S addrInfo = {0,};
+ MSG_MGR_ADDRESS_INFO_S addrInfo = {0, };
snprintf(addrInfo.addressVal, MAX_ADDRESS_VAL_LEN, "%s", db_res[col_cnt]);
- MSG_MGR_CONTACT_INFO_S tmpContact = {0,};
+ MSG_MGR_CONTACT_INFO_S tmpContact = {0, };
MsgMgrGetContactInfo(&addrInfo, &tmpContact);
@@ -2385,8 +2379,8 @@ void createInfoData(MSG_MGR_NOTI_INFO_S *noti_info, MSG_MGR_MESSAGE_INFO_S *msg_
noti_info->time = msg_info->displayTime;
noti_info->extra_data = msg_info->networkStatus;
- MSG_MGR_CONTACT_INFO_S contactInfo = {0,};
- MSG_MGR_ADDRESS_INFO_S tmpAddressInfo = {0,};
+ MSG_MGR_CONTACT_INFO_S contactInfo = {0, };
+ MSG_MGR_ADDRESS_INFO_S tmpAddressInfo = {0, };
if (msg_info->addressVal[0] != '\0') {
snprintf(tmpAddressInfo.addressVal, MAX_ADDRESS_VAL_LEN, "%s", msg_info->addressVal);
if (_is_valid_email(msg_info->addressVal)) {
@@ -2421,8 +2415,8 @@ void createInfoData(MSG_MGR_NOTI_INFO_S *noti_info, MSG_MGR_MESSAGE_INFO_S *msg_
noti_info->layout = NOTIFICATION_LY_NOTI_EVENT_SINGLE;
noti_info->time = msg_info->displayTime;
- MSG_MGR_CONTACT_INFO_S contactInfo = {0,};
- MSG_MGR_ADDRESS_INFO_S tmpAddressInfo = {0,};
+ MSG_MGR_CONTACT_INFO_S contactInfo = {0, };
+ MSG_MGR_ADDRESS_INFO_S tmpAddressInfo = {0, };
if (msg_info->addressVal[0] != '\0') {
snprintf(tmpAddressInfo.addressVal, MAX_ADDRESS_VAL_LEN, "%s", msg_info->addressVal);
if (_is_valid_email(msg_info->addressVal)) {
diff --git a/manager/src/msg-manager-sound.cpp b/manager/src/msg-manager-sound.cpp
index 69a7d57..55d3920 100644
--- a/manager/src/msg-manager-sound.cpp
+++ b/manager/src/msg-manager-sound.cpp
@@ -341,7 +341,7 @@ void MsgMgrSoundPlayStart(const MSG_MGR_ADDRESS_INFO_S *pAddrInfo, MSG_MGR_SOUND
return;
}
- MSG_MGR_CONTACT_INFO_S contactInfo = {0,};
+ MSG_MGR_CONTACT_INFO_S contactInfo = {0, };
if (pAddrInfo) {
if (MsgMgrGetContactInfo(pAddrInfo, &contactInfo) != 0) {
MSG_MGR_DEBUG("MsgGetContactInfo() fail.");
diff --git a/manager/src/msg-manager.cpp b/manager/src/msg-manager.cpp
index 0bb8fc2..b358d5e 100644
--- a/manager/src/msg-manager.cpp
+++ b/manager/src/msg-manager.cpp
@@ -149,7 +149,7 @@ void _incoming_msg_func(app_control_h app_control)
msg_message_id_t msg_id = atoi(rcv_msg_id);
msg_struct_t msg = NULL;
msg_struct_t opt = NULL;
- contactInfo contact_info = {0,};
+ contactInfo contact_info = {0, };
contact_info.msgId = msg_id;
msg = msg_create_struct(MSG_STRUCT_MESSAGE_INFO);
@@ -210,7 +210,7 @@ void _outgoing_msg_func(app_control_h app_control)
msg_message_id_t msg_id = atoi(sent_msg_id);
msg_struct_t msg = NULL;
msg_struct_t opt = NULL;
- contactInfo contact_info = {0,};
+ contactInfo contact_info = {0, };
contact_info.msgId = msg_id;
msg = msg_create_struct(MSG_STRUCT_MESSAGE_INFO);
@@ -325,7 +325,7 @@ void _add_noti_func(app_control_h app_control)
msg_struct_t msg = NULL;
msg_struct_t opt = NULL;
msg_list_handle_t addr_list = NULL;
- MSG_MGR_MESSAGE_INFO_S msg_info = {0,};
+ MSG_MGR_MESSAGE_INFO_S msg_info = {0, };
msg_info.msgId = msg_id;
msg = msg_create_struct(MSG_STRUCT_MESSAGE_INFO);
@@ -432,7 +432,7 @@ void _add_report_noti_func(app_control_h app_control)
msg_struct_t msg = NULL;
msg_struct_t opt = NULL;
msg_list_handle_t addr_list = NULL;
- MSG_MGR_MESSAGE_INFO_S msg_info = {0,};
+ MSG_MGR_MESSAGE_INFO_S msg_info = {0, };
msg_info.msgId = msg_id;
msg = msg_create_struct(MSG_STRUCT_MESSAGE_INFO);
@@ -505,7 +505,7 @@ void _insert_only_active_noti_func(app_control_h app_control)
msg_struct_t msg = NULL;
msg_struct_t opt = NULL;
msg_list_handle_t addr_list = NULL;
- MSG_MGR_MESSAGE_INFO_S msg_info = {0,};
+ MSG_MGR_MESSAGE_INFO_S msg_info = {0, };
msg_info.msgId = msg_id;
msg = msg_create_struct(MSG_STRUCT_MESSAGE_INFO);
@@ -624,7 +624,7 @@ void _sound_play_start_func(app_control_h app_control)
ret = app_control_get_extra_data(app_control, "address", &addr);
if (addr) {
- MSG_MGR_ADDRESS_INFO_S addr_info = {0,};
+ MSG_MGR_ADDRESS_INFO_S addr_info = {0, };
snprintf(addr_info.addressVal, MAX_ADDRESS_VAL_LEN, "%s", addr);
MsgMgrSoundPlayStart(&addr_info, sound_type);
@@ -699,7 +699,7 @@ void service_app_control(app_control_h app_control, void *data)
int main(int argc, char* argv[])
{
- service_app_lifecycle_callback_s event_callback = {0,};
+ service_app_lifecycle_callback_s event_callback = {0, };
event_callback.create = service_app_create;
event_callback.terminate = service_app_terminate;