TizenRefApp-8014 Fix code style 37/114037/2
authorOleksander Kostenko <o.kostenko@samsung.com>
Thu, 9 Feb 2017 15:39:51 +0000 (17:39 +0200)
committerOleksandr Kostenko <o.kostenko@samsung.com>
Mon, 13 Feb 2017 09:23:06 +0000 (01:23 -0800)
Change-Id: I1198d868c8a66013c4cd0b9315e35b52fbe091bf
Signed-off-by: Oleksander Kostenko <o.kostenko@samsung.com>
312 files changed:
src/Common/AppControl/inc/AppControlCommand.h
src/Common/AppControl/inc/AppControlCompose.h
src/Common/AppControl/inc/AppControlDefault.h
src/Common/AppControl/inc/AppControlLauncher.h
src/Common/AppControl/inc/AppControlParser.h
src/Common/AppControl/inc/AppControlUtils.h
src/Common/AppControl/inc/ContactEditor.h
src/Common/AppControl/inc/ContactViewer.h
src/Common/AppControl/inc/FileViewer.h
src/Common/AppControl/inc/Share.h
src/Common/AppControl/inc/VoiceCall.h
src/Common/AppControl/src/AppControlCompose.cpp
src/Common/AppControl/src/AppControlDefault.cpp
src/Common/AppControl/src/AppControlLauncher.cpp
src/Common/AppControl/src/AppControlParser.cpp
src/Common/AppControl/src/AppControlUtils.cpp
src/Common/AppControl/src/ContactEditor.cpp
src/Common/AppControl/src/ContactViewer.cpp
src/Common/AppControl/src/FileViewer.cpp
src/Common/AppControl/src/Share.cpp
src/Common/AppControl/src/VoiceCall.cpp
src/Common/ContactManager/inc/Contact.h
src/Common/ContactManager/inc/ContactAddress.h
src/Common/ContactManager/inc/ContactList.h
src/Common/ContactManager/inc/ContactManager.h
src/Common/ContactManager/inc/ContactMyProfile.h
src/Common/ContactManager/inc/ContactMyProfileEmail.h
src/Common/ContactManager/inc/ContactMyProfileNumber.h
src/Common/ContactManager/inc/ContactPersonEmail.h
src/Common/ContactManager/inc/ContactPersonNumber.h
src/Common/ContactManager/inc/ContactPersonPhoneLog.h
src/Common/ContactManager/inc/ContactRecord.h
src/Common/ContactManager/src/ContactManager.cpp
src/Common/ContactManager/src/ContactRecord.cpp
src/Common/ContactManager/src/ContactVCardGenerator.cpp
src/Common/Controller/inc/App.h
src/Common/Controller/inc/BaseController.h
src/Common/Controller/inc/FrameController.h
src/Common/Controller/inc/MbeRecipients.h
src/Common/Controller/inc/NaviFrameController.h
src/Common/Controller/inc/SaveAttachments.h
src/Common/Controller/inc/SaveAttachmentsListItem.h
src/Common/Controller/inc/ViewController.h
src/Common/Controller/inc/ViewItemController.h
src/Common/Controller/src/App.cpp
src/Common/Controller/src/FrameController.cpp
src/Common/Controller/src/MbeRecipients.cpp
src/Common/Controller/src/NaviFrameController.cpp
src/Common/Controller/src/SaveAttachments.cpp
src/Common/Controller/src/SaveAttachmentsListItem.cpp
src/Common/MsgEngine/inc/MediaType.h
src/Common/MsgEngine/inc/Message.h
src/Common/MsgEngine/inc/MessageMms.h
src/Common/MsgEngine/inc/MessageSMS.h
src/Common/MsgEngine/inc/MsgAddress.h
src/Common/MsgEngine/inc/MsgAttachment.h
src/Common/MsgEngine/inc/MsgComposer.h
src/Common/MsgEngine/inc/MsgConvMedia.h
src/Common/MsgEngine/inc/MsgConversationItem.h
src/Common/MsgEngine/inc/MsgEngine.h
src/Common/MsgEngine/inc/MsgList.h
src/Common/MsgEngine/inc/MsgMedia.h
src/Common/MsgEngine/inc/MsgPage.h
src/Common/MsgEngine/inc/MsgReport.h
src/Common/MsgEngine/inc/MsgSettings.h
src/Common/MsgEngine/inc/MsgStorage.h
src/Common/MsgEngine/inc/MsgThreadItem.h
src/Common/MsgEngine/inc/MsgTransport.h
src/Common/MsgEngine/inc/MsgTypes.h
src/Common/MsgEngine/inc/MsgUtils.h
src/Common/MsgEngine/src/MsgEngine.cpp
src/Common/MsgEngine/src/MsgSettings.cpp
src/Common/MsgEngine/src/MsgStorage.cpp
src/Common/MsgEngine/src/MsgUtils.cpp
src/Common/MsgEngine/src/private/MessageMmsPrivate.cpp
src/Common/MsgEngine/src/private/MessageMmsPrivate.h
src/Common/MsgEngine/src/private/MessagePrivate.cpp
src/Common/MsgEngine/src/private/MessagePrivate.h
src/Common/MsgEngine/src/private/MessageSMSPrivate.h
src/Common/MsgEngine/src/private/MsgAddressPrivate.h
src/Common/MsgEngine/src/private/MsgAttachmentPrivate.cpp
src/Common/MsgEngine/src/private/MsgAttachmentPrivate.h
src/Common/MsgEngine/src/private/MsgComposerPrivate.cpp
src/Common/MsgEngine/src/private/MsgComposerPrivate.h
src/Common/MsgEngine/src/private/MsgConvMediaPrivate.h
src/Common/MsgEngine/src/private/MsgConversationItemPrivate.h
src/Common/MsgEngine/src/private/MsgDefPrivate.h
src/Common/MsgEngine/src/private/MsgListHandlePrivate.h
src/Common/MsgEngine/src/private/MsgMediaPrivate.cpp
src/Common/MsgEngine/src/private/MsgMediaPrivate.h
src/Common/MsgEngine/src/private/MsgPagePrivate.h
src/Common/MsgEngine/src/private/MsgReportPrivate.h
src/Common/MsgEngine/src/private/MsgSettingsPrivate.cpp
src/Common/MsgEngine/src/private/MsgSettingsPrivate.h
src/Common/MsgEngine/src/private/MsgStoragePrivate.cpp
src/Common/MsgEngine/src/private/MsgStoragePrivate.h
src/Common/MsgEngine/src/private/MsgStructListPrivate.h
src/Common/MsgEngine/src/private/MsgStructPrivate.h
src/Common/MsgEngine/src/private/MsgThreadItemPrivate.h
src/Common/MsgEngine/src/private/MsgTransportPrivate.cpp
src/Common/MsgEngine/src/private/MsgTransportPrivate.h
src/Common/MsgEngine/src/private/MsgUtilsPrivate.cpp
src/Common/MsgEngine/src/private/MsgUtilsPrivate.h
src/Common/SystemSettingsManager/inc/SystemSettingsManager.h
src/Common/SystemSettingsManager/src/SystemSettingsManager.cpp
src/Common/Utils/inc/BidirectUtils.h
src/Common/Utils/inc/FileUtils.h
src/Common/Utils/inc/HwButtonListener.h
src/Common/Utils/inc/LangUtils.h
src/Common/Utils/inc/LoggerImpl.h
src/Common/Utils/inc/MediaUtils.h
src/Common/Utils/inc/PathUtils.h
src/Common/Utils/inc/PhoneNumberUtils.h
src/Common/Utils/inc/TextDecorator.h
src/Common/Utils/inc/ThumbnailMaker.h
src/Common/Utils/inc/TimeUtils.h
src/Common/Utils/inc/VCalendarParser.h
src/Common/Utils/src/FileUtils.cpp
src/Common/Utils/src/HwButtonListener.cpp
src/Common/Utils/src/LoggerImpl.cpp
src/Common/Utils/src/MediaUtils.cpp
src/Common/Utils/src/PathUtils.cpp
src/Common/Utils/src/PhoneNumberUtils.cpp
src/Common/Utils/src/TextDecorator.cpp
src/Common/Utils/src/ThumbnailMaker.cpp
src/Common/Utils/src/TimeUtils.cpp
src/Common/Utils/src/VCalendarParser.cpp
src/Common/View/inc/AtspiAccessibleInterface.h
src/Common/View/inc/BaseView.h
src/Common/View/inc/Box.h
src/Common/View/inc/ContextPopup.h
src/Common/View/inc/DefaultLayout.h
src/Common/View/inc/ListItem.h
src/Common/View/inc/ListView.h
src/Common/View/inc/MbeRecipientViewItem.h
src/Common/View/inc/MbeRecipientsView.h
src/Common/View/inc/NaviFrameItem.h
src/Common/View/inc/NaviFrameView.h
src/Common/View/inc/NoContentLayout.h
src/Common/View/inc/Popup.h
src/Common/View/inc/PopupAttachmentListItem.h
src/Common/View/inc/PopupList.h
src/Common/View/inc/PopupListItem.h
src/Common/View/inc/PopupManager.h
src/Common/View/inc/Scroller.h
src/Common/View/inc/SelectAllListItem.h
src/Common/View/inc/StandardWindow.h
src/Common/View/inc/View.h
src/Common/View/inc/ViewItem.h
src/Common/View/inc/Window.h
src/Common/View/src/ContextPopup.cpp
src/Common/View/src/DefaultLayout.cpp
src/Common/View/src/ListItem.cpp
src/Common/View/src/ListView.cpp
src/Common/View/src/MbeRecipientsView.cpp
src/Common/View/src/NaviFrameItem.cpp
src/Common/View/src/NaviFrameView.cpp
src/Common/View/src/Popup.cpp
src/Common/View/src/PopupList.cpp
src/Common/View/src/PopupManager.cpp
src/Common/View/src/SelectAllListItem.cpp
src/Common/View/src/View.cpp
src/Conversation/AppControl/inc/AttachPanel.h
src/Conversation/AppControl/inc/ContactPicker.h
src/Conversation/AppControl/inc/SettingsNetwork.h
src/Conversation/AppControl/src/AttachPanel.cpp
src/Conversation/AppControl/src/ContactPicker.cpp
src/Conversation/Body/Controller/inc/Body.h
src/Conversation/Body/Controller/src/Body.cpp
src/Conversation/Body/View/inc/BodyView.h
src/Conversation/Body/View/src/BodyView.cpp
src/Conversation/ContactList/Controller/inc/ContactListItem.h
src/Conversation/ContactList/Controller/inc/ConvContactList.h
src/Conversation/ContactList/Controller/src/ConvContactList.cpp
src/Conversation/ContactList/View/inc/ContactListViewItem.h
src/Conversation/ContactList/View/inc/ConvContactListView.h
src/Conversation/ContactList/View/src/ContactListViewItem.cpp
src/Conversation/ConvList/Controller/inc/BubbleAudioEntity.h
src/Conversation/ConvList/Controller/inc/BubbleBgEntity.h
src/Conversation/ConvList/Controller/inc/BubbleCalEventEntity.h
src/Conversation/ConvList/Controller/inc/BubbleContactEntity.h
src/Conversation/ConvList/Controller/inc/BubbleDownloadButtonEntity.h
src/Conversation/ConvList/Controller/inc/BubbleEntity.h
src/Conversation/ConvList/Controller/inc/BubbleEntityFactory.h
src/Conversation/ConvList/Controller/inc/BubbleImageEntity.h
src/Conversation/ConvList/Controller/inc/BubbleTextEntity.h
src/Conversation/ConvList/Controller/inc/BubbleUnknownFileEntity.h
src/Conversation/ConvList/Controller/inc/BubbleVideoEntity.h
src/Conversation/ConvList/Controller/inc/ComposeListItem.h
src/Conversation/ConvList/Controller/inc/ConvList.h
src/Conversation/ConvList/Controller/inc/ConvListItem.h
src/Conversation/ConvList/Controller/inc/DateLineItem.h
src/Conversation/ConvList/Controller/inc/MsgDetailsPopup.h
src/Conversation/ConvList/Controller/src/BubbleCalEventEntity.cpp
src/Conversation/ConvList/Controller/src/BubbleContactEntity.cpp
src/Conversation/ConvList/Controller/src/BubbleEntityFactory.cpp
src/Conversation/ConvList/Controller/src/ComposeListItem.cpp
src/Conversation/ConvList/Controller/src/ConvList.cpp
src/Conversation/ConvList/Controller/src/ConvListItem.cpp
src/Conversation/ConvList/Controller/src/MsgDetailsPopup.cpp
src/Conversation/ConvList/View/inc/BubbleAudioViewItem.h
src/Conversation/ConvList/View/inc/BubbleBgViewItem.h
src/Conversation/ConvList/View/inc/BubbleCalEventViewItem.h
src/Conversation/ConvList/View/inc/BubbleContactViewItem.h
src/Conversation/ConvList/View/inc/BubbleDownloadButtonViewItem.h
src/Conversation/ConvList/View/inc/BubbleIconTextLayoutItem.h
src/Conversation/ConvList/View/inc/BubbleImageViewItem.h
src/Conversation/ConvList/View/inc/BubbleItemContainer.h
src/Conversation/ConvList/View/inc/BubbleTextViewItem.h
src/Conversation/ConvList/View/inc/BubbleUnknownFileViewItem.h
src/Conversation/ConvList/View/inc/BubbleVideoViewItem.h
src/Conversation/ConvList/View/inc/BubbleViewItem.h
src/Conversation/ConvList/View/inc/ComposeListViewItem.h
src/Conversation/ConvList/View/inc/ConvListLayout.h
src/Conversation/ConvList/View/inc/ConvListViewItem.h
src/Conversation/ConvList/View/inc/ConvSelectAll.h
src/Conversation/ConvList/View/inc/DateLineViewItem.h
src/Conversation/ConvList/View/src/BubbleBgViewItem.cpp
src/Conversation/ConvList/View/src/BubbleIconTextLayoutItem.cpp
src/Conversation/ConvList/View/src/BubbleImageViewItem.cpp
src/Conversation/ConvList/View/src/BubbleItemContainer.cpp
src/Conversation/ConvList/View/src/BubbleVideoViewItem.cpp
src/Conversation/ConvList/View/src/BubbleViewItem.cpp
src/Conversation/ConvList/View/src/ComposeListViewItem.cpp
src/Conversation/ConvList/View/src/ConvListLayout.cpp
src/Conversation/ConvList/View/src/ConvListViewItem.cpp
src/Conversation/ConvList/View/src/ConvSelectAll.cpp
src/Conversation/ConvList/View/src/DateLineViewItem.cpp
src/Conversation/Main/Controller/inc/Conversation.h
src/Conversation/Main/Controller/inc/PopupRecipientListItem.h
src/Conversation/Main/Controller/src/Conversation.cpp
src/Conversation/Main/View/inc/ConversationLayout.h
src/Conversation/Main/View/inc/MessageInputPanel.h
src/Conversation/Main/View/src/MessageInputPanel.cpp
src/Conversation/Recipients/Controller/inc/ConvRecipientsPanel.h
src/Conversation/Recipients/Controller/src/ConvRecipientsPanel.cpp
src/Conversation/Recipients/View/inc/ConvRecipientsPanelView.h
src/Conversation/Recipients/View/src/ConvRecipientsPanelView.cpp
src/Conversation/Utils/inc/AttachmentHandler.h
src/Conversation/Utils/inc/MessageDetailContent.h
src/Conversation/Utils/inc/WorkingDir.h
src/Conversation/Utils/src/AttachmentHandler.cpp
src/Conversation/Utils/src/MessageDetailContent.cpp
src/Conversation/Utils/src/WorkingDir.cpp
src/MainApp/MainApp.cpp
src/MainApp/MainApp.h
src/MsgThread/Controller/inc/BaseThreadListItem.h
src/MsgThread/Controller/inc/MsgSearchListItem.h
src/MsgThread/Controller/inc/MsgThread.h
src/MsgThread/Controller/inc/ThreadList.h
src/MsgThread/Controller/inc/ThreadListItem.h
src/MsgThread/Controller/inc/ThreadSearchList.h
src/MsgThread/Controller/inc/ThreadSearchListItem.h
src/MsgThread/Controller/src/BaseThreadListItem.cpp
src/MsgThread/Controller/src/MsgThread.cpp
src/MsgThread/Controller/src/ThreadList.cpp
src/MsgThread/Controller/src/ThreadListItem.cpp
src/MsgThread/Controller/src/ThreadSearchList.cpp
src/MsgThread/View/inc/FloatingButton.h
src/MsgThread/View/inc/MsgThreadLayout.h
src/MsgThread/View/inc/MsgThreadSearchPanel.h
src/MsgThread/View/inc/ThreadListViewItem.h
src/MsgThread/View/src/FloatingButton.cpp
src/MsgThread/View/src/MsgThreadSearchPanel.cpp
src/MsgThread/View/src/ThreadListViewItem.cpp
src/Settings/Controller/inc/MsgOnSimCard.h
src/Settings/Controller/inc/Settings.h
src/Settings/Controller/inc/SettingsListItem.h
src/Settings/Controller/inc/SettingsSound.h
src/Settings/Controller/inc/SimListViewItem.h
src/Settings/Controller/src/MsgOnSimCard.cpp
src/Settings/Controller/src/Settings.cpp
src/Settings/Controller/src/SettingsSound.cpp
src/Settings/Controller/src/SimListViewItem.cpp
src/Settings/View/inc/SettingsGroupListViewItem.h
src/Settings/View/inc/SettingsListViewItem.h
src/Settings/View/inc/SimMsgLayout.h
src/Settings/View/src/SettingsGroupListViewItem.cpp
src/Settings/View/src/SettingsListViewItem.cpp
src/Viewer/Controller/inc/SmilPage.h
src/Viewer/Controller/inc/SmilPlayer.h
src/Viewer/Controller/inc/Viewer.h
src/Viewer/Controller/src/SmilPage.cpp
src/Viewer/Controller/src/SmilPlayer.cpp
src/Viewer/Controller/src/Viewer.cpp
src/Viewer/Utils/inc/MediaPlayer.h
src/Viewer/Utils/src/MediaPlayer.cpp
src/Viewer/View/inc/PlayerControl.h
src/Viewer/View/inc/SmilAttachmentItemView.h
src/Viewer/View/inc/SmilAudioItemView.h
src/Viewer/View/inc/SmilImageItemView.h
src/Viewer/View/inc/SmilPageLayout.h
src/Viewer/View/inc/SmilPlayerView.h
src/Viewer/View/inc/SmilTextItemView.h
src/Viewer/View/inc/SmilVideoItemView.h
src/Viewer/View/inc/SubjectLayout.h
src/Viewer/View/inc/ViewerLayout.h
src/Viewer/View/src/PlayerControl.cpp
src/Viewer/View/src/SmilAttachmentItemView.cpp
src/Viewer/View/src/SmilImageItemView.cpp
src/Viewer/View/src/SmilPlayerView.cpp
src/Viewer/View/src/SmilTextItemView.cpp
src/Viewer/View/src/SmilVideoItemView.cpp
src/Viewer/View/src/SubjectLayout.cpp
src/Viewer/View/src/ViewerLayout.cpp
test/TC/ContactUtils.cpp
test/TC/ContactUtils.h
test/TC/TestAppControlUtils.cpp
test/TC/TestContactManager.cpp
test/TC/TestMessageSender.cpp
test/TC/TestTimeUtils.cpp
test/TC/main.cpp

index fcd7efad357e7540a4b65aeddcaca237a3cf7b69..dce36c54afc3c16f9a23a3b47903f53fdd983f81 100644 (file)
 #include <string>
 #include <memory>
 
-namespace Msg
-{
+namespace Msg {
     class AppControlCommand;
     typedef std::shared_ptr<AppControlCommand> AppControlCommandRef;
 
-    class AppControlCommand
-    {
+    class AppControlCommand {
         public:
-            enum OperationType
-            {
+            enum OperationType {
                 OpUnknown,
                 OpDefault,
                 OpComposeFamily /** For operations Compose, Share, MultiShare and ShareText */
index 1bc5e4e4873c42070e58f72a9bc4c055f2660666..31d44c60bf4a6610f74797ea59af897f9c5e1ae0 100644 (file)
 #include <string>
 #include <list>
 
-namespace Msg
-{
+namespace Msg {
     class AppControlCompose;
     typedef std::shared_ptr<AppControlCompose> AppControlComposeRef;
 
-    struct VcfInfo
-    {
+    struct VcfInfo {
         std::list<int> contactsIdList;
         bool isMyProfile;
     };
 
     class AppControlCompose
-        : public AppControlCommand
-    {
+        : public AppControlCommand {
         public:
             typedef std::list<std::string> RecipientList;
             typedef std::list<std::string> FileList;
 
-            enum OpComposeType
-            {
+            enum OpComposeType {
                 OpUnknown,
                 OpCompose, /** APP_CONTROL_OPERATION_COMPOSE */
                 OpShare, /** APP_CONTROL_OPERATION_SHARE */
index b10340d043d30b32daa7cc814a07a034ca4db341..e7e9886ec3befb42c2f5f9707246e3de65b94526 100644 (file)
 #include "Logger.h"
 #include <string>
 
-namespace Msg
-{
+namespace Msg {
     class AppControlDefault;
     typedef std::shared_ptr<AppControlDefault> AppControlDefaultRef;
 
     class AppControlDefault
-        : public AppControlCommand
-    {
+        : public AppControlCommand {
         public:
-            enum DefaultType
-            {
+            enum DefaultType {
                 UnknownType,
                 MainType, //Type from home screen
                 ReplyType, //Type for reply message button clicked from Active Notification
index a87f5a7d34163dd73deb7fcac218e96a7b709304..a1ae4443c0e91e0f60d3257e2fabb919a5e42613 100644 (file)
 
 #include <Ecore.h>
 
-namespace Msg
-{
+namespace Msg {
     class AppControlLauncher;
-    class AppControlHandle
-    {
+    class AppControlHandle {
         friend class AppControlLauncher;
 
         public:
@@ -52,8 +50,7 @@ namespace Msg
             app_control_h m_Handle;
     };
 
-    class AppControlLauncher
-    {
+    class AppControlLauncher {
         friend class AppControlHandle;
 
         public:
index 980e73174c66dcb90b4fe8869294faa8aa518536..0e5e27f25a7d2f0f6e9138b31ad67eb72e6d652f 100644 (file)
 #include "AppControlCommand.h"
 #include <app_control.h>
 
-namespace Msg
-{
-    class AppControlParser
-    {
+namespace Msg {
+    class AppControlParser {
         public:
             static AppControlCommandRef parse(app_control_h handle);
     };
index d2c9f3cc853376bc7ce25f9bd496c67f62eecfb3..12ae9d3a8c897bf259b17432a96121751451ea6d 100644 (file)
     return static_cast<ClassName*>(data)->method(request, reply, result);\
 }
 
-namespace Msg
-{
-    struct AppControlUtils
-    {
+namespace Msg {
+    struct AppControlUtils {
         /**
          *@brief Gets a single string from given app-control handle by a key specified
          */
index 51e7612ffd50d7b6876e84a7b6ceb7b9f35f8ad8..c874ca8b02b1888647b967e7d2c6b5e09f884cf8 100644 (file)
 
 #include <string>
 
-namespace Msg
-{
+namespace Msg {
     class IContactEditorListener;
 
     /**
      *@brief An utility-class aimed to launch contacts-application with add-operation and edit-operation passed via app-control.
      */
     class ContactEditor
-        : public AppControlHandle
-    {
+        : public AppControlHandle {
         public:
-            enum Operation
-            {
+            enum Operation {
                 EditOp,
                 CreateOp
             };
index 08947ba956732896e5e3417c7fd51ef83c513d46..83d166fcab7c271ad4779e057e6d8398444f42ba 100644 (file)
 #include "AppControlLauncher.h"
 #include "ContactAddress.h"
 
-namespace Msg
-{
+namespace Msg {
     /**
      *@brief An utility-class aimed to launch contacts-application with view-operation passed via app-control.
      */
     class ContactViewer
-        : public AppControlHandle
-    {
+        : public AppControlHandle {
         public:
             ContactViewer();
             virtual ~ContactViewer();
index 868502fc0e4010ce13ff531982fd5b2557c9c1a9..1b01b253372c1fb41e63c5429c1464d5d37881bb 100644 (file)
 
 #include "AppControlLauncher.h"
 
-namespace Msg
-{
+namespace Msg {
     class FileViewer
-        : public AppControlHandle
-    {
+        : public AppControlHandle {
         public:
             FileViewer();
             virtual ~FileViewer();
index 2f08612524c9dbf0ab119c9e187435d47e35dc2e..ca972b196470f42067628a6508d05265c58fcbca 100644 (file)
 #include <list>
 #include <string>
 
-namespace Msg
-{
+namespace Msg {
     class Share
-        : public AppControlHandle
-    {
+        : public AppControlHandle {
         public:
             Share();
             virtual ~Share();
index 7bef3dea42404ca191a4a5f3c10cce9631aa9910..8a6877b0b1f6a5a341167cdb3c8a71a017ad8c06 100644 (file)
 #include "AppControlUtils.h"
 #include <string>
 
-namespace Msg
-{
+namespace Msg {
     /**
      * @brief An utility-class aimed to make voice call passed via app-control.
      */
-    class VoiceCall
-    {
+    class VoiceCall {
     public:
         VoiceCall();
 
index 7f68dee94559122c9c7a866e1ac59828d1a7c3bc..54803ccedae6d3a2475d097c4862a012e95022a7 100644 (file)
@@ -23,8 +23,7 @@
 
 using namespace Msg;
 
-namespace
-{
+namespace {
     const std::string mimeContact = "application/vnd.tizen.contact";
     const std::string myProfileDataType = "my_profile";
 
@@ -52,10 +51,8 @@ AppControlCompose::AppControlCompose(const std::string &opMsg, app_control_h han
 {
     MSG_LOG("ComposeType: ", m_ComposeType);
 
-    if (handle)
-    {
-        switch (m_ComposeType)
-        {
+    if (handle) {
+        switch (m_ComposeType) {
             case OpCompose:
                 createComposeOp(handle);
                 break;
@@ -83,9 +80,8 @@ void AppControlCompose::createComposeOp(app_control_h handle)
 {
     parseUriCompose(handle);
     if (m_RecipientList.empty())
-    {
         AppControlUtils::getExtraDataArray(handle, APP_CONTROL_DATA_TO, m_RecipientList);
-    }
+
     m_MessageText = AppControlUtils::getExtraData(handle, APP_CONTROL_DATA_TEXT);
     m_Subject = AppControlUtils::getExtraData(handle, APP_CONTROL_DATA_SUBJECT);
     AppControlUtils::getExtraDataArray(handle, APP_CONTROL_DATA_PATH, m_FileList);
@@ -95,19 +91,16 @@ void AppControlCompose::createShareOp(app_control_h handle)
 {
     parseUriShare(handle);
 
-    if (mimeContact == AppControlUtils::getMimeType(handle))
-    {
+    if (mimeContact == AppControlUtils::getMimeType(handle)) {
         std::string idStr = AppControlUtils::getExtraData(handle, APP_CONTROL_DATA_ID);
-        if (!idStr.empty())
-        {
+        if (!idStr.empty()) {
             std::string dataType = AppControlUtils::getExtraData(handle, APP_CONTROL_DATA_TYPE);
             m_VcfInfo.isMyProfile = (dataType == myProfileDataType);
             m_VcfInfo.contactsIdList.push_back(atoi(idStr.c_str()));
         }
     }
 
-    if (m_FileList.empty())
-    {
+    if (m_FileList.empty()) {
         std::string path = AppControlUtils::getExtraData(handle, APP_CONTROL_DATA_PATH);
         if (!path.empty())
             m_FileList.push_back(std::move(path));
@@ -116,8 +109,7 @@ void AppControlCompose::createShareOp(app_control_h handle)
 
 void AppControlCompose::createMultiShareOp(app_control_h handle)
 {
-    if (mimeContact == AppControlUtils::getMimeType(handle))
-    {
+    if (mimeContact == AppControlUtils::getMimeType(handle)) {
         std::list<std::string> contactsList;
         AppControlUtils::getExtraDataArray(handle, APP_CONTROL_DATA_ID, contactsList);
         for (auto it : contactsList)
@@ -174,10 +166,8 @@ bool AppControlCompose::parseUriCompose(app_control_h handle)
     bool res = false;
     char *uri = nullptr;
 
-    if (APP_CONTROL_ERROR_NONE == app_control_get_uri(handle, &uri))
-    {
-        if (uri)
-        {
+    if (APP_CONTROL_ERROR_NONE == app_control_get_uri(handle, &uri)) {
+        if (uri) {
             MSG_LOG("uri = ", uri);
             std::string uriToParse(uri);
             std::istringstream is(uriToParse);
@@ -186,11 +176,9 @@ bool AppControlCompose::parseUriCompose(app_control_h handle)
             std::getline(is, cur, ':');
             MSG_LOG("cur = ", cur.c_str());
 
-            if (cur == "sms" || cur == "mmsto")
-            {
+            if (cur == "sms" || cur == "mmsto") {
                 m_isMms = (cur == "mmsto");
-                for (; std::getline(is, cur, ',');)
-                {
+                for (; std::getline(is, cur, ',');) {
                     m_RecipientList.push_back(cur);
                 }
                 res = true;
@@ -208,10 +196,8 @@ bool AppControlCompose::parseUriShare(app_control_h handle)
     bool res = false;
     char *uri = nullptr;
 
-    if (APP_CONTROL_ERROR_NONE == app_control_get_uri(handle, &uri))
-    {
-        if (uri)
-        {
+    if (APP_CONTROL_ERROR_NONE == app_control_get_uri(handle, &uri)) {
+        if (uri) {
             MSG_LOG("uri = ", uri);
             std::string uriToParse(uri);
             std::istringstream is(uriToParse);
@@ -220,11 +206,9 @@ bool AppControlCompose::parseUriShare(app_control_h handle)
             std::getline(is, cur, ':');
             MSG_LOG("cur = ", cur.c_str());
 
-            if (cur == "sms" || cur == "mmsto" || cur == "file")
-            {
+            if (cur == "sms" || cur == "mmsto" || cur == "file") {
                 m_isMms = (cur == "mmsto" || cur == "file");
-                if (cur == "file" && m_FileList.empty())
-                {
+                if (cur == "file" && m_FileList.empty()) {
                     std::string prefix("file://");
                     m_FileList.push_back(uriToParse.erase(0, prefix.length()));
                 }
index 429cb7ce93e97db137f18a77ea7b8a073f000bd7..8c0519d64ffe79f8b90c5cf9dbe6b66f4505ef3e 100644 (file)
@@ -19,8 +19,7 @@
 
 using namespace Msg;
 
-namespace
-{
+namespace {
     const char *notificationPanel = "http://tizen.org/appcontrol/data/notification";
     const char *keyType = "type";
     const char *valueNewMsg = "new_msg";
@@ -59,8 +58,7 @@ void AppControlDefault::parse(app_control_h handle)
 {
     char *key = nullptr;
     app_control_get_extra_data(handle, keyType, &key);
-    if (!key)
-    {
+    if (!key) {
         m_DefaultType = MainType;
         return;
     }
@@ -87,8 +85,7 @@ bool AppControlDefault::isNotificationPanel(app_control_h handle) const
 {
     char *keyVal = nullptr;
     app_control_get_extra_data(handle, notificationPanel, &keyVal);
-    if (keyVal)
-    {
+    if (keyVal) {
         free(keyVal);
         return true;
     }
index 26313d6259214dc3887c8c8da5131b0f2cf9f979..0638be6fb1dadbfe6e69e944f788d4f7f6002705 100644 (file)
@@ -29,8 +29,7 @@ AppControlHandle::AppControlHandle(app_control_launch_mode_e launchMode)
 
 AppControlHandle::~AppControlHandle()
 {
-    if (m_Handle)
-    {
+    if (m_Handle) {
         terminate();
         app_control_destroy(m_Handle);
     }
@@ -103,8 +102,7 @@ void AppControlLauncher::onReply(app_control_h request, app_control_h reply, app
     if (m_pHandle)
         m_pHandle->onReply(request, reply, result);
 
-    if (m_LaunchInProgress)
-    {
+    if (m_LaunchInProgress) {
         m_pTimer = ecore_timer_add(1.2, // Extra time for application startup.
         [](void *data)->Eina_Bool
         {
index 0c4604b8d20b78620adaed5ccfb5f3eb592e9147..6dff899b375fa063cccb9f8828ca3520edeea9c4 100644 (file)
@@ -27,8 +27,7 @@
 
 using namespace Msg;
 
-namespace
-{
+namespace {
     typedef std::unordered_map<std::string, AppControlCommand::OperationType> OperationMap;
 
     const OperationMap operationMap =
@@ -55,16 +54,14 @@ AppControlCommandRef AppControlParser::parse(app_control_h handle)
 
     app_control_get_operation(handle, &opStr);
 
-    if (!opStr)
-    {
+    if (!opStr) {
         MSG_LOG_WARN("app_control operation is null");
         return cmd;
     }
 
     AppControlCommand::OperationType opType = getOperation(opStr);
 
-    switch (opType)
-    {
+    switch (opType) {
         case AppControlCommand::OpDefault:
             cmd = std::make_shared<AppControlDefault>(opStr, handle);
             break;
index 54a0ca2cf0eb2f53dd04cbe838ecfc99f12f415a..e047d9069fd81e79466167135624faffc4421b71 100644 (file)
@@ -22,10 +22,8 @@ std::string AppControlUtils::getExtraData(app_control_h handle, const std::strin
 {
     std::string res;
     char *val = nullptr;
-    if (APP_CONTROL_ERROR_NONE == app_control_get_extra_data(handle, key.c_str(), &val))
-    {
-        if (val)
-        {
+    if (APP_CONTROL_ERROR_NONE == app_control_get_extra_data(handle, key.c_str(), &val)) {
+        if (val) {
             res = val;
             free(val);
         }
@@ -37,10 +35,8 @@ void AppControlUtils::getExtraDataArray(app_control_h handle, const std::string
 {
     int arrayLength = 0;
     char **pArrayVal = nullptr;
-    if (APP_CONTROL_ERROR_NONE == app_control_get_extra_data_array(handle, key.c_str(), &pArrayVal, &arrayLength))
-    {
-        for (int i = 0; i < arrayLength; ++i)
-        {
+    if (APP_CONTROL_ERROR_NONE == app_control_get_extra_data_array(handle, key.c_str(), &pArrayVal, &arrayLength)) {
+        for (int i = 0; i < arrayLength; ++i) {
             outArray.push_back(pArrayVal[i]);
             free(pArrayVal[i]);
         }
@@ -52,8 +48,7 @@ int AppControlUtils::getExtraDataInt(app_control_h handle, const std::string &ke
 {
     char *val = nullptr;
     int parsed = 0;
-    if (APP_CONTROL_ERROR_NONE == app_control_get_extra_data(handle, key.c_str(), &val) && val)
-    {
+    if (APP_CONTROL_ERROR_NONE == app_control_get_extra_data(handle, key.c_str(), &val) && val) {
         parsed = atoi(val);
         free(val);
     }
@@ -65,20 +60,15 @@ void AppControlUtils::getExtraDataIntArray(app_control_h handle, const std::stri
     int arrayLength = 0;
     char **pArrayVal = nullptr;
     if (APP_CONTROL_ERROR_NONE == app_control_get_extra_data_array(handle, key.c_str(), &pArrayVal, &arrayLength)
-            && pArrayVal)
-    {
+            && pArrayVal) {
         std::string::size_type sz;
-        for (int i = 0; i < arrayLength; ++i)
-        {
-            if (pArrayVal[i])
-            {
+        for (int i = 0; i < arrayLength; ++i) {
+            if (pArrayVal[i]) {
                 std::string s(pArrayVal[i] ? pArrayVal[i] : "");
                 free(pArrayVal[i]);
                 int parsed = std::stoi(s, &sz);
                 if (sz == s.length())
-                {
                     outArray.push_back(parsed);
-                }
             }
         }
         free(pArrayVal);
@@ -90,8 +80,7 @@ std::string AppControlUtils::getMimeType(app_control_h handle)
     char *mime = nullptr;
     std::string result;
     app_control_get_mime(handle, &mime);
-    if (mime)
-    {
+    if (mime) {
         result = mime;
         free(mime);
     }
index 374bb0223c9430e681bdcaa8f192fc0dae9becd4..acd7fbe5de7e7cd6b810406550cd090d8a9e3e3a 100644 (file)
@@ -21,8 +21,7 @@
 
 using namespace Msg;
 
-namespace
-{
+namespace {
     const char* mimeContact = "application/vnd.tizen.contact";
 }
 
@@ -39,16 +38,14 @@ ContactEditor::~ContactEditor()
 bool ContactEditor::launch(const std::string &address, Operation operation)
 {
     bool res = false;
-    if (!address.empty())
-    {
+    if (!address.empty()) {
         const char *op = nullptr;
         if (operation == EditOp)
             op = APP_CONTROL_OPERATION_EDIT;
         else if (operation == CreateOp)
             op = APP_CONTROL_OPERATION_ADD;
 
-        if (op)
-        {
+        if (op) {
             if (MsgUtils::isValidNumber(address))
                 res = launch(address, op, APP_CONTROL_DATA_PHONE);
             else if (MsgUtils::isValidEmail(address))
index 40d41f29a9d544e7641dad5eae011ada5002d6c2..26cfd57fb5ed805ba5e1672d001f1387c85c6eb1 100644 (file)
@@ -22,8 +22,7 @@
 
 using namespace Msg;
 
-namespace
-{
+namespace {
     const char *mimeContact = "application/vnd.tizen.contact";
     const char *personContactTypeStr = "person";
     const char *myProfileTypeStr = "my_profile";
@@ -53,8 +52,7 @@ bool ContactViewer::launch(const ContactAddress &address)
 
 const char *ContactViewer::toStr(ContactAddress::OwnerType type)
 {
-    switch (type)
-    {
+    switch (type) {
         case ContactAddress::PersonType:
             return personContactTypeStr;
         case ContactAddress::MyProfileType:
index a24f2a26777faf4fd4987d8edd23f6c69134384d..582f0d0b8352012da6e4ab14ef3732376f7f7e01 100644 (file)
@@ -46,8 +46,7 @@ bool FileViewer::launch(const std::string &file)
     if (mime.empty() || file.empty())
         return false;
 
-    if (m_Handle)
-    {
+    if (m_Handle) {
         app_control_set_mime(m_Handle, mime.c_str());
         std::string uri = "file://" + file;
         app_control_set_uri(m_Handle, uri.c_str());
@@ -61,15 +60,13 @@ bool FileViewer::launchWithCopy(const std::string &file)
 {
     bool res = false;
 
-    if (!AppControlLauncher::getInst().isLaunchInProgress())
-    {
+    if (!AppControlLauncher::getInst().isLaunchInProgress()) {
         // Remove previous file (correct only for APP_CONTROL_LAUNCH_MODE_GROUP)
         if (!m_FilePath.empty())
             FileUtils::remove(m_FilePath);
 
         m_FilePath = FileUtils::addFileToDataDir(file);
-        if (!m_FilePath.empty())
-        {
+        if (!m_FilePath.empty()) {
             FileUtils::saveFileToStorage(m_FilePath);
             res = launch(m_FilePath);
         }
index 4385add9eccb95779ef594fdc01de1d077f36962..7ee752102b307fcaad981adb3b31bfa2d4da46d3 100644 (file)
@@ -36,9 +36,8 @@ Share::~Share()
 void Share::removeFiles()
 {
     for (auto &&file : m_FileList)
-    {
         FileUtils::remove(file);
-    }
+
     m_FileList.clear();
 }
 
@@ -46,9 +45,7 @@ void Share::addFiles(const std::list<std::string> &files)
 {
     removeFiles();
     for (auto &&file : files)
-    {
         m_FileList.push_back(FileUtils::addFileToDataDir(file));
-    }
 }
 
 bool Share::launch(const std::list<std::string> &files)
@@ -58,8 +55,7 @@ bool Share::launch(const std::list<std::string> &files)
 
     addFiles(files);
     std::vector<const char*> nativePaths;
-    for (const std::string &file : m_FileList)
-    {
+    for (const std::string &file : m_FileList) {
         if (!file.empty())
             nativePaths.push_back(file.c_str());
     }
index 9ef2813e720447b3717a69e10beda6f878c0e892..86e026a3fa745e71005002a589394e9c0930465d 100644 (file)
@@ -20,8 +20,7 @@
 
 using namespace Msg;
 
-namespace
-{
+namespace {
     const std::string tel = "tel:";
 }
 
@@ -34,8 +33,7 @@ bool VoiceCall::launch(const std::string &number)
     bool res = false;
     app_control_h svcHandle = nullptr;
 
-    if (APP_CONTROL_ERROR_NONE == app_control_create(&svcHandle))
-    {
+    if (APP_CONTROL_ERROR_NONE == app_control_create(&svcHandle)) {
         app_control_set_operation(svcHandle, APP_CONTROL_OPERATION_CALL);
         std::string phoneNumber = tel + number;
 
index 7fe7c9a707d4ffed127dd63dd050358f5f9aae64..65f8efd8821a17778cca7cd5ac9bd42890dfd662 100644 (file)
 #include <string>
 #include <memory>
 
-namespace Msg
-{
+namespace Msg {
     class Contact;
     typedef std::shared_ptr<Contact> ContactRef;
 
     class Contact
-        : public ContactRecord
-    {
+        : public ContactRecord {
         public:
             Contact(bool release, contacts_record_h record = nullptr);
 
index 14e6827c7cd2ca2820bd75d5769d013bc21e8ae1..f0ff88e772eaeff0b8795ddd83fcb5c9d5b4c2e0 100644 (file)
 
 #include "MsgUtils.h"
 
-namespace Msg
-{
+namespace Msg {
     class ContactAddress;
     typedef std::shared_ptr<ContactAddress> ContactAddressRef;
 
-    class ContactAddress
-    {
+    class ContactAddress {
         public:
-            enum AddressType
-            {
+            enum AddressType {
                 EmailType,
                 NumberType
             };
 
-            enum OwnerType
-            {
+            enum OwnerType {
                 PersonType,
                 MyProfileType
             };
index e06fbd6ebf402e09fe9745f52c48e5a773ffb176..5a2dc8b56ba08f017fe714cbadb306074f4d8d96 100644 (file)
 
 #include <contacts.h>
 
-namespace Msg
-{
+namespace Msg {
     class ContactManager;
 
     template <typename T>
-    class ContactList
-    {
+    class ContactList {
             friend class ContactManager;
 
         public:
index 614a3238f01722c496b8cce22185aae9df7f2027..daf1b33833ad3b3c85b83f38f08477e4d49745ed 100644 (file)
@@ -33,8 +33,7 @@
 #include "ContactMyProfileEmail.h"
 #include "Contact.h"
 
-namespace Msg
-{
+namespace Msg {
     /*
      *@brief        A listener to be notified after contact-information will be changed in contacts-db
      */
@@ -43,8 +42,7 @@ namespace Msg
      *@brief        Class that work with contacts database.
      *@brief        Search contacts, add listeners, register callback on changes in database.
      */
-    class ContactManager
-    {
+    class ContactManager {
         public:
             ContactManager();
             ~ContactManager();
@@ -187,8 +185,7 @@ namespace Msg
             ContactMyProfileRef m_OwnerProfile;
     };
 
-    class IContactManagerListener
-    {
+    class IContactManagerListener {
         public:
             virtual ~IContactManagerListener() {}
             /*
index e8282255c5f1ac66904ab2350c340050e8d5a4d4..ce183e873f9f6fb6279cecd71c450364fa1e2436 100644 (file)
 
 #include "ContactRecord.h"
 
-namespace Msg
-{
+namespace Msg {
     class ContactMyProfile;
     typedef std::shared_ptr<ContactMyProfile> ContactMyProfileRef;
 
     class ContactMyProfile
-        : public ContactRecord
-    {
+        : public ContactRecord {
         public:
             ContactMyProfile(bool release, contacts_record_h record = nullptr);
             int getId() const;
index 4278294711511b8573a98747f82c2a05d4a0a57c..7b1063ee3c6dd253de96df8578161b3f833dfb6b 100644 (file)
 #include "ContactRecord.h"
 #include "ContactMyProfile.h"
 
-namespace Msg
-{
+namespace Msg {
     class ContactMyProfileEmail;
     typedef std::shared_ptr<ContactMyProfileEmail> ContactMyProfileEmailRef;
 
     class ContactMyProfileEmail
         : public ContactAddress
-        , public ContactRecord
-    {
+        , public ContactRecord {
         public:
             ContactMyProfileEmail(bool release, const ContactMyProfile &myProfile, contacts_record_h record = nullptr);
             static const char *getUri();
index 7d63aea78c42096ccb01a79375ddd3b10bb065b3..31fbc0817664e59fe361a63c1c70efc2ca0142d0 100644 (file)
 #include "ContactRecord.h"
 #include "ContactMyProfile.h"
 
-namespace Msg
-{
+namespace Msg {
     class ContactMyProfileNumber;
     typedef std::shared_ptr<ContactMyProfileNumber> ContactMyProfileNumberRef;
 
     class ContactMyProfileNumber
         : public ContactAddress
-        , public ContactRecord
-    {
+        , public ContactRecord {
         public:
             ContactMyProfileNumber(bool release, const ContactMyProfile &myProfile, contacts_record_h record = nullptr);
             static const char *getUri();
index fd031643c76a1bfbe2c071eea031c175f0e16a36..692e31722909dc114f82ce962b5698edeeae05be 100644 (file)
 #include "ContactAddress.h"
 #include "ContactRecord.h"
 
-namespace Msg
-{
+namespace Msg {
     class ContactPersonEmail;
     typedef std::shared_ptr<ContactPersonEmail> ContactPersonEmailRef;
 
     class ContactPersonEmail
         : public ContactAddress
-        , public ContactRecord
-    {
+        , public ContactRecord {
         public:
             ContactPersonEmail(bool release, contacts_record_h record = nullptr);
             static const char *getUri();
index fa84204740a1afe185360fd133e0ffd0f0466e72..ec19f2f1dd2960a15acc00eabf1614427cb48045 100644 (file)
 #include "ContactAddress.h"
 #include "ContactRecord.h"
 
-namespace Msg
-{
+namespace Msg {
     class ContactPersonNumber;
     typedef std::shared_ptr<ContactPersonNumber> ContactPersonNumberRef;
 
     class ContactPersonNumber
         : public ContactAddress
-        , public ContactRecord
-    {
+        , public ContactRecord {
         public:
             ContactPersonNumber(bool release, contacts_record_h record = nullptr);
             static const char *getUri();
index fc31eb8fcf713c0bbe3a21cb9b01c3791d644b2f..4f7d306264dd73bc611c6a5678fdfebe00f8b948 100644 (file)
 
 #include "ContactRecord.h"
 
-namespace Msg
-{
+namespace Msg {
     class ContactPersonPhoneLog;
     typedef std::shared_ptr<ContactPersonPhoneLog> ContactPersonPhoneLogRef;
 
     class ContactPersonPhoneLog
-        : public ContactRecord
-    {
+        : public ContactRecord {
         public:
             ContactPersonPhoneLog(bool release, contacts_record_h record = nullptr);
             static const char *getUri();
index 3aa680499106fb9420fadcc5d4958c54dca734f7..c8bcaf0429537b81c9d68d8afa560e183386e056 100644 (file)
 #include <string>
 #include <memory>
 
-namespace Msg
-{
+namespace Msg {
     class ContactRecord;
     typedef std::shared_ptr<ContactRecord> ContactRecordRef;
 
-    class ContactRecord
-    {
+    class ContactRecord {
         public:
             ContactRecord(bool release, contacts_record_h record = nullptr);
             virtual ~ContactRecord();
index 5c0befdbc28a6c00b2716eff3ec79b68f3e97f33..4d89b7cc5958ee30bb5531ad5fb999cb9c561807 100644 (file)
@@ -22,8 +22,7 @@
 #include <algorithm>
 #include <string.h>
 
- namespace Msg
- {
+ namespace Msg {
     const int mapReservSize = 512;
 
     ContactManager::ContactManager()
@@ -31,8 +30,7 @@
         MSG_LOG("");
         m_AddressMap.reserve(mapReservSize);
         int error = contacts_connect();
-        if (error != 0)
-        {
+        if (error != 0) {
             MSG_LOG_ERROR(whatError(error));
         }
 
@@ -55,8 +53,7 @@
 
     std::string ContactManager::whatError(int error)
     {
-        switch (error)
-        {
+        switch (error) {
             case CONTACTS_ERROR_NONE:
                 return "CONTACTS_ERROR_NONE";
             case CONTACTS_ERROR_OUT_OF_MEMORY:
         contacts_query_set_filter(query, filter);
 
         /* set projection */
-        unsigned int numberProjection[] =
-        {
+        unsigned int numberProjection[] = {
             _contacts_person_phone_log.person_id,
             _contacts_person_phone_log.address,
             _contacts_person_phone_log.display_name
         contacts_record_get_child_record_count(rec, _contacts_my_profile.number, &count);
         std::string normalizedNumber = PhoneNumberUtils::getInst().getNormalizedNumber(number);
 
-        for (int i =0; i < count; ++i)
-        {
+        for (int i =0; i < count; ++i) {
             contacts_record_h child = nullptr;
             contacts_record_get_child_record_at_p(rec, _contacts_my_profile.number, i, &child);
-            if (child)
-            {
+            if (child) {
                 char *num = nullptr;
                 contacts_record_get_str_p(child, _contacts_number.number, &num);
-                if (num)
-                {
+                if (num) {
                     std::string curNum = PhoneNumberUtils::getInst().getNormalizedNumber(num);
-                    if (normalizedNumber == curNum)
-                    {
+                    if (normalizedNumber == curNum) {
                         contacts_record_h clonedRec = nullptr;
                         contacts_record_clone(child, &clonedRec);
                         if (clonedRec)
         int count = 0;
         contacts_record_get_child_record_count(rec, _contacts_my_profile.email, &count);
 
-        for (int i =0; i < count; ++i)
-        {
+        for (int i =0; i < count; ++i) {
             contacts_record_h child = nullptr;
             contacts_record_get_child_record_at_p(rec, _contacts_my_profile.email, i, &child);
-            if (child)
-            {
+            if (child) {
                 char *curEmail = nullptr;
                 contacts_record_get_str_p(child, _contacts_email.email, &curEmail);
-                if (curEmail)
-                {
-                   if (strcasecmp(email.c_str(), curEmail) == 0)
-                   {
+                if (curEmail) {
+                   if (strcasecmp(email.c_str(), curEmail) == 0) {
                        contacts_record_h clonedRec = nullptr;
                        contacts_record_clone(child, &clonedRec);
                        if (clonedRec)
         ContactManager *self = static_cast<ContactManager *>(user_data);
         self->invalidateCache();
         for (auto listener : self->m_Listeners)
-        {
             listener->onContactChanged();
-        }
     }
 
     void ContactManager::contactDisplayOrderChangedCb(contacts_name_display_order_e name_display_order, void *user_data)
         ContactManager *self = static_cast<ContactManager *>(user_data);
         self->invalidateCache();
         for (auto listener : self->m_Listeners)
-        {
             listener->onContactChanged();
-        }
     }
 
     void ContactManager::addListener(IContactManagerListener &listener)
     {
         auto found = std::find(m_Listeners.begin(), m_Listeners.end(), &listener);
         if (found == m_Listeners.end())
-        {
             m_Listeners.push_back(&listener);
-        }
     }
 
     void ContactManager::removeListener(IContactManagerListener &listener)
     {
         auto found = std::find(m_Listeners.begin(), m_Listeners.end(), &listener);
         if (found != m_Listeners.end())
-        {
             m_Listeners.erase(found);
-        }
     }
 
     ContactPersonNumberRef ContactManager::getContactPersonNumber(contacts_filter_h filter)
         contacts_filter_destroy(filter);
         contacts_query_destroy(query);
 
-        while (ctRrr == CONTACTS_ERROR_NONE)
-        {
+        while (ctRrr == CONTACTS_ERROR_NONE) {
             int contactId = 0;
 
             contacts_list_get_current_record_p(list, &crValue);
-            if (crValue)
-            {
+            if (crValue) {
                 contacts_record_get_int(crValue, _contacts_person_number.person_id, &contactId);
                 if (contactId > 0)
                     cResValue = crValue;
         contacts_filter_destroy(filter);
         contacts_query_destroy(query);
 
-        while (ctRrr == CONTACTS_ERROR_NONE)
-        {
+        while (ctRrr == CONTACTS_ERROR_NONE) {
             int contactId = 0;
 
             contacts_list_get_current_record_p(list, &crValue);
-            if (crValue)
-            {
+            if (crValue) {
                 contacts_record_get_int(crValue, _contacts_person_email.person_id, &contactId);
                 if (contactId > 0)
                     cResValue = crValue;
     ContactAddressRef ContactManager::getAddress(const std::string &address)
     {
         auto it = m_AddressMap.find(address);
-        if (m_AddressMap.end() == it)
-        {
+        if (m_AddressMap.end() == it) {
             bool isNumber = MsgUtils::isValidNumber(address);
 
             // ContactPerson:
 
             // MyProfile:
             #if (0)
-            if (!contactAddress)
-            {
+            if (!contactAddress) {
                 if (isNumber)
                     contactAddress = getContactMyProfileNumber(address);
                 else
index 8645af74c6951a77ae3a9799951cc9b0d614954e..ee35b39f557fc3b2463808c04dcdc30a0ecd76b2 100644 (file)
@@ -26,8 +26,7 @@ ContactRecord::ContactRecord(bool release, contacts_record_h record)
 
 ContactRecord::~ContactRecord()
 {
-    if (m_Record && m_Release)
-    {
+    if (m_Record && m_Release) {
         contacts_record_destroy(m_Record, true);
         m_Record = nullptr;
     }
index aa0630bb74e6872fe60d81ce37f419b10d01568c..d07ed358169a66963c5aac28f5d8b2486b7e60f4 100644 (file)
@@ -23,8 +23,7 @@
 
 using namespace Msg;
 
-namespace
-{
+namespace {
     const int avgLengthOfContent = 2048;
 }
 
@@ -33,8 +32,7 @@ std::string ContactManager::makeVcard(const int personId, bool myProfile)
     contacts_record_h record = nullptr;
     std::string vcardContent;
 
-    if (contacts_db_get_record((myProfile ? _contacts_my_profile._uri : _contacts_person._uri), personId, &record) != CONTACTS_ERROR_NONE)
-    {
+    if (contacts_db_get_record((myProfile ? _contacts_my_profile._uri : _contacts_person._uri), personId, &record) != CONTACTS_ERROR_NONE) {
         MSG_LOG_ERROR("contacts_db_get_record() failed");
         record = nullptr;
         return std::string();
@@ -63,8 +61,7 @@ std::string ContactManager::createContactContent(contacts_record_h record, bool
 
     myProfile ? contacts_vcard_make_from_my_profile(record, &vcardBuff) : contacts_vcard_make_from_person(record, &vcardBuff);
 
-    if (!vcardBuff)
-    {
+    if (!vcardBuff) {
         MSG_LOG_ERROR("vcardBuff is NULL");
         return std::string();
     }
@@ -77,8 +74,7 @@ std::string ContactManager::createContactContent(contacts_record_h record, bool
 std::string ContactManager::createContentForContactList(int personId)
 {
     contacts_record_h record = nullptr;
-    if (contacts_db_get_record(_contacts_person._uri, personId, &record) != CONTACTS_ERROR_NONE)
-    {
+    if (contacts_db_get_record(_contacts_person._uri, personId, &record) != CONTACTS_ERROR_NONE) {
         MSG_LOG_ERROR("contacts_db_get_record() failed!");
         record = nullptr;
         return std::string();
index 1cd0f9b65f352766f4f2da722512aaecac096bcc..3ddae32fce525e21df63847066725d58f0d2cdc3 100644 (file)
 #include "SystemSettingsManager.h"
 #include <memory>
 
-namespace Msg
-{
+namespace Msg {
     class MsgEngine;
     class ContactManager;
     class IAppListener;
 
-    class App
-    {
+    class App {
         public:
             App();
             virtual ~App();
@@ -80,8 +78,7 @@ namespace Msg
             bool m_IsPause;
     };
 
-    class IAppListener
-    {
+    class IAppListener {
         public:
             virtual ~IAppListener() {}
             virtual void onAppPause() {};
index 98a063e8276db7ae5edc7916057ab26e3a5e5ba0..f245a9b82090153a07f6eeaa9f00258e5a5077f8 100644 (file)
 
 #include "BaseView.h"
 
-namespace Msg
-{
+namespace Msg {
     class App;
     class MsgEngine;
 
-    class BaseController
-    {
+    class BaseController {
         public:
             BaseController(App &app);
             BaseController(BaseController *parent);
index d6611fe62807987f35206b3fb43d590898e581d8..926db51ccbf4c7d4d3cf7e24a1d19fe2ee0b834c 100644 (file)
 #include "NaviFrameController.h"
 #include "MsgAddress.h"
 
-namespace Msg
-{
+namespace Msg {
     class NaviFrameController;
 
     class FrameController
         : public ViewItemController
-        , public NaviFrameItem
-    {
+        , public NaviFrameItem {
         public:
             FrameController(NaviFrameController &parent);
             virtual ~FrameController();
index 2892a493e7e78266ecc86818c6522aa56ce5dde3..8746ff949063a4acabc029e6d34820aa42351622 100644 (file)
 #include "MsgTypes.h"
 #include "App.h"
 
-namespace Msg
-{
+namespace Msg {
     class MbeRecipients
         : public MbeRecipientsView
-        , private IContactManagerListener
-    {
+        , private IContactManagerListener {
         public:
-            enum AppendItemStatus
-            {
+            enum AppendItemStatus {
                 SuccessStatus,
                 DuplicatedStatus,
                 InvalidRecipStatus,
index aebdadc77e2ad8a86e5e88c45b7c6cc860324c67..6556c818e3fa2c4047ad296403a8f958072370d5 100644 (file)
 #include "AppControlDefault.h"
 #include "App.h"
 
-namespace Msg
-{
+namespace Msg {
     class FrameController;
 
     class NaviFrameController
         : public ViewController
         , public NaviFrameView
         , private IHwButtonListener
-        , private IAppListener
-    {
+        , private IAppListener {
         public:
             NaviFrameController(App &app);
             virtual ~NaviFrameController();
index 8e22e27e10652304af172ea3e26a63c81330a441..8d98fa913e6804058cd23084c1ad6e213b67a5bf 100644 (file)
 #include "SelectAllListItem.h"
 #include "MsgStorage.h"
 
-namespace Msg
-{
+namespace Msg {
     class SaveAttachments
         : public FrameController
         , private IHwButtonListener
-        , private IListViewListener
-    {
+        , private IListViewListener {
         public:
             SaveAttachments(NaviFrameController &parent, MsgId id);
             virtual ~SaveAttachments();
index 9162553bde0f24e1945516cfee48eefb8dbf68dc..19d4df7d1ce5f0f0ff655de9b55f36435af735c4 100644 (file)
 #include "ListItem.h"
 #include <string>
 
-namespace Msg
-{
+namespace Msg {
     class SaveAttachmentsListItem
-        : public ListItem
-    {
+        : public ListItem {
         public:
             SaveAttachmentsListItem(const std::string &text, const std::string &path);
             virtual ~SaveAttachmentsListItem();
index 331e1334f078986379185ff4f00291ccb62c33dc..c1eb5c21816f40c43d684e80a6fea478d4476958 100644 (file)
 #include "BaseController.h"
 #include <Evas.h>
 
-namespace Msg
-{
+namespace Msg {
     class App;
 
     class ViewController
-        : public BaseController
-    {
+        : public BaseController {
         public:
             ViewController(App &app);
             ViewController(BaseController *parent);
index 3a10baa09a71850d94fa80d5072d1858415ff59d..05eedcbf0b554bb3038eb1c65441ec3cc2e96c85 100644 (file)
 #include "BaseController.h"
 #include "ViewItem.h"
 
-namespace Msg
-{
+namespace Msg {
     class App;
 
     class ViewItemController
-        : public BaseController
-    {
+        : public BaseController {
         public:
             ViewItemController(App &app);
             ViewItemController(BaseController *parent);
index eec80b9c03bb94789c80a52dba20c7740384dc4a..3cde9267bb8e74bb859958ec763d8fd13f66c14d 100644 (file)
@@ -34,8 +34,7 @@ App::App()
     , m_IsPause(true)
 {
     int serviceResult = m_Engine.openService();
-    if (serviceResult != MESSAGES_ERROR_NONE)
-    {
+    if (serviceResult != MESSAGES_ERROR_NONE) {
         MSG_ENGINE_WHAT_ERROR(serviceResult);
         MSG_LOG_ERROR("Service handle open error = ", serviceResult);
     }
@@ -158,8 +157,7 @@ bool App::isPause() const
 
 void App::pause()
 {
-    if (!m_IsPause)
-    {
+    if (!m_IsPause) {
         m_IsPause = true;
         for (IAppListener *l : m_Listeners)
             l->onAppPause();
@@ -170,8 +168,7 @@ void App::pause()
 
 void App::resume()
 {
-    if (m_IsPause)
-    {
+    if (m_IsPause) {
         m_IsPause = false;
         updateActiveNotifPolicy();
         for (IAppListener *l : m_Listeners)
index 09fe6214f2716ea3d5a146f0c0171d4a5e0a2b3d..2b564ffe768e93421b1c6e1700a805c8517ddf04 100644 (file)
@@ -52,8 +52,7 @@ void FrameController::pop()
 void FrameController::setNaviBarTitle(const MsgAddressList &addressList)
 {
     std::string title;
-    if (!addressList.isEmpty())
-    {
+    if (!addressList.isEmpty()) {
         std::string firstAddress = addressList[0].getAddress();
         ContactAddressRef contactPersonAddress = getApp().getContactManager().getContactAddress(firstAddress);
         if (contactPersonAddress)
@@ -63,8 +62,7 @@ void FrameController::setNaviBarTitle(const MsgAddressList &addressList)
             title = firstAddress;
 
         int hidenAddresses = addressList.getLength() - 1;
-        if (hidenAddresses > 0)
-        {
+        if (hidenAddresses > 0) {
             title += " + " + std::to_string(hidenAddresses);
             getNaviBar().showButton(NaviExpandButtonId, true);
         }
@@ -75,8 +73,7 @@ void FrameController::setNaviBarTitle(const MsgAddressList &addressList)
 
 void FrameController::pause()
 {
-    if (!m_IsPause)
-    {
+    if (!m_IsPause) {
         m_IsPause = true;
         onPause();
     }
@@ -84,8 +81,7 @@ void FrameController::pause()
 
 void FrameController::resume()
 {
-    if (m_IsPause && !getApp().isPause())
-    {
+    if (m_IsPause && !getApp().isPause()) {
         m_IsPause = false;
         onResume();
     }
index 40bd0e875ce2f14f71a25b45396cc5c768133d00..71f14ad3adde94a38124acd8c1fc016f2a8f8bc4 100644 (file)
@@ -48,17 +48,14 @@ void MbeRecipients::updateItemsDispName()
 {
     auto items = getItems();
     for (MbeRecipientItem *item: items)
-    {
         item->setDispName(getDispName(item->getAddress()));
-    }
 }
 
 void MbeRecipients::update(const MsgAddressList &addressList)
 {
     clear();
     int addrListLen = addressList.getLength();
-    for (int i = 0; i < addrListLen; i++)
-    {
+    for (int i = 0; i < addrListLen; i++) {
         const MsgAddress &addr = addressList.at(i);
         appendItem(addr.getAddress(), addr.getAddressType());
     }
@@ -67,8 +64,7 @@ void MbeRecipients::update(const MsgAddressList &addressList)
 void MbeRecipients::update(ThreadId threadId)
 {
     clear();
-    if (threadId.isValid())
-    {
+    if (threadId.isValid()) {
         MsgAddressListRef addrList = m_App.getMsgEngine().getStorage().getAddressList(threadId);
         if (addrList)
             update(*addrList);
@@ -86,13 +82,11 @@ MbeRecipients::AppendItemStatus MbeRecipients::appendItem(const std::string &add
         return TooManyRecipStatus;
 
     AppendItemStatus result = SuccessStatus;
-    if (!isRecipientExists(address))
-    {
+    if (!isRecipientExists(address)) {
         if (addressType == MsgAddress::UnknownAddressType)
             addressType = MsgUtils::getAddressType(address);
 
-        if (addressType == MsgAddress::Phone || addressType == MsgAddress::Email)
-        {
+        if (addressType == MsgAddress::Phone || addressType == MsgAddress::Email) {
             result = SuccessStatus;
             MbeRecipientItem *item = new MbeRecipientItem(address, dispName, addressType);
             MbeRecipientsView::appendItem(*item);
@@ -109,8 +103,7 @@ MbeRecipients::AppendItemStatus MbeRecipients::appendItem(const std::string &add
 bool MbeRecipients::isRecipientExists(const std::string& address) const
 {
     auto recipientList = getItems();
-    for (auto pViewItem : recipientList)
-    {
+    for (auto pViewItem : recipientList) {
         MbeRecipientItem *pItem = dynamic_cast<MbeRecipientItem*>(pViewItem);
         if (pItem && pItem->getAddress() == address)
             return true;
index 37be247aecb9abfde1e655bb851f93157bf65699..2829a3856526824982023ed969b8e6c95fd19e08 100644 (file)
@@ -43,10 +43,9 @@ NaviFrameController::~NaviFrameController()
 
 void NaviFrameController::pop(FrameController &frame)
 {
-    if (isLastFrame())
+    if (isLastFrame()) {
         getApp().exit();
-    else
-    {
+    } else {
         getApp().getPopupManager().reset();
         NaviFrameView::pop(frame);
     }
@@ -61,8 +60,7 @@ bool NaviFrameController::prepare(const AppControlCommand &cmd)
 {
     MSG_LOG("Execute app. control command: ", cmd.getOperationMsg());
     std::string errorMsg;
-    if (!getMsgEngine().isReady(errorMsg))
-    {
+    if (!getMsgEngine().isReady(errorMsg)) {
         notification_status_message_post(errorMsg.c_str());
         return false;
     }
@@ -71,8 +69,7 @@ bool NaviFrameController::prepare(const AppControlCommand &cmd)
 
 void NaviFrameController::execCmd(const AppControlDefaultRef &cmd)
 {
-    if (prepare(*cmd))
-    {
+    if (prepare(*cmd)) {
         AppControlLauncher::getInst().terminate();
         AppControlDefault::DefaultType type = cmd->getDefaultType();
         MsgThread *thread = getTopFrame<MsgThread>(); // Check if thread is open
@@ -81,15 +78,12 @@ void NaviFrameController::execCmd(const AppControlDefaultRef &cmd)
 
         auto *conv = getTopFrame<Conversation>(); // Check if conversation is open
         MessageRef msg = getMsgEngine().getStorage().getMessage(cmd->getMessageId()); //To avoid opening conversation if MsgId is invalid
-        if (type != AppControlDefault::MainType && msg != nullptr)
-        {
-            if (conv)
-            {
+        if (type != AppControlDefault::MainType && msg != nullptr) {
+            if (conv) {
                 promote(*conv);
                 conv->execCmd(cmd);
             } else if (!conv) {
-                if (type == AppControlDefault::ViewType || type == AppControlDefault::ReplyType || isUnreadNotificationSingle(type))
-                {
+                if (type == AppControlDefault::ViewType || type == AppControlDefault::ReplyType || isUnreadNotificationSingle(type)) {
                     auto *conversation = new Conversation(*this);
                     push(*conversation);
                     conversation->execCmd(cmd);
@@ -101,12 +95,10 @@ void NaviFrameController::execCmd(const AppControlDefaultRef &cmd)
 
 void NaviFrameController::execCmd(const AppControlComposeRef &cmd)
 {
-    if (prepare(*cmd))
-    {
+    if (prepare(*cmd)) {
         AppControlLauncher::getInst().terminate();
         auto *conv = getTopFrame<Conversation>();
-        if (conv)
-        {
+        if (conv) {
             promote(*conv);
         } else {
             conv = new Conversation(*this);
@@ -120,8 +112,7 @@ template<typename T>
 T *NaviFrameController::getTopFrame() const
 {
     auto items = getItems();
-    for (auto item = items.rbegin(); item != items.rend(); ++item)
-    {
+    for (auto item = items.rbegin(); item != items.rend(); ++item) {
         T *frame = dynamic_cast<T*>(*item);
         if (frame)
             return frame;
index b4f0f36f5c09a02c1fa321453a28bc3413973a96..3a6ff3b5818af970d44f24e00926d397856a54e5 100644 (file)
@@ -79,24 +79,18 @@ void SaveAttachments::fillList()
 {
     MessageMmsRef mms = std::dynamic_pointer_cast<MessageMms>(getMsgEngine().getStorage().getMessage(m_Id));
     const MsgPageList &pageList = mms->getPageList();
-    for (int i = 0; i < pageList.getLength(); ++i)
-    {
+    for (int i = 0; i < pageList.getLength(); ++i) {
         const MsgMediaList &mediaList = pageList.at(i).getMediaList();
-        for (int j = 0; j < mediaList.getLength(); ++j)
-        {
+        for (int j = 0; j < mediaList.getLength(); ++j) {
             MsgMedia::Type type = mediaList.at(j).getType();
             if (type != MsgMedia::TextType && type != MsgMedia::UnknownType)
-            {
                 appendItem(mediaList.at(j).getFileName(), mediaList.at(j).getFilePath(), nullptr, this);
-            }
         }
     }
 
     const MsgAttachmentList &attachmentList = mms->getAttachmentList();
     for (int i = 0; i < attachmentList.getLength(); ++i)
-    {
         appendItem(attachmentList.at(i).getFileName(), attachmentList.at(i).getFilePath(), nullptr, this);
-    }
 }
 
 void SaveAttachments::appendItem(const std::string &text, const std::string &path, PopupListItemPressedCb cb, void *userData)
@@ -117,8 +111,7 @@ int SaveAttachments::getAttachmentsCheckedCount() const
 {
     auto items = m_pList->getItems<SaveAttachmentsListItem>();
     int count = 0;
-    for (SaveAttachmentsListItem *item : items)
-    {
+    for (SaveAttachmentsListItem *item : items) {
         if (item->isCheckable() && item->getCheckedState())
             ++count;
     }
@@ -129,16 +122,13 @@ void SaveAttachments::showSelectAllItem()
 {
     SelectAllListItem *item = dynamic_cast<SelectAllListItem*>(m_pList->getFirstItem());
     if (!item)
-    {
         item = new SelectAllListItem;
         m_pList->prependItem(*item);
-    }
 }
 
 void SaveAttachments::onButtonClicked(NaviFrameItem &item, NaviButtonId buttonId)
 {
-    switch (buttonId)
-    {
+    switch (buttonId) {
         case NaviCancelButtonId:
             onHwBackButtonClicked();
             break;
@@ -198,8 +188,7 @@ void SaveAttachments::checkItem(ListItem &item)
 
 void SaveAttachments::updateSelectAllItem()
 {
-    if (m_pList->getItems().size() > 1)
-    {
+    if (m_pList->getItems().size() > 1) {
         bool allChecked = areAllItemsChecked();
 
         SelectAllListItem *selectAllItem = dynamic_cast<SelectAllListItem*>(m_pList->getFirstItem());
@@ -213,8 +202,7 @@ bool SaveAttachments::areAllItemsChecked() const
     ListItemCollection items = m_pList->getItems();
 
     auto item = items.empty() ? items.begin() : ++items.begin();
-    for (; item != items.end(); ++item)
-    {
+    for (; item != items.end(); ++item) {
         if ((*item)->isCheckable() && !(*item)->getCheckedState())
             return false;
     }
@@ -224,8 +212,7 @@ bool SaveAttachments::areAllItemsChecked() const
 bool SaveAttachments::shouldEnableSaveBtn() const
 {
     ListItemCollection items = m_pList->getItems();
-    for (auto *item : items)
-    {
+    for (auto *item : items) {
         if (item->isCheckable() && item->getCheckedState())
             return true;
     }
@@ -240,8 +227,7 @@ bool SaveAttachments::saveCheckedItems()
     auto items = m_pList->getItems<SaveAttachmentsListItem>();
     std::list<std::string> files;
 
-    for (auto *item : items)
-    {
+    for (auto *item : items) {
         if (item->isCheckable() && item->getCheckedState())
             files.push_back(item->getFilePath());
     }
index d5809c06753bf442196d6920eca1c6bd2bde0819..42b13a5e6c0aa0c3e9c55a36247f110434d3d7e5 100644 (file)
@@ -24,8 +24,7 @@
 
 using namespace Msg;
 
-namespace
-{
+namespace {
     ListItemStyleRef ItemStyle = ListItemStyle::create("type1");
     Elm_Genlist_Item_Type type = ELM_GENLIST_ITEM_NONE;
     const char *namePart = "elm.text";
index 0c484ef014dfe0aaa29dc1be93bc675e7c6117a1..573a31ec7eed86a5d30902d5c98e862f6bcb83f5 100644 (file)
 #include <string.h>
 #include <algorithm>
 
-namespace Msg
-{
-    struct MediaTypeData
-    {
+namespace Msg {
+    struct MediaTypeData {
         MediaTypeData(const char *aMime, MsgMedia::Type aType)
             : mime(aMime)
             , type(aType)
index 27d5897c7735fb9e595d016c68c2e9f86d274f28..754c19b43e9174e6d5e27cb81a5a3a8700ea4289 100644 (file)
@@ -24,8 +24,7 @@
 #include "MsgAddress.h"
 #include "MsgList.h"
 
-namespace Msg
-{
+namespace Msg {
     class Message;
     typedef std::shared_ptr<Message> MessageRef;
     typedef MsgList<Message> MessageList;
@@ -34,14 +33,12 @@ namespace Msg
     /**
      * @brief An abstraction that represents message-entity stored in message-service.
      */
-    class Message
-    {
+    class Message {
         public:
             /**
              * @brief Each message can be sent or received, and this enum is used to distinguish the kind of every message.
              */
-            enum Direction
-            {
+            enum Direction {
                 MD_Sent = 0,    /**< Outgoing message.*/
                 MD_Received     /**< Incoming message.*/
             };
@@ -49,8 +46,7 @@ namespace Msg
             /**
              * @brief A type of every message.
              */
-            enum Type
-            {
+            enum Type {
                 MT_Unknown,     /**< Unknown type of message. If you got it something bad has happened.*/
                 MT_SMS,         /**< Text message - sms.*/
                 MT_MMS,         /**< Multimedia message - mms.*/
@@ -60,8 +56,7 @@ namespace Msg
             /**
              * @brief Status of every message.
              */
-            enum NetworkStatus
-            {
+            enum NetworkStatus {
                 NS_Unknown = -1,    /**< Attempt to get message status has failed.*/
                 NS_Not_Send,        /**< Message is a draft for now.*/
                 NS_Sending,         /**< message is in progress of sending.*/
@@ -82,8 +77,7 @@ namespace Msg
             /**
              * @brief Defines a storage for messages.
              */
-            enum MessageStorageType
-            {
+            enum MessageStorageType {
                 MS_Unknown,         /**< Unknown storage.*/
                 MS_Phone,           /**< Phone's internal storage used for regular messages.*/
                 MS_Sim              /**< Sim-card storage used for messages on SIM.*/
index 878fd330745ef7161b97732e154642a822edc5c1..89ac77912b432001c7df4956d3661aa8cd02af27 100644 (file)
 
 #include <memory>
 
-namespace Msg
-{
+namespace Msg {
     class MessageMms;
     typedef std::shared_ptr<MessageMms> MessageMmsRef;
     typedef MsgList<MessageMms> MessageMmsList;
     typedef std::shared_ptr<MsgList<MessageMms>> MessageMmsListRef;
 
     class MessageMms:
-        public virtual Message
-    {
+        public virtual Message {
         public:
             virtual ~MessageMms();
 
index 4e9b087fac24e26f183484ae4f68961815d23e96..d74321c21014f241143a77bc69fb3317130765a7 100644 (file)
 
 #include <memory>
 
-namespace Msg
-{
+namespace Msg {
     class MessageSMS;
     typedef std::shared_ptr<MessageSMS> MessageSMSRef;
     typedef MsgList<MessageSMS> MessageSMSList;
     typedef std::shared_ptr<MsgList<MessageSMS>> MessageSMSListRef;
 
     class MessageSMS:
-        public virtual Message
-    {
+        public virtual Message {
         public:
             MessageSMS();
             virtual ~MessageSMS();
index 52de4324b0527fb8ada386b17ceb5ddc4f71243e..65b4235098ef170233a9cb610c16b7a9014d5e46 100644 (file)
@@ -22,8 +22,7 @@
 #include <memory>
 #include <string>
 
-namespace Msg
-{
+namespace Msg {
     class MsgAddress;
     typedef MsgList<MsgAddress> MsgAddressList;
     typedef std::shared_ptr<MsgList<MsgAddress>> MsgAddressListRef;
@@ -31,14 +30,12 @@ namespace Msg
     /**
      * @brief Basic abstraction that represents a recipient's address message should be delivered to.
      */
-    class MsgAddress
-    {
+    class MsgAddress {
         public:
             /**
              * @brief Type of address.
              */
-            enum AddressType
-            {
+            enum AddressType {
                 Phone,              /**< Phone number*/
                 Email,              /**< Email address*/
                 UnknownAddressType  /**< Unknown address, you get it if phone number format or email-format validations has failed to parce address.*/
@@ -47,8 +44,7 @@ namespace Msg
             /**
              * @brief A kind of recipient that defines a way how message should be delivered to this address.
              */
-            enum RecipientType
-            {
+            enum RecipientType {
                 To,                 /**< Primary recipient, messages are sent directly to this address.*/
                 Cc,                 /**< "Carbon copy", secondary recipient. This address gets a message as a copy of original message sent to other "TO"-recipient.*/
                 Bcc,                /**< "Blind carbon copy" to tertiary recipients who receive the message. The primary and secondary recipients cannot see the tertiary recipients.*/
index 27978b8188e48506d58c2394ce12ecdccbd7dfda..6e314bbee4fed9dcb45a497327b1e2a5b0aedfb9 100644 (file)
 #include "MsgList.h"
 #include <memory>
 
-namespace Msg
-{
+namespace Msg {
     class MsgAttachment;
     typedef std::shared_ptr<MsgAttachment> MsgAttachmentRef;
     typedef MsgList<MsgAttachment> MsgAttachmentList;
     typedef std::shared_ptr<MsgList<MsgAttachment>> MsgAttachmentListRef;
 
-    class MsgAttachment
-    {
+    class MsgAttachment {
         public:
             virtual ~MsgAttachment() {};
             virtual std::string getFilePath() const = 0;
index 2268c6214198b24d1fa2beab93a5a89659031382..9f9a3aa27e8b12c0c5a8cd02c42e28fa6e58512a 100644 (file)
 #include "MsgUtils.h"
 #include "Logger.h"
 
-namespace Msg
-{
-    class MsgComposer
-    {
+namespace Msg {
+    class MsgComposer {
         public:
             virtual ~MsgComposer() {};
 
index 0bed0d129007284054d8d87ea502f8691664447b..9f6be5f6840064e92bec6bf1347bd2e8706a9c40 100644 (file)
 #include <memory>
 #include <string>
 
-namespace Msg
-{
+namespace Msg {
     class MsgConvMedia;
     typedef MsgList<MsgConvMedia> MsgConvMediaList;
     typedef std::shared_ptr<MsgList<MsgConvMedia>> MsgConvMediaListRef;
 
-    class MsgConvMedia
-    {
+    class MsgConvMedia {
         public:
             virtual ~MsgConvMedia() {};
 
index 204c3703dd8c49f4bb42249c0378a3755021814f..95f55cf1397c587f31633d391db819c1733a3bd0 100644 (file)
@@ -25,8 +25,7 @@
 #include <time.h>
 #include <memory>
 
-namespace Msg
-{
+namespace Msg {
     class MsgConversationItem;
     typedef std::shared_ptr<MsgConversationItem> MsgConversationItemRef;
     typedef std::shared_ptr<MsgList<MsgConversationItem>> MsgConversationListRef;
@@ -34,8 +33,7 @@ namespace Msg
     /**
      * @brief An interface that provides basic information about conversation-list item.
      */
-    class MsgConversationItem
-    {
+    class MsgConversationItem {
         public:
             virtual ~MsgConversationItem();
 
index cc3d0a44a0df79b8c3e05c9ac9129e34eacc091d..44932ffba56e2869910d70d27a44465992d447f9 100644 (file)
 #include "Logger.h"
 #include "MsgTypes.h"
 
-namespace Msg
-{
+namespace Msg {
     /**
      * @brief Core-instance of whole mechanism that interacts with message-service.
      */
-    class MsgEngine
-    {
+    class MsgEngine {
         public:
             MsgEngine();
             ~MsgEngine();
index 5746e608d492caddaf9f661e44a3b42a3ab58456..39b004198df91f95b62c8d14cdb92d3a90d5ee3d 100644 (file)
 #define MsgList_H_
 
 
-namespace Msg
-{
+namespace Msg {
     /**
      * @brief Generic container for message-objects.
      */
     template<typename T>
-    class MsgList
-    {
+    class MsgList {
         public:
             typedef T Type;
 
index 730922135a137b997c82bebfdf84837e17f25dc9..7fafa8cefa45e21a6d6cd08f72a16fe8a2a37759 100644 (file)
@@ -20,8 +20,7 @@
 #include "MsgList.h"
 #include <memory>
 
-namespace Msg
-{
+namespace Msg {
     class MsgMedia;
     typedef std::shared_ptr<MsgMedia> MsgMediaRef;
     typedef MsgList<MsgMedia> MsgMediaList;
@@ -30,14 +29,12 @@ namespace Msg
     /**
      * @brief represents a file to be attached to message.
      */
-    class MsgMedia
-    {
+    class MsgMedia {
         public:
             /**
              * @brief Attacment-type.
              */
-            enum Type
-            {
+            enum Type {
                 UnknownType = 0,    /**< File type unsupported by smil-player, can't be played by smil-player. Attached as unknown filetype.*/
                 ImageType,          /**< Image file. Can be played with smil-player.*/
                 AudioType,          /**< Audio file. Can be played with smil-player.*/
index bc3203ff60422615336b0f76f3f1e08fac55a8bd..a3279711327eca7ab50f922f77903e89fd3d4b91 100644 (file)
@@ -19,8 +19,7 @@
 
 #include "MsgMedia.h"
 
-namespace Msg
-{
+namespace Msg {
     class MsgPage;
     typedef std::shared_ptr<MsgPage> MsgPageRef;
     typedef MsgList<MsgPage> MsgPageList;
@@ -30,8 +29,7 @@ namespace Msg
      * @brief An abstraction that represents a concept of "page".
      * This is a part of MMS that contains one previewable attachment(video or image) and a number of attachments that have no preview(documents, audio-files etc).
      */
-    class MsgPage
-    {
+    class MsgPage {
         public:
             virtual ~MsgPage();
 
index 06864d20e21da78b1dbf92389b79c86e75e44d9d..7a2f02965e2d0faccf134629da47fb1587fd49cd 100644 (file)
 #include <memory>
 #include <string>
 
-namespace Msg
-{
+namespace Msg {
     class MsgReport;
     typedef MsgList<MsgReport> MsgReportList;
     typedef std::shared_ptr<MsgList<MsgReport>> MsgReportListRef;
 
-    class MsgReport
-    {
+    class MsgReport {
         public:
-            enum DeliveryStatus
-            {
+            enum DeliveryStatus {
                 StatusNone,
                 StatusExpired,
                 StatusSuccess,
                 StatusRejected
             };
 
-            enum ReadStatus
-            {
+            enum ReadStatus {
                 ReadStatusNone,
                 ReadStatusIsRead,
                 ReadStatusIsDeleted,
                 ReadStatusRejectByUser
             };
 
-            enum Type
-            {
+            enum Type {
                  TypeDelivery,
                  TypeRead,
                  TypeReadReportSent
index 8e781d7390edd981d232a4280e8144285036a6c5..8584979a3a9cded1962dddfe6c0f1df85e4cc34a 100644 (file)
 #include <string>
 #include <vector>
 
-namespace Msg
-{
+namespace Msg {
     class IMsgSettingsListener;
 
-    class MsgSettings
-    {
+    class MsgSettings {
         public:
-            enum ActiveNotifPolicy
-            {
+            enum ActiveNotifPolicy {
                 AppBackgroundPolicy, // App is not running or on background.
                 AppForegroundPolicy  // App is running and on foreground, but not in conversation.
             };
 
-            enum RingtoneType
-            {
+            enum RingtoneType {
                 DefaultRingtone,
                 SilentRingtone,
                 UserRingtone
index 4556f905d1dda0b33fa2104fa7c8981951781695..fb823fc94b2f3368ba6898184f128cf54fa0a4fd 100644 (file)
 #include "MsgConversationItem.h"
 #include "MsgReport.h"
 
-namespace Msg
-{
+namespace Msg {
     class IMsgStorageListener;
     class MsgDataContainer;
 
     /**
      * @brief Instance responsible for interaction with message-service internal message-storage.
      */
-    class MsgStorage
-    {
+    class MsgStorage {
         public:
             /**
              * @brief Possible results message storage could cause to.
              */
-            enum StorageResult
-            {
+            enum StorageResult {
                 StorageSuccess            =  0,     /**< Storage successful.*/
                 StorageFail               = -1,     /**< Storage failure.*/
                 StorageSimFull            = -2,     /**< SIM storage is full.*/
index 3a35229d53170b745f2cef96d244fce91e6c6a1d..42a4917778928bd46ae4f658cfc22404ca06c11a 100644 (file)
@@ -23,8 +23,7 @@
 #include <memory>
 #include <time.h>
 
-namespace Msg
-{
+namespace Msg {
     class MsgThreadItem;
     typedef std::shared_ptr<MsgThreadItem> MsgThreadItemRef;
     typedef std::shared_ptr<MsgList<MsgThreadItem>> MsgThreadListRef;
@@ -32,8 +31,7 @@ namespace Msg
     /**
      * @brief An interface that should be implemented by data-structure responsible for accessing basic thread information.
      */
-    class MsgThreadItem
-    {
+    class MsgThreadItem {
         public:
             virtual ~MsgThreadItem();
 
index 62aed32d1665827de6faf1f5fa7838cefd84804f..148bb3047031433b964eab21e34a48706648c485 100644 (file)
 #include "MessageSMS.h"
 #include "MsgReport.h"
 
-namespace Msg
-{
+namespace Msg {
     /**
      * @brief Manages sending(receiving) messages activity.
      */
-    class MsgTransport
-    {
+    class MsgTransport {
         public:
             /**
              * @brief Possible results message sending could cause to.
              */
-            enum SendResult
-            {
+            enum SendResult {
                 SendSuccess               = 0,      /**< Sending successful.*/
                 SendFail                  = -1,     /**< Sending failure.*/
                 SendNoSIM                 = -2,     /**< No SIM was found.*/
index 167230ff999a32e9c442ba09adbc33795f2b2361..8e373becc203a30e25a0f9b786ad7d41ed27c558 100644 (file)
 
 #include <vector>
 
-namespace Msg
-{
-    class BaseMsgId
-    {
+namespace Msg {
+    class BaseMsgId {
         public:
             typedef unsigned Type;
             static const Type invalidId = 0;
@@ -67,21 +65,18 @@ namespace Msg
     };
 
     class ThreadId
-        : public BaseMsgId
-    {
+        : public BaseMsgId {
         using BaseMsgId::BaseMsgId;
     };
 
     class MsgId
-        : public BaseMsgId
-    {
+        : public BaseMsgId {
         using BaseMsgId::BaseMsgId;
     };
 
     typedef std::vector<MsgId> MsgIdList;
 
-    struct MsgTextMetric
-    {
+    struct MsgTextMetric {
         MsgTextMetric();
         void reset();
 
index 8e4591ad722ee0c15d50039a93167aea445b2aeb..fc119ec5499d407b9fb7f6d208e113e5e0a1fd21 100644 (file)
 #include <list>
 #include <vector>
 
-namespace Msg
-{
-    struct TokenizedRecipients
-    {
+namespace Msg {
+    struct TokenizedRecipients {
         std::list<std::pair<std::string, MsgAddress::AddressType>> validResults;
         std::string invalidResult;
     };
 
-    class MsgUtils
-    {
+    class MsgUtils {
         public:
             static TokenizedRecipients tokenizeRecipients(const std::string &inputText);
             static bool isValidNumber(const std::string &address);
index 7612456367beed8f27072d09b65bf8629ac0b52e..ee3b41b94cd08b806e833d9948402559bfee2b07 100644 (file)
@@ -46,8 +46,7 @@ MsgEngine::~MsgEngine()
 int MsgEngine::openService()
 {
     TRACE;
-    if (m_MsgHandle)
-    {
+    if (m_MsgHandle) {
         MSG_LOG_ERROR("Handle already has been opened");
     }
     int result = 0;
@@ -77,8 +76,7 @@ int MsgEngine::openService()
 int MsgEngine::closeService()
 {
     int result = 0;
-    if (m_MsgHandle)
-    {
+    if (m_MsgHandle) {
 #ifdef TIZEN_PRIVATE_API
         result = msg_close_msg_handle(&m_MsgHandle);
 #else
@@ -93,8 +91,7 @@ int MsgEngine::closeService()
 bool MsgEngine::isReady(std::string &errorMsg) const
 {
 #ifdef TIZEN_PRIVATE_API
-    if (!m_MsgHandle)
-    {
+    if (!m_MsgHandle) {
         errorMsg = handleIsNullStr;
         return false;
     }
@@ -156,8 +153,7 @@ const MsgComposer &MsgEngine::getComposer() const
 std::string MsgEngine::whatError(int error)
 {
 #ifdef TIZEN_PRIVATE_API
-    switch (error)
-    {
+    switch (error) {
         case MSG_SUCCESS:
             return "MSG_SUCCESS";
         break;
@@ -359,8 +355,7 @@ std::string MsgEngine::whatError(int error)
     }
 
 #else
-    switch (error)
-    {
+    switch (error) {
         case MESSAGES_ERROR_NONE:
             return "MESSAGES_ERROR_NONE";
         break;
@@ -419,17 +414,14 @@ void MsgEngine::calculateTextMetric(const std::string &text, MsgTextMetric &text
     int bytesInChar = 1;
     textMetric.reset();
 
-    if (!text.empty())
-    {
-        if (msg_util_calculate_text_length(text.c_str(), MSG_ENCODE_AUTO, &textLen, &segmentLen, &encode) != 0)
-        {
+    if (!text.empty()) {
+        if (msg_util_calculate_text_length(text.c_str(), MSG_ENCODE_AUTO, &textLen, &segmentLen, &encode) != 0) {
             MSG_LOG_ERROR("msg_util_calculate_text_length returns error");
         }
 
         textMetric.bytes = textLen;
 
-        switch (encode)
-        {
+        switch (encode) {
             case MSG_ENCODE_UCS2:
                 bytesInChar = 2;
                 break;
index 47ea37d42b4183e2879d9b11b386f0452173e249..f5f9fb7382100533eb7f404e9e2f555114b0e239 100644 (file)
@@ -51,17 +51,13 @@ void MsgSettings::addListener(IMsgSettingsListener &listener)
 {
     auto itr = std::find(m_Listeners.begin(), m_Listeners.end(), &listener);
     if (itr == m_Listeners.end())
-    {
         m_Listeners.push_back(&listener);
-    }
 }
 
 void MsgSettings::removeListener(IMsgSettingsListener &listener)
 {
     auto itr = std::find(m_Listeners.begin(), m_Listeners.end(), &listener);
     if (itr != m_Listeners.end())
-    {
         m_Listeners.erase(itr);
-    }
 }
 
index 192173b0decee5304d6a5ffb9f9206c3742976bb..73d41b3097445819721b417da280d74d2a6edd6f 100644 (file)
@@ -34,18 +34,14 @@ void MsgStorage::addListener(IMsgStorageListener &listener)
 {
     auto itr = std::find(m_Listeners.begin(), m_Listeners.end(), &listener);
     if (itr == m_Listeners.end())
-    {
         m_Listeners.push_back(&listener);
-    }
 }
 
 void MsgStorage::removeListener(IMsgStorageListener &listener)
 {
     auto itr = std::find(m_Listeners.begin(), m_Listeners.end(), &listener);
     if (itr != m_Listeners.end())
-    {
         m_Listeners.erase(itr);
-    }
 }
 
 bool MsgStorage::hasEmail(ThreadId id)
@@ -54,10 +50,8 @@ bool MsgStorage::hasEmail(ThreadId id)
         return false;
 
     const MsgAddressListRef addressList = getAddressList(id);
-    if (addressList)
-    {
-        for (int i = 0; i < addressList->getLength(); ++i)
-        {
+    if (addressList) {
+        for (int i = 0; i < addressList->getLength(); ++i) {
             const MsgAddress &msgAddr = addressList->at(i);
             if (msgAddr.getAddressType() == MsgAddress::Email)
                 return true;
index 71fcb38d7681c2355d4139af133511d960c41f8d..72224d02e60c4a4bea887519dbc6b07c0638598d 100644 (file)
@@ -24,8 +24,7 @@
 
 using namespace Msg;
 
-namespace
-{
+namespace {
     unsigned emailAddrLenMax = 256;
     const char *delimiters = ",;";
     const char *numberRegex = "\\+?([[:digit:]][ *\\(\\)-]*){2,14}[[:digit:]]$";
@@ -40,16 +39,13 @@ TokenizedRecipients MsgUtils::tokenizeRecipients(const std::string &inputText)
     std::string token;
     MsgAddress::AddressType addressType = MsgAddress::UnknownAddressType;
 
-    while (begin != end)
-    {
-        if (begin != std::string::npos)
-        {
+    while (begin != end) {
+        if (begin != std::string::npos) {
             token = inputText.substr(begin, end != std::string::npos ? end-begin : std::string::npos);
             begin = inputText.find_first_not_of(delimiters, end);
             result.invalidResult.append(token);
             addressType = getAddressType(result.invalidResult);
-            if (addressType != MsgAddress::UnknownAddressType)
-            {
+            if (addressType != MsgAddress::UnknownAddressType) {
                 result.validResults.push_back(std::make_pair(result.invalidResult, addressType));
                 result.invalidResult.clear();
             } else if (end != std::string::npos) {
@@ -88,14 +84,10 @@ bool MsgUtils::isValidAddress(const std::string &address)
 MsgAddress::AddressType MsgUtils::getAddressType(const std::string &address)
 {
     if (isValidNumber(address))
-    {
         return MsgAddress::Phone;
-    }
 
     if (isValidEmail(address))
-    {
         return MsgAddress::Email;
-    }
 
     return MsgAddress::UnknownAddressType;
 }
@@ -103,12 +95,9 @@ MsgAddress::AddressType MsgUtils::getAddressType(const std::string &address)
 std::string MsgUtils::makeNormalizedNumber(const std::string &number)
 {
     std::string normalizedNumber;
-    for (auto symbol : number)
-    {
+    for (auto symbol : number) {
         if (isdigit(symbol) || symbol == '*' || symbol == '#' || symbol == '+')
-        {
             normalizedNumber += symbol;
-        }
     }
     return normalizedNumber;
 }
@@ -116,8 +105,7 @@ std::string MsgUtils::makeNormalizedNumber(const std::string &number)
 std::string MsgUtils::makeCleanedNumber(const std::string &number)
 {
     std::string cleanedNumber;
-    for (auto symbol : number)
-    {
+    for (auto symbol : number) {
         if (isdigit(symbol))
             cleanedNumber += symbol;
     }
@@ -126,8 +114,7 @@ std::string MsgUtils::makeCleanedNumber(const std::string &number)
 
 bool MsgUtils::isMms(Message::Type type)
 {
-    switch (type)
-    {
+    switch (type) {
         case Message::MT_MMS:
         case Message::MT_MMS_Noti:
             return true;
@@ -145,8 +132,7 @@ std::string MsgUtils::makeKbStr(long long bytes)
 {
     const long long kb = 1024; // Bytes in kb
     long long sizeKb = 0;
-    if (bytes <= kb)
-    {
+    if (bytes <= kb) {
         sizeKb = 1;
     } else {
         sizeKb =  bytes / kb;
index 5a167222c59e11bab7f91ef1aa6dad9cd6f59240..d71eaa35e3388f08b6dc1428a1683526521e5ea1 100644 (file)
@@ -31,13 +31,10 @@ MessageMmsPrivate::MessageMmsPrivate(bool release, msg_struct_t msgStruct, msg_s
     , m_Page(false)
     , m_Attachment(false)
 {
-    if (!m_MmsStruct)
-    {
+    if (!m_MmsStruct) {
         m_MmsStruct = msg_create_struct(MSG_STRUCT_MMS);
         if (msgStruct)
-        {
             msg_get_mms_struct(m_MsgStruct, m_MmsStruct);
-        }
     }
 }
 
@@ -60,9 +57,7 @@ msg_struct_t MessageMmsPrivate::getMmsStruct() const
 MessageMmsPrivate::~MessageMmsPrivate()
 {
     if (m_MmsStruct)
-    {
         msg_release_struct(&m_MmsStruct);
-    }
 }
 
 MessageMmsPrivate::Type MessageMmsPrivate::getType() const
@@ -83,18 +78,14 @@ std::string MessageMmsPrivate::getText() const
     std::string result;
     int size = pageList.getLength();
 
-    for (int i = 0; i < size; ++i)
-    {
+    for (int i = 0; i < size; ++i) {
         const MsgMediaList &mediaList = pageList.at(i).getMediaList();
 
         int sizeList = mediaList.getLength();
-        for (int j = 0; j < sizeList; ++j)
-        {
-            if (mediaList[j].getType() == MsgMedia::TextType)
-            {
+        for (int j = 0; j < sizeList; ++j) {
+            if (mediaList[j].getType() == MsgMedia::TextType) {
                 std::string str = FileUtils::readTextFile(mediaList[j].getFilePath());
-                if (!str.empty())
-                {
+                if (!str.empty()) {
                     if (i > 0 && !result.empty())
                         result.append("\n");
 
@@ -112,13 +103,11 @@ int MessageMmsPrivate::getMediaCount() const
     int result = 0;
 
     int size = pageList.getLength();
-    for (int i = 0; i < size; ++i)
-    {
+    for (int i = 0; i < size; ++i) {
         const MsgMediaList &mediaList = pageList.at(i).getMediaList();
 
         int sizeList = mediaList.getLength();
-        for (int j = 0; j < sizeList; ++j)
-        {
+        for (int j = 0; j < sizeList; ++j) {
             if (mediaList[j].getType() != MsgMedia::TextType && mediaList[j].getType() != MsgMedia::UnknownType)
                 ++result;
         }
index 6d5c02a8579722ad3c073acb89bc5c10f37d2e9d..a7ec5438ba899612a702861e653901793c6bfa86 100644 (file)
 #include "MsgPagePrivate.h"
 #include "MsgAttachmentPrivate.h"
 
-namespace Msg
-{
+namespace Msg {
     class MessageMmsPrivate
         : public MessagePrivate
-        , public MessageMms
-    {
+        , public MessageMms {
         public:
             MessageMmsPrivate(bool release, msg_struct_t msgStruct = nullptr, msg_struct_t mmsStruct = nullptr);
             virtual ~MessageMmsPrivate();
index 075dc1d0844fedb47c367cd2cdb9d0032153d69e..fd59d816f424e4c4295a56e0b85d843f588dd998 100644 (file)
@@ -61,8 +61,7 @@ MsgAddressPrivate &MessagePrivate::addAddress()
 void MessagePrivate::addAddresses(const MsgAddressList &list)
 {
     int len = list.getLength();
-    for (int i = 0; i < len; ++i)
-    {
+    for (int i = 0; i < len; ++i) {
         MsgAddressPrivate &newAddr = MessagePrivate::addAddress();
         newAddr.setFields(list[i]);
     }
@@ -146,8 +145,7 @@ void MessagePrivate::setSubject(const std::string &text)
 
 void MessagePrivate::setMessageStorageType(Message::MessageStorageType msgStorage)
 {
-    switch (msgStorage)
-    {
+    switch (msgStorage) {
         case Message::MS_Phone:
             msg_set_int_value(m_MsgStruct, MSG_MESSAGE_STORAGE_ID_INT, MSG_STORAGE_PHONE);
             break;
index eba4c308efa69cca1a5675e67ddf1b2eb8f4bc67..497bb2486ba72bbc2cd2c7e90cfc58c4fd22b30b 100644 (file)
 
 #include <msg_types.h>
 
-namespace Msg
-{
+namespace Msg {
     class MessagePrivate
         : public virtual Message
-        , public MsgStructPrivate
-    {
+        , public MsgStructPrivate {
         public:
             MessagePrivate(bool release, msg_struct_t msgStruct = nullptr);
             virtual ~MessagePrivate();
index 813d8da39cfba79982a963c20b5177beed1f7501..7561fb804d1da8d6829726cb1ce41a13b8ef9309 100644 (file)
 #include "MsgListHandlePrivate.h"
 #include "MsgStructListPrivate.h"
 
-namespace Msg
-{
+namespace Msg {
     class MessageSMSPrivate
         : public MessagePrivate
-        , public MessageSMS
-    {
+        , public MessageSMS {
         public:
             MessageSMSPrivate(bool release, msg_struct_t msgStruct = nullptr);
             virtual ~MessageSMSPrivate();
index e7161dae15f870a2cc81e04275a73cb7629dc02a..dc593c64647d63ec0ce7d2fc3756706dc82d1b24 100644 (file)
 #include "MsgStructListPrivate.h"
 #include "MsgStructPrivate.h"
 
-namespace Msg
-{
+namespace Msg {
     class MsgAddressPrivate
         : public MsgStructPrivate
-        , public MsgAddress
-    {
+        , public MsgAddress {
         public:
             MsgAddressPrivate(bool release, msg_struct_t msgStruct = nullptr);
             virtual ~MsgAddressPrivate();
index 10d1b91569a376fd5ca0a96eae3ac0e0928cbe1d..63673b6b7b93195dd412173df3eb7a01bef5059e 100644 (file)
@@ -46,8 +46,7 @@ int MsgAttachmentPrivate::getFileSize() const
     int size = 0;
     msg_get_int_value(m_MsgStruct, MSG_MMS_ATTACH_FILESIZE_INT, &size);
 
-    if (size == 0)
-    {
+    if (size == 0) {
         MSG_LOG_WARN("File ", getFilePath(), " size = 0, trying to get real file size");
         size = (int)FileUtils::getFileSize(getFilePath());
         MSG_LOG("Real file size = ", size);
index 360710efced654e68a13697bb0356bb4ec90665e..3ed3814ca7060e0f339b2b5e01d3ec7fd9425fc3 100644 (file)
 #include "MsgListHandlePrivate.h"
 #include "MsgStructListPrivate.h"
 
-namespace Msg
-{
+namespace Msg {
     class MsgAttachmentPrivate
         : public MsgStructPrivate
-        , public MsgAttachment
-    {
+        , public MsgAttachment {
         public:
             MsgAttachmentPrivate(bool release, msg_struct_t msgStruct = nullptr);
             virtual ~MsgAttachmentPrivate();
index 70c8571ce844d248df5fde366cb0a6fe37133898..82dc2a4f84c2ef3a17c4a4dc40629f2da669a3dc 100644 (file)
@@ -37,8 +37,7 @@ MessageSMSRef MsgComposerPrivate::createSms()
 {
     MessageSMSRef smsRef;
     msg_struct_t msgInfo = msg_create_struct(MSG_STRUCT_MESSAGE_INFO);
-    if (msgInfo)
-    {
+    if (msgInfo) {
         msg_set_int_value(msgInfo, MSG_MESSAGE_TYPE_INT, MSG_TYPE_SMS);
 
         MessageSMSPrivate *sms = new MessageSMSPrivate(true, msgInfo);
@@ -51,8 +50,7 @@ MessageMmsRef MsgComposerPrivate::createMms()
 {
     MessageMmsRef mmsRef;
     msg_struct_t msgInfo = msg_create_struct(MSG_STRUCT_MESSAGE_INFO);
-    if (msgInfo)
-    {
+    if (msgInfo) {
         msg_set_int_value(msgInfo, MSG_MESSAGE_TYPE_INT, MSG_TYPE_MMS);
         msg_struct_t mmsStruct = msg_create_struct(MSG_STRUCT_MMS);
 
index 380ead449ccf5a5bcefc6429784c4e59e1c32791..8f6cda48ad13463d6580770c96cc5c16174e8bfd 100644 (file)
 #include "MsgComposer.h"
 #include <msg_types.h>
 
-namespace Msg
-{
+namespace Msg {
     class MsgComposerPrivate
-        : public MsgComposer
-    {
+        : public MsgComposer {
         public:
             MsgComposerPrivate();
             MsgComposerPrivate(MsgComposerPrivate&) = delete;
index 6351835c0f5ff32421cd8eb32ff20eb6e7b0a3d8..2f1fc09dc28794a5e4063e6b4ddc10492a31597f 100644 (file)
 #include "MsgListHandlePrivate.h"
 #include "MsgStructPrivate.h"
 
-namespace Msg
-{
+namespace Msg {
     class MsgConvMediaPrivate
         : public MsgStructPrivate
-        , public MsgConvMedia
-    {
+        , public MsgConvMedia {
         public:
             MsgConvMediaPrivate(bool release, msg_struct_t msgStruct = nullptr);
             virtual ~MsgConvMediaPrivate();
index 61d637e5ecae0a76596aefd9b65a4e0d37d6e538..b1e55d854a294ac7e4dd9519243090b86d2893f0 100644 (file)
 #include "MsgStructListPrivate.h"
 #include "MsgConvMediaPrivate.h"
 
-namespace Msg
-{
+namespace Msg {
     /**
      * @brief Implementation of MsgConversationItem with msg-service private API usage.
      */
     class MsgConversationItemPrivate
         : public MsgStructPrivate
-        , public MsgConversationItem
-    {
+        , public MsgConversationItem {
         public:
             MsgConversationItemPrivate(bool release, msg_struct_t msgStruct = nullptr);
             virtual ~MsgConversationItemPrivate();
index 0fe4cedcc976313673ef38d4440530d0a689774d..38e06709a48e6bc8eb14f032231403c929dea3c4 100644 (file)
@@ -19,8 +19,7 @@
 
 #include <string>
 
-namespace Msg
-{
+namespace Msg {
     // SMIL layout:
     const int smilScreenWidthP  = 100;
     const int smilScreenHeightP = 100;
index 28e3869c18d8cd59f013c7888e4953e7bdc9051b..5645b97c59930346f9ac6e1c475e34072ac89401 100644 (file)
 
 #include <msg.h>
 
-namespace Msg
-{
+namespace Msg {
     // class T : public BaseT {}
     template<typename T, typename BaseT>
     class MsgListHandlePrivate
-        : public MsgList<BaseT> // implement interface
-    {
+        : public MsgList<BaseT> { // implement interface
         public:
             MsgListHandlePrivate(bool release, msg_list_handle_t list = nullptr)
                 : m_List(list)
@@ -39,9 +37,7 @@ namespace Msg
             virtual ~MsgListHandlePrivate()
             {
                 if (m_Release && m_List)
-                {
                     msg_list_free(m_List);
-                }
             }
 
             virtual BaseT &at(int i)
index da043e9b0cd41aef10a3e18a9a4455099adc89a5..e5d5ebb1e15c191c81460c1dcb9366c2f4bcdf7d 100644 (file)
@@ -60,26 +60,16 @@ void MsgMediaPrivate::setType(Type type)
 {
     msg_set_int_value(m_MsgStruct, MSG_MMS_MEDIA_TYPE_INT, MsgUtilsPrivate::smilTypeToNative(type));
 
-    switch (type)
-    {
+    switch (type) {
         case ImageType:
         case VideoType:
-        {
             MsgUtilsPrivate::setStr(m_MsgStruct, MSG_MMS_MEDIA_REGION_ID_STR, imageRegionId);
             break;
-        }
-
         case AudioType:
-        {
             break;
-        }
-
         case TextType:
-        {
             MsgUtilsPrivate::setStr(m_MsgStruct, MSG_MMS_MEDIA_REGION_ID_STR, textRegionId);
             break;
-        }
-
         default:
             MSG_ASSERT(false, "Wrong SMIL type:", type);
     }
index ffc0f6f9788c5d3468558f5b6be53d975356fecf..bffa366f7af16bf8991ece6a9b408da8213817a5 100644 (file)
 #include "MsgListHandlePrivate.h"
 #include "MsgStructListPrivate.h"
 
-namespace Msg
-{
+namespace Msg {
     class MsgMediaPrivate
         : public MsgStructPrivate
-        , public MsgMedia
-    {
+        , public MsgMedia {
         public:
             MsgMediaPrivate(bool release, msg_struct_t msgStruct = nullptr);
             virtual ~MsgMediaPrivate();
index 17cfe71528dba90c49be02c856c055bf3072198d..8e676b95d7628494c211909d8a67c590621de947 100644 (file)
 #include "MsgPage.h"
 #include "MsgMediaPrivate.h"
 
-namespace Msg
-{
+namespace Msg {
     class MsgPagePrivate
         : public MsgStructPrivate
-        , public MsgPage
-    {
+        , public MsgPage {
         public:
             MsgPagePrivate(bool release, msg_struct_t msgStruct = nullptr);
             virtual ~MsgPagePrivate();
index 6885c6c7d39550d872451b85ae463ea994452470..daaff40af187a73145ba01806775b6102b98af00 100644 (file)
 #include "MsgStructListPrivate.h"
 #include "MsgStructPrivate.h"
 
-namespace Msg
-{
+namespace Msg {
     class MsgReportPrivate
         : public MsgStructPrivate
-        , public MsgReport
-    {
+        , public MsgReport {
         public:
             MsgReportPrivate(bool release, msg_struct_t msgStruct = nullptr);
             virtual ~MsgReportPrivate();
index 9f649a135557ce9d52f2cca3aeb64f278be94938..8b4a75d1c2263a1ba7293b85f9584ad95fbd6082 100644 (file)
@@ -62,8 +62,7 @@ void MsgSettingsPrivate::init()
 
 void MsgSettingsPrivate::finit()
 {
-    if (m_pActiveNotifJob)
-    {
+    if (m_pActiveNotifJob) {
         ecore_job_del(m_pActiveNotifJob);
         m_pActiveNotifJob = nullptr;
         vconf_set_int(VCONFKEY_MESSAGE_ACTIVATED_CONVERSATION_ID, m_ActiveNotifValue);
@@ -116,8 +115,7 @@ int MsgSettingsPrivate::getMaxMmsSize() const
     // Standard MMS has size 307200 bytes
     const int kb = 1024;
 
-    if (res > 0)
-    {
+    if (res > 0) {
         res *= kb;
         res -= 5 * kb; // header size
     } else {
@@ -150,9 +148,7 @@ void MsgSettingsPrivate::setRingtoneType(RingtoneType type)
     msg_set_int_value(m_GeneralOpt, MSG_GENERAL_RINGTONE_TYPE_INT, MsgUtilsPrivate::ringtoneTypeToNative(type));
     msg_set_general_opt(m_ServiceHandle, m_GeneralOpt);
     for (auto listener: m_Listeners)
-    {
         listener->onRingtoneChanged(*this);
-    }
 }
 
 MsgSettingsPrivate::RingtoneType MsgSettingsPrivate::getRingtoneType() const
@@ -167,9 +163,7 @@ void MsgSettingsPrivate::setRingtone(const std::string &soundPath)
     MsgUtilsPrivate::setStr(m_GeneralOpt, MSG_GENERAL_RINGTONE_PATH_STR, soundPath);
     msg_set_general_opt(m_ServiceHandle, m_GeneralOpt);
     for (auto listener: m_Listeners)
-    {
         listener->onRingtoneChanged(*this);
-    }
 }
 
 std::string MsgSettingsPrivate::getRingtone() const
@@ -275,8 +269,7 @@ void MsgSettingsPrivate::setActiveNotifPolicy(ThreadId id)
 void MsgSettingsPrivate::addJobSetActiveNotifPolicy(int value)
 {
     m_ActiveNotifValue = value;
-    if (!m_pActiveNotifJob)
-    {
+    if (!m_pActiveNotifJob) {
         m_pActiveNotifJob = ecore_job_add
         (
             [](void *data)
index 84825575418dfc719fb4da913879bbf655413b18..f3ea3f3f0271c76f7d613a34bbb572b409985791 100644 (file)
 #include <Ecore.h>
 #include <msg_types.h>
 
-namespace Msg
-{
+namespace Msg {
     class MsgSettingsPrivate
-        : public MsgSettings
-    {
+        : public MsgSettings {
         public:
             MsgSettingsPrivate(msg_handle_t serviceHandle);
             MsgSettingsPrivate(MsgSettingsPrivate&) = delete;
index 6c2bea185e133208ed2d6e7d38b3043712399302..bcdd4505b783fa85879ff6e39077a97fdfa9856a 100644 (file)
@@ -44,9 +44,7 @@ template <typename T>
 void MsgStoragePrivate::notifyListeners(const T& delta, ListenerMethod<T> method)
 {
     for (auto listener: m_Listeners)
-    {
         (listener->*method)(delta);
-    }
 }
 
 void MsgStoragePrivate::msg_storage_change_cb(msg_handle_t handle, msg_storage_change_type_t storageChangeType, msg_id_list_s *pMsgIdList, void *user_param)
@@ -59,12 +57,9 @@ void MsgStoragePrivate::msg_storage_change_cb(msg_handle_t handle, msg_storage_c
     msgIdList.reserve(count);
 
     for (int i = 0; i < count; ++i)
-    {
         msgIdList.push_back(pMsgIdList->msgIdList[i]);
-    }
 
-    switch (storageChangeType)
-    {
+    switch (storageChangeType) {
         case MSG_STORAGE_CHANGE_UPDATE:
             self->notifyListeners(msgIdList, &IMsgStorageListener::onMsgStorageUpdate);
             break;
@@ -86,8 +81,7 @@ void MsgStoragePrivate::msg_thread_change_cb(msg_handle_t handle, msg_storage_ch
     MsgStoragePrivate *self = static_cast<MsgStoragePrivate *>(user_param);
     ThreadId tId = static_cast<ThreadId>(threadId);
 
-    switch (storageChangeType)
-    {
+    switch (storageChangeType) {
         case MSG_STORAGE_CHANGE_UPDATE:
             self->notifyListeners(tId, &IMsgStorageListener::onMsgStorageThreadUpdate);
             break;
@@ -119,9 +113,7 @@ MsgThreadListRef MsgStoragePrivate::getThreadList()
     msg_release_struct(&sortRule);
 
     if (error == 0)
-    {
         res.reset(new MsgThreadStructListPrivate(true, msgList));
-    }
 
     return res;
 }
@@ -139,9 +131,8 @@ MessageSMSListRef MsgStoragePrivate::getSimMsgList()
     msg_set_int_value(listCond, MSG_LIST_CONDITION_STORAGE_ID_INT, MSG_STORAGE_SIM);
 
     if (msg_get_message_list2(m_ServiceHandle, listCond, &msgList) == 0)
-    {
         res.reset(new SmsStructListPrivate(true, msgList));
-    }
+
     msg_release_struct(&listCond);
     return res;
 }
@@ -150,8 +141,7 @@ ThreadId MsgStoragePrivate::getThreadId(const MsgAddressList &addressList)
 {
     msg_thread_id_t id = ThreadId::invalidId;
 
-    if (const MsgAddressListHandlePrivate *privateList = dynamic_cast<const MsgAddressListHandlePrivate*>(&addressList))
-    {
+    if (const MsgAddressListHandlePrivate *privateList = dynamic_cast<const MsgAddressListHandlePrivate*>(&addressList)) {
         msg_list_handle_t handleList = *privateList;
         msg_get_thread_id_by_address2(m_ServiceHandle, handleList, &id);
     } else if (const MsgAddressStructListPrivate *privateList = dynamic_cast<const MsgAddressStructListPrivate*>(&addressList)) {
@@ -169,15 +159,12 @@ ThreadId MsgStoragePrivate::getThreadId(const std::list<std::string> &addressLis
     msg_thread_id_t tid = ThreadId::invalidId;
     msg_struct_t msgInfo = msg_create_struct(MSG_STRUCT_MESSAGE_INFO);
 
-    if (msgInfo)
-    {
-        for (auto &addr : addressList)
-        {
+    if (msgInfo) {
+        for (auto &addr : addressList) {
             MsgAddress::AddressType type = MsgUtils::getAddressType(addr);
             msg_struct_t tmpAddr = nullptr;
 
-            if (msg_list_add_item(msgInfo, MSG_MESSAGE_ADDR_LIST_HND, &tmpAddr) == MSG_SUCCESS)
-            {
+            if (msg_list_add_item(msgInfo, MSG_MESSAGE_ADDR_LIST_HND, &tmpAddr) == MSG_SUCCESS) {
                 msg_set_int_value(tmpAddr, MSG_ADDRESS_INFO_ADDRESS_TYPE_INT, MsgUtilsPrivate::addressTypeToNative(type));
                 msg_set_int_value(tmpAddr, MSG_ADDRESS_INFO_RECIPIENT_TYPE_INT, MSG_RECIPIENTS_TYPE_TO);
                 MsgUtilsPrivate::setStr(tmpAddr, MSG_ADDRESS_INFO_ADDRESS_VALUE_STR, addr);
@@ -208,8 +195,7 @@ MsgThreadListRef MsgStoragePrivate::searchThread(const std::string &word)
     msg_struct_list_s searchList = {};
 
     msg_error_t error = msg_search_message_for_thread_view(m_ServiceHandle, word.c_str(), &searchList);
-    if (error != 0)
-    {
+    if (error != 0) {
         MSG_LOG_ERROR("msg_search_message_for_thread_view error ", error);
     }
 
@@ -232,8 +218,7 @@ int MsgStoragePrivate::getUnreadThreadCount() const
     msg_get_thread_view_list(m_ServiceHandle, sortRule, &peerList);
     msg_release_struct(&sortRule);
 
-    for (int i = 0; i < peerList.nCount; i++)
-    {
+    for (int i = 0; i < peerList.nCount; i++) {
         int unreadCnt = 0;
         msg_get_int_value(peerList.msg_struct_info[i], MSG_THREAD_UNREAD_COUNT_INT, &unreadCnt);
 
@@ -249,9 +234,8 @@ MsgThreadItemRef MsgStoragePrivate::getThread(ThreadId id)
     MsgThreadItemRef res;
     msg_struct_t thread = msg_create_struct(MSG_STRUCT_THREAD_INFO);
     if (msg_get_thread(m_ServiceHandle, id, thread) == 0)
-    {
         res.reset(new MsgThreadItemPrivate(true, thread));
-    }
+
     return res;
 }
 
@@ -267,9 +251,8 @@ MsgConversationListRef MsgStoragePrivate::getConversationList(ThreadId id)
     int error = msg_get_conversation_view_list(m_ServiceHandle, id, &convList);
 
     if (error == 0)
-    {
         res.reset(new MsgConversationStructListPrivate(true, convList));
-    }
+
     return res;
 }
 
@@ -277,8 +260,7 @@ MsgConversationItemRef MsgStoragePrivate::getConversationItem(MsgId id)
 {
     MsgConversationItemRef res;
     msg_struct_t convItem = msg_create_struct(MSG_STRUCT_CONV_INFO);
-    if (msg_get_conversation(m_ServiceHandle, id, convItem) == 0)
-    {
+    if (msg_get_conversation(m_ServiceHandle, id, convItem) == 0) {
         res.reset(new MsgConversationItemPrivate(true, convItem));
     } else {
         msg_release_struct(&convItem);
@@ -293,8 +275,7 @@ MessageRef MsgStoragePrivate::getMessage(MsgId id)
     msg_struct_t msg = msg_create_struct(MSG_STRUCT_MESSAGE_INFO);
     msg_struct_t sendOpt = msg_create_struct(MSG_STRUCT_SENDOPT);
 
-    if (msg_get_message(m_ServiceHandle, id, msg, sendOpt) == 0)
-    {
+    if (msg_get_message(m_ServiceHandle, id, msg, sendOpt) == 0) {
         int nativeType = MSG_TYPE_INVALID;
         msg_get_int_value(msg, MSG_MESSAGE_TYPE_INT, &nativeType);
         Message::Type type = MsgUtilsPrivate::nativeToMessageType(nativeType);
@@ -322,8 +303,7 @@ MsgId MsgStoragePrivate::saveMessage(Message &msg, bool updateExisting, StorageR
     msg_set_bool_value(sendOpt, MSG_SEND_OPT_SETTING_BOOL, false);
 
     msgPriv.commit();
-    if (msgPriv.getId().isValid() && updateExisting)
-    {
+    if (msgPriv.getId().isValid() && updateExisting) {
         int err = msg_update_message(m_ServiceHandle, msgPriv, sendOpt);
         if (result)
             *result = MsgUtilsPrivate::nativeToStorageResult(err);
@@ -331,13 +311,11 @@ MsgId MsgStoragePrivate::saveMessage(Message &msg, bool updateExisting, StorageR
             newMsgId = msg.getId();
     } else {
         newMsgId = msg_add_message(m_ServiceHandle, msgPriv, sendOpt);
-        if (newMsgId > 0)
-        {
+        if (newMsgId > 0) {
             int err = msg_move_msg_to_storage(m_ServiceHandle, newMsgId, msg.getMessageStorageType());
             if (result)
                 *result = MsgUtilsPrivate::nativeToStorageResult(err);
-            if (err != MSG_SUCCESS)
-            {
+            if (err != MSG_SUCCESS) {
                 MSG_LOG_WARN("Can't move msg to storage, error = ", MsgEngine::whatError(err));
                 deleteMessage(newMsgId);
                 newMsgId.reset();
index e7abfcee366fa2b88ad6200a37a626d8019b6395..6154bb0bb333ac33d020f9124c8cb1411f629f88 100644 (file)
 #include <msg.h>
 #include <msg_storage_types.h>
 
-namespace Msg
-{
+namespace Msg {
     class MsgStoragePrivate
-        : public MsgStorage
-    {
+        : public MsgStorage {
         public:
             MsgStoragePrivate(msg_handle_t serviceHandle);
             MsgStoragePrivate(MsgStoragePrivate&) = delete;
index 8044209d89195a6ed0c74fb9875e534199e64299..cd24a92cc6012514d71142c4c70dfd72601125e3 100644 (file)
 
 #include <msg.h>
 
-namespace Msg
-{
+namespace Msg {
     static msg_struct_list_s emptyStructList;
 
     // class T : public BaseT {}
     template<typename T, typename BaseT>
     class MsgStructListPrivate
-        : public MsgList<BaseT> // implement interface
-    {
+        : public MsgList<BaseT> { // implement interface
         public:
             MsgStructListPrivate(bool release, const msg_struct_list_s &list = emptyStructList)
                 : m_List(list)
@@ -41,9 +39,7 @@ namespace Msg
             virtual ~MsgStructListPrivate()
             {
                 if (m_Release && m_List.nCount)
-                {
                     msg_release_list_struct(&m_List);
-                }
             }
 
             virtual BaseT &at(int i)
index c106b998b840c74dd6b3f3644a493cedd013cb83..991383066f7c7317977194f7e425feaf35cfe10f 100644 (file)
 
 #include <msg.h>
 
-namespace Msg
-{
-    class MsgStructPrivate
-    {
+namespace Msg {
+    class MsgStructPrivate {
         public:
             inline MsgStructPrivate(bool release, msg_struct_t msgStruct = nullptr);
             inline virtual ~MsgStructPrivate();
@@ -49,9 +47,7 @@ namespace Msg
     inline MsgStructPrivate::~MsgStructPrivate()
     {
         if (m_Release && m_MsgStruct)
-        {
             msg_release_struct(&m_MsgStruct);
-        }
     }
 
     inline void MsgStructPrivate::set(msg_struct_t msgStruct)
index 2d3f1e82328f04c6045f4f149836be784faf69e8..dfe3ede00e19e64da15c3bbc80184deca17266ea 100644 (file)
 #include "MsgStructListPrivate.h"
 #include "MsgStructPrivate.h"
 
-namespace Msg
-{
+namespace Msg {
     class MsgThreadItemPrivate
         : public MsgStructPrivate
-        , public MsgThreadItem
-    {
+        , public MsgThreadItem {
         public:
             MsgThreadItemPrivate(bool release, msg_struct_t msgStruct = nullptr);
             virtual ~MsgThreadItemPrivate();
index a6baac719537987152f529b529b8c421feb93e10..aec9f4776ef53549e6bfb4f825e767d3d62f17d2 100644 (file)
@@ -46,8 +46,7 @@ MsgTransport::SendResult MsgTransportPrivate::sendMessage(Message &msg, ThreadId
 
     msg_set_struct_handle(req, MSG_REQUEST_MESSAGE_HND, privMsg);
 
-    if (privMsg.isMms())
-    {
+    if (privMsg.isMms()) {
         MSG_LOG("Sending MMS");
         err = msg_mms_send_message(m_ServiceHandle, req);
     } else {
index cb7ba3058b724a2d246333e6ab99f1140b1ff955..b58a3e08d83fd574d6f232e59470a70d88e3c030 100644 (file)
 #include <msg_storage.h>
 #include <msg_transport.h>
 
-namespace Msg
-{
+namespace Msg {
     /**
      * @brief Private msg-service API specific implementation of sending messages routine.
      */
     class MsgTransportPrivate
-        : public MsgTransport
-    {
+        : public MsgTransport {
         public:
             MsgTransportPrivate(msg_handle_t serviceHandle);
             virtual ~MsgTransportPrivate();
index 6cc6ee6bb5747c199efe7912d4e97eb09983a108..bf527fc7230909e3aab796c66587330726d7ec33 100644 (file)
@@ -21,11 +21,9 @@ using namespace Msg;
 
 int MsgUtilsPrivate::directionToNative(Message::Direction direction)
 {
-    switch (direction)
-    {
+    switch (direction) {
         case Message::MD_Sent:
             return MSG_DIRECTION_TYPE_MO;
-
         case Message::MD_Received:
             return MSG_DIRECTION_TYPE_MT;
     }
@@ -35,11 +33,9 @@ int MsgUtilsPrivate::directionToNative(Message::Direction direction)
 
 Message::Direction MsgUtilsPrivate::nativeToDirection(int direction)
 {
-    switch (direction)
-    {
+    switch (direction) {
         case MSG_DIRECTION_TYPE_MO:
             return Message::MD_Sent;
-
         case MSG_DIRECTION_TYPE_MT:
             return Message::MD_Received;
     }
@@ -49,11 +45,9 @@ Message::Direction MsgUtilsPrivate::nativeToDirection(int direction)
 
 Message::MessageStorageType MsgUtilsPrivate::nativeToMessageStorage(int id)
 {
-    switch (id)
-    {
+    switch (id) {
         case MSG_STORAGE_PHONE:
             return Message::MS_Phone;
-
         case MSG_STORAGE_SIM:
             return Message::MS_Sim;
     }
@@ -63,14 +57,11 @@ Message::MessageStorageType MsgUtilsPrivate::nativeToMessageStorage(int id)
 
 int MsgUtilsPrivate::addressTypeToNative(MsgAddress::AddressType type)
 {
-    switch (type)
-    {
+    switch (type) {
         case MsgAddress::Phone:
             return MSG_ADDRESS_TYPE_PLMN;
-
         case MsgAddress::Email:
             return MSG_ADDRESS_TYPE_EMAIL;
-
         default:
         case MsgAddress::UnknownAddressType:
             return MSG_ADDRESS_TYPE_UNKNOWN;
@@ -79,14 +70,11 @@ int MsgUtilsPrivate::addressTypeToNative(MsgAddress::AddressType type)
 
 MsgAddress::AddressType MsgUtilsPrivate::nativeToAddressType(int type)
 {
-    switch (type)
-    {
+    switch (type) {
         case MSG_ADDRESS_TYPE_PLMN:
             return MsgAddress::Phone;
-
         case MSG_ADDRESS_TYPE_EMAIL:
             return MsgAddress::Email;
-
         default:
         case MSG_ADDRESS_TYPE_UNKNOWN:
             return MsgAddress::UnknownAddressType;
@@ -96,17 +84,13 @@ MsgAddress::AddressType MsgUtilsPrivate::nativeToAddressType(int type)
 
 MsgReport::DeliveryStatus MsgUtilsPrivate::nativeToReportDeliveryStatus(int status)
 {
-    switch (status)
-    {
+    switch (status) {
         case MSG_DELIVERY_REPORT_SUCCESS:
             return MsgReport::StatusSuccess;
-
         case MSG_DELIVERY_REPORT_EXPIRED:
             return MsgReport::StatusExpired;
-
         case MSG_DELIVERY_REPORT_REJECTED:
             return MsgReport::StatusRejected;
-
         default:
         case MSG_DELIVERY_REPORT_NONE:
             return MsgReport::StatusNone;
@@ -115,17 +99,13 @@ MsgReport::DeliveryStatus MsgUtilsPrivate::nativeToReportDeliveryStatus(int stat
 
 MsgReport::ReadStatus MsgUtilsPrivate::nativeToReportReadStatus(int status)
 {
-    switch (status)
-    {
+    switch (status) {
         case MSG_READ_REPORT_IS_READ:
             return MsgReport::ReadStatusIsRead;
-
         case MSG_READ_REPORT_IS_DELETED:
             return MsgReport::ReadStatusIsDeleted;
-
         case MSG_READ_REPORT_REJECT_BY_USER:
             return MsgReport::ReadStatusRejectByUser;
-
         default:
         case MSG_READ_REPORT_NONE:
             return MsgReport::ReadStatusNone;
@@ -134,17 +114,13 @@ MsgReport::ReadStatus MsgUtilsPrivate::nativeToReportReadStatus(int status)
 
 int MsgUtilsPrivate::reportReadReportStatusToNative(MsgReport::ReadStatus status)
 {
-    switch (status)
-    {
+    switch (status) {
         case MsgReport::ReadStatusIsRead:
             return MSG_READ_REPORT_IS_READ;
-
         case MsgReport::ReadStatusIsDeleted:
             return MSG_READ_REPORT_IS_DELETED;
-
         case MsgReport::ReadStatusRejectByUser:
             return MSG_READ_REPORT_REJECT_BY_USER;
-
         default:
         case MsgReport::ReadStatusNone:
             return MSG_READ_REPORT_NONE;
@@ -153,14 +129,11 @@ int MsgUtilsPrivate::reportReadReportStatusToNative(MsgReport::ReadStatus status
 
 MsgReport::Type MsgUtilsPrivate::nativeToReportType(int type)
 {
-    switch (type)
-    {
+    switch (type) {
         case MSG_REPORT_TYPE_READ:
             return MsgReport::TypeRead;
-
         case MSG_REPORT_TYPE_READ_REPORT_SENT:
             return MsgReport::TypeReadReportSent;
-
         default:
         case MSG_REPORT_TYPE_DELIVERY:
             return MsgReport::TypeDelivery;
@@ -169,17 +142,13 @@ MsgReport::Type MsgUtilsPrivate::nativeToReportType(int type)
 
 int MsgUtilsPrivate::recipientTypeToNative(MsgAddress::RecipientType type)
 {
-    switch (type)
-    {
+    switch (type) {
         case MsgAddress::To:
             return MSG_RECIPIENTS_TYPE_TO;
-
         case MsgAddress::Cc:
             return MSG_RECIPIENTS_TYPE_CC;
-
         case MsgAddress::Bcc:
             return MSG_RECIPIENTS_TYPE_BCC;
-
         default:
         case MsgAddress::UnknownRecipientType:
             return MSG_RECIPIENTS_TYPE_UNKNOWN;
@@ -188,17 +157,13 @@ int MsgUtilsPrivate::recipientTypeToNative(MsgAddress::RecipientType type)
 
 MsgAddress::RecipientType MsgUtilsPrivate::nativeToRecipientType(int type)
 {
-    switch (type)
-    {
+    switch (type) {
         case MSG_RECIPIENTS_TYPE_TO:
             return MsgAddress::To;
-
         case MSG_RECIPIENTS_TYPE_CC:
             return MsgAddress::Cc;
-
         case MSG_RECIPIENTS_TYPE_BCC:
             return MsgAddress::Bcc;
-
         default:
         case MSG_RECIPIENTS_TYPE_UNKNOWN:
             return MsgAddress::UnknownRecipientType;
@@ -207,8 +172,7 @@ MsgAddress::RecipientType MsgUtilsPrivate::nativeToRecipientType(int type)
 
 Message::Type MsgUtilsPrivate::nativeToMessageType(int type)
 {
-    switch (type)
-    {
+    switch (type) {
         case MSG_TYPE_SMS:
         case MSG_TYPE_SMS_CB:
         case MSG_TYPE_SMS_JAVACB:
@@ -241,8 +205,7 @@ Message::Type MsgUtilsPrivate::nativeToMessageType(int type)
 
 MsgMedia::Type MsgUtilsPrivate::nativeToSmilType(int type)
 {
-    switch (type)
-    {
+    switch (type) {
         case MMS_SMIL_MEDIA_IMG:
             return MsgMedia::ImageType;
         case MMS_SMIL_MEDIA_AUDIO:
@@ -257,8 +220,7 @@ MsgMedia::Type MsgUtilsPrivate::nativeToSmilType(int type)
 
 int MsgUtilsPrivate::smilTypeToNative(MsgMedia::Type type)
 {
-    switch (type)
-    {
+    switch (type) {
         case MsgMedia::ImageType:
             return MMS_SMIL_MEDIA_IMG;
         case MsgMedia::AudioType:
@@ -278,9 +240,8 @@ std::string MsgUtilsPrivate::getStr(msg_struct_t msgStruct, int field, int maxSt
     std::string res;
     char buf[maxStrLen + 1];
     if (msg_get_str_value(msgStruct, field, buf, maxStrLen) == 0)
-    {
         res.assign(buf);
-    }
+
     return res;
 }
 
@@ -291,8 +252,7 @@ int MsgUtilsPrivate::setStr(msg_struct_t msgStruct, int field, const std::string
 
 Message::NetworkStatus MsgUtilsPrivate::nativeToNetworkStatus(int status)
 {
-    switch (status)
-    {
+    switch (status) {
         case MSG_NETWORK_NOT_SEND:
             return Message::NS_Not_Send;
         case MSG_NETWORK_SENDING:
@@ -334,8 +294,7 @@ Message::NetworkStatus MsgUtilsPrivate::nativeToNetworkStatus(int status)
 
 int MsgUtilsPrivate::activeNotifPolicyToNative(MsgSettings::ActiveNotifPolicy policy)
 {
-    switch (policy)
-    {
+    switch (policy) {
         case MsgSettings::AppBackgroundPolicy:
             return -1;
         case MsgSettings::AppForegroundPolicy:
@@ -348,8 +307,7 @@ int MsgUtilsPrivate::activeNotifPolicyToNative(MsgSettings::ActiveNotifPolicy po
 
 MsgTransport::SendResult MsgUtilsPrivate::nativeToSendResult(int sendRes)
 {
-    switch (sendRes)
-    {
+    switch (sendRes) {
         case MSG_SUCCESS:
             return MsgTransport::SendSuccess;
         case MSG_ERR_NO_SIM:
@@ -367,8 +325,7 @@ MsgTransport::SendResult MsgUtilsPrivate::nativeToSendResult(int sendRes)
 
 MsgSettings::RingtoneType MsgUtilsPrivate::nativeToRingtoneType(int type)
 {
-    switch (type)
-    {
+    switch (type) {
         case MSG_RINGTONE_TYPE_SILENT:
             return MsgSettings::SilentRingtone;
         case MSG_RINGTONE_TYPE_USER:
@@ -381,8 +338,7 @@ MsgSettings::RingtoneType MsgUtilsPrivate::nativeToRingtoneType(int type)
 
 int MsgUtilsPrivate::ringtoneTypeToNative(MsgSettings::RingtoneType type)
 {
-    switch (type)
-    {
+    switch (type) {
         case MsgSettings::SilentRingtone:
             return MSG_RINGTONE_TYPE_SILENT;
         case MsgSettings::UserRingtone:
@@ -394,8 +350,7 @@ int MsgUtilsPrivate::ringtoneTypeToNative(MsgSettings::RingtoneType type)
 MsgStorage::StorageResult MsgUtilsPrivate::nativeToStorageResult(int resultCode)
 {
     MsgStorage::StorageResult res = MsgStorage::StorageFail;
-    switch (resultCode)
-    {
+    switch (resultCode) {
         case MSG_SUCCESS:
             res = MsgStorage::StorageSuccess;
             break;
index 04eae910463b75ff9b263a2f7647ce8456fabdb9..ea77284d29dae9af920716e9796ef42e8d645a76 100644 (file)
 #include <assert.h>
 #include <type_traits>
 
-namespace Msg
-{
-    class MsgUtilsPrivate
-    {
+namespace Msg {
+    class MsgUtilsPrivate {
         public:
             static int directionToNative(Message::Direction direction);
             static int addressTypeToNative(MsgAddress::AddressType type);
index cf206ca21a1ee367dbb6e2d1827d347123ae58d7..e10de89e663cecdabfb3f324d0e68c55ae4f71c3 100644 (file)
 #include <telephony.h>
 #include <dpm/device-policy-manager.h>
 
-namespace Msg
-{
+namespace Msg {
     class ISystemSettingsManager;
 
     /**
      * @brief Monitors changing of time format and system language. Also reads telephony settings.
      */
-    class SystemSettingsManager
-    {
+    class SystemSettingsManager {
         public:
             /**
              * @brief A constructor initializes telephony handle to make system settings manager instance to read telephony settings.
@@ -92,8 +90,7 @@ namespace Msg
     /**
      * @brief A listener-interface that should be implemented by subscriber in order to be notified about time format or nsystem language change.
      */
-    class ISystemSettingsManager
-    {
+    class ISystemSettingsManager {
         public:
             virtual ~ISystemSettingsManager() {}
 
index 163e0c27dd40f9502bec5558c9797878b6be265f..e1cf548b1d4c03bc71539705ffd5176e58d7397b 100644 (file)
@@ -23,8 +23,7 @@
 
 using namespace Msg;
 
-namespace
-{
+namespace {
     const char *sim1Id = "sim1";
 }
 
@@ -76,8 +75,7 @@ bool SystemSettingsManager::isSimInserted() const
     bool res = false;
     const_cast<SystemSettingsManager*>(this)->prepareTel();
 
-    if (m_TelHandleList.count > 0)
-    {
+    if (m_TelHandleList.count > 0) {
         telephony_h handle = m_TelHandleList.handle[0];
         telephony_sim_state_e simState = TELEPHONY_SIM_STATE_UNAVAILABLE;
         telephony_sim_get_state(handle, &simState);
@@ -93,12 +91,10 @@ bool SystemSettingsManager::isSimActive() const
     bool res = false;
     const_cast<SystemSettingsManager*>(this)->prepareTel();
 
-    if (m_TelHandleList.count > 0)
-    {
+    if (m_TelHandleList.count > 0) {
         telephony_h telHandle = m_TelHandleList.handle[0];
         telephony_network_service_state_e servState;
-        if (telephony_network_get_service_state(telHandle, &servState) == TELEPHONY_ERROR_NONE)
-        {
+        if (telephony_network_get_service_state(telHandle, &servState) == TELEPHONY_ERROR_NONE) {
             res = (servState == TELEPHONY_NETWORK_SERVICE_STATE_IN_SERVICE);
             MSG_LOG("servState = ", servState);
         }
@@ -117,17 +113,13 @@ bool SystemSettingsManager::isMobileDataEnabled() const
 void SystemSettingsManager::onTimeFormatChanged()
 {
     for (ISystemSettingsManager *it : m_Listeners)
-    {
         it->onTimeFormatChanged();
-    }
 }
 
 void SystemSettingsManager::onLanguageChanged()
 {
     for (ISystemSettingsManager *it : m_Listeners)
-    {
         it->onLanguageChanged();
-    }
 }
 
 bool SystemSettingsManager::isMessagingRestrictedByDpm() const
@@ -146,8 +138,7 @@ void SystemSettingsManager::initDpmHandle() const
 
 void SystemSettingsManager::deinitDpmHandle()
 {
-    if (m_DpmHandle)
-    {
+    if (m_DpmHandle) {
         dpm_manager_destroy(m_DpmHandle);
         m_DpmHandle = nullptr;
     }
index 8fe289451e40601cb6228ad8c28e8c877b76e697..8ee152f03f88b270bb5ba31641642f82c288357d 100644 (file)
 
 #include <string>
 
-namespace Msg
-{
-    class BidiUtils
-    {
+namespace Msg {
+    class BidiUtils {
         public:
             static constexpr const char *lrmChar = "\u200E";
             static constexpr const char *rlmChar = "\u200F";
index 1d2f63094ccb6030893543d67d5a14133ea86d50..71a9091a77902d5e96a7796f67eb6b6fcd0099bf 100755 (executable)
 #include <string>
 #include <list>
 
-namespace Msg
-{
-    class FileUtils
-    {
+namespace Msg {
+    class FileUtils {
         public:
             /**
              * @brief Get file size.
index 27ed50d7a33ee1a92917005245e2d022461a35a1..279183cb78c254cf6607948e2cb13e571d8b97b6 100644 (file)
 #include <Evas.h>
 #include <efl_extension.h>
 
-namespace Msg
-{
-    class IHwButtonListener
-    {
+namespace Msg {
+    class IHwButtonListener {
         public:
             virtual ~IHwButtonListener() {};
             virtual void onHwBackButtonClicked() {};
index 6d38a0be14b633518d868b3698b5cba3ecdbbe19..d3ad11608e9c5a274d355089da8126fa25eede77 100644 (file)
 #include <stdio.h>
 #include <stdarg.h>
 
-namespace Msg
-{
+namespace Msg {
     // Translatable Text
-    struct TText
-    {
+    struct TText {
         explicit TText(const char *stringId, const char *domainName)
             : m_pDomain(domainName)
             , m_pMsg(stringId)
@@ -55,8 +53,7 @@ namespace Msg
     };
 
     // dgettext
-    struct DText
-    {
+    struct DText {
         explicit DText(const char *stringId, const char *domainName)
         {
             m_pMsg = dgettext(domainName, stringId);
index 20f7440db4359c78ec939804632baa6765044f96..03967ae6ea284677c4652921ab573c12ddb2f712 100644 (file)
@@ -21,8 +21,7 @@
 #include <sstream>
 #include <dlog.h>
 
-enum class LogPriority
-{
+enum class LogPriority {
     DEFAULT = DLOG_DEFAULT,
     VERBOSE = DLOG_VERBOSE, /**< Verbose */
     DEBUG = DLOG_DEBUG, /**< Debug */
@@ -31,7 +30,7 @@ enum class LogPriority
     ERROR = DLOG_ERROR, /**< Error */
     FATAL = DLOG_FATAL, /**< Fatal */
     SILEN = DLOG_SILENT, /**< Silent */
-    MAX = DLOG_PRIO_MAX/**< Keep this always at the end. */
+    MAX = DLOG_PRIO_MAX /**< Keep this always at the end. */
 };
 
 template<typename... Tail>
index 53ec06612ba060619513b2c50918449b769c7d40..f5abdb884325ae2aa1539946f06575d3627df2bc 100644 (file)
 
 #include <string>
 
-namespace Msg
-{
-    class MediaUtils
-    {
+namespace Msg {
+    class MediaUtils {
         public:
             static std::string getTitle(const std::string &path);
             static int getDuration(const std::string &uri); // msec;
index eebbd20d2c52bac491d6e36a2497fbfe8a5d70f9..7d842e471c013a6d6af1f459bce26e6fcee135df 100644 (file)
 #include <string>
 #include "Resource.h"
 
-namespace Msg
-{
-    class PathUtils
-    {
+namespace Msg {
+    class PathUtils {
         public:
             /**
              * @brief Gets the absolute path to file in the application resource directory.
index 83a9a0b54057090a337012220aab395d6b1186c9..b86fbd5cbf692bbf830993408a6cdbee524af16f 100644 (file)
 
 #include <string>
 
-namespace Msg
-{
-    class PhoneNumberUtils
-    {
+namespace Msg {
+    class PhoneNumberUtils {
         public:
             static PhoneNumberUtils &getInst();
             std::string getNormalizedNumber(const std::string &number) const;
index 9b2cb419e5615cbc3d63746a3804cbe3fe27979e..54a29cacabd8d423a4244a15c3be1e4873f8e9a2 100644 (file)
 
 #include <string>
 
-namespace Msg
-{
-    enum class TextAlign
-    {
+namespace Msg {
+    enum class TextAlign {
         None,
         Left,
         Center,
         Right
     };
 
-    class TextStyle
-    {
+    class TextStyle {
         public:
             static const char *defaultColor;
             static const char *whiteColor;
@@ -58,8 +55,7 @@ namespace Msg
     /**
      * @brief Class with text decorator utils
      */
-    class TextDecorator
-    {
+    class TextDecorator {
         public:
             static std::string make(const std::string &text, const TextStyle &style);
             static std::string make(const std::string &text, const std::string &color);
index 64fa21d8e013482e73de6097c1e87263f2bc8139..6ee4d6d5d1703309dda0c2510085d97b5ee916b5 100644 (file)
 #include "MsgAddress.h"
 #include "ContactManager.h"
 
-namespace Msg
-{
+namespace Msg {
     class App;
     typedef long ThumbId;
     const ThumbId invalidThumbId = -1;
 
     class ThumbnailMaker
-        : public IContactManagerListener
-    {
+        : public IContactManagerListener {
         public:
-            enum DefaultThumbs
-            {
+            enum DefaultThumbs {
                 SingleThumb = 0, // Static thumb
                 GroupThumb,      // Static thumb
                 OwnerThumb,      // Mutable thumb
index 5ae37389b341e4067444f010313283366b75e32b..a41256333314f73349ec8bea6675eadb9c91c3c9 100644 (file)
 #include <string>
 #include <utils_i18n_types.h>
 
-namespace Msg
-{
-    class TimeUtils
-    {
-        enum TimeFormat
-        {
+namespace Msg {
+    class TimeUtils {
+        enum TimeFormat {
             TimeFormatUnknown,
             TimeFormat24H,
             TimeFormat12H
index 977bc22f2edba18787304ea71a8c466f2aeba4a8..db6fb0fb0db02674783ffb7137d53ac20f432bed 100644 (file)
 #include <string>
 #include <list>
 
-namespace Msg
-{
-    class CalendarEvent
-    {
+namespace Msg {
+    class CalendarEvent {
         public:
             CalendarEvent(calendar_record_h record);
 
@@ -36,8 +34,7 @@ namespace Msg
             std::string m_StartDate;
     };
 
-    class VCalendarParser
-    {
+    class VCalendarParser {
         public:
             static VCalendarParser &getInst();
             static std::list<CalendarEvent> parse(const std::string &filePath);
index 923e595baec9718a4c911363eb52075d9256de95..41ee1c472c8084a9e1026809c782043044a12586 100755 (executable)
@@ -39,9 +39,7 @@ long long FileUtils::getFileSize(const std::string &file)
 
     struct stat st = {};
     if (stat(file.c_str(), &st) == 0)
-    {
         size = st.st_size;
-    }
 
     return size;
 }
@@ -71,16 +69,13 @@ bool FileUtils::copy(const std::string &src, const std::string &dst)
         return false;
 
     f2 = fopen(dst.c_str(), "wb");
-    if (!f2)
-    {
+    if (!f2) {
         fclose(f1);
         return false;
     }
 
-    while ((num = fread(buf, 1, sizeof(buf), f1)) > 0)
-    {
-        if (fwrite(buf, 1, num, f2) != num)
-        {
+    while ((num = fread(buf, 1, sizeof(buf), f1)) > 0) {
+        if (fwrite(buf, 1, num, f2) != num) {
             ret = false;
         }
     }
@@ -104,11 +99,9 @@ bool FileUtils::makeDir(const std::string &dir)
 std::string FileUtils::addFileToDataDir(const std::string &path)
 {
     std::string newPath;
-    if (isExists(path))
-    {
+    if (isExists(path)) {
         std::string dataPath = PathUtils::getDataPath("");
-        if (path.find(dataPath) != std::string::npos)
-        {
+        if (path.find(dataPath) != std::string::npos) {
             newPath = path;
             MSG_LOG("File is already exists: ", newPath);
         } else {
@@ -127,9 +120,7 @@ bool FileUtils::isDir(const std::string &file)
 
     struct stat st = {};
     if (stat(file.c_str(), &st) == 0)
-    {
         res = S_ISDIR(st.st_mode);
-    }
 
     return res;
 }
@@ -152,8 +143,7 @@ void FileUtils::splitPath(const std::string &path, std::string &basePath,
     name = path.substr(pos + 1);
 
     pos = name.find_last_of('.');
-    if (pos != std::string::npos)
-    {
+    if (pos != std::string::npos) {
         extension = name.substr(pos + 1);
         if (pos != 0)
             fileName = name.substr(0, pos);
@@ -175,18 +165,15 @@ bool FileUtils::remove(const std::string &path, bool removeCurrentDir)
     struct dirent *dirData = nullptr;
     DIR *dp = opendir(path.c_str());
 
-    if (dp)
-    {
-        while (true)
-        {
+    if (dp) {
+        while (true) {
             dirData = nullptr;
             readdir_r(dp, &ep, &dirData);
 
             if (dirData == nullptr)
                 break;
 
-            if (strcmp(dirData->d_name, ".") != 0 && strcmp(dirData->d_name, "..") != 0)
-            {
+            if (strcmp(dirData->d_name, ".") != 0 && strcmp(dirData->d_name, "..") != 0) {
                 std::string child = path + "/" + dirData->d_name;
                 res &= remove(child, true);
             }
@@ -194,9 +181,7 @@ bool FileUtils::remove(const std::string &path, bool removeCurrentDir)
 
         closedir(dp);
         if (removeCurrentDir)
-        {
             res &= rmdir(path.c_str()) == 0;
-        }
     } else {
         res &= unlink(path.c_str()) == 0;
     }
@@ -227,8 +212,7 @@ std::string FileUtils::genUniqueFilePath(const std::string &storagePath, const s
     splitPath(filePath, base, name, ext);
 
     unsigned i = 0;
-    do
-    {
+    do {
         res = storagePath;
         if (res.back() != '/')
             res += '/';
@@ -250,12 +234,10 @@ std::string FileUtils::getMimeType(const std::string &filePath)
     std::string name;
     std::string ext;
     splitPath(filePath, base, name, ext);
-    if (!ext.empty())
-    {
+    if (!ext.empty()) {
         char *mime = nullptr;
         mime_type_get_mime_type(ext.c_str(), &mime);
-        if (mime)
-        {
+        if (mime) {
             res = mime;
             std::transform(res.begin(), res.end(), res.begin(), ::tolower);
             free(mime);
@@ -284,9 +266,8 @@ bool FileUtils::saveFilesToStorage(const std::list<std::string> &files)
         return false;
 
     for (const std::string &file : files)
-    {
         res &= saveFileToStoragePrivate(file);
-    }
+
     media_content_disconnect();
     return res;
 }
index 360a4551a50f6afeefaba9f45dec88acb056737e..8edf698850f23ec7f90d2f7e097ce94bf2710a88 100644 (file)
@@ -33,8 +33,7 @@ static void more_event_cb(void *data, Evas_Object *obj, void *event_info)
 
 void IHwButtonListener::setHwButtonListener(Evas_Object * obj, IHwButtonListener *listener)
 {
-    if (listener)
-    {
+    if (listener) {
         setHwButtonListener(obj, nullptr);
         eext_object_event_callback_add(obj, EEXT_CALLBACK_MORE, more_event_cb, listener);
         eext_object_event_callback_add(obj, EEXT_CALLBACK_BACK, back_event_cb, listener);
index d1f89bc0e326b68171967bd2d0a870ca9bbc0396..5cfb1fd1286f37ae0298c8e2c716db048157b87c 100644 (file)
@@ -16,8 +16,7 @@
 
 #include "LoggerImpl.h"
 
-namespace
-{
+namespace {
     const std::string enterFraseFormat = "%s: %s(%d) -> [ENTER]";
     const std::string leaveFraseFormat = "%s: %s -> [LEAVE]";
     const log_priority defaultPriority = DLOG_DEBUG;
index 7464d6d02f4eea3f860917ebc3aadb9c4491623c..7bf8f152c3ee7c6d8a79a9188e8d1bad74ebee6e 100644 (file)
 
 using namespace Msg;
 
-namespace
-{
+namespace {
     const int QUALITY = 50;
     const unsigned char EXIF_HEADER[] = { 0xff, 0xd8, 0xff, 0xe1 };
     const unsigned int EXIF_HEADER_LEN = sizeof(EXIF_HEADER);
     const unsigned int JPEG_HEADER_OFFSET = 20;
-    class MetadataExtractor
-    {
+    class MetadataExtractor {
         public:
             MetadataExtractor(const std::string &path)
                 : m_Metadata()
             {
-                if (FileUtils::isExists(path))
-                {
+                if (FileUtils::isExists(path)) {
                     metadata_extractor_create(&m_Metadata);
-                    if (metadata_extractor_set_path(m_Metadata, path.c_str()) != 0)
-                    {
+                    if (metadata_extractor_set_path(m_Metadata, path.c_str()) != 0) {
                         metadata_extractor_destroy(m_Metadata);
                         m_Metadata = nullptr;
                     }
@@ -77,8 +73,7 @@ namespace
                 std::string res;
                 char *cStr = nullptr;
                 metadata_extractor_get_metadata(m_Metadata, attr, &cStr);
-                if (cStr)
-                {
+                if (cStr) {
                     res = cStr;
                     free(cStr);
                 }
@@ -111,8 +106,7 @@ int MediaUtils::getDuration(const std::string &uri)
 {
     MetadataExtractor extractor(uri);
     int duration = 0;
-    if (extractor.isValid())
-    {
+    if (extractor.isValid()) {
         duration = extractor.getInt(METADATA_DURATION);
         MSG_LOG("Duration msec: ", duration);
     }
@@ -148,14 +142,12 @@ bool MediaUtils::getVideoFrame(const std::string &videoFilePath, const std::stri
     MSG_LOG("File: ", videoFilePath);
     MSG_LOG("Frame: width = ", videoW, " height = ", videoH, " size = ", thumbSize);
 
-    if (thumbnail)
-    {
+    if (thumbnail) {
         const int quality = 90; // JPEG image quality(1 ~ 100)
         image_util_encode_h encode_h = {};
         bool isOk = false;
         isOk = image_util_encode_create(IMAGE_UTIL_JPEG, &encode_h) == IMAGE_UTIL_ERROR_NONE;
-        if (!isOk)
-        {
+        if (!isOk) {
             free(thumbnail);
             return false;
         }
@@ -165,8 +157,7 @@ bool MediaUtils::getVideoFrame(const std::string &videoFilePath, const std::stri
         isOk &= image_util_encode_set_quality(encode_h, quality) == IMAGE_UTIL_ERROR_NONE;
         isOk &= image_util_encode_set_input_buffer(encode_h, (unsigned char *)thumbnail) == IMAGE_UTIL_ERROR_NONE;
         isOk &= image_util_encode_set_output_path(encode_h, imageFilePath.c_str()) == IMAGE_UTIL_ERROR_NONE;
-        if (!isOk)
-        {
+        if (!isOk) {
             image_util_encode_destroy(encode_h);
             free(thumbnail);
             return false;
@@ -233,26 +224,20 @@ long long MediaUtils::downgradeImageQuality(const std::string &imagePath)
 
     exifData = exif_data_new_from_file(imagePath.c_str());
     if (exifData)
-    {
         exif_data_save_data(exifData, &exifBuff, &exifBuffLen);
-    }
 
     res = image_util_decode_create(&decode_h);
     if (res != IMAGE_UTIL_ERROR_NONE)
-    {
         return FileUtils::getFileSize(imagePath);
-    }
 
     res = image_util_decode_set_input_path(decode_h, imagePath.c_str());
-    if (res != IMAGE_UTIL_ERROR_NONE)
-    {
+    if (res != IMAGE_UTIL_ERROR_NONE) {
         image_util_decode_destroy(decode_h);
         return FileUtils::getFileSize(imagePath);
     }
 
     res = image_util_decode_set_output_buffer(decode_h, &buffer);
-    if (res != IMAGE_UTIL_ERROR_NONE)
-    {
+    if (res != IMAGE_UTIL_ERROR_NONE) {
         image_util_decode_destroy(decode_h);
         return FileUtils::getFileSize(imagePath);
     }
@@ -260,62 +245,51 @@ long long MediaUtils::downgradeImageQuality(const std::string &imagePath)
     res = image_util_decode_run(decode_h, &width, &height, nullptr);
     image_util_decode_destroy(decode_h);
     if (res != IMAGE_UTIL_ERROR_NONE)
-    {
         return FileUtils::getFileSize(imagePath);
-    }
 
     res = image_util_encode_create(IMAGE_UTIL_JPEG, &encode_h);
     if (res != IMAGE_UTIL_ERROR_NONE)
-    {
         return FileUtils::getFileSize(imagePath);
-    }
 
     res = image_util_encode_set_resolution(encode_h, width, height);
-    if (res != IMAGE_UTIL_ERROR_NONE)
-    {
+    if (res != IMAGE_UTIL_ERROR_NONE){
         image_util_encode_destroy(encode_h);
         return FileUtils::getFileSize(imagePath);
     }
 
     res = image_util_encode_set_quality(encode_h, QUALITY);
-    if (res != IMAGE_UTIL_ERROR_NONE)
-    {
+    if (res != IMAGE_UTIL_ERROR_NONE) {
         image_util_encode_destroy(encode_h);
         return FileUtils::getFileSize(imagePath);
     }
 
     res = image_util_encode_set_input_buffer(encode_h, buffer);
-    if (res != IMAGE_UTIL_ERROR_NONE)
-    {
+    if (res != IMAGE_UTIL_ERROR_NONE) {
         image_util_encode_destroy(encode_h);
         return FileUtils::getFileSize(imagePath);
     }
 
     res = image_util_encode_set_output_buffer(encode_h, &jpegBuff);
-    if (res != IMAGE_UTIL_ERROR_NONE)
-    {
+    if (res != IMAGE_UTIL_ERROR_NONE) {
         image_util_encode_destroy(encode_h);
         return FileUtils::getFileSize(imagePath);
     }
     res = image_util_encode_run(encode_h, &jpegBuffLen);
     image_util_encode_destroy(encode_h);
-    if (res != IMAGE_UTIL_ERROR_NONE)
-    {
+    if (res != IMAGE_UTIL_ERROR_NONE) {
         free(buffer);
         free(jpegBuff);
         return FileUtils::getFileSize(imagePath);
     }
 
     outputFile.open(imagePath.c_str());
-    if (!outputFile.is_open())
-    {
+    if (!outputFile.is_open()) {
         MSG_LOG_ERROR("Can't open file for write");
         free(buffer);
         free(jpegBuff);
         return FileUtils::getFileSize(imagePath);
     }
-    if (exifData)
-    {
+    if (exifData) {
         // Write EXIF header
         outputFile.write((char *)EXIF_HEADER, EXIF_HEADER_LEN);
         // Write EXIF block length in big-endian order
index 569acdf34181b0e0cfa4fde0d44d19bde8d6792e..024f6f7864c67976dd58079136e25c8e786a3ca9 100644 (file)
@@ -27,11 +27,9 @@ std::string PathUtils::getResourcePath(const std::string &filePath)
 {
     std::string res;
     static std::string basePath;
-    if (basePath.empty())
-    {
+    if (basePath.empty()) {
         char *path = app_get_resource_path();
-        if (path)
-        {
+        if (path) {
             basePath = path;
             free(path);
         }
@@ -47,11 +45,9 @@ std::string PathUtils::getDataPath(const std::string &filePath)
 {
     std::string res;
     static std::string basePath;
-    if (basePath.empty())
-    {
+    if (basePath.empty()) {
         char *path = app_get_data_path();
-        if (path)
-        {
+        if (path) {
             basePath = path;
             free(path);
         }
@@ -67,8 +63,7 @@ std::string PathUtils::getResourcePath()
 {
     std::string res;
     char* resPath = app_get_resource_path();
-    if (resPath)
-    {
+    if (resPath) {
         res = resPath;
         free(resPath);
     }
@@ -80,17 +75,14 @@ std::string PathUtils::getLocalePath()
 {
     std::string resPath(getResourcePath());
     if (!resPath.empty())
-    {
         resPath.append("locale");
-    }
 
     return resPath;
 }
 
 static bool storageCb(int storageId, storage_type_e type, storage_state_e state, const char *path, void *userData)
 {
-    if (type == STORAGE_TYPE_INTERNAL)
-    {
+    if (type == STORAGE_TYPE_INTERNAL) {
         int *internalStorage = (int *)userData;
         *internalStorage = storageId;
         return false;
@@ -112,8 +104,7 @@ const std::string &PathUtils::getDownloadPath()
     if (error == STORAGE_ERROR_NONE)
         storage_get_directory(storageId, STORAGE_DIRECTORY_DOWNLOADS, &dirPath);
 
-    if (dirPath)
-    {
+    if (dirPath) {
         downloadPath = dirPath;
         free(dirPath);
     }
index b9c6bb0e1f994a0879c98722c094020646d17f05..5737ce16b77ddcf16601b471fc3a6868de2631a2 100644 (file)
@@ -33,8 +33,7 @@ using namespace Msg;
      std::string res;
      char *normalizedNum = nullptr;
      phone_number_get_normalized_number(number.c_str(), &normalizedNum);
-     if (normalizedNum)
-     {
+     if (normalizedNum) {
          res = normalizedNum;
          free(normalizedNum);
      }
index 491adcf2a16e6e321c973a276e7f49cc8150142b..02bfbe769cd441ec0e9a67e0d69c32ee1ecd3351 100644 (file)
@@ -30,12 +30,10 @@ const int TextStyle::defaultFontSize = 28;
 #define OPEN_TAG(name, val) "<" name "=" << (val) << ">"
 #define CLOSE_TAG(name) "</" name ">"
 
-namespace
-{
+namespace {
     const char *alignAsString(TextAlign align)
     {
-        switch (align)
-        {
+        switch (align) {
             case TextAlign::Center:
                 return "center";
             case TextAlign::Left:
@@ -119,14 +117,12 @@ std::string TextDecorator::make(const std::string &text,
     std::ostringstream ss;
     ss << OPEN_TAG("font_size", size) << OPEN_TAG("color", color);
     if (align != TextAlign::None)
-    {
         ss << OPEN_TAG("align", alignAsString(align));
-    }
+
     ss << text;
     if (align != TextAlign::None)
-    {
         ss << CLOSE_TAG("align");
-    }
+
     ss << CLOSE_TAG("color") << CLOSE_TAG("font_size");
     return ss.str();
 }
index 5f3c38232c32cb3399fe74e15700f4a614808c3d..8584f71627883e03f75b3b76a825750c5f032b53 100644 (file)
@@ -42,9 +42,7 @@ ThumbnailMaker::ThumbnailMaker(App &app)
     m_OriginsMap.reserve(defaultCache);
 
     for (int i = 0; i <= maxStaticThumbId; i++)
-    {
         getThumbId((DefaultThumbs)i);
-    }
 }
 
 ThumbnailMaker::~ThumbnailMaker()
@@ -65,8 +63,7 @@ ThumbId ThumbnailMaker::getThumbId(const std::string &address)
 
 ThumbId ThumbnailMaker::getThumbIdFromFile(const std::string &path)
 {
-    if (path.empty())
-    {
+    if (path.empty()) {
         return getThumbId(SingleThumb);
     } else {
         auto it = m_ContactsMap.find(path);
@@ -83,13 +80,11 @@ ThumbId ThumbnailMaker::getThumbIdFromFile(const std::string &path)
 ThumbId ThumbnailMaker::getThumbId(DefaultThumbs thumb)
 {
     auto it = m_ContactsMap.find(defaultThumbsToStr(thumb));
-    if (it != m_ContactsMap.end())
-    {
+    if (it != m_ContactsMap.end()) {
         return it->second;
     } else {
         Evas_Object *origin = nullptr;
-        if (thumb != OwnerThumb)
-        {
+        if (thumb != OwnerThumb) {
             origin = makeDefaultOriginThumb(m_App.getWindow(), defaultThumbsToPath(thumb));
         } else {
             ContactMyProfileRef ownerProfile = m_App.getContactManager().getOwnerProfile();
@@ -105,8 +100,7 @@ ThumbId ThumbnailMaker::getThumbId(DefaultThumbs thumb)
 Evas_Object *ThumbnailMaker::getThumb(Evas_Object *parent, ThumbId id, int thumbSize)
 {
     auto it = m_OriginsMap.find(id);
-    if (it == m_OriginsMap.end())
-    {
+    if (it == m_OriginsMap.end()) {
         MSG_LOG_ERROR("Invalid thumbnail id");
         return nullptr;
     }
@@ -179,10 +173,8 @@ void ThumbnailMaker::invalidate()
     // m_OriginsMap:
     auto originsIt = m_OriginsMap.begin();
 
-    for (; originsIt != m_OriginsMap.end();)
-    {
-        if (originsIt->first > maxStaticThumbId)
-        {
+    for (; originsIt != m_OriginsMap.end();) {
+        if (originsIt->first > maxStaticThumbId) {
             MSG_LOG(originsIt->first);
             evas_object_del(originsIt->second);
             originsIt = m_OriginsMap.erase(originsIt);
@@ -193,8 +185,7 @@ void ThumbnailMaker::invalidate()
 
     // m_ContactsMap:
     auto contactsIt = m_ContactsMap.begin();
-    for (; contactsIt != m_ContactsMap.end();)
-    {
+    for (; contactsIt != m_ContactsMap.end();) {
         if (contactsIt->second > maxStaticThumbId)
             contactsIt = m_ContactsMap.erase(contactsIt);
         else
@@ -208,8 +199,7 @@ const std::string &ThumbnailMaker::defaultThumbsToStr(DefaultThumbs thumb)
     static const std::string gThumb = "GroupThumb";
     static const std::string oThumb = "OwnerThumb";
     static const std::string emptyThumb = "";
-    switch (thumb)
-    {
+    switch (thumb) {
         case SingleThumb:
             return sThumb;
         case GroupThumb:
@@ -223,8 +213,7 @@ const std::string &ThumbnailMaker::defaultThumbsToStr(DefaultThumbs thumb)
 
 std::string ThumbnailMaker::defaultThumbsToPath(DefaultThumbs thumb)
 {
-    switch (thumb)
-    {
+    switch (thumb) {
         case SingleThumb:
             return PathUtils::getResourcePath(THUMB_CONTACT_IMG_PATH);
         case GroupThumb:
index 3c0b855cd89d44303a59f1edc2d4289ef2f1c5a8..7a2bf0161b0b1f14d8e37a7c2ded06317bb7144d 100644 (file)
@@ -29,8 +29,7 @@
 
 using namespace Msg;
 
-namespace
-{
+namespace {
     const int maxUcharLen = 64;
     const int maxCharLen = 128;
     const int defBufLen = 512;
@@ -63,8 +62,7 @@ std::string TimeUtils::makeThreadTimeString(time_t msgTime)
 
     bool isToday = (curDay - msgDay == 0);
 
-    if (isToday)
-    {
+    if (isToday) {
         const std::string &timeFormat = getTimeFormat() == TimeFormat24H  ? time24H : time12H;
         return getFormattedDate(locale, getDateBestPattern(locale, timeFormat), msgTime);
     } else {
@@ -152,8 +150,7 @@ const std::string &TimeUtils::getDefaultLocale()
     char *str = nullptr;
     system_settings_get_value_string(SYSTEM_SETTINGS_KEY_LOCALE_LANGUAGE, &str);
 
-    if (str)
-    {
+    if (str) {
         i18n_ulocale_set_default(str);
         res = str;
         size_t i = res.find(".");
@@ -173,8 +170,7 @@ std::string TimeUtils::getTimezone()
     ssize_t len = readlink("/opt/etc/localtime", buf, sizeof(buf) - 1);
     int filePathLength = 20;
 
-    if (len != -1)
-    {
+    if (len != -1) {
         buf[len] = '\0';
     } else {
         MSG_LOG_ERROR("Getting default timezone failed, use system settings value");
@@ -183,8 +179,7 @@ std::string TimeUtils::getTimezone()
         char *time_zone = nullptr;
 
         system_settings_get_value_string(SYSTEM_SETTINGS_KEY_LOCALE_TIMEZONE, &time_zone);
-        if (time_zone)
-        {
+        if (time_zone) {
             res = time_zone;
             free(time_zone);
         }
@@ -258,8 +253,7 @@ std::string TimeUtils::getFormattedDate(const std::string &locale, const std::st
         i18n_ucalendar_get_now(&date);
 
     dateFormat = getDateFormat(locale, uBestPattern, &status);
-    if (status == I18N_ERROR_NONE)
-    {
+    if (status == I18N_ERROR_NONE) {
         /* get formatted string */
         i18n_udate_format_date(dateFormat, date, formatted, formattedCapacity, nullptr, &formattedLength);
         /* convert uchar to char */
index ccc0d9a8a80109a92a88ab803c08d1b402c99c47..b40cbaf73eeaf53f368dd59a32d345386aa17555 100644 (file)
@@ -31,10 +31,8 @@ CalendarEvent::CalendarEvent(calendar_record_h record)
         m_Summary = summary;
 
     calendar_time_s start = {};
-    if (calendar_record_get_caltime(record, _calendar_event.start_time, &start) == 0)
-    {
-        if (start.type == CALENDAR_TIME_UTIME) // Unix time
-        {
+    if (calendar_record_get_caltime(record, _calendar_event.start_time, &start) == 0) {
+        if (start.type == CALENDAR_TIME_UTIME) { // Unix time
             m_StartDate = TimeUtils::makeCalEventString(start.time.utime);
         } else { // Local time
             m_StartDate = TimeUtils::makeCalEventString
@@ -91,12 +89,10 @@ std::list<CalendarEvent> VCalendarParser::parse(const std::string &filePath)
     calendar_list_get_count(records, &count);
     calendar_list_first(records);
 
-    for (int i = 0; i < count; ++i)
-    {
+    for (int i = 0; i < count; ++i) {
         calendar_record_h record = nullptr;
         calendar_list_get_current_record_p(records, &record);
-        if (record)
-        {
+        if (record) {
             char *viewUri = nullptr;
             calendar_record_get_uri_p(record, &viewUri);
             if (viewUri && !strcmp(viewUri, _calendar_event._uri))
index eadd3f7ea6a61c1d0855b46c1764b8f913793b1e..73aecf370c173cdb55cac9c51c805e01cc488c1a 100644 (file)
 #include "Config.h"
 #include <Elementary.h>
 
-namespace Msg
-{
+namespace Msg {
     /**
      * @brief Wrapper for Elm_Interface_Atspi_Accessible interface (Screen reader)
      */
-    class AtspiAccessibleInterface
-    {
+    class AtspiAccessibleInterface {
         public:
             AtspiAccessibleInterface(Elm_Interface_Atspi_Accessible *obj);
             void wrap(Elm_Interface_Atspi_Accessible *obj);
index 840e2b7a0875698ad31a9e6c66171228e600c57d..6d2ce11d9d4e09ce5c4b96428fcceecaceb88611 100644 (file)
 #include <Evas.h>
 #include "PathUtils.h"
 
-namespace Msg
-{
+namespace Msg {
     /**
      * @brief Basic interface for all visual objects used across the whole application.
      */
-    class BaseView
-    {
+    class BaseView {
         public:
             virtual ~BaseView() {};
             virtual void destroy() = 0;
index 75f6de8fbd80df79fdc4c5ceccb84dab7bb0a275..33ce3936d5abbcc9a906a0b07575bef698390365 100644 (file)
 #include "View.h"
 #include <Elementary.h>
 
-namespace Msg
-{
+namespace Msg {
     /**
      * @brief Wraps all basic Box operations.
      */
     class Box
-        : public View
-    {
+        : public View {
         public:
             Box(Evas_Object *parent);
             virtual ~Box();
index 28077d8065ce4f6b0c22e078f3efce60425dc52d..010f0cd66abf5222b096e0dfb74d29112b8759fc 100644 (file)
@@ -24,8 +24,7 @@
 #include <Elementary.h>
 #include <string>
 
-namespace Msg
-{
+namespace Msg {
     class ContextPopup;
     class ContextPopupItem;
     class Window;
@@ -38,8 +37,7 @@ namespace Msg
     typedef void (*ContextPopupItemPressedCb)(ContextPopupItem &item, void *userData);
 
     class ContextPopupItem
-        : public ViewItem
-    {
+        : public ViewItem {
         friend class ContextPopup;
 
     public:
@@ -58,8 +56,7 @@ namespace Msg
     };
 
     class ContextPopup
-        : public View
-    {
+        : public View {
         public:
             ContextPopup(Evas_Object *parent);
             virtual ~ContextPopup();
index ec6f6d9e76b0a6727fc8f94f38ec4bb23ebeb559..09bbc7f41d54390530d17604064273e6cd3e3d16 100644 (file)
 
 #include "View.h"
 
-namespace Msg
-{
+namespace Msg {
     class DefaultLayout
-        : public View
-    {
+        : public View {
         public:
             DefaultLayout(Evas_Object *parent);
             virtual ~DefaultLayout();
index 171616d5f0b969d2a27b90ead8e44255a5935ca8..20d7529c726f4c972d75b0602ee3e56a22af7b29 100644 (file)
 #include <vector>
 #include <Elementary.h>
 
-namespace Msg
-{
+namespace Msg {
     class ListView;
     class ListItemStyle;
     class ListItem;
     typedef std::shared_ptr<ListItemStyle> ListItemStyleRef;
     typedef std::vector<ListItem *> ListItemCollection;
 
-    class ListItemStyle
-    {
+    class ListItemStyle {
         public:
             ListItemStyle(const char *itemStyle,
                           const char *decorateItemStyle = nullptr,
@@ -59,8 +57,7 @@ namespace Msg
      * @brief Wraps all basic genlist item operations.
      */
     class ListItem
-        : public ViewItem
-    {
+        : public ViewItem {
         friend class ListItemStyle;
         friend class ListView;
 
index fe3596c8b05cfc889fe157da795b66026475799c..3ec4acdc1edb96b8d89048183eab538b2678c8b3 100644 (file)
 
 #include <Evas.h>
 
-namespace Msg
-{
+namespace Msg {
     class IListViewListener;
 
     /**
      * @brief Wraps all basic genlist operations.
      */
     class ListView
-        : public View
-    {
+        : public View {
         public:
             /**@brief Function of comparing two list-items, used for sorted item insertion.*/
             typedef int (*CmpFunc)(const ListItem &item1, const ListItem &item2);
@@ -262,8 +260,7 @@ namespace Msg
     /**
      * @brief A listener-interface aimed to make subscribers to get notified about genlist events.
      */
-    class IListViewListener
-    {
+    class IListViewListener {
     public:
         virtual ~IListViewListener() {};
 
@@ -292,11 +289,9 @@ namespace Msg
         std::vector<T*> list;
         list.reserve(elm_genlist_items_count(getEo()));
         Elm_Object_Item *elmItem = elm_genlist_first_item_get(getEo());
-        while (elmItem)
-        {
+        while (elmItem) {
             void *data = elm_object_item_data_get(elmItem);
-            if (data)
-            {
+            if (data) {
                 T *listItem = dynamic_cast<T*>(static_cast<ListItem*>(data));
                 if (listItem)
                     list.push_back(listItem);
@@ -312,8 +307,7 @@ namespace Msg
     {
         T *res = nullptr;
         ListItem *next = &item;
-        do
-        {
+        do {
             next = getNextItem(*next);
             res = dynamic_cast<T*>(next);
         } while (next && !res);
@@ -326,8 +320,7 @@ namespace Msg
     {
         T *res = nullptr;
         ListItem *prev = &item;
-        do
-        {
+        do {
             prev = getPrevItem(*prev);
             res = dynamic_cast<T*>(prev);
         } while (prev && !res);
index 3d54c21d93588256dd5721d48df0d4e8930fbed1..7c254246ad91a67b9b7f312d25fabb3b289171c3 100644 (file)
 #include "ViewItem.h"
 #include "MsgAddress.h"
 
-namespace Msg
-{
+namespace Msg {
     class MbeRecipientsView;
 
     /**
      * @brief Wraps all basic multibutton entry item operations.
      */
     class MbeRecipientItem
-        : public ViewItem
-    {
+        : public ViewItem {
         friend class MbeRecipientsView;
 
         public:
index 4d6ad00627e39e0311d34d0d228b88b007e71318..fe7e0a270c03d2fd9a8f560c3ba3f10ae102917c 100644 (file)
 
 #include <vector>
 
-namespace Msg
-{
+namespace Msg {
     class IMbeRecipientsListener;
 
     /**
      * @brief Wraps all basic multibutton entry(mbe) operations.
      */
     class MbeRecipientsView
-        : public View
-    {
+        : public View {
         public:
             MbeRecipientsView(Evas_Object *parent);
             virtual ~MbeRecipientsView();
@@ -86,8 +84,7 @@ namespace Msg
     /**
      * @brief A listener class that should be implemented by all mbe event subscribers.
      */
-    class IMbeRecipientsListener
-    {
+    class IMbeRecipientsListener {
     public:
         virtual ~IMbeRecipientsListener() {};
 
index c74d4b1cd560993a10897ac457f9592531cb1747..84de4d509b936655a7d2ca97de890e8da25e15cb 100644 (file)
@@ -25,8 +25,7 @@
 #include <vector>
 #include <Elementary.h>
 
-namespace Msg
-{
+namespace Msg {
     class NaviFrameView;
     class NaviFrameItem;
     typedef std::vector<NaviFrameItem*> NaviFrameItemList;
@@ -35,16 +34,14 @@ namespace Msg
      * @brief Wraps all basic Naviframe-item operations.
      */
     class NaviFrameItem
-        : public ViewItem
-    {
+        : public ViewItem {
         friend class NaviFrameView;
 
         public:
             /**
              * @brief An identifiers of buttons that can be shown on the top naviframe-item.
              */
-            enum NaviButtonId
-            {
+            enum NaviButtonId {
                 NaviCancelButtonId = 0,/**< Cancel-button */
                 NaviOkButtonId,        /**< OK-button */
                 NaviCenterButtonId,    /**< Central-button */
@@ -104,16 +101,14 @@ namespace Msg
      * @brief A bar at the top of NaviFrameItem.
      */
     class NaviFrameItem::NaviBar
-        : public View
-    {
+        : public View {
         friend class NaviFrameItem;
 
         public:
             /**
              * @brief An enumeration of colors that could be applied to Navibar's background.
              */
-            enum NaviColorId
-            {
+            enum NaviColorId {
                 NaviBlueColorId = 0,/**< Blue */
                 NaviWhiteColorId,   /**< White */
                 NaviColorMax
@@ -236,8 +231,7 @@ namespace Msg
             static void on_button_clicked(void *data, Evas_Object *obj, void *event_info);
 
         private:
-            struct ButtonStruct
-            {
+            struct ButtonStruct {
                 ButtonStruct(Evas_Object *b = nullptr, const char *p = nullptr, const char *s = nullptr, const char *d = nullptr)
                     : button(b)
                     , part(p)
index f140b9447a5d438aa8359e7718b6b56d06433fd4..ece8d6ae7a4351cd9e07a0e96b2dc2c27b43611c 100644 (file)
 #include "NaviFrameItem.h"
 #include <vector>
 
-namespace Msg
-{
+namespace Msg {
     /**
      * @brief Wraps all basic Naviframe operations.
      */
     class NaviFrameView
-        : public View
-    {
+        : public View {
         public:
             NaviFrameView(Evas_Object *parent);
             NaviFrameView(View &parent);
index 08005b3df97e23d706714968e709fdaf046df62e..5234be9a16ede1c2104ee6851703fd5ffa17f0ed 100644 (file)
 #include "LangUtils.h"
 #include <string>
 
-namespace Msg
-{
+namespace Msg {
     /**
     * @brief A Layout that shows a message text when ThreadList is empty
     */
     class NoContentLayout
-        : public View
-    {
+        : public View {
         public:
             NoContentLayout(Evas_Object *parent);
             virtual ~NoContentLayout();
index c05c5363ff9021908dc68777115926f509b75be4..ab38e84fbb7078c1649bf02655f0dbd3fba9d6ee 100644 (file)
@@ -23,8 +23,7 @@
 #include <Evas.h>
 #include <string>
 
-namespace Msg
-{
+namespace Msg {
     class IPopupListener;
     class Popup;
     class PopupManager;
@@ -36,13 +35,11 @@ namespace Msg
     }
 
     class Popup
-        : public View
-    {
+        : public View {
         public:
 
             static void defaultButtonCb(Popup &popup, int buttonId, void *userData);
-            enum ButtonID
-            {
+            enum ButtonID {
                 OkButtonId,
                 CancelButtonId
             };
index 5b3b2fb0b774dd36b6dedcd9da0003e26e61cd14..c4405434042963208fb803cc6cee56b9b9532fa6 100644 (file)
 
 #include "PopupListItem.h"
 
-namespace Msg
-{
+namespace Msg {
 
     /**
      * @brief A class of popup-for attach files
      */
     class PopupAttachmentListItem
-        : public PopupCheckListItem
-    {
+        : public PopupCheckListItem {
         public:
             PopupAttachmentListItem(PopupList &parent, const std::string &text, const std::string &path,
                     PopupListItemPressedCb cb, void *userData);
index a0d4a037c89781a2cee6cde19f903c2d5899cdc1..f2eb8c2be1ac143dbc40afd105f11d6bea029a9c 100644 (file)
 #include "ListView.h"
 #include "PopupListItem.h"
 
-namespace Msg
-{
+namespace Msg {
     /**
      * @brief A popup with list of available popup items.
      */
     class PopupList
         : public Popup
-        , private IListViewListener
-    {
+        , private IListViewListener {
         public:
-            enum PopupListType
-            {
+            enum PopupListType {
                 ListPopup,      /**< Popup with title >*/
                 MoreMenuPopup   /**< Popup without title, hides by more button and pause events >*/
             };
index 395a665f6479bc26b2eaeac2cd03d36762269073..75bb7c843c5fc2a50f1efaae487fe7fb26a9b3d3 100644 (file)
@@ -19,8 +19,7 @@
 
 #include "ListItem.h"
 
-namespace Msg
-{
+namespace Msg {
     class PopupList;
     class PopupListItem;
 
@@ -34,8 +33,7 @@ namespace Msg
     /**
      * @brief Generic Popup-list item class
      */
-    class PopupListItem: public ListItem
-    {
+    class PopupListItem: public ListItem {
     public:
         PopupListItem(PopupList &parent, PopupListItemPressedCb cb, void *userData);
         PopupList &getParent();
@@ -49,8 +47,7 @@ namespace Msg
     /**
      * @brief A class of popup-item with single text displayed.
      */
-    class PopupTextListItem: public PopupListItem
-    {
+    class PopupTextListItem: public PopupListItem {
     public:
         PopupTextListItem(PopupList &parent, const std::string &text, PopupListItemPressedCb cb, void *userData);
         virtual ~PopupTextListItem();
@@ -63,8 +60,7 @@ namespace Msg
     /**
      * @brief A class of popup-item with text and check field.
      */
-    class PopupCheckListItem: public PopupListItem
-    {
+    class PopupCheckListItem: public PopupListItem {
         public:
             PopupCheckListItem(PopupList &parent, const std::string &text, PopupListItemPressedCb cb, void *userData);
             virtual ~PopupCheckListItem();
index 9e1f807f9f1583f9c3b6e4502864268737989356..e803b0e58a769f23cc7b0d3d619b4d2e55606868 100644 (file)
 #include "PopupList.h"
 #include "ContextPopup.h"
 
-namespace Msg
-{
+namespace Msg {
     class Window;
 
     /**
      * @brief A global instance that manages context popups and regular popups lifecycle in context of one window.
      */
-    class PopupManager
-    {
+    class PopupManager {
         public:
             /**
              * @brief Creating PopupManager instance in context of specified window.
index d922ea83cdd052eaa24982cd5e671f150670ab2b..f320ebc94462e57a42d9c3f52b9f790d36236bd0 100644 (file)
 #include "View.h"
 #include <Elementary.h>
 
-namespace Msg
-{
+namespace Msg {
     class Scroller
-        : public View
-    {
+        : public View {
         public:
             Scroller(Evas_Object *parent);
             virtual ~Scroller();
index d8fcc955d8dba4575127c19003d153cdad256d79..736c297a4aa9ae7f6638cd4fbe94ff6e15d1fd27 100644 (file)
 
 #include <string>
 
-namespace Msg
-{
+namespace Msg {
     class SelectAllListItem
-        : public ListItem
-    {
+        : public ListItem {
         public:
             SelectAllListItem();
             virtual ~SelectAllListItem();
index 0ac53370b0cbd3533c5e3c680db0f8360ffbf74e..257b3139a2bfff31178e17e75d5fd33a4281cf91 100644 (file)
 
 #include "Window.h"
 
-namespace Msg
-{
+namespace Msg {
     class StandardWindow
-        : public Window
-    {
+        : public Window {
         public:
             StandardWindow();
             virtual ~StandardWindow();
index a704da1bd4b8ff43d08c839150bd4e02057bb5db..589f09e71a66b35395ac5da3babf5fc48518d053 100644 (file)
 #include <Evas.h>
 #include <Elementary.h>
 
-namespace Msg
-{
+namespace Msg {
     /**
      * @brief Wraps all basic Evas_Object operations and manages automatic self-removal by EVAS_CALLBACK_FREE and EVAS_CALLBACK_DEL events.
      */
     class View
-        : public BaseView
-    {
+        : public BaseView {
         public:
             View();
 
index 567cc178691ec894f90ae77b633d260a580a9c46..57f7a5e4912584445246cb9d6165425666a766be 100644 (file)
 
 #include <Elementary.h>
 
-namespace Msg
-{
+namespace Msg {
     /**
      * @brief Wraps all basic Elm_Object_Item operations and manages automatic self-removal by delete-callback.
      */
     class ViewItem
-        : public BaseView
-    {
+        : public BaseView {
         public:
             ViewItem();
             ViewItem(ViewItem&) = delete;
index 4f659789aab01806ec35a8378e82473345a7f172..323df62ce4ba6fee1a5871b1a4ac5cfb2adb5dbc 100644 (file)
 #include "View.h"
 #include <Evas.h>
 
-namespace Msg
-{
+namespace Msg {
     /**
      * @brief An interface that should be implemented by all window-classes across whole application.
      */
     class Window
-        : public View
-    {
+        : public View {
         public:
             virtual ~Window() {};
 
index d9369b074396199db57b26bab77be0a100a3235f..a9d508aeb27e5a2f88c75b438c60df9cff4932a8 100644 (file)
@@ -55,8 +55,7 @@ ContextPopupItem *ContextPopup::appendItem(const std::string &text, Evas_Object
     ContextPopupItem *newItem = new ContextPopupItem(*this, id, cb, userData);
     Elm_Object_Item *elmItem = elm_ctxpopup_item_append(getEo(), text.c_str(), icon, on_item_pressed_cb, newItem);
 
-    if (elmItem)
-    {
+    if (elmItem) {
         newItem->setElmObjItem(elmItem);
     } else {
         delete newItem;
@@ -118,8 +117,7 @@ void ContextPopup::align(Window &win)
     int pos = win.getRotation();
     win.getScreenSize(nullptr, nullptr, &w, &h);
 
-    switch (pos)
-    {
+    switch (pos) {
         case 0:
         case 180:
             move(w/2, h);
index 723b0bdd60fed69f633849a21571f6d98ddc148d..2c71541ca763c6d1a27790ae8a9c35b4f26b305b 100644 (file)
@@ -18,8 +18,7 @@
 
 using namespace Msg;
 
-namespace
-{
+namespace {
     const char *floatingPart = "elm.swallow.floatingbutton";
 }
 
@@ -52,8 +51,7 @@ void DefaultLayout::setFloatingButton(Evas_Object *obj)
 
 void DefaultLayout::showFloatingButton(bool show)
 {
-    if (show)
-    {
+    if (show) {
         View::setContent(m_pFloatingBtn, floatingPart, true);
         evas_object_show(m_pFloatingBtn);
     } else {
index 6b7ea69237c73d6de0b12cfbdd7f2efcd9d6441b..c71a5ae52466dae885b56fb036b5cecc960e7e16 100644 (file)
@@ -125,8 +125,7 @@ char *ListItem::elm_gen_item_text_get_cb(void *data, Evas_Object *obj, const cha
 {
     ListItem *self = static_cast<ListItem*>(data);
 
-    if (self)
-    {
+    if (self) {
         std::string text = self->getText(*self, part);
         return text.empty() ? nullptr : strdup(text.c_str());
     }
@@ -141,13 +140,10 @@ Evas_Object *ListItem::elm_gen_item_content_get_cb(void * data, Evas_Object * ob
     if (!self)
         return nullptr;
 
-    if (self->getOwner()->getCheckMode())
-    {
+    if (self->getOwner()->getCheckMode()) {
         const char *checkPart = self->getCheckPart(*self);
         if (checkPart && strcmp(checkPart, part) == 0)
-        {
             return self->addCheck();
-        }
     }
 
     return self->getContent(*self, part);
index 007d1585c71f36d9136b4ea40276d22e4773b6e4..bae81cca032dc07205377d86e791010b6f33752f 100644 (file)
@@ -23,8 +23,7 @@
 
 using namespace Msg;
 
-namespace
-{
+namespace {
     inline ListItem *getItem(Elm_Object_Item *obj)
     {
         return obj ? static_cast<ListItem*>(elm_object_item_data_get(obj)) : nullptr;
@@ -135,12 +134,10 @@ ListItemCollection ListView::getItems() const
 {
     ListItemCollection list;
     Elm_Object_Item *elmItem = elm_genlist_first_item_get(getEo());
-    while (elmItem)
-    {
+    while (elmItem) {
         void *data = elm_object_item_data_get(elmItem);
         MSG_ASSERT(data, "Genlist item data is NULL");
-        if (data)
-        {
+        if (data) {
             ListItem *listItem = static_cast<ListItem *>(data);
             list.push_back(listItem);
         }
@@ -154,13 +151,11 @@ ListItemCollection ListView::getRealizedItems() const
 {
     ListItemCollection collection;
     Eina_List *list = elm_genlist_realized_items_get(getEo());
-    if (list)
-    {
+    if (list) {
         void *obj = nullptr;
         Eina_List *l = nullptr;
 
-        EINA_LIST_FOREACH(list, l, obj)
-        {
+        EINA_LIST_FOREACH(list, l, obj) {
             collection.push_back(getItem((Elm_Object_Item *)obj));
         }
 
@@ -246,8 +241,7 @@ void ListView::notifyListener(void *data, Evas_Object *obj, void *event_info, Li
     ListItem *item = ListItem::staticCast<ListItem*>(event_info);
     MSG_ASSERT(item, "Item is null");
 
-    if (item)
-    {
+    if (item) {
         ListView *owner = item->getOwner();
         MSG_ASSERT(owner, "ListItem::owner is null");
 
@@ -269,17 +263,13 @@ bool ListView::getCheckMode() const
 void ListView::checkAllItems(bool check,  bool updateFullItem)
 {
     for (ListItem *item: getItems())
-    {
         item->setCheckedState(check, false);
-    }
 
     if (updateFullItem)
         updateRealizedItems();
     else
         for (ListItem *item: getRealizedItems())
-        {
             item->updateFields(item->getCheckPart(*item), ELM_GENLIST_ITEM_FIELD_ALL);
-        }
 }
 
 void ListView::updateRealizedItems()
@@ -302,8 +292,7 @@ void ListView::on_item_selected_cb(void *data, Evas_Object *obj, void *event_inf
     ListItem *item = ListItem::staticCast<ListItem*>(event_info);
 
     item->setSelected(false);
-    if (item->getOwner()->getCheckMode() && item->isCheckable())
-    {
+    if (item->getOwner()->getCheckMode() && item->isCheckable()) {
         item->changeCheckedState(true);
         notifyListener(data, obj, event_info, &IListViewListener::onListItemChecked);
     } else {
index 5260edc11a734e69af44100225fd1687b5bad103..c6ecbd420af1713a7d9ffdeb04be97ebcfba7cee 100644 (file)
@@ -36,8 +36,7 @@ MbeRecipientsView::MbeRecipientsView(Evas_Object *parent)
 
 MbeRecipientsView::~MbeRecipientsView()
 {
-    if (m_pChangedJob)
-    {
+    if (m_pChangedJob) {
         ecore_job_del(m_pChangedJob);
         m_pChangedJob = nullptr;
     }
@@ -63,8 +62,7 @@ std::vector<MbeRecipientItem*> MbeRecipientsView::getItems() const
     std::vector<MbeRecipientItem*> res;
 
     Elm_Object_Item *elmItem = elm_multibuttonentry_first_item_get(getEo());
-    while (elmItem)
-    {
+    while (elmItem) {
         MbeRecipientItem *item = static_cast<MbeRecipientItem*>(elm_object_item_data_get(elmItem));
         res.push_back(item);
         elmItem = elm_multibuttonentry_item_next_get(elmItem);
index a49bc76645b8b7fbd893a6ff34555cd87302d490..76eac2ab44a9cf628d556679aa95081e1a7f3660 100644 (file)
@@ -22,8 +22,7 @@
 
 using namespace Msg;
 
-namespace
-{
+namespace {
     const char *titleStyleName = "title";
     const char *naviTitlePart = "title";
     const char *titleTextPart = "text.center";
@@ -86,8 +85,7 @@ bool NaviFrameItem::isPopping() const
 
 void NaviFrameItem::setTitleVisibility(bool visible)
 {
-    if (visible)
-    {
+    if (visible) {
         setContent(*m_pNaviBar, naviTitlePart);
         evas_object_show(*m_pNaviBar);
     } else {
@@ -145,8 +143,7 @@ std::string NaviFrameItem::NaviBar::getTitle() const
 
 void NaviFrameItem::NaviBar::getButton(NaviButtonId id)
 {
-    if (!m_ButtonList[id].button)
-    {
+    if (!m_ButtonList[id].button) {
         Evas_Object *btn = elm_button_add(getEo());
         m_ButtonList[id].button = btn;
         elm_object_style_set(btn, m_ButtonList[id].style);
@@ -158,8 +155,7 @@ void NaviFrameItem::NaviBar::getButton(NaviButtonId id)
 
 void NaviFrameItem::NaviBar::showButton(NaviButtonId id, bool value)
 {
-    if (value)
-    {
+    if (value) {
         getButton(id);
 
         if (getContent(m_ButtonList[id].part) != m_ButtonList[id].button)
@@ -167,15 +163,13 @@ void NaviFrameItem::NaviBar::showButton(NaviButtonId id, bool value)
         setButtonColor(id, m_CurrentColor);
         evas_object_show(m_ButtonList[id].button);
     } else {
-        if (getContent(m_ButtonList[id].part) == m_ButtonList[id].button)
-        {
+        if (getContent(m_ButtonList[id].part) == m_ButtonList[id].button) {
             evas_object_del(m_ButtonList[id].button);
             m_ButtonList[id].button = nullptr;
         }
     }
 
-    switch (id)
-    {
+    switch (id) {
         case NaviCancelButtonId:
             showCancelButtonPart(value);
             break;
@@ -219,8 +213,7 @@ void NaviFrameItem::NaviBar::disabledButton(NaviButtonId id, bool value)
 
 void NaviFrameItem::NaviBar::showCancelButtonPart(bool value)
 {
-    if (value)
-    {
+    if (value) {
         emitSignal("cancel,show,btn", "*");
     } else if (getContent(cancelButtonPart) == nullptr) {
         emitSignal("left,clear", "*");
@@ -280,8 +273,7 @@ void NaviFrameItem::onAttached(ViewItem &item)
 
 void NaviFrameItem::NaviBar::setColor(NaviColorId id)
 {
-    switch (id)
-    {
+    switch (id) {
         case NaviBlueColorId:
             emitSignal("title,color,blue", "*");
             m_CurrentColor = NaviBlueColorId;
@@ -302,8 +294,7 @@ void NaviFrameItem::NaviBar::setButtonText(NaviButtonId id, const std::string &t
     // Note that, button's color is opposite to title's color
     TextStyle style;
 
-    switch (m_CurrentColor)
-    {
+    switch (m_CurrentColor) {
         case NaviBlueColorId:
             style.setColor(textColorWhiteTitleButtons);
             break;
@@ -327,8 +318,7 @@ void NaviFrameItem::NaviBar::setButtonText(NaviButtonId id, const TText &text)
 void NaviFrameItem::NaviBar::setButtonColor(NaviButtonId id, NaviColorId titleColor)
 {
     // Note that, button's color is opposite to title's color
-    if (id == NaviPrevButtonId || id == NaviExpandButtonId)
-    {
+    if (id == NaviPrevButtonId || id == NaviExpandButtonId) {
         switch (titleColor)
         {
             case NaviBlueColorId:
@@ -345,8 +335,7 @@ void NaviFrameItem::NaviBar::setButtonColor(NaviButtonId id, NaviColorId titleCo
     } else {
         TextStyle style;
 
-        switch (titleColor)
-        {
+        switch (titleColor) {
             case NaviBlueColorId:
                 style.setColor(textColorWhiteTitleButtons);
                 break;
@@ -361,9 +350,7 @@ void NaviFrameItem::NaviBar::setButtonColor(NaviButtonId id, NaviColorId titleCo
         style.setSize(getTextSize(id));
         const char *buttonText = elm_object_text_get(m_ButtonList[id].button);
         if (buttonText != nullptr)
-        {
             elm_object_text_set(m_ButtonList[id].button, TextDecorator::make(buttonText, style).c_str());
-        }
     }
 }
 
@@ -371,9 +358,8 @@ void NaviFrameItem::NaviBar::clear()
 {
     emitSignal("sides,clear", "*");
     for (int iter = NaviCancelButtonId; iter < NaviButtonMax; iter++)
-    {
         evas_object_hide(elm_object_part_content_unset(getEo(), m_ButtonList[iter].part));
-    }
+
     showCenterButtonPart(false);
 }
 
index bae61a88af0a700d6a4c4a3a8af443edcf433bbe..60fb53ace39258907bf58c30544e2d0eb2b0ac95 100644 (file)
@@ -76,8 +76,7 @@ int NaviFrameView::getItemsCount() const
 {
     int res = 0;
     Eina_List *list = elm_naviframe_items_get(getEo());
-    if (list)
-    {
+    if (list) {
         res = eina_list_count(list);
         eina_list_free(list);
     }
@@ -89,13 +88,11 @@ NaviFrameItemList NaviFrameView::getItems() const
     NaviFrameItemList result;
     Eina_List *list = elm_naviframe_items_get(getEo());
 
-    if (list)
-    {
+    if (list) {
         Eina_List *l = nullptr;
         void *obj = nullptr;
 
-        EINA_LIST_FOREACH(list, l, obj)
-        {
+        EINA_LIST_FOREACH(list, l, obj) {
             NaviFrameItem *item = static_cast<NaviFrameItem*>(elm_object_item_data_get((Elm_Object_Item*)obj));
             result.push_back(item);
         }
@@ -137,12 +134,10 @@ void NaviFrameView::pop(NaviFrameItem &item)
 {
     // Workaround solution to avoid rejected JIRA issue: http://suprem.sec.samsung.net/jira/browse/TSAM-6776
     item.m_IsPopping = true;
-    if (getTransitionStatus())
-    {
+    if (getTransitionStatus()) {
         m_ItemsToDelete.push_back(&item);
     } else {
-        if (getTopFrame() == &item)
-        {
+        if (getTopFrame() == &item) {
             m_TransitionStatus = getItemsCount() > 1;
             pause();
             elm_naviframe_item_pop(getEo());
@@ -160,8 +155,7 @@ void NaviFrameView::insertToBottom(NaviFrameItem &item)
     Elm_Object_Item *before = elm_naviframe_bottom_item_get(getEo());
     Elm_Object_Item *insert = nullptr;
 
-    if (before)
-    {
+    if (before) {
         insert = elm_naviframe_item_insert_before(getEo(), before, nullptr, nullptr, nullptr, nullptr, naviTitleStyleEmpty);
         item.setElmObjItem(insert);
     } else {
@@ -176,8 +170,7 @@ void NaviFrameView::insertToBottom(NaviFrameItem &item)
 void NaviFrameView::promote(NaviFrameItem &item)
 {
     bool isTop = &item == getTopFrame();
-    if (!isTop)
-    {
+    if (!isTop) {
         m_TransitionStatus = true;
         pause();
         elm_naviframe_item_promote(item);
@@ -192,8 +185,7 @@ void NaviFrameView::onTransitionFinished(Evas_Object *obj, void *eventInfo)
 
     auto *transFinishedItem = ViewItem::staticCast<NaviFrameItem*>(eventInfo);
 
-    for (NaviFrameItem *item: m_ItemsToDelete)
-    {
+    for (NaviFrameItem *item: m_ItemsToDelete) {
         if (item == transFinishedItem)
             transFinishedItem = nullptr;
         item->destroy();
index 55fa604db5e1742512e6e5301eede221f9e9d924..557bf919c52b462e4510b5b578874993bc54cb61 100644 (file)
@@ -24,8 +24,7 @@
 
 using namespace Msg;
 
-namespace
-{
+namespace {
     const char *buttonIdKey = "id";
     const char *buttonCbKey = "cb";
     const char *buttonCbDataKey = "cb-data";
@@ -55,8 +54,7 @@ Popup::Popup(PopupManager &parent)
 Popup::~Popup()
 {
     MSG_LOG("Destructor");
-    if (m_pShowIdler)
-    {
+    if (m_pShowIdler) {
         ecore_idler_del(m_pShowIdler);
         m_pShowIdler = nullptr;
     }
@@ -151,8 +149,7 @@ Evas_Object *Popup::addButton(const TText &text, int buttonId, PopupButtonCb but
     elm_object_style_set(btn, buttonStyle);
     View::setContent(btn, ss.str().c_str());
 
-    if (elm_object_part_content_get(getEo(), ss.str().c_str()))
-    {
+    if (elm_object_part_content_get(getEo(), ss.str().c_str())) {
         ++m_CurrentButtonIndex;
         evas_object_show(btn);
         evas_object_data_set(btn, buttonIdKey, (void*)(intptr_t)buttonId);
@@ -191,12 +188,10 @@ void Popup::setTitle(const TText &title)
 
 void Popup::show(bool deferred)
 {
-    if (!deferred)
-    {
+    if (!deferred) {
         View::show();
     } else {
-        if (!m_pShowIdler)
-        {
+        if (!m_pShowIdler) {
             m_pShowIdler = ecore_idler_add
             (
                 [](void *data)->Eina_Bool
@@ -214,8 +209,7 @@ void Popup::show(bool deferred)
 void Popup::on_button_clicked(void *data, Evas_Object *obj, void *event_info)
 {
     PopupButtonCb cb = (PopupButtonCb)evas_object_data_get(obj, buttonCbKey);
-    if (cb)
-    {
+    if (cb) {
         void *userData = evas_object_data_get(obj, buttonCbDataKey);
         auto *popup = static_cast<Popup*>(data);
         int buttonId = (int)(intptr_t)evas_object_data_get(obj, buttonIdKey);
index b3463725c0f9d08d699a0e34b0bde2c140218f1c..a6b3fbc5fa04c337dc1c916fb541c86a266a5dbb 100644 (file)
@@ -61,8 +61,7 @@ void PopupList::create(PopupListType type)
 
     //set popup's behavior
     setDismissByOutsideTapFlag(true);
-    if (type == MoreMenuPopup)
-    {
+    if (type == MoreMenuPopup) {
         setDismissByMoreMenuKeyFlag(true);
         setDismissByPauseAppFlag(true);
     }
index 0036b513c8655b66f3c9aa088f918ae9e770c19c..ee8bdf5dc079da933ca55cacc3115bfefb897112 100644 (file)
@@ -40,10 +40,8 @@ PopupManager::~PopupManager()
 
 void PopupManager::reset(void *popupOwner)
 {
-    if (!popupOwner || (popupOwner == m_pPopupOwner))
-    {
-        if (m_pPopup)
-        {
+    if (!popupOwner || (popupOwner == m_pPopupOwner)) {
+        if (m_pPopup) {
             m_pPopup->View::destroy();
             m_pPopup = nullptr;
         }
@@ -54,8 +52,7 @@ void PopupManager::reset(void *popupOwner)
 void PopupManager::reset(Popup &popup, void *newOwner)
 {
     m_pPopupOwner = newOwner;
-    if (&popup != m_pPopup)
-    {
+    if (&popup != m_pPopup) {
         reset();
         eext_object_event_callback_add(popup, EEXT_CALLBACK_BACK, SMART_CALLBACK(PopupManager, onHwBackButtonPopupClicked), this);
         m_pPopup = &popup;
index 448e8fa24eb89a9248d0b2f39e2ef77539544d27..33f617ed6fc8334dc9c2fc51d7d8b1f498a1dd0a 100644 (file)
@@ -21,8 +21,7 @@
 
 using namespace Msg;
 
-namespace
-{
+namespace {
     ListItemStyleRef style = ListItemStyle::create("type1");
     const char *textPart = "elm.text";
     const char *checkPart = "elm.swallow.end";
@@ -45,9 +44,7 @@ const char *SelectAllListItem::getCheckPart(ListItem &item)
 std::string SelectAllListItem::getText(ListItem &item, const char *part)
 {
     if (strcmp(part, textPart) == 0)
-    {
         return msg("IDS_MSG_MBODY_SELECT_ALL");
-    }
 
     return "";
 }
index 7ccdfd8b791b2e29dc86f2c8cd70b93d0b1fc8f3..31852709f478f0a1d48909fedc23280bdb09cabc 100644 (file)
@@ -24,8 +24,7 @@
 
 using namespace Msg;
 
-namespace
-{
+namespace {
     const char *thisKey = "this";
 }
 
@@ -53,8 +52,7 @@ Evas_Object_Event_Cb View::getCb(Evas_Callback_Type type)
 void View::setEventCb(Evas_Callback_Type type)
 {
     Evas_Object_Event_Cb cb = getCb(type);
-    if (cb)
-    {
+    if (cb) {
         evas_object_event_callback_add(m_pEo, type, cb, this);
     } else {
         MSG_LOG_ERROR("Not implemented");
@@ -64,15 +62,13 @@ void View::setEventCb(Evas_Callback_Type type)
 
 void View::setEo(Evas_Object *eo)
 {
-    if (m_pEo)
-    {
+    if (m_pEo) {
         MSG_LOG_ERROR("m_pEo not null");
         assert(false);
     }
 
     m_pEo = eo;
-    if (eo)
-    {
+    if (eo) {
         setData(this);
         setEventCb(EVAS_CALLBACK_FREE);
         setEventCb(EVAS_CALLBACK_DEL);
@@ -82,8 +78,7 @@ void View::setEo(Evas_Object *eo)
 void View::unsetEventCb(Evas_Callback_Type type)
 {
     Evas_Object_Event_Cb cb = getCb(type);
-    if (cb)
-    {
+    if (cb) {
         evas_object_event_callback_del(m_pEo, type, cb);
     } else {
         MSG_LOG_ERROR("Not implemented");
@@ -161,8 +156,7 @@ std::string Msg::markupToUtf8(const char *str)
 
     std::string res;
     char *markup = elm_entry_markup_to_utf8(str);
-    if (markup)
-    {
+    if (markup) {
         res = markup;
         free(markup);
     }
@@ -177,8 +171,7 @@ std::string Msg::utf8ToMarkup(const char *str)
 
     std::string res;
     char *markup = elm_entry_utf8_to_markup(str);
-    if (markup)
-    {
+    if (markup) {
         res = markup;
         free(markup);
     }
index 4ed5bff4253d47740b38da85897d9c8a29d6ee0c..843a2599ae83a67e0d440178cfa7a69f7386e48a 100644 (file)
 #include <list>
 #include <attach_panel.h>
 
-namespace Msg
-{
+namespace Msg {
     class IAttachPanelListener;
 
-    class AttachPanel
-    {
+    class AttachPanel {
         public:
             typedef std::list<std::string> FileList;
 
@@ -56,8 +54,7 @@ namespace Msg
             IAttachPanelListener *m_pListener;
     };
 
-    class IAttachPanelListener
-    {
+    class IAttachPanelListener {
         public:
             virtual ~IAttachPanelListener() {}
             virtual void onFileSelected(AttachPanel &panel, const AttachPanel::FileList &files) {};
index 643db174fa54d70bbaeb6026f5a4184d3dac3635..033dd40504bed89c8e80575de98a91f8e5d68b9b 100644 (file)
 #include "AppControlUtils.h"
 #include "AppControlLauncher.h"
 
-namespace Msg
-{
+namespace Msg {
     class IContactPickerListener;
 
     /**
      * @brief An utility-class aimed to launch contacts-application with pick-operation passed via app-control.
      */
     class ContactPicker
-        : public AppControlHandle
-    {
+        : public AppControlHandle {
         public:
             ContactPicker();
 
@@ -52,16 +50,13 @@ namespace Msg
             IContactPickerListener *m_pListener;
     };
 
-    class IContactPickerListener
-    {
+    class IContactPickerListener {
         public:
-            enum AddressType
-            {
+            enum AddressType {
                 PhoneType,
                 EmailType
             };
-            struct ResultData
-            {
+            struct ResultData {
                 AddressType type;
                 int id;
             };
index 9ba3f3be509d8e3e337363f8d21a105ee8f25abe..800aa0d51a46d545736a779b350ef108d044a383 100644 (file)
 
 #include "AppControlLauncher.h"
 
-namespace Msg
-{
+namespace Msg {
     class SettingsNetwork
-        : public AppControlHandle
-    {
+        : public AppControlHandle {
         public:
             SettingsNetwork();
             void launch();
index 070ca6eb1055fe838101ae799452ce4311c1c347..fefd734d00ee82b0a9521db31003962d18acf149 100644 (file)
@@ -23,8 +23,7 @@
 
 using namespace Msg;
 
-namespace
-{
+namespace {
     const char *appControlTotalSize = "http://tizen.org/appcontrol/data/total_size";
     const char *appControlTotalCount = "http://tizen.org/appcontrol/data/total_count";
 }
@@ -60,8 +59,7 @@ void AttachPanel::show(bool value)
 
 void AttachPanel::reset()
 {
-    if (m_Handle)
-    {
+    if (m_Handle) {
         attach_panel_hide(m_Handle);
         attach_panel_destroy(m_Handle);
         m_Handle = nullptr;
@@ -90,8 +88,7 @@ attach_panel_h AttachPanel::getAttachPanel()
         return m_Handle;
 
     attach_panel_create(m_App.getWindow().getConformEvasObject(), &m_Handle);
-    if (m_Handle)
-    {
+    if (m_Handle) {
         bundle *extraData = bundle_create();
 
         int maxMmsSize = m_App.getMsgEngine().getSettings().getMaxMmsSize();
@@ -103,8 +100,7 @@ attach_panel_h AttachPanel::getAttachPanel()
         std::string maxAttachment = std::to_string(m_App.getMsgEngine().getSettings().getAttachmentsMaxCount());
         bundle_add_str(extraData, appControlTotalCount, maxAttachment.c_str());
 
-        if (extraData)
-        {
+        if (extraData) {
             attach_panel_add_content_category(m_Handle, ATTACH_PANEL_CONTENT_CATEGORY_IMAGE, extraData);
             attach_panel_add_content_category(m_Handle, ATTACH_PANEL_CONTENT_CATEGORY_CAMERA, extraData);
             attach_panel_add_content_category(m_Handle, ATTACH_PANEL_CONTENT_CATEGORY_VOICE, extraData);
index aee6357f8e209494c1ae77fc96a2ac1f99aea999..0d9f1af0fc9388128d3dd7b453c6a59f9bf2b5a3 100644 (file)
@@ -19,8 +19,7 @@
 
 using namespace Msg;
 
-namespace
-{
+namespace {
     const char* mimeContact = "application/vnd.tizen.contact";
     const char* single  = "single";
     const char* multiple  = "multiple";
@@ -43,10 +42,8 @@ void ContactPicker::setListener(IContactPickerListener *pListener)
 bool ContactPicker::launch(size_t howManyToPick)
 {
     bool res = false;
-    if (m_Handle)
-    {
-        if (howManyToPick > 1)
-        {
+    if (m_Handle) {
+        if (howManyToPick > 1) {
             app_control_add_extra_data(m_Handle, APP_CONTROL_DATA_SELECTION_MODE, multiple);
             app_control_add_extra_data(m_Handle, APP_CONTROL_DATA_TOTAL_COUNT, std::to_string(howManyToPick).c_str());
         } else {
@@ -64,8 +61,7 @@ bool ContactPicker::launch(size_t howManyToPick)
 
 void ContactPicker::onReply(app_control_h request, app_control_h reply, app_control_result_e result)
 {
-    if (result == APP_CONTROL_RESULT_SUCCEEDED)
-    {
+    if (result == APP_CONTROL_RESULT_SUCCEEDED) {
         std::list<int> addressIds;
         std::list<std::string> types;
         std::list<IContactPickerListener::ResultData> result;
@@ -76,8 +72,7 @@ void ContactPicker::onReply(app_control_h request, app_control_h reply, app_cont
         int minLen = std::min(addressIds.size(), types.size());
         auto itId = addressIds.begin();
         auto itType = types.begin();
-        for (int i = 0; i < minLen; ++i, ++itId, ++itType)
-        {
+        for (int i = 0; i < minLen; ++i, ++itId, ++itType) {
             if (*itType == typePhone) {
                 result.push_back({IContactPickerListener::PhoneType, *itId});
             } else if (*itType == typeEmail) {
index c872227ad0711be5567ed884efcf9bebff43efa9..7d2218a74877ea0480105e7eeb7da7df40ff4980 100644 (file)
@@ -30,8 +30,7 @@
 #include <queue>
 #include <Ecore.h>
 
-namespace Msg
-{
+namespace Msg {
     class IBodyListener;
     class App;
     class PopupListItem;
@@ -42,8 +41,7 @@ namespace Msg
     class Body
         : public BodyView
         , private IAttachmentHandlerListener
-        , private IComposeListItemListener
-    {
+        , private IComposeListItemListener {
         public:
             Body(Evas_Object *parent, App &app, WorkingDirRef workingDir, ConvList &convList);
             virtual ~Body();
@@ -126,8 +124,7 @@ namespace Msg
             int m_Utf8TextSize;
     };
 
-    class IBodyListener
-    {
+    class IBodyListener {
         public:
             virtual ~IBodyListener() {}
 
index 82479043038e1f08dcea2f2ef0804923bf59b2da..da32c9264648c4350dfad646413448cd794205be 100644 (file)
@@ -31,8 +31,7 @@
 
 using namespace Msg;
 
-namespace
-{
+namespace {
     const std::string contactFileName = "Contact.vcf";
     const std::string contactsFileName = "Contacts.vcf";
 }
@@ -58,8 +57,7 @@ Body::Body(Evas_Object *parent, App &app, WorkingDirRef workingDir, ConvList &co
 
 Body::~Body()
 {
-    if (m_pOnChangedJob)
-    {
+    if (m_pOnChangedJob) {
         ecore_job_del(m_pOnChangedJob);
         m_pOnChangedJob = nullptr;
     }
@@ -122,8 +120,7 @@ void Body::addAttachment(const std::string &filePath)
 void Body::addFileToPage(MessageMms &msg, const std::string &filePath)
 {
     static const int defaultPageDuration = 5000; // msec
-    if (!filePath.empty())
-    {
+    if (!filePath.empty()) {
         MsgPage &msgPage = msg.addPage();
         MediaTypeData mediaData = getMsgMediaTypeByFileExt(filePath);
         int pageDuration = 0;
@@ -142,8 +139,7 @@ void Body::addFileToPage(MessageMms &msg, const std::string &filePath)
 
 void Body::runFileProcessing()
 {
-    if (!m_SelectedFiles.empty())
-    {
+    if (!m_SelectedFiles.empty()) {
         long long freeSpace = m_App.getMsgEngine().getSettings().getMaxMmsSize() - getMsgSize();
         if (freeSpace < FileUtils::getFileSize(m_SelectedFiles.front()))
             showResizingPopup();
@@ -167,8 +163,7 @@ void Body::setMmsRecipFlag(bool value)
 
 void Body::updateTextMetricIfNeeded()
 {
-    if (m_TextMetricNeedUpdate)
-    {
+    if (m_TextMetricNeedUpdate) {
         std::string text = getPlainUtf8Text();
         m_Utf8TextSize = text.length();
         MsgEngine::calculateTextMetric(text, m_TextMetric);
@@ -189,9 +184,7 @@ long long Body::getMsgSize()
     // Attachments:
     auto attachments = getComposeItem().getAttachments();
     for (auto *attachment : attachments)
-    {
         totalSize += attachment->getFileSize();
-    }
 
     // Text:
     updateTextMetricIfNeeded();
@@ -239,22 +232,18 @@ void Body::writeAttachments(const MessageMms &msg)
     // Pages:
     const MsgPageList &pages = msg.getPageList();
     int pageCount = pages.getLength();
-    for (int pageIndex = 0; pageIndex < pageCount; ++pageIndex)
-    {
+    for (int pageIndex = 0; pageIndex < pageCount; ++pageIndex) {
         const MsgPage &page = pages[pageIndex];
 
         // Media:
         const MsgMediaList &mediaList = page.getMediaList();
         int mediaCount = mediaList.getLength();
-        for (int mediaIndex = 0; mediaIndex < mediaCount; ++mediaIndex)
-        {
+        for (int mediaIndex = 0; mediaIndex < mediaCount; ++mediaIndex) {
             const MsgMedia &media = mediaList[mediaIndex];
             std::string filePath = media.getFilePath();
-            if (!filePath.empty())
-            {
+            if (!filePath.empty()) {
                 std::string mime = FileUtils::getMimeType(filePath);
-                if (mime != "text/plain") // Skip text on page
-                {
+                if (mime != "text/plain") { // Skip text on page
                     std::string newFilePath = m_WorkingDir->addFile(filePath);
                     getComposeItem().addAttachment(newFilePath);
                 }
@@ -265,15 +254,12 @@ void Body::writeAttachments(const MessageMms &msg)
     // Attachments:
     const MsgAttachmentList &attachments = msg.getAttachmentList();
     int attachmentCount = attachments.getLength();
-    for (int i = 0; i < attachmentCount; ++i)
-    {
+    for (int i = 0; i < attachmentCount; ++i) {
         const MsgAttachment &attachment = attachments[i];
         std::string filePath = attachment.getFilePath();
-        if (!filePath.empty())
-        {
+        if (!filePath.empty()) {
             std::string mime = FileUtils::getMimeType(filePath);
-            if (mime != "application/smil") // Skip SMIL layout
-            {
+            if (mime != "application/smil") { // Skip SMIL layout
                 std::string newFilePath = m_WorkingDir->addFile(filePath);
                 getComposeItem().addAttachment(newFilePath);
             }
@@ -303,35 +289,28 @@ void Body::read(MessageMms &msg)
 void Body::readAttachments(MessageMms &msg)
 {
     const auto &attachments = getComposeItem().getAttachments();
-    for (auto *attach : attachments)
-    {
+    for (auto *attach : attachments) {
         const std::string &filePath = attach->getFilePath();
         if (filePath.empty())
             continue;
 
-        switch (getMsgMediaTypeByFileExt(filePath).type)
-        {
+        switch (getMsgMediaTypeByFileExt(filePath).type) {
             case MsgMedia::ImageType:
             case MsgMedia::AudioType:
             case MsgMedia::VideoType:
-            {
                 addFileToPage(msg, filePath);
                 break;
-            }
             default:
-            {
                 MsgAttachment &msgAttach = msg.addAttachment();
                 msgAttach.setFilePath(filePath);
                 break;
-            }
         }
     }
 }
 
 void Body::readText(MessageMms &msg)
 {
-    if (!BodyView::isEmpty())
-    {
+    if (!BodyView::isEmpty()) {
         writeTextToFile();
         addFileToPage(msg, m_MmsTextFilePath);
     }
@@ -350,8 +329,7 @@ void Body::execCmd(const AppControlComposeRef &cmd)
 
 void Body::execCmd(const AppControlDefaultRef &cmd)
 {
-    if (cmd->getDefaultType() == AppControlDefault::ReplyType)
-    {
+    if (cmd->getDefaultType() == AppControlDefault::ReplyType) {
         clear();
         setText(cmd->getReplyText());
     }
@@ -366,12 +344,10 @@ void Body::onMaxLengthReached()
 void Body::onCheckBoundaryText(char **text)
 {
     MSG_LOG("");
-    if (isMms())
-    {
+    if (isMms()) {
         long long maxSize = m_App.getMsgEngine().getSettings().getMaxMmsSize();
         std::string utfText = markupToUtf8(*text);
-        if (getMsgSize() + static_cast<long long>(utfText.size()) > maxSize)
-        {
+        if (getMsgSize() + static_cast<long long>(utfText.size()) > maxSize) {
             free(*text);
             *text = nullptr;
             showMaxCharactersPopup();
@@ -388,15 +364,13 @@ PopupList &Body::createPopupList(const std::string &title)
 
 void Body::showTooLargePopup(const std::list <std::string> &tooBigFiles)
 {
-   if (!m_TooLargePopupShow)
-   {
+   if (!m_TooLargePopupShow) {
         Popup &popup = m_App.getPopupManager().getPopup();
         popup.addEventCb(EVAS_CALLBACK_DEL, EVAS_EVENT_CALLBACK(Body, onTooLargePopupDel), this);
         popup.addButton(msgt("IDS_MSG_BUTTON_OK_ABB"), Popup::OkButtonId);
         popup.setTitle(msgt("IDS_MSG_HEADER_FILE_SIZE_TOO_LARGE_ABB"));
         std::string content(msg("IDS_MSG_POP_UNABLE_TO_ATTACH_FILE_FILE_SIZE_TOO_LARGE_TRY_SENDING_VIA_EMAIL_BLUETOOTH_WI_FI_ETC"));
-        for (auto& file: tooBigFiles)
-        {
+        for (auto& file: tooBigFiles) {
             content.append("<br/>");
             content.append(FileUtils::getFileName(file));
         }
@@ -415,8 +389,7 @@ void Body::showTooMuchAttachedPopup()
 
 void Body::showResizingPopup()
 {
-    if (!m_ResizingPopupShow)
-    {
+    if (!m_ResizingPopupShow) {
         Popup &popup = m_App.getPopupManager().getPopup();
         popup.addEventCb(EVAS_CALLBACK_DEL, EVAS_EVENT_CALLBACK(Body, onResizingPopupDel), this);
         int maxSize = m_App.getMsgEngine().getSettings().getMaxMmsSize();
@@ -459,8 +432,7 @@ std::string Body::createVcfFile(const AppControlComposeRef &cmd)
     std::string content;
     std::string path;
 
-    if (cmd->getComposeType() == AppControlCompose::OpShare)
-    {
+    if (cmd->getComposeType() == AppControlCompose::OpShare) {
         content = m_App.getContactManager().makeVcard(*idList.begin(), cmd->getVcfInfo().isMyProfile);
         path = contactFileName;
     } else if (cmd->getComposeType() == AppControlCompose::OpMultiShare) {
@@ -475,8 +447,7 @@ std::string Body::createVcfFile(const AppControlComposeRef &cmd)
 
 void Body::notifyContentChanged()
 {
-    if (!m_pOnChangedJob)
-    {
+    if (!m_pOnChangedJob) {
         m_pOnChangedJob = ecore_job_add(
             [](void *data)
             {
@@ -503,9 +474,8 @@ void Body::onAttachmentAdded(const std::list<std::string> &files)
 void Body::onAttachmentDeleted(const std::list<std::string> &files)
 {
     for (const std::string &file : files)
-    {
         m_WorkingDir->removeFile(file);
-    }
+
     notifyContentChanged();
 }
 
@@ -513,8 +483,7 @@ void Body::onFileReady(const std::string &filePath)
 {
     int numAttached = getComposeItem().getAttachments().size();
     int numAttachMax = m_App.getMsgEngine().getSettings().getAttachmentsMaxCount();
-    if (numAttached == numAttachMax)
-    {
+    if (numAttached == numAttachMax) {
         std::queue <std::string> empty;
         std::swap(m_SelectedFiles, empty);
         showTooMuchAttachedPopup();
@@ -529,8 +498,7 @@ void Body::onFileReady(const std::string &filePath)
         BodyView::setFocus(true);
 
     m_SelectedFiles.pop();
-    if (!m_SelectedFiles.empty())
-    {
+    if (!m_SelectedFiles.empty()) {
         long long freeSpace = m_App.getMsgEngine().getSettings().getMaxMmsSize() - getMsgSize();
         if (freeSpace < FileUtils::getFileSize(m_SelectedFiles.front()))
             showResizingPopup();
@@ -543,8 +511,7 @@ void Body::onFileReady(const std::string &filePath)
 void Body::onFileFails()
 {
     std::list <std::string> overflowList;
-    while (!m_SelectedFiles.empty())
-    {
+    while (!m_SelectedFiles.empty()) {
         overflowList.push_back(m_SelectedFiles.front());
         m_SelectedFiles.pop();
     }
index 9365ba70ae4887040260301b8cfeeb8e6420aae7..0306e3a918934f1bd8cf00f9659f6387052a2750 100644 (file)
@@ -24,8 +24,7 @@
 namespace Msg
 {
     class BodyView
-        : public View
-    {
+        : public View {
         public:
             BodyView(Evas_Object *parent, int maxCharCount);
             virtual ~BodyView();
index 2cb25bec33e57382bcad49ff82e8c121b46be4ea..26721ab4a079302e649023d93313aa2c9febc47d 100644 (file)
@@ -24,8 +24,7 @@
 
 using namespace Msg;
 
-namespace
-{
+namespace {
     #define maxBodyHeight ELM_SCALE_SIZE(360)
 }
 
@@ -62,11 +61,9 @@ void BodyView::clear()
 
 void BodyView::setText(const std::string &text)
 {
-    if (!text.empty())
-    {
+    if (!text.empty()) {
         char *markupText = elm_entry_utf8_to_markup(text.c_str());
-        if (markupText)
-        {
+        if (markupText) {
             elm_object_text_set(m_pEntry, markupText);
             free(markupText);
         }
@@ -92,11 +89,9 @@ std::string BodyView::getPlainUtf8Text() const
     std::string res;
     const char *plainText = elm_entry_entry_get(m_pEntry);
 
-    if (plainText)
-    {
+    if (plainText) {
         char *text = elm_entry_markup_to_utf8(plainText);
-        if (text)
-        {
+        if (text) {
             res.assign(text);
             free(text);
         }
index c7283287611421138483dd65063e05b0ae52f5a3..e232572bfea27266581d4bbe385b5c0a3bd81634 100644 (file)
 #include "ContactAddress.h"
 #include "App.h"
 
-namespace Msg
-{
+namespace Msg {
     class ContactListItem
-        : public ContactListViewItem
-    {
+        : public ContactListViewItem {
         public:
             ContactListItem(const ContactPersonPhoneLog &rec, App &app, const std::string &searchWord);
             ContactListItem(const ContactAddress &rec, App &app, const std::string &searchWord);
index aad0159192d646cdd65c63fd4fb1144014083499..59c91daecd8af1a09773bd965455450048a8b839 100644 (file)
 
 #include <Ecore.h>
 
-namespace Msg
-{
+namespace Msg {
     class IConvContactListListener;
 
     class ConvContactList
         : public ConvContactListView
-        , private IListViewListener
-    {
+        , private IListViewListener {
         public:
             ConvContactList(Evas_Object *parent, App &app);
             virtual ~ConvContactList();
@@ -58,8 +56,7 @@ namespace Msg
             std::string m_SearchWord;
     };
 
-    class IConvContactListListener
-    {
+    class IConvContactListListener {
         public:
             virtual ~IConvContactListListener() {}
 
index a10d764736df882340ad73c3cd06f4ad29472339..c59d52340bd6e46ff1aa59c56ec87d38741c8a87 100644 (file)
@@ -34,8 +34,7 @@ ConvContactList::ConvContactList(Evas_Object *parent, App &app)
 
 ConvContactList::~ConvContactList()
 {
-    if (m_pPredictSearchIdler)
-    {
+    if (m_pPredictSearchIdler) {
         ecore_idler_del(m_pPredictSearchIdler);
         m_pPredictSearchIdler = nullptr;
     }
@@ -73,8 +72,7 @@ void ConvContactList::requestSearch()
 void ConvContactList::search()
 {
     getList().clear();
-    if (!m_SearchWord.empty())
-    {
+    if (!m_SearchWord.empty()) {
         search<ContactPersonNumber>();
         search<ContactPersonEmail>();
         search<ContactPersonPhoneLog>();
@@ -87,13 +85,10 @@ template<typename ContactRecord>
 void ConvContactList::search()
 {
     auto list = m_App.getContactManager().search<ContactRecord>(m_SearchWord);
-    if (list)
-    {
-        do
-        {
+    if (list) {
+        do {
             auto &rec = list->get();
-            if (MsgUtils::isValidAddress(rec.getAddress()))
-            {
+            if (MsgUtils::isValidAddress(rec.getAddress())) {
                 ContactListItem *item = new ContactListItem(rec, m_App, m_SearchWord);
                 getList().appendItem(*item);
             } else {
index 8a91a6d0e83c5beb4ed196f58a98641e5c8078f9..be4235b40dac2c2ee0e150e551a5d349be358cde 100644 (file)
 #include "ListItem.h"
 #include <string>
 
-namespace Msg
-{
+namespace Msg {
     class ContactListViewItem
-        : public ListItem
-    {
+        : public ListItem {
         public:
             ContactListViewItem();
             virtual ~ContactListViewItem();
index d9d6aaf6ba95f18f51144ff93f0effdd887886cb..502213da843e8e75260b2d062047f5269cf8abbb 100644 (file)
 
 #include "ListView.h"
 
-namespace Msg
-{
+namespace Msg {
     class ConvContactListView
-        : public View
-    {
+        : public View {
         public:
             ConvContactListView(Evas_Object *parent);
             virtual ~ConvContactListView();
index 97e76dafd8c43d5e362fbc55b35f5a7a80a53a3f..7c2e57a856b4b299dab0b213c3d97332069347b6 100644 (file)
@@ -33,25 +33,20 @@ ContactListViewItem::~ContactListViewItem()
 
 std::string ContactListViewItem::getText(ListItem &item, const char *part)
 {
-    if (getStyle() == nameOrEmailStyle)
-    {
+    if (getStyle() == nameOrEmailStyle) {
         const char *mainTextPart = "elm.text";
         const char *subTextPart = "elm.text.sub";
 
-        if (strcmp(part, mainTextPart) == 0)
-        {
+        if (strcmp(part, mainTextPart) == 0) {
             return getMainText();
         } else if (strcmp(part, subTextPart) == 0) {
             return getSubText();
         }
     }
-    if (getStyle() == logStyle)
-    {
+    if (getStyle() == logStyle) {
         const char *mainTextPart = "elm.text";
         if (strcmp(part, mainTextPart) == 0)
-        {
             return getMainText();
-        }
     }
 
     return "";
@@ -60,8 +55,7 @@ std::string ContactListViewItem::getText(ListItem &item, const char *part)
 Evas_Object *ContactListViewItem::getContent(ListItem &item, const char *part)
 {
     if (strcmp(part, "elm.swallow.icon") == 0)
-    {
         return getThumbnail();
-    }
+
     return nullptr;
 }
index dbe3572f92c0818f6fd0e7cef8ca46223766234d..b2a247bfb819fd5693269ee7beb2c02acc29e68c 100644 (file)
 #include "BubbleAudioViewItem.h"
 #include "BubbleBgEntity.h"
 
-namespace Msg
-{
+namespace Msg {
     class BubbleAudioEntity
-        : public BubbleBgEntity
-    {
+        : public BubbleBgEntity {
         public:
             BubbleAudioEntity(const std::string &filePath, const std::string &fileName, BubbleBgViewItem::BgType bgType, Message::Direction direction);
             virtual ~BubbleAudioEntity();
index bdcc684a6520877aa24af7a2eff359ba748b661c..48e9a187fe7b1cb8cf6953e5e058ff22674520a7 100644 (file)
 #include "BubbleEntity.h"
 #include "BubbleBgViewItem.h"
 
-namespace Msg
-{
+namespace Msg {
     class BubbleBgEntity
-        : public BubbleEntity
-    {
+        : public BubbleEntity {
         public:
             BubbleBgEntity(Type type, BubbleBgViewItem::BgType bgType, Message::Direction direction, const std::string &filePath = "");
             virtual ~BubbleBgEntity();
index 3b74142c69002aae659dfaf58fa3b0b59658774c..50b5d973f189bfbec862720a615e0aea76e5ab7b 100644 (file)
 #include "BubbleCalEventViewItem.h"
 #include "BubbleBgEntity.h"
 
-namespace Msg
-{
+namespace Msg {
     class BubbleCalEventEntity
-        : public BubbleBgEntity
-    {
+        : public BubbleBgEntity {
         public:
             BubbleCalEventEntity(const std::string &filePath, const std::string &fileName, BubbleBgViewItem::BgType bgType, Message::Direction direction);
             virtual ~BubbleCalEventEntity();
index 0fd551d29823f3839c6e78d01077907fe8b1f408..b630225ed0b4b15da281eedf5d6792b961f5b9ad 100644 (file)
 #include "App.h"
 #include "Contact.h"
 
-namespace Msg
-{
+namespace Msg {
     class BubbleContactEntity
-        : public BubbleBgEntity
-    {
+        : public BubbleBgEntity {
         public:
             BubbleContactEntity(App &app, const std::string &filePath, const std::string &fileName, BubbleBgViewItem::BgType bgType, Message::Direction direction);
             virtual ~BubbleContactEntity();
index a8312f2446d92a8851c95302ca952eda614a0645..22b5d4d58971798719bfeec477111a54d5d4e929 100644 (file)
 #include "BubbleDownloadButtonViewItem.h"
 #include "BubbleEntity.h"
 
-namespace Msg
-{
+namespace Msg {
     class BubbleDownloadButtonEntity
-        : public BubbleEntity
-    {
+        : public BubbleEntity {
         public:
             BubbleDownloadButtonEntity();
             virtual ~BubbleDownloadButtonEntity();
index 32b3c0d499e9a363e3366b90e3bc647f1b4b9c39..c96831d56ede34a8ffc54be8013eef1447395f88 100644 (file)
 
 #include <string>
 
-namespace Msg
-{
-    class BubbleEntity
-    {
+namespace Msg {
+    class BubbleEntity {
         public:
-            enum Type
-            {
+            enum Type {
                 TextItem,
                 ImageItem,
                 AudioItem,
index a306f2a48587afc2327b18f3510a68bbd093114f..77f6ab13e9f2495622d27aa0f3a7ba2b882ddfce 100644 (file)
 
 #include <string>
 
-namespace Msg
-{
-    class BubbleEntityFactory
-    {
+namespace Msg {
+    class BubbleEntityFactory {
         public:
             BubbleEntityFactory(App &app, WorkingDirRef workingDir);
             ~BubbleEntityFactory();
index 9f2d93f33d92b91204ed6011c5d72a62f8ab8da8..2bed075268e9a6d5839aa5b00afc9ba05bfde93f 100644 (file)
 #include "BubbleImageViewItem.h"
 #include "BubbleEntity.h"
 
-namespace Msg
-{
+namespace Msg {
     class BubbleImageEntity
-        : public BubbleEntity
-    {
+        : public BubbleEntity {
         public:
             BubbleImageEntity(const std::string &filePath, Message::Direction direction);
             virtual ~BubbleImageEntity();
index 8ca3f086a8a05ffce97e92c395cf2f51e7f76fb8..9ab9ddd39070bd8baf240702a0c9e816151460e6 100644 (file)
 #include "BubbleTextViewItem.h"
 #include "BubbleBgEntity.h"
 
-namespace Msg
-{
+namespace Msg {
     class BubbleTextEntity
-        : public BubbleBgEntity
-    {
+        : public BubbleBgEntity {
         public:
             BubbleTextEntity(BubbleBgViewItem::BgType type, Message::Direction direction, std::string text);
             virtual ~BubbleTextEntity();
index a413f72e00b3dc727e22c2aa04c7831a74c50d26..9d6e928cdb8a69fe4fcc38b67bf5609632febf47 100644 (file)
 #include "BubbleUnknownFileViewItem.h"
 #include "BubbleBgEntity.h"
 
-namespace Msg
-{
+namespace Msg {
     class BubbleUnknownFileEntity
-        : public BubbleBgEntity
-    {
+        : public BubbleBgEntity {
         public:
             BubbleUnknownFileEntity(const std::string &filePath, const std::string &fileName, BubbleBgViewItem::BgType bgType, Message::Direction direction);
             virtual ~BubbleUnknownFileEntity();
index b379bfdb7a22bf65fe412a35e0fa6ff0f7d7ac23..1f8ca3cf0808f85aa51233772654b1b91c77d264 100644 (file)
 #include "BubbleEntity.h"
 #include "WorkingDir.h"
 
-namespace Msg
-{
+namespace Msg {
     class BubbleVideoEntity
-        : public BubbleEntity
-    {
+        : public BubbleEntity {
         public:
             BubbleVideoEntity(WorkingDirRef workingDir, const std::string &filePath, Message::Direction direction);
             virtual ~BubbleVideoEntity();
index ba1e942eaf3c7d09bfea0b4790787efbcc244525..b86e08f273ebda0768225eac80129054669cb3eb 100644 (file)
 
 #include <list>
 
-namespace Msg
-{
+namespace Msg {
     class IComposeListItemListener;
     class FileViewer;
     typedef std::list<BubbleEntity*> BubbleEntityList;
 
     class ComposeListItem
         : public ComposeListViewItem
-        , private IBubbleViewItemListener
-    {
+        , private IBubbleViewItemListener {
         public:
             ComposeListItem(BubbleEntityFactory &entityFactory, FileViewer &fileViewer);
             virtual ~ComposeListItem();
@@ -60,8 +58,7 @@ namespace Msg
             FileViewer &m_FileViewer;
     };
 
-    class IComposeListItemListener
-    {
+    class IComposeListItemListener {
         public:
             virtual ~IComposeListItemListener() {}
             virtual void onAttachmentAdded(const std::list<std::string> &files) {};
index cbcbce8161a8cb9faa6d886ef167d8a9315a617a..cdc53c13d5d2880262a6a3e44970e8ed8f724b3b 100644 (file)
@@ -33,8 +33,7 @@
 #include <unordered_set>
 #include <functional>
 
-namespace Msg
-{
+namespace Msg {
     class IConvListListener;
 
     class ConvList
@@ -43,11 +42,9 @@ namespace Msg
         , private IListViewListener
         , private IConvListItemListener
         , private IContactManagerListener
-        , private ISystemSettingsManager
-    {
+        , private ISystemSettingsManager {
         public:
-            enum Mode
-            {
+            enum Mode {
                 NormalMode,
                 SelectMode
             };
@@ -213,8 +210,7 @@ namespace Msg
             Share m_Share;
     };
 
-    class IConvListListener
-    {
+    class IConvListListener {
         public:
             virtual ~IConvListListener() {};
 
index 3b6ae5194495ab0b2073ca793de31c3ed924fc03..cdc20493fa66098cea10555bdb8d36fbb4c2c71f 100644 (file)
@@ -31,8 +31,7 @@
 #include "BubbleBgViewItem.h"
 #include "BubbleEntityFactory.h"
 
-namespace Msg
-{
+namespace Msg {
     class MsgConversationItem;
     class IConvListItemListener;
     class FileViewer;
@@ -40,8 +39,7 @@ namespace Msg
 
     class ConvListItem
         : public ConvListViewItem
-        , public IBubbleViewItemListener
-    {
+        , public IBubbleViewItemListener {
         public:
             /**
              * @brief Creates item for Conversation list
@@ -149,8 +147,7 @@ namespace Msg
             bool m_IsNeededReadReport;
     };
 
-    class IConvListItemListener
-    {
+    class IConvListItemListener {
         public:
             virtual ~IConvListItemListener() {}
             virtual void onEditDraftMsg(ConvListItem &item) {};
index c3c6fb3eb2a7e23c6c21b3b7a3de9d68c4a7c8b3..34af0109509f8cef5f3be376d5eb6391ec34c7c1 100644 (file)
 #include "DateLineViewItem.h"
 #include <time.h>
 
-namespace Msg
-{
+namespace Msg {
     class DateLineItem
-        : public DateLineViewItem
-    {
+        : public DateLineViewItem {
         public:
             DateLineItem(time_t dateTime);
             DateLineItem(time_t dateTime, const std::string &dateTimeStr);
index feb5bfdda4a663d774b710fb97bf239f0eec1c97..5d18a88638ae0f3cb71a447ce887cbb9d599ad96 100644 (file)
 #include "ContactManager.h"
 #include "SystemSettingsManager.h"
 
-namespace Msg
-{
+namespace Msg {
     class MsgDetailsPopup
         : public Popup
         , private IContactManagerListener
-        , private ISystemSettingsManager
-    {
+        , private ISystemSettingsManager {
         public:
             MsgDetailsPopup(PopupManager &mngr, App &app, MsgId msgId);
             virtual ~MsgDetailsPopup();
index 1b3b12db1800e5cbce6a8fbf553602475bbe0122..29b3bf523edc7b7fe275f2508c25c81f51da5e0c 100644 (file)
@@ -24,8 +24,7 @@ BubbleCalEventEntity::BubbleCalEventEntity(const std::string &filePath, const st
     : BubbleBgEntity(CalendarEventItem, bgType, direction, filePath)
 {
     auto list = VCalendarParser::getInst().parse(filePath);
-    if (list.size() == 1)
-    {
+    if (list.size() == 1) {
         const CalendarEvent &event = list.front();
         m_Name = event.getSummary();
         m_DateTime = event.getStartDate();
index 9b5d435ee8dcf5362e084e427f961628d09cce09..7fdcad8ea62556b380c205716191d6e3d09f5dd6 100644 (file)
@@ -27,13 +27,10 @@ BubbleContactEntity::BubbleContactEntity(App &app, const std::string &filePath,
     , m_ThumbMaker(app.getThumbnailMaker())
 {
     auto list = app.getContactManager().parseVcard(getFilePath());
-    if (!list.empty())
-    {
-        if (list.size() == 1)
-        {
+    if (!list.empty()) {
+        if (list.size() == 1) {
             m_Contact = list.front();
-            if (m_Contact)
-            {
+            if (m_Contact) {
                 m_Name = m_Contact->getDispName();
                 m_Address = m_Contact->getAddress();
                 m_ThumbPath = m_Contact->getThumb();
index b9d4c2e31dfbbeecf59468af8ba2e7927cc60232..6b37e8eaefaef8b96879574c250c1ceed730310c 100644 (file)
@@ -93,12 +93,10 @@ BubbleEntity *BubbleEntityFactory::createVideoEntity(const std::string &filePath
 
 BubbleEntity *BubbleEntityFactory::createEntity(const std::string &filePath, const std::string &fileName, std::string mime, BubbleBgViewItem::BgType bgType, Message::Direction direction)
 {
-    if (FileUtils::isExists(filePath))
-    {
+    if (FileUtils::isExists(filePath)) {
         std::transform(mime.begin(), mime.end(), mime.begin(), ::tolower);
         MsgMedia::Type msgMediaType = getMsgMediaTypeByMime(mime);
-        switch (msgMediaType)
-        {
+        switch (msgMediaType) {
             case MsgMedia::ImageType:
                 return new BubbleImageEntity(filePath, direction);
             case MsgMedia::AudioType:
@@ -106,7 +104,6 @@ BubbleEntity *BubbleEntityFactory::createEntity(const std::string &filePath, con
             case MsgMedia::VideoType:
                 return createVideoEntity(filePath, fileName, bgType, direction);
             default:
-            {
               if (mime == "text/x-vcalendar" || mime == "text/calendar")
                   return new BubbleCalEventEntity(filePath, fileName, bgType, direction);
               else if (mime == "text/x-vcard" ||
@@ -115,7 +112,6 @@ BubbleEntity *BubbleEntityFactory::createEntity(const std::string &filePath, con
                   return new BubbleContactEntity(m_App, filePath, fileName , bgType, direction);
               else if (mime != "application/smil")
                   return new BubbleUnknownFileEntity(filePath, fileName, bgType, direction);
-            }
         }
     }
 
index 2875b62121072a9be01f2b28a36584098651d281..db58a605eb359ecafaf6b405b69c2f54830b7a27 100644 (file)
@@ -50,8 +50,7 @@ ComposeListItem::~ComposeListItem()
 void ComposeListItem::addAttachment(const std::string &filePath)
 {
     auto *entity = m_BubbleEntityFactory.createEntity(filePath, BubbleBgViewItem::DraftStyle, Message::MD_Sent);
-    if (entity)
-    {
+    if (entity) {
         m_BubbleEntityList.push_back(entity);
         updateBubblePart();
         show(true);
@@ -84,14 +83,12 @@ bool ComposeListItem::isEmpty() const
 void ComposeListItem::clear(bool updateUi)
 {
     std::list<std::string> fileList;
-    for (BubbleEntity *entity : m_BubbleEntityList)
-    {
+    for (BubbleEntity *entity : m_BubbleEntityList) {
         fileList.push_back(entity->getFilePath());
         delete entity;
     }
     m_BubbleEntityList.clear();
-    if (updateUi)
-    {
+    if (updateUi) {
         show(false);
         ComposeListItem::updateBubblePart();
     }
@@ -105,11 +102,9 @@ Evas_Object *ComposeListItem::getBubbleContent()
         return nullptr;
 
     auto *bubble = new BubbleItemContainer(*getOwner());
-    for (BubbleEntity *entity : m_BubbleEntityList)
-    {
+    for (BubbleEntity *entity : m_BubbleEntityList) {
         BubbleViewItem *item = entity->createView(*bubble);
-        if (item)
-        {
+        if (item) {
             item->showDelButton(true);
             item->setListener(this);
             bubble->append(*item, entity->getDirection());
@@ -123,8 +118,7 @@ Evas_Object *ComposeListItem::getBubbleContent()
 void ComposeListItem::deleteEntity(BubbleEntity &entity)
 {
     auto it = std::find(m_BubbleEntityList.begin(), m_BubbleEntityList.end(), &entity);
-    if (it != m_BubbleEntityList.end())
-    {
+    if (it != m_BubbleEntityList.end()) {
         std::string filePath = entity.getFilePath();
         delete *it;
         m_BubbleEntityList.erase(it);
index 7b713cd7004e720fc338a226b1723d433178e47d..17ad46cc0d3d6b6c24f47031f5e2eed3dd2422df 100644 (file)
@@ -22,8 +22,7 @@
 
 using namespace Msg;
 
-namespace
-{
+namespace {
     const int minMessagesBulk = 100;
     const int additionalMessagesBulk = 50;
     const std::string solidStyle = "solid/default";
@@ -67,8 +66,7 @@ void ConvList::setMode(ConvList::Mode mode)
 
     showSelectAllMode(isCheckMode);
     m_pList->setCheckMode(isCheckMode);
-    if (isCheckMode)
-    {
+    if (isCheckMode) {
         selectListItems(false);
         m_pSelectAll->setCheckState(false);
     } else {
@@ -129,8 +127,7 @@ void ConvList::fill()
     m_ConvListItemMap.reserve(reserveSize);
     m_DateLineItemSet.reserve(reserveSize);
 
-    for (int i = 0; i < convListLen; ++i)
-    {
+    for (int i = 0; i < convListLen; ++i) {
         MsgConversationItem &item = convList->at(i);
         insertItem(item);
     }
@@ -140,15 +137,13 @@ void ConvList::setThreadId(ThreadId id, const char *searchWord)
 {
     bool fillList = false;
 
-    if (m_ThreadId != id)
-    {
+    if (m_ThreadId != id) {
         fillList = true;
         m_ThreadId = id;
         updateRecipThumbId();
     }
 
-    if (searchWord && strcmp(searchWord, m_SearchWord.c_str()))
-    {
+    if (searchWord && strcmp(searchWord, m_SearchWord.c_str())) {
         fillList = true;
         m_SearchWord = searchWord;
     }
@@ -165,11 +160,9 @@ ThreadId ConvList::getThreadId() const
 void ConvList::updateRecipThumbId()
 {
     const MsgAddressListRef addressList = m_App.getMsgEngine().getStorage().getAddressList(m_ThreadId);
-    if (addressList)
-    {
+    if (addressList) {
         int countContact = addressList->getLength();
-        if (countContact > 1)
-        {
+        if (countContact > 1) {
             m_RecipThumbId = m_App.getThumbnailMaker().getThumbId(ThumbnailMaker::GroupThumb);
         } else if (countContact == 1) {
             m_RecipThumbId = m_App.getThumbnailMaker().getThumbId(addressList->at(0));
@@ -192,8 +185,7 @@ void ConvList::navigateTo(MsgId msgId)
 void ConvList::navigateToBottom()
 {
     ListItem *item = m_pList->getLastItem();
-    if (item)
-    {
+    if (item) {
         ComposeListViewItem *composeItem = dynamic_cast<ComposeListViewItem*>(item);
         if (!(composeItem && composeItem->isVisible()))
             item = m_pList->getPrevItem(*item);
@@ -239,8 +231,7 @@ void ConvList::deleteItem(ConvListItem *item)
 bool ConvList::deleteItems(const MsgIdList &idList)
 {
     bool res = false;
-    for (const MsgId &id: idList)
-    {
+    for (const MsgId &id: idList) {
         ConvListItem *deleted = getItem(id);
         if (deleted)
         {
@@ -295,8 +286,7 @@ void ConvList::dateLineAddIfNec(ConvListItem *item)
 void ConvList::clear()
 {
     auto items = m_pList->getItems();
-    for (ListItem *item : items)
-    {
+    for (ListItem *item : items) {
         if (item != m_pComposeItem)
             item->destroy();
     }
@@ -308,8 +298,7 @@ void ConvList::deleteSelectedItems()
 {
     auto items = getConvItems();
     MsgIdList messages;
-    for (ConvListItem *item : items)
-    {
+    for (ConvListItem *item : items) {
         if (item->getCheckedState())
             messages.push_back(item->getMsgId());
     }
@@ -326,8 +315,7 @@ int ConvList::getMessageCheckedCount() const
 {
     auto items = getConvItems();
     int count = 0;
-    for (ConvListItem *item : items)
-    {
+    for (ConvListItem *item : items) {
         if (item->getCheckedState())
             count++;
     }
@@ -343,14 +331,11 @@ void ConvList::selectListItems(bool state)
 
 void ConvList::updateSelectAllItem()
 {
-    if (m_Mode == SelectMode && m_pSelectAll)
-    {
+    if (m_Mode == SelectMode && m_pSelectAll) {
         bool check = true;
         auto items = getConvItems();
-        for (ConvListItem *item : items)
-        {
-            if (!item->getCheckedState())
-            {
+        for (ConvListItem *item : items) {
+            if (!item->getCheckedState()) {
                 check = false;
                 break;
             }
@@ -361,8 +346,7 @@ void ConvList::updateSelectAllItem()
 
 ComposeListItem &ConvList::getComposeItem()
 {
-    if (!m_pComposeItem)
-    {
+    if (!m_pComposeItem) {
         m_pComposeItem = new ComposeListItem(m_BubbleEntityFactory, m_FileViewer);
         m_pList->appendItem(*m_pComposeItem);
         m_pComposeItem->show(false);
@@ -401,11 +385,9 @@ void ConvList::onListItemChecked(ListItem &listItem)
 
 void ConvList::onMsgStorageUpdate(const MsgIdList &msgIdList)
 {
-    for (auto &itemId: msgIdList)
-    {
+    for (auto &itemId: msgIdList) {
         ConvListItem *updated = getItem(itemId);
-        if (updated)
-        {
+        if (updated) {
             time_t beforeTime = updated->getRawTime();
             updated->updateStatus();
             if (beforeTime != updated->getRawTime())
@@ -417,17 +399,14 @@ void ConvList::onMsgStorageUpdate(const MsgIdList &msgIdList)
 void ConvList::onMsgStorageInsert(const MsgIdList &msgIdList)
 {
     bool inserted = false;
-    for (MsgId msgId: msgIdList)
-    {
+    for (MsgId msgId: msgIdList) {
         if (getItem(msgId))
             continue;
 
         MessageRef msg = m_MsgEngine.getStorage().getMessage(msgId);
-        if (msg && msg->getThreadId() == m_ThreadId && msg->getMessageStorageType() != Message::MS_Sim)
-        {
+        if (msg && msg->getThreadId() == m_ThreadId && msg->getMessageStorageType() != Message::MS_Sim) {
             MsgConversationItemRef item = m_MsgEngine.getStorage().getConversationItem(msgId);
-            if (item)
-            {
+            if (item) {
                 insertItem(*item);
                 inserted = true;
             }
@@ -468,8 +447,7 @@ void ConvList::onSaveAttachments(ConvListItem &item)
 
 void ConvList::onEditDraftMsg(ConvListItem &item)
 {
-    if (m_pListener)
-    {
+    if (m_pListener) {
         item.disabled(true);
         m_pListener->onEditDraftMsg(item.getMsgId());
     }
@@ -486,8 +464,7 @@ void ConvList::onTimeFormatChanged()
 {
     MSG_LOG("");
     auto items = getConvItems();
-    for (ConvListItem *item : items)
-    {
+    for (ConvListItem *item : items) {
         item->updateTime();
     }
     m_pList->updateRealizedItems();
@@ -500,15 +477,12 @@ void ConvList::onLanguageChanged()
     // Update ConvListItem:
     auto convListItems = getConvItems();
     for (ConvListItem *item : convListItems)
-    {
         item->updateTime();
-    }
 
     // Update DateLineItem:
     m_DateLineItemSet.clear();
     auto DateLineItems = m_pList->getItems<DateLineItem>();
-    for (DateLineItem *item : DateLineItems)
-    {
+    for (DateLineItem *item : DateLineItems) {
         item->update();
         m_DateLineItemSet.insert(item->getDateLine());
     }
index 1cc36105302c9a991bcdcfb0342fcec7376daa21..53d52fcf307348eec88af5817f205fb0e8b52c38 100644 (file)
@@ -77,9 +77,8 @@ ConvListItem::~ConvListItem()
 {
     m_App.getPopupManager().reset(this);
     for (auto *entity : m_BubbleEntityList)
-    {
         delete entity;
-    }
+
     m_BubbleEntityList.clear();
 }
 
@@ -94,8 +93,7 @@ void ConvListItem::updateStatus()
     m_NetworkStatus = msg->getNetworkStatus();
     m_IsRestrictedByDpm = msg->isRestrictedByDpm();
 
-    if (m_NetworkStatus == Message::NS_Send_Fail)
-    {
+    if (m_NetworkStatus == Message::NS_Send_Fail) {
         updateItemType(ConvItemType::Failed);
         updateEntityBgType(BubbleBgViewItem::FailedStyle);
     } else if (m_NetworkStatus == Message::NS_Send_Success || m_NetworkStatus == Message::NS_Sending) {
@@ -128,8 +126,7 @@ bool ConvListItem::isNeededReadReport() const
 ConvListViewItem::ConvItemType ConvListItem::getConvItemType(const MsgConversationItem &item)
 {
     ConvItemType type = ConvItemType::Sent;
-    if (item.getDirection() == Message::Direction::MD_Sent)
-    {
+    if (item.getDirection() == Message::Direction::MD_Sent) {
         if (item.isDraft())
             type = ConvItemType::Draft;
         else if (item.getNetworkStatus() == Message::NS_Send_Fail)
@@ -143,8 +140,7 @@ ConvListViewItem::ConvItemType ConvListItem::getConvItemType(const MsgConversati
 BubbleBgViewItem::BgType ConvListItem::getBubbleBgType(const MsgConversationItem &item)
 {
     BubbleBgViewItem::BgType type = BubbleBgViewItem::SentStyle;
-    if (item.getDirection() == Message::Direction::MD_Sent)
-    {
+    if (item.getDirection() == Message::Direction::MD_Sent) {
         if (item.isDraft())
             type = BubbleBgViewItem::DraftStyle;
         else if (item.getNetworkStatus() == Message::NS_Send_Fail)
@@ -180,8 +176,7 @@ BubbleTextEntity *ConvListItem::createTextEntity(BubbleBgViewItem::BgType bgType
 
 BubbleDownloadButtonEntity *ConvListItem::findDownloadButton() const
 {
-    for (BubbleEntity *entity : m_BubbleEntityList)
-    {
+    for (BubbleEntity *entity : m_BubbleEntityList) {
         if (entity->getType() == BubbleEntity::DownloadButtonItem)
             return static_cast<BubbleDownloadButtonEntity*>(entity);
     }
@@ -203,8 +198,7 @@ void ConvListItem::addEntity(BubbleEntity *entity)
 
 void ConvListItem::updateEntityBgType(BubbleBgViewItem::BgType bgType)
 {
-    for (BubbleEntity *entity : m_BubbleEntityList)
-    {
+    for (BubbleEntity *entity : m_BubbleEntityList) {
         auto *bgEntity = dynamic_cast<BubbleBgEntity*>(entity);
         if (bgEntity)
             bgEntity->setBgType(bgType);
@@ -214,8 +208,7 @@ void ConvListItem::updateEntityBgType(BubbleBgViewItem::BgType bgType)
 void ConvListItem::prepareBubble(const MsgConversationItem &item, const std::string &searchWord)
 {
     BubbleBgViewItem::BgType bgType = getBubbleBgType(item);
-    if (m_IsRestrictedByDpm)
-    {
+    if (m_IsRestrictedByDpm) {
         addEntity(createTextEntity(BubbleBgViewItem::RestrictedStyle, msg("IDS_MSG_BODY_COULDNT_RECEIVE_THIS_MESSAGE_THE_SECURITY_POLICY_PREVENTS_RECEIVING_MESSAGES"), false, ""));
     } else if (!MsgUtils::isMms(m_Type)) {
         addEntity(createTextEntity(bgType, item.getText(), true, searchWord));
@@ -226,8 +219,7 @@ void ConvListItem::prepareBubble(const MsgConversationItem &item, const std::str
         updateDownloadButton();
     } else {
         const MsgConvMediaList &list = item.getMediaList();
-        for (int i = 0; i < list.getLength(); ++i)
-        {
+        for (int i = 0; i < list.getLength(); ++i) {
             const MsgConvMedia &media = list.at(i);
             std::string mime = media.getMime();
             std::transform(mime.begin(), mime.end(), mime.begin(), ::tolower);
@@ -241,13 +233,11 @@ void ConvListItem::prepareBubble(const MsgConversationItem &item, const std::str
 
 void ConvListItem::shareContent()
 {
-    if (MsgUtils::isSms(m_Type))
-    {
+    if (MsgUtils::isSms(m_Type)) {
         m_Share.launch(getAllMsgText());
     } else {
         std::list<std::string> fileList;
-        for (BubbleEntity *entity : m_BubbleEntityList)
-        {
+        for (BubbleEntity *entity : m_BubbleEntityList) {
             const std::string &filePath = entity->getFilePath();
             if (!filePath.empty())
                 fileList.push_back(filePath);
@@ -260,8 +250,7 @@ void ConvListItem::copyMsgToSimCard()
 {
     MsgStorage::StorageResult result = MsgStorage::StorageFail;
     MessageRef msg = m_App.getMsgEngine().getStorage().getMessage(m_MsgId);
-    if (msg)
-    {
+    if (msg) {
         msg->setMessageStorageType(Message::MS_Sim);
         m_App.getMsgEngine().getStorage().saveMessage(*msg, false, &result);
 
@@ -275,11 +264,9 @@ void ConvListItem::copyMsgToSimCard()
 Evas_Object *ConvListItem::getBubbleContent()
 {
     auto *bubble = new BubbleItemContainer(*getOwner());
-    for (BubbleEntity *entity : m_BubbleEntityList)
-    {
+    for (BubbleEntity *entity : m_BubbleEntityList) {
         BubbleViewItem *item = entity->createView(*bubble);
-        if (item)
-        {
+        if (item) {
             bubble->append(*item, entity->getDirection());
             item->setListener(this);
         }
@@ -354,8 +341,7 @@ void ConvListItem::showMainListPopup()
     if (!msgText.empty())
         listPopup.appendItem(msg("IDS_MSG_OPT_COPY_TEXT"), POPUPLIST_ITEM_PRESSED_CB(ConvListItem, onCopyTextItemPressed), this);
 
-    if (!m_IsRestrictedByDpm)
-    {
+    if (!m_IsRestrictedByDpm) {
         listPopup.appendItem(msg("IDS_MSGF_OPT_FORWARD"), POPUPLIST_ITEM_PRESSED_CB(ConvListItem, onForwardItemPressed), this);
         listPopup.appendItem(msg("IDS_COM_BUTTON_SHARE"), POPUPLIST_ITEM_PRESSED_CB(ConvListItem, onShareItemPressed), this);
     }
@@ -363,8 +349,7 @@ void ConvListItem::showMainListPopup()
     if (m_NetworkStatus == Message::NS_Send_Fail)
         listPopup.appendItem(msg("IDS_MSG_OPT_EDIT"), POPUPLIST_ITEM_PRESSED_CB(ConvListItem, onEditItemPressed), this);
 
-    if (m_Type == Message::MT_MMS)
-    {
+    if (m_Type == Message::MT_MMS) {
         MessageMmsRef mms = std::dynamic_pointer_cast<MessageMms>(m_App.getMsgEngine().getStorage().getMessage(m_MsgId));
         if (mms && (!mms->getAttachmentList().isEmpty() || mms->getMediaCount() > 0))
             listPopup.appendItem(msg("IDS_MSG_OPT_SAVE_ATTACHMENTS_ABB"), POPUPLIST_ITEM_PRESSED_CB(ConvListItem, onSaveAttachmentsItemPressed), this);
@@ -381,12 +366,10 @@ void ConvListItem::showMainListPopup()
 
 void ConvListItem::tryToDownloadMms(bool showToast)
 {
-    if (!m_App.getSysSettingsManager().isMessagingRestrictedByDpm())
-    {
+    if (!m_App.getSysSettingsManager().isMessagingRestrictedByDpm()) {
         m_App.getMsgEngine().getTransport().retrieveMessage(m_MsgId);
         auto *button = findDownloadButton();
-        if (button)
-        {
+        if (button) {
             button->disabled(true);
             updateContent();
         }
@@ -436,24 +419,17 @@ void ConvListItem::onAction(BubbleViewItem &item)
 {
     MSG_LOG("");
 
-    switch (item.getEntity().getType())
-    {
+    switch (item.getEntity().getType()) {
         case BubbleEntity::DownloadButtonItem:
-        {
             tryToDownloadMms();
             break;
-        }
         case BubbleEntity::TextItem:
-        {
             break;
-        }
         default:
-        {
             const std::string &filePath = item.getEntity().getFilePath();
             if (!filePath.empty())
                 m_FileViewer.launchWithCopy(filePath);
             break;
-        }
     }
 }
 
index be79a87395c1842664e88fc63fdd1d30c0488db2..43656840621ce5a3446d65273087a9bbf53039d5 100644 (file)
@@ -56,8 +56,7 @@ void MsgDetailsPopup::updateContent()
     content += getContactsInfo(m_App, msgDirection, msgThreadId);
     content += getSentReceivedTime(*message, msgDirection);
 
-    if (msgDirection == Message::MD_Sent && msgType == Message::MT_SMS)
-    {
+    if (msgDirection == Message::MD_Sent && msgType == Message::MT_SMS) {
         content += brTag;
         content += makeDeliveryReportResult(m_App, msgStatus, msgType, msgThreadId, m_MsgId);
         content += getSmsStatus(msgStatus);
@@ -71,8 +70,7 @@ void MsgDetailsPopup::updateContent()
         content += getMmsSubject(*message, ViewDetailsTextStyle);
         content += getMmsMessageSize(*message, ViewDetailsTextStyle);
 
-        if (msgDirection == Message::MD_Sent)
-        {
+        if (msgDirection == Message::MD_Sent) {
             content += brTag;
             content += makeDeliveryReportResult(m_App, msgStatus, msgType, msgThreadId, m_MsgId);
             content += makeReadReportResult(m_App, m_MsgId, msgThreadId, msgStatus);
index 01acb2c4d4aee205e8dbdc57b54ca78207240b2a..bee59ce0b3fb7276d2157a16aa2818aa0caedcc6 100644 (file)
 #include "BubbleIconTextLayoutItem.h"
 #include "Resource.h"
 
-namespace Msg
-{
+namespace Msg {
     class BubbleAudioViewItem
-        : public BubbleIconTextLayoutItem
-    {
+        : public BubbleIconTextLayoutItem {
         public:
             BubbleAudioViewItem(BubbleEntity &entity, Evas_Object *parent, BgType bgType);
             virtual ~BubbleAudioViewItem();
index 81f249852ccbe8e8831e20750f5066b4ea76d10c..1cc14f13e9abf226b25b07a7ae36f42c168477e0 100644 (file)
 
 #include "BubbleViewItem.h"
 
-namespace Msg
-{
+namespace Msg {
     class BubbleBgViewItem
-        : public BubbleViewItem
-    {
+        : public BubbleViewItem {
         public:
-            enum BgType
-            {
+            enum BgType {
                 SentStyle,
                 ReceivedStyle,
                 DraftStyle,
index f1567079587ed253e2fcf41ff9b313a1ef669a2c..6d0281f49a312cfd53b7e8271fff45897aa5226e 100644 (file)
 #include "BubbleIconTextLayoutItem.h"
 #include "Resource.h"
 
-namespace Msg
-{
+namespace Msg {
     class BubbleCalEventViewItem
-        : public BubbleIconTextLayoutItem
-    {
+        : public BubbleIconTextLayoutItem {
         public:
             BubbleCalEventViewItem(BubbleEntity &entity, Evas_Object *parent, BgType bgType, LayoutType layoutType);
             virtual ~BubbleCalEventViewItem();
index 8a0b680397edf133fa631ea5fc51517f914b7fca..76d7a8d593cfbbf30c89b280a930da6ca8672bf6 100644 (file)
 #include "BubbleIconTextLayoutItem.h"
 #include "Resource.h"
 
-namespace Msg
-{
+namespace Msg {
     class BubbleContactViewItem
-        : public BubbleIconTextLayoutItem
-    {
+        : public BubbleIconTextLayoutItem {
         public:
             BubbleContactViewItem(BubbleEntity &entity, Evas_Object *parent, BgType bgType, LayoutType type);
             virtual ~BubbleContactViewItem();
index ec92478dbf372b41737b284afc6512d37fe68a15..d3e9096db95a240e95cdd9d39fd4406363ad020c 100644 (file)
 
 #include "BubbleViewItem.h"
 
-namespace Msg
-{
+namespace Msg {
     class BubbleDownloadButtonViewItem
-        : public BubbleViewItem
-    {
+        : public BubbleViewItem {
         public:
             BubbleDownloadButtonViewItem(BubbleEntity &entity, Evas_Object *parent);
             virtual ~BubbleDownloadButtonViewItem();
index fb3d1a22b1cc547e559fb24af79bc9e62c711c2a..13a66832d55e356af03b02ae571c6db661a0fe4f 100644 (file)
 
 #include "BubbleBgViewItem.h"
 
-namespace Msg
-{
+namespace Msg {
     class BubbleIconTextLayoutItem
-        : public BubbleBgViewItem
-    {
+        : public BubbleBgViewItem {
         public:
-            enum LayoutType
-            {
+            enum LayoutType {
                 Layout1Icon1Text,
                 Layout1Icon2Text
             };
index 49a4306afab821bbec4fc851d69b08fd1798d87d..73ea4f9e404beb551f032ee41e93ec3fd9df18a9 100644 (file)
 
 #include "BubbleViewItem.h"
 
-namespace Msg
-{
+namespace Msg {
     class BubbleImageViewItem
-        : public BubbleViewItem
-    {
+        : public BubbleViewItem {
         public:
             BubbleImageViewItem(BubbleEntity &entity, Evas_Object *parent, const std::string &imagePath);
             virtual ~BubbleImageViewItem();
index 113177b12a1cdcf2b2110b1cf629491fa9b1e42d..825cda575d24359dd4a9ce5b95cfb8eaacc37ec7 100644 (file)
 #include "BubbleViewItem.h"
 #include "Message.h"
 
-namespace Msg
-{
+namespace Msg {
     class BubbleItemContainer
-        : public View
-    {
+        : public View {
         public:
             BubbleItemContainer(Evas_Object *parent);
             virtual ~BubbleItemContainer();
index 7015930c3eaf53bcf7c882345beda2fda45a6c73..f556b01a1a52b38e37b23a1e76fe6312613a7691 100644 (file)
 
 #include "BubbleBgViewItem.h"
 
-namespace Msg
-{
+namespace Msg {
     class BubbleTextViewItem
-        : public BubbleBgViewItem
-    {
+        : public BubbleBgViewItem {
         public:
             BubbleTextViewItem(BubbleEntity &entity, Evas_Object *parent, BgType bgType, const std::string &text);
             virtual ~BubbleTextViewItem();
index 395c411bbd1baac6ceefcf28a08ca0fb50eb3156..77761c97488b4e35163ff3c8bca95a9fe238e178 100644 (file)
 #include "BubbleIconTextLayoutItem.h"
 #include "Resource.h"
 
-namespace Msg
-{
+namespace Msg {
     class BubbleUnknownFileViewItem
-        : public BubbleIconTextLayoutItem
-    {
+        : public BubbleIconTextLayoutItem {
         public:
             BubbleUnknownFileViewItem(BubbleEntity &entity, Evas_Object *parent, BgType bgType);
             virtual ~BubbleUnknownFileViewItem();
index 13c3b67968dde2d29cbac94314f518cb3a2e0296..012245fb4668f567a5151c153b5b64409d2f0606 100644 (file)
 
 #include "BubbleViewItem.h"
 
-namespace Msg
-{
+namespace Msg {
     class BubbleVideoViewItem
-        : public BubbleViewItem
-    {
+        : public BubbleViewItem {
         public:
             BubbleVideoViewItem(BubbleEntity &entity, Evas_Object *parent, const std::string &imagePath);
             virtual ~BubbleVideoViewItem();
index d75b2601ee9d9ce9bfa963458a7517855da24af5..54923b6be0f618593cfb01dc0e3360e35ce2e034 100644 (file)
 #include "View.h"
 #include <string>
 
-namespace Msg
-{
+namespace Msg {
     class IBubbleViewItemListener;
     class BubbleEntity;
 
     class BubbleViewItem
-        : public View
-    {
+        : public View {
         public:
             static const int maxWidth = 408;
 
@@ -52,8 +50,7 @@ namespace Msg
             Evas_Object *m_pDelButton;
     };
 
-    class IBubbleViewItemListener
-    {
+    class IBubbleViewItemListener {
         public:
             virtual ~IBubbleViewItemListener() {};
             virtual void onAction(BubbleViewItem &item) {}; // Tap or Click
index 7849d882cfb72a6cdeaa62ccd12671974f6df0f1..7ccad59c8adbe8b79a15a7f9b875edf573b05210 100644 (file)
 
 #include "ListItem.h"
 
-namespace Msg
-{
+namespace Msg {
     class ComposeListViewItem
-        : public ListItem
-    {
+        : public ListItem {
         public:
             ComposeListViewItem();
             virtual ~ComposeListViewItem();
index 51f86e0e97aa36b61c337d0514f776af785b2305..5b6047e4af4df45b4de995a8e69a1bd20e171c76 100644 (file)
 
 #include "View.h"
 
-namespace Msg
-{
+namespace Msg {
     class ConvListLayout
-        : public View
-    {
+        : public View {
         public:
             ConvListLayout(Evas_Object *parent);
             virtual ~ConvListLayout();
index b612b2265f761d91926372c7b1fb9c63aa08a36f..aee2ea3ab51d96b53c9af4925f09ee6d009dfb1a 100644 (file)
 
 #include "ListItem.h"
 
-namespace Msg
-{
+namespace Msg {
     class ConvListViewItem
-        : public ListItem
-    {
+        : public ListItem {
         public:
-            enum ConvItemType
-            {
+            enum ConvItemType {
                 InitType,
                 Sent,
                 Received,
index 06ba62ec48ba5601ff782b32034c2410be12f83d..2cf2fac06a27a36b5d9b5b9d4b5f28dae4d5ef7c 100644 (file)
 #include "View.h"
 #include "LangUtils.h"
 
-namespace Msg
-{
+namespace Msg {
     class ConvSelectAll
-        : public View
-    {
+        : public View {
         public:
             ConvSelectAll(Evas_Object *parent);
             virtual ~ConvSelectAll();
index 945f37b9838e86067a32674b944ea306d19e22ac..e68d27c4906faea12f258b059fbfe9f1da2dfae7 100644 (file)
 
 #include "ListItem.h"
 
-namespace Msg
-{
+namespace Msg {
     class DateLineViewItem
-        : public ListItem
-    {
+        : public ListItem {
         public:
             DateLineViewItem(const std::string &dateLine);
             virtual ~DateLineViewItem();
index e0e139697271f3f4637c171c4d760aa8fc8e4b74..c35ac17028daadbe9d4986469b635fd683793981 100644 (file)
@@ -30,8 +30,7 @@ BubbleBgViewItem::BubbleBgViewItem(BubbleEntity &entity, Evas_Object *parent, Bg
     , m_BgType(bgType)
 {
     const char *group = nullptr;
-    switch (bgType)
-    {
+    switch (bgType) {
         case SentStyle:
             group = "conv/list/bubble_sent_bg";
             break;
index e6596cb51f02677e7f9435a32972a598c2eb898d..ca1631074c2fda6876418e7adba2e9d74e5acf89 100644 (file)
@@ -29,8 +29,7 @@ BubbleIconTextLayoutItem::BubbleIconTextLayoutItem(BubbleEntity &entity, Evas_Ob
     , m_pIconTextLayout(nullptr)
 {
     const char *group = nullptr;
-    switch (layoutType)
-    {
+    switch (layoutType) {
         case Layout1Icon1Text:
             group = "conv/list/1icon_1text";
             break;
index 4caed2ce8d525ddbbe1340617d6c350635324f8c..78f6c38a86d56b21f6173d36d1b433ddd2793bcd 100644 (file)
@@ -43,8 +43,7 @@ Evas_Object *BubbleImageViewItem::createImage(Evas_Object *parent, const std::st
     elm_image_aspect_fixed_set(image, true);
     elm_image_file_set(image, path.c_str(), nullptr);
     elm_image_object_size_get(image, &imageWidth, &imageHeight);
-    if (imageWidth > maxWidth)
-    {
+    if (imageWidth > maxWidth) {
         double scale = maxWidth/(double)imageWidth;
         imageWidth *= scale;
         imageHeight *= scale;
index 2e071f51f91cb30b455ace8df2c1851c8ca14839..0de4c01163de6ac1af6645f32a7606a0d144b859 100644 (file)
@@ -21,8 +21,7 @@
 
 using namespace Msg;
 
-namespace
-{
+namespace {
     const int verticalBoxPads = 10;
     const int horizontalBoxPads = 0;
 }
index 5db82a049a8d9d3ac9b110aacf087dbc4e20edc9..fd3faefbf6136eac3339e93258cfbc8742f68b71 100644 (file)
@@ -42,8 +42,7 @@ Evas_Object *BubbleVideoViewItem::createIamge(Evas_Object *parent, const std::st
     int imageWidth = 0;
     int imageHeight = 0;
     elm_image_object_size_get(image, &imageWidth, &imageHeight);
-    if (imageWidth > maxWidth)
-    {
+    if (imageWidth > maxWidth) {
         double scale = maxWidth/(double)imageWidth;
         imageWidth *= scale;
         imageHeight *= scale;
index 9f259094eb385d72a272c3367cd563e2e10de046..c68bb479c39dcb912242b2bb62eb46aa921f0032 100644 (file)
@@ -66,8 +66,7 @@ void BubbleViewItem::attachGestureTapLayer(Evas_Object *parent, Evas_Object *obj
 
 void BubbleViewItem::showDelButton(bool show)
 {
-    if (show && !m_pDelButton)
-    {
+    if (show && !m_pDelButton) {
         m_pDelButton = elm_button_add(getEo());
         elm_object_style_set(m_pDelButton, "transparent");
         evas_object_smart_callback_add(m_pDelButton, "clicked", SMART_CALLBACK(BubbleViewItem, onDelButtonClicked), this);
@@ -97,8 +96,7 @@ void BubbleViewItem::showDelButton(bool show)
         elm_object_content_set(m_pDelButton, icon);
 
         setContent(m_pDelButton, delButtonPart);
-        if (!getContent(delButtonPart))
-        {
+        if (!getContent(delButtonPart)) {
             MSG_LOG_ERROR("Layout has not 'del_button' part");
             evas_object_del(m_pDelButton);
             m_pDelButton = nullptr;
index 4e11c8bc937429447dda58f6ee77e12ae4918dd0..bc3837415330b84a91a9e5295d613280ac156980 100644 (file)
@@ -21,8 +21,7 @@
 
 using namespace Msg;
 
-namespace
-{
+namespace {
     ListItemStyleRef sentStyle = ListItemStyle::create("sentbubble");
     const char *bubbleContentPart = "bubble.content";
 }
index a79634f0484467ea05d11b3fcccd24db49633ab0..3709b966cf05cb8cd87e304af5e80e2bffc536c4 100644 (file)
@@ -18,8 +18,7 @@
 
 using namespace Msg;
 
-namespace
-{
+namespace {
     const char *layoutStyle = "conv_list_base";
 }
 
index c732c1f815691f7ff4a45f6512819f8abcca5316..b94a19cd5de2c910c06fc5a1cd886c53ef6be998 100644 (file)
@@ -21,8 +21,7 @@
 
 using namespace Msg;
 
-namespace
-{
+namespace {
     ListItemStyleRef sentStyle = ListItemStyle::create("sentbubble");
     ListItemStyleRef receivedStyle = ListItemStyle::create("receivebubble");
     ListItemStyleRef draftStyle = ListItemStyle::create("draft");
@@ -63,17 +62,16 @@ std::string ConvListViewItem::getText(ListItem &item, const char *part)
 Evas_Object *ConvListViewItem::getContent(ListItem &item, const char *part)
 {
     if (!strcmp(part, bubbleContentPart))
-    {
         return getBubbleContent();
-    } else if (!strcmp(part, thumbContentPart)) {
+    else if (!strcmp(part, thumbContentPart))
         return getThumbnail();
-    } else if (!strcmp(part, draftButtonPart)) {
+    else if (!strcmp(part, draftButtonPart))
         return createButton(!getOwner()->getCheckMode(), Draft);
-    } else if (!strcmp(part, failedButtonPart)) {
+    else if (!strcmp(part, failedButtonPart))
         return createButton(!getOwner()->getCheckMode(), Failed);
-    } else if (!strcmp(part, infoStatus)){
+    else if (!strcmp(part, infoStatus))
         return getProgress();
-    }
+
     return nullptr;
 }
 
@@ -108,8 +106,7 @@ Evas_Object *ConvListViewItem::createButton(bool isEnabled, ConvItemType type)
     elm_object_style_set(button, "transparent");
     Evas_Object *icon =  nullptr;
 
-    if (type == Draft)
-    {
+    if (type == Draft) {
         icon = View::addLayout(button, ICONS_EDJ_PATH, "draft_icon");
         evas_object_smart_callback_add(button, "clicked", SMART_CALLBACK(ConvListViewItem, onEditButtonClicked), this);
     } else if (type == Failed) {
@@ -169,8 +166,7 @@ void ConvListViewItem::updateItemType(ConvItemType type)
         return;
 
     m_Type = type;
-    switch (type)
-    {
+    switch (type) {
         case Sent:
             setStyle(sentStyle);
             break;
@@ -191,7 +187,5 @@ void ConvListViewItem::updateItemType(ConvItemType type)
 void ConvListViewItem::resetCheckMode(ListView &listView)
 {
     for (ListItem *item: listView.getRealizedItems())
-    {
         item->emitSignal("elm,state,default", "elm");
-    }
 }
index de64ad40d6442a49c4d6adcd623b72587e6088d6..4f4afbeec62d7eb6cd4e1782325931d8668397c7 100644 (file)
@@ -20,8 +20,7 @@
 
 using namespace Msg;
 
-namespace
-{
+namespace {
     const char *groupName = "elm/layout/select_all_layout";
     const char *textPart = "elm.select_all_text";
     const char *iconPart = "elm.swallow.select_icon";
index a79ff1dc6234565ae83563bcbd7108efbe9fcaa5..a4058c335c36e7cbc9a3824462c9ce348506df2b 100644 (file)
@@ -19,8 +19,7 @@
 
 using namespace Msg;
 
-namespace
-{
+namespace {
     ListItemStyleRef dateLineStyle = ListItemStyle::create("dateline");
     const char *datePart = "text.date";
 }
index a911c658ba3b56f2a2046158d8a90b5b5d81e6db..223ecf3bee2e583514aca212f287db895eec3de3 100644 (file)
@@ -41,8 +41,7 @@
 
 #include <functional>
 
-namespace Msg
-{
+namespace Msg {
     class NaviFrameController;
     class Scroller;
     class ConversationInputPanel;
@@ -58,8 +57,7 @@ namespace Msg
         , private IConvListListener
         , private IAttachPanelListener
         , private IContactManagerListener
-        , private ISystemSettingsManager
-    {
+        , private ISystemSettingsManager {
         public:
             Conversation(NaviFrameController &parent);
             virtual ~Conversation();
@@ -73,15 +71,13 @@ namespace Msg
             void forwardMsg(MsgId id);
 
         private:
-            enum Mode
-            {
+            enum Mode {
                 InitMode,
                 NewMessageMode,
                 ConversationMode
             };
 
-            struct DefferedCmd
-            {
+            struct DefferedCmd {
                 AppControlComposeRef composeCmd;
                 AppControlDefaultRef defaultCmd;
             };
@@ -235,8 +231,7 @@ namespace Msg
             std::function<void()> m_TransFinishedFunc;
     };
 
-    class IConversationListener
-    {
+    class IConversationListener {
         public:
             virtual ~IConversationListener() {};
             virtual void onConversationSentMessage() {};
index 88f90798e1a2b9310d15482874b20b716c619c39..edc93bf86095e9065b3039ba6ba479bc624bff1f 100644 (file)
 #include "PopupListItem.h"
 #include "ContactAddress.h"
 
-namespace Msg
-{
+namespace Msg {
     class PopupAddressListItem
-        : public PopupTextListItem
-    {
+        : public PopupTextListItem {
     public:
         PopupAddressListItem(PopupList &parent,
                             const std::string &text,
@@ -40,8 +38,7 @@ namespace Msg
     };
 
     class PopupPersonIdListItem
-        : public PopupTextListItem
-    {
+        : public PopupTextListItem {
     public:
         PopupPersonIdListItem(PopupList &parent,
                               const std::string &text,
index f345dd8cafca479df355fe3c6b6b44f2d9321fc4..8d35f01258cfa8734f1ce1ebc3ef5a3828eb79be 100644 (file)
@@ -34,8 +34,7 @@
 
 using namespace Msg;
 
-namespace
-{
+namespace {
     std::string makeDispAddress(std::string address, std::string dispName)
     {
         if (dispName.empty())
@@ -79,14 +78,12 @@ Conversation::~Conversation()
         m_pRecipPanel->setListener(nullptr);
     if (m_pContactsList)
         m_pContactsList->setListener(nullptr);
-    if (m_pConvList)
-    {
+    if (m_pConvList) {
         m_pConvList->setListener(nullptr);
         m_pConvList->setBodyFocusCb(nullptr);
     }
     m_AttachPanel.setListener(nullptr);
-    if (m_NnotifyConvertMsgTypeIdler)
-    {
+    if (m_NnotifyConvertMsgTypeIdler) {
         ecore_idler_del(m_NnotifyConvertMsgTypeIdler);
         m_NnotifyConvertMsgTypeIdler = nullptr;
     }
@@ -97,8 +94,7 @@ void Conversation::execCmd(const AppControlComposeRef &cmd)
 {
     getApp().getPopupManager().reset();
     setDeleteMode(false);
-    if (!isRecipExists() && !isBodyEmpty() && m_Mode == NewMessageMode) // Check if we can save draft to avoid losing data
-    {
+    if (!isRecipExists() && !isBodyEmpty() && m_Mode == NewMessageMode) { // Check if we can save draft to avoid losing data
         m_DefferedCmd.composeCmd = cmd;
         showNoRecipPopup();
         return;
@@ -111,8 +107,7 @@ void Conversation::execCmd(const AppControlComposeRef &cmd)
     if (m_pRecipPanel)
         m_pRecipPanel->execCmd(cmd);
 
-    if (m_pBody)
-    {
+    if (m_pBody) {
         m_pBody->enableAutoFocusForAttachments(isRecipExists());
         m_pBody->execCmd(cmd);
     }
@@ -127,8 +122,7 @@ void Conversation::execCmd(const AppControlDefaultRef &cmd)
 {
     getApp().getPopupManager().reset();
     setDeleteMode(false);
-    if (!isRecipExists() && !isBodyEmpty() && m_Mode == NewMessageMode) // Check if we can save draft to avoid losing data
-    {
+    if (!isRecipExists() && !isBodyEmpty() && m_Mode == NewMessageMode) { // Check if we can save draft to avoid losing data
         m_DefferedCmd.defaultCmd = cmd;
         showNoRecipPopup();
         return;
@@ -138,14 +132,12 @@ void Conversation::execCmd(const AppControlDefaultRef &cmd)
             m_pBody->clear();
     }
 
-    if (cmd->getDefaultType() == AppControlDefault::SendFailedType)
-    {
+    if (cmd->getDefaultType() == AppControlDefault::SendFailedType) {
         pop();
         return;
     }
 
-    if (cmd->getDefaultType() == AppControlDefault::NotificationType && getMsgEngine().getStorage().getUnreadThreadCount() > 1)
-    {
+    if (cmd->getDefaultType() == AppControlDefault::NotificationType && getMsgEngine().getStorage().getUnreadThreadCount() > 1) {
         pop();
         return;
     }
@@ -156,8 +148,7 @@ void Conversation::execCmd(const AppControlDefaultRef &cmd)
         navigateTo(msgId);
     else
         navigateToBottom();
-    if (cmd->getDefaultType() == AppControlDefault::ReplyType)
-    {
+    if (cmd->getDefaultType() == AppControlDefault::ReplyType) {
         m_pBody->execCmd(cmd);
         m_pBody->setFocus(true);
     }
@@ -186,10 +177,8 @@ void Conversation::recipientClickHandler(const std::string &address)
     MSG_ASSERT(m_Mode != InitMode, "m_Mode is in initial state");
 
     ContactAddressRef contactAddress = getApp().getContactManager().getContactAddress(address);
-    if (contactAddress)
-    {
-        if (m_Mode == NewMessageMode)
-        {
+    if (contactAddress) {
+        if (m_Mode == NewMessageMode) {
             MbeRecipientItem *pItem = m_pRecipPanel->getSelectedItem();
             if (pItem)
                 showSavedRecipientPopup(pItem->getDispName(), contactAddress->getOwnerId(), contactAddress->getOwnerType());
@@ -218,16 +207,14 @@ void Conversation::showUnsavedRecipientPopup(const std::string &address)
 {
     PopupList &popup = createPopupList(address);
     popup.addEventCb(EVAS_CALLBACK_DEL, EVAS_EVENT_CALLBACK(Conversation, onRecipPopupDel), this);
-    if (m_Mode == NewMessageMode)
-    {
+    if (m_Mode == NewMessageMode) {
         popup.appendItem(*new PopupAddressListItem(popup, msg("IDS_MSGF_OPT_REMOVE"), address,
                 POPUPLIST_ITEM_PRESSED_CB(Conversation, onRecipRemoveItemPressed), this));
 
         popup.appendItem(*new PopupAddressListItem(popup, msg("IDS_MSG_OPT_EDIT"), address,
                 POPUPLIST_ITEM_PRESSED_CB(Conversation, onEditItemPressed), this));
     } else if (m_Mode == ConversationMode) {
-        if (MsgUtils::isValidNumber(address))
-        {
+        if (MsgUtils::isValidNumber(address)) {
             popup.appendItem(*new PopupAddressListItem(popup, msg("IDS_MSG_OPT_MAKE_VOICE_CALL"), address,
                     POPUPLIST_ITEM_PRESSED_CB(Conversation, onMakeVoiceItemPressed), this));
         }
@@ -296,8 +283,7 @@ void Conversation::resetMsgThread(bool updateConvList, bool updateRecipPanel)
 {
     m_IsMms = false;
     m_DispIsMms = false;
-    if (m_NnotifyConvertMsgTypeIdler)
-    {
+    if (m_NnotifyConvertMsgTypeIdler) {
         ecore_idler_del(m_NnotifyConvertMsgTypeIdler);
         m_NnotifyConvertMsgTypeIdler = nullptr;
     }
@@ -306,8 +292,7 @@ void Conversation::resetMsgThread(bool updateConvList, bool updateRecipPanel)
 
 bool Conversation::isHiddenAddress() const
 {
-    if (m_AddressList && !m_AddressList->isEmpty())
-    {
+    if (m_AddressList && !m_AddressList->isEmpty()) {
         std::string addr = m_AddressList->at(0).getAddress();
         return !MsgUtils::isValidAddress(addr);
     }
@@ -322,8 +307,7 @@ void Conversation::setListener(IConversationListener *listener)
 void Conversation::forwardMsg(MsgId id)
 {
     MessageRef msg = getMsgEngine().getStorage().getMessage(id);
-    if (msg)
-    {
+    if (msg) {
         resetMsgThread();
         if (m_pBody)
             m_pBody->write(*msg);
@@ -341,8 +325,7 @@ void Conversation::setMode(Mode mode)
     if (m_Mode == mode)
         return;
 
-    switch (mode)
-    {
+    switch (mode) {
         case NewMessageMode:
             setNewMessageMode();
             break;
@@ -382,8 +365,7 @@ void Conversation::setConversationMode()
     m_Mode = ConversationMode;
     m_pLayout->showRecipEditMode(false);
     MsgAddressListRef addressList = getAddressList();
-    if (addressList && addressList->getLength() > 1)
-    {
+    if (addressList && addressList->getLength() > 1) {
         showRecipPanel(true);
         m_pRecipPanel->showEntry(false);
         m_pRecipPanel->update(addressList);
@@ -402,8 +384,7 @@ void Conversation::setDeleteMode(bool value)
     updateNavibar();
     showMsgInputPanelIfNeeded(!value);
 
-    if (value)
-    {
+    if (value) {
         if (m_AttachPanel.isFullExpanded())
             m_AttachPanel.show(false);
         m_pConvList->setMode(ConvList::SelectMode);
@@ -422,10 +403,8 @@ void Conversation::createMainLayout()
 
 void Conversation::showConvList(bool show)
 {
-    if (show)
-    {
-        if (!m_pConvList)
-        {
+    if (show) {
+        if (!m_pConvList) {
             m_pConvList = new ConvList(*m_pLayout, getApp(), m_WorkingDir);
             m_pConvList->setBodyFocusCb(std::bind(&Conversation::getSipVisibility, this));
             m_pConvList->setListener(this);
@@ -444,10 +423,8 @@ void Conversation::showConvList(bool show)
 
 void Conversation::showRecipPanel(bool show)
 {
-    if (show)
-    {
-        if (!m_pRecipPanel)
-        {
+    if (show) {
+        if (!m_pRecipPanel) {
             m_pRecipPanel = new ConvRecipientsPanel(*m_pLayout, getApp());
             m_pRecipPanel->setListener(this);
             m_pRecipPanel->show();
@@ -465,17 +442,14 @@ void Conversation::showRecipPanel(bool show)
 
 void Conversation::showContactList(bool show)
 {
-    if (show)
-    {
-        if (!m_pContactsList)
-        {
+    if (show) {
+        if (!m_pContactsList) {
             m_pContactsList = new ConvContactList(*m_pLayout, getApp());
             m_pContactsList->setListener(this);
             m_pLayout->setContactList(*m_pContactsList);
         }
     } else {
-        if (m_pContactsList)
-        {
+        if (m_pContactsList) {
             m_pContactsList->destroy();
             m_pContactsList = nullptr;
             m_pLayout->showContactList(false);
@@ -485,14 +459,12 @@ void Conversation::showContactList(bool show)
 
 void Conversation::createMsgInputPanel()
 {
-    if (!m_pMsgInputPanel)
-    {
+    if (!m_pMsgInputPanel) {
         m_pMsgInputPanel = new MessageInputPanel(*m_pConvList);
         m_pMsgInputPanel->setListener(this);
         m_pLayout->setMsgInputPanel(*m_pMsgInputPanel);
     }
-    if (!m_pBody && m_pConvList)
-    {
+    if (!m_pBody && m_pConvList) {
         m_pBody = new Body(*m_pMsgInputPanel, getApp(), m_WorkingDir, *m_pConvList);
         m_pBody->setListener(this);
         m_pMsgInputPanel->setEntry(*m_pBody);
@@ -502,14 +474,12 @@ void Conversation::createMsgInputPanel()
 
 void Conversation::destroyMsgInputPanel()
 {
-    if (m_pBody)
-    {
+    if (m_pBody) {
         m_pBody->setListener(this);
         m_pBody->destroy();
         m_pBody = nullptr;
     }
-    if (m_pMsgInputPanel)
-    {
+    if (m_pMsgInputPanel) {
         m_pMsgInputPanel->setListener(this);
         m_pMsgInputPanel->destroy();
         m_pMsgInputPanel = nullptr;
@@ -538,8 +508,7 @@ void Conversation::write(const Message &msg)
 
 bool Conversation::read(Message &msg)
 {
-    if (readMsgAddress(msg))
-    {
+    if (readMsgAddress(msg)) {
         if (m_pBody)
             m_pBody->read(msg);
         return true;
@@ -550,17 +519,14 @@ bool Conversation::read(Message &msg)
 bool Conversation::readMsgAddress(Message &msg)
 {
     bool res = false;
-    if (m_ThreadId.isValid())
-    {
+    if (m_ThreadId.isValid()) {
         MsgAddressListRef addressList = getAddressList();
-        if (addressList)
-        {
+        if (addressList) {
             res = !addressList->isEmpty();
             msg.addAddresses(*addressList);
         }
     } else {
-        if (m_pRecipPanel)
-        {
+        if (m_pRecipPanel) {
             m_pRecipPanel->read(msg);
             res = !m_pRecipPanel->isMbeEmpty();
         }
@@ -574,8 +540,7 @@ void Conversation::handleSendResult(const Message &msg, MsgTransport::SendResult
         return;
 
     const char *strId = nullptr;
-    switch (result)
-    {
+    switch (result) {
         case MsgTransport::SendNoSIM:
             strId = "IDS_MSG_BODY_UNABLE_TO_SEND_THIS_MESSAGE_INSERT_YOUR_SIM_CARD_AND_TRY_AGAIN";
             break;
@@ -595,20 +560,17 @@ void Conversation::handleSendResult(const Message &msg, MsgTransport::SendResult
 
 bool Conversation::checkBeforeSend(const Message &msg)
 {
-    if (!getApp().getSysSettingsManager().isSimInserted())
-    {
+    if (!getApp().getSysSettingsManager().isSimInserted()) {
         handleSendResult(msg, MsgTransport::SendNoSIM); // Show no SIM card
         return false;
     }
 
-    if (getApp().getSysSettingsManager().isMessagingRestrictedByDpm())
-    {
+    if (getApp().getSysSettingsManager().isMessagingRestrictedByDpm()) {
         showSendDpmNotif(msg.getAddressList());
         return false;
     }
 
-    if (msg.isMms() && !getApp().getSysSettingsManager().isMobileDataEnabled())
-    {
+    if (msg.isMms() && !getApp().getSysSettingsManager().isMobileDataEnabled()) {
         showMobileDataPopup();
         return false;
     }
@@ -619,11 +581,9 @@ bool Conversation::checkBeforeSend(const Message &msg)
 std::vector<MsgId> Conversation::getMsgIdListForReadReport() const
 {
     std::vector<MsgId> msgIds;
-    if (m_pConvList)
-    {
+    if (m_pConvList) {
         auto items = m_pConvList->getConvItems();
-        for (ConvListItem *item : items)
-        {
+        for (ConvListItem *item : items) {
             if (item->isNeededReadReport())
                 msgIds.push_back(item->getMsgId());
         }
@@ -635,11 +595,9 @@ std::vector<MsgId> Conversation::getMsgIdListForReadReport() const
 bool Conversation::sendReadReportIfNeeded()
 {
     if (getMsgEngine().getSettings().getMmsReadReport() &&
-      !getApp().getSysSettingsManager().isMessagingRestrictedByDpm())
-    {
+      !getApp().getSysSettingsManager().isMessagingRestrictedByDpm()) {
         auto msgIds = getMsgIdListForReadReport();
-        if (!msgIds.empty())
-        {
+        if (!msgIds.empty()) {
             showSendReadReportPopup();
             return true;
         }
@@ -652,16 +610,13 @@ void Conversation::sendReadReport(MsgReport::ReadStatus status)
 {
     auto ids = getMsgIdListForReadReport();
     for (MsgId id : ids)
-    {
         getMsgEngine().getTransport().sendReadReport(id, status);
-    }
 }
 
 void Conversation::sendMessage(MsgId msgId)
 {
     MessageRef msg = getMsgEngine().getStorage().getMessage(msgId);
-    if (msg && checkBeforeSend(*msg))
-    {
+    if (msg && checkBeforeSend(*msg)) {
         auto sentRes = getMsgEngine().getTransport().sendMessage(msg);
         handleSendResult(*msg, sentRes);
     }
@@ -688,8 +643,7 @@ void Conversation::sendMessage()
     MSG_LOG("Send result = ", sendRes);
     MSG_LOG("New threadId = ", m_ThreadId);
 
-    if (sendRes == MsgTransport::SendSuccess && m_ThreadId.isValid())
-    {
+    if (sendRes == MsgTransport::SendSuccess && m_ThreadId.isValid()) {
         m_DispIsMms = false; // Skip "Convert to SMS" after sent message with MMS body.
         setThreadId(m_ThreadId);
         m_pMsgInputPanel->disabledButton(MessageInputPanel::SendButtonId, true);
@@ -705,11 +659,9 @@ void Conversation::sendMessage()
 MsgId Conversation::saveDraftMsg()
 {
     MsgId msgId;
-    if (!isBodyEmpty())
-    {
+    if (!isBodyEmpty()) {
         MessageRef msg = getMsgEngine().getComposer().createMessage(m_IsMms ? Message::MT_MMS : Message::MT_SMS);
-        if (msg)
-        {
+        if (msg) {
             read(*msg);
             msg->setMessageStorageType(Message::MS_Phone);
             msgId = getMsgEngine().getStorage().saveMessage(*msg, false);
@@ -725,16 +677,14 @@ void Conversation::editDraftMsg(MsgId id)
         return;
 
     MessageRef msg = getMsgEngine().getStorage().getMessage(id);
-    if (msg)
-    {
+    if (msg) {
         MsgId draftMsgId = saveDraftMsg();
         m_pBody->clear();
         if (m_pConvList->getMessageCount() <= 1 && !draftMsgId.isValid())
             setThreadId(ThreadId());
 
         write(*msg);
-        if (getMsgEngine().getStorage().deleteMessage(id))
-        {
+        if (getMsgEngine().getStorage().deleteMessage(id)) {
             // Fast remove item in order to avoid blink:
             m_pConvList->deleteItems({id});
         }
@@ -752,15 +702,13 @@ void Conversation::createNewMsgThread()
 
 void Conversation::notifyConvertMsgType()
 {
-    if (!m_NnotifyConvertMsgTypeIdler)
-    {
+    if (!m_NnotifyConvertMsgTypeIdler) {
         m_NnotifyConvertMsgTypeIdler = ecore_idler_add(
             [](void *data)->Eina_Bool
             {
                 auto *self =(Conversation*)data;
                 self->m_NnotifyConvertMsgTypeIdler = nullptr;
-                if (self->m_DispIsMms != self->m_IsMms)
-                {
+                if (self->m_DispIsMms != self->m_IsMms) {
                     self->m_DispIsMms = self->m_IsMms;
                     std::string notifText = self->m_IsMms ?
                             msg("IDS_MSGF_POP_CONVERTING_TO_MULTIMEDIA_MESSAGE_ING") :
@@ -789,8 +737,7 @@ void Conversation::checkAndSetMsgType(bool force)
     if (!isMms && m_pRecipPanel && !m_pRecipPanel->isMbeEmpty())
         isMms = m_pRecipPanel->isMms();
 
-    if (force || isMms != m_IsMms)
-    {
+    if (force || isMms != m_IsMms) {
         m_IsMms = isMms;
         convertMsgTypeHandler();
     }
@@ -826,8 +773,7 @@ void Conversation::navigateToSlideShow(MsgId id)
 
 void Conversation::setBodyFocus()
 {
-    if (getOwner().getTransitionStatus())
-    {
+    if (getOwner().getTransitionStatus()) {
         m_TransFinishedFunc = [this]()
         {
             if (m_pBody)
@@ -849,8 +795,7 @@ bool Conversation::getSipVisibility() const
 
 void Conversation::setRecipEntryFocus()
 {
-    if (getOwner().getTransitionStatus())
-    {
+    if (getOwner().getTransitionStatus()) {
         m_TransFinishedFunc = [this]()
         {
             if (m_pRecipPanel)
@@ -874,12 +819,10 @@ void Conversation::showSendDpmNotif(const MsgAddressList &addressList)
     int len = addressList.getLength();
     std::string addresses;
 
-    for (int i = 0; i < len; ++i)
-    {
+    for (int i = 0; i < len; ++i) {
         std::string address = addressList[i].getAddress();
         std::string dispName;
-        if (!address.empty())
-        {
+        if (!address.empty()) {
             ContactAddressRef rec = getApp().getContactManager().getContactAddress(address);
             if (rec)
                 dispName = rec->getDispName();
@@ -889,8 +832,7 @@ void Conversation::showSendDpmNotif(const MsgAddressList &addressList)
         }
     }
 
-    if (len <= 1)
-    {
+    if (len <= 1) {
         std::string text = msgArgs("IDS_MSG_POP_THE_SECURITY_POLICY_PREVENTS_SENDING_MESSAGES_TO_PS", addresses.c_str());
         notification_status_message_post(text.c_str());
     } else {
@@ -941,13 +883,11 @@ void Conversation::showMainPopup()
 {
     PopupList &popup = getApp().getPopupManager().getMorePopup();
     popup.appendItem(msg("IDS_MSG_OPT_DELETE"), POPUPLIST_ITEM_PRESSED_CB(Conversation, onDeleteItemPressed), this);
-    if (m_AddressList && m_AddressList->getLength() == 1)
-    {
+    if (m_AddressList && m_AddressList->getLength() == 1) {
         const std::string adress = m_AddressList->at(0).getAddress();
         ContactAddressRef contactAddress = getApp().getContactManager().getContactAddress(adress);
 
-        if (contactAddress)
-        {
+        if (contactAddress) {
             popup.appendItem(*new PopupPersonIdListItem(popup, msg("IDS_MSG_OPT_VIEW_CONTACT_DETAILS_ABB"), contactAddress->getOwnerId(),
                     contactAddress->getOwnerType(), POPUPLIST_ITEM_PRESSED_CB(Conversation, onViewContactDetailsItemPressed), this));
         } else if (!isHiddenAddress()) {
@@ -966,14 +906,11 @@ void Conversation::showMainPopup()
 
 void Conversation::onKeyDown(ConvRecipientsPanel &panel, Evas_Event_Key_Down &ev)
 {
-    if (ev.keyname)
-    {
-        if ((strcmp(ev.keyname, "Return") == 0))
-        {
+    if (ev.keyname) {
+        if ((strcmp(ev.keyname, "Return") == 0)) {
             m_pBody->setFocus(true);
         } else {
-            if (m_pContactsList)
-            {
+            if (m_pContactsList) {
                 m_pContactsList->setSearchWorld(m_pRecipPanel->getEntryText());
                 m_pContactsList->requestSearch();
             }
@@ -1001,12 +938,10 @@ void Conversation::onMbeChanged(ConvRecipientsPanel &panel)
     if (m_pBody)
         m_pBody->setMmsRecipFlag(m_pRecipPanel->isMms());
     checkAndSetMsgType();
-    if (m_pConvList)
-    {
+    if (m_pConvList) {
         std::list<std::string> recips;
         auto items = panel.getMbeRecipients().getItems();
-        for (MbeRecipientItem *item : items)
-        {
+        for (MbeRecipientItem *item : items) {
             recips.push_back(item->getAddress());
         }
         ThreadId id;
@@ -1036,8 +971,7 @@ void Conversation::updateMsgInputPanel()
     if (!m_pBody || !m_pMsgInputPanel)
         return;
 
-    if (m_pBody->isMms())
-    {
+    if (m_pBody->isMms()) {
         // Mms:
         m_pMsgInputPanel->setCounter(MsgUtils::makeKbStr(m_pBody->getMsgSize()));
     } else {
@@ -1058,13 +992,11 @@ void Conversation::updateNavibar()
     naviBar.clear();
     naviBar.setColor(NaviBar::NaviWhiteColorId);
 
-    if (m_Mode == NewMessageMode)
-    {
+    if (m_Mode == NewMessageMode) {
         naviBar.setTitle(msgt("IDS_MSG_HEADER_COMPOSE_MESSAGE_ABB"));
         naviBar.showButton(NaviPrevButtonId, true);
     } else if (m_Mode == ConversationMode) {
-        if (m_DeleteMode)
-        {
+        if (m_DeleteMode) {
             updateSelectMsgTitle();
             naviBar.showButton(NaviCancelButtonId, true);
             naviBar.showButton(NaviOkButtonId, true);
@@ -1076,8 +1008,7 @@ void Conversation::updateNavibar()
         } else {
             naviBar.showButton(NaviPrevButtonId, true);
             MsgAddressListRef addressList = getAddressList();
-            if (addressList)
-            {
+            if (addressList) {
                 naviBar.showButton(NaviCenterButtonId, true);
                 FrameController::setNaviBarTitle(*addressList);
             }
@@ -1087,8 +1018,7 @@ void Conversation::updateNavibar()
 
 void Conversation::updateSelectMsgTitle()
 {
-    if (m_pConvList && m_DeleteMode)
-    {
+    if (m_pConvList && m_DeleteMode) {
         int checked = m_pConvList->getMessageCheckedCount();
         if (checked > 0)
             getNaviBar().setTitle(msgArgs("IDS_MSG_HEADER_PD_SELECTED_ABB3", checked));
@@ -1101,8 +1031,7 @@ void Conversation::onButtonClicked(MessageInputPanel &obj, MessageInputPanel::Bu
 {
     MSG_LOG("MessageInputPanel: button clicked: id = ", id);
 
-    switch (id)
-    {
+    switch (id) {
         case MessageInputPanel::AddButtonId:
             m_AttachPanel.show(true);
             break;
@@ -1139,8 +1068,7 @@ void Conversation::onAttached(ViewItem &item)
 void Conversation::onTransitionFinished(NaviFrameItem &item)
 {
     MSG_LOG("");
-    if (m_TransFinishedFunc)
-    {
+    if (m_TransFinishedFunc) {
         m_TransFinishedFunc();
         m_TransFinishedFunc = nullptr;
     }
@@ -1161,21 +1089,18 @@ void Conversation::onResume()
 void Conversation::onHwBackButtonClicked()
 {
     MSG_LOG("");
-    if (m_DeleteMode)
-    {
+    if (m_DeleteMode) {
         setDeleteMode(false);
         return;
     }
 
-    if (m_pRecipPanel)
-    {
+    if (m_pRecipPanel) {
         if (m_pRecipPanel->isMbeVisible() || m_pRecipPanel->getItemsCount() == 0)
             m_pRecipPanel->addRecipientsFromEntry(false);
         m_pRecipPanel->clearEntry();
     }
 
-    if (!isRecipExists() && !isBodyEmpty() && m_Mode == NewMessageMode)
-    {
+    if (!isRecipExists() && !isBodyEmpty() && m_Mode == NewMessageMode) {
         showNoRecipPopup();
         return;
     }
@@ -1198,8 +1123,7 @@ void Conversation::onHwMoreButtonClicked()
 void Conversation::onNaviOkButtonClicked()
 {
     MSG_LOG("");
-    if (m_Mode == ConversationMode && m_DeleteMode)
-    {
+    if (m_Mode == ConversationMode && m_DeleteMode) {
         m_pConvList->deleteSelectedItems();
         setDeleteMode(false);
     }
@@ -1208,8 +1132,7 @@ void Conversation::onNaviOkButtonClicked()
 void Conversation::onNaviCenterButtonClicked()
 {
     MSG_LOG("");
-    if (m_pRecipPanel)
-    {
+    if (m_pRecipPanel) {
         onNaviExpandButtonClicked();
     } else {
         MsgAddressListRef addressList = getAddressList();
@@ -1221,8 +1144,7 @@ void Conversation::onNaviCenterButtonClicked()
 void Conversation::onNaviExpandButtonClicked()
 {
     MSG_LOG("");
-    if (m_pRecipPanel)
-    {
+    if (m_pRecipPanel) {
         bool isMbeInvisible = !m_pRecipPanel->isMbeVisible();
         m_pRecipPanel->showMbe(isMbeInvisible);
         getNaviBar().setDownButtonState(isMbeInvisible);
@@ -1231,28 +1153,22 @@ void Conversation::onNaviExpandButtonClicked()
 
 void Conversation::onButtonClicked(NaviFrameItem &item, NaviButtonId buttonId)
 {
-    switch (buttonId)
-    {
+    switch (buttonId) {
         case NaviPrevButtonId:
             onHwBackButtonClicked();
             break;
-
         case NaviExpandButtonId:
             onNaviExpandButtonClicked();
             break;
-
         case NaviCenterButtonId:
             onNaviCenterButtonClicked();
             break;
-
         case NaviCancelButtonId:
             onHwBackButtonClicked();
             break;
-
         case NaviOkButtonId:
             onNaviOkButtonClicked();
             break;
-
         default:
             MSG_LOG_ERROR("Invalid buttonId: ", buttonId);
             break;
@@ -1301,14 +1217,11 @@ void Conversation::onMsgSettingsButtonClicked(Popup &popup, int buttonId)
 
 void Conversation::onNoRecipDiscardButtonClicked(Popup &popup, int buttonId)
 {
-    if (isDefferedCmd())
-    {
+    if (isDefferedCmd()) {
         if (m_pBody)
             m_pBody->clear();
-        if (m_DefferedCmd.defaultCmd)
-        {   // If we came from notification menu and unread threads will be more than one, we should to go back on thread list view
-            if (m_DefferedCmd.defaultCmd->getDefaultType() == AppControlDefault::NotificationType && getMsgEngine().getStorage().getUnreadThreadCount() > 1)
-            {
+        if (m_DefferedCmd.defaultCmd) {   // If we came from notification menu and unread threads will be more than one, we should to go back on thread list view
+            if (m_DefferedCmd.defaultCmd->getDefaultType() == AppControlDefault::NotificationType && getMsgEngine().getStorage().getUnreadThreadCount() > 1) {
                 pop();
             } else {
                 // Go to needed conversation
@@ -1407,13 +1320,10 @@ void Conversation::onViewContactDetailsItemPressed(PopupListItem &item)
 void Conversation::onAllConvItemsDeleted(ConvList &list)
 {
     MSG_LOG("");
-    if (m_Mode != NewMessageMode)
-    {
+    if (m_Mode != NewMessageMode) {
         auto convList = getMsgEngine().getStorage().getConversationList(m_ThreadId);
-        if ((convList && convList->getLength() == 0) || !convList)
-        {
-            if (isBodyEmpty())
-            {
+        if ((convList && convList->getLength() == 0) || !convList) {
+            if (isBodyEmpty()) {
                 onHwBackButtonClicked();
             } else {
                 // Current MsgThread is dead, so create new MsgThread from existing recipients.
index 0a3dc4c9b5c02ec810a1fbcb7520ddd94da70847..044e0ffd9b85a346fdc02fa783af139112175c94 100644 (file)
 
 #include <string>
 
-namespace Msg
-{
+namespace Msg {
     class ConversationLayout
-        : public View
-    {
+        : public View {
         public:
             ConversationLayout(Evas_Object *parent);
             virtual ~ConversationLayout();
index 47efb25fefd8a3cc6f6d1b013def30f03abf72ff..603207f67e9051f216ff73ecb59cebe71bf0b04e 100644 (file)
 
 #include <string>
 
-namespace Msg
-{
+namespace Msg {
     class IMessageInputPanelListener;
 
     class MessageInputPanel
-        : public View
-    {
+        : public View {
         public:
-            enum ButtonId
-            {
+            enum ButtonId {
                 AddButtonId,
                 SendButtonId
             };
@@ -65,8 +62,7 @@ namespace Msg
             Evas_Object *m_pAddButton;
     };
 
-    class IMessageInputPanelListener
-    {
+    class IMessageInputPanelListener {
         public:
             virtual ~IMessageInputPanelListener() {}
             virtual void onButtonClicked(MessageInputPanel &obj, MessageInputPanel::ButtonId id) {};
index 107a765ae7875275a614ba16a34f681a8e8e640b..d0fe6e3c3f45c29ab8f64ed1e7105a6236974996 100644 (file)
@@ -30,8 +30,7 @@ using namespace Msg;
 #define BUTTON_PRESSED_COLOR             60, 75, 140, 255
 #define BUTTON_DISABLED_COLOR            179, 197, 218, 255
 
-namespace
-{
+namespace {
     const char *buttonIdKey = "id";
 }
 
@@ -91,16 +90,13 @@ void MessageInputPanel::setDisabledColor(Evas_Object *button)
 
 Evas_Object *MessageInputPanel::getButton(ButtonId id)
 {
-    switch (id)
-    {
+    switch (id) {
         case AddButtonId:
             return m_pAddButton;
             break;
-
         case SendButtonId:
             return m_pSendButton;
             break;
-
         default:
             MSG_ASSERT(false, "Unknown button id");
             break;
@@ -158,8 +154,7 @@ void MessageInputPanel::setListener(IMessageInputPanelListener *l)
 void MessageInputPanel::onButtonClicked(Evas_Object *obj, void *event_info)
 {
     feedback_play(FEEDBACK_PATTERN_TAP);
-    if (m_pListener)
-    {
+    if (m_pListener) {
         int id = (int)(intptr_t)evas_object_data_get(obj, buttonIdKey);
         m_pListener->onButtonClicked(*this, (ButtonId)id);
     }
index 24b33ed4e88e42f18e06eed6497d5973aea80ce8..e1392bef110a09d8dbfd644ed69d9b9161eb1cb3 100644 (file)
 #include "ContactPicker.h"
 #include "ContactManager.h"
 
-namespace Msg
-{
+namespace Msg {
     class IConvRecipientsPanelListener;
 
     class ConvRecipientsPanel
         : public ConvRecipientsPanelView
         , private IContactPickerListener
         , private IMbeRecipientsListener
-        , private IContactManagerListener
-    {
+        , private IContactManagerListener {
         public:
             ConvRecipientsPanel(Evas_Object *parent, App &app);
             virtual ~ConvRecipientsPanel();
@@ -91,8 +89,7 @@ namespace Msg
             MbeRecipients *m_pMbe;
     };
 
-    class IConvRecipientsPanelListener
-    {
+    class IConvRecipientsPanelListener {
         public:
             virtual ~IConvRecipientsPanelListener() {}
 
index ac62108e8e624d3874a983d665ea6804027732d9..ab74cd29da4403f195b88f3e169950bd2f2a4f15 100644 (file)
@@ -47,8 +47,7 @@ ConvRecipientsPanel::~ConvRecipientsPanel()
 void ConvRecipientsPanel::read(Message &msg)
 {
     auto list = m_pMbe->getItems();
-    for (auto it : list)
-    {
+    for (auto it : list) {
         MbeRecipientItem *recipItem = static_cast<MbeRecipientItem*>(it);
         MsgAddress &msgAddr = msg.addAddress();
         msgAddr.setAddress(recipItem->getAddress());
@@ -56,8 +55,7 @@ void ConvRecipientsPanel::read(Message &msg)
         msgAddr.setAddressType(recipItem->getAddressType());
     }
 
-    if (list.empty())
-    {
+    if (list.empty()) {
         showInvalidIcon(true);
         showAddRecipNotif();
         setEntryFocus(true);
@@ -72,8 +70,7 @@ void ConvRecipientsPanel::write(const Message &msg)
 bool ConvRecipientsPanel::isMms() const
 {
     auto items = m_pMbe->getItems();
-    for (MbeRecipientItem *it : items)
-    {
+    for (MbeRecipientItem *it : items) {
         MbeRecipientItem *item = static_cast<MbeRecipientItem*>(it);
         if (item->getAddressType() == MsgAddress::Email)
             return true;
@@ -93,23 +90,20 @@ bool ConvRecipientsPanel::addRecipientsFromEntry(bool showPopup)
     TokenizedRecipients result = MsgUtils::tokenizeRecipients(text);
     bool duplicateFound = false;
 
-    for (auto &it : result.validResults)
-    {
+    for (auto &it : result.validResults) {
         if (it.second == MsgAddress::Phone)
             it.first = MsgUtils::makeNormalizedNumber(it.first);
 
         duplicateFound |= appendItem(it.first, it.second) == MbeRecipients::DuplicatedStatus;
     }
 
-    if (duplicateFound)
-    {
+    if (duplicateFound) {
         showDuplicatedRecipientNotif();
         return false;
     }
 
     setEntryText(result.invalidResult);
-    if (!result.invalidResult.empty() && showPopup)
-    {
+    if (!result.invalidResult.empty() && showPopup) {
         showInvalidRecipientPopup();
         return false;
     }
@@ -130,8 +124,7 @@ void ConvRecipientsPanel::update(const MsgAddressList &addressList)
 {
     clearMbe();
     int addrListLen = addressList.getLength();
-    for (int i = 0; i < addrListLen; ++i)
-    {
+    for (int i = 0; i < addrListLen; ++i) {
         auto &addr = addressList.at(i);
         appendItem(addr.getAddress(), addr.getAddressType());
     }
@@ -159,8 +152,7 @@ MbeRecipients::AppendItemStatus ConvRecipientsPanel::appendItem(const std::strin
 void ConvRecipientsPanel::execCmd(const AppControlComposeRef &cmd)
 {
     m_pMbe->clear();
-    for (auto recipStr: cmd->getRecipientList())
-    {
+    for (auto recipStr: cmd->getRecipientList()) {
         appendStatusHandler(appendItem(recipStr));
     }
 }
@@ -172,8 +164,7 @@ int ConvRecipientsPanel::getMaxRecipientCount() const
 
 void ConvRecipientsPanel::appendStatusHandler(MbeRecipients::AppendItemStatus status)
 {
-    switch (status)
-    {
+    switch (status) {
         case MbeRecipients::SuccessStatus:
             showInvalidIcon(false);
             if (getEntryFocus())
@@ -200,12 +191,10 @@ void ConvRecipientsPanel::appendStatusHandler(MbeRecipients::AppendItemStatus st
 
 void ConvRecipientsPanel::onKeyDown(Evas_Event_Key_Down *ev)
 {
-    if (ev && ev->keyname)
-    {
+    if (ev && ev->keyname) {
         MSG_LOG("Key: ", ev->keyname);
 
-        if ((strcmp(ev->keyname, "semicolon") == 0) || (strcmp(ev->keyname, "comma") == 0))
-        {
+        if ((strcmp(ev->keyname, "semicolon") == 0) || (strcmp(ev->keyname, "comma") == 0)) {
             addRecipientsFromEntry();
         } else {
             if (m_pListener)
@@ -222,8 +211,7 @@ void ConvRecipientsPanel::onEntryFocusChanged()
     if (!getEntryFocus())
         showButton(ContactButton);
 
-    if (getEntryFocus())
-    {
+    if (getEntryFocus()) {
         expandRecipients();
     } else {
         addRecipientsFromEntry();
@@ -240,8 +228,7 @@ void ConvRecipientsPanel::onEntryFocusChanged()
 void ConvRecipientsPanel::onEntryChanged()
 {
     unselectMbeItem();
-    if (!isEntryEmpty() && getEntryFocus())
-    {
+    if (!isEntryEmpty() && getEntryFocus()) {
         showButton(PlusButton);
         showInvalidIcon(false);
     } else {
@@ -273,16 +260,14 @@ void ConvRecipientsPanel::onContactsPicked(const std::list<ResultData> &addressI
     int addressOfInvalids = 0;
     int duplicateRecip = 0;
     int sizeOfList = addressIdList.size();
-    for (auto &addressData : addressIdList)
-    {
+    for (auto &addressData : addressIdList) {
         ContactAddressRef address;
         if (addressData.type == IContactPickerListener::PhoneType)
             address = m_App.getContactManager().getContactPersonNumber(addressData.id);
         else if (addressData.type == IContactPickerListener::EmailType)
             address = m_App.getContactManager().getContactPersonEmail(addressData.id);
 
-        if (address)
-        {
+        if (address) {
             auto apendStatus = appendItem(address->getAddress(), address->getDispName(), MsgAddress::UnknownAddressType);
             if (apendStatus == MbeRecipients::InvalidRecipStatus)
                 ++addressOfInvalids;
index e9af39827663a03b8dfd1fc40239e9980fb3d676..39df3886f8b6ee7c0ff4d30150ecc50af7f3f989 100644 (file)
 #include <string>
 #include <vector>
 
-namespace Msg
-{
+namespace Msg {
     class ConvRecipientsPanelView
-        : public View
-    {
+        : public View {
         public:
             ConvRecipientsPanelView(Evas_Object *parent, int entryMaxCharCount);
             virtual ~ConvRecipientsPanelView();
@@ -59,8 +57,7 @@ namespace Msg
             void updateShortenedRecipients();
 
         protected:
-            enum ButtonType
-            {
+            enum ButtonType {
                 NoneButton,
                 ContactButton,
                 PlusButton
index 0b368a68d792115658891fcd44ea3c3da8f48a38..0b9d41cc3037d8407dc3ebff62229b89536e6ab9 100644 (file)
@@ -27,8 +27,7 @@ using namespace Msg;
 #define BUTTON_COLOR                     61, 185, 204, 255
 #define BUTTON_PRESSED_COLOR             50, 160, 170, 255
 
-namespace
-{
+namespace {
     const char *buttonPart = "swl.contact_btn";
 }
 
@@ -65,19 +64,15 @@ void ConvRecipientsPanelView::showButton(ButtonType buttonType)
     if (button)
         evas_object_hide(button);
 
-    switch (buttonType)
-    {
+    switch (buttonType) {
         case NoneButton:
             break;
-
         case ContactButton:
             elm_object_part_content_set(m_pLayout, buttonPart, getContactBtn());
             break;
-
         case PlusButton:
             elm_object_part_content_set(m_pLayout, buttonPart, getPlusBtn());
             break;
-
         default:
             assert(false);
             break;
@@ -87,28 +82,22 @@ void ConvRecipientsPanelView::showButton(ButtonType buttonType)
 void ConvRecipientsPanelView::setButtonEnabled(ButtonType buttonType, bool enabled)
 {
     Evas_Object *pBtn = nullptr;
-    switch (buttonType)
-    {
+    switch (buttonType) {
         case NoneButton:
             break;
-
         case ContactButton:
             pBtn = getContactBtn();
             break;
-
         case PlusButton:
             pBtn = getPlusBtn();
             break;
-
         default:
             assert(false);
             break;
     }
 
-    if(pBtn)
-    {
+    if (pBtn)
         elm_object_disabled_set(pBtn, !enabled);
-    }
 }
 
 void ConvRecipientsPanelView::addGeometryChangedCb(Evas_Object *obj)
@@ -185,8 +174,7 @@ std::string ConvRecipientsPanelView::getEntryText() const
 void ConvRecipientsPanelView::setEntryText(const std::string &utf8)
 {
     char *text = elm_entry_utf8_to_markup(utf8.c_str());
-    if (text)
-    {
+    if (text) {
         elm_entry_entry_set(m_pEntry, text);
         elm_entry_cursor_end_set(m_pEntry);
         free(text);
@@ -276,8 +264,7 @@ Evas_Object *ConvRecipientsPanelView::createClearButton(Evas_Object *parent)
 
 Evas_Object *ConvRecipientsPanelView::getContactBtn()
 {
-    if (m_pContactBtn)
-    {
+    if (m_pContactBtn) {
         evas_object_show(m_pContactBtn);
         return m_pContactBtn;
     }
@@ -307,8 +294,7 @@ Evas_Object *ConvRecipientsPanelView::getContactBtn()
 
 Evas_Object *ConvRecipientsPanelView::getPlusBtn()
 {
-    if (m_pPlusBtn)
-    {
+    if (m_pPlusBtn) {
         evas_object_show(m_pPlusBtn);
         return m_pPlusBtn;
     }
@@ -365,8 +351,7 @@ void ConvRecipientsPanelView::setContactBtnColor(Evas_Object *btn, int r, int g,
 
 void ConvRecipientsPanelView::deleteNextRecipient()
 {
-    if (!isMbeEmpty())
-    {
+    if (!isMbeEmpty()) {
         Elm_Object_Item *selectedItem = elm_multibuttonentry_selected_item_get(*m_pMbe);
         if (selectedItem)
             elm_object_item_del(selectedItem);
@@ -379,8 +364,7 @@ void ConvRecipientsPanelView::selectLastItem()
 {
     Elm_Object_Item *lastItem = elm_multibuttonentry_last_item_get(*m_pMbe);
 
-    if (lastItem)
-    {
+    if (lastItem) {
         elm_object_focus_allow_set(*m_pMbe, true);
         elm_multibuttonentry_item_selected_set(lastItem, true);
     } else {
@@ -420,8 +404,7 @@ void ConvRecipientsPanelView::collapseRecipients()
 void ConvRecipientsPanelView::expandRecipients()
 {
     showMbe(!isMbeEmpty());
-    if (!m_IsEditItemClicked)
-    {
+    if (!m_IsEditItemClicked) {
         setEntryText(m_SavedRecipText);
     } else {
         setEditMode(false);
@@ -433,8 +416,7 @@ void ConvRecipientsPanelView::updateShortenedRecipients()
 {
     const auto &items = m_pMbe->getItems();
     std::string shortenedRecipients;
-    if (!items.empty())
-    {
+    if (!items.empty()) {
         shortenedRecipients = items[0]->getDispName();
         if (items.size() > 1)
             shortenedRecipients += " + " + std::to_string(items.size() - 1);
@@ -445,8 +427,7 @@ void ConvRecipientsPanelView::updateShortenedRecipients()
 void ConvRecipientsPanelView::editSelectedItem()
 {
     MbeRecipientItem* pItem = getSelectedItem();
-    if (pItem)
-    {
+    if (pItem) {
         setEditMode(true);
         setEntryText(pItem->getAddress());
         showEntry(true);
@@ -460,8 +441,7 @@ void ConvRecipientsPanelView::editSelectedItem()
 void ConvRecipientsPanelView::removeSelectedItem()
 {
     MbeRecipientItem* pItem = getSelectedItem();
-    if (pItem)
-    {
+    if (pItem) {
         pItem->destroy();
         if (isMbeEmpty())
             showMbe(false, false);
index 27d66820fe36333877dde36f79384e111b129f50..660401116fd9976b7344b46d8b4c1820e2e886d0 100644 (file)
 #include <Eina.h>
 #include "WorkingDir.h"
 
-namespace Msg
-{
+namespace Msg {
     class IAttachmentHandlerListener;
 
-    class AttachmentHandler
-    {
+    class AttachmentHandler {
         public:
             AttachmentHandler(WorkingDirRef workingDir);
             ~AttachmentHandler();
@@ -65,8 +63,7 @@ namespace Msg
             std::queue <std::string> m_Task;
     };
 
-    class IAttachmentHandlerListener
-    {
+    class IAttachmentHandlerListener {
         public:
             virtual ~IAttachmentHandlerListener() {};
             virtual long long onFreeSpaceRequest() = 0;
index 2edaa3849624cbceb9e56dfccf7171fdeae9f809..aec910ebe62ae4a9ffcb75f5896ef7b86ed98aa1 100644 (file)
 #include "App.h"
 #include <string>
 
-namespace Msg
-{
-    namespace MessageDetailContent
-    {
-        enum TextStyle
-        {
+namespace Msg {
+    namespace MessageDetailContent {
+        enum TextStyle {
             ViewDetailsTextStyle,
             DownloadTextStyle
         };
index 7d6d01d2deb18b64a50b79d7cfb0ab53147d73b7..e44fb6b707ebd91001642549b93b306b79994938 100644 (file)
 #include <memory>
 #include <mutex>
 
-namespace Msg
-{
-    class WorkingDir
-    {
+namespace Msg {
+    class WorkingDir {
         public:
             WorkingDir();
             ~WorkingDir();
index 67006145a01d18a8745786d0c4fd4208df9de5e7..132c3cb916e824df887a2da854403857269f9f93 100644 (file)
@@ -31,7 +31,6 @@ AttachmentHandler::AttachmentHandler(WorkingDirRef workingDir)
     , m_ThreadCreated(false)
     , m_NeedTerminate(false)
 {
-
 }
 
 AttachmentHandler::~AttachmentHandler()
@@ -46,13 +45,11 @@ AttachmentHandler::~AttachmentHandler()
 
 void AttachmentHandler::processFile(const std::string &file)
 {
-    if (!m_ThreadCreated)
-    {
-        if (eina_thread_create(&m_Thread, EINA_THREAD_NORMAL, 0, on_routine_cb, this))
-        {
+    if (!m_ThreadCreated) {
+        if (eina_thread_create(&m_Thread, EINA_THREAD_NORMAL, 0, on_routine_cb, this)) {
             m_ThreadCreated = true;
         } else {
-            if(m_pListener)
+            if (m_pListener)
                 m_pListener->onFileFails();
         }
     }
@@ -104,8 +101,7 @@ void *AttachmentHandler::on_routine_cb(void *data, Eina_Thread t)
 
 void AttachmentHandler::onRoutine()
 {
-    while (!m_NeedTerminate)
-    {
+    while (!m_NeedTerminate) {
         std::unique_lock<std::mutex> _lock(m_Mutex);
         if (m_Task.empty() && !m_NeedTerminate)
             m_Condition.wait(_lock);
@@ -116,27 +112,23 @@ void AttachmentHandler::onRoutine()
         m_Task.pop();
         _lock.unlock();
 
-        if (!FileUtils::isExists(m_CurrentFile) || FileUtils::isDir(m_CurrentFile))
-        {
+        if (!FileUtils::isExists(m_CurrentFile) || FileUtils::isDir(m_CurrentFile)) {
             MSG_LOG_ERROR("File not exists: ", m_CurrentFile);
             ecore_main_loop_thread_safe_call_sync(safeCallOnFileFails, this);
             continue;
         }
 
         m_CurrentFile = m_WorkingDir->addFile(m_CurrentFile);
-        if (m_CurrentFile.empty())
-        {
+        if (m_CurrentFile.empty()) {
             MSG_LOG_ERROR("Error while copy file");
             ecore_main_loop_thread_safe_call_sync(safeCallOnFileFails, this);
             continue;
         }
 
         ecore_main_loop_thread_safe_call_sync(safeCallOnFreeSpaceRequest, this);
-        if (FileUtils::getFileSize(m_CurrentFile) > m_CurrentFreeSpace)
-        {
+        if (FileUtils::getFileSize(m_CurrentFile) > m_CurrentFreeSpace) {
             bool isImage = getMsgMediaTypeByFileExt(m_CurrentFile).type == MsgMedia::ImageType;
-            if ((isImage && MediaUtils::downgradeImageQuality(m_CurrentFile) > m_CurrentFreeSpace) || !isImage)
-            {
+            if ((isImage && MediaUtils::downgradeImageQuality(m_CurrentFile) > m_CurrentFreeSpace) || !isImage) {
                 m_WorkingDir->removeFile(m_CurrentFile);
                 ecore_main_loop_thread_safe_call_sync(safeCallOnFileFails, this);
                 continue;
index 9a5392cbb08ce725cb7421847b6f797d119a514d..7836e9ad0a96e87ea3b3cfffcb2ea1fd3576562f 100644 (file)
 #include <telephony_common.h>
 #include <telephony_sim.h>
 
-namespace Msg
-{
-namespace MessageDetailContent
-{
+namespace Msg {
+namespace MessageDetailContent {
 
-namespace
-{
+namespace {
     const std::string secondTextColor = "#737373";
     const unsigned int mainTextSize = 40;
     const unsigned int secondTextSize = 32;
@@ -52,8 +49,7 @@ std::string getMessageType(Message::Type msgType)
     std::string msgDetails = makeMainText(msg("IDS_MSG_POP_TYPE"));
     msgDetails.append("<br/>");
 
-    switch (msgType)
-    {
+    switch (msgType) {
     case Message::MT_SMS:
         msgDetails.append(makeSecondText(msg("IDS_MSGF_OPT_TEXT_MESSAGE")));
         break;
@@ -75,21 +71,18 @@ std::string getContactsInfo(App &app, Message::Direction msgDirection, ThreadId
     MsgAddressListRef addrList = app.getMsgEngine().getStorage().getAddressList(msgThreadId);
 
     std::string contactsInfo;
-    if (msgDirection == Message::MD_Sent)
-    {
+    if (msgDirection == Message::MD_Sent) {
         contactsInfo.append(msg("IDS_MSG_HEADER_TO_M_RECIPIENT"));
         contactsInfo.append("<br/>");
     }
 
-    if (msgDirection == Message::MD_Received)
-    {
+    if (msgDirection == Message::MD_Received) {
         contactsInfo.append(makeMainText(msg("IDS_MSG_BODY_FROM_ABB_M_PERIOD")));
         contactsInfo.append("<br/>");
     }
 
     int addressListLength = addrList->getLength();
-    for (int i = 0; i < addressListLength; ++i)
-    {
+    for (int i = 0; i < addressListLength; ++i) {
         std::string address = addrList->at(i).getAddress();
         contactsInfo.append(makeSecondText(makeDispAddress(app, address)));
         if (i != addressListLength - 1)
@@ -119,50 +112,37 @@ std::string makeDeliveryReportResult(App &app, Message::NetworkStatus msgStatus,
     std::string deliverText = makeMainText(msg("IDS_MSGF_BODY_DELIVERY_REPORT"));
 
     bool deliverFlag = app.getMsgEngine().getStorage().isDeliverReportChecked(msgId);
-    if (deliverFlag)
-    {
+    if (deliverFlag) {
         MsgReportListRef reportList = app.getMsgEngine().getStorage().getMsgReportList(msgId);
         int size = reportList->getLength();
         bool isDelivReportExists = false;
 
-        for (int i = 0; i < size; i++)
-        {
+        for (int i = 0; i < size; i++) {
             const MsgReport &report = reportList->at(i);
-            if (report.getType() == MsgReport::TypeDelivery)
-            {
+            if (report.getType() == MsgReport::TypeDelivery) {
                 isDelivReportExists = true;
                 deliverText.append("<br/>");
                 deliverText.append(makeSecondText(makeDispAddress(app, report.getAddress())));
                 deliverText.append(makeSecondText(": "));
                 MsgReport::DeliveryStatus deliveryStatus = report.getDeliveryStatus();
 
-                switch (deliveryStatus)
-                {
+                switch (deliveryStatus) {
                     case MsgReport::StatusSuccess:
-                    {
                         deliverText.append(makeSecondText(msg("IDS_MSG_BODY_DELIVERED_M_STATUS")));
                         break;
-                    }
                     case MsgReport::StatusExpired:
-                    {
                         deliverText.append(makeSecondText(msg("IDS_MSGF_BODY_EXPIRED")));
                         break;
-                    }
                     case MsgReport::StatusRejected:
-                    {
                         deliverText.append(makeSecondText(msg("IDS_MSGF_POP_REJECTED")));
                         break;
-                    }
                     case MsgReport::StatusNone:
-                    {
                         deliverText.append(makeSecondText(msg("IDS_MSG_BODY_REQUESTED_M_MESSAGE_STATUS")));
                         break;
-                    }
                 }
             }
         }
-        if (!isDelivReportExists)
-        {
+        if (!isDelivReportExists) {
             deliverText.append("<br/>");
             deliverText.append(makeSecondText(msg("IDS_MSGF_BODY_UNKNOWN")));
         }
@@ -180,8 +160,7 @@ std::string getSmsStatus(Message::NetworkStatus msgStatus)
     std::string status = makeMainText(msg("IDS_MSG_BODY_STATUS_C"));
     status.append("<br/>");
 
-    switch (msgStatus)
-    {
+    switch (msgStatus) {
         case Message::NS_Sending:
             status.append(makeSecondText(msg("IDS_MSG_BODY_SENDING_ING_M_STATUS_ABB")));
             break;
@@ -208,8 +187,7 @@ std::string getMmsSubject(const Message &message, int style)
 {
     std::string msgDetails;
     std::string subject = message.getSubject();
-    switch (style)
-    {
+    switch (style) {
         case ViewDetailsTextStyle:
             msgDetails.append(makeMainText(msg("IDS_MSG_HEADER_SUBJECT"))).append("<br/>");
             if (subject.empty())
@@ -241,8 +219,7 @@ std::string getMmsMessageSize(const Message &message, int style)
 {
     int msgSize = message.getSize();
     std::string msgDetails;
-    switch (style)
-    {
+    switch (style) {
         case ViewDetailsTextStyle:
             msgDetails.append(makeMainText(msg("IDS_MSGF_BODY_MESSAGE_SIZE")));
             msgDetails.append("<br/>");
@@ -266,14 +243,12 @@ std::string getMmsMessageExpired(const Message &message, int style)
 {
     const MessageMms *mms = dynamic_cast<const MessageMms*>(&message);
     std::string msgDetails;
-    switch (style)
-    {
+    switch (style) {
         case ViewDetailsTextStyle:
             msgDetails.append("<br/><br/>");
             msgDetails.append(makeMainText(msg("IDS_MSG_BODY_EXPIRES_ON_C")));
             msgDetails.append("<br/>");
-            if (mms)
-            {
+            if (mms) {
                 time_t msgExpired = mms->getExpired();
                 msgDetails.append(makeSecondText(TimeUtils::makeDateString(msgExpired)));
             }
@@ -281,8 +256,7 @@ std::string getMmsMessageExpired(const Message &message, int style)
         case DownloadTextStyle:
             msgDetails.append(msg("IDS_MSG_BODY_EXPIRES_ON_C"));
             msgDetails.append(" ");
-            if (mms)
-            {
+            if (mms) {
                 time_t msgExpired = mms->getExpired();
                 msgDetails.append(TimeUtils::makeDateString(msgExpired));
             }
@@ -299,51 +273,38 @@ std::string makeReadReportResult(App &app, MsgId msgId, ThreadId msgThreadId, Me
 {
     std::string readReport = makeMainText(msg("IDS_MSGF_POP_READ_REPORT"));
     bool readFlag = app.getMsgEngine().getStorage().isReadReportChecked(msgId);
-    if (readFlag)
-    {
+    if (readFlag) {
         MsgReportListRef reportList = app.getMsgEngine().getStorage().getMsgReportList(msgId);
 
         int size = reportList->getLength();
         bool isReadReportExists = false;
 
-        for (int i = 0; i < size; i++)
-        {
+        for (int i = 0; i < size; i++) {
             const MsgReport &report = reportList->at(i);
-            if (report.getType() == MsgReport::TypeRead)
-            {
+            if (report.getType() == MsgReport::TypeRead) {
                 isReadReportExists = true;
                 readReport.append("<br/>");
                 readReport.append(makeSecondText(makeDispAddress(app, report.getAddress())));
                 readReport.append(makeSecondText(": "));
                 MsgReport::ReadStatus readStatus = report.getReadStatus();
 
-                switch (readStatus)
-                {
+                switch (readStatus) {
                     case MsgReport::ReadStatusIsRead:
-                    {
                         readReport.append(makeSecondText(msg("IDS_MSGF_BODY_MMSREADREPLYMSGREAD")));
                         break;
-                    }
                     case MsgReport::ReadStatusIsDeleted:
-                    {
                         readReport.append(makeSecondText(msg("IDS_MSG_POP_DELETED")));
                         break;
-                    }
                     case MsgReport::ReadStatusNone:
-                    {
                         readReport.append(makeSecondText(msg("IDS_MSG_BODY_REQUESTED_M_MESSAGE_STATUS")));
                         break;
-                    }
                     default:
-                    {
                         readReport.append(makeSecondText(msg("IDS_MSGF_BODY_UNKNOWN")));
-                    }
                 }
             }
         }
 
-        if (!isReadReportExists)
-        {
+        if (!isReadReportExists) {
             readReport.append("<br/>");
             readReport.append(makeSecondText(msg("IDS_MSGF_BODY_UNKNOWN")));
         }
index dc46f2a3ad699cb175e98db07cb41453609611d5..e0c07562d3aa11df2c5017215c056112b3bc6013 100644 (file)
@@ -46,30 +46,25 @@ void WorkingDir::createWorkingDir()
     // Create common dir. if not exists:
     std::string commonDir = PathUtils::getDataPath(commonWorkingDirName);
     bool isCommonExists = FileUtils::isExists(commonDir);
-    if (!isCommonExists)
-    {
+    if (!isCommonExists) {
         isCommonExists = FileUtils::makeDir(commonDir);
         MSG_ASSERT(isCommonExists, "Can't create common working dir: ", commonDir);
     }
 
     // Create current dir:
-    if (isCommonExists)
-    {
+    if (isCommonExists) {
         std::string uniqueDir = getUniqueDirName(commonDir + "/" + currentWorkingDirPrefix);
         FileUtils::makeDir(uniqueDir);
         bool isExists = FileUtils::isExists(uniqueDir);
         MSG_ASSERT(isExists, "Can't create current working dir: ", uniqueDir);
         if (isExists)
-        {
             m_Path = uniqueDir;
-        }
     }
 }
 
 void WorkingDir::removeWorkingDir()
 {
-    if (!m_Path.empty())
-    {
+    if (!m_Path.empty()) {
         bool res = FileUtils::remove(m_Path, true);
         MSG_LOG("Working dir remove with result = ", res);
     }
@@ -96,16 +91,13 @@ std::string WorkingDir::addFile(const std::string &path)
     std::lock_guard<std::recursive_mutex> _lock(m_Mutex);
     std::string newPath;
 
-    if (FileUtils::isExists(path))
-    {
-        if (path.find(m_Path) != std::string::npos)
-        {
+    if (FileUtils::isExists(path)) {
+        if (path.find(m_Path) != std::string::npos) {
             newPath = path;
             MSG_LOG("File is already exists: ", newPath);
         } else {
             newPath = genUniqueFilePath(path);
-            if (FileUtils::copy(path, newPath))
-            {
+            if (FileUtils::copy(path, newPath)) {
                 MSG_LOG("File added: ", newPath);
             } else {
                 MSG_LOG_ERROR("Can't copy to working dir: ", path);
@@ -125,8 +117,7 @@ std::string WorkingDir::addTextFile(const std::string &text, const std::string &
 
     std::string path = genUniqueFilePath(result);
     std::ofstream file(path, std::ofstream::trunc | std::ofstream::binary | std::ofstream::out);
-    if (file.is_open())
-    {
+    if (file.is_open()) {
         file << text;
         MSG_LOG("Text file added: ", path);
     } else {
@@ -153,11 +144,9 @@ std::string WorkingDir::getUniqueDirName(const std::string &path)
 {
     std::string res;
     unsigned i = 0;
-    do
-    {
+    do {
         res = path + "-" + std::to_string(i);
         ++i;
-    }
-    while (FileUtils::isExists(res));
+    } while (FileUtils::isExists(res));
     return res;
 }
index 1f7ebf04e5cbab3176b63188e55f7b1df8f18e45..4988f615a5c9190b8fc145cc102055fb14883dda 100644 (file)
@@ -96,8 +96,7 @@ const Window &MainApp::getWindow() const
 
 void MainApp::terminate()
 {
-    if (m_NeedToCloseApp)
-    {
+    if (m_NeedToCloseApp) {
         // Close app completely
         ui_app_exit();
     } else if (m_pWindow) {
@@ -162,8 +161,7 @@ void MainApp::onAppControl(app_control_h app_control)
     app_control_get_launch_mode(app_control, &mode);
     m_NeedToCloseApp = (mode == APP_CONTROL_LAUNCH_MODE_GROUP);
 
-    switch (cmd->getOperationType())
-    {
+    switch (cmd->getOperationType()) {
         case AppControlCommand::OpDefault:
             if (m_pRootController)
                 m_pRootController->execCmd(std::static_pointer_cast<AppControlDefault>(cmd));
@@ -189,21 +187,17 @@ void MainApp::updateCharacterOrientation()
 {
     char *lang = nullptr;
     system_settings_get_value_string(SYSTEM_SETTINGS_KEY_LOCALE_LANGUAGE, &lang);
-    if (lang)
-    {
+    if (lang) {
         MSG_LOG("Language: ", lang);
         elm_language_set(lang);
         i18n_ulocale_layout_type_e layout = I18N_ULOCALE_LAYOUT_UNKNOWN;
-        if (i18n_ulocale_get_character_orientation(lang, &layout) == I18N_ERROR_NONE)
-        {
+        if (i18n_ulocale_get_character_orientation(lang, &layout) == I18N_ERROR_NONE) {
             if (layout == I18N_ULOCALE_LAYOUT_LTR)
                 elm_config_mirrored_set(false);
             else if (layout == I18N_ULOCALE_LAYOUT_RTL)
                 elm_config_mirrored_set(true);
             else
-            {
                 MSG_LOG_ERROR("Unsupported character orientation type: ", layout);
-            }
         }
         free(lang);
     }
index c8bf4fdf148aed53138d636dcff9eeff857d85f7..c5c24ebfe78de81fec9aca4fb711aabe449853dd 100644 (file)
 #include <app_control.h>
 #include <memory>
 
-namespace Msg
-{
+namespace Msg {
     class StandardWindow;
     class NaviFrameController;
 
     class MainApp:
-        public App
-    {
+        public App {
         public:
             MainApp();
             virtual ~MainApp();
index 3deb778add80d72f4b6504fec3ca37ce63456caf..464bae0be63e3db92dc462599d57a94725c00642 100644 (file)
 
 #include <time.h>
 
-namespace Msg
-{
+namespace Msg {
     class BaseThreadListItem
-        : public ThreadListViewItem
-    {
+        : public ThreadListViewItem {
         public:
             BaseThreadListItem(App &app);
             virtual ~BaseThreadListItem();
index fad0732e0161be28a5f4d2ec580bbaf08d60565c..0efe05dd554317944100fc8de7b05ccb403a2b19 100644 (file)
 #include "BaseThreadListItem.h"
 #include "Message.h"
 
-namespace Msg
-{
+namespace Msg {
     class MsgSearchListItem
-        : public BaseThreadListItem
-    {
+        : public BaseThreadListItem {
         public:
             MsgSearchListItem(App &app, const Message &msg, const std::string &searchWord);
             virtual ~MsgSearchListItem();
index 876dd7474927c36296aa4095ab73834e769a56d2..eff7be55eb4d0dc1fb0d417a6c91a76aa417ec59 100644 (file)
@@ -33,8 +33,7 @@
 #include <string>
 #include <memory>
 
-namespace Msg
-{
+namespace Msg {
     class SelectAllListItem;
     class NaviFrameController;
     class ThreadListItem;
@@ -47,8 +46,7 @@ namespace Msg
         , private IFloatingButtonListener
         , private IThreadListListener
         , private IThreadSearchListListener
-        , private ISystemSettingsManager
-    {
+        , private ISystemSettingsManager {
         public:
             MsgThread(NaviFrameController &parent);
             virtual ~MsgThread();
@@ -88,8 +86,7 @@ namespace Msg
             virtual void onLanguageChanged();
 
         private:
-            enum Mode
-            {
+            enum Mode {
                 InitMode,
                 DeleteMode,
                 NormalMode,
index f816ad7ec79d0a68d913f157d93ca64068a51c4b..f07eec733def79677ac7d55190467d0c8297f18d 100644 (file)
@@ -24,8 +24,7 @@
 #include "MsgTypes.h"
 #include <set>
 
-namespace Msg
-{
+namespace Msg {
     class IThreadListListener;
     class SelectAllListItem;
     class ThreadListItem;
@@ -36,8 +35,7 @@ namespace Msg
         , private IMsgStorageListener
         , private IListViewListener
         , private IContactManagerListener
-        , private ISystemSettingsManager
-    {
+        , private ISystemSettingsManager {
         public:
             ThreadList(Evas_Object *parent, App &app);
             virtual ~ThreadList();
@@ -88,8 +86,7 @@ namespace Msg
             bool m_DeleteMode;
     };
 
-    class IThreadListListener
-    {
+    class IThreadListListener {
         public:
             virtual ~IThreadListListener() {}
             virtual void onListItemSelected(ThreadId id) {};
index 70b691e4fc82244f63fc13cf4d6360172689476f..cebbceb552ef6f3fb2c42755f30c401875d0a166 100644 (file)
 #include "ContactManager.h"
 #include "App.h"
 
-namespace Msg
-{
+namespace Msg {
     class ThreadListItem
-        : public BaseThreadListItem
-    {
+        : public BaseThreadListItem {
         public:
             ThreadListItem(const MsgThreadItem &threadItem, App &app);
             virtual ~ThreadListItem();
index 21eea3b2364e5708b285dff853edaf29b7e1e997..546ecba4cb85187f3a4d3a00a9fc80a24be2b66c 100644 (file)
@@ -24,8 +24,7 @@
 
 #include <Ecore.h>
 
-namespace Msg
-{
+namespace Msg {
     class IThreadSearchListListener;
 
     class ThreadSearchList
@@ -33,8 +32,7 @@ namespace Msg
         , private IListViewListener
         , private IContactManagerListener
         , private ISystemSettingsManager
-        , private IMsgStorageListener
-    {
+        , private IMsgStorageListener {
         public:
             ThreadSearchList(Evas_Object *parent, App &app);
             virtual ~ThreadSearchList();
@@ -70,8 +68,7 @@ namespace Msg
             IThreadSearchListListener *m_pListener;
     };
 
-    class IThreadSearchListListener
-    {
+    class IThreadSearchListListener {
         public:
             virtual ~IThreadSearchListListener() {}
             virtual void onSearchListChanged() {};
index f18a3bd25cc704b69e103e2ec88a5ea54fe5f734..6822a555b5549a850e17678d0c4e73e5e5a0e9ea 100644 (file)
 #include "MsgThreadItem.h"
 #include "MsgTypes.h"
 
-namespace Msg
-{
+namespace Msg {
     class ThreadSearchListItem
-        : public BaseThreadListItem
-    {
+        : public BaseThreadListItem {
         public:
             ThreadSearchListItem(App &app, const MsgThreadItem &item, const std::string &searchWord);
             virtual ~ThreadSearchListItem();
index 454d1803107e63d2e1edce29d08dd2b7510c1a66..c8a9caf2e13c3973715ae63111de22de20dda31e 100644 (file)
@@ -54,16 +54,14 @@ void BaseThreadListItem::updateThumbnailAndName(const MsgThreadItem &threadItem,
 void BaseThreadListItem::updateThumbnailAndName(const MsgAddressList &addressList, bool decorateName)
 {
     int countContact = addressList.getLength();
-    if (countContact <= 0)
-    {
+    if (countContact <= 0) {
         MSG_LOG_WARN("Msg address list is empty");
         return;
     }
 
     const MsgAddress &addr = addressList[0];
 
-    if (countContact > 1)
-    {
+    if (countContact > 1) {
         m_ThumbId = m_App.getThumbnailMaker().getThumbId(ThumbnailMaker::GroupThumb);
         updateName(addr, countContact, decorateName);
     } else if (countContact == 1) {
index bbc730187294c31480962dd13183ed22c9579473..45578b79391e3db72874514708d3c10fc78990c7 100644 (file)
@@ -55,8 +55,7 @@ MsgThread::~MsgThread()
 
 void MsgThread::prepareSearchPanel()
 {
-    if (!m_pSearchPanel)
-    {
+    if (!m_pSearchPanel) {
         m_pSearchPanel = new MsgThreadSearchPanel(*m_pLayout);
         m_pSearchPanel->setListener(this);
         getNaviBar().setSearch(*m_pSearchPanel);
@@ -65,8 +64,7 @@ void MsgThread::prepareSearchPanel()
 
 void MsgThread::prepareSearchList()
 {
-    if (!m_pSearchList)
-    {
+    if (!m_pSearchList) {
         m_pSearchList = new ThreadSearchList(*m_pLayout, getApp());
         m_pSearchList->setListener(this);
         m_pSearchList->show();
@@ -76,8 +74,7 @@ void MsgThread::prepareSearchList()
 
 void MsgThread::prepareNoContentLayout()
 {
-    if (!m_pNoContent)
-    {
+    if (!m_pNoContent) {
         m_pNoContent = new NoContentLayout(*m_pLayout);
         m_pNoContent->show();
         m_pLayout->setNoContent(*m_pNoContent);
@@ -86,8 +83,7 @@ void MsgThread::prepareNoContentLayout()
 
 void MsgThread::prepareThreadList()
 {
-    if (!m_pThreadList)
-    {
+    if (!m_pThreadList) {
         m_pThreadList = new ThreadList(*m_pLayout, getApp());
         m_pThreadList->setListener(this);
         m_pThreadList->show();
@@ -106,8 +102,7 @@ void MsgThread::onAttached(ViewItem &item)
 void MsgThread::showMainPopup()
 {
     PopupList &popup = getApp().getPopupManager().getMorePopup();
-    if (!m_pThreadList->isEmpty())
-    {
+    if (!m_pThreadList->isEmpty()) {
         popup.appendItem(msg("IDS_MSG_OPT_DELETE"), POPUPLIST_ITEM_PRESSED_CB(MsgThread, onDeleteItemPressed), this);
         popup.appendItem(msg("IDS_MSG_OPT_SEARCH"), POPUPLIST_ITEM_PRESSED_CB(MsgThread, onSearchItemPressed), this);
     }
@@ -148,19 +143,15 @@ void MsgThread::setMode(Mode mode)
     getNaviBar().setColor(colorId);
     setNormalMode();
 
-    switch (mode)
-    {
+    switch (mode) {
         case NormalMode:
             break;
-
         case SearchMode:
             setSearchMode(true);
             break;
-
         case DeleteMode:
             setDeleteMode(true);
             break;
-
         case InitMode:
         default:
             MSG_ASSERT(false, "Not supported mode");
@@ -173,16 +164,13 @@ void MsgThread::setNormalMode()
     MSG_LOG("");
     getNaviBar().clear();
     // Reset previus mode:
-    switch (m_Mode)
-    {
+    switch (m_Mode) {
         case DeleteMode:
             setDeleteMode(false);
             break;
-
         case SearchMode:
             setSearchMode(false);
             break;
-
         default:
             break;
     }
@@ -205,8 +193,7 @@ void MsgThread::setDeleteMode(bool value)
     NaviBar &naviBar = getNaviBar();
 
     naviBar.showButton(NaviOkButtonId, value);
-    if (value)
-    {
+    if (value) {
         m_pLayout->showFloatingButton(false);
         updateSelectItemsTitle();
         naviBar.setButtonText(NaviOkButtonId, msgt("IDS_MSG_ACBUTTON_DELETE_ABB"));
@@ -221,8 +208,7 @@ void MsgThread::setSearchMode(bool value)
     MSG_LOG("");
 
     getNaviBar().showButton(NaviPrevButtonId, value);
-    if (value)
-    {
+    if (value) {
         m_pLayout->showFloatingButton(false);
         prepareSearchList();
         prepareSearchPanel();
@@ -246,8 +232,7 @@ void MsgThread::setSearchMode(bool value)
 void MsgThread::update()
 {
     bool searchEnabled = m_Mode == SearchMode;
-    if (searchEnabled)
-    {
+    if (searchEnabled) {
         bool showSearch = !m_pSearchList->isEmpty();
         bool showThread = !showSearch && !m_pThreadList->isEmpty() && m_pSearchList->getSearchWord().empty();
         bool showNoContent = !showThread && !showSearch;
@@ -267,8 +252,7 @@ void MsgThread::update()
 
 void MsgThread::updateSelectItemsTitle()
 {
-    if (m_Mode == DeleteMode)
-    {
+    if (m_Mode == DeleteMode) {
         int checked = m_pThreadList->getThreadsCheckedCount();
         if (checked > 0)
             getNaviBar().setTitle(msgArgs("IDS_MSG_HEADER_PD_SELECTED_ABB3", checked));
index dd9775e58dcaf5efb3f61a6f07ac0d2a496db5a4..239792e76a9404bf1eb8c6ef594c7b2c01b5bba5 100644 (file)
@@ -83,8 +83,7 @@ bool ThreadList::isDeleteModeEnabled() const
 void ThreadList::deleteSelectedItems()
 {
     auto items = getItems<ThreadListItem>();
-    for (ThreadListItem *it : items)
-    {
+    for (ThreadListItem *it : items) {
         if (it->getCheckedState())
             m_App.getMsgEngine().getStorage().deleteThread(it->getThreadId());
     }
@@ -94,8 +93,7 @@ int ThreadList::getThreadsCheckedCount() const
 {
     auto items = getItems<ThreadListItem>();
     int count = 0;
-    for (ThreadListItem *item : items)
-    {
+    for (ThreadListItem *item : items) {
         if (item->isCheckable() && item->getCheckedState())
             ++count;
     }
@@ -106,10 +104,8 @@ void ThreadList::showSelectAllItem(bool show, bool resetCheck)
 {
     SelectAllListItem *item = dynamic_cast<SelectAllListItem*>(getFirstItem());
 
-    if (show)
-    {
-        if (!item)
-        {
+    if (show) {
+        if (!item) {
             item = new SelectAllListItem;
             prependItem(*item);
         }
@@ -126,8 +122,7 @@ bool ThreadList::isAllThreadListItemChecked() const
 {
     // Simple impl. but not fast:
     auto items = getItems<ThreadListItem>();
-    for (ThreadListItem *item : items)
-    {
+    for (ThreadListItem *item : items) {
         if (item->isCheckable() && !item->getCheckedState())
             return false;
     }
@@ -178,8 +173,7 @@ int ThreadList::cmpFunc(const ListItem &item1, const ListItem &item2)
 void ThreadList::insertItem(ThreadId id)
 {
     MsgThreadItemRef threadItem = m_App.getMsgEngine().getStorage().getThread(id);
-    if (threadItem)
-    {
+    if (threadItem) {
         auto newItem = new ThreadListItem(*threadItem, m_App);
         ListView::sortedInsertItem(*newItem);
         navigateTo(*newItem);
@@ -189,8 +183,7 @@ void ThreadList::insertItem(ThreadId id)
 ThreadListItem *ThreadList::getItem(ThreadId id) const
 {
     auto items = ListView::getItems<ThreadListItem>();
-    for (ThreadListItem *item : items)
-    {
+    for (ThreadListItem *item : items) {
         if (item->getThreadId() == id)
             return item;
     }
@@ -205,8 +198,7 @@ void ThreadList::fillList()
 
     int length = msgThreadList->getLength();
 
-    for (int i = 0; i < length; ++i)
-    {
+    for (int i = 0; i < length; ++i) {
         const MsgThreadItem &msgThreadItem = msgThreadList->at(i);
         ListView::appendItem(*new ThreadListItem(msgThreadItem, m_App));
     }
@@ -220,16 +212,14 @@ void ThreadList::deleteItems()
 
     std::set<ThreadId> threadIdSet;
     int length = msgThreadList->getLength();
-    for (int i = 0; i < length; ++i)
-    {
+    for (int i = 0; i < length; ++i) {
         const MsgThreadItem &msgThreadItem = msgThreadList->at(i);
         threadIdSet.insert(msgThreadItem.getId());
     }
 
     auto items = ListView::getItems<ThreadListItem>();
 
-    for (ThreadListItem *item : items)
-    {
+    for (ThreadListItem *item : items) {
         if (threadIdSet.count(item->getThreadId()) == 0)
             ListView::deleteItem(*item);
     }
@@ -247,8 +237,7 @@ void ThreadList::updateItems(const MsgIdList &idList)
     auto threadIdSet = getThreadIdSet(idList);
     auto threadItems = getItems<ThreadListItem>();
 
-    for (ThreadListItem *item: threadItems)
-    {
+    for (ThreadListItem *item: threadItems) {
         if (threadIdSet.count(item->getThreadId()))
             updateItem(*item);
     }
@@ -257,8 +246,7 @@ void ThreadList::updateItems(const MsgIdList &idList)
 void ThreadList::updateItems()
 {
     auto items = getItems<ThreadListItem>();
-    for (ThreadListItem *item: items)
-    {
+    for (ThreadListItem *item: items) {
         updateItem(*item);
     }
 }
@@ -266,8 +254,7 @@ void ThreadList::updateItems()
 void ThreadList::updateItem(ThreadListItem &item)
 {
     MsgThreadItemRef msgThread = m_App.getMsgEngine().getStorage().getThread(item.getThreadId());
-    if (!msgThread)
-    {
+    if (!msgThread) {
         MSG_LOG_ERROR("msgThread is null");
         return;
     }
@@ -277,8 +264,7 @@ void ThreadList::updateItem(ThreadListItem &item)
     time_t threadTime = msgThread->getTime();
 
     if ((next && threadTime < next->getRawTime()) ||
-       (prev && threadTime > prev->getRawTime()))
-    {
+       (prev && threadTime > prev->getRawTime())) {
         auto newItem = new ThreadListItem(*msgThread, m_App);
         newItem->setCheckedState(item.getCheckedState(), false);
         item.destroy();
@@ -293,8 +279,7 @@ void ThreadList::updateItem(ThreadListItem &item)
 std::set<ThreadId> ThreadList::getThreadIdSet(const MsgIdList &idList)
 {
     std::set<ThreadId> res;
-    for (MsgId msgId : idList)
-    {
+    for (MsgId msgId : idList) {
         ThreadId threadId = m_App.getMsgEngine().getStorage().getThreadId(msgId);
         if (threadId.isValid())
             res.insert(threadId);
@@ -340,8 +325,7 @@ void ThreadList::onMsgStorageThreadDelete(const ThreadId &threadId)
 {
     MSG_LOG("");
     auto* thread = getItem(threadId);
-    if (thread)
-    {
+    if (thread) {
         ListView::deleteItem(*thread);
         updateSelectAllItem();
     }
@@ -360,8 +344,7 @@ void ThreadList::onTimeFormatChanged()
 {
     MSG_LOG("");
     auto items = ListView::getItems<ThreadListItem>();
-    for (ThreadListItem *item : items)
-    {
+    for (ThreadListItem *item : items) {
         item->updateTime();
     }
 
index fe746dee80f0f58cc8b0cec2db75babdfdeab465..4998a2efa2a3f8f7868b690385980f4bf5d4568d 100644 (file)
@@ -60,13 +60,11 @@ void ThreadListItem::update(const MsgThreadItem &threadItem, bool updateUi)
     State state = NormalState;
 
     MsgConversationListRef convList = m_App.getMsgEngine().getStorage().getConversationList(m_ThreadId);
-    if (convList && convList->getLength() > 0)
-    {
+    if (convList && convList->getLength() > 0) {
         MsgConversationItem &item = convList->at(convList->getLength() - 1);
 
         Message::NetworkStatus status = item.getNetworkStatus();
-        if (status == Message::NS_Sending)
-        {
+        if (status == Message::NS_Sending) {
             state = StatusState;
             m_Status = decorateSendingText(msg("IDS_MSG_BODY_SENDING_ING_M_STATUS_ABB"));
         } else if (status == Message::NS_Send_Fail) {
index 391bb6a2954ea332dafef6eb7ce1a430c8523fcb..4536f007d1a7382a266cea9e01d7227e6c1e6c9f 100644 (file)
@@ -54,8 +54,7 @@ void ThreadSearchList::setListener(IThreadSearchListListener *l)
 void ThreadSearchList::requestSearch(const std::string &searchWord)
 {
     m_SearchWord = searchWord;
-    if (!m_pIdler)
-    {
+    if (!m_pIdler) {
         m_pIdler = ecore_idler_add
         (
             [](void *data)->Eina_Bool
@@ -71,8 +70,7 @@ void ThreadSearchList::requestSearch(const std::string &searchWord)
 
 void ThreadSearchList::cancelSearch()
 {
-    if (m_pIdler)
-    {
+    if (m_pIdler) {
         ecore_idler_del(m_pIdler);
         m_pIdler = nullptr;
     }
@@ -88,17 +86,14 @@ void ThreadSearchList::search()
     MSG_LOG("Search word: ", m_SearchWord);
     ListView::clear();
 
-    if (!m_SearchWord.empty())
-    {
+    if (!m_SearchWord.empty()) {
         MsgStorage &msgSotrage = m_App.getMsgEngine().getStorage();
 
         // Thread:
         MsgThreadListRef threadList = msgSotrage.searchThread(m_SearchWord);
-        if (threadList)
-        {
+        if (threadList) {
             int length = threadList->getLength();
-            for (int i = 0; i < length; ++i)
-            {
+            for (int i = 0; i < length; ++i) {
                 const MsgThreadItem &threadItem = threadList->at(i);
                 ListView::appendItem(*new ThreadSearchListItem(m_App, threadItem, m_SearchWord));
             }
@@ -106,11 +101,9 @@ void ThreadSearchList::search()
 
         // Message:
         MessageListRef msgList = msgSotrage.searchMessage(m_SearchWord);
-        if (msgList)
-        {
+        if (msgList) {
             int length = msgList->getLength();
-            for (int i = 0; i < length; ++i)
-            {
+            for (int i = 0; i < length; ++i) {
                 const Message &msg = msgList->at(i);
                 ListView::appendItem(*new MsgSearchListItem(m_App, msg, m_SearchWord));
             }
@@ -124,8 +117,7 @@ void ThreadSearchList::search()
 void ThreadSearchList::updateTime()
 {
     auto items = ListView::getItems<BaseThreadListItem>();
-    for (BaseThreadListItem *item : items)
-    {
+    for (BaseThreadListItem *item : items) {
         item->updateTime();
     }
 
@@ -134,8 +126,7 @@ void ThreadSearchList::updateTime()
 
 void ThreadSearchList::onListItemSelected(ListItem &listItem)
 {
-    if (m_pListener)
-    {
+    if (m_pListener) {
         if (auto it = dynamic_cast<MsgSearchListItem*>(&listItem))
             m_pListener->onSearchListItemSelected(it->getMsgId(), m_SearchWord);
         else if (auto it = dynamic_cast<ThreadSearchListItem*>(&listItem))
index 9b43012e9b19a790ecc27c3b9b85e87886a3129b..8d25f64a2816a598b871bb8f2fd2d32a89c0037a 100644 (file)
 
 #include "View.h"
 
-namespace Msg
-{
+namespace Msg {
     class IFloatingButtonListener;
 
     class FloatingButton
-        : public View
-    {
+        : public View {
     public:
         FloatingButton(Evas_Object *parent);
 
@@ -42,8 +40,7 @@ namespace Msg
         IFloatingButtonListener* m_pListener;
     };
 
-    class IFloatingButtonListener
-    {
+    class IFloatingButtonListener {
     public:
         virtual ~IFloatingButtonListener() {};
         virtual void onFloatingButtonPressed() = 0;
index 7f526eaa27cee8a5d2948d4a28043ef79bac2097..f22cefcb3eda2327638ad3b8bcf7f08cb4980c04 100644 (file)
 #include "View.h"
 #include "DefaultLayout.h"
 
-namespace Msg
-{
+namespace Msg {
     class MsgThreadLayout
-        : public DefaultLayout
-    {
+        : public DefaultLayout {
         public:
             MsgThreadLayout(Evas_Object *parent);
             virtual ~MsgThreadLayout();
index 4e58d3fe980810f32720467f8384834cc311e4f9..978e78db3ef73578f6497a705d2f1068f4b9141c 100644 (file)
 #include "View.h"
 #include <string>
 
-namespace Msg
-{
+namespace Msg {
     class IMsgThreadSearchPanelListener;
 
     class MsgThreadSearchPanel
-        : public View
-    {
+        : public View {
         public:
             MsgThreadSearchPanel(Evas_Object *parent);
             virtual ~MsgThreadSearchPanel();
@@ -58,8 +56,7 @@ namespace Msg
             Ecore_Job *m_pEntryJob;
     };
 
-    class IMsgThreadSearchPanelListener
-    {
+    class IMsgThreadSearchPanelListener {
         public:
             virtual ~IMsgThreadSearchPanelListener() {};
 
index 9210f434cc815b897a3f9f5d7c09d999ace4881d..c36b01dd9dabbd7a4263967cce3e0155b680aa94 100644 (file)
 #include "ListItem.h"
 #include <string>
 
-namespace Msg
-{
+namespace Msg {
     class ThreadListViewItem
-        : public ListItem
-    {
+        : public ListItem {
         public:
-            enum State
-            {
+            enum State {
                 NormalState,
                 StatusState,
                 IconState
index d1fc4316bdbfa7c43fa4c47cad4a1be10f1556d7..2988ace6faa57fa783fa5f8acd9c06161e3c5977 100644 (file)
@@ -48,7 +48,5 @@ void FloatingButton::setListener(IFloatingButtonListener* pListener)
 void FloatingButton::pressed(Evas_Object *obj, void *event_info)
 {
     if (m_pListener)
-    {
         m_pListener->onFloatingButtonPressed();
-    }
 }
index 7f313707596a7b18901d2dab05f0bc40a584c75a..aef85226b7f8114ae693e9dfc036b0678ee55faa 100644 (file)
@@ -35,8 +35,7 @@ MsgThreadSearchPanel::MsgThreadSearchPanel(Evas_Object *parent)
 
 MsgThreadSearchPanel::~MsgThreadSearchPanel()
 {
-    if (m_pEntryJob)
-    {
+    if (m_pEntryJob) {
         ecore_job_del(m_pEntryJob);
         m_pEntryJob = nullptr;
     }
@@ -111,11 +110,9 @@ std::string MsgThreadSearchPanel::getEntryText() const
     std::string res;
     const char *plainText = elm_entry_entry_get(m_pEntry);
 
-    if (plainText)
-    {
+    if (plainText) {
         char *text = elm_entry_markup_to_utf8(elm_entry_entry_get(m_pEntry));
-        if (text)
-        {
+        if (text) {
             res.assign(text);
             free(text);
         }
index d6277ef6dd676ad472bf218e11ee78b92ffd8abb..4de810e4624aa7b224c510136e41aec87b7e7c7d 100644 (file)
@@ -27,8 +27,7 @@
 
 using namespace Msg;
 
-namespace
-{
+namespace {
     ListItemStyleRef threadItemStyle = ListItemStyle::create("msg_thread");
 
     const char *messagePart = "elm.text";
@@ -57,8 +56,7 @@ ThreadListViewItem::~ThreadListViewItem()
 
 std::string ThreadListViewItem::getText(ListItem &item, const char *part)
 {
-    if (!strcmp(part, messagePart))
-    {
+    if (!strcmp(part, messagePart)) {
         return getMessage();
     } else if (!strcmp(part, namePart)) {
         return getName();
@@ -76,12 +74,10 @@ Evas_Object *ThreadListViewItem::getContent(ListItem &item, const char *part)
 {
     Evas_Object *content = nullptr;
 
-    if (!strcmp(part, thumbnailPart))
-    {
+    if (!strcmp(part, thumbnailPart)) {
         content = getThumbnail();
     } else if (!strcmp(part, iconPart)) {
-        if (m_State == IconState)
-        {
+        if (m_State == IconState) {
             content = getIcon();
         }
     }
@@ -97,8 +93,7 @@ const char *ThreadListViewItem::getCheckPart(ListItem &item)
 void ThreadListViewItem::setState(State state, bool updateUi)
 {
     m_State = state;
-    if (updateUi)
-    {
+    if (updateUi) {
         updateFields(iconPart, ELM_GENLIST_ITEM_FIELD_CONTENT);
         updateFields(statusPart, ELM_GENLIST_ITEM_FIELD_TEXT);
     }
@@ -165,7 +160,5 @@ std::string ThreadListViewItem::decorateDraftText(const std::string &text) const
 void ThreadListViewItem::resetCheckMode(ListView &listView)
 {
     for (ListItem *item: listView.getRealizedItems())
-    {
         item->emitSignal("elm,state,reset_check", "elm");
-    }
 }
index d7663f5a5a73651cca70baae13f3f928b9fb77e0..75aee78963473a5b0f8a5b92d4250a75fc9f6eac 100644 (file)
@@ -30,8 +30,7 @@
 #include "SystemSettingsManager.h"
 #include "PopupList.h"
 
-namespace Msg
-{
+namespace Msg {
     class NaviFrameController;
     class MsgSettings;
 
@@ -43,8 +42,7 @@ namespace Msg
         , private IHwButtonListener
         , private IListViewListener
         , private IMsgStorageListener
-        , private ISystemSettingsManager
-    {
+        , private ISystemSettingsManager {
         public:
             MsgOnSimCard(NaviFrameController &parent);
             virtual ~MsgOnSimCard();
@@ -85,8 +83,7 @@ namespace Msg
             virtual void onLanguageChanged();
 
         private:
-            enum SimMode
-            {
+            enum SimMode {
                 NormalMode,
                 CopyToDeviceMode,
                 DeleteMode
index ec2efaf0d8df8045a83ff84d33e03f2995e0c9ba..5e901ef038f536ea2778e42132396fb8f733f8a2 100644 (file)
@@ -25,8 +25,7 @@
 #include "SystemSettingsManager.h"
 #include "SettingsSound.h"
 
-namespace Msg
-{
+namespace Msg {
     class NaviFrameController;
     class MsgSettings;
     class IMsgSettingsListener;
@@ -40,8 +39,7 @@ namespace Msg
         , private IListViewListener
         , private ISettingsListViewItemListener
         , private IMsgSettingsListener
-        , private ISystemSettingsManager
-    {
+        , private ISystemSettingsManager {
         public:
             /**
              * @brief A constructor of Settings object based on outside parent object.
index 74beeaac3811d2e454eeec162ea5af6ec1d7aef0..a4741482b558cf148394a402f955de2ae55f1382 100644 (file)
 
 #include "SettingsListViewItem.h"
 
-namespace Msg
-{
+namespace Msg {
     class Settings;
 
     /**
      * @brief Visual representation of particular element of message-settings list.
      */
     class SettingsListItem
-        : public SettingsListViewItem
-    {
+        : public SettingsListViewItem {
         public:
             typedef void (Settings::*MethodHandler)(SettingsListItem &item); /**< A delegate fired when user taps on particular settings list element. */
 
index 972625b421178ce5884798b938755effd4794f9a..719e1dd4f8a0553f6a5ca96f8c56610cbce49b7f 100644 (file)
 
 #include "AppControlLauncher.h"
 
-namespace Msg
-{
+namespace Msg {
     class MsgSettings;
 
     /**
      * @brief This class is aimed to launch preinstalled utility from settings-app that allows to chose message-alert sound.
      */
     class SettingsSound
-        : public AppControlHandle
-    {
+        : public AppControlHandle {
         public:
             /**
              * @brief Constructs an instance of SettingsSound based on message-service settings wrapper passed from outside.
index 240264980afa33fe313149b2ec719696f665b47a..96dedf5ed35a1ce68c1eb89c4c67fb0fa9527100 100644 (file)
 #include <string>
 #include "MessageSMS.h"
 
-namespace Msg
-{
+namespace Msg {
     /**
      * @brief Visual representation of an element in "Messages on SIM" list.
      */
     class SimListViewItem
-        : public ListItem
-    {
+        : public ListItem {
         public:
             /**
              * @brief Creates element of "Messages on SIM" list based on message-service structure and genlist item type passed from outside.
index 4ff0ed07c5373b394acb7abe7ada74d758b976e5..cc751720a60dad0e6e341b91b2010ff668961ab5 100644 (file)
@@ -75,8 +75,7 @@ void MsgOnSimCard::fillList()
 {
     MessageSMSListRef list = getMsgEngine().getStorage().getSimMsgList();
     int length = list->getLength();
-    for (int i = 0; i < length; ++i)
-    {
+    for (int i = 0; i < length; ++i) {
         SimListViewItem *item = new SimListViewItem(list->at(i));
         m_pList->appendItem(*item);
     }
@@ -99,10 +98,8 @@ void MsgOnSimCard::onAttached(ViewItem &item)
 
 void MsgOnSimCard::onButtonClicked(NaviFrameItem &item, NaviButtonId buttonId)
 {
-    if (buttonId == NaviOkButtonId)
-    {
-        if (m_SimMode == DeleteMode)
-        {
+    if (buttonId == NaviOkButtonId) {
+        if (m_SimMode == DeleteMode) {
             deleteSelectedItems();
         } else if (m_SimMode == CopyToDeviceMode) {
             copySelectedItems();
@@ -115,8 +112,7 @@ void MsgOnSimCard::onButtonClicked(NaviFrameItem &item, NaviButtonId buttonId)
 
 void MsgOnSimCard::onListItemChecked(ListItem &listItem)
 {
-    if (dynamic_cast<SelectAllListItem*>(&listItem))
-    {
+    if (dynamic_cast<SelectAllListItem*>(&listItem)) {
         bool checked = listItem.getCheckedState();
         m_pList->checkAllItems(checked);
     }
@@ -147,8 +143,7 @@ void MsgOnSimCard::onHwBackButtonClicked()
 
 void MsgOnSimCard::showCopyDeletePopup()
 {
-    if (!m_pList->isEmpty())
-    {
+    if (!m_pList->isEmpty()) {
         PopupList &listPopup = getApp().getPopupManager().getMorePopup();
         listPopup.appendItem(msg("IDS_MSG_OPT_COPY_TO_DEVICE_ABB"), POPUPLIST_ITEM_PRESSED_CB(MsgOnSimCard, onCopyToDeviceItemPressed), this);
         listPopup.appendItem(msg("IDS_MSG_OPT_DELETE"), POPUPLIST_ITEM_PRESSED_CB(MsgOnSimCard, onDeleteItemPressed), this);
@@ -171,12 +166,9 @@ void MsgOnSimCard::onDeleteItemPressed(PopupListItem &item)
 void MsgOnSimCard::onMsgStorageDelete(const MsgIdList &msgIdList)
 {
     auto simListItems = m_pList->getItems<SimListViewItem>();
-    for (auto &itemId: msgIdList)
-    {
-        for (auto *simItem : simListItems)
-        {
-            if (simItem->getMsgId() == itemId)
-            {
+    for (auto &itemId: msgIdList) {
+        for (auto *simItem : simListItems) {
+            if (simItem->getMsgId() == itemId) {
                 simItem->destroy();
                 break;
             }
@@ -190,20 +182,16 @@ void MsgOnSimCard::setMode(SimMode mode)
     if (m_SimMode == mode)
         return;
 
-    switch (mode)
-    {
+    switch (mode) {
         case CopyToDeviceMode:
             setCopyToDeviceMode(true);
             break;
-
         case DeleteMode:
             setDeleteMode(true);
             break;
-
         case NormalMode:
             setNormalMode();
             break;
-
         default:
             MSG_ASSERT(false, "Not supported mode");
             break;
@@ -213,16 +201,13 @@ void MsgOnSimCard::setMode(SimMode mode)
 void MsgOnSimCard::setNormalMode()
 {
     // Reset previus mode:
-    switch (m_SimMode)
-    {
+    switch (m_SimMode) {
         case CopyToDeviceMode:
             setCopyToDeviceMode(false);
             break;
-
         case DeleteMode:
             setDeleteMode(false);
             break;
-
         default:
             break;
     }
@@ -262,8 +247,7 @@ void MsgOnSimCard::setTitleWithButtons(bool value)
 
     getNaviBar().clear();
     getNaviBar().showButton(NaviOkButtonId, value);
-    if (value)
-    {
+    if (value) {
         if (m_SimMode == DeleteMode)
             getNaviBar().setButtonText(NaviOkButtonId, msgt("IDS_MSG_ACBUTTON_DELETE_ABB"));
         else
@@ -283,9 +267,10 @@ void MsgOnSimCard::deleteSelectedItems()
     auto items = m_pList->getItems<SimListViewItem>();
 
     MsgIdList messages;
-    for (auto *item : items)
+    for (auto *item : items) {
         if (item->getCheckedState())
             messages.push_back(item->getMsgId());
+    }
 
     getApp().getMsgEngine().getStorage().deleteMessages(messages);
 }
@@ -293,13 +278,10 @@ void MsgOnSimCard::deleteSelectedItems()
 void MsgOnSimCard::copySelectedItems()
 {
     auto items = m_pList->getItems<SimListViewItem>();
-    for (auto *item : items)
-    {
-        if (item->getCheckedState())
-        {
+    for (auto *item : items) {
+        if (item->getCheckedState()) {
             MessageRef msg = getApp().getMsgEngine().getStorage().getMessage(item->getMsgId());
-            if (msg)
-            {
+            if (msg) {
                 msg->setMessageStorageType(Message::MS_Phone);
                 getApp().getMsgEngine().getStorage().saveMessage(*msg, false);
             }
@@ -312,10 +294,8 @@ void MsgOnSimCard::showSelectAllItem(bool show, bool resetCheck)
 {
     SelectAllListItem *item = dynamic_cast<SelectAllListItem*>(m_pList->getFirstItem());
 
-    if (show)
-    {
-        if (!item)
-        {
+    if (show) {
+        if (!item) {
             item = new SelectAllListItem;
             m_pList->prependItem(*item);
         }
@@ -333,8 +313,7 @@ void MsgOnSimCard::calcChecked(int &check, int &total) const
     check = 0;
     total = 0;
     auto items = m_pList->getItems<SimListViewItem>();
-    for (ListItem *item: items)
-    {
+    for (ListItem *item: items) {
         if (item->getCheckedState())
             ++check;
         ++total;
index ac014ffe9e3f33dc44b0d821b2e3e68eba5806f2..b79f4aeb05b2414cae9f7f17135d03ecaf9fad1b 100644 (file)
@@ -332,8 +332,7 @@ void Settings::autoRetItemHandler(SettingsListItem &item)
     MSG_LOG("");
     getMsgSettings().setMmsAutoRetr(item.getCheckButtonState());
     bool mmsAutoRetr = getMsgSettings().getMmsAutoRetr();
-    if (mmsAutoRetr)
-    {
+    if (mmsAutoRetr) {
         // Restore:
         if (isExistingMmsAutoRetrRoamingBackup())
             getMsgSettings().setMmsAutoRetrRoaming(getMmsAutoRetrRoamingBackup());
@@ -375,8 +374,7 @@ void Settings::onListItemSelected(ListItem &listItem)
     MSG_LOG("Item: ", &listItem);
     listItem.setSelected(false);
     SettingsListItem *settingItem = dynamic_cast<SettingsListItem*>(&listItem);
-    if (settingItem)
-    {
+    if (settingItem) {
         settingItem->changeCheckButtonState();
         callItemHandler(*settingItem);
     }
index bef4ca02f958ffab83c7a6d75f14620d3c7953f5..2000532632dfa5cec75165c6f1bdca1d30d40f7f 100644 (file)
@@ -22,8 +22,7 @@
 
 using namespace Msg;
 
-namespace
-{
+namespace {
     const char *sRingtoneValuePath = "/opt/share/settings/Alerts";
     const char *sRingtoneKeySilent = "silent";
     const char *sRingtoneKeyDefault = "default";
index 599208fb6327da24e4b30f0d20e24ca23c99f692..4f1cd4787e70fbeec5a7009ec3e70990ad552e78 100644 (file)
@@ -25,8 +25,7 @@
 
 using namespace Msg;
 
-namespace
-{
+namespace {
     ListItemStyleRef SimItemStyle = ListItemStyle::create("multiline");
 
     const char *messagePart = "elm.text.multiline";
@@ -52,9 +51,7 @@ void SimListViewItem::updateModel(const MessageSMS &msg)
     const MsgAddressList &addressList = msg.getAddressList();
     int length = addressList.getLength();
     for (int i = 0; i < length; ++i)
-    {
         m_Name += addressList.at(i).getAddress();
-    }
 
     m_MessageText = msg.getText();
     m_Time = TimeUtils::makeDateTimeString(msg.getTime());
index 6ca2912b124e3a57299417e78546ed57ed57e37b..4c548b9e0a29165d987e1b0d24ab7c915a750e03 100644 (file)
 #include "ListItem.h"
 #include <string>
 
-namespace Msg
-{
+namespace Msg {
     /**
      * @brief Visual representation of grouping settings list items(a genlist item with "group_index" style).
      */
     class SettingsGroupListViewItem
-        : public ListItem
-    {
+        : public ListItem {
         public:
             /**
              * @brief Constructs genlist-item with "group_index style" and title based on text passed from outside.
index 46c553c3b8b8d38dd5f9095ba63761d9c0116b39..f689ed7ae05cef6b84528301c80f0b7609d254fb 100644 (file)
 
 #include "ListItem.h"
 
-namespace Msg
-{
+namespace Msg {
     class ISettingsListViewItemListener;
 
     /**
      * @brief Generic visual representation of messages-settings list element.
      */
     class SettingsListViewItem
-        : public ListItem
-    {
+        : public ListItem {
         public:
             static ListItemStyleRef multiLineStyle;     /**< style for "multiline" genlist-item. */
             static ListItemStyleRef multiLineIconStyle; /**< style for "multiline + icon" genlist-item. */
@@ -110,8 +108,7 @@ namespace Msg
     /**
      * @brief Listener to send list-item events to subscribers.
      */
-    class ISettingsListViewItemListener
-    {
+    class ISettingsListViewItemListener {
         public:
             virtual ~ISettingsListViewItemListener(){}
 
index cdf2e0a74898a1fcf717dfa885e29020811934be..f78598f2a2da53ddbaea1f43c0433ddc1449e578 100644 (file)
 #include "View.h"
 #include "DefaultLayout.h"
 
-namespace Msg
-{
+namespace Msg {
     /**
      * @brief Represents a layout of "Messages on SIM" view.
      */
     class SimMsgLayout
-        : public DefaultLayout
-    {
+        : public DefaultLayout {
         public:
             /**
              * @brief Constructs an instance of SimMsgLayout based on parent passed from outside.
index 3b9dde38891717f7cd0c72ebdbcc25de7f89c6c4..b9e704afc7875bf9d8e4081457e62443a6ec7e24 100644 (file)
@@ -19,8 +19,7 @@
 
 using namespace Msg;
 
-namespace
-{
+namespace {
     ListItemStyleRef itemStyle = ListItemStyle::create("group_index");
 }
 
index 2f0133e606f4831f7e3c7d0b79982e06941d5330..3ab97feb586f14a30c4a4cae5506a891cac2648b 100644 (file)
@@ -54,8 +54,7 @@ void SettingsListViewItem::disabledCheckButton(bool disabled)
 
 void SettingsListViewItem::setCheckButtonState(bool state)
 {
-    if (m_CheckButtonState != state)
-    {
+    if (m_CheckButtonState != state) {
         m_CheckButtonState = state;
         update();
     }
@@ -83,8 +82,7 @@ void SettingsListViewItem::setSubText(const std::string &text)
 
 std::string SettingsListViewItem::getText(ListItem &item, const char *part)
 {
-    if (getStyle().get() == oneLineIconStyle.get())
-    {
+    if (getStyle().get() == oneLineIconStyle.get()) {
         if (strcmp(part, "elm.text") == 0)
             return msg(m_MainText);
     } else if (getStyle().get() == multiLineStyle.get() || getStyle().get() == multiLineIconStyle.get()) {
@@ -101,8 +99,7 @@ std::string SettingsListViewItem::getText(ListItem &item, const char *part)
 
 Evas_Object *SettingsListViewItem::getContent(ListItem &item, const char *part)
 {
-    if (getStyle().get() == oneLineIconStyle.get() || getStyle().get() == multiLineIconStyle.get())
-    {
+    if (getStyle().get() == oneLineIconStyle.get() || getStyle().get() == multiLineIconStyle.get()) {
         if (strcmp(part, "elm.swallow.end") == 0)
             return createCheckButton(*getOwner());
     } else if (getStyle().get() == multiLineStyle.get()) {
@@ -116,8 +113,7 @@ Evas_Object *SettingsListViewItem::getContent(ListItem &item, const char *part)
 Evas_Object *SettingsListViewItem::createCheckButton(Evas_Object *parent)
 {
     Evas_Object *check = nullptr;
-    if (m_ShowCheckButton)
-    {
+    if (m_ShowCheckButton) {
         check = elm_check_add(parent);
         elm_object_focus_allow_set(check, false);
         elm_object_style_set(check, "on&off");
index e040e28821b27fd31bf708e68a248a67f8aed4bf..940b52f00c78a4d5e223c7439fdd7ca86a1a3496 100644 (file)
 
 #include <list>
 
-namespace Msg
-{
+namespace Msg {
     class SmilImageItemView;
     class FileViewer;
 
     class SmilPage
         : public SmilPageLayout
         , private ISmilSaveAllItemViewListener
-        , private ISmilAttachmentItemViewListener
-    {
+        , private ISmilAttachmentItemViewListener {
         public:
             SmilPage(Evas_Object *parent, FileViewer &fileViewer, const MsgPage &page);
             SmilPage(Evas_Object *parent, FileViewer &fileViewer, const MsgAttachmentList &list);
index fde78504954529d3e6c1f9d806c124e34fe08a5a..c964ae82d9c8e57b73f86f56b5823624c375bc1b 100644 (file)
 #include <vector>
 #include <memory>
 
-namespace Msg
-{
+namespace Msg {
     class ISmilPlayerListener;
 
     class SmilPlayer
         : public SmilPlayerView
-        , private IMediaPlayerListener
-    {
+        , private IMediaPlayerListener {
         public:
             typedef std::vector<SmilPage*> PageList;
-            enum State
-            {
+            enum State {
                 StopState, // Stop = Pause
                 PlayState,
             };
@@ -99,8 +96,7 @@ namespace Msg
             FileViewer m_FileViewer;
     };
 
-    class ISmilPlayerListener
-    {
+    class ISmilPlayerListener {
         public:
             virtual ~ISmilPlayerListener() {}
             virtual void onSmilPlayerPageChanged() {};
index d348f14a61920669753fe87a5e5b0c190ea792a1..5cac09acce86926bba80de92b7e723cd1736933a 100644 (file)
@@ -33,8 +33,7 @@
 #include "MsgStorage.h"
 #include "ContactViewer.h"
 
-namespace Msg
-{
+namespace Msg {
     class NaviFrameController;
 
     class Viewer
@@ -46,8 +45,7 @@ namespace Msg
         , private IConversationListener
         , private ISmilPlayerListener
         , private ISystemSettingsManager
-        , private IMsgStorageListener
-    {
+        , private IMsgStorageListener {
         public:
             Viewer(NaviFrameController &parent, MsgId id);
             virtual ~Viewer();
index 1d94c9ceb48886608463e2c6d9258d71744296e1..f8d40d9e356fedb85632877e57932227887d317d 100644 (file)
@@ -116,8 +116,7 @@ void SmilPage::playAnimation(bool play)
 const MsgMedia *SmilPage::getMedia(const MsgPage &page, MsgMedia::Type type) const
 {
     const MsgMediaList &list = page.getMediaList();
-    for (int i = 0; i < list.getLength(); ++i)
-    {
+    for (int i = 0; i < list.getLength(); ++i) {
         if (list[i].getType() == type)
             return &list[i];
     }
@@ -127,8 +126,7 @@ const MsgMedia *SmilPage::getMedia(const MsgPage &page, MsgMedia::Type type) con
 bool SmilPage::isEmpty(const MsgPage &page)
 {
     const MsgMediaList &list = page.getMediaList();
-    for (int i = 0; i < list.getLength(); ++i)
-    {
+    for (int i = 0; i < list.getLength(); ++i) {
         const MsgMedia &media = list[i];
         std::string filePath = media.getFilePath();
         if (media.getType() != MsgMedia::UnknownType && FileUtils::getFileSize(filePath) > 0)
@@ -142,16 +140,14 @@ void SmilPage::build(const MsgPage &page)
     m_Duration = page.getPageDuration() / 1000.0 + 0.5;
 
     const MsgMediaList &list = page.getMediaList();
-    for (int i = 0; i < list.getLength(); ++i)
-    {
+    for (int i = 0; i < list.getLength(); ++i) {
         m_Attachments.push_back(list[i].getFilePath());
     }
 
     const MsgMedia *video = getMedia(page, MsgMedia::VideoType);
-    if (video)
+    if (video) {
         buildVideo(*video);
-    else
-    {
+    } else {
         const MsgMedia *image = getMedia(page, MsgMedia::ImageType);
         if (image)
             buildImage(*image);
@@ -161,8 +157,7 @@ void SmilPage::build(const MsgPage &page)
     if (text)
         buildText(*text);
 
-    if (!video)
-    {
+    if (!video) {
         const MsgMedia *audio = getMedia(page, MsgMedia::AudioType);
         if (audio)
             buildAudio(*audio);
@@ -178,8 +173,7 @@ void SmilPage::build(const MsgAttachmentList &list)
 {
     m_Duration = defaultPageDuration;
 
-    for (int i = 0; i < list.getLength(); ++i)
-    {
+    for (int i = 0; i < list.getLength(); ++i) {
         m_Attachments.push_back(list[i].getFilePath());
     }
 
@@ -188,8 +182,7 @@ void SmilPage::build(const MsgAttachmentList &list)
 
     buildAttachmentInfo(list.getLength());
     buildSaveAllItem(list.getLength());
-    for (int i = 0; i < list.getLength(); ++i)
-    {
+    for (int i = 0; i < list.getLength(); ++i) {
         buildAttachment(list[i]);
     }
 }
@@ -205,8 +198,7 @@ void SmilPage::buildImage(const MsgMedia &media)
 void SmilPage::buildText(const MsgMedia& media)
 {
     std::string text = FileUtils::readTextFile(media.getFilePath());
-    if (!text.empty())
-    {
+    if (!text.empty()) {
         SmilTextItemView *item = new SmilTextItemView(getBox(), text);
         item->show();
         appendItem(*item);
@@ -219,8 +211,7 @@ void SmilPage::buildAudio(const MsgMedia& media)
     m_HasAudio = true;
 
     int duration = MediaUtils::getDurationSec(m_MediaPath);
-    if (duration == 0)
-    {
+    if (duration == 0) {
         m_HasInvalidFiles = true;
         return;
     }
@@ -239,8 +230,7 @@ void SmilPage::buildVideo(const MsgMedia& media)
     m_MediaPath = media.getFilePath();
 
     int duration = MediaUtils::getDurationSec(m_MediaPath);
-    if (duration == 0)
-    {
+    if (duration == 0) {
         m_HasInvalidFiles = true;
         return;
     }
@@ -251,8 +241,7 @@ void SmilPage::buildVideo(const MsgMedia& media)
     int height = 0;
     MediaUtils::getFrameSize(m_MediaPath, width, height);
 
-    if (width * height == 0)
-    {
+    if (width * height == 0) {
         MSG_LOG_ERROR("Wrong video dimension");
         m_HasInvalidFiles = true;
         return;
index 68c713480a1e7f12e47eba3226d1568b6aebb891..01cbafc3bb23f623b736dbe6f02e5f379178f88a 100644 (file)
@@ -43,11 +43,9 @@ void SmilPlayer::create(const MessageMms &mms)
 {
     // Pages:
     const MsgPageList &pages = mms.getPageList();
-    for (int i = 0; i < pages.getLength(); ++i)
-    {
+    for (int i = 0; i < pages.getLength(); ++i) {
         const MsgPage &page = pages[i];
-        if (!SmilPage::isEmpty(page))
-        {
+        if (!SmilPage::isEmpty(page)) {
             SmilPage *smilPage = new SmilPage(getEo(), m_FileViewer, page);
             m_Duration += smilPage->getDuration();
             m_PageList.push_back(smilPage);
@@ -55,8 +53,7 @@ void SmilPlayer::create(const MessageMms &mms)
     }
 
     // Attachment:
-    if (!mms.getAttachmentList().isEmpty())
-    {
+    if (!mms.getAttachmentList().isEmpty()) {
         SmilPage *smilPage = new SmilPage(getEo(), m_FileViewer, mms.getAttachmentList());
         m_Duration += smilPage->getDuration();
         m_PageList.push_back(smilPage);
@@ -73,8 +70,7 @@ void SmilPlayer::setListener(ISmilPlayerListener *l)
 
 void SmilPlayer::startTimer(int sec)
 {
-    if (m_pTimer)
-    {
+    if (m_pTimer) {
         ecore_timer_del(m_pTimer);
         m_pTimer = nullptr;
     }
@@ -115,8 +111,7 @@ Eina_Bool SmilPlayer::onTick()
 
 void SmilPlayer::setState(State state)
 {
-    if (m_State != state)
-    {
+    if (m_State != state) {
         m_State = state;
         if (m_pListener)
             m_pListener->onSmilPlayerStateChanged();
@@ -130,10 +125,8 @@ SmilPlayer::State SmilPlayer::getState() const
 
 void SmilPlayer::start()
 {
-    if (m_pTimer)
-    {
-        if (canPlay(getCurrentPage()))
-        {
+    if (m_pTimer) {
+        if (canPlay(getCurrentPage())) {
             MSG_LOG("Continue");
             setState(PlayState);
             continueTimer();
@@ -176,11 +169,9 @@ bool SmilPlayer::playPage()
     startTimer(page->getDuration());
     playAnimation(true);
 
-    if (page->hasMedia())
-    {
+    if (page->hasMedia()) {
         prepareMedia();
-        if (!canPlay(page))
-        {
+        if (!canPlay(page)) {
             stop();
             showUnableToPlayNotif(*page);
             return false;
@@ -199,17 +190,14 @@ bool SmilPlayer::playPage()
 
 void SmilPlayer::prepareMedia()
 {
-    if (m_MediaPlayer)
-    {
+    if (m_MediaPlayer) {
         m_MediaPlayer->stop();
         m_MediaPlayer->setPosition(0);
     }
 
     SmilPage *page = getCurrentPage();
-    if (page->hasMedia())
-    {
-        if (!m_MediaPlayer)
-        {
+    if (page->hasMedia()) {
+        if (!m_MediaPlayer) {
             m_MediaPlayer.reset(new MediaPlayer);
             m_MediaPlayer->setListener(this);
         }
@@ -231,8 +219,7 @@ bool SmilPlayer::canPlay(SmilPage *page)
     if (!page)
         return false;
 
-    if (page->hasMedia() && m_MediaPlayer && !m_MediaPlayer->getFocus())
-    {
+    if (page->hasMedia() && m_MediaPlayer && !m_MediaPlayer->getFocus()) {
         showUnableToPlayNotif(*page);
         return false;
     }
@@ -261,9 +248,7 @@ double SmilPlayer::getPosition() const
 {
     unsigned pos = 0;
     for (unsigned i = 0; i < m_CurrentPageIndex; ++i)
-    {
         pos += m_PageList[i]->getDuration();
-    }
 
     pos += m_PageTickCounter;
 
@@ -287,8 +272,7 @@ int SmilPlayer::getDuration() const
 
 bool SmilPlayer::nextPage()
 {
-    if (probeNextPage())
-    {
+    if (probeNextPage()) {
         stopMedia();
         ++m_CurrentPageIndex;
         playPage();
@@ -299,8 +283,7 @@ bool SmilPlayer::nextPage()
 
 bool SmilPlayer::prevPage()
 {
-    if (probePrevPage())
-    {
+    if (probePrevPage()) {
         stopMedia();
         --m_CurrentPageIndex;
         playPage();
@@ -355,12 +338,9 @@ void SmilPlayer::onBeforeDelete(View &view)
     stop();
 
     for (SmilPage *page : m_PageList)
-    {
         page->destroy();
-    }
 
-    if (m_pTimer)
-    {
+    if (m_pTimer) {
         ecore_timer_del(m_pTimer);
         m_pTimer = nullptr;
     }
@@ -368,13 +348,10 @@ void SmilPlayer::onBeforeDelete(View &view)
 
 void SmilPlayer::onMediaPlayerSoundFocusChanged()
 {
-    if (m_MediaPlayer->isPlaying() && !m_MediaPlayer->getFocus())
-    {
+    if (m_MediaPlayer->isPlaying() && !m_MediaPlayer->getFocus()) {
         SmilPage *page = getCurrentPage();
-        if (page)
-        {
-            if (page->hasMedia())
-            {
+        if (page) {
+            if (page->hasMedia()) {
                 showUnableToPlayNotif(*page);
                 stop();
             }
index d2a3d5dd448d8ddab4da81916f66a508243acaaa..bcfe8e9576a674f9ffc7cd60173c5ae94f22997b 100644 (file)
@@ -32,8 +32,7 @@
 
 using namespace Msg;
 
-namespace
-{
+namespace {
     std::string makeTimeStr(int timeSec)
     {
         const int digitCount = 2;
@@ -92,8 +91,7 @@ void Viewer::updateRecipPanel()
 void Viewer::create(MsgId id)
 {
     m_Msg = std::dynamic_pointer_cast<MessageMms>(getMsgEngine().getStorage().getMessage(id));
-    if (!m_Msg)
-    {
+    if (!m_Msg) {
         MSG_LOG_ERROR("Can't get message by id");
         // Create empty message:
         m_Msg = getMsgEngine().getComposer().createMms();
@@ -118,8 +116,7 @@ void Viewer::create(MsgId id)
 
 void Viewer::createLayout()
 {
-    if (!m_pLayout)
-    {
+    if (!m_pLayout) {
         m_pLayout = new ViewerLayout(getParent());
         m_pLayout->setListener(this);
         m_pLayout->show();
@@ -128,8 +125,7 @@ void Viewer::createLayout()
 
 void Viewer::createSubjectLayout()
 {
-    if (!m_pSubjectLayout)
-    {
+    if (!m_pSubjectLayout) {
         int numberOfPages = m_pSmilPlayer ? m_pSmilPlayer->getPages().size() : 0;
         m_pSubjectLayout = new SubjectLayout(*m_pLayout);
         m_pSubjectLayout->setNumberOfPages(numberOfPages);
@@ -141,8 +137,7 @@ void Viewer::createSubjectLayout()
 
 void Viewer::createPlayerControl()
 {
-    if (!m_pPlayerControl)
-    {
+    if (!m_pPlayerControl) {
         m_pPlayerControl = new PlayerControl(*m_pLayout);
 
         m_pPlayerControl->setListener(this);
@@ -158,8 +153,7 @@ void Viewer::createPlayerControl()
 
 void Viewer::createRecipPanel()
 {
-    if (!m_pRecipPanel && m_Msg->getAddressList().getLength() > 1)
-    {
+    if (!m_pRecipPanel && m_Msg->getAddressList().getLength() > 1) {
         m_pRecipPanel = new MbeRecipients(*m_pLayout, getApp());
         m_pRecipPanel->addSmartCb("item,clicked", SMART_CALLBACK(Viewer, onRecipItemClicked), this);
         m_pRecipPanel->show();
@@ -170,8 +164,7 @@ void Viewer::createRecipPanel()
 
 void Viewer::createSmilPlayer()
 {
-    if (!m_pSmilPlayer)
-    {
+    if (!m_pSmilPlayer) {
         m_pSmilPlayer = new SmilPlayer(*m_pLayout, *m_Msg);
         m_pSmilPlayer->setListener(this);
         m_pSmilPlayer->show();
@@ -182,8 +175,7 @@ void Viewer::createSmilPlayer()
 void Viewer::naviExpandButtonHandler()
 {
     MSG_LOG("");
-    if (m_pRecipPanel)
-    {
+    if (m_pRecipPanel) {
         bool isRecipInvisible = !m_pLayout->isRecipientsVisible();
         m_pLayout->showRecipients(isRecipInvisible);
         getNaviBar().setDownButtonState(isRecipInvisible);
@@ -193,8 +185,7 @@ void Viewer::naviExpandButtonHandler()
 void Viewer::naviCenterButtonHandler()
 {
     MSG_LOG("");
-    if (m_pRecipPanel)
-    {
+    if (m_pRecipPanel) {
         naviExpandButtonHandler();
     } else {
         const MsgAddressList &addressList = m_Msg->getAddressList();
@@ -240,8 +231,7 @@ void Viewer::updatePlayPos()
 
 void Viewer::updateSubject()
 {
-    if (m_pSubjectLayout)
-    {
+    if (m_pSubjectLayout) {
         std::string subject = m_Msg->getSubject();
         if (subject.empty())
             subject = msg("IDS_MSGF_BODY_NO_SUBJECT");
@@ -289,20 +279,16 @@ void Viewer::onHwMoreButtonClicked()
 void Viewer::onButtonClicked(NaviFrameItem &item, NaviButtonId buttonId)
 {
     MSG_LOG("");
-    switch (buttonId)
-    {
+    switch (buttonId) {
         case NaviCenterButtonId:
             naviCenterButtonHandler();
             break;
-
         case NaviPrevButtonId:
             naviPrevButtonHandler();
             break;
-
         case NaviExpandButtonId:
             naviExpandButtonHandler();
             break;
-
         default:
             break;
     };
@@ -348,7 +334,7 @@ void Viewer::onMakeVoiceItemPressed(PopupListItem &item)
 {
     MSG_LOG("");
     item.getParent().destroy();
-   VoiceCall::launch(m_SelectedAddress);
+    VoiceCall::launch(m_SelectedAddress);
 }
 
 void Viewer::onCreateContactItemPressed(PopupListItem &item)
@@ -453,8 +439,7 @@ void Viewer::onLanguageChanged()
 void Viewer::onMsgStorageDelete(const MsgIdList &msgIdList)
 {
     MSG_LOG("");
-    if (m_Msg)
-    {
+    if (m_Msg) {
         MsgId id = m_Msg->getId();
         if (std::find(msgIdList.begin(), msgIdList.end(), id) != msgIdList.end())
             pop();
index a5cbcfc7aa8d638ab1a4d536ae8b79ab931c729b..50d3cfe573c34dd6f13e8c4da8821984b3967f48 100644 (file)
 #include <string>
 #include <Evas.h>
 
-namespace Msg
-{
+namespace Msg {
     class IMediaPlayerListener;
 
-    class MediaPlayer
-    {
+    class MediaPlayer {
         public:
             MediaPlayer();
             ~MediaPlayer();
@@ -67,8 +65,7 @@ namespace Msg
             sound_stream_info_h m_StreamInfo;
     };
 
-    class IMediaPlayerListener
-    {
+    class IMediaPlayerListener {
         public:
             virtual ~IMediaPlayerListener() {}
             virtual void onMediaPlayerCompleted() {};
index 6cab219ed9312cfa0b6d870e61df909207139444..c8c7229a17bc7cf92d7348db3740f4f959deefee 100644 (file)
@@ -28,11 +28,9 @@ MediaPlayer::MediaPlayer()
     , m_StreamInfo()
 {
     sound_manager_create_stream_information(SOUND_STREAM_TYPE_MEDIA, on_sound_stream_focus_state_changed_cb, this, &m_StreamInfo);
-    if (m_StreamInfo)
-    {
+    if (m_StreamInfo) {
         player_create(&m_Player);
-        if (m_Player)
-        {
+        if (m_Player) {
             player_set_sound_type(m_Player, SOUND_TYPE_MEDIA);
             player_set_volume(m_Player, 1.0, 1.0);
             player_set_looping(m_Player, false);
@@ -50,8 +48,7 @@ MediaPlayer::~MediaPlayer()
     if (m_StreamInfo)
         sound_manager_destroy_stream_information(m_StreamInfo);
 
-    if (m_Player)
-    {
+    if (m_Player) {
         player_unprepare(m_Player);
         player_destroy(m_Player);
     }
@@ -84,8 +81,7 @@ bool MediaPlayer::getFocus() const
     int flags = 0;
     char *extraInfo = nullptr;
 
-    if (sound_manager_get_current_playback_focus(&acquiredBy, &flags, &extraInfo) == SOUND_MANAGER_ERROR_NONE)
-    {
+    if (sound_manager_get_current_playback_focus(&acquiredBy, &flags, &extraInfo) == SOUND_MANAGER_ERROR_NONE) {
         free(extraInfo);
         return !isCallReason(acquiredBy);
     }
@@ -151,12 +147,10 @@ void MediaPlayer::setPosition(int msec)
 int MediaPlayer::getDuration(const std::string &uri)
 {
     int msec = 0;
-    if (!uri.empty())
-    {
+    if (!uri.empty()) {
         player_h player = {};
         player_create(&player);
-        if (player_set_uri(player, uri.c_str()) == PLAYER_ERROR_NONE)
-        {
+        if (player_set_uri(player, uri.c_str()) == PLAYER_ERROR_NONE) {
             player_prepare(player);
             player_get_duration(player, &msec);
             player_unprepare(player);
@@ -188,8 +182,7 @@ void MediaPlayer::on_sound_stream_focus_state_changed_cb(sound_stream_info_h str
 {
     MSG_LOG("Interrupted focus change reason = ", reason);
     auto *self = static_cast<MediaPlayer*>(user_data);
-    if (isCallReason(reason))
-    {
+    if (isCallReason(reason)) {
         ecore_main_loop_thread_safe_call_async(
         [](void *data)
         {
index 80898324161be22ae729fabd3fd5bb50f69afa2e..fce232b30539d42e46b5a6a3c01f5b7baf115d88 100644 (file)
 
 #include "View.h"
 
-namespace Msg
-{
+namespace Msg {
     class IPlayerControlListener;
 
     class PlayerControl
-        : public View
-    {
+        : public View {
         public:
-            enum PlayPauseState
-            {
+            enum PlayPauseState {
                 PlayState,
                 PauseState
             };
@@ -59,8 +56,7 @@ namespace Msg
             Evas_Object *m_pProgress;
     };
 
-    class IPlayerControlListener
-    {
+    class IPlayerControlListener {
         public:
             virtual ~IPlayerControlListener() {}
 
index 03150715b9bee41360b44f076f651ebc72e2bbbd..560d6bfd4083746c6dba83d70a25a4815bd799d8 100644 (file)
 
 #include "View.h"
 
-namespace Msg
-{
+namespace Msg {
     class ISmilAttachmentItemViewListener;
     class ISmilSaveAllItemViewListener;
 
     // SmilAttachmentItemView:
     class SmilAttachmentItemView
-        : public View
-    {
+        : public View {
         public:
             SmilAttachmentItemView(Evas_Object *parent);
             virtual ~SmilAttachmentItemView();
@@ -46,8 +44,7 @@ namespace Msg
 
     // SmilAttachmentInfoItemView :
     class SmilAttachmentInfoItemView
-        : public View
-    {
+        : public View {
         public:
             SmilAttachmentInfoItemView(Evas_Object *parent, bool manyAttachments);
             virtual ~SmilAttachmentInfoItemView();
@@ -55,8 +52,7 @@ namespace Msg
 
     // SmilSaveAllItemView :
     class SmilSaveAllItemView
-        : public View
-    {
+        : public View {
         public:
             SmilSaveAllItemView(Evas_Object *parent, int count);
             virtual ~SmilSaveAllItemView();
@@ -73,16 +69,14 @@ namespace Msg
             const int m_Count;
     };
 
-    class ISmilAttachmentItemViewListener
-    {
+    class ISmilAttachmentItemViewListener {
         public:
             virtual ~ISmilAttachmentItemViewListener() {}
             virtual void onItemClicked(SmilAttachmentItemView &item) {};
             virtual void onSaveButtonClicked(SmilAttachmentItemView &item) {};
     };
 
-    class ISmilSaveAllItemViewListener
-    {
+    class ISmilSaveAllItemViewListener {
         public:
             virtual ~ISmilSaveAllItemViewListener() {}
             virtual void onItemClicked(SmilSaveAllItemView &item) {};
index d77a8416255e25ceb729927ce5d1f5e54508fe53..0faad1e44dda9748118d3139be8b53e5ee69678d 100644 (file)
 
 #include "View.h"
 
-namespace Msg
-{
+namespace Msg {
     class SmilAudioItemView
-        : public View
-    {
+        : public View {
         public:
             SmilAudioItemView(Evas_Object *parent, const std::string &label);
             virtual ~SmilAudioItemView();
index d85190397368cf25457ec41dbe05163c620e86ea..c29d526aa34002cfc3b0b3b06e2939572ea30b89 100644 (file)
 
 #include "View.h"
 
-namespace Msg
-{
+namespace Msg {
     class SmilImageItemView
-        : public View
-    {
+        : public View {
         public:
             SmilImageItemView(Evas_Object *parent, const std::string &imagePath);
             virtual ~SmilImageItemView();
index cbe282239f7656ea3d6e81907edf1d0830730f84..d2c4c3e2191ae77a59c48e21382671bf551ea3b8 100644 (file)
 
 #include "View.h"
 
-namespace Msg
-{
+namespace Msg {
     class SmilPageLayout
-        : public View
-    {
+        : public View {
         public:
             SmilPageLayout(Evas_Object *parent);
             virtual ~SmilPageLayout();
index 3bd746563f73a39506ea3f0327651026108eb150..da17bd6568201202b9d66035fc8ea42b45f4554f 100644 (file)
 
 #include "View.h"
 
-namespace Msg
-{
+namespace Msg {
     class SmilPlayerView
-        : public View
-    {
+        : public View {
         public:
             SmilPlayerView(Evas_Object *parent);
             virtual ~SmilPlayerView();
index ad6889f68d592cf70317199fc056e317e9f9002b..a145ec70d2110c130174209d7c2d42a6b5e8a536 100644 (file)
 
 #include "View.h"
 
-namespace Msg
-{
+namespace Msg {
     class SmilTextItemView
-        : public View
-    {
+        : public View {
         public:
             SmilTextItemView(Evas_Object *parent, const std::string &text);
             virtual ~SmilTextItemView();
index 11fd76b229c52e1ec5fb5804a487aa5183383f7a..a252ff96d7db8f2ed337b77fbcdd6baf31df5bc8 100644 (file)
 
 #include "View.h"
 
-namespace Msg
-{
+namespace Msg {
     class SmilVideoItemView
-        : public View
-    {
+        : public View {
         public:
             SmilVideoItemView(Evas_Object *parent, int videoWidth, int videoHeight, const std::string &thumbPath);
             virtual ~SmilVideoItemView();
index 3f7c4bc41b53efeee4efcd3504b550b3e3db63fc..bc9a781eef282c25d888b96248c61991df86cdea 100644 (file)
 #include <string.h>
 #include "MessageMms.h"
 
-namespace Msg
-{
+namespace Msg {
     class SubjectLayout
-        : public View
-    {
+        : public View {
         public:
             SubjectLayout(Evas_Object *parent);
             ~SubjectLayout();
index b35efbe97a9d7ae4d338e61dfc5f2bc3ea4908f1..719a9d9d4bc83917a2e6b2b08e39520ece4bb25f 100644 (file)
 
 #include "View.h"
 
-namespace Msg
-{
+namespace Msg {
     class IViewerLayoutListener;
 
     class ViewerLayout
-        : public View
-    {
+        : public View {
         public:
             ViewerLayout(Evas_Object *parent);
             virtual ~ViewerLayout();
@@ -47,8 +45,7 @@ namespace Msg
             IViewerLayoutListener *m_pListener;
     };
 
-    class IViewerLayoutListener
-    {
+    class IViewerLayoutListener {
         public:
             virtual ~IViewerLayoutListener() {}
             virtual void onLayoutTap() {};
index 2793969f1af810f3136c01e3a0db00850d5bb834..bfab6578d07f73137f6d462e8dfb8cf3829bd81e 100644 (file)
@@ -20,8 +20,7 @@
 
 using namespace Msg;
 
-namespace
-{
+namespace {
     const char *groupName = "player";
     const char *prevCb = "prev_clicked";
     const char *playCb = "play_clicked";
index 9de1368e444003e3c1180750d96e89bd19ec51ed..0620d143b13aefd701fafa4f179a654b614aadd7 100644 (file)
@@ -22,8 +22,7 @@
 
 using namespace Msg;
 
-namespace
-{
+namespace {
     const float fileButtonWeight = 2.0 / 3.0;
     const float saveButtonWeight = 1.0 / 3.0;
     const char *layoutGroupName = "smil_attachment_item_layout";
index a2ccd639c7ad154b9e19375612e4611514bef30a..3ffab37ea0f336c6362bae1047bc11017e08a14d 100644 (file)
@@ -51,8 +51,7 @@ bool SmilImageItemView::hasAnimation() const
 Evas_Object *SmilImageItemView::createImage(Evas_Object *parent, const std::string &imagePath)
 {
     m_pImage = elm_image_add(parent);
-    if (!elm_image_file_set(m_pImage, imagePath.c_str(), nullptr))
-    {
+    if (!elm_image_file_set(m_pImage, imagePath.c_str(), nullptr)) {
         evas_object_del(m_pImage);
         m_pImage = nullptr;
         return m_pImage;
index 97eda1530790cb5c7cb1ee3c5a441f1761b73ae2..3a383ce14d7fb495e7b3b47f5e96e023abd3e7ac 100644 (file)
@@ -30,13 +30,11 @@ SmilPlayerView::~SmilPlayerView()
 void SmilPlayerView::displayPage(Evas_Object *page)
 {
     Eina_List *list = elm_box_children_get(getEo());
-    if (list)
-    {
+    if (list) {
         Eina_List *l = nullptr;
         void *obj = nullptr;
 
-        EINA_LIST_FOREACH(list, l, obj)
-        {
+        EINA_LIST_FOREACH(list, l, obj) {
             evas_object_hide((Evas_Object*)obj);
         }
         eina_list_free(list);
index 76f8a5b6c03ee1e81939afbd298b2f6aabae2a51..ca20bd1d5051e1e3c9ccff1a043720c88a57611d 100644 (file)
@@ -38,8 +38,7 @@ Evas_Object *SmilTextItemView::createEntry(Evas_Object *parent, const std::strin
     evas_object_show(entry);
 
     char *markupText = elm_entry_utf8_to_markup(text.c_str());
-    if (markupText)
-    {
+    if (markupText) {
         elm_entry_entry_set(entry, markupText);
         free(markupText);
     }
index 0536f177e03e3fc2a430424d21ea4d608b2e2be3..8f42d202fe07a4896d4feb74c2f52bb513763371 100644 (file)
@@ -19,8 +19,7 @@
 #include "Logger.h"
 using namespace Msg;
 
-namespace
-{
+namespace {
     const int viewerMaxWidth = 656; // Max width size according to UI
     const int viewerMaxHeight = 369; // Max height size according to UI
 
@@ -28,20 +27,17 @@ namespace
     {
         bool isLandscape = contentW > contentH;
 
-        if (isLandscape)
-        {
+        if (isLandscape) {
             w = viewerMaxWidth;
             h = viewerMaxWidth * contentH / contentW;
-            if (h > viewerMaxHeight)
-            {
+            if (h > viewerMaxHeight) {
                 w = viewerMaxHeight * contentW / contentH;
                 h = viewerMaxHeight;
             }
         } else {
             w = viewerMaxHeight * contentH / contentW;
             h = viewerMaxHeight;
-            if (w > viewerMaxWidth)
-            {
+            if (w > viewerMaxWidth) {
                 w = viewerMaxWidth;
                 h = viewerMaxWidth * contentW / contentH;
             }
index e2b7f129fb28ceb19690274847a222645d337231..16ed0bf7f8ae80bd8220ad935861ea776dff26cf 100644 (file)
@@ -20,8 +20,7 @@
 
 using namespace Msg;
 
-namespace
-{
+namespace {
     const char *groupName = "subject/pageindex";
     const char *partSubject = "subject/text";
     const char *partPageText = "page/text";
index 4b50a3f12ca87d332b325ea0a818dede9b73ed48..f2a976493cbc4f0132ee17bba04f15ad70256691 100644 (file)
@@ -18,8 +18,7 @@
 
 using namespace Msg;
 
-namespace
-{
+namespace {
     const char *layoutGroup = "viewer_layout";
     const char *bodyPart = "body";
     const char *playerPart = "swallow.playctrl";
index c22965f4b1289adbf5f9f8b8917a8fe6d5d0b666..9f5d688127de79e169902befe4612a9c89fae432 100644 (file)
@@ -47,15 +47,13 @@ namespace Msg
             int error = CONTACTS_ERROR_NONE;
 
             error = contacts_db_get_record(_contacts_contact._uri, contactId, &contact);
-            if (error != CONTACTS_ERROR_NONE)
-            {
+            if (error != CONTACTS_ERROR_NONE) {
                 MSG_LOG_ERROR("contacts_db_get_record failed");
                 return false;
             }
 
             error = contacts_record_get_child_record_at_p(contact, _contacts_contact.name, 0, &name);
-            if (error != CONTACTS_ERROR_NONE)
-            {
+            if (error != CONTACTS_ERROR_NONE) {
                 MSG_LOG_ERROR("contacts_record_get_child_record_at_p failed");
                 contacts_record_destroy(contact, true);
                 return false;
@@ -70,13 +68,11 @@ namespace Msg
             contacts_record_h name = NULL;
             int error = CONTACTS_ERROR_NONE;
 
-            if (getContactName(contactId, contact, name))
-            {
+            if (getContactName(contactId, contact, name)) {
                 contacts_record_set_str(name, _contacts_name.first, newName.c_str());
 
                 error = contacts_db_update_record(contact);
-                if (error != CONTACTS_ERROR_NONE)
-                {
+                if (error != CONTACTS_ERROR_NONE) {
                     MSG_LOG_ERROR("contacts_db_update_record failed");
                     contacts_record_destroy(contact, true);
                     return;
@@ -94,11 +90,9 @@ namespace Msg
             int error = CONTACTS_ERROR_NONE;
             std::string result;
 
-            if (getContactName(contactId, contact, name))
-            {
+            if (getContactName(contactId, contact, name)) {
                 contacts_record_get_str(name, _contacts_name.first, &str);
-                if (str)
-                {
+                if (str) {
                     result = str;
                     free(str);
                 }
index 6d8c1a496fad73ef401b21fbacebbe6276f109c4..a54564e9257ec7e18420e66d35564992426fc4c4 100644 (file)
@@ -12,8 +12,7 @@ namespace Msg
 {
     namespace Test
     {
-        class ContactUtils
-        {
+        class ContactUtils {
             public:
                 static ContactUtils &getInst();
 
index 9363d05b760cd5423e5b635eff5b79a4b2c7cf3c..f464ca8d8cf66174e6f75fcc94146795e2b9da0b 100644 (file)
@@ -20,8 +20,7 @@
 
 using namespace Msg;
 
-class TestAppControlUtils: public testing::Test
-{
+class TestAppControlUtils: public testing::Test {
     protected:
         virtual void SetUp()
         {
@@ -55,8 +54,7 @@ TEST_F(TestAppControlUtils, GetExtraDataArray)
     AppControlUtils::getExtraDataArray(m_handle, APP_CONTROL_DATA_PATH, gotList);
 
     int i = 0;
-    for (auto num: gotList)
-    {
+    for (auto num: gotList) {
         std::string s(arr[i]);
         ASSERT_EQ(s, num);
         ++i;
@@ -83,8 +81,7 @@ TEST_F(TestAppControlUtils, GetExtraDataIntArray)
     std::list<int> gotNums;
     AppControlUtils::getExtraDataIntArray(m_handle, APP_CONTROL_DATA_SELECTED, gotNums);
     int i = 0;
-    for (auto num: gotNums)
-    {
+    for (auto num: gotNums) {
         std::string s(numsStrList[i]);
         ASSERT_EQ(s, std::to_string(num));
         ++i;
index f719816206eec07de429568bf82a670348c35328..644497826062a6815157f4df5b838ccf1ab98e93 100644 (file)
@@ -23,8 +23,7 @@
 
 using namespace Msg;
 
-class TestContactManager: public testing::Test
-{
+class TestContactManager: public testing::Test {
     protected:
         virtual void SetUp()
         {
index 3394abe05bfccc9f317831b1dafa6c9806a90351..b1754da38b2f3b9bdc181580214b55e475e2e3af 100644 (file)
@@ -26,8 +26,7 @@
 
 using namespace Msg;
 
-class TestMessageSender: public testing::Test
-{
+class TestMessageSender: public testing::Test {
     protected:
         virtual void SetUp()
         {
index 67638b57cb2338de654df475df46c1d8e3d36f82..bf748577e2b4811805faaad3fe839f5293203169 100644 (file)
@@ -22,8 +22,7 @@
 #include <utils_i18n_ulocale.h>
 
 class TimeUtilsTest
-    : public Msg::TimeUtils
-{
+    : public Msg::TimeUtils {
     public:
         using TimeUtils::getDefaultLocale;
         using TimeUtils::getDateBestPattern;
index 186b2b4f7b5f7f6388e0ec5ac4beec00d4c9a3e7..17a2c618852aa9b92e27814a091c58a9e5108126 100644 (file)
@@ -25,8 +25,7 @@
 
 static int instancesNum = 0;
 
-struct FinishTestListener : public testing::EmptyTestEventListener
-{
+struct FinishTestListener : public testing::EmptyTestEventListener {
        virtual ~FinishTestListener()
        {}
        virtual void OnTestProgramEnd(const testing::UnitTest& /*unit_test*/)