Fixed jira issue(31576,31704,32017,31910)
authorJongTaeOh <jongtae.oh@samsung.com>
Sun, 7 Apr 2013 03:08:23 +0000 (12:08 +0900)
committerJongTaeOh <jongtae.oh@samsung.com>
Sun, 7 Apr 2013 03:08:23 +0000 (12:08 +0900)
Change-Id: Ifd73312aa05fcea423b85b930ab6da6aa0aa755b

inc/MpAlbumListPanel.h
inc/MpAllListPanel.h
inc/MpArtistListPanel.h
inc/MpContentPanel.h
inc/MpFolderListEditorPanel.h
inc/MpFolderListPanel.h
inc/MpPlaylistListPanel.h
src/MpContentPanel.cpp
src/MpFolderListEditorPanel.cpp
src/MpSearchForm.cpp
src/MpSetAsPopup.cpp

index 60e4c7b..48d39b8 100644 (file)
@@ -76,8 +76,8 @@ private:
                                                                const ContentInformation& contentInfoStruct,
                                                                const int contentTotalCount);
        Tizen::Base::Collection::ArrayList* GetContentListN(int itemIndex);
-       void UpdateContentList(void);
        virtual bool IsEmptyContentList(void);
+       virtual void UpdateContentList(void);
 
 protected:
        int __itemIndex;
@@ -87,4 +87,4 @@ protected:
        Tizen::Graphics::Bitmap* __pThumbnail;
 };
 
-#endif // _MP_ALBUM_LIST_PANEL_H_
\ No newline at end of file
+#endif // _MP_ALBUM_LIST_PANEL_H_
index da52198..6798e76 100644 (file)
@@ -83,8 +83,8 @@ public:
 private:
        result CreateTableViewItem(Tizen::Ui::Container& parent, const ContentInformation& contentInfoStruct);
        Tizen::Base::Collection::ArrayList* GetContentListN(int itemIndex);
-       void UpdateContentList(void);
        virtual bool IsEmptyContentList(void);
+       virtual void UpdateContentList(void);
 
 private:
        Tizen::Ui::Controls::TableViewContextItem* __pContextItem;
@@ -96,4 +96,4 @@ private:
        int __itemIndex;
 };
 
-#endif // _MP_ALL_LIST_PANEL_H_
\ No newline at end of file
+#endif // _MP_ALL_LIST_PANEL_H_
index bd16dbc..bce818c 100644 (file)
@@ -77,8 +77,8 @@ private:
        result CreateTableViewItem(Tizen::Ui::Container& parent,
                                                                        const ContentInformation& contentInfoStruct,
                                                                        const int contentTotalCount);
-       void UpdateContentList(void);
        virtual bool IsEmptyContentList(void);
+       virtual void UpdateContentList(void);
 
 protected:
        int __itemIndex;
@@ -88,4 +88,4 @@ protected:
        ArtistListPresentationModel* __pPresentationModel;
 };
 
-#endif // _MP_ARTIST_LIST_PANEL_H_
\ No newline at end of file
+#endif // _MP_ARTIST_LIST_PANEL_H_
index d7ba986..2009cf0 100644 (file)
 #include <FUi.h>\r
 #include "MpSceneRegister.h"\r
 #include "MpTypes.h"\r
+//#include "FIo.h"\r
+#include "FContent.h"\r
 \r
 class ContentPanel\r
        : public Tizen::Ui::Controls::Panel\r
+       , public Tizen::Content::IContentUpdateEventListener\r
        , public Tizen::Ui::Controls::ITableViewItemProvider\r
        , public Tizen::Ui::Controls::ITableViewItemEventListener\r
        , public Tizen::Ui::Controls::IFormBackEventListener\r
@@ -60,6 +63,10 @@ public:
        virtual void OnUpdateContentList(void) = 0;\r
        virtual void OnOrientationPanelChanged(Tizen::Ui::OrientationStatus orientationStatus);\r
        virtual void OnFormBackRequested(Tizen::Ui::Controls::Form& source);\r
+       virtual void  OnContentDirectoryScanCompleted (const Tizen::Base::String &directoryPath, result r);\r
+       virtual void  OnContentFileCreated (Tizen::Content::ContentId contentId, Tizen::Content::ContentType contentType, result r);\r
+       virtual void  OnContentFileDeleted (Tizen::Content::ContentId contentId, Tizen::Content::ContentType contentType, result r);\r
+       virtual void  OnContentFileUpdated (Tizen::Content::ContentId contentId, Tizen::Content::ContentType contentType, result r);\r
 \r
 protected:\r
        Tizen::Ui::Controls::Header* GetHeader(void);\r
@@ -76,10 +83,13 @@ protected:
        void RemoveBackEventListner(void);\r
        void SetShowStateFooter(bool isShow);\r
 \r
+private:\r
+       virtual void UpdateContentList(void) = 0;\r
+\r
 protected:\r
        Tizen::Ui::Controls::TableView* __pContentTableView;\r
        Tizen::Ui::Controls::Label* __pNoContentLabel;\r
        FooterButtonStyle __footerButtonStyle;\r
 };\r
 \r
-#endif // _MP_CONTENT_PANEL_H_
\ No newline at end of file
+#endif // _MP_CONTENT_PANEL_H_\r
index 53d81f9..49ea02b 100644 (file)
@@ -81,7 +81,6 @@ private:
 
        void UpdateContentList(void);
        void SetEditHeaderStyle(void);
-       void SetTabHeaderStyle(void);
        void SetDisableIconAllCheckButton(void);
 
 protected:
index 53e8b82..580fecc 100644 (file)
@@ -64,8 +64,7 @@ public:
 
 private:
        result CreateTableViewItem(Tizen::Ui::Container& parent, const Tizen::Base::String& contentPath, int contentCount);
-
-       void UpdateContentList(void);
+       virtual void UpdateContentList(void);
        virtual bool IsEmptyContentList(void);
 
 private:
@@ -78,4 +77,4 @@ protected:
        FolderListPresentationModel* __pPresentationModel;
 };
 
-#endif // _MP_FOLDERS_LIST_PANEL_H_
\ No newline at end of file
+#endif // _MP_FOLDERS_LIST_PANEL_H_
index e415a2a..8348071 100644 (file)
@@ -72,7 +72,7 @@ private:
                                                        Tizen::Base::String& labelName,
                                                        const Tizen::Graphics::Bitmap& bitmap,
                                                        int totalCount);
-       void UpdateContentList(void);
+       virtual void UpdateContentList(void);
        virtual bool IsEmptyContentList(void);
 
 private:
@@ -85,4 +85,4 @@ private:
        Tizen::Base::String* __pPlaylistName;
 };
 
-#endif // _MP_PLAY_LIST_LIST_PANEL_H_
\ No newline at end of file
+#endif // _MP_PLAY_LIST_LIST_PANEL_H_
index 7b710e9..6ccfd35 100644 (file)
@@ -24,6 +24,7 @@
 #include "MpCommonUtil.h"\r
 \r
 using namespace Tizen::Graphics;\r
+using namespace Tizen::Content;\r
 using namespace Tizen::Ui;\r
 using namespace Tizen::Ui::Controls;\r
 \r
@@ -33,12 +34,20 @@ ContentPanel::ContentPanel(void)
        , __footerButtonStyle(STYLE_MAX)\r
 {\r
        AppLogDebug("ENTER");\r
+       ContentManager contentManager;\r
+       contentManager.Construct();\r
+\r
+       contentManager.AddContentUpdateEventListener(*this);\r
        AppLogDebug("EXIT");\r
 }\r
 \r
 ContentPanel::~ContentPanel(void)\r
 {\r
        AppLogDebug("ENTER");\r
+       ContentManager contentManager;\r
+       contentManager.Construct();\r
+\r
+       contentManager.RemoveContentUpdateEventListener(*this);\r
        AppLogDebug("EXIT");\r
 }\r
 \r
@@ -251,10 +260,11 @@ ContentPanel::OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previousSceneI
        Header* pHeader = GetHeader();\r
        pHeader->AddActionEventListener(*this);\r
 \r
-       Footer* pFooter = GetFooter();\r
-       pFooter->AddActionEventListener(*this);\r
        SetBackEventListner();\r
        SetFooter(__footerButtonStyle);\r
+       Footer* pFooter = GetFooter();\r
+       pFooter->AddActionEventListener(*this);\r
+\r
        AppLogDebug("EXIT");\r
 }\r
 \r
@@ -277,4 +287,28 @@ ContentPanel::OnFormBackRequested(Tizen::Ui::Controls::Form& source)
        AppLogDebug("ENTER");\r
        Tizen::App::Application::GetInstance()->Terminate();\r
        AppLogDebug("EXIT");\r
-}
\ No newline at end of file
+}\r
+\r
+void\r
+ContentPanel::OnContentDirectoryScanCompleted (const Tizen::Base::String &directoryPath, result r)\r
+{\r
+       UpdateContentList();\r
+}\r
+\r
+void\r
+ContentPanel::OnContentFileCreated (Tizen::Content::ContentId contentId, Tizen::Content::ContentType contentType, result r)\r
+{\r
+       UpdateContentList();\r
+}\r
+\r
+void\r
+ContentPanel::OnContentFileDeleted (Tizen::Content::ContentId contentId, Tizen::Content::ContentType contentType, result r)\r
+{\r
+       UpdateContentList();\r
+}\r
+\r
+void\r
+ContentPanel::OnContentFileUpdated (Tizen::Content::ContentId contentId, Tizen::Content::ContentType contentType, result r)\r
+{\r
+       UpdateContentList();\r
+}\r
index 15d19c2..90c822d 100644 (file)
@@ -68,12 +68,6 @@ FolderListEditorPanel::OnTerminating(void)
                __pPlayListPickerPopup = null;
        }
 
-       Header* pHeader = GetParentHeader();
-       pHeader->RemoveActionEventListener(*this);
-
-       Footer* pFooter = GetFooter();
-       pFooter->RemoveActionEventListener(*this);
-
        AppLogDebug("EXIT");
        return E_SUCCESS;
 }
@@ -180,6 +174,10 @@ FolderListEditorPanel::OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previ
                                                                        Tizen::Base::Collection::IList* pArgs)
 {
        AppLogDebug("ENTER");
+
+       Header* pHeader = GetParentHeader();
+       pHeader->RemoveActionEventListener(*this);
+
        Form* pForm = dynamic_cast<Form*>(GetParent());
        Footer* pFooter = null;
        AppAssert(pForm);
@@ -366,7 +364,6 @@ FolderListEditorPanel::OnFormBackRequested(Tizen::Ui::Controls::Form& source)
        SceneManager* pSceneManager = SceneManager::GetInstance();
        AppAssert(pSceneManager);
 
-//     SetTabHeaderStyle();
        pSceneManager->GoBackward(BackwardSceneTransition());
        AppLogDebug("EXIT");
 }
@@ -445,7 +442,6 @@ void
 FolderListEditorPanel::SetEditHeaderStyle(void)
 {
        AppLogDebug("ENTER");
-       RemoveParentHeaderActionEventListener();
        Header* pHeader = GetParentHeader();
        String titleText(ResourceManager::GetString(L"IDS_COM_BODY_EDIT"));
        CommonUtil::SetEditHeaderStyle(*pHeader, titleText);
@@ -455,18 +451,6 @@ FolderListEditorPanel::SetEditHeaderStyle(void)
 }
 
 void
-FolderListEditorPanel::SetTabHeaderStyle(void)
-{
-       AppLogDebug("ENTER");
-       Header* pHeader = GetParentHeader();
-       pHeader->RemoveActionEventListener(*this);
-       CommonUtil::SetTabHeaderStyle(*pHeader);
-       AddParentHeaderActionEventListener();
-       pHeader->Invalidate(true);
-       AppLogDebug("EXIT");
-}
-
-void
 FolderListEditorPanel::SetDisableIconAllCheckButton(void)
 {
        AppLogDebug("ENTER");
@@ -526,4 +510,4 @@ FolderListEditorPanel::CreateTableViewItem(Tizen::Ui::Container& parent, const T
 
        AppLogDebug("EXIT");
        return E_SUCCESS;
-}
\ No newline at end of file
+}
index 83eb416..5a8a1c4 100644 (file)
@@ -181,8 +181,8 @@ SearchForm::OnKeypadClosed(Tizen::Ui::Control& source)
 {
        AppLogDebug("ENTER");
        //GetFooter()->SetShowState(true);
-       Rectangle clientBounds = GetClientAreaBounds();
-       __pSearchTableView->SetBounds(Rectangle(0, 0, clientBounds.width, clientBounds.height - __pSearchBar->GetHeight()));
+//     Rectangle clientBounds = GetClientAreaBounds();
+//     __pSearchTableView->SetBounds(Rectangle(0, 0, clientBounds.width, clientBounds.height - __pSearchBar->GetHeight()));
        AppLogDebug("EXIT");
 }
 
@@ -190,8 +190,8 @@ void
 SearchForm::OnKeypadOpened(Tizen::Ui::Control& source)
 {
        AppLogDebug("ENTER");
-       Rectangle clientBounds = GetClientAreaBounds();
-       __pSearchTableView->SetBounds(Rectangle(0, 0, clientBounds.width, clientBounds.height - __pSearchBar->GetHeight()));
+//     Rectangle clientBounds = GetClientAreaBounds();
+//     __pSearchTableView->SetBounds(Rectangle(0, 0, clientBounds.width, clientBounds.height - __pSearchBar->GetHeight()));
        AppLogDebug("EXIT");
 }
 
index 4096c52..e5fbb36 100644 (file)
@@ -424,11 +424,38 @@ SetAsPopup::OnAppControlCompleteResponseReceived(const AppId& appId,
        {
                if (appControlResult == APP_CTRL_RESULT_SUCCEEDED)
                {
-                       const String* pResultString = static_cast<const String*>(pExtraData->GetValue(String(APPCONTROL_KEY_SOCIAL_ITEM_ID)));
-
-                       AppLogDebug("%ls", pResultString->GetPointer());
-                       int contactId;
-                       Integer::Parse(*pResultString, contactId);
+                       int contactId = -1;
+                       String* pKey = null;
+                       ArrayList* pArrayListValue = null;
+                       String* pResultString = null;
+                       if (pExtraData != null)
+                       {
+                               IMapEnumerator* pEnum = pExtraData->GetMapEnumeratorN();
+                               while (pEnum->MoveNext() == E_SUCCESS)
+                               {
+                                       pKey = static_cast<String*>(pEnum->GetKey());
+                                       if (pKey->Equals(APPCONTROL_KEY_SOCIAL_ITEM_ID, true))
+                                       {
+                                               pArrayListValue = static_cast<ArrayList*>(pEnum->GetValue());
+                                               pResultString = static_cast<String*>(pArrayListValue->GetAt(0));
+                                               AppLogDebug("extraData : %ls:%ls", pKey->GetPointer(), pResultString->GetPointer());
+                                               Integer::Parse(*pResultString, contactId);
+                                               break;
+                                       }
+                               }
+                               delete pEnum;
+
+                               if (contactId < 0)
+                               {
+                                       AppLogDebug("pKey is invaild");
+                                       return;
+                               }
+                       }
+                       else
+                       {
+                               AppLogDebug("pExtraData is null");
+                               return;
+                       }
 
                        AddressbookManager* pAddressbookManager = AddressbookManager::GetInstance();
                        Addressbook* pAddressbook = pAddressbookManager->GetAddressbookN(DEFAULT_ADDRESSBOOK_ID);
@@ -463,4 +490,4 @@ SetAsPopup::SetCurrentContentPath(Tizen::Base::String* contentPath)
        AppLogDebug("ENTER");
        __pCurrentContentPath = contentPath;
        AppLogDebug("EXIT");
-}
\ No newline at end of file
+}