TizenRefApp-6278 Calendar event attachment support 02/80702/10
authorDenis Dolzhenko <d.dolzhenko@samsung.com>
Tue, 19 Jul 2016 14:36:47 +0000 (17:36 +0300)
committerDenis Dolzhenko <d.dolzhenko@samsung.com>
Wed, 20 Jul 2016 08:41:59 +0000 (11:41 +0300)
Change-Id: I4e28efdb8600e0cceca70dd4c69e42c436e80477
Signed-off-by: Denis Dolzhenko <d.dolzhenko@samsung.com>
22 files changed:
CMakeLists.txt
edje/images/U01_icon_etc.png
edje/images/U01_icon_vcs.png
inc/Resource.h
packaging/message.spec
project_def.prop
src/Common/ContactManager/inc/Contact.h [new file with mode: 0644]
src/Common/ContactManager/inc/ContactManager.h
src/Common/ContactManager/src/ContactVCardGenerator.cpp [moved from src/Common/ContactManager/src/VcfGenerator.cpp with 100% similarity]
src/Common/ContactManager/src/ContactVCardParser.cpp [new file with mode: 0644]
src/Common/Utils/inc/TimeUtils.h
src/Common/Utils/inc/VCalendarParser.h [new file with mode: 0644]
src/Common/Utils/src/TimeUtils.cpp
src/Common/Utils/src/VCalendarParser.cpp [new file with mode: 0644]
src/Conversation/ConvList/Controller/inc/ConvListItem.h
src/Conversation/ConvList/Controller/src/ConvListItem.cpp
src/Conversation/ConvList/View/inc/BubbleCalEventViewItem.h [new file with mode: 0644]
src/Conversation/ConvList/View/inc/BubbleViewItem.h
src/Conversation/ConvList/View/src/BubbleAudioViewItem.cpp
src/Conversation/ConvList/View/src/BubbleCalEventViewItem.cpp [new file with mode: 0644]
src/Conversation/ConvList/View/src/BubbleItemContainer.cpp
src/Conversation/ConvList/View/src/BubbleUnknownFileViewItem.cpp

index 10230ac..1594582 100644 (file)
@@ -75,6 +75,7 @@ pkg_check_modules(pkgs REQUIRED
             storage
             attach-panel
             phonenumber-utils
+            calendar-service2
 )
 
 ADD_DEFINITIONS("-DAPP_DIR=\"${PKGDIR}\"")
index 6ea35ea..ef2bc63 100755 (executable)
Binary files a/edje/images/U01_icon_etc.png and b/edje/images/U01_icon_etc.png differ
index b40edf4..7fac5c8 100755 (executable)
Binary files a/edje/images/U01_icon_vcs.png and b/edje/images/U01_icon_vcs.png differ
index 2622a77..2f91312 100644 (file)
@@ -20,7 +20,7 @@
 #define EDJ_PATH "edje"
 #define IMAGE_PATH "images"
 
-// Edj images:
+// Res images:
 #define CONV_SEND_IMG                   "btn_conversation_message_sending.png"
 #define CONV_ADD_IMG                    "btn_conversation_add.png"
 #define CONTACT_IMG                     "icon_btn_contact.png"
@@ -28,6 +28,8 @@
 #define ATTACH_IMG                      "attach_icon.png"
 #define ADD_PLUS_ICON                   "core_button_add.png"
 #define ATTACH_MUSIC_ICON               "messages_attach_ic_music.png"
+#define ATTACH_CAL_ICON                 "U01_icon_vcs.png"
+#define ATTACH_UNKNOWN_ICON             "U01_icon_etc.png"
 
 // Edj:
 #define IMAGES_EDJ_PATH                  EDJ_PATH"/images.edj"
index bca1c33..c7ab6be 100755 (executable)
@@ -51,6 +51,7 @@ BuildRequires:  pkgconfig(capi-system-runtime-info)
 BuildRequires:  pkgconfig(storage)
 BuildRequires:  pkgconfig(attach-panel)
 BuildRequires:  pkgconfig(phonenumber-utils)
+BuildRequires:  pkgconfig(calendar-service2)
 
 
 %if %TIZEN_2_4_BUILD == 0
index 9944f31..72f06ac 100644 (file)
@@ -9,7 +9,7 @@ type = app
 profile = mobile-3.0
 
 # C Sources
-USER_SRCS = src/MainApp/MainApp.cpp src/Common/AppControl/src/ContactViewer.cpp src/Common/View/src/PopupManager.cpp src/Common/MsgEngine/src/MsgPage.cpp src/Conversation/ConvList/View/src/BubbleAudioViewItem.cpp src/Common/View/src/ViewItem.cpp src/Common/MsgEngine/src/private/MsgComposerPrivate.cpp src/Common/MsgEngine/src/MsgThreadItem.cpp src/Conversation/Body/View/src/TextPageViewItem.cpp src/Viewer/View/src/SmilImageItemView.cpp src/Common/MsgEngine/src/private/MsgAttachmentPrivate.cpp src/Viewer/View/src/SubjectLayout.cpp src/Settings/Controller/src/SimListViewItem.cpp src/Conversation/ContactList/View/src/ContactListViewItem.cpp src/Viewer/Controller/src/SmilPage.cpp src/Common/View/src/SelectAllListItem.cpp src/Common/AppControl/src/AppControlCommand.cpp src/Conversation/ConvList/View/src/BubbleTextViewItem.cpp src/Common/ContactManager/src/VcfGenerator.cpp src/Common/View/src/Box.cpp src/Conversation/ConvList/View/src/DateLineViewItem.cpp src/Conversation/ConvList/View/src/ConvListViewItem.cpp src/Common/MsgEngine/src/private/MessageSMSPrivate.cpp src/Viewer/View/src/ViewerLayout.cpp src/Common/MsgEngine/src/private/MessagePrivate.cpp src/Conversation/ConvList/View/src/BubbleUnknownFileViewItem.cpp src/Common/AppControl/src/AppControlCompose.cpp src/MsgThread/Controller/src/ThreadSearchListItem.cpp src/Conversation/Recipients/View/src/ConvRecipientsPanelView.cpp src/Common/Utils/src/HwButtonListener.cpp src/Common/View/src/PopupAttachmentListItem.cpp src/Common/Controller/src/MbeRecipients.cpp src/Common/View/src/ContextPopup.cpp src/MsgThread/Controller/src/MsgSearchListItem.cpp src/Conversation/Body/View/src/BodyView.cpp src/Common/View/src/NoContentLayout.cpp src/Conversation/Body/View/src/PageSeparator.cpp src/Conversation/Main/Controller/src/PopupRecipientListItem.cpp src/Settings/Controller/src/MsgOnSimCard.cpp src/Common/View/src/MbeRecipientsView.cpp src/Conversation/Body/Controller/src/Page.cpp src/Conversation/AppControl/src/LaunchSettings.cpp src/Common/MsgEngine/src/MsgTransport.cpp src/Viewer/View/src/SmilAttachmentItemView.cpp src/Viewer/View/src/PlayerControl.cpp src/MsgThread/Controller/src/MsgThread.cpp src/Conversation/Body/View/src/ImagePageViewItem.cpp src/Conversation/ConvList/Controller/src/ConvListItem.cpp src/Conversation/Main/View/src/ConversationLayout.cpp src/Common/View/src/StandardWindow.cpp src/Common/MsgEngine/src/private/MsgConversationItemPrivate.cpp src/Conversation/Main/View/src/MessageInputPanel.cpp src/Conversation/ContactList/Controller/src/ConvContactList.cpp src/Viewer/Controller/src/Viewer.cpp src/Conversation/Body/View/src/MediaPageViewItem.cpp src/Common/Utils/src/PhoneNumberUtils.cpp src/Settings/Controller/src/Settings.cpp src/Common/View/src/PopupList.cpp src/Common/MsgEngine/src/private/MsgReportPrivate.cpp src/Common/View/src/ListView.cpp src/Conversation/Utils/src/WorkingDir.cpp src/Conversation/Body/View/src/SoundPageViewItem.cpp src/Conversation/Body/View/src/BodyAttachmentViewItem.cpp src/Conversation/AppControl/src/AttachPanel.cpp src/Conversation/Body/View/src/PageView.cpp src/Common/Utils/src/ThumbnailMaker.cpp src/Settings/View/src/SettingsGroupListViewItem.cpp src/Conversation/Utils/src/AttachmentHandler.cpp src/Common/AppControl/src/FileViewer.cpp src/Common/MsgEngine/src/private/MsgUtilsPrivate.cpp src/MsgThread/Controller/src/ThreadSearchList.cpp src/Common/MsgEngine/src/private/MsgPagePrivate.cpp src/Common/MsgEngine/src/private/MsgThreadItemPrivate.cpp src/Common/Controller/src/SaveAttachmentsPopup.cpp src/Viewer/View/src/SmilAudioItemView.cpp src/Common/AppControl/src/AppControlParser.cpp src/Common/MsgEngine/src/MsgSettings.cpp src/Common/MsgEngine/src/MsgUtils.cpp src/Viewer/Controller/src/SmilPlayer.cpp src/Common/Controller/src/ViewItemController.cpp src/MsgThread/Controller/src/ThreadList.cpp src/Conversation/ConvList/View/src/BubbleDownloadButtonViewItem.cpp src/Common/MsgEngine/src/MsgConversationItem.cpp src/MsgThread/Controller/src/BaseThreadListItem.cpp src/Conversation/Body/View/src/VideoPageViewItem.cpp src/Common/MsgEngine/src/MessageSMS.cpp src/Conversation/Body/Controller/src/PopupBodyAttachmentListItem.cpp src/Conversation/ConvList/View/src/BubbleIconTextLayoutItem.cpp src/MsgThread/Controller/src/ThreadListItem.cpp src/Common/MsgEngine/src/private/MsgAddressPrivate.cpp src/Conversation/ConvList/View/src/BubbleViewItem.cpp src/Viewer/View/src/SmilPageLayout.cpp src/Common/View/src/Scroller.cpp src/Common/Controller/src/FrameController.cpp src/Common/AppControl/src/AppControlUtils.cpp src/Common/Controller/src/NaviFrameController.cpp src/Common/View/src/DefaultLayout.cpp src/Conversation/ContactList/Controller/src/ContactListItem.cpp src/Common/MsgEngine/src/private/MsgSettingsPrivate.cpp src/Common/MsgEngine/src/MsgStorage.cpp src/Common/Utils/src/FileUtils.cpp src/Common/Utils/src/LoggerImpl.cpp src/Conversation/ConvList/View/src/BubbleItemContainer.cpp src/Conversation/ConvList/Controller/src/DateLineItem.cpp src/Common/View/src/PopupListItem.cpp src/Common/View/src/View.cpp src/Common/Utils/src/TextDecorator.cpp src/MainApp/main.cpp src/Common/Utils/src/PathUtils.cpp src/Conversation/Body/View/src/BodyViewItem.cpp src/Common/MsgEngine/src/private/MsgTransportPrivate.cpp src/Common/Controller/src/BaseController.cpp src/Common/Controller/src/App.cpp src/Viewer/View/src/SmilVideoItemView.cpp src/MsgThread/View/src/ThreadListViewItem.cpp src/Common/AppControl/src/ContactEditor.cpp src/Conversation/ConvList/View/src/ConvListLayout.cpp src/Common/MsgEngine/src/private/MsgConvMediaPrivate.cpp src/Common/Utils/src/MediaUtils.cpp src/Conversation/Recipients/Controller/src/ConvRecipientsPanel.cpp src/Conversation/ConvList/View/src/ConvSelectAll.cpp src/Common/MsgEngine/src/Message.cpp src/Common/MsgEngine/src/private/MsgStoragePrivate.cpp src/Common/View/src/Popup.cpp src/Common/View/src/ListItem.cpp src/Viewer/Utils/src/MediaPlayer.cpp src/Common/Utils/src/TimeUtils.cpp src/Settings/View/src/SettingsListViewItem.cpp src/Conversation/ConvList/View/src/BubbleImageViewItem.cpp src/Conversation/Body/Controller/src/Body.cpp src/Common/MsgEngine/src/MsgEngine.cpp src/Conversation/ContactList/View/src/ConvContactListView.cpp src/Conversation/AppControl/src/ContactPicker.cpp src/MsgThread/View/src/MsgThreadSearchPanel.cpp src/MsgThread/View/src/FloatingButton.cpp src/Settings/Controller/src/SettingsSound.cpp src/Settings/View/src/SimMsgLayout.cpp src/Common/AppControl/src/FileShare.cpp src/Common/MsgEngine/src/private/MsgMediaPrivate.cpp src/Common/AppControl/src/AppControlDefault.cpp src/Viewer/View/src/SmilTextItemView.cpp src/Common/ContactManager/src/ContactManager.cpp src/Common/View/src/NaviFrameView.cpp src/Common/MsgEngine/src/private/MessageMmsPrivate.cpp src/Conversation/ConvList/Controller/src/ConvList.cpp src/Conversation/Body/View/src/PageViewItem.cpp src/Common/Controller/src/ViewController.cpp src/Conversation/Main/Controller/src/Conversation.cpp src/Common/SystemSettingsManager/src/SystemSettingsManager.cpp src/Common/ContactManager/src/ContactRecord.cpp src/MsgThread/View/src/MsgThreadLayout.cpp src/Common/View/src/NaviFrameItem.cpp src/Common/AppControl/src/VoiceCall.cpp src/Common/MsgEngine/src/MessageMms.cpp src/Conversation/Utils/src/MessageDetailContent.cpp src/Conversation/ConvList/View/src/BubbleVideoViewItem.cpp src/Viewer/View/src/SmilPlayerView.cpp 
+USER_SRCS = src/MainApp/MainApp.cpp src/Common/AppControl/src/ContactViewer.cpp src/Common/View/src/PopupManager.cpp src/Common/MsgEngine/src/MsgPage.cpp src/Conversation/ConvList/View/src/BubbleAudioViewItem.cpp src/Common/View/src/ViewItem.cpp src/Common/MsgEngine/src/private/MsgComposerPrivate.cpp src/Common/MsgEngine/src/MsgThreadItem.cpp src/Conversation/Body/View/src/TextPageViewItem.cpp src/Viewer/View/src/SmilImageItemView.cpp src/Common/MsgEngine/src/private/MsgAttachmentPrivate.cpp src/Viewer/View/src/SubjectLayout.cpp src/Settings/Controller/src/SimListViewItem.cpp src/Conversation/ContactList/View/src/ContactListViewItem.cpp src/Viewer/Controller/src/SmilPage.cpp src/Common/View/src/SelectAllListItem.cpp src/Common/AppControl/src/AppControlCommand.cpp src/Conversation/ConvList/View/src/BubbleTextViewItem.cpp src/Common/ContactManager/src/ContactVCardGenerator.cpp src/Common/View/src/Box.cpp src/Conversation/ConvList/View/src/DateLineViewItem.cpp src/Conversation/ConvList/View/src/ConvListViewItem.cpp src/Common/MsgEngine/src/private/MessageSMSPrivate.cpp src/Viewer/View/src/ViewerLayout.cpp src/Common/MsgEngine/src/private/MessagePrivate.cpp src/Conversation/ConvList/View/src/BubbleUnknownFileViewItem.cpp src/Common/AppControl/src/AppControlCompose.cpp src/MsgThread/Controller/src/ThreadSearchListItem.cpp src/Conversation/Recipients/View/src/ConvRecipientsPanelView.cpp src/Common/Utils/src/HwButtonListener.cpp src/Common/View/src/PopupAttachmentListItem.cpp src/Common/Controller/src/MbeRecipients.cpp src/Common/View/src/ContextPopup.cpp src/MsgThread/Controller/src/MsgSearchListItem.cpp src/Conversation/Body/View/src/BodyView.cpp src/Common/View/src/NoContentLayout.cpp src/Conversation/Body/View/src/PageSeparator.cpp src/Conversation/Main/Controller/src/PopupRecipientListItem.cpp src/Settings/Controller/src/MsgOnSimCard.cpp src/Common/View/src/MbeRecipientsView.cpp src/Conversation/Body/Controller/src/Page.cpp src/Conversation/AppControl/src/LaunchSettings.cpp src/Common/MsgEngine/src/MsgTransport.cpp src/Viewer/View/src/SmilAttachmentItemView.cpp src/Viewer/View/src/PlayerControl.cpp src/MsgThread/Controller/src/MsgThread.cpp src/Conversation/Body/View/src/ImagePageViewItem.cpp src/Conversation/ConvList/Controller/src/ConvListItem.cpp src/Conversation/Main/View/src/ConversationLayout.cpp src/Common/View/src/StandardWindow.cpp src/Common/MsgEngine/src/private/MsgConversationItemPrivate.cpp src/Conversation/Main/View/src/MessageInputPanel.cpp src/Conversation/ContactList/Controller/src/ConvContactList.cpp src/Viewer/Controller/src/Viewer.cpp src/Conversation/Body/View/src/MediaPageViewItem.cpp src/Common/Utils/src/PhoneNumberUtils.cpp src/Settings/Controller/src/Settings.cpp src/Common/View/src/PopupList.cpp src/Common/MsgEngine/src/private/MsgReportPrivate.cpp src/Common/View/src/ListView.cpp src/Conversation/Utils/src/WorkingDir.cpp src/Conversation/Body/View/src/SoundPageViewItem.cpp src/Conversation/Body/View/src/BodyAttachmentViewItem.cpp src/Conversation/AppControl/src/AttachPanel.cpp src/Conversation/Body/View/src/PageView.cpp src/Common/Utils/src/ThumbnailMaker.cpp src/Settings/View/src/SettingsGroupListViewItem.cpp src/Conversation/Utils/src/AttachmentHandler.cpp src/Common/AppControl/src/FileViewer.cpp src/Common/MsgEngine/src/private/MsgUtilsPrivate.cpp src/MsgThread/Controller/src/ThreadSearchList.cpp src/Common/MsgEngine/src/private/MsgPagePrivate.cpp src/Common/MsgEngine/src/private/MsgThreadItemPrivate.cpp src/Common/Controller/src/SaveAttachmentsPopup.cpp src/Viewer/View/src/SmilAudioItemView.cpp src/Common/AppControl/src/AppControlParser.cpp src/Common/MsgEngine/src/MsgSettings.cpp src/Common/Utils/src/VCalendarParser.cpp src/Common/MsgEngine/src/MsgUtils.cpp src/Viewer/Controller/src/SmilPlayer.cpp src/Common/Controller/src/ViewItemController.cpp src/MsgThread/Controller/src/ThreadList.cpp src/Conversation/ConvList/View/src/BubbleDownloadButtonViewItem.cpp src/Common/MsgEngine/src/MsgConversationItem.cpp src/MsgThread/Controller/src/BaseThreadListItem.cpp src/Conversation/Body/View/src/VideoPageViewItem.cpp src/Common/MsgEngine/src/MessageSMS.cpp src/Conversation/Body/Controller/src/PopupBodyAttachmentListItem.cpp src/Conversation/ConvList/View/src/BubbleIconTextLayoutItem.cpp src/MsgThread/Controller/src/ThreadListItem.cpp src/Common/MsgEngine/src/private/MsgAddressPrivate.cpp src/Conversation/ConvList/View/src/BubbleViewItem.cpp src/Viewer/View/src/SmilPageLayout.cpp src/Common/View/src/Scroller.cpp src/Common/Controller/src/FrameController.cpp src/Common/AppControl/src/AppControlUtils.cpp src/Common/Controller/src/NaviFrameController.cpp src/Common/View/src/DefaultLayout.cpp src/Conversation/ContactList/Controller/src/ContactListItem.cpp src/Common/MsgEngine/src/private/MsgSettingsPrivate.cpp src/Common/MsgEngine/src/MsgStorage.cpp src/Common/Utils/src/FileUtils.cpp src/Common/Utils/src/LoggerImpl.cpp src/Conversation/ConvList/View/src/BubbleItemContainer.cpp src/Conversation/ConvList/Controller/src/DateLineItem.cpp src/Common/View/src/PopupListItem.cpp src/Common/View/src/View.cpp src/Common/Utils/src/TextDecorator.cpp src/MainApp/main.cpp src/Common/Utils/src/PathUtils.cpp src/Common/MsgEngine/src/private/MsgTransportPrivate.cpp src/Conversation/Body/View/src/BodyViewItem.cpp src/Common/Controller/src/BaseController.cpp src/Common/Controller/src/App.cpp src/Viewer/View/src/SmilVideoItemView.cpp src/MsgThread/View/src/ThreadListViewItem.cpp src/Common/AppControl/src/ContactEditor.cpp src/Conversation/ConvList/View/src/ConvListLayout.cpp src/Common/MsgEngine/src/private/MsgConvMediaPrivate.cpp src/Common/Utils/src/MediaUtils.cpp src/Conversation/Recipients/Controller/src/ConvRecipientsPanel.cpp src/Conversation/ConvList/View/src/ConvSelectAll.cpp src/Common/MsgEngine/src/Message.cpp src/Common/MsgEngine/src/private/MsgStoragePrivate.cpp src/Common/View/src/Popup.cpp src/Common/View/src/ListItem.cpp src/Viewer/Utils/src/MediaPlayer.cpp src/Common/Utils/src/TimeUtils.cpp src/Settings/View/src/SettingsListViewItem.cpp src/Conversation/ConvList/View/src/BubbleImageViewItem.cpp src/Conversation/Body/Controller/src/Body.cpp src/Common/MsgEngine/src/MsgEngine.cpp src/Conversation/ContactList/View/src/ConvContactListView.cpp src/Conversation/AppControl/src/ContactPicker.cpp src/MsgThread/View/src/MsgThreadSearchPanel.cpp src/MsgThread/View/src/FloatingButton.cpp src/Settings/Controller/src/SettingsSound.cpp src/Settings/View/src/SimMsgLayout.cpp src/Common/AppControl/src/FileShare.cpp src/Common/MsgEngine/src/private/MsgMediaPrivate.cpp src/Common/AppControl/src/AppControlDefault.cpp src/Viewer/View/src/SmilTextItemView.cpp src/Conversation/ConvList/View/src/BubbleCalEventViewItem.cpp src/Common/ContactManager/src/ContactManager.cpp src/Common/View/src/NaviFrameView.cpp src/Common/MsgEngine/src/private/MessageMmsPrivate.cpp src/Conversation/ConvList/Controller/src/ConvList.cpp src/Conversation/Body/View/src/PageViewItem.cpp src/Common/Controller/src/ViewController.cpp src/Conversation/Main/Controller/src/Conversation.cpp src/Common/SystemSettingsManager/src/SystemSettingsManager.cpp src/Common/ContactManager/src/ContactRecord.cpp src/MsgThread/View/src/MsgThreadLayout.cpp src/Common/View/src/NaviFrameItem.cpp src/Common/AppControl/src/VoiceCall.cpp src/Common/MsgEngine/src/MessageMms.cpp src/Conversation/Utils/src/MessageDetailContent.cpp src/Conversation/ConvList/View/src/BubbleVideoViewItem.cpp src/Viewer/View/src/SmilPlayerView.cpp src/Common/ContactManager/src/ContactVCardParser.cpp  
 USER_SRCS_ABS = 
 
 # EDC Sources
@@ -35,7 +35,7 @@ USER_OBJS_ABS =
 
 # User Includes
 ## C Compiler
-USER_INC_DIRS = src/Conversation/Utils/inc src/Common/SystemSettingsManager/inc inc src/Conversation/AppControl/inc src/Conversation/ConvList/Controller/inc src/Conversation/ConvList/View/inc src/Conversation/Main/Controller/inc src/Conversation/Main/View/inc src/Conversation/Recipients/Controller/inc src/Conversation/Recipients/View/inc src/Common/ContactManager/inc src/Common/AppControl/inc src/Conversation/Body/Controller/inc src/Conversation/ContactList/Controller/inc src/Conversation/ContactList/View/inc src/Conversation/Body/View/inc src/Settings/Controller/inc src/Settings/View/inc src/Viewer/Controller/inc src/Viewer/View/inc src/Viewer/Utils/inc src/MsgThread/Controller/inc src/MsgThread/View/inc src/Common/MsgEngine/inc src/Common/Utils/inc src/Common/View/inc src/Common/Controller/inc
+USER_INC_DIRS = src/Conversation/Utils/inc src/Common/SystemSettingsManager/inc inc src/Conversation/AppControl/inc src/Conversation/ConvList/Controller/inc src/Conversation/ConvList/View/inc src/Conversation/Main/Controller/inc src/Conversation/Main/View/inc src/Conversation/Recipients/Controller/inc src/Conversation/Recipients/View/inc src/Common/ContactManager/inc src/Common/AppControl/inc src/Conversation/Body/Controller/inc src/Conversation/ContactList/Controller/inc src/Conversation/ContactList/View/inc src/Conversation/Body/View/inc src/Settings/Controller/inc src/Settings/View/inc src/Viewer/Controller/inc src/Viewer/View/inc src/Viewer/Utils/inc src/MsgThread/Controller/inc src/MsgThread/View/inc src/Common/MsgEngine/inc src/Common/Utils/inc src/Common/View/inc src/Common/Controller/inc 
 USER_INC_DIRS_ABS = 
 USER_INC_FILES = 
 USER_INC_FILES_ABS = 
diff --git a/src/Common/ContactManager/inc/Contact.h b/src/Common/ContactManager/inc/Contact.h
new file mode 100644 (file)
index 0000000..d677810
--- /dev/null
@@ -0,0 +1,69 @@
+/*
+ * Copyright (c) 2009-2015 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef __Contact_h__
+#define __Contact_h__
+
+#include "ContactRecord.h"
+
+#include <contacts.h>
+#include <string>
+#include <memory>
+
+namespace Msg
+{
+    class Contact;
+    typedef std::shared_ptr<Contact> ContactRef;
+
+    class Contact
+        : public ContactRecord
+    {
+        public:
+            Contact(bool release, contacts_record_h record = nullptr);
+
+            std::string getDispName() const;
+            std::string getPhoneNumber() const;
+            std::string getEmail() const;
+            std::string getThumb() const;
+    };
+
+    inline Contact::Contact(bool release, contacts_record_h record)
+        : ContactRecord(release, record)
+    {
+    }
+
+    inline std::string Contact::getDispName() const
+    {
+        return getStr(_contacts_contact.display_name);
+    }
+
+    inline std::string Contact::getPhoneNumber() const
+    {
+        return getStr(_contacts_contact.number);
+    }
+
+    inline std::string Contact::getEmail() const
+    {
+        return getStr(_contacts_contact.email);
+    }
+
+    inline std::string Contact::getThumb() const
+    {
+        return getStr(_contacts_contact.image_thumbnail_path);
+    }
+}
+
+#endif /* __Contact_h__ */
index a8c9d96..b59230e 100644 (file)
@@ -31,6 +31,7 @@
 #include "ContactMyProfile.h"
 #include "ContactMyProfileNumber.h"
 #include "ContactMyProfileEmail.h"
+#include "Contact.h"
 
 namespace Msg
 {
@@ -125,12 +126,19 @@ namespace Msg
              */
             std::string makeVcard(const int personId, bool myProfile);
 
-            /**
-             *@brief        Create content of contact by id list
+             /**
+-            *@brief        Create content of contact by id list
              *@param[in]    personId - contact id
              *@return       Content with all info about contacts
              */
-            std::string makeVcard(const std::list<int> &idList);
+             std::string makeVcard(const std::list<int> &idList);
+
+            /**
+             *@brief        Parse vCard file
+             *@param[in]    filePath Path to file
+             *@return       list of Contacts
+             */
+            std::shared_ptr<ContactList<Contact>> parseVcard(const std::string &filePath);
 
         private:
             typedef std::unordered_map<std::string, ContactAddressRef> AddressMap;
diff --git a/src/Common/ContactManager/src/ContactVCardParser.cpp b/src/Common/ContactManager/src/ContactVCardParser.cpp
new file mode 100644 (file)
index 0000000..6aa803d
--- /dev/null
@@ -0,0 +1,48 @@
+/*
+ * Copyright (c) 2009-2016 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+#include "ContactManager.h"
+#include "Logger.h"
+#include "FileUtils.h"
+
+#include <sstream>
+#include <contacts_vcard.h>
+#include <contacts.h>
+#include <contacts_views.h>
+
+using namespace Msg;
+
+std::shared_ptr<ContactList<Contact>> ContactManager::parseVcard(const std::string &filePath)
+{
+    std::shared_ptr<ContactList<Contact>> res;
+
+    if(filePath.empty())
+        return res;
+
+    std::string vcardStream = FileUtils::readTextFile(filePath);
+    if(vcardStream.empty())
+        return res;
+
+    contacts_list_h list = {};
+    int parseRes = contacts_vcard_parse_to_contacts(vcardStream.c_str(), &list);
+    if(list)
+        res = std::make_shared<ContactList<Contact>>(list);
+
+    MSG_LOG("Parse result: ", parseRes);
+
+    return res;
+}
index 6185f12..e2b3d44 100644 (file)
@@ -39,12 +39,14 @@ namespace Msg
             static std::string makeDateTimeString(time_t msgTime);
             static std::string makeSmsReportTimeString(time_t msgTime);
             static std::string makeMmsReportTimeString(time_t msgTime);
+            static std::string makeCalEventString(time_t time);
+            static std::string makeCalEventString(int year, int month, int mday, int hour, int min, const char *timezone = nullptr);
 
         protected:
             //made protected to allow inheritance of this class in tests
             static const std::string &getDefaultLocale();
             static std::string getDateBestPattern(const std::string &locale, const std::string &skeleton);
-            static std::string getFormattedDate(const std::string &locale, const std::string &bestPattern, time_t time);
+            static std::string getFormattedDate(const std::string &locale, const std::string &bestPattern, time_t time, const char *timezone = nullptr);
 
         private:
             static int getTimeFormat();
diff --git a/src/Common/Utils/inc/VCalendarParser.h b/src/Common/Utils/inc/VCalendarParser.h
new file mode 100644 (file)
index 0000000..3ff3b96
--- /dev/null
@@ -0,0 +1,53 @@
+/*
+ * Copyright (c) 2009-2015 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+#ifndef VCardParser_h_
+#define VCardParser_h_
+
+#include <calendar.h>
+#include <string>
+#include <list>
+
+class CalendarEvent
+{
+    public:
+        CalendarEvent(calendar_record_h record);
+
+        const std::string &getSummary() const;
+        const std::string &getStartDate() const;
+
+    private:
+        std::string m_Summary;
+        std::string m_StartDate;
+};
+
+class VCalendarParser
+{
+    public:
+        static VCalendarParser &getInst();
+        static std::list<CalendarEvent> parse(const std::string &filePath);
+
+    private:
+        VCalendarParser();
+        ~VCalendarParser();
+        VCalendarParser& operator=(VCalendarParser&) = delete;
+        VCalendarParser(VCalendarParser&) = delete;
+
+};
+
+
+#endif /* VCardParser_h_ */
index 6a77db8..6bfcc79 100644 (file)
@@ -115,6 +115,24 @@ std::string TimeUtils::makeMmsReportTimeString(time_t msgTime)
     return getFormattedDate(locale, getDateBestPattern(locale, timeFormat), msgTime);
 }
 
+std::string TimeUtils::makeCalEventString(time_t time)
+{
+    const std::string &locale = getDefaultLocale();
+    return getFormattedDate(locale, getDateBestPattern(locale, dateYear), time);
+}
+
+std::string TimeUtils::makeCalEventString(int year, int month, int mday, int hour, int min, const char *timezone)
+{
+    struct tm time = {};
+    time.tm_year = year - 1900;
+    time.tm_mon = month - 1;
+    time.tm_mday = mday;
+    time.tm_hour = hour;
+    time.tm_min = min;
+    const std::string &locale = getDefaultLocale();
+    return getFormattedDate(locale, getDateBestPattern(locale, dateYear), mktime(&time), timezone);
+}
+
 int TimeUtils::getTimeFormat()
 {
     bool timeFormat = false;
@@ -207,7 +225,7 @@ std::string TimeUtils::getDateBestPattern(const std::string &locale, const std::
     return bestPatternString;
 }
 
-std::string TimeUtils::getFormattedDate(const std::string &locale, const std::string &bestPattern, time_t time)
+std::string TimeUtils::getFormattedDate(const std::string &locale, const std::string &bestPattern, time_t time, const char *timezone)
 {
     int status = I18N_ERROR_NONE;
     i18n_udate date;
@@ -227,7 +245,7 @@ std::string TimeUtils::getFormattedDate(const std::string &locale, const std::st
         i18n_ustring_copy_ua_n(uBestPattern, bestPattern.c_str(), maxUcharLen);
 
     /* get current timezone and set as default timezone */
-    i18n_ustring_copy_ua(utimezoneId, getTimezone().c_str());
+    i18n_ustring_copy_ua(utimezoneId, timezone ? timezone : getTimezone().c_str());
 
     status = i18n_ucalendar_set_default_timezone(utimezoneId);
     if (status != I18N_ERROR_NONE)
diff --git a/src/Common/Utils/src/VCalendarParser.cpp b/src/Common/Utils/src/VCalendarParser.cpp
new file mode 100644 (file)
index 0000000..240fe28
--- /dev/null
@@ -0,0 +1,119 @@
+/*
+ * Copyright (c) 2009-2015 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+#include "VCalendarParser.h"
+#include "FileUtils.h"
+#include "Logger.h"
+#include "TimeUtils.h"
+
+#include <string.h>
+
+using namespace Msg;
+
+CalendarEvent::CalendarEvent(calendar_record_h record)
+{
+    char *summary = nullptr;
+    calendar_record_get_str_p(record, _calendar_event.summary, &summary);
+    if(summary)
+        m_Summary = summary;
+
+    calendar_time_s start = {};
+    calendar_record_get_caltime(record, _calendar_event.start_time, &start);
+    if(start.type == CALENDAR_TIME_UTIME) // Unix time
+    {
+        m_StartDate = TimeUtils::makeCalEventString(start.time.utime);
+    }
+    else // Local time
+    {
+        // FIXME: timezone is null
+        char *timezone = nullptr;
+        calendar_record_get_str_p(record, _calendar_event.timezone, &timezone);
+        m_StartDate = TimeUtils::makeCalEventString
+        (
+            start.time.date.year,
+            start.time.date.month,
+            start.time.date.mday,
+            start.time.date.hour,
+            start.time.date.minute,
+            timezone
+        );
+    }
+
+}
+
+const std::string &CalendarEvent::getSummary() const
+{
+    return m_Summary;
+}
+
+const std::string &CalendarEvent::getStartDate() const
+{
+    return m_StartDate;
+}
+
+VCalendarParser::VCalendarParser()
+{
+    calendar_connect();
+}
+
+VCalendarParser::~VCalendarParser()
+{
+    calendar_disconnect();
+}
+
+VCalendarParser &VCalendarParser::getInst()
+{
+    static VCalendarParser inst;
+    return inst;
+}
+
+std::list<CalendarEvent> VCalendarParser::parse(const std::string &filePath)
+{
+    if(filePath.empty())
+        return {};
+
+    std::list<CalendarEvent> list;
+    std::string text = FileUtils::readTextFile(filePath);
+
+    calendar_list_h records = nullptr;
+    int parseRes = calendar_vcalendar_parse_to_calendar(text.c_str(), &records);
+    MSG_LOG("Parse results: ", parseRes);
+
+    int count = 0;
+    calendar_list_get_count(records, &count);
+    calendar_list_first(records);
+
+    for(int i = 0; i < count; ++i)
+    {
+        calendar_record_h record = nullptr;
+        calendar_list_get_current_record_p(records, &record);
+        if(record)
+        {
+            char *viewUri = nullptr;
+            calendar_record_get_uri_p(record, &viewUri);
+            if(viewUri && !strcmp(viewUri, _calendar_event._uri))
+                list.emplace_back(record);
+        }
+    }
+
+    if(records)
+        calendar_list_destroy(records, true);
+
+    return list;
+}
+
+
index 30c1e19..13f1baf 100644 (file)
@@ -93,6 +93,7 @@ namespace Msg
             void addTextItem(std::string text, bool markup, const std::string &searchWord);
             void addImageItem(const MsgConvMedia &media);
             void addAttachedFileItem(const MsgConvMedia &media);
+            void addCalendarItem(const MsgConvMedia &media);
 
             // Create Popup when message is clicked
             void showMainListPopup();
index 7a8cc35..434b458 100644 (file)
@@ -21,6 +21,7 @@
 #include "CallbackAssist.h"
 #include "FileUtils.h"
 #include "TimeUtils.h"
+#include "VCalendarParser.h"
 #include "SaveAttachmentsPopup.h"
 #include "TextDecorator.h"
 #include "MediaType.h"
 #include "TimeUtils.h"
 #include "FileViewer.h"
 #include "BubbleItemContainer.h"
+
+// Bubble items:
 #include "BubbleTextViewItem.h"
 #include "BubbleImageViewItem.h"
 #include "BubbleVideoViewItem.h"
 #include "BubbleAudioViewItem.h"
 #include "BubbleDownloadButtonViewItem.h"
 #include "BubbleUnknownFileViewItem.h"
+#include "BubbleCalEventViewItem.h"
 
 #include <notification_status.h>
 #include <sstream>
 #include <iomanip>
+#include <algorithm>
 
 using namespace Msg;
 
@@ -181,6 +186,18 @@ void ConvListItem::addAttachedFileItem(const MsgConvMedia &media)
     m_BubbleEntityList.push_back(entity);
 }
 
+void ConvListItem::addCalendarItem(const MsgConvMedia &media)
+{
+    auto list = VCalendarParser::getInst().parse(media.getPath());
+    if(!list.empty())
+    {
+        // TODO: if list.szie() > 1 ?
+        const CalendarEvent &event = list.front();
+        auto *entity = new BubbleCalEventEntity(media.getPath(), event.getSummary(), event.getStartDate());
+        m_BubbleEntityList.push_back(entity);
+    }
+}
+
 void ConvListItem::addDownloadButtonItem()
 {
     auto *entity = new BubbleDownloadButtonEntity;
@@ -237,6 +254,7 @@ void ConvListItem::prepareBubble(const MsgConversationItem &item, const std::str
             std::string mime = media.getMime();
             MsgMedia::Type msgMediaType = getMsgMediaTypeByMime(mime);
 
+            std::transform(mime.begin(), mime.end(), mime.begin(), ::tolower);
             switch(msgMediaType)
             {
                 case MsgMedia::TextType:
@@ -252,7 +270,9 @@ void ConvListItem::prepareBubble(const MsgConversationItem &item, const std::str
                     addVideoItem(media);
                     break;
                 default:
-                    if(mime != "application/smil")
+                    if(mime == "text/x-vcalendar" || mime == "text/calendar")
+                        addCalendarItem(media);
+                    else if(mime != "application/smil")
                         addAttachedFileItem(media);
                     break;
             }
@@ -266,7 +286,6 @@ Evas_Object *ConvListItem::getBubbleContent()
     for(BubbleEntity *entity : m_BubbleEntityList)
     {
         BubbleViewItem *item = entity->createView(*bubble);
-        item->show();
         bubble->append(*item);
         item->setListener(this);
     }
diff --git a/src/Conversation/ConvList/View/inc/BubbleCalEventViewItem.h b/src/Conversation/ConvList/View/inc/BubbleCalEventViewItem.h
new file mode 100644 (file)
index 0000000..aa1b76f
--- /dev/null
@@ -0,0 +1,50 @@
+/*
+ * Copyright (c) 2009-2015 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+#ifndef BubbleCalEventViewItem_h_
+#define BubbleCalEventViewItem_h_
+
+#include "BubbleIconTextLayoutItem.h"
+
+namespace Msg
+{
+    class BubbleCalEventViewItem
+        : public BubbleIconTextLayoutItem
+    {
+        public:
+            BubbleCalEventViewItem(BubbleEntity &entity, Evas_Object *parent);
+            virtual ~BubbleCalEventViewItem();
+    };
+
+    class BubbleCalEventEntity
+        : public BubbleEntity
+    {
+        public:
+            BubbleCalEventEntity(const std::string &filePath, const std::string &name, const std::string &dateTime);
+            virtual ~BubbleCalEventEntity();
+
+            virtual BubbleCalEventViewItem *createView(Evas_Object *parent);
+            virtual const std::string &getFilePath() const;
+
+        private:
+            const std::string m_FilePath;
+            const std::string m_Name;
+            const std::string m_DateTime;
+    };
+}
+
+#endif /* BubbleCalEventViewItem_h_ */
index 1532d3b..fac1bbf 100644 (file)
@@ -59,7 +59,7 @@ namespace Msg
                 AudioItem,
                 VideoItem,
                 ContactItem,
-                CalendarItem,
+                CalendarEventItem,
                 UnknownFileItem,
                 DownloadButtonItem
             };
index b320f31..0b75f07 100644 (file)
@@ -24,6 +24,7 @@ BubbleAudioViewItem::BubbleAudioViewItem(BubbleEntity &entity, Evas_Object *pare
     : BubbleIconTextLayoutItem(entity, parent, Layout1Icon2Text)
 {
     attachGestureTapLayer(getEo(), getEo());
+    setIcon(createIcon(getEo(), ATTACH_MUSIC_ICON));
 }
 
 BubbleAudioViewItem::~BubbleAudioViewItem()
@@ -48,7 +49,6 @@ BubbleAudioEntity::~BubbleAudioEntity()
 BubbleAudioViewItem *BubbleAudioEntity::createView(Evas_Object *parent)
 {
     auto *item = new BubbleAudioViewItem(*this, parent);
-    item->setIcon(BubbleAudioViewItem::createIcon(*item, ATTACH_MUSIC_ICON));
     item->setMainText(m_FileName);
     item->setSubText(m_Duration);
     return item;
diff --git a/src/Conversation/ConvList/View/src/BubbleCalEventViewItem.cpp b/src/Conversation/ConvList/View/src/BubbleCalEventViewItem.cpp
new file mode 100644 (file)
index 0000000..a2dc75f
--- /dev/null
@@ -0,0 +1,58 @@
+/*
+ * Copyright (c) 2009-2015 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+#include "BubbleCalEventViewItem.h"
+#include "Resource.h"
+
+using namespace Msg;
+
+BubbleCalEventViewItem::BubbleCalEventViewItem(BubbleEntity &entity, Evas_Object *parent)
+    : BubbleIconTextLayoutItem(entity, parent, Layout1Icon2Text)
+{
+    attachGestureTapLayer(getEo(), getEo());
+    setIcon(createIcon(getEo(), ATTACH_CAL_ICON));
+}
+
+BubbleCalEventViewItem::~BubbleCalEventViewItem()
+{
+}
+
+BubbleCalEventEntity::BubbleCalEventEntity(const std::string &filePath, const std::string &name, const std::string &dateTime)
+    : BubbleEntity(CalendarEventItem)
+    , m_FilePath(filePath)
+    , m_Name(name)
+    , m_DateTime(dateTime)
+
+{
+}
+
+BubbleCalEventEntity::~BubbleCalEventEntity()
+{
+}
+
+BubbleCalEventViewItem *BubbleCalEventEntity::createView(Evas_Object *parent)
+{
+    auto *item = new BubbleCalEventViewItem(*this, parent);
+    item->setMainText(m_Name);
+    item->setSubText(m_DateTime);
+    return item;
+}
+
+const std::string &BubbleCalEventEntity::getFilePath() const
+{
+    return m_FilePath;
+}
index 6de1fbf..e74b464 100644 (file)
@@ -41,6 +41,7 @@ BubbleItemContainer::~BubbleItemContainer()
 
 void BubbleItemContainer::append(Evas_Object *item)
 {
+    evas_object_size_hint_align_set(item, 0.0, EVAS_HINT_FILL);
     evas_object_smart_calculate(item);
     evas_object_show(item);
     elm_box_pack_end(getEo(), item);
index e1abfe3..0d2971d 100644 (file)
@@ -24,6 +24,7 @@ BubbleUnknownFileViewItem::BubbleUnknownFileViewItem(BubbleEntity &entity, Evas_
     : BubbleIconTextLayoutItem(entity, parent, Layout1Icon1Text)
 {
     attachGestureTapLayer(getEo(), getEo());
+    setIcon(createIcon(getEo(), ATTACH_UNKNOWN_ICON));
 }
 
 BubbleUnknownFileViewItem::~BubbleUnknownFileViewItem()