merge with master
authorJinkun Jang <jinkun.jang@samsung.com>
Fri, 15 Mar 2013 16:06:10 +0000 (01:06 +0900)
committerJinkun Jang <jinkun.jang@samsung.com>
Fri, 15 Mar 2013 16:06:10 +0000 (01:06 +0900)
172 files changed:
inc/MpAlbumContentListForm.h [new file with mode: 0755]
inc/MpAlbumContentPickerPanel.h [changed mode: 0644->0755]
inc/MpAlbumListEditorPanel.h
inc/MpAlbumListPanel.h
inc/MpAlbumListPresentationModel.h
inc/MpAlbumPickerPanel.h
inc/MpAllContentPickerPanel.h
inc/MpAllListEditorPanel.h
inc/MpAllListPanel.h [changed mode: 0644->0755]
inc/MpAllListPresentationModel.h [changed mode: 0644->0755]
inc/MpArtistAlbumListEditorForm.h
inc/MpArtistAlbumListForm.h
inc/MpArtistAllSongListForm.h
inc/MpArtistContentListForm.h [new file with mode: 0755]
inc/MpArtistContentPickerPanel.h
inc/MpArtistListEditorPanel.h
inc/MpArtistListPanel.h
inc/MpArtistListPresentationModel.h
inc/MpArtistPickerPanel.h
inc/MpBaseForm.h [changed mode: 0644->0755]
inc/MpBasePanel.h [changed mode: 0644->0755]
inc/MpCommonUtil.h
inc/MpComposerContentListForm.h [new file with mode: 0755]
inc/MpComposerContentPickerPanel.h
inc/MpComposerListEditorPanel.h
inc/MpComposerListPanel.h
inc/MpComposerListPresentationModel.h
inc/MpComposerPickerPanel.h
inc/MpContentDetailForm.h [changed mode: 0644->0755]
inc/MpContentForm.h [changed mode: 0644->0755]
inc/MpContentInformationStruct.h
inc/MpContentListEditorForm.h [deleted file]
inc/MpContentListForm.h [changed mode: 0644->0755]
inc/MpContentListPresentationModel.h [deleted file]
inc/MpFolderContentListForm.h [new file with mode: 0755]
inc/MpFolderContentPickerPanel.h
inc/MpFolderListEditorPanel.h
inc/MpFolderListPanel.h
inc/MpFolderListPresentationModel.h
inc/MpFolderPickerPanel.h
inc/MpFormFactory.h [changed mode: 0644->0755]
inc/MpGenreContentListForm.h [new file with mode: 0755]
inc/MpGenreContentPickerPanel.h
inc/MpGenreListEditorPanel.h
inc/MpGenreListPanel.h
inc/MpGenreListPresentationModel.h
inc/MpGenrePickerPanel.h
inc/MpIMusicPlayerEventListener.h [changed mode: 0644->0755]
inc/MpIMusicSettingEventListener.h [changed mode: 0644->0755]
inc/MpIThumbnailProviderHandler.h [new file with mode: 0755]
inc/MpMainFrame.h [changed mode: 0644->0755]
inc/MpMusicPlayerApp.h [changed mode: 0644->0755]
inc/MpMusicPlayerForm.h
inc/MpMusicPlayerPresentationModel.h
inc/MpNowPlayContentPanel.h [changed mode: 0644->0755]
inc/MpPanelFactory.h
inc/MpPlaylistContentListForm.h [new file with mode: 0755]
inc/MpPlaylistCreatorForm.h [changed mode: 0644->0755]
inc/MpPlaylistDB.h
inc/MpPlaylistEditorPresentationModel.h
inc/MpPlaylistListEditorPanel.h
inc/MpPlaylistListPanel.h
inc/MpPlaylistListPresentationModel.h [changed mode: 0755->0644]
inc/MpPlaylistPickerPopup.h
inc/MpResourceManager.h [changed mode: 0644->0755]
inc/MpSceneRegister.h [changed mode: 0755->0644]
inc/MpSearchForm.h
inc/MpSearchPresentationModel.h
inc/MpSetAsPopup.h [changed mode: 0644->0755]
inc/MpSettingForm.h [changed mode: 0644->0755]
inc/MpSettingPresentationModel.h [changed mode: 0644->0755]
inc/MpSharePopup.h
inc/MpSoundPathPopup.h
inc/MpThumbnailBase.h [new file with mode: 0755]
inc/MpThumbnailEvent.h [new file with mode: 0755]
inc/MpThumbnailEventArg.h [new file with mode: 0755]
inc/MpThumbnailEventListener.h [new file with mode: 0755]
inc/MpThumbnailInfo.h [new file with mode: 0755]
inc/MpThumbnailJob.h [new file with mode: 0755]
inc/MpThumbnailProvider.h [new file with mode: 0755]
inc/MpTypes.h [changed mode: 0755->0644]
inc/MpUserPlaylistContentListForm.h
inc/MpYearContentListForm.h [new file with mode: 0755]
inc/MpYearContentPickerPanel.h
inc/MpYearListEditorPanel.h
inc/MpYearListPanel.h
inc/MpYearListPresentationModel.h
inc/MpYearPickerPanel.h
manifest.xml
res/screen-size-normal/IDL_CONTENT_FORM.xml [new file with mode: 0644]
src/MpAlbumContentListForm.cpp [new file with mode: 0644]
src/MpAlbumContentPickerPanel.cpp [changed mode: 0755->0644]
src/MpAlbumListEditorPanel.cpp
src/MpAlbumListPanel.cpp [changed mode: 0755->0644]
src/MpAlbumListPresentationModel.cpp
src/MpAlbumPickerPanel.cpp [changed mode: 0755->0644]
src/MpAllContentPickerPanel.cpp [changed mode: 0755->0644]
src/MpAllListEditorPanel.cpp [changed mode: 0755->0644]
src/MpAllListPanel.cpp [changed mode: 0644->0755]
src/MpAllListPresentationModel.cpp
src/MpArtistAlbumListEditorForm.cpp [changed mode: 0755->0644]
src/MpArtistAlbumListForm.cpp [changed mode: 0755->0644]
src/MpArtistAllSongListForm.cpp [changed mode: 0755->0644]
src/MpArtistContentListForm.cpp [new file with mode: 0644]
src/MpArtistContentPickerPanel.cpp [changed mode: 0755->0644]
src/MpArtistListEditorPanel.cpp [changed mode: 0755->0644]
src/MpArtistListPanel.cpp [changed mode: 0755->0644]
src/MpArtistListPresentationModel.cpp
src/MpArtistPickerPanel.cpp [changed mode: 0755->0644]
src/MpCommonUtil.cpp [changed mode: 0755->0644]
src/MpComposerContentListForm.cpp [new file with mode: 0644]
src/MpComposerContentPickerPanel.cpp [changed mode: 0755->0644]
src/MpComposerListEditorPanel.cpp [changed mode: 0755->0644]
src/MpComposerListPanel.cpp [changed mode: 0755->0644]
src/MpComposerListPresentationModel.cpp [changed mode: 0755->0644]
src/MpComposerPickerPanel.cpp [changed mode: 0755->0644]
src/MpContentDetailForm.cpp [changed mode: 0755->0644]
src/MpContentForm.cpp
src/MpContentListEditorForm.cpp [deleted file]
src/MpContentListForm.cpp [changed mode: 0644->0755]
src/MpContentListPresentationModel.cpp [deleted file]
src/MpFolderContentListForm.cpp [new file with mode: 0644]
src/MpFolderContentPickerPanel.cpp [changed mode: 0755->0644]
src/MpFolderListEditorPanel.cpp [changed mode: 0755->0644]
src/MpFolderListPanel.cpp [changed mode: 0755->0644]
src/MpFolderListPresentationModel.cpp [changed mode: 0755->0644]
src/MpFolderPickerPanel.cpp [changed mode: 0755->0644]
src/MpFormFactory.cpp
src/MpGenreContentListForm.cpp [new file with mode: 0644]
src/MpGenreContentPickerPanel.cpp [changed mode: 0755->0644]
src/MpGenreListEditorPanel.cpp [changed mode: 0755->0644]
src/MpGenreListPanel.cpp [changed mode: 0755->0644]
src/MpGenreListPresentationModel.cpp [changed mode: 0755->0644]
src/MpGenrePickerPanel.cpp [changed mode: 0755->0644]
src/MpMainFrame.cpp [changed mode: 0644->0755]
src/MpMusicPlayerApp.cpp
src/MpMusicPlayerEntry.cpp [changed mode: 0644->0755]
src/MpMusicPlayerForm.cpp
src/MpMusicPlayerPresentationModel.cpp
src/MpNowPlayContentPanel.cpp
src/MpPanelFactory.cpp [changed mode: 0644->0755]
src/MpPlaylistContentListForm.cpp [new file with mode: 0644]
src/MpPlaylistCreatorForm.cpp
src/MpPlaylistDB.cpp
src/MpPlaylistEditorPresentationModel.cpp [changed mode: 0755->0644]
src/MpPlaylistListEditorPanel.cpp [changed mode: 0755->0644]
src/MpPlaylistListPanel.cpp [changed mode: 0755->0644]
src/MpPlaylistListPresentationModel.cpp [changed mode: 0755->0644]
src/MpPlaylistPickerPopup.cpp [changed mode: 0755->0644]
src/MpResourceManager.cpp [changed mode: 0644->0755]
src/MpSceneRegister.cpp [changed mode: 0755->0644]
src/MpSearchForm.cpp
src/MpSearchPresentationModel.cpp [changed mode: 0755->0644]
src/MpSetAsPopup.cpp [changed mode: 0755->0644]
src/MpSettingForm.cpp
src/MpSettingPresentationModel.cpp
src/MpSharePopup.cpp [changed mode: 0755->0644]
src/MpSoundPathPopup.cpp [changed mode: 0755->0644]
src/MpThumbnailBase.cpp [new file with mode: 0644]
src/MpThumbnailEvent.cpp [new file with mode: 0644]
src/MpThumbnailEventArg.cpp [new file with mode: 0644]
src/MpThumbnailInfo.cpp [new file with mode: 0644]
src/MpThumbnailJob.cpp [new file with mode: 0644]
src/MpThumbnailProvider.cpp [new file with mode: 0644]
src/MpTypes.cpp
src/MpUserPlaylistContentListForm.cpp [changed mode: 0755->0644]
src/MpYearContentListForm.cpp [new file with mode: 0644]
src/MpYearContentPickerPanel.cpp [changed mode: 0755->0644]
src/MpYearListEditorPanel.cpp [changed mode: 0755->0644]
src/MpYearListPanel.cpp [changed mode: 0755->0644]
src/MpYearListPresentationModel.cpp [changed mode: 0755->0644]
src/MpYearPickerPanel.cpp [changed mode: 0755->0644]

diff --git a/inc/MpAlbumContentListForm.h b/inc/MpAlbumContentListForm.h
new file mode 100755 (executable)
index 0000000..a048c02
--- /dev/null
@@ -0,0 +1,74 @@
+//
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.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://floralicense.org/license/
+//
+// 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.
+//
+
+/**
+ * @file               MpAlbumContentListForm.h
+ * @brief              This is the header file for AlbumContentListForm class.
+ */
+
+#ifndef _MP_ALBUM_CONTENT_LIST_FORM_H_
+#define _MP_ALBUM_CONTENT_LIST_FORM_H_
+
+#include "MpContentListForm.h"
+#include "MpThumbnailBase.h"
+
+class AlbumListPresentationModel;
+
+class AlbumContentListForm
+       : public ContentListForm
+       , public ThumbnailBase
+       , public Tizen::App::IAppControlResponseListener
+{
+public:
+       AlbumContentListForm(void);
+       ~AlbumContentListForm(void);
+
+       virtual result OnInitializing(void);
+       virtual result OnTerminating(void);
+
+       virtual void OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previousSceneId,
+                                                                       const Tizen::Ui::Scenes::SceneId& currentSceneId,
+                                                                       Tizen::Base::Collection::IList* pArgs);
+
+       virtual void OnSceneDeactivated(const Tizen::Ui::Scenes::SceneId& currentSceneId,
+                                                                       const Tizen::Ui::Scenes::SceneId& nextSceneId);
+       virtual void OnActionPerformed(const Tizen::Ui::Control& source, int actionId);
+       virtual int GetItemCount(void);
+    
+       virtual Tizen::Ui::Controls::TableViewItem* CreateItem(const int itemIndex, int itemWidth);
+       virtual void OnTableViewItemStateChanged(Tizen::Ui::Controls::TableView& tableView,
+                                                       int itemIndex,
+                                                       Tizen::Ui::Controls::TableViewItem* pItem,
+                                                       Tizen::Ui::Controls::TableViewItemStatus status);
+       virtual void OnAppControlCompleteResponseReceived(const Tizen::App::AppId& appId,
+                               const Tizen::Base::String& operationId, Tizen::App::AppCtrlResult appControlResult,
+                               const Tizen::Base::Collection::IMap* pExtraData);
+
+       virtual void OnThumbnailInfoReveivedN(ThumbnailInfo* pThumbnailInfo);
+
+private:
+       result CreateTableViewItem(Tizen::Ui::Container& parent, const ContentInformation& contentInfo);
+       result CreateAlbumInfoPanel(const ContentInformation& contentInfo, const int Songs);
+       Tizen::Base::Collection::ArrayList* MakePlayerSceneParam(int startIndex);
+
+       void ToggleViewMode(bool editMode);
+
+private:
+       Tizen::Ui::Controls::Panel* __pContentInfoPanel;
+       AlbumListPresentationModel* __pPresentationModel;
+};
+
+#endif // _MP_ALBUM_CONTENT_LIST_FORM_H_
\ No newline at end of file
old mode 100644 (file)
new mode 100755 (executable)
index 6b13b13..003bf97
@@ -1,4 +1,4 @@
-//
+//
 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
 //
 // Licensed under the Flora License, Version 1.0 (the License);
 // limitations under the License.
 //
 
+/**
+ * @file               MpAlbumContentPickerPanel.h
+ * @brief              This is the header file for AlbumContentPickerPanel class.
+ */
+
 #ifndef _MP_ALBUM_CONTENT_PICKER_PANEL_H_
 #define _MP_ALBUM_CONTENT_PICKER_PANEL_H_
 
+#include "MpAlbumListPresentationModel.h"
 #include "MpCommonUtil.h"
 #include "MpTypes.h"
-#include "MpAlbumListPresentationModel.h"
 
 class AlbumContentPickerPanel
        : public Tizen::Ui::Controls::Panel
@@ -29,8 +34,8 @@ class AlbumContentPickerPanel
        , public Tizen::Ui::Scenes::ISceneEventListener
 {
 public:
-       AlbumContentPickerPanel();
-       ~AlbumContentPickerPanel();
+       AlbumContentPickerPanel(void);
+       ~AlbumContentPickerPanel(void);
        bool Initialize(void);
 
        virtual result OnInitializing(void);
@@ -38,29 +43,29 @@ public:
        virtual void OnActionPerformed(const Tizen::Ui::Control& source, int actionId);
 
        virtual void OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previousSceneId,
-                                                                  const Tizen::Ui::Scenes::SceneId& currentSceneId,
-                                                                  Tizen::Base::Collection::IList* pArgs);
+                                                                       const Tizen::Ui::Scenes::SceneId& currentSceneId,
+                                                                       Tizen::Base::Collection::IList* pArgs);
        virtual void OnSceneDeactivated(const Tizen::Ui::Scenes::SceneId& currentSceneId,
                                                                        const Tizen::Ui::Scenes::SceneId& nextSceneId);
 
-
        virtual int GetItemCount(void);
-    virtual Tizen::Ui::Controls::TableViewItem* CreateItem(const int itemIndex, int itemWidth);
-    virtual bool DeleteItem(const int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem);
-    virtual void UpdateItem(int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem);
-    virtual int GetDefaultItemHeight(void);
+       virtual Tizen::Ui::Controls::TableViewItem* CreateItem(const int itemIndex, int itemWidth);
+       virtual bool DeleteItem(const int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem);
+       virtual void UpdateItem(int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem);
+       virtual int GetDefaultItemHeight(void);
+
+       virtual void OnTableViewItemStateChanged(Tizen::Ui::Controls::TableView& tableView,
+                                                       int itemIndex,
+                                                       Tizen::Ui::Controls::TableViewItem* pItem,
+                                                       Tizen::Ui::Controls::TableViewItemStatus status);
+       virtual void OnTableViewContextItemActivationStateChanged(Tizen::Ui::Controls::TableView& tableView,
+                                                                       int itemIndex,
+                                                                       Tizen::Ui::Controls::TableViewContextItem* pContextItem,
+                                                                       bool activated);
+       virtual void OnTableViewItemReordered(Tizen::Ui::Controls::TableView& tableView,
+                                               int itemIndexFrom,
+                                               int itemIndexTo);
 
-    virtual void OnTableViewItemStateChanged(Tizen::Ui::Controls::TableView& tableView,
-                                             int itemIndex,
-                                             Tizen::Ui::Controls::TableViewItem* pItem,
-                                             Tizen::Ui::Controls::TableViewItemStatus status);
-    virtual void OnTableViewContextItemActivationStateChanged(Tizen::Ui::Controls::TableView& tableView,
-                                                              int itemIndex,
-                                                              Tizen::Ui::Controls::TableViewContextItem* pContextItem,
-                                                              bool activated);
-    virtual void OnTableViewItemReordered(Tizen::Ui::Controls::TableView& tableView,
-                                          int itemIndexFrom,
-                                          int itemIndexTo);
 private:
        int __checkedItemCount;
        Tizen::Ui::Controls::TableView* __pContentTableView;
@@ -69,4 +74,4 @@ private:
        AlbumListPresentationModel* __pPresentationModel;
 };
 
-#endif //_MP_ALBUM_CONTENT_PICKER_PANEL_H_
+#endif // _MP_ALBUM_CONTENT_PICKER_PANEL_H_
\ No newline at end of file
index 4d22920..e2ec748 100755 (executable)
@@ -1,4 +1,4 @@
-//
+//
 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
 //
 // Licensed under the Flora License, Version 1.0 (the License);
 // limitations under the License.
 //
 
+/**
+ * @file               MpAlbumListEditorPanel.h
+ * @brief              This is the header file for AlbumListEditorPanel class.
+ */
+
 #ifndef _MP_ALBUM_LIST_EDITOR_PANEL_H_
 #define _MP_ALBUM_LIST_EDITOR_PANEL_H_
 
-#include "MpTypes.h"
-#include "MpSceneRegister.h"
 #include "MpAlbumListPresentationModel.h"
 #include "MpBasePanel.h"
+#include "MpSceneRegister.h"
+#include "MpThumbnailBase.h"
+#include "MpTypes.h"
 
 class PlayListPickerPopup;
 
 class AlbumListEditorPanel
        : public BasePanel
+       , public ThumbnailBase
        , public Tizen::Ui::Controls::ITableViewItemProvider
        , public Tizen::Ui::Controls::ITableViewItemEventListener
        , public Tizen::Ui::IActionEventListener
@@ -41,34 +48,36 @@ public:
        virtual void OnActionPerformed(const Tizen::Ui::Control& source, int actionId);
 
        virtual void OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previousSceneId,
-                                                                  const Tizen::Ui::Scenes::SceneId& currentSceneId,
-                                                                  Tizen::Base::Collection::IList* pArgs);
+                                                                       const Tizen::Ui::Scenes::SceneId& currentSceneId,
+                                                                       Tizen::Base::Collection::IList* pArgs);
        virtual void OnSceneDeactivated(const Tizen::Ui::Scenes::SceneId& currentSceneId,
                                                                        const Tizen::Ui::Scenes::SceneId& nextSceneId);
 
-
        virtual int GetItemCount(void);
-    virtual Tizen::Ui::Controls::TableViewItem* CreateItem(const int itemIndex, int itemWidth);
-    virtual bool DeleteItem(const int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem);
-    virtual void UpdateItem(int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem);
-    virtual int GetDefaultItemHeight(void);
+       virtual Tizen::Ui::Controls::TableViewItem* CreateItem(const int itemIndex, int itemWidth);
+       virtual bool DeleteItem(const int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem);
+       virtual void UpdateItem(int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem);
+       virtual int GetDefaultItemHeight(void);
+
+       virtual void OnTableViewItemStateChanged(Tizen::Ui::Controls::TableView& tableView,
+                                                       int itemIndex,
+                                                       Tizen::Ui::Controls::TableViewItem* pItem,
+                                                       Tizen::Ui::Controls::TableViewItemStatus status);
+       virtual void OnTableViewContextItemActivationStateChanged(Tizen::Ui::Controls::TableView& tableView,
+                                                                       int itemIndex,
+                                                                       Tizen::Ui::Controls::TableViewContextItem* pContextItem,
+                                                                       bool activated);
+       virtual void OnTableViewItemReordered(Tizen::Ui::Controls::TableView& tableView,
+                                               int itemIndexFrom,
+                                               int itemIndexTo);
 
-    virtual void OnTableViewItemStateChanged(Tizen::Ui::Controls::TableView& tableView,
-                                             int itemIndex,
-                                             Tizen::Ui::Controls::TableViewItem* pItem,
-                                             Tizen::Ui::Controls::TableViewItemStatus status);
-    virtual void OnTableViewContextItemActivationStateChanged(Tizen::Ui::Controls::TableView& tableView,
-                                                              int itemIndex,
-                                                              Tizen::Ui::Controls::TableViewContextItem* pContextItem,
-                                                              bool activated);
-    virtual void OnTableViewItemReordered(Tizen::Ui::Controls::TableView& tableView,
-                                          int itemIndexFrom,
-                                          int itemIndexTo);
+       virtual void OnUpdateContentList(void);
 
-    virtual void OnUpdateContentList(void);
+       virtual void OnThumbnailInfoReveivedN(ThumbnailInfo* pThumbnailInfo);
+       virtual void OnUserEventReceivedN(RequestId requestId, Tizen::Base::Collection::IList* pArgs);
 
 private:
-    void UpdateContentList(void);
+       void UpdateContentList(void);
 
 private:
        int __checkedItemCount;
@@ -77,6 +86,7 @@ private:
        Tizen::Ui::Controls::Label* __pCheckedCountLabel;
        PlayListPickerPopup* __pPlayListPickerPopup;
        AlbumListPresentationModel* __pPresentationModel;
+       Tizen::Graphics::Bitmap* __pThumbnail;
 };
 
-#endif // _MP_ALBUM_LIST_EDITOR_PANEL_H_
+#endif // _MP_ALBUM_LIST_EDITOR_PANEL_H_
\ No newline at end of file
index 723baab..db0e5ec 100755 (executable)
@@ -1,4 +1,4 @@
-//
+//
 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
 //
 // Licensed under the Flora License, Version 1.0 (the License);
 // limitations under the License.
 //
 
+/**
+ * @file               MpAlbumListPanel.h
+ * @brief              This is the header file for AlbumListPanel class.
+ */
+
 #ifndef _MP_ALBUM_LIST_PANEL_H_
 #define _MP_ALBUM_LIST_PANEL_H_
 
-#include "MpTypes.h"
-#include "MpSceneRegister.h"
 #include "MpAlbumListPresentationModel.h"
 #include "MpBasePanel.h"
+#include "MpSceneRegister.h"
+#include "MpThumbnailBase.h"
+#include "MpTypes.h"
 
 class PlayListPickerPopup;
 class NowPlayContentPanel;
 
 class AlbumListPanel
        : public BasePanel
+       , public ThumbnailBase
        , public Tizen::Ui::Controls::ITableViewItemProvider
        , public Tizen::Ui::Controls::ITableViewItemEventListener
        , public Tizen::Ui::Controls::IFastScrollListener
@@ -45,39 +52,41 @@ public:
        virtual void OnActionPerformed(const Tizen::Ui::Control& source, int actionId);
 
        virtual void OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previousSceneId,
-                                                                  const Tizen::Ui::Scenes::SceneId& currentSceneId,
-                                                                  Tizen::Base::Collection::IList* pArgs);
+                                                                       const Tizen::Ui::Scenes::SceneId& currentSceneId,
+                                                                       Tizen::Base::Collection::IList* pArgs);
        virtual void OnSceneDeactivated(const Tizen::Ui::Scenes::SceneId& currentSceneId,
                                                                        const Tizen::Ui::Scenes::SceneId& nextSceneId);
 
-
        virtual int GetItemCount(void);
     
-    virtual Tizen::Ui::Controls::TableViewItem* CreateItem(const int itemIndex, int itemWidth);
-    virtual bool DeleteItem(const int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem);
-    virtual void UpdateItem(int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem);
-    virtual int GetDefaultItemHeight(void);
+       virtual Tizen::Ui::Controls::TableViewItem* CreateItem(const int itemIndex, int itemWidth);
+       virtual bool DeleteItem(const int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem);
+       virtual void UpdateItem(int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem);
+       virtual int GetDefaultItemHeight(void);
 
-    virtual void OnTableViewItemStateChanged(Tizen::Ui::Controls::TableView& tableView,
-                                             int itemIndex,
-                                             Tizen::Ui::Controls::TableViewItem* pItem,
-                                             Tizen::Ui::Controls::TableViewItemStatus status);
-    virtual void OnTableViewContextItemActivationStateChanged(Tizen::Ui::Controls::TableView& tableView,
-                                                              int itemIndex,
-                                                              Tizen::Ui::Controls::TableViewContextItem* pContextItem,
-                                                              bool activated);
-    virtual void OnTableViewItemReordered(Tizen::Ui::Controls::TableView& tableView,
-                                          int itemIndexFrom,
-                                          int itemIndexTo);
+       virtual void OnTableViewItemStateChanged(Tizen::Ui::Controls::TableView& tableView,
+                                                       int itemIndex,
+                                                       Tizen::Ui::Controls::TableViewItem* pItem,
+                                                       Tizen::Ui::Controls::TableViewItemStatus status);
+       virtual void OnTableViewContextItemActivationStateChanged(Tizen::Ui::Controls::TableView& tableView,
+                                                                       int itemIndex,
+                                                                       Tizen::Ui::Controls::TableViewContextItem* pContextItem,
+                                                                       bool activated);
+       virtual void OnTableViewItemReordered(Tizen::Ui::Controls::TableView& tableView,
+                                               int itemIndexFrom,
+                                               int itemIndexTo);
 
-    virtual void OnFastScrollIndexSelected(Tizen::Ui::Control& source, Tizen::Base::String& index);
-    virtual void OnFormBackRequested(Tizen::Ui::Controls::Form& source);
-    virtual void OnUpdateContentList(void);
+       virtual void OnFastScrollIndexSelected(Tizen::Ui::Control& source, Tizen::Base::String& index);
+       virtual void OnFormBackRequested(Tizen::Ui::Controls::Form& source);
+       virtual void OnUpdateContentList(void);
+
+       virtual void OnThumbnailInfoReveivedN(ThumbnailInfo* pThumbnailInfo);
+       virtual void OnUserEventReceivedN(RequestId requestId, Tizen::Base::Collection::IList* pArgs);
 
 private:
        result CreateTableViewItem(Tizen::Ui::Container& parent,
-                                                          const ContentInformationStruct& contentInfoStruct,
-                               const int contentTotalCount);
+                                                               const ContentInformation& contentInfoStruct,
+                                                               const int contentTotalCount);
        Tizen::Base::Collection::ArrayList* GetContentListN(int itemIndex);
        void UpdateContentList(void);
 
@@ -90,7 +99,7 @@ protected:
        Tizen::Ui::Controls::Label* __pNoContentImageLabel;
        Tizen::Ui::Controls::Label* __pNoContentTextLabel;
        AlbumListPresentationModel* __pPresentationModel;
+       Tizen::Graphics::Bitmap* __pThumbnail;
 };
 
-
-#endif // _MP_ALBUM_LIST_PANEL_H_
+#endif // _MP_ALBUM_LIST_PANEL_H_
\ No newline at end of file
index 368f9af..750c45a 100755 (executable)
@@ -1,4 +1,4 @@
-//
+//
 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
 //
 // Licensed under the Flora License, Version 1.0 (the License);
 // limitations under the License.
 //
 
+/**
+ * @file               MpAlbumListPresentationModel.h
+ * @brief              This is the header file for AlbumListPresentationModel class.
+ */
+
 #ifndef _MP_ALBUM_LIST_PRESENTATION_MODEL_H_
 #define _MP_ALBUM_LIST_PRESENTATION_MODEL_H_
 
-#include "MpTypes.h"
 #include "MpCommonUtil.h"
 #include "MpContentInformationStruct.h"
+#include "MpTypes.h"
 
 class AlbumListPresentationModel
 {
 public:
-    static AlbumListPresentationModel* GetInstance(void);
-
-    int GetTotalContentCount(int index);
-    int GetTotalAlbumCount(void);
-
-    void RefreshContent(void);
-    ContentInformationStruct* GetContentInfoN(int index);
-
-    void SearchSong(int index);
-    int GetSongContentCount(void);
-    ContentInformationStruct* GetSongContentInfoN(int index);
-
-    Tizen::Base::String* GetContentName(int index);
-    Tizen::Base::Collection::ArrayList* SearchContentItemN(int index);
+       static AlbumListPresentationModel* GetInstance(void);
+       int GetContentCount(int albumIndex);
+       int GetAllAlbumCount(void);
+       ContentInformation* GetAlbumInfoN(int albumIndex);
+       void InitializeContentList(int albumIndex);
+       ContentInformation* GetContentInfoN(int contentIndex);
+       Tizen::Base::String* GetAlbumName(int albumIndex);
+       Tizen::Base::Collection::ArrayList* GetContentPathListN(int albumIndex);
+       void RefreshContentList(int albumIndex);
+       int GetCurrentAlbumIndex(void);
+
+       void AddContent(Tizen::Base::String path, int playlistIndex);
+       result UpdateAlbumList(void);
 
 private:
-    AlbumListPresentationModel(void);
-    AlbumListPresentationModel(const AlbumListPresentationModel& albumListPresentationModel);
-    const AlbumListPresentationModel& operator = (const AlbumListPresentationModel& albumListPresentationModel);
-    ~AlbumListPresentationModel(void);
-    result Construct(void);
+       AlbumListPresentationModel(void);
+       AlbumListPresentationModel(const AlbumListPresentationModel& albumListPresentationModel);
+       const AlbumListPresentationModel& operator = (const AlbumListPresentationModel& albumListPresentationModel);
+       ~AlbumListPresentationModel(void);
+       result Construct(void);
 
 private:
-    Tizen::Base::Collection::IList* __pAlbumList;
-    Tizen::Base::Collection::IList* __pSongList;
-    static AlbumListPresentationModel* pAlbumListPresentationModelInstance;
+       Tizen::Base::Collection::IList* __pAlbumList;
+       Tizen::Base::Collection::IList* __pContentList;
+       static AlbumListPresentationModel* pAlbumListPresentationModelInstance;
+       int __currentAlbumIndex;
 };
 
-#endif // _MP_ALBUM_LIST_PRESENTATION_MODEL_H_
+#endif // _MP_ALBUM_LIST_PRESENTATION_MODEL_H_
\ No newline at end of file
index 50d5e72..976ed03 100755 (executable)
@@ -1,4 +1,4 @@
-//
+//
 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
 //
 // Licensed under the Flora License, Version 1.0 (the License);
 // limitations under the License.
 //
 
-#ifndef _MP_ALBUM_PICKER_H_
-#define _MP_ALBUM_PICKER_H_
+/**
+ * @file               MpAlbumPickerPanel.h
+ * @brief              This is the header file for AlbumPickerPanel class.
+ */
+
+#ifndef _MP_ALBUM_PICKER_PANEL_H_
+#define _MP_ALBUM_PICKER_PANEL_H_
 
 #include "MpAlbumListPanel.h"
-#include "MpCommonUtil.h"
 #include "MpBasePanel.h"
+#include "MpCommonUtil.h"
 
 class NowPlayContentPanel;
 
 class AlbumPickerPanel
-: public AlbumListPanel
+       : public AlbumListPanel
 {
 public:
        AlbumPickerPanel(void);
        ~AlbumPickerPanel(void);
 
        void OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previousSceneId,
-                           const Tizen::Ui::Scenes::SceneId& currentSceneId,
-                           Tizen::Base::Collection::IList* pArgs);
+                               const Tizen::Ui::Scenes::SceneId& currentSceneId,
+                               Tizen::Base::Collection::IList* pArgs);
        void OnSceneDeactivated(const Tizen::Ui::Scenes::SceneId& currentSceneId,
                                                        const Tizen::Ui::Scenes::SceneId& nextSceneId);
        void OnTableViewItemStateChanged(Tizen::Ui::Controls::TableView& tableView,
-                                     int itemIndex,
-                                     Tizen::Ui::Controls::TableViewItem* pItem,
-                                     Tizen::Ui::Controls::TableViewItemStatus status);
+                                               int itemIndex,
+                                               Tizen::Ui::Controls::TableViewItem* pItem,
+                                               Tizen::Ui::Controls::TableViewItemStatus status);
 };
 
-#endif //_MP_ALBUM_CONTENT_PIKCER_H_
+#endif // _MP_ALBUM_PICKER_PANEL_H_
\ No newline at end of file
index d5c35f7..0c5a44c 100755 (executable)
@@ -1,4 +1,4 @@
-//
+//
 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
 //
 // Licensed under the Flora License, Version 1.0 (the License);
 // limitations under the License.
 //
 
-#ifndef _H_MP_ALL_CONTENT_PICKER_PANEL_H_
-#define _H_MP_ALL_CONTENT_PICKER_PANEL_H_
+/**
+ * @file               MpAllContentPickerPanel.h
+ * @brief              This is the header file for AllContentPickerPanel class.
+ */
+
+#ifndef _MP_ALL_CONTENT_PICKER_PANEL_H_
+#define _MP_ALL_CONTENT_PICKER_PANEL_H_
 
 #include "MpAllListEditorPanel.h"
 #include "MpContentForm.h"
@@ -30,13 +35,14 @@ public:
 
        void OnActionPerformed(const Tizen::Ui::Control& source, int actionId);
        void OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previousSceneId,
-                                                                  const Tizen::Ui::Scenes::SceneId& currentSceneId,
-                                                                  Tizen::Base::Collection::IList* pArgs);
+                                                               const Tizen::Ui::Scenes::SceneId& currentSceneId,
+                                                               Tizen::Base::Collection::IList* pArgs);
        void OnSceneDeactivated(const Tizen::Ui::Scenes::SceneId& currentSceneId,
-                                                                       const Tizen::Ui::Scenes::SceneId& nextSceneId);
+                                                               const Tizen::Ui::Scenes::SceneId& nextSceneId);
+
 private:
        Tizen::Ui::Controls::Label* __pNoContentImageLabel;
        Tizen::Ui::Controls::Label* __pNoContentTextLabel;
 };
 
-#endif // _H_MP_ALL_CONTENT_PICKER_PANEL_H_
+#endif // _MP_ALL_CONTENT_PICKER_PANEL_H_
\ No newline at end of file
index 61d569b..142a5f4 100755 (executable)
@@ -1,4 +1,4 @@
-//
+//
 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
 //
 // Licensed under the Flora License, Version 1.0 (the License);
 // limitations under the License.
 //
 
+/**
+ * @file               MpAllListEditorPanel.h
+ * @brief              This is the header file for AllListEditorPanel class.
+ */
+
 #ifndef _MP_ALL_LIST_EDITOR_PANEL_H_
 #define _MP_ALL_LIST_EDITOR_PANEL_H_
 
 #include <new>
 #include <FApp.h>
 #include <FBase.h>
-#include <FSocial.h>
-#include <FUiScenes.h>
 #include <FContent.h>
+#include <FSocial.h>
 #include <FUi.h>
-
-#include "MpCommonUtil.h"
-#include "MpTypes.h"
-#include "MpSceneRegister.h"
+#include <FUiScenes.h>
 #include "MpAllListPresentationModel.h"
 #include "MpBasePanel.h"
+#include "MpCommonUtil.h"
+#include "MpSceneRegister.h"
+#include "MpThumbnailBase.h"
+#include "MpTypes.h"
 
-class SharePopup;
 class PlayListPickerPopup;
+class SharePopup;
 
 class AllListEditorPanel
        : public BasePanel
+       , public ThumbnailBase
        , public Tizen::Ui::Controls::ITableViewItemProvider
        , public Tizen::Ui::Controls::ITableViewItemEventListener
        , public Tizen::Ui::IActionEventListener
-    , public Tizen::Ui::Scenes::ISceneEventListener
+       , public Tizen::Ui::Scenes::ISceneEventListener
 {
 public:
        AllListEditorPanel(void);
@@ -51,35 +57,37 @@ public:
 
        virtual void OnActionPerformed(const Tizen::Ui::Control& source, int actionId);
        virtual void OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previousSceneId,
-                                                                  const Tizen::Ui::Scenes::SceneId& currentSceneId,
-                                                                  Tizen::Base::Collection::IList* pArgs);
+                                                                       const Tizen::Ui::Scenes::SceneId& currentSceneId,
+                                                                       Tizen::Base::Collection::IList* pArgs);
        virtual void OnSceneDeactivated(const Tizen::Ui::Scenes::SceneId& currentSceneId,
                                                                        const Tizen::Ui::Scenes::SceneId& nextSceneId);
 
-
        virtual int GetItemCount(void);
     
-    virtual Tizen::Ui::Controls::TableViewItem* CreateItem(const int itemIndex, int itemWidth);
-    virtual bool DeleteItem(const int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem);
-    virtual void UpdateItem(int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem);
-    virtual int GetDefaultItemHeight(void);
+       virtual Tizen::Ui::Controls::TableViewItem* CreateItem(const int itemIndex, int itemWidth);
+       virtual bool DeleteItem(const int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem);
+       virtual void UpdateItem(int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem);
+       virtual int GetDefaultItemHeight(void);
+
+       virtual void OnTableViewItemStateChanged(Tizen::Ui::Controls::TableView& tableView,
+                                                       int itemIndex,
+                                                       Tizen::Ui::Controls::TableViewItem* pItem,
+                                                       Tizen::Ui::Controls::TableViewItemStatus status);
+       virtual void OnTableViewContextItemActivationStateChanged(Tizen::Ui::Controls::TableView& tableView,
+                                                                       int itemIndex,
+                                                                       Tizen::Ui::Controls::TableViewContextItem* pContextItem,
+                                                                       bool activated);
+       virtual void OnTableViewItemReordered(Tizen::Ui::Controls::TableView& tableView,
+                                               int itemIndexFrom,
+                                               int itemIndexTo);
 
-    virtual void OnTableViewItemStateChanged(Tizen::Ui::Controls::TableView& tableView,
-                                             int itemIndex,
-                                             Tizen::Ui::Controls::TableViewItem* pItem,
-                                             Tizen::Ui::Controls::TableViewItemStatus status);
-    virtual void OnTableViewContextItemActivationStateChanged(Tizen::Ui::Controls::TableView& tableView,
-                                                              int itemIndex,
-                                                              Tizen::Ui::Controls::TableViewContextItem* pContextItem,
-                                                              bool activated);
-    virtual void OnTableViewItemReordered(Tizen::Ui::Controls::TableView& tableView,
-                                          int itemIndexFrom,
-                                          int itemIndexTo);
+       virtual void OnUpdateContentList(void);
 
-    virtual void OnUpdateContentList(void);
+       virtual void OnThumbnailInfoReveivedN(ThumbnailInfo* pThumbnailInfo);
+       virtual void OnUserEventReceivedN(RequestId requestId, Tizen::Base::Collection::IList* pArgs);
 
 private:
-       result CreateTableViewItem(Tizen::Ui::Container& parent, const ContentInformationStruct& contentInfoStruct);
+       result CreateTableViewItem(Tizen::Ui::Container& parent, const ContentInformation& contentInfoStruct);
        void UpdateContentList(void);
 
 private:
@@ -92,6 +100,9 @@ protected:
        Tizen::Ui::Controls::CheckButton* __pSelectAllCheckedButton;
        Tizen::Ui::Controls::Label* __pCheckedCountLabel;
        AllListPresentationModel* __pPresentationModel;
+       Tizen::Graphics::Bitmap* __pThumbnail;
+       Tizen::Ui::Controls::Label* __pNoContentImageLabel;
+       Tizen::Ui::Controls::Label* __pNoContentTextLabel;
 };
 
-#endif // _MP_ALL_LIST_EDITOR_PANEL_H_
+#endif // _MP_ALL_LIST_EDITOR_PANEL_H_
\ No newline at end of file
old mode 100644 (file)
new mode 100755 (executable)
index 9ebe430..6eea3bd
@@ -1,4 +1,4 @@
-//
+//
 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
 //
 // Licensed under the Flora License, Version 1.0 (the License);
 // limitations under the License.
 //
 
+/**
+ * @file               MpAllListPanel.h
+ * @brief              This is the header file for AllListPanel class.
+ */
+
 #ifndef _MP_ALL_LIST_PANEL_H_
 #define _MP_ALL_LIST_PANEL_H_
 
@@ -22,6 +27,7 @@
 #include "MpCommonUtil.h"
 #include "MpResourceManager.h"
 #include "MpSceneRegister.h"
+#include "MpThumbnailBase.h"
 #include "MpTypes.h"
 
 class NowPlayContentPanel;
@@ -30,6 +36,7 @@ class SharePopup;
 
 class AllListPanel
        : public BasePanel
+       , public ThumbnailBase
        , public Tizen::Ui::Controls::ITableViewItemProvider
        , public Tizen::Ui::Controls::ITableViewItemEventListener
        , public Tizen::Ui::Controls::IFastScrollListener
@@ -37,7 +44,7 @@ class AllListPanel
        , public Tizen::Ui::Controls::IFormBackEventListener
        , public Tizen::App::IAppControlResponseListener
        , public Tizen::Ui::IActionEventListener
-    , public Tizen::Ui::Scenes::ISceneEventListener
+       , public Tizen::Ui::Scenes::ISceneEventListener
 {
 public:
        AllListPanel(void);
@@ -54,43 +61,45 @@ public:
        virtual void OnActionPerformed(const Tizen::Ui::Control& source, int actionId);
 
        virtual void OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previousSceneId,
-                                                                  const Tizen::Ui::Scenes::SceneId& currentSceneId,
-                                                                  Tizen::Base::Collection::IList* pArgs);
+                                                                       const Tizen::Ui::Scenes::SceneId& currentSceneId,
+                                                                       Tizen::Base::Collection::IList* pArgs);
        virtual void OnSceneDeactivated(const Tizen::Ui::Scenes::SceneId& currentSceneId,
                                                                        const Tizen::Ui::Scenes::SceneId& nextSceneId);
 
-
        virtual int GetItemCount(void);
     
-    virtual Tizen::Ui::Controls::TableViewItem* CreateItem(const int itemIndex, int itemWidth);
-    virtual bool DeleteItem(const int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem);
-    virtual void UpdateItem(int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem);
-    virtual int GetDefaultItemHeight(void);
-
-    virtual void OnTableViewItemStateChanged(Tizen::Ui::Controls::TableView& tableView,
-                                             int itemIndex,
-                                             Tizen::Ui::Controls::TableViewItem* pItem,
-                                             Tizen::Ui::Controls::TableViewItemStatus status);
-    virtual void OnTableViewContextItemActivationStateChanged(Tizen::Ui::Controls::TableView& tableView,
-                                                              int itemIndex,
-                                                              Tizen::Ui::Controls::TableViewContextItem* pContextItem,
-                                                              bool activated);
-    virtual void OnTableViewItemReordered(Tizen::Ui::Controls::TableView& tableView,
-                                          int itemIndexFrom,
-                                          int itemIndexTo);
-
-    virtual void OnFastScrollIndexSelected(Tizen::Ui::Control& source, Tizen::Base::String& index);
-
-    virtual void OnScrollEndReached (Tizen::Ui::Control &source, Tizen::Ui::Controls::ScrollEndEvent type);
+       virtual Tizen::Ui::Controls::TableViewItem* CreateItem(const int itemIndex, int itemWidth);
+       virtual bool DeleteItem(const int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem);
+       virtual void UpdateItem(int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem);
+       virtual int GetDefaultItemHeight(void);
+
+       virtual void OnTableViewItemStateChanged(Tizen::Ui::Controls::TableView& tableView,
+                                                       int itemIndex,
+                                                       Tizen::Ui::Controls::TableViewItem* pItem,
+                                                       Tizen::Ui::Controls::TableViewItemStatus status);
+       virtual void OnTableViewContextItemActivationStateChanged(Tizen::Ui::Controls::TableView& tableView,
+                                                                       int itemIndex,
+                                                                       Tizen::Ui::Controls::TableViewContextItem* pContextItem,
+                                                                       bool activated);
+       virtual void OnTableViewItemReordered(Tizen::Ui::Controls::TableView& tableView,
+                                               int itemIndexFrom,
+                                               int itemIndexTo);
+
+       virtual void OnFastScrollIndexSelected(Tizen::Ui::Control& source, Tizen::Base::String& index);
+
+       virtual void OnScrollEndReached (Tizen::Ui::Control &source, Tizen::Ui::Controls::ScrollEndEvent type);
        virtual void OnScrollPositionChanged (Tizen::Ui::Control &source, int scrollPos);
        virtual void OnScrollStopped (Tizen::Ui::Control &source);
 
-    virtual void OnFormBackRequested(Tizen::Ui::Controls::Form& source);
-    virtual void OnUpdateContentList(void);
+       virtual void OnFormBackRequested(Tizen::Ui::Controls::Form& source);
+       virtual void OnUpdateContentList(void);
+
+       virtual void OnThumbnailInfoReveivedN(ThumbnailInfo* pThumbnailInfo);
+       virtual void OnUserEventReceivedN(RequestId requestId, Tizen::Base::Collection::IList* pArgs);
 
 private:
        result CreateTableViewContextItem(Tizen::Ui::Controls::TableViewContextItem& parent);
-       result CreateTableViewItem(Tizen::Ui::Container& parent, const ContentInformationStruct& contentInfoStruct);
+       result CreateTableViewItem(Tizen::Ui::Container& parent, const ContentInformation& contentInfoStruct);
        Tizen::Base::Collection::ArrayList* GetContentListN(int itemIndex);
        void UpdateContentList(void);
 
@@ -102,6 +111,7 @@ private:
        Tizen::Ui::Controls::Popup* __pDeletePopup;
        Tizen::Ui::Controls::Label* __pNoContentImageLabel;
        Tizen::Ui::Controls::Label* __pNoContentTextLabel;
+       Tizen::Graphics::Bitmap* __pThumbnail;
        NowPlayContentPanel* __pNowPlayContentPanel;
        PlayListPickerPopup* __pPlayListPickerPopup;
        AllListPresentationModel* __pPresentationModel;
@@ -110,4 +120,4 @@ private:
        int __scrolledDistance;
 };
 
-#endif // _MP_ALL_LIST_PANEL_H_
+#endif // _MP_ALL_LIST_PANEL_H_
\ No newline at end of file
old mode 100644 (file)
new mode 100755 (executable)
index 80437dd..a886b27
@@ -1,4 +1,4 @@
-//
+//
 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
 //
 // Licensed under the Flora License, Version 1.0 (the License);
 // limitations under the License.
 //
 
+/**
+ * @file               MpAllListPresentationModel.h
+ * @brief              This is the header file for AllListPresentationModel class.
+ */
+
 #ifndef _MP_ALL_LIST_PRESENTATION_MODEL_H_
 #define _MP_ALL_LIST_PRESENTATION_MODEL_H_
 
-#include "MpTypes.h"
 #include "MpCommonUtil.h"
 #include "MpContentInformationStruct.h"
+#include "MpTypes.h"
 
 class AllListPresentationModel
 {
 public:
-    static AllListPresentationModel* GetInstance(void);
-    void RefreshContent(void);
-    int GetTotalCount(void);
+       static AllListPresentationModel* GetInstance(void);
+       int GetTotalCount(void);
        result SetCallRingtone(int index);
        Tizen::Base::String GetContentName(int index);
-    Tizen::Base::Collection::ArrayList* GetContentListN(void);
-    Tizen::Base::String* GetCheckedContent(int index);
-    ContentInformationStruct* GetContentInfoN(int index);
-    result RemoveContent(int index);
+       Tizen::Base::Collection::ArrayList* GetContentListN(void);
+       Tizen::Base::String* GetCheckedContent(int index);
+       ContentInformation* GetContentInfoN(int index);
+       result RemoveContent(int index);
+       void AddContent(Tizen::Base::String path, int playlistIndex);
+       result UpdateContentList(void);
 
 private:
        AllListPresentationModel(void);
        AllListPresentationModel(AllListPresentationModel& allListPresentationModel);
        const AllListPresentationModel& operator = (const AllListPresentationModel& allListPresentationModel);
-    ~AllListPresentationModel(void);
-    result Construct(void);
-    void CreateContentIndexList(void);
+       ~AllListPresentationModel(void);
+       result Construct(void);
+       void CreateContentIndexList(void);
+
 private:
-    Tizen::Base::Collection::IList* __pContentList;
-    static AllListPresentationModel* pAllListPresentationModelInstance;
+       Tizen::Base::Collection::IList* __pContentList;
+       static AllListPresentationModel* pAllListPresentationModelInstance;
 };
 
-#endif // _MP_ALL_LIST_PRESENTATION_MODEL_H_
+#endif // _MP_ALL_LIST_PRESENTATION_MODEL_H_
\ No newline at end of file
index 4c60748..574b00a 100755 (executable)
@@ -1,4 +1,4 @@
-//
+//
 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
 //
 // Licensed under the Flora License, Version 1.0 (the License);
 // limitations under the License.
 //
 
+/**
+ * @file               MpArtistAlbumListEditorForm.h
+ * @brief              This is the header file for ArtistAlbumListEditorForm class.
+ */
+
 #ifndef _MP_ARTIST_ALBUM_LIST_EDITOR_FORM_H_
 #define _MP_ARTIST_ALBUM_LIST_EDITOR_FORM_H_
 
-#include "MpTypes.h"
-#include "MpSceneRegister.h"
 #include "MpArtistListPresentationModel.h"
+#include "MpSceneRegister.h"
+#include "MpThumbnailBase.h"
+#include "MpTypes.h"
 
 class PlayListPickerPopup;
 
 class ArtistAlbumListEditorForm
-       : public Tizen::Ui::Controls::Form
+       : public ThumbnailBase
+       , public Tizen::Ui::Controls::Form
        , public Tizen::Ui::Controls::ITableViewItemProvider
        , public Tizen::Ui::Controls::ITableViewItemEventListener
        , public Tizen::Ui::IActionEventListener
        , public Tizen::Ui::Scenes::ISceneEventListener
 {
 public:
-       ArtistAlbumListEditorForm();
-       virtual ~ArtistAlbumListEditorForm();
+       ArtistAlbumListEditorForm(void);
+       virtual ~ArtistAlbumListEditorForm(void);
 
        bool Initialize(void);
 
@@ -41,34 +48,38 @@ public:
        virtual void OnActionPerformed(const Tizen::Ui::Control& source, int actionId);
 
        virtual void OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previousSceneId,
-                                                                  const Tizen::Ui::Scenes::SceneId& currentSceneId, Tizen::Base::Collection::IList* pArgs);
+                                                                       const Tizen::Ui::Scenes::SceneId& currentSceneId, Tizen::Base::Collection::IList* pArgs);
        virtual void OnSceneDeactivated(const Tizen::Ui::Scenes::SceneId& currentSceneId,
                                                                        const Tizen::Ui::Scenes::SceneId& nextSceneId);
        virtual int GetItemCount(void);
 
-    virtual Tizen::Ui::Controls::TableViewItem* CreateItem(const int itemIndex, int itemWidth);
-    virtual bool DeleteItem(const int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem);
-    virtual void UpdateItem(int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem);
-    virtual int GetDefaultItemHeight(void);
+       virtual Tizen::Ui::Controls::TableViewItem* CreateItem(const int itemIndex, int itemWidth);
+       virtual bool DeleteItem(const int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem);
+       virtual void UpdateItem(int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem);
+       virtual int GetDefaultItemHeight(void);
+
+       virtual void OnTableViewItemStateChanged(Tizen::Ui::Controls::TableView& tableView,
+                                                       int itemIndex,
+                                                       Tizen::Ui::Controls::TableViewItem* pItem,
+                                                       Tizen::Ui::Controls::TableViewItemStatus status);
+       virtual void OnTableViewContextItemActivationStateChanged(Tizen::Ui::Controls::TableView& tableView,
+                                                                       int itemIndex,
+                                                                       Tizen::Ui::Controls::TableViewContextItem* pContextItem,
+                                                                       bool activated);
+       virtual void OnTableViewItemReordered(Tizen::Ui::Controls::TableView& tableView,
+                                               int itemIndexFrom,
+                                               int itemIndexTo);
+       virtual void OnThumbnailInfoReveivedN(ThumbnailInfo* pThumbnailInfo);
+       virtual void OnUserEventReceivedN(RequestId requestId, Tizen::Base::Collection::IList* pArgs);
 
-    virtual void OnTableViewItemStateChanged(Tizen::Ui::Controls::TableView& tableView,
-                                             int itemIndex,
-                                             Tizen::Ui::Controls::TableViewItem* pItem,
-                                             Tizen::Ui::Controls::TableViewItemStatus status);
-    virtual void OnTableViewContextItemActivationStateChanged(Tizen::Ui::Controls::TableView& tableView,
-                                                              int itemIndex,
-                                                              Tizen::Ui::Controls::TableViewContextItem* pContextItem,
-                                                              bool activated);
-    virtual void OnTableViewItemReordered(Tizen::Ui::Controls::TableView& tableView,
-                                          int itemIndexFrom,
-                                          int itemIndexTo);
 private:
        Tizen::Ui::Controls::TableView* __pContentTableView;
        Tizen::Ui::Controls::Label* __pCheckedCountLabel;
        Tizen::Ui::Controls::CheckButton* __pSelectAllCheckedButton;
+       Tizen::Graphics::Bitmap* __pThumbnail;
        int __checkedItemCount;
        PlayListPickerPopup* __pPlayListPickerPopup;
        ArtistListPresentationModel* __pPresentationModel;
 };
 
-#endif // _MP_ARTIST_ALBUM_LIST_EDITOR_FORM_H_
+#endif // _MP_ARTIST_ALBUM_LIST_EDITOR_FORM_H_
\ No newline at end of file
index 87f6383..501bf27 100755 (executable)
@@ -1,4 +1,4 @@
-//
+//
 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
 //
 // Licensed under the Flora License, Version 1.0 (the License);
 // limitations under the License.
 //
 
+/**
+ * @file               MpArtistAlbumListForm.h
+ * @brief              This is the header file for ArtistAlbumListForm class.
+ */
+
 #ifndef _MP_ARTIST_ALBUM_LIST_FORM_H_
 #define _MP_ARTIST_ALBUM_LIST_FORM_H_
 
-#include "MpTypes.h"
-#include "MpSceneRegister.h"
 #include "MpArtistListPresentationModel.h"
+#include "MpSceneRegister.h"
+#include "MpThumbnailBase.h"
+#include "MpTypes.h"
 
 class PlayListPickerPopup;
 class NowPlayContentPanel;
 
 class ArtistAlbumListForm
-       : public Tizen::Ui::Controls::Form
+       : public ThumbnailBase
+       , public Tizen::Ui::Controls::Form
        , public Tizen::Ui::Controls::ITableViewItemProvider
        , public Tizen::Ui::Controls::ITableViewItemEventListener
        , public Tizen::Ui::Controls::IFormBackEventListener
@@ -42,28 +49,30 @@ public:
        virtual void OnActionPerformed(const Tizen::Ui::Control& source, int actionId);
 
        virtual void OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previousSceneId,
-                                                                  const Tizen::Ui::Scenes::SceneId& currentSceneId, Tizen::Base::Collection::IList* pArgs);
+                                                                       const Tizen::Ui::Scenes::SceneId& currentSceneId, Tizen::Base::Collection::IList* pArgs);
        virtual void OnSceneDeactivated(const Tizen::Ui::Scenes::SceneId& currentSceneId,
                                                                        const Tizen::Ui::Scenes::SceneId& nextSceneId);
        virtual int GetItemCount(void);
     
-    virtual Tizen::Ui::Controls::TableViewItem* CreateItem(const int itemIndex, int itemWidth);
-    virtual bool DeleteItem(const int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem);
-    virtual void UpdateItem(int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem);
-    virtual int GetDefaultItemHeight(void);
+       virtual Tizen::Ui::Controls::TableViewItem* CreateItem(const int itemIndex, int itemWidth);
+       virtual bool DeleteItem(const int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem);
+       virtual void UpdateItem(int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem);
+       virtual int GetDefaultItemHeight(void);
 
-    virtual void OnTableViewItemStateChanged(Tizen::Ui::Controls::TableView& tableView,
-                                             int itemIndex,
-                                             Tizen::Ui::Controls::TableViewItem* pItem,
-                                             Tizen::Ui::Controls::TableViewItemStatus status);
-    virtual void OnTableViewContextItemActivationStateChanged(Tizen::Ui::Controls::TableView& tableView,
-                                                              int itemIndex,
-                                                              Tizen::Ui::Controls::TableViewContextItem* pContextItem,
-                                                              bool activated);
-    virtual void OnTableViewItemReordered(Tizen::Ui::Controls::TableView& tableView,
-                                          int itemIndexFrom,
-                                          int itemIndexTo);
-    virtual void OnFormBackRequested(Tizen::Ui::Controls::Form& source);
+       virtual void OnTableViewItemStateChanged(Tizen::Ui::Controls::TableView& tableView,
+                                                       int itemIndex,
+                                                       Tizen::Ui::Controls::TableViewItem* pItem,
+                                                       Tizen::Ui::Controls::TableViewItemStatus status);
+       virtual void OnTableViewContextItemActivationStateChanged(Tizen::Ui::Controls::TableView& tableView,
+                                                                       int itemIndex,
+                                                                       Tizen::Ui::Controls::TableViewContextItem* pContextItem,
+                                                                       bool activated);
+       virtual void OnTableViewItemReordered(Tizen::Ui::Controls::TableView& tableView,
+                                               int itemIndexFrom,
+                                               int itemIndexTo);
+       virtual void OnFormBackRequested(Tizen::Ui::Controls::Form& source);
+       virtual void OnThumbnailInfoReveivedN(ThumbnailInfo* pThumbnailInfo);
+       virtual void OnUserEventReceivedN(RequestId requestId, Tizen::Base::Collection::IList* pArgs);
 
 private:
        result AllSongCreateTableViewItem(Tizen::Ui::Container& parent, int totalCount);
@@ -78,8 +87,8 @@ private:
        PlayListPickerPopup* __pPlayListPickerPopup;
        Tizen::Ui::Controls::Label* __pNoContentImageLabel;
        Tizen::Ui::Controls::Label* __pNoContentTextLabel;
+       Tizen::Graphics::Bitmap* __pThumbnail;
        ArtistListPresentationModel* __pPresentationModel;
 };
 
-
-#endif //_MP_ARTIST_ALBUM_LIST_H_
+#endif // _MP_ARTIST_ALBUM_LIST_FORM_H_
\ No newline at end of file
index 8016c7f..d99dea0 100755 (executable)
@@ -1,4 +1,4 @@
-//
+//
 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
 //
 // Licensed under the Flora License, Version 1.0 (the License);
 // limitations under the License.
 //
 
+/**
+ * @file               MpArtistAllSongListForm.h
+ * @brief              This is the header file for ArtistAllSongListForm class.
+ */
+
 #ifndef _MP_ARTIST_ALL_SONG_LIST_FORM_H_
 #define _MP_ARTIST_ALL_SONG_LIST_FORM_H_
 
-#include "MpTypes.h"
-#include "MpSceneRegister.h"
 #include "MpArtistListPresentationModel.h"
+#include "MpSceneRegister.h"
+#include "MpThumbnailBase.h"
+#include "MpTypes.h"
 
 class NowPlayContentPanel;
 class PlayListPickerPopup;
 
 class ArtistAllSongListForm
-       : public Tizen::Ui::Controls::Form
+       : public ThumbnailBase
+       , public Tizen::Ui::Controls::Form
        , public Tizen::Ui::Controls::ITableViewItemProvider
        , public Tizen::Ui::Controls::ITableViewItemEventListener
        , public Tizen::Ui::Controls::IFormBackEventListener
@@ -42,38 +49,42 @@ public:
        virtual void OnActionPerformed(const Tizen::Ui::Control& source, int actionId);
 
        virtual void OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previousSceneId,
-                                                                  const Tizen::Ui::Scenes::SceneId& currentSceneId, Tizen::Base::Collection::IList* pArgs);
+                                                                       const Tizen::Ui::Scenes::SceneId& currentSceneId, Tizen::Base::Collection::IList* pArgs);
        virtual void OnSceneDeactivated(const Tizen::Ui::Scenes::SceneId& currentSceneId,
                                                                        const Tizen::Ui::Scenes::SceneId& nextSceneId);
        virtual int GetItemCount(void);
     
-    virtual Tizen::Ui::Controls::TableViewItem* CreateItem(const int itemIndex, int itemWidth);
-    virtual bool DeleteItem(const int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem);
-    virtual void UpdateItem(int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem);
-    virtual int GetDefaultItemHeight(void);
+       virtual Tizen::Ui::Controls::TableViewItem* CreateItem(const int itemIndex, int itemWidth);
+       virtual bool DeleteItem(const int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem);
+       virtual void UpdateItem(int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem);
+       virtual int GetDefaultItemHeight(void);
+
+       virtual void OnTableViewItemStateChanged(Tizen::Ui::Controls::TableView& tableView,
+                                                       int itemIndex,
+                                                       Tizen::Ui::Controls::TableViewItem* pItem,
+                                                       Tizen::Ui::Controls::TableViewItemStatus status);
+       virtual void OnTableViewContextItemActivationStateChanged(Tizen::Ui::Controls::TableView& tableView,
+                                                                       int itemIndex,
+                                                                       Tizen::Ui::Controls::TableViewContextItem* pContextItem,
+                                                                       bool activated);
+       virtual void OnTableViewItemReordered(Tizen::Ui::Controls::TableView& tableView,
+                                               int itemIndexFrom,
+                                               int itemIndexTo);
 
-    virtual void OnTableViewItemStateChanged(Tizen::Ui::Controls::TableView& tableView,
-                                             int itemIndex,
-                                             Tizen::Ui::Controls::TableViewItem* pItem,
-                                             Tizen::Ui::Controls::TableViewItemStatus status);
-    virtual void OnTableViewContextItemActivationStateChanged(Tizen::Ui::Controls::TableView& tableView,
-                                                              int itemIndex,
-                                                              Tizen::Ui::Controls::TableViewContextItem* pContextItem,
-                                                              bool activated);
-    virtual void OnTableViewItemReordered(Tizen::Ui::Controls::TableView& tableView,
-                                          int itemIndexFrom,
-                                          int itemIndexTo);
+       virtual void OnFormBackRequested(Tizen::Ui::Controls::Form& source);
 
-    virtual void OnFormBackRequested(Tizen::Ui::Controls::Form& source);
+       virtual void OnThumbnailInfoReveivedN(ThumbnailInfo* pThumbnailInfo);
+       virtual void OnUserEventReceivedN(RequestId requestId, Tizen::Base::Collection::IList* pArgs);
 
 private:
        result CreateTableViewItem(Tizen::Ui::Container& parent,
-                                                          const ContentInformationStruct& contentInfoStruct);
+                                                               const ContentInformation& contentInfoStruct);
+
 private:
        Tizen::Ui::Controls::TableView* __pContentTableView;
+       Tizen::Graphics::Bitmap* __pThumbnail;
        ArtistListPresentationModel* __pPresentationModel;
        PlayListPickerPopup* __pPlayListPickerPopup;
 };
 
-
-#endif //_MP_ARTIST_ALL_SONG_LIST_FORM_H_
+#endif // _MP_ARTIST_ALL_SONG_LIST_FORM_H_
\ No newline at end of file
diff --git a/inc/MpArtistContentListForm.h b/inc/MpArtistContentListForm.h
new file mode 100755 (executable)
index 0000000..0e38c5b
--- /dev/null
@@ -0,0 +1,65 @@
+//
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.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://floralicense.org/license/
+//
+// 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.
+//
+
+/**
+ * @file               MpArtistContentListForm.h
+ * @brief              This is the header file for ArtistContentListForm class.
+ */
+
+#ifndef _MP_ARTIST_CONTENT_LIST_FORM_H_
+#define _MP_ARTIST_CONTENT_LIST_FORM_H_
+
+#include "MpContentListForm.h"
+
+class ArtistListPresentationModel;
+
+class ArtistContentListForm
+       : public ContentListForm
+       , public Tizen::App::IAppControlResponseListener
+{
+public:
+       ArtistContentListForm(void);
+       ~ArtistContentListForm(void);
+
+private:
+       virtual result OnInitializing(void);
+       virtual result OnTerminating(void);
+       virtual void OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previousSceneId,
+                                                                       const Tizen::Ui::Scenes::SceneId& currentSceneId,
+                                                                       Tizen::Base::Collection::IList* pArgs);
+       virtual void OnSceneDeactivated(const Tizen::Ui::Scenes::SceneId& currentSceneId,
+                                                                       const Tizen::Ui::Scenes::SceneId& nextSceneId);
+       virtual void OnActionPerformed(const Tizen::Ui::Control& source, int actionId);
+       virtual int GetItemCount(void);
+       virtual Tizen::Ui::Controls::TableViewItem* CreateItem(const int itemIndex, int itemWidth);
+       virtual void OnTableViewItemStateChanged(Tizen::Ui::Controls::TableView& tableView,
+                                                       int itemIndex,
+                                                       Tizen::Ui::Controls::TableViewItem* pItem,
+                                                       Tizen::Ui::Controls::TableViewItemStatus status);
+       virtual void OnAppControlCompleteResponseReceived(const Tizen::App::AppId& appId,
+                               const Tizen::Base::String& operationId, Tizen::App::AppCtrlResult appControlResult,
+                               const Tizen::Base::Collection::IMap* pExtraData);
+
+private:
+       result CreateTableViewItem(Tizen::Ui::Container& parent, const ContentInformation& contentInfo);
+       Tizen::Base::Collection::ArrayList* MakePlayerSceneParam(int startIndex);
+       void ToggleViewMode(bool editMode);
+
+private:
+       ArtistListPresentationModel* __pPresentationModel;
+};
+
+#endif // _MP_ARTIST_CONTENT_LIST_FORM_H_
\ No newline at end of file
index 44f48b9..258867d 100755 (executable)
@@ -1,4 +1,4 @@
-//
+//
 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
 //
 // Licensed under the Flora License, Version 1.0 (the License);
 // limitations under the License.
 //
 
+/**
+ * @file               MpArtistContentPickerPanel.h
+ * @brief              This is the header file for ArtistContentPickerPanel class.
+ */
+
 #ifndef _MP_ARTIST_CONTENT_PICKER_PANEL_H_
 #define _MP_ARTIST_CONTENT_PICKER_PANEL_H_
 
+#include "MpArtistListPresentationModel.h"
 #include "MpCommonUtil.h"
 #include "MpTypes.h"
-#include "MpArtistListPresentationModel.h"
 
 class ArtistContentPickerPanel
        : public Tizen::Ui::Controls::Panel
@@ -29,8 +34,8 @@ class ArtistContentPickerPanel
        , public Tizen::Ui::Scenes::ISceneEventListener
 {
 public:
-       ArtistContentPickerPanel();
-       ~ArtistContentPickerPanel();
+       ArtistContentPickerPanel(void);
+       ~ArtistContentPickerPanel(void);
        bool Initialize(void);
 
        virtual result OnInitializing(void);
@@ -38,12 +43,11 @@ public:
        virtual void OnActionPerformed(const Tizen::Ui::Control& source, int actionId);
 
        virtual void OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previousSceneId,
-                                                                  const Tizen::Ui::Scenes::SceneId& currentSceneId,
-                                                                  Tizen::Base::Collection::IList* pArgs);
+                                                                       const Tizen::Ui::Scenes::SceneId& currentSceneId,
+                                                                       Tizen::Base::Collection::IList* pArgs);
        virtual void OnSceneDeactivated(const Tizen::Ui::Scenes::SceneId& currentSceneId,
                                                                        const Tizen::Ui::Scenes::SceneId& nextSceneId);
 
-
        virtual int GetItemCount(void);
        virtual Tizen::Ui::Controls::TableViewItem* CreateItem(const int itemIndex, int itemWidth);
        virtual bool DeleteItem(const int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem);
@@ -51,16 +55,17 @@ public:
        virtual int GetDefaultItemHeight(void);
 
        virtual void OnTableViewItemStateChanged(Tizen::Ui::Controls::TableView& tableView,
-                                                                                        int itemIndex,
-                                                                                        Tizen::Ui::Controls::TableViewItem* pItem,
-                                                                                        Tizen::Ui::Controls::TableViewItemStatus status);
+                                                       int itemIndex,
+                                                       Tizen::Ui::Controls::TableViewItem* pItem,
+                                                       Tizen::Ui::Controls::TableViewItemStatus status);
        virtual void OnTableViewContextItemActivationStateChanged(Tizen::Ui::Controls::TableView& tableView,
-                                                                                                                         int itemIndex,
-                                                                                                                         Tizen::Ui::Controls::TableViewContextItem* pContextItem,
-                                                                                                                         bool activated);
+                                                                       int itemIndex,
+                                                                       Tizen::Ui::Controls::TableViewContextItem* pContextItem,
+                                                                       bool activated);
        virtual void OnTableViewItemReordered(Tizen::Ui::Controls::TableView& tableView,
-                                                                                 int itemIndexFrom,
-                                                                                 int itemIndexTo);
+                                               int itemIndexFrom,
+                                               int itemIndexTo);
+
 private:
        int __checkedItemCount;
        Tizen::Ui::Controls::TableView* __pContentTableView;
@@ -69,4 +74,4 @@ private:
        ArtistListPresentationModel* __pPresentationModel;
 };
 
-#endif //_MP_ARTIST_CONTENT_PICKER_PANEL_H_
+#endif // _MP_ARTIST_CONTENT_PICKER_PANEL_H_
\ No newline at end of file
index e38f7e2..cd26c98 100755 (executable)
@@ -1,4 +1,4 @@
-//
+//
 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
 //
 // Licensed under the Flora License, Version 1.0 (the License);
 // limitations under the License.
 //
 
+/**
+ * @file               MpArtistListEditorPanel.h
+ * @brief              This is the header file for ArtistListEditorPanel class.
+ */
+
 #ifndef _MP_ARTIST_LIST_EDITOR_PANEL_H_
 #define _MP_ARTIST_LIST_EDITOR_PANEL_H_
 
 #include <FSocial.h>
 #include <FUi.h>
 #include <FUiScenes.h>
-
-#include "MpTypes.h"
-#include "MpSceneRegister.h"
 #include "MpArtistListPresentationModel.h"
 #include "MpBasePanel.h"
+#include "MpSceneRegister.h"
+#include "MpThumbnailBase.h"
+#include "MpTypes.h"
 
 class PlayListPickerPopup;
 
 class ArtistListEditorPanel
        : public BasePanel
+       , public ThumbnailBase
        , public Tizen::Ui::Controls::ITableViewItemProvider
        , public Tizen::Ui::Controls::ITableViewItemEventListener
        , public Tizen::Ui::IActionEventListener
-    , public Tizen::Ui::Scenes::ISceneEventListener
+       , public Tizen::Ui::Scenes::ISceneEventListener
 {
 public:
        ArtistListEditorPanel(void);
@@ -45,46 +51,49 @@ public:
        virtual result OnInitializing(void);
        virtual result OnTerminating(void);
        virtual void OnActionPerformed(const Tizen::Ui::Control& source,
-                                      int actionId);
+                                               int actionId);
 
        virtual void OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previousSceneId,
-                                      const Tizen::Ui::Scenes::SceneId& currentSceneId,
-                                      Tizen::Base::Collection::IList* pArgs);
+                                               const Tizen::Ui::Scenes::SceneId& currentSceneId,
+                                               Tizen::Base::Collection::IList* pArgs);
        virtual void OnSceneDeactivated(const Tizen::Ui::Scenes::SceneId& currentSceneId,
-                                       const Tizen::Ui::Scenes::SceneId& nextSceneId);
+                                               const Tizen::Ui::Scenes::SceneId& nextSceneId);
 
        virtual int GetItemCount(void);
        
        virtual Tizen::Ui::Controls::TableViewItem* CreateItem(const int itemIndex, int itemWidth);
        virtual bool DeleteItem(const int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem);
-    virtual void UpdateItem(int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem);
-    virtual int GetDefaultItemHeight(void);
+       virtual void UpdateItem(int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem);
+       virtual int GetDefaultItemHeight(void);
 
-    virtual void OnTableViewItemStateChanged(Tizen::Ui::Controls::TableView& tableView,
-                                             int itemIndex,
-                                             Tizen::Ui::Controls::TableViewItem* pItem,
-                                             Tizen::Ui::Controls::TableViewItemStatus status);
-    virtual void OnTableViewContextItemActivationStateChanged(Tizen::Ui::Controls::TableView& tableView,
-                                                              int itemIndex,
-                                                              Tizen::Ui::Controls::TableViewContextItem* pContextItem,
-                                                              bool activated);
-    virtual void OnTableViewItemReordered(Tizen::Ui::Controls::TableView& tableView,
-                                          int itemIndexFrom,
-                                          int itemIndexTo);
+       virtual void OnTableViewItemStateChanged(Tizen::Ui::Controls::TableView& tableView,
+                                                       int itemIndex,
+                                                       Tizen::Ui::Controls::TableViewItem* pItem,
+                                                       Tizen::Ui::Controls::TableViewItemStatus status);
+       virtual void OnTableViewContextItemActivationStateChanged(Tizen::Ui::Controls::TableView& tableView,
+                                                                       int itemIndex,
+                                                                       Tizen::Ui::Controls::TableViewContextItem* pContextItem,
+                                                                       bool activated);
+       virtual void OnTableViewItemReordered(Tizen::Ui::Controls::TableView& tableView,
+                                               int itemIndexFrom,
+                                               int itemIndexTo);
 
-    virtual void OnUpdateContentList(void);
+       virtual void OnUpdateContentList(void);
+
+       virtual void OnThumbnailInfoReveivedN(ThumbnailInfo* pThumbnailInfo);
+       virtual void OnUserEventReceivedN(RequestId requestId, Tizen::Base::Collection::IList* pArgs);
 
 private:
-    void UpdateContentList(void);
+       void UpdateContentList(void);
 
 protected:
        int __checkedItemCount;
        Tizen::Ui::Controls::TableView* __pContentTableView;
        Tizen::Ui::Controls::CheckButton* __pSelectAllCheckedButton;
        Tizen::Ui::Controls::Label* __pCheckedCountLabel;
+       Tizen::Graphics::Bitmap* __pThumbnail;
        PlayListPickerPopup* __pPlayListPickerPopup;
        ArtistListPresentationModel* __pPresentationModel;
 };
 
-#endif // _MP_ARTIST_LIST_EDITOR_PANEL_H_
-
+#endif // _MP_ARTIST_LIST_EDITOR_PANEL_H_
\ No newline at end of file
index 0a8c72f..7f85e90 100755 (executable)
@@ -1,4 +1,4 @@
-//
+//
 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
 //
 // Licensed under the Flora License, Version 1.0 (the License);
 // limitations under the License.
 //
 
+/**
+ * @file               MpArtistListPanel.h
+ * @brief              This is the header file for ArtistPanel class.
+ */
+
 #ifndef _MP_ARTIST_LIST_PANEL_H_
 #define _MP_ARTIST_LIST_PANEL_H_
 
 #include <FSocial.h>
 #include <FUi.h>
 #include <FUiScenes.h>
-
-#include "MpTypes.h"
-#include "MpSceneRegister.h"
 #include "MpArtistListPresentationModel.h"
 #include "MpBasePanel.h"
+#include "MpSceneRegister.h"
+#include "MpThumbnailBase.h"
+#include "MpTypes.h"
 
 class PlayListPickerPopup;
 class NowPlayContentPanel;
 
 class ArtistListPanel
        : public BasePanel
+       , public ThumbnailBase
        , public Tizen::Ui::Controls::ITableViewItemProvider
        , public Tizen::Ui::Controls::ITableViewItemEventListener
        , public Tizen::Ui::Controls::IFastScrollListener
@@ -48,39 +54,42 @@ public:
        virtual result OnInitializing(void);
        virtual result OnTerminating(void);
        virtual void OnActionPerformed(const Tizen::Ui::Control& source,
-                                      int actionId);
+                                               int actionId);
 
        virtual void OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previousSceneId,
-                                      const Tizen::Ui::Scenes::SceneId& currentSceneId,
-                                      Tizen::Base::Collection::IList* pArgs);
+                                               const Tizen::Ui::Scenes::SceneId& currentSceneId,
+                                               Tizen::Base::Collection::IList* pArgs);
        virtual void OnSceneDeactivated(const Tizen::Ui::Scenes::SceneId& currentSceneId,
-                                       const Tizen::Ui::Scenes::SceneId& nextSceneId);
+                                               const Tizen::Ui::Scenes::SceneId& nextSceneId);
 
        virtual int GetItemCount(void);
     
-    virtual Tizen::Ui::Controls::TableViewItem* CreateItem(const int itemIndex, int itemWidth);
-    virtual bool DeleteItem(const int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem);
-    virtual void UpdateItem(int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem);
-    virtual int GetDefaultItemHeight(void);
+       virtual Tizen::Ui::Controls::TableViewItem* CreateItem(const int itemIndex, int itemWidth);
+       virtual bool DeleteItem(const int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem);
+       virtual void UpdateItem(int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem);
+       virtual int GetDefaultItemHeight(void);
 
-    virtual void OnTableViewItemStateChanged(Tizen::Ui::Controls::TableView& tableView,
-                                             int itemIndex,
-                                             Tizen::Ui::Controls::TableViewItem* pItem,
-                                             Tizen::Ui::Controls::TableViewItemStatus status);
-    virtual void OnTableViewContextItemActivationStateChanged(Tizen::Ui::Controls::TableView& tableView,
-                                                              int itemIndex,
-                                                              Tizen::Ui::Controls::TableViewContextItem* pContextItem,
-                                                              bool activated);
-    virtual void OnTableViewItemReordered(Tizen::Ui::Controls::TableView& tableView,
-                                          int itemIndexFrom,
-                                          int itemIndexTo);
+       virtual void OnTableViewItemStateChanged(Tizen::Ui::Controls::TableView& tableView,
+                                                       int itemIndex,
+                                                       Tizen::Ui::Controls::TableViewItem* pItem,
+                                                       Tizen::Ui::Controls::TableViewItemStatus status);
+       virtual void OnTableViewContextItemActivationStateChanged(Tizen::Ui::Controls::TableView& tableView,
+                                                                       int itemIndex,
+                                                                       Tizen::Ui::Controls::TableViewContextItem* pContextItem,
+                                                                       bool activated);
+       virtual void OnTableViewItemReordered(Tizen::Ui::Controls::TableView& tableView,
+                                               int itemIndexFrom,
+                                               int itemIndexTo);
 
-    virtual void OnFastScrollIndexSelected(Tizen::Ui::Control& source, Tizen::Base::String& index);
-    virtual void OnFormBackRequested(Tizen::Ui::Controls::Form& source);
-    virtual void OnUpdateContentList(void);
+       virtual void OnFastScrollIndexSelected(Tizen::Ui::Control& source, Tizen::Base::String& index);
+       virtual void OnFormBackRequested(Tizen::Ui::Controls::Form& source);
+       virtual void OnUpdateContentList(void);
+
+       virtual void OnThumbnailInfoReveivedN(ThumbnailInfo* pThumbnailInfo);
+       virtual void OnUserEventReceivedN(RequestId requestId, Tizen::Base::Collection::IList* pArgs);
 
 private:
-    void UpdateContentList(void);
+       void UpdateContentList(void);
 
 protected:
        int __itemIndex;
@@ -90,8 +99,8 @@ protected:
        Tizen::Ui::Controls::TableView* __pContentTableView;
        Tizen::Ui::Controls::Label* __pNoContentImageLabel;
        Tizen::Ui::Controls::Label* __pNoContentTextLabel;
+       Tizen::Graphics::Bitmap* __pThumbnail;
        ArtistListPresentationModel* __pPresentationModel;
 };
 
-#endif // _MP_ARTIST_LIST_PANEL_H_
-
+#endif // _MP_ARTIST_LIST_PANEL_H_
\ No newline at end of file
index a45e2b6..000383b 100755 (executable)
@@ -1,4 +1,4 @@
-//
+//
 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
 //
 // Licensed under the Flora License, Version 1.0 (the License);
 // limitations under the License.
 //
 
+/**
+ * @file               MpArtistListPresentationModel.h
+ * @brief              This is the header file for ArtistListPresentationModel class.
+ */
+
 #ifndef _MP_ARTIST_LIST_PRESENTATION_MODEL_H_
 #define _MP_ARTIST_LIST_PRESENTATION_MODEL_H_
 
-#include "MpTypes.h"
 #include "MpCommonUtil.h"
 #include "MpContentInformationStruct.h"
+#include "MpTypes.h"
 
 class ArtistListPresentationModel
 {
 public:
-    static ArtistListPresentationModel* GetInstance(void);
-
-    int GetTotalContentCount(int artistIndex);
-    int GetTotalArtistCount(void);
-
-    //ArtistAlbumList
-    int GetTotalAlbumContentCount(int index);
-    int GetTotalArtistAlbumCount(void);
+       static ArtistListPresentationModel* GetInstance(void);
 
-    //AllSong
-    int GetTotalAllSongCount(void);
-
-    //ArtistAlbumList & AllSong
-    void SearchArtistAlbum(Tizen::Base::String& keyword);
-    void DeleteArtistAlbum(void);
-    void SearchSong(int index);
-
-    int GetSongContentCount(void);
-
-    ContentInformationStruct* GetContentInfoN(int index);
-    ContentInformationStruct* GetArtistAlbumContentInfoN(int index);
-    ContentInformationStruct* GetAllSongContentInfoN(int index);
-    Tizen::Base::Collection::ArrayList* GetAllSongContentList(void);
-    ContentInformationStruct* GetSongContentInfoN(int index);
-
-    void RefreshContent(void);
-    Tizen::Base::String* GetContentName(int index);
-    Tizen::Base::Collection::ArrayList* SearchContentItemN(int index, SearchMode mode = SEARCH_MODE_ARTIST);
+       int GetArtistContentCount(int artistIndex);
+       int GetArtistListCount(void);
+       int GetArtistAlbumContentCount(int albumIndex);
+       int GetArtistAlbumListCount(void);
+       int GetArtistContentListCount(void);
+       void InitializeArtistAlbumList(Tizen::Base::String& keyWord);
+       void InitializeContentList(int albumIndex);
+       void DeleteArtistAlbum(void);
+       ContentInformation* GetArtistnIfoN(int artistIndex);
+       ContentInformation* GetArtistAlbumInfoN(int albumIndex);
+       ContentInformation* GetArtistContentInfoN(int contentIndex);
+       ContentInformation* GetArtistAlbumContentInfoN(int contentIndex);
+       Tizen::Base::String* GetArtistName(int artistIndex);
+       Tizen::Base::Collection::ArrayList* GetContentPathListN(int index, SearchMode mode = SEARCH_MODE_ARTIST);
+       Tizen::Base::Collection::ArrayList* GetAllContentPathListN(void);
+       void RefreshContentList(int albumIndex);
+       int GetCurrentArtistAlbumIndex(void);
+       void AddContent(Tizen::Base::String path, int playlistIndex);
+       result UpdateArtistList(void);
 
 private:
-    ArtistListPresentationModel(void);
-    ArtistListPresentationModel(const ArtistListPresentationModel& artistListPresentationModel);
-    const ArtistListPresentationModel& operator = (const ArtistListPresentationModel& artistListPresentationModel);
-    ~ArtistListPresentationModel(void);
-    result Construct(void);
+       ArtistListPresentationModel(void);
+       ArtistListPresentationModel(const ArtistListPresentationModel& artistListPresentationModel);
+       const ArtistListPresentationModel& operator = (const ArtistListPresentationModel& artistListPresentationModel);
+       ~ArtistListPresentationModel(void);
+       result Construct(void);
 
-    Tizen::Base::Collection::IList* __pArtistList;
-    Tizen::Base::Collection::IList* __pAllSongList;
-    Tizen::Base::Collection::IList* __pSongList;
-    Tizen::Base::Collection::ArrayList* __pArtistAlbumList;
-    static ArtistListPresentationModel* pArtistListPresentationModelInstance;
+private:
+       Tizen::Base::Collection::IList* __pArtistList;
+       Tizen::Base::Collection::IList* __pArtistContentList;
+       Tizen::Base::Collection::IList* __pArtistAlbumContentList;
+       Tizen::Base::Collection::ArrayList* __pArtistAlbumList;
+       static ArtistListPresentationModel* pArtistListPresentationModelInstance;
+       int __currentArtistAlbumIndex;
 };
 
-#endif // _MP_ARTIST_LIST_PRESENTATION_MODEL_H_
+#endif // _MP_ARTIST_LIST_PRESENTATION_MODEL_H_
\ No newline at end of file
index eca6a0d..67e1503 100755 (executable)
@@ -1,4 +1,4 @@
-//
+//
 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
 //
 // Licensed under the Flora License, Version 1.0 (the License);
 // limitations under the License.
 //
 
+/**
+ * @file               MpArtistPickerPanel.h
+ * @brief              This is the header file for ArtistPickerPanel class.
+ */
+
 #ifndef _MP_ARTIST_PICKER_PANEL_H_
 #define _MP_ARTIST_PICKER_PANEL_H_
 
 class NowPlayContentPanel;
 
 class ArtistPickerPanel
-: public ArtistListPanel
+       : public ArtistListPanel
 {
 public:
        ArtistPickerPanel(void);
        ~ArtistPickerPanel(void);
 
        void OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previousSceneId,
-                           const Tizen::Ui::Scenes::SceneId& currentSceneId,
-                           Tizen::Base::Collection::IList* pArgs);
+                               const Tizen::Ui::Scenes::SceneId& currentSceneId,
+                               Tizen::Base::Collection::IList* pArgs);
        void OnSceneDeactivated(const Tizen::Ui::Scenes::SceneId& currentSceneId,
                                                        const Tizen::Ui::Scenes::SceneId& nextSceneId);
        void OnTableViewItemStateChanged(Tizen::Ui::Controls::TableView& tableView,
-                                     int itemIndex,
-                                     Tizen::Ui::Controls::TableViewItem* pItem,
-                                     Tizen::Ui::Controls::TableViewItemStatus status);
+                                               int itemIndex,
+                                               Tizen::Ui::Controls::TableViewItem* pItem,
+                                               Tizen::Ui::Controls::TableViewItemStatus status);
 };
 
-#endif //_MP_ARTIST_PICKER_PANEL_H_
+#endif // _MP_ARTIST_PICKER_PANEL_H_
\ No newline at end of file
old mode 100644 (file)
new mode 100755 (executable)
index a1328aa..c2df41e
 // limitations under the License.
 //
 
+/**
+ * @file               MpBaseForm.h
+ * @brief              This is the header file for BaseForm class.
+ */
+
 #include <FUi.h>
 
 #ifndef _MP_BASE_FORM_H_
@@ -23,10 +28,9 @@ class BaseForm
        : public Tizen::Ui::Controls::Form
 {
 public:
-       virtual ~BaseForm(void){};
-       virtual void OnUpdateContentList(void){};
-       virtual void OnChangedContentList(Tizen::Base::Collection::IList* pArgs){};
+       virtual ~BaseForm(void){}
+       virtual void OnUpdateContentList(void){}
+       virtual void OnChangedContentList(Tizen::Base::Collection::IList* pArgs){}
 };
 
-
-#endif /* _MP_BASE_FORM_H_ */
+#endif // _MP_BASE_FORM_H_
\ No newline at end of file
old mode 100644 (file)
new mode 100755 (executable)
index 68ab318..1369dc1
@@ -1,4 +1,4 @@
-//
+//
 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
 //
 // Licensed under the Flora License, Version 1.0 (the License);
 // limitations under the License.
 //
 
+/**
+ * @file               MpBasePanel.h
+ * @brief              This is the header file for BasePanel class.
+ */
+
+
 #include <FUi.h>
 
 #ifndef _MP_BASE_PANEL_H_
@@ -23,9 +29,8 @@ class BasePanel
        : public Tizen::Ui::Controls::Panel
 {
 public:
-       virtual ~BasePanel(void){};
+       virtual ~BasePanel(void){}
        virtual void OnUpdateContentList(void) = 0;
 };
 
-
-#endif /* _MP_BASE_PANEL_H_ */
+#endif // _MP_BASE_PANEL_H_
\ No newline at end of file
index 89d42f1..1082378 100755 (executable)
@@ -1,4 +1,4 @@
-//
+//
 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
 //
 // Licensed under the Flora License, Version 1.0 (the License);
 // limitations under the License.
 //
 
+/**
+ * @file               MpCommonUtil.h
+ * @brief              This is the header file for CommonUtil class.
+ */
+
 #ifndef _MP_COMMON_UTIL_H_
 #define _MP_COMMON_UTIL_H_
 
 #include <new>
+#include <FApp.h>
 #include <FBase.h>
 #include <FContent.h>
-#include <FUi.h>
 #include <FIo.h>
-#include <FApp.h>
-
-#include "MpTypes.h"
-#include "MpSceneRegister.h"
-#include "MpResourceManager.h"
+#include <FUi.h>
 #include "MpContentInformationStruct.h"
+#include "MpResourceManager.h"
+#include "MpSceneRegister.h"
+#include "MpTypes.h"
 
 class CommonUtil
 {
 public:
        static Tizen::Graphics::Bitmap* GetContentAlbumArtN(Tizen::Base::String& path);
-       static Tizen::Content::AudioContentInfo* GetAudioContentInfo(const Tizen::Base::String& path);
-       static Tizen::Content::AudioContentInfo* GetPlaylistAudioContentInfo(const Tizen::Base::String& contentId);
+       static Tizen::Content::AudioContentInfo* GetAudioContentInfoN(const Tizen::Base::String& filePath);
+       static Tizen::Content::ContentId GetContentId(const Tizen::Base::String& filePath);
+       static Tizen::Content::ContentInfo* GetContentInfoN(const Tizen::Content::ContentId& contentId);
+       static Tizen::Base::Collection::IList* ContentSearchResultListN(const Tizen::Base::String& contentFileName,
+                                                                                                                                       const Tizen::Base::String& ColumnName,
+                                                                                                                                       const Tizen::Base::String& sortColumn,
+                                                                                                                                       Tizen::Base::SortOrder sortOrder = Tizen::Base::SORT_ORDER_ASCENDING);
        static Tizen::Base::Collection::IList* SearchContentList(const Tizen::Base::String& whereExpr,
-                                                           const Tizen::Base::String& sortColumn,
-                                                           Tizen::Base::SortOrder sortOrder = Tizen::Base::SORT_ORDER_ASCENDING);
+                                                                       const Tizen::Base::String& sortColumn,
+                                                                       Tizen::Base::SortOrder sortOrder = Tizen::Base::SORT_ORDER_ASCENDING);
        static Tizen::Base::Collection::IList* SearchContentList(const Tizen::Base::String& columnName);
+       static Tizen::Base::String FilePathToContentFileName(const Tizen::Base::String& filePath);
+       static result StringToContentId(const Tizen::Base::String& contentIdString, Tizen::Content::ContentId& outContentId);
        static Tizen::Base::String GetFormatDate(long dateValue);
        static Tizen::Base::String SpecialReplaceChange(const Tizen::Base::String& text);
        static Tizen::Base::String MakeQuery(const Tizen::Base::String& ColumnName,
-                                                                          const Tizen::Base::String& SerachName);
-       static Tizen::Base::String GetContentInfo(const ContentInformationStruct& contentInfoStruct,
-                                                                                   const Tizen::Base::String& SceneId);
+                                                                               const Tizen::Base::String& SerachName);
+       static Tizen::Base::String GetContentInfo(const ContentInformation& contentInfoStruct,
+                                                                                       const Tizen::Base::String& SceneId);
        static Tizen::Base::String SetSongsString(const int songTotalCount);
        static int GetValue(const Tizen::Base::String& entryName);
        static result SetValue(const Tizen::Base::String& entryName, const int value);
        static void ShowNowPlayPanel(Tizen::Ui::Controls::TableView& tableView, bool playStatus, Tizen::Graphics::Rectangle clientBounds);
-       static void ShowCheckedCountLabel(Tizen::Ui::Controls::Label& checkCountLabel, int itemCount
-                                                                               Tizen::Ui::Controls::TableView& tableView,
+       static void ShowCheckedCountLabel(Tizen::Ui::Controls::Label& checkCountLabel, int itemCount,
+                                                                               Tizen::Ui::Controls::TableView& tableView,
                                                                                const Tizen::Ui::Controls::Form& form);
        static void ShowSelectAllCheckButton(Tizen::Ui::Controls::CheckButton& checkButton);
-       static void SetAllCheckState(bool state,Tizen::Ui::Controls::TableView& tableView, int totalCount);
+       static void SetAllCheckState(bool state, Tizen::Ui::Controls::TableView& tableView, int totalCount);
 
        static Tizen::Ui::Controls::Footer* CreateContentListFooter(const Tizen::Ui::Controls::Form& form);
        static Tizen::Ui::Controls::Footer* CreatePlaylistEditFooter(const Tizen::Ui::Controls::Form& form);
@@ -66,17 +77,17 @@ public:
        static Tizen::Ui::Controls::Footer* CreateDeleteFooter(const Tizen::Ui::Controls::Form& form);
        static Tizen::Ui::Controls::Footer* CreateCancelFooter(const Tizen::Ui::Controls::Form& form);
 
-       static ContentInformationStruct* GetContentInformationStructN(const Tizen::Content::AudioContentInfo& audioContentInfo);
+       static ContentInformation* GetContentInformationN(const Tizen::Content::AudioContentInfo& audioContentInfo);
 
        static void CreateTableViewItem(Tizen::Ui::Container& parent,
-                                    const Tizen::Graphics::Bitmap& thumbnail,
-                                    const Tizen::Base::String& itemName,
-                                    int contentTotalCount);
+                                               const Tizen::Graphics::Bitmap& thumbnail,
+                                               const Tizen::Base::String& itemName,
+                                               int contentTotalCount);
        static result CreateTableViewContextItem(Tizen::Ui::Controls::TableViewContextItem& parent, Tizen::Ui::IActionEventListener& listener);
        static result CreateEditListTableViewItem(Tizen::Ui::Container& parent,
-                                              const Tizen::Graphics::Bitmap& thumbnail,
-                                              const Tizen::Base::String& itemName,
-                                              int contentTotalCount);
+                                                       const Tizen::Graphics::Bitmap& thumbnail,
+                                                       const Tizen::Base::String& itemName,
+                                                       int contentTotalCount);
        static result CreateContentPikerTableViewItem(Tizen::Ui::Controls::TableViewItem& parent, const Tizen::Base::String& songName, const Tizen::Base::String& songTime);
        static Tizen::Ui::Controls::TableView* CreateEditorTableView(int width, int height);
        static Tizen::Ui::Controls::TableView* CreateTableView(int width, int height);
@@ -96,5 +107,4 @@ public:
        static Tizen::Graphics::Bitmap* GetColorizedBitmapN(const Tizen::Graphics::Bitmap& bitmap, const Tizen::Graphics::Color& color);
 };
 
-
-#endif // _MP_COMMON_UTIL_H_
+#endif // _MP_COMMON_UTIL_H_
\ No newline at end of file
diff --git a/inc/MpComposerContentListForm.h b/inc/MpComposerContentListForm.h
new file mode 100755 (executable)
index 0000000..ae90e36
--- /dev/null
@@ -0,0 +1,68 @@
+//
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.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://floralicense.org/license/
+//
+// 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 _MP_COMPOSER_CONTENT_LIST_FORM_H_
+#define _MP_COMPOSER_CONTENT_LIST_FORM_H_
+
+#include "MpContentListForm.h"
+#include "MpThumbnailBase.h"
+
+class ComposerListPresentationModel;
+
+class ComposerContentListForm
+       : public ContentListForm
+       , public ThumbnailBase
+       , public Tizen::App::IAppControlResponseListener
+{
+public:
+       ComposerContentListForm(void);
+       ~ComposerContentListForm(void);
+
+       virtual result OnInitializing(void);
+       virtual result OnTerminating(void);
+       virtual void OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previousSceneId,
+                                                                       const Tizen::Ui::Scenes::SceneId& currentSceneId,
+                                                                       Tizen::Base::Collection::IList* pArgs);
+       virtual void OnSceneDeactivated(const Tizen::Ui::Scenes::SceneId& currentSceneId,
+                                                                       const Tizen::Ui::Scenes::SceneId& nextSceneId);
+
+       virtual void OnActionPerformed(const Tizen::Ui::Control& source, int actionId);
+
+       virtual void UpdateItem(int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem);
+       virtual int GetItemCount(void);
+       virtual Tizen::Ui::Controls::TableViewItem* CreateItem(const int itemIndex, int itemWidth);
+       virtual void OnTableViewItemStateChanged(Tizen::Ui::Controls::TableView& tableView,
+                                               int itemIndex,
+                                               Tizen::Ui::Controls::TableViewItem* pItem,
+                                               Tizen::Ui::Controls::TableViewItemStatus status);
+       virtual void OnAppControlCompleteResponseReceived(const Tizen::App::AppId& appId,
+                               const Tizen::Base::String& operationId, Tizen::App::AppCtrlResult appControlResult,
+                               const Tizen::Base::Collection::IMap* pExtraData);
+
+       virtual void OnThumbnailInfoReveivedN(ThumbnailInfo* pThumbnailInfo);
+       virtual void OnUserEventReceivedN(RequestId requestId, Tizen::Base::Collection::IList* pArgs);
+
+private:
+       result CreateTableViewItem(Tizen::Ui::Container& parent, const ContentInformation& contentInfoStruct);
+       Tizen::Base::Collection::ArrayList* MakePlayerSceneParam(int startIndex);
+       void ToggleViewMode(bool editMode);
+
+private:
+       ComposerListPresentationModel* __pPresentationModel;
+       Tizen::Graphics::Bitmap* __pThumbnail;
+};
+
+#endif // _MP_COMPOSER_CONTENT_LIST_FORM_H_
\ No newline at end of file
index 4c3e20d..8748c34 100755 (executable)
@@ -1,4 +1,4 @@
-//
+//
 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
 //
 // Licensed under the Flora License, Version 1.0 (the License);
 // limitations under the License.
 //
 
+/**
+ * @file               MpComposerContentPickerPanel.h
+ * @brief              This is the header file for ComposerContentPickerPanel class.
+ */
+
 #ifndef _MP_COMPOSER_CONTENT_PICKER_PANEL_H_
 #define _MP_COMPOSER_CONTENT_PICKER_PANEL_H_
 
 #include "MpCommonUtil.h"
-#include "MpTypes.h"
 #include "MpComposerListPresentationModel.h"
+#include "MpTypes.h"
 
 class ComposerContentPickerPanel
        : public Tizen::Ui::Controls::Panel
@@ -29,8 +34,8 @@ class ComposerContentPickerPanel
        , public Tizen::Ui::Scenes::ISceneEventListener
 {
 public:
-       ComposerContentPickerPanel();
-       ~ComposerContentPickerPanel();
+       ComposerContentPickerPanel(void);
+       ~ComposerContentPickerPanel(void);
 
        bool Initialize(void);
 
@@ -39,29 +44,29 @@ public:
        virtual void OnActionPerformed(const Tizen::Ui::Control& source, int actionId);
 
        virtual void OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previousSceneId,
-                                                                  const Tizen::Ui::Scenes::SceneId& currentSceneId,
-                                                                  Tizen::Base::Collection::IList* pArgs);
+                                                                       const Tizen::Ui::Scenes::SceneId& currentSceneId,
+                                                                       Tizen::Base::Collection::IList* pArgs);
        virtual void OnSceneDeactivated(const Tizen::Ui::Scenes::SceneId& currentSceneId,
                                                                        const Tizen::Ui::Scenes::SceneId& nextSceneId);
 
-
        virtual int GetItemCount(void);
-    virtual Tizen::Ui::Controls::TableViewItem* CreateItem(const int itemIndex, int itemWidth);
-    virtual bool DeleteItem(const int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem);
-    virtual void UpdateItem(int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem);
-    virtual int GetDefaultItemHeight(void);
+       virtual Tizen::Ui::Controls::TableViewItem* CreateItem(const int itemIndex, int itemWidth);
+       virtual bool DeleteItem(const int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem);
+       virtual void UpdateItem(int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem);
+       virtual int GetDefaultItemHeight(void);
+
+       virtual void OnTableViewItemStateChanged(Tizen::Ui::Controls::TableView& tableView,
+                                                       int itemIndex,
+                                                       Tizen::Ui::Controls::TableViewItem* pItem,
+                                                       Tizen::Ui::Controls::TableViewItemStatus status);
+       virtual void OnTableViewContextItemActivationStateChanged(Tizen::Ui::Controls::TableView& tableView,
+                                                                       int itemIndex,
+                                                                       Tizen::Ui::Controls::TableViewContextItem* pContextItem,
+                                                                       bool activated);
+       virtual void OnTableViewItemReordered(Tizen::Ui::Controls::TableView& tableView,
+                                               int itemIndexFrom,
+                                               int itemIndexTo);
 
-    virtual void OnTableViewItemStateChanged(Tizen::Ui::Controls::TableView& tableView,
-                                             int itemIndex,
-                                             Tizen::Ui::Controls::TableViewItem* pItem,
-                                             Tizen::Ui::Controls::TableViewItemStatus status);
-    virtual void OnTableViewContextItemActivationStateChanged(Tizen::Ui::Controls::TableView& tableView,
-                                                              int itemIndex,
-                                                              Tizen::Ui::Controls::TableViewContextItem* pContextItem,
-                                                              bool activated);
-    virtual void OnTableViewItemReordered(Tizen::Ui::Controls::TableView& tableView,
-                                          int itemIndexFrom,
-                                          int itemIndexTo);
 private:
        int __checkedItemCount;
        Tizen::Ui::Controls::TableView* __pContentTableView;
@@ -70,4 +75,4 @@ private:
        ComposerListPresentationModel* __pPresentationModel;
 };
 
-#endif //_MP_COMPOSER_CONTENT_PICKER_PANEL_H_
+#endif // _MP_COMPOSER_CONTENT_PICKER_PANEL_H_
\ No newline at end of file
index 8b0a2b7..2851786 100755 (executable)
@@ -1,4 +1,4 @@
-//
+//
 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
 //
 // Licensed under the Flora License, Version 1.0 (the License);
 // limitations under the License.
 //
 
+/**
+ * @file               MpComposerListEditorPanel.h
+ * @brief              This is the header file for ComposerListEditorPanel class.
+ */
+
 #ifndef _MP_COMPOSER_LIST_EDITOR_PANEL_H_
 #define _MP_COMPOSER_LIST_EDITOR_PANEL_H_
 
-#include "MpTypes.h"
-#include "MpSceneRegister.h"
-#include "MpComposerListPresentationModel.h"
 #include "MpBasePanel.h"
+#include "MpComposerListPresentationModel.h"
+#include "MpSceneRegister.h"
+#include "MpThumbnailBase.h"
+#include "MpTypes.h"
 
 class PlayListPickerPopup;
 
 class ComposerListEditorPanel
        : public Tizen::Ui::Controls::Panel
+       , public ThumbnailBase
        , public Tizen::Ui::Controls::ITableViewItemProvider
        , public Tizen::Ui::Controls::ITableViewItemEventListener
        , public Tizen::Ui::IActionEventListener
@@ -41,41 +48,44 @@ public:
        virtual void OnActionPerformed(const Tizen::Ui::Control& source, int actionId);
 
        virtual void OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previousSceneId,
-                                                                  const Tizen::Ui::Scenes::SceneId& currentSceneId, Tizen::Base::Collection::IList* pArgs);
+                                                                       const Tizen::Ui::Scenes::SceneId& currentSceneId, Tizen::Base::Collection::IList* pArgs);
        virtual void OnSceneDeactivated(const Tizen::Ui::Scenes::SceneId& currentSceneId,
                                                                        const Tizen::Ui::Scenes::SceneId& nextSceneId);
 
-
        virtual int GetItemCount(void);
-    
-    virtual Tizen::Ui::Controls::TableViewItem* CreateItem(const int itemIndex, int itemWidth);
-    virtual bool DeleteItem(const int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem);
-    virtual void UpdateItem(int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem);
-    virtual int GetDefaultItemHeight(void);
 
-    virtual void OnTableViewItemStateChanged(Tizen::Ui::Controls::TableView& tableView,
-                                             int itemIndex,
-                                             Tizen::Ui::Controls::TableViewItem* pItem,
-                                             Tizen::Ui::Controls::TableViewItemStatus status);
-    virtual void OnTableViewContextItemActivationStateChanged(Tizen::Ui::Controls::TableView& tableView,
-                                                              int itemIndex,
-                                                              Tizen::Ui::Controls::TableViewContextItem* pContextItem,
-                                                              bool activated);
-    virtual void OnTableViewItemReordered(Tizen::Ui::Controls::TableView& tableView,
-                                          int itemIndexFrom,
-                                          int itemIndexTo);
-    virtual void OnUpdateContentList(void);
+       virtual Tizen::Ui::Controls::TableViewItem* CreateItem(const int itemIndex, int itemWidth);
+       virtual bool DeleteItem(const int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem);
+       virtual void UpdateItem(int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem);
+       virtual int GetDefaultItemHeight(void);
+
+       virtual void OnTableViewItemStateChanged(Tizen::Ui::Controls::TableView& tableView,
+                                                       int itemIndex,
+                                                       Tizen::Ui::Controls::TableViewItem* pItem,
+                                                       Tizen::Ui::Controls::TableViewItemStatus status);
+       virtual void OnTableViewContextItemActivationStateChanged(Tizen::Ui::Controls::TableView& tableView,
+                                                                       int itemIndex,
+                                                                       Tizen::Ui::Controls::TableViewContextItem* pContextItem,
+                                                                       bool activated);
+       virtual void OnTableViewItemReordered(Tizen::Ui::Controls::TableView& tableView,
+                                               int itemIndexFrom,
+                                               int itemIndexTo);
+       virtual void OnUpdateContentList(void);
+
+       virtual void OnThumbnailInfoReveivedN(ThumbnailInfo* pThumbnailInfo);
+       virtual void OnUserEventReceivedN(RequestId requestId, Tizen::Base::Collection::IList* pArgs);
 
 private:
-    void UpdateContentList(void);
+       void UpdateContentList(void);
 
 protected:
        int __checkedItemCount;
        Tizen::Ui::Controls::TableView* __pContentTableView;
        Tizen::Ui::Controls::CheckButton* __pSelectAllCheckedButton;
        Tizen::Ui::Controls::Label* __pCheckedCountLabel;
+       Tizen::Graphics::Bitmap* __pThumbnail;
        PlayListPickerPopup* __pPlayListPickerPopup;
        ComposerListPresentationModel* __pPresentationModel;
 };
 
-#endif // _MP_COMPOSER_LIST_EDITOR_PANEL_H_
+#endif // _MP_COMPOSER_LIST_EDITOR_PANEL_H_
\ No newline at end of file
index 9449ef9..7fa42c6 100755 (executable)
@@ -1,4 +1,4 @@
-//
+//
 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
 //
 // Licensed under the Flora License, Version 1.0 (the License);
 // limitations under the License.
 //
 
+/**
+ * @file               MpComposerListPanel.h
+ * @brief              This is the header file for ComposerListPanel class.
+ */
+
 #ifndef _MP_COMPOSER_LIST_PANEL_H_
 #define _MP_COMPOSER_LIST_PANEL_H_
 
-#include "MpTypes.h"
-#include "MpSceneRegister.h"
-#include "MpComposerListPresentationModel.h"
 #include "MpBasePanel.h"
+#include "MpComposerListPresentationModel.h"
+#include "MpSceneRegister.h"
+#include "MpThumbnailBase.h"
+#include "MpTypes.h"
 
 class PlayListPickerPopup;
 class NowPlayContentPanel;
 
 class ComposerListPanel
        : public BasePanel
+       , public ThumbnailBase
        , public Tizen::Ui::Controls::ITableViewItemProvider
        , public Tizen::Ui::Controls::ITableViewItemEventListener
        , public Tizen::Ui::Controls::IFastScrollListener
@@ -44,32 +51,34 @@ public:
        virtual void OnActionPerformed(const Tizen::Ui::Control& source, int actionId);
 
        virtual void OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previousSceneId,
-                                                                  const Tizen::Ui::Scenes::SceneId& currentSceneId, Tizen::Base::Collection::IList* pArgs);
+                                                                       const Tizen::Ui::Scenes::SceneId& currentSceneId, Tizen::Base::Collection::IList* pArgs);
        virtual void OnSceneDeactivated(const Tizen::Ui::Scenes::SceneId& currentSceneId,
                                                                        const Tizen::Ui::Scenes::SceneId& nextSceneId);
 
-
        virtual int GetItemCount(void);
     
-    virtual Tizen::Ui::Controls::TableViewItem* CreateItem(const int itemIndex, int itemWidth);
-    virtual bool DeleteItem(const int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem);
-    virtual void UpdateItem(int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem);
-    virtual int GetDefaultItemHeight(void);
+       virtual Tizen::Ui::Controls::TableViewItem* CreateItem(const int itemIndex, int itemWidth);
+       virtual bool DeleteItem(const int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem);
+       virtual void UpdateItem(int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem);
+       virtual int GetDefaultItemHeight(void);
+
+       virtual void OnTableViewItemStateChanged(Tizen::Ui::Controls::TableView& tableView,
+                                                       int itemIndex,
+                                                       Tizen::Ui::Controls::TableViewItem* pItem,
+                                                       Tizen::Ui::Controls::TableViewItemStatus status);
+       virtual void OnTableViewContextItemActivationStateChanged(Tizen::Ui::Controls::TableView& tableView,
+                                                                       int itemIndex,
+                                                                       Tizen::Ui::Controls::TableViewContextItem* pContextItem,
+                                                                       bool activated);
+       virtual void OnTableViewItemReordered(Tizen::Ui::Controls::TableView& tableView,
+                                               int itemIndexFrom,
+                                               int itemIndexTo);
+       virtual void OnFastScrollIndexSelected(Tizen::Ui::Control& source, Tizen::Base::String& index);
+       virtual void OnFormBackRequested(Tizen::Ui::Controls::Form& source);
+       virtual void OnUpdateContentList(void);
 
-    virtual void OnTableViewItemStateChanged(Tizen::Ui::Controls::TableView& tableView,
-                                             int itemIndex,
-                                             Tizen::Ui::Controls::TableViewItem* pItem,
-                                             Tizen::Ui::Controls::TableViewItemStatus status);
-    virtual void OnTableViewContextItemActivationStateChanged(Tizen::Ui::Controls::TableView& tableView,
-                                                              int itemIndex,
-                                                              Tizen::Ui::Controls::TableViewContextItem* pContextItem,
-                                                              bool activated);
-    virtual void OnTableViewItemReordered(Tizen::Ui::Controls::TableView& tableView,
-                                          int itemIndexFrom,
-                                          int itemIndexTo);
-    virtual void OnFastScrollIndexSelected(Tizen::Ui::Control& source, Tizen::Base::String& index);
-    virtual void OnFormBackRequested(Tizen::Ui::Controls::Form& source);
-    virtual void OnUpdateContentList(void);
+       virtual void OnThumbnailInfoReveivedN(ThumbnailInfo* pThumbnailInfo);
+       virtual void OnUserEventReceivedN(RequestId requestId, Tizen::Base::Collection::IList* pArgs);
 
 private:
        Tizen::Base::Collection::ArrayList* GetContentListN(int itemIndex);
@@ -83,7 +92,8 @@ protected:
        Tizen::Ui::Controls::TableView* __pContentTableView;
        Tizen::Ui::Controls::Label* __pNoContentImageLabel;
        Tizen::Ui::Controls::Label* __pNoContentTextLabel;
+       Tizen::Graphics::Bitmap* __pThumbnail;
        ComposerListPresentationModel* __pPresentationModel;
 };
 
-#endif // _MP_COMPOSER_LIST_PANEL_H_
+#endif // _MP_COMPOSER_LIST_PANEL_H_
\ No newline at end of file
index eef7eb2..e387c19 100755 (executable)
@@ -1,4 +1,4 @@
-//
+//
 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
 //
 // Licensed under the Flora License, Version 1.0 (the License);
 // limitations under the License.
 //
 
+/**
+ * @file               MpComposerListPresentationModel.h
+ * @brief              This is the header file for ComposerListPresentationModel class.
+ */
+
 #ifndef _MP_COMPOSER_LIST_PRESENTATION_MODEL_H_
 #define _MP_COMPOSER_LIST_PRESENTATION_MODEL_H_
 
-#include "MpTypes.h"
 #include "MpCommonUtil.h"
 #include "MpContentInformationStruct.h"
+#include "MpTypes.h"
 
 class ComposerListPresentationModel
 {
 public:
-    static ComposerListPresentationModel* GetInstance(void);
-
-    int GetTotalContentCount(int index);
-    int GetTotalComposerCount(void);
-    ContentInformationStruct* GetContentInfoN(int index);
-    void RefreshContent(void);
-
-    void SearchSong(int index);
-    int GetSongContentCount(void);
-    ContentInformationStruct* GetSongContentInfoN(int index);
-
-    Tizen::Base::String* GetContentName(int index);
-    Tizen::Base::Collection::ArrayList* SearchContentItemN(int index);
+       static ComposerListPresentationModel* GetInstance(void);
+       int GetContentCount(int composerIndex);
+       int GetAllComposerCount(void);
+       ContentInformation* GetComposerInfoN(int composerIndex);
+       void InitializeContentList(int composerIndex);
+       ContentInformation* GetContentInfoN(int contentIndex);
+       Tizen::Base::String* GetComposerName(int composerIndex);
+       Tizen::Base::Collection::ArrayList* GetContentPathListN(int composerIndex);
+       void RefreshContentList(int composerIndex);
+       int GetCurrentComposerIndex(void);
+       void AddContent(Tizen::Base::String path, int playlistIndex);
+       result UpdateComposerList(void);
 
 private:
-    ComposerListPresentationModel(void);
-    ComposerListPresentationModel(const ComposerListPresentationModel& composerListPresentationModel);
-    const ComposerListPresentationModel& operator = (const ComposerListPresentationModel& composerListPresentationModel);
-    ~ComposerListPresentationModel(void);
+       ComposerListPresentationModel(void);
+       ComposerListPresentationModel(const ComposerListPresentationModel& composerListPresentationModel);
+       const ComposerListPresentationModel& operator = (const ComposerListPresentationModel& composerListPresentationModel);
+       ~ComposerListPresentationModel(void);
+       result Construct(void);
 
-    result Construct(void);
-
-    Tizen::Base::Collection::IList* __pComposerList;
-    Tizen::Base::Collection::IList* __pSongList;
-    static ComposerListPresentationModel* pComposerListPresentationModelInstance;
+private:
+       Tizen::Base::Collection::IList* __pComposerList;
+       Tizen::Base::Collection::IList* __pContentList;
+       static ComposerListPresentationModel* pComposerListPresentationModelInstance;
+       int __currentComposerIndex;
 };
 
-#endif // _MP_YEARS_LIST_PRESENTATION_MODEL_H_
+#endif // _MP_YEARS_LIST_PRESENTATION_MODEL_H_
\ No newline at end of file
index 5d30b94..a0e97ac 100755 (executable)
@@ -1,4 +1,4 @@
-//
+//
 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
 //
 // Licensed under the Flora License, Version 1.0 (the License);
 // limitations under the License.
 //
 
+/**
+ * @file               MpComposerPickerPanel.h
+ * @brief              This is the header file for ComposerPickerPanel class.
+ */
+
 #ifndef _MP_COMPOSER_PICKER_PANEL_H_
 #define _MP_COMPOSER_PICKER_PANEL_H_
 
 class NowPlayContentPanel;
 
 class ComposerPickerPanel
-: public ComposerListPanel
+       : public ComposerListPanel
 {
 public:
        ComposerPickerPanel(void);
        ~ComposerPickerPanel(void);
 
        void OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previousSceneId,
-                           const Tizen::Ui::Scenes::SceneId& currentSceneId,
-                           Tizen::Base::Collection::IList* pArgs);
+                               const Tizen::Ui::Scenes::SceneId& currentSceneId,
+                               Tizen::Base::Collection::IList* pArgs);
        void OnSceneDeactivated(const Tizen::Ui::Scenes::SceneId& currentSceneId,
                                                        const Tizen::Ui::Scenes::SceneId& nextSceneId);
        void OnTableViewItemStateChanged(Tizen::Ui::Controls::TableView& tableView,
-                                     int itemIndex,
-                                     Tizen::Ui::Controls::TableViewItem* pItem,
-                                     Tizen::Ui::Controls::TableViewItemStatus status);
+                                               int itemIndex,
+                                               Tizen::Ui::Controls::TableViewItem* pItem,
+                                               Tizen::Ui::Controls::TableViewItemStatus status);
 };
 
-#endif //_MP_COMPOSER_PICKER_PANEL_H_
+#endif // _MP_COMPOSER_PICKER_PANEL_H_
\ No newline at end of file
old mode 100644 (file)
new mode 100755 (executable)
index 12ded44..5bf15c0
@@ -1,4 +1,4 @@
-//
+//
 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
 //
 // Licensed under the Flora License, Version 1.0 (the License);
 // limitations under the License.
 //
 
+/**
+ * @file               MpContentDetailForm.h
+ * @brief              This is the header file for ContentDetailForm class.
+ */
+
 #ifndef _MP_CONTENT_DETAIL_FORM_H_
 #define _MP_CONTENT_DETAIL_FORM_H_
 
 #include <new>
+#include <FBase.h>
 #include <FGraphics.h>
 #include <FUi.h>
 #include <FUiControl.h>
-#include <FBase.h>
 #include <FUiCtrlButtonItem.h>
 
 class PlayerPresentationModel;
@@ -42,8 +47,8 @@ public:
        virtual result OnTerminating(void);
 
        virtual void OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previousSceneId,
-                                                                  const Tizen::Ui::Scenes::SceneId& currentSceneId,
-                                                                  Tizen::Base::Collection::IList* pArgs);
+                                                                       const Tizen::Ui::Scenes::SceneId& currentSceneId,
+                                                                       Tizen::Base::Collection::IList* pArgs);
        virtual void OnSceneDeactivated(const Tizen::Ui::Scenes::SceneId& currentSceneId,
                                                                        const Tizen::Ui::Scenes::SceneId& nextSceneId);
 
@@ -52,22 +57,22 @@ public:
        virtual void OnFormBackRequested(Tizen::Ui::Controls::Form& source);
 
        virtual int GetItemCount(void);
-    virtual Tizen::Ui::Controls::TableViewItem* CreateItem(const int itemIndex, int itemWidth);
-    virtual bool DeleteItem(const int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem);
-    virtual void UpdateItem(int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem);
-    virtual int GetDefaultItemHeight(void);
+       virtual Tizen::Ui::Controls::TableViewItem* CreateItem(const int itemIndex, int itemWidth);
+       virtual bool DeleteItem(const int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem);
+       virtual void UpdateItem(int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem);
+       virtual int GetDefaultItemHeight(void);
 
-    virtual void OnTableViewItemStateChanged(Tizen::Ui::Controls::TableView& tableView,
-                                             int itemIndex,
-                                             Tizen::Ui::Controls::TableViewItem* pItem,
-                                             Tizen::Ui::Controls::TableViewItemStatus status);
-    virtual void OnTableViewContextItemActivationStateChanged(Tizen::Ui::Controls::TableView& tableView,
-                                                              int itemIndex,
-                                                              Tizen::Ui::Controls::TableViewContextItem* pContextItem,
-                                                              bool activated);
-    virtual void OnTableViewItemReordered(Tizen::Ui::Controls::TableView& tableView,
-                                          int itemIndexFrom,
-                                          int itemIndexTo);
+       virtual void OnTableViewItemStateChanged(Tizen::Ui::Controls::TableView& tableView,
+                                                       int itemIndex,
+                                                       Tizen::Ui::Controls::TableViewItem* pItem,
+                                                       Tizen::Ui::Controls::TableViewItemStatus status);
+       virtual void OnTableViewContextItemActivationStateChanged(Tizen::Ui::Controls::TableView& tableView,
+                                                                       int itemIndex,
+                                                                       Tizen::Ui::Controls::TableViewContextItem* pContextItem,
+                                                                       bool activated);
+       virtual void OnTableViewItemReordered(Tizen::Ui::Controls::TableView& tableView,
+                                               int itemIndexFrom,
+                                               int itemIndexTo);
 
 private:
        PlayerPresentationModel* __pPlayerPresentationModel;
@@ -77,4 +82,4 @@ private:
        Tizen::Base::String *__pItemDescription;
 };
 
-#endif // _MP_CONTENT_DETAIL_FORM_H_
+#endif // _MP_CONTENT_DETAIL_FORM_H_
\ No newline at end of file
old mode 100644 (file)
new mode 100755 (executable)
index 1260d1b..9db5eb5
@@ -1,4 +1,4 @@
-//
+//
 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
 //
 // Licensed under the Flora License, Version 1.0 (the License);
 // limitations under the License.
 //
 
+/**
+ * @file               MpContentForm.h
+ * @brief              This is the header file for ContentForm class.
+ */
+
 #ifndef _MP_CONTENTS_FORM_H_
 #define _MP_CONTENTS_FORM_H_
 
 #include <FBase.h>
-#include <FUi.h>
 #include <FApp.h>
-#include <FSystem.h>
 #include <FIo.h>
-
-#include "MpTypes.h"
-#include "MpSceneRegister.h"
-#include "MpResourceManager.h"
+#include <FSystem.h>
+#include <FUi.h>
 #include "MpCommonUtil.h"
 #include "MpIMusicSettingEventListener.h"
+#include "MpResourceManager.h"
+#include "MpSceneRegister.h"
+#include "MpTypes.h"
 
 class SettingPresentationModel;
 
@@ -41,16 +45,14 @@ public:
        virtual ~ContentForm(void);
        bool Initialize(void);
 
+private:
+       result InitializeHeaderItem(Tizen::Ui::Controls::Header& pHeader);
        virtual result OnInitializing(void);
        virtual result OnTerminating(void);
        virtual void OnActionPerformed(const Tizen::Ui::Control& source, int actionId);
 
-       virtual void OnAutoOffTimeChanged(int autoOffTime) {};
-    virtual void OnUserEventReceivedN(RequestId requestId, Tizen::Base::Collection::IList* pArgs);
-
-private:
-       result InitializeHeader(void);
+       virtual void OnAutoOffTimeChanged(int autoOffTime){}
+       virtual void OnUserEventReceivedN(RequestId requestId, Tizen::Base::Collection::IList* pArgs);
 };
 
-
-#endif // _MP_CONTENTS_FORM_H_
+#endif // _MP_CONTENTS_FORM_H_
\ No newline at end of file
index 025f1bb..0d79c9b 100755 (executable)
@@ -1,4 +1,4 @@
-//
+//
 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
 //
 // Licensed under the Flora License, Version 1.0 (the License);
 // limitations under the License.
 //
 
+/**
+ * @file               MpContentInformationStruct.h
+ * @brief              This is the header file for ContentInformationStruct class.
+ */
+
 #ifndef _MP_CONTENT_INFORMATION_STRUCT_H_
 #define _MP_CONTENT_INFORMATION_STRUCT_H_
 
 #include <FApp.h>
 
-struct ContentInformationStruct
+struct ContentInformation
 {
        Tizen::Base::String GenreName;
        Tizen::Base::String ArtistName;
@@ -27,7 +32,6 @@ struct ContentInformationStruct
        Tizen::Base::String AlbumName;
        Tizen::Base::String TitleName;
        Tizen::Base::String ContentFilePath;
-       Tizen::Graphics::Bitmap* pThumbnail;
        int ReleaseYear;
        long Duration;
        Tizen::Base::UuId contentId;
@@ -35,4 +39,4 @@ struct ContentInformationStruct
        Tizen::Base::String playedDate;
 };
 
-#endif // _MP_CONTENT_INFORMATION_STRUCT_H_
+#endif // _MP_CONTENT_INFORMATION_STRUCT_H_
\ No newline at end of file
diff --git a/inc/MpContentListEditorForm.h b/inc/MpContentListEditorForm.h
deleted file mode 100755 (executable)
index b0dc6f9..0000000
+++ /dev/null
@@ -1,92 +0,0 @@
-//
-// Copyright (c) 2012 Samsung Electronics Co., Ltd.
-//
-// Licensed under the Flora License, Version 1.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://floralicense.org/license/
-//
-// 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 _MP_CONTENT_LIST_EDITOR_FORM_H_
-#define _MP_CONTENT_LIST_EDITOR_FORM_H_
-
-#include "MpSceneRegister.h"
-#include "MpResourceManager.h"
-#include "MpCommonUtil.h"
-#include "MpTypes.h"
-#include "MpContentListPresentationModel.h"
-
-class SharePopup;
-class PlayListPickerPopup;
-
-class ContentListEditorForm
-       : public Tizen::Ui::Controls::Form
-       , public Tizen::Ui::Controls::ITableViewItemProvider
-       , public Tizen::Ui::Controls::ITableViewItemEventListener
-       , public Tizen::Ui::IActionEventListener
-       , public Tizen::Ui::Scenes::ISceneEventListener
-{
-public:
-       ContentListEditorForm(void);
-       ~ContentListEditorForm(void);
-       bool Initialize(void);
-
-       virtual result OnInitializing(void);
-       virtual result OnTerminating(void);
-
-       virtual void OnActionPerformed(const Tizen::Ui::Control& source, int actionId);
-
-       virtual void OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previousSceneId,
-                                                                  const Tizen::Ui::Scenes::SceneId& currentSceneId,
-                                                                  Tizen::Base::Collection::IList* pArgs);
-
-       virtual void OnSceneDeactivated(const Tizen::Ui::Scenes::SceneId& currentSceneId,
-                                                                       const Tizen::Ui::Scenes::SceneId& nextSceneId);
-
-       virtual int GetItemCount(void);
-    
-    virtual Tizen::Ui::Controls::TableViewItem* CreateItem(const int itemIndex, int itemWidth);
-    virtual bool DeleteItem(const int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem);
-    virtual void UpdateItem(int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem);
-    virtual int GetDefaultItemHeight(void);
-
-    virtual void OnTableViewItemStateChanged(Tizen::Ui::Controls::TableView& tableView,
-                                             int itemIndex,
-                                             Tizen::Ui::Controls::TableViewItem* pItem,
-                                             Tizen::Ui::Controls::TableViewItemStatus status);
-    virtual void OnTableViewContextItemActivationStateChanged(Tizen::Ui::Controls::TableView& tableView,
-                                                              int itemIndex,
-                                                              Tizen::Ui::Controls::TableViewContextItem* pContextItem,
-                                                              bool activated);
-    virtual void OnTableViewItemReordered(Tizen::Ui::Controls::TableView& tableView,
-                                          int itemIndexFrom,
-                                          int itemIndexTo);
-private:
-       result GenericCreateTableViewItem(Tizen::Ui::Container& parent,const ContentInformationStruct& contentInfoStruct);
-       result PlaylistCreateTableViewItem(Tizen::Ui::Container& parent, const ContentInformationStruct& contentInfoStruct);
-
-private:
-       int __checkedItemCount;
-       int __ContentType;
-
-       bool __DeletedItem;
-       Tizen::Base::String* __pStrSceneId;
-       Tizen::Base::String* __pStrContentName;
-
-       Tizen::Ui::Controls::CheckButton* __pSelectAllCheckedButton;
-       Tizen::Ui::Controls::Label* __pCheckedCountLabel;
-       Tizen::Ui::Controls::TableView* __pContentTableView;
-
-       PlayListPickerPopup* __pPlayListPickerPopup;
-       SharePopup* __pSharePopup;
-       ContentListPresentationModel* __pPresentationModel;
-};
-
-#endif // _MP_CONTENT_LIST_EDITOR_FORM_H_
old mode 100644 (file)
new mode 100755 (executable)
index bc602a0..8d2ad15
@@ -1,4 +1,4 @@
-//
+//
 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
 //
 // Licensed under the Flora License, Version 1.0 (the License);
 // limitations under the License.
 //
 
+/**
+ * @file               MpContentListForm.h
+ * @brief              This is the header file for ContentListForm class.
+ */
+
 #ifndef _MP_CONTENT_LIST_FORM_H_
 #define _MP_CONTENT_LIST_FORM_H_
 
-#include <FBase.h>
-#include <FUi.h>
 #include <FApp.h>
-#include <FSystem.h>
+#include <FBase.h>
 #include <FIo.h>
-
-#include "MpSceneRegister.h"
-#include "MpResourceManager.h"
+#include <FSystem.h>
+#include <FUi.h>
 #include "MpCommonUtil.h"
-#include "MpContentListPresentationModel.h"
-#include "MpPlaylistPickerPopup.h"
+#include "MpResourceManager.h"
+#include "MpSceneRegister.h"
 
-class NowPlayContentPanel;
 class PlayListPickerPopup;
+class SharePopup;
 
 class ContentListForm
        : public Tizen::Ui::Controls::Form
@@ -38,101 +40,81 @@ class ContentListForm
        , public Tizen::Ui::Controls::ITableViewItemEventListener
        , public Tizen::Ui::Controls::IScrollEventListener
        , public Tizen::Ui::Controls::IFormBackEventListener
-       , public Tizen::App::IAppControlResponseListener
        , public Tizen::Ui::IActionEventListener
        , public Tizen::Ui::Scenes::ISceneEventListener
 {
 public:
        ContentListForm(void);
-       ~ContentListForm(void);
-       bool Initialize(void);
-
-       virtual result OnInitializing(void);
-       virtual result OnTerminating(void);
+       virtual ~ContentListForm(void);
 
-       virtual void OnAppControlCompleteResponseReceived(const Tizen::App::AppId& appId,
-                       const Tizen::Base::String& operationId, Tizen::App::AppCtrlResult appControlResult,
-                       const Tizen::Base::Collection::IMap* pExtraData);
+       bool Initialize(void);
 
-       virtual void OnActionPerformed(const Tizen::Ui::Control& source, int actionId);
+       virtual result OnInitializing(void) = 0;
+       virtual result OnTerminating(void) = 0;
 
        virtual void OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previousSceneId,
-                                                                  const Tizen::Ui::Scenes::SceneId& currentSceneId,
-                                                                  Tizen::Base::Collection::IList* pArgs);
-
+                                                                       const Tizen::Ui::Scenes::SceneId& currentSceneId,
+                                                                       Tizen::Base::Collection::IList* pArgs){}
        virtual void OnSceneDeactivated(const Tizen::Ui::Scenes::SceneId& currentSceneId,
-                                                                       const Tizen::Ui::Scenes::SceneId& nextSceneId);
-
+                                                                       const Tizen::Ui::Scenes::SceneId& nextSceneId){}
+       virtual void OnActionPerformed(const Tizen::Ui::Control& source, int actionId){}
        virtual int GetItemCount(void);
-    
-    virtual Tizen::Ui::Controls::TableViewItem* CreateItem(const int itemIndex, int itemWidth);
-    virtual bool DeleteItem(const int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem);
-    virtual void UpdateItem(int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem);
-    virtual int GetDefaultItemHeight(void);
-
-    virtual void OnTableViewItemStateChanged(Tizen::Ui::Controls::TableView& tableView,
-                                             int itemIndex,
-                                             Tizen::Ui::Controls::TableViewItem* pItem,
-                                             Tizen::Ui::Controls::TableViewItemStatus status);
-    virtual void OnTableViewContextItemActivationStateChanged(Tizen::Ui::Controls::TableView& tableView,
-                                                              int itemIndex,
-                                                              Tizen::Ui::Controls::TableViewContextItem* pContextItem,
-                                                              bool activated);
-    virtual void OnTableViewItemReordered(Tizen::Ui::Controls::TableView& tableView,
-                                          int itemIndexFrom,
-                                          int itemIndexTo);
-
-    virtual void OnScrollEndReached (Tizen::Ui::Control &source, Tizen::Ui::Controls::ScrollEndEvent type);
+       virtual Tizen::Ui::Controls::TableViewItem* CreateItem(const int itemIndex, int itemWidth);
+       virtual bool DeleteItem(const int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem);
+       virtual void UpdateItem(int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem);
+       virtual int GetDefaultItemHeight(void);
+
+       virtual void OnTableViewItemStateChanged(Tizen::Ui::Controls::TableView& tableView, int itemIndex,
+                                                       Tizen::Ui::Controls::TableViewItem* pItem,
+                                                       Tizen::Ui::Controls::TableViewItemStatus status);
+       virtual void OnTableViewContextItemActivationStateChanged(Tizen::Ui::Controls::TableView& tableView, int itemIndex,
+                                                                       Tizen::Ui::Controls::TableViewContextItem* pContextItem, bool activated);
+       virtual void OnTableViewItemReordered(Tizen::Ui::Controls::TableView& tableView,
+                                               int itemIndexFrom,
+                                               int itemIndexTo);
+
+       virtual void OnScrollEndReached (Tizen::Ui::Control &source, Tizen::Ui::Controls::ScrollEndEvent type);
        virtual void OnScrollPositionChanged (Tizen::Ui::Control &source, int scrollPos);
        virtual void OnScrollStopped (Tizen::Ui::Control &source);
 
-    virtual void OnFormBackRequested(Tizen::Ui::Controls::Form& source);
-
-private:
-    result PlaylistCreateTableViewItem(Tizen::Ui::Container& parent, const ContentInformationStruct& contentInfoStruct);
-       result AlbumCreateTableViewItem(Tizen::Ui::Container& parent, const ContentInformationStruct& contentInfoStruct);
-       result ArtistsCreateTableViewItem(Tizen::Ui::Container& parent, const ContentInformationStruct& contentInfoStruct);
-       result GenreCreateTableViewItem(Tizen::Ui::Container& parent, const ContentInformationStruct& contentInfoStruct);
-       result ComposersCreateTableViewItem(Tizen::Ui::Container& parent, const ContentInformationStruct& contentInfoStruct);
-       result YearCreateTableViewItem(Tizen::Ui::Container& parent, const ContentInformationStruct& contentInfoStruct);
-       result FolderCreateTableViewItem(Tizen::Ui::Container& parent, const ContentInformationStruct& contentInfoStruct);
-       result CreateTableViewContextItem(Tizen::Ui::Controls::TableViewContextItem& parent);
+       virtual void OnFormBackRequested(Tizen::Ui::Controls::Form& source);
 
-       void SetFooterStyle(void);
+protected:
+       void CreateNoContentImage(Tizen::Base::String noContentText = L"");
+       void CreateSelectAllCheckedButton(void);
+       void CreateCheckedCountLabel(void);
+       void CreateContextMenu(const Tizen::Ui::Control& source);
+       void CreateDeletePopup(void);
+       result CreatePlayListPickerPopup(Tizen::Base::Collection::IList* pDataList);
+       void DestroyPlayListPickerPopup(void);
 
-       result InitializeHeader(const ContentInformationStruct& contentInfoStruct);
-       result InitializeGenericContentInfoPanel(const ContentInformationStruct& contentInfoStruct, const int Songs);
-       Tizen::Base::String GetContentNameInfo(const Tizen::Content::AudioContentInfo& info, const Tizen::Base::String& SceneId);
-       Tizen::Base::Collection::ArrayList* GetSearchResultContentList(int itemIndex);
-       Tizen::Base::Collection::ArrayList* GetAudioContentInfoContentList(int itemIndex);
-       void SetHeaderTitleChanged(const Tizen::Base::String& title);
+       result InitializeHeader(const ContentInformation& contentInfoStruct);
+       void SetTitleText(const Tizen::Base::String& title);
+       result CreateTableViewContextItem(Tizen::Ui::Controls::TableViewContextItem& parent);
+       virtual void CreateTableview(void);
+       virtual result CreateTableViewItem(Tizen::Ui::Container& parent, const ContentInformation& contentInfoStruct) = 0;
+       virtual void OnUserEventReceivedN(RequestId requestId, Tizen::Base::Collection::IList* pArgs);
 
-private:
-       int __ContentType;
+protected:
        int __itemIndex;
+       int __currentContentIndex;
        int __scrolledDistance;
-
-       bool __isDeletedItem;
-
+       int __checkedItemCount;
+       bool __checkEdit;
        Tizen::Base::String* __pStrSceneId;
        Tizen::Base::String* __pStrContentName;
-
-       Tizen::Ui::Controls::ContextMenu* __pShareContextMenu;
-       Tizen::Ui::Controls::ContextMenu* __pSetContextMenu;
-       Tizen::Ui::Controls::Popup* __pDeletePopup;
-
-       Tizen::Ui::Controls::Panel* __pContentInfoPanel;
+       Tizen::Base::String __strHeaderName;
        Tizen::Ui::Controls::TableView* __pContentTableView;
-
-       ContentListPresentationModel* __pPresentationModel;
-
-       NowPlayContentPanel* __pNowPlayContentPanel;
+       Tizen::Ui::Controls::CheckButton* __pSelectAllCheckedButton;
+       Tizen::Ui::Controls::Label* __pCheckedCountLabel;
+       SharePopup* __pSharePopup;
        PlayListPickerPopup* __pPlayListPickerPopup;
-
        Tizen::Ui::Controls::Label* __pNoContentImageLabel;
        Tizen::Ui::Controls::Label* __pNoContentTextLabel;
        Tizen::Ui::Controls::TableViewContextItem* __pContextItem;
+       Tizen::Ui::Controls::Popup* __pDeletePopup;
+       Tizen::Ui::Controls::ContextMenu* __pShareContextMenu;
+       Tizen::Ui::Controls::ContextMenu* __pSetContextMenu;
 };
 
-
-#endif // _MP_CONTENT_LIST_FORM_H_
+#endif // _MP_CONTENT_LIST_FORM_H_
\ No newline at end of file
diff --git a/inc/MpContentListPresentationModel.h b/inc/MpContentListPresentationModel.h
deleted file mode 100644 (file)
index 94b77d2..0000000
+++ /dev/null
@@ -1,54 +0,0 @@
-//
-// Copyright (c) 2012 Samsung Electronics Co., Ltd.
-//
-// Licensed under the Flora License, Version 1.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://floralicense.org/license/
-//
-// 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 _MP_CONTENT_LIST_PRESENTATION_MODEL_H_
-#define _MP_CONTENT_LIST_PRESENTATION_MODEL_H_
-
-#include "MpCommonUtil.h"
-#include "MpContentInformationStruct.h"
-#include "MpTypes.h"
-
-class ContentListPresentationModel
-: public Tizen::Base::Object
-{
-public:
-    ContentListPresentationModel(void);
-    ~ContentListPresentationModel(void);
-
-    int GetTotalContentCount(void);
-    ContentInformationStruct* GetContentInfoN(int index);
-    ContentInformationStruct* GetFolderContentInfoN(int index);
-    ContentInformationStruct* GetPlaylistContentInfoN(int index);
-    void Release(void);
-
-    Tizen::Base::Collection::ArrayList* GetSearchResultContentList(void);
-    Tizen::Base::Collection::ArrayList* GetAudioContentInfoContentList(void);
-    Tizen::Base::Collection::ArrayList* GetPlaylistContentInfoContentList(void);
-
-    void RefreshContent(bool isPlaylist = false);
-    void CallOnDeleteItemChanged(void);
-    result RemoveContent(int index, int contentType);
-    result SetCallRingtone(int index);
-    result Construct(const Tizen::Base::String& ContentName, const Tizen::Base::String& SceneId, int playlistId = -1);
-
-private:
-       Tizen::Base::Collection::IList* __pContentList;
-    Tizen::Base::String* __pQueryName;
-    Tizen::Base::String* __pSceneId;
-    int __contentType;
-};
-
-#endif // _MP_CONTENT_LIST_PRESENTATION_MODEL_H_
diff --git a/inc/MpFolderContentListForm.h b/inc/MpFolderContentListForm.h
new file mode 100755 (executable)
index 0000000..56de0a4
--- /dev/null
@@ -0,0 +1,72 @@
+//
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.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://floralicense.org/license/
+//
+// 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.
+//
+
+/**
+ * @file               MpFolderContentListForm.h
+ * @brief              This is the header file for FolderContentListForm class.
+ */
+
+#ifndef _MP_FOLDER_CONTENT_LIST_FORM_H_
+#define _MP_FOLDER_CONTENT_LIST_FORM_H_
+
+#include "MpContentListForm.h"
+#include "MpThumbnailBase.h"
+
+class FolderListPresentationModel;
+
+class FolderContentListForm
+       : public ContentListForm
+       , public ThumbnailBase
+       , public Tizen::App::IAppControlResponseListener
+{
+public:
+       FolderContentListForm(void);
+       ~FolderContentListForm(void);
+
+       virtual result OnInitializing(void);
+       virtual result OnTerminating(void);
+       virtual void OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previousSceneId,
+                                                                       const Tizen::Ui::Scenes::SceneId& currentSceneId,
+                                                                       Tizen::Base::Collection::IList* pArgs);
+       virtual void OnSceneDeactivated(const Tizen::Ui::Scenes::SceneId& currentSceneId,
+                                                                       const Tizen::Ui::Scenes::SceneId& nextSceneId);
+       virtual void OnActionPerformed(const Tizen::Ui::Control& source, int actionId);
+       virtual void UpdateItem(int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem);
+       virtual int GetItemCount(void);
+       virtual Tizen::Ui::Controls::TableViewItem* CreateItem(const int itemIndex, int itemWidth);
+       virtual void OnTableViewItemStateChanged(Tizen::Ui::Controls::TableView& tableView,
+                                                       int itemIndex,
+                                                       Tizen::Ui::Controls::TableViewItem* pItem,
+                                                       Tizen::Ui::Controls::TableViewItemStatus status);
+
+       virtual void OnAppControlCompleteResponseReceived(const Tizen::App::AppId& appId,
+                               const Tizen::Base::String& operationId, Tizen::App::AppCtrlResult appControlResult,
+                               const Tizen::Base::Collection::IMap* pExtraData);
+
+       virtual void OnThumbnailInfoReveivedN(ThumbnailInfo* pThumbnailInfo);
+       virtual void OnUserEventReceivedN(RequestId requestId, Tizen::Base::Collection::IList* pArgs);
+
+private:
+       result CreateTableViewItem(Tizen::Ui::Container& parent, const ContentInformation& contentInfo);
+       Tizen::Base::Collection::ArrayList* MakePlayerSceneParam(int startIndex);
+       void ToggleViewMode(bool editMode);
+
+private:
+       Tizen::Graphics::Bitmap* __pThumbnail;
+       FolderListPresentationModel* __pPresentationModel;
+};
+
+#endif // _MP_FOLDER_CONTENT_LIST_FORM_H_
\ No newline at end of file
index 5aeea74..f617469 100755 (executable)
@@ -1,4 +1,4 @@
-//
+//
 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
 //
 // Licensed under the Flora License, Version 1.0 (the License);
 // See the License for the specific language governing permissions and
 // limitations under the License.
 //
+
+/**
+ * @file               MpFolderContentPickerPanel.h
+ * @brief              This is the header file for FolderContentPickerPanel class.
+ */
+
 #ifndef _MP_FOLDER_CONTENT_PICKER_PANEL_H_
 #define _MP_FOLDER_CONTENT_PICKER_PANEL_H_
 
 #include "MpCommonUtil.h"
-#include "MpTypes.h"
 #include "MpFolderListPresentationModel.h"
+#include "MpTypes.h"
 
 class FolderContentPickerPanel
        : public Tizen::Ui::Controls::Panel
@@ -28,8 +34,8 @@ class FolderContentPickerPanel
        , public Tizen::Ui::Scenes::ISceneEventListener
 {
 public:
-       FolderContentPickerPanel();
-       ~FolderContentPickerPanel();
+       FolderContentPickerPanel(void);
+       ~FolderContentPickerPanel(void);
        bool Initialize(void);
 
        virtual result OnInitializing(void);
@@ -37,12 +43,11 @@ public:
        virtual void OnActionPerformed(const Tizen::Ui::Control& source, int actionId);
 
        virtual void OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previousSceneId,
-                                                                  const Tizen::Ui::Scenes::SceneId& currentSceneId,
-                                                                  Tizen::Base::Collection::IList* pArgs);
+                                                                       const Tizen::Ui::Scenes::SceneId& currentSceneId,
+                                                                       Tizen::Base::Collection::IList* pArgs);
        virtual void OnSceneDeactivated(const Tizen::Ui::Scenes::SceneId& currentSceneId,
                                                                        const Tizen::Ui::Scenes::SceneId& nextSceneId);
 
-
        virtual int GetItemCount(void);
        virtual Tizen::Ui::Controls::TableViewItem* CreateItem(const int itemIndex, int itemWidth);
        virtual bool DeleteItem(const int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem);
@@ -50,16 +55,17 @@ public:
        virtual int GetDefaultItemHeight(void);
 
        virtual void OnTableViewItemStateChanged(Tizen::Ui::Controls::TableView& tableView,
-                                                                                        int itemIndex,
-                                                                                        Tizen::Ui::Controls::TableViewItem* pItem,
-                                                                                        Tizen::Ui::Controls::TableViewItemStatus status);
+                                                                                       int itemIndex,
+                                                                                       Tizen::Ui::Controls::TableViewItem* pItem,
+                                                                                       Tizen::Ui::Controls::TableViewItemStatus status);
        virtual void OnTableViewContextItemActivationStateChanged(Tizen::Ui::Controls::TableView& tableView,
-                                                                                                                         int itemIndex,
-                                                                                                                         Tizen::Ui::Controls::TableViewContextItem* pContextItem,
-                                                                                                                         bool activated);
+                                                                                                                       int itemIndex,
+                                                                                                                       Tizen::Ui::Controls::TableViewContextItem* pContextItem,
+                                                                                                                       bool activated);
        virtual void OnTableViewItemReordered(Tizen::Ui::Controls::TableView& tableView,
-                                                                                 int itemIndexFrom,
-                                                                                 int itemIndexTo);
+                                                                                       int itemIndexFrom,
+                                                                                       int itemIndexTo);
+
 private:
        int __checkedItemCount;
        Tizen::Ui::Controls::TableView* __pContentTableView;
@@ -68,4 +74,4 @@ private:
        FolderListPresentationModel* __pPresentationModel;
 };
 
-#endif //_MP_FOLDER_CONTENT_PICKER_PANEL_H_
+#endif // _MP_FOLDER_CONTENT_PICKER_PANEL_H_
\ No newline at end of file
index dc27ac9..89d9505 100755 (executable)
@@ -1,4 +1,4 @@
-//
+//
 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
 //
 // Licensed under the Flora License, Version 1.0 (the License);
 // limitations under the License.
 //
 
+/**
+ * @file               MpFolderListEditorPanel.h
+ * @brief              This is the header file for FolderListEditorPanel class.
+ */
+
 #ifndef _MP_FOLDER_LIST_EDITOR_PANEL_H_
 #define _MP_FOLDER_LIST_EDITOR_PANEL_H_
 
 #include <new>
 #include <FApp.h>
 #include <FSocial.h>
-#include <FUi.h>
 #include <FSystem.h>
-
-#include "MpTypes.h"
-#include "MpSceneRegister.h"
-#include "MpFolderListPresentationModel.h"
+#include <FUi.h>
 #include "MpBasePanel.h"
+#include "MpFolderListPresentationModel.h"
+#include "MpSceneRegister.h"
+#include "MpTypes.h"
 
 class PlayListPickerPopup;
 
@@ -47,38 +51,33 @@ public:
        virtual void OnActionPerformed(const Tizen::Ui::Control& source, int actionId);
 
        virtual void OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previousSceneId,
-                                                                  const Tizen::Ui::Scenes::SceneId& currentSceneId, Tizen::Base::Collection::IList* pArgs);
+                                                                       const Tizen::Ui::Scenes::SceneId& currentSceneId, Tizen::Base::Collection::IList* pArgs);
        virtual void OnSceneDeactivated(const Tizen::Ui::Scenes::SceneId& currentSceneId,
                                                                        const Tizen::Ui::Scenes::SceneId& nextSceneId);
 
-
        virtual int GetItemCount(void);
-    
-    virtual Tizen::Ui::Controls::TableViewItem* CreateItem(const int itemIndex, int itemWidth);
-    virtual bool DeleteItem(const int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem);
-    virtual void UpdateItem(int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem);
-    virtual int GetDefaultItemHeight(void);
 
-    virtual void OnTableViewItemStateChanged(Tizen::Ui::Controls::TableView& tableView,
-                                             int itemIndex,
-                                             Tizen::Ui::Controls::TableViewItem* pItem,
-                                             Tizen::Ui::Controls::TableViewItemStatus status);
-    virtual void OnTableViewContextItemActivationStateChanged(Tizen::Ui::Controls::TableView& tableView,
-                                                              int itemIndex,
-                                                              Tizen::Ui::Controls::TableViewContextItem* pContextItem,
-                                                              bool activated);
-    virtual void OnTableViewItemReordered(Tizen::Ui::Controls::TableView& tableView,
-                                          int itemIndexFrom,
-                                          int itemIndexTo);
+       virtual Tizen::Ui::Controls::TableViewItem* CreateItem(const int itemIndex, int itemWidth);
+       virtual bool DeleteItem(const int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem);
+       virtual void UpdateItem(int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem);
+       virtual int GetDefaultItemHeight(void);
 
-    virtual void OnUpdateContentList(void);
+       virtual void OnTableViewItemStateChanged(Tizen::Ui::Controls::TableView& tableView,
+                                                       int itemIndex,
+                                                       Tizen::Ui::Controls::TableViewItem* pItem,
+                                                       Tizen::Ui::Controls::TableViewItemStatus status);
+       virtual void OnTableViewContextItemActivationStateChanged(Tizen::Ui::Controls::TableView& tableView,
+                                                                       int itemIndex,
+                                                                       Tizen::Ui::Controls::TableViewContextItem* pContextItem,
+                                                                       bool activated);
+       virtual void OnTableViewItemReordered(Tizen::Ui::Controls::TableView& tableView,
+                                               int itemIndexFrom,
+                                               int itemIndexTo);
 
-private:
-       result CreateTableViewItem(Tizen::Ui::Container& parent,
-                                                          const Tizen::Graphics::Bitmap& folderIconBitmap,
-                                                          const ContentInformationStruct& contentInfoStruct,
-                               const int contentTotalCount);
+       virtual void OnUpdateContentList(void);
+       virtual void OnUserEventReceivedN(RequestId requestId, Tizen::Base::Collection::IList* pArgs);
 
+private:
        void UpdateContentList(void);
 
 protected:
@@ -90,4 +89,4 @@ protected:
        FolderListPresentationModel* __pPresentationModel;
 };
 
-#endif // _MP_FOLDER_LIST_EDITOR_PANEL_H_
+#endif // _MP_FOLDER_LIST_EDITOR_PANEL_H_
\ No newline at end of file
index c772795..ebb362b 100755 (executable)
@@ -1,4 +1,4 @@
-//
+//
 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
 //
 // Licensed under the Flora License, Version 1.0 (the License);
 // limitations under the License.
 //
 
+/**
+ * @file               MpFolderListPanel.h
+ * @brief              This is the header file for FolderListPanel class.
+ */
+
 #ifndef _MP_FOLDERS_LIST_PANEL_H_
 #define _MP_FOLDERS_LIST_PANEL_H_
 
 #include <new>
 #include <FApp.h>
-#include <FSocial.h>
-#include <FUi.h>
-#include <FSystem.h>
 #include <FBase.h>
 #include <FIo.h>
-
-#include "MpTypes.h"
-#include "MpSceneRegister.h"
-#include "MpFolderListPresentationModel.h"
+#include <FSocial.h>
+#include <FSystem.h>
+#include <FUi.h>
 #include "MpBasePanel.h"
+#include "MpFolderListPresentationModel.h"
+#include "MpSceneRegister.h"
+#include "MpTypes.h"
 
+class PlayListPickerPopup;
 class NowPlayContentPanel;
 
 class FolderListPanel
@@ -41,9 +46,8 @@ class FolderListPanel
        , public Tizen::Ui::Controls::IFormBackEventListener
        , public Tizen::Ui::IActionEventListener
        , public Tizen::Ui::IKeypadEventListener
-       , public Tizen::Ui::ITouchEventListener
+       /*, public Tizen::Ui::ITouchEventListener*/
        , public Tizen::Ui::Scenes::ISceneEventListener
-
 {
 public:
        FolderListPanel(void);
@@ -59,36 +63,37 @@ public:
 
        virtual int GetItemCount(void);
 
-    virtual Tizen::Ui::Controls::TableViewItem* CreateItem(const int itemIndex, int itemWidth);
-    virtual bool DeleteItem(const int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem);
-    virtual void UpdateItem(int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem);
-    virtual int GetDefaultItemHeight(void);
+       virtual Tizen::Ui::Controls::TableViewItem* CreateItem(const int itemIndex, int itemWidth);
+       virtual bool DeleteItem(const int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem);
+       virtual void UpdateItem(int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem);
+       virtual int GetDefaultItemHeight(void);
 
-    virtual void OnTableViewItemStateChanged(Tizen::Ui::Controls::TableView& tableView, int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem, Tizen::Ui::Controls::TableViewItemStatus status);
-    virtual void OnTableViewContextItemActivationStateChanged(Tizen::Ui::Controls::TableView& tableView, int itemIndex, Tizen::Ui::Controls::TableViewContextItem* pContextItem, bool activated);
-    virtual void OnTableViewItemReordered(Tizen::Ui::Controls::TableView& tableView, int itemIndexFrom, int itemIndexTo);
+       virtual void OnTableViewItemStateChanged(Tizen::Ui::Controls::TableView& tableView, int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem, Tizen::Ui::Controls::TableViewItemStatus status);
+       virtual void OnTableViewContextItemActivationStateChanged(Tizen::Ui::Controls::TableView& tableView, int itemIndex, Tizen::Ui::Controls::TableViewContextItem* pContextItem, bool activated);
+       virtual void OnTableViewItemReordered(Tizen::Ui::Controls::TableView& tableView, int itemIndexFrom, int itemIndexTo);
 
-    virtual void OnFastScrollIndexSelected(Tizen::Ui::Control& source, Tizen::Base::String& index);
+       virtual void OnFastScrollIndexSelected(Tizen::Ui::Control& source, Tizen::Base::String& index);
 
        virtual void OnKeypadActionPerformed(Tizen::Ui::Control &source, Tizen::Ui::KeypadAction keypadAction);
        virtual void OnKeypadClosed(Tizen::Ui::Control& source);
        virtual void OnKeypadOpened(Tizen::Ui::Control& source);
        virtual void OnKeypadWillOpen(Tizen::Ui::Control& source);
 
-       virtual void OnTouchCanceled (const Tizen::Ui::Control &source, const Tizen::Graphics::Point &currentPosition, const Tizen::Ui::TouchEventInfo &touchInfo);
-    virtual void OnTouchDoublePressed(const Tizen::Ui::Control& source, const Tizen::Graphics::Point& currentPosition, const Tizen::Ui::TouchEventInfo& touchInfo);
+       /*virtual void OnTouchCanceled(const Tizen::Ui::Control& source, const Tizen::Graphics::Point& currentPosition, const Tizen::Ui::TouchEventInfo& touchInfo);
+       virtual void OnTouchDoublePressed(const Tizen::Ui::Control& source, const Tizen::Graphics::Point& currentPosition, const Tizen::Ui::TouchEventInfo& touchInfo);
        virtual void OnTouchFocusIn(const Tizen::Ui::Control& source, const Tizen::Graphics::Point& currentPosition, const Tizen::Ui::TouchEventInfo& touchInfo);
        virtual void OnTouchFocusOut(const Tizen::Ui::Control& source, const Tizen::Graphics::Point& currentPosition, const Tizen::Ui::TouchEventInfo& touchInfo);
        virtual void OnTouchLongPressed(const Tizen::Ui::Control& source, const Tizen::Graphics::Point& currentPosition, const Tizen::Ui::TouchEventInfo& touchInfo);
        virtual void OnTouchMoved(const Tizen::Ui::Control& source, const Tizen::Graphics::Point& currentPosition, const Tizen::Ui::TouchEventInfo& touchInfo);
        virtual void OnTouchPressed(const Tizen::Ui::Control& source, const Tizen::Graphics::Point& currentPosition, const Tizen::Ui::TouchEventInfo& touchInfo);
-       virtual void OnTouchReleased(const Tizen::Ui::Control& source, const Tizen::Graphics::Point& currentPosition, const Tizen::Ui::TouchEventInfo& touchInfo);
+       virtual void OnTouchReleased(const Tizen::Ui::Control& source, const Tizen::Graphics::Point& currentPosition, const Tizen::Ui::TouchEventInfo& touchInfo);*/
 
-       virtual void OnScrollEndReached (Tizen::Ui::Control &source, Tizen::Ui::Controls::ScrollEndEvent type);
-       virtual void OnScrollPositionChanged (Tizen::Ui::Control &source, int scrollPos);
-       virtual void OnScrollStopped (Tizen::Ui::Control &source);
+       virtual void OnScrollEndReached(Tizen::Ui::Control &source, Tizen::Ui::Controls::ScrollEndEvent type);
+       virtual void OnScrollPositionChanged (Tizen::Ui::Controlsource, int scrollPos);
+       virtual void OnScrollStopped(Tizen::Ui::Control& source);
        virtual void OnFormBackRequested(Tizen::Ui::Controls::Form& source);
        virtual void OnUpdateContentList(void);
+       virtual void OnUserEventReceivedN(RequestId requestId, Tizen::Base::Collection::IList* pArgs);
 
 private:
        /*result CreateTableViewContextItem(Tizen::Ui::Controls::TableViewContextItem& parent);*/
@@ -100,6 +105,7 @@ private:
 
 protected:
        NowPlayContentPanel* __pNowPlayContentPanel;
+       PlayListPickerPopup* __pPlayListPickerPopup;
        Tizen::Ui::Controls::TableViewContextItem* __pContextItem;
        Tizen::Ui::Controls::TableView* __pContentTableView;
        Tizen::Ui::Controls::Label* __pNoContentImageLabel;
@@ -110,4 +116,4 @@ protected:
        FolderListPresentationModel* __pPresentationModel;
 };
 
-#endif // _MP_FOLDERS_LIST_PANEL_H_
+#endif // _MP_FOLDERS_LIST_PANEL_H_
\ No newline at end of file
index 3f858df..c04b35f 100755 (executable)
@@ -1,4 +1,4 @@
-//
+//
 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
 //
 // Licensed under the Flora License, Version 1.0 (the License);
 // limitations under the License.
 //
 
+/**
+ * @file               MpFolderListPresentationModel.h
+ * @brief              This is the header file for FolderListPresentationModel class.
+ */
+
 #ifndef _MP_FOLDER_LIST_PRESENTATION_MODEL_H_
 #define _MP_FOLDER_LIST_PRESENTATION_MODEL_H_
 
-#include "MpTypes.h"
 #include "MpCommonUtil.h"
 #include "MpContentInformationStruct.h"
+#include "MpTypes.h"
 
 class FolderListPresentationModel
 {
 public:
        static FolderListPresentationModel* GetInstance(void);
-
-       void RefreshContent(void);
-       void SearchSong(int index);
-
-       int GetTotalContentCount(int index);
-       int GetTotalFolderCount(void);
-       int GetSongContentCount(void);
-
-       Tizen::Base::String* GetContentName(int index);
-       Tizen::Base::String* GetPath(int index);
-
+       int GetContentCount(int folderIndex);
+       int GetAllFolderCount(void);
+       ContentInformation* GetFolderInfoN(int folderIndex);
+       void InitializeContentList(int folderIndex);
        Tizen::Base::Collection::IList* ContentDirectoryPathList(void);
-       Tizen::Base::Collection::ArrayList* GetContenList(int index);
-
-       ContentInformationStruct* GetContentInfoN(int index);
-    ContentInformationStruct* GetSongContentInfoN(int index);
-    Tizen::Base::Collection::ArrayList* SearchContentItemN(int index);
+       Tizen::Base::Collection::ArrayList* GetContentPathListN(int folderIndex);
+       ContentInformation* GetContentInfoN(int contentIndex);
+       Tizen::Base::String* GetFolderName(int folderIndex);
+       Tizen::Base::String* GetFolderPath(int folderIndex);
+       void RefreshContentList(int folderIndex);
+       int GetCurrentFolderIndex(void);
+       void AddContent(Tizen::Base::String path, int playlistIndex);
+       result UpdateFolderPathList(void);
 
-    result RemoveContent(int index);
 private:
        FolderListPresentationModel(void);
-    FolderListPresentationModel(const FolderListPresentationModel& FolderListPresentationModel);
-    const FolderListPresentationModel& operator = (const FolderListPresentationModel& FolderListPresentationModel);
-    ~FolderListPresentationModel(void);
+       FolderListPresentationModel(const FolderListPresentationModel& FolderListPresentationModel);
+       const FolderListPresentationModel& operator = (const FolderListPresentationModel& FolderListPresentationModel);
+       ~FolderListPresentationModel(void);
 
-    result Construct(void);
+       result Construct(void);
 
 private:
-    Tizen::Base::Collection::IList* __pFolderPathList;
-    Tizen::Base::Collection::IList* __pSongList;
-    static FolderListPresentationModel* pFolderListPresentationModelInstance;
+       Tizen::Base::Collection::IList* __pFolderPathList;
+       Tizen::Base::Collection::IList* __pContentList;
+       static FolderListPresentationModel* pFolderListPresentationModelInstance;
+       int __currentFolderIndex;
 };
 
-#endif //_MP_FOLDER_LIST_PRESENTATION_MODEL_H_
+#endif // _MP_FOLDER_LIST_PRESENTATION_MODEL_H_
\ No newline at end of file
index f23a940..6a0754a 100755 (executable)
 // limitations under the License.
 //
 
+/**
+ * @file               MpFolderPickerPanel.h
+ * @brief              This is the header file for FolderPickerPanel class.
+ */
+
 #ifndef _MP_FOLDER_PICKER_PANEL_H_
 #define _MP_FOLDER_PICKER_PANEL_H_
 
@@ -22,7 +27,7 @@
 class NowPlayContentPanel;
 
 class FolderPickerPanel
-: public FolderListPanel
+       : public FolderListPanel
 {
 public:
        FolderPickerPanel(void);
@@ -34,4 +39,4 @@ public:
        void OnTableViewItemStateChanged(Tizen::Ui::Controls::TableView& tableView, int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem, Tizen::Ui::Controls::TableViewItemStatus status);
 };
 
-#endif //_MP_FOLDER_PICKER_PANEL_H_
+#endif // _MP_FOLDER_PICKER_PANEL_H_
\ No newline at end of file
old mode 100644 (file)
new mode 100755 (executable)
index 62d1e70..d3f9c16
@@ -1,4 +1,4 @@
-//
+//
 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
 //
 // Licensed under the Flora License, Version 1.0 (the License);
 // limitations under the License.
 //
 
+/**
+ * @file               MpFormFactory.h
+ * @brief              This is the header file for FormFactory class.
+ */
+
 #ifndef _MP_FORM_FACTORY_H_
 #define _MP_FORM_FACTORY_H_
 
 #include <new>
 #include <FUiScenes.h>
-
-#include "MpContentListForm.h"
-#include "MpContentListEditorForm.h"
+#include "MpAlbumContentListForm.h"
+#include "MpArtistAlbumListForm.h"
+#include "MpArtistAlbumListEditorForm.h"
+#include "MpArtistAllSongListForm.h"
+#include "MpArtistContentListForm.h"
+#include "MpComposerContentListForm.h"
+#include "MpContentDetailForm.h"
 #include "MpContentForm.h"
+#include "MpGenreContentListForm.h"
+#include "MpFolderContentListForm.h"
 #include "MpMusicPlayerForm.h"
+#include "MpPlaylistContentListForm.h"
+#include "MpPlaylistCreatorForm.h"
 #include "MpSettingForm.h"
 #include "MpSearchForm.h"
-#include "MpPlaylistCreatorForm.h"
-#include "MpContentDetailForm.h"
-#include "MpArtistAlbumListForm.h"
-#include "MpArtistAlbumListEditorForm.h"
-#include "MpArtistAllSongListForm.h"
 #include "MpUserPlaylistContentListForm.h"
+#include "MpYearContentListForm.h"
 
 extern const wchar_t* IDC_PLAYER_FORM;
 extern const wchar_t* IDC_MUSIC_SETTING_FORM;
-extern const wchar_t* IDC_ALBUM_CONTENT_FORM;
+extern const wchar_t* IDC_ARTIST_CONTENT_LIST_FORM;
+extern const wchar_t* IDC_GENRE_CONTENT_LIST_FORM;
+extern const wchar_t* IDC_COMPOSER_CONTENT_LIST_FORM;
+extern const wchar_t* IDC_YEAR_CONTENT_LIST_FORM;
+extern const wchar_t* IDC_FOLDER_CONTENT_LIST_FORM;
+extern const wchar_t* IDC_PLAYLIST_CONTENT_LIST_FORM;
+
 extern const wchar_t* IDC_CONTENT_FORM;
 extern const wchar_t* IDC_SEARCH_FORM;
 extern const wchar_t* IDC_CONTENT_EDIT_FORM;
-extern const wchar_t* IDC_CONTENT_LIST_FORM;
-extern const wchar_t* IDC_CONTENT_LIST_EDIT_FORM;
+extern const wchar_t* IDC_ALBUM_CONTENT_LIST_FORM;
 extern const wchar_t* IDC_PLAYLIST_CREATOR_FORM;
-extern const wchar_t* IDC_PLAYLIST_CONTENT_LIST_FORM;
 extern const wchar_t* IDC_USER_PLAYLIST_CONTENT_LIST_FORM;
 extern const wchar_t* IDC_CONTENT_DETAIL_FORM;
 extern const wchar_t* IDC_ARTIST_ALBUM_LIST_FORM;
@@ -55,9 +68,9 @@ class FormFactory
 {
 public:
        FormFactory(void);
-       virtual ~FormFactory();
+       virtual ~FormFactory(void);
 
        virtual Tizen::Ui::Controls::Form* CreateFormN(const Tizen::Base::String& formId, const Tizen::Ui::Scenes::SceneId& sceneId);
 };
 
-#endif // _MP_FORM_FACTORY_H_
+#endif // _MP_FORM_FACTORY_H_
\ No newline at end of file
diff --git a/inc/MpGenreContentListForm.h b/inc/MpGenreContentListForm.h
new file mode 100755 (executable)
index 0000000..7e6f0a8
--- /dev/null
@@ -0,0 +1,72 @@
+//
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.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://floralicense.org/license/
+//
+// 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.
+//
+
+/**
+ * @file               MpGenreContentListForm.h
+ * @brief              This is the header file for GenreContentListForm class.
+ */
+
+#ifndef _MP_GENRE_CONTENT_LIST_FORM_H_
+#define _MP_GENRE_CONTENT_LIST_FORM_H_
+
+#include "MpContentListForm.h"
+#include "MpThumbnailBase.h"
+
+class GenreListPresentationModel;
+
+class GenreContentListForm
+       : public ContentListForm
+       , public ThumbnailBase
+       , public Tizen::App::IAppControlResponseListener
+{
+public:
+       GenreContentListForm(void);
+       ~GenreContentListForm(void);
+
+       virtual result OnInitializing(void);
+       virtual result OnTerminating(void);
+       virtual void OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previousSceneId,
+                                                                       const Tizen::Ui::Scenes::SceneId& currentSceneId,
+                                                                       Tizen::Base::Collection::IList* pArgs);
+       virtual void OnSceneDeactivated(const Tizen::Ui::Scenes::SceneId& currentSceneId,
+                                                                       const Tizen::Ui::Scenes::SceneId& nextSceneId);
+       virtual void OnActionPerformed(const Tizen::Ui::Control& source, int actionId);
+       virtual void UpdateItem(int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem);
+       virtual int GetItemCount(void);
+       virtual Tizen::Ui::Controls::TableViewItem* CreateItem(const int itemIndex, int itemWidth);
+       virtual void OnTableViewItemStateChanged(Tizen::Ui::Controls::TableView& tableView,
+                                                       int itemIndex,
+                                                       Tizen::Ui::Controls::TableViewItem* pItem,
+                                                       Tizen::Ui::Controls::TableViewItemStatus status);
+
+       virtual void OnAppControlCompleteResponseReceived(const Tizen::App::AppId& appId,
+                               const Tizen::Base::String& operationId, Tizen::App::AppCtrlResult appControlResult,
+                               const Tizen::Base::Collection::IMap* pExtraData);
+
+       virtual void OnThumbnailInfoReveivedN(ThumbnailInfo* pThumbnailInfo);
+       virtual void OnUserEventReceivedN(RequestId requestId, Tizen::Base::Collection::IList* pArgs);
+
+private:
+       result CreateTableViewItem(Tizen::Ui::Container& parent, const ContentInformation& contentInfo);
+       Tizen::Base::Collection::ArrayList* MakePlayerSceneParam(int startIndex);
+       void ToggleViewMode(bool editMode);
+
+private:
+       Tizen::Graphics::Bitmap* __pThumbnail;
+       GenreListPresentationModel* __pPresentationModel;
+};
+
+#endif // _MP_GENRE_CONTENT_LIST_FORM_H_
\ No newline at end of file
index 0ef356c..1f108b9 100755 (executable)
@@ -1,4 +1,4 @@
-//
+//
 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
 //
 // Licensed under the Flora License, Version 1.0 (the License);
 // limitations under the License.
 //
 
+/**
+ * @file               MpAlbumContentPickerPanel.h
+ * @brief              This is the header file for AlbumContentPickerPanel class.
+ */
+
 #ifndef _MP_GENRE_CONTENT_PICKER_PANEL_H_
 #define _MP_GENRE_CONTENT_PICKER_PANEL_H_
 
 #include "MpCommonUtil.h"
-#include "MpTypes.h"
 #include "MpGenreListPresentationModel.h"
+#include "MpTypes.h"
 
 class GenreContentPickerPanel
        : public Tizen::Ui::Controls::Panel
@@ -29,8 +34,8 @@ class GenreContentPickerPanel
        , public Tizen::Ui::Scenes::ISceneEventListener
 {
 public:
-       GenreContentPickerPanel();
-       ~GenreContentPickerPanel();
+       GenreContentPickerPanel(void);
+       ~GenreContentPickerPanel(void);
        bool Initialize(void);
 
        virtual result OnInitializing(void);
@@ -38,29 +43,29 @@ public:
        virtual void OnActionPerformed(const Tizen::Ui::Control& source, int actionId);
 
        virtual void OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previousSceneId,
-                                                                  const Tizen::Ui::Scenes::SceneId& currentSceneId,
-                                                                  Tizen::Base::Collection::IList* pArgs);
+                                                                       const Tizen::Ui::Scenes::SceneId& currentSceneId,
+                                                                       Tizen::Base::Collection::IList* pArgs);
        virtual void OnSceneDeactivated(const Tizen::Ui::Scenes::SceneId& currentSceneId,
                                                                        const Tizen::Ui::Scenes::SceneId& nextSceneId);
 
-
        virtual int GetItemCount(void);
-    virtual Tizen::Ui::Controls::TableViewItem* CreateItem(const int itemIndex, int itemWidth);
-    virtual bool DeleteItem(const int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem);
-    virtual void UpdateItem(int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem);
-    virtual int GetDefaultItemHeight(void);
+       virtual Tizen::Ui::Controls::TableViewItem* CreateItem(const int itemIndex, int itemWidth);
+       virtual bool DeleteItem(const int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem);
+       virtual void UpdateItem(int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem);
+       virtual int GetDefaultItemHeight(void);
+
+       virtual void OnTableViewItemStateChanged(Tizen::Ui::Controls::TableView& tableView,
+                                                       int itemIndex,
+                                                       Tizen::Ui::Controls::TableViewItem* pItem,
+                                                       Tizen::Ui::Controls::TableViewItemStatus status);
+       virtual void OnTableViewContextItemActivationStateChanged(Tizen::Ui::Controls::TableView& tableView,
+                                                                       int itemIndex,
+                                                                       Tizen::Ui::Controls::TableViewContextItem* pContextItem,
+                                                                       bool activated);
+       virtual void OnTableViewItemReordered(Tizen::Ui::Controls::TableView& tableView,
+                                               int itemIndexFrom,
+                                               int itemIndexTo);
 
-    virtual void OnTableViewItemStateChanged(Tizen::Ui::Controls::TableView& tableView,
-                                             int itemIndex,
-                                             Tizen::Ui::Controls::TableViewItem* pItem,
-                                             Tizen::Ui::Controls::TableViewItemStatus status);
-    virtual void OnTableViewContextItemActivationStateChanged(Tizen::Ui::Controls::TableView& tableView,
-                                                              int itemIndex,
-                                                              Tizen::Ui::Controls::TableViewContextItem* pContextItem,
-                                                              bool activated);
-    virtual void OnTableViewItemReordered(Tizen::Ui::Controls::TableView& tableView,
-                                          int itemIndexFrom,
-                                          int itemIndexTo);
 private:
        int __checkedItemCount;
        Tizen::Ui::Controls::TableView* __pContentTableView;
@@ -69,4 +74,4 @@ private:
        GenreListPresentationModel* __pPresentationModel;
 };
 
-#endif //_MP_GENRE_CONTENT_PICKER_PANEL_H_
+#endif // _MP_GENRE_CONTENT_PICKER_PANEL_H_
\ No newline at end of file
index 26bc41c..a185cfc 100755 (executable)
@@ -1,4 +1,4 @@
-//
+//
 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
 //
 // Licensed under the Flora License, Version 1.0 (the License);
 // limitations under the License.
 //
 
+/**
+ * @file               MpGenreListEditorPanel.h
+ * @brief              This is the header file for GenreListEditorPanel class.
+ */
+
 #ifndef _MP_GENRE_LIST_EDITOR_PANEL_H_
 #define _MP_GENRE_LIST_EDITOR_PANEL_H_
 
+#include "MpBasePanel.h"
 #include "MpGenreListPresentationModel.h"
-#include "MpTypes.h"
 #include "MpSceneRegister.h"
-#include "MpBasePanel.h"
+#include "MpThumbnailBase.h"
+#include "MpTypes.h"
 
 class PlayListPickerPopup;
 
 class GenresListEditorPanel
        : public BasePanel
+       , public ThumbnailBase
        , public Tizen::Ui::Controls::ITableViewItemProvider
        , public Tizen::Ui::Controls::ITableViewItemEventListener
        , public Tizen::Ui::IActionEventListener
@@ -41,35 +48,38 @@ public:
        virtual void OnActionPerformed(const Tizen::Ui::Control& source, int actionId);
 
        virtual void OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previousSceneId,
-                                                                  const Tizen::Ui::Scenes::SceneId& currentSceneId, Tizen::Base::Collection::IList* pArgs);
+                                                                       const Tizen::Ui::Scenes::SceneId& currentSceneId, Tizen::Base::Collection::IList* pArgs);
        virtual void OnSceneDeactivated(const Tizen::Ui::Scenes::SceneId& currentSceneId,
                                                                        const Tizen::Ui::Scenes::SceneId& nextSceneId);
 
        virtual int GetItemCount(void);
-    
-    virtual Tizen::Ui::Controls::TableViewItem* CreateItem(const int itemIndex, int itemWidth);
-    virtual bool DeleteItem(const int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem);
-    virtual void UpdateItem(int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem);
-    virtual int GetDefaultItemHeight(void);
 
-    virtual void OnTableViewItemStateChanged(Tizen::Ui::Controls::TableView& tableView,
-                                             int itemIndex,
-                                             Tizen::Ui::Controls::TableViewItem* pItem,
-                                             Tizen::Ui::Controls::TableViewItemStatus status);
-    virtual void OnTableViewContextItemActivationStateChanged(Tizen::Ui::Controls::TableView& tableView,
-                                                              int itemIndex,
-                                                              Tizen::Ui::Controls::TableViewContextItem* pContextItem,
-                                                              bool activated);
-    virtual void OnTableViewItemReordered(Tizen::Ui::Controls::TableView& tableView,
-                                          int itemIndexFrom,
-                                          int itemIndexTo);
+       virtual Tizen::Ui::Controls::TableViewItem* CreateItem(const int itemIndex, int itemWidth);
+       virtual bool DeleteItem(const int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem);
+       virtual void UpdateItem(int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem);
+       virtual int GetDefaultItemHeight(void);
+
+       virtual void OnTableViewItemStateChanged(Tizen::Ui::Controls::TableView& tableView,
+                                                       int itemIndex,
+                                                       Tizen::Ui::Controls::TableViewItem* pItem,
+                                                       Tizen::Ui::Controls::TableViewItemStatus status);
+       virtual void OnTableViewContextItemActivationStateChanged(Tizen::Ui::Controls::TableView& tableView,
+                                                                       int itemIndex,
+                                                                       Tizen::Ui::Controls::TableViewContextItem* pContextItem,
+                                                                       bool activated);
+       virtual void OnTableViewItemReordered(Tizen::Ui::Controls::TableView& tableView,
+                                               int itemIndexFrom,
+                                               int itemIndexTo);
 
-    virtual void OnUpdateContentList(void);
+       virtual void OnUpdateContentList(void);
+
+       virtual void OnThumbnailInfoReveivedN(ThumbnailInfo* pThumbnailInfo);
+       virtual void OnUserEventReceivedN(RequestId requestId, Tizen::Base::Collection::IList* pArgs);
 
 private:
        result CreateTableViewItem(Tizen::Ui::Container& parent,
-                                      const ContentInformationStruct& contentInfoStruct,
-                                          const int contentTotalCount = 0);
+                                               const ContentInformation& contentInfoStruct,
+                                               const int contentTotalCount = 0);
        void UpdateContentList(void);
 
 protected:
@@ -77,9 +87,9 @@ protected:
        Tizen::Ui::Controls::TableView* __pContentTableView;
        Tizen::Ui::Controls::CheckButton* __pSelectAllCheckedButton;
        Tizen::Ui::Controls::Label* __pCheckedCountLabel;
+       Tizen::Graphics::Bitmap* __pThumbnail;
        PlayListPickerPopup* __pPlayListPickerPopup;
        GenreListPresentationModel* __pPresentationModel;
 };
 
-
-#endif // _MP_GENRE_LIST_EDITOR_PANEL_H_
+#endif // _MP_GENRE_LIST_EDITOR_PANEL_H_
\ No newline at end of file
index 20153df..14e57e5 100755 (executable)
@@ -1,4 +1,4 @@
-//
+//
 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
 //
 // Licensed under the Flora License, Version 1.0 (the License);
 // limitations under the License.
 //
 
+/**
+ * @file               MpGenreListPanel.h
+ * @brief              This is the header file for GenreListPanel class.
+ */
+
 #ifndef _MP_GENRE_LIST_PANEL_H_
 #define _MP_GENRE_LIST_PANEL_H_
 
 #include <FSocial.h>
 #include <FUi.h>
 #include <FUiScenes.h>
-
-#include "MpTypes.h"
+#include "MpBasePanel.h"
 #include "MpGenreListPresentationModel.h"
 #include "MpSceneRegister.h"
-#include "MpBasePanel.h"
+#include "MpThumbnailBase.h"
+#include "MpTypes.h"
 
 class PlayListPickerPopup;
 class NowPlayContentPanel;
 
 class GenreListPanel
        : public BasePanel
+       , public ThumbnailBase
        , public Tizen::Ui::Controls::ITableViewItemProvider
        , public Tizen::Ui::Controls::ITableViewItemEventListener
        , public Tizen::Ui::Controls::IFastScrollListener
@@ -50,32 +56,34 @@ public:
        virtual void OnActionPerformed(const Tizen::Ui::Control& source, int actionId);
 
        virtual void OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previousSceneId,
-                                                                  const Tizen::Ui::Scenes::SceneId& currentSceneId, Tizen::Base::Collection::IList* pArgs);
+                                                                       const Tizen::Ui::Scenes::SceneId& currentSceneId, Tizen::Base::Collection::IList* pArgs);
        virtual void OnSceneDeactivated(const Tizen::Ui::Scenes::SceneId& currentSceneId,
                                                                        const Tizen::Ui::Scenes::SceneId& nextSceneId);
 
-
        virtual int GetItemCount(void);
-    virtual Tizen::Ui::Controls::TableViewItem* CreateItem(const int itemIndex, int itemWidth);
-    virtual bool DeleteItem(const int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem);
-    virtual void UpdateItem(int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem);
-    virtual int GetDefaultItemHeight(void);
+       virtual Tizen::Ui::Controls::TableViewItem* CreateItem(const int itemIndex, int itemWidth);
+       virtual bool DeleteItem(const int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem);
+       virtual void UpdateItem(int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem);
+       virtual int GetDefaultItemHeight(void);
 
-    virtual void OnTableViewItemStateChanged(Tizen::Ui::Controls::TableView& tableView,
-                                             int itemIndex,
-                                             Tizen::Ui::Controls::TableViewItem* pItem,
-                                             Tizen::Ui::Controls::TableViewItemStatus status);
-    virtual void OnTableViewContextItemActivationStateChanged(Tizen::Ui::Controls::TableView& tableView,
-                                                              int itemIndex,
-                                                              Tizen::Ui::Controls::TableViewContextItem* pContextItem,
-                                                              bool activated);
-    virtual void OnTableViewItemReordered(Tizen::Ui::Controls::TableView& tableView,
-                                          int itemIndexFrom,
-                                          int itemIndexTo);
-    virtual void OnFastScrollIndexSelected(Tizen::Ui::Control& source, Tizen::Base::String& index);
-    virtual void OnFormBackRequested(Tizen::Ui::Controls::Form& source);
+       virtual void OnTableViewItemStateChanged(Tizen::Ui::Controls::TableView& tableView,
+                                                       int itemIndex,
+                                                       Tizen::Ui::Controls::TableViewItem* pItem,
+                                                       Tizen::Ui::Controls::TableViewItemStatus status);
+       virtual void OnTableViewContextItemActivationStateChanged(Tizen::Ui::Controls::TableView& tableView,
+                                                                       int itemIndex,
+                                                                       Tizen::Ui::Controls::TableViewContextItem* pContextItem,
+                                                                       bool activated);
+       virtual void OnTableViewItemReordered(Tizen::Ui::Controls::TableView& tableView,
+                                               int itemIndexFrom,
+                                               int itemIndexTo);
+       virtual void OnFastScrollIndexSelected(Tizen::Ui::Control& source, Tizen::Base::String& index);
+       virtual void OnFormBackRequested(Tizen::Ui::Controls::Form& source);
 
-    virtual void OnUpdateContentList(void);
+       virtual void OnUpdateContentList(void);
+
+       virtual void OnThumbnailInfoReveivedN(ThumbnailInfo* pThumbnailInfo);
+       virtual void OnUserEventReceivedN(RequestId requestId, Tizen::Base::Collection::IList* pArgs);
 
 private:
        Tizen::Base::Collection::ArrayList* GetContentListN(int itemIndex);
@@ -89,8 +97,8 @@ protected:
        Tizen::Ui::Controls::TableView* __pContentTableView;
        Tizen::Ui::Controls::Label* __pNoContentImageLabel;
        Tizen::Ui::Controls::Label* __pNoContentTextLabel;
+       Tizen::Graphics::Bitmap* __pThumbnail;
        GenreListPresentationModel* __pPresentationModel;
 };
 
-
-#endif // _MP_GENRE_LIST_PANEL_H_
+#endif // _MP_GENRE_LIST_PANEL_H_
\ No newline at end of file
index 0b9e047..989a630 100755 (executable)
@@ -1,4 +1,4 @@
-//
+//
 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
 //
 // Licensed under the Flora License, Version 1.0 (the License);
 // limitations under the License.
 //
 
+/**
+ * @file               MpGenreListPresentationModel.h
+ * @brief              This is the header file for AlbumContentPickerPanel class.
+ */
+
 #ifndef _MP_GENRES_LIST_PRESENTATION_MODEL_H_
 #define _MP_GENRES_LIST_PRESENTATION_MODEL_H_
 
-#include "MpTypes.h"
 #include "MpCommonUtil.h"
 #include "MpContentInformationStruct.h"
+#include "MpTypes.h"
 
 class GenreListPresentationModel
 {
 public:
-    static GenreListPresentationModel* GetInstance(void);
-
-    int GetTotalContentCount(int index);
-    int GetTotalGenreCount(void);
-    int GetSongContentCount(void);
-
-    void RefreshContent(void);
-    void SearchSong(int index);
-
-    ContentInformationStruct* GetContentInfoN(int index);
-    ContentInformationStruct* GetSongContentInfoN(int index);
-
-    Tizen::Base::String* GetContentName(int index);
-    Tizen::Base::Collection::ArrayList* SearchContentItemN(int index);
+       static GenreListPresentationModel* GetInstance(void);
+
+       int GetContentCount(int genreIndex);
+       int GetAllGenreCount(void);
+       ContentInformation* GetGenreInfoN(int genreIndex);
+       void InitializeContentList(int genreIndex);
+       ContentInformation* GetContentInfoN(int contentIndex);
+       Tizen::Base::String* GetGenreName(int genreIndex);
+       Tizen::Base::Collection::ArrayList* GetContentPathListN(int genreIndex);
+       void RefreshContentList(int genreIndex);
+       int GetCurrentGenreIndex(void);
+       void AddContent(Tizen::Base::String path, int playlistIndex);
+       result UpdateGnereList(void);
 
 private:
-    GenreListPresentationModel(void);
-    GenreListPresentationModel(const GenreListPresentationModel& genreListPresentationModel);
-    const GenreListPresentationModel& operator = (const GenreListPresentationModel& genreListPresentationModel);
-    ~GenreListPresentationModel(void);
+       GenreListPresentationModel(void);
+       GenreListPresentationModel(const GenreListPresentationModel& genreListPresentationModel);
+       const GenreListPresentationModel& operator = (const GenreListPresentationModel& genreListPresentationModel);
+       ~GenreListPresentationModel(void);
+       result Construct(void);
 
-    result Construct(void);
-
-    Tizen::Base::Collection::IList* __pGnereList;
-    Tizen::Base::Collection::IList* __pSongList;
-    static GenreListPresentationModel* pGenreListPresentationModelInstance;
+private:
+       Tizen::Base::Collection::IList* __pGnereList;
+       Tizen::Base::Collection::IList* __pContentList;
+       static GenreListPresentationModel* pGenreListPresentationModelInstance;
+       int __currentGenreIndex;
 };
 
-#endif // _MP_GENRES_LIST_PRESENTATION_MODEL_H_
+#endif // _MP_GENRES_LIST_PRESENTATION_MODEL_H_
\ No newline at end of file
index 6babb14..558583c 100755 (executable)
@@ -1,4 +1,4 @@
-//
+//
 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
 //
 // Licensed under the Flora License, Version 1.0 (the License);
 // limitations under the License.
 //
 
+/**
+ * @file               MpGenrePickerPanel.h
+ * @brief              This is the header file for GenrePickerPanel class.
+ */
+
 #ifndef _MP_GENRE_PICKER_PANEL_H_
 #define _MP_GENRE_PICKER_PANEL_H_
 
 class NowPlayContentPanel;
 
 class GenrePickerPanel
-: public GenreListPanel
+       : public GenreListPanel
 {
 public:
        GenrePickerPanel(void);
        ~GenrePickerPanel(void);
 
        void OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previousSceneId,
-                           const Tizen::Ui::Scenes::SceneId& currentSceneId,
-                           Tizen::Base::Collection::IList* pArgs);
+                               const Tizen::Ui::Scenes::SceneId& currentSceneId,
+                               Tizen::Base::Collection::IList* pArgs);
        void OnSceneDeactivated(const Tizen::Ui::Scenes::SceneId& currentSceneId,
                                                        const Tizen::Ui::Scenes::SceneId& nextSceneId);
        void OnTableViewItemStateChanged(Tizen::Ui::Controls::TableView& tableView,
-                                     int itemIndex,
-                                     Tizen::Ui::Controls::TableViewItem* pItem,
-                                     Tizen::Ui::Controls::TableViewItemStatus status);
+                                               int itemIndex,
+                                               Tizen::Ui::Controls::TableViewItem* pItem,
+                                               Tizen::Ui::Controls::TableViewItemStatus status);
 };
 
-#endif //_MP_GENRE_PICKER_PANEL_H_
+#endif // _MP_GENRE_PICKER_PANEL_H_
\ No newline at end of file
old mode 100644 (file)
new mode 100755 (executable)
index aab3089..2e36a13
@@ -1,4 +1,4 @@
-//
+//
 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
 //
 // Licensed under the Flora License, Version 1.0 (the License);
 // limitations under the License.
 //
 
-#ifndef _MP_I_MUSIC_PLAYER_EVENT_LISTENER_H_
-#define _MP_I_MUSIC_PLAYER_EVENT_LISTENER_H_
+/**
+ * @file               MpIMusicPlayerEventListener.h
+ * @brief              This is the header file for IMusicPlayerEventListener class.
+ */
+
+#ifndef _MP_IMUSIC_PLAYER_EVENT_LISTENER_H_
+#define _MP_IMUSIC_PLAYER_EVENT_LISTENER_H_
 
 #include <FBase.h>
 #include <FGraphics.h>
@@ -28,10 +33,10 @@ public:
 
        virtual void OnPlayStateChanged(Tizen::Media::PlayerState playerState) = 0;
        virtual void OnPlayContentChanged(int currentContentIndex) = 0;
-       virtual void OnPlayContentRemoved(int removedContentIndex){};
+       virtual void OnPlayContentRemoved(int removedContentIndex){}
        virtual void OnPlayTimeChanged(const Tizen::Base::String& currentDuration, int currentPosition) = 0;
        virtual void OnPlayVolumeBarStateChanged(void) = 0;
        virtual void OnPlayPresentationModelDestroying(void) = 0;
 };
 
-#endif // _MP_I_MUSIC_PLAYER_EVENT_LISTENER_H_
+#endif // _MP_IMUSIC_PLAYER_EVENT_LISTENER_H_
\ No newline at end of file
old mode 100644 (file)
new mode 100755 (executable)
index 8a06405..01e58db
@@ -1,4 +1,4 @@
-//
+//
 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
 //
 // Licensed under the Flora License, Version 1.0 (the License);
 // limitations under the License.
 //
 
-#ifndef _MP_I_MUSIC_SETTING_EVENT_LISTENER_H_
-#define _MP_I_MUSIC_SETTING_EVENT_LISTENER_H_
+/**
+ * @file               MpIMusicSettingEventListener.h
+ * @brief              This is the header file for IMusicSettingEventListener class.
+ */
+
+#ifndef _MP_IMUSIC_SETTING_EVENT_LISTENER_H_
+#define _MP_IMUSIC_SETTING_EVENT_LISTENER_H_
 
 #include <FBase.h>
 
@@ -27,4 +32,4 @@ public:
        virtual void OnAutoOffTimeChanged(int autoOffTime) = 0;
 };
 
-#endif // _MP_I_MUSIC_SETTING_EVENT_LISTENER_H_
+#endif // _MP_IMUSIC_SETTING_EVENT_LISTENER_H_
\ No newline at end of file
diff --git a/inc/MpIThumbnailProviderHandler.h b/inc/MpIThumbnailProviderHandler.h
new file mode 100755 (executable)
index 0000000..f9ba6ea
--- /dev/null
@@ -0,0 +1,40 @@
+//\r
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.\r
+//\r
+// Licensed under the Flora License, Version 1.0 (the License);\r
+// you may not use this file except in compliance with the License.\r
+// You may obtain a copy of the License at\r
+//\r
+//     http://floralicense.org/license/\r
+//\r
+// Unless required by applicable law or agreed to in writing, software\r
+// distributed under the License is distributed on an AS IS BASIS,\r
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+// See the License for the specific language governing permissions and\r
+// limitations under the License.\r
+//\r
+\r
+/**\r
+ * @file               MpIThumbnailProviderHandler.h\r
+ * @brief              This is the header file for IThumbnailProviderHandler class.\r
+ */\r
+\r
+#ifndef _MP_ITHUMBNAIL_PROVIDER_HANDLER_H_\r
+#define _MP_ITHUMBNAIL_PROVIDER_HANDLER_H_\r
+\r
+#include <FContent.h>\r
+#include <FGraphics.h>\r
+\r
+class ThumbnailEvent;\r
+\r
+class IThumbnailProviderHandler\r
+{\r
+public:\r
+       virtual ~IThumbnailProviderHandler(void){}\r
+\r
+       virtual void RequestThumbnail(const Tizen::Content::ContentId& contentId, const ThumbnailEvent* event, void* pParam = null) = 0;\r
+       virtual void CancelAllThumbnailRequest(const ThumbnailEvent* event) = 0;\r
+       virtual const Tizen::Graphics::Bitmap* GetDefaultThumbnail(void) const = 0;\r
+};\r
+\r
+#endif // _MP_ITHUMBNAIL_PROVIDER_HANDLER_H_
\ No newline at end of file
old mode 100644 (file)
new mode 100755 (executable)
index c8dc9aa..eaf49bd
@@ -1,4 +1,4 @@
-//
+//
 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
 //
 // Licensed under the Flora License, Version 1.0 (the License);
 // limitations under the License.
 //
 
+/**
+ * @file               MpMainFrame.h
+ * @brief              This is the header file for MainFrame class.
+ */
+
 #ifndef _MP_MAIN_FRAME_H_
 #define _MP_MAIN_FRAME_H_
 
@@ -28,10 +33,10 @@ public:
        MainFrame(void);
        virtual ~MainFrame(void);
 
-public:
+       result GoToInitialScene(const Tizen::Ui::Scenes::SceneId& sceneId, Tizen::Base::Collection::IList* pArgs);
+
        virtual result OnInitializing(void);
        virtual result OnTerminating(void);
-       result GoToInitialScene(const Tizen::Ui::Scenes::SceneId& sceneId, Tizen::Base::Collection::IList* pArgs);
 };
 
-#endif // _MP_MAIN_FRAME_H_
+#endif // _MP_MAIN_FRAME_H_
\ No newline at end of file
old mode 100644 (file)
new mode 100755 (executable)
index f64f626..faf822f
@@ -1,4 +1,4 @@
-//
+//
 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
 //
 // Licensed under the Flora License, Version 1.0 (the License);
 // limitations under the License.
 //
 
+/**
+ * @file               MpMusicPlayerApp.h
+ * @brief              This is the header file for MusicPlayerApp class.
+ */
+
 #ifndef _MP_MUSIC_PLAYER_APP_H_
 #define _MP_MUSIC_PLAYER_APP_H_
 
@@ -38,7 +43,6 @@ public:
        MusicPlayerApp(void);
        virtual~MusicPlayerApp(void);
 
-public:
        bool OnAppInitializing(Tizen::App::AppRegistry& appRegistry);
        bool OnAppInitialized(void); 
        bool OnAppWillTerminate(void); 
@@ -50,12 +54,12 @@ public:
        void OnScreenOn(void);
        void OnScreenOff(void);
 
+       Tizen::Base::String GetOperationId(void);
+
        virtual void OnAppControlRequestReceived(RequestId reqId, const Tizen::Base::String& operationId, const Tizen::Base::String* pUriData, const Tizen::Base::String* pMimeType, const Tizen::Base::Collection::IMap* pExtraData);
 
        virtual void OnSettingChanged(Tizen::Base::String& key);
 
-       Tizen::Base::String GetOperationId(void);
-
 private:
        void ParsingArgument(const Tizen::Base::String* pUriData, const Tizen::Base::Collection::IMap* pArgs);
 
@@ -67,4 +71,4 @@ private:
        MainFrame* __pMainFrame;
 };
 
-#endif // _MP_MUSIC_PLAYER_APP_H_
+#endif // _MP_MUSIC_PLAYER_APP_H_
\ No newline at end of file
index 677b22d..3cb4e90 100755 (executable)
@@ -1,4 +1,4 @@
-//
+//
 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
 //
 // Licensed under the Flora License, Version 1.0 (the License);
 // limitations under the License.
 //
 
+/**
+ * @file               MpMusicPlayerForm.h
+ * @brief              This is the header file for MusicPlayerForm class.
+ */
+
 #ifndef _MP_MUSIC_PLAYER_FORM_H_
 #define _MP_MUSIC_PLAYER_FORM_H_
 
 #include <new>
 #include <FApp.h>
+#include <FSystem.h>
 #include <FUi.h>
-#include "FSystem.h"
+#include "MpBaseForm.h"
 #include "MpIMusicPlayerEventListener.h"
 #include "MpIMusicSettingEventListener.h"
 #include "MpTypes.h"
-#include "MpBaseForm.h"
 
+class PlayListPickerPopup;
 class PlayerPresentationModel;
+class SetAsPopup;
 class SettingPresentationModel;
-class PlayListPickerPopup;
 class SharePopup;
-class SetAsPopup;
 class SoundPathPopup;
 
 class PlayerForm
@@ -58,26 +63,26 @@ public:
        virtual result OnTerminating(void);
 
        virtual int GetItemCount(void);
-    virtual Tizen::Ui::Controls::TableViewItem* CreateItem(const int itemIndex, int itemWidth);
-    virtual bool DeleteItem(const int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem);
-    virtual void UpdateItem(int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem);
-    virtual int GetDefaultItemHeight(void);
-
-    virtual void OnTableViewItemStateChanged(Tizen::Ui::Controls::TableView& tableView,
-                                             int itemIndex,
-                                             Tizen::Ui::Controls::TableViewItem* pItem,
-                                             Tizen::Ui::Controls::TableViewItemStatus status);
-    virtual void OnTableViewContextItemActivationStateChanged(Tizen::Ui::Controls::TableView& tableView,
-                                                              int itemIndex,
-                                                              Tizen::Ui::Controls::TableViewContextItem* pContextItem,
-                                                              bool activated);
-    virtual void OnTableViewItemReordered(Tizen::Ui::Controls::TableView& tableView,
-                                          int itemIndexFrom,
-                                          int itemIndexTo);
+       virtual Tizen::Ui::Controls::TableViewItem* CreateItem(const int itemIndex, int itemWidth);
+       virtual bool DeleteItem(const int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem);
+       virtual void UpdateItem(int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem);
+       virtual int GetDefaultItemHeight(void);
+
+       virtual void OnTableViewItemStateChanged(Tizen::Ui::Controls::TableView& tableView,
+                                                       int itemIndex,
+                                                       Tizen::Ui::Controls::TableViewItem* pItem,
+                                                       Tizen::Ui::Controls::TableViewItemStatus status);
+       virtual void OnTableViewContextItemActivationStateChanged(Tizen::Ui::Controls::TableView& tableView,
+                                                                       int itemIndex,
+                                                                       Tizen::Ui::Controls::TableViewContextItem* pContextItem,
+                                                                       bool activated);
+       virtual void OnTableViewItemReordered(Tizen::Ui::Controls::TableView& tableView,
+                                               int itemIndexFrom,
+                                               int itemIndexTo);
 
        virtual void OnFormBackRequested(Tizen::Ui::Controls::Form& source);
        virtual void OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previousSceneId,
-                                                                  const Tizen::Ui::Scenes::SceneId& currentSceneId, Tizen::Base::Collection::IList* pArgs);
+                                                                       const Tizen::Ui::Scenes::SceneId& currentSceneId, Tizen::Base::Collection::IList* pArgs);
        virtual void OnSceneDeactivated(const Tizen::Ui::Scenes::SceneId& currentSceneId,
                                                                        const Tizen::Ui::Scenes::SceneId& nextSceneId);
 
@@ -88,9 +93,9 @@ public:
        virtual void OnKeyReleased(const Tizen::Ui::Control& source, Tizen::Ui::KeyCode keyCode);
        virtual void OnKeyLongPressed(const Tizen::Ui::Control& source, Tizen::Ui::KeyCode keyCode);
 
-       virtual void OnTouchDoublePressed(const Tizen::Ui::Control& source, const Tizen::Graphics::Point& currentPosition, const Tizen::Ui::TouchEventInfo& touchInfo){};
-       virtual void OnTouchFocusIn(const Tizen::Ui::Control& source, const Tizen::Graphics::Point& currentPosition, const Tizen::Ui::TouchEventInfo& touchInfo){};
-       virtual void OnTouchFocusOut(const Tizen::Ui::Control& source, const Tizen::Graphics::Point& currentPosition, const Tizen::Ui::TouchEventInfo& touchInfo){};
+       virtual void OnTouchDoublePressed(const Tizen::Ui::Control& source, const Tizen::Graphics::Point& currentPosition, const Tizen::Ui::TouchEventInfo& touchInfo){}
+       virtual void OnTouchFocusIn(const Tizen::Ui::Control& source, const Tizen::Graphics::Point& currentPosition, const Tizen::Ui::TouchEventInfo& touchInfo){}
+       virtual void OnTouchFocusOut(const Tizen::Ui::Control& source, const Tizen::Graphics::Point& currentPosition, const Tizen::Ui::TouchEventInfo& touchInfo){}
        virtual void OnTouchLongPressed(const Tizen::Ui::Control& source, const Tizen::Graphics::Point& currentPosition, const Tizen::Ui::TouchEventInfo& touchInfo);
        virtual void OnTouchMoved(const Tizen::Ui::Control& source, const Tizen::Graphics::Point& currentPosition, const Tizen::Ui::TouchEventInfo& touchInfo);
        virtual void OnTouchPressed(const Tizen::Ui::Control& source, const Tizen::Graphics::Point& currentPosition, const Tizen::Ui::TouchEventInfo& touchInfo);
@@ -98,7 +103,6 @@ public:
 
        virtual void OnSliderBarMoved(Tizen::Ui::Controls::Slider& source, int value);
 
-
        virtual void OnAnimationTransactionStarted(int transactionId);
        virtual void OnAnimationTransactionStopped(int transactionId);
        virtual void OnAnimationTransactionFinished(int transactionId);
@@ -114,13 +118,15 @@ public:
        virtual void OnTimerExpired(Tizen::Base::Runtime::Timer& timer);
 
        virtual void OnChangedContentList(Tizen::Base::Collection::IList* pArgs);
+       virtual void OnUserEventReceivedN(RequestId requestId, Tizen::Base::Collection::IList* pArgs);
+
 private:
        void SetControlButtonImage(void);
        void SetPlayPauseButtonImage(Tizen::Media::PlayerState playerState);
        void SetRepeatButtonImage(int repeatValue);
        void SetShuffleButtonImage(bool shuffleEnable);
        void SetAddToPlaylistButtonImage(bool buttonEnable);
-       result ShowMessageBox(void);
+       result ShowMessageBox(const Tizen::Base::String& showText);
        void SetContentInfo(int currentContentIndex);
        void UpdateAnimationAlbumArt(AlbumArtImage position);
        result InitializeVolumeBar(void);
@@ -171,10 +177,10 @@ private:
        Tizen::Ui::FlickDirection flickDirection;
        int __transactionID;
        bool __isAnimationPerformed;
-       Tizen::Base::Runtime::Timer*    __pAnimationFinishedTimer;
-       Tizen::Base::Runtime::Timer*    __pContentPlayTimer;
+       Tizen::Base::Runtime::Timer* __pAnimationFinishedTimer;
+       Tizen::Base::Runtime::Timer* __pContentPlayTimer;
        Tizen::Ui::Scenes::SceneId __pPreviousSceneId;
        Tizen::Base::String* __pPath;
 };
 
-#endif //_MP_MUSIC_PLAYER_FORM_H_
+#endif // _MP_MUSIC_PLAYER_FORM_H_
\ No newline at end of file
index 3ae1126..677068b 100755 (executable)
@@ -1,4 +1,4 @@
-//
+//
 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
 //
 // Licensed under the Flora License, Version 1.0 (the License);
 // limitations under the License.
 //
 
+/**
+ * @file               MpMusicPlayerPresentationModel.h
+ * @brief              This is the header file for MusicPlayerPresentationModel class.
+ */
+
 #ifndef _MP_MUSIC_PLAYER_PRESENTATION_MODEL_H_
 #define _MP_MUSIC_PLAYER_PRESENTATION_MODEL_H_
 
 #include <FMedia.h>
-#include <FTelephony.h>
+/*#include <FTelephony.h>*/
 #include "MpContentInformationStruct.h"
 
 class IMusicPlayerEventListener;
@@ -26,29 +31,13 @@ class IMusicPlayerEventListener;
 class PlayerPresentationModel
        : public Tizen::Base::Runtime::ITimerEventListener
        , public Tizen::Media::IPlayerEventListener
-       , public Tizen::Media::IAudioSessionEventListener
-       , public Tizen::Telephony::ITelephonyCallEventListener
+       /*, public Tizen::Media::IAudioSessionEventListener
+       , public Tizen::Telephony::ITelephonyCallEventListener*/
 {
 public:
        static PlayerPresentationModel* GetInstance(void);
        void DestroyPlayerPresentationModel(void);
 
-       virtual void OnTelephonyCallStatusChangedN(Tizen::Telephony::CallStatus callStatus, Tizen::Telephony::CallInfo* pCallInfo);
-
-       virtual void OnPlayerOpened(result r);
-       virtual void OnPlayerReleased(void);
-       virtual void OnPlayerEndOfClip(void);
-       virtual void OnPlayerBuffering(int percent);
-       virtual void OnPlayerErrorOccurred(Tizen::Media::PlayerErrorReason r );
-       virtual void OnPlayerInterrupted(void);
-       virtual void OnPlayerSeekCompleted(result r);
-       virtual void OnPlayerAudioFocusChanged(void);
-       virtual void OnTimerExpired(Tizen::Base::Runtime::Timer& timer);
-
-       virtual void OnAudioSessionInterrupted(void);
-       virtual void OnAudioSessionInterruptReleased(void);
-//     virtual void OnAudioSessionAudioFocusChanged(void);
-
        result SetContentList(Tizen::Base::Collection::IList* pArgs);
        Tizen::Base::String* GetPlayContentPath(void);
        Tizen::Base::String* GetPlayContentTitle(void);
@@ -70,7 +59,7 @@ public:
        void StopForwardRewind(void);
        void SetPlayPosition(int playPosition);
        int GetPlayPosition(void);
-       ContentInformationStruct* GetContentInfoN(int contentIndex);
+       ContentInformation* GetContentInfoN(int contentIndex);
        Tizen::Graphics::Bitmap* GetContentAlbumArtN(int contentIndex);
 
        void AddMusicPlayerEventListener(const IMusicPlayerEventListener& listener);
@@ -89,6 +78,21 @@ public:
        result StartAutoOffTimer(int autoOffValue);
        void RemoveContent(const Tizen::Base::String& filePath);
 
+       /*virtual void OnTelephonyCallStatusChangedN(Tizen::Telephony::CallStatus callStatus, Tizen::Telephony::CallInfo* pCallInfo);*/
+
+       virtual void OnPlayerOpened(result r);
+       virtual void OnPlayerReleased(void);
+       virtual void OnPlayerEndOfClip(void);
+       virtual void OnPlayerBuffering(int percent);
+       virtual void OnPlayerErrorOccurred(Tizen::Media::PlayerErrorReason r);
+       virtual void OnPlayerInterrupted(void);
+       virtual void OnPlayerSeekCompleted(result r);
+       virtual void OnPlayerAudioFocusChanged(void);
+       virtual void OnTimerExpired(Tizen::Base::Runtime::Timer& timer);
+
+       /*virtual void OnAudioSessionInterrupted(void);
+       virtual void OnAudioSessionInterruptReleased(void);
+       virtual void OnAudioSessionAudioFocusChanged(void);*/
 
 private:
        PlayerPresentationModel(void);
@@ -116,12 +120,12 @@ private:
 
 private:
        Tizen::Media::Player* __pPlayer;
-       Tizen::Base::Runtime::Timer*    __pPlayStateTimer;
-       Tizen::Base::Runtime::Timer*    __pFastForwardTimer;
-       Tizen::Base::Runtime::Timer*    __pFastRewindTimer;
-       Tizen::Base::Runtime::Timer*    __pAutoOffTimer;
-       Tizen::Base::Runtime::Timer*    __pPauseAutoOffTimer;
-       Tizen::Base::Runtime::Timer*    __pVolumeBarStateTimer;
+       Tizen::Base::Runtime::Timer* __pPlayStateTimer;
+       Tizen::Base::Runtime::Timer* __pFastForwardTimer;
+       Tizen::Base::Runtime::Timer* __pFastRewindTimer;
+       Tizen::Base::Runtime::Timer* __pAutoOffTimer;
+       Tizen::Base::Runtime::Timer* __pPauseAutoOffTimer;
+       Tizen::Base::Runtime::Timer* __pVolumeBarStateTimer;
 
        Tizen::Base::Collection::ArrayList* __pPlayContentList;
        Tizen::Base::Collection::LinkedListT <IMusicPlayerEventListener*> __musicPlayerEventListener;
@@ -144,9 +148,9 @@ private:
 
        Tizen::Media::PlayerState __previousPlayerState;
        int __xTimesValue;
-       Tizen::Telephony::CallManager* __pCallManager;
-       /*bool __audioFocusChanged;*/
+       /*Tizen::Telephony::CallManager* __pCallManager;
+       bool __audioFocusChanged;*/
        static PlayerPresentationModel* pPlayerPresentationModel;
 };
 
-#endif // _MP_MUSIC_PLAYER_PRESENTATION_MODEL_H_
+#endif // _MP_MUSIC_PLAYER_PRESENTATION_MODEL_H_
\ No newline at end of file
old mode 100644 (file)
new mode 100755 (executable)
index cd26b93..47d593d
@@ -1,4 +1,4 @@
-//
+//
 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
 //
 // Licensed under the Flora License, Version 1.0 (the License);
 // limitations under the License.
 //
 
+/**
+ * @file               MpNowPlayContentPanel.h
+ * @brief              This is the header file for NowPlayContentPanel class.
+ */
+
 #ifndef _MP_NOW_PLAY_CONTENT_PANEL_H_
 #define _MP_NOW_PLAY_CONTENT_PANEL_H_
 
 #include <FGraphics.h>
 #include <FSocial.h>
 #include <FUi.h>
-
 #include "MpCommonUtil.h"
-#include "MpMusicPlayerPresentationModel.h"
 #include "MpIMusicPlayerEventListener.h"
+#include "MpMusicPlayerPresentationModel.h"
 
 class NowPlayContentPanel
-    : public Tizen::Ui::Controls::Panel
-    , public Tizen::Ui::ITouchEventListener
-    , public IMusicPlayerEventListener
+       : public Tizen::Ui::Controls::Panel
+       , public Tizen::Ui::ITouchEventListener
+       , public IMusicPlayerEventListener
 {
 public:
-    NowPlayContentPanel(void);
-    virtual ~NowPlayContentPanel(void);
-    result Initialize(void);
-    bool GetPlayStatus(void);
+       NowPlayContentPanel(void);
+       virtual ~NowPlayContentPanel(void);
+       result Initialize(void);
+       bool GetPlayStatus(void);
 
        virtual void OnPlayStateChanged(Tizen::Media::PlayerState playerState);
        virtual void OnPlayContentChanged(int currentContentIndex);
@@ -53,12 +57,12 @@ public:
        virtual void OnTouchCanceled(const Tizen::Ui::Control& source, const Tizen::Graphics::Point& currentPosition, const Tizen::Ui::TouchEventInfo& touchInfo);
 
 private:
-    Tizen::Ui::Controls::Label*  __pThumbnailLabel;
-    Tizen::Ui::Controls::Label*  __pPlayStatusLabel;
-    Tizen::Ui::Controls::Label*  __pTitleLabel;
-    Tizen::Ui::Controls::Label*  __pTouchLabel;
-    Tizen::Ui::Controls::Slider* __pPlayStateSlider;
-    PlayerPresentationModel* __pPresentationModel;
+       Tizen::Ui::Controls::Label* __pThumbnailLabel;
+       Tizen::Ui::Controls::Label* __pPlayStatusLabel;
+       Tizen::Ui::Controls::Label* __pTitleLabel;
+       Tizen::Ui::Controls::Label* __pTouchLabel;
+       Tizen::Ui::Controls::Slider* __pPlayStateSlider;
+       PlayerPresentationModel* __pPresentationModel;
 };
 
-#endif // _MP_NOW_PLAY_CONTENT_PANEL_H_
+#endif // _MP_NOW_PLAY_CONTENT_PANEL_H_
\ No newline at end of file
index b8d59df..26d2e9b 100755 (executable)
@@ -1,4 +1,4 @@
-//
+//
 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
 //
 // Licensed under the Flora License, Version 1.0 (the License);
 // limitations under the License.
 //
 
+/**
+ * @file               MpPanelFactory.h
+ * @brief              This is the header file for PanelFactory class.
+ */
+
 #ifndef _MP_PANEL_FACTORY_H_
 #define _MP_PANEL_FACTORY_H_
 
@@ -56,10 +61,10 @@ class PanelFactory
        : public Tizen::Ui::Scenes::IPanelFactory
 {
 public:
-    PanelFactory();
-       virtual ~PanelFactory();
+       PanelFactory(void);
+       virtual ~PanelFactory(void);
 
        virtual Tizen::Ui::Controls::Panel* CreatePanelN(const Tizen::Base::String& panelId, const Tizen::Ui::Scenes::SceneId& sceneId);
 };
 
-#endif // _MP_PANEL_FACTORY_H_
+#endif // _MP_PANEL_FACTORY_H_
\ No newline at end of file
diff --git a/inc/MpPlaylistContentListForm.h b/inc/MpPlaylistContentListForm.h
new file mode 100755 (executable)
index 0000000..2c28128
--- /dev/null
@@ -0,0 +1,77 @@
+//
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.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://floralicense.org/license/
+//
+// 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.
+//
+
+/**
+ * @file               MpPlaylistContentListForm.h
+ * @brief              This is the header file for PlaylistContentListForm class.
+ */
+
+#ifndef _MP_PLAYLIST_CONTENT_LIST_FORM_H_
+#define _MP_PLAYLIST_CONTENT_LIST_FORM_H_
+
+#include "MpContentListForm.h"
+#include "MpThumbnailBase.h"
+
+class NowPlayContentPanel;
+class PlaylistListPresentationModel;
+
+class PlaylistContentListForm
+       : public ContentListForm
+       , public ThumbnailBase
+       , public Tizen::App::IAppControlResponseListener
+{
+public:
+       PlaylistContentListForm(void);
+       ~PlaylistContentListForm(void);
+
+       virtual result OnInitializing(void);
+       virtual result OnTerminating(void);
+       virtual void OnActionPerformed(const Tizen::Ui::Control& source, int actionId);
+
+       virtual void OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previousSceneId,
+                                                                       const Tizen::Ui::Scenes::SceneId& currentSceneId,
+                                                                       Tizen::Base::Collection::IList* pArgs);
+
+       virtual void OnSceneDeactivated(const Tizen::Ui::Scenes::SceneId& currentSceneId,
+                                                                       const Tizen::Ui::Scenes::SceneId& nextSceneId);
+
+       virtual int GetItemCount(void);
+       virtual void UpdateItem(int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem);
+       virtual Tizen::Ui::Controls::TableViewItem* CreateItem(const int itemIndex, int itemWidth);
+       virtual void OnTableViewItemStateChanged(Tizen::Ui::Controls::TableView& tableView,
+                                                       int itemIndex,
+                                                       Tizen::Ui::Controls::TableViewItem* pItem,
+                                                       Tizen::Ui::Controls::TableViewItemStatus status);
+
+       virtual void OnAppControlCompleteResponseReceived(const Tizen::App::AppId& appId,
+                               const Tizen::Base::String& operationId, Tizen::App::AppCtrlResult appControlResult,
+                               const Tizen::Base::Collection::IMap* pExtraData);
+
+       virtual void OnThumbnailInfoReveivedN(ThumbnailInfo* pThumbnailInfo);
+
+private:
+       result CreateTableViewItem(Tizen::Ui::Container& parent, const ContentInformation& contentInfo);
+       void ToggleViewMode(bool editMode);
+       Tizen::Base::Collection::ArrayList* GetSearchResultContentList(int itemIndex);
+       Tizen::Base::Collection::ArrayList* GetAudioContentInfoContentList(int itemIndex);
+
+private:
+       Tizen::Graphics::Bitmap* __pThumbnail;
+       int __ContentType;
+       PlaylistListPresentationModel* __pPresentationModel;
+};
+
+#endif // _MP_PLAYLIST_CONTENT_LIST_FORM_H_
\ No newline at end of file
old mode 100644 (file)
new mode 100755 (executable)
index 620d1ab..44b9fe8
@@ -1,4 +1,4 @@
-//
+//
 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
 //
 // Licensed under the Flora License, Version 1.0 (the License);
 // limitations under the License.
 //
 
+/**
+ * @file               MpPlaylistCreatorForm.h
+ * @brief              This is the header file for PlaylistCreatorForm class.
+ */
+
 #ifndef _MP_PLAYLIST_CREATOR_FORM_H_
 #define _MP_PLAYLIST_CREATOR_FORM_H_
 
 #include <new>
+#include <FBase.h>
 #include <FGraphics.h>
 #include <FUi.h>
 #include <FUiControl.h>
-#include <FBase.h>
 #include <FUiCtrlButtonItem.h>
 
 class PlaylistEditorPresentationModel;
-// test code start
-// test code end
+
 class PlaylistCreatorForm
        : public Tizen::Ui::Controls::Form
        , public Tizen::Ui::IKeypadEventListener
@@ -42,14 +46,14 @@ public:
        virtual result OnTerminating(void);
 
        virtual void OnKeypadActionPerformed(Tizen::Ui::Control &source,
-                                                                                Tizen::Ui::KeypadAction keypadAction);
+                                                                               Tizen::Ui::KeypadAction keypadAction);
        virtual void OnKeypadClosed(Tizen::Ui::Control& source);
        virtual void OnKeypadOpened(Tizen::Ui::Control& source);
        virtual void OnKeypadWillOpen(Tizen::Ui::Control& source);
 
        virtual void OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previousSceneId,
-                                                                  const Tizen::Ui::Scenes::SceneId& currentSceneId,
-                                                                  Tizen::Base::Collection::IList* pArgs);
+                                                                       const Tizen::Ui::Scenes::SceneId& currentSceneId,
+                                                                       Tizen::Base::Collection::IList* pArgs);
        virtual void OnSceneDeactivated(const Tizen::Ui::Scenes::SceneId& currentSceneId,
                                                                        const Tizen::Ui::Scenes::SceneId& nextSceneId);
 
@@ -65,4 +69,4 @@ private:
        Tizen::Ui::Scenes::SceneId __previousSceneId;
 };
 
-#endif // _MP_PLAYLIST_CREATOR_FORM_H_
+#endif // _MP_PLAYLIST_CREATOR_FORM_H_
\ No newline at end of file
index 2c46970..84f5fca 100755 (executable)
@@ -1,4 +1,4 @@
-//
+//
 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
 //
 // Licensed under the Flora License, Version 1.0 (the License);
 // limitations under the License.
 //
 
+/**
+ * @file               MpPlaylistDB.h
+ * @brief              This is the header file for PlaylistDB class.
+ */
+
 #ifndef _MP_PLAYLIST_DB_H_
 #define _MP_PLAYLIST_DB_H_
 
@@ -26,7 +31,6 @@ public:
        PlaylistDB(void);
        virtual ~PlaylistDB(void);
 
-public:
        result CreatePlaylistDatabase(void);
        result Insert(Tizen::Base::String& contentId, int playCount, Tizen::Base::String& playTime);
        result Update(Tizen::Base::String& contentId, int playCount, Tizen::Base::String& playTime);
@@ -34,8 +38,6 @@ public:
        Tizen::Io::DbEnumerator* SearchN(int index);
        result Read(Tizen::Base::String& contentId);
        Tizen::Base::Collection::ArrayList* ReadValueN(Tizen::Base::String& contentId);
-
-private:
 };
 
-#endif /* _MP_PLAYLIST_DB_H_ */
+#endif // _MP_PLAYLIST_DB_H_
\ No newline at end of file
index 52b3f97..83c01ef 100755 (executable)
@@ -1,4 +1,4 @@
-//
+//
 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
 //
 // Licensed under the Flora License, Version 1.0 (the License);
 // limitations under the License.
 //
 
+/**
+ * @file               MpPlaylistEditorPresentationModel.h
+ * @brief              This is the header file for PlaylistEditorPresentationModel class.
+ */
+
 #ifndef _MP_PLAYLIST_EDITOR_PRESENTATION_MODEL_H_
 #define _MP_PLAYLIST_EDITOR_PRESENTATION_MODEL_H_
 
 #include <FApp.h>
-#include <FSystem.h>
-#include <FIo.h>
 #include <FCntPlayList.h>
 #include <FCntPlayListManager.h>
+#include <FIo.h>
+#include <FSystem.h>
 
 class PlaylistEditorPresentationModel
 {
@@ -31,8 +36,9 @@ public:
        int GetPlayListItemCount(Tizen::Base::String& playlist);
        int GetAllPlayListCount(void);
        Tizen::Base::Collection::IList* GetAllPlayListNameN(void);
-       Tizen::Base::String* GetPlayListName(int playlistIndex);
+       Tizen::Base::String* GetPlayListNameN(int playlistIndex);
        Tizen::Graphics::Bitmap* GetPlayListItemBitmap(Tizen::Base::String& playlist);
+       Tizen::Content::ContentId GetPlayListItemContentId(Tizen::Base::String& playlist);
        result SetPlayListName(const Tizen::Base::String& oldPlayListName, const Tizen::Base::String& newPlayListName);
        void RemovePlayList(Tizen::Base::String& playlistName);
        void AddItem(const Tizen::Content::ContentId& contentId, Tizen::Base::String& name);
@@ -49,4 +55,4 @@ private:
        static PlaylistEditorPresentationModel* pPlaylistEditorPresentationModel;
 };
 
-#endif // _MP_PLAYLIST_EDITOR_PRESENTATION_MODEL_H_
+#endif // _MP_PLAYLIST_EDITOR_PRESENTATION_MODEL_H_
\ No newline at end of file
index df9de40..0ee758f 100755 (executable)
@@ -1,4 +1,4 @@
-//
+//
 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
 //
 // Licensed under the Flora License, Version 1.0 (the License);
 // limitations under the License.
 //
 
+/**
+ * @file               MpPlaylistListEditorPanel.h
+ * @brief              This is the header file for PlaylistListEditorPanell class.
+ */
+
 #ifndef _MP_PLAYLIST_LIST_EDITOR_PANEL_H_
 #define _MP_PLAYLIST_LIST_EDITOR_PANEL_H_
 
 #include <new>
 #include <FApp.h>
 #include <FBase.h>
-#include <FSocial.h>
-#include <FUiScenes.h>
 #include <FContent.h>
+#include <FSocial.h>
 #include <FUi.h>
-
+#include <FUiScenes.h>
+#include "MpBasePanel.h"
 #include "MpCommonUtil.h"
-#include "MpTypes.h"
 #include "MpSceneRegister.h"
-#include "MpBasePanel.h"
+#include "MpThumbnailBase.h"
+#include "MpTypes.h"
 
 class SharePopup;
 class PlayListPickerPopup;
@@ -36,12 +41,13 @@ class PlaylistEditorPresentationModel;
 
 class PlaylistListEditorPanel
        : public BasePanel
+       , public ThumbnailBase
        , public Tizen::Ui::Controls::ITableViewItemProvider
        , public Tizen::Ui::Controls::ITableViewItemEventListener
        , public Tizen::Ui::IKeypadEventListener
        , public Tizen::Ui::IActionEventListener
        , public Tizen::Ui::ITextEventListener
-    , public Tizen::Ui::Scenes::ISceneEventListener
+       , public Tizen::Ui::Scenes::ISceneEventListener
 {
 public:
        PlaylistListEditorPanel(void);
@@ -52,41 +58,43 @@ public:
        virtual result OnTerminating(void);
        virtual void OnActionPerformed(const Tizen::Ui::Control& source, int actionId);
        virtual void OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previousSceneId,
-                                                                  const Tizen::Ui::Scenes::SceneId& currentSceneId,
-                                                                  Tizen::Base::Collection::IList* pArgs);
+                                                                       const Tizen::Ui::Scenes::SceneId& currentSceneId,
+                                                                       Tizen::Base::Collection::IList* pArgs);
        virtual void OnSceneDeactivated(const Tizen::Ui::Scenes::SceneId& currentSceneId,
                                                                        const Tizen::Ui::Scenes::SceneId& nextSceneId);
 
-       virtual void OnKeypadActionPerformed(Tizen::Ui::Control &source,
-                                                                                Tizen::Ui::KeypadAction keypadAction);
+       virtual void OnKeypadActionPerformed(Tizen::Ui::Controlsource,
+                                                                               Tizen::Ui::KeypadAction keypadAction);
        virtual void OnKeypadClosed(Tizen::Ui::Control& source);
        virtual void OnKeypadOpened(Tizen::Ui::Control& source);
        virtual void OnKeypadWillOpen(Tizen::Ui::Control& source);
 
        virtual int GetItemCount(void);
     
-    virtual Tizen::Ui::Controls::TableViewItem* CreateItem(const int itemIndex, int itemWidth);
-    virtual bool DeleteItem(const int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem);
-    virtual void UpdateItem(int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem);
-    virtual int GetDefaultItemHeight(void);
+       virtual Tizen::Ui::Controls::TableViewItem* CreateItem(const int itemIndex, int itemWidth);
+       virtual bool DeleteItem(const int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem);
+       virtual void UpdateItem(int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem);
+       virtual int GetDefaultItemHeight(void);
 
-    virtual void OnTableViewItemStateChanged(Tizen::Ui::Controls::TableView& tableView,
-                                             int itemIndex,
-                                             Tizen::Ui::Controls::TableViewItem* pItem,
-                                             Tizen::Ui::Controls::TableViewItemStatus status);
-    virtual void OnTableViewContextItemActivationStateChanged(Tizen::Ui::Controls::TableView& tableView,
-                                                              int itemIndex,
-                                                              Tizen::Ui::Controls::TableViewContextItem* pContextItem,
-                                                              bool activated);
-    virtual void OnTableViewItemReordered(Tizen::Ui::Controls::TableView& tableView,
-                                          int itemIndexFrom,
-                                          int itemIndexTo);
+       virtual void OnTableViewItemStateChanged(Tizen::Ui::Controls::TableView& tableView,
+                                                       int itemIndex,
+                                                       Tizen::Ui::Controls::TableViewItem* pItem,
+                                                       Tizen::Ui::Controls::TableViewItemStatus status);
+       virtual void OnTableViewContextItemActivationStateChanged(Tizen::Ui::Controls::TableView& tableView,
+                                                                       int itemIndex,
+                                                                       Tizen::Ui::Controls::TableViewContextItem* pContextItem,
+                                                                       bool activated);
+       virtual void OnTableViewItemReordered(Tizen::Ui::Controls::TableView& tableView,
+                                               int itemIndexFrom,
+                                               int itemIndexTo);
 
        virtual void OnTextValueChanged(const Tizen::Ui::Control& source);
        virtual void OnTextValueChangeCanceled(const Tizen::Ui::Control& source);
 
        virtual void OnUpdateContentList(void);
 
+       virtual void OnThumbnailInfoReveivedN(ThumbnailInfo* pThumbnailInfo);
+
 private:
        void ShowFooter(void);
        void HideFooter(void);
@@ -100,6 +108,7 @@ private:
        Tizen::Ui::Controls::TableView* __pContentTableView;
        Tizen::Ui::Controls::CheckButton* __pSelectAllCheckedButton;
        Tizen::Ui::Controls::Label* __pCheckedCountLabel;
+       Tizen::Graphics::Bitmap* __pThumbnail;
        PlayListPickerPopup* __pPlayListPickerPopup;
        SharePopup* __pSharePopup;
        PlaylistEditorPresentationModel* __pPresentationModel;
@@ -108,4 +117,4 @@ private:
        Tizen::Graphics::Color __pItemPressedBackgroundColor;
 };
 
-#endif // _MP_PLAYLIST_LIST_EDITOR_PANEL_H_
+#endif // _MP_PLAYLIST_LIST_EDITOR_PANEL_H_
\ No newline at end of file
index 1801d11..1a71e4c 100755 (executable)
@@ -1,4 +1,4 @@
-//
+//
 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
 //
 // Licensed under the Flora License, Version 1.0 (the License);
 // limitations under the License.
 //
 
+/**
+ * @file               MpPlaylistListPanel.h
+ * @brief              This is the header file for PlaylistListPanel class.
+ */
+
 #ifndef _MP_PLAY_LIST_LIST_PANEL_H_
 #define _MP_PLAY_LIST_LIST_PANEL_H_
 
 #include <FUi.h>
 #include <FUiScenes.h>
 #include "MpBasePanel.h"
+#include "MpThumbnailBase.h"
 
 class PlaylistListPresentationModel;
 class NowPlayContentPanel;
 
 class PlaylistListPanel
        : public BasePanel
+       , public ThumbnailBase
        , public Tizen::Ui::Controls::ITableViewItemProvider
        , public Tizen::Ui::Controls::ITableViewItemEventListener
        , public Tizen::Ui::Controls::IFormBackEventListener
        , public Tizen::Ui::IKeypadEventListener
        , public Tizen::Ui::IActionEventListener
        , public Tizen::Ui::ITextEventListener
-       , public Tizen::Ui::IDragDropEventListener
-    , public Tizen::Ui::ITouchEventListener
-    , public Tizen::Ui::Scenes::ISceneEventListener
+       , public Tizen::Ui::Scenes::ISceneEventListener
 {
 public:
-       PlaylistListPanel();
-       virtual ~PlaylistListPanel();
+       PlaylistListPanel(void);
+       virtual ~PlaylistListPanel(void);
        bool Initialize(void);
 
        virtual result OnInitializing(void);
@@ -49,63 +54,56 @@ public:
        virtual void OnActionPerformed(const Tizen::Ui::Control& source, int actionId);
 
        virtual void OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previousSceneId,
-                                                                  const Tizen::Ui::Scenes::SceneId& currentSceneId, Tizen::Base::Collection::IList* pArgs);
+                                                                       const Tizen::Ui::Scenes::SceneId& currentSceneId, Tizen::Base::Collection::IList* pArgs);
        virtual void OnSceneDeactivated(const Tizen::Ui::Scenes::SceneId& currentSceneId,
                                                                        const Tizen::Ui::Scenes::SceneId& nextSceneId);
 
        virtual int GetItemCount(void);
     
-    virtual Tizen::Ui::Controls::TableViewItem* CreateItem(const int itemIndex, int itemWidth);
-    virtual bool DeleteItem(const int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem);
-    virtual void UpdateItem(int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem);
-    virtual int GetDefaultItemHeight(void);
+       virtual Tizen::Ui::Controls::TableViewItem* CreateItem(const int itemIndex, int itemWidth);
+       virtual bool DeleteItem(const int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem);
+       virtual void UpdateItem(int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem);
+       virtual int GetDefaultItemHeight(void);
 
-       virtual void OnKeypadActionPerformed(Tizen::Ui::Control &source,
-                                                                                Tizen::Ui::KeypadAction keypadAction);
+       virtual void OnKeypadActionPerformed(Tizen::Ui::Controlsource,
+                                                                               Tizen::Ui::KeypadAction keypadAction);
        virtual void OnKeypadClosed(Tizen::Ui::Control& source);
        virtual void OnKeypadOpened(Tizen::Ui::Control& source);
        virtual void OnKeypadWillOpen(Tizen::Ui::Control& source);
 
-    virtual void OnTableViewItemStateChanged(Tizen::Ui::Controls::TableView& tableView,
-                                             int itemIndex,
-                                             Tizen::Ui::Controls::TableViewItem* pItem,
-                                             Tizen::Ui::Controls::TableViewItemStatus status);
-    virtual void OnTableViewContextItemActivationStateChanged(Tizen::Ui::Controls::TableView& tableView,
-                                                              int itemIndex,
-                                                              Tizen::Ui::Controls::TableViewContextItem* pContextItem,
-                                                              bool activated);
-    virtual void OnTableViewItemReordered(Tizen::Ui::Controls::TableView& tableView,
-                                          int itemIndexFrom,
-                                          int itemIndexTo);
-
-    virtual void OnTouchDragged(const Tizen::Ui::Control& source, const Tizen::Graphics::Point& startPosition, const Tizen::Graphics::Point& currentPosition);
-    virtual void OnTouchDropped(const Tizen::Ui::Control& source,const Tizen::Graphics::Point& startPosition, const Tizen::Graphics::Point& currentPosition);
+       virtual void OnTableViewItemStateChanged(Tizen::Ui::Controls::TableView& tableView,
+                                                       int itemIndex,
+                                                       Tizen::Ui::Controls::TableViewItem* pItem,
+                                                       Tizen::Ui::Controls::TableViewItemStatus status);
+       virtual void OnTableViewContextItemActivationStateChanged(Tizen::Ui::Controls::TableView& tableView,
+                                                                       int itemIndex,
+                                                                       Tizen::Ui::Controls::TableViewContextItem* pContextItem,
+                                                                       bool activated);
+       virtual void OnTableViewItemReordered(Tizen::Ui::Controls::TableView& tableView,
+                                               int itemIndexFrom,
+                                               int itemIndexTo);
 
        virtual void OnTextValueChanged(const Tizen::Ui::Control& source);
        virtual void OnTextValueChangeCanceled(const Tizen::Ui::Control& source);
 
-       virtual void OnTouchDoublePressed(const Tizen::Ui::Control& source, const Tizen::Graphics::Point& currentPosition, const Tizen::Ui::TouchEventInfo& touchInfo){};
-       virtual void OnTouchFocusIn(const Tizen::Ui::Control& source, const Tizen::Graphics::Point& currentPosition, const Tizen::Ui::TouchEventInfo& touchInfo){};
-       virtual void OnTouchFocusOut(const Tizen::Ui::Control& source, const Tizen::Graphics::Point& currentPosition, const Tizen::Ui::TouchEventInfo& touchInfo){};
-       virtual void OnTouchLongPressed(const Tizen::Ui::Control& source, const Tizen::Graphics::Point& currentPosition, const Tizen::Ui::TouchEventInfo& touchInfo){};
-       virtual void OnTouchMoved(const Tizen::Ui::Control& source, const Tizen::Graphics::Point& currentPosition, const Tizen::Ui::TouchEventInfo& touchInfo){};
-       virtual void OnTouchPressed(const Tizen::Ui::Control& source, const Tizen::Graphics::Point& currentPosition, const Tizen::Ui::TouchEventInfo& touchInfo);
-       virtual void OnTouchReleased(const Tizen::Ui::Control& source, const Tizen::Graphics::Point& currentPosition, const Tizen::Ui::TouchEventInfo& touchInfo){};
-
        virtual void OnFormBackRequested(Tizen::Ui::Controls::Form& source);
        virtual void OnUpdateContentList(void);
 
+       virtual void OnThumbnailInfoReveivedN(ThumbnailInfo* pThumbnailInfo);
+
 private:
        result CreateTableViewItem(Tizen::Ui::Container& parent,
-                                                      Tizen::Base::String& labelName,
-                                                      Tizen::Graphics::Bitmap& bitmap,
-                                                      int totalCount);
+                                                       Tizen::Base::String& labelName,
+                                                       const Tizen::Graphics::Bitmap& bitmap,
+                                                       int totalCount);
        void ShowFooter(void);
        void HideFooter(void);
        void SetBoundList(void);
        void UpdateContentList(void);
+
 private:
        PlaylistListPresentationModel* __pPlaylistListPresentationModel;
+       Tizen::Graphics::Bitmap* __pThumbnail;
        Tizen::Ui::Controls::TableView* __pContentTableView;
        Tizen::Ui::Controls::TableViewContextItem* __pContextItem_default;
        Tizen::Ui::Controls::TableViewContextItem* __pContextItem_user;
@@ -117,5 +115,4 @@ private:
        Tizen::Ui::Controls::EditArea* __pEditingArea;
 };
 
-
-#endif // _MP_PLAY_LIST_LIST_PANEL_H_
+#endif // _MP_PLAY_LIST_LIST_PANEL_H_
\ No newline at end of file
old mode 100755 (executable)
new mode 100644 (file)
index 7a90d28..c10e784
@@ -1,4 +1,4 @@
-//
+//
 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
 //
 // Licensed under the Flora License, Version 1.0 (the License);
 // limitations under the License.
 //
 
+/**
+ * @file               MpPlaylistListPresentationModel.h
+ * @brief              This is the header file for PlaylistListPresentationModel class.
+ */
+
 #ifndef _MP_PLAYLIST_LIST_PRESENTATION_MODEL_H_
 #define _MP_PLAYLIST_LIST_PRESENTATION_MODEL_H_
 
 #include <FApp.h>
-#include <FSystem.h>
-#include <FIo.h>
 #include <FCntPlayList.h>
 #include <FCntPlayListManager.h>
+#include <FIo.h>
+#include <FSystem.h>
+#include "MpContentInformationStruct.h"
 
 class PlaylistListPresentationModel
 {
@@ -29,32 +35,35 @@ public:
        static PlaylistListPresentationModel* GetInstance(void);
        void DestroyPlaylistListPresentationModel(void);
 
-       int GetPlayListCount(void);
+       int GetAllPlayListCount(void);
+       int GetContentCount(void);
        int GetPlayListItemCount(Tizen::Base::String& playlist);
-       Tizen::Graphics::Bitmap* GetPlayListItemBitmap(Tizen::Base::String& playlist);
-
-       Tizen::Base::Collection::ArrayList* GetPlaylistContentList(int contentType);
 
-       Tizen::Base::Collection::IList* GetPlayListNameN(void);
        result SetPlayListName(const Tizen::Base::String& oldPlayListName, const Tizen::Base::String& newPlayListName);
-       Tizen::Base::String* GetPlayListName(int playlistIndex);
        void RemovePlayList(Tizen::Base::String& playlistName);
-
-       void AddItem(const Tizen::Content::ContentId& contentId, Tizen::Base::String& name);
-       void AddItems(const Tizen::Base::Collection::IList& contentIdList);
-       void RemoveItem(const int contentId);
-       void RemoveItems(const Tizen::Base::Collection::IList& contentIdList);
+       void UpdatePlaylistList(void);
+       void UpdatePlaylistContentList(const int contentType, const Tizen::Base::String& playlistName);
+       void DeleteContent(int contentType, const ContentInformation& contentInfoStruct);
+       ContentInformation* GetContentInfoN(int contentIndex);
+       Tizen::Base::String* GetPlayListNameN(int playlistIndex);
+       Tizen::Base::Collection::ArrayList* GetContentPathListN(int contentType);
+       Tizen::Graphics::Bitmap* GetPlayListItemBitmap(Tizen::Base::String& playList);
+       Tizen::Content::ContentId GetPlayListItemContentId(Tizen::Base::String& playlist);
+       void AddContent(const Tizen::Content::ContentId& contentId, int playlistIndex);
 
 private:
        PlaylistListPresentationModel(void);
        PlaylistListPresentationModel(const PlaylistListPresentationModel&);
        virtual ~PlaylistListPresentationModel(void);
        const PlaylistListPresentationModel& operator = (const PlaylistListPresentationModel&);
-
        result Construct(void);
 
 private:
        static PlaylistListPresentationModel* pPlaylistListPresentationModel;
+       Tizen::Base::Collection::IList* __pPlaylistList;
+       Tizen::Base::Collection::IList* __pContentList;
+       int __contentType;
+       Tizen::Base::String* __pQueryName;
 };
 
-#endif // _MP_PLAYLIST_LIST_PRESENTATION_MODEL_H_
+#endif // _MP_PLAYLIST_LIST_PRESENTATION_MODEL_H_
\ No newline at end of file
index c44e0b0..6b6a5e6 100755 (executable)
@@ -1,4 +1,4 @@
-//
+//
 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
 //
 // Licensed under the Flora License, Version 1.0 (the License);
 // limitations under the License.
 //
 
+/**
+ * @file               MpPlaylistPickerPopup.h
+ * @brief              This is the header file for PlaylistPickerPopup class.
+ */
+
 #ifndef _MP_PLAY_LIST_PICKER_POPUP_H_
 #define _MP_PLAY_LIST_PICKER_POPUP_H_
 
+#include <iostream>
 #include <pthread.h>
 #include <FApp.h>
 #include <FBase.h>
 #include <FIo.h>
-#include <FUi.h>
-#include <FSecurity.h>
 #include <FMediaTypes.h>
-#include <iostream>
-#include <FBase.h>
+#include <FSecurity.h>
 #include <FSystem.h>
+#include <FUi.h>
 
 class PlaylistListPresentationModel;
 
@@ -41,56 +45,54 @@ class PlayListPickerPopup
 public:
        PlayListPickerPopup(void);
        ~PlayListPickerPopup(void);
-       result Initialize(void);
+       result Initialize(Tizen::Ui::Control* pControl, Tizen::Base::Collection::IList* pDataList);
 
        virtual void OnActionPerformed(const Tizen::Ui::Control& source, int actionId);
 
-    virtual void OnTouchDoublePressed(const Tizen::Ui::Control &source,
-                                         const Tizen::Graphics::Point &currentPosition,
-                                         const Tizen::Ui::TouchEventInfo &touchInfo);
-    virtual void OnTouchLongPressed(const Tizen::Ui::Control &source,
-                                       const Tizen::Graphics::Point &currentPosition,
-                                       const Tizen::Ui::TouchEventInfo &touchInfo);
-       virtual void OnTouchFocusIn(const Tizen::Ui::Control &source,
-                                const Tizen::Graphics::Point &currentPosition,
-                                const Tizen::Ui::TouchEventInfo &touchInfo);
-       virtual void OnTouchFocusOut(const Tizen::Ui::Control &source,
-                                 const Tizen::Graphics::Point &currentPosition,
-                                 const Tizen::Ui::TouchEventInfo &touchInfo);
-       virtual void OnTouchMoved(const Tizen::Ui::Control &source,
-                              const Tizen::Graphics::Point &currentPosition,
-                              const Tizen::Ui::TouchEventInfo &touchInfo);
-    virtual void OnTouchPressed(const Tizen::Ui::Control &source,
-                                const Tizen::Graphics::Point &currentPosition,
-                                const Tizen::Ui::TouchEventInfo &touchInfo);
-    virtual void OnTouchReleased(const Tizen::Ui::Control &source,
-                                 const Tizen::Graphics::Point &currentPosition,
-                                 const Tizen::Ui::TouchEventInfo &touchInfo);
+       virtual void OnTouchDoublePressed(const Tizen::Ui::Control& source,
+                                               const Tizen::Graphics::Point& currentPosition,
+                                               const Tizen::Ui::TouchEventInfo& touchInfo);
+       virtual void OnTouchLongPressed(const Tizen::Ui::Control& source,
+                                               const Tizen::Graphics::Point& currentPosition,
+                                               const Tizen::Ui::TouchEventInfo& touchInfo);
+       virtual void OnTouchFocusIn(const Tizen::Ui::Controlsource,
+                                       const Tizen::Graphics::Point& currentPosition,
+                                       const Tizen::Ui::TouchEventInfo& touchInfo);
+       virtual void OnTouchFocusOut(const Tizen::Ui::Controlsource,
+                                       const Tizen::Graphics::Point& currentPosition,
+                                       const Tizen::Ui::TouchEventInfo& touchInfo);
+       virtual void OnTouchMoved(const Tizen::Ui::Controlsource,
+                                       const Tizen::Graphics::Point& currentPosition,
+                                       const Tizen::Ui::TouchEventInfo& touchInfo);
+       virtual void OnTouchPressed(const Tizen::Ui::Control& source,
+                                       const Tizen::Graphics::Point& currentPosition,
+                                       const Tizen::Ui::TouchEventInfo& touchInfo);
+       virtual void OnTouchReleased(const Tizen::Ui::Control& source,
+                                       const Tizen::Graphics::Point& currentPosition,
+                                       const Tizen::Ui::TouchEventInfo& touchInfo);
 
-    virtual void OnKeyPressed(const Tizen::Ui::Control& source, Tizen::Ui::KeyCode keyCode);
-    virtual void OnKeyReleased(const Tizen::Ui::Control& source, Tizen::Ui::KeyCode keyCode) ;
-    virtual void OnKeyLongPressed(const Tizen::Ui::Control& source, Tizen::Ui::KeyCode keyCode);
+       virtual void OnKeyPressed(const Tizen::Ui::Control& source, Tizen::Ui::KeyCode keyCode);
+       virtual void OnKeyReleased(const Tizen::Ui::Control& source, Tizen::Ui::KeyCode keyCode) ;
+       virtual void OnKeyLongPressed(const Tizen::Ui::Control& source, Tizen::Ui::KeyCode keyCode);
 
        virtual int GetItemCount(void);
     
-    virtual Tizen::Ui::Controls::TableViewItem* CreateItem(const int itemIndex, int itemWidth);
-    virtual bool DeleteItem(const int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem);
-    virtual void UpdateItem(int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem);
-    virtual int GetDefaultItemHeight(void);
+       virtual Tizen::Ui::Controls::TableViewItem* CreateItem(const int itemIndex, int itemWidth);
+       virtual bool DeleteItem(const int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem);
+       virtual void UpdateItem(int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem);
+       virtual int GetDefaultItemHeight(void);
 
-    virtual void OnTableViewItemStateChanged(Tizen::Ui::Controls::TableView& tableView,
-                                             int itemIndex,
-                                             Tizen::Ui::Controls::TableViewItem* pItem,
-                                             Tizen::Ui::Controls::TableViewItemStatus status);
-    virtual void OnTableViewContextItemActivationStateChanged(Tizen::Ui::Controls::TableView& tableView,
-                                                              int itemIndex,
-                                                              Tizen::Ui::Controls::TableViewContextItem* pContextItem,
-                                                              bool activated);
-    virtual void OnTableViewItemReordered(Tizen::Ui::Controls::TableView& tableView,
-                                          int itemIndexFrom,
-                                          int itemIndexTo);
-
-    void SetCollectedContent(Tizen::Base::Collection::IList* pDataList);
+       virtual void OnTableViewItemStateChanged(Tizen::Ui::Controls::TableView& tableView,
+                                                       int itemIndex,
+                                                       Tizen::Ui::Controls::TableViewItem* pItem,
+                                                       Tizen::Ui::Controls::TableViewItemStatus status);
+       virtual void OnTableViewContextItemActivationStateChanged(Tizen::Ui::Controls::TableView& tableView,
+                                                                       int itemIndex,
+                                                                       Tizen::Ui::Controls::TableViewContextItem* pContextItem,
+                                                                       bool activated);
+       virtual void OnTableViewItemReordered(Tizen::Ui::Controls::TableView& tableView,
+                                               int itemIndexFrom,
+                                               int itemIndexTo);
 
 private:
        result CreateTableViewItem(Tizen::Ui::Container& parent,Tizen::Base::String& labelName);
@@ -101,7 +103,7 @@ private:
        Tizen::Ui::Controls::Button* __pCancelButton;
        int __itemIndex;
        Tizen::Base::Collection::IList* __pPlaylistContentList;
+       Tizen::Ui::Control* __pControl;
 };
 
-
-#endif // _MP_PLAY_LIST_PICKER_POPUP_H_
+#endif // _MP_PLAY_LIST_PICKER_POPUP_H_
\ No newline at end of file
old mode 100644 (file)
new mode 100755 (executable)
index 35d6310..b7e8bb7
@@ -1,4 +1,4 @@
-//
+//
 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
 //
 // Licensed under the Flora License, Version 1.0 (the License);
 // limitations under the License.
 //
 
+/**
+ * @file               MpResourceManager.h
+ * @brief              This is the header file for ResourceManager class.
+ */
+
 #ifndef _MP_RESOURCE_MANAGER_H_
 #define _MP_RESOURCE_MANAGER_H_
 
@@ -29,9 +34,10 @@ class ResourceManager
 public:
        static Tizen::Graphics::Bitmap* GetBitmapN(const Tizen::Base::String& resourceName);
        static Tizen::Base::String GetString(const Tizen::Base::String& id);
+
 private:
        ResourceManager(void);
        virtual ~ResourceManager(void);
 };
 
-#endif // _MP_RESOURCE_MANAGER_H_
+#endif // _MP_RESOURCE_MANAGER_H_
\ No newline at end of file
old mode 100755 (executable)
new mode 100644 (file)
index 70aa19f..e928e4d
@@ -1,4 +1,4 @@
-//
+//
 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
 //
 // Licensed under the Flora License, Version 1.0 (the License);
 // limitations under the License.
 //
 
+/**
+ * @file               MpSceneRegister.h
+ * @brief              This is the header file for SceneRegister class.
+ */
+
 #ifndef _MP_SCENE_REGISTER_H_
 #define _MP_SCENE_REGISTER_H_
 
@@ -39,6 +44,7 @@ extern const wchar_t* IDSCN_ALBUM_CONTENT_LIST_EDITOR;
 extern const wchar_t* IDSCN_ARTIST_LIST;
 extern const wchar_t* IDSCN_ARTIST_LIST_EDITOR;
 extern const wchar_t* IDSCN_ARTIST_PICKER;
+extern const wchar_t* IDSCN_ARTIST_CONTENT_LIST;
 extern const wchar_t* IDSCN_ARTIST_CONTENT_PICKER;
 extern const wchar_t* IDSCN_ARTIST_ALBUM_LIST;
 extern const wchar_t* IDSCN_ARTIST_ALBUM_LIST_EDITOR;
@@ -69,6 +75,7 @@ extern const wchar_t* IDSCN_FOLDER_LIST;
 extern const wchar_t* IDSCN_FOLDER_LIST_EDITOR;
 extern const wchar_t* IDSCN_FOLDER_PICKER;
 extern const wchar_t* IDSCN_FOLDER_CONTENT_PICKER;
+extern const wchar_t* IDSCN_FOLDER_CONTENT_LIST;
 
 extern const wchar_t* IDSCN_SEARCH;
 extern const wchar_t* IDSCN_PLAYER;
@@ -77,9 +84,6 @@ extern const wchar_t* IDSCN_PLAYLIST_CONTENT_LIST;
 extern const wchar_t* IDSCN_USER_PLAYLIST_CONTENT_LIST;
 extern const wchar_t* IDSCN_PLAYLIST_CONTENT_LIST_EDITOR;
 extern const wchar_t* IDSCN_CONTENT_DETAIL;
-extern const wchar_t* IDSCN_CONTENT_LIST;
-extern const wchar_t* IDSCN_ALBUM_CONTENT_FORM;
-extern const wchar_t* IDSCN_CONTENT_LIST_EDIT;
 extern const wchar_t* IDSCN_ARTIST_ALBUM_SEARCH_LIST;
 
 class SceneRegister
@@ -88,8 +92,8 @@ public:
        static result RegisterAllScenes(void);
 
 private:
-       SceneRegister();
-       ~SceneRegister();
+       SceneRegister(void);
+       ~SceneRegister(void);
 };
 
-#endif // _MP_SCENE_REGISTER_H_
+#endif // _MP_SCENE_REGISTER_H_
\ No newline at end of file
index baf1329..0695871 100755 (executable)
@@ -1,4 +1,4 @@
-//
+//
 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
 //
 // Licensed under the Flora License, Version 1.0 (the License);
 // limitations under the License.
 //
 
+/**
+ * @file               MpSearchForm.h
+ * @brief              This is the header file for SearchForm class.
+ */
+
 #ifndef _MP_SEARCH_FORM_H_
 #define _MP_SEARCH_FORM_H_
 
 #include <new>
+#include <FBase.h>
 #include <FGraphics.h>
 #include <FUi.h>
 #include <FUiControl.h>
-#include <FBase.h>
 #include <FUiCtrlButtonItem.h>
-
-#include "MpSearchPresentationModel.h"
 #include "MpResourceManager.h"
 #include "MpSceneRegister.h"
+#include "MpSearchPresentationModel.h"
 #include "MpTypes.h"
 
 class SearchForm
@@ -52,56 +56,57 @@ public:
        virtual void OnSearchBarModeChanged(Tizen::Ui::Controls::SearchBar& source,
                                                                                Tizen::Ui::Controls::SearchBarMode mode);
        virtual void OnSearchBarContentAreaResized(Tizen::Ui::Controls::SearchBar& source,
-                                                                                          Tizen::Graphics::Dimension& size);
+                                                                                               Tizen::Graphics::Dimension& size);
 
        virtual void OnTextValueChanged(const Tizen::Ui::Control& source);
        virtual void OnTextValueChangeCanceled(const Tizen::Ui::Control& source);
 
-       virtual void OnKeypadActionPerformed(Tizen::Ui::Control &source,
-                                                                                Tizen::Ui::KeypadAction keypadAction);
+       virtual void OnKeypadActionPerformed(Tizen::Ui::Controlsource,
+                                                                               Tizen::Ui::KeypadAction keypadAction);
        virtual void OnKeypadClosed(Tizen::Ui::Control& source);
        virtual void OnKeypadOpened(Tizen::Ui::Control& source);
        virtual void OnKeypadWillOpen(Tizen::Ui::Control& source);
 
        virtual int GetItemCount(void);
-    virtual Tizen::Ui::Controls::TableViewItem* CreateItem(const int itemIndex, int itemWidth);
-    virtual bool DeleteItem(const int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem);
-    virtual void UpdateItem(int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem);
-    virtual int GetDefaultItemHeight(void);
-
-    virtual void OnTableViewItemStateChanged(Tizen::Ui::Controls::TableView& tableView,
-                                             int itemIndex,
-                                             Tizen::Ui::Controls::TableViewItem* pItem,
-                                             Tizen::Ui::Controls::TableViewItemStatus status);
-    virtual void OnTableViewContextItemActivationStateChanged(Tizen::Ui::Controls::TableView& tableView,
-                                                              int itemIndex,
-                                                              Tizen::Ui::Controls::TableViewContextItem* pContextItem,
-                                                              bool activated);
-    virtual void OnTableViewItemReordered(Tizen::Ui::Controls::TableView& tableView,
-                                          int itemIndexFrom,
-                                          int itemIndexTo);
+       virtual Tizen::Ui::Controls::TableViewItem* CreateItem(const int itemIndex, int itemWidth);
+       virtual bool DeleteItem(const int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem);
+       virtual void UpdateItem(int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem);
+       virtual int GetDefaultItemHeight(void);
+
+       virtual void OnTableViewItemStateChanged(Tizen::Ui::Controls::TableView& tableView,
+                                                       int itemIndex,
+                                                       Tizen::Ui::Controls::TableViewItem* pItem,
+                                                       Tizen::Ui::Controls::TableViewItemStatus status);
+       virtual void OnTableViewContextItemActivationStateChanged(Tizen::Ui::Controls::TableView& tableView,
+                                                                       int itemIndex,
+                                                                       Tizen::Ui::Controls::TableViewContextItem* pContextItem,
+                                                                       bool activated);
+       virtual void OnTableViewItemReordered(Tizen::Ui::Controls::TableView& tableView,
+                                               int itemIndexFrom,
+                                               int itemIndexTo);
 
        virtual void OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previousSceneId,
-                                                                  const Tizen::Ui::Scenes::SceneId& currentSceneId,
-                                                                  Tizen::Base::Collection::IList* pArgs);
+                                                                       const Tizen::Ui::Scenes::SceneId& currentSceneId,
+                                                                       Tizen::Base::Collection::IList* pArgs);
        virtual void OnSceneDeactivated(const Tizen::Ui::Scenes::SceneId& currentSceneId,
                                                                        const Tizen::Ui::Scenes::SceneId& nextSceneId);
 
        virtual void OnActionPerformed(const Tizen::Ui::Control& source, int actionId);
 
-       virtual void  OnTouchDoublePressed (const Tizen::Ui::Control &source, const Tizen::Graphics::Point &currentPosition, const Tizen::Ui::TouchEventInfo &touchInfo);
-       virtual void  OnTouchFocusIn (const Tizen::Ui::Control &source, const Tizen::Graphics::Point &currentPosition, const Tizen::Ui::TouchEventInfo &touchInfo);
-       virtual void  OnTouchFocusOut (const Tizen::Ui::Control &source, const Tizen::Graphics::Point &currentPosition, const Tizen::Ui::TouchEventInfo &touchInfo);
-       virtual void  OnTouchLongPressed (const Tizen::Ui::Control &source, const Tizen::Graphics::Point &currentPosition, const Tizen::Ui::TouchEventInfo &touchInfo);
-       virtual void  OnTouchMoved (const Tizen::Ui::Control &source, const Tizen::Graphics::Point &currentPosition, const Tizen::Ui::TouchEventInfo &touchInfo);
-       virtual void  OnTouchPressed (const Tizen::Ui::Control &source, const Tizen::Graphics::Point &currentPosition, const Tizen::Ui::TouchEventInfo &touchInfo);
-       virtual void  OnTouchReleased (const Tizen::Ui::Control &source, const Tizen::Graphics::Point &currentPosition, const Tizen::Ui::TouchEventInfo &touchInfo);
+       virtual void  OnTouchDoublePressed(const Tizen::Ui::Control& source, const Tizen::Graphics::Point& currentPosition, const Tizen::Ui::TouchEventInfo& touchInfo);
+       virtual void  OnTouchFocusIn(const Tizen::Ui::Control& source, const Tizen::Graphics::Point& currentPosition, const Tizen::Ui::TouchEventInfo& touchInfo);
+       virtual void  OnTouchFocusOut(const Tizen::Ui::Control& source, const Tizen::Graphics::Point& currentPosition, const Tizen::Ui::TouchEventInfo& touchInfo);
+       virtual void  OnTouchLongPressed(const Tizen::Ui::Control& source, const Tizen::Graphics::Point& currentPosition, const Tizen::Ui::TouchEventInfo& touchInfo);
+       virtual void  OnTouchMoved(const Tizen::Ui::Control& source, const Tizen::Graphics::Point& currentPosition, const Tizen::Ui::TouchEventInfo& touchInfo);
+       virtual void  OnTouchPressed(const Tizen::Ui::Control& source, const Tizen::Graphics::Point& currentPosition, const Tizen::Ui::TouchEventInfo& touchInfo);
+       virtual void  OnTouchReleased(const Tizen::Ui::Control& source, const Tizen::Graphics::Point& currentPosition, const Tizen::Ui::TouchEventInfo& touchInfo);
 
-    virtual void OnScrollEndReached (Tizen::Ui::Control &source, Tizen::Ui::Controls::ScrollEndEvent type);
-       virtual void OnScrollPositionChanged (Tizen::Ui::Control &source, int scrollPos);
-       virtual void OnScrollStopped (Tizen::Ui::Control &source);
+       virtual void OnScrollEndReached(Tizen::Ui::Control& source, Tizen::Ui::Controls::ScrollEndEvent type);
+       virtual void OnScrollPositionChanged (Tizen::Ui::Controlsource, int scrollPos);
+       virtual void OnScrollStopped(Tizen::Ui::Control& source);
 
        virtual void OnFormBackRequested(Tizen::Ui::Controls::Form& source);
+
 private:
        result CreateGroupNameTableViewItem(Tizen::Ui::Container& parent, const Tizen::Base::String& GroupName);
        Tizen::Base::String MakeQuery(const Tizen::Base::String& WhereExpr, const Tizen::Base::String& SearchName);
@@ -114,4 +119,4 @@ private:
        SearchPresentationModel* __pPresentationModel;
 };
 
-#endif // _MP_SEARCH_FORM_H_
+#endif // _MP_SEARCH_FORM_H_
\ No newline at end of file
index de4fe82..4752cd1 100755 (executable)
@@ -1,4 +1,4 @@
-//
+//
 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
 //
 // Licensed under the Flora License, Version 1.0 (the License);
 // limitations under the License.
 //
 
+/**
+ * @file               MpSearchPresentationModel.h
+ * @brief              This is the header file for SearchPresentationModel class.
+ */
+
 #ifndef _MP_SEARCH_PRESENTATION_MODEL_H_
 #define _MP_SEARCH_PRESENTATION_MODEL_H_
 
-#include "MpTypes.h"
 #include "MpCommonUtil.h"
 #include "MpContentInformationStruct.h"
+#include "MpTypes.h"
 
 class SearchPresentationModel
 {
@@ -29,22 +34,22 @@ public:
        int GetArtistIndex(void);
        int GetSongIndex(void);
        int GetTotalContentCount(void);
-       void SearchSong(const Tizen::Base::String& keyword);
+       void InitializeContentList(const Tizen::Base::String& keyword);
        void Release(void);
-       ContentInformationStruct* GetContentInfo(int index);
+       ContentInformation* GetContentInfo(int index);
        void RemoveSearchResult(void);
 
 private:
        SearchPresentationModel(void);
        SearchPresentationModel(SearchPresentationModel& SearchPresentationModel);
        const SearchPresentationModel& operator = (const SearchPresentationModel& SearchPresentationModel);
-    ~SearchPresentationModel(void);
-    result Construct(void);
-    Tizen::Base::String MakeQuery(const Tizen::Base::String& WhereExpr, const Tizen::Base::String& keyword);
+       ~SearchPresentationModel(void);
+       result Construct(void);
+       Tizen::Base::String MakeQuery(const Tizen::Base::String& WhereExpr, const Tizen::Base::String& keyword);
 
 private:
-    static SearchPresentationModel* pSearchPresentationModelInstance;
-    Tizen::Base::Collection::IList* __pSearchList;
+       static SearchPresentationModel* pSearchPresentationModelInstance;
+       Tizen::Base::Collection::IList* __pSearchList;
 };
 
-#endif //_MP_SEARCH_PRESENTATION_MODEL_H_
+#endif // _MP_SEARCH_PRESENTATION_MODEL_H_
\ No newline at end of file
old mode 100644 (file)
new mode 100755 (executable)
index 6b83872..59bee53
@@ -1,4 +1,4 @@
-//
+//
 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
 //
 // Licensed under the Flora License, Version 1.0 (the License);
 // limitations under the License.
 //
 
+/**
+ * @file               MpSetAsPopup.h
+ * @brief              This is the header file for SetAsPopup class.
+ */
 
 #ifndef _MP_SET_AS_POPUP_H_
 #define _MP_SET_AS_POPUP_H_
@@ -21,9 +25,8 @@
 #include <FApp.h>
 #include <FBase.h>
 #include <FIo.h>
-#include <FUi.h>
 #include <FSecurity.h>
-#include <FBase.h>
+#include <FUi.h>
 
 class SetAsPopup
        : public Tizen::Ui::Controls::Popup
@@ -39,58 +42,58 @@ public:
        virtual ~SetAsPopup(void);
        result Initialize(void);
 
+       void SetCurrentContentPath(Tizen::Base::String* contentPath);
+
        virtual void OnAppControlCompleteResponseReceived(const Tizen::App::AppId& appId,
                                                                                                const Tizen::Base::String& operationId, Tizen::App::AppCtrlResult appControlResult,
                                                                                                const Tizen::Base::Collection::IMap* pExtraData);
 
        virtual void OnActionPerformed(const Tizen::Ui::Control& source, int actionId);
 
-    virtual void OnTouchDoublePressed(const Tizen::Ui::Control &source,
-                                         const Tizen::Graphics::Point &currentPosition,
-                                         const Tizen::Ui::TouchEventInfo &touchInfo);
-    virtual void OnTouchLongPressed(const Tizen::Ui::Control &source,
-                                       const Tizen::Graphics::Point &currentPosition,
-                                       const Tizen::Ui::TouchEventInfo &touchInfo);
-       virtual void OnTouchFocusIn(const Tizen::Ui::Control &source,
-                                const Tizen::Graphics::Point &currentPosition,
-                                const Tizen::Ui::TouchEventInfo &touchInfo);
-       virtual void OnTouchFocusOut(const Tizen::Ui::Control &source,
-                                 const Tizen::Graphics::Point &currentPosition,
-                                 const Tizen::Ui::TouchEventInfo &touchInfo);
-       virtual void OnTouchMoved(const Tizen::Ui::Control &source,
-                              const Tizen::Graphics::Point &currentPosition,
-                              const Tizen::Ui::TouchEventInfo &touchInfo);
-    virtual void OnTouchPressed(const Tizen::Ui::Control &source,
-                                const Tizen::Graphics::Point &currentPosition,
-                                const Tizen::Ui::TouchEventInfo &touchInfo);
-    virtual void OnTouchReleased(const Tizen::Ui::Control &source,
-                                 const Tizen::Graphics::Point &currentPosition,
-                                 const Tizen::Ui::TouchEventInfo &touchInfo);
+       virtual void OnTouchDoublePressed(const Tizen::Ui::Control& source,
+                                               const Tizen::Graphics::Point& currentPosition,
+                                               const Tizen::Ui::TouchEventInfo& touchInfo);
+       virtual void OnTouchLongPressed(const Tizen::Ui::Control& source,
+                                               const Tizen::Graphics::Point& currentPosition,
+                                               const Tizen::Ui::TouchEventInfo& touchInfo);
+       virtual void OnTouchFocusIn(const Tizen::Ui::Controlsource,
+                                       const Tizen::Graphics::Point& currentPosition,
+                                       const Tizen::Ui::TouchEventInfo& touchInfo);
+       virtual void OnTouchFocusOut(const Tizen::Ui::Controlsource,
+                                       const Tizen::Graphics::Point& currentPosition,
+                                       const Tizen::Ui::TouchEventInfo& touchInfo);
+       virtual void OnTouchMoved(const Tizen::Ui::Controlsource,
+                                       const Tizen::Graphics::Point& currentPosition,
+                                       const Tizen::Ui::TouchEventInfo& touchInfo);
+       virtual void OnTouchPressed(const Tizen::Ui::Control& source,
+                                       const Tizen::Graphics::Point& currentPosition,
+                                       const Tizen::Ui::TouchEventInfo& touchInfo);
+       virtual void OnTouchReleased(const Tizen::Ui::Control& source,
+                                       const Tizen::Graphics::Point& currentPosition,
+                                       const Tizen::Ui::TouchEventInfo& touchInfo);
 
-    virtual void OnKeyPressed(const Tizen::Ui::Control& source, Tizen::Ui::KeyCode keyCode);
-    virtual void OnKeyReleased(const Tizen::Ui::Control& source, Tizen::Ui::KeyCode keyCode) ;
-    virtual void OnKeyLongPressed(const Tizen::Ui::Control& source, Tizen::Ui::KeyCode keyCode);
+       virtual void OnKeyPressed(const Tizen::Ui::Control& source, Tizen::Ui::KeyCode keyCode);
+       virtual void OnKeyReleased(const Tizen::Ui::Control& source, Tizen::Ui::KeyCode keyCode) ;
+       virtual void OnKeyLongPressed(const Tizen::Ui::Control& source, Tizen::Ui::KeyCode keyCode);
 
        virtual int GetItemCount(void);
     
-    virtual Tizen::Ui::Controls::TableViewItem* CreateItem(const int itemIndex, int itemWidth);
-    virtual bool DeleteItem(const int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem);
-    virtual void UpdateItem(int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem);
-    virtual int GetDefaultItemHeight(void);
-
-    virtual void OnTableViewItemStateChanged(Tizen::Ui::Controls::TableView& tableView,
-                                             int itemIndex,
-                                             Tizen::Ui::Controls::TableViewItem* pItem,
-                                             Tizen::Ui::Controls::TableViewItemStatus status);
-    virtual void OnTableViewContextItemActivationStateChanged(Tizen::Ui::Controls::TableView& tableView,
-                                                              int itemIndex,
-                                                              Tizen::Ui::Controls::TableViewContextItem* pContextItem,
-                                                              bool activated);
-    virtual void OnTableViewItemReordered(Tizen::Ui::Controls::TableView& tableView,
-                                          int itemIndexFrom,
-                                          int itemIndexTo);
+       virtual Tizen::Ui::Controls::TableViewItem* CreateItem(const int itemIndex, int itemWidth);
+       virtual bool DeleteItem(const int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem);
+       virtual void UpdateItem(int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem);
+       virtual int GetDefaultItemHeight(void);
 
-    void SetCurrentContentPath(Tizen::Base::String* contentPath);
+       virtual void OnTableViewItemStateChanged(Tizen::Ui::Controls::TableView& tableView,
+                                                       int itemIndex,
+                                                       Tizen::Ui::Controls::TableViewItem* pItem,
+                                                       Tizen::Ui::Controls::TableViewItemStatus status);
+       virtual void OnTableViewContextItemActivationStateChanged(Tizen::Ui::Controls::TableView& tableView,
+                                                                       int itemIndex,
+                                                                       Tizen::Ui::Controls::TableViewContextItem* pContextItem,
+                                                                       bool activated);
+       virtual void OnTableViewItemReordered(Tizen::Ui::Controls::TableView& tableView,
+                                               int itemIndexFrom,
+                                               int itemIndexTo);
 
 private:
        result CreateTableViewItem(Tizen::Ui::Container& parent,Tizen::Base::String& labelName);
@@ -101,5 +104,4 @@ private:
        Tizen::Base::String* __pCurrentContentPath;
 };
 
-
-#endif // _MP_SET_AS_POPUP_H_
+#endif // _MP_SET_AS_POPUP_H_
\ No newline at end of file
old mode 100644 (file)
new mode 100755 (executable)
index e64e59d..6ec5fdf
@@ -1,4 +1,4 @@
-//
+//
 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
 //
 // Licensed under the Flora License, Version 1.0 (the License);
 // limitations under the License.
 //
 
+/**
+ * @file               MpSettingForm.h
+ * @brief              This is the header file for SettingForm class.
+ */
+
 #ifndef _MP_SETTING_FORM_H_
 #define _MP_SETTING_FORM_H_
 
@@ -33,13 +38,12 @@ public:
        virtual ~SettingForm(void);
        void Initialize(void);
 
-public:
        virtual result OnInitializing(void);
        virtual result OnTerminating(void);
        virtual void OnFormBackRequested(Tizen::Ui::Controls::Form& source);
        virtual void OnActionPerformed(const Tizen::Ui::Control& source, int actionId);
        virtual void OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previousSceneId,
-                                                                  const Tizen::Ui::Scenes::SceneId& currentSceneId, Tizen::Base::Collection::IList* pArgs);
+                                                                       const Tizen::Ui::Scenes::SceneId& currentSceneId, Tizen::Base::Collection::IList* pArgs);
        virtual void OnSceneDeactivated(const Tizen::Ui::Scenes::SceneId& currentSceneId,
                                                                        const Tizen::Ui::Scenes::SceneId& nextSceneId);
 
@@ -59,10 +63,9 @@ public:
        virtual void OnGroupedTableViewContextItemActivationStateChanged(Tizen::Ui::Controls::GroupedTableView& tableView, int groupIndex, int itemIndex, Tizen::Ui::Controls::TableViewContextItem* pContextItem, bool activated);
 
 private:
-private:
        SettingPresentationModel* __pSettingPresentationModel;
        NowPlayContentPanel* __pNowPlayContentPanel;
        Tizen::Ui::Controls::GroupedTableView* __pSettingTableView;
 };
 
-#endif //_MP_SETTING_FORM_H_
+#endif // _MP_SETTING_FORM_H_
\ No newline at end of file
old mode 100644 (file)
new mode 100755 (executable)
index 5a44a21..4dadccb
@@ -1,4 +1,4 @@
-//
+//
 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
 //
 // Licensed under the Flora License, Version 1.0 (the License);
 // limitations under the License.
 //
 
+/**
+ * @file               MpSettingPresentationModel.h
+ * @brief              This is the header file for SettingPresentationModel class.
+ */
+
 #ifndef _MP_SETTING_PRESENTATION_MODEL_H_
 #define _MP_SETTING_PRESENTATION_MODEL_H_
 
 #include <FApp.h>
-#include <FSystem.h>
 #include <FIo.h>
+#include <FSystem.h>
 
 class IMusicSettingEventListener;
 
@@ -63,8 +68,6 @@ private:
        bool __isSongsTab;
        bool __isPlayerListsTab;
        int __autoOffTime;
-
-
 };
 
-#endif // _MP_SETTING_PRESENTATION_MODEL_H_
+#endif // _MP_SETTING_PRESENTATION_MODEL_H_
\ No newline at end of file
index 7237ea5..cd9da22 100755 (executable)
@@ -1,4 +1,4 @@
-//
+//
 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
 //
 // Licensed under the Flora License, Version 1.0 (the License);
 // limitations under the License.
 //
 
+/**
+ * @file               MpSharePopup.h
+ * @brief              This is the header file for SharePopup class.
+ */
 
 #ifndef _MP_SHARE_POPUP_H_
 #define _MP_SHARE_POPUP_H_
@@ -21,9 +25,8 @@
 #include <FApp.h>
 #include <FBase.h>
 #include <FIo.h>
-#include <FUi.h>
 #include <FSecurity.h>
-#include <FBase.h>
+#include <FUi.h>
 
 class SharePopup
        : public Tizen::Ui::Controls::Popup
@@ -39,57 +42,59 @@ public:
        virtual ~SharePopup(void);
        result Initialize(void);
 
+       void SetArguments(Tizen::Base::Collection::IList* pIList);
+
        virtual void OnAppControlCompleteResponseReceived(const Tizen::App::AppId& appId,
                                                                                                const Tizen::Base::String& operationId, Tizen::App::AppCtrlResult appControlResult,
                                                                                                const Tizen::Base::Collection::IMap* pExtraData);
 
        virtual void OnActionPerformed(const Tizen::Ui::Control& source, int actionId);
 
-    virtual void OnTouchDoublePressed(const Tizen::Ui::Control &source,
-                                         const Tizen::Graphics::Point &currentPosition,
-                                         const Tizen::Ui::TouchEventInfo &touchInfo);
-    virtual void OnTouchLongPressed(const Tizen::Ui::Control &source,
-                                       const Tizen::Graphics::Point &currentPosition,
-                                       const Tizen::Ui::TouchEventInfo &touchInfo);
-       virtual void OnTouchFocusIn(const Tizen::Ui::Control &source,
-                                const Tizen::Graphics::Point &currentPosition,
-                                const Tizen::Ui::TouchEventInfo &touchInfo);
-       virtual void OnTouchFocusOut(const Tizen::Ui::Control &source,
-                                 const Tizen::Graphics::Point &currentPosition,
-                                 const Tizen::Ui::TouchEventInfo &touchInfo);
-       virtual void OnTouchMoved(const Tizen::Ui::Control &source,
-                              const Tizen::Graphics::Point &currentPosition,
-                              const Tizen::Ui::TouchEventInfo &touchInfo);
-    virtual void OnTouchPressed(const Tizen::Ui::Control &source,
-                                const Tizen::Graphics::Point &currentPosition,
-                                const Tizen::Ui::TouchEventInfo &touchInfo);
-    virtual void OnTouchReleased(const Tizen::Ui::Control &source,
-                                 const Tizen::Graphics::Point &currentPosition,
-                                 const Tizen::Ui::TouchEventInfo &touchInfo);
+       virtual void OnTouchDoublePressed(const Tizen::Ui::Control& source,
+                                               const Tizen::Graphics::Point& currentPosition,
+                                               const Tizen::Ui::TouchEventInfo& touchInfo);
+       virtual void OnTouchLongPressed(const Tizen::Ui::Control& source,
+                                               const Tizen::Graphics::Point& currentPosition,
+                                               const Tizen::Ui::TouchEventInfo& touchInfo);
+       virtual void OnTouchFocusIn(const Tizen::Ui::Controlsource,
+                                       const Tizen::Graphics::Point& currentPosition,
+                                       const Tizen::Ui::TouchEventInfo& touchInfo);
+       virtual void OnTouchFocusOut(const Tizen::Ui::Controlsource,
+                                       const Tizen::Graphics::Point& currentPosition,
+                                       const Tizen::Ui::TouchEventInfo& touchInfo);
+       virtual void OnTouchMoved(const Tizen::Ui::Controlsource,
+                                       const Tizen::Graphics::Point& currentPosition,
+                                       const Tizen::Ui::TouchEventInfo& touchInfo);
+       virtual void OnTouchPressed(const Tizen::Ui::Control& source,
+                                       const Tizen::Graphics::Point& currentPosition,
+                                       const Tizen::Ui::TouchEventInfo& touchInfo);
+       virtual void OnTouchReleased(const Tizen::Ui::Control& source,
+                                       const Tizen::Graphics::Point& currentPosition,
+                                       const Tizen::Ui::TouchEventInfo& touchInfo);
 
-    virtual void OnKeyPressed(const Tizen::Ui::Control& source, Tizen::Ui::KeyCode keyCode);
-    virtual void OnKeyReleased(const Tizen::Ui::Control& source, Tizen::Ui::KeyCode keyCode) ;
-    virtual void OnKeyLongPressed(const Tizen::Ui::Control& source, Tizen::Ui::KeyCode keyCode);
+       virtual void OnKeyPressed(const Tizen::Ui::Control& source, Tizen::Ui::KeyCode keyCode);
+       virtual void OnKeyReleased(const Tizen::Ui::Control& source, Tizen::Ui::KeyCode keyCode) ;
+       virtual void OnKeyLongPressed(const Tizen::Ui::Control& source, Tizen::Ui::KeyCode keyCode);
 
        virtual int GetItemCount(void);
     
-    virtual Tizen::Ui::Controls::TableViewItem* CreateItem(const int itemIndex, int itemWidth);
-    virtual bool DeleteItem(const int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem);
-    virtual void UpdateItem(int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem);
-    virtual int GetDefaultItemHeight(void);
+       virtual Tizen::Ui::Controls::TableViewItem* CreateItem(const int itemIndex, int itemWidth);
+       virtual bool DeleteItem(const int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem);
+       virtual void UpdateItem(int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem);
+       virtual int GetDefaultItemHeight(void);
+
+       virtual void OnTableViewItemStateChanged(Tizen::Ui::Controls::TableView& tableView,
+                                                       int itemIndex,
+                                                       Tizen::Ui::Controls::TableViewItem* pItem,
+                                                       Tizen::Ui::Controls::TableViewItemStatus status);
+       virtual void OnTableViewContextItemActivationStateChanged(Tizen::Ui::Controls::TableView& tableView,
+                                                                       int itemIndex,
+                                                                       Tizen::Ui::Controls::TableViewContextItem* pContextItem,
+                                                                       bool activated);
+       virtual void OnTableViewItemReordered(Tizen::Ui::Controls::TableView& tableView,
+                                               int itemIndexFrom,
+                                               int itemIndexTo);
 
-    virtual void OnTableViewItemStateChanged(Tizen::Ui::Controls::TableView& tableView,
-                                             int itemIndex,
-                                             Tizen::Ui::Controls::TableViewItem* pItem,
-                                             Tizen::Ui::Controls::TableViewItemStatus status);
-    virtual void OnTableViewContextItemActivationStateChanged(Tizen::Ui::Controls::TableView& tableView,
-                                                              int itemIndex,
-                                                              Tizen::Ui::Controls::TableViewContextItem* pContextItem,
-                                                              bool activated);
-    virtual void OnTableViewItemReordered(Tizen::Ui::Controls::TableView& tableView,
-                                          int itemIndexFrom,
-                                          int itemIndexTo);
-    void SetArguments(Tizen::Base::Collection::IList* pIList);
 private:
        result LaunchAppControl(const Tizen::Base::String& operationId, const Tizen::Base::String& providerId);
 
@@ -100,5 +105,4 @@ private:
        Tizen::Base::Collection::HashMap* __pDataList;
 };
 
-
-#endif // _MP_SHARE_POPUP_H_
+#endif // _MP_SHARE_POPUP_H_
\ No newline at end of file
index 9a5e80a..6263f4f 100755 (executable)
@@ -1,4 +1,4 @@
-//
+//
 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
 //
 // Licensed under the Flora License, Version 1.0 (the License);
 // limitations under the License.
 //
 
+/**
+ * @file               MpSoundPathPopup.h
+ * @brief              This is the header file for SoundPathPopup class.
+ */
 
-#ifndef _MP_SOUNDPATH_POPUP_H_
-#define _MP_SOUNDPATH_POPUP_H_
+#ifndef _MP_SOUND_PATH_POPUP_H_
+#define _MP_SOUND_PATH_POPUP_H_
 
 #include <FApp.h>
 #include <FBase.h>
@@ -72,4 +76,4 @@ private:
        int __selectedAudioRouteMode;
 };
 
-#endif // _MP_SOUNDPATH_POPUP_H_
+#endif // _MP_SOUND_PATH_POPUP_H_
\ No newline at end of file
diff --git a/inc/MpThumbnailBase.h b/inc/MpThumbnailBase.h
new file mode 100755 (executable)
index 0000000..508eacb
--- /dev/null
@@ -0,0 +1,60 @@
+//\r
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.\r
+//\r
+// Licensed under the Flora License, Version 1.0 (the License);\r
+// you may not use this file except in compliance with the License.\r
+// You may obtain a copy of the License at\r
+//\r
+//     http://floralicense.org/license/\r
+//\r
+// Unless required by applicable law or agreed to in writing, software\r
+// distributed under the License is distributed on an AS IS BASIS,\r
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+// See the License for the specific language governing permissions and\r
+// limitations under the License.\r
+//\r
+\r
+/**\r
+ * @file               MpThumbnailBase.h\r
+ * @brief              This is the header file for ThumbnailBase class.\r
+ */\r
+\r
+#ifndef _MP_THUMBNAIL_BASE_H_\r
+#define _MP_THUMBNAIL_BASE_H_\r
+\r
+#include <FBase.h>\r
+#include <FContent.h>\r
+#include <FGraphics.h>\r
+#include "MpThumbnailEvent.h"\r
+#include "MpThumbnailEventListener.h"\r
+\r
+class ThumbnailInfo;\r
+class IThumbnailProviderHandler;\r
+\r
+class ThumbnailBase\r
+       : public IThumbnailEventListener\r
+{\r
+public:\r
+       ThumbnailBase(void);\r
+       virtual ~ThumbnailBase(void);\r
+\r
+       result Construct(void);\r
+       void RequestThumbnail(const Tizen::Content::ContentId& contentId, void* pParam) const;\r
+       void CancelAllThumbnailRequest(void);\r
+       const Tizen::Graphics::Bitmap* GetDefaultThumbnail(void) const;\r
+\r
+       virtual void OnThumbnailInfoReveivedN(ThumbnailInfo* pThumbnailInfo) = 0;\r
+\r
+private:\r
+       void SetThumbnailEventListner(void);\r
+       void RemoveThumbnailEventListner(void);\r
+       ThumbnailInfo* GetThumbnailInfo(Tizen::Base::Runtime::IEventArg& eventArg);\r
+\r
+       void OnThumbnailReceivedN(Tizen::Base::Runtime::IEventArg& eventArg);\r
+\r
+private:\r
+       IThumbnailProviderHandler* __pIThumbnailProviderHandler;\r
+       ThumbnailEvent* __pThumbnailEvent;\r
+};\r
+\r
+#endif // _MP_THUMBNAIL_BASE_H_\r
diff --git a/inc/MpThumbnailEvent.h b/inc/MpThumbnailEvent.h
new file mode 100755 (executable)
index 0000000..948dfbe
--- /dev/null
@@ -0,0 +1,40 @@
+//
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.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://floralicense.org/license/
+//
+// 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.
+//
+
+/**
+ * @file               MpThumbnailEvent.h
+ * @brief              This is the header file for ThumbnailEvent class.
+ */
+
+#ifndef _MP_THUMBNAIL_EVENT_H_
+#define _MP_THUMBNAIL_EVENT_H_
+
+#include <FBase.h>
+
+class IThumbnailEventListener;
+
+class ThumbnailEvent
+       : public Tizen::Base::Runtime::Event
+{
+public:
+        virtual ~ThumbnailEvent(void);
+
+protected:
+       virtual void FireImpl(Tizen::Base::Runtime::IEventListener& listener,
+                       const Tizen::Base::Runtime::IEventArg& eventArg);
+};
+
+#endif // _MP_THUMBNAIL_EVENT_H_
diff --git a/inc/MpThumbnailEventArg.h b/inc/MpThumbnailEventArg.h
new file mode 100755 (executable)
index 0000000..7ed0379
--- /dev/null
@@ -0,0 +1,41 @@
+//
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.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://floralicense.org/license/
+//
+// 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.
+//
+
+/**
+ * @file               MpThumbnailEventArg.h
+ * @brief              This is the header file for ThumbnailEventArg class.
+ */
+
+#ifndef _MP_THUMBNAIL_EVENT_ARG_H_
+#define _MP_THUMBNAIL_EVENT_ARG_H_
+
+#include <FBase.h>
+
+class ThumbnailInfo;
+
+class ThumbnailEventArg
+       : public Tizen::Base::Runtime::IEventArg
+{
+public:
+       ThumbnailEventArg(ThumbnailInfo* pThumbnailInfo);
+       virtual ~ThumbnailEventArg(void);
+       virtual ThumbnailInfo* GetThumbnailInfoN(void);
+
+protected:
+       ThumbnailInfo* _pThumbnailInfo;
+};
+
+#endif // _MP_THUMBNAIL_EVENT_ARG_H_
diff --git a/inc/MpThumbnailEventListener.h b/inc/MpThumbnailEventListener.h
new file mode 100755 (executable)
index 0000000..77f0675
--- /dev/null
@@ -0,0 +1,35 @@
+//
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.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://floralicense.org/license/
+//
+// 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.
+//
+
+/**
+ * @file               MpThumbnailEventListener.h
+ * @brief              This is the header file for ThumbnailEventListener class.
+ */
+
+#ifndef _MP_THUMBNAIL_EVENT_LISTENER_H_
+#define _MP_THUMBNAIL_EVENT_LISTENER_H_
+
+#include <FBase.h>
+
+class IThumbnailEventListener
+       : public Tizen::Base::Runtime::IEventListener
+{
+public:
+       virtual ~IThumbnailEventListener(void){}
+       virtual void OnThumbnailReceivedN(Tizen::Base::Runtime::IEventArg& eventArg) = 0;
+};
+
+#endif // _MP_THUMBNAIL_EVENT_LISTENER_H_
diff --git a/inc/MpThumbnailInfo.h b/inc/MpThumbnailInfo.h
new file mode 100755 (executable)
index 0000000..3539d7b
--- /dev/null
@@ -0,0 +1,51 @@
+//
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.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://floralicense.org/license/
+//
+// 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.
+//
+
+/**
+ * @file               MpThumbnailInfo.h
+ * @brief              This is the header file for ThumbnailInfo class.
+ */
+
+#ifndef _MP_THUMBNAIL_INFO_H_
+#define _MP_THUMBNAIL_INFO_H_
+
+#include <FBase.h>
+#include <FContent.h>
+
+class ThumbnailInfo
+       : public Tizen::Base::Object
+{
+public:
+       ThumbnailInfo(void);
+       virtual ~ThumbnailInfo(void);
+
+       void Construct(const Tizen::Content::ContentId& contentId,
+                                       const Tizen::Graphics::Bitmap& bitmap, void* pParam);
+
+       Tizen::Content::ContentId GetContentId(void) const;
+       Tizen::Graphics::Bitmap* GetBitmapN(void) const;
+       void* GetUserParamN(void);
+
+private:
+       Tizen::Graphics::Bitmap* CloneBitmapN(const Tizen::Graphics::Bitmap& bitmap) const;
+
+private :
+       Tizen::Content::ContentId __contentId;
+       const Tizen::Graphics::Bitmap* __pBitmap;
+       void* __pParam;
+};
+
+#endif // _MP_THUMBNAIL_INFO_H_
diff --git a/inc/MpThumbnailJob.h b/inc/MpThumbnailJob.h
new file mode 100755 (executable)
index 0000000..c0a1fb4
--- /dev/null
@@ -0,0 +1,55 @@
+//
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.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://floralicense.org/license/
+//
+// 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.
+//
+
+/**
+ * @file               MpThumbnailJob.h
+ * @brief              This is the header file for ThumbnailJob class.
+ */
+
+#ifndef _MP_THUMBNAIL_JOB_H_
+#define _MP_THUMBNAIL_JOB_H_
+
+#include <FContent.h>
+
+class ThumbnailEvent;
+
+class ThumbnailJob
+       : public Tizen::Base::Object
+{
+public:
+       ThumbnailJob(void);
+       virtual ~ThumbnailJob(void);
+
+       void Construct(const Tizen::Content::ContentId& contentId, const unsigned long requestId,
+                       const ThumbnailEvent* pRequestEvent, void* pParam);
+
+       Tizen::Content::ContentId GetContentId(void) const;
+       unsigned long GetRequestId(void) const;
+       const ThumbnailEvent* GetEvent(void) const;
+       void* GetUserParam(void) const;
+
+private:
+       ThumbnailJob(const ThumbnailJob&);
+       ThumbnailJob& operator = (const ThumbnailJob&);
+
+private:
+       Tizen::Content::ContentId __contentId;
+       unsigned long __requestId;
+       const ThumbnailEvent* __pRequestEvent;
+       void* __pParam;
+};
+
+#endif // _MP_THUMBNAIL_JOB_H_
diff --git a/inc/MpThumbnailProvider.h b/inc/MpThumbnailProvider.h
new file mode 100755 (executable)
index 0000000..797ff68
--- /dev/null
@@ -0,0 +1,78 @@
+//
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.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://floralicense.org/license/
+//
+// 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.
+//
+
+/**
+ * @file               MpThumbnailProvider.h
+ * @brief              This is the header file for ThumbnailProvider class.
+ */
+
+#ifndef _MP_THUMBNAIL_PROVIDER_H_
+#define _MP_THUMBNAIL_PROVIDER_H_
+
+#include <FBase.h>
+#include <FGraphics.h>
+#include "MpIThumbnailProviderHandler.h"
+#include "MpThumbnailInfo.h"
+
+class ThumbnailEvent;
+
+class ThumbnailProvider
+       : IThumbnailProviderHandler
+       , public Tizen::Base::Runtime::EventDrivenThread
+{
+public:
+       static IThumbnailProviderHandler* GetInstance(void);
+
+public:
+       void RequestThumbnail(const Tizen::Content::ContentId& contentId, const ThumbnailEvent* event, void* pParam = null);
+       void CancelThumbnailRequest(const Tizen::Content::ContentId& contentId, const ThumbnailEvent* event);
+       void CancelAllThumbnailRequest(const ThumbnailEvent* event);
+       void ClearThumbnailRequests(void);
+       const Tizen::Graphics::Bitmap* GetDefaultThumbnail(void) const;
+
+       static void Release(void);
+
+private:
+       ThumbnailProvider(void);
+       virtual ~ThumbnailProvider(void);
+       ThumbnailProvider(ThumbnailProvider& value);
+       ThumbnailProvider& operator = (ThumbnailProvider&);
+
+       result Construct(void);
+       void CreateDefaultThumbnailBitmap(void);
+       void DestroyDefaultThumbnailBitmap(void);
+
+       ThumbnailInfo* GetThumbnailInfoN(const Tizen::Content::ContentId& contentId, void* pParam) const;
+       Tizen::Graphics::Bitmap* GetThumbnailByDecodeN(const Tizen::Base::String& filePath, const Tizen::Content::ContentType contentType) const;
+       Tizen::Base::String GetFileNameFromFullPath(const Tizen::Base::String& fullPath, bool withExt) const;
+
+       static result CreateInstance(void);
+       static void DestroyInstance(void);
+
+       virtual void OnUserEventReceivedN(RequestId requestId, Tizen::Base::Collection::IList * pArgs);
+       virtual bool OnStart(void);
+       virtual void OnStop(void);
+
+private:
+       Tizen::Base::Runtime::Mutex* __pMutexCmd;
+       Tizen::Base::Collection::ArrayList* __pCmdQueue;
+       Tizen::Graphics::Bitmap* __pDefaultThumbnail;
+       unsigned long __requestId;
+
+       static ThumbnailProvider* __pThumbnailProviderInstance;
+};
+
+#endif // _MP_THUMBNAIL_PROVIDER_H_
old mode 100755 (executable)
new mode 100644 (file)
index dd15a6b..b369fdf
@@ -1,4 +1,4 @@
-//
+//
 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
 //
 // Licensed under the Flora License, Version 1.0 (the License);
 // limitations under the License.
 //
 
+/**
+ * @file               MpTypes.h
+ * @brief              This is the header file for Types class.
+ */
+
 #ifndef _MP_TYPES_H_
 #define _MP_TYPES_H_
 
@@ -53,8 +58,8 @@ enum IDAFlickButton
        IDA_FLICK_BUTTON_ADD_TO_PALYLIST,
 
        IDA_FLICK_BUTTON_PLAY_ALL = 900,
-    IDA_FLICK_BUTTON_RENAME,
-    IDA_FLICK_BUTTON_DELETE = 910
+       IDA_FLICK_BUTTON_RENAME,
+       IDA_FLICK_BUTTON_DELETE = 910
 };
 
 enum IDADeletePopup
@@ -96,85 +101,99 @@ enum SearchMode
        SEARCH_MODE_ARTIST_ALBUM,
 };
 
-static const int ADD_TO_PLAYLIST_BUTTON_ID   = 0;
+static const int ADD_TO_PLAYLIST_BUTTON_ID = 0;
 
-static const int IDA_CHECK_BUTTON            = 2000;
-static const int IDA_UNCHECK_BUTTON          = 2001;
+static const int IDA_CHECK_BUTTON = 2000;
+static const int IDA_UNCHECK_BUTTON = 2001;
 static const int IDA_CONTEXT_ADD_TO_PLAYLIST = 5000;
-static const int IDA_BUTTON_CANCEL           = 1000;
+static const int IDA_BUTTON_CANCEL = 1000;
 static const int IDA_RENAME_CANCEL_BUTTON = 102;
 
-static const int IDA_SHARE_CONTEXT_MENU_EMAIL   = 300;
+static const int IDA_SHARE_CONTEXT_MENU_EMAIL = 300;
 static const int IDA_SHARE_CONTEXT_MENU_MESSAGE = 301;
-static const int IDA_SET_CONTEXT_MENU_CALL      = 200;
-static const int IDA_SET_CONTEXT_MENU_CALLER    = 201;
+static const int IDA_SET_CONTEXT_MENU_CALL = 200;
+static const int IDA_SET_CONTEXT_MENU_CALLER = 201;
 
-static const int POPUP_ITEM_WIDTH           =  560;
+static const int POPUP_ITEM_WIDTH = 560;
 
-static const int POPUP_WIDTH           =  600;
-static const int POPUP_HEIGHT          =  600;
-static const int H_CANCEL_BUTTON       =  100;
-static const int Y_GAP_CANCEL_BUTTON   =   10;
+static const int POPUP_WIDTH = 600;
+static const int POPUP_HEIGHT = 600;
+static const int H_CANCEL_BUTTON = 100;
+static const int Y_GAP_CANCEL_BUTTON = 10;
 
 static const int W_TABLE_VIEW_ANNEX_STYLE_MARK = 114;
 
-static const int FONT_SIZE_NO_CONTENT  =   40;
-static const int CONTACT_ID            =    2;
-static const int W_NO_CONTENT          =  280;
-static const int H_NO_CONTENT          =  280;
-static const int H_TEXT_NO_CONTENT     =   60;
-static const int Y_GAP_NO_CONTENT      =  280;
-static const int X_GAP_CONTEXT_ITME    =   10;
-static const int Y_GAP_CONTEXT_ITEM    =   25;
-static const int W_CONTEXT_ITME        =  656;
-static const int W_THUMBNAIL           =  112;
-static const int H_THUMBNAIL           =  112;
-static const int X_GAP_THUMBNAIL       =   16;
-static const int Y_GAP_THUMBNAIL       =    8;
-static const int W_TABLE_VIEW_MARK     =  118;
-static const int ICON_TOTAL_CONUT      =   16;
-static const int HEAD_ITEM_COUNT       =    8;
-static const int FONT_SIZE             =   30;
-static const int INIT_VALUE            =    0;
-static const int MAIN_TEXT_SIZE        =   36;
-static const int SUB_TEXT_SIZE         =   32;
-static const int SEARCH_PAGE_NO        =    1;
-static const int SEARCH_COUNT_PER_PAGE =  30000;
-static const int ITEM_HEIGHT           =  128;
-static const int STRING_LENGTH         =   90;
-static const int H_NOW_PLAY_BAR        =  120;
-static const int W_NOW_PLAY_BAR        =  720;
-static const int H_SELECT_ALL_BUTTON   =  120;
-static const int H_CHECKED_COUNT_LABEL =   48;
-static const int WIDTH                 =  720;
-static const int W_CLIENT_AREA          = 720;
-static const int HEIGHT                = (1280 - (108 + 114 + 50));//Header : 108, Footer : 104, Indicator : 50
-
-static const Tizen::Base::String STRING_SORT_TITLE     = L"Title";
-static const Tizen::Base::String STRING_SORT_ARTIST    = L"Artist";
-static const Tizen::Base::String STRING_SORT_GENRE     = L"Genre";
-static const Tizen::Base::String STRING_SORT_COMPOSER  = L"Composer";
-static const Tizen::Base::String STRING_SORT_ALBUM     = L"Album";
-static const Tizen::Base::String STRING_SORT_YEAR      = L"Year";
+static const int FONT_SIZE_NO_CONTENT = 40;
+static const int CONTACT_ID = 2;
+static const int W_NO_CONTENT = 280;
+static const int H_NO_CONTENT = 280;
+static const int H_TEXT_NO_CONTENT = 60;
+static const int Y_GAP_NO_CONTENT = 280;
+static const int X_GAP_CONTEXT_ITME = 10;
+static const int Y_GAP_CONTEXT_ITEM = 25;
+static const int W_CONTEXT_ITME = 656;
+static const int W_THUMBNAIL = 112;
+static const int H_THUMBNAIL = 112;
+static const int X_GAP_THUMBNAIL = 16;
+static const int Y_GAP_THUMBNAIL = 8;
+static const int W_TABLE_VIEW_MARK = 118;
+static const int ICON_TOTAL_CONUT = 16;
+static const int HEAD_ITEM_COUNT = 8;
+static const int FONT_SIZE = 30;
+static const int INIT_VALUE = 0;
+static const int MAIN_TEXT_SIZE = 36;
+static const int SUB_TEXT_SIZE = 32;
+static const int SEARCH_PAGE_NO = 1;
+static const int SEARCH_COUNT_PER_PAGE = 30000;
+static const int ITEM_HEIGHT = 128;
+static const int STRING_LENGTH = 90;
+static const int H_NOW_PLAY_BAR = 120;
+static const int W_NOW_PLAY_BAR = 720;
+static const int H_SELECT_ALL_BUTTON = 120;
+static const int H_CHECKED_COUNT_LABEL = 48;
+static const int WIDTH = 720;
+static const int W_CLIENT_AREA = 720;
+static const int HEIGHT = (1280 - (108 + 114 + 50));//Header : 108, Footer : 104, Indicator : 50
+
+static const int INDEX_FOOTER_DELETE = 0;
+static const int INDEX_FOOTER_SHARE = 1;
+static const int INDEX_FOOTER_ADDTOPLATLIST = 2;
+static const int INDEX_FOOTER_EDIT = 0;
+
+static const int INDEX_ADDTOPLAYLIST_FOOTER_ADDTOPLAYLIST = 0;
+
+static const int INDEX_EDITCONTENTLIST_FOOTER_EDIT = 0;
+static const int INDEX_EDITCONTENTLIST_FOOTER_SEARCH = 1;
+
+static const int INDEX_EDIT_FOOTER_EDIT = 0;
+
+static const long ID_DESTORY_PLAY_LIST_PICKER_POPUP = 0;
+
+static const Tizen::Base::String STRING_SORT_TITLE = L"Title";
+static const Tizen::Base::String STRING_SORT_ARTIST = L"Artist";
+static const Tizen::Base::String STRING_SORT_GENRE = L"Genre";
+static const Tizen::Base::String STRING_SORT_COMPOSER = L"Composer";
+static const Tizen::Base::String STRING_SORT_ALBUM = L"Album";
+static const Tizen::Base::String STRING_SORT_YEAR = L"Year";
 static const Tizen::Base::String STRING_SORT_FILE_NAME = L"ContentFileName";
-static const Tizen::Base::String STRING_UNKNOWN        = L"Unknown";
-static const Tizen::Base::String STRING_SORT_GAP       = L"";
-static const Tizen::Base::String STRING_ITEM_DELETE    = L"itemDelete";
+static const Tizen::Base::String STRING_UNKNOWN = L"Unknown";
+static const Tizen::Base::String STRING_SORT_GAP = L"";
+static const Tizen::Base::String STRING_ITEM_DELETE = L"itemDelete";
 
-static const Tizen::Base::String STORAGE_SDCARD_BITMAP   = L"T02_memory card_01.png";
-static const Tizen::Base::String STORAGE_PHONE_BITMAP    = L"T02_phone_01.png";
+static const Tizen::Base::String STORAGE_SDCARD_BITMAP = L"T02_memory card_01.png";
+static const Tizen::Base::String STORAGE_PHONE_BITMAP = L"T02_phone_01.png";
 static const Tizen::Base::String STORAGE_EXTERNAL_BITMAP = L"T02_external_storage_01.png";
-static const Tizen::Base::String NO_CONTENT_BITMAP       = L"T02_nocomposers.png";
+static const Tizen::Base::String NO_CONTENT_BITMAP = L"T02_nocomposers.png";
 
 static const Tizen::Base::String IDS_BLANK = L"";
-static const Tizen::Base::String IDS_COLON  = L":";
+static const Tizen::Base::String IDS_COLON = L":";
 static const Tizen::Base::String IDS_PERIOD = L".";
 static const Tizen::Base::String MUSIC = L"Music";
 static const Tizen::Base::String INITIAL_TIME = L"00:00";
-
-static const Tizen::Base::String RENAME_EDIT_AREA     = L"RenameEditArea";
+extern const Tizen::Base::String IDS_ALBUM_CONTENT_COUNT;
+static const Tizen::Base::String RENAME_EDIT_AREA = L"RenameEditArea";
 static const Tizen::Base::String RENAME_CALCEL_BUTTON = L"RenameCancelButton";
-static const Tizen::Base::String RENAME_BG_LABEL      = L"RenameBgLabel";
+static const Tizen::Base::String RENAME_BG_LABEL = L"RenameBgLabel";
 
 static const Tizen::Base::String APPCONTROL_KEY_ATTACHMENTS = L"attachments";
 static const Tizen::Base::String APPCONTROL_KEY_RETURNTYPE = L"returnType";
@@ -184,17 +203,23 @@ static const Tizen::Base::String APPCONTROL_KEY_VALUE = L"value";
 static const Tizen::Base::String APPCONTROL_KEY_SINGLE_MODE = L"selectionMode";
 static const Tizen::Base::String APPCONTROL_VALUE_SINGLE = L"single";
 
+static const Tizen::Base::String SHARE_BUTTON_NAME = L"ShareButton";
+static const Tizen::Base::String SET_BUTTON_NAME = L"SetButton";
+
 static const int H_INITIAL_PANEL = 10;
 static const int W_INITIAL_PANEL = 10;
 
-static const Tizen::Graphics::Color COLOR_MAIN_TEXT  (  0,  0,  0);
-static const Tizen::Graphics::Color COLOR_SUB_TEXT   (124,124,124);
-static const Tizen::Graphics::Color COLOR_LABEL_BG   (136,136,136);
-static const Tizen::Graphics::Color COLOR_SELECT_ALL (255,255,255);
-static const Tizen::Graphics::Color COLOR_SMALL_POPUP(215,225,232);
-static const Tizen::Graphics::Color COLOR_ITEM       (255,255,255);
+static const Tizen::Graphics::Color COLOR_MAIN_TEXT (0, 0, 0);
+static const Tizen::Graphics::Color COLOR_SUB_TEXT (124, 124, 124);
+static const Tizen::Graphics::Color COLOR_LABEL_BG (136, 136, 136);
+static const Tizen::Graphics::Color COLOR_SELECT_ALL (255, 255, 255);
+static const Tizen::Graphics::Color COLOR_SMALL_POPUP (215, 225, 232);
+static const Tizen::Graphics::Color COLOR_ITEM (255, 255, 255);
 
-static const int DEF_TOOL_BAR_END  = (IDA_FOOTER_BUTTON_BACK - IDA_FOOTER_BUTTON_EDIT) + 1;
+extern const unsigned int COLOR_PANEL_BACKGROUND_GRAY_BLUE;
+extern const unsigned int COLOR_WHITE;
+
+static const int DEF_TOOL_BAR_END = (IDA_FOOTER_BUTTON_BACK - IDA_FOOTER_BUTTON_EDIT) + 1;
 static const int MINUS_ONE = -1;
 
 extern const wchar_t* SECTION_MUSIC_SETTING;
@@ -217,19 +242,22 @@ extern const wchar_t* TIZEN_APPCONTORL_PROVIDER_AUDIO;                                            // Provider Id
 extern const wchar_t* TIZEN_APPCONTROL_OPERATION_PLAY;                                         // Operation Id
 extern const wchar_t* TIZEN_APPCONTROL_OPERATION_VIEW;
 
+extern const wchar_t* IDL_CONTENT_FORM;
+
 static const int TIMER_INTERVAL = 100;
 static const int MIN_REWIND_POSITION = 2;
 
 static const Tizen::Base::String OPERATION_ID_COMPOSE = L"http://tizen.org/appcontrol/operation/compose";
-static const Tizen::Base::String PROVIDER_ID_MESSAGE  = L"tizen.message";
-static const Tizen::Base::String PROVIDER_ID_EMAIL    = L"tizen.email";
-static const Tizen::Base::String CALL_RINGTONE_KEY    = L"http://tizen.org/setting/sound.ringtone";
-static const Tizen::Base::String MEDIA_VOLUME            = L"http://tizen.org/setting/sound.media.volume";
-static const Tizen::Base::String TIZEN_APPCONTROL_OPERATION_PICK   = L"http://tizen.org/appcontrol/operation/pick";
-static const Tizen::Base::String DATABASE_PATH   = L"data/PlaylistDb";
+static const Tizen::Base::String PROVIDER_ID_MESSAGE = L"tizen.message";
+static const Tizen::Base::String PROVIDER_ID_EMAIL = L"tizen.email";
+static const Tizen::Base::String CALL_RINGTONE_KEY = L"http://tizen.org/setting/sound.ringtone";
+static const Tizen::Base::String MEDIA_VOLUME = L"http://tizen.org/setting/sound.media.volume";
+static const Tizen::Base::String TIZEN_APPCONTROL_OPERATION_PICK = L"http://tizen.org/appcontrol/operation/pick";
+static const Tizen::Base::String DATABASE_PATH = L"data/PlaylistDb";
 static const Tizen::Base::String TIZEN_APPCONTROL_PROVIDER_CONTACT = L"tizen.contacts";
 static const Tizen::Base::String SELECTION_MODE = L"selectionMode:single";
-static const Tizen::Base::String RETURN_TYPE    = L"returnType:contactId";
+static const Tizen::Base::String RETURN_TYPE = L"returnType:contactId";
+
+static const Tizen::Base::String CONTENT_FORM_REQUSEST_ID = L"ContentFormRequestId";
 
-static const Tizen::Base::String CONTENT_FORM_REQUSEST_ID  = L"ContentFormRequestId";
-#endif // _MP_TYPES_H_
+#endif // _MP_TYPES_H_
\ No newline at end of file
index a1cf60e..616fe62 100755 (executable)
@@ -1,4 +1,4 @@
-//
+//
 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
 //
 // Licensed under the Flora License, Version 1.0 (the License);
 // limitations under the License.
 //
 
+/**
+ * @file               MpUserPlaylistContentListForm.h
+ * @brief              This is the header file for UserPlaylistContentListForm class.
+ */
+
 #ifndef _MP_USER_PLAYLIST_CONTENT_LIST_FORM_H_
 #define _MP_USER_PLAYLIST_CONTENT_LIST_FORM_H_
 
-#include <FBase.h>
-#include <FUi.h>
-#include <FApp.h>
-#include <FSystem.h>
-#include <FIo.h>
-
-#include "MpSceneRegister.h"
-#include "MpResourceManager.h"
-#include "MpCommonUtil.h"
+#include "MpContentListForm.h"
+#include "MpThumbnailBase.h"
 
 class NowPlayContentPanel;
-class ContentListPresentationModel;
+class PlaylistListPresentationModel;
 
 class UserPlaylistContentListForm
-       : public Tizen::Ui::Controls::Form
-       , public Tizen::Ui::Controls::ITableViewItemProvider
-       , public Tizen::Ui::Controls::ITableViewItemEventListener
-       , public Tizen::Ui::Controls::IFormBackEventListener
-       , public Tizen::Ui::IActionEventListener
-       , public Tizen::Ui::Scenes::ISceneEventListener
+       : public ContentListForm
+       , public ThumbnailBase
 {
 public:
        UserPlaylistContentListForm(void);
        ~UserPlaylistContentListForm(void);
-       bool Initialize(void);
 
        virtual result OnInitializing(void);
        virtual result OnTerminating(void);
        virtual void OnActionPerformed(const Tizen::Ui::Control& source, int actionId);
 
        virtual void OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previousSceneId,
-                                                                  const Tizen::Ui::Scenes::SceneId& currentSceneId,
-                                                                  Tizen::Base::Collection::IList* pArgs);
+                                                                       const Tizen::Ui::Scenes::SceneId& currentSceneId,
+                                                                       Tizen::Base::Collection::IList* pArgs);
 
        virtual void OnSceneDeactivated(const Tizen::Ui::Scenes::SceneId& currentSceneId,
                                                                        const Tizen::Ui::Scenes::SceneId& nextSceneId);
 
        virtual int GetItemCount(void);
-    
-    virtual Tizen::Ui::Controls::TableViewItem* CreateItem(const int itemIndex, int itemWidth);
-    virtual bool DeleteItem(const int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem);
-    virtual void UpdateItem(int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem);
-    virtual int GetDefaultItemHeight(void);
+       virtual void UpdateItem(int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem);
+       virtual Tizen::Ui::Controls::TableViewItem* CreateItem(const int itemIndex, int itemWidth);
+       virtual void OnTableViewItemStateChanged(Tizen::Ui::Controls::TableView& tableView,
+                                                       int itemIndex,
+                                                       Tizen::Ui::Controls::TableViewItem* pItem,
+                                                       Tizen::Ui::Controls::TableViewItemStatus status);
+       virtual void OnTableViewContextItemActivationStateChanged(Tizen::Ui::Controls::TableView& tableView,
+                                                                       int itemIndex,
+                                                                       Tizen::Ui::Controls::TableViewContextItem* pContextItem,
+                                                                       bool activated);
 
-    virtual void OnTableViewItemStateChanged(Tizen::Ui::Controls::TableView& tableView,
-                                             int itemIndex,
-                                             Tizen::Ui::Controls::TableViewItem* pItem,
-                                             Tizen::Ui::Controls::TableViewItemStatus status);
-    virtual void OnTableViewContextItemActivationStateChanged(Tizen::Ui::Controls::TableView& tableView,
-                                                              int itemIndex,
-                                                              Tizen::Ui::Controls::TableViewContextItem* pContextItem,
-                                                              bool activated);
-    virtual void OnTableViewItemReordered(Tizen::Ui::Controls::TableView& tableView,
-                                          int itemIndexFrom,
-                                          int itemIndexTo);
-    virtual void OnFormBackRequested(Tizen::Ui::Controls::Form& source);
+       virtual void OnFormBackRequested(Tizen::Ui::Controls::Form& source);
+       virtual void OnThumbnailInfoReveivedN(ThumbnailInfo* pThumbnailInfo);
+       virtual void OnUserEventReceivedN(RequestId requestId, Tizen::Base::Collection::IList* pArgs);
 
 private:
        void SetFooterStyle(void);
-       Tizen::Base::String GetContentNameInfo(const Tizen::Content::AudioContentInfo& info,
-                                                                                const Tizen::Base::String& SceneId);
-       result PlaylistCreateTableViewItem(Tizen::Ui::Container& parent, const ContentInformationStruct& contentInfoStruct);
+       result CreateTableViewItem(Tizen::Ui::Container& parent, const ContentInformation& contentInfoStruct);
+       void ToggleViewMode(bool editMode);
 
 private:
+       Tizen::Graphics::Bitmap* __pThumbnail;
        bool __deletedItem;
-       Tizen::Base::String* __pStrSceneId;
-       Tizen::Base::String* __pStrContentName;
-       Tizen::Ui::Controls::TableView* __pContentTableView;
-       ContentListPresentationModel* __pPresentationModel;
-       NowPlayContentPanel* __pNowPlayContentPanel;
-       Tizen::Ui::Controls::Label* __pNoContentImageLabel;
-       Tizen::Ui::Controls::Label* __pNoContentTextLabel;
+       PlaylistListPresentationModel* __pPresentationModel;
 };
 
-
-#endif // _MP_USER_PLAYLIST_CONTENT_LIST_FORM_H_
+#endif // _MP_USER_PLAYLIST_CONTENT_LIST_FORM_H_
\ No newline at end of file
diff --git a/inc/MpYearContentListForm.h b/inc/MpYearContentListForm.h
new file mode 100755 (executable)
index 0000000..6b5715f
--- /dev/null
@@ -0,0 +1,69 @@
+//
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.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://floralicense.org/license/
+//
+// 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.
+//
+
+/**
+ * @file               MpYearContentListForm.h
+ * @brief              This is the header file for YearContentListForm class.
+ */
+
+#ifndef _MP_YEAR_CONTENT_LIST_FORM_H_
+#define _MP_YEAR_CONTENT_LIST_FORM_H_
+
+#include "MpContentListForm.h"
+#include "MpThumbnailBase.h"
+
+class YearListPresentationModel;
+
+class YearContentListForm
+       : public ContentListForm
+       , public ThumbnailBase
+       , public Tizen::App::IAppControlResponseListener
+{
+public:
+       YearContentListForm(void);
+       ~YearContentListForm(void);
+
+       virtual result OnInitializing(void);
+       virtual result OnTerminating(void);
+       virtual void OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previousSceneId,
+                                                                       const Tizen::Ui::Scenes::SceneId& currentSceneId,
+                                                                       Tizen::Base::Collection::IList* pArgs);
+       virtual void OnSceneDeactivated(const Tizen::Ui::Scenes::SceneId& currentSceneId,
+                                                                       const Tizen::Ui::Scenes::SceneId& nextSceneId);
+       virtual void OnActionPerformed(const Tizen::Ui::Control& source, int actionId);
+       virtual int GetItemCount(void);
+       virtual void UpdateItem(int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem);
+       virtual Tizen::Ui::Controls::TableViewItem* CreateItem(const int itemIndex, int itemWidth);
+       virtual void OnTableViewItemStateChanged(Tizen::Ui::Controls::TableView& tableView, int itemIndex,
+                                                       Tizen::Ui::Controls::TableViewItem* pItem,
+                                                       Tizen::Ui::Controls::TableViewItemStatus status);
+
+       virtual void OnAppControlCompleteResponseReceived(const Tizen::App::AppId& appId,
+                               const Tizen::Base::String& operationId, Tizen::App::AppCtrlResult appControlResult,
+                               const Tizen::Base::Collection::IMap* pExtraData);
+       virtual void OnThumbnailInfoReveivedN(ThumbnailInfo* pThumbnailInfo);
+       virtual void OnUserEventReceivedN(RequestId requestId, Tizen::Base::Collection::IList* pArgs);
+
+private:
+       result CreateTableViewItem(Tizen::Ui::Container& parent, const ContentInformation& contentInfo);
+       Tizen::Base::Collection::ArrayList* MakePlayerSceneParam(int startIndex);
+       void ToggleViewMode(bool editMode);
+
+private:
+       Tizen::Graphics::Bitmap* __pThumbnail;
+       YearListPresentationModel* __pPresentationModel;
+};
+#endif // _MP_YEAR_CONTENT_LIST_FORM_H_
\ No newline at end of file
index 9d4ad3a..06899a9 100755 (executable)
@@ -1,4 +1,4 @@
-//
+//
 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
 //
 // Licensed under the Flora License, Version 1.0 (the License);
 // limitations under the License.
 //
 
+/**
+ * @file               MpYearContentPickerPanel.h
+ * @brief              This is the header file for YearContentPickerPanel class.
+ */
+
 #ifndef _MP_YEAR_CONTENT_PICKER_PANEL_H_
 #define _MP_YEAR_CONTENT_PICKER_PANEL_H_
 
@@ -29,8 +34,8 @@ class YearContentPickerPanel
        , public Tizen::Ui::Scenes::ISceneEventListener
 {
 public:
-       YearContentPickerPanel();
-       ~YearContentPickerPanel();
+       YearContentPickerPanel(void);
+       ~YearContentPickerPanel(void);
        bool Initialize(void);
 
        virtual result OnInitializing(void);
@@ -38,29 +43,29 @@ public:
        virtual void OnActionPerformed(const Tizen::Ui::Control& source, int actionId);
 
        virtual void OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previousSceneId,
-                                                                  const Tizen::Ui::Scenes::SceneId& currentSceneId,
-                                                                  Tizen::Base::Collection::IList* pArgs);
+                                                                       const Tizen::Ui::Scenes::SceneId& currentSceneId,
+                                                                       Tizen::Base::Collection::IList* pArgs);
        virtual void OnSceneDeactivated(const Tizen::Ui::Scenes::SceneId& currentSceneId,
                                                                        const Tizen::Ui::Scenes::SceneId& nextSceneId);
 
-
        virtual int GetItemCount(void);
-    virtual Tizen::Ui::Controls::TableViewItem* CreateItem(const int itemIndex, int itemWidth);
-    virtual bool DeleteItem(const int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem);
-    virtual void UpdateItem(int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem);
-    virtual int GetDefaultItemHeight(void);
+       virtual Tizen::Ui::Controls::TableViewItem* CreateItem(const int itemIndex, int itemWidth);
+       virtual bool DeleteItem(const int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem);
+       virtual void UpdateItem(int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem);
+       virtual int GetDefaultItemHeight(void);
+
+       virtual void OnTableViewItemStateChanged(Tizen::Ui::Controls::TableView& tableView,
+                                                       int itemIndex,
+                                                       Tizen::Ui::Controls::TableViewItem* pItem,
+                                                       Tizen::Ui::Controls::TableViewItemStatus status);
+       virtual void OnTableViewContextItemActivationStateChanged(Tizen::Ui::Controls::TableView& tableView,
+                                                                       int itemIndex,
+                                                                       Tizen::Ui::Controls::TableViewContextItem* pContextItem,
+                                                                       bool activated);
+       virtual void OnTableViewItemReordered(Tizen::Ui::Controls::TableView& tableView,
+                                               int itemIndexFrom,
+                                               int itemIndexTo);
 
-    virtual void OnTableViewItemStateChanged(Tizen::Ui::Controls::TableView& tableView,
-                                             int itemIndex,
-                                             Tizen::Ui::Controls::TableViewItem* pItem,
-                                             Tizen::Ui::Controls::TableViewItemStatus status);
-    virtual void OnTableViewContextItemActivationStateChanged(Tizen::Ui::Controls::TableView& tableView,
-                                                              int itemIndex,
-                                                              Tizen::Ui::Controls::TableViewContextItem* pContextItem,
-                                                              bool activated);
-    virtual void OnTableViewItemReordered(Tizen::Ui::Controls::TableView& tableView,
-                                          int itemIndexFrom,
-                                          int itemIndexTo);
 private:
        int __checkedItemCount;
        Tizen::Ui::Controls::TableView* __pContentTableView;
@@ -69,4 +74,4 @@ private:
        YearListPresentationModel* __pPresentationModel;
 };
 
-#endif //_MP_YEAR_CONTENT_PICKER_PANEL_H_
+#endif // _MP_YEAR_CONTENT_PICKER_PANEL_H_
\ No newline at end of file
index 5920296..0dccbca 100755 (executable)
@@ -1,4 +1,4 @@
-//
+//
 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
 //
 // Licensed under the Flora License, Version 1.0 (the License);
 // limitations under the License.
 //
 
+/**
+ * @file               MpYearListEditorPanel.h
+ * @brief              This is the header file for YearListEditorPanel class.
+ */
+
 #ifndef _MP_YEARS_LIST_EDITOR_PANEL_H_
 #define _MP_YEARS_LIST_EDITOR_PANEL_H_
 
-#include "MpYearListPresentationModel.h"
-#include "MpTypes.h"
-#include "MpSceneRegister.h"
 #include "MpBasePanel.h"
+#include "MpSceneRegister.h"
+#include "MpThumbnailBase.h"
+#include "MpTypes.h"
+#include "MpYearListPresentationModel.h"
 
 class PlayListPickerPopup;
 
 class YearsListEditorPanel
        : public BasePanel
+       , public ThumbnailBase
        , public Tizen::Ui::Controls::ITableViewItemProvider
        , public Tizen::Ui::Controls::ITableViewItemEventListener
        , public Tizen::Ui::IActionEventListener
@@ -41,42 +48,44 @@ public:
        virtual void OnActionPerformed(const Tizen::Ui::Control& source, int actionId);
 
        virtual void OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previousSceneId,
-                                                                  const Tizen::Ui::Scenes::SceneId& currentSceneId, Tizen::Base::Collection::IList* pArgs);
+                                                                       const Tizen::Ui::Scenes::SceneId& currentSceneId, Tizen::Base::Collection::IList* pArgs);
        virtual void OnSceneDeactivated(const Tizen::Ui::Scenes::SceneId& currentSceneId,
                                                                        const Tizen::Ui::Scenes::SceneId& nextSceneId);
 
-
        virtual int GetItemCount(void);
     
-    virtual Tizen::Ui::Controls::TableViewItem* CreateItem(const int itemIndex, int itemWidth);
-    virtual bool DeleteItem(const int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem);
-    virtual void UpdateItem(int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem);
-    virtual int GetDefaultItemHeight(void);
+       virtual Tizen::Ui::Controls::TableViewItem* CreateItem(const int itemIndex, int itemWidth);
+       virtual bool DeleteItem(const int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem);
+       virtual void UpdateItem(int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem);
+       virtual int GetDefaultItemHeight(void);
 
-    virtual void OnTableViewItemStateChanged(Tizen::Ui::Controls::TableView& tableView,
-                                             int itemIndex,
-                                             Tizen::Ui::Controls::TableViewItem* pItem,
-                                             Tizen::Ui::Controls::TableViewItemStatus status);
-    virtual void OnTableViewContextItemActivationStateChanged(Tizen::Ui::Controls::TableView& tableView,
-                                                              int itemIndex,
-                                                              Tizen::Ui::Controls::TableViewContextItem* pContextItem,
-                                                              bool activated);
-    virtual void OnTableViewItemReordered(Tizen::Ui::Controls::TableView& tableView,
-                                          int itemIndexFrom,
-                                          int itemIndexTo);
-    virtual void OnUpdateContentList(void);
+       virtual void OnTableViewItemStateChanged(Tizen::Ui::Controls::TableView& tableView,
+                                                       int itemIndex,
+                                                       Tizen::Ui::Controls::TableViewItem* pItem,
+                                                       Tizen::Ui::Controls::TableViewItemStatus status);
+       virtual void OnTableViewContextItemActivationStateChanged(Tizen::Ui::Controls::TableView& tableView,
+                                                                       int itemIndex,
+                                                                       Tizen::Ui::Controls::TableViewContextItem* pContextItem,
+                                                                       bool activated);
+       virtual void OnTableViewItemReordered(Tizen::Ui::Controls::TableView& tableView,
+                                               int itemIndexFrom,
+                                               int itemIndexTo);
+       virtual void OnUpdateContentList(void);
+
+       virtual void OnThumbnailInfoReveivedN(ThumbnailInfo* pThumbnailInfo);
+       virtual void OnUserEventReceivedN(RequestId requestId, Tizen::Base::Collection::IList* pArgs);
 
 private:
-    void UpdateContentList(void);
+       void UpdateContentList(void);
 
 protected:
        Tizen::Ui::Controls::TableView* __pContentTableView;
        Tizen::Ui::Controls::CheckButton* __pSelectAllCheckedButton;
        Tizen::Ui::Controls::Label* __pCheckedCountLabel;
+       Tizen::Graphics::Bitmap* __pThumbnail;
        int __checkedItemCount;
        PlayListPickerPopup* __pPlayListPickerPopup;
        YearListPresentationModel* __pPresentationModel;
 };
 
-
-#endif // _MP_YEARS_LIST_EDITOR_PANEL_H_
+#endif // _MP_YEARS_LIST_EDITOR_PANEL_H_
\ No newline at end of file
index 8764f88..0448d42 100755 (executable)
@@ -1,4 +1,4 @@
-//
+//
 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
 //
 // Licensed under the Flora License, Version 1.0 (the License);
 // limitations under the License.
 //
 
+/**
+ * @file               MpYearListPanel.h
+ * @brief              This is the header file for YearListPanel class.
+ */
+
 #ifndef _MP_YEARS_LIST_PANEL_H_
 #define _MP_YEARS_LIST_PANEL_H_
 
 #include <new>
 #include <FApp.h>
+#include <FCntAudioContentInfo.h>
 #include <FSocial.h>
 #include <FUi.h>
 #include <FUiScenes.h>
-#include <FCntAudioContentInfo.h>
-
+#include "MpBasePanel.h"
+#include "MpSceneRegister.h"
+#include "MpThumbnailBase.h"
 #include "MpTypes.h"
 #include "MpYearListPresentationModel.h"
-#include "MpSceneRegister.h"
-#include "MpBasePanel.h"
 
 class PlayListPickerPopup;
 class NowPlayContentPanel;
 
 class YearsListPanel
        : public BasePanel
+       , public ThumbnailBase
        , public Tizen::Ui::Controls::ITableViewItemProvider
        , public Tizen::Ui::Controls::ITableViewItemEventListener
        , public Tizen::Ui::Controls::IFastScrollListener
@@ -51,33 +57,35 @@ public:
        virtual void OnActionPerformed(const Tizen::Ui::Control& source, int actionId);
 
        virtual void OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previousSceneId,
-                                                                  const Tizen::Ui::Scenes::SceneId& currentSceneId, Tizen::Base::Collection::IList* pArgs);
+                                                                       const Tizen::Ui::Scenes::SceneId& currentSceneId, Tizen::Base::Collection::IList* pArgs);
        virtual void OnSceneDeactivated(const Tizen::Ui::Scenes::SceneId& currentSceneId,
                                                                        const Tizen::Ui::Scenes::SceneId& nextSceneId);
 
-
        virtual int GetItemCount(void);
     
-    virtual Tizen::Ui::Controls::TableViewItem* CreateItem(const int itemIndex, int itemWidth);
-    virtual bool DeleteItem(const int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem);
-    virtual void UpdateItem(int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem);
-    virtual int GetDefaultItemHeight(void);
+       virtual Tizen::Ui::Controls::TableViewItem* CreateItem(const int itemIndex, int itemWidth);
+       virtual bool DeleteItem(const int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem);
+       virtual void UpdateItem(int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem);
+       virtual int GetDefaultItemHeight(void);
+
+       virtual void OnTableViewItemStateChanged(Tizen::Ui::Controls::TableView& tableView,
+                                                       int itemIndex,
+                                                       Tizen::Ui::Controls::TableViewItem* pItem,
+                                                       Tizen::Ui::Controls::TableViewItemStatus status);
+       virtual void OnTableViewContextItemActivationStateChanged(Tizen::Ui::Controls::TableView& tableView,
+                                                                       int itemIndex,
+                                                                       Tizen::Ui::Controls::TableViewContextItem* pContextItem,
+                                                                       bool activated);
+       virtual void OnTableViewItemReordered(Tizen::Ui::Controls::TableView& tableView,
+                                               int itemIndexFrom,
+                                               int itemIndexTo);
 
-    virtual void OnTableViewItemStateChanged(Tizen::Ui::Controls::TableView& tableView,
-                                             int itemIndex,
-                                             Tizen::Ui::Controls::TableViewItem* pItem,
-                                             Tizen::Ui::Controls::TableViewItemStatus status);
-    virtual void OnTableViewContextItemActivationStateChanged(Tizen::Ui::Controls::TableView& tableView,
-                                                              int itemIndex,
-                                                              Tizen::Ui::Controls::TableViewContextItem* pContextItem,
-                                                              bool activated);
-    virtual void OnTableViewItemReordered(Tizen::Ui::Controls::TableView& tableView,
-                                          int itemIndexFrom,
-                                          int itemIndexTo);
+       virtual void OnFastScrollIndexSelected(Tizen::Ui::Control& source, Tizen::Base::String& index);
+       virtual void OnFormBackRequested(Tizen::Ui::Controls::Form& source);
+       virtual void OnUpdateContentList(void);
 
-    virtual void OnFastScrollIndexSelected(Tizen::Ui::Control& source, Tizen::Base::String& index);
-    virtual void OnFormBackRequested(Tizen::Ui::Controls::Form& source);
-    virtual void OnUpdateContentList(void);
+       virtual void OnThumbnailInfoReveivedN(ThumbnailInfo* pThumbnailInfo);
+       virtual void OnUserEventReceivedN(RequestId requestId, Tizen::Base::Collection::IList* pArgs);
 
 private:
        Tizen::Base::Collection::ArrayList* GetContentListN(int itemIndex);
@@ -91,8 +99,8 @@ protected:
        Tizen::Ui::Controls::TableView* __pContentTableView;
        Tizen::Ui::Controls::Label* __pNoContentImageLabel;
        Tizen::Ui::Controls::Label* __pNoContentTextLabel;
+       Tizen::Graphics::Bitmap* __pThumbnail;
        YearListPresentationModel* __pPresentationModel;
 };
 
-
-#endif // _MP_YEARS_LIST_PANEL_H_
+#endif // _MP_YEARS_LIST_PANEL_H_
\ No newline at end of file
index faf83ab..8445fdf 100755 (executable)
@@ -1,4 +1,4 @@
-//
+//
 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
 //
 // Licensed under the Flora License, Version 1.0 (the License);
 // limitations under the License.
 //
 
+/**
+ * @file               MpYearListPresentationModel.h
+ * @brief              This is the header file for YearListPresentationModel class.
+ */
+
 #ifndef _MP_YEAR_LIST_PRESENTATION_MODEL_H_
 #define _MP_YEAR_LIST_PRESENTATION_MODEL_H_
 
-#include "MpTypes.h"
 #include "MpCommonUtil.h"
 #include "MpContentInformationStruct.h"
+#include "MpTypes.h"
 
 class YearListPresentationModel
 {
 public:
-    static YearListPresentationModel* GetInstance(void);
+       static YearListPresentationModel* GetInstance(void);
+
+       int GetContentCount(int yearIndex);
+       int GetAllYearCount(void);
+       ContentInformation* GetYearInfoN(int yearIndex);
+       void InitializeContentList(int yearIndex);
+       ContentInformation* GetContentInfoN(int contentIndex);
+       Tizen::Base::String* GetYearName(int yearIndex);
+       Tizen::Base::Collection::ArrayList* GetContentPathListN(int yearIndex);
+       void RefreshContentList(int yearIndex);
+       int GetCurrentYearIndex(void);
+       void AddContent(Tizen::Base::String path, int playlistIndex);
+       result UpdateYearList(void);
 
-    int GetTotalContentCount(int index);
-    int GetTotalYearCount(void);
-    int GetSongContentCount(void);
-
-    void RefreshContent(void);
-    void SearchSong(int index);
-
-    Tizen::Base::String* GetContentName(int index);
-
-    ContentInformationStruct* GetContentInfoN(int index);
-    ContentInformationStruct* GetSongContentInfoN(int index);
+private:
+       YearListPresentationModel(void);
+       YearListPresentationModel(const YearListPresentationModel& YearListPresentationModel);
+       const YearListPresentationModel& operator = (const YearListPresentationModel& YearListPresentationModel);
+       ~YearListPresentationModel(void);
+       result Construct(void);
 
-    Tizen::Base::Collection::ArrayList* SearchContentItemN(int index);
 private:
-    YearListPresentationModel(void);
-    YearListPresentationModel(const YearListPresentationModel& YearListPresentationModel);
-    const YearListPresentationModel& operator = (const YearListPresentationModel& YearListPresentationModel);
-    ~YearListPresentationModel(void);
-    result Construct(void);
-
-    Tizen::Base::Collection::IList* __pYearList;
-    Tizen::Base::Collection::IList* __pSongList;
-    static YearListPresentationModel* pYearListPresentationModelInstance;
+       Tizen::Base::Collection::IList* __pYearList;
+       Tizen::Base::Collection::IList* __pContentList;
+       static YearListPresentationModel* pYearListPresentationModelInstance;
+       int __currentYearIndex;
 };
 
-#endif // _MP_YEAR_LIST_PRESENTATION_MODEL_H_
+#endif // _MP_YEAR_LIST_PRESENTATION_MODEL_H_
\ No newline at end of file
index 3a1b4b3..dd08f64 100755 (executable)
@@ -1,4 +1,4 @@
-//
+//
 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
 //
 // Licensed under the Flora License, Version 1.0 (the License);
 // limitations under the License.
 //
 
+/**
+ * @file               MpYearPickerPanel.h
+ * @brief              This is the header file for YearPickerPanel class.
+ */
+
 #ifndef _MP_YEAR_PICKER_PANEL_H_
 #define _MP_YEAR_PICKER_PANEL_H_
 
 class NowPlayContentPanel;
 
 class YearPickerPanel
-: public YearsListPanel
+       : public YearsListPanel
 {
 public:
        YearPickerPanel(void);
        ~YearPickerPanel(void);
 
        void OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previousSceneId,
-                           const Tizen::Ui::Scenes::SceneId& currentSceneId,
-                           Tizen::Base::Collection::IList* pArgs);
+                               const Tizen::Ui::Scenes::SceneId& currentSceneId,
+                               Tizen::Base::Collection::IList* pArgs);
        void OnSceneDeactivated(const Tizen::Ui::Scenes::SceneId& currentSceneId,
                                                        const Tizen::Ui::Scenes::SceneId& nextSceneId);
        void OnTableViewItemStateChanged(Tizen::Ui::Controls::TableView& tableView,
-                                     int itemIndex,
-                                     Tizen::Ui::Controls::TableViewItem* pItem,
-                                     Tizen::Ui::Controls::TableViewItemStatus status);
+                                               int itemIndex,
+                                               Tizen::Ui::Controls::TableViewItem* pItem,
+                                               Tizen::Ui::Controls::TableViewItemStatus status);
 };
 
-#endif //_MP_YEAR_PICKER_PANEL_H_
+#endif // _MP_YEAR_PICKER_PANEL_H_
\ No newline at end of file
index 5137bc4..6000c0b 100644 (file)
@@ -13,7 +13,6 @@
     <Apps>
         <ApiVersion>2.0</ApiVersion>
         <Privileges>
-           <Privilege>http://tizen.org/privilege/audiomanager.session</Privilege>
             <Privilege>http://tizen.org/privilege/content.read</Privilege>
             <Privilege>http://tizen.org/privilege/calendar.read</Privilege>
             <Privilege>http://tizen.org/privilege/systemsetting.write</Privilege>
@@ -89,6 +88,7 @@
                                                                <Operation>http://tizen.org/appcontrol/operation/view</Operation>
                                                                <Operation>http://tizen.org/appcontrol/operation/play</Operation>
                                                                <MimeType>audio/mp3</MimeType>
+                                                               <MimeType>audio/mpeg</MimeType>
                                                                <MimeType>audio/aac</MimeType>
                                                                <MimeType>audio/wma</MimeType>
                                                                <MimeType>audio/m4a</MimeType>
diff --git a/res/screen-size-normal/IDL_CONTENT_FORM.xml b/res/screen-size-normal/IDL_CONTENT_FORM.xml
new file mode 100644 (file)
index 0000000..39bee22
--- /dev/null
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>\r
+<!--\r
+       This XML file was automatically generated by UiBuilder - do not modify by hand.\r
+-->\r
+<!DOCTYPE Scene SYSTEM "UIForm.dtd">\r
+<Scene Bversion="2.0.0.201302250944" Dversion="20120315">\r
+    <LogicalCoordinate>720</LogicalCoordinate>\r
+    <Form id="IDL_CONTENT_FORM">\r
+        <property backgroundColor="" backgroundColorOpacity="100" orientation="Automatic" softKey0NormalIcon="" softKey0PressedIcon="" softKey0Text="" softKey1NormalIcon="" softKey1PressedIcon="" softKey1Text="" title="" titleAlign="ALIGN_CENTER" titleIcon="" translucentFooter="false" translucentHeader="false" translucentIndicator="false"/>\r
+        <layout mode="Portrait" style="FORM_STYLE_INDICATOR|FORM_STYLE_HEADER|FORM_STYLE_FOOTER" type="LAYOUT_RELATIVE"/>\r
+        <layout mode="Landscape" style="FORM_STYLE_INDICATOR|FORM_STYLE_HEADER|FORM_STYLE_FOOTER" type="LAYOUT_RELATIVE"/>\r
+    </Form>\r
+    <Footer>\r
+        <property backgroundBitmapPath="" color="" colorOpacity="100" disabledButtonColor="" disabledButtonColorOpacity="100" disabledButtonTextColor="" disabledItemColor="" disabledItemColorOpacity="100" disabledItemTextColor="" footerStyle="FOOTER_STYLE_TAB" highlightedButtonColor="" highlightedButtonColorOpacity="100" highlightedButtonTextColor="" highlightedItemColor="" highlightedItemColorOpacity="100" highlightedItemTextColor="" normalButtonColor="" normalButtonColorOpacity="100" normalButtonTextColor="" normalItemColor="" normalItemColorOpacity="100" normalItemTextColor="" pressedButtonColor="" pressedButtonColorOpacity="100" pressedButtonTextColor="" pressedItemColor="" pressedItemColorOpacity="100" pressedItemTextColor="" selectedItemColor="" selectedItemColorOpacity="100" selectedItemTextColor="" showBackButton="false"/>\r
+        <itemSet/>\r
+    </Footer>\r
+    <Header>\r
+        <property backgroundBitmapPath="" color="" colorOpacity="100" descriptionText="" descriptionTextColor="" disabledButtonColor="" disabledButtonColorOpacity="100" disabledButtonTextColor="" disabledItemColor="" disabledItemColorOpacity="100" disabledItemTextColor="" headerStyle="HEADER_STYLE_TAB" highlightedButtonColor="" highlightedButtonColorOpacity="100" highlightedButtonTextColor="" highlightedItemColor="" highlightedItemColorOpacity="100" highlightedItemTextColor="" normalButtonColor="" normalButtonColorOpacity="100" normalButtonTextColor="" normalItemColor="" normalItemColorOpacity="100" normalItemTextColor="" pressedButtonColor="" pressedButtonColorOpacity="100" pressedButtonTextColor="" pressedItemColor="" pressedItemColorOpacity="100" pressedItemTextColor="" selectedItemColor="" selectedItemColorOpacity="100" selectedItemTextColor="" titleIconPath="" titleText="" titleTextColor=""/>\r
+        <itemSet/>\r
+    </Header>\r
+</Scene>\r
diff --git a/src/MpAlbumContentListForm.cpp b/src/MpAlbumContentListForm.cpp
new file mode 100644 (file)
index 0000000..7dc0f76
--- /dev/null
@@ -0,0 +1,824 @@
+//
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.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://floralicense.org/license/
+//
+// 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.
+//
+
+/**
+ * @file               MpAlbumContentListForm.cpp
+ * @brief              This is the implementation file for AlbumContentListForm class.
+ */
+
+#include <FSocial.h>
+#include "MpAlbumContentListForm.h"
+#include "MpAlbumListPresentationModel.h"
+#include "MpPlaylistPickerPopup.h"
+#include "MpSharePopup.h"
+#include "MpThumbnailInfo.h"
+
+using namespace Tizen::App;
+using namespace Tizen::Base;
+using namespace Tizen::Base::Collection;
+using namespace Tizen::Content;
+using namespace Tizen::Graphics;
+using namespace Tizen::Io;
+using namespace Tizen::Social;
+using namespace Tizen::System;
+using namespace Tizen::Ui;
+using namespace Tizen::Ui::Controls;
+using namespace Tizen::Ui::Scenes;
+
+static const Tizen::Graphics::Rectangle RECT_PAENL (0, 0, 720, 128);
+static const Tizen::Graphics::Rectangle RECT_ALBUM_NAME (16, 16, 500, 88);
+static const Tizen::Graphics::Rectangle RECT_ALBUM_TIME (516, 16, 188, 88);
+
+static const Tizen::Graphics::Rectangle RECT_HEADER_THUMBNAIL (16, 16, 76, 76);
+static const Tizen::Graphics::Rectangle RECT_HEADER_ALBUM_NAME (108, 9, 450, 48);
+static const Tizen::Graphics::Rectangle RECT_HEADER_ARTIST_NAME (108, 57, 450, 42);
+static const Tizen::Graphics::Rectangle RECT_HEADER_COUNT (560, 9, 144, 90);
+
+static const int X_OFFSET_EDIT_STYLE_TABLE_VIEW = 96;
+static const int COUNT_MESSAGE_BOX_TIMEOUT = 3000;
+
+AlbumContentListForm::AlbumContentListForm(void)
+       : ContentListForm::ContentListForm()
+       , ThumbnailBase::ThumbnailBase()
+       , __pContentInfoPanel(null)
+       , __pPresentationModel(null)
+{
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
+}
+
+AlbumContentListForm::~AlbumContentListForm(void)
+{
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
+}
+
+result
+AlbumContentListForm::OnInitializing(void)
+{
+       AppLogDebug("ENTER");
+       CreateTableview();
+       CreateSelectAllCheckedButton();
+       CreateCheckedCountLabel();
+       CreateNoContentImage(L"IDS_MUSIC_HEADER_NO_SONGS");
+
+       AppLogDebug("EXIT");
+       return ThumbnailBase::Construct();
+}
+
+result
+AlbumContentListForm::OnTerminating(void)
+{
+       AppLogDebug("ENTER");
+       result r = E_SUCCESS;
+       __checkedItemCount = 0;
+       DestroyPlayListPickerPopup();
+
+       if (__pContentInfoPanel != null)
+       {
+               __pContentInfoPanel->RemoveAllControls();
+               RemoveControl(*__pContentInfoPanel);
+               __pContentInfoPanel = null;
+       }
+
+       AppLogDebug("EXIT");
+       return r;
+}
+
+void
+AlbumContentListForm::OnActionPerformed(const Tizen::Ui::Control& source, int actionId)
+{
+       AppLogDebug("ENTER");
+       SceneManager* pSceneManager = SceneManager::GetInstance();
+
+       AppAssert(pSceneManager);
+
+       switch (actionId)
+       {
+       case IDA_FOOTER_BUTTON_EDIT:
+               {
+                       ToggleViewMode(true);
+               }
+               break;
+
+       case IDA_FOOTER_BUTTON_CANCEL:
+               {
+                       __checkedItemCount = INIT_VALUE;
+                       __pSelectAllCheckedButton->SetSelected(false);
+                       CommonUtil::SetAllCheckState(false, *__pContentTableView, __pPresentationModel->GetContentCount(__currentContentIndex));
+                       CommonUtil::ShowCheckedCountLabel(*__pCheckedCountLabel, __checkedItemCount, *__pContentTableView, *this);
+                       ToggleViewMode(false);
+               }
+               break;
+
+       case IDA_FOOTER_BUTTON_SEARCH:
+               {
+                       pSceneManager->GoForward(ForwardSceneTransition(IDSCN_SEARCH));
+               }
+               break;
+
+       case IDA_CHECK_BUTTON:
+               {
+                       __checkedItemCount = __pPresentationModel->GetContentCount(__currentContentIndex);
+                       if (__checkedItemCount > INIT_VALUE)
+                       {
+                               Footer* pFooter = GetFooter();
+
+                               pFooter->SetItemEnabled(INDEX_FOOTER_DELETE, true);
+                               pFooter->SetItemEnabled(INDEX_FOOTER_SHARE, true);
+                               pFooter->SetItemEnabled(INDEX_FOOTER_ADDTOPLATLIST, true);
+
+                               pFooter->Invalidate(true);
+                       }
+                       CommonUtil::SetAllCheckState(true, *__pContentTableView, __pPresentationModel->GetContentCount(__currentContentIndex));
+                       CommonUtil::ShowCheckedCountLabel(*__pCheckedCountLabel, __checkedItemCount, *__pContentTableView, *this);
+               }
+               break;
+
+       case IDA_UNCHECK_BUTTON:
+               {
+                       Footer* pFooter = GetFooter();
+
+                       pFooter->SetItemEnabled(INDEX_FOOTER_DELETE, false);
+                       pFooter->SetItemEnabled(INDEX_FOOTER_SHARE, false);
+                       pFooter->SetItemEnabled(INDEX_FOOTER_ADDTOPLATLIST, false);
+
+                       pFooter->Invalidate(true);
+
+                       __checkedItemCount = INIT_VALUE;
+                       CommonUtil::SetAllCheckState(false, *__pContentTableView, __pPresentationModel->GetContentCount(__currentContentIndex));
+                       CommonUtil::ShowCheckedCountLabel(*__pCheckedCountLabel, __checkedItemCount, *__pContentTableView, *this);
+               }
+               break;
+
+       case IDA_FOOTER_BUTTON_DELETE:
+               {
+                       ContentManager contentManager;
+                       Footer* pFooter = GetFooter();
+                       int totalCount = __pPresentationModel->GetContentCount(__currentContentIndex);
+                       int iCount = 0;
+
+                       if (__checkedItemCount <= INIT_VALUE)
+                       {
+                               return;
+                       }
+
+                       pFooter->SetItemEnabled(INDEX_FOOTER_DELETE, false);
+                       pFooter->SetItemEnabled(INDEX_FOOTER_SHARE, false);
+                       pFooter->SetItemEnabled(INDEX_FOOTER_ADDTOPLATLIST, false);
+                       pFooter->Invalidate(true);
+
+                       contentManager.Construct();
+                       for (iCount = 0; iCount < totalCount; iCount++)
+                       {
+                               if (__pContentTableView->IsItemChecked(iCount) == true)
+                               {
+                                       __pContentTableView->SetItemChecked(iCount,false);
+                                       ContentInformation* pContentInfoStruct = __pPresentationModel->GetContentInfoN(iCount);
+                                       contentManager.DeleteContent(pContentInfoStruct->contentId);
+
+                                       delete pContentInfoStruct;
+                                       pContentInfoStruct = null;
+                               }
+                       }
+                       AppLogDebug("__pStrContentName = %ls", __pStrContentName->GetPointer());
+                       __pPresentationModel->RefreshContentList(__currentContentIndex);
+                       __pContentTableView->UpdateTableView();
+                       __pContentTableView->Invalidate(true);
+
+                       __checkedItemCount = INIT_VALUE;
+                       CommonUtil::ShowCheckedCountLabel(*__pCheckedCountLabel, __checkedItemCount, *__pContentTableView, *this);
+
+                       if (__pPresentationModel->GetContentCount(__currentContentIndex) > 0)
+                       {
+                               CommonUtil::ShowSelectAllCheckButton(*__pSelectAllCheckedButton);
+                       }
+                       else
+                       {
+                               __pSelectAllCheckedButton->SetEnabled(false);
+                               __pSelectAllCheckedButton->SetShowState(false);
+                               CommonUtil::ShowNoContentImage(INIT_VALUE, *__pContentTableView, *__pNoContentImageLabel, *__pNoContentTextLabel);
+                       }
+               }
+               break;
+
+       case IDA_FOOTER_BUTTON_SHARE:
+               {
+                       Tizen::Base::Collection::ArrayList* pDataList = new (std::nothrow) ArrayList();
+                       Footer* pFooter = GetFooter();
+                       int totalCount = __pPresentationModel->GetContentCount(__currentContentIndex);
+
+                       pDataList->Construct();
+
+                       for (int iCount = 0; iCount < totalCount; iCount++)
+                       {
+                               if (__pContentTableView->IsItemChecked(iCount) == true)
+                               {
+                                       ContentInformation* pContentInfoStruct = __pPresentationModel->GetContentInfoN(iCount);
+                                       if (pContentInfoStruct == null)
+                                       {
+                                               pDataList->RemoveAll(true);
+                                               delete pDataList;
+                                               pDataList = null;
+                                               return;
+                                       }
+                                       pDataList->Add(*(new (std::nothrow) String(L"attachment:" + pContentInfoStruct->ContentFilePath)));
+
+                                       __pContentTableView->SetItemChecked(iCount, false);
+
+                                       delete pContentInfoStruct;
+                                       pContentInfoStruct = null;
+                               }
+                       }
+                       pFooter->SetItemEnabled(INDEX_FOOTER_DELETE, false);
+                       pFooter->SetItemEnabled(INDEX_FOOTER_SHARE, false);
+                       pFooter->SetItemEnabled(INDEX_FOOTER_ADDTOPLATLIST, false);
+
+                       __checkedItemCount = INIT_VALUE;
+                       CommonUtil::ShowCheckedCountLabel(*__pCheckedCountLabel, __checkedItemCount, *__pContentTableView, *this);
+                       CommonUtil::ShowSelectAllCheckButton(*__pSelectAllCheckedButton);
+
+                       Invalidate(true);
+
+                       if (__pSharePopup == null)
+                       {
+                               __pSharePopup = new (std::nothrow) SharePopup();
+                               __pSharePopup->Initialize();
+                       }
+                       __pSharePopup->SetShowState(true);
+                       __pSharePopup->Show();
+                       __pSharePopup->SetArguments(pDataList);
+               }
+               break;
+
+       case IDA_FOOTER_BUTTON_ADD_TO_PLAYLIST:
+               {
+                       ContentManager contentManager;
+                       Footer* pFooter = GetFooter();
+                       Tizen::Base::Collection::ArrayList* pDataList = new (std::nothrow) ArrayList();
+                       int totalCount = 0;
+
+                       if (__checkedItemCount <= 0)
+                       {
+                               return;
+                       }
+
+                       pDataList->Construct();
+                       contentManager.Construct();
+                       totalCount = __pPresentationModel->GetContentCount(__currentContentIndex);
+
+                       for (int iCount = 0; iCount < totalCount; iCount++)
+                       {
+                               if (__pContentTableView->IsItemChecked(iCount) == true)
+                               {
+                                       ContentInformation* pContentInfoStruct = __pPresentationModel->GetContentInfoN(iCount);
+                                       if (pContentInfoStruct == null)
+                                       {
+                                               pDataList->RemoveAll(true);
+                                               delete pDataList;
+                                               pDataList = null;
+                                               return;
+                                       }
+
+                                       pDataList->Add(*(new (std::nothrow) String(pContentInfoStruct->ContentFilePath)));
+
+                                       __pContentTableView->SetItemChecked(iCount, false);
+
+                                       delete pContentInfoStruct;
+                                       pContentInfoStruct = null;
+                               }
+                       }
+
+                       if (IsFailed(CreatePlayListPickerPopup(pDataList)))
+                       {
+                               AppLogDebug("CreatePlayListPickerPopup failed(%s)", GetLastResult());
+                               return;
+                       }
+                       __pPlayListPickerPopup->SetShowState(true);
+                       __pPlayListPickerPopup->Show();
+                       //__pPlayListPickerPopup->SetCollectedContent(pDataList);
+
+                       pFooter->SetItemEnabled(INDEX_FOOTER_DELETE, false);
+                       pFooter->SetItemEnabled(INDEX_FOOTER_SHARE, false);
+                       pFooter->SetItemEnabled(INDEX_FOOTER_ADDTOPLATLIST, false);
+
+                       __checkedItemCount = INIT_VALUE;
+                       CommonUtil::ShowCheckedCountLabel(*__pCheckedCountLabel, __checkedItemCount, *__pContentTableView, *this);
+                       CommonUtil::ShowSelectAllCheckButton(*__pSelectAllCheckedButton);
+
+                       Invalidate(true);
+               }
+               break;
+
+       default:
+               break;
+       }
+       AppLogDebug("EXIT");
+}
+
+void
+AlbumContentListForm::OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previousSceneId,
+                                       const Tizen::Ui::Scenes::SceneId& currentSceneId,
+                                       Tizen::Base::Collection::IList* pArgs)
+{
+       AppLogDebug("ENTER");
+       if (pArgs != null)
+       {
+               __pStrSceneId = static_cast<String*>(pArgs->GetAt(DATA_ITEM_SCENE_NAME));
+               __pStrContentName = static_cast<String*>(pArgs->GetAt(DATA_ITEM_CONTENT_NAME));
+               __currentContentIndex = static_cast<Integer*>(pArgs->GetAt(DATA_ITEM_CONTENT_TYPE))->ToInt();
+
+               __pPresentationModel = AlbumListPresentationModel::GetInstance();
+               __pPresentationModel->UpdateAlbumList();
+               __pPresentationModel->InitializeContentList(__currentContentIndex);
+       }
+       else
+       {
+               // Empty statement
+       }
+
+       ContentInformation* pContentInfoStruct = null;
+       pContentInfoStruct = __pPresentationModel->GetContentInfoN(0);
+
+       if (pContentInfoStruct == null)
+       {
+               return;
+       }
+
+       InitializeHeader(*pContentInfoStruct);
+       CreateAlbumInfoPanel(*pContentInfoStruct, __pPresentationModel->GetContentCount(__currentContentIndex));
+
+       if ( __checkEdit == true)
+       {
+               Footer* pFooter = CommonUtil::CreateDeleteFooter(*this);
+               pFooter->AddActionEventListener(*this);
+
+               __pContentInfoPanel->SetEnabled(false);
+               __pContentInfoPanel->SetShowState(false);
+
+               __pSelectAllCheckedButton->SetEnabled(true);
+               __pSelectAllCheckedButton->SetShowState(true);
+
+               __pContentTableView->SetBounds(Rectangle(0, __pSelectAllCheckedButton->GetHeight(), GetClientAreaBounds().width, (GetClientAreaBounds().height - __pSelectAllCheckedButton->GetHeight())));
+       }
+       else
+       {
+               Footer* pFooter = CommonUtil::CreateEditFooter(*this);
+               pFooter->AddActionEventListener(*this);
+               pFooter->SetBackButton();
+               SetFormBackEventListener(this);
+
+               __pContentInfoPanel->SetEnabled(true);
+               __pContentInfoPanel->SetShowState(true);
+
+               __pSelectAllCheckedButton->SetEnabled(false);
+               __pSelectAllCheckedButton->SetShowState(false);
+
+               __pContentTableView->SetBounds(Rectangle(0, __pContentInfoPanel->GetHeight(), GetClientAreaBounds().width, (GetClientAreaBounds().height - __pContentInfoPanel->GetHeight())));
+       }
+       __pContentTableView->Invalidate(true);
+       __pContentTableView->UpdateTableView();
+
+       delete pContentInfoStruct;
+       pContentInfoStruct = null;
+       AppLogDebug("EXIT");
+}
+
+void
+AlbumContentListForm::OnSceneDeactivated(const Tizen::Ui::Scenes::SceneId& currentSceneId,
+                                                                       const Tizen::Ui::Scenes::SceneId& nextSceneId)
+{
+       AppLogDebug("ENTER");
+       Footer* pFooter = GetFooter();
+       pFooter->RemoveAllButtons();
+       pFooter->RemoveAllItems();
+       pFooter->RemoveActionEventListener(*this);
+
+       __pContentInfoPanel->RemoveAllControls();
+       RemoveControl(*__pContentInfoPanel);
+       __pContentInfoPanel = null;
+
+       CancelAllThumbnailRequest();
+       AppLogDebug("EXIT");
+}
+
+int
+AlbumContentListForm::GetItemCount(void)
+{
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
+       return __pPresentationModel->GetContentCount(__currentContentIndex);
+}
+
+Tizen::Ui::Controls::TableViewItem*
+AlbumContentListForm::CreateItem(const int itemIndex, int itemWidth)
+{
+       AppLogDebug("ENTER");
+       ContentInformation* pContentInfoStruct = null;
+
+       TableViewItem* pItem = new (std::nothrow) TableViewItem();
+       if (__checkEdit)
+       {
+               pItem->Construct(Dimension(itemWidth, ITEM_HEIGHT), TABLE_VIEW_ANNEX_STYLE_MARK);
+       }
+       else
+       {
+               pItem->Construct(Dimension(itemWidth, ITEM_HEIGHT), TABLE_VIEW_ANNEX_STYLE_NORMAL);
+       }
+       pItem->SetBackgroundColor(COLOR_WHITE);
+
+       pContentInfoStruct = __pPresentationModel->GetContentInfoN(itemIndex);
+       if (pContentInfoStruct == null)
+       {
+               delete pItem;
+               pItem = null;
+               return null;
+       }
+
+       RequestThumbnail(pContentInfoStruct->contentId, (new (std::nothrow) String(pContentInfoStruct->contentId.ToString())));
+       CreateTableViewItem(*pItem, *pContentInfoStruct);
+
+       delete pContentInfoStruct;
+       pContentInfoStruct = null;
+
+       AppLogDebug("EXIT");
+       return pItem;
+}
+
+void
+AlbumContentListForm::OnTableViewItemStateChanged(Tizen::Ui::Controls::TableView& tableView,
+                                                       int itemIndex,
+                                                       Tizen::Ui::Controls::TableViewItem* pItem,
+                                                       Tizen::Ui::Controls::TableViewItemStatus status)
+{
+       AppLogDebug("ENTER");
+       switch (status)
+       {
+       case TABLE_VIEW_ITEM_STATUS_CHECKED:
+               {
+                       Footer* pFooter = GetFooter();
+                       __checkedItemCount++;
+                       tableView.SetItemChecked(itemIndex, true);
+
+                       pFooter->SetItemEnabled(INDEX_FOOTER_DELETE, true);
+                       pFooter->SetItemEnabled(INDEX_FOOTER_SHARE, true);
+                       pFooter->SetItemEnabled(INDEX_FOOTER_ADDTOPLATLIST, true);
+
+                       pFooter->Invalidate(true);
+                       if (__checkedItemCount == __pPresentationModel->GetContentCount(__currentContentIndex))
+                       {
+                               __pSelectAllCheckedButton->SetSelected(true);
+                       }
+                       CommonUtil::ShowCheckedCountLabel(*__pCheckedCountLabel, __checkedItemCount, *__pContentTableView, *this);
+               }
+               break;
+
+       case TABLE_VIEW_ITEM_STATUS_UNCHECKED:
+               {
+                       Footer* pFooter = GetFooter();
+
+                       __checkedItemCount--;
+                       tableView.SetItemChecked(itemIndex, false);
+
+                       if (__checkedItemCount == INIT_VALUE)
+                       {
+                               pFooter->SetItemEnabled(INDEX_FOOTER_DELETE, false);
+                               pFooter->SetItemEnabled(INDEX_FOOTER_SHARE, false);
+                               pFooter->SetItemEnabled(INDEX_FOOTER_ADDTOPLATLIST, false);
+
+                               pFooter->Invalidate(true);
+                       }
+
+                       if (__checkedItemCount != __pPresentationModel->GetContentCount(__currentContentIndex))
+                       {
+                               __pSelectAllCheckedButton->SetSelected(false);
+                       }
+                       CommonUtil::ShowCheckedCountLabel(*__pCheckedCountLabel, __checkedItemCount, *__pContentTableView, *this);
+               }
+               break;
+
+       case TABLE_VIEW_ITEM_STATUS_SELECTED:
+               {
+                       SceneManager* pSceneManager = SceneManager::GetInstance();
+                       ArrayList* tempArg;
+                       AppAssert(pSceneManager);
+                       tempArg = MakePlayerSceneParam(itemIndex);
+                       pSceneManager->GoForward(ForwardSceneTransition(IDSCN_PLAYER), tempArg);
+
+                       if (tempArg != null)
+                       {
+                               tempArg->RemoveAll();
+                               delete tempArg;
+                               tempArg = null;
+                       }
+               }
+               break;
+
+       default:
+               break;
+       }
+       AppLogDebug("EXIT");
+}
+
+result
+AlbumContentListForm::CreateAlbumInfoPanel(const ContentInformation& contentInfo,
+                                                                                       const int Songs)
+{
+       AppLogDebug("ENTER");
+       result r = E_SUCCESS;
+
+       if (__pContentInfoPanel == null)
+       {
+               __pContentInfoPanel = new (std::nothrow) Panel();
+               __pContentInfoPanel->Construct(RECT_PAENL);
+               __pContentInfoPanel->SetBackgroundColor(COLOR_PANEL_BACKGROUND_GRAY_BLUE);
+       }
+       Label* pHeaderThumbnailLabel = new (std::nothrow) Label();
+       pHeaderThumbnailLabel->Construct(RECT_HEADER_THUMBNAIL, L"");
+       pHeaderThumbnailLabel->SetTextHorizontalAlignment(ALIGNMENT_LEFT);
+       pHeaderThumbnailLabel->SetTextConfig(FONT_SIZE, LABEL_TEXT_STYLE_NORMAL);
+       pHeaderThumbnailLabel->SetBackgroundBitmap(*GetDefaultThumbnail());
+       pHeaderThumbnailLabel->SetName(contentInfo.contentId.ToString());
+
+       Label* pHeaderAlbumNameLabel = new (std::nothrow) Label();
+       pHeaderAlbumNameLabel->Construct(RECT_HEADER_ALBUM_NAME, L"");
+       pHeaderAlbumNameLabel->SetTextHorizontalAlignment(ALIGNMENT_LEFT);
+       pHeaderAlbumNameLabel->SetTextConfig(FONT_SIZE, LABEL_TEXT_STYLE_NORMAL);
+       pHeaderAlbumNameLabel->SetText(contentInfo.AlbumName);
+
+       Label* pHeaderArtistNameLabel = new (std::nothrow) Label();
+       pHeaderArtistNameLabel->Construct(RECT_HEADER_ARTIST_NAME, L"");
+       pHeaderArtistNameLabel->SetTextHorizontalAlignment(ALIGNMENT_LEFT);
+       pHeaderArtistNameLabel->SetTextConfig(FONT_SIZE, LABEL_TEXT_STYLE_NORMAL);
+       pHeaderArtistNameLabel->SetText(contentInfo.ArtistName);
+
+       Label* pHeaderAblumCountLabel = new (std::nothrow) Label();
+       pHeaderAblumCountLabel->Construct(RECT_HEADER_COUNT, L"");
+       pHeaderAblumCountLabel->SetTextHorizontalAlignment(ALIGNMENT_LEFT);
+       pHeaderAblumCountLabel->SetTextConfig(FONT_SIZE, LABEL_TEXT_STYLE_NORMAL);
+       pHeaderAblumCountLabel->SetText(CommonUtil::SetSongsString(Songs));
+       pHeaderAblumCountLabel->SetName(IDS_ALBUM_CONTENT_COUNT);
+
+       __pContentInfoPanel->AddControl(*pHeaderThumbnailLabel);
+       __pContentInfoPanel->AddControl(*pHeaderAlbumNameLabel);
+       __pContentInfoPanel->AddControl(*pHeaderArtistNameLabel);
+       __pContentInfoPanel->AddControl(*pHeaderAblumCountLabel);
+
+       AddControl(*__pContentInfoPanel);
+       AppLogDebug("EXIT");
+       return r;
+}
+
+Tizen::Base::Collection::ArrayList*
+AlbumContentListForm::MakePlayerSceneParam(int startIndex)
+{
+       AppLogDebug("ENTER");
+       ArrayList* pTempList = new (std::nothrow) ArrayList();
+       ArrayList* pSelectedMusicContent = null;
+
+       pSelectedMusicContent = __pPresentationModel->GetContentPathListN(__currentContentIndex);
+       if (pTempList == null || pSelectedMusicContent == null)
+       {
+               AppLogDebug("EXIT");
+               return null;
+       }
+       pTempList->Construct();
+
+       pTempList->Add(*(new (std::nothrow) String(MUSIC)));
+       pTempList->Add(*(new (std::nothrow) Integer(startIndex)));
+       pTempList->Add(*(pSelectedMusicContent));
+
+       AppLogDebug("EXIT");
+       return pTempList;
+}
+
+result
+AlbumContentListForm::CreateTableViewItem(Tizen::Ui::Container& parent,
+                                                                               const ContentInformation& contentInfo)
+{
+       AppLogDebug("ENTER");
+       result r = E_SUCCESS;
+       Rectangle rectAlbumName = RECT_ALBUM_NAME;
+       Rectangle rectAlbumTime = RECT_ALBUM_TIME;
+       Label* pAlbumName = new (std::nothrow) Label();
+       Label* pAlbumTime = new (std::nothrow) Label();
+
+       if (__checkEdit)
+       {
+               rectAlbumName.width = rectAlbumName.width - X_OFFSET_EDIT_STYLE_TABLE_VIEW;
+               rectAlbumTime.x = rectAlbumTime.x - X_OFFSET_EDIT_STYLE_TABLE_VIEW;
+       }
+
+       pAlbumName->Construct(rectAlbumName, L"");
+       pAlbumName->SetTextConfig(FONT_SIZE, LABEL_TEXT_STYLE_NORMAL);
+       pAlbumName->SetTextHorizontalAlignment(ALIGNMENT_LEFT);
+       pAlbumName->SetText(contentInfo.TitleName);
+
+       pAlbumTime->Construct(rectAlbumTime, L"");
+       pAlbumTime->SetTextConfig(FONT_SIZE, LABEL_TEXT_STYLE_NORMAL);
+       pAlbumTime->SetTextHorizontalAlignment(ALIGNMENT_RIGHT);
+       pAlbumTime->SetText(CommonUtil::GetFormatDate(contentInfo.Duration));
+
+       parent.AddControl(*pAlbumName);
+       parent.AddControl(*pAlbumTime);
+       AppLogDebug("EXIT");
+       return r;
+}
+
+void
+AlbumContentListForm::ToggleViewMode(bool editMode)
+{
+       AppLogDebug("ENTER");
+       Footer* pFooter = GetFooter();
+
+       if (editMode == false)
+       {
+               int currentAlbumContentCount = 0;
+               ContentInformation* pContentInfoStruct = null;
+               String pAlbumName;
+               currentAlbumContentCount = __pPresentationModel->GetContentCount(__currentContentIndex);
+
+               pFooter->RemoveAllButtons();
+               pFooter->RemoveAllItems();
+               pFooter->RemoveActionEventListener(*this);
+               pFooter = CommonUtil::CreateEditFooter(*this);
+               pFooter->AddActionEventListener(*this);
+               pFooter->SetBackButton();
+               SetFormBackEventListener(this);
+
+               if (currentAlbumContentCount > INIT_VALUE)
+               {
+                       pContentInfoStruct = __pPresentationModel->GetContentInfoN(0);
+                       pAlbumName = CommonUtil::GetContentInfo(*pContentInfoStruct, *__pStrSceneId);
+                       SetTitleText(pAlbumName);
+               }
+               else
+               {
+                       SetTitleText("No songs");
+                       CommonUtil::ShowNoContentImage(INIT_VALUE, *__pContentTableView, *__pNoContentImageLabel, *__pNoContentTextLabel);
+                       pFooter->SetItemEnabled(INDEX_FOOTER_EDIT, false);
+               }
+
+               if (pContentInfoStruct != null)
+               {
+                       delete pContentInfoStruct;
+                       pContentInfoStruct = null;
+               }
+
+               __pSelectAllCheckedButton->SetEnabled(false);
+               __pSelectAllCheckedButton->SetShowState(false);
+
+               if ( currentAlbumContentCount > INIT_VALUE)
+               {
+                       Label* pLabelAlbumCount = null;
+                       pLabelAlbumCount = static_cast<Label*>(__pContentInfoPanel->GetControl(IDS_ALBUM_CONTENT_COUNT));
+                       pLabelAlbumCount->SetText(CommonUtil::SetSongsString(currentAlbumContentCount));
+
+                       __pContentInfoPanel->SetEnabled(true);
+                       __pContentInfoPanel->SetShowState(true);
+               }
+               else
+               {
+                       __pContentInfoPanel->SetShowState(false);
+                       __pContentInfoPanel->Invalidate(true);
+               }
+
+               __checkEdit = false;
+               __pContentTableView->SetBounds(Rectangle(0, __pContentInfoPanel->GetHeight(), GetClientAreaBounds().width, (GetClientAreaBounds().height - __pContentInfoPanel->GetHeight())));
+               __pContentTableView->Invalidate(true);
+               __pContentTableView->UpdateTableView();
+       }
+       else
+       {
+               SetTitleText(ResourceManager::GetString("IDS_COM_BODY_EDIT"));
+
+               pFooter->RemoveAllButtons();
+               pFooter->RemoveAllItems();
+               pFooter->RemoveActionEventListener(*this);
+
+               pFooter = CommonUtil::CreateDeleteFooter(*this);
+               pFooter->AddActionEventListener(*this);
+
+               __pContentInfoPanel->SetEnabled(false);
+               __pContentInfoPanel->SetShowState(false);
+
+               __pSelectAllCheckedButton->SetEnabled(true);
+               __pSelectAllCheckedButton->SetShowState(true);
+
+               __checkEdit = true;
+               __pContentTableView->SetBounds(Rectangle(0, __pSelectAllCheckedButton->GetHeight(), GetClientAreaBounds().width, (GetClientAreaBounds().height - __pSelectAllCheckedButton->GetHeight())));
+               __pContentTableView->Invalidate(true);
+               __pContentTableView->UpdateTableView();
+       }
+       Invalidate(true);
+       AppLogDebug("EXIT");
+}
+
+void
+AlbumContentListForm::OnAppControlCompleteResponseReceived(const AppId& appId,
+               const String& operationId, AppCtrlResult appControlResult,
+               const IMap* pExtraData)
+{
+       AppLogDebug("ENTER");
+       if (pExtraData == null)
+       {
+               AppLogDebug("EXIT");
+               return;
+       }
+       AppLogDebug("%ls, %ls", appId.GetPointer(), operationId.GetPointer());
+       if (appId.Equals(String(TIZEN_APPCONTROL_PROVIDER_CONTACT)))
+       {
+               if (appControlResult == APP_CTRL_RESULT_SUCCEEDED)
+               {
+                       const String* pContactId = static_cast<const String*>(pExtraData->GetValue(String(APPCONTROL_KEY_RETURNTYPE)));
+                       if (pContactId->Equals(APPCONTROL_VALUE_CONTACTID, true))
+                       {
+                               const String* pResultString = static_cast<const String*>(pExtraData->GetValue(String(APPCONTROL_KEY_VALUE)));
+
+                               AppLogDebug("%ls", pResultString->GetPointer());
+                               int contactId;
+                               Integer::Parse(*pResultString, contactId);
+
+                               AddressbookManager* pAddressbookManager = AddressbookManager::GetInstance();
+                               Addressbook* pAddressbook = pAddressbookManager->GetAddressbookN(DEFAULT_ADDRESSBOOK_ID);
+
+                               ContentInformation* pCcontentInfo = __pPresentationModel->GetContentInfoN(__itemIndex);
+                               if (pCcontentInfo == null)
+                               {
+                                       delete pAddressbook;
+                                       pAddressbook = null;
+                                       return;
+                               }
+
+                               Contact* pContact = pAddressbook->GetContactN(contactId);
+                               pContact->SetValue(CONTACT_PROPERTY_ID_RINGTONE, pCcontentInfo->ContentFilePath);
+                               result r = pAddressbook->UpdateContact(*pContact);
+
+                               if (r == E_SUCCESS)
+                               {
+                                       MessageBox messageBox;
+                                       messageBox.Construct(L"", ResourceManager::GetString(L"IDS_COM_POP_SUCCESS"),
+                                                       MSGBOX_STYLE_OK,
+                                                       COUNT_MESSAGE_BOX_TIMEOUT);
+                                       int modalResult = 0;
+                                       messageBox.ShowAndWait(modalResult);
+                               }
+
+                               delete pCcontentInfo;
+                               pCcontentInfo = null;
+
+                               delete pContact;
+                               pContact = null;
+
+                               delete pAddressbook;
+                               pAddressbook = null;
+                       }
+               }
+       }
+       AppLogDebug("EXIT");
+}
+
+void
+AlbumContentListForm::OnThumbnailInfoReveivedN(ThumbnailInfo* pThumbnailInfo)
+{
+       AppLogDebug("ENTER");
+       String contentId;
+       void* pParam = null;
+       Bitmap* pThumbnail = pThumbnailInfo->GetBitmapN();
+       pParam = pThumbnailInfo->GetUserParamN();
+       if (pParam)
+       {
+               contentId = *(static_cast<String*>(pParam));
+       }
+
+       Label* pThumbnailLabel = static_cast<Label*>(__pContentInfoPanel->GetControl(contentId));
+       if (pThumbnail == null || pThumbnailLabel == null)
+       {
+               delete pThumbnail;
+               delete pThumbnailInfo;
+               delete static_cast<String*>(pParam);
+               AppLogDebug("__pThumbnail or pThumbnailLabel is null");
+               return;
+       }
+
+       pThumbnailLabel->SetBackgroundBitmap(*pThumbnail);
+       pThumbnailLabel->Invalidate(false);
+
+       delete pThumbnail;
+       delete pThumbnailInfo;
+       delete static_cast<int*>(pParam);
+       AppLogDebug("EXIT");
+}
\ No newline at end of file
old mode 100755 (executable)
new mode 100644 (file)
index 2bbb871..250b0b8
@@ -1,4 +1,4 @@
-//
+//
 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
 //
 // Licensed under the Flora License, Version 1.0 (the License);
 // limitations under the License.
 //
 
+/**
+ * @file               MpAlbumContentPickerPanel.cpp
+ * @brief              This is the implementation file for AlbumContentPickerPanel class.
+ */
+
 #include "MpAlbumContentPickerPanel.h"
 
 using namespace Tizen::Base;
 using namespace Tizen::Base::Collection;
-using namespace Tizen::Media;
 using namespace Tizen::Content;
 using namespace Tizen::Graphics;
+using namespace Tizen::Media;
+using namespace Tizen::Social;
 using namespace Tizen::Ui;
 using namespace Tizen::Ui::Controls;
 using namespace Tizen::Ui::Scenes;
-using namespace Tizen::Social;
 
-AlbumContentPickerPanel::AlbumContentPickerPanel()
-: __checkedItemCount(0)
-, __pContentTableView(null)
-, __pSelectAllCheckedButton(null)
-, __pCheckedCountLabel(null)
+AlbumContentPickerPanel::AlbumContentPickerPanel(void)
+       : __checkedItemCount(0)
+       , __pContentTableView(null)
+       , __pSelectAllCheckedButton(null)
+       , __pCheckedCountLabel(null)
 {
-       //AppLogDebug("AlbumContentPickerPanel");
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 
-AlbumContentPickerPanel::~AlbumContentPickerPanel()
+AlbumContentPickerPanel::~AlbumContentPickerPanel(void)
 {
-       //AppLogDebug("~AlbumContentPickerPanel");
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 
-
 bool
 AlbumContentPickerPanel::Initialize(void)
 {
-       //AppLogDebug("Initialize");
+       AppLogDebug("ENTER");
        result r = Construct(Rectangle(INIT_VALUE, INIT_VALUE, INIT_VALUE, INIT_VALUE));
        if (IsFailed(r))
        {
                return false;
        }
+       AppLogDebug("EXIT");
        return true;
 }
 
 result
 AlbumContentPickerPanel::OnInitializing(void)
 {
-       //AppLogDebug("OnInitializing");
+       AppLogDebug("ENTER");
        Form* pForm = dynamic_cast<Form*>(GetParent());
        AppAssert(pForm);
 
-       int width  = pForm->GetClientAreaBounds().width;
+       int width = pForm->GetClientAreaBounds().width;
        int height = pForm->GetClientAreaBounds().height;
 
        SetBounds(INIT_VALUE, INIT_VALUE, width, height);
@@ -81,130 +88,115 @@ AlbumContentPickerPanel::OnInitializing(void)
 
        __pPresentationModel = AlbumListPresentationModel::GetInstance();
 
+       AppLogDebug("EXIT");
        return E_SUCCESS;
 }
 
 result
 AlbumContentPickerPanel::OnTerminating(void)
 {
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
        return E_SUCCESS;
 }
 
 void
 AlbumContentPickerPanel::OnActionPerformed(const Tizen::Ui::Control& source, int actionId)
 {
-       //AppLogDebug("OnActionPerformed");
+       AppLogDebug("ENTER");
        SceneManager* pSceneManager = SceneManager::GetInstance();
        AppAssert(pSceneManager);
 
-       int totalCount = __pPresentationModel->GetSongContentCount();
+       int totalCount = __pPresentationModel->GetContentCount(__pPresentationModel->GetCurrentAlbumIndex());
 
-       switch(actionId)
+       switch (actionId)
        {
        case IDA_CHECK_BUTTON:
-       {
-               //AppLogDebug("IDA_CHECK_BUTTON");
-               __checkedItemCount = totalCount;
-               CommonUtil::SetAllCheckState(true, *__pContentTableView, totalCount);
-               Form* pForm = dynamic_cast<Form*>(GetParent());
-               AppAssert(pForm);
-               CommonUtil::ShowCheckedCountLabel(*__pCheckedCountLabel, __checkedItemCount, *__pContentTableView, *pForm);
-               CommonUtil::SetButtonEnabled(*pForm, __checkedItemCount, actionId);
+               {
+                       //AppLogDebug("IDA_CHECK_BUTTON");
+                       __checkedItemCount = totalCount;
+                       CommonUtil::SetAllCheckState(true, *__pContentTableView, totalCount);
+                       Form* pForm = dynamic_cast<Form*>(GetParent());
+                       AppAssert(pForm);
+                       CommonUtil::ShowCheckedCountLabel(*__pCheckedCountLabel, __checkedItemCount, *__pContentTableView, *pForm);
+                       CommonUtil::SetButtonEnabled(*pForm, __checkedItemCount, actionId);
+               }
                break;
-       }
+
        case IDA_UNCHECK_BUTTON:
-       {
-               //AppLogDebug("IDA_UNCHECK_BUTTON");
-               __checkedItemCount = INIT_VALUE;
-               CommonUtil::SetAllCheckState(false, *__pContentTableView, totalCount);
-               Form* pForm = dynamic_cast<Form*>(GetParent());
-               AppAssert(pForm);
-               CommonUtil::ShowCheckedCountLabel(*__pCheckedCountLabel, __checkedItemCount, *__pContentTableView, *pForm);
-               CommonUtil::SetButtonEnabled(*pForm, __checkedItemCount, actionId);
-               break;
-       }
-       case IDA_FOOTER_BUTTON_ADD_TO_PLAYLIST:
-       {
-               if (__checkedItemCount <= 0)
                {
-                       return;
+                       //AppLogDebug("IDA_UNCHECK_BUTTON");
+                       __checkedItemCount = INIT_VALUE;
+                       CommonUtil::SetAllCheckState(false, *__pContentTableView, totalCount);
+                       Form* pForm = dynamic_cast<Form*>(GetParent());
+                       AppAssert(pForm);
+                       CommonUtil::ShowCheckedCountLabel(*__pCheckedCountLabel, __checkedItemCount, *__pContentTableView, *pForm);
+                       CommonUtil::SetButtonEnabled(*pForm, __checkedItemCount, actionId);
                }
+               break;
 
-               PlayList* pPlayList = PlayListManager::GetInstance()->GetPlayListN(CommonUtil::GetAddtoPlaylistName());
-
-               int totalCount = __pPresentationModel->GetSongContentCount();
-               for(int iCount = 0; iCount < totalCount; iCount++)
+       case IDA_FOOTER_BUTTON_ADD_TO_PLAYLIST:
                {
-                       if (__pContentTableView->IsItemChecked(iCount) == true)
+                       if (__checkedItemCount <= 0)
+                       {
+                               return;
+                       }
+
+                       int totalCount = __pPresentationModel->GetContentCount(__pPresentationModel->GetCurrentAlbumIndex());
+                       for (int iCount = 0; iCount < totalCount; iCount++)
                        {
-                               ContentInformationStruct* pContentInfoStruct =  __pPresentationModel->GetSongContentInfoN(iCount);
-                               if (pContentInfoStruct == null)
+                               if (__pContentTableView->IsItemChecked(iCount) == true)
                                {
-                                       continue;
+                                       __pPresentationModel->AddContent(*new (std::nothrow) String(CommonUtil::GetAddtoPlaylistName()), iCount);
+                                       __pContentTableView->SetItemChecked(iCount, false);
                                }
-                               pPlayList->AddItem(pContentInfoStruct->contentId);
-
-                               __pContentTableView->SetItemChecked(iCount, false);
-
-                               //test_code_start
-                               delete pContentInfoStruct->pThumbnail;
-                               pContentInfoStruct->pThumbnail = null;
-
-                               delete pContentInfoStruct;
-                               pContentInfoStruct = null;
-                               //test_code_end
                        }
-               }
 
-               delete pPlayList;
-               pPlayList = null;
-               Form* pForm = dynamic_cast<Form*>(GetParent());
-               AppAssert(pForm);
-               CommonUtil::SetButtonEnabled(*pForm, __checkedItemCount, actionId);
-               __checkedItemCount = INIT_VALUE;
-               CommonUtil::ShowCheckedCountLabel(*__pCheckedCountLabel, __checkedItemCount, *__pContentTableView, *pForm);
-               CommonUtil::ShowSelectAllCheckButton(*__pSelectAllCheckedButton);
-               CommonUtil::SetAddtoPlaylistState(false);
+                       Form* pForm = dynamic_cast<Form*>(GetParent());
+                       AppAssert(pForm);
+                       CommonUtil::SetButtonEnabled(*pForm, __checkedItemCount, actionId);
+                       __checkedItemCount = INIT_VALUE;
+                       CommonUtil::ShowCheckedCountLabel(*__pCheckedCountLabel, __checkedItemCount, *__pContentTableView, *pForm);
+                       CommonUtil::ShowSelectAllCheckButton(*__pSelectAllCheckedButton);
+                       CommonUtil::SetAddtoPlaylistState(false);
 
-               Invalidate(true);
+                       Invalidate(true);
 
-               pSceneManager->GoForward(ForwardSceneTransition(IDSCN_PLAYLIST_LIST,
+                       pSceneManager->GoForward(ForwardSceneTransition(IDSCN_PLAYLIST_LIST,
                                                                                                                SCENE_TRANSITION_ANIMATION_TYPE_NONE,
                                                                                                                SCENE_HISTORY_OPTION_NO_HISTORY,
                                                                                                                SCENE_DESTROY_OPTION_DESTROY));
-
-
+               }
                break;
-       }
+
        case IDA_FOOTER_BUTTON_CANCEL:
-       {
-               //AppLogDebug("IDA_FOOTER_BUTTON_CANCEL");
-               Form* pForm = dynamic_cast<Form*>(GetParent());
-               AppAssert(pForm);
-               CommonUtil::SetButtonEnabled(*pForm, __checkedItemCount, actionId);
-               pSceneManager->GoBackward(BackwardSceneTransition());
+               {
+                       //AppLogDebug("IDA_FOOTER_BUTTON_CANCEL");
+                       Form* pForm = dynamic_cast<Form*>(GetParent());
+                       AppAssert(pForm);
+                       CommonUtil::SetButtonEnabled(*pForm, __checkedItemCount, actionId);
+                       pSceneManager->GoBackward(BackwardSceneTransition());
+               }
                break;
-       }
+
        default:
-       {
                break;
-       }
        }//End of switch
+       AppLogDebug("EXIT");
 }
 
 void
 AlbumContentPickerPanel::OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previousSceneId,
-                                                                      const Tizen::Ui::Scenes::SceneId& currentSceneId,
-                                                                      Tizen::Base::Collection::IList* pArgs)
+                                                                               const Tizen::Ui::Scenes::SceneId& currentSceneId,
+                                                                               Tizen::Base::Collection::IList* pArgs)
 {
-       //AppLogDebug("OnSceneActivatedN");
-
+       AppLogDebug("ENTER");
        Form* pForm = dynamic_cast<Form*>(GetParent());
        AppAssert(pForm);
 
        Footer* pFooter = CommonUtil::CreateAddtoPlaylistPickerFooter(*pForm);
        pFooter->AddActionEventListener(*this);
-
+       __pPresentationModel->UpdateAlbumList();
        CommonUtil::SetButtonEnabled(*pForm, __checkedItemCount);
 
        if (pArgs != null)
@@ -212,14 +204,14 @@ AlbumContentPickerPanel::OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& pre
                pArgs->RemoveAll(true);
                delete pArgs;
        }
+       AppLogDebug("EXIT");
 }
 
 void
 AlbumContentPickerPanel::OnSceneDeactivated(const Tizen::Ui::Scenes::SceneId& currentSceneId,
-                                                                               const Tizen::Ui::Scenes::SceneId& nextSceneId)
+                                                                                       const Tizen::Ui::Scenes::SceneId& nextSceneId)
 {
-       //AppLogDebug("OnSceneDeactivated");
-
+       AppLogDebug("ENTER");
        Form* pForm = dynamic_cast<Form*>(GetParent());
        AppAssert(pForm);
 
@@ -227,76 +219,74 @@ AlbumContentPickerPanel::OnSceneDeactivated(const Tizen::Ui::Scenes::SceneId& cu
        pFooter->RemoveAllButtons();
        pFooter->RemoveAllItems();
        pFooter->RemoveActionEventListener(*this);
+       AppLogDebug("EXIT");
 }
 
 int
 AlbumContentPickerPanel::GetItemCount(void)
 {
-       //AppLogDebug("GetItemCount");
-
+       AppLogDebug("ENTER");
        if (__pPresentationModel == null)
        {
-               return 0;
+               return INIT_VALUE;
        }
-       return __pPresentationModel->GetSongContentCount();
+       AppLogDebug("EXIT");
+       return __pPresentationModel->GetContentCount(__pPresentationModel->GetCurrentAlbumIndex());
 }
 
 Tizen::Ui::Controls::TableViewItem*
 AlbumContentPickerPanel::CreateItem(const int itemIndex, int itemWidth)
 {
-       //AppLogDebug("CreateTableViewItem");
-
-       ContentInformationStruct* pContentInfoStruct = __pPresentationModel->GetSongContentInfoN(itemIndex);
+       AppLogDebug("ENTER");
+       ContentInformation* pContentInfoStruct = __pPresentationModel->GetContentInfoN(itemIndex);
        if (pContentInfoStruct == null)
        {
                return null;
        }
 
        TableViewItem* pItem = new (std::nothrow) TableViewItem();
-       pItem->Construct(Dimension(itemWidth, ITEM_HEIGHT),TABLE_VIEW_ANNEX_STYLE_MARK);
+       pItem->Construct(Dimension(itemWidth, ITEM_HEIGHT), TABLE_VIEW_ANNEX_STYLE_MARK);
        pItem->SetBackgroundColor(COLOR_ITEM);
 
-       CommonUtil::CreateContentPikerTableViewItem(*pItem, pContentInfoStruct->TitleName,CommonUtil::GetFormatDate(pContentInfoStruct->Duration));
-
-       //test_code_start
-       delete pContentInfoStruct->pThumbnail;
-       pContentInfoStruct->pThumbnail = null;
+       CommonUtil::CreateContentPikerTableViewItem(*pItem, pContentInfoStruct->TitleName, CommonUtil::GetFormatDate(pContentInfoStruct->Duration));
 
        delete pContentInfoStruct;
        pContentInfoStruct = null;
-       //test_code_end
 
+       AppLogDebug("EXIT");
        return pItem;
 }
 
 bool
 AlbumContentPickerPanel::DeleteItem(const int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem)
 {
-       //AppLogDebug("DeleteItem");
-
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
        return true;
 }
 
 void
 AlbumContentPickerPanel::UpdateItem(int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem)
 {
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 
 int
 AlbumContentPickerPanel::GetDefaultItemHeight(void)
 {
-       //AppLogDebug("GetDefaultItemHeight");
-
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
        return ITEM_HEIGHT;
 }
 
 void
 AlbumContentPickerPanel::OnTableViewItemStateChanged(Tizen::Ui::Controls::TableView& tableView,
-                                                     int itemIndex,
-                                                     Tizen::Ui::Controls::TableViewItem* pItem,
-                                                     Tizen::Ui::Controls::TableViewItemStatus status)
+                                                               int itemIndex,
+                                                               Tizen::Ui::Controls::TableViewItem* pItem,
+                                                               Tizen::Ui::Controls::TableViewItemStatus status)
 {
-       //AppLogDebug("OnTableViewItemStateChanged");
+       AppLogDebug("ENTER");
        if (tableView.IsItemChecked(itemIndex) == true)
        {
                __checkedItemCount++;
@@ -310,7 +300,7 @@ AlbumContentPickerPanel::OnTableViewItemStateChanged(Tizen::Ui::Controls::TableV
 
        CommonUtil::ShowSelectAllCheckButton(*__pSelectAllCheckedButton);
 
-       if (__checkedItemCount == __pPresentationModel->GetSongContentCount())
+       if (__checkedItemCount == __pPresentationModel->GetContentCount(__pPresentationModel->GetCurrentAlbumIndex()))
        {
                __pSelectAllCheckedButton->SetSelected(true);
        }
@@ -321,20 +311,24 @@ AlbumContentPickerPanel::OnTableViewItemStateChanged(Tizen::Ui::Controls::TableV
        AppAssert(pForm);
        CommonUtil::ShowCheckedCountLabel(*__pCheckedCountLabel, __checkedItemCount, *__pContentTableView, *pForm);
        CommonUtil::SetButtonEnabled(*pForm, __checkedItemCount);
+       AppLogDebug("EXIT");
 }
 
 void
 AlbumContentPickerPanel::OnTableViewContextItemActivationStateChanged(Tizen::Ui::Controls::TableView& tableView,
-                                                                      int itemIndex,
-                                                                      Tizen::Ui::Controls::TableViewContextItem* pContextItem,
-                                                                      bool activated)
+                                                                               int itemIndex,
+                                                                               Tizen::Ui::Controls::TableViewContextItem* pContextItem,
+                                                                               bool activated)
 {
-       //AppLogDebug("OnTableViewContextItemActivationStateChanged");
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
+
 void
 AlbumContentPickerPanel::OnTableViewItemReordered(Tizen::Ui::Controls::TableView& tableView,
-                                                  int itemIndexFrom,
-                                                  int itemIndexTo)
+                                                               int itemIndexFrom,
+                                                               int itemIndexTo)
 {
-       //AppLogDebug("OnTableViewItemReordered");
-}
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
+}
\ No newline at end of file
index 0414060..2cd11c2 100644 (file)
@@ -1,4 +1,4 @@
-//
+//
 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
 //
 // Licensed under the Flora License, Version 1.0 (the License);
 // limitations under the License.
 //
 
+/**
+ * @file               MpAlbumListEditorPanel.cpp
+ * @brief              This is the implementation file for AlbumListEditorPanel class.
+ */
+
 #include "MpAlbumListEditorPanel.h"
 #include "MpPlaylistPickerPopup.h"
+#include "MpThumbnailInfo.h"
 
 using namespace Tizen::Base;
 using namespace Tizen::Base::Collection;
@@ -30,42 +36,47 @@ static const int Y_CREATE_TABLE_VIEW_ITEM = 29;
 static const int W_CREATE_TABLE_VIEW_ITEM_COUNT_LABEL_ITEM = 200;
 
 AlbumListEditorPanel::AlbumListEditorPanel(void)
-: __checkedItemCount(0)
-, __pContentTableView(null)
-, __pSelectAllCheckedButton(null)
-, __pCheckedCountLabel(null)
-, __pPlayListPickerPopup(null)
+       : ThumbnailBase::ThumbnailBase()
+       , __checkedItemCount(0)
+       , __pContentTableView(null)
+       , __pSelectAllCheckedButton(null)
+       , __pCheckedCountLabel(null)
+       , __pPlayListPickerPopup(null)
+       , __pThumbnail(null)
 {
-       //AppLogDebug("AlbumListEditorPanel");
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 
 AlbumListEditorPanel::~AlbumListEditorPanel(void)
 {
-       //AppLogDebug("~AlbumListEditorPanel");
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 
 bool
 AlbumListEditorPanel::Initialize(void)
 {
-       //AppLogDebug("Initialize");
-       result r = Construct(Rectangle(INIT_VALUE, INIT_VALUE, INIT_VALUE, INIT_VALUE));
+       AppLogDebug("ENTER");
+       result r = BasePanel::Construct(Rectangle(INIT_VALUE, INIT_VALUE, INIT_VALUE, INIT_VALUE));
        if (IsFailed(r))
        {
                return false;
        }
+       AppLogDebug("EXIT");
        return true;
 }
 
 result
 AlbumListEditorPanel::OnInitializing(void)
 {
-       //AppLogDebug("OnInitializing");
+       AppLogDebug("ENTER");
        __pPresentationModel = AlbumListPresentationModel::GetInstance();
 
        Form* pForm = dynamic_cast<Form*>(GetParent());
        AppAssert(pForm);
 
-       int width  = pForm->GetClientAreaBounds().width;
+       int width = pForm->GetClientAreaBounds().width;
        int height = pForm->GetClientAreaBounds().height;
 
        SetBounds(INIT_VALUE, INIT_VALUE, width, height);
@@ -84,101 +95,101 @@ AlbumListEditorPanel::OnInitializing(void)
        AddControl(*__pSelectAllCheckedButton);
        AddControl(*__pCheckedCountLabel);
 
-       return E_SUCCESS;
+       AppLogDebug("EXIT");
+       return ThumbnailBase::Construct();
 }
 
 result
 AlbumListEditorPanel::OnTerminating(void)
 {
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
        return E_SUCCESS;
 }
 
 void
 AlbumListEditorPanel::OnActionPerformed(const Tizen::Ui::Control& source, int actionId)
 {
-       //AppLogDebug("OnActionPerformed");
+       AppLogDebug("ENTER");
        SceneManager* pSceneManager = SceneManager::GetInstance();
        AppAssert(pSceneManager);
 
-       int totalCount = __pPresentationModel->GetTotalAlbumCount();
+       int totalCount = __pPresentationModel->GetAllAlbumCount();
 
-       switch(actionId)
+       switch (actionId)
        {
        case IDA_CHECK_BUTTON:
-       {
-               //AppLogDebug("IDA_CHECK_BUTTON");
-               __checkedItemCount = totalCount;
-               CommonUtil::SetAllCheckState(true, *__pContentTableView, totalCount);
-               Form* pForm = dynamic_cast<Form*>(GetParent());
-               AppAssert(pForm);
-               CommonUtil::ShowCheckedCountLabel(*__pCheckedCountLabel, __checkedItemCount, *__pContentTableView, *pForm);
+               {
+                       //AppLogDebug("IDA_CHECK_BUTTON");
+                       __checkedItemCount = totalCount;
+                       CommonUtil::SetAllCheckState(true, *__pContentTableView, totalCount);
+                       Form* pForm = dynamic_cast<Form*>(GetParent());
+                       AppAssert(pForm);
+                       CommonUtil::ShowCheckedCountLabel(*__pCheckedCountLabel, __checkedItemCount, *__pContentTableView, *pForm);
+               }
                break;
-       }
+
        case IDA_UNCHECK_BUTTON:
-       {
-               //AppLogDebug("IDA_UNCHECK_BUTTON");
-               __checkedItemCount = INIT_VALUE;
-               CommonUtil::SetAllCheckState(false, *__pContentTableView, totalCount);
-               Form* pForm = dynamic_cast<Form*>(GetParent());
-               AppAssert(pForm);
-               CommonUtil::ShowCheckedCountLabel(*__pCheckedCountLabel, __checkedItemCount, *__pContentTableView, *pForm);
+               {
+                       //AppLogDebug("IDA_UNCHECK_BUTTON");
+                       __checkedItemCount = INIT_VALUE;
+                       CommonUtil::SetAllCheckState(false, *__pContentTableView, totalCount);
+                       Form* pForm = dynamic_cast<Form*>(GetParent());
+                       AppAssert(pForm);
+                       CommonUtil::ShowCheckedCountLabel(*__pCheckedCountLabel, __checkedItemCount, *__pContentTableView, *pForm);
+               }
                break;
-       }
+
        case IDA_FOOTER_BUTTON_ADD_TO_PLAYLIST:
-       {
-               if (__checkedItemCount <= INIT_VALUE)
                {
-                       return;
-               }
+                       if (__checkedItemCount <= INIT_VALUE)
+                       {
+                               return;
+                       }
 
-               ArrayList* pDataList = new (std::nothrow) ArrayList();
-               pDataList->Construct();
+                       ArrayList* pDataList = new (std::nothrow) ArrayList();
+                       pDataList->Construct();
 
-               int totalCount = __pPresentationModel->GetTotalAlbumCount();
-               for(int iCount = 0; iCount < totalCount; iCount++)
-               {
-                       if (__pContentTableView->IsItemChecked(iCount) == true)
+                       int totalCount = __pPresentationModel->GetAllAlbumCount();
+                       for (int iCount = 0; iCount < totalCount; iCount++)
                        {
-                               pDataList->AddItems(*(__pPresentationModel->SearchContentItemN(iCount)));
+                               if (__pContentTableView->IsItemChecked(iCount) == true)
+                               {
+                                       pDataList->AddItems(*(__pPresentationModel->GetContentPathListN(iCount)));
+                               }
                        }
-               }
 
-               if (__pPlayListPickerPopup == null)
-               {
                        __pPlayListPickerPopup = new (std::nothrow) PlayListPickerPopup();
-                       __pPlayListPickerPopup->Initialize();
+                       __pPlayListPickerPopup->Initialize(this, pDataList);
+                       //__pPlayListPickerPopup->SetCollectedContent(pDataList);
+                       __pPlayListPickerPopup->SetShowState(true);
+                       __pPlayListPickerPopup->Show();
                }
-
-               __pPlayListPickerPopup->SetCollectedContent(pDataList);
-               __pPlayListPickerPopup->SetShowState(true);
-               __pPlayListPickerPopup->Show();
-
                break;
-       }
+
        case IDA_FOOTER_BUTTON_CANCEL:
-       {
-               //AppLogDebug("IDA_FOOTER_BUTTON_CANCEL");
-               pSceneManager->GoBackward(BackwardSceneTransition());
+               {
+                       //AppLogDebug("IDA_FOOTER_BUTTON_CANCEL");
+                       pSceneManager->GoBackward(BackwardSceneTransition());
+               }
                break;
-       }
+
        default:
-       {
                break;
-       }
        }//End of switch
 
        Form* pForm = dynamic_cast<Form*>(GetParent());
        AppAssert(pForm);
        CommonUtil::SetButtonEnabled(*pForm, __checkedItemCount, actionId);
+       AppLogDebug("EXIT");
 }
 
 void
 AlbumListEditorPanel::OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previousSceneId,
-                                                                   const Tizen::Ui::Scenes::SceneId& currentSceneId,
-                                                                   Tizen::Base::Collection::IList* pArgs)
+                                                                       const Tizen::Ui::Scenes::SceneId& currentSceneId,
+                                                                       Tizen::Base::Collection::IList* pArgs)
 {
-       //AppLogDebug("OnSceneActivatedN");
-
+       AppLogDebug("ENTER");
        Form* pForm = dynamic_cast<Form*>(GetParent());
        AppAssert(pForm);
 
@@ -194,14 +205,14 @@ AlbumListEditorPanel::OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previo
                pArgs->RemoveAll(true);
                delete pArgs;
        }
+       AppLogDebug("EXIT");
 }
 
 void
 AlbumListEditorPanel::OnSceneDeactivated(const Tizen::Ui::Scenes::SceneId& currentSceneId,
-                                                                            const Tizen::Ui::Scenes::SceneId& nextSceneId)
+                                                                               const Tizen::Ui::Scenes::SceneId& nextSceneId)
 {
-       //AppLogDebug("OnSceneDeactivated");
-
+       AppLogDebug("ENTER");
        Form* pForm = dynamic_cast<Form*>(GetParent());
        AppAssert(pForm);
 
@@ -214,46 +225,50 @@ AlbumListEditorPanel::OnSceneDeactivated(const Tizen::Ui::Scenes::SceneId& curre
        CommonUtil::ShowCheckedCountLabel(*__pCheckedCountLabel, __checkedItemCount, *__pContentTableView, *pForm);
        CommonUtil::ShowSelectAllCheckButton(*__pSelectAllCheckedButton);
 
-       int totalCount = __pPresentationModel->GetTotalAlbumCount();
-       for(int iCount = 0; iCount < totalCount; iCount++)
+       int totalCount = __pPresentationModel->GetAllAlbumCount();
+       for (int iCount = 0; iCount < totalCount; iCount++)
        {
                __pContentTableView->SetItemChecked(iCount, false);
        }
+       CancelAllThumbnailRequest();
+       AppLogDebug("EXIT");
 }
 
 int
 AlbumListEditorPanel::GetItemCount(void)
 {
-       //AppLogDebug("GetItemCount");
-
+       AppLogDebug("ENTER");
        int retCount = INIT_VALUE;
        if (__pPresentationModel == null)
        {
                return retCount;
        }
-       retCount = __pPresentationModel->GetTotalAlbumCount();
+       retCount = __pPresentationModel->GetAllAlbumCount();
+       AppLogDebug("EXIT");
        return retCount;
 }
 
 Tizen::Ui::Controls::TableViewItem*
 AlbumListEditorPanel::CreateItem(const int itemIndex, int itemWidth)
 {
-       //AppLogDebug("CreateTableViewItem");
-       ContentInformationStruct* pContentInfoStruct = __pPresentationModel->GetContentInfoN(itemIndex);
+       AppLogDebug("ENTER");
+       ContentInformation* pContentInfoStruct = __pPresentationModel->GetAlbumInfoN(itemIndex);
        if (pContentInfoStruct == null)
        {
                return null;
        }
 
-       TableViewItem* pItem = new (std::nothrow) TableViewItem;
-       pItem->Construct(Dimension(itemWidth, ITEM_HEIGHT),TABLE_VIEW_ANNEX_STYLE_MARK);
+       TableViewItem* pItem = new (std::nothrow) TableViewItem();
+       pItem->Construct(Dimension(itemWidth, ITEM_HEIGHT), TABLE_VIEW_ANNEX_STYLE_MARK);
        pItem->SetBackgroundColor(COLOR_ITEM);
 
        int W_Label = W_CLIENT_AREA - (W_TABLE_VIEW_MARK + W_CREATE_TABLE_VIEW_ITEM_COUNT_LABEL_ITEM);
 
+       RequestThumbnail(pContentInfoStruct->contentId, (new (std::nothrow) int(itemIndex)));
        Label* pSongThumbnailLabel = new (std::nothrow) Label();
        pSongThumbnailLabel->Construct(Rectangle(0, Y_GAP_THUMBNAIL, W_THUMBNAIL, H_THUMBNAIL), L"");
-       pSongThumbnailLabel->SetBackgroundBitmap(*(pContentInfoStruct->pThumbnail));
+       pSongThumbnailLabel->SetBackgroundBitmap(*GetDefaultThumbnail());
+       pSongThumbnailLabel->SetName(L"pSongThumbnailLabel");
 
        Label* pSongNameLabel = new (std::nothrow) Label();
        pSongNameLabel->Construct(Rectangle(pSongThumbnailLabel->GetWidth(), Y_CREATE_TABLE_VIEW_ITEM, W_Label, H_CREATE_TABLE_VIEW_ITEM), L"");
@@ -265,67 +280,60 @@ AlbumListEditorPanel::CreateItem(const int itemIndex, int itemWidth)
        pSongTimeLabel->Construct(Rectangle(pSongNameLabel->GetWidth(), pSongNameLabel->GetY(), W_CREATE_TABLE_VIEW_ITEM_COUNT_LABEL_ITEM, H_CREATE_TABLE_VIEW_ITEM), L"");
        pSongTimeLabel->SetTextConfig(FONT_SIZE - 2, LABEL_TEXT_STYLE_NORMAL);
        pSongTimeLabel->SetTextHorizontalAlignment(ALIGNMENT_RIGHT);
-       pSongTimeLabel->SetText(CommonUtil::SetSongsString(__pPresentationModel->GetTotalContentCount(itemIndex)));
+       pSongTimeLabel->SetText(CommonUtil::SetSongsString(__pPresentationModel->GetContentCount(itemIndex)));
 
        pItem->AddControl(*pSongThumbnailLabel);
        pItem->AddControl(*pSongNameLabel);
        pItem->AddControl(*pSongTimeLabel);
 
-       delete pContentInfoStruct->pThumbnail;
-       pContentInfoStruct->pThumbnail = null;
-
        delete pContentInfoStruct;
        pContentInfoStruct = null;
 
+       AppLogDebug("EXIT");
        return pItem;
 }
 
 bool
 AlbumListEditorPanel::DeleteItem(const int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem)
 {
-       //AppLogDebug("DeleteItem");
-
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
        return true;
 }
 
-void
-AlbumListEditorPanel::UpdateItem(int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem)
-{
-}
-
 int
 AlbumListEditorPanel::GetDefaultItemHeight(void)
 {
-       //AppLogDebug("GetDefaultItemHeight");
-
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
        return ITEM_HEIGHT;
 }
 
 void
 AlbumListEditorPanel::OnTableViewItemStateChanged(Tizen::Ui::Controls::TableView& tableView,
-                                                  int itemIndex,
-                                                  Tizen::Ui::Controls::TableViewItem* pItem,
-                                                  Tizen::Ui::Controls::TableViewItemStatus status)
+                                                               int itemIndex,
+                                                               Tizen::Ui::Controls::TableViewItem* pItem,
+                                                               Tizen::Ui::Controls::TableViewItemStatus status)
 {
-       //AppLogDebug("OnTableViewItemStateChanged");
-       switch(status)
+       AppLogDebug("ENTER");
+       switch (status)
        {
        case TABLE_VIEW_ITEM_STATUS_CHECKED:
-       {
-               __checkedItemCount++;
-               tableView.SetItemChecked(itemIndex, true);
+               {
+                       __checkedItemCount++;
+                       tableView.SetItemChecked(itemIndex, true);
+               }
                break;
-       }
+
        case TABLE_VIEW_ITEM_STATUS_UNCHECKED:
-       {
-               __checkedItemCount--;
-               tableView.SetItemChecked(itemIndex, false);
+               {
+                       __checkedItemCount--;
+                       tableView.SetItemChecked(itemIndex, false);
+               }
                break;
-       }
+
        default:
-       {
                break;
-       }
        }//end of switch
 
        Form* pForm = dynamic_cast<Form*>(GetParent());
@@ -334,43 +342,104 @@ AlbumListEditorPanel::OnTableViewItemStateChanged(Tizen::Ui::Controls::TableView
 
        CommonUtil::ShowSelectAllCheckButton(*__pSelectAllCheckedButton);
 
-       if (__checkedItemCount == __pPresentationModel->GetTotalAlbumCount())
+       if (__checkedItemCount == __pPresentationModel->GetAllAlbumCount())
        {
                __pSelectAllCheckedButton->SetSelected(true);
        }
 
        Invalidate(true);
        CommonUtil::ShowCheckedCountLabel(*__pCheckedCountLabel, __checkedItemCount, *__pContentTableView, *pForm);
+       AppLogDebug("EXIT");
 }
 
 void
 AlbumListEditorPanel::OnTableViewContextItemActivationStateChanged(Tizen::Ui::Controls::TableView& tableView,
-                                                                   int itemIndex,
-                                                                   Tizen::Ui::Controls::TableViewContextItem* pContextItem,
-                                                                   bool activated)
+                                                                               int itemIndex,
+                                                                               Tizen::Ui::Controls::TableViewContextItem* pContextItem,
+                                                                               bool activated)
 {
-       //AppLogDebug("OnTableViewContextItemActivationStateChanged");
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
+
 void
 AlbumListEditorPanel::OnTableViewItemReordered(Tizen::Ui::Controls::TableView& tableView,
-                                             int itemIndexFrom,
-                                             int itemIndexTo)
+                                                       int itemIndexFrom,
+                                                       int itemIndexTo)
 {
-       //AppLogDebug("OnTableViewItemReordered");
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 
 void
 AlbumListEditorPanel::OnUpdateContentList(void)
 {
+       AppLogDebug("ENTER");
        UpdateContentList();
+       AppLogDebug("EXIT");
 }
 
 void
 AlbumListEditorPanel::UpdateContentList(void)
 {
+       AppLogDebug("ENTER");
        if (__pPresentationModel != null && __pContentTableView != null)
        {
-               __pPresentationModel->RefreshContent();
+               __pPresentationModel->UpdateAlbumList();
                __pContentTableView->UpdateTableView();
        }
+       AppLogDebug("EXIT");
 }
+
+void
+AlbumListEditorPanel::OnThumbnailInfoReveivedN(ThumbnailInfo* pThumbnailInfo)
+{
+       AppLogDebug("ENTER");
+       int itemIndex = 0;
+       void* pParam = null;
+       __pThumbnail = pThumbnailInfo->GetBitmapN();
+       pParam = pThumbnailInfo->GetUserParamN();
+       if (pParam)
+       {
+               itemIndex = *(static_cast<int*>(pParam));
+       }
+       __pContentTableView->RefreshItem(itemIndex, TABLE_VIEW_REFRESH_TYPE_ITEM_MODIFY);
+       delete pThumbnailInfo;
+       delete static_cast<int*>(pParam);
+       AppLogDebug("EXIT");
+}
+
+void
+AlbumListEditorPanel::OnUserEventReceivedN(RequestId requestId, Tizen::Base::Collection::IList* pArgs)
+{
+       AppLogDebug("ENTER");
+       AppLogDebug("OnUserEventReceivedN %d", requestId);
+       if (requestId == ID_DESTORY_PLAY_LIST_PICKER_POPUP)
+       {
+               if (__pPlayListPickerPopup != null)
+               {
+                       delete __pPlayListPickerPopup;
+                       __pPlayListPickerPopup = null;
+               }
+       }
+       AppLogDebug("EXIT");
+}
+
+void
+AlbumListEditorPanel::UpdateItem(int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem)
+{
+       AppLogDebug("ENTER");
+       Label* pThumbnailLabel = static_cast<Label*>(pItem->GetControl(L"pSongThumbnailLabel"));
+       if (__pThumbnail == null || pThumbnailLabel == null)
+       {
+               AppLogDebug("__pThumbnail or pThumbnailLabel is null");
+               delete __pThumbnail;
+               __pThumbnail = null;
+               return;
+       }
+       pThumbnailLabel->SetBackgroundBitmap(*__pThumbnail);
+       delete __pThumbnail;
+       __pThumbnail = null;
+       pThumbnailLabel->Invalidate(true);
+       AppLogDebug("EXIT");
+}
\ No newline at end of file
old mode 100755 (executable)
new mode 100644 (file)
index 0852d62..f089a0d
@@ -1,4 +1,4 @@
-//
+//
 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
 //
 // Licensed under the Flora License, Version 1.0 (the License);
 // limitations under the License.
 //
 
+/**
+ * @file               MpAlbumListPanel.cpp
+ * @brief              This is the implementation file for AlbumListPanel class.
+ */
+
 #include "MpAlbumListPanel.h"
 #include "MpNowPlayContentPanel.h"
 #include "MpPlaylistPickerPopup.h"
+#include "MpThumbnailInfo.h"
 
 using namespace Tizen::Base;
 using namespace Tizen::Base::Collection;
@@ -26,45 +32,51 @@ using namespace Tizen::Social;
 using namespace Tizen::Ui::Controls;
 using namespace Tizen::Ui::Scenes;
 
-static const int W_SONG_TIME     = 200;
-static const int Y_GAP_LABEL     =  10;
+static const int W_SONG_TIME = 200;
+static const int Y_GAP_LABEL = 10;
 
 AlbumListPanel::AlbumListPanel(void)
-: __itemIndex(-1)
-, __pNowPlayContentPanel(null)
-, __pPlayListPickerPopup(null)
-, __pContextItem(null)
-, __pContentTableView(null)
-, __pNoContentImageLabel(null)
-, __pNoContentTextLabel(null)
+       : ThumbnailBase::ThumbnailBase()
+       , __itemIndex(-1)
+       , __pNowPlayContentPanel(null)
+       , __pPlayListPickerPopup(null)
+       , __pContextItem(null)
+       , __pContentTableView(null)
+       , __pNoContentImageLabel(null)
+       , __pNoContentTextLabel(null)
+       , __pThumbnail(null)
 {
-       //AppLogDebug("AlbumListPanel");
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 
 AlbumListPanel::~AlbumListPanel(void)
 {
-       //AppLogDebug("~AlbumListPanel");
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 
 bool
 AlbumListPanel::Initialize(void)
 {
-       //AppLogDebug("Initialize");
-       result r = Construct(Rectangle(INIT_VALUE, INIT_VALUE, INIT_VALUE, INIT_VALUE));
+       AppLogDebug("ENTER");
+       result r = BasePanel::Construct(Rectangle(INIT_VALUE, INIT_VALUE, INIT_VALUE, INIT_VALUE));
        if (IsFailed(r))
        {
                return false;
        }
+       AppLogDebug("EXIT");
        return true;
 }
 
 result
 AlbumListPanel::OnInitializing(void)
 {
+       AppLogDebug("ENTER");
        Form* pForm = dynamic_cast<Form*>(GetParent());
        AppAssert(pForm);
 
-       int width  = pForm->GetClientAreaBounds().width;
+       int width = pForm->GetClientAreaBounds().width;
        int height = pForm->GetClientAreaBounds().height;
 
        SetBounds(INIT_VALUE, INIT_VALUE, width, height);
@@ -75,15 +87,15 @@ AlbumListPanel::OnInitializing(void)
        __pContentTableView->AddTableViewItemEventListener(*this);
 
        __pNoContentImageLabel = new (std::nothrow) Label();
-       __pNoContentImageLabel->Construct(Rectangle((pForm->GetWidth() - W_NO_CONTENT)/ 2, Y_GAP_NO_CONTENT, W_NO_CONTENT, H_NO_CONTENT),L"");
+       __pNoContentImageLabel->Construct(Rectangle((pForm->GetWidth() - W_NO_CONTENT) / 2, Y_GAP_NO_CONTENT, W_NO_CONTENT, H_NO_CONTENT), L"");
        __pNoContentImageLabel->SetBackgroundBitmap(*(ResourceManager::GetBitmapN(NO_CONTENT_BITMAP)));
 
        __pNoContentTextLabel = new (std::nothrow) Label();
        __pNoContentTextLabel->Construct(Rectangle(0,
-                                                  __pNoContentImageLabel->GetHeight() + __pNoContentImageLabel->GetY(),
-                                                  pForm->GetWidth(),
-                                                  H_TEXT_NO_CONTENT),
-                                                  ResourceManager::GetString(L"IDS_COM_BODY_NO_ITEMS"));
+                                                               __pNoContentImageLabel->GetHeight() + __pNoContentImageLabel->GetY(),
+                                                               pForm->GetWidth(),
+                                                               H_TEXT_NO_CONTENT),
+                                                               ResourceManager::GetString(L"IDS_COM_BODY_NO_ITEMS"));
        __pNoContentTextLabel->SetTextConfig(FONT_SIZE_NO_CONTENT, LABEL_TEXT_STYLE_BOLD);
 
        __pContextItem = new (std::nothrow) TableViewContextItem();
@@ -96,12 +108,14 @@ AlbumListPanel::OnInitializing(void)
 
        __pPresentationModel = AlbumListPresentationModel::GetInstance();
 
-       return E_SUCCESS;
+       AppLogDebug("EXIT");
+       return ThumbnailBase::Construct();
 }
 
 result
 AlbumListPanel::OnTerminating(void)
 {
+       AppLogDebug("ENTER");
        if (__pPlayListPickerPopup != null)
        {
                delete __pPlayListPickerPopup;
@@ -111,83 +125,84 @@ AlbumListPanel::OnTerminating(void)
        delete __pContextItem;
        __pContextItem = null;
 
+       AppLogDebug("EXIT");
        return E_SUCCESS;
 }
 
 void
 AlbumListPanel::OnActionPerformed(const Tizen::Ui::Control& source, int actionId)
 {
-       //AppLogDebug("OnActionPerformed");
+       AppLogDebug("ENTER");
        SceneManager* pSceneManager = SceneManager::GetInstance();
        AppAssert(pSceneManager);
 
-       switch(actionId)
+       switch (actionId)
        {
        case IDA_FOOTER_BUTTON_ADD_TO_PLAYLIST:
-       {
-               if (__pPresentationModel->GetTotalAlbumCount() == 0)
                {
-                       MessageBox messageBox;
-                       messageBox.Construct(L"", ResourceManager::GetString(L"IDS_COM_BODY_NO_ITEMS"), MSGBOX_STYLE_NONE, 500);
+                       if (__pPresentationModel->GetAllAlbumCount() == 0)
+                       {
+                               MessageBox messageBox;
+                               messageBox.Construct(L"", ResourceManager::GetString(L"IDS_COM_BODY_NO_ITEMS"), MSGBOX_STYLE_NONE, 500);
 
-                       int modalResult = 0;
-                       messageBox.ShowAndWait(modalResult);
-                       break;
-               }
+                               int modalResult = 0;
+                               messageBox.ShowAndWait(modalResult);
+                               break;
+                       }
 
-               pSceneManager->GoForward(ForwardSceneTransition(IDSCN_ALBUM_LIST_EDITOR));
+                       pSceneManager->GoForward(ForwardSceneTransition(IDSCN_ALBUM_LIST_EDITOR));
+               }
                break;
-       }
+
        case IDA_FOOTER_BUTTON_SEARCH:
-       {
-               pSceneManager->GoForward(ForwardSceneTransition(IDSCN_SEARCH));
+               {
+                       pSceneManager->GoForward(ForwardSceneTransition(IDSCN_SEARCH));
+               }
                break;
-       }
+
        case IDA_FLICK_BUTTON_ADD_TO_PALYLIST:
-       {
-               if (__pPlayListPickerPopup == null)
                {
                        __pPlayListPickerPopup = new (std::nothrow) PlayListPickerPopup();
-                       __pPlayListPickerPopup->Initialize();
+                       __pPlayListPickerPopup->Initialize(this, __pPresentationModel->GetContentPathListN(__itemIndex));
+                       //__pPlayListPickerPopup->SetCollectedContent(__pPresentationModel->GetContentPathListN(__itemIndex));
+                       __pPlayListPickerPopup->SetShowState(true);
+                       __pPlayListPickerPopup->Show();
                }
-
-               __pPlayListPickerPopup->SetCollectedContent(__pPresentationModel->SearchContentItemN(__itemIndex));
-               __pPlayListPickerPopup->SetShowState(true);
-               __pPlayListPickerPopup->Show();
                break;
-       }
+
        default:
-       {
                break;
-       }
        }//End of Switch
+       AppLogDebug("EXIT");
 }
 
 void
 AlbumListPanel::OnFormBackRequested(Tizen::Ui::Controls::Form& source)
 {
-       AppLogDebug("Start");
+       AppLogDebug("ENTER");
        if (CommonUtil::GetAddtoPlaylistState() == true)
        {
                SceneManager* pSceneManager = SceneManager::GetInstance();
                AppAssert(pSceneManager);
                pSceneManager->GoForward(ForwardSceneTransition(IDSCN_PLAYLIST_LIST,
-                                                        SCENE_TRANSITION_ANIMATION_TYPE_NONE,
-                                                        SCENE_HISTORY_OPTION_NO_HISTORY,
-                                                        SCENE_DESTROY_OPTION_DESTROY));
+                                                               SCENE_TRANSITION_ANIMATION_TYPE_NONE,
+                                                               SCENE_HISTORY_OPTION_NO_HISTORY,
+                                                               SCENE_DESTROY_OPTION_DESTROY));
                CommonUtil::SetAddtoPlaylistState(false);
        }
        else
        {
                Tizen::App::Application::GetInstance()->Terminate();
        }
+       AppLogDebug("EXIT");
 }
 
 void
 AlbumListPanel::OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previousSceneId,
-                                                                 const Tizen::Ui::Scenes::SceneId& currentSceneId,
-                                                                 Tizen::Base::Collection::IList* pArgs)
+                                                                       const Tizen::Ui::Scenes::SceneId& currentSceneId,
+                                                                       Tizen::Base::Collection::IList* pArgs)
 {
+       AppLogDebug("ENTER");
        Form* pForm = dynamic_cast<Form*>(GetParent());
        AppAssert(pForm);
        pForm->SetFormBackEventListener(this);
@@ -212,31 +227,29 @@ AlbumListPanel::OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previousScen
 
        if (__pPresentationModel != null && __pContentTableView != null)
        {
-               __pPresentationModel->RefreshContent();
+               __pPresentationModel->UpdateAlbumList();
+
                __pContentTableView->UpdateTableView();
 
-               int totalAlbumCount = __pPresentationModel->GetTotalAlbumCount();
+               int totalAlbumCount = __pPresentationModel->GetAllAlbumCount();
                CommonUtil::SetButtonEnabled(*pForm, totalAlbumCount, IDA_FOOTER_BUTTON_ADD_TO_PLAYLIST);
 
                CommonUtil::ShowNoContentImage(totalAlbumCount, *__pContentTableView, *__pNoContentImageLabel, *__pNoContentTextLabel);
-
        }
 
-       UpdateContentList();
-
        if (pArgs != null)
        {
                pArgs->RemoveAll(true);
                delete pArgs;
        }
+       AppLogDebug("EXIT");
 }
 
 void
 AlbumListPanel::OnSceneDeactivated(const Tizen::Ui::Scenes::SceneId& currentSceneId,
-                                                                  const Tizen::Ui::Scenes::SceneId& nextSceneId)
+                                                                       const Tizen::Ui::Scenes::SceneId& nextSceneId)
 {
-       //AppLogDebug("OnSceneDeactivated");
-
+       AppLogDebug("ENTER");
        Form* pForm = dynamic_cast<Form*>(GetParent());
        AppAssert(pForm);
 
@@ -244,110 +257,113 @@ AlbumListPanel::OnSceneDeactivated(const Tizen::Ui::Scenes::SceneId& currentScen
        pFooter->RemoveAllButtons();
        pFooter->RemoveAllItems();
        pFooter->RemoveActionEventListener(*this);
+       CancelAllThumbnailRequest();
+       AppLogDebug("EXIT");
 }
 
 int
 AlbumListPanel::GetItemCount(void)
 {
+       AppLogDebug("ENTER");
        if (__pPresentationModel == null)
        {
                return INIT_VALUE;
        }
 
-       return __pPresentationModel->GetTotalAlbumCount();
+       AppLogDebug("EXIT");
+       return __pPresentationModel->GetAllAlbumCount();
 }
 
 Tizen::Ui::Controls::TableViewItem*
 AlbumListPanel::CreateItem(const int itemIndex, int itemWidth)
 {
-       //AppLogDebug("CreateItem");
-       ContentInformationStruct* pContentInfoStruct = __pPresentationModel->GetContentInfoN(itemIndex);
+       AppLogDebug("ENTER");
+       ContentInformation* pContentInfoStruct = __pPresentationModel->GetAlbumInfoN(itemIndex);
        if (pContentInfoStruct == null)
        {
                return null;
        }
 
-       TableViewItem* pItem = new (std::nothrow) TableViewItem;
+       TableViewItem* pItem = new (std::nothrow) TableViewItem();
        pItem->Construct(Dimension(itemWidth, ITEM_HEIGHT), TABLE_VIEW_ANNEX_STYLE_NORMAL);
        pItem->SetBackgroundColor(COLOR_ITEM);
 
-       CreateTableViewItem(*pItem, *pContentInfoStruct, __pPresentationModel->GetTotalContentCount(itemIndex));
-       pItem->SetContextItem(__pContextItem);
+       RequestThumbnail(pContentInfoStruct->contentId, (new (std::nothrow) int(itemIndex)));
+       CreateTableViewItem(*pItem, *pContentInfoStruct, __pPresentationModel->GetContentCount(itemIndex));
 
-       //test_code_start
-       delete pContentInfoStruct->pThumbnail;
-       pContentInfoStruct->pThumbnail = null;
+       pItem->SetContextItem(__pContextItem);
 
        delete pContentInfoStruct;
        pContentInfoStruct = null;
-       //test_code_end
 
+       AppLogDebug("EXIT");
        return pItem;
 }
 
 bool
 AlbumListPanel::DeleteItem(const int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem)
 {
-       //AppLogDebug("DeleteItem");
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
        return true;
 }
 
-void
-AlbumListPanel::UpdateItem(int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem)
-{
-}
-
 int
 AlbumListPanel::GetDefaultItemHeight(void)
 {
-       //AppLogDebug("GetDefaultItemHeight");
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
        return ITEM_HEIGHT;
 }
 
 void
 AlbumListPanel::OnTableViewItemStateChanged(Tizen::Ui::Controls::TableView& tableView,
-                                            int itemIndex,
-                                            Tizen::Ui::Controls::TableViewItem* pItem,
-                                            Tizen::Ui::Controls::TableViewItemStatus status)
+                                                       int itemIndex,
+                                                       Tizen::Ui::Controls::TableViewItem* pItem,
+                                                       Tizen::Ui::Controls::TableViewItemStatus status)
 {
+       AppLogDebug("ENTER");
        SceneManager* pSceneManager = SceneManager::GetInstance();
        AppAssert(pSceneManager);
 
        if (status == TABLE_VIEW_ITEM_STATUS_SELECTED)
        {
-               pSceneManager->GoForward(ForwardSceneTransition(IDSCN_CONTENT_LIST), GetContentListN(itemIndex));
+               pSceneManager->GoForward(ForwardSceneTransition(IDSCN_ALBUM_CONTENT_LIST), GetContentListN(itemIndex));
        }
+       AppLogDebug("EXIT");
 }
 
 void
 AlbumListPanel::OnTableViewContextItemActivationStateChanged(Tizen::Ui::Controls::TableView& tableView,
-                                                             int itemIndex,
-                                                             Tizen::Ui::Controls::TableViewContextItem* pContextItem,
-                                                             bool activated)
+                                                                       int itemIndex,
+                                                                       Tizen::Ui::Controls::TableViewContextItem* pContextItem,
+                                                                       bool activated)
 {
-       //AppLogDebug("OnTableViewContextItemActivationStateChanged");
+       AppLogDebug("ENTER");
        if (activated == true)
        {
                __itemIndex = itemIndex;
        }
+       AppLogDebug("EXIT");
 }
 
 void
 AlbumListPanel::OnTableViewItemReordered(Tizen::Ui::Controls::TableView& tableView,
-                                         int itemIndexFrom,
-                                         int itemIndexTo)
+                                               int itemIndexFrom,
+                                               int itemIndexTo)
 {
-       //AppLogDebug("OnTableViewContextItemActivationStateChanged");
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 
 void
 AlbumListPanel::OnFastScrollIndexSelected(Tizen::Ui::Control& source, Tizen::Base::String& index)
 {
-       AppLogDebug("Start");
-       int totalCount = __pPresentationModel->GetTotalAlbumCount();
-       for(int iCount = 0; iCount < totalCount; iCount++)
+       AppLogDebug("ENTER");
+       int totalCount = __pPresentationModel->GetAllAlbumCount();
+       for (int iCount = 0; iCount < totalCount; iCount++)
        {
-               String* pName = __pPresentationModel->GetContentName(iCount);
+               String* pName = __pPresentationModel->GetAlbumName(iCount);
                String firstCharacter;
 
                pName->SubString(0, 1, firstCharacter);
@@ -358,12 +374,12 @@ AlbumListPanel::OnFastScrollIndexSelected(Tizen::Ui::Control& source, Tizen::Bas
 
                if (Character::GetUnicodeCategory(language) == UNICODE_HANGUL)
                {
-                       Tizen::Base::String HangulIndex[] = {"ㄱ", "ㄲ", "ㄴ", "ㄷ", "ㄸ", "ㄹ", "ㅁ", "ㅂ", "ㅃ","ㅅ", "ㅆ", "ㅇ" , "ㅈ", "ㅉ", "ㅊ", "ㅋ", "ㅌ", "ㅍ", "ㅎ"        };
+                       Tizen::Base::String HangulIndex[] = {"ㄱ", "ㄲ", "ㄴ", "ㄷ", "ㄸ", "ㄹ", "ㅁ", "ㅂ", "ㅃ", "ㅅ", "ㅆ", "ㅇ" , "ㅈ", "ㅉ", "ㅊ", "ㅋ", "ㅌ", "ㅍ", "ㅎ"};
 
                        wchar_t songName;
                        pName->GetCharAt(0, songName);
 
-                       wchar_t UnicodeValue     = (songName - 0xAC00);
+                       wchar_t UnicodeValue = (songName - 0xAC00);
                        wchar_t InitialConsonant = ((UnicodeValue - (UnicodeValue % 28)) / 28) / 21;
                        int tempIndex = static_cast<int>(InitialConsonant);
 
@@ -384,24 +400,26 @@ AlbumListPanel::OnFastScrollIndexSelected(Tizen::Ui::Control& source, Tizen::Bas
                        break;
                }
        }//end of for
+       AppLogDebug("EXIT");
 }
 
 result
 AlbumListPanel::CreateTableViewItem(Tizen::Ui::Container& parent,
-                                                                       const ContentInformationStruct& contentInfoStruct,
+                                                                       const ContentInformation& contentInfoStruct,
                                                                        const int itemTotalCount)
 {
-       //AppLogDebug("CreateTableViewItem");
+       AppLogDebug("ENTER");
        result r = E_SUCCESS;
 
        Label* pAlbumThumbnailBGLabel = new (std::nothrow) Label();
        pAlbumThumbnailBGLabel->Construct(Rectangle(X_GAP_THUMBNAIL - 1, Y_GAP_THUMBNAIL - 1, W_THUMBNAIL + 1, W_THUMBNAIL + 1), L"");
 
        Label* pSongThumbnailLabel = new (std::nothrow) Label();
-       pSongThumbnailLabel->Construct(Rectangle(X_GAP_THUMBNAIL, Y_GAP_THUMBNAIL, W_THUMBNAIL ,H_THUMBNAIL), L"");
-       pSongThumbnailLabel->SetBackgroundBitmap(*contentInfoStruct.pThumbnail);
+       pSongThumbnailLabel->Construct(Rectangle(X_GAP_THUMBNAIL, Y_GAP_THUMBNAIL, W_THUMBNAIL, H_THUMBNAIL), L"");
+       pSongThumbnailLabel->SetBackgroundBitmap(*GetDefaultThumbnail());
+       pSongThumbnailLabel->SetName(L"pSongThumbnailLabel");
 
-       int X_Gap   = W_THUMBNAIL + (X_GAP_THUMBNAIL * 2);
+       int X_Gap = W_THUMBNAIL + (X_GAP_THUMBNAIL * 2);
        int W_Label = W_CLIENT_AREA - X_Gap;
 
        Label* pAlbumTitleLabel = new (std::nothrow) Label();
@@ -431,13 +449,15 @@ AlbumListPanel::CreateTableViewItem(Tizen::Ui::Container& parent,
        parent.AddControl(*pAlbumCountLabel);
        parent.AddControl(*pAlbumArtistLabel);
 
+       AppLogDebug("EXIT");
        return r;
 }
 
 Tizen::Base::Collection::ArrayList*
 AlbumListPanel::GetContentListN(int itemIndex)
 {
-       ContentInformationStruct* pContentInfoStruct = __pPresentationModel->GetContentInfoN(itemIndex);
+       AppLogDebug("ENTER");
+       ContentInformation* pContentInfoStruct = __pPresentationModel->GetAlbumInfoN(itemIndex);
        if (pContentInfoStruct == null)
        {
                return null;
@@ -450,32 +470,86 @@ AlbumListPanel::GetContentListN(int itemIndex)
        ArrayList* pRetList = new (std::nothrow) ArrayList();
        pRetList->Construct();
 
-       pRetList->Add(*(new String(IDSCN_ALBUM_LIST)));
-       pRetList->Add(*(new String(albumName)));
-
-       //test_code_start
-       delete pContentInfoStruct->pThumbnail;
-       pContentInfoStruct->pThumbnail = null;
+       pRetList->Add(*(new (std::nothrow) String(IDSCN_ALBUM_LIST)));
+       pRetList->Add(*(new (std::nothrow) String(albumName)));
+       pRetList->Add(*(new (std::nothrow) Integer(itemIndex)));
 
        delete pContentInfoStruct;
        pContentInfoStruct = null;
-       //test_code_end
 
+       AppLogDebug("EXIT");
        return pRetList;
 }
 
 void
 AlbumListPanel::OnUpdateContentList(void)
 {
+       AppLogDebug("ENTER");
        UpdateContentList();
+       AppLogDebug("EXIT");
 }
 
 void
 AlbumListPanel::UpdateContentList(void)
 {
+       AppLogDebug("ENTER");
        if (__pPresentationModel != null && __pContentTableView != null)
        {
-               __pPresentationModel->RefreshContent();
+               __pPresentationModel->UpdateAlbumList();
                __pContentTableView->UpdateTableView();
        }
+       AppLogDebug("EXIT");
+}
+
+void
+AlbumListPanel::OnThumbnailInfoReveivedN(ThumbnailInfo* pThumbnailInfo)
+{
+       AppLogDebug("ENTER");
+       int itemIndex = 0;
+       void* pParam = null;
+       __pThumbnail = pThumbnailInfo->GetBitmapN();
+       pParam = pThumbnailInfo->GetUserParamN();
+       if (pParam)
+       {
+               itemIndex = *(static_cast<int*>(pParam));
+       }
+       __pContentTableView->RefreshItem(itemIndex, TABLE_VIEW_REFRESH_TYPE_ITEM_MODIFY);
+       delete pThumbnailInfo;
+       delete static_cast<int*>(pParam);
+       AppLogDebug("EXIT");
 }
+
+void
+AlbumListPanel::OnUserEventReceivedN(RequestId requestId, Tizen::Base::Collection::IList* pArgs)
+{
+       AppLogDebug("ENTER");
+       AppLogDebug("OnUserEventReceivedN %d", requestId);
+       if (requestId == ID_DESTORY_PLAY_LIST_PICKER_POPUP)
+       {
+               if (__pPlayListPickerPopup != null)
+               {
+                       delete __pPlayListPickerPopup;
+                       __pPlayListPickerPopup = null;
+               }
+       }
+       AppLogDebug("EXIT");
+}
+
+void
+AlbumListPanel::UpdateItem(int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem)
+{
+       AppLogDebug("ENTER");
+       Label* pThumbnailLabel = static_cast<Label*>(pItem->GetControl(L"pSongThumbnailLabel"));
+       if (__pThumbnail == null || pThumbnailLabel == null)
+       {
+               AppLogDebug("__pThumbnail or pThumbnailLabel is null");
+               delete __pThumbnail;
+               __pThumbnail = null;
+               return;
+       }
+       pThumbnailLabel->SetBackgroundBitmap(*__pThumbnail);
+       delete __pThumbnail;
+       __pThumbnail = null;
+       pThumbnailLabel->Invalidate(true);
+       AppLogDebug("EXIT");
+}
\ No newline at end of file
index 6c5b500..da7fef0 100644 (file)
@@ -1,4 +1,4 @@
-//
+//
 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
 //
 // Licensed under the Flora License, Version 1.0 (the License);
 // limitations under the License.
 //
 
+/**
+ * @file               MpAlbumListPresentationModel.cpp
+ * @brief              This is the implementation file for AlbumListPresentationModel class.
+ */
+
 #include "MpAlbumListPresentationModel.h"
 
 using namespace Tizen::Base;
 using namespace Tizen::Base::Collection;
+using namespace Tizen::Content;
 using namespace Tizen::Graphics;
-using namespace Tizen::Ui::Controls;
 using namespace Tizen::Social;
-using namespace Tizen::Content;
+using namespace Tizen::Ui::Controls;
 
 AlbumListPresentationModel* AlbumListPresentationModel::pAlbumListPresentationModelInstance = null;
 
 AlbumListPresentationModel*
 AlbumListPresentationModel::GetInstance(void)
 {
-       AppLogDebug("Start");
-       //AppLogDebug("GetInstance");
+       AppLogDebug("ENTER");
        if (pAlbumListPresentationModelInstance == null)
        {
                pAlbumListPresentationModelInstance = new (std::nothrow) AlbumListPresentationModel();
@@ -38,7 +42,7 @@ AlbumListPresentationModel::GetInstance(void)
                result r = pAlbumListPresentationModelInstance->Construct();
                TryCatch(r == E_SUCCESS, , null, "AlbumListPresentationModel instance is not constrcuted.");
        }
-       AppLogDebug("End");
+       AppLogDebug("EXIT");
        return pAlbumListPresentationModelInstance;
 
 CATCH:
@@ -47,223 +51,261 @@ CATCH:
 }
 
 int
-AlbumListPresentationModel::GetTotalContentCount(int index)
+AlbumListPresentationModel::GetContentCount(int albumIndex)
 {
-       AppLogDebug("Start");
+       AppLogDebug("ENTER");
+       int totalCount = INIT_VALUE;
+
        if (__pAlbumList == null)
        {
-               return 0;
+               return INIT_VALUE;
        }
 
-       String WhereExpr = null;
-       WhereExpr = CommonUtil::SpecialReplaceChange(*(static_cast<String*>(__pAlbumList->GetAt(index))));
-       WhereExpr = CommonUtil::MakeQuery(STRING_SORT_ALBUM, WhereExpr);
-
-       IList* pSearchList = CommonUtil::SearchContentList(WhereExpr, STRING_SORT_TITLE);
-       TryReturn(pSearchList != null, 0, "pSearchList is null.")
-
-       int totalCount = pSearchList->GetCount();
-
-       pSearchList->RemoveAll(true);
-       delete pSearchList;
-       pSearchList = null;
+       if ((__pContentList != null) && (__currentAlbumIndex == albumIndex))
+       {
+               totalCount = __pContentList->GetCount();
+       }
+       else
+       {
+               IList* pContentSearchResultList = CommonUtil::ContentSearchResultListN(
+                                                                                       *(static_cast<String*>(__pAlbumList->GetAt(albumIndex))), STRING_SORT_ALBUM, STRING_SORT_TITLE);
+               if (pContentSearchResultList == null)
+               {
+                       AppLogDebug("CommonUtil::ContentSearchResultListN() failed");
+                       return null;
+               }
+
+               totalCount = pContentSearchResultList->GetCount();
+
+               pContentSearchResultList->RemoveAll(true);
+               delete pContentSearchResultList;
+       }
 
-       AppLogDebug("End");
+       AppLogDebug("EXIT");
        return totalCount;
 }
 
 int
-AlbumListPresentationModel::GetTotalAlbumCount(void)
+AlbumListPresentationModel::GetAllAlbumCount(void)
 {
-       AppLogDebug("Start");
+       AppLogDebug("ENTER");
        if (__pAlbumList == null)
        {
-               return 0;
+               return INIT_VALUE;
        }
-       AppLogDebug("End");
+       AppLogDebug("EXIT");
        return __pAlbumList->GetCount();
 }
 
 AlbumListPresentationModel::AlbumListPresentationModel(void)
-: __pAlbumList(null)
-, __pSongList(null)
+       : __pAlbumList(null)
+       , __pContentList(null)
+       , __currentAlbumIndex(-1)
 {
-       //AppLogDebug("AlbumListPresentationModel");
-       AppLogDebug("Start");
-       AppLogDebug("End");
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 
 AlbumListPresentationModel::~AlbumListPresentationModel(void)
 {
-       //AppLogDebug("~AlbumListPresentationModel");
-       AppLogDebug("Start");
+       AppLogDebug("ENTER");
        if (__pAlbumList != null)
        {
                __pAlbumList->RemoveAll(true);
                delete __pAlbumList;
        }
-       if (__pSongList != null)
+
+       if (__pContentList != null)
        {
-               __pSongList->RemoveAll(true);
-               delete __pSongList;
+               __pContentList->RemoveAll(true);
+               delete __pContentList;
+
+               __currentAlbumIndex = -1;
        }
-       AppLogDebug("End");
+       AppLogDebug("EXIT");
 }
 
 result
 AlbumListPresentationModel::Construct(void)
 {
-       //AppLogDebug("Construct");
-       AppLogDebug("Start");
-
+       AppLogDebug("ENTER");
        result r = E_SUCCESS;
-
-       __pAlbumList = CommonUtil::SearchContentList(STRING_SORT_ALBUM);
-       AppLogDebug("End");
+       AppLogDebug("EXIT");
        return r;
 }
 
-ContentInformationStruct*
-AlbumListPresentationModel::GetContentInfoN(int index)
+ContentInformation*
+AlbumListPresentationModel::GetAlbumInfoN(int albumIndex)
 {
-       //AppLogDebug("GetContentInfoN");
-       AppLogDebug("Start");
+       AppLogDebug("ENTER");
        if (__pAlbumList == null)
        {
+               AppLogDebug("__pAlbumList is null");
                return null;
        }
 
-       String WhereExpr = null;
-       WhereExpr  = CommonUtil::SpecialReplaceChange(*(static_cast<String*>(__pAlbumList->GetAt(index))));
-       WhereExpr  = CommonUtil::MakeQuery(STRING_SORT_ALBUM, WhereExpr);
-       IList* pSearchList = CommonUtil::SearchContentList(WhereExpr, STRING_SORT_TITLE);
-       if (pSearchList == null)
+       IList* pContentSearchResultList = CommonUtil::ContentSearchResultListN(
+                                                                                               *(static_cast<String*>(__pAlbumList->GetAt(albumIndex))), STRING_SORT_ALBUM, STRING_SORT_TITLE);
+       if (pContentSearchResultList == null)
        {
+               AppLogDebug("CommonUtil::ContentSearchResultListN() failed");
                return null;
        }
 
-       ContentInformationStruct* pContentInfoStruct = null;
-       ContentSearchResult* pResult = static_cast<ContentSearchResult*>(pSearchList->GetAt(INIT_VALUE));
+       ContentInformation* pContentInformation = null;
+       ContentSearchResult* pResult = static_cast<ContentSearchResult*>(pContentSearchResultList->GetAt(INIT_VALUE));
        if(pResult != null && pResult->GetContentType() == CONTENT_TYPE_AUDIO)
        {
-               AudioContentInfo* pAudioContentInfo = static_cast<AudioContentInfo*>(pResult->GetContentInfo());
-               pContentInfoStruct = CommonUtil::GetContentInformationStructN(*pAudioContentInfo);
+               pContentInformation = CommonUtil::GetContentInformationN(*static_cast<AudioContentInfo*>(pResult->GetContentInfo()));
        }
 
-       pSearchList->RemoveAll(true);
-       delete pSearchList;
-       pSearchList = null;
+       pContentSearchResultList->RemoveAll(true);
+       delete pContentSearchResultList;
 
-       AppLogDebug("End");
-       return pContentInfoStruct;
+       AppLogDebug("EXIT");
+       return pContentInformation;
 }
 
-ContentInformationStruct*
-AlbumListPresentationModel::GetSongContentInfoN(int index)
+ContentInformation*
+AlbumListPresentationModel::GetContentInfoN(int contentIndex)
 {
-       AppLogDebug("Start");
-       ContentInformationStruct* pContentInfoStruct = null;
-       ContentSearchResult* pResult = static_cast<ContentSearchResult*>(__pSongList->GetAt(index));
-
+       AppLogDebug("ENTER");
+       ContentInformation* pContentInformation = null;
+       ContentSearchResult* pResult = static_cast<ContentSearchResult*>(__pContentList->GetAt(contentIndex));
        if (pResult->GetContentType() == CONTENT_TYPE_AUDIO)
        {
-               AudioContentInfo* pAudioContentInfo = static_cast<AudioContentInfo*>(pResult->GetContentInfo());
-               pContentInfoStruct = CommonUtil::GetContentInformationStructN(*pAudioContentInfo);
+               pContentInformation = CommonUtil::GetContentInformationN(*static_cast<AudioContentInfo*>(pResult->GetContentInfo()));
        }
 
-       AppLogDebug("End");
-       return pContentInfoStruct;
+       AppLogDebug("EXIT");
+       return pContentInformation;
 }
 
 Tizen::Base::String*
-AlbumListPresentationModel::GetContentName(int index)
+AlbumListPresentationModel::GetAlbumName(int albumIndex)
 {
-       AppLogDebug("Start");
+       AppLogDebug("ENTER");
 
        if (__pAlbumList == null)
        {
                return null;
        }
 
-       return static_cast<String*>(__pAlbumList->GetAt(index));
+       AppLogDebug("EXIT");
+       return static_cast<String*>(__pAlbumList->GetAt(albumIndex));
 }
 
 void
-AlbumListPresentationModel::SearchSong(int index)
-{
-       AppLogDebug("Start");
-       if (__pSongList != null)
-       {
-               __pSongList->RemoveAll(true);
-       }
-
-       String WhereExpr = null;
-       String* pAlbumName = static_cast<String*>(__pAlbumList->GetAt(index));
-       WhereExpr   = CommonUtil::SpecialReplaceChange(*pAlbumName);
-       WhereExpr   = CommonUtil::MakeQuery(STRING_SORT_ALBUM, WhereExpr);
-       __pSongList = CommonUtil::SearchContentList(WhereExpr, STRING_SORT_TITLE);
-       AppLogDebug("End");
-}
-
-int
-AlbumListPresentationModel::GetSongContentCount(void)
+AlbumListPresentationModel::InitializeContentList(int albumIndex)
 {
-       AppLogDebug("Start");
-       if (__pSongList == null)
+       AppLogDebug("ENTER");
+       if (__pContentList != null)
        {
-               return INIT_VALUE;
+               __pContentList->RemoveAll(true);
        }
-       AppLogDebug("End");
-       return __pSongList->GetCount();
-}
 
-void
-AlbumListPresentationModel::RefreshContent(void)
-{
-       AppLogDebug("Start");
-       if (__pAlbumList != null)
-       {
-               __pAlbumList->RemoveAll(true);
-               __pAlbumList = CommonUtil::SearchContentList(STRING_SORT_ALBUM);
-       }
-       AppLogDebug("End");
+       __currentAlbumIndex = albumIndex;
+       __pContentList = CommonUtil::ContentSearchResultListN(
+                                                               *(static_cast<String*>(__pAlbumList->GetAt(albumIndex))), STRING_SORT_ALBUM, STRING_SORT_TITLE);
+       AppLogDebug("EXIT");
 }
 
 Tizen::Base::Collection::ArrayList*
-AlbumListPresentationModel::SearchContentItemN(int index)
+AlbumListPresentationModel::GetContentPathListN(int albumIndex)
 {
-       AppLogDebug("Start");
+       AppLogDebug("ENTER");
        if (__pAlbumList == null)
        {
                return null;
        }
 
-       String WhereExpr = null;
-       WhereExpr = CommonUtil::SpecialReplaceChange(*(static_cast<String*>(__pAlbumList->GetAt(index))));
-       WhereExpr = CommonUtil::MakeQuery(STRING_SORT_ALBUM, WhereExpr);
-       IList* pSearchList = CommonUtil::SearchContentList(WhereExpr, STRING_SORT_TITLE);
-
-       if (pSearchList == null)
+       IList* pContentSearchResultList = CommonUtil::ContentSearchResultListN(
+                                                                                               *(static_cast<String*>(__pAlbumList->GetAt(albumIndex))), STRING_SORT_ALBUM, STRING_SORT_TITLE);
+       if (pContentSearchResultList == null)
        {
+               AppLogDebug("CommonUtil::ContentSearchResultListN() failed");
                return null;
        }
 
-       int totalCount = pSearchList->GetCount();
        ArrayList* pContentPath = new (std::nothrow) ArrayList();
        pContentPath->Construct();
 
-       ContentSearchResult* pResult;
-       for(int iCount = 0; iCount < totalCount; iCount++)
+       int totalCount = pContentSearchResultList->GetCount();
+       for (int iCount = 0; iCount < totalCount; iCount++)
        {
-               pResult = static_cast<ContentSearchResult*>(pSearchList->GetAt(iCount));
+               ContentSearchResult* pResult = static_cast<ContentSearchResult*>(pContentSearchResultList->GetAt(iCount));
                pContentPath->Add(*(new (std::nothrow) String(pResult->GetContentInfo()->GetContentPath())));
        }
 
-       pSearchList->RemoveAll(true);
-       delete pSearchList;
-       pSearchList = null;
-
-       AppLogDebug("End");
+       pContentSearchResultList->RemoveAll(true);
+       delete pContentSearchResultList;
 
+       AppLogDebug("EXIT");
        return pContentPath;
 }
+void
+AlbumListPresentationModel::RefreshContentList(int albumIndex)
+{
+       AppLogDebug("ENTER");
+       if (__pContentList != null)
+       {
+               __pContentList->RemoveAll(true);
+               delete __pContentList;
+       }
+
+        __pContentList = CommonUtil::ContentSearchResultListN(
+                                                                                               *(static_cast<String*>(__pAlbumList->GetAt(albumIndex))), STRING_SORT_ALBUM, STRING_SORT_TITLE);
+       if (__pContentList != null && __pContentList->GetCount() == INIT_VALUE)
+       {
+               delete __pContentList;
+               __pContentList = null;
+       }
+       __currentAlbumIndex = albumIndex;
+       AppLogDebug("EXIT");
+}
+
+int
+AlbumListPresentationModel::GetCurrentAlbumIndex(void)
+{
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
+       return __currentAlbumIndex;
+}
+
+void
+AlbumListPresentationModel::AddContent(String path, int playlistIndex)
+{
+       AppLogDebug("ENTER");
+       ContentInformation* pContentInfoStruct = GetContentInfoN(playlistIndex);
+       PlayList* pPlayList = PlayListManager::GetInstance()->GetPlayListN(path);
+       pPlayList->AddItem(pContentInfoStruct->contentId);
+
+       delete pContentInfoStruct;
+       pContentInfoStruct = null;
+
+       delete pPlayList;
+       pPlayList = null;
+       AppLogDebug("EXIT");
+}
+
+result
+AlbumListPresentationModel::UpdateAlbumList(void)
+{
+       AppLogDebug("ENTER");
+       result r = E_SUCCESS;
+
+       if (__pAlbumList != null)
+       {
+               __pAlbumList->RemoveAll(true);
+               delete __pAlbumList;
+       }
+
+       __pAlbumList = CommonUtil::SearchContentList(STRING_SORT_ALBUM);
+       TryCatch(__pAlbumList != null, r = E_FAILURE, "__pAlbumList is null");
+
+       AppLogDebug("EXIT");
+       return r;
+
+CATCH:
+       return r;
+}
\ No newline at end of file
old mode 100755 (executable)
new mode 100644 (file)
index 6a603fe..efc9b19
@@ -1,4 +1,4 @@
-//
+//
 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
 //
 // Licensed under the Flora License, Version 1.0 (the License);
 // limitations under the License.
 //
 
+/**
+ * @file               MpAlbumPickerPanel.cpp
+ * @brief              This is the implementation file for AlbumPickerPanel class.
+ */
+
 #include "MpAlbumPickerPanel.h"
 #include "MpNowPlayContentPanel.h"
 
@@ -21,28 +26,29 @@ using namespace Tizen::Base;
 using namespace Tizen::Base::Collection;
 using namespace Tizen::Content;
 using namespace Tizen::Graphics;
+using namespace Tizen::Social;
 using namespace Tizen::Ui;
 using namespace Tizen::Ui::Controls;
 using namespace Tizen::Ui::Scenes;
-using namespace Tizen::Social;
 
 AlbumPickerPanel::AlbumPickerPanel(void)
 {
-       //AppLogDebug("AlbumPickerPanel");
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 
 AlbumPickerPanel::~AlbumPickerPanel(void)
 {
-       //AppLogDebug("~AlbumPickerPanel");
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 
 void
 AlbumPickerPanel::OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previousSceneId,
-                                    const Tizen::Ui::Scenes::SceneId& currentSceneId,
-                                    Tizen::Base::Collection::IList* pArgs)
+                                               const Tizen::Ui::Scenes::SceneId& currentSceneId,
+                                               Tizen::Base::Collection::IList* pArgs)
 {
-       //AppLogDebug("OnSceneActivatedN");
-
+       AppLogDebug("ENTER");
        Form* pForm = dynamic_cast<Form*>(GetParent());
        AppAssert(pForm);
 
@@ -51,10 +57,10 @@ AlbumPickerPanel::OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previousSc
 
        CommonUtil::CreateCancelFooter(*pForm);
        pForm->SetFormBackEventListener(this);
-
+       __pPresentationModel->UpdateAlbumList();
        if (__pPresentationModel != null)
        {
-               CommonUtil::ShowNoContentImage(__pPresentationModel->GetTotalAlbumCount(), *__pContentTableView, *__pNoContentImageLabel, *__pNoContentTextLabel);
+               CommonUtil::ShowNoContentImage(__pPresentationModel->GetAllAlbumCount(), *__pContentTableView, *__pNoContentImageLabel, *__pNoContentTextLabel);
        }
 
        if (pSceneManager->IsSceneAlive(IDSCN_PLAYER))
@@ -73,34 +79,37 @@ AlbumPickerPanel::OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previousSc
                pArgs->RemoveAll(true);
                delete pArgs;
        }
+       AppLogDebug("EXIT");
 }
 
 void
 AlbumPickerPanel::OnSceneDeactivated(const Tizen::Ui::Scenes::SceneId& currentSceneId,
-                                     const Tizen::Ui::Scenes::SceneId& nextSceneId)
+                                               const Tizen::Ui::Scenes::SceneId& nextSceneId)
 {
-       //AppLogDebug("OnSceneDeactivated");
-
+       AppLogDebug("ENTER");
        Form* pForm = dynamic_cast<Form*>(GetParent());
        AppAssert(pForm);
 
        Footer* pFooter = pForm->GetFooter();
        pFooter->RemoveAllButtons();
        pFooter->RemoveAllItems();
+       AppLogDebug("EXIT");
 }
 
 void
 AlbumPickerPanel::OnTableViewItemStateChanged(Tizen::Ui::Controls::TableView& tableView,
-                                              int itemIndex,
-                                              Tizen::Ui::Controls::TableViewItem* pItem,
-                                              Tizen::Ui::Controls::TableViewItemStatus status)
+                                                       int itemIndex,
+                                                       Tizen::Ui::Controls::TableViewItem* pItem,
+                                                       Tizen::Ui::Controls::TableViewItemStatus status)
 {
+       AppLogDebug("ENTER");
        SceneManager* pSceneManager = SceneManager::GetInstance();
        AppAssert(pSceneManager);
 
        if (status == TABLE_VIEW_ITEM_STATUS_SELECTED)
        {
-               __pPresentationModel->SearchSong(itemIndex);
+               __pPresentationModel->InitializeContentList(itemIndex);
                pSceneManager->GoForward(ForwardSceneTransition(IDSCN_ALBUM_CONTENT_PICKER));
        }
-}
+       AppLogDebug("EXIT");
+}
\ No newline at end of file
old mode 100755 (executable)
new mode 100644 (file)
index 5a38fa4..b2bf5c4
@@ -1,4 +1,4 @@
-//
+//
 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
 //
 // Licensed under the Flora License, Version 1.0 (the License);
 // limitations under the License.
 //
 
+/**
+ * @file               MpAllContentPickerPanel.cpp
+ * @brief              This is the implementation file for AllContentPickerPanel class.
+ */
+
 #include "MpAllContentPickerPanel.h"
 
 using namespace Tizen::Base;
 using namespace Tizen::Base::Collection;
 using namespace Tizen::Content;
 using namespace Tizen::Graphics;
+using namespace Tizen::Social;
 using namespace Tizen::Ui;
 using namespace Tizen::Ui::Controls;
 using namespace Tizen::Ui::Scenes;
-using namespace Tizen::Social;
 
 AllContentPickerPanel::AllContentPickerPanel(void)
-:__pNoContentImageLabel(null)
-,__pNoContentTextLabel(null)
+       : __pNoContentImageLabel(null)
+       , __pNoContentTextLabel(null)
 {
-       AppLogDebug("AllContentPickerPanel");
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 
 AllContentPickerPanel::~AllContentPickerPanel(void)
 {
-       AppLogDebug("~AllContentPickerPanel");
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 
 void
 AllContentPickerPanel::OnActionPerformed(const Tizen::Ui::Control& source, int actionId)
 {
-       AppLogDebug("OnActionPerformed");
+       AppLogDebug("ENTER");
        SceneManager* pSceneManager = SceneManager::GetInstance();
        AppAssert(pSceneManager);
 
        int totalCount = __pPresentationModel->GetTotalCount();
 
-       switch(actionId)
+       switch (actionId)
        {
        case IDA_CHECK_BUTTON:
-       {
-               AppLogDebug("IDA_CHECK_BUTTON");
-               __checkedItemCount = totalCount;
-               CommonUtil::SetAllCheckState(true, *__pContentTableView, totalCount);
-               Form* pForm = dynamic_cast<Form*>(GetParent());
-               AppAssert(pForm);
-               CommonUtil::ShowCheckedCountLabel(*__pCheckedCountLabel, __checkedItemCount, *__pContentTableView, *pForm);
-               CommonUtil::SetButtonEnabled(*pForm, __checkedItemCount, actionId);
+               {
+                       //AppLogDebug("IDA_CHECK_BUTTON");
+                       __checkedItemCount = totalCount;
+                       CommonUtil::SetAllCheckState(true, *__pContentTableView, totalCount);
+                       Form* pForm = dynamic_cast<Form*>(GetParent());
+                       AppAssert(pForm);
+                       CommonUtil::ShowCheckedCountLabel(*__pCheckedCountLabel, __checkedItemCount, *__pContentTableView, *pForm);
+                       CommonUtil::SetButtonEnabled(*pForm, __checkedItemCount, actionId);
+               }
                break;
-       }
+
        case IDA_UNCHECK_BUTTON:
-       {
-               AppLogDebug("IDA_UNCHECK_BUTTON");
-               __checkedItemCount = INIT_VALUE;
-               CommonUtil::SetAllCheckState(false, *__pContentTableView, totalCount);
-               Form* pForm = dynamic_cast<Form*>(GetParent());
-               AppAssert(pForm);
-               CommonUtil::ShowCheckedCountLabel(*__pCheckedCountLabel, __checkedItemCount, *__pContentTableView, *pForm);
-               CommonUtil::SetButtonEnabled(*pForm, __checkedItemCount, actionId);
-               break;
-       }
-       case IDA_FOOTER_BUTTON_ADD_TO_PLAYLIST:
-       {
-               if (__checkedItemCount <= INIT_VALUE)
                {
-                       return;
+                       //AppLogDebug("IDA_UNCHECK_BUTTON");
+                       __checkedItemCount = INIT_VALUE;
+                       CommonUtil::SetAllCheckState(false, *__pContentTableView, totalCount);
+                       Form* pForm = dynamic_cast<Form*>(GetParent());
+                       AppAssert(pForm);
+                       CommonUtil::ShowCheckedCountLabel(*__pCheckedCountLabel, __checkedItemCount, *__pContentTableView, *pForm);
+                       CommonUtil::SetButtonEnabled(*pForm, __checkedItemCount, actionId);
                }
+               break;
 
-               PlayList* pPlayList = PlayListManager::GetInstance()->GetPlayListN(CommonUtil::GetAddtoPlaylistName());
-
-               int totalCount = __pPresentationModel->GetTotalCount();
-               for(int iCount = 0; iCount < totalCount; iCount++)
+       case IDA_FOOTER_BUTTON_ADD_TO_PLAYLIST:
                {
-                       if (__pContentTableView->IsItemChecked(iCount) == true)
+                       if (__checkedItemCount <= INIT_VALUE)
                        {
-                               ContentInformationStruct* pContentInfoStruct =  __pPresentationModel->GetContentInfoN(iCount);
-                               if (pContentInfoStruct == null)
+                               return;
+                       }
+
+                       int totalCount = __pPresentationModel->GetTotalCount();
+                       for (int iCount = 0; iCount < totalCount; iCount++)
+                       {
+                               if (__pContentTableView->IsItemChecked(iCount) == true)
                                {
-                                       continue;
+                                       __pPresentationModel->AddContent(*new (std::nothrow) String(CommonUtil::GetAddtoPlaylistName()), iCount);
+                                       __pContentTableView->SetItemChecked(iCount, false);
                                }
-                               pPlayList->AddItem(pContentInfoStruct->contentId);
-
-                               __pContentTableView->SetItemChecked(iCount, false);
-
-                               //test_code_start
-                               delete pContentInfoStruct->pThumbnail;
-                               pContentInfoStruct->pThumbnail = null;
-
-                               delete pContentInfoStruct;
-                               pContentInfoStruct = null;
-                               //test_code_end
                        }
-               }
+                       Form* pForm = dynamic_cast<Form*>(GetParent());
+                       AppAssert(pForm);
+                       CommonUtil::SetButtonEnabled(*pForm, __checkedItemCount, actionId);
 
-               delete pPlayList;
-               pPlayList = null;
+                       __checkedItemCount = INIT_VALUE;
+                       CommonUtil::ShowCheckedCountLabel(*__pCheckedCountLabel, __checkedItemCount, *__pContentTableView, *pForm);
+                       CommonUtil::ShowSelectAllCheckButton(*__pSelectAllCheckedButton);
+                       CommonUtil::SetAddtoPlaylistState(false);
 
-               Form* pForm = dynamic_cast<Form*>(GetParent());
-               AppAssert(pForm);
-               CommonUtil::SetButtonEnabled(*pForm, __checkedItemCount, actionId);
-
-               __checkedItemCount = INIT_VALUE;
-               CommonUtil::ShowCheckedCountLabel(*__pCheckedCountLabel, __checkedItemCount, *__pContentTableView, *pForm);
-               CommonUtil::ShowSelectAllCheckButton(*__pSelectAllCheckedButton);
-               CommonUtil::SetAddtoPlaylistState(false);
-
-               pSceneManager->GoForward(ForwardSceneTransition(IDSCN_PLAYLIST_LIST,
+                       pSceneManager->GoForward(ForwardSceneTransition(IDSCN_PLAYLIST_LIST,
                                                                                                                SCENE_TRANSITION_ANIMATION_TYPE_NONE,
                                                                                                                SCENE_HISTORY_OPTION_NO_HISTORY,
                                                                                                                SCENE_DESTROY_OPTION_DESTROY));
 
-               Invalidate(true);
-
+                       Invalidate(true);
+               }
                break;
-       }
+
        case IDA_FOOTER_BUTTON_CANCEL:
-       {
-               pSceneManager->GoForward(ForwardSceneTransition(IDSCN_PLAYLIST_LIST,
-                                                        SCENE_TRANSITION_ANIMATION_TYPE_NONE,
-                                                        SCENE_HISTORY_OPTION_NO_HISTORY,
-                                                        SCENE_DESTROY_OPTION_DESTROY));
-               CommonUtil::SetAddtoPlaylistState(false);
-               Form* pForm = dynamic_cast<Form*>(GetParent());
-               AppAssert(pForm);
-
-               CommonUtil::SetButtonEnabled(*pForm, __checkedItemCount, actionId);
+               {
+                       pSceneManager->GoForward(ForwardSceneTransition(IDSCN_PLAYLIST_LIST,
+                                                                       SCENE_TRANSITION_ANIMATION_TYPE_NONE,
+                                                                       SCENE_HISTORY_OPTION_NO_HISTORY,
+                                                                       SCENE_DESTROY_OPTION_DESTROY));
+                       CommonUtil::SetAddtoPlaylistState(false);
+                       Form* pForm = dynamic_cast<Form*>(GetParent());
+                       AppAssert(pForm);
+
+                       CommonUtil::SetButtonEnabled(*pForm, __checkedItemCount, actionId);
+               }
                break;
-       }
+
        default:
-       {
                break;
-       }
        }//end of switch
+       AppLogDebug("EXIT");
 }
 
 void
 AllContentPickerPanel::OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previousSceneId,
-                                         const Tizen::Ui::Scenes::SceneId& currentSceneId,
-                                         Tizen::Base::Collection::IList* pArgs)
+                                               const Tizen::Ui::Scenes::SceneId& currentSceneId,
+                                               Tizen::Base::Collection::IList* pArgs)
 {
-       AppLogDebug("OnSceneActivatedN");
-
+       AppLogDebug("ENTER");
        Form* pForm = dynamic_cast<Form*>(GetParent());
        AppAssert(pForm);
 
@@ -158,21 +146,21 @@ AllContentPickerPanel::OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previ
 
        Footer* pFooter = CommonUtil::CreateAddtoPlaylistPickerFooter(*pForm);
        pFooter->AddActionEventListener(*this);
-
+       __pPresentationModel->UpdateContentList();
        CommonUtil::SetButtonEnabled(*pForm, __checkedItemCount);
 
        if (__pNoContentImageLabel == null && __pNoContentTextLabel == null)
        {
                __pNoContentImageLabel = new (std::nothrow) Label();
-               __pNoContentImageLabel->Construct(Rectangle((pForm->GetWidth() - W_NO_CONTENT)/ 2, Y_GAP_NO_CONTENT, W_NO_CONTENT, H_NO_CONTENT),L"");
+               __pNoContentImageLabel->Construct(Rectangle((pForm->GetWidth() - W_NO_CONTENT) / 2, Y_GAP_NO_CONTENT, W_NO_CONTENT, H_NO_CONTENT), L"");
                __pNoContentImageLabel->SetBackgroundBitmap(*(ResourceManager::GetBitmapN(NO_CONTENT_BITMAP)));
 
                __pNoContentTextLabel = new (std::nothrow) Label();
                __pNoContentTextLabel->Construct(Rectangle(0,
-                                                          __pNoContentImageLabel->GetHeight() + __pNoContentImageLabel->GetY(),
-                                                          pForm->GetWidth(),
-                                                          H_TEXT_NO_CONTENT),
-                                                          ResourceManager::GetString(L"IDS_MUSIC_HEADER_NO_SONGS"));
+                                                                       __pNoContentImageLabel->GetHeight() + __pNoContentImageLabel->GetY(),
+                                                                       pForm->GetWidth(),
+                                                                       H_TEXT_NO_CONTENT),
+                                                                       ResourceManager::GetString(L"IDS_MUSIC_HEADER_NO_SONGS"));
                __pNoContentTextLabel->SetTextConfig(FONT_SIZE_NO_CONTENT, LABEL_TEXT_STYLE_BOLD);
 
                AddControl(*__pNoContentImageLabel);
@@ -209,14 +197,14 @@ AllContentPickerPanel::OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previ
                pArgs->RemoveAll(true);
                delete pArgs;
        }
+       AppLogDebug("EXIT");
 }
 
 void
 AllContentPickerPanel::OnSceneDeactivated(const Tizen::Ui::Scenes::SceneId& currentSceneId,
-                                          const Tizen::Ui::Scenes::SceneId& nextSceneId)
+                                                       const Tizen::Ui::Scenes::SceneId& nextSceneId)
 {
-       AppLogDebug("OnSceneDeactivated");
-
+       AppLogDebug("ENTER");
        Form* pForm = dynamic_cast<Form*>(GetParent());
        AppAssert(pForm);
 
@@ -224,5 +212,5 @@ AllContentPickerPanel::OnSceneDeactivated(const Tizen::Ui::Scenes::SceneId& curr
        pFooter->RemoveAllButtons();
        pFooter->RemoveAllItems();
        pFooter->RemoveActionEventListener(*this);
-}
-
+       AppLogDebug("EXIT");
+}
\ No newline at end of file
old mode 100755 (executable)
new mode 100644 (file)
index 247eb2a..4ea63cb
@@ -1,4 +1,4 @@
-//
+//
 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
 //
 // Licensed under the Flora License, Version 1.0 (the License);
 // limitations under the License.
 //
 
+/**
+ * @file               MpAllListEditorPanel.cpp
+ * @brief              This is the implementation file for AllListEditorPanel class.
+ */
+
 #include "MpAllListEditorPanel.h"
 #include "MpAllListPresentationModel.h"
 #include "MpPlaylistPickerPopup.h"
 #include "MpSharePopup.h"
+#include "MpThumbnailInfo.h"
 
 using namespace Tizen::App;
 using namespace Tizen::Base;
 using namespace Tizen::Base::Collection;
 using namespace Tizen::Content;
 using namespace Tizen::Graphics;
+using namespace Tizen::Social;
 using namespace Tizen::Ui::Controls;
 using namespace Tizen::Ui::Scenes;
-using namespace Tizen::Social;
 
-static const int W_SONG_TIME       = 160;
-static const int Y_GAP_LABEL       =  10;
+static const int W_SONG_TIME = 160;
+static const int Y_GAP_LABEL = 10;
 
 AllListEditorPanel::AllListEditorPanel(void)
-: __pPlayListPickerPopup(null)
-, __pSharePopup(null)
-, __checkedItemCount(0)
-, __pContentTableView(null)
-, __pSelectAllCheckedButton(null)
-, __pCheckedCountLabel(null)
+       : ThumbnailBase::ThumbnailBase()
+       , __pPlayListPickerPopup(null)
+       , __pSharePopup(null)
+       , __checkedItemCount(0)
+       , __pContentTableView(null)
+       , __pSelectAllCheckedButton(null)
+       , __pCheckedCountLabel(null)
+       , __pThumbnail(null)
+       , __pNoContentImageLabel(null)
+       , __pNoContentTextLabel(null)
 {
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 
 AllListEditorPanel::~AllListEditorPanel(void)
 {
-       //AppLogDebug("~AllListEditorPanel");
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 
 bool
 AllListEditorPanel::Initialize(void)
 {
-       //AppLogDebug("Initialize");
-
-       result r = Construct(Rectangle(INIT_VALUE, INIT_VALUE, INIT_VALUE, INIT_VALUE));
+       AppLogDebug("ENTER");
+       result r = BasePanel::Construct(Rectangle(INIT_VALUE, INIT_VALUE, INIT_VALUE, INIT_VALUE));
        if (IsFailed(r))
        {
                return false;
        }
+       AppLogDebug("EXIT");
        return true;
 }
 
 result
 AllListEditorPanel::OnInitializing(void)
 {
-       //AppLogDebug("OnInitializing");
-
+       AppLogDebug("ENTER");
        __pPresentationModel = AllListPresentationModel::GetInstance();
 
        Form* pForm = dynamic_cast<Form*>(GetParent());
        AppAssert(pForm);
 
-       int width  = pForm->GetClientAreaBounds().width;
+       int width = pForm->GetClientAreaBounds().width;
        int height = pForm->GetClientAreaBounds().height;
 
        SetBounds(0, 0, width, height);
@@ -81,21 +93,35 @@ AllListEditorPanel::OnInitializing(void)
        __pSelectAllCheckedButton = CommonUtil::CreateSelectAllCheckedButton(width);
        __pSelectAllCheckedButton->AddActionEventListener(*this);
 
+       __pNoContentImageLabel = new (std::nothrow) Label();
+       __pNoContentImageLabel->Construct(Rectangle((pForm->GetWidth() - W_NO_CONTENT) / 2, Y_GAP_NO_CONTENT, W_NO_CONTENT, H_NO_CONTENT), L"");
+       __pNoContentImageLabel->SetBackgroundBitmap(*(ResourceManager::GetBitmapN(NO_CONTENT_BITMAP)));
+
+       __pNoContentTextLabel = new (std::nothrow) Label();
+       __pNoContentTextLabel->Construct(Rectangle(0,
+                                                               __pNoContentImageLabel->GetHeight() + __pNoContentImageLabel->GetY(),
+                                                               pForm->GetWidth(),
+                                                               H_TEXT_NO_CONTENT),
+                                                               ResourceManager::GetString(L"IDS_MUSIC_HEADER_NO_SONGS"));
+       __pNoContentTextLabel->SetTextConfig(FONT_SIZE_NO_CONTENT, LABEL_TEXT_STYLE_BOLD);
+
        __pCheckedCountLabel = CommonUtil::CreateCheckedCountLabel(width, height);
        __pCheckedCountLabel->SetShowState(false);
 
        AddControl(*__pContentTableView);
        AddControl(*__pSelectAllCheckedButton);
+       AddControl(*__pNoContentImageLabel);
+       AddControl(*__pNoContentTextLabel);
        AddControl(*__pCheckedCountLabel);
 
-       return E_SUCCESS;
+       AppLogDebug("EXIT");
+       return ThumbnailBase::Construct();
 }
 
 result
 AllListEditorPanel::OnTerminating(void)
 {
-       //AppLogDebug("OnTerminating");
-
+       AppLogDebug("ENTER");
        if (__pPlayListPickerPopup != null)
        {
                delete __pPlayListPickerPopup;
@@ -107,12 +133,14 @@ AllListEditorPanel::OnTerminating(void)
                __pSharePopup = null;
        }
 
+       AppLogDebug("EXIT");
        return E_SUCCESS;
 }
 
 void
 AllListEditorPanel::OnActionPerformed(const Tizen::Ui::Control& source, int actionId)
 {
+       AppLogDebug("ENTER");
        if (__pPresentationModel == null)
        {
                return;
@@ -123,184 +151,178 @@ AllListEditorPanel::OnActionPerformed(const Tizen::Ui::Control& source, int acti
 
        int totalCount = __pPresentationModel->GetTotalCount();
 
-       switch(actionId)
+       switch (actionId)
        {
        case IDA_CHECK_BUTTON:
-       {
-               //AppLogDebug("IDA_CHECK_BUTTON");
-               __checkedItemCount = totalCount;
-               CommonUtil::SetAllCheckState(true, *__pContentTableView, totalCount);
-               Form* pForm = dynamic_cast<Form*>(GetParent());
-               AppAssert(pForm);
-               CommonUtil::ShowCheckedCountLabel(*__pCheckedCountLabel, __checkedItemCount, *__pContentTableView, *pForm);
+               {
+                       //AppLogDebug("IDA_CHECK_BUTTON");
+                       __checkedItemCount = totalCount;
+                       CommonUtil::SetAllCheckState(true, *__pContentTableView, totalCount);
+                       Form* pForm = dynamic_cast<Form*>(GetParent());
+                       AppAssert(pForm);
+                       CommonUtil::ShowCheckedCountLabel(*__pCheckedCountLabel, __checkedItemCount, *__pContentTableView, *pForm);
+               }
                break;
-       }
+
        case IDA_UNCHECK_BUTTON:
-       {
-               //AppLogDebug("IDA_UNCHECK_BUTTON");
-               __checkedItemCount = INIT_VALUE;
-               CommonUtil::SetAllCheckState(false, *__pContentTableView, totalCount);
-               Form* pForm = dynamic_cast<Form*>(GetParent());
-               AppAssert(pForm);
-               CommonUtil::ShowCheckedCountLabel(*__pCheckedCountLabel, __checkedItemCount, *__pContentTableView, *pForm);
-               break;
-       }
-       case IDA_FOOTER_BUTTON_DELETE:
-       {
-               if (__checkedItemCount <= INIT_VALUE)
                {
-                       return;
+                       //AppLogDebug("IDA_UNCHECK_BUTTON");
+                       __checkedItemCount = INIT_VALUE;
+                       CommonUtil::SetAllCheckState(false, *__pContentTableView, totalCount);
+                       Form* pForm = dynamic_cast<Form*>(GetParent());
+                       AppAssert(pForm);
+                       CommonUtil::ShowCheckedCountLabel(*__pCheckedCountLabel, __checkedItemCount, *__pContentTableView, *pForm);
                }
+               break;
 
-               int totalCount = __pPresentationModel->GetTotalCount();
-               for(int index = totalCount - 1; index >= 0; index--)
+       case IDA_FOOTER_BUTTON_DELETE:
                {
-                       if (__pContentTableView->IsItemChecked(index) == true)
+                       if (__checkedItemCount <= INIT_VALUE)
                        {
-                               __pPresentationModel->RemoveContent(index);
-                               __pContentTableView->RefreshItem(index, TABLE_VIEW_REFRESH_TYPE_ITEM_REMOVE);
+                               return;
                        }
-               }
-               __checkedItemCount = INIT_VALUE;
-               Form* pForm = dynamic_cast<Form*>(GetParent());
-               AppAssert(pForm);
-               CommonUtil::ShowCheckedCountLabel(*__pCheckedCountLabel, __checkedItemCount, *__pContentTableView, *pForm);
-               CommonUtil::ShowSelectAllCheckButton(*__pSelectAllCheckedButton);
 
-               if (__pPresentationModel->GetTotalCount() != 0)
-               {
-                       __pSelectAllCheckedButton->SetEnabled(true);
-               }
-               else
-               {
-                       __pSelectAllCheckedButton->SetEnabled(false);
+                       int totalCount = __pPresentationModel->GetTotalCount();
+                       for (int index = totalCount - 1; index >= 0; index--)
+                       {
+                               if (__pContentTableView->IsItemChecked(index) == true)
+                               {
+                                       __pPresentationModel->RemoveContent(index);
+                                       __pContentTableView->RefreshItem(index, TABLE_VIEW_REFRESH_TYPE_ITEM_REMOVE);
+                               }
+                       }
+                       __checkedItemCount = INIT_VALUE;
+                       Form* pForm = dynamic_cast<Form*>(GetParent());
+                       AppAssert(pForm);
+                       CommonUtil::ShowCheckedCountLabel(*__pCheckedCountLabel, __checkedItemCount, *__pContentTableView, *pForm);
+                       CommonUtil::ShowSelectAllCheckButton(*__pSelectAllCheckedButton);
+
+                       if (__pPresentationModel->GetTotalCount() != 0)
+                       {
+                               __pSelectAllCheckedButton->SetEnabled(true);
+                       }
+                       else
+                       {
+                               __pSelectAllCheckedButton->SetEnabled(false);
+                               __pSelectAllCheckedButton->SetShowState(false);
+                               //__pSelectAllCheckedButton->SetEnabled(false);
+                               CommonUtil::ShowNoContentImage(INIT_VALUE, *__pContentTableView, *__pNoContentImageLabel, *__pNoContentTextLabel);
+                       }
                }
                break;
-       }
-       case IDA_FOOTER_BUTTON_SHARE:
-       {
-               //AppLogDebug("IDA_FOOTER_BUTTON_SHARE");
-               Tizen::Base::Collection::ArrayList* pDataList = new (std::nothrow) ArrayList();
-               pDataList->Construct();
 
-               int totalCount = __pPresentationModel->GetTotalCount();
-               for(int iCount = 0; iCount < totalCount; iCount++)
+       case IDA_FOOTER_BUTTON_SHARE:
                {
-                       if (__pContentTableView->IsItemChecked(iCount) == true)
+                       //AppLogDebug("IDA_FOOTER_BUTTON_SHARE");
+                       Tizen::Base::Collection::ArrayList* pDataList = new (std::nothrow) ArrayList();
+                       pDataList->Construct();
+
+                       int totalCount = __pPresentationModel->GetTotalCount();
+                       for (int iCount = 0; iCount < totalCount; iCount++)
                        {
-                               ContentInformationStruct* pContentInfoStruct = __pPresentationModel->GetContentInfoN(iCount);
-                               if (pContentInfoStruct == null)
+                               if (__pContentTableView->IsItemChecked(iCount) == true)
                                {
-                                       pDataList->RemoveAll(true);
-                                       delete pDataList;
-                                       pDataList = null;
-                                       return;
+                                       ContentInformation* pContentInfoStruct = __pPresentationModel->GetContentInfoN(iCount);
+                                       if (pContentInfoStruct == null)
+                                       {
+                                               pDataList->RemoveAll(true);
+                                               delete pDataList;
+                                               pDataList = null;
+                                               return;
+                                       }
+                                       pDataList->Add(*(new (std::nothrow) String(pContentInfoStruct->ContentFilePath)));
+
+                                       delete pContentInfoStruct;
+                                       pContentInfoStruct = null;
                                }
-                               pDataList->Add(*(new String(pContentInfoStruct->ContentFilePath)));
-
-                               //test_code_start
-                               delete pContentInfoStruct->pThumbnail;
-                               pContentInfoStruct->pThumbnail = null;
-
-                               delete pContentInfoStruct;
-                               pContentInfoStruct = null;
-                               //test_code_end
                        }
-               }
 
-               if (__pSharePopup == null)
-               {
-                       __pSharePopup = new (std::nothrow) SharePopup();
-                       __pSharePopup->Initialize();
+                       if (__pSharePopup == null)
+                       {
+                               __pSharePopup = new (std::nothrow) SharePopup();
+                               __pSharePopup->Initialize();
+                       }
+                       __pSharePopup->SetArguments(pDataList);
+                       __pSharePopup->SetShowState(true);
+                       __pSharePopup->Show();
                }
-               __pSharePopup->SetArguments(pDataList);
-               __pSharePopup->SetShowState(true);
-               __pSharePopup->Show();
-
                break;
-       }
+
        case IDA_FOOTER_BUTTON_ADD_TO_PLAYLIST:
-       {
-               if (__checkedItemCount <= INIT_VALUE)
                {
-                       return;
-               }
+                       if (__checkedItemCount <= INIT_VALUE)
+                       {
+                               return;
+                       }
 
-               Tizen::Base::Collection::ArrayList* pDataList = new (std::nothrow) ArrayList();
-               pDataList->Construct();
+                       Tizen::Base::Collection::ArrayList* pDataList = new (std::nothrow) ArrayList();
+                       pDataList->Construct();
 
-               ContentManager contentManager;
-               contentManager.Construct();
+                       ContentManager contentManager;
+                       contentManager.Construct();
 
-               int totalCount = __pPresentationModel->GetTotalCount();
-               for(int iCount = 0; iCount < totalCount; iCount++)
-               {
-                       if (__pContentTableView->IsItemChecked(iCount) == true)
+                       int totalCount = __pPresentationModel->GetTotalCount();
+                       for (int iCount = 0; iCount < totalCount; iCount++)
                        {
-//                             ContentInformationStruct* pContentInfoStruct = __pPresentationModel->GetContentInfoN(iCount);
-//                             if (pContentInfoStruct == null)
-//                             {
-//                                     pDataList->RemoveAll(true);
-//                                     delete pDataList;
-//                                     pDataList = null;
-//                                     return;
-//                             }
-//                             pDataList->Add(*(new String(pContentInfoStruct->ContentFilePath)));
-//
+                               if (__pContentTableView->IsItemChecked(iCount) == true)
+                               {
+//                                     ContentInformation* pContentInfoStruct = __pPresentationModel->GetContentInfoN(iCount);
+//                                     if (pContentInfoStruct == null)
+//                                     {
+//                                             pDataList->RemoveAll(true);
+//                                             delete pDataList;
+//                                             pDataList = null;
+//                                             return;
+//                                     }
+//                                     pDataList->Add(*(new String(pContentInfoStruct->ContentFilePath)));
 //
-//                             delete pContentInfoStruct->pThumbnail;
-//                             pContentInfoStruct->pThumbnail = null;
+//                                     delete pContentInfoStruct->pThumbnail;
+//                                     pContentInfoStruct->pThumbnail = null;
 //
-//                             delete pContentInfoStruct;
-//                             pContentInfoStruct = null;
+//                                     delete pContentInfoStruct;
+//                                     pContentInfoStruct = null;
 
-                               pDataList->Add(__pPresentationModel->GetCheckedContent(iCount));
+                                       pDataList->Add(__pPresentationModel->GetCheckedContent(iCount));
+                               }
                        }
-               }
 
-
-               if (__pPlayListPickerPopup == null)
-               {
                        __pPlayListPickerPopup = new (std::nothrow) PlayListPickerPopup();
-                       __pPlayListPickerPopup->Initialize();
+                       __pPlayListPickerPopup->Initialize(this, pDataList);
+                       __pPlayListPickerPopup->SetShowState(true);
+                       __pPlayListPickerPopup->Show();
+                       //__pPlayListPickerPopup->SetCollectedContent(pDataList);
                }
-               __pPlayListPickerPopup->SetShowState(true);
-               __pPlayListPickerPopup->Show();
-               __pPlayListPickerPopup->SetCollectedContent(pDataList);
                break;
-       }
+
        case IDA_FOOTER_BUTTON_CANCEL:
-       {
-               pSceneManager->GoBackward(BackwardSceneTransition());
+               {
+                       pSceneManager->GoBackward(BackwardSceneTransition());
+               }
                break;
-       }
+
        default:
-       {
                break;
-       }
        }//End of switch
 
        Form* pForm = dynamic_cast<Form*>(GetParent());
        AppAssert(pForm);
        CommonUtil::SetButtonEnabled(*pForm, __checkedItemCount, actionId);
-
+       AppLogDebug("EXIT");
 }
 
 void
 AllListEditorPanel::OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previousSceneId,
-                                                                     const Tizen::Ui::Scenes::SceneId& currentSceneId,
-                                                                     Tizen::Base::Collection::IList* pArgs)
+                                                                       const Tizen::Ui::Scenes::SceneId& currentSceneId,
+                                                                       Tizen::Base::Collection::IList* pArgs)
 {
-       //AppLogDebug("OnSceneActivatedN");
-
+       AppLogDebug("ENTER");
        Form* pForm = dynamic_cast<Form*>(GetParent());
        AppAssert(pForm);
 
        Footer* pFooter = CommonUtil::CreateDeleteFooter(*pForm);
        pFooter->AddActionEventListener(*this);
-
        UpdateContentList();
-
+       CommonUtil::ShowNoContentImage(__pPresentationModel->GetTotalCount(), *__pContentTableView, *__pNoContentImageLabel, *__pNoContentTextLabel);
        CommonUtil::SetButtonEnabled(*pForm, __checkedItemCount);
 
        if (pArgs != null)
@@ -308,14 +330,14 @@ AllListEditorPanel::OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previous
                pArgs->RemoveAll(true);
                delete pArgs;
        }
+       AppLogDebug("EXIT");
 }
 
 void
 AllListEditorPanel::OnSceneDeactivated(const Tizen::Ui::Scenes::SceneId& currentSceneId,
-                                                                          const Tizen::Ui::Scenes::SceneId& nextSceneId)
+                                                                               const Tizen::Ui::Scenes::SceneId& nextSceneId)
 {
-       //AppLogDebug("OnSceneDeactivated");
-
+       AppLogDebug("ENTER");
        Form* pForm = dynamic_cast<Form*>(GetParent());
        AppAssert(pForm);
 
@@ -333,104 +355,99 @@ AllListEditorPanel::OnSceneDeactivated(const Tizen::Ui::Scenes::SceneId& current
        CommonUtil::ShowSelectAllCheckButton(*__pSelectAllCheckedButton);
 
        int totalCount = __pPresentationModel->GetTotalCount();
-       for(int iCount = 0; iCount < totalCount; iCount++)
+       for (int iCount = 0; iCount < totalCount; iCount++)
        {
                __pContentTableView->SetItemChecked(iCount, false);
        }
+       CancelAllThumbnailRequest();
+       AppLogDebug("EXIT");
 }
 
 int
 AllListEditorPanel::GetItemCount(void)
 {
-       //AppLogDebug("GetItemCount");
-
-       int MusicItem = INIT_VALUE;
+       AppLogDebug("ENTER");
+       int musicItem = INIT_VALUE;
        if (__pPresentationModel == null)
        {
                //AppLogDebug("__pPresentationModel Null");
-               return MusicItem;
+               return musicItem;
        }
 
-       MusicItem = __pPresentationModel->GetTotalCount();
-       return MusicItem;
+       musicItem = __pPresentationModel->GetTotalCount();
+       AppLogDebug("EXIT");
+       return musicItem;
 }
 
 Tizen::Ui::Controls::TableViewItem*
 AllListEditorPanel::CreateItem(const int itemIndex, int itemWidth)
 {
-       //AppLogDebug("CreateItem");
-       ContentInformationStruct* pContentInfoStruct = __pPresentationModel->GetContentInfoN(itemIndex);
+       AppLogDebug("ENTER");
+       ContentInformation* pContentInfoStruct = __pPresentationModel->GetContentInfoN(itemIndex);
        if (pContentInfoStruct == null)
        {
                return null;
        }
 
-       TableViewItem* pItem = new (std::nothrow) TableViewItem;
+       TableViewItem* pItem = new (std::nothrow) TableViewItem();
        pItem->Construct(Dimension(itemWidth, ITEM_HEIGHT), TABLE_VIEW_ANNEX_STYLE_MARK);
        pItem->SetBackgroundColor(COLOR_ITEM);
 
+       RequestThumbnail(pContentInfoStruct->contentId, (new (std::nothrow) int(itemIndex)));
        CreateTableViewItem(*pItem, *pContentInfoStruct);
 
-       //test_code_start
-       delete pContentInfoStruct->pThumbnail;
-       pContentInfoStruct->pThumbnail = null;
-
        delete pContentInfoStruct;
        pContentInfoStruct = null;
-       //test_code_end
 
+       AppLogDebug("EXIT");
        return pItem;
 }
 
 bool
 AllListEditorPanel::DeleteItem(const int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem)
 {
-       //AppLogDebug("DeleteItem");
+       AppLogDebug("ENTER");
 
        delete pItem;
        pItem = null;
 
+       AppLogDebug("EXIT");
        return true;
 }
 
-void
-AllListEditorPanel::UpdateItem(int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem)
-{
-}
-
 int
 AllListEditorPanel::GetDefaultItemHeight(void)
 {
-       //AppLogDebug("GetDefaultItemHeight");
-
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
        return ITEM_HEIGHT;
 }
 
 void
 AllListEditorPanel::OnTableViewItemStateChanged(Tizen::Ui::Controls::TableView& tableView,
-                                                int itemIndex,
-                                                Tizen::Ui::Controls::TableViewItem* pItem,
-                                                Tizen::Ui::Controls::TableViewItemStatus status)
+                                                       int itemIndex,
+                                                       Tizen::Ui::Controls::TableViewItem* pItem,
+                                                       Tizen::Ui::Controls::TableViewItemStatus status)
 {
-       //AppLogDebug("OnTableViewItemStateChanged");
-       switch(status)
+       AppLogDebug("ENTER");
+       switch (status)
        {
        case TABLE_VIEW_ITEM_STATUS_CHECKED:
-       {
-               __checkedItemCount++;
-               tableView.SetItemChecked(itemIndex, true);
+               {
+                       __checkedItemCount++;
+                       tableView.SetItemChecked(itemIndex, true);
+               }
                break;
-       }
+
        case TABLE_VIEW_ITEM_STATUS_UNCHECKED:
-       {
-               __checkedItemCount--;
-               tableView.SetItemChecked(itemIndex, false);
+               {
+                       __checkedItemCount--;
+                       tableView.SetItemChecked(itemIndex, false);
+               }
                break;
-       }
+
        default:
-       {
                break;
-       }
        }//end of switch
 
        CommonUtil::ShowSelectAllCheckButton(*__pSelectAllCheckedButton);
@@ -445,37 +462,41 @@ AllListEditorPanel::OnTableViewItemStateChanged(Tizen::Ui::Controls::TableView&
        AppAssert(pForm);
        CommonUtil::ShowCheckedCountLabel(*__pCheckedCountLabel, __checkedItemCount, *__pContentTableView, *pForm);
        CommonUtil::SetButtonEnabled(*pForm, __checkedItemCount);
+       AppLogDebug("EXIT");
 }
 
 void
 AllListEditorPanel::OnTableViewContextItemActivationStateChanged(Tizen::Ui::Controls::TableView& tableView,
-                                                               int itemIndex,
-                                                               Tizen::Ui::Controls::TableViewContextItem* pContextItem,
-                                                               bool activated)
+                                                                       int itemIndex,
+                                                                       Tizen::Ui::Controls::TableViewContextItem* pContextItem,
+                                                                       bool activated)
 {
-       //AppLogDebug("OnTableViewContextItemActivationStateChanged");
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 
 void
 AllListEditorPanel::OnTableViewItemReordered(Tizen::Ui::Controls::TableView& tableView,
-                                           int itemIndexFrom,
-                                           int itemIndexTo)
+                                                       int itemIndexFrom,
+                                                       int itemIndexTo)
 {
-       //AppLogDebug("OnTableViewItemReordered");
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 
 result
 AllListEditorPanel::CreateTableViewItem(Tizen::Ui::Container& parent,
-                                               const ContentInformationStruct& contentInfoStruct)
+                                                       const ContentInformation& contentInfoStruct)
 {
-       //AppLogDebug("CreateTableViewItem");
+       AppLogDebug("ENTER");
        result r = E_SUCCESS;
 
        Label* pSongThumbnailLabel = new (std::nothrow) Label();
-       pSongThumbnailLabel->Construct(Rectangle(0, Y_GAP_THUMBNAIL, W_THUMBNAIL ,H_THUMBNAIL), L"");
-       pSongThumbnailLabel->SetBackgroundBitmap(*contentInfoStruct.pThumbnail);
+       pSongThumbnailLabel->Construct(Rectangle(0, Y_GAP_THUMBNAIL, W_THUMBNAIL, H_THUMBNAIL), L"");
+       pSongThumbnailLabel->SetBackgroundBitmap(*GetDefaultThumbnail());
+       pSongThumbnailLabel->SetName(L"pSongThumbnailLabel");
 
-       int X_Gap   = W_THUMBNAIL;
+       int X_Gap = W_THUMBNAIL;
        int W_Label = W_CLIENT_AREA - X_Gap - W_TABLE_VIEW_MARK;
 
        Label* pSongTitleLabel = new (std::nothrow) Label();
@@ -501,21 +522,79 @@ AllListEditorPanel::CreateTableViewItem(Tizen::Ui::Container& parent,
        parent.AddControl(*pSongTimeLabel);
        parent.AddControl(*pSongArtistLabel);
 
+       AppLogDebug("EXIT");
        return r;
 }
 
 void
 AllListEditorPanel::OnUpdateContentList(void)
 {
+       AppLogDebug("ENTER");
        UpdateContentList();
+       AppLogDebug("EXIT");
 }
 
 void
 AllListEditorPanel::UpdateContentList(void)
 {
+       AppLogDebug("ENTER");
        if (__pPresentationModel != null && __pContentTableView != null)
        {
-               __pPresentationModel->RefreshContent();
+               __pPresentationModel->UpdateContentList();
                __pContentTableView->UpdateTableView();
        }
+       AppLogDebug("EXIT");
+}
+
+void
+AllListEditorPanel::OnThumbnailInfoReveivedN(ThumbnailInfo* pThumbnailInfo)
+{
+       AppLogDebug("ENTER");
+       int itemIndex = 0;
+       void* pParam = null;
+       __pThumbnail = pThumbnailInfo->GetBitmapN();
+       pParam = pThumbnailInfo->GetUserParamN();
+       if (pParam)
+       {
+               itemIndex = *(static_cast<int*>(pParam));
+       }
+       __pContentTableView->RefreshItem(itemIndex, TABLE_VIEW_REFRESH_TYPE_ITEM_MODIFY);
+       delete pThumbnailInfo;
+       delete static_cast<int*>(pParam);
+       AppLogDebug("EXIT");
+}
+
+void
+AllListEditorPanel::OnUserEventReceivedN(RequestId requestId, Tizen::Base::Collection::IList* pArgs)
+{
+       AppLogDebug("ENTER");
+       AppLogDebug("OnUserEventReceivedN %d", requestId);
+       if (requestId == ID_DESTORY_PLAY_LIST_PICKER_POPUP)
+       {
+               if (__pPlayListPickerPopup != null)
+               {
+                       delete __pPlayListPickerPopup;
+                       __pPlayListPickerPopup = null;
+               }
+       }
+       AppLogDebug("EXIT");
 }
+
+void
+AllListEditorPanel::UpdateItem(int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem)
+{
+       AppLogDebug("ENTER");
+       Label* pThumbnailLabel = static_cast<Label*>(pItem->GetControl(L"pSongThumbnailLabel"));
+       if (__pThumbnail == null || pThumbnailLabel == null)
+       {
+               AppLogDebug("__pThumbnail or pThumbnailLabel is null");
+               delete __pThumbnail;
+               __pThumbnail = null;
+               return;
+       }
+       pThumbnailLabel->SetBackgroundBitmap(*__pThumbnail);
+       delete __pThumbnail;
+       __pThumbnail = null;
+       pThumbnailLabel->Invalidate(true);
+       AppLogDebug("EXIT");
+}
\ No newline at end of file
old mode 100644 (file)
new mode 100755 (executable)
index bb905e1..85b2b23
@@ -1,4 +1,4 @@
-//
+//
 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
 //
 // Licensed under the Flora License, Version 1.0 (the License);
 // limitations under the License.
 //
 
+/**
+ * @file               MpAllListPanel.cpp
+ * @brief              This is the implementation file for AllListPanel class.
+ */
+
 #include <FBase.h>
 #include <FSclAddressbook.h>
-
 #include "MpAllListPanel.h"
-#include "MpNowPlayContentPanel.h"
 #include "MpAllListPresentationModel.h"
+#include "MpNowPlayContentPanel.h"
 #include "MpPlaylistPickerPopup.h"
-#include "MpSharePopup.h"
 #include "MpSetAsPopup.h"
+#include "MpSharePopup.h"
+#include "MpThumbnailInfo.h"
 
 using namespace Tizen::App;
 using namespace Tizen::Base;
 using namespace Tizen::Base::Collection;
 using namespace Tizen::Content;
 using namespace Tizen::Graphics;
+using namespace Tizen::Social;
 using namespace Tizen::Ui::Controls;
 using namespace Tizen::Ui::Scenes;
-using namespace Tizen::Social;
 
-static const int W_SONG_TIME     = 160;
-static const int Y_GAP_LABEL     =  10;
-static const int Y_GAP_TABLE_VIEW_CONTENT_ITEM =  25;
-static const int X_GAP_TABLE_VIEW_CONTENT_ITEM =  10;
-static const int H_DELETE_POPUP                = 100;
-static const int Y_DELETE_POPUP                =  10;
-static const int DELETE_WIDTH_POPUP            = 600;
-static const int DELETE_HEIGHT_POPUP           = 500;
-
-static const wchar_t* SHARE_BUTTON_NAME = L"ShareButton";
-static const wchar_t* SET_BUTTON_NAME   = L"SetButton";
+static const int W_SONG_TIME = 160;
+static const int Y_GAP_LABEL = 10;
+static const int Y_GAP_TABLE_VIEW_CONTENT_ITEM = 25;
+static const int X_GAP_TABLE_VIEW_CONTENT_ITEM = 10;
+static const int H_DELETE_POPUP = 100;
+static const int Y_DELETE_POPUP = 10;
+static const int DELETE_WIDTH_POPUP = 600;
+static const int DELETE_HEIGHT_POPUP = 500;
 
 AllListPanel::AllListPanel(void)
-: __pContentTableView(null)
-, __pContextItem(null)
-, __pShareContextMenu(null)
-, __pSetContextMenu(null)
-, __pDeletePopup(null)
-, __pNoContentImageLabel(null)
-, __pNoContentTextLabel(null)
-, __pNowPlayContentPanel(null)
-, __pPlayListPickerPopup(null)
-, __itemIndex(-1)
-, __scrolledDistance(0)
+       : ThumbnailBase::ThumbnailBase()
+       , __pContentTableView(null)
+       , __pContextItem(null)
+       , __pShareContextMenu(null)
+       , __pSetContextMenu(null)
+       , __pDeletePopup(null)
+       , __pNoContentImageLabel(null)
+       , __pNoContentTextLabel(null)
+       , __pThumbnail(null)
+       , __pNowPlayContentPanel(null)
+       , __pPlayListPickerPopup(null)
+       , __itemIndex(-1)
+       , __scrolledDistance(0)
 {
-       AppLogDebug("Start");
-       AppLogDebug("End");
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 
 AllListPanel::~AllListPanel(void)
 {
-       AppLogDebug("Start");
-       AppLogDebug("End");
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 
 bool
 AllListPanel::Initialize(void)
 {
-       AppLogDebug("Start");
-       result r = Construct(Rectangle(INIT_VALUE, INIT_VALUE, INIT_VALUE, INIT_VALUE));
+       AppLogDebug("ENTER");
+       result r = BasePanel::Construct(Rectangle(INIT_VALUE, INIT_VALUE, INIT_VALUE, INIT_VALUE));
        if (IsFailed(r))
        {
                return false;
        }
-       AppLogDebug("End");
+       AppLogDebug("EXIT");
        return true;
 }
 
 result
 AllListPanel::OnInitializing(void)
 {
-       AppLogDebug("Start");
-
+       AppLogDebug("ENTER");
        Form* pForm = dynamic_cast<Form*>(GetParent());
        AppAssert(pForm);
 
-       int width  = pForm->GetClientAreaBounds().width;
+       int width = pForm->GetClientAreaBounds().width;
        int height = pForm->GetClientAreaBounds().height;
        SetBounds(INIT_VALUE, INIT_VALUE, width, height);
 
@@ -100,15 +103,15 @@ AllListPanel::OnInitializing(void)
        __pContentTableView->AddScrollEventListener(*this);
 
        __pNoContentImageLabel = new (std::nothrow) Label();
-       __pNoContentImageLabel->Construct(Rectangle((pForm->GetWidth() - W_NO_CONTENT)/ 2, Y_GAP_NO_CONTENT, W_NO_CONTENT, H_NO_CONTENT),L"");
+       __pNoContentImageLabel->Construct(Rectangle((pForm->GetWidth() - W_NO_CONTENT) / 2, Y_GAP_NO_CONTENT, W_NO_CONTENT, H_NO_CONTENT), L"");
        __pNoContentImageLabel->SetBackgroundBitmap(*(ResourceManager::GetBitmapN(NO_CONTENT_BITMAP)));
 
        __pNoContentTextLabel = new (std::nothrow) Label();
        __pNoContentTextLabel->Construct(Rectangle(0,
-                                                  __pNoContentImageLabel->GetHeight() + __pNoContentImageLabel->GetY(),
-                                                  pForm->GetWidth(),
-                                                  H_TEXT_NO_CONTENT),
-                                                  ResourceManager::GetString(L"IDS_MUSIC_HEADER_NO_SONGS"));
+                                                               __pNoContentImageLabel->GetHeight() + __pNoContentImageLabel->GetY(),
+                                                               pForm->GetWidth(),
+                                                               H_TEXT_NO_CONTENT),
+                                                               ResourceManager::GetString(L"IDS_MUSIC_HEADER_NO_SONGS"));
        __pNoContentTextLabel->SetTextConfig(FONT_SIZE_NO_CONTENT, LABEL_TEXT_STYLE_BOLD);
 
        __pContextItem = new (std::nothrow) TableViewContextItem();
@@ -124,26 +127,26 @@ AllListPanel::OnInitializing(void)
 
        Label* pDeleteTitleLabel = new (std::nothrow) Label();
        pDeleteTitleLabel->Construct(Rectangle(0,
-                                           0,
-                                           __pDeletePopup->GetClientAreaBounds().width,
-                                           __pDeletePopup->GetClientAreaBounds().height - H_DELETE_POPUP),
-                                            ResourceManager::GetString(L"IDS_MUSIC_POP_DELETE_Q"));
+                                                       0,
+                                                       __pDeletePopup->GetClientAreaBounds().width,
+                                                       __pDeletePopup->GetClientAreaBounds().height - H_DELETE_POPUP),
+                                                       ResourceManager::GetString(L"IDS_MUSIC_POP_DELETE_Q"));
 
        Button* pPopupDeleteButton = new (std::nothrow) Button();
        pPopupDeleteButton->Construct(Rectangle(0,
-                                            pDeleteTitleLabel->GetHeight() - Y_DELETE_POPUP,
-                                            __pDeletePopup->GetClientAreaBounds().width / 2,
-                                            H_DELETE_POPUP),
-                                  ResourceManager::GetString(L"IDS_MUSIC_OPT_DELETE"));
+                                                       pDeleteTitleLabel->GetHeight() - Y_DELETE_POPUP,
+                                                       __pDeletePopup->GetClientAreaBounds().width / 2,
+                                                       H_DELETE_POPUP),
+                                                       ResourceManager::GetString(L"IDS_MUSIC_OPT_DELETE"));
        pPopupDeleteButton->SetActionId(IDA_DELETE_POPUP_DELETE);
        pPopupDeleteButton->AddActionEventListener(*this);
 
        Button* pPopupCancelButton = new (std::nothrow) Button();
        pPopupCancelButton->Construct(Rectangle(pPopupDeleteButton->GetX() + pPopupDeleteButton->GetWidth(),
-                                            pPopupDeleteButton->GetY(),
-                                            pPopupDeleteButton->GetWidth(),
-                                            pPopupDeleteButton->GetHeight()),
-                                  ResourceManager::GetString(L"IDS_COM_BODY_EDIT_CANCEL"));
+                                                       pPopupDeleteButton->GetY(),
+                                                       pPopupDeleteButton->GetWidth(),
+                                                       pPopupDeleteButton->GetHeight()),
+                                               ResourceManager::GetString(L"IDS_COM_BODY_EDIT_CANCEL"));
        pPopupCancelButton->SetActionId(IDA_DELETE_POPUP_CANCEL);
        pPopupCancelButton->AddActionEventListener(*this);
 
@@ -153,15 +156,14 @@ AllListPanel::OnInitializing(void)
 
        __pPresentationModel = AllListPresentationModel::GetInstance();
 
-       AppLogDebug("End");
-
-       return E_SUCCESS;
+       AppLogDebug("EXIT");
+       return ThumbnailBase::Construct();
 }
 
 result
 AllListPanel::OnTerminating(void)
 {
-       AppLogDebug("Start");
+       AppLogDebug("ENTER");
        if (__pPlayListPickerPopup != null)
        {
                delete __pPlayListPickerPopup;
@@ -171,8 +173,7 @@ AllListPanel::OnTerminating(void)
        delete __pContextItem;
        __pContextItem = null;
 
-       AppLogDebug("End");
-
+       AppLogDebug("EXIT");
        return E_SUCCESS;
 }
 
@@ -181,10 +182,10 @@ AllListPanel::OnAppControlCompleteResponseReceived(const AppId& appId,
                const String& operationId, AppCtrlResult appControlResult,
                const IMap* pExtraData)
 {
-       AppLogDebug("Start");
+       AppLogDebug("ENTER");
        if (pExtraData == null)
        {
-               AppLogDebug("End");
+               AppLogDebug("EXIT");
                return;
        }
 
@@ -193,14 +194,14 @@ AllListPanel::OnAppControlCompleteResponseReceived(const AppId& appId,
        {
                if (appControlResult == APP_CTRL_RESULT_SUCCEEDED)
                {
-                       const String* pContactId = static_cast<const String *>(pExtraData->GetValue(String(APPCONTROL_KEY_RETURNTYPE)));
+                       const String* pContactId = static_cast<const String*>(pExtraData->GetValue(String(APPCONTROL_KEY_RETURNTYPE)));
                        if (pContactId->Equals(APPCONTROL_VALUE_CONTACTID, true))
                        {
-                               const String* pResultString = static_cast<const String *>(pExtraData->GetValue(String(APPCONTROL_KEY_VALUE)));
+                               const String* pResultString = static_cast<const String*>(pExtraData->GetValue(String(APPCONTROL_KEY_VALUE)));
 
                                AppLogDebug("%ls", pResultString->GetPointer());
 
-                               ContentInformationStruct* pContentInfoStruct = __pPresentationModel->GetContentInfoN(__itemIndex);
+                               ContentInformation* pContentInfoStruct = __pPresentationModel->GetContentInfoN(__itemIndex);
                                if (pContentInfoStruct == null)
                                {
                                        return;
@@ -220,19 +221,14 @@ AllListPanel::OnAppControlCompleteResponseReceived(const AppId& appId,
                                {
                                        MessageBox messageBox;
                                        messageBox.Construct(L"", ResourceManager::GetString(L"IDS_COM_POP_SUCCESS"),
-                                                MSGBOX_STYLE_OK,
-                                                3000);
+                                                       MSGBOX_STYLE_OK,
+                                                       3000);
                                        int modalResult = 0;
                                        messageBox.ShowAndWait(modalResult);
                                }
 
-                               //test_code_start
-                               delete pContentInfoStruct->pThumbnail;
-                               pContentInfoStruct->pThumbnail = null;
-
                                delete pContentInfoStruct;
                                pContentInfoStruct = null;
-                               //test_code_end
 
                                delete pContact;
                                pContact = null;
@@ -242,231 +238,243 @@ AllListPanel::OnAppControlCompleteResponseReceived(const AppId& appId,
                        }
                }
        }
-       AppLogDebug("End");
+       AppLogDebug("EXIT");
 }
 
 void
 AllListPanel::OnActionPerformed(const Tizen::Ui::Control& source, int actionId)
 {
-       AppLogDebug("Start");
-       //AppLogDebug("OnActionPerformed : %d", actionId);
-
+       AppLogDebug("ENTER");
        SceneManager* pSceneManager = SceneManager::GetInstance();
        AppAssert(pSceneManager);
 
-       switch(actionId)
+       switch (actionId)
        {
        case IDA_FLICK_BUTTON_SHARE:
+               // fall through
        case IDA_FLICK_BUTTON_SET:
-       {
-               Point itemPoint;
-
-               int screenHeight = CoordinateSystem::GetLogicalResolution().height;
-               Point convertPosition = source.ConvertToScreenPosition(Point(source.GetWidth() / 2,0));
-               itemPoint.x = convertPosition.x;
-               itemPoint.y = convertPosition.y + source.GetHeight();
+               {
+                       Point itemPoint;
 
-               ContextMenuAnchorDirection direction = CONTEXT_MENU_ANCHOR_DIRECTION_DOWNWARD;
+                       int screenHeight = CoordinateSystem::GetLogicalResolution().height;
+                       Point convertPosition = source.ConvertToScreenPosition(Point(source.GetWidth() / 2, 0));
+                       itemPoint.x = convertPosition.x;
+                       itemPoint.y = convertPosition.y + source.GetHeight();
 
-               if( itemPoint.y > screenHeight / 2)
-               {
-                       itemPoint.y = itemPoint.y - source.GetHeight();
-                       direction = CONTEXT_MENU_ANCHOR_DIRECTION_UPWARD;
-               }
+                       ContextMenuAnchorDirection direction = CONTEXT_MENU_ANCHOR_DIRECTION_DOWNWARD;
 
-               if (source.GetName() == SHARE_BUTTON_NAME)
-               {
-                       if (__pShareContextMenu != null)
+                       if (itemPoint.y > screenHeight / 2)
                        {
-                               delete __pShareContextMenu;
-                               __pShareContextMenu = null;
+                               itemPoint.y = itemPoint.y - source.GetHeight();
+                               direction = CONTEXT_MENU_ANCHOR_DIRECTION_UPWARD;
                        }
-                       __pShareContextMenu = new (std::nothrow) ContextMenu();
-                       __pShareContextMenu->Construct(Point(0,0), CONTEXT_MENU_STYLE_LIST, direction);
-                       __pShareContextMenu->AddItem(ResourceManager::GetString(L"IDS_COM_BODY_EMAIL"), IDA_SHARE_CONTEXT_MENU_EMAIL);
-                       __pShareContextMenu->AddActionEventListener(*this);
-                       __pShareContextMenu->SetAnchorPosition(itemPoint);
-                       __pShareContextMenu->SetShowState(true);
-                       __pShareContextMenu->Show();
 
-               }
-               else if (source.GetName() == SET_BUTTON_NAME)
-               {
-                       if (__pSetContextMenu != null)
+                       if (source.GetName() == SHARE_BUTTON_NAME)
                        {
-                               delete __pSetContextMenu;
-                               __pSetContextMenu = null;
+                               if (__pShareContextMenu != null)
+                               {
+                                       delete __pShareContextMenu;
+                                       __pShareContextMenu = null;
+                               }
+                               __pShareContextMenu = new (std::nothrow) ContextMenu();
+                               __pShareContextMenu->Construct(Point(0, 0), CONTEXT_MENU_STYLE_LIST, direction);
+                               __pShareContextMenu->AddItem(ResourceManager::GetString(L"IDS_COM_BODY_EMAIL"), IDA_SHARE_CONTEXT_MENU_EMAIL);
+                               __pShareContextMenu->AddActionEventListener(*this);
+                               __pShareContextMenu->SetAnchorPosition(itemPoint);
+                               __pShareContextMenu->SetShowState(true);
+                               __pShareContextMenu->Show();
+                       }
+                       else if (source.GetName() == SET_BUTTON_NAME)
+                       {
+                               if (__pSetContextMenu != null)
+                               {
+                                       delete __pSetContextMenu;
+                                       __pSetContextMenu = null;
+                               }
+                               __pSetContextMenu = new (std::nothrow) ContextMenu();
+                               __pSetContextMenu->Construct(Point(0, 0), CONTEXT_MENU_STYLE_LIST, direction);
+                               __pSetContextMenu->AddItem(ResourceManager::GetString(L"IDS_MUSIC_OPT_CALL_RINGTONE"), IDA_SET_CONTEXT_MENU_CALL);
+                               __pSetContextMenu->AddItem(ResourceManager::GetString(L"IDS_MUSIC_OPT_SETAS_CALLER_RINGTONE"), IDA_SET_CONTEXT_MENU_CALLER);
+                               __pSetContextMenu->AddActionEventListener(*this);
+                               __pSetContextMenu->SetAnchorPosition(itemPoint);
+                               __pSetContextMenu->SetShowState(true);
+                               __pSetContextMenu->Show();
                        }
-                       __pSetContextMenu = new (std::nothrow) ContextMenu();
-                       __pSetContextMenu->Construct(Point(0,0), CONTEXT_MENU_STYLE_LIST, direction);
-                       __pSetContextMenu->AddItem(ResourceManager::GetString(L"IDS_MUSIC_OPT_CALL_RINGTONE"), IDA_SET_CONTEXT_MENU_CALL);
-                       __pSetContextMenu->AddItem(ResourceManager::GetString(L"IDS_MUSIC_OPT_SETAS_CALLER_RINGTONE"), IDA_SET_CONTEXT_MENU_CALLER);
-                       __pSetContextMenu->AddActionEventListener(*this);
-                       __pSetContextMenu->SetAnchorPosition(itemPoint);
-                       __pSetContextMenu->SetShowState(true);
-                       __pSetContextMenu->Show();
                }
                break;
-       }
+
        case IDA_DELETE_POPUP_DELETE:
+               // fall through         
        case IDA_DELETE_POPUP_CANCEL:
-       {
-               __pDeletePopup->SetShowState(false);
-               __pDeletePopup->Show();
-
-               if (actionId == IDA_DELETE_POPUP_DELETE)
                {
-                       __pPresentationModel->RemoveContent(__itemIndex);
-                       __pContentTableView->RefreshItem(__itemIndex, TABLE_VIEW_REFRESH_TYPE_ITEM_REMOVE);
+                       Form* pForm = dynamic_cast<Form*>(GetParent());
+                       AppAssert(pForm);
+
+                       Footer* pFooter = pForm->GetFooter();
+
+                       __pDeletePopup->SetShowState(false);
+                       __pDeletePopup->Show();
+
+                       if (actionId == IDA_DELETE_POPUP_DELETE)
+                       {
+                               __pPresentationModel->RemoveContent(__itemIndex);
+
+                               if (__pPresentationModel->GetTotalCount() <= INIT_VALUE)
+                               {
+                                       CommonUtil::ShowNoContentImage(INIT_VALUE, *__pContentTableView, *__pNoContentImageLabel, *__pNoContentTextLabel);
+                                       pFooter->SetItemEnabled(INDEX_EDITCONTENTLIST_FOOTER_EDIT, false);
+                                       pFooter->Invalidate(true);
+                               }
+                               __pContentTableView->RefreshItem(__itemIndex, TABLE_VIEW_REFRESH_TYPE_ITEM_REMOVE);
+                       }
                }
                break;
-       }
+
        case IDA_SHARE_CONTEXT_MENU_EMAIL:
+               // fall through         
        /* blocked this code (TDIS-1672 */
        case IDA_SHARE_CONTEXT_MENU_MESSAGE:
-       {
-               String providerID = ((actionId == IDA_SHARE_CONTEXT_MENU_EMAIL) ? PROVIDER_ID_EMAIL : PROVIDER_ID_MESSAGE);
-               AppControl* pAppControl = AppManager::FindAppControlN(providerID, OPERATION_ID_COMPOSE);
-               if (pAppControl == null)
-               {
-                       return;
-               }
-
-               ContentInformationStruct* pContentInfoStruct = __pPresentationModel->GetContentInfoN(__itemIndex);
-               if (pContentInfoStruct == null)
                {
-                       return;
-               }
-
-               HashMap* pDataList = new (std::nothrow) HashMap(SingleObjectDeleter);
-               pDataList->Construct();
-               pDataList->Add(new (std::nothrow) String(APPCONTROL_KEY_ATTACHMENTS), new (std::nothrow) String(pContentInfoStruct->ContentFilePath));
+                       String providerID = ((actionId == IDA_SHARE_CONTEXT_MENU_EMAIL) ? PROVIDER_ID_EMAIL : PROVIDER_ID_MESSAGE);
+                       AppControl* pAppControl = AppManager::FindAppControlN(providerID, OPERATION_ID_COMPOSE);
+                       if (pAppControl == null)
+                       {
+                               return;
+                       }
 
-               pAppControl->Start(null, null, pDataList, this);
+                       ContentInformation* pContentInfoStruct = __pPresentationModel->GetContentInfoN(__itemIndex);
+                       if (pContentInfoStruct == null)
+                       {
+                               return;
+                       }
 
-               //test_code_start
-               delete pContentInfoStruct->pThumbnail;
-               pContentInfoStruct->pThumbnail = null;
+                       HashMap* pDataList = new (std::nothrow) HashMap(SingleObjectDeleter);
+                       pDataList->Construct();
+                       pDataList->Add(new (std::nothrow) String(APPCONTROL_KEY_ATTACHMENTS), new (std::nothrow) String(pContentInfoStruct->ContentFilePath));
 
-               delete pContentInfoStruct;
-               pContentInfoStruct = null;
-               //test_code_end
+                       pAppControl->Start(null, null, pDataList, this);
 
-               delete pAppControl;
-               pAppControl = null;
+                       delete pContentInfoStruct;
+                       pContentInfoStruct = null;
 
+                       delete pAppControl;
+                       pAppControl = null;
+               }
                break;
-       }
        /* blocked this code (TDIS-1672 */
+
        case IDA_SET_CONTEXT_MENU_CALL:
-       {
-               result r = __pPresentationModel->SetCallRingtone(__itemIndex);
-               if (r == E_SUCCESS)
                {
-                       MessageBox messageBox;
-                       messageBox.Construct(L"", ResourceManager::GetString(L"IDS_COM_POP_SUCCESS"),
-                                 MSGBOX_STYLE_OK,
-                                 3000);
-                       int modalResult = 0;
-                       messageBox.ShowAndWait(modalResult);
+                       result r = __pPresentationModel->SetCallRingtone(__itemIndex);
+                       if (r == E_SUCCESS)
+                       {
+                               MessageBox messageBox;
+                               messageBox.Construct(L"", ResourceManager::GetString(L"IDS_COM_POP_SUCCESS"),
+                                               MSGBOX_STYLE_OK,
+                                               3000);
+                               int modalResult = 0;
+                               messageBox.ShowAndWait(modalResult);
+                       }
                }
                break;
-       }
+
        case IDA_SET_CONTEXT_MENU_CALLER:
-       {
-               AppControl* pAppControl = AppManager::FindAppControlN(TIZEN_APPCONTROL_PROVIDER_CONTACT, TIZEN_APPCONTROL_OPERATION_PICK);
-               if (pAppControl == null)
                {
-                       return;
-               }
+                       AppControl* pAppControl = AppManager::FindAppControlN(TIZEN_APPCONTROL_PROVIDER_CONTACT, TIZEN_APPCONTROL_OPERATION_PICK);
+                       if (pAppControl == null)
+                       {
+                               return;
+                       }
 
-               HashMap* pDataList = new (std::nothrow) HashMap(SingleObjectDeleter);
-               pDataList->Construct();
-               pDataList->Add(new (std::nothrow) String(APPCONTROL_KEY_SINGLE_MODE), new (std::nothrow) String(APPCONTROL_VALUE_SINGLE));
-               pDataList->Add(new (std::nothrow) String(APPCONTROL_KEY_RETURNTYPE), new (std::nothrow) String(APPCONTROL_VALUE_CONTACTID));
+                       HashMap* pDataList = new (std::nothrow) HashMap(SingleObjectDeleter);
+                       pDataList->Construct();
+                       pDataList->Add(new (std::nothrow) String(APPCONTROL_KEY_SINGLE_MODE), new (std::nothrow) String(APPCONTROL_VALUE_SINGLE));
+                       pDataList->Add(new (std::nothrow) String(APPCONTROL_KEY_RETURNTYPE), new (std::nothrow) String(APPCONTROL_VALUE_CONTACTID));
 
-               pAppControl->Start(null, null, pDataList, this);
-               if (pAppControl != null)
-               {
-                       delete pAppControl;
-                       pAppControl = null;
+                       pAppControl->Start(null, null, pDataList, this);
+                       if (pAppControl != null)
+                       {
+                               delete pAppControl;
+                               pAppControl = null;
+                       }
                }
                break;
-       }
+
        case IDA_FLICK_BUTTON_ADD_TO_PALYLIST:
-       {
-               ContentInformationStruct* pContentInfoStruct = __pPresentationModel->GetContentInfoN(__itemIndex);
-               if (pContentInfoStruct == null)
                {
-                       return;
-               }
+                       ContentInformation* pContentInfoStruct = __pPresentationModel->GetContentInfoN(__itemIndex);
+                       if (pContentInfoStruct == null)
+                       {
+                               return;
+                       }
 
-               ArrayList* pData = new (std::nothrow) ArrayList();
-               pData->Construct();
-               pData->Add(*(new (std::nothrow) String(pContentInfoStruct->ContentFilePath)));
+                       ArrayList* pData = new (std::nothrow) ArrayList();
+                       pData->Construct();
+                       pData->Add(*(new (std::nothrow) String(pContentInfoStruct->ContentFilePath)));
 
-               if (__pPlayListPickerPopup == null)
-               {
                        __pPlayListPickerPopup = new (std::nothrow) PlayListPickerPopup();
-                       __pPlayListPickerPopup->Initialize();
-               }
-               __pPlayListPickerPopup->SetCollectedContent(pData);
-               __pPlayListPickerPopup->SetShowState(true);
-               __pPlayListPickerPopup->Show();
-
-               //test_code_start
-               delete pContentInfoStruct->pThumbnail;
-               pContentInfoStruct->pThumbnail = null;
-
-               delete pContentInfoStruct;
-               pContentInfoStruct = null;
-               //test_code_end
+                       __pPlayListPickerPopup->Initialize(this, pData);
+                       //__pPlayListPickerPopup->SetCollectedContent(pData);
+                       __pPlayListPickerPopup->SetShowState(true);
+                       __pPlayListPickerPopup->Show();
 
+                       delete pContentInfoStruct;
+                       pContentInfoStruct = null;
+               }
                break;
-       }
+
        case IDA_FLICK_BUTTON_DELETE:
-       {
-               if (__pDeletePopup != null)
                {
-                       __pDeletePopup->SetShowState(true);
-                       __pDeletePopup->Show();
+                       if (__pDeletePopup != null)
+                       {
+                               __pDeletePopup->SetShowState(true);
+                               __pDeletePopup->Show();
+                       }
                }
                break;
-       }
+
        case IDA_FOOTER_BUTTON_EDIT:
-       {
-               if (__pPresentationModel->GetTotalCount() == 0)
                {
-                       MessageBox messageBox;
-                       messageBox.Construct(L"", ResourceManager::GetString(L"IDS_MUSIC_HEADER_NO_SONGS"), MSGBOX_STYLE_NONE, 500);
+                       if (__pPresentationModel->GetTotalCount() == 0)
+                       {
+                               MessageBox messageBox;
+                               messageBox.Construct(L"", ResourceManager::GetString(L"IDS_MUSIC_HEADER_NO_SONGS"), MSGBOX_STYLE_NONE, 500);
 
-                       int modalResult = 0;
-                       messageBox.ShowAndWait(modalResult);
-                       break;
-               }
+                               int modalResult = 0;
+                               messageBox.ShowAndWait(modalResult);
+                               break;
+                       }
 
-               pSceneManager->GoForward(ForwardSceneTransition(IDSCN_ALL_LIST_EDITOR));
+                       pSceneManager->GoForward(ForwardSceneTransition(IDSCN_ALL_LIST_EDITOR));
+               }
                break;
-       }
+
        case IDA_FOOTER_BUTTON_SEARCH:
-       {
-               pSceneManager->GoForward(ForwardSceneTransition(IDSCN_SEARCH));
+               {
+                       pSceneManager->GoForward(ForwardSceneTransition(IDSCN_SEARCH));
+               }
+               break;
+
+       default:
                break;
-       }
        }//end of switch
-       AppLogDebug("End");
+       AppLogDebug("EXIT");
 }
 
 void
 AllListPanel::OnFormBackRequested(Tizen::Ui::Controls::Form& source)
 {
+       AppLogDebug("ENTER");
        Tizen::App::Application::GetInstance()->Terminate();
+       AppLogDebug("EXIT");
 }
 
 void
 AllListPanel::OnUpdateContentList(void)
 {
+       AppLogDebug("ENTER");
        UpdateContentList();
+       AppLogDebug("EXIT");
 }
 
 void
@@ -474,9 +482,7 @@ AllListPanel::OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previousSceneI
                                                                const Tizen::Ui::Scenes::SceneId& currentSceneId,
                                                                Tizen::Base::Collection::IList* pArgs)
 {
-       AppLogDebug("Start");
-       //AppLogDebug("OnSceneActivatedN");
-
+       AppLogDebug("ENTER");
        Form* pForm = dynamic_cast<Form*>(GetParent());
        AppAssert(pForm);
 
@@ -486,11 +492,11 @@ AllListPanel::OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previousSceneI
        pFooter->AddActionEventListener(*this);
        pFooter->SetBackButton();
 
-       int width  = pForm->GetClientAreaBounds().width;
+       int width = pForm->GetClientAreaBounds().width;
        int height = pForm->GetClientAreaBounds().height;
 
        SetBounds(0, 0, width, height);
-       __pContentTableView->SetBounds(0,0,width,height);
+       __pContentTableView->SetBounds(0, 0, width, height);
 
        SceneManager* pSceneManager = SceneManager::GetInstance();
        AppAssert(pSceneManager);
@@ -520,16 +526,14 @@ AllListPanel::OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previousSceneI
                pArgs->RemoveAll(true);
                delete pArgs;
        }
-       AppLogDebug("End");
+       AppLogDebug("EXIT");
 }
 
 void
 AllListPanel::OnSceneDeactivated(const Tizen::Ui::Scenes::SceneId& currentSceneId,
-                                                                const Tizen::Ui::Scenes::SceneId& nextSceneId)
+                                                                       const Tizen::Ui::Scenes::SceneId& nextSceneId)
 {
-       //AppLogDebug("OnSceneDeactivated");
-       AppLogDebug("Start");
-
+       AppLogDebug("ENTER");
        Form* pForm = dynamic_cast<Form*>(GetParent());
        AppAssert(pForm);
 
@@ -538,28 +542,28 @@ AllListPanel::OnSceneDeactivated(const Tizen::Ui::Scenes::SceneId& currentSceneI
        pFooter->RemoveAllItems();
        pFooter->RemoveActionEventListener(*this);
 
-       AppLogDebug("End");
+       CancelAllThumbnailRequest();
+       AppLogDebug("EXIT");
 }
 
 int
 AllListPanel::GetItemCount(void)
 {
-       AppLogDebug("Start");
+       AppLogDebug("ENTER");
        if (__pPresentationModel == null)
        {
                //AppLogDebug("__pPresentationModel Null");
                return INIT_VALUE;
        }
-       AppLogDebug("End");
+       AppLogDebug("EXIT");
        return  __pPresentationModel->GetTotalCount();
 }
 
 TableViewItem*
 AllListPanel::CreateItem(const int itemIndex, int itemWidth)
 {
-       AppLogDebug("Start");
-       //AppLogDebug("CreateItem");
-       ContentInformationStruct* pContentInfoStruct = __pPresentationModel->GetContentInfoN(itemIndex);
+       AppLogDebug("ENTER");
+       ContentInformation* pContentInfoStruct = __pPresentationModel->GetContentInfoN(itemIndex);
        if (pContentInfoStruct == null)
        {
                return null;
@@ -569,56 +573,44 @@ AllListPanel::CreateItem(const int itemIndex, int itemWidth)
        pItem->Construct(Dimension(itemWidth, ITEM_HEIGHT), TABLE_VIEW_ANNEX_STYLE_NORMAL);
        pItem->SetBackgroundColor(COLOR_ITEM);
 
+       RequestThumbnail(pContentInfoStruct->contentId, (new (std::nothrow) int(itemIndex)));
        CreateTableViewItem(*pItem, *pContentInfoStruct);
        pItem->SetContextItem(__pContextItem);
 
-       //test_code_start
-       delete pContentInfoStruct->pThumbnail;
-       pContentInfoStruct->pThumbnail = null;
-
        delete pContentInfoStruct;
        pContentInfoStruct = null;
-       //test_code_end
 
-       AppLogDebug("End");
+       AppLogDebug("EXIT");
        return pItem;
 }
 
 bool
 AllListPanel::DeleteItem(const int itemIndex, TableViewItem* pItem)
 {
-       //AppLogDebug("DeleteItem");
-       AppLogDebug("Start");
+       AppLogDebug("ENTER");
 
        delete pItem;
        pItem = null;
 
-       AppLogDebug("End");
+       AppLogDebug("EXIT");
        return true;
 }
 
-void
-AllListPanel::UpdateItem(int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem)
-{
-}
-
 int
 AllListPanel::GetDefaultItemHeight(void)
 {
-       //AppLogDebug("GetDefaultItemHeight");
-       AppLogDebug("Start");
-       AppLogDebug("End");
-
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
        return ITEM_HEIGHT;
 }
 
 void
 AllListPanel::OnTableViewItemStateChanged(Tizen::Ui::Controls::TableView& tableView,
-                                          int itemIndex,
-                                          Tizen::Ui::Controls::TableViewItem* pItem,
-                                          Tizen::Ui::Controls::TableViewItemStatus status)
+                                               int itemIndex,
+                                               Tizen::Ui::Controls::TableViewItem* pItem,
+                                               Tizen::Ui::Controls::TableViewItemStatus status)
 {
-       AppLogDebug("Start");
+       AppLogDebug("ENTER");
        SceneManager* pSceneManager = SceneManager::GetInstance();
        AppAssert(pSceneManager);
 
@@ -626,38 +618,38 @@ AllListPanel::OnTableViewItemStateChanged(Tizen::Ui::Controls::TableView& tableV
        {
                pSceneManager->GoForward(ForwardSceneTransition(IDSCN_PLAYER), GetContentListN(itemIndex));
        }
-       AppLogDebug("End");
+       AppLogDebug("EXIT");
 }
 
 void
 AllListPanel::OnTableViewContextItemActivationStateChanged(Tizen::Ui::Controls::TableView& tableView,
-                                                           int itemIndex,
-                                                           Tizen::Ui::Controls::TableViewContextItem* pContextItem,
-                                                           bool activated)
+                                                                       int itemIndex,
+                                                                       Tizen::Ui::Controls::TableViewContextItem* pContextItem,
+                                                                       bool activated)
 {
-       AppLogDebug("Start");
+       AppLogDebug("ENTER");
        if (activated == true)
        {
                __itemIndex = itemIndex;
        }
-       AppLogDebug("End");
+       AppLogDebug("EXIT");
 }
 
 void
 AllListPanel::OnTableViewItemReordered(Tizen::Ui::Controls::TableView& tableView,
-                                       int itemIndexFrom,
-                                       int itemIndexTo)
+                                               int itemIndexFrom,
+                                               int itemIndexTo)
 {
-       AppLogDebug("Start");
-       AppLogDebug("End");
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 
 void
 AllListPanel::OnFastScrollIndexSelected(Tizen::Ui::Control& source, Tizen::Base::String& index)
 {
-       AppLogDebug("Start");
+       AppLogDebug("ENTER");
        int totalCount = __pPresentationModel->GetTotalCount();
-       for(int iCount = 0; iCount < totalCount; iCount++)
+       for (int iCount = 0; iCount < totalCount; iCount++)
        {
                String name = __pPresentationModel->GetContentName(iCount);
                String firstCharacter;
@@ -670,12 +662,12 @@ AllListPanel::OnFastScrollIndexSelected(Tizen::Ui::Control& source, Tizen::Base:
 
                if (Character::GetUnicodeCategory(language) == UNICODE_HANGUL)
                {
-                       Tizen::Base::String HangulIndex[] = {"ㄱ", "ㄲ", "ㄴ", "ㄷ", "ㄸ", "ㄹ", "ㅁ", "ㅂ", "ㅃ","ㅅ", "ㅆ", "ㅇ" , "ㅈ", "ㅉ", "ㅊ", "ㅋ", "ㅌ", "ㅍ", "ㅎ"        };
+                       Tizen::Base::String HangulIndex[] = {"ㄱ", "ㄲ", "ㄴ", "ㄷ", "ㄸ", "ㄹ", "ㅁ", "ㅂ", "ㅃ", "ㅅ", "ㅆ", "ㅇ" , "ㅈ", "ㅉ", "ㅊ", "ㅋ", "ㅌ", "ㅍ", "ㅎ"};
 
                        wchar_t songName;
                        name.GetCharAt(0, songName);
 
-                       wchar_t UnicodeValue     = (songName - 0xAC00);
+                       wchar_t UnicodeValue = (songName - 0xAC00);
                        wchar_t InitialConsonant = ((UnicodeValue - (UnicodeValue % 28)) / 28) / 21;
                        int tempIndex = static_cast<int>(InitialConsonant);
 
@@ -696,12 +688,13 @@ AllListPanel::OnFastScrollIndexSelected(Tizen::Ui::Control& source, Tizen::Base:
                        break;
                }
        }//end of for
+       AppLogDebug("EXIT");
 }
 
 result
 AllListPanel::CreateTableViewContextItem(Tizen::Ui::Controls::TableViewContextItem& parent)
 {
-       AppLogDebug("Start");
+       AppLogDebug("ENTER");
        result r = E_SUCCESS;
 
        AppResource* pAppResource = Application::GetInstance()->GetAppResource();
@@ -709,7 +702,7 @@ AllListPanel::CreateTableViewContextItem(Tizen::Ui::Controls::TableViewContextIt
 
        String buttonName = null;
 
-       int ButtonWidth  = (parent.GetWidth() - X_GAP_TABLE_VIEW_CONTENT_ITEM ) / 4;
+       int ButtonWidth = (parent.GetWidth() - X_GAP_TABLE_VIEW_CONTENT_ITEM ) / 4;
        int ButtonHeight = parent.GetHeight() - (Y_GAP_TABLE_VIEW_CONTENT_ITEM * 2);
 
        Button* pShareButton = new (std::nothrow) Button();
@@ -752,31 +745,32 @@ AllListPanel::CreateTableViewContextItem(Tizen::Ui::Controls::TableViewContextIt
        parent.AddControl(*pAddToPlaylistButton);
        parent.AddControl(*pDeleteButton);
 
-       AppLogDebug("End");
+       AppLogDebug("EXIT");
        return r;
 }
 
 Tizen::Base::Collection::ArrayList*
 AllListPanel::GetContentListN(int itemIndex)
 {
-       AppLogDebug("Start");
-       ArrayList* pTempList = new (std::nothrow)ArrayList();
+       AppLogDebug("ENTER");
+       ArrayList* pTempList = new (std::nothrow) ArrayList();
        pTempList->Construct();
 
-       pTempList->Add(*(new String(MUSIC)));
-       pTempList->Add(*(new Integer(itemIndex)));
+       pTempList->Add(*(new (std::nothrow) String(MUSIC)));
+       pTempList->Add(*(new (std::nothrow) Integer(itemIndex)));
        pTempList->Add(*(__pPresentationModel->GetContentListN()));
 
-       AppLogDebug("End");
+       AppLogDebug("EXIT");
        return pTempList;
 }
 
 void
 AllListPanel::UpdateContentList(void)
 {
+       AppLogDebug("ENTER");
        if (__pPresentationModel != null && __pContentTableView != null)
        {
-               __pPresentationModel->RefreshContent();
+               __pPresentationModel->UpdateContentList();
                __pContentTableView->UpdateTableView();
                if (__pShareContextMenu != null && __pShareContextMenu->GetShowState() == true)
                {
@@ -789,22 +783,24 @@ AllListPanel::UpdateContentList(void)
                        __pSetContextMenu->Invalidate(true);
                }
        }
+       AppLogDebug("EXIT");
 }
 
 result
 AllListPanel::CreateTableViewItem(Tizen::Ui::Container& parent,
-                                         const ContentInformationStruct& contentInfoStruct)
+                                               const ContentInformation& contentInfoStruct)
 {
+       AppLogDebug("ENTER");
        result r = E_SUCCESS;
-       AppLogDebug("Start");
        Label* pSongThumbnailBGLabel = new (std::nothrow) Label();
        pSongThumbnailBGLabel->Construct(Rectangle(X_GAP_THUMBNAIL - 1, Y_GAP_THUMBNAIL - 1, W_THUMBNAIL + 1, W_THUMBNAIL + 1), L"");
 
        Label* pSongThumbnailLabel = new (std::nothrow) Label();
-       pSongThumbnailLabel->Construct(Rectangle(X_GAP_THUMBNAIL, Y_GAP_THUMBNAIL, W_THUMBNAIL ,H_THUMBNAIL), L"");
-       pSongThumbnailLabel->SetBackgroundBitmap(*contentInfoStruct.pThumbnail);
+       pSongThumbnailLabel->Construct(Rectangle(X_GAP_THUMBNAIL, Y_GAP_THUMBNAIL, W_THUMBNAIL, H_THUMBNAIL), L"");
+       pSongThumbnailLabel->SetBackgroundBitmap(*GetDefaultThumbnail());
+       pSongThumbnailLabel->SetName(L"pSongThumbnailLabel");
 
-       int X_Gap   = W_THUMBNAIL + (X_GAP_THUMBNAIL * 2);
+       int X_Gap = W_THUMBNAIL + (X_GAP_THUMBNAIL * 2);
        int W_Label = W_CLIENT_AREA - X_Gap;
 
        Label* pSongTitleLabel = new (std::nothrow) Label();
@@ -834,22 +830,81 @@ AllListPanel::CreateTableViewItem(Tizen::Ui::Container& parent,
        parent.AddControl(*pSongTimeLabel);
        parent.AddControl(*pSongArtistLabel);
 
-       AppLogDebug("End");
+       AppLogDebug("EXIT");
        return r;
 }
 
 void
-AllListPanel::OnScrollEndReached (Tizen::Ui::Control &source, Tizen::Ui::Controls::ScrollEndEvent type)
+AllListPanel::OnScrollEndReached (Tizen::Ui::Controlsource, Tizen::Ui::Controls::ScrollEndEvent type)
 {
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 
 void
-AllListPanel::OnScrollPositionChanged (Tizen::Ui::Control &source, int scrollPos)
+AllListPanel::OnScrollPositionChanged (Tizen::Ui::Controlsource, int scrollPos)
 {
+       AppLogDebug("ENTER");
        __scrolledDistance = scrollPos;
+       AppLogDebug("EXIT");
+}
+
+void
+AllListPanel::OnScrollStopped (Tizen::Ui::Control& source)
+{
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 
 void
-AllListPanel::OnScrollStopped (Tizen::Ui::Control &source)
+AllListPanel::OnThumbnailInfoReveivedN(ThumbnailInfo* pThumbnailInfo)
 {
+       AppLogDebug("ENTER");
+       int itemIndex = 0;
+       void* pParam = null;
+       __pThumbnail = pThumbnailInfo->GetBitmapN();
+       pParam = pThumbnailInfo->GetUserParamN();
+       if (pParam)
+       {
+               itemIndex = *(static_cast<int*>(pParam));
+       }
+       __pContentTableView->RefreshItem(itemIndex, TABLE_VIEW_REFRESH_TYPE_ITEM_MODIFY);
+       delete pThumbnailInfo;
+       delete static_cast<int*>(pParam);
+       AppLogDebug("EXIT");
 }
+
+void
+AllListPanel::OnUserEventReceivedN(RequestId requestId, Tizen::Base::Collection::IList* pArgs)
+{
+       AppLogDebug("ENTER");
+       AppLogDebug("OnUserEventReceivedN %d", requestId);
+       if (requestId == ID_DESTORY_PLAY_LIST_PICKER_POPUP)
+       {
+               if (__pPlayListPickerPopup != null)
+               {
+                       delete __pPlayListPickerPopup;
+                       __pPlayListPickerPopup = null;
+               }
+       }
+       AppLogDebug("EXIT");
+}
+
+void
+AllListPanel::UpdateItem(int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem)
+{
+       AppLogDebug("ENTER");
+       Label* pThumbnailLabel = static_cast<Label*>(pItem->GetControl(L"pSongThumbnailLabel"));
+       if (__pThumbnail == null || pThumbnailLabel == null)
+       {
+               AppLogDebug("__pThumbnail or pThumbnailLabel is null");
+               delete __pThumbnail;
+               __pThumbnail = null;
+               return;
+       }
+       pThumbnailLabel->SetBackgroundBitmap(*__pThumbnail);
+       delete __pThumbnail;
+       __pThumbnail = null;
+       pThumbnailLabel->Invalidate(true);
+       AppLogDebug("EXIT");
+}
\ No newline at end of file
index 288ba15..01a83b4 100644 (file)
@@ -1,4 +1,4 @@
-//
+//
 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
 //
 // Licensed under the Flora License, Version 1.0 (the License);
 // limitations under the License.
 //
 
+/**
+ * @file               MpAllListPresentationModel.cpp
+ * @brief              This is the implementation file for AllListPresentationModel class.
+ */
+
 #include "MpAllListPresentationModel.h"
 
 using namespace Tizen::Base;
 using namespace Tizen::Base::Collection;
+using namespace Tizen::Content;
 using namespace Tizen::Graphics;
-using namespace Tizen::Ui::Controls;
 using namespace Tizen::Social;
-using namespace Tizen::Content;
+using namespace Tizen::Ui::Controls;
 
 AllListPresentationModel* AllListPresentationModel::pAllListPresentationModelInstance = null;
 
 AllListPresentationModel::AllListPresentationModel(void)
-: __pContentList(null)
+       : __pContentList(null)
 {
-       AppLogDebug("Start");
-       AppLogDebug("End");
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 
 AllListPresentationModel::~AllListPresentationModel(void)
 {
-       AppLogDebug("Start");
-       AppLogDebug("End");
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 
 result
 AllListPresentationModel::Construct(void)
 {
-    result r = E_SUCCESS;
-       AppLogDebug("Start");
-    __pContentList = CommonUtil::SearchContentList(STRING_SORT_GAP, STRING_SORT_TITLE);
-    AppLogDebug("End");
-    return r;
+       AppLogDebug("ENTER");
+       result r = E_SUCCESS;
+       AppLogDebug("EXIT");
+       return r;
 }
 
 AllListPresentationModel*
 AllListPresentationModel::GetInstance(void)
 {
-       AppLogDebug("Start");
+       AppLogDebug("ENTER");
        if (pAllListPresentationModelInstance == null)
        {
                pAllListPresentationModelInstance = new (std::nothrow) AllListPresentationModel();
@@ -60,7 +64,7 @@ AllListPresentationModel::GetInstance(void)
                result r =  pAllListPresentationModelInstance->Construct();
                TryCatch(r == E_SUCCESS, , null, "AllListPresentationModel instance is not constrcuted.");
        }
-       AppLogDebug("End");
+       AppLogDebug("EXIT");
        return pAllListPresentationModelInstance;
 
 CATCH:
@@ -70,71 +74,71 @@ CATCH:
 
 int AllListPresentationModel::GetTotalCount(void)
 {
-       AppLogDebug("Start");
+       AppLogDebug("ENTER");
 
-    if (__pContentList == null)
-    {
-        return 0;
-    }
+       if (__pContentList == null)
+       {
+               return INIT_VALUE;
+       }
 
-    AppLogDebug("End");
+       AppLogDebug("EXIT");
 
-    return __pContentList->GetCount();
+       return __pContentList->GetCount();
 }
 
-ContentInformationStruct*
+ContentInformation*
 AllListPresentationModel::GetContentInfoN(int index)
 {
-       ContentInformationStruct* pContentInfoStruct = null;
-
+       AppLogDebug("ENTER");
+       ContentInformation* pContentInformation = null;
        ContentSearchResult* pResult = static_cast<ContentSearchResult*>(__pContentList->GetAt(index));
-       if(pResult != null && pResult->GetContentType() == CONTENT_TYPE_AUDIO)
+       if (pResult != null && pResult->GetContentType() == CONTENT_TYPE_AUDIO)
        {
-               AudioContentInfo* pAudioContentInfo = static_cast<AudioContentInfo*>(pResult->GetContentInfo());
-               pContentInfoStruct = CommonUtil::GetContentInformationStructN(*pAudioContentInfo);
+               pContentInformation = CommonUtil::GetContentInformationN(*static_cast<AudioContentInfo*>(pResult->GetContentInfo()));
        }
 
-       AppLogDebug("End");
-       return pContentInfoStruct;
+       AppLogDebug("EXIT");
+       return pContentInformation;
 }
 
 result
 AllListPresentationModel::RemoveContent(int index)
 {
-
+       AppLogDebug("ENTER");
        ContentSearchResult* pResult = static_cast<ContentSearchResult*>(__pContentList->GetAt(index));
        TryReturn(pResult != null, E_INVALID_ARG, "index is invalid value");
 
-       AudioContentInfo* pAudioContentInfo = static_cast<AudioContentInfo*>(pResult->GetContentInfo());
-
        ContentManager manager;
        manager.Construct();
+
+       AudioContentInfo* pAudioContentInfo = static_cast<AudioContentInfo*>(pResult->GetContentInfo());
        manager.DeleteContent(pAudioContentInfo->GetContentId());
 
        __pContentList->RemoveAt(index);
+       AppLogDebug("EXIT");
        return E_SUCCESS;
 }
 
 Tizen::Base::String
 AllListPresentationModel::GetContentName(int index)
 {
-       AppLogDebug("Start");
-
+       AppLogDebug("ENTER");
        ContentSearchResult* pResult = static_cast<ContentSearchResult*>(__pContentList->GetAt(index));
-       if(pResult->GetContentType() == CONTENT_TYPE_AUDIO)
+       if (pResult != null && pResult->GetContentType() == CONTENT_TYPE_AUDIO)
        {
+               AppLogDebug("EXIT");
                AudioContentInfo* pAudioContentInfo = static_cast<AudioContentInfo*>(pResult->GetContentInfo());
                return pAudioContentInfo->GetTitle();
        }
 
-       AppLogDebug("End");
+       AppLogDebug("EXIT");
        return null;
 }
 
 Tizen::Base::String*
 AllListPresentationModel::GetCheckedContent(int index)
 {
-       AppLogDebug("Start");
+       AppLogDebug("ENTER");
        if (__pContentList == null)
        {
                return null;
@@ -142,58 +146,85 @@ AllListPresentationModel::GetCheckedContent(int index)
 
        Tizen::Base::String* pContent = null;
 
-//     for(int iCount = 0; iCount < __pContentList->GetCount(); iCount++)
+//     for (int iCount = 0; iCount < __pContentList->GetCount(); iCount++)
 //     {
                ContentSearchResult* pResult = static_cast<ContentSearchResult*>(__pContentList->GetAt(index));
                if(pResult != null)
                {
-                       pContent = new String(pResult->GetContentInfo()->GetContentPath());
+                       pContent = new (std::nothrow) String(pResult->GetContentInfo()->GetContentPath());
                }
 //     }
-       AppLogDebug("End");
-    return pContent;
+       AppLogDebug("EXIT");
+       return pContent;
 }
 
 Tizen::Base::Collection::ArrayList*
 AllListPresentationModel::GetContentListN(void)
 {
-       AppLogDebug("Start");
+       AppLogDebug("ENTER");
        if (__pContentList == null)
        {
                return null;
        }
 
-       ArrayList* pContentPath = new (std::nothrow)ArrayList();
+       ArrayList* pContentPath = new (std::nothrow) ArrayList();
        pContentPath->Construct();
 
-       for(int iCount = 0; iCount < __pContentList->GetCount(); iCount++)
+       for (int iCount = 0; iCount < __pContentList->GetCount(); iCount++)
        {
                ContentSearchResult* pResult = static_cast<ContentSearchResult*>(__pContentList->GetAt(iCount));
                if(pResult != null)
                {
-                       pContentPath->Add(*(new String(pResult->GetContentInfo()->GetContentPath())));
+                       pContentPath->Add(*(new (std::nothrow) String(pResult->GetContentInfo()->GetContentPath())));
                }
        }
-       AppLogDebug("End");
-    return pContentPath;
+       AppLogDebug("EXIT");
+       return pContentPath;
+}
+
+result
+AllListPresentationModel::SetCallRingtone(int index)
+{
+       AppLogDebug("ENTER");
+       ContentSearchResult* pResult = static_cast<ContentSearchResult*>(__pContentList->GetAt(index));
+       AppLogDebug("EXIT");
+       return Tizen::System::SettingInfo::SetValue(CALL_RINGTONE_KEY, pResult->GetContentInfo()->GetContentPath());
 }
 
 void
-AllListPresentationModel::RefreshContent(void)
+AllListPresentationModel::AddContent(String path, int playlistIndex)
+{
+       AppLogDebug("ENTER");
+       ContentInformation* pContentInfoStruct = GetContentInfoN(playlistIndex);
+       PlayList* pPlayList = PlayListManager::GetInstance()->GetPlayListN(path);
+       pPlayList->AddItem(pContentInfoStruct->contentId);
+
+       delete pContentInfoStruct;
+       pContentInfoStruct = null;
+
+       delete pPlayList;
+       pPlayList = null;
+       AppLogDebug("EXIT");
+}
+
+result
+AllListPresentationModel::UpdateContentList(void)
 {
-       AppLogDebug("Start");
+       AppLogDebug("ENTER");
+       result r = E_SUCCESS;
+
        if (__pContentList != null)
        {
                __pContentList->RemoveAll(true);
                delete __pContentList;
-               __pContentList = CommonUtil::SearchContentList(STRING_SORT_GAP, STRING_SORT_TITLE);
        }
-       AppLogDebug("End");
-}
 
-result
-AllListPresentationModel::SetCallRingtone(int index)
-{
-       ContentSearchResult* pResult = static_cast<ContentSearchResult*>(__pContentList->GetAt(index));
-       return Tizen::System::SettingInfo::SetValue(CALL_RINGTONE_KEY, pResult->GetContentInfo()->GetContentPath());
-}
+       __pContentList = CommonUtil::SearchContentList(STRING_SORT_GAP, STRING_SORT_TITLE);
+       TryCatch(__pContentList != null, r = E_FAILURE, "__pContentList is null");
+
+       AppLogDebug("EXIT");
+       return r;
+
+CATCH:
+       return r;
+}
\ No newline at end of file
old mode 100755 (executable)
new mode 100644 (file)
index c21594d..7450b0b
@@ -1,4 +1,4 @@
-//
+//
 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
 //
 // Licensed under the Flora License, Version 1.0 (the License);
 // limitations under the License.
 //
 
+/**
+ * @file               MpArtistAlbumListEditorForm.cpp
+ * @brief              This is the implementation file for ArtistAlbumListEditorForm class.
+ */
+
 #include "MpArtistAlbumListEditorForm.h"
 #include "MpArtistListPresentationModel.h"
-#include "MpPlaylistPickerPopup.h"
 #include "MpCommonUtil.h"
+#include "MpPlaylistPickerPopup.h"
+#include "MpThumbnailInfo.h"
 
 using namespace Tizen::Base;
 using namespace Tizen::Base::Collection;
@@ -27,41 +33,43 @@ using namespace Tizen::Social;
 using namespace Tizen::Ui::Controls;
 using namespace Tizen::Ui::Scenes;
 
-ArtistAlbumListEditorForm::ArtistAlbumListEditorForm()
-: __pContentTableView(null)
-, __pCheckedCountLabel(null)
-, __pSelectAllCheckedButton(null)
-, __checkedItemCount(0)
-, __pPlayListPickerPopup(null)
+ArtistAlbumListEditorForm::ArtistAlbumListEditorForm(void)
+       : ThumbnailBase::ThumbnailBase()
+       , __pContentTableView(null)
+       , __pCheckedCountLabel(null)
+       , __pSelectAllCheckedButton(null)
+       , __pThumbnail(null)
+       , __checkedItemCount(0)
+       , __pPlayListPickerPopup(null)
 {
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 
-ArtistAlbumListEditorForm::~ArtistAlbumListEditorForm()
+ArtistAlbumListEditorForm::~ArtistAlbumListEditorForm(void)
 {
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 
-
 bool
 ArtistAlbumListEditorForm::Initialize(void)
 {
-       AppLogDebug("Start");
-
-       result r = Construct(FORM_STYLE_NORMAL | FORM_STYLE_INDICATOR | FORM_STYLE_HEADER | FORM_STYLE_FOOTER);
+       AppLogDebug("ENTER");
+       result r = Form::Construct(FORM_STYLE_NORMAL | FORM_STYLE_INDICATOR | FORM_STYLE_HEADER | FORM_STYLE_FOOTER);
        if (IsFailed(r))
        {
                return false;
        }
 
-       AppLogDebug("End");
-
+       AppLogDebug("EXIT");
        return true;
 }
 
 result
 ArtistAlbumListEditorForm::OnInitializing(void)
 {
-       AppLogDebug("Start");
-
+       AppLogDebug("ENTER");
        Rectangle tableViewRect = GetClientAreaBounds();
        tableViewRect.x = 0;
        tableViewRect.y = H_SELECT_ALL_BUTTON;
@@ -78,34 +86,28 @@ ArtistAlbumListEditorForm::OnInitializing(void)
        __pCheckedCountLabel = CommonUtil::CreateCheckedCountLabel(GetClientAreaBounds().width, GetClientAreaBounds().height);
        __pCheckedCountLabel->SetShowState(false);
 
-       __pPlayListPickerPopup = new (std::nothrow) PlayListPickerPopup();
-       __pPlayListPickerPopup->Initialize();
-
        AddControl(*__pContentTableView);
        AddControl(*__pSelectAllCheckedButton);
        AddControl(*__pCheckedCountLabel);
 
        __pPresentationModel = ArtistListPresentationModel::GetInstance();
 
-       AppLogDebug("End");
-
-       return E_SUCCESS;
+       AppLogDebug("EXIT");
+       return ThumbnailBase::Construct();
 }
 
 result
 ArtistAlbumListEditorForm::OnTerminating(void)
 {
-       AppLogDebug("Start");
-       AppLogDebug("End");
-
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
        return E_SUCCESS;
 }
 
 void
 ArtistAlbumListEditorForm::OnActionPerformed(const Tizen::Ui::Control& source, int actionId)
 {
-       AppLogDebug("Start");
-
+       AppLogDebug("ENTER");
        if (__pPresentationModel == null)
        {
                return;
@@ -114,67 +116,79 @@ ArtistAlbumListEditorForm::OnActionPerformed(const Tizen::Ui::Control& source, i
        SceneManager* pSceneManager = SceneManager::GetInstance();
        AppAssert(pSceneManager);
 
-       int totalCount = __pPresentationModel->GetTotalArtistAlbumCount();
+       int totalCount = __pPresentationModel->GetArtistAlbumListCount();
 
-       switch(actionId)
+       switch (actionId)
        {
        case IDA_CHECK_BUTTON:
-       {
-               __checkedItemCount = totalCount;
-               CommonUtil::SetAllCheckState(true, *__pContentTableView, totalCount);
-               CommonUtil::ShowCheckedCountLabel(*__pCheckedCountLabel, __checkedItemCount, *__pContentTableView, *this);
-               CommonUtil::SetButtonEnabled(*this, __checkedItemCount, actionId);
+               {
+                       __checkedItemCount = totalCount;
+                       CommonUtil::SetAllCheckState(true, *__pContentTableView, totalCount);
+                       CommonUtil::ShowCheckedCountLabel(*__pCheckedCountLabel, __checkedItemCount, *__pContentTableView, *this);
+                       CommonUtil::SetButtonEnabled(*this, __checkedItemCount, actionId);
+               }
                break;
-       }
+
        case IDA_UNCHECK_BUTTON:
-       {
-               __checkedItemCount = INIT_VALUE;
-               CommonUtil::SetAllCheckState(false, *__pContentTableView, totalCount);
-               CommonUtil::ShowCheckedCountLabel(*__pCheckedCountLabel, __checkedItemCount, *__pContentTableView, *this);
-               CommonUtil::SetButtonEnabled(*this, __checkedItemCount, actionId);
+               {
+                       __checkedItemCount = INIT_VALUE;
+                       CommonUtil::SetAllCheckState(false, *__pContentTableView, totalCount);
+                       CommonUtil::ShowCheckedCountLabel(*__pCheckedCountLabel, __checkedItemCount, *__pContentTableView, *this);
+                       CommonUtil::SetButtonEnabled(*this, __checkedItemCount, actionId);
+               }
                break;
-       }
-       case IDA_FOOTER_BUTTON_ADD_TO_PLAYLIST:
-       {
-               ArrayList* pDataList = new (std::nothrow) ArrayList();
-               pDataList->Construct();
 
-               int totalCount = __pPresentationModel->GetTotalArtistAlbumCount();
-               for(int iCount = 0; iCount < totalCount; iCount++)
+       case IDA_FOOTER_BUTTON_ADD_TO_PLAYLIST:
                {
-                       if (__pContentTableView->IsItemChecked(iCount) == true)
+                       ArrayList* pDataList = new (std::nothrow) ArrayList();
+                       pDataList->Construct();
+
+                       int totalCount = __pPresentationModel->GetArtistAlbumListCount();
+                       for (int iCount = 0; iCount < totalCount; iCount++)
                        {
-                               pDataList->AddItems(*(__pPresentationModel->SearchContentItemN(iCount, SEARCH_MODE_ARTIST_ALBUM)));
+                               if (__pContentTableView->IsItemChecked(iCount) == true)
+                               {
+                                       pDataList->AddItems(*(__pPresentationModel->GetContentPathListN(iCount, SEARCH_MODE_ARTIST_ALBUM)));
+                                       __pContentTableView->SetItemChecked(iCount,false);
+                               }
                        }
+                       __checkedItemCount = INIT_VALUE;
+                       CommonUtil::ShowSelectAllCheckButton(*__pSelectAllCheckedButton);
+                       CommonUtil::ShowCheckedCountLabel(*__pCheckedCountLabel, __checkedItemCount, *__pContentTableView, *this);
+
+                       Invalidate(true);
+                       __pPlayListPickerPopup = new (std::nothrow) PlayListPickerPopup();
+                       __pPlayListPickerPopup->Initialize(this, pDataList);
+                       __pPlayListPickerPopup->SetShowState(true);
+                       __pPlayListPickerPopup->Show();
+                       CommonUtil::SetButtonEnabled(*this, __checkedItemCount, actionId);
                }
-
-               __pPlayListPickerPopup->SetCollectedContent(pDataList);
-               __pPlayListPickerPopup->SetShowState(true);
-               __pPlayListPickerPopup->Show();
-
-               CommonUtil::SetButtonEnabled(*this, __checkedItemCount, actionId);
                break;
-       }
+
        case IDA_FOOTER_BUTTON_CANCEL:
-       {
-               pSceneManager->GoBackward(BackwardSceneTransition());
-               CommonUtil::SetButtonEnabled(*this, __checkedItemCount, actionId);
+               {
+                       pSceneManager->GoBackward(BackwardSceneTransition());
+                       CommonUtil::SetButtonEnabled(*this, __checkedItemCount, actionId);
+               }
+               break;
+
+       default:
                break;
-       }
        }//end of switch
 
-       AppLogDebug("End");
+       AppLogDebug("EXIT");
 }
 
 void
 ArtistAlbumListEditorForm::OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previousSceneId,
-                                                                        const Tizen::Ui::Scenes::SceneId& currentSceneId,
-                                                                        Tizen::Base::Collection::IList* pArgs)
+                                                                               const Tizen::Ui::Scenes::SceneId& currentSceneId,
+                                                                               Tizen::Base::Collection::IList* pArgs)
 {
+       AppLogDebug("ENTER");
        Footer* pFooter = CommonUtil::CreateAddtoPlaylistPickerFooter(*this);
        pFooter->AddActionEventListener(*this);
 
-       ContentInformationStruct* pContentInfoStruct = __pPresentationModel->GetArtistAlbumContentInfoN(0);
+       ContentInformation* pContentInfoStruct = __pPresentationModel->GetArtistAlbumInfoN(0);
        if (pContentInfoStruct == null)
        {
                return;
@@ -186,11 +200,8 @@ ArtistAlbumListEditorForm::OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& p
 
        CommonUtil::SetButtonEnabled(*this, __checkedItemCount);
 
-       if(pContentInfoStruct != null)
+       if (pContentInfoStruct != null)
        {
-               delete pContentInfoStruct->pThumbnail;
-               pContentInfoStruct->pThumbnail = null;
-
                delete pContentInfoStruct;
                pContentInfoStruct = null;
        }
@@ -201,15 +212,14 @@ ArtistAlbumListEditorForm::OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& p
                delete pArgs;
        }
 
-       AppLogDebug("End");
+       AppLogDebug("EXIT");
 }
 
 void
 ArtistAlbumListEditorForm::OnSceneDeactivated(const Tizen::Ui::Scenes::SceneId& currentSceneId,
-                                              const Tizen::Ui::Scenes::SceneId& nextSceneId)
+                                                       const Tizen::Ui::Scenes::SceneId& nextSceneId)
 {
-       AppLogDebug("Start");
-
+       AppLogDebug("ENTER");
        Header* pHeader = GetHeader();
        pHeader->RemoveAllButtons();
        pHeader->RemoveAllItems();
@@ -219,129 +229,168 @@ ArtistAlbumListEditorForm::OnSceneDeactivated(const Tizen::Ui::Scenes::SceneId&
        pFooter->RemoveAllItems();
        pFooter->RemoveActionEventListener(*this);
 
-       AppLogDebug("End");
+       CancelAllThumbnailRequest();
+       AppLogDebug("EXIT");
 }
 
 int
 ArtistAlbumListEditorForm::GetItemCount(void)
 {
-       AppLogDebug("Start");
-
+       AppLogDebug("ENTER");
        if (__pPresentationModel == null)
        {
-               return 0;
+               return INIT_VALUE;
        }
 
-       AppLogDebug("End");
-
-       return __pPresentationModel->GetTotalArtistAlbumCount();
+       AppLogDebug("EXIT");
+       return __pPresentationModel->GetArtistAlbumListCount();
 }
 
 Tizen::Ui::Controls::TableViewItem*
 ArtistAlbumListEditorForm::CreateItem(const int itemIndex, int itemWidth)
 {
-       AppLogDebug("Start");
-
-       ContentInformationStruct* pContentInfoStruct = __pPresentationModel->GetArtistAlbumContentInfoN(itemIndex);
+       AppLogDebug("ENTER");
+       ContentInformation* pContentInfoStruct = __pPresentationModel->GetArtistAlbumInfoN(itemIndex);
        if (pContentInfoStruct == null)
        {
                return null;
        }
 
-       TableViewItem* pItem = new (std::nothrow) TableViewItem;
+       TableViewItem* pItem = new (std::nothrow) TableViewItem();
        pItem->Construct(Dimension(itemWidth, ITEM_HEIGHT), TABLE_VIEW_ANNEX_STYLE_MARK);
        pItem->SetBackgroundColor(COLOR_ITEM);
 
-       CommonUtil::CreateEditListTableViewItem(*pItem, *(pContentInfoStruct->pThumbnail), pContentInfoStruct->AlbumName, __pPresentationModel->GetTotalAlbumContentCount(itemIndex));
-
-       //test_code_start
-       delete pContentInfoStruct->pThumbnail;
-       pContentInfoStruct->pThumbnail = null;
+       RequestThumbnail(pContentInfoStruct->contentId, (new (std::nothrow) int(itemIndex)));
+       CommonUtil::CreateEditListTableViewItem(*pItem, *(GetDefaultThumbnail()), pContentInfoStruct->AlbumName, __pPresentationModel->GetArtistAlbumContentCount(itemIndex));
 
        delete pContentInfoStruct;
        pContentInfoStruct = null;
-       //test_code_end
-
-       AppLogDebug("End");
 
+       AppLogDebug("EXIT");
        return pItem;
 }
 
-void
-ArtistAlbumListEditorForm::UpdateItem(int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem)
-{
-       AppLogDebug("Start");
-       AppLogDebug("End");
-}
-
 int
 ArtistAlbumListEditorForm::GetDefaultItemHeight(void)
 {
-       AppLogDebug("Start");
-       AppLogDebug("End");
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
        return ITEM_HEIGHT;
 }
 
 bool
 ArtistAlbumListEditorForm::DeleteItem(const int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem)
 {
-       AppLogDebug("Start");
-       AppLogDebug("End");
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
        return true;
 }
 
 void
 ArtistAlbumListEditorForm::OnTableViewItemStateChanged(Tizen::Ui::Controls::TableView& tableView,
-                                                       int itemIndex,
-                                                       Tizen::Ui::Controls::TableViewItem* pItem,
-                                                       Tizen::Ui::Controls::TableViewItemStatus status)
+                                                               int itemIndex,
+                                                               Tizen::Ui::Controls::TableViewItem* pItem,
+                                                               Tizen::Ui::Controls::TableViewItemStatus status)
 {
-       AppLogDebug("Start");
-
-       switch(status)
+       AppLogDebug("ENTER");
+       switch (status)
        {
        case TABLE_VIEW_ITEM_STATUS_CHECKED:
-       {
-               __checkedItemCount++;
-               tableView.SetItemChecked(itemIndex, true);
+               {
+                       __checkedItemCount++;
+                       tableView.SetItemChecked(itemIndex, true);
+               }
                break;
-       }
+
        case TABLE_VIEW_ITEM_STATUS_UNCHECKED:
-       {
-               __checkedItemCount--;
-               tableView.SetItemChecked(itemIndex, false);
+               {
+                       __checkedItemCount--;
+                       tableView.SetItemChecked(itemIndex, false);
+               }
                break;
-       }
+
        default:
-       {
                break;
        }
-       }//end of switch
 
-       bool selectAllCheckedState = __checkedItemCount == __pPresentationModel->GetTotalArtistAlbumCount();
+       bool selectAllCheckedState = __checkedItemCount == __pPresentationModel->GetArtistAlbumListCount();
        __pSelectAllCheckedButton->SetSelected(selectAllCheckedState);
        __pSelectAllCheckedButton->Invalidate(true);
 
        CommonUtil::SetButtonEnabled(*this, __checkedItemCount);
        CommonUtil::ShowCheckedCountLabel(*__pCheckedCountLabel, __checkedItemCount, *__pContentTableView, *this);
 
-       AppLogDebug("End");
+       AppLogDebug("EXIT");
 }
+
 void
 ArtistAlbumListEditorForm::OnTableViewContextItemActivationStateChanged(Tizen::Ui::Controls::TableView& tableView,
-                                                                        int itemIndex,
-                                                                        Tizen::Ui::Controls::TableViewContextItem* pContextItem,
-                                                                        bool activated)
+                                                                                       int itemIndex,
+                                                                                       Tizen::Ui::Controls::TableViewContextItem* pContextItem,
+                                                                                       bool activated)
 {
-       AppLogDebug("Start");
-       AppLogDebug("End");
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 
 void
 ArtistAlbumListEditorForm::OnTableViewItemReordered(Tizen::Ui::Controls::TableView& tableView,
-                                                    int itemIndexFrom,
-                                                    int itemIndexTo)
+                                                               int itemIndexFrom,
+                                                               int itemIndexTo)
 {
-       AppLogDebug("Start");
-       AppLogDebug("End");
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
+
+void
+ArtistAlbumListEditorForm::OnThumbnailInfoReveivedN(ThumbnailInfo* pThumbnailInfo)
+{
+       AppLogDebug("ENTER");
+       int itemIndex = 0;
+       void* pParam = null;
+       __pThumbnail = pThumbnailInfo->GetBitmapN();
+       pParam = pThumbnailInfo->GetUserParamN();
+       if (pParam)
+       {
+               itemIndex = *(static_cast<int*>(pParam));
+       }
+       __pContentTableView->RefreshItem(itemIndex, TABLE_VIEW_REFRESH_TYPE_ITEM_MODIFY);
+       delete pThumbnailInfo;
+       delete static_cast<int*>(pParam);
+       AppLogDebug("EXIT");
+}
+
+void
+ArtistAlbumListEditorForm::OnUserEventReceivedN(RequestId requestId, Tizen::Base::Collection::IList* pArgs)
+{
+       AppLogDebug("ENTER");
+       AppLogDebug("OnUserEventReceivedN %d", requestId);
+       if (requestId == ID_DESTORY_PLAY_LIST_PICKER_POPUP)
+       {
+               if (__pPlayListPickerPopup != null)
+               {
+                       delete __pPlayListPickerPopup;
+                       __pPlayListPickerPopup = null;
+               }
+       }
+       AppLogDebug("EXIT");
+}
+
+void
+ArtistAlbumListEditorForm::UpdateItem(int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem)
+{
+       AppLogDebug("ENTER");
+       Label* pThumbnailLabel = static_cast<Label*>(pItem->GetControl(L"pSongThumbnailLabel"));
+       if (__pThumbnail == null || pThumbnailLabel == null)
+       {
+               AppLogDebug("__pThumbnail or pThumbnailLabel is null");
+               delete __pThumbnail;
+               __pThumbnail = null;
+               return;
+       }
+       pThumbnailLabel->SetBackgroundBitmap(*__pThumbnail);
+       delete __pThumbnail;
+       __pThumbnail = null;
+       pThumbnailLabel->Invalidate(true);
+       AppLogDebug("EXIT");
+}
\ No newline at end of file
old mode 100755 (executable)
new mode 100644 (file)
index 09013a2..436570e
@@ -1,4 +1,4 @@
-//
+//
 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
 //
 // Licensed under the Flora License, Version 1.0 (the License);
 // limitations under the License.
 //
 
+/**
+ * @file               MpArtistAlbumListForm.cpp
+ * @brief              This is the implementation file for ArtistAlbumListForm class.
+ */
+
 #include "MpArtistAlbumListForm.h"
 #include "MpArtistListPresentationModel.h"
-#include "MpPlaylistPickerPopup.h"
 #include "MpCommonUtil.h"
+#include "MpPlaylistPickerPopup.h"
+#include "MpThumbnailInfo.h"
 
 using namespace Tizen::Base;
 using namespace Tizen::Base::Collection;
@@ -31,51 +37,50 @@ using namespace Tizen::Ui::Scenes;
 #define ALL_SONG_INDEX_COUNT_MINUS(n) (n - 1)
 
 ArtistAlbumListForm::ArtistAlbumListForm(void)
-: __itemIndex(-1)
-, __deleteItem(false)
-, __pKeyword(null)
-, __pContentTableView(null)
-, __pContextItem(null)
-, __pPlayListPickerPopup(null)
-, __pNoContentImageLabel(null)
-, __pNoContentTextLabel(null)
+       : ThumbnailBase::ThumbnailBase()
+       , __itemIndex(-1)
+       , __deleteItem(false)
+       , __pKeyword(null)
+       , __pContentTableView(null)
+       , __pContextItem(null)
+       , __pPlayListPickerPopup(null)
+       , __pNoContentImageLabel(null)
+       , __pNoContentTextLabel(null)
+       , __pThumbnail(null)
 {
-       AppLogDebug("Start");
-       AppLogDebug("End");
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 
 ArtistAlbumListForm::~ArtistAlbumListForm(void)
 {
-       AppLogDebug("Start");
-       AppLogDebug("End");
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 
 bool
 ArtistAlbumListForm::Initialize(void)
 {
-       AppLogDebug("Start");
-
-       result r = Construct( FORM_STYLE_NORMAL | FORM_STYLE_INDICATOR | FORM_STYLE_HEADER | FORM_STYLE_FOOTER);
+       AppLogDebug("ENTER");
+       result r = Form::Construct(FORM_STYLE_NORMAL | FORM_STYLE_INDICATOR | FORM_STYLE_HEADER | FORM_STYLE_FOOTER);
        if (IsFailed(r))
        {
                //AppLogDebug("Unable to construct ContentForm");
                return false;
        }
 
-       AppLogDebug("End");
-
+       AppLogDebug("EXIT");
        return true;
 }
 
 result
 ArtistAlbumListForm::OnInitializing(void)
 {
-       AppLogDebug("Start");
-
+       AppLogDebug("ENTER");
        __pContentTableView = new (std::nothrow) TableView();
        __pContentTableView->Construct(Rectangle(0, 0, GetClientAreaBounds().width, GetClientAreaBounds().height),
-                                              true,
-                                              TABLE_VIEW_SCROLL_BAR_STYLE_FADE_OUT);
+                                                       true,
+                                                       TABLE_VIEW_SCROLL_BAR_STYLE_FADE_OUT);
        __pContentTableView->AddTableViewItemEventListener(*this);
        __pContentTableView->SetItemProvider(this);
 
@@ -84,15 +89,15 @@ ArtistAlbumListForm::OnInitializing(void)
        CommonUtil::CreateTableViewContextItem(*__pContextItem, *this);
 
        __pNoContentImageLabel = new (std::nothrow) Label();
-       __pNoContentImageLabel->Construct(Rectangle((GetWidth() - W_NO_CONTENT)/ 2, Y_GAP_NO_CONTENT, W_NO_CONTENT, H_NO_CONTENT),L"");
+       __pNoContentImageLabel->Construct(Rectangle((GetWidth() - W_NO_CONTENT) / 2, Y_GAP_NO_CONTENT, W_NO_CONTENT, H_NO_CONTENT), L"");
        __pNoContentImageLabel->SetBackgroundBitmap(*(ResourceManager::GetBitmapN(NO_CONTENT_BITMAP)));
 
        __pNoContentTextLabel = new (std::nothrow) Label();
        __pNoContentTextLabel->Construct(Rectangle(0,
-                                                  __pNoContentImageLabel->GetHeight() + __pNoContentImageLabel->GetY(),
-                                                  GetWidth(),
-                                                  H_TEXT_NO_CONTENT),
-                                                  ResourceManager::GetString(L"IDS_COM_BODY_NO_ITEMS"));
+                                                               __pNoContentImageLabel->GetHeight() + __pNoContentImageLabel->GetY(),
+                                                               GetWidth(),
+                                                               H_TEXT_NO_CONTENT),
+                                                               ResourceManager::GetString(L"IDS_COM_BODY_NO_ITEMS"));
        __pNoContentTextLabel->SetTextConfig(FONT_SIZE_NO_CONTENT, LABEL_TEXT_STYLE_BOLD);
 
        AddControl(*__pContentTableView);
@@ -104,56 +109,66 @@ ArtistAlbumListForm::OnInitializing(void)
 
        __pPresentationModel = ArtistListPresentationModel::GetInstance();
 
-       AppLogDebug("End");
-
-       return E_SUCCESS;
+       AppLogDebug("EXIT");
+       return ThumbnailBase::Construct();
 }
 
 result
 ArtistAlbumListForm::OnTerminating(void)
 {
-       AppLogDebug("Start");
+       AppLogDebug("ENTER");
 
        delete __pContextItem;
        __pContextItem = null;
 
 //     __pPresentationModel->DeleteArtistAlbum();
 
-       AppLogDebug("End");
-
+       AppLogDebug("EXIT");
        return E_SUCCESS;
 }
 
 void
 ArtistAlbumListForm::OnActionPerformed(const Tizen::Ui::Control& source, int actionId)
 {
-       AppLogDebug("Start");
-
+       AppLogDebug("ENTER");
        SceneManager* pSceneManager = SceneManager::GetInstance();
        AppAssert(pSceneManager);
 
-       switch(actionId)
+       switch (actionId)
        {
        case IDA_FOOTER_BUTTON_ADD_TO_PLAYLIST:
-       {
-               pSceneManager->GoForward(ForwardSceneTransition(IDSCN_ARTIST_ALBUM_LIST_EDITOR));
+               {
+                       pSceneManager->GoForward(ForwardSceneTransition(IDSCN_ARTIST_ALBUM_LIST_EDITOR));
+               }
                break;
-       }
+
+       case IDA_FLICK_BUTTON_ADD_TO_PALYLIST:
+               {
+                       __pPlayListPickerPopup = new (std::nothrow) PlayListPickerPopup();
+                       __pPlayListPickerPopup->Initialize(this, __pPresentationModel->GetContentPathListN(__itemIndex));
+                       //__pPlayListPickerPopup->SetCollectedContent(__pPresentationModel->GetContentPathListN(__itemIndex));
+                       __pPlayListPickerPopup->SetShowState(true);
+                       __pPlayListPickerPopup->Show();
+               }
+               break;
+
        /*case IDA_FOOTER_BUTTON_SEARCH:
-       {
-               pSceneManager->GoForward(ForwardSceneTransition(IDSCN_SEARCH));
+               {
+                       pSceneManager->GoForward(ForwardSceneTransition(IDSCN_SEARCH));
+               }
+               break;*/
+
+       default:
                break;
-       }*/
        }//end of switch
 
-       AppLogDebug("End");
+       AppLogDebug("EXIT");
 }
 
 void
 ArtistAlbumListForm::OnFormBackRequested(Tizen::Ui::Controls::Form& source)
 {
-       AppLogDebug("Start");
-
+       AppLogDebug("ENTER");
        SceneManager* pSceneManager = SceneManager::GetInstance();
        AppAssert(pSceneManager);
 
@@ -161,9 +176,9 @@ ArtistAlbumListForm::OnFormBackRequested(Tizen::Ui::Controls::Form& source)
 
        if (__deleteItem == true)
        {
-               pData = new ArrayList();
+               pData = new (std::nothrow) ArrayList();
                pData->Construct();
-               pData->Add(*(new Boolean(__deleteItem)));
+               pData->Add(*(new (std::nothrow) Boolean(__deleteItem)));
        }
 
        pSceneManager->GoBackward(BackwardSceneTransition(), pData);
@@ -175,14 +190,15 @@ ArtistAlbumListForm::OnFormBackRequested(Tizen::Ui::Controls::Form& source)
 //             AppLogDebug( "pTemp : %ls", pTemp->GetPointer());
 //     }
 
-       AppLogDebug("End");
+       AppLogDebug("EXIT");
 }
 
 void
 ArtistAlbumListForm::OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previousSceneId,
-                                                                  const Tizen::Ui::Scenes::SceneId& currentSceneId,
-                                                                  Tizen::Base::Collection::IList* pArgs)
+                                                                       const Tizen::Ui::Scenes::SceneId& currentSceneId,
+                                                                       Tizen::Base::Collection::IList* pArgs)
 {
+       AppLogDebug("ENTER");
        SetFormBackEventListener(this);
 
        Header* pHeader = GetHeader();
@@ -195,26 +211,28 @@ ArtistAlbumListForm::OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previou
        if (pArgs != null && (previousSceneId.Equals(IDSCN_ARTIST_LIST, true) || previousSceneId.Equals(IDSCN_SEARCH, true)))
        {
                String* pTemp = static_cast<String*>(pArgs->GetAt(0));
-               __pKeyword = new String(*pTemp);
-               __pPresentationModel->SearchArtistAlbum(*__pKeyword);
+               __pKeyword = new (std::nothrow) String(*pTemp);
+               __pPresentationModel->UpdateArtistList();
+               __pPresentationModel->InitializeArtistAlbumList(*__pKeyword);
        }
 
-       if(pArgs != null && previousSceneId.Equals(IDSCN_CONTENT_LIST, true))
+       if (previousSceneId.Equals(IDSCN_ARTIST_CONTENT_LIST, true))
        {
                __deleteItem = true;
-               __pPresentationModel->SearchArtistAlbum(*__pKeyword);
+               __pPresentationModel->UpdateArtistList();
+               __pPresentationModel->InitializeArtistAlbumList(*__pKeyword);
 
-               if (__pPresentationModel->GetTotalArtistAlbumCount() == 0)
+               if (__pPresentationModel->GetArtistAlbumListCount() == 0)
                {
-                       CommonUtil::ShowNoContentImage(__pPresentationModel->GetTotalArtistAlbumCount(), *__pContentTableView, *__pNoContentImageLabel, *__pNoContentTextLabel);
-                       CommonUtil::SetButtonEnabled(*this, __pPresentationModel->GetTotalArtistAlbumCount());
+                       CommonUtil::ShowNoContentImage(__pPresentationModel->GetArtistAlbumListCount(), *__pContentTableView, *__pNoContentImageLabel, *__pNoContentTextLabel);
+                       CommonUtil::SetButtonEnabled(*this, __pPresentationModel->GetArtistAlbumListCount());
                        pHeader->SetTitleText(ResourceManager::GetString(L"IDS_COM_BODY_NO_ITEMS"));
-
+                       pFooter->SetItemEnabled(INDEX_ADDTOPLAYLIST_FOOTER_ADDTOPLAYLIST, false);
                }
                __pContentTableView->UpdateTableView();
        }
 
-       ContentInformationStruct* pContentInfoStruct = __pPresentationModel->GetArtistAlbumContentInfoN(0);
+       ContentInformation* pContentInfoStruct = __pPresentationModel->GetArtistAlbumInfoN(0);
        if (pContentInfoStruct == null)
        {
                return;
@@ -222,29 +240,17 @@ ArtistAlbumListForm::OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previou
 
        pHeader->SetTitleText(pContentInfoStruct->ArtistName);
 
-       //test_code_start
-       delete pContentInfoStruct->pThumbnail;
-       pContentInfoStruct->pThumbnail = null;
-
        delete pContentInfoStruct;
        pContentInfoStruct = null;
-       //test_code_end
 
-//     if (pArgs != null)
-//     {
-//             pArgs->RemoveAll(true);
-//             delete pArgs;
-//     }
-
-       AppLogDebug("End");
+       AppLogDebug("EXIT");
 }
 
 void
 ArtistAlbumListForm::OnSceneDeactivated(const Tizen::Ui::Scenes::SceneId& currentSceneId,
-                                        const Tizen::Ui::Scenes::SceneId& nextSceneId)
+                                               const Tizen::Ui::Scenes::SceneId& nextSceneId)
 {
-       AppLogDebug("Start");
-
+       AppLogDebug("ENTER");
        Header* pHeader = GetHeader();
        pHeader->RemoveAllButtons();
        pHeader->RemoveAllItems();
@@ -254,40 +260,40 @@ ArtistAlbumListForm::OnSceneDeactivated(const Tizen::Ui::Scenes::SceneId& curren
        pFooter->RemoveAllItems();
        pFooter->RemoveActionEventListener(*this);
 
-       AppLogDebug("End");
+       CancelAllThumbnailRequest();
+
+       AppLogDebug("EXIT");
 }
 
 int
 ArtistAlbumListForm::GetItemCount(void)
 {
-       AppLogDebug("Start");
+       AppLogDebug("ENTER");
 
        if (__pPresentationModel == null)
        {
-               return 0;
+               return INIT_VALUE;
        }
 
-       AppLogDebug("End");
-
-       return ALL_SONG_INDEX_COUNT_PLUS(__pPresentationModel->GetTotalArtistAlbumCount());
+       AppLogDebug("EXIT");
+       return ALL_SONG_INDEX_COUNT_PLUS(__pPresentationModel->GetArtistAlbumListCount());
 }
 
 Tizen::Ui::Controls::TableViewItem*
 ArtistAlbumListForm::CreateItem(const int itemIndex, int itemWidth)
 {
-       AppLogDebug("Start");
-
-       TableViewItem* pItem = new (std::nothrow) TableViewItem;
+       AppLogDebug("ENTER");
+       TableViewItem* pItem = new (std::nothrow) TableViewItem();
        pItem->Construct(Dimension(itemWidth, ITEM_HEIGHT), TABLE_VIEW_ANNEX_STYLE_NORMAL);
        pItem->SetBackgroundColor(COLOR_ITEM);
 
        if (itemIndex == INIT_VALUE)
        {
-               AllSongCreateTableViewItem(*pItem, __pPresentationModel->GetTotalAllSongCount());
+               AllSongCreateTableViewItem(*pItem, __pPresentationModel->GetArtistContentListCount());
        }
        else
        {
-               ContentInformationStruct* pContentInfoStruct = __pPresentationModel->GetArtistAlbumContentInfoN(ALL_SONG_INDEX_COUNT_MINUS(itemIndex));
+               ContentInformation* pContentInfoStruct = __pPresentationModel->GetArtistAlbumInfoN(ALL_SONG_INDEX_COUNT_MINUS(itemIndex));
                if (pContentInfoStruct == null)
                {
                        delete pItem;
@@ -296,57 +302,43 @@ ArtistAlbumListForm::CreateItem(const int itemIndex, int itemWidth)
                        return null;
                }
 
-               int itemTotalCount = __pPresentationModel->GetTotalAlbumContentCount(ALL_SONG_INDEX_COUNT_MINUS(itemIndex));
-               String itemName = pContentInfoStruct->ArtistName;
+               int itemTotalCount = __pPresentationModel->GetArtistAlbumContentCount(ALL_SONG_INDEX_COUNT_MINUS(itemIndex));
+               RequestThumbnail(pContentInfoStruct->contentId, (new (std::nothrow) int(itemIndex)));
 
-               CommonUtil::CreateTableViewItem(*pItem, *(pContentInfoStruct->pThumbnail), itemName, itemTotalCount);
+               CommonUtil::CreateTableViewItem(*pItem, *GetDefaultThumbnail(), pContentInfoStruct->ArtistName, itemTotalCount);
                pItem->SetContextItem(__pContextItem);
 
-               //test_code_start
-               delete pContentInfoStruct->pThumbnail;
-               pContentInfoStruct->pThumbnail = null;
-
                delete pContentInfoStruct;
                pContentInfoStruct = null;
-               //test_code_end
        }
 
-       AppLogDebug("End");
-
+       AppLogDebug("EXIT");
        return pItem;
 }
 
-void
-ArtistAlbumListForm::UpdateItem(int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem)
-{
-       AppLogDebug("Start");
-       AppLogDebug("End");
-}
-
 int
 ArtistAlbumListForm::GetDefaultItemHeight(void)
 {
-       AppLogDebug("Start");
-       AppLogDebug("End");
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
        return ITEM_HEIGHT;
 }
 
 bool
 ArtistAlbumListForm::DeleteItem(const int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem)
 {
-       AppLogDebug("Start");
-       AppLogDebug("End");
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
        return true;
 }
 
 void
 ArtistAlbumListForm::OnTableViewItemStateChanged(Tizen::Ui::Controls::TableView& tableView,
-                                                 int itemIndex,
-                                                 Tizen::Ui::Controls::TableViewItem* pItem,
-                                                 Tizen::Ui::Controls::TableViewItemStatus status)
+                                                       int itemIndex,
+                                                       Tizen::Ui::Controls::TableViewItem* pItem,
+                                                       Tizen::Ui::Controls::TableViewItemStatus status)
 {
-       AppLogDebug("Start");
-
+       AppLogDebug("ENTER");
        SceneManager* pSceneManager = SceneManager::GetInstance();
        AppAssert(pSceneManager);
 
@@ -361,41 +353,41 @@ ArtistAlbumListForm::OnTableViewItemStateChanged(Tizen::Ui::Controls::TableView&
        }
        else
        {
-               pSceneManager->GoForward(ForwardSceneTransition(IDSCN_CONTENT_LIST), GetContentListN(itemIndex));
+               pSceneManager->GoForward(ForwardSceneTransition(IDSCN_ARTIST_CONTENT_LIST), GetContentListN(itemIndex));
        }
 
-       AppLogDebug("End");
+       AppLogDebug("EXIT");
 }
+
 void
 ArtistAlbumListForm::OnTableViewContextItemActivationStateChanged(Tizen::Ui::Controls::TableView& tableView,
-                                                                  int itemIndex,
-                                                                  Tizen::Ui::Controls::TableViewContextItem* pContextItem,
-                                                                  bool activated)
+                                                                               int itemIndex,
+                                                                               Tizen::Ui::Controls::TableViewContextItem* pContextItem,
+                                                                               bool activated)
 {
-       AppLogDebug("Start");
+       AppLogDebug("ENTER");
 
        if (activated == true)
        {
                __itemIndex = itemIndex;
        }
 
-       AppLogDebug("End");
+       AppLogDebug("EXIT");
 }
 
 void
 ArtistAlbumListForm::OnTableViewItemReordered(Tizen::Ui::Controls::TableView& tableView,
-                                              int itemIndexFrom,
-                                              int itemIndexTo)
+                                                       int itemIndexFrom,
+                                                       int itemIndexTo)
 {
-       AppLogDebug("Start");
-       AppLogDebug("End");
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 
 result
 ArtistAlbumListForm::AllSongCreateTableViewItem(Tizen::Ui::Container& parent, int totalCount)
 {
-       AppLogDebug("Start");
-
+       AppLogDebug("ENTER");
        result r = E_SUCCESS;
 
        Label* pAllSongLabel = new (std::nothrow) Label();
@@ -411,17 +403,15 @@ ArtistAlbumListForm::AllSongCreateTableViewItem(Tizen::Ui::Container& parent, in
        parent.AddControl(*pAllSongCountLabel);
        parent.AddControl(*pAllSongLabel);
 
-       AppLogDebug("End");
-
+       AppLogDebug("EXIT");
        return r;
 }
 
 Tizen::Base::Collection::ArrayList*
 ArtistAlbumListForm::GetContentListN(int itemIndex)
 {
-       AppLogDebug("Start");
-
-       ContentInformationStruct* pContentInfoStruct = __pPresentationModel->GetArtistAlbumContentInfoN(ALL_SONG_INDEX_COUNT_MINUS(itemIndex));
+       AppLogDebug("ENTER");
+       ContentInformation* pContentInfoStruct = __pPresentationModel->GetArtistAlbumInfoN(ALL_SONG_INDEX_COUNT_MINUS(itemIndex));
        if (pContentInfoStruct == null)
        {
                return null;
@@ -433,18 +423,66 @@ ArtistAlbumListForm::GetContentListN(int itemIndex)
 
        ArrayList* pData = new (std::nothrow) ArrayList();
        pData->Construct();
-       pData->Add(*(new String(IDSCN_ARTIST_ALBUM_LIST)));
-       pData->Add(*(new String(albumName)));
-
-       //test_code_start
-       delete pContentInfoStruct->pThumbnail;
-       pContentInfoStruct->pThumbnail = null;
+       pData->Add(*(new (std::nothrow) String(IDSCN_ARTIST_ALBUM_LIST)));
+       pData->Add(*(new (std::nothrow) String(albumName)));
+       pData->Add(*(new (std::nothrow) Integer(ALL_SONG_INDEX_COUNT_MINUS(itemIndex))));
 
        delete pContentInfoStruct;
        pContentInfoStruct = null;
-       //test_code_end
-
-       AppLogDebug("End");
 
+       AppLogDebug("EXIT");
        return pData;
 }
+
+void
+ArtistAlbumListForm::OnThumbnailInfoReveivedN(ThumbnailInfo* pThumbnailInfo)
+{
+       AppLogDebug("ENTER");
+       int itemIndex = 0;
+       void* pParam = null;
+       __pThumbnail = pThumbnailInfo->GetBitmapN();
+       pParam = pThumbnailInfo->GetUserParamN();
+       if (pParam)
+       {
+               itemIndex = *(static_cast<int*>(pParam));
+       }
+       __pContentTableView->RefreshItem(itemIndex, TABLE_VIEW_REFRESH_TYPE_ITEM_MODIFY);
+       delete pThumbnailInfo;
+       delete static_cast<int*>(pParam);
+       AppLogDebug("EXIT");
+}
+
+void
+ArtistAlbumListForm::OnUserEventReceivedN(RequestId requestId, Tizen::Base::Collection::IList* pArgs)
+{
+       AppLogDebug("ENTER");
+       AppLogDebug("OnUserEventReceivedN %d", requestId);
+       if (requestId == ID_DESTORY_PLAY_LIST_PICKER_POPUP)
+       {
+               if (__pPlayListPickerPopup != null)
+               {
+                       delete __pPlayListPickerPopup;
+                       __pPlayListPickerPopup = null;
+               }
+       }
+       AppLogDebug("EXIT");
+}
+
+void
+ArtistAlbumListForm::UpdateItem(int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem)
+{
+       AppLogDebug("ENTER");
+       Label* pThumbnailLabel = static_cast<Label*>(pItem->GetControl(L"pSongThumbnailLabel"));
+       if (__pThumbnail == null || pThumbnailLabel == null)
+       {
+               AppLogDebug("__pThumbnail or pThumbnailLabel is null");
+               delete __pThumbnail;
+               __pThumbnail = null;
+               return;
+       }
+       pThumbnailLabel->SetBackgroundBitmap(*__pThumbnail);
+       delete __pThumbnail;
+       __pThumbnail = null;
+       pThumbnailLabel->Invalidate(true);
+       AppLogDebug("EXIT");
+}
\ No newline at end of file
old mode 100755 (executable)
new mode 100644 (file)
index 17dea0b..c76b73c
@@ -1,4 +1,4 @@
-//
+//
 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
 //
 // Licensed under the Flora License, Version 1.0 (the License);
 // limitations under the License.
 //
 
+/**
+ * @file               MpArtistAllSongListForm.cpp
+ * @brief              This is the implementation file for ArtistAllSongListForm class.
+ */
+
 #include "MpArtistAllSongListForm.h"
 #include "MpArtistListPresentationModel.h"
 #include "MpNowPlayContentPanel.h"
 #include "MpPlaylistPickerPopup.h"
+#include "MpThumbnailInfo.h"
 
 using namespace Tizen::Base;
 using namespace Tizen::Base::Collection;
@@ -27,45 +33,45 @@ using namespace Tizen::Social;
 using namespace Tizen::Ui::Controls;
 using namespace Tizen::Ui::Scenes;
 
-static const int W_SONG_TIME     = 120;
-static const int Y_GAP_LABEL     =  10;
+static const int W_SONG_TIME = 120;
+static const int Y_GAP_LABEL = 10;
 
 ArtistAllSongListForm::ArtistAllSongListForm(void)
-: __pContentTableView(null)
-, __pPlayListPickerPopup(null)
+       : ThumbnailBase::ThumbnailBase()
+       , __pContentTableView(null)
+       , __pThumbnail(null)
+       , __pPlayListPickerPopup(null)
 {
-       AppLogDebug("Start");
-       AppLogDebug("End");
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 
 ArtistAllSongListForm::~ArtistAllSongListForm(void)
 {
-       AppLogDebug("Start");
-       AppLogDebug("End");
-
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 
 bool
 ArtistAllSongListForm::Initialize(void)
 {
-       AppLogDebug("Start");
+       AppLogDebug("ENTER");
 
-       result r = Construct( FORM_STYLE_NORMAL | FORM_STYLE_INDICATOR | FORM_STYLE_HEADER | FORM_STYLE_FOOTER);
+       result r = Form::Construct(FORM_STYLE_NORMAL | FORM_STYLE_INDICATOR | FORM_STYLE_HEADER | FORM_STYLE_FOOTER);
        if (IsFailed(r))
        {
                //AppLogDebug("Unable to construct ContentForm");
                return false;
        }
 
-       AppLogDebug("End");
-
+       AppLogDebug("EXIT");
        return true;
 }
 
 result
 ArtistAllSongListForm::OnInitializing(void)
 {
-       AppLogDebug("Start");
+       AppLogDebug("ENTER");
 
 //     Header* pHeader = GetHeader();
 //     pHeader->SetStyle(HEADER_STYLE_TITLE);
@@ -73,89 +79,89 @@ ArtistAllSongListForm::OnInitializing(void)
 
        __pContentTableView = new (std::nothrow) TableView();
        __pContentTableView->Construct(Rectangle(0, 0, GetClientAreaBounds().width, GetClientAreaBounds().height),
-                                   true,
-                                   TABLE_VIEW_SCROLL_BAR_STYLE_FADE_OUT);
+                                       true,
+                                       TABLE_VIEW_SCROLL_BAR_STYLE_FADE_OUT);
        __pContentTableView->AddTableViewItemEventListener(*this);
        __pContentTableView->SetItemProvider(this);
        AddControl(*__pContentTableView);
 
        __pPresentationModel = ArtistListPresentationModel::GetInstance();
 
-       AppLogDebug("End");
-
-       return E_SUCCESS;
+       AppLogDebug("EXIT");
+       return ThumbnailBase::Construct();
 }
 
 result
 ArtistAllSongListForm::OnTerminating(void)
 {
-       AppLogDebug("Start");
+       AppLogDebug("ENTER");
        delete __pPlayListPickerPopup;
        __pPlayListPickerPopup = null;
-       AppLogDebug("End");
-
+       AppLogDebug("EXIT");
        return E_SUCCESS;
 }
 
 void
 ArtistAllSongListForm::OnActionPerformed(const Tizen::Ui::Control& source, int actionId)
 {
-       AppLogDebug("Start");
+       AppLogDebug("ENTER");
 
-       //AppLogDebug("OnActionPerformed");
        SceneManager* pSceneManager = SceneManager::GetInstance();
        AppAssert(pSceneManager);
 
-       switch(actionId)
+       switch (actionId)
        {
        case IDA_FOOTER_BUTTON_ADD_TO_PLAYLIST:
-       {
-               Tizen::Base::Collection::IList* pDataList = null;
-               pDataList = __pPresentationModel->GetAllSongContentList();
-
-               if (pDataList == null)
-               {
-                       break;
-               }
-               if (__pPlayListPickerPopup == null)
                {
+                       Tizen::Base::Collection::IList* pDataList = null;
+                       pDataList = __pPresentationModel->GetAllContentPathListN();
+
+                       if (pDataList == null)
+                       {
+                               break;
+                       }
+
                        __pPlayListPickerPopup = new (std::nothrow) PlayListPickerPopup();
-                       __pPlayListPickerPopup->Initialize();
+                       __pPlayListPickerPopup->Initialize(this, pDataList);
+
+                       __pPlayListPickerPopup->SetShowState(true);
+                       __pPlayListPickerPopup->Show();
+                       //__pPlayListPickerPopup->SetCollectedContent(pDataList);
                }
-               __pPlayListPickerPopup->SetShowState(true);
-               __pPlayListPickerPopup->Show();
-               __pPlayListPickerPopup->SetCollectedContent(pDataList);
                break;
-       }
+
        /*case IDA_FOOTER_BUTTON_SEARCH:
-       {
-               pSceneManager->GoForward(ForwardSceneTransition(IDSCN_SEARCH));
+               {
+                       pSceneManager->GoForward(ForwardSceneTransition(IDSCN_SEARCH));
+               }
+               break;*/
+
+       default:
                break;
-       }*/
        }//end of switch
 
-       AppLogDebug("End");
+       AppLogDebug("EXIT");
 }
 
 void
 ArtistAllSongListForm::OnFormBackRequested(Tizen::Ui::Controls::Form& source)
 {
-       AppLogDebug("Start");
+       AppLogDebug("ENTER");
 
        SceneManager* pSceneManager = SceneManager::GetInstance();
        AppAssert(pSceneManager);
 
        pSceneManager->GoBackward(BackwardSceneTransition());
 
-       AppLogDebug("End");
+       AppLogDebug("EXIT");
 }
 
 void
 ArtistAllSongListForm::OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previousSceneId,
-                                         const Tizen::Ui::Scenes::SceneId& currentSceneId,
-                                         Tizen::Base::Collection::IList* pArgs)
+                                               const Tizen::Ui::Scenes::SceneId& currentSceneId,
+                                               Tizen::Base::Collection::IList* pArgs)
 {
-       AppLogDebug("Start");
+       AppLogDebug("ENTER");
 
        Footer* pFooter = CommonUtil::CreateAddtoPlaylistFooter(*this);
        pFooter->AddActionEventListener(*this);
@@ -167,14 +173,14 @@ ArtistAllSongListForm::OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previ
        pHeader->SetStyle(HEADER_STYLE_TITLE);
        pHeader->SetTitleText(ResourceManager::GetString("IDS_MUSIC_BODY_ALL_SONGS"));
 
-       AppLogDebug("End");
+       AppLogDebug("EXIT");
 }
 
 void
 ArtistAllSongListForm::OnSceneDeactivated(const Tizen::Ui::Scenes::SceneId& currentSceneId,
-                                          const Tizen::Ui::Scenes::SceneId& nextSceneId)
+                                               const Tizen::Ui::Scenes::SceneId& nextSceneId)
 {
-       AppLogDebug("Start");
+       AppLogDebug("ENTER");
 
        Header* pHeader = GetHeader();
        pHeader->RemoveAllButtons();
@@ -185,128 +191,111 @@ ArtistAllSongListForm::OnSceneDeactivated(const Tizen::Ui::Scenes::SceneId& curr
        pFooter->RemoveAllItems();
        pFooter->RemoveActionEventListener(*this);
 
-       AppLogDebug("End");
+       CancelAllThumbnailRequest();
+       AppLogDebug("EXIT");
 }
 
 int
 ArtistAllSongListForm::GetItemCount(void)
 {
-       AppLogDebug("Start");
+       AppLogDebug("ENTER");
 
        if (__pPresentationModel == null)
        {
-               return 0;
+               return INIT_VALUE;
        }
 
-       AppLogDebug("End");
-
-       return __pPresentationModel->GetTotalAllSongCount();
+       AppLogDebug("EXIT");
+       return __pPresentationModel->GetArtistContentListCount();
 }
 
 Tizen::Ui::Controls::TableViewItem*
 ArtistAllSongListForm::CreateItem(const int itemIndex, int itemWidth)
 {
-       AppLogDebug("Start");
+       AppLogDebug("ENTER");
 
-       ContentInformationStruct* pContentInfoStruct = __pPresentationModel->GetAllSongContentInfoN(itemIndex);
+       ContentInformation* pContentInfoStruct = __pPresentationModel->GetArtistContentInfoN(itemIndex);
        if (pContentInfoStruct == null)
        {
                return null;
        }
 
-       TableViewItem* pItem = new (std::nothrow) TableViewItem;
+       TableViewItem* pItem = new (std::nothrow) TableViewItem();
        pItem->Construct(Dimension(itemWidth, ITEM_HEIGHT), TABLE_VIEW_ANNEX_STYLE_NORMAL);
        pItem->SetBackgroundColor(COLOR_ITEM);
 
+       RequestThumbnail(pContentInfoStruct->contentId, (new (std::nothrow) int(itemIndex)));
        CreateTableViewItem(*pItem, *pContentInfoStruct);
 
-       //test_code_start
-       delete pContentInfoStruct->pThumbnail;
-       pContentInfoStruct->pThumbnail = null;
-
        delete pContentInfoStruct;
        pContentInfoStruct = null;
-       //test_code_end
-
-       AppLogDebug("End");
 
+       AppLogDebug("EXIT");
        return pItem;
 }
 
 bool
 ArtistAllSongListForm::DeleteItem(const int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem)
 {
-       AppLogDebug("Start");
-       AppLogDebug("End");
-
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
        return true;
 }
 
-void
-ArtistAllSongListForm::UpdateItem(int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem)
-{
-       AppLogDebug("Start");
-       AppLogDebug("End");
-
-}
-
 int
 ArtistAllSongListForm::GetDefaultItemHeight(void)
 {
-       AppLogDebug("Start");
-       AppLogDebug("End");
-
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
        return ITEM_HEIGHT;
 }
 
 void
 ArtistAllSongListForm::OnTableViewItemStateChanged(Tizen::Ui::Controls::TableView& tableView,
-                                                   int itemIndex,
-                                                   Tizen::Ui::Controls::TableViewItem* pItem,
-                                                   Tizen::Ui::Controls::TableViewItemStatus status)
+                                                               int itemIndex,
+                                                               Tizen::Ui::Controls::TableViewItem* pItem,
+                                                               Tizen::Ui::Controls::TableViewItemStatus status)
 {
-       AppLogDebug("Start");
+       AppLogDebug("ENTER");
 
        SceneManager* pSceneManager = SceneManager::GetInstance();
        AppAssert(pSceneManager);
 
-       ArrayList* pTempList = new (std::nothrow)ArrayList();
+       ArrayList* pTempList = new (std::nothrow) ArrayList();
        pTempList->Construct();
 
-       pTempList->Add(*(new String(MUSIC)));
-       pTempList->Add(*(new Integer(itemIndex)));
-       pTempList->Add(*(__pPresentationModel->GetAllSongContentList()));
+       pTempList->Add(*(new (std::nothrow) String(MUSIC)));
+       pTempList->Add(*(new (std::nothrow) Integer(itemIndex)));
+       pTempList->Add(*(__pPresentationModel->GetAllContentPathListN()));
 
        pSceneManager->GoForward(ForwardSceneTransition(IDSCN_PLAYER),pTempList);
-       AppLogDebug("End");
+       AppLogDebug("EXIT");
 }
 
 void
 ArtistAllSongListForm::OnTableViewContextItemActivationStateChanged(Tizen::Ui::Controls::TableView& tableView,
-                                                                    int itemIndex,
-                                                                    Tizen::Ui::Controls::TableViewContextItem* pContextItem,
-                                                                    bool activated)
+                                                                               int itemIndex,
+                                                                               Tizen::Ui::Controls::TableViewContextItem* pContextItem,
+                                                                               bool activated)
 {
-       AppLogDebug("Start");
-       AppLogDebug("End");
-
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 
 void
 ArtistAllSongListForm::OnTableViewItemReordered(Tizen::Ui::Controls::TableView& tableView,
-                                                int itemIndexFrom,
-                                                int itemIndexTo)
+                                                       int itemIndexFrom,
+                                                       int itemIndexTo)
 {
-       AppLogDebug("Start");
-       AppLogDebug("End");
-
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 
 result
 ArtistAllSongListForm::CreateTableViewItem(Tizen::Ui::Container& parent,
-                                                                          const ContentInformationStruct& contentInfoStruct)
+                                                                          const ContentInformation& contentInfoStruct)
 {
-       AppLogDebug("Start");
+       AppLogDebug("ENTER");
 
        result r = E_SUCCESS;
 
@@ -314,10 +303,11 @@ ArtistAllSongListForm::CreateTableViewItem(Tizen::Ui::Container& parent,
        pSongThumbnailBGLabel->Construct(Rectangle(X_GAP_THUMBNAIL - 1, Y_GAP_THUMBNAIL - 1, W_THUMBNAIL + 1, W_THUMBNAIL + 1), L"");
 
        Label* pSongThumbnailLabel = new (std::nothrow) Label();
-       pSongThumbnailLabel->Construct(Rectangle(X_GAP_THUMBNAIL, Y_GAP_THUMBNAIL, W_THUMBNAIL ,H_THUMBNAIL), L"");
-       pSongThumbnailLabel->SetBackgroundBitmap(*contentInfoStruct.pThumbnail);
+       pSongThumbnailLabel->Construct(Rectangle(X_GAP_THUMBNAIL, Y_GAP_THUMBNAIL, W_THUMBNAIL, H_THUMBNAIL), L"");
+       pSongThumbnailLabel->SetBackgroundBitmap(*GetDefaultThumbnail());
+       pSongThumbnailLabel->SetName(L"pSongThumbnailLabel");
 
-       int X_Gap   = W_THUMBNAIL + (X_GAP_THUMBNAIL * 2);
+       int X_Gap = W_THUMBNAIL + (X_GAP_THUMBNAIL * 2);
        int W_Label = W_CLIENT_AREA - X_Gap;
 
        Label* pSongTitleLabel = new (std::nothrow) Label();
@@ -347,7 +337,59 @@ ArtistAllSongListForm::CreateTableViewItem(Tizen::Ui::Container& parent,
        parent.AddControl(*pSongTimeLabel);
        parent.AddControl(*pSongArtistLabel);
 
-       AppLogDebug("End");
-
+       AppLogDebug("EXIT");
        return r;
 }
+
+void
+ArtistAllSongListForm::OnThumbnailInfoReveivedN(ThumbnailInfo* pThumbnailInfo)
+{
+       AppLogDebug("ENTER");
+       int itemIndex = 0;
+       void* pParam = null;
+       __pThumbnail = pThumbnailInfo->GetBitmapN();
+       pParam = pThumbnailInfo->GetUserParamN();
+       if (pParam)
+       {
+               itemIndex = *(static_cast<int*>(pParam));
+       }
+       __pContentTableView->RefreshItem(itemIndex, TABLE_VIEW_REFRESH_TYPE_ITEM_MODIFY);
+       delete pThumbnailInfo;
+       delete static_cast<int*>(pParam);
+       AppLogDebug("EXIT");
+}
+
+void
+ArtistAllSongListForm::OnUserEventReceivedN(RequestId requestId, Tizen::Base::Collection::IList* pArgs)
+{
+       AppLogDebug("ENTER");
+       AppLogDebug("OnUserEventReceivedN %d", requestId);
+       if (requestId == ID_DESTORY_PLAY_LIST_PICKER_POPUP)
+       {
+               if (__pPlayListPickerPopup != null)
+               {
+                       delete __pPlayListPickerPopup;
+                       __pPlayListPickerPopup = null;
+               }
+       }
+       AppLogDebug("EXIT");
+}
+
+void
+ArtistAllSongListForm::UpdateItem(int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem)
+{
+       AppLogDebug("ENTER");
+       Label* pThumbnailLabel = static_cast<Label*>(pItem->GetControl(L"pSongThumbnailLabel"));
+       if (__pThumbnail == null || pThumbnailLabel == null)
+       {
+               AppLogDebug("__pThumbnail or pThumbnailLabel is null");
+               delete __pThumbnail;
+               __pThumbnail = null;
+               return;
+       }
+       pThumbnailLabel->SetBackgroundBitmap(*__pThumbnail);
+       delete __pThumbnail;
+       __pThumbnail = null;
+       pThumbnailLabel->Invalidate(true);
+       AppLogDebug("EXIT");
+}
\ No newline at end of file
diff --git a/src/MpArtistContentListForm.cpp b/src/MpArtistContentListForm.cpp
new file mode 100644 (file)
index 0000000..7547e66
--- /dev/null
@@ -0,0 +1,664 @@
+//
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.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://floralicense.org/license/
+//
+// 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.
+//
+
+/**
+ * @file               MpArtistContentListForm.cpp
+ * @brief              This is the implementation file for ArtistContentListForm class.
+ */
+
+#include <FSocial.h>
+#include "MpArtistContentListForm.h"
+#include "MpArtistListPresentationModel.h"
+#include "MpPlaylistPickerPopup.h"
+#include "MpSharePopup.h"
+
+using namespace Tizen::App;
+using namespace Tizen::Base;
+using namespace Tizen::Base::Collection;
+using namespace Tizen::Content;
+using namespace Tizen::Ui;
+using namespace Tizen::Ui::Controls;
+using namespace Tizen::Ui::Scenes;
+using namespace Tizen::Graphics;
+using namespace Tizen::Io;
+using namespace Tizen::System;
+using namespace Tizen::Social;
+
+static const Tizen::Graphics::Rectangle RECT_CONTENT_NAME (16, 16, 500, 88);
+static const Tizen::Graphics::Rectangle RECT_CONTENT_PLAY_TIME (516, 16, 188, 88);
+
+static const int X_OFFSET_EDIT_STYLE_TABLE_VIEW = 96;
+static const int COUNT_MESSAGE_BOX_TIMEOUT = 3000;
+
+ArtistContentListForm::ArtistContentListForm(void)
+       : ContentListForm::ContentListForm()
+       , __pPresentationModel(null)
+{
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
+}
+
+ArtistContentListForm::~ArtistContentListForm(void)
+{
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
+}
+
+result
+ArtistContentListForm::OnInitializing(void)
+{
+       AppLogDebug("ENTER");
+       CreateTableview();
+       CreateSelectAllCheckedButton();
+       CreateCheckedCountLabel();
+       CreateNoContentImage(L"IDS_MUSIC_HEADER_NO_SONGS");
+       AppLogDebug("EXIT");
+       return E_SUCCESS;
+}
+
+result
+ArtistContentListForm::OnTerminating(void)
+{
+       AppLogDebug("ENTER");
+       __checkedItemCount = 0;
+       DestroyPlayListPickerPopup();
+       AppLogDebug("EXIT");
+       return E_SUCCESS;
+}
+
+void
+ArtistContentListForm::OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previousSceneId,
+                                       const Tizen::Ui::Scenes::SceneId& currentSceneId,
+                                       Tizen::Base::Collection::IList* pArgs)
+{
+       AppLogDebug("ENTER");
+       if (pArgs != null)
+       {
+               __pStrSceneId = static_cast<String*>(pArgs->GetAt(DATA_ITEM_SCENE_NAME));
+               __pStrContentName = static_cast<String*>(pArgs->GetAt(DATA_ITEM_CONTENT_NAME));
+               __currentContentIndex = static_cast<Integer*>(pArgs->GetAt(DATA_ITEM_CONTENT_TYPE))->ToInt();
+               __pPresentationModel = ArtistListPresentationModel::GetInstance();
+               __pPresentationModel->UpdateArtistList();
+               __pPresentationModel->InitializeContentList(__currentContentIndex);
+       }
+       else
+       {
+               // Empty statement
+       }
+
+       ContentInformation* pContentInfoStruct = null;
+       pContentInfoStruct = __pPresentationModel->GetArtistAlbumContentInfoN(0);
+       if (pContentInfoStruct == null)
+       {
+               return;
+       }
+
+       InitializeHeader(*pContentInfoStruct);
+
+       if (__checkEdit == true)
+       {
+               Footer* pFooter = CommonUtil::CreateDeleteFooter(*this);
+               pFooter->AddActionEventListener(*this);
+       }
+       else
+       {
+               Footer* pFooter = CommonUtil::CreateEditFooter(*this);
+               pFooter->AddActionEventListener(*this);
+               pFooter->SetBackButton();
+               SetFormBackEventListener(this);
+       }
+
+       __pContentTableView->UpdateTableView();
+
+       delete pContentInfoStruct;
+       pContentInfoStruct = null;
+       AppLogDebug("EXIT");
+}
+
+void
+ArtistContentListForm::OnSceneDeactivated(const Tizen::Ui::Scenes::SceneId& currentSceneId,
+                                                                       const Tizen::Ui::Scenes::SceneId& nextSceneId)
+{
+       AppLogDebug("ENTER");
+       Footer* pFooter = GetFooter();
+       pFooter->RemoveAllButtons();
+       pFooter->RemoveAllItems();
+       pFooter->RemoveActionEventListener(*this);
+       AppLogDebug("EXIT");
+}
+
+void
+ArtistContentListForm::OnActionPerformed(const Tizen::Ui::Control& source, int actionId)
+{
+       AppLogDebug("ENTER");
+       SceneManager* pSceneManager = SceneManager::GetInstance();
+
+       AppAssert(pSceneManager);
+
+       switch (actionId)
+       {
+       case IDA_FOOTER_BUTTON_EDIT:
+               {
+                       ToggleViewMode(true);
+               }
+               break;
+
+       case IDA_FOOTER_BUTTON_CANCEL:
+               {
+                       __checkedItemCount = INIT_VALUE;
+                       __pSelectAllCheckedButton->SetSelected(false);
+                       CommonUtil::SetAllCheckState(false, *__pContentTableView, __pPresentationModel->GetArtistAlbumContentCount(__pPresentationModel->GetCurrentArtistAlbumIndex()));
+                       CommonUtil::ShowCheckedCountLabel(*__pCheckedCountLabel, __checkedItemCount, *__pContentTableView, *this);
+                       ToggleViewMode(false);
+               }
+               break;
+
+       case IDA_FOOTER_BUTTON_SEARCH:
+               {
+                       pSceneManager->GoForward(ForwardSceneTransition(IDSCN_SEARCH));
+               }
+               break;
+
+       case IDA_CHECK_BUTTON:
+               {
+                       __checkedItemCount = __pPresentationModel->GetArtistAlbumContentCount(__pPresentationModel->GetCurrentArtistAlbumIndex());
+                       if (__checkedItemCount > INIT_VALUE)
+                       {
+                               Footer* pFooter = GetFooter();
+
+                               pFooter->SetItemEnabled(INDEX_FOOTER_DELETE, true);
+                               pFooter->SetItemEnabled(INDEX_FOOTER_SHARE, true);
+                               pFooter->SetItemEnabled(INDEX_FOOTER_ADDTOPLATLIST, true);
+
+                               pFooter->Invalidate(true);
+                       }
+                       CommonUtil::SetAllCheckState(true, *__pContentTableView, __pPresentationModel->GetArtistAlbumContentCount(__pPresentationModel->GetCurrentArtistAlbumIndex()));
+                       CommonUtil::ShowCheckedCountLabel(*__pCheckedCountLabel, __checkedItemCount, *__pContentTableView, *this);
+               }
+               break;
+
+       case IDA_UNCHECK_BUTTON:
+               {
+                       Footer* pFooter = GetFooter();
+
+                       pFooter->SetItemEnabled(INDEX_FOOTER_DELETE, false);
+                       pFooter->SetItemEnabled(INDEX_FOOTER_SHARE, false);
+                       pFooter->SetItemEnabled(INDEX_FOOTER_ADDTOPLATLIST, false);
+
+                       pFooter->Invalidate(true);
+
+                       __checkedItemCount = INIT_VALUE;
+                       CommonUtil::SetAllCheckState(false, *__pContentTableView, __pPresentationModel->GetArtistAlbumContentCount(__pPresentationModel->GetCurrentArtistAlbumIndex()));
+                       CommonUtil::ShowCheckedCountLabel(*__pCheckedCountLabel, __checkedItemCount, *__pContentTableView, *this);
+               }
+               break;
+
+       case IDA_FOOTER_BUTTON_DELETE:
+               {
+                       ContentManager contentManager;
+                       Footer* pFooter = GetFooter();
+                       int totalCount = __pPresentationModel->GetArtistAlbumContentCount(__pPresentationModel->GetCurrentArtistAlbumIndex());
+                       int iCount = 0;
+
+                       if (__checkedItemCount <= INIT_VALUE)
+                       {
+                               return;
+                       }
+
+                       pFooter->SetItemEnabled(INDEX_FOOTER_DELETE, false);
+                       pFooter->SetItemEnabled(INDEX_FOOTER_SHARE, false);
+                       pFooter->SetItemEnabled(INDEX_FOOTER_ADDTOPLATLIST, false);
+                       pFooter->Invalidate(true);
+
+                       contentManager.Construct();
+                       for (iCount = 0; iCount < totalCount; iCount++)
+                       {
+                               if (__pContentTableView->IsItemChecked(iCount) == true)
+                               {
+                                       __pContentTableView->SetItemChecked(iCount,false);
+                                       ContentInformation* pContentInfoStruct = __pPresentationModel->GetArtistAlbumContentInfoN(iCount);
+                                       contentManager.DeleteContent(pContentInfoStruct->contentId);
+
+                                       delete pContentInfoStruct;
+                                       pContentInfoStruct = null;
+                               }
+                       }
+                       __pPresentationModel->RefreshContentList(__currentContentIndex);
+                       __pContentTableView->UpdateTableView();
+                       __pContentTableView->Invalidate(true);
+                       __checkedItemCount = INIT_VALUE;
+                       CommonUtil::ShowCheckedCountLabel(*__pCheckedCountLabel, __checkedItemCount, *__pContentTableView, *this);
+                       if (__pPresentationModel->GetArtistAlbumContentCount(__pPresentationModel->GetCurrentArtistAlbumIndex()) > 0)
+                       {
+                               CommonUtil::ShowSelectAllCheckButton(*__pSelectAllCheckedButton);
+                       }
+                       else
+                       {
+                               __pSelectAllCheckedButton->SetEnabled(false);
+                               __pSelectAllCheckedButton->SetShowState(false);
+                               CommonUtil::ShowNoContentImage(INIT_VALUE, *__pContentTableView, *__pNoContentImageLabel, *__pNoContentTextLabel);
+                       }
+               }
+               break;
+
+       case IDA_FOOTER_BUTTON_SHARE:
+               {
+                       Tizen::Base::Collection::ArrayList* pDataList = new (std::nothrow) ArrayList();
+                       Footer* pFooter = GetFooter();
+                       int totalCount = __pPresentationModel->GetArtistAlbumContentCount(__pPresentationModel->GetCurrentArtistAlbumIndex());
+
+                       pDataList->Construct();
+
+                       for (int iCount = 0; iCount < totalCount; iCount++)
+                       {
+                               if (__pContentTableView->IsItemChecked(iCount) == true)
+                               {
+                                       ContentInformation* pContentInfoStruct = __pPresentationModel->GetArtistAlbumContentInfoN(iCount);
+                                       if (pContentInfoStruct == null)
+                                       {
+                                               pDataList->RemoveAll(true);
+                                               delete pDataList;
+                                               pDataList = null;
+                                               return;
+                                       }
+                                       pDataList->Add(*(new (std::nothrow) String(L"attachment:" + pContentInfoStruct->ContentFilePath)));
+
+                                       __pContentTableView->SetItemChecked(iCount, false);
+
+                                       delete pContentInfoStruct;
+                                       pContentInfoStruct = null;
+                               }
+                       }
+                       pFooter->SetItemEnabled(INDEX_FOOTER_DELETE, false);
+                       pFooter->SetItemEnabled(INDEX_FOOTER_SHARE, false);
+                       pFooter->SetItemEnabled(INDEX_FOOTER_ADDTOPLATLIST, false);
+
+                       __checkedItemCount = INIT_VALUE;
+                       CommonUtil::ShowCheckedCountLabel(*__pCheckedCountLabel, __checkedItemCount, *__pContentTableView, *this);
+                       CommonUtil::ShowSelectAllCheckButton(*__pSelectAllCheckedButton);
+
+                       Invalidate(true);
+                       if (__pSharePopup == null)
+                       {
+                               __pSharePopup = new (std::nothrow) SharePopup();
+                               __pSharePopup->Initialize();
+                       }
+                       __pSharePopup->SetShowState(true);
+                       __pSharePopup->Show();
+                       __pSharePopup->SetArguments(pDataList);
+               }
+               break;
+
+       case IDA_FOOTER_BUTTON_ADD_TO_PLAYLIST:
+               {
+                       ContentManager contentManager;
+                       Footer* pFooter = GetFooter();
+                       Tizen::Base::Collection::ArrayList* pDataList = new (std::nothrow) ArrayList();
+                       int totalCount = 0;
+
+                       if (__checkedItemCount <= 0)
+                       {
+                               return;
+                       }
+
+                       pDataList->Construct();
+                       contentManager.Construct();
+                       totalCount = __pPresentationModel->GetArtistAlbumContentCount(__pPresentationModel->GetCurrentArtistAlbumIndex());
+
+                       for (int iCount = 0; iCount < totalCount; iCount++)
+                       {
+                               if (__pContentTableView->IsItemChecked(iCount) == true)
+                               {
+                                       ContentInformation* pContentInfoStruct = __pPresentationModel->GetArtistAlbumContentInfoN(iCount);
+                                       if (pContentInfoStruct == null)
+                                       {
+                                               pDataList->RemoveAll(true);
+                                               delete pDataList;
+                                               pDataList = null;
+                                               return;
+                                       }
+
+                                       pDataList->Add(*(new (std::nothrow) String(pContentInfoStruct->ContentFilePath)));
+
+                                       __pContentTableView->SetItemChecked(iCount, false);
+
+                                       delete pContentInfoStruct;
+                                       pContentInfoStruct = null;
+                               }
+                       }
+
+                       if (IsFailed(CreatePlayListPickerPopup(pDataList)))
+                       {
+                               AppLogDebug("CreatePlayListPickerPopup failed(%s)", GetLastResult());
+                               return;
+                       }
+                       __pPlayListPickerPopup->SetShowState(true);
+                       __pPlayListPickerPopup->Show();
+                       //__pPlayListPickerPopup->SetCollectedContent(pDataList);
+
+                       pFooter->SetItemEnabled(INDEX_FOOTER_DELETE, false);
+                       pFooter->SetItemEnabled(INDEX_FOOTER_SHARE, false);
+                       pFooter->SetItemEnabled(INDEX_FOOTER_ADDTOPLATLIST, false);
+
+                       __checkedItemCount = INIT_VALUE;
+                       CommonUtil::ShowCheckedCountLabel(*__pCheckedCountLabel, __checkedItemCount, *__pContentTableView, *this);
+                       CommonUtil::ShowSelectAllCheckButton(*__pSelectAllCheckedButton);
+
+                       Invalidate(true);
+               }
+               break;
+
+       default:
+               break;
+       }
+       AppLogDebug("EXIT");
+}
+
+int
+ArtistContentListForm::GetItemCount(void)
+{
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
+       return __pPresentationModel->GetArtistAlbumContentCount(__pPresentationModel->GetCurrentArtistAlbumIndex());
+}
+
+Tizen::Ui::Controls::TableViewItem*
+ArtistContentListForm::CreateItem(const int itemIndex, int itemWidth)
+{
+       AppLogDebug("ENTER");
+       ContentInformation* pContentInfoStruct = null;
+
+       TableViewItem* pItem = new (std::nothrow) TableViewItem();
+       if (__checkEdit)
+       {
+               pItem->Construct(Dimension(itemWidth, ITEM_HEIGHT), TABLE_VIEW_ANNEX_STYLE_MARK);
+       }
+       else
+       {
+               pItem->Construct(Dimension(itemWidth, ITEM_HEIGHT), TABLE_VIEW_ANNEX_STYLE_NORMAL);
+       }
+       pItem->SetBackgroundColor(COLOR_WHITE);
+       pContentInfoStruct = __pPresentationModel->GetArtistAlbumContentInfoN(itemIndex);
+       if (pContentInfoStruct == null)
+       {
+               delete pItem;
+               pItem = null;
+               return null;
+       }
+
+       CreateTableViewItem(*pItem, *pContentInfoStruct);
+
+       delete pContentInfoStruct;
+       pContentInfoStruct = null;
+
+       return pItem;
+}
+
+void
+ArtistContentListForm::OnTableViewItemStateChanged(Tizen::Ui::Controls::TableView& tableView,
+                                                       int itemIndex,
+                                                       Tizen::Ui::Controls::TableViewItem* pItem,
+                                                       Tizen::Ui::Controls::TableViewItemStatus status)
+{
+       AppLogDebug("ENTER");
+       switch (status)
+       {
+       case TABLE_VIEW_ITEM_STATUS_CHECKED:
+               {
+                       Footer* pFooter = GetFooter();
+                       __checkedItemCount++;
+                       tableView.SetItemChecked(itemIndex, true);
+
+                       pFooter->SetItemEnabled(INDEX_FOOTER_DELETE, true);
+                       pFooter->SetItemEnabled(INDEX_FOOTER_SHARE, true);
+                       pFooter->SetItemEnabled(INDEX_FOOTER_ADDTOPLATLIST, true);
+
+                       pFooter->Invalidate(true);
+                       if (__checkedItemCount == __pPresentationModel->GetArtistAlbumContentCount(__pPresentationModel->GetCurrentArtistAlbumIndex()))
+                       {
+                               __pSelectAllCheckedButton->SetSelected(true);
+                       }
+                       CommonUtil::ShowCheckedCountLabel(*__pCheckedCountLabel, __checkedItemCount, *__pContentTableView, *this);
+               }
+               break;
+
+       case TABLE_VIEW_ITEM_STATUS_UNCHECKED:
+               {
+                       Footer* pFooter = GetFooter();
+
+                       __checkedItemCount--;
+                       tableView.SetItemChecked(itemIndex, false);
+
+                       if (__checkedItemCount == INIT_VALUE)
+                       {
+                               pFooter->SetItemEnabled(INDEX_FOOTER_DELETE, false);
+                               pFooter->SetItemEnabled(INDEX_FOOTER_SHARE, false);
+                               pFooter->SetItemEnabled(INDEX_FOOTER_ADDTOPLATLIST, false);
+
+                               pFooter->Invalidate(true);
+                       }
+
+                       if (__checkedItemCount != __pPresentationModel->GetArtistAlbumContentCount(__pPresentationModel->GetCurrentArtistAlbumIndex()))
+                       {
+                               __pSelectAllCheckedButton->SetSelected(false);
+                       }
+                       CommonUtil::ShowCheckedCountLabel(*__pCheckedCountLabel, __checkedItemCount, *__pContentTableView, *this);
+               }
+               break;
+
+       case TABLE_VIEW_ITEM_STATUS_SELECTED:
+               {
+                       SceneManager* pSceneManager = SceneManager::GetInstance();
+                       ArrayList* tempArg;
+                       AppAssert(pSceneManager);
+                       tempArg = MakePlayerSceneParam(itemIndex);
+                       pSceneManager->GoForward(ForwardSceneTransition(IDSCN_PLAYER),tempArg);
+
+                       if (tempArg != null)
+                       {
+                               tempArg->RemoveAll();
+                               delete tempArg;
+                               tempArg = null;
+                       }
+               }
+               break;
+
+       default:
+               break;
+       }
+       AppLogDebug("EXIT");
+}
+
+Tizen::Base::Collection::ArrayList*
+ArtistContentListForm::MakePlayerSceneParam(int startIndex)
+{
+       AppLogDebug("ENTER");
+       ArrayList* pTempList = new (std::nothrow) ArrayList();
+       ArrayList* pSelectedMusicContent = null;
+
+       pSelectedMusicContent = __pPresentationModel->GetContentPathListN(__currentContentIndex, SEARCH_MODE_ARTIST_ALBUM);
+       if (pTempList == null || pSelectedMusicContent == null)
+       {
+               AppLogDebug("EXIT");
+               return null;
+       }
+       pTempList->Construct();
+
+       pTempList->Add(*(new (std::nothrow) String(MUSIC)));
+       pTempList->Add(*(new (std::nothrow) Integer(startIndex)));
+       pTempList->Add(*(pSelectedMusicContent));
+
+       AppLogDebug("EXIT");
+       return pTempList;
+}
+
+result
+ArtistContentListForm::CreateTableViewItem(Tizen::Ui::Container& parent,
+                                                                               const ContentInformation& contentInfo)
+{
+       AppLogDebug("ENTER");
+       result r = E_SUCCESS;
+       Rectangle rectContentName = RECT_CONTENT_NAME;
+       Rectangle rectContentPlayTime = RECT_CONTENT_PLAY_TIME;
+       Label* pLabelContentName = new (std::nothrow) Label();
+       Label* pLabelContentPlayTime = new (std::nothrow) Label();
+
+       if (__checkEdit)
+       {
+               rectContentName.width = rectContentName.width - X_OFFSET_EDIT_STYLE_TABLE_VIEW;
+               rectContentPlayTime.x = rectContentPlayTime.x - X_OFFSET_EDIT_STYLE_TABLE_VIEW;
+       }
+
+       pLabelContentName->Construct(rectContentName, L"");
+       pLabelContentName->SetTextConfig(FONT_SIZE, LABEL_TEXT_STYLE_NORMAL);
+       pLabelContentName->SetTextHorizontalAlignment(ALIGNMENT_LEFT);
+       pLabelContentName->SetText(contentInfo.TitleName);
+
+       pLabelContentPlayTime->Construct(rectContentPlayTime, L"");
+       pLabelContentPlayTime->SetTextConfig(FONT_SIZE, LABEL_TEXT_STYLE_NORMAL);
+       pLabelContentPlayTime->SetTextHorizontalAlignment(ALIGNMENT_RIGHT);
+       pLabelContentPlayTime->SetText(CommonUtil::GetFormatDate(contentInfo.Duration));
+
+       parent.AddControl(*pLabelContentName);
+       parent.AddControl(*pLabelContentPlayTime);
+       AppLogDebug("EXIT");
+       return r;
+}
+
+void
+ArtistContentListForm::ToggleViewMode(bool editMode)
+{
+       AppLogDebug("ENTER");
+       Footer* pFooter = GetFooter();
+
+       if (editMode == false)
+       {
+               int currentAlbumContentCount = 0;
+               currentAlbumContentCount = __pPresentationModel->GetArtistAlbumContentCount(__pPresentationModel->GetCurrentArtistAlbumIndex());
+
+               pFooter->RemoveAllButtons();
+               pFooter->RemoveAllItems();
+               pFooter->RemoveActionEventListener(*this);
+               pFooter = CommonUtil::CreateEditFooter(*this);
+               pFooter->AddActionEventListener(*this);
+               pFooter->SetBackButton();
+               SetFormBackEventListener(this);
+
+               if ( currentAlbumContentCount > INIT_VALUE)
+               {
+                       SetTitleText(__strHeaderName);
+               }
+               else
+               {
+                       SetTitleText("No songs");
+                       CommonUtil::ShowNoContentImage(INIT_VALUE, *__pContentTableView, *__pNoContentImageLabel, *__pNoContentTextLabel);
+                       pFooter->SetItemEnabled(INDEX_FOOTER_EDIT, false);
+               }
+
+               __pSelectAllCheckedButton->SetEnabled(false);
+               __pSelectAllCheckedButton->SetShowState(false);
+
+               __checkEdit = false;
+               __pContentTableView->SetBounds(Rectangle(0, 0, GetClientAreaBounds().width, GetClientAreaBounds().height));
+               __pContentTableView->Invalidate(true);
+               __pContentTableView->UpdateTableView();
+       }
+       else
+       {
+               SetTitleText(ResourceManager::GetString("IDS_COM_BODY_EDIT"));
+
+               pFooter->RemoveAllButtons();
+               pFooter->RemoveAllItems();
+               pFooter->RemoveActionEventListener(*this);
+
+               pFooter = CommonUtil::CreateDeleteFooter(*this);
+               pFooter->AddActionEventListener(*this);
+
+               __pSelectAllCheckedButton->SetEnabled(true);
+               __pSelectAllCheckedButton->SetShowState(true);
+
+               __checkEdit = true;
+               __pContentTableView->SetBounds(Rectangle(0, __pSelectAllCheckedButton->GetHeight(), GetClientAreaBounds().width, (GetClientAreaBounds().height - __pSelectAllCheckedButton->GetHeight())));
+               __pContentTableView->Invalidate(true);
+               __pContentTableView->UpdateTableView();
+       }
+       Invalidate(true);
+       AppLogDebug("EXIT");
+}
+
+void
+ArtistContentListForm::OnAppControlCompleteResponseReceived(const AppId& appId,
+               const String& operationId, AppCtrlResult appControlResult,
+               const IMap* pExtraData)
+{
+       AppLogDebug("ENTER");
+       if (pExtraData == null)
+       {
+               AppLogDebug("EXIT");
+               return;
+       }
+       AppLogDebug("%ls, %ls", appId.GetPointer(), operationId.GetPointer());
+       if (appId.Equals(String(TIZEN_APPCONTROL_PROVIDER_CONTACT)))
+       {
+               if (appControlResult == APP_CTRL_RESULT_SUCCEEDED)
+               {
+                       const String* pContactId = static_cast<const String*>(pExtraData->GetValue(String(APPCONTROL_KEY_RETURNTYPE)));
+                       if (pContactId->Equals(APPCONTROL_VALUE_CONTACTID, true))
+                       {
+                               const String* pResultString = static_cast<const String*>(pExtraData->GetValue(String(APPCONTROL_KEY_VALUE)));
+
+                               AppLogDebug("%ls", pResultString->GetPointer());
+                               int contactId;
+                               Integer::Parse(*pResultString, contactId);
+
+                               AddressbookManager* pAddressbookManager = AddressbookManager::GetInstance();
+                               Addressbook* pAddressbook = pAddressbookManager->GetAddressbookN(DEFAULT_ADDRESSBOOK_ID);
+
+                               ContentInformation* pCcontentInfo = __pPresentationModel->GetArtistAlbumContentInfoN(__itemIndex);
+                               if (pCcontentInfo == null)
+                               {
+                                       delete pAddressbook;
+                                       pAddressbook = null;
+                                       return;
+                               }
+
+                               Contact* pContact = pAddressbook->GetContactN(contactId);
+                               pContact->SetValue(CONTACT_PROPERTY_ID_RINGTONE, pCcontentInfo->ContentFilePath);
+                               result r = pAddressbook->UpdateContact(*pContact);
+
+                               if (r == E_SUCCESS)
+                               {
+                                       MessageBox messageBox;
+                                       messageBox.Construct(L"", ResourceManager::GetString(L"IDS_COM_POP_SUCCESS"),
+                                                       MSGBOX_STYLE_OK,
+                                                       COUNT_MESSAGE_BOX_TIMEOUT);
+                                       int modalResult = 0;
+                                       messageBox.ShowAndWait(modalResult);
+                               }
+
+                               delete pCcontentInfo;
+                               pCcontentInfo = null;
+
+                               delete pContact;
+                               pContact = null;
+
+                               delete pAddressbook;
+                               pAddressbook = null;
+                       }
+               }
+       }
+       AppLogDebug("EXIT");
+}
\ No newline at end of file
old mode 100755 (executable)
new mode 100644 (file)
index 9d0a792..68a41da
@@ -1,4 +1,4 @@
-//
+//
 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
 //
 // Licensed under the Flora License, Version 1.0 (the License);
 // limitations under the License.
 //
 
+/**
+ * @file               MpArtistContentPickerPanel.cpp
+ * @brief              This is the implementation file for ArtistContentPickerPanel class.
+ */
+
 #include "MpArtistContentPickerPanel.h"
 
 using namespace Tizen::Base;
 using namespace Tizen::Base::Collection;
 using namespace Tizen::Content;
 using namespace Tizen::Graphics;
+using namespace Tizen::Social;
 using namespace Tizen::Ui;
 using namespace Tizen::Ui::Controls;
 using namespace Tizen::Ui::Scenes;
-using namespace Tizen::Social;
 
-ArtistContentPickerPanel::ArtistContentPickerPanel()
-: __checkedItemCount(0)
-, __pContentTableView(null)
-, __pSelectAllCheckedButton(null)
-, __pCheckedCountLabel(null)
+ArtistContentPickerPanel::ArtistContentPickerPanel(void)
+       : __checkedItemCount(0)
+       , __pContentTableView(null)
+       , __pSelectAllCheckedButton(null)
+       , __pCheckedCountLabel(null)
 {
-       //AppLogDebug("ArtistContentPickerPanel");
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 
-ArtistContentPickerPanel::~ArtistContentPickerPanel()
+ArtistContentPickerPanel::~ArtistContentPickerPanel(void)
 {
-       //AppLogDebug("~ArtistContentPickerPanel");
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 
 bool
 ArtistContentPickerPanel::Initialize(void)
 {
-       //AppLogDebug("Initialize");
+       AppLogDebug("ENTER");
        result r = Construct(Rectangle(INIT_VALUE, INIT_VALUE, INIT_VALUE, INIT_VALUE));
        if (IsFailed(r))
        {
                return false;
        }
+       AppLogDebug("EXIT");
        return true;
 }
 
 result
 ArtistContentPickerPanel::OnInitializing(void)
 {
-       //AppLogDebug("OnInitializing");
+       AppLogDebug("ENTER");
        Form* pForm = dynamic_cast<Form*>(GetParent());
        AppAssert(pForm);
 
-       int width  = pForm->GetClientAreaBounds().width;
+       int width = pForm->GetClientAreaBounds().width;
        int height = pForm->GetClientAreaBounds().height;
 
        SetBounds(INIT_VALUE, INIT_VALUE, width, height);
@@ -79,127 +87,120 @@ ArtistContentPickerPanel::OnInitializing(void)
 
        __pPresentationModel = ArtistListPresentationModel::GetInstance();
 
+       AppLogDebug("EXIT");
        return E_SUCCESS;
 }
 
 result
 ArtistContentPickerPanel::OnTerminating(void)
 {
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
        return E_SUCCESS;
 }
 
 void
 ArtistContentPickerPanel::OnActionPerformed(const Tizen::Ui::Control& source, int actionId)
 {
-       //AppLogDebug("OnActionPerformed");
+       AppLogDebug("ENTER");
        SceneManager* pSceneManager = SceneManager::GetInstance();
        AppAssert(pSceneManager);
 
-       int totalCount = __pPresentationModel->GetSongContentCount();
+       int totalCount = __pPresentationModel->GetArtistContentListCount();
 
-       switch(actionId)
+       switch (actionId)
        {
        case IDA_CHECK_BUTTON:
-       {
-               //AppLogDebug("IDA_CHECK_BUTTON");
-               __checkedItemCount = totalCount;
-               CommonUtil::SetAllCheckState(true, *__pContentTableView, totalCount);
-               Form* pForm = dynamic_cast<Form*>(GetParent());
-               AppAssert(pForm);
-               CommonUtil::ShowCheckedCountLabel(*__pCheckedCountLabel, __checkedItemCount, *__pContentTableView, *pForm);
-               CommonUtil::SetButtonEnabled(*pForm, __checkedItemCount, actionId);
+               {
+                       //AppLogDebug("IDA_CHECK_BUTTON");
+                       __checkedItemCount = totalCount;
+                       CommonUtil::SetAllCheckState(true, *__pContentTableView, totalCount);
+                       Form* pForm = dynamic_cast<Form*>(GetParent());
+                       AppAssert(pForm);
+                       CommonUtil::ShowCheckedCountLabel(*__pCheckedCountLabel, __checkedItemCount, *__pContentTableView, *pForm);
+                       CommonUtil::SetButtonEnabled(*pForm, __checkedItemCount, actionId);
+               }
                break;
-       }
+
        case IDA_UNCHECK_BUTTON:
-       {
-               //AppLogDebug("IDA_UNCHECK_BUTTON");
-               __checkedItemCount = INIT_VALUE;
-               CommonUtil::SetAllCheckState(false, *__pContentTableView, totalCount);
-               Form* pForm = dynamic_cast<Form*>(GetParent());
-               AppAssert(pForm);
-               CommonUtil::ShowCheckedCountLabel(*__pCheckedCountLabel, __checkedItemCount, *__pContentTableView, *pForm);
-               CommonUtil::SetButtonEnabled(*pForm, __checkedItemCount, actionId);
-               break;
-       }
-       case IDA_FOOTER_BUTTON_ADD_TO_PLAYLIST:
-       {
-               if (__checkedItemCount <= 0)
                {
-                       return;
+                       //AppLogDebug("IDA_UNCHECK_BUTTON");
+                       __checkedItemCount = INIT_VALUE;
+                       CommonUtil::SetAllCheckState(false, *__pContentTableView, totalCount);
+                       Form* pForm = dynamic_cast<Form*>(GetParent());
+                       AppAssert(pForm);
+                       CommonUtil::ShowCheckedCountLabel(*__pCheckedCountLabel, __checkedItemCount, *__pContentTableView, *pForm);
+                       CommonUtil::SetButtonEnabled(*pForm, __checkedItemCount, actionId);
                }
+               break;
 
-               PlayList* pPlayList = PlayListManager::GetInstance()->GetPlayListN(CommonUtil::GetAddtoPlaylistName());
-
-               int totalCount = __pPresentationModel->GetSongContentCount();
-               for(int iCount = 0; iCount < totalCount; iCount++)
+       case IDA_FOOTER_BUTTON_ADD_TO_PLAYLIST:
                {
-                       if (__pContentTableView->IsItemChecked(iCount) == true)
+                       if (__checkedItemCount <= 0)
                        {
-                               ContentInformationStruct* pContentInfoStruct = __pPresentationModel->GetSongContentInfoN(iCount);
-                               if (pContentInfoStruct == null)
+                               return;
+                       }
+
+                       int totalCount = __pPresentationModel->GetArtistContentListCount();
+                       for (int iCount = 0; iCount < totalCount; iCount++)
+                       {
+                               if (__pContentTableView->IsItemChecked(iCount) == true)
                                {
-                                       continue;
+                                       __pPresentationModel->AddContent(*new (std::nothrow) String(CommonUtil::GetAddtoPlaylistName()), iCount);
+                                       __pContentTableView->SetItemChecked(iCount, false);
                                }
-                               pPlayList->AddItem(pContentInfoStruct->contentId);
-
-                               __pContentTableView->SetItemChecked(iCount, false);
-
-                               delete pContentInfoStruct->pThumbnail;
-                               pContentInfoStruct->pThumbnail = null;
-
-                               delete pContentInfoStruct;
-                               pContentInfoStruct = null;
                        }
-               }
 
-               delete pPlayList;
-               pPlayList = null;
+                       Form* pForm = dynamic_cast<Form*>(GetParent());
+                       AppAssert(pForm);
+                       CommonUtil::SetButtonEnabled(*pForm, __checkedItemCount, actionId);
 
-               Form* pForm = dynamic_cast<Form*>(GetParent());
-               AppAssert(pForm);
-               CommonUtil::SetButtonEnabled(*pForm, __checkedItemCount, actionId);
+                       __checkedItemCount = 0;
+                       CommonUtil::ShowCheckedCountLabel(*__pCheckedCountLabel, __checkedItemCount, *__pContentTableView, *pForm);
+                       CommonUtil::ShowSelectAllCheckButton(*__pSelectAllCheckedButton);
+                       CommonUtil::SetAddtoPlaylistState(false);
 
-               __checkedItemCount = 0;
-               CommonUtil::ShowCheckedCountLabel(*__pCheckedCountLabel, __checkedItemCount, *__pContentTableView, *pForm);
-               CommonUtil::ShowSelectAllCheckButton(*__pSelectAllCheckedButton);
-               CommonUtil::SetAddtoPlaylistState(false);
+                       Invalidate(true);
 
-               Invalidate(true);
-
-               pSceneManager->GoForward(ForwardSceneTransition(IDSCN_PLAYLIST_LIST,
+                       pSceneManager->GoForward(ForwardSceneTransition(IDSCN_PLAYLIST_LIST,
                                                                                                                SCENE_TRANSITION_ANIMATION_TYPE_NONE,
                                                                                                                SCENE_HISTORY_OPTION_NO_HISTORY,
                                                                                                                SCENE_DESTROY_OPTION_DESTROY));
+               }
                break;
-       }
+
        case IDA_FOOTER_BUTTON_CANCEL:
-       {
-               Form* pForm = dynamic_cast<Form*>(GetParent());
-               AppAssert(pForm);
-               CommonUtil::SetButtonEnabled(*pForm, __checkedItemCount, actionId);
-               //AppLogDebug("IDA_FOOTER_BUTTON_CANCEL");
-               pSceneManager->GoBackward(BackwardSceneTransition());
+               {
+                       Form* pForm = dynamic_cast<Form*>(GetParent());
+                       AppAssert(pForm);
+                       CommonUtil::SetButtonEnabled(*pForm, __checkedItemCount, actionId);
+                       //AppLogDebug("IDA_FOOTER_BUTTON_CANCEL");
+                       pSceneManager->GoBackward(BackwardSceneTransition());
+               }
                break;
-       }
+
        default:
-       {
                break;
-       }
        }//End of switch
+       AppLogDebug("EXIT");
 }
 
 void
 ArtistContentPickerPanel::OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previousSceneId,
-                                            const Tizen::Ui::Scenes::SceneId& currentSceneId,
-                                            Tizen::Base::Collection::IList* pArgs)
+                                                       const Tizen::Ui::Scenes::SceneId& currentSceneId,
+                                                       Tizen::Base::Collection::IList* pArgs)
 {
-       //AppLogDebug("OnSceneActivatedN");
-
+       AppLogDebug("ENTER");
        Form* pForm = dynamic_cast<Form*>(GetParent());
        AppAssert(pForm);
 
        Footer* pFooter = CommonUtil::CreateAddtoPlaylistPickerFooter(*pForm);
        pFooter->AddActionEventListener(*this);
+       if (pArgs != null && (previousSceneId.Equals(IDSCN_ARTIST_PICKER, true)))
+       {
+               String* pTemp = static_cast<String*>(pArgs->GetAt(0));
+               __pPresentationModel->InitializeArtistAlbumList(*pTemp);
+       }
 
        CommonUtil::SetButtonEnabled(*pForm, __checkedItemCount);
 
@@ -208,14 +209,14 @@ ArtistContentPickerPanel::OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& pr
                pArgs->RemoveAll(true);
                delete pArgs;
        }
+       AppLogDebug("EXIT");
 }
 
 void
 ArtistContentPickerPanel::OnSceneDeactivated(const Tizen::Ui::Scenes::SceneId& currentSceneId,
-                                                                                const Tizen::Ui::Scenes::SceneId& nextSceneId)
+                                                                                       const Tizen::Ui::Scenes::SceneId& nextSceneId)
 {
-       //AppLogDebug("OnSceneDeactivated");
-
+       AppLogDebug("ENTER");
        Form* pForm = dynamic_cast<Form*>(GetParent());
        AppAssert(pForm);
 
@@ -223,99 +224,97 @@ ArtistContentPickerPanel::OnSceneDeactivated(const Tizen::Ui::Scenes::SceneId& c
        pFooter->RemoveAllButtons();
        pFooter->RemoveAllItems();
        pFooter->RemoveActionEventListener(*this);
+       AppLogDebug("EXIT");
 }
 
 int
 ArtistContentPickerPanel::GetItemCount(void)
 {
-       //AppLogDebug("GetItemCount");
-
+       AppLogDebug("ENTER");
        if (__pPresentationModel == null)
        {
-               return 0;
+               return INIT_VALUE;
        }
-       return __pPresentationModel->GetSongContentCount();
+       AppLogDebug("EXIT");
+       return __pPresentationModel->GetArtistContentListCount();
 }
 
 Tizen::Ui::Controls::TableViewItem*
 ArtistContentPickerPanel::CreateItem(const int itemIndex, int itemWidth)
 {
-       //AppLogDebug("CreateTableViewItem");
-
-       ContentInformationStruct* pContentInfoStruct = __pPresentationModel->GetSongContentInfoN(itemIndex);
+       AppLogDebug("ENTER");
+       ContentInformation* pContentInfoStruct = __pPresentationModel->GetArtistContentInfoN(itemIndex);
        if (pContentInfoStruct == null)
        {
                return null;
        }
 
        TableViewItem* pItem = new (std::nothrow) TableViewItem();
-       pItem->Construct(Dimension(itemWidth, ITEM_HEIGHT),TABLE_VIEW_ANNEX_STYLE_MARK);
+       pItem->Construct(Dimension(itemWidth, ITEM_HEIGHT), TABLE_VIEW_ANNEX_STYLE_MARK);
        pItem->SetBackgroundColor(COLOR_ITEM);
 
        CommonUtil::CreateContentPikerTableViewItem(*pItem, pContentInfoStruct->TitleName, CommonUtil::GetFormatDate(pContentInfoStruct->Duration));
 
-       //test_code_start
-       delete pContentInfoStruct->pThumbnail;
-       pContentInfoStruct->pThumbnail = null;
-
        delete pContentInfoStruct;
        pContentInfoStruct = null;
-       //test_code_end
 
+       AppLogDebug("EXIT");
        return pItem;
 }
 
 bool
 ArtistContentPickerPanel::DeleteItem(const int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem)
 {
-       //AppLogDebug("DeleteItem");
-
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
        return true;
 }
 
 void
 ArtistContentPickerPanel::UpdateItem(int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem)
 {
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 
 int
 ArtistContentPickerPanel::GetDefaultItemHeight(void)
 {
-       //AppLogDebug("GetDefaultItemHeight");
-
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
        return ITEM_HEIGHT;
 }
 
 void
 ArtistContentPickerPanel::OnTableViewItemStateChanged(Tizen::Ui::Controls::TableView& tableView,
-                                                     int itemIndex,
-                                                     Tizen::Ui::Controls::TableViewItem* pItem,
-                                                     Tizen::Ui::Controls::TableViewItemStatus status)
+                                                               int itemIndex,
+                                                               Tizen::Ui::Controls::TableViewItem* pItem,
+                                                               Tizen::Ui::Controls::TableViewItemStatus status)
 {
-       //AppLogDebug("OnTableViewItemStateChanged");
-       switch(status)
+       AppLogDebug("ENTER");
+       switch (status)
        {
        case TABLE_VIEW_ITEM_STATUS_CHECKED:
-       {
-               __checkedItemCount++;
-               tableView.SetItemChecked(itemIndex, true);
+               {
+                       __checkedItemCount++;
+                       tableView.SetItemChecked(itemIndex, true);
+               }
                break;
-       }
+
        case TABLE_VIEW_ITEM_STATUS_UNCHECKED:
-       {
-               __checkedItemCount--;
-               tableView.SetItemChecked(itemIndex, false);
+               {
+                       __checkedItemCount--;
+                       tableView.SetItemChecked(itemIndex, false);
+               }
                break;
-       }
+
        default:
-       {
                break;
-       }
        }//end of switch
 
        CommonUtil::ShowSelectAllCheckButton(*__pSelectAllCheckedButton);
 
-       if (__checkedItemCount == __pPresentationModel->GetSongContentCount())
+       if (__checkedItemCount == __pPresentationModel->GetArtistContentListCount())
        {
                __pSelectAllCheckedButton->SetSelected(true);
        }
@@ -326,20 +325,23 @@ ArtistContentPickerPanel::OnTableViewItemStateChanged(Tizen::Ui::Controls::Table
        AppAssert(pForm);
        CommonUtil::ShowCheckedCountLabel(*__pCheckedCountLabel, __checkedItemCount, *__pContentTableView, *pForm);
        CommonUtil::SetButtonEnabled(*pForm, __checkedItemCount);
+       AppLogDebug("EXIT");
 }
 
 void
 ArtistContentPickerPanel::OnTableViewContextItemActivationStateChanged(Tizen::Ui::Controls::TableView& tableView,
-                                                                      int itemIndex,
-                                                                      Tizen::Ui::Controls::TableViewContextItem* pContextItem,
-                                                                      bool activated)
+                                                                               int itemIndex,
+                                                                               Tizen::Ui::Controls::TableViewContextItem* pContextItem,
+                                                                               bool activated)
 {
-       //AppLogDebug("OnTableViewContextItemActivationStateChanged");
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 void
 ArtistContentPickerPanel::OnTableViewItemReordered(Tizen::Ui::Controls::TableView& tableView,
-                                                  int itemIndexFrom,
-                                                  int itemIndexTo)
+                                                               int itemIndexFrom,
+                                                               int itemIndexTo)
 {
-       //AppLogDebug("OnTableViewItemReordered");
-}
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
+}
\ No newline at end of file
old mode 100755 (executable)
new mode 100644 (file)
index 3024b2b..e9ed5c0
@@ -1,4 +1,4 @@
-//
+//
 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
 //
 // Licensed under the Flora License, Version 1.0 (the License);
 // limitations under the License.
 //
 
+/**
+ * @file               MpArtistListEditorPanel.cpp
+ * @brief              This is the implementation file for ArtistListEditorPanel class.
+ */
+
 #include "MpArtistListEditorPanel.h"
 #include "MpPlaylistPickerPopup.h"
+#include "MpThumbnailInfo.h"
 
 using namespace Tizen::Base;
 using namespace Tizen::Base::Collection;
@@ -26,42 +32,47 @@ using namespace Tizen::Ui::Controls;
 using namespace Tizen::Ui::Scenes;
 
 ArtistListEditorPanel::ArtistListEditorPanel(void)
-: __checkedItemCount(0)
-, __pContentTableView(null)
-, __pSelectAllCheckedButton(null)
-, __pCheckedCountLabel(null)
-, __pPlayListPickerPopup(null)
+       : ThumbnailBase::ThumbnailBase()
+       , __checkedItemCount(0)
+       , __pContentTableView(null)
+       , __pSelectAllCheckedButton(null)
+       , __pCheckedCountLabel(null)
+       , __pThumbnail(null)
+       , __pPlayListPickerPopup(null)
 {
-       //AppLogDebug("ArtistListEditorPanel");
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 
 ArtistListEditorPanel::~ArtistListEditorPanel(void)
 {
-       //AppLogDebug("~ArtistListEditorPanel");
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 
 bool
 ArtistListEditorPanel::Initialize(void)
 {
-       //AppLogDebug("Initialize");
-       result r = Construct(Rectangle(INIT_VALUE, INIT_VALUE, INIT_VALUE, INIT_VALUE)); // Should be set proper area at OnInitializing().
+       AppLogDebug("ENTER");
+       result r = BasePanel::Construct(Rectangle(INIT_VALUE, INIT_VALUE, INIT_VALUE, INIT_VALUE)); // Should be set proper area at OnInitializing().
        if (IsFailed(r))
        {
                return false;
        }
+       AppLogDebug("EXIT");
        return true;
 }
 
 result
 ArtistListEditorPanel::OnInitializing(void)
 {
-       //AppLogDebug("OnInitializing");
+       AppLogDebug("ENTER");
        __pPresentationModel = ArtistListPresentationModel::GetInstance();
 
        Form* pForm = dynamic_cast<Form*>(GetParent());
        AppAssert(pForm);
 
-       int width  = pForm->GetClientAreaBounds().width;
+       int width = pForm->GetClientAreaBounds().width;
        int height = pForm->GetClientAreaBounds().height;
 
        SetBounds(INIT_VALUE, INIT_VALUE, width, height);
@@ -79,101 +90,101 @@ ArtistListEditorPanel::OnInitializing(void)
        __pCheckedCountLabel->SetShowState(false);
        AddControl(*__pCheckedCountLabel);
 
-       return E_SUCCESS;
+       AppLogDebug("EXIT");
+       return ThumbnailBase::Construct();
 }
 
 result
 ArtistListEditorPanel::OnTerminating(void)
 {
-       //AppLogDebug("OnTerminating");
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
        return E_SUCCESS;
 }
 
 void
 ArtistListEditorPanel::OnActionPerformed(const Tizen::Ui::Control& source, int actionId)
 {
-       //AppLogDebug("OnActionPerformed");
+       AppLogDebug("ENTER");
        SceneManager* pSceneManager = SceneManager::GetInstance();
        AppAssert(pSceneManager);
 
-       int totalCount = __pPresentationModel->GetTotalArtistCount();
+       int totalCount = __pPresentationModel->GetArtistListCount();
 
-       switch(actionId)
+       switch (actionId)
        {
        case IDA_CHECK_BUTTON:
-       {
-               //AppLogDebug("IDA_CHECK_BUTTON");
-               __checkedItemCount = totalCount;
-               CommonUtil::SetAllCheckState(true, *__pContentTableView, totalCount);
-               Form* pForm = dynamic_cast<Form*>(GetParent());
-               AppAssert(pForm);
-               CommonUtil::ShowCheckedCountLabel(*__pCheckedCountLabel, __checkedItemCount, *__pContentTableView, *pForm);
+               {
+                       //AppLogDebug("IDA_CHECK_BUTTON");
+                       __checkedItemCount = totalCount;
+                       CommonUtil::SetAllCheckState(true, *__pContentTableView, totalCount);
+                       Form* pForm = dynamic_cast<Form*>(GetParent());
+                       AppAssert(pForm);
+                       CommonUtil::ShowCheckedCountLabel(*__pCheckedCountLabel, __checkedItemCount, *__pContentTableView, *pForm);
+               }
                break;
-       }
+
        case IDA_UNCHECK_BUTTON:
-       {
-               //AppLogDebug("IDA_UNCHECK_BUTTON");
-               __checkedItemCount = INIT_VALUE;
-               CommonUtil::SetAllCheckState(false, *__pContentTableView, totalCount);
-               Form* pForm = dynamic_cast<Form*>(GetParent());
-               AppAssert(pForm);
-               CommonUtil::ShowCheckedCountLabel(*__pCheckedCountLabel, __checkedItemCount, *__pContentTableView, *pForm);
+               {
+                       //AppLogDebug("IDA_UNCHECK_BUTTON");
+                       __checkedItemCount = INIT_VALUE;
+                       CommonUtil::SetAllCheckState(false, *__pContentTableView, totalCount);
+                       Form* pForm = dynamic_cast<Form*>(GetParent());
+                       AppAssert(pForm);
+                       CommonUtil::ShowCheckedCountLabel(*__pCheckedCountLabel, __checkedItemCount, *__pContentTableView, *pForm);
+               }
                break;
-       }
+
        case IDA_FOOTER_BUTTON_ADD_TO_PLAYLIST:
-       {
-               if (__checkedItemCount <= INIT_VALUE)
                {
-                       return;
-               }
+                       if (__checkedItemCount <= INIT_VALUE)
+                       {
+                               return;
+                       }
 
-               ArrayList* pDataList = new (std::nothrow) ArrayList();
-               pDataList->Construct();
+                       ArrayList* pDataList = new (std::nothrow) ArrayList();
+                       pDataList->Construct();
 
-               int totalCount = __pPresentationModel->GetTotalArtistCount();
-               for(int iCount = 0; iCount < totalCount; iCount++)
-               {
-                       if (__pContentTableView->IsItemChecked(iCount) == true)
+                       int totalCount = __pPresentationModel->GetArtistListCount();
+                       for (int iCount = 0; iCount < totalCount; iCount++)
                        {
-                               pDataList->AddItems(*(__pPresentationModel->SearchContentItemN(iCount)));
+                               if (__pContentTableView->IsItemChecked(iCount) == true)
+                               {
+                                       pDataList->AddItems(*(__pPresentationModel->GetContentPathListN(iCount)));
+                               }
                        }
-               }
 
-               if (__pPlayListPickerPopup == null)
-               {
                        __pPlayListPickerPopup = new (std::nothrow) PlayListPickerPopup();
-                       __pPlayListPickerPopup->Initialize();
+                       __pPlayListPickerPopup->Initialize(this, pDataList);
+                       //__pPlayListPickerPopup->SetCollectedContent(pDataList);
+                       __pPlayListPickerPopup->SetShowState(true);
+                       __pPlayListPickerPopup->Show();
                }
-
-               __pPlayListPickerPopup->SetCollectedContent(pDataList);
-               __pPlayListPickerPopup->SetShowState(true);
-               __pPlayListPickerPopup->Show();
                break;
-       }
+
        case IDA_FOOTER_BUTTON_CANCEL:
-       {
-               //AppLogDebug("IDA_FOOTER_BUTTON_CANCEL");
-               pSceneManager->GoBackward(BackwardSceneTransition());
+               {
+                       //AppLogDebug("IDA_FOOTER_BUTTON_CANCEL");
+                       pSceneManager->GoBackward(BackwardSceneTransition());
+               }
                break;
-       }
+
        default:
-       {
                break;
-       }
        }//End of switch
 
        Form* pForm = dynamic_cast<Form*>(GetParent());
        AppAssert(pForm);
        CommonUtil::SetButtonEnabled(*pForm, __checkedItemCount, actionId);
+       AppLogDebug("EXIT");
 }
 
 void
 ArtistListEditorPanel::OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previousSceneId,
-                                         const Tizen::Ui::Scenes::SceneId& currentSceneId,
-                                         Tizen::Base::Collection::IList* pArgs)
+                                               const Tizen::Ui::Scenes::SceneId& currentSceneId,
+                                               Tizen::Base::Collection::IList* pArgs)
 {
-       //AppLogDebug("OnSceneActivatedN");
-
+       AppLogDebug("ENTER");
        Form* pForm = dynamic_cast<Form*>(GetParent());
        AppAssert(pForm);
 
@@ -189,14 +200,14 @@ ArtistListEditorPanel::OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previ
                pArgs->RemoveAll(true);
                delete pArgs;
        }
+       AppLogDebug("EXIT");
 }
 
 void
 ArtistListEditorPanel::OnSceneDeactivated(const Tizen::Ui::Scenes::SceneId& currentSceneId,
-                                                                     const Tizen::Ui::Scenes::SceneId& nextSceneId)
+                                                                       const Tizen::Ui::Scenes::SceneId& nextSceneId)
 {
-       //AppLogDebug("OnSceneDeactivated");
-
+       AppLogDebug("ENTER");
        Form* pForm = dynamic_cast<Form*>(GetParent());
        AppAssert(pForm);
 
@@ -209,95 +220,93 @@ ArtistListEditorPanel::OnSceneDeactivated(const Tizen::Ui::Scenes::SceneId& curr
        CommonUtil::ShowCheckedCountLabel(*__pCheckedCountLabel, __checkedItemCount, *__pContentTableView, *pForm);
        CommonUtil::ShowSelectAllCheckButton(*__pSelectAllCheckedButton);
 
-       int totalCount = __pPresentationModel->GetTotalArtistCount();
-       for(int iCount = 0; iCount < totalCount; iCount++)
+       int totalCount = __pPresentationModel->GetArtistListCount();
+       for (int iCount = 0; iCount < totalCount; iCount++)
        {
                __pContentTableView->SetItemChecked(iCount, false);
        }
+       CancelAllThumbnailRequest();
+       AppLogDebug("EXIT");
 }
 
 int
 ArtistListEditorPanel::GetItemCount(void)
 {
-       //AppLogDebug("GetItemCount");
+       AppLogDebug("ENTER");
        if (__pContentTableView == null)
        {
                return INIT_VALUE;
        }
 
-       return __pPresentationModel->GetTotalArtistCount();
+       AppLogDebug("EXIT");
+       return __pPresentationModel->GetArtistListCount();
 }
 
 Tizen::Ui::Controls::TableViewItem*
 ArtistListEditorPanel::CreateItem(const int itemIndex, int itemWidth)
 {
-       //AppLogDebug("CreateTableViewItem");
-       ContentInformationStruct* pContentInfoStruct = __pPresentationModel->GetContentInfoN(itemIndex);
+       AppLogDebug("ENTER");
+       ContentInformation* pContentInfoStruct = __pPresentationModel->GetArtistnIfoN(itemIndex);
        if (pContentInfoStruct == null)
        {
                return null;
        }
 
-       TableViewItem* pItem = new (std::nothrow) TableViewItem;
+       TableViewItem* pItem = new (std::nothrow) TableViewItem();
        pItem->Construct(Dimension(itemWidth, ITEM_HEIGHT), TABLE_VIEW_ANNEX_STYLE_MARK);
        pItem->SetBackgroundColor(COLOR_ITEM);
 
-       CommonUtil::CreateEditListTableViewItem(*pItem, *(pContentInfoStruct->pThumbnail), pContentInfoStruct->ArtistName, __pPresentationModel->GetTotalContentCount(itemIndex));
-
-       //test_code_start
-       delete pContentInfoStruct->pThumbnail;
-       pContentInfoStruct->pThumbnail = null;
+       RequestThumbnail(pContentInfoStruct->contentId, (new (std::nothrow) int(itemIndex)));
+       CommonUtil::CreateEditListTableViewItem(*pItem, *GetDefaultThumbnail(), pContentInfoStruct->ArtistName, __pPresentationModel->GetArtistContentCount(itemIndex));
 
        delete pContentInfoStruct;
        pContentInfoStruct = null;
-       //test_code_end
 
+       AppLogDebug("EXIT");
        return pItem;
 }
 
 bool
 ArtistListEditorPanel::DeleteItem(const int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem)
 {
-       //AppLogDebug("DeleteItem");
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
        return true;
 }
 
-void
-ArtistListEditorPanel::UpdateItem(int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem)
-{
-}
-
 int
 ArtistListEditorPanel::GetDefaultItemHeight(void)
 {
-       //AppLogDebug("UpdateItem");
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
        return ITEM_HEIGHT;
 }
 
 void
 ArtistListEditorPanel::OnTableViewItemStateChanged(Tizen::Ui::Controls::TableView& tableView,
-                                                   int itemIndex,
-                                                   Tizen::Ui::Controls::TableViewItem* pItem,
-                                                   Tizen::Ui::Controls::TableViewItemStatus status)
+                                                               int itemIndex,
+                                                               Tizen::Ui::Controls::TableViewItem* pItem,
+                                                               Tizen::Ui::Controls::TableViewItemStatus status)
 {
-       switch(status)
+       AppLogDebug("ENTER");
+       switch (status)
        {
        case TABLE_VIEW_ITEM_STATUS_CHECKED:
-       {
-               __checkedItemCount++;
-               tableView.SetItemChecked(itemIndex, true);
+               {
+                       __checkedItemCount++;
+                       tableView.SetItemChecked(itemIndex, true);
+               }
                break;
-       }
+
        case TABLE_VIEW_ITEM_STATUS_UNCHECKED:
-       {
-               __checkedItemCount--;
-               tableView.SetItemChecked(itemIndex, false);
+               {
+                       __checkedItemCount--;
+                       tableView.SetItemChecked(itemIndex, false);
+               }
                break;
-       }
+
        default:
-       {
                break;
-       }
        }//end of switch
 
        Form* pForm = dynamic_cast<Form*>(GetParent());
@@ -306,44 +315,104 @@ ArtistListEditorPanel::OnTableViewItemStateChanged(Tizen::Ui::Controls::TableVie
 
        CommonUtil::ShowSelectAllCheckButton(*__pSelectAllCheckedButton);
 
-       if (__checkedItemCount == __pPresentationModel->GetTotalArtistCount())
+       if (__checkedItemCount == __pPresentationModel->GetArtistListCount())
        {
                __pSelectAllCheckedButton->SetSelected(true);
        }
 
        Invalidate(true);
        CommonUtil::ShowCheckedCountLabel(*__pCheckedCountLabel, __checkedItemCount, *__pContentTableView, *pForm);
+       AppLogDebug("EXIT");
 }
 
 void
 ArtistListEditorPanel::OnTableViewContextItemActivationStateChanged(Tizen::Ui::Controls::TableView& tableView,
-                                                                  int itemIndex,
-                                                                  Tizen::Ui::Controls::TableViewContextItem* pContextItem,
-                                                                  bool activated)
+                                                                               int itemIndex,
+                                                                               Tizen::Ui::Controls::TableViewContextItem* pContextItem,
+                                                                               bool activated)
 {
-
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 
 void
 ArtistListEditorPanel::OnTableViewItemReordered(Tizen::Ui::Controls::TableView& tableView,
-                                              int itemIndexFrom,
-                                              int itemIndexTo)
+                                                       int itemIndexFrom,
+                                                       int itemIndexTo)
 {
-
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 
 void
 ArtistListEditorPanel::OnUpdateContentList(void)
 {
+       AppLogDebug("ENTER");
        UpdateContentList();
+       AppLogDebug("EXIT");
 }
 
 void
 ArtistListEditorPanel::UpdateContentList(void)
 {
+       AppLogDebug("ENTER");
        if (__pPresentationModel != null && __pContentTableView != null)
        {
-               __pPresentationModel->RefreshContent();
+               __pPresentationModel->UpdateArtistList();
                __pContentTableView->UpdateTableView();
        }
+       AppLogDebug("EXIT");
+}
+
+void
+ArtistListEditorPanel::OnThumbnailInfoReveivedN(ThumbnailInfo* pThumbnailInfo)
+{
+       AppLogDebug("ENTER");
+       int itemIndex = 0;
+       void* pParam = null;
+       __pThumbnail = pThumbnailInfo->GetBitmapN();
+       pParam = pThumbnailInfo->GetUserParamN();
+       if (pParam)
+       {
+               itemIndex = *(static_cast<int*>(pParam));
+       }
+       __pContentTableView->RefreshItem(itemIndex, TABLE_VIEW_REFRESH_TYPE_ITEM_MODIFY);
+       delete pThumbnailInfo;
+       delete static_cast<int*>(pParam);
+       AppLogDebug("EXIT");
+}
+
+void
+ArtistListEditorPanel::OnUserEventReceivedN(RequestId requestId, Tizen::Base::Collection::IList* pArgs)
+{
+       AppLogDebug("ENTER");
+       AppLogDebug("OnUserEventReceivedN %d", requestId);
+       if (requestId == ID_DESTORY_PLAY_LIST_PICKER_POPUP)
+       {
+               if (__pPlayListPickerPopup != null)
+               {
+                       delete __pPlayListPickerPopup;
+                       __pPlayListPickerPopup = null;
+               }
+       }
+       AppLogDebug("EXIT");
 }
+
+void
+ArtistListEditorPanel::UpdateItem(int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem)
+{
+       AppLogDebug("ENTER");
+       Label* pThumbnailLabel = static_cast<Label*>(pItem->GetControl(L"pSongThumbnailLabel"));
+       if (__pThumbnail == null || pThumbnailLabel == null)
+       {
+               AppLogDebug("__pThumbnail or pThumbnailLabel is null");
+               delete __pThumbnail;
+               __pThumbnail = null;
+               return;
+       }
+       pThumbnailLabel->SetBackgroundBitmap(*__pThumbnail);
+       delete __pThumbnail;
+       __pThumbnail = null;
+       pThumbnailLabel->Invalidate(true);
+       AppLogDebug("EXIT");
+}
\ No newline at end of file
old mode 100755 (executable)
new mode 100644 (file)
index 4899d33..cbaa0ad
@@ -1,4 +1,4 @@
-//
+//
 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
 //
 // Licensed under the Flora License, Version 1.0 (the License);
 // limitations under the License.
 //
 
+/**
+ * @file               MpArtistListPanel.cpp
+ * @brief              This is the implementation file for ArtistListPanel class.
+ */
+
 #include "MpArtistListPanel.h"
 #include "MpNowPlayContentPanel.h"
 #include "MpPlaylistPickerPopup.h"
+#include "MpThumbnailInfo.h"
 
 using namespace Tizen::Base;
 using namespace Tizen::Base::Collection;
@@ -27,42 +33,47 @@ using namespace Tizen::Ui::Controls;
 using namespace Tizen::Ui::Scenes;
 
 ArtistListPanel::ArtistListPanel(void)
-: __itemIndex(-1)
-, __pNowPlayContentPanel(null)
-, __pPlayListPickerPopup(null)
-, __pContextItem(null)
-, __pContentTableView(null)
-, __pNoContentImageLabel(null)
-, __pNoContentTextLabel(null)
+       : ThumbnailBase::ThumbnailBase()
+       , __itemIndex(-1)
+       , __pNowPlayContentPanel(null)
+       , __pPlayListPickerPopup(null)
+       , __pContextItem(null)
+       , __pContentTableView(null)
+       , __pNoContentImageLabel(null)
+       , __pNoContentTextLabel(null)
+       , __pThumbnail(null)
 {
-       //AppLogDebug("ArtistListPanel");
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 
 ArtistListPanel::~ArtistListPanel(void)
 {
-       //AppLogDebug("~ArtistListPanel");
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 
 bool
 ArtistListPanel::Initialize(void)
 {
-       //AppLogDebug("Initialize");
-       result r = Construct(Rectangle(INIT_VALUE, INIT_VALUE, INIT_VALUE, INIT_VALUE)); // Should be set proper area at OnInitializing().
+       AppLogDebug("ENTER");
+       result r = BasePanel::Construct(Rectangle(INIT_VALUE, INIT_VALUE, INIT_VALUE, INIT_VALUE)); // Should be set proper area at OnInitializing().
        if (IsFailed(r))
        {
                return false;
        }
+       AppLogDebug("EXIT");
        return true;
 }
 
 result
 ArtistListPanel::OnInitializing(void)
 {
-       //AppLogDebug("OnInitializing");
+       AppLogDebug("ENTER");
        Form* pForm = dynamic_cast<Form*>(GetParent());
        AppAssert(pForm);
 
-       int width  = pForm->GetClientAreaBounds().width;
+       int width = pForm->GetClientAreaBounds().width;
        int height = pForm->GetClientAreaBounds().height;
 
        SetBounds(INIT_VALUE, INIT_VALUE, width, height);
@@ -74,15 +85,15 @@ ArtistListPanel::OnInitializing(void)
        __pContentTableView->AddTableViewItemEventListener(*this);
 
        __pNoContentImageLabel = new (std::nothrow) Label();
-       __pNoContentImageLabel->Construct(Rectangle((pForm->GetWidth() - W_NO_CONTENT)/ 2, Y_GAP_NO_CONTENT, W_NO_CONTENT, H_NO_CONTENT),L"");
+       __pNoContentImageLabel->Construct(Rectangle((pForm->GetWidth() - W_NO_CONTENT) / 2, Y_GAP_NO_CONTENT, W_NO_CONTENT, H_NO_CONTENT), L"");
        __pNoContentImageLabel->SetBackgroundBitmap(*(ResourceManager::GetBitmapN(NO_CONTENT_BITMAP)));
 
        __pNoContentTextLabel = new (std::nothrow) Label();
        __pNoContentTextLabel->Construct(Rectangle(0,
-                                                                                          __pNoContentImageLabel->GetHeight() + __pNoContentImageLabel->GetY(),
-                                                                                          pForm->GetWidth(),
-                                                                                          H_TEXT_NO_CONTENT),
-                                                                                          ResourceManager::GetString(L"IDS_COM_BODY_NO_ITEMS"));
+                                                                                       __pNoContentImageLabel->GetHeight() + __pNoContentImageLabel->GetY(),
+                                                                                       pForm->GetWidth(),
+                                                                                       H_TEXT_NO_CONTENT),
+                                                                                       ResourceManager::GetString(L"IDS_COM_BODY_NO_ITEMS"));
        __pNoContentTextLabel->SetTextConfig(FONT_SIZE_NO_CONTENT, LABEL_TEXT_STYLE_BOLD);
 
        __pContextItem = new (std::nothrow) TableViewContextItem();
@@ -95,89 +106,94 @@ ArtistListPanel::OnInitializing(void)
 
        __pPresentationModel = ArtistListPresentationModel::GetInstance();
 
-       return E_SUCCESS;
+       AppLogDebug("EXIT");
+       return ThumbnailBase::Construct();
 }
 
 result
 ArtistListPanel::OnTerminating(void)
 {
+       AppLogDebug("ENTER");
        delete __pContextItem;
        __pContextItem = null;
 
+       AppLogDebug("EXIT");
        return E_SUCCESS;
 }
 
 void
 ArtistListPanel::OnActionPerformed(const Tizen::Ui::Control& source, int actionId)
 {
-       //AppLogDebug("OnActionPerformed");
-
+       AppLogDebug("ENTER");
        SceneManager* pSceneManager = SceneManager::GetInstance();
        AppAssert(pSceneManager);
 
-       switch(actionId)
+       switch (actionId)
        {
        case IDA_FOOTER_BUTTON_ADD_TO_PLAYLIST:
-       {
-               if (__pPresentationModel->GetTotalArtistCount() == 0)
                {
-                       MessageBox messageBox;
-                       messageBox.Construct(L"", ResourceManager::GetString(L"IDS_COM_BODY_NO_ITEMS"), MSGBOX_STYLE_NONE, 500);
+                       if (__pPresentationModel->GetArtistListCount() == 0)
+                       {
+                               MessageBox messageBox;
+                               messageBox.Construct(L"", ResourceManager::GetString(L"IDS_COM_BODY_NO_ITEMS"), MSGBOX_STYLE_NONE, 500);
 
-                       int modalResult = 0;
-                       messageBox.ShowAndWait(modalResult);
-                       break;
+                               int modalResult = 0;
+                               messageBox.ShowAndWait(modalResult);
+                               break;
+                       }
+                       pSceneManager->GoForward(ForwardSceneTransition(IDSCN_ARTIST_LIST_EDITOR));
                }
-               pSceneManager->GoForward(ForwardSceneTransition(IDSCN_ARTIST_LIST_EDITOR));
                break;
-       }
+
        case IDA_FLICK_BUTTON_ADD_TO_PALYLIST:
-       {
-               if (__pPlayListPickerPopup == null)
                {
                        __pPlayListPickerPopup = new (std::nothrow) PlayListPickerPopup();
-                       __pPlayListPickerPopup->Initialize();
+                       __pPlayListPickerPopup->Initialize(this, __pPresentationModel->GetContentPathListN(__itemIndex));
+                       //__pPlayListPickerPopup->SetCollectedContent(__pPresentationModel->GetContentPathListN(__itemIndex));
+                       __pPlayListPickerPopup->SetShowState(true);
+                       __pPlayListPickerPopup->Show();
                }
-
-               __pPlayListPickerPopup->SetCollectedContent(__pPresentationModel->SearchContentItemN(__itemIndex));
-               __pPlayListPickerPopup->SetShowState(true);
-               __pPlayListPickerPopup->Show();
                break;
-       }
+
        case IDA_FOOTER_BUTTON_SEARCH:
-       {
-               pSceneManager->GoForward(ForwardSceneTransition(IDSCN_SEARCH));
+               {
+                       pSceneManager->GoForward(ForwardSceneTransition(IDSCN_SEARCH));
+               }
+               break;
+
+       default:
                break;
-       }
        }//end of switch
+       AppLogDebug("EXIT");
 }
 
 void
 ArtistListPanel::OnFormBackRequested(Tizen::Ui::Controls::Form& source)
 {
+       AppLogDebug("ENTER");
        if (CommonUtil::GetAddtoPlaylistState() == true)
        {
                SceneManager* pSceneManager = SceneManager::GetInstance();
                AppAssert(pSceneManager);
                pSceneManager->GoForward(ForwardSceneTransition(IDSCN_PLAYLIST_LIST,
-                                                        SCENE_TRANSITION_ANIMATION_TYPE_NONE,
-                                                        SCENE_HISTORY_OPTION_NO_HISTORY,
-                                                        SCENE_DESTROY_OPTION_DESTROY));
+                                                               SCENE_TRANSITION_ANIMATION_TYPE_NONE,
+                                                               SCENE_HISTORY_OPTION_NO_HISTORY,
+                                                               SCENE_DESTROY_OPTION_DESTROY));
                CommonUtil::SetAddtoPlaylistState(false);
        }
        else
        {
                Tizen::App::Application::GetInstance()->Terminate();
        }
+       AppLogDebug("EXIT");
 }
 
 void
 ArtistListPanel::OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previousSceneId,
-                                                              const Tizen::Ui::Scenes::SceneId& currentSceneId,
-                                                              Tizen::Base::Collection::IList* pArgs)
+                                                               const Tizen::Ui::Scenes::SceneId& currentSceneId,
+                                                               Tizen::Base::Collection::IList* pArgs)
 {
-       //AppLogDebug("OnSceneActivatedN");
-
+       AppLogDebug("ENTER");
        Form* pForm = dynamic_cast<Form*>(GetParent());
        AppAssert(pForm);
 
@@ -204,19 +220,19 @@ ArtistListPanel::OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previousSce
        UpdateContentList();
        if (__pPresentationModel != null)
        {
-               int totalArtistCount = __pPresentationModel->GetTotalArtistCount();
+               int totalArtistCount = __pPresentationModel->GetArtistListCount();
                CommonUtil::SetButtonEnabled(*pForm, totalArtistCount, IDA_FOOTER_BUTTON_ADD_TO_PLAYLIST);
 
                CommonUtil::ShowNoContentImage(totalArtistCount, *__pContentTableView, *__pNoContentImageLabel, *__pNoContentTextLabel);
        }
+       AppLogDebug("EXIT");
 }
 
 void
 ArtistListPanel::OnSceneDeactivated(const Tizen::Ui::Scenes::SceneId& currentSceneId,
-                                                               const Tizen::Ui::Scenes::SceneId& nextSceneId)
+                                                               const Tizen::Ui::Scenes::SceneId& nextSceneId)
 {
-       //AppLogDebug("OnSceneDeactivated");
-
+       AppLogDebug("ENTER");
        Form* pForm = dynamic_cast<Form*>(GetParent());
        AppAssert(pForm);
 
@@ -224,80 +240,76 @@ ArtistListPanel::OnSceneDeactivated(const Tizen::Ui::Scenes::SceneId& currentSce
        pFooter->RemoveAllButtons();
        pFooter->RemoveAllItems();
        pFooter->RemoveActionEventListener(*this);
+       CancelAllThumbnailRequest();
+       AppLogDebug("EXIT");
 }
 
 int
 ArtistListPanel::GetItemCount(void)
 {
-       //AppLogDebug("GetItemCount");
-
+       AppLogDebug("ENTER");
        if (__pPresentationModel == null)
        {
                return INIT_VALUE;
        }
-       return __pPresentationModel->GetTotalArtistCount();
+       AppLogDebug("EXIT");
+       return __pPresentationModel->GetArtistListCount();
 }
 
 Tizen::Ui::Controls::TableViewItem*
 ArtistListPanel::CreateItem(const int itemIndex, int itemWidth)
 {
-       //AppLogDebug("CreateTableViewItem");
-       ContentInformationStruct* pContentInfoStruct = __pPresentationModel->GetContentInfoN(itemIndex);
+       AppLogDebug("ENTER");
+       ContentInformation* pContentInfoStruct = __pPresentationModel->GetArtistnIfoN(itemIndex);
        if (pContentInfoStruct == null)
        {
                return null;
        }
 
-       TableViewItem* pItem = new (std::nothrow) TableViewItem;
+       TableViewItem* pItem = new (std::nothrow) TableViewItem();
        pItem->Construct(Dimension(itemWidth, ITEM_HEIGHT), TABLE_VIEW_ANNEX_STYLE_NORMAL);
        pItem->SetBackgroundColor(COLOR_ITEM);
 
-       CommonUtil::CreateTableViewItem(*pItem, *(pContentInfoStruct->pThumbnail), pContentInfoStruct->ArtistName, __pPresentationModel->GetTotalContentCount(itemIndex));
+       RequestThumbnail(pContentInfoStruct->contentId, (new (std::nothrow) int(itemIndex)));
+       CommonUtil::CreateTableViewItem(*pItem, *GetDefaultThumbnail(), pContentInfoStruct->ArtistName, __pPresentationModel->GetArtistContentCount(itemIndex));
        pItem->SetContextItem(__pContextItem);
 
-       //test_code_start
-       delete pContentInfoStruct->pThumbnail;
-       pContentInfoStruct->pThumbnail = null;
-
        delete pContentInfoStruct;
        pContentInfoStruct = null;
-       //test_code_end
 
+       AppLogDebug("EXIT");
        return pItem;
 }
 
-void
-ArtistListPanel::UpdateItem(int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem)
-{
-}
-
 int
 ArtistListPanel::GetDefaultItemHeight(void)
 {
-       //AppLogDebug("UpdateItem");
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
        return ITEM_HEIGHT;
 }
 
 bool
 ArtistListPanel::DeleteItem(const int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem)
 {
-       //AppLogDebug("DeleteItem");
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
        return true;
 }
 
 void
 ArtistListPanel::OnTableViewItemStateChanged(Tizen::Ui::Controls::TableView& tableView,
-                                             int itemIndex,
-                                             Tizen::Ui::Controls::TableViewItem* pItem,
-                                             Tizen::Ui::Controls::TableViewItemStatus status)
+                                                       int itemIndex,
+                                                       Tizen::Ui::Controls::TableViewItem* pItem,
+                                                       Tizen::Ui::Controls::TableViewItemStatus status)
 {
-       //AppLogDebug("OnTableViewItemStateChanged");
+       AppLogDebug("ENTER");
        SceneManager* pSceneManager = SceneManager::GetInstance();
        AppAssert(pSceneManager);
 
        if (status == TABLE_VIEW_ITEM_STATUS_SELECTED)
        {
-               ContentInformationStruct* pContentInfoStruct = __pPresentationModel->GetContentInfoN(itemIndex);
+               ContentInformation* pContentInfoStruct = __pPresentationModel->GetArtistnIfoN(itemIndex);
                if (pContentInfoStruct == null)
                {
                        return;
@@ -305,48 +317,47 @@ ArtistListPanel::OnTableViewItemStateChanged(Tizen::Ui::Controls::TableView& tab
 
                ArrayList* pData = new (std::nothrow) ArrayList();
                pData->Construct();
-               pData->Add(*(new (std::nothrow)String(pContentInfoStruct->ArtistName)));
-
-               //test_code_start
-               delete pContentInfoStruct->pThumbnail;
-               pContentInfoStruct->pThumbnail = null;
+               pData->Add(*(new (std::nothrow) String(pContentInfoStruct->ArtistName)));
 
                delete pContentInfoStruct;
                pContentInfoStruct = null;
-               //test_code_end
 
                pSceneManager->GoForward(ForwardSceneTransition(IDSCN_ARTIST_ALBUM_LIST), pData);
        }
+       AppLogDebug("EXIT");
 }
 
 void
 ArtistListPanel::OnTableViewContextItemActivationStateChanged(Tizen::Ui::Controls::TableView& tableView,
-                                                              int itemIndex,
-                                                              Tizen::Ui::Controls::TableViewContextItem* pContextItem,
-                                                              bool activated)
+                                                                       int itemIndex,
+                                                                       Tizen::Ui::Controls::TableViewContextItem* pContextItem,
+                                                                       bool activated)
 {
-       if(activated == true)
+       AppLogDebug("ENTER");
+       if (activated == true)
        {
                __itemIndex = itemIndex;
        }
+       AppLogDebug("EXIT");
 }
 
 void
 ArtistListPanel::OnTableViewItemReordered(Tizen::Ui::Controls::TableView& tableView,
-                                          int itemIndexFrom,
-                                          int itemIndexTo)
+                                               int itemIndexFrom,
+                                               int itemIndexTo)
 {
-
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 
 void
 ArtistListPanel::OnFastScrollIndexSelected(Tizen::Ui::Control& source, Tizen::Base::String& index)
 {
-       AppLogDebug("Start");
-       int totalCount = __pPresentationModel->GetTotalArtistCount();
-       for(int iCount = 0; iCount < totalCount; iCount++)
+       AppLogDebug("ENTER");
+       int totalCount = __pPresentationModel->GetArtistListCount();
+       for (int iCount = 0; iCount < totalCount; iCount++)
        {
-               String* pName = __pPresentationModel->GetContentName(iCount);
+               String* pName = __pPresentationModel->GetArtistName(iCount);
                String firstCharacter;
 
                pName->SubString(0, 1, firstCharacter);
@@ -357,12 +368,12 @@ ArtistListPanel::OnFastScrollIndexSelected(Tizen::Ui::Control& source, Tizen::Ba
 
                if (Character::GetUnicodeCategory(language) == UNICODE_HANGUL)
                {
-                       Tizen::Base::String HangulIndex[] = {"ㄱ", "ㄲ", "ㄴ", "ㄷ", "ㄸ", "ㄹ", "ㅁ", "ㅂ", "ㅃ","ㅅ", "ㅆ", "ㅇ" , "ㅈ", "ㅉ", "ㅊ", "ㅋ", "ㅌ", "ㅍ", "ㅎ"        };
+                       Tizen::Base::String HangulIndex[] = {"ㄱ", "ㄲ", "ㄴ", "ㄷ", "ㄸ", "ㄹ", "ㅁ", "ㅂ", "ㅃ", "ㅅ", "ㅆ", "ㅇ" , "ㅈ", "ㅉ", "ㅊ", "ㅋ", "ㅌ", "ㅍ", "ㅎ"};
 
                        wchar_t songName;
                        pName->GetCharAt(0, songName);
 
-                       wchar_t UnicodeValue     = (songName - 0xAC00);
+                       wchar_t UnicodeValue = (songName - 0xAC00);
                        wchar_t InitialConsonant = ((UnicodeValue - (UnicodeValue % 28)) / 28) / 21;
                        int tempIndex = static_cast<int>(InitialConsonant);
 
@@ -383,20 +394,78 @@ ArtistListPanel::OnFastScrollIndexSelected(Tizen::Ui::Control& source, Tizen::Ba
                        break;
                }
        }//end of for
+       AppLogDebug("EXIT");
 }
 
 void
 ArtistListPanel::OnUpdateContentList(void)
 {
+       AppLogDebug("ENTER");
        UpdateContentList();
+       AppLogDebug("EXIT");
 }
 
 void
 ArtistListPanel::UpdateContentList(void)
 {
+       AppLogDebug("ENTER");
        if (__pPresentationModel != null && __pContentTableView != null)
        {
-               __pPresentationModel->RefreshContent();
+               __pPresentationModel->UpdateArtistList();
                __pContentTableView->UpdateTableView();
        }
+       AppLogDebug("EXIT");
+}
+
+void
+ArtistListPanel::OnThumbnailInfoReveivedN(ThumbnailInfo* pThumbnailInfo)
+{
+       AppLogDebug("ENTER");
+       int itemIndex = 0;
+       void* pParam = null;
+       __pThumbnail = pThumbnailInfo->GetBitmapN();
+       pParam = pThumbnailInfo->GetUserParamN();
+       if (pParam)
+       {
+               itemIndex = *(static_cast<int*>(pParam));
+       }
+       __pContentTableView->RefreshItem(itemIndex, TABLE_VIEW_REFRESH_TYPE_ITEM_MODIFY);
+       delete pThumbnailInfo;
+       delete static_cast<int*>(pParam);
+       AppLogDebug("EXIT");
+}
+
+void
+ArtistListPanel::OnUserEventReceivedN(RequestId requestId, Tizen::Base::Collection::IList* pArgs)
+{
+       AppLogDebug("ENTER");
+       AppLogDebug("OnUserEventReceivedN %d", requestId);
+       if (requestId == ID_DESTORY_PLAY_LIST_PICKER_POPUP)
+       {
+               if (__pPlayListPickerPopup != null)
+               {
+                       delete __pPlayListPickerPopup;
+                       __pPlayListPickerPopup = null;
+               }
+       }
+       AppLogDebug("EXIT");
 }
+
+void
+ArtistListPanel::UpdateItem(int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem)
+{
+       AppLogDebug("ENTER");
+       Label* pThumbnailLabel = static_cast<Label*>(pItem->GetControl(L"pSongThumbnailLabel"));
+       if (__pThumbnail == null || pThumbnailLabel == null)
+       {
+               AppLogDebug("__pThumbnail or pThumbnailLabel is null");
+               delete __pThumbnail;
+               __pThumbnail = null;
+               return;
+       }
+       pThumbnailLabel->SetBackgroundBitmap(*__pThumbnail);
+       delete __pThumbnail;
+       __pThumbnail = null;
+       pThumbnailLabel->Invalidate(true);
+       AppLogDebug("EXIT");
+}
\ No newline at end of file
index a53cd88..998bec3 100644 (file)
@@ -1,4 +1,4 @@
-//
+//
 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
 //
 // Licensed under the Flora License, Version 1.0 (the License);
 // limitations under the License.
 //
 
+/**
+ * @file               MpArtistListPresentationModel.cpp
+ * @brief              This is the implementation file for ArtistListPresentationModel class.
+ */
+
 #include "MpArtistListPresentationModel.h"
 
 using namespace Tizen::Base;
 using namespace Tizen::Base::Collection;
 using namespace Tizen::Content;
 using namespace Tizen::Graphics;
-using namespace Tizen::Ui::Controls;
 using namespace Tizen::Social;
+using namespace Tizen::Ui::Controls;
 
 ArtistListPresentationModel* ArtistListPresentationModel::pArtistListPresentationModelInstance = null;
 
 ArtistListPresentationModel*
 ArtistListPresentationModel::GetInstance(void)
 {
-       //AppLogDebug("GetInstance");
+       AppLogDebug("ENTER");
        if (pArtistListPresentationModelInstance == null)
        {
                pArtistListPresentationModelInstance = new (std::nothrow) ArtistListPresentationModel();
@@ -37,6 +42,7 @@ ArtistListPresentationModel::GetInstance(void)
                result r = pArtistListPresentationModelInstance->Construct();
                TryCatch(r == E_SUCCESS, , null, "ArtistListPresentationModel instance is not constrcuted.");
        }
+       AppLogDebug("EXIT");
        return pArtistListPresentationModelInstance;
 
 CATCH:
@@ -45,231 +51,208 @@ CATCH:
 }
 
 ArtistListPresentationModel::ArtistListPresentationModel(void)
-: __pArtistList(null)
-, __pAllSongList(null)
-, __pSongList(null)
-, __pArtistAlbumList(null)
+       : __pArtistList(null)
+       , __pArtistContentList(null)
+       , __pArtistAlbumContentList(null)
+       , __pArtistAlbumList(null)
+       , __currentArtistAlbumIndex(-1)
 {
-       //AppLogDebug("ArtistListPresentationModel");
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 
 ArtistListPresentationModel::~ArtistListPresentationModel(void)
 {
-       //AppLogDebug("~ArtistListPresentationModel");
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 
 result
 ArtistListPresentationModel::Construct(void)
 {
-       //AppLogDebug("Construct");
-
+       AppLogDebug("ENTER");
        result r = E_SUCCESS;
-
-       __pArtistList = CommonUtil::SearchContentList(STRING_SORT_ARTIST);
-
+       AppLogDebug("EXIT");
        return r;
 }
 
 int
-ArtistListPresentationModel::GetTotalContentCount(int index)
+ArtistListPresentationModel::GetArtistContentCount(int artistIndex)
 {
+       AppLogDebug("ENTER");
        if (__pArtistList == null)
        {
-               return 0;
+               return INIT_VALUE;
        }
 
        if (__pArtistList->GetCount() == 0)
        {
-               return 0;
+               return INIT_VALUE;
        }
 
-       String WhereExpr = null;
-       WhereExpr  = CommonUtil::SpecialReplaceChange(*(static_cast<String*>(__pArtistList->GetAt(index))));
-       WhereExpr  = CommonUtil::MakeQuery(STRING_SORT_ARTIST, WhereExpr);
-       IList* pSearchList = CommonUtil::SearchContentList(WhereExpr, STRING_SORT_TITLE);
-
-       if (pSearchList == null)
+       IList* pContentSearchResultList = CommonUtil::ContentSearchResultListN(
+                                                                               *(static_cast<String*>(__pArtistList->GetAt(artistIndex))), STRING_SORT_ARTIST, STRING_SORT_TITLE);
+       if (pContentSearchResultList == null)
        {
-               return null;
+               AppLogDebug("CommonUtil::ContentSearchResultListN() failed");
+               return INIT_VALUE;
        }
 
-       int totalCount = pSearchList->GetCount();
+       int totalCount = pContentSearchResultList->GetCount();
 
-       pSearchList->RemoveAll(true);
-       delete pSearchList;
-       pSearchList = null;
+       pContentSearchResultList->RemoveAll(true);
+       delete pContentSearchResultList;
 
+       AppLogDebug("EXIT");
        return totalCount;
 }
 
 int
-ArtistListPresentationModel::GetTotalAlbumContentCount(int index)
+ArtistListPresentationModel::GetArtistAlbumContentCount(int albumIndex)
 {
+       AppLogDebug("ENTER");
        if (__pArtistAlbumList == null)
        {
-               return 0;
+               return INIT_VALUE;
+       }
+/*
+       if ((__pArtistAlbumContentList != null) && __currentArtistAlbumIndex == albumIndex)
+       {
+               totalCount = __pArtistAlbumContentList->GetCount();
+               AppLogDebug("%d %d %d", totalCount, __currentArtistAlbumIndex, albumIndex);
+       }
+       else
+*/
+       IList* pContentSearchResultList = CommonUtil::ContentSearchResultListN(
+                                                                               *(static_cast<String*>(__pArtistAlbumList->GetAt(albumIndex))), STRING_SORT_ALBUM, STRING_SORT_TITLE);
+       if (pContentSearchResultList == null)
+       {
+               AppLogDebug("CommonUtil::ContentSearchResultListN() failed");
+               return INIT_VALUE;
        }
 
-       String WhereExpr = null;
-       WhereExpr = CommonUtil::SpecialReplaceChange(*(static_cast<String*>(__pArtistAlbumList->GetAt(index))));
-       WhereExpr = CommonUtil::MakeQuery(STRING_SORT_ALBUM, WhereExpr);
-       IList* pSearchList = CommonUtil::SearchContentList(WhereExpr, STRING_SORT_TITLE);
-       TryReturn(pSearchList != null, 0, "pSearchList is null.")
-
-       int totalCount = pSearchList->GetCount();
+       int totalCount = pContentSearchResultList->GetCount();
 
-       pSearchList->RemoveAll(true);
-       delete pSearchList;
-       pSearchList = null;
+       pContentSearchResultList->RemoveAll(true);
+       delete pContentSearchResultList;
 
+       AppLogDebug("EXIT");
        return totalCount;
 }
 
 int
-ArtistListPresentationModel::GetTotalArtistCount(void)
+ArtistListPresentationModel::GetArtistListCount(void)
 {
-       //AppLogDebug("GetTotalArtistCount");
+       AppLogDebug("ENTER");
        if (__pArtistList == null)
        {
                return INIT_VALUE;
        }
 
        int retValue = __pArtistList->GetCount();
+       AppLogDebug("EXIT");
        return retValue;
 }
 
 int
-ArtistListPresentationModel::GetTotalArtistAlbumCount(void)
+ArtistListPresentationModel::GetArtistAlbumListCount(void)
 {
-       //AppLogDebug("GetTotalArtistAlbumCount");
+       AppLogDebug("ENTER");
        if (__pArtistAlbumList == null)
        {
-               return 0;
+               return INIT_VALUE;
        }
-
+       AppLogDebug("EXIT");
        return __pArtistAlbumList->GetCount();
 }
 
-ContentInformationStruct*
-ArtistListPresentationModel::GetContentInfoN(const int index)
+ContentInformation*
+ArtistListPresentationModel::GetArtistnIfoN(const int artistIndex)
 {
+       AppLogDebug("ENTER");
        if (__pArtistList == null)
        {
-               return 0;
+               AppLogDebug("__pArtistList is null");
+               return null;
        }
 
-       String WhereExpr = null;
-       WhereExpr = CommonUtil::SpecialReplaceChange(*(static_cast<String*>(__pArtistList->GetAt(index))));
-       WhereExpr = CommonUtil::MakeQuery(STRING_SORT_ARTIST, WhereExpr);
-       IList* pSearchList = CommonUtil::SearchContentList(WhereExpr, STRING_SORT_TITLE);
-
-       if (pSearchList == null)
+       IList* pContentSearchResultList = CommonUtil::ContentSearchResultListN(
+                                                                               *(static_cast<String*>(__pArtistList->GetAt(artistIndex))), STRING_SORT_ARTIST, STRING_SORT_TITLE);
+       if (pContentSearchResultList == null)
        {
+               AppLogDebug("CommonUtil::ContentSearchResultListN() failed");
                return null;
        }
 
-       ContentInformationStruct* pContentInfoStruct = null;
-       ContentSearchResult* pResult = static_cast<ContentSearchResult*>(pSearchList->GetAt(INIT_VALUE));
-       if(pResult != null && pResult->GetContentType() == CONTENT_TYPE_AUDIO)
+       ContentInformation* pContentInformation = null;
+       ContentSearchResult* pResult = static_cast<ContentSearchResult*>(pContentSearchResultList->GetAt(INIT_VALUE));
+       if (pResult != null && pResult->GetContentType() == CONTENT_TYPE_AUDIO)
        {
-               AudioContentInfo* pAudioContentInfo = static_cast<AudioContentInfo*>(pResult->GetContentInfo());
-               pContentInfoStruct = CommonUtil::GetContentInformationStructN(*pAudioContentInfo);
+               pContentInformation = CommonUtil::GetContentInformationN(*static_cast<AudioContentInfo*>(pResult->GetContentInfo()));
        }
 
-       pSearchList->RemoveAll(true);
-       delete pSearchList;
-       pSearchList = null;
+       pContentSearchResultList->RemoveAll(true);
+       delete pContentSearchResultList;
 
-       return pContentInfoStruct;
+       AppLogDebug("EXIT");
+       return pContentInformation;
 }
 
-ContentInformationStruct*
-ArtistListPresentationModel::GetArtistAlbumContentInfoN(const int index)
+ContentInformation*
+ArtistListPresentationModel::GetArtistAlbumInfoN(const int albumIndex)
 {
-       if (__pArtistAlbumList == null)
+       AppLogDebug("ENTER");
+       if (__pArtistAlbumList == null || __pArtistAlbumList->GetCount() == 0)
        {
+               AppLogDebug("__pArtistAlbumList is null or GetCount() is zero");
                return null;
        }
 
-       if (__pArtistAlbumList->GetCount() == 0)
-       {
-               return null;
-       }
-
-       String WhereExpr = null;
-       WhereExpr = CommonUtil::SpecialReplaceChange(*(static_cast<String*>(__pArtistAlbumList->GetAt(index))));
-       WhereExpr = CommonUtil::MakeQuery(STRING_SORT_ALBUM, WhereExpr);
-       IList* pSearchList = CommonUtil::SearchContentList(WhereExpr, STRING_SORT_TITLE);
-
-       if (pSearchList == null)
+       IList* pContentSearchResultList = CommonUtil::ContentSearchResultListN(
+                                                                               *(static_cast<String*>(__pArtistAlbumList->GetAt(albumIndex))), STRING_SORT_ALBUM, STRING_SORT_TITLE);
+       if (pContentSearchResultList == null)
        {
+               AppLogDebug("CommonUtil::ContentSearchResultListN() failed");
                return null;
        }
 
-       ContentInformationStruct* pContentInfoStruct = null;
-       ContentSearchResult* pResult = static_cast<ContentSearchResult*>(pSearchList->GetAt(INIT_VALUE));
-       if(pResult != null && pResult->GetContentType() == CONTENT_TYPE_AUDIO)
+       ContentInformation* pContentInformation = null;
+       ContentSearchResult* pResult = static_cast<ContentSearchResult*>(pContentSearchResultList->GetAt(INIT_VALUE));
+       if (pResult != null && pResult->GetContentType() == CONTENT_TYPE_AUDIO)
        {
-               AudioContentInfo* pAudioContentInfo = static_cast<AudioContentInfo*>(pResult->GetContentInfo());
-               pContentInfoStruct = CommonUtil::GetContentInformationStructN(*pAudioContentInfo);
+               pContentInformation = CommonUtil::GetContentInformationN(*static_cast<AudioContentInfo*>(pResult->GetContentInfo()));
        }
 
-       pSearchList->RemoveAll(true);
-       delete pSearchList;
-       pSearchList = null;
+       pContentSearchResultList->RemoveAll(true);
+       delete pContentSearchResultList;
 
-       return pContentInfoStruct;
+       AppLogDebug("EXIT");
+       return pContentInformation;
 }
 
-ContentInformationStruct*
-ArtistListPresentationModel::GetAllSongContentInfoN(const int index)
+ContentInformation*
+ArtistListPresentationModel::GetArtistContentInfoN(const int contentIndex)
 {
-       ContentInformationStruct* pContentInfoStruct = null;
+       AppLogDebug("ENTER");
+       ContentInformation* pContentInformation = null;
 
-       ContentSearchResult* pResult = static_cast<ContentSearchResult*>(__pAllSongList->GetAt(index));
-       if(pResult->GetContentType() == CONTENT_TYPE_AUDIO)
+       ContentSearchResult* pResult = static_cast<ContentSearchResult*>(__pArtistContentList->GetAt(contentIndex));
+       if (pResult->GetContentType() == CONTENT_TYPE_AUDIO)
        {
-               AudioContentInfo* pAudioContentInfo = static_cast<AudioContentInfo*>(pResult->GetContentInfo());
-               pContentInfoStruct = CommonUtil::GetContentInformationStructN(*pAudioContentInfo);
+               pContentInformation = CommonUtil::GetContentInformationN(*static_cast<AudioContentInfo*>(pResult->GetContentInfo()));
        }
 
-       return pContentInfoStruct;
-}
-
-Tizen::Base::Collection::ArrayList*
-ArtistListPresentationModel::GetAllSongContentList(void)
-{
-       AppLogDebug("Start");
-       if (__pAllSongList == null)
-       {
-               AppLogDebug("End");
-               return null;
-       }
-
-       String StrTemp = null;
-       ContentSearchResult* pResult = null;
-       ArrayList* pTempPath = new ArrayList();
-       pTempPath->Construct();
-
-       for(int iCount = INIT_VALUE; iCount < __pAllSongList->GetCount(); iCount++)
-       {
-               pResult = static_cast<ContentSearchResult*>(__pAllSongList->GetAt(iCount));
-               if(pResult != null)
-               {
-                       StrTemp = pResult->GetContentInfo()->GetContentPath();
-                       pTempPath->Add(*(new String(StrTemp)));
-               }
-       }
-       AppLogDebug("End");
-    return pTempPath;
+       AppLogDebug("EXIT");
+       return pContentInformation;
 }
 
 void
-ArtistListPresentationModel::SearchArtistAlbum(Tizen::Base::String& keyword)
+ArtistListPresentationModel::InitializeArtistAlbumList(Tizen::Base::String& keyWord)
 {
+       AppLogDebug("ENTER");
        if (__pArtistAlbumList == null)
        {
-               __pArtistAlbumList = new ArrayList();
+               __pArtistAlbumList = new (std::nothrow) ArrayList();
                __pArtistAlbumList->Construct();
        }
        else
@@ -277,28 +260,24 @@ ArtistListPresentationModel::SearchArtistAlbum(Tizen::Base::String& keyword)
                __pArtistAlbumList->RemoveAll(true);
        }
 
-       if (__pAllSongList != null)
+       if (__pArtistContentList != null)
        {
-               __pAllSongList->RemoveAll(true);
+               __pArtistContentList->RemoveAll(true);
+               delete __pArtistContentList;
        }
 
-       String WhereExpr = keyword;
-       WhereExpr = CommonUtil::SpecialReplaceChange(WhereExpr);
-       WhereExpr = CommonUtil::MakeQuery(STRING_SORT_ARTIST, WhereExpr);
-       IList* pSearchList = CommonUtil::SearchContentList(WhereExpr, STRING_SORT_ALBUM);
-
-       if (pSearchList == null)
+       IList* pContentSearchResultList = CommonUtil::ContentSearchResultListN(keyWord, STRING_SORT_ARTIST, STRING_SORT_ALBUM);
+       if (pContentSearchResultList == null)
        {
+               AppLogDebug("CommonUtil::ContentSearchResultListN() failed");
                return;
        }
 
-       ContentSearchResult* pResult = null;
-       String tempAlbumName;;
-
-       int contentTotalCount = pSearchList->GetCount();
-       for(int iCount = 0; iCount < contentTotalCount; iCount++)
+       String tempAlbumName;
+       int contentTotalCount = pContentSearchResultList->GetCount();
+       for (int iCount = 0; iCount < contentTotalCount; iCount++)
        {
-               pResult = static_cast<ContentSearchResult*>(pSearchList->GetAt(iCount));
+               ContentSearchResult* pResult = static_cast<ContentSearchResult*>(pContentSearchResultList->GetAt(iCount));
                if (pResult == null)
                {
                        continue;
@@ -311,150 +290,229 @@ ArtistListPresentationModel::SearchArtistAlbum(Tizen::Base::String& keyword)
                }
        }
 
-       pSearchList->RemoveAll(true);
-       delete pSearchList;
-       pSearchList = null;
+       pContentSearchResultList->RemoveAll(true);
+       delete pContentSearchResultList;
 
-       __pAllSongList = CommonUtil::SearchContentList(WhereExpr, STRING_SORT_TITLE);
+       __pArtistContentList = CommonUtil::ContentSearchResultListN(keyWord, STRING_SORT_ARTIST, STRING_SORT_TITLE);
+       AppLogDebug("EXIT");
 }
 
 int
-ArtistListPresentationModel::GetTotalAllSongCount(void)
+ArtistListPresentationModel::GetArtistContentListCount(void)
 {
-       if (__pAllSongList == null)
+       AppLogDebug("ENTER");
+       if (__pArtistContentList == null)
        {
                return INIT_VALUE;
        }
-       return __pAllSongList->GetCount();
+       AppLogDebug("EXIT");
+       return __pArtistContentList->GetCount();
 }
 
 void
 ArtistListPresentationModel::DeleteArtistAlbum(void)
 {
+       AppLogDebug("ENTER");
        if (__pArtistAlbumList != null)
        {
                __pArtistAlbumList->RemoveAll(true);
        }
-       if (__pAllSongList != null)
+       if (__pArtistContentList != null)
        {
-               __pAllSongList->RemoveAll(true);
+               __pArtistContentList->RemoveAll(true);
        }
+       AppLogDebug("EXIT");
 }
 
 void
-ArtistListPresentationModel::RefreshContent(void)
+ArtistListPresentationModel::InitializeContentList(int albumIndex)
 {
-       if (__pArtistList != null)
+       AppLogDebug("ENTER");
+       if (__pArtistAlbumContentList != null)
        {
-               __pArtistList->RemoveAll(true);
-               __pArtistList = CommonUtil::SearchContentList(STRING_SORT_ARTIST);
+               __pArtistAlbumContentList->RemoveAll(true);
        }
-}
 
-void
-ArtistListPresentationModel::SearchSong(int index)
-{
-       if (__pSongList != null)
-       {
-               __pSongList->RemoveAll(true);
-       }
-
-       String WhereExpr = null;
-       String* pArtistName = static_cast<String*>(__pArtistList->GetAt(index));
-       WhereExpr   = CommonUtil::SpecialReplaceChange(*pArtistName);
-       WhereExpr   = CommonUtil::MakeQuery(STRING_SORT_ARTIST, WhereExpr);
-       __pSongList = CommonUtil::SearchContentList(WhereExpr, STRING_SORT_TITLE);
-}
-
-int
-ArtistListPresentationModel::GetSongContentCount(void)
-{
-       if (__pSongList == null)
-       {
-               return 0;
-       }
-       return __pSongList->GetCount();
+       __pArtistAlbumContentList = CommonUtil::ContentSearchResultListN(
+                                                               *(static_cast<String*>(__pArtistAlbumList->GetAt(albumIndex))), STRING_SORT_ALBUM, STRING_SORT_TITLE);
+       __currentArtistAlbumIndex = albumIndex;
+       AppLogDebug("EXIT");
 }
 
-ContentInformationStruct*
-ArtistListPresentationModel::GetSongContentInfoN(int index)
+ContentInformation*
+ArtistListPresentationModel::GetArtistAlbumContentInfoN(int contentIndex)
 {
-       ContentSearchResult* pResult = static_cast<ContentSearchResult*>(__pSongList->GetAt(index));
+       AppLogDebug("ENTER");
+       ContentSearchResult* pResult = static_cast<ContentSearchResult*>(__pArtistAlbumContentList->GetAt(contentIndex));
 
-       ContentInformationStruct* pContentInfoStruct = null;
+       ContentInformation* pContentInformation = null;
        if (pResult!= null && pResult->GetContentType() == CONTENT_TYPE_AUDIO)
        {
-               AudioContentInfo* pAudioContentInfo = static_cast<AudioContentInfo*>(pResult->GetContentInfo());
-               pContentInfoStruct = CommonUtil::GetContentInformationStructN(*pAudioContentInfo);
+               pContentInformation = CommonUtil::GetContentInformationN(*static_cast<AudioContentInfo*>(pResult->GetContentInfo()));
        }
 
-       return pContentInfoStruct;
+       AppLogDebug("EXIT");
+       return pContentInformation;
 }
 
 Tizen::Base::String*
-ArtistListPresentationModel::GetContentName(int index)
+ArtistListPresentationModel::GetArtistName(int artistIndex)
 {
+       AppLogDebug("ENTER");
        if (__pArtistList == null)
        {
                return null;
        }
 
-       return static_cast<String*>(__pArtistList->GetAt(index));
+       AppLogDebug("EXIT");
+       return static_cast<String*>(__pArtistList->GetAt(artistIndex));
 }
 
 Tizen::Base::Collection::ArrayList*
-ArtistListPresentationModel::SearchContentItemN(int index, SearchMode mode)
+ArtistListPresentationModel::GetContentPathListN(int index, SearchMode mode)
 {
-       AppLogDebug("Start");
+       AppLogDebug("ENTER");
 
        if (__pArtistList == null)
        {
                return null;
        }
 
-       String WhereExpr = null;
-       switch(mode)
+       IList* pContentSearchResultList = null;
+       switch (mode)
        {
        case SEARCH_MODE_ARTIST:
-       {
-               WhereExpr = CommonUtil::SpecialReplaceChange(*(static_cast<String*>(__pArtistList->GetAt(index))));
-               WhereExpr = CommonUtil::MakeQuery(STRING_SORT_ARTIST, WhereExpr);
+               {
+                       pContentSearchResultList = CommonUtil::ContentSearchResultListN(
+                                       *(static_cast<String*>(__pArtistList->GetAt(index))), STRING_SORT_ARTIST, STRING_SORT_TITLE);
+               }
                break;
-       }
+
        case SEARCH_MODE_ARTIST_ALBUM:
-       {
-               WhereExpr = CommonUtil::SpecialReplaceChange(*(static_cast<String*>(__pArtistAlbumList->GetAt(index))));
-               WhereExpr = CommonUtil::MakeQuery(STRING_SORT_ALBUM, WhereExpr);
+               {
+                       pContentSearchResultList = CommonUtil::ContentSearchResultListN(
+                                       *(static_cast<String*>(__pArtistAlbumList->GetAt(index))), STRING_SORT_ALBUM, STRING_SORT_TITLE);
+               }
                break;
-       }
+
        default:
-       {
                break;
        }
-       }//end of switch
 
-       IList* pSearchResult = CommonUtil::SearchContentList(WhereExpr, STRING_SORT_TITLE);
-       if (pSearchResult == null)
+       if (pContentSearchResultList == null)
        {
+               AppLogDebug("pContentSearchResultList is null");
                return null;
        }
 
        ArrayList* pContentPath = new (std::nothrow) ArrayList();
        pContentPath->Construct();
 
-       ContentSearchResult* pResult;
-       int totalCount = pSearchResult->GetCount();
-       for(int iCount = 0; iCount < totalCount; iCount++)
+       int totalCount = pContentSearchResultList->GetCount();
+       for (int iCount = 0; iCount < totalCount; iCount++)
        {
-               pResult = static_cast<ContentSearchResult*>(pSearchResult->GetAt(iCount));
+               ContentSearchResult* pResult = static_cast<ContentSearchResult*>(pContentSearchResultList->GetAt(iCount));
                pContentPath->Add(*(new (std::nothrow) String(pResult->GetContentInfo()->GetContentPath())));
        }
 
-       pSearchResult->RemoveAll(true);
-       delete pSearchResult;
-       pSearchResult = null;
-
-       AppLogDebug("End");
+       pContentSearchResultList->RemoveAll(true);
+       delete pContentSearchResultList;
 
+       AppLogDebug("EXIT");
        return pContentPath;
 }
+
+Tizen::Base::Collection::ArrayList*
+ArtistListPresentationModel::GetAllContentPathListN(void)
+{
+       AppLogDebug("ENTER");
+       if (__pArtistContentList == null)
+       {
+               AppLogDebug("EXIT");
+               return null;
+       }
+
+       ArrayList* pTempPath = new (std::nothrow) ArrayList();
+       pTempPath->Construct();
+
+       for (int iCount = INIT_VALUE; iCount < __pArtistContentList->GetCount(); iCount++)
+       {
+               ContentSearchResult* pResult = static_cast<ContentSearchResult*>(__pArtistContentList->GetAt(iCount));
+               if (pResult != null)
+               {
+                       String StrTemp = pResult->GetContentInfo()->GetContentPath();
+                       pTempPath->Add(*(new String(StrTemp)));
+               }
+       }
+       AppLogDebug("EXIT");
+       return pTempPath;
+}
+
+void
+ArtistListPresentationModel::RefreshContentList(int albumIndex)
+{
+       AppLogDebug("ENTER");
+       if (__pArtistAlbumContentList != null)
+       {
+               __pArtistAlbumContentList->RemoveAll(true);
+               delete __pArtistAlbumContentList;
+       }
+
+       __pArtistAlbumContentList = CommonUtil::ContentSearchResultListN(
+                                                                               *(static_cast<String*>(__pArtistAlbumList->GetAt(albumIndex))), STRING_SORT_ALBUM, STRING_SORT_TITLE);
+
+       if (__pArtistAlbumContentList != null && __pArtistAlbumContentList->GetCount() == INIT_VALUE)
+       {
+               __pArtistAlbumContentList->RemoveAll(true);
+               delete __pArtistAlbumContentList;
+               __pArtistAlbumContentList = null;
+               AppLogDebug(" __pArtistAlbumContentList->GetCount() is zero");
+       }
+       __currentArtistAlbumIndex = albumIndex;
+       AppLogDebug("EXIT");
+}
+
+int
+ArtistListPresentationModel::GetCurrentArtistAlbumIndex(void)
+{
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
+       return __currentArtistAlbumIndex;
+}
+
+void
+ArtistListPresentationModel::AddContent(String path, int playlistIndex)
+{
+       AppLogDebug("ENTER");
+       ContentInformation* pContentInfoStruct = GetArtistContentInfoN(playlistIndex);
+       PlayList* pPlayList = PlayListManager::GetInstance()->GetPlayListN(path);
+       pPlayList->AddItem(pContentInfoStruct->contentId);
+
+       delete pContentInfoStruct;
+       pContentInfoStruct = null;
+
+       delete pPlayList;
+       pPlayList = null;
+       AppLogDebug("EXIT");
+}
+
+result
+ArtistListPresentationModel::UpdateArtistList(void)
+{
+       AppLogDebug("ENTER");
+       result r = E_SUCCESS;
+
+       if (__pArtistList != null)
+       {
+               __pArtistList->RemoveAll(true);
+               delete __pArtistList;
+       }
+       __pArtistList = CommonUtil::SearchContentList(STRING_SORT_ARTIST);
+       TryCatch(__pArtistList != null, r = E_FAILURE, "__pArtistList is null");
+
+       AppLogDebug("EXIT");
+       return r;
+
+CATCH:
+       return r;
+}
\ No newline at end of file
old mode 100755 (executable)
new mode 100644 (file)
index 73dd53f..1341a2e
@@ -1,4 +1,4 @@
-//
+//
 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
 //
 // Licensed under the Flora License, Version 1.0 (the License);
 // limitations under the License.
 //
 
+/**
+ * @file               MpArtistPickerPanel.cpp
+ * @brief              This is the implementation file for ArtistPickerPanel class.
+ */
+
 #include "MpArtistPickerPanel.h"
 #include "MpNowPlayContentPanel.h"
 
@@ -21,28 +26,29 @@ using namespace Tizen::Base;
 using namespace Tizen::Base::Collection;
 using namespace Tizen::Content;
 using namespace Tizen::Graphics;
+using namespace Tizen::Social;
 using namespace Tizen::Ui;
 using namespace Tizen::Ui::Controls;
 using namespace Tizen::Ui::Scenes;
-using namespace Tizen::Social;
 
 ArtistPickerPanel::ArtistPickerPanel(void)
 {
-       //AppLogDebug("ArtistPickerPanel");
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 
 ArtistPickerPanel::~ArtistPickerPanel(void)
 {
-       //AppLogDebug("~ArtistPickerPanel");
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 
 void
 ArtistPickerPanel::OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previousSceneId,
-                                            const Tizen::Ui::Scenes::SceneId& currentSceneId,
-                                            Tizen::Base::Collection::IList* pArgs)
+                                                       const Tizen::Ui::Scenes::SceneId& currentSceneId,
+                                                       Tizen::Base::Collection::IList* pArgs)
 {
-       //AppLogDebug("OnSceneActivatedN");
-
+       AppLogDebug("ENTER");
        Form* pForm = dynamic_cast<Form*>(GetParent());
        AppAssert(pForm);
 
@@ -51,10 +57,10 @@ ArtistPickerPanel::OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previousS
 
        CommonUtil::CreateCancelFooter(*pForm);
        pForm->SetFormBackEventListener(this);
-
+       __pPresentationModel->UpdateArtistList();
        if (__pPresentationModel != null)
        {
-               CommonUtil::ShowNoContentImage(__pPresentationModel->GetTotalArtistCount(), *__pContentTableView, *__pNoContentImageLabel, *__pNoContentTextLabel);
+               CommonUtil::ShowNoContentImage(__pPresentationModel->GetArtistListCount(), *__pContentTableView, *__pNoContentImageLabel, *__pNoContentTextLabel);
        }
 
        if (pSceneManager->IsSceneAlive(IDSCN_PLAYER))
@@ -73,35 +79,52 @@ ArtistPickerPanel::OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previousS
                pArgs->RemoveAll(true);
                delete pArgs;
        }
+       AppLogDebug("EXIT");
 }
 
 void
 ArtistPickerPanel::OnSceneDeactivated(const Tizen::Ui::Scenes::SceneId& currentSceneId,
-                                             const Tizen::Ui::Scenes::SceneId& nextSceneId)
+                                                       const Tizen::Ui::Scenes::SceneId& nextSceneId)
 {
-       //AppLogDebug("OnSceneDeactivated");
-
+       AppLogDebug("ENTER");
        Form* pForm = dynamic_cast<Form*>(GetParent());
        AppAssert(pForm);
 
        Footer* pFooter = pForm->GetFooter();
        pFooter->RemoveAllButtons();
        pFooter->RemoveAllItems();
+       AppLogDebug("EXIT");
 }
 
 void
 ArtistPickerPanel::OnTableViewItemStateChanged(Tizen::Ui::Controls::TableView& tableView,
-                                                      int itemIndex,
-                                                      Tizen::Ui::Controls::TableViewItem* pItem,
-                                                      Tizen::Ui::Controls::TableViewItemStatus status)
+                                                               int itemIndex,
+                                                               Tizen::Ui::Controls::TableViewItem* pItem,
+                                                               Tizen::Ui::Controls::TableViewItemStatus status)
 {
-       //AppLogDebug("OnTableViewItemStateChanged");
+       AppLogDebug("ENTER");
        SceneManager* pSceneManager = SceneManager::GetInstance();
        AppAssert(pSceneManager);
 
        if (status == TABLE_VIEW_ITEM_STATUS_SELECTED)
        {
-               __pPresentationModel->SearchSong(itemIndex);
-               pSceneManager->GoForward(ForwardSceneTransition(IDSCN_ARTIST_CONTENT_PICKER));
+               //__pPresentationModel->InitializeContentList(itemIndex);
+               //pSceneManager->GoForward(ForwardSceneTransition(IDSCN_ARTIST_CONTENT_PICKER));
+
+               ContentInformation* pContentInfoStruct = __pPresentationModel->GetArtistnIfoN(itemIndex);
+               if (pContentInfoStruct == null)
+               {
+                       return;
+               }
+
+               ArrayList* pData = new (std::nothrow) ArrayList();
+               pData->Construct();
+               pData->Add(*(new (std::nothrow)String(pContentInfoStruct->ArtistName)));
+
+               delete pContentInfoStruct;
+               pContentInfoStruct = null;
+
+               pSceneManager->GoForward(ForwardSceneTransition(IDSCN_ARTIST_CONTENT_PICKER), pData);
        }
-}
+       AppLogDebug("EXIT");
+}
\ No newline at end of file
old mode 100755 (executable)
new mode 100644 (file)
index 31b101e..158ba7b
@@ -1,4 +1,4 @@
-//
+//
 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
 //
 // Licensed under the Flora License, Version 1.0 (the License);
 // limitations under the License.
 //
 
+/**
+ * @file               MpCommonUtil.cpp
+ * @brief              This is the implementation file for CommonUtil class.
+ */
+
+#include <unique_ptr.h>
 #include "MpCommonUtil.h"
-#include "unique_ptr.h"
 
+using namespace Tizen::App;
 using namespace Tizen::Base;
 using namespace Tizen::Base::Collection;
+using namespace Tizen::Content;
+using namespace Tizen::Graphics;
 using namespace Tizen::Io;
 using namespace Tizen::Ui;
 using namespace Tizen::Ui::Controls;
-using namespace Tizen::Graphics;
-using namespace Tizen::App;
-using namespace Tizen::Content;
 
 static const int H_CREATE_TABLE_VIEW_ITEM = 70;
 static const int Y_CREATE_TABLE_VIEW_ITEM = 29;
 static const int W_CREATE_TABLE_VIEW_ITEM_COUNT_LABEL_ITEM = 170;
 
 const wchar_t* SECTION_MUSIC_SETTING = L"MUSIC_SETTING";
-const wchar_t* INITIAL_TAB     = L"INITIAL_TAB";      // 0 - 7
-const wchar_t* SONGS_TAB       = L"SONGS_TAB";        // 0 - 1 (UNCHECKED, CHECKED)
-const wchar_t* ALBUMS_TAB      = L"ALBUMS_TAB";       // 0 - 1 (UNCHECKED, CHECKED)
-const wchar_t* ARTISTS_TAB     = L"ARTISTS_TAB";      // 0 - 1 (UNCHECKED, CHECKED)
-const wchar_t* GENRES_TAB      = L"GENRES_TAB";       // 0 - 1 (UNCHECKED, CHECKED)
-const wchar_t* COMPOSERS_TAB   = L"COMPOSERS_TAB";    // 0 - 1 (UNCHECKED, CHECKED)
-const wchar_t* YEARS_TAB       = L"YEARS_TAB";        // 0 - 1 (UNCHECKED, CHECKED)
-const wchar_t* FOLDERS_TAB     = L"FOLDERS_TAB";      // 0 - 1 (UNCHECKED, CHECKED)
+const wchar_t* INITIAL_TAB = L"INITIAL_TAB";      // 0 - 7
+const wchar_t* SONGS_TAB = L"SONGS_TAB";        // 0 - 1 (UNCHECKED, CHECKED)
+const wchar_t* ALBUMS_TAB = L"ALBUMS_TAB";       // 0 - 1 (UNCHECKED, CHECKED)
+const wchar_t* ARTISTS_TAB = L"ARTISTS_TAB";      // 0 - 1 (UNCHECKED, CHECKED)
+const wchar_t* GENRES_TAB = L"GENRES_TAB";       // 0 - 1 (UNCHECKED, CHECKED)
+const wchar_t* COMPOSERS_TAB = L"COMPOSERS_TAB";    // 0 - 1 (UNCHECKED, CHECKED)
+const wchar_t* YEARS_TAB = L"YEARS_TAB";        // 0 - 1 (UNCHECKED, CHECKED)
+const wchar_t* FOLDERS_TAB = L"FOLDERS_TAB";      // 0 - 1 (UNCHECKED, CHECKED)
 const wchar_t* PLAYERLISTS_TAB = L"PLAYERLISTS_TAB";  // 0 - 1 (UNCHECKED, CHECKED)
-const wchar_t* AUTO_OFF_LEVEL  = L"AUTO_OFF_LEVEL";   // 0 - 5 (OFF, 15 MIN, 30 MIN, 1 HOUR, 1 HOUR 30 MIN, 2 HOURS)
-const wchar_t* REPEAT_MODE     = L"REPEAT_MODE";      // 0 - 2 (OFF, ONE, ALL)
-const wchar_t* SHUFFLE_MODE    = L"SHUFFLE_MODE";     // 0 - 1 (OFF, ON)
-const wchar_t* VOLUME_LEVEL    = L"VOLUME_LEVEL";     // 0 - 15
+const wchar_t* AUTO_OFF_LEVEL = L"AUTO_OFF_LEVEL";   // 0 - 5 (OFF, 15 MIN, 30 MIN, 1 HOUR, 1 HOUR 30 MIN, 2 HOURS)
+const wchar_t* REPEAT_MODE = L"REPEAT_MODE";      // 0 - 2 (OFF, ONE, ALL)
+const wchar_t* SHUFFLE_MODE = L"SHUFFLE_MODE";     // 0 - 1 (OFF, ON)
+const wchar_t* VOLUME_LEVEL = L"VOLUME_LEVEL";     // 0 - 15
 
 static const wchar_t* IDS_ORIGINAL_QUOTATION = L"'";
-static const wchar_t* IDS_REPLACE_QUOTATION  = L"\\'";
-static const wchar_t* STRING_QUERY_PREFIX    = L" ='";
-static const wchar_t* STRING_QUERY_SUFFIX    = L"'";
-
-static const Tizen::Base::String DEFAULT_THUMBNAIL = L"34_thumb_07.png";
+static const wchar_t* IDS_REPLACE_QUOTATION = L"\\'";
+static const wchar_t* STRING_QUERY_PREFIX = L" ='";
+static const wchar_t* STRING_QUERY_SUFFIX = L"'";
 
 static bool __addToPlaylistState = false;
 static Tizen::Base::String __AddToPlaylistName = null;
 
-static const int Y_GAP_CONTENT_PIKER_ITEM            =  16;
-static const int W_SONG_TITLE_CONTENT_PIKER_ITEM     = 440;
-static const int H_SONG_TITLE_CONTENT_PIKER_ITEM     =  88;
-static const int W_SONG_TIME_CONTENT_PIKER_ITEM      = 155;
+static const int Y_GAP_CONTENT_PIKER_ITEM = 16;
+static const int W_SONG_TITLE_CONTENT_PIKER_ITEM = 440;
+static const int H_SONG_TITLE_CONTENT_PIKER_ITEM = 88;
+static const int W_SONG_TIME_CONTENT_PIKER_ITEM = 155;
 
 Tizen::Graphics::Bitmap*
 CommonUtil::GetContentAlbumArtN(Tizen::Base::String& path)
 {
-       AppLogDebug("Start");
+       AppLogDebug("ENTER");
        Tizen::Graphics::Bitmap* pBitmap = null;
 
        Tizen::Content::AudioMetadata* pAudioMeta = Tizen::Content::ContentManagerUtil::GetAudioMetaN(path);
        if (pAudioMeta == null)
        {
                //AppLogDebug("GetContentAlbumArt 1 : %ls", path.GetPointer());
-               AppLogDebug("End");
+               AppLogDebug("EXIT");
                return null;
        }
 
        pBitmap = pAudioMeta->GetAlbumArtN();
        delete pAudioMeta;
-       AppLogDebug("End");
 
+       AppLogDebug("EXIT");
        return pBitmap;
 }
 
 Tizen::Content::AudioContentInfo*
-CommonUtil::GetAudioContentInfo(const Tizen::Base::String& whereClause)
+CommonUtil::GetAudioContentInfoN(const Tizen::Base::String& filePath)
 {
-       AppLogDebug("Start");
-       AudioContentInfo* pAudioContentInfo = null;
+       AppLogDebug("ENTER");
+       ContentId contentId = GetContentId(filePath);
 
-       String tempWhereClause  = whereClause;
-       String retString = null;
-       String WhereExpr = null;
-       int indexOf = -1;
+       if (IsFailed(GetLastResult()))
+       {
+               AppLogDebug("filePath(%ls) failed", filePath.GetPointer());
+               SetLastResult(E_FAILURE);
+               return null;
+       }
 
-       ContentSearchResult* pResult = null;
+       ContentInfo* pContentInfo = GetContentInfoN(contentId);
+       if (pContentInfo == null || pContentInfo->GetContentType() != CONTENT_TYPE_AUDIO)
+       {
+               AppLogDebug("GetContentInfoN(%ls) failed", contentId.ToString().GetPointer());
+               delete pContentInfo;
+               SetLastResult(E_FAILURE);
+               return null;
+       }
 
-       tempWhereClause.LastIndexOf(L"/", tempWhereClause.GetLength() - 1,  indexOf);
-       tempWhereClause.SubString(indexOf + 1, retString);
+       AppLogDebug("EXIT");
+       return static_cast<AudioContentInfo*>(pContentInfo);
+}
 
-       WhereExpr = CommonUtil::SpecialReplaceChange(retString);
-       WhereExpr = CommonUtil::MakeQuery(STRING_SORT_FILE_NAME, WhereExpr);
-       Tizen::Base::Collection::IList* pSearchList = CommonUtil::SearchContentList(WhereExpr, STRING_SORT_TITLE);
+Tizen::Base::Collection::IList*
+CommonUtil::ContentSearchResultListN(const Tizen::Base::String& contentFileName,
+                                                                        const Tizen::Base::String& ColumnName,
+                                                                        const Tizen::Base::String& sortColumn,
+                                                                        Tizen::Base::SortOrder sortOrder)
+{
+       AppLogDebug("ENTER");
+       String WhereExpr = null;
+       WhereExpr = CommonUtil::SpecialReplaceChange(contentFileName);
+       WhereExpr = CommonUtil::MakeQuery(ColumnName, WhereExpr);
 
-       if (pSearchList == null || pSearchList->GetCount() == 0)
+       Tizen::Base::Collection::IList* pSearchList = CommonUtil::SearchContentList(WhereExpr, sortColumn);
+       if (pSearchList == null)
        {
+               delete pSearchList;
+               SetLastResult(E_FAILURE);
+               AppLogDebug("CommonUtil::SearchContentList failed");
                return null;
        }
+       AppLogDebug("EXIT");
+       return pSearchList;
+}
+
+Tizen::Base::String
+CommonUtil::FilePathToContentFileName(const Tizen::Base::String& filePath)
+{
+       AppLogDebug("ENTER");
+       String tempWhereClause = filePath;
+       int indexOf = -1;
+       String contentFileName = null;
 
-       Object* pObject = pSearchList->GetAt(INIT_VALUE);
-       if (pObject == null)                            // file exist but DB has not file info
+       tempWhereClause.LastIndexOf(L"/", tempWhereClause.GetLength() - 1,  indexOf);
+       tempWhereClause.SubString(indexOf + 1, contentFileName);
+       
+       AppLogDebug("EXIT");
+       return contentFileName;
+}
+
+Tizen::Content::ContentId
+CommonUtil::GetContentId(const Tizen::Base::String& filePath)
+{
+       AppLogDebug("ENTER");
+       String contentFileName = FilePathToContentFileName(filePath);
+       IList* pContentSearchResultList = ContentSearchResultListN(contentFileName, STRING_SORT_FILE_NAME, STRING_SORT_TITLE);
+       if (pContentSearchResultList == null || pContentSearchResultList->GetCount() == 0)
        {
-               return null;
+               SetLastResult(E_FAILURE);
+               delete pContentSearchResultList;
+               AppLogDebug("CommonUtil::ContentSearchResultListN(%ls) failed", filePath.GetPointer());
+               return ContentId();
+       }
+
+       ContentSearchResult* pResult = static_cast<ContentSearchResult*>(pContentSearchResultList->GetAt(INIT_VALUE));
+       if (pResult == null)
+       {
+               pContentSearchResultList->RemoveAll(true);
+               delete pContentSearchResultList;
+               SetLastResult(E_FAILURE);
+
+               AppLogDebug("pSearchList->GetAt(0) failed");
+               return ContentId();
+       }
 
+       ContentId contentId;
+       if (pResult->GetContentType() == CONTENT_TYPE_AUDIO)
+       {
+               ContentInfo* pContentInfo = pResult->GetContentInfo();
+               contentId = pContentInfo->GetContentId();
        }
-       pResult = static_cast<ContentSearchResult*>(pObject);
-       if (pResult->GetContentType() == CONTENT_TYPE_AUDIO )
+       else
        {
-               pAudioContentInfo = static_cast<AudioContentInfo*>(pResult->GetContentInfo());
+               SetLastResult(E_FAILURE);
        }
 
-       AppLogDebug("End");
-       return pAudioContentInfo;
+       pContentSearchResultList->RemoveAll(true);
+       delete pContentSearchResultList;
+
+       AppLogDebug("EXIT");
+       return contentId;
 }
 
-Tizen::Content::AudioContentInfo*
-CommonUtil::GetPlaylistAudioContentInfo(const Tizen::Base::String& contentId)
+Tizen::Content::ContentInfo*
+CommonUtil::GetContentInfoN(const Tizen::Content::ContentId& contentId)
 {
-       AppLogDebug("Start");
-       AudioContentInfo* pAudioContentInfo = null;
-
+       AppLogDebug("ENTER");
        ContentManager contentManager;
-       contentManager.Construct();
+       result r = contentManager.Construct();
+       if (IsFailed(r))
+       {
+               AppLogDebug("contentManager.Construct() failed(%s)", GetErrorMessage(r));
+               return null;
+       }
 
+       ContentInfo* pContentInfo = contentManager.GetContentInfoN(contentId);
+       AppLogDebug("EXIT");
+       return pContentInfo;
+}
+
+result
+CommonUtil::StringToContentId(const Tizen::Base::String& contentIdString, Tizen::Content::ContentId& outContentId)
+{
+       AppLogDebug("ENTER");
        ContentId pcontentId;
        UuId uuId;
-       pcontentId.Parse(contentId, uuId);
-       AppLogDebug("contentId : %ls, %ls", contentId.GetPointer(), uuId.ToString().GetPointer());
-       pAudioContentInfo = static_cast<AudioContentInfo*>(contentManager.GetContentInfoN(uuId));
+       result r = pcontentId.Parse(contentIdString, uuId);
+       if (IsFailed(r))
+       {
+               AppLogDebug("pcontentId.Parse(%s, outContentId) failed", contentIdString.GetPointer());
+               return r;
+       }
 
-       AppLogDebug("End");
-       return pAudioContentInfo;
+       outContentId = uuId;
+       AppLogDebug("EXIT");
+       return E_SUCCESS;
 }
 
 Tizen::Base::String
 CommonUtil::GetFormatDate(long dateValue)
 {
-       AppLogDebug("Start");
+       AppLogDebug("ENTER");
        String fTime;
        if (dateValue < 0)
        {
-               fTime.Format(20, L"%02d:%02d:%02d",0,0,0);
+               fTime.Format(20, L"%02d:%02d:%02d", 0, 0, 0);
        }
        else
        {
                DateTime dateTime;
-               dateTime.AddSeconds( dateValue / 1000 );
-               fTime.Format(20, L"%02d:%02d:%02d",dateTime.GetHour(),dateTime.GetMinute(),dateTime.GetSecond());
+               dateTime.AddSeconds(dateValue / 1000);
+               fTime.Format(20, L"%02d:%02d:%02d", dateTime.GetHour(), dateTime.GetMinute(), dateTime.GetSecond());
        }
-    AppLogDebug("End");
-    return fTime;
+       AppLogDebug("EXIT");
+       return fTime;
 }
 
 Tizen::Base::String
 CommonUtil::SpecialReplaceChange(const Tizen::Base::String& text)
 {
-       AppLogDebug("Start");
+       AppLogDebug("ENTER");
        String retStr = text;
        retStr.Replace(IDS_ORIGINAL_QUOTATION, IDS_REPLACE_QUOTATION);
-       AppLogDebug("End");
+       AppLogDebug("EXIT");
        return retStr;
 }
 
 Tizen::Base::Collection::IList*
 CommonUtil::SearchContentList(const Tizen::Base::String& whereExpr,
-                              const Tizen::Base::String& sortColumn,
-                              Tizen::Base::SortOrder sortOrder)
+                                       const Tizen::Base::String& sortColumn,
+                                       Tizen::Base::SortOrder sortOrder)
 {
-       AppLogDebug("Start");
+       AppLogDebug("ENTER");
        AppLogDebug("%ls, %ls", whereExpr.GetPointer(), sortColumn.GetPointer());
        int totalPage = 0;
        int totalCount = 0;
 
-    ContentSearch search;
-    search.Construct(CONTENT_TYPE_AUDIO);
-    IList* pSearchList  = search.SearchN(SEARCH_PAGE_NO, SEARCH_COUNT_PER_PAGE, totalPage, totalCount, whereExpr, sortColumn, sortOrder);
-    if (IsFailed(GetLastResult()))
-    {
-       //AppLogDebug("[Error]SearchN Null");
-       AppLogDebug("End");
-
-       delete pSearchList;
-       pSearchList = null;
-        return null;
-    }
-
-    AppLogDebug("%d", pSearchList->GetCount());
-    AppLogDebug("End");
-    return pSearchList;
+       ContentSearch search;
+       search.Construct(CONTENT_TYPE_AUDIO);
+       IList* pSearchList = search.SearchN(SEARCH_PAGE_NO, SEARCH_COUNT_PER_PAGE, totalPage, totalCount, whereExpr, sortColumn, sortOrder);
+       if (pSearchList == null)
+       {
+               AppLogDebug("pSearchList is null");
+               return null;
+       }
+
+       AppLogDebug("%d", pSearchList->GetCount());
+       AppLogDebug("EXIT");
+       return pSearchList;
 }
 
 Tizen::Base::Collection::IList*
 CommonUtil::SearchContentList(const Tizen::Base::String& columnName)
 {
-       AppLogDebug("Start");
-       int totalPage  = 0;
+       AppLogDebug("ENTER");
+       int totalPage = 0;
        int totalCount = 0;
 
-    ContentSearch search;
-    search.Construct(CONTENT_TYPE_AUDIO);
-
-    IList* pSearchList = search.GetValueListN(SEARCH_PAGE_NO,
-                                                                             SEARCH_COUNT_PER_PAGE,
-                                                                                 totalPage,
-                                                                                 totalCount,
-                                                                                 columnName,
-                                                                                 SORT_ORDER_ASCENDING);
-    if (IsFailed(GetLastResult()))
-    {
-       AppLogDebug("End");
-       //AppLogDebug("[Error]SearchN Null");
-       delete pSearchList;
-       pSearchList = null;
-        return null;
-    }
-    AppLogDebug("End");
-    return pSearchList;
+       ContentSearch search;
+       search.Construct(CONTENT_TYPE_AUDIO);
+
+       IList* pSearchList = search.GetValueListN(SEARCH_PAGE_NO, SEARCH_COUNT_PER_PAGE, totalPage, totalCount, columnName, SORT_ORDER_ASCENDING);
+       if (pSearchList == null)
+       {
+               AppLogDebug("pSearchList is null");
+               return null;
+       }
+
+       AppLogDebug("EXIT");
+       return pSearchList;
 }
 
 Tizen::Base::String
 CommonUtil::MakeQuery(const Tizen::Base::String& ColumnName,
-                         const Tizen::Base::String& SerachName)
+                               const Tizen::Base::String& SerachName)
 {
-       AppLogDebug("Start");
-       //AppLogDebug("MakeQuery");
+       AppLogDebug("ENTER");
        String MakeQueryName = null;
        result r = E_SUCCESS;
 
@@ -247,7 +320,7 @@ CommonUtil::MakeQuery(const Tizen::Base::String& ColumnName,
        r = MakeQueryName.Append(STRING_QUERY_SUFFIX);
        TryCatch(r == E_SUCCESS, , "String::MakeQuery() fail[%s]", GetErrorMessage(r));
 
-       AppLogDebug("End");
+       AppLogDebug("EXIT");
        return MakeQueryName;
 
 CATCH:
@@ -258,7 +331,7 @@ CATCH:
 int
 CommonUtil::GetValue(const Tizen::Base::String& entryName)
 {
-       AppLogDebug("Start");
+       AppLogDebug("ENTER");
        result r = E_SUCCESS;
        int value = 0;
        AppRegistry* pAppRegistry = null;
@@ -284,8 +357,9 @@ CommonUtil::GetValue(const Tizen::Base::String& entryName)
 
                pAppRegistry->Get(entryName, value);
        }
-       AppLogDebug("End");
+       AppLogDebug("EXIT");
        return value;
+
 CATCH:
        //AppLogDebug("CATCH : %s", GetErrorMessage(r));
        return r;
@@ -294,7 +368,7 @@ CATCH:
 result
 CommonUtil::SetValue(const Tizen::Base::String& entryName, const int value)
 {
-       AppLogDebug("Start");
+       AppLogDebug("ENTER");
        result r = E_SUCCESS;
        AppRegistry* pAppRegistry = null;
        pAppRegistry = UiApp::App::GetInstance()->GetAppRegistry();
@@ -322,8 +396,9 @@ CommonUtil::SetValue(const Tizen::Base::String& entryName, const int value)
        {
                pAppRegistry->Save();
        }
-       AppLogDebug("End");
+       AppLogDebug("EXIT");
        return r;
+
 CATCH:
        //AppLogDebug("CATCH : %s", GetErrorMessage(r));
        return r;
@@ -331,10 +406,10 @@ CATCH:
 
 void
 CommonUtil::ShowNowPlayPanel(Tizen::Ui::Controls::TableView& tableView,
-                                                const bool playStatus,
-                                                Tizen::Graphics::Rectangle clientBounds)
+                                                       const bool playStatus,
+                                                       Tizen::Graphics::Rectangle clientBounds)
 {
-       AppLogDebug("Start");
+       AppLogDebug("ENTER");
        if (playStatus == true)
        {
                tableView.SetBounds(Rectangle(0, H_NOW_PLAY_BAR, clientBounds.width, clientBounds.height - H_NOW_PLAY_BAR));
@@ -345,14 +420,14 @@ CommonUtil::ShowNowPlayPanel(Tizen::Ui::Controls::TableView& tableView,
                tableView.SetBounds(Rectangle(0, 0, clientBounds.width, clientBounds.height));
                tableView.Invalidate(true);
        }
-       AppLogDebug("End");
+       AppLogDebug("EXIT");
 }
 
 Tizen::Base::String
-CommonUtil::GetContentInfo(const ContentInformationStruct& contentInfoStruct,
-                                                  const Tizen::Base::String& SceneId)
+CommonUtil::GetContentInfo(const ContentInformation& contentInfoStruct,
+                                                       const Tizen::Base::String& SceneId)
 {
-       AppLogDebug("Start");
+       AppLogDebug("ENTER");
        String retString = null;
 
        if (SceneId.Equals(IDSCN_ALBUM_LIST, true) || SceneId.Equals(IDSCN_SEARCH, true))
@@ -374,7 +449,7 @@ CommonUtil::GetContentInfo(const ContentInformationStruct& contentInfoStruct,
        else if (SceneId.Equals(IDSCN_YEAR_LIST, true))
        {
                retString = Integer::ToString(contentInfoStruct.ReleaseYear);;
-               if(retString.Equals(L"0", true))
+               if (retString.Equals(L"0", true))
                {
                        retString = STRING_UNKNOWN;
                }
@@ -387,28 +462,28 @@ CommonUtil::GetContentInfo(const ContentInformationStruct& contentInfoStruct,
        {
                retString = contentInfoStruct.TitleName;
        }
-       AppLogDebug("End");
+       AppLogDebug("EXIT");
        return retString;
 }
 
 Tizen::Base::String
 CommonUtil::SetSongsString(const int temp)
 {
-       AppLogDebug("Start");
+       AppLogDebug("ENTER");
        String StrSongs = null;
        String StrFormat = null;
 
-       StrSongs.Append("%d ");
+       StrSongs.Append(L"%d ");
        StrSongs.Append(ResourceManager::GetString("IDS_MUSIC_HEADER_SONGS"));
        StrFormat.Format(STRING_LENGTH, StrSongs.GetPointer(), temp);
-       AppLogDebug("End");
+       AppLogDebug("EXIT");
        return StrFormat;
 }
 
 void
 CommonUtil::ShowCheckedCountLabel(Tizen::Ui::Controls::Label& checkCountLabel, int itemCount, Tizen::Ui::Controls::TableView& tableView, const Tizen::Ui::Controls::Form& form)
 {
-       AppLogDebug("Start");
+       AppLogDebug("ENTER");
        int width = form.GetClientAreaBounds().width;
        int height = form.GetClientAreaBounds().height;
        if (itemCount == INIT_VALUE)
@@ -416,13 +491,13 @@ CommonUtil::ShowCheckedCountLabel(Tizen::Ui::Controls::Label& checkCountLabel, i
                checkCountLabel.SetShowState(false);
                checkCountLabel.Invalidate(true);
                tableView.SetBounds(Rectangle(INIT_VALUE, H_SELECT_ALL_BUTTON, width, height - H_SELECT_ALL_BUTTON));
-               AppLogDebug("End");
+               AppLogDebug("EXIT");
                return;
        }
 
        String StrSelectStr = null;
        String ResSelect = ResourceManager::GetString("IDS_COM_BODY_SELECTED");
-       ResSelect.Append("(%d)");
+       ResSelect.Append(L"(%d)");
 
        StrSelectStr.Format(STRING_LENGTH, ResSelect.GetPointer(), itemCount);
 
@@ -432,46 +507,45 @@ CommonUtil::ShowCheckedCountLabel(Tizen::Ui::Controls::Label& checkCountLabel, i
 
        tableView.SetBounds(Rectangle(INIT_VALUE, H_SELECT_ALL_BUTTON, width, height - H_SELECT_ALL_BUTTON - checkCountLabel.GetBounds().height));
        tableView.Invalidate(true);
-       AppLogDebug("End");
+       AppLogDebug("EXIT");
 }
 
 void
 CommonUtil::ShowSelectAllCheckButton(Tizen::Ui::Controls::CheckButton& checkButton)
 {
-       AppLogDebug("Start");
+       AppLogDebug("ENTER");
        if (checkButton.IsEnabled() == true)
        {
                checkButton.SetSelected(false);
                checkButton.Invalidate(true);
        }
-       AppLogDebug("End");
+       AppLogDebug("EXIT");
 }
 
 void
 CommonUtil::SetAllCheckState(bool state,
-                             Tizen::Ui::Controls::TableView& tableView,
-                             int totalCount)
+                                       Tizen::Ui::Controls::TableView& tableView,
+                                       int totalCount)
 {
-       AppLogDebug("Start");
-       //AppLogDebug("SetAllCheckState");
+       AppLogDebug("ENTER");
 
-       for(int iCount = INIT_VALUE; iCount < totalCount; iCount++)
+       for (int iCount = INIT_VALUE; iCount < totalCount; iCount++)
        {
                tableView.SetItemChecked(iCount, state);
        }
        tableView.Invalidate(true);
-       AppLogDebug("End");
+       AppLogDebug("EXIT");
 }
 
 Tizen::Ui::Controls::Footer*
 CommonUtil::CreateContentListFooter(const Tizen::Ui::Controls::Form& form)
 {
-       AppLogDebug("Start");
+       AppLogDebug("ENTER");
        Footer* pFooter = form.GetFooter();
        if (pFooter == null)
        {
                //AppLogDebug("Footer null");
-               AppLogDebug("End");
+               AppLogDebug("EXIT");
                return null;
        }
 
@@ -504,30 +578,28 @@ CommonUtil::CreateContentListFooter(const Tizen::Ui::Controls::Form& form)
        searchButtonItem.Construct(IDA_FOOTER_BUTTON_SEARCH);
        searchButtonItem.SetText(ResourceManager::GetString(L"IDS_COM_BODY_SEARCH"));
 
-
        pFooter->SetStyle(FOOTER_STYLE_BUTTON_ICON_TEXT);
 
        pFooter->AddItem(AddButtonItem);
        pFooter->AddItem(searchButtonItem);
 #endif
 
-       AppLogDebug("End");
+       AppLogDebug("EXIT");
        return pFooter;
 }
 
 Tizen::Ui::Controls::Footer*
 CommonUtil::CreatePlaylistEditFooter(const Tizen::Ui::Controls::Form& form)
 {
-       AppLogDebug("Start");
+       AppLogDebug("ENTER");
        Footer* pFooter = form.GetFooter();
        if (pFooter == null)
        {
                //AppLogDebug("form.GetFooter() null");
-               AppLogDebug("End");
+               AppLogDebug("EXIT");
                return null;
        }
 
-
        FooterItem deleteButtonItem;
        FooterItem cancelButtonItem;
 
@@ -542,23 +614,22 @@ CommonUtil::CreatePlaylistEditFooter(const Tizen::Ui::Controls::Form& form)
        pFooter->AddItem(deleteButtonItem);
        pFooter->AddItem(cancelButtonItem);
 
-       AppLogDebug("End");
+       AppLogDebug("EXIT");
        return pFooter;
 }
 
 Tizen::Ui::Controls::Footer*
 CommonUtil::CreateDefaultPlaylistContentListFooter(const Tizen::Ui::Controls::Form& form)
 {
-       AppLogDebug("Start");
+       AppLogDebug("ENTER");
        Footer* pFooter = form.GetFooter();
        if (pFooter == null)
        {
                //AppLogDebug("Footer null");
-               AppLogDebug("End");
+               AppLogDebug("EXIT");
                return null;
        }
 
-
        FooterItem editButtonItem;
        FooterItem createPlaylistButtonItem;
        FooterItem searchButtonItem;
@@ -571,31 +642,28 @@ CommonUtil::CreateDefaultPlaylistContentListFooter(const Tizen::Ui::Controls::Fo
        searchButtonItem.Construct(IDA_FOOTER_BUTTON_SEARCH);
        searchButtonItem.SetText(ResourceManager::GetString(L"IDS_COM_BODY_SEARCH"));
 
-
        pFooter->SetStyle(FOOTER_STYLE_BUTTON_ICON_TEXT);
 
        pFooter->AddItem(editButtonItem);
        pFooter->AddItem(createPlaylistButtonItem);
        pFooter->AddItem(searchButtonItem);
 
-
-       AppLogDebug("End");
+       AppLogDebug("EXIT");
        return pFooter;
 }
 
 Tizen::Ui::Controls::Footer*
 CommonUtil::CreateUserPlaylistContentListFooter(const Tizen::Ui::Controls::Form& form)
 {
-       AppLogDebug("Start");
+       AppLogDebug("ENTER");
        Footer* pFooter = form.GetFooter();
        if (pFooter == null)
        {
                //AppLogDebug("Footer null");
-               AppLogDebug("End");
+               AppLogDebug("EXIT");
                return null;
        }
 
-
        FooterItem editButtonItem;
        FooterItem AddButtonItem;
 //     FooterItem searchButtonItem;
@@ -609,27 +677,25 @@ CommonUtil::CreateUserPlaylistContentListFooter(const Tizen::Ui::Controls::Form&
 //     searchButtonItem.Construct(IDA_FOOTER_BUTTON_SEARCH);
 //     searchButtonItem.SetText(ResourceManager::GetString(L"IDS_COM_BODY_SEARCH"));
 
-
        pFooter->SetStyle(FOOTER_STYLE_BUTTON_ICON_TEXT);
 
        pFooter->AddItem(editButtonItem);
        pFooter->AddItem(AddButtonItem);
 //     pFooter->AddItem(searchButtonItem);
 
-
-       AppLogDebug("End");
+       AppLogDebug("EXIT");
        return pFooter;
 }
 
 Tizen::Ui::Controls::Footer*
 CommonUtil::CreateAddtoPlaylistPickerFooter(const Tizen::Ui::Controls::Form& form)
 {
-       AppLogDebug("Start");
+       AppLogDebug("ENTER");
        Footer* pFooter = form.GetFooter();
        if (pFooter == null)
        {
                //AppLogDebug("Footer null");
-               AppLogDebug("End");
+               AppLogDebug("EXIT");
                return null;
        }
 
@@ -661,21 +727,21 @@ CommonUtil::CreateAddtoPlaylistPickerFooter(const Tizen::Ui::Controls::Form& for
 
        pFooter->AddItem(AddButtonItem);
        pFooter->AddItem(CancelButtonItem);
-
 #endif
-       AppLogDebug("End");
+
+       AppLogDebug("EXIT");
        return pFooter;
 }
 
 Tizen::Ui::Controls::Footer*
 CommonUtil::CreateAddtoPlaylistFooter(const Tizen::Ui::Controls::Form& form)
 {
-       AppLogDebug("Start");
+       AppLogDebug("ENTER");
        Footer* pFooter = form.GetFooter();
        if (pFooter == null)
        {
                //AppLogDebug("Footer null");
-               AppLogDebug("End");
+               AppLogDebug("EXIT");
                return null;
        }
 
@@ -686,23 +752,22 @@ CommonUtil::CreateAddtoPlaylistFooter(const Tizen::Ui::Controls::Form& form)
        pFooter->SetStyle(FOOTER_STYLE_BUTTON_ICON_TEXT);
        pFooter->AddItem(AddButtonItem);
 
-       AppLogDebug("End");
+       AppLogDebug("EXIT");
        return pFooter;
 }
 
 Tizen::Ui::Controls::Footer*
 CommonUtil::CreateEditContentListFooter(const Tizen::Ui::Controls::Form& form)
 {
-       AppLogDebug("Start");
+       AppLogDebug("ENTER");
        Footer* pFooter = form.GetFooter();
        if (pFooter == null)
        {
-               AppLogDebug("End");
+               AppLogDebug("EXIT");
                return null;
        }
        pFooter->SetStyle(FOOTER_STYLE_BUTTON_ICON_TEXT);
 
-
        FooterItem editButtonItem;
        FooterItem searchButtonItem;
 
@@ -712,46 +777,42 @@ CommonUtil::CreateEditContentListFooter(const Tizen::Ui::Controls::Form& form)
        searchButtonItem.Construct(IDA_FOOTER_BUTTON_SEARCH);
        searchButtonItem.SetText(ResourceManager::GetString(L"IDS_COM_BODY_SEARCH"));
 
-
        pFooter->AddItem(editButtonItem);
        pFooter->AddItem(searchButtonItem);
 
-
-       AppLogDebug("End");
-
+       AppLogDebug("EXIT");
        return pFooter;
 }
 
 Tizen::Ui::Controls::Footer*
 CommonUtil::CreateEditFooter(const Tizen::Ui::Controls::Form& form)
 {
-       AppLogDebug("Start");
+       AppLogDebug("ENTER");
        Footer* pFooter = form.GetFooter();
        if (pFooter == null)
        {
-               AppLogDebug("End");
+               AppLogDebug("EXIT");
                return null;
        }
        pFooter->SetStyle(FOOTER_STYLE_BUTTON_ICON_TEXT);
 
-
        FooterItem editButtonItem;
        editButtonItem.Construct(IDA_FOOTER_BUTTON_EDIT);
        editButtonItem.SetText(ResourceManager::GetString(L"IDS_COM_BODY_EDIT"));
        pFooter->AddItem(editButtonItem);
-       AppLogDebug("End");
 
+       AppLogDebug("EXIT");
        return pFooter;
 }
 
 Tizen::Ui::Controls::Footer*
 CommonUtil::CreateDeleteFooter(const Tizen::Ui::Controls::Form& form)
 {
-       AppLogDebug("Start");
+       AppLogDebug("ENTER");
        Footer* pFooter = form.GetFooter();
        if (pFooter == null)
        {
-               AppLogDebug("End");
+               AppLogDebug("EXIT");
                return null;
        }
        pFooter->SetStyle(FOOTER_STYLE_BUTTON_ICON_TEXT);
@@ -777,71 +838,67 @@ CommonUtil::CreateDeleteFooter(const Tizen::Ui::Controls::Form& form)
        pFooter->AddItem(addToPlaylistFooterItem);
        pFooter->AddItem(cancelFooterItem);
 
-       AppLogDebug("End");
+       pFooter->SetItemEnabled(INDEX_FOOTER_DELETE, false);
+       pFooter->SetItemEnabled(INDEX_FOOTER_SHARE, false);
+       pFooter->SetItemEnabled(INDEX_FOOTER_ADDTOPLATLIST, false);
 
+       AppLogDebug("EXIT");
        return pFooter;
 }
 
 Tizen::Ui::Controls::Footer*
 CommonUtil::CreateCancelFooter(const Tizen::Ui::Controls::Form& form)
 {
-       AppLogDebug("Start");
+       AppLogDebug("ENTER");
        Footer* pFooter = form.GetFooter();
        if (pFooter == null)
        {
-               AppLogDebug("End");
+               AppLogDebug("EXIT");
                return null;
        }
 
        pFooter->SetBackButton();
-       AppLogDebug("End");
+       AppLogDebug("EXIT");
        return pFooter;
 }
 
-ContentInformationStruct*
-CommonUtil::GetContentInformationStructN(const Tizen::Content::AudioContentInfo& audioContentInfo)
+ContentInformation*
+CommonUtil::GetContentInformationN(const Tizen::Content::AudioContentInfo& audioContentInfo)
 {
-       AppLogDebug("Start");
-       ContentInformationStruct* pContentInfoStruct = new ContentInformationStruct;
-
-       pContentInfoStruct->contentId       = audioContentInfo.GetContentId();
-       pContentInfoStruct->GenreName       = audioContentInfo.GetGenre();
-       pContentInfoStruct->ArtistName      = audioContentInfo.GetArtist();
-       pContentInfoStruct->ComposerName    = audioContentInfo.GetComposer();
-       pContentInfoStruct->AlbumName       = audioContentInfo.GetAlbumName();
-       pContentInfoStruct->TitleName       = audioContentInfo.GetTitle();
+       AppLogDebug("ENTER");
+       ContentInformation* pContentInfoStruct = new (std::nothrow) ContentInformation();
+
+       pContentInfoStruct->contentId = audioContentInfo.GetContentId();
+       pContentInfoStruct->GenreName = audioContentInfo.GetGenre();
+       pContentInfoStruct->ArtistName = audioContentInfo.GetArtist();
+       pContentInfoStruct->ComposerName = audioContentInfo.GetComposer();
+       pContentInfoStruct->AlbumName = audioContentInfo.GetAlbumName();
+       pContentInfoStruct->TitleName = audioContentInfo.GetTitle();
        pContentInfoStruct->ContentFilePath = audioContentInfo.GetContentPath();
-       pContentInfoStruct->pThumbnail      = audioContentInfo.GetThumbnailN();
 
-       if (pContentInfoStruct->pThumbnail == null)
-       {
-               AppResource* pAppResource = Application::GetInstance()->GetAppResource();
-               pContentInfoStruct->pThumbnail  = pAppResource->GetBitmapN(DEFAULT_THUMBNAIL);
-       }
-       pContentInfoStruct->pThumbnail->Scale(Dimension(W_THUMBNAIL, H_THUMBNAIL));
-       AppLogDebug("audioContentInfo.GetReleaseYear() : %d", audioContentInfo.GetReleaseYear());
-       pContentInfoStruct->ReleaseYear     = audioContentInfo.GetReleaseYear();
-       pContentInfoStruct->Duration        = audioContentInfo.GetDuration();
-       pContentInfoStruct->contentId       = audioContentInfo.GetContentId();
-       AppLogDebug("End");
+       pContentInfoStruct->ReleaseYear = audioContentInfo.GetReleaseYear();
+       pContentInfoStruct->Duration = audioContentInfo.GetDuration();
+       pContentInfoStruct->contentId = audioContentInfo.GetContentId();
 
+       AppLogDebug("EXIT");
        return pContentInfoStruct;
 }
 
 void
 CommonUtil::CreateTableViewItem(Tizen::Ui::Container& parent,
-                                const Tizen::Graphics::Bitmap& thumbnail,
-                                const Tizen::Base::String& itemName,
-                                int itemCount)
+                                       const Tizen::Graphics::Bitmap& thumbnail,
+                                       const Tizen::Base::String& itemName,
+                                       int itemCount)
 {
-       AppLogDebug("Start");
+       AppLogDebug("ENTER");
 
-       int X_Gap   = W_THUMBNAIL + (X_GAP_THUMBNAIL * 2);
+       int X_Gap = W_THUMBNAIL + (X_GAP_THUMBNAIL * 2);
        int W_Label = W_CLIENT_AREA - (X_Gap + W_CREATE_TABLE_VIEW_ITEM_COUNT_LABEL_ITEM);
 
        Label* pSongThumbnailLabel = new (std::nothrow) Label();
        pSongThumbnailLabel->Construct(Rectangle(X_GAP_THUMBNAIL, Y_GAP_THUMBNAIL, W_THUMBNAIL, H_THUMBNAIL), L"");
        pSongThumbnailLabel->SetBackgroundBitmap(thumbnail);
+       pSongThumbnailLabel->SetName(L"pSongThumbnailLabel");
 
        parent.AddControl(*pSongThumbnailLabel);
 
@@ -860,16 +917,16 @@ CommonUtil::CreateTableViewItem(Tizen::Ui::Container& parent,
        pSongTimeLabel->SetText(CommonUtil::SetSongsString(itemCount));
 
        parent.AddControl(*pSongTimeLabel);
-       AppLogDebug("End");
+       AppLogDebug("EXIT");
 }
 
 result
 CommonUtil::CreateEditListTableViewItem(Tizen::Ui::Container& parent,
-                                        const Tizen::Graphics::Bitmap& thumbnail,
-                                        const Tizen::Base::String& itemName,
-                                        int itemCount)
+                                               const Tizen::Graphics::Bitmap& thumbnail,
+                                               const Tizen::Base::String& itemName,
+                                               int itemCount)
 {
-       AppLogDebug("Start");
+       AppLogDebug("ENTER");
        result r = E_SUCCESS;
 
        int W_Label = W_CLIENT_AREA - (W_TABLE_VIEW_MARK + W_THUMBNAIL + W_CREATE_TABLE_VIEW_ITEM_COUNT_LABEL_ITEM);
@@ -877,6 +934,7 @@ CommonUtil::CreateEditListTableViewItem(Tizen::Ui::Container& parent,
        Label* pSongThumbnailLabel = new (std::nothrow) Label();
        pSongThumbnailLabel->Construct(Rectangle(0, Y_GAP_THUMBNAIL, W_THUMBNAIL, H_THUMBNAIL), L"");
        pSongThumbnailLabel->SetBackgroundBitmap(thumbnail);
+       pSongThumbnailLabel->SetName(L"pSongThumbnailLabel");
 
        Label* pSongNameLabel = new (std::nothrow) Label();
        pSongNameLabel->Construct(Rectangle(pSongThumbnailLabel->GetWidth(), Y_CREATE_TABLE_VIEW_ITEM, W_Label, H_CREATE_TABLE_VIEW_ITEM), L"");
@@ -893,15 +951,14 @@ CommonUtil::CreateEditListTableViewItem(Tizen::Ui::Container& parent,
        parent.AddControl(*pSongThumbnailLabel);
        parent.AddControl(*pSongNameLabel);
        parent.AddControl(*pSongCountLabel);
-       AppLogDebug("End");
+       AppLogDebug("EXIT");
        return r;
 }
 
-
 result
 CommonUtil::CreateTableViewContextItem(Tizen::Ui::Controls::TableViewContextItem& parent, Tizen::Ui::IActionEventListener& listener)
 {
-       AppLogDebug("Start");
+       AppLogDebug("ENTER");
 
        Button* pAddToPlaylistButton = new (std::nothrow) Button();
        pAddToPlaylistButton->Construct(Rectangle(X_GAP_CONTEXT_ITME, Y_GAP_CONTEXT_ITEM, parent.GetWidth() - (X_GAP_CONTEXT_ITME * 2), parent.GetHeight() - (Y_GAP_CONTEXT_ITEM * 2)));
@@ -913,26 +970,26 @@ CommonUtil::CreateTableViewContextItem(Tizen::Ui::Controls::TableViewContextItem
        parent.SetIndividualSelectionEnabled(pAddToPlaylistButton, true);
        parent.AddControl(*pAddToPlaylistButton);
 
-       AppLogDebug("End");
+       AppLogDebug("EXIT");
        return E_SUCCESS;
 }
 
 Tizen::Ui::Controls::TableView*
 CommonUtil::CreateEditorTableView(int width, int height)
 {
-       AppLogDebug("Start");
+       AppLogDebug("ENTER");
        TableView* pTableView = new (std::nothrow) TableView();
        pTableView->Construct(Rectangle(INIT_VALUE, H_SELECT_ALL_BUTTON, width, height - H_SELECT_ALL_BUTTON),
-                                     true,
-                                     TABLE_VIEW_SCROLL_BAR_STYLE_FADE_OUT);
-       AppLogDebug("End");
+                                       true,
+                                       TABLE_VIEW_SCROLL_BAR_STYLE_FADE_OUT);
+       AppLogDebug("EXIT");
        return pTableView;
 }
 
 Tizen::Ui::Controls::TableView*
 CommonUtil::CreateTableView(int width, int height)
 {
-       AppLogDebug("Start");
+       AppLogDebug("ENTER");
        TableView* pTableView = new (std::nothrow) TableView();
        pTableView->Construct(Rectangle(0, 0, width, height), true, TABLE_VIEW_SCROLL_BAR_STYLE_FAST_SCROLL);
 
@@ -954,13 +1011,14 @@ CommonUtil::CreateTableView(int width, int height)
        indexText.Append(L"0");
 
        pTableView->SetFastScrollIndex(indexText, false);
-       AppLogDebug("End");
+       AppLogDebug("EXIT");
        return pTableView;
 }
 
 result
 CommonUtil::CreateContentPikerTableViewItem(Tizen::Ui::Controls::TableViewItem& parent, const Tizen::Base::String& songName, const Tizen::Base::String& songTime)
 {
+       AppLogDebug("ENTER");
        Label* pSongNameLabel = new (std::nothrow) Label();
        pSongNameLabel->Construct(Rectangle(0, Y_GAP_CONTENT_PIKER_ITEM, W_SONG_TITLE_CONTENT_PIKER_ITEM, H_SONG_TITLE_CONTENT_PIKER_ITEM), songName);
        pSongNameLabel->SetTextConfig(FONT_SIZE, LABEL_TEXT_STYLE_NORMAL);
@@ -974,98 +1032,109 @@ CommonUtil::CreateContentPikerTableViewItem(Tizen::Ui::Controls::TableViewItem&
        parent.AddControl(*pSongNameLabel);
        parent.AddControl(*pSongTimeLabel);
 
+       AppLogDebug("EXIT");
        return E_SUCCESS;
 }
 
 Tizen::Ui::Controls::CheckButton*
 CommonUtil::CreateSelectAllCheckedButton(int width)
 {
-       AppLogDebug("Start");
+       AppLogDebug("ENTER");
        CheckButton* pCheckButton = new (std::nothrow) CheckButton();
        pCheckButton->Construct(Rectangle(INIT_VALUE, INIT_VALUE, width, H_SELECT_ALL_BUTTON),
                                                        CHECK_BUTTON_STYLE_MARK,
-                            BACKGROUND_STYLE_DEFAULT,
-                            false,
-                            ResourceManager::GetString("IDS_COM_BODY_SELECT_ALL"),
-                            GROUP_STYLE_BOTTOM);
+                                                       BACKGROUND_STYLE_DEFAULT,
+                                                       false,
+                                                       ResourceManager::GetString("IDS_COM_BODY_SELECT_ALL"),
+                                                       GROUP_STYLE_BOTTOM);
        pCheckButton->SetActionId(IDA_CHECK_BUTTON, IDA_UNCHECK_BUTTON, INIT_VALUE);
        pCheckButton->SetColor(CHECK_BUTTON_STATUS_NORMAL, COLOR_SELECT_ALL);
-       AppLogDebug("End");
+       AppLogDebug("EXIT");
        return pCheckButton;
 }
 
 Tizen::Ui::Controls::Label*
 CommonUtil::CreateCheckedCountLabel(int width, int height)
 {
-       AppLogDebug("Start");
+       AppLogDebug("ENTER");
        Label* pLabel = new (std::nothrow) Label();
        pLabel->Construct(Rectangle(INIT_VALUE, height - H_CHECKED_COUNT_LABEL, width, H_CHECKED_COUNT_LABEL), L"");
        pLabel->SetBackgroundColor(COLOR_SMALL_POPUP);
        pLabel->SetTextHorizontalAlignment(ALIGNMENT_CENTER);
        pLabel->SetText(FONT_SIZE);
-       AppLogDebug("End");
+       AppLogDebug("EXIT");
        return pLabel;
 }
 
 void
 CommonUtil::SetAddtoPlaylistState(bool state)
 {
+       AppLogDebug("ENTER");
        __addToPlaylistState = state;
+       AppLogDebug("EXIT");
 }
 
 bool
 CommonUtil::GetAddtoPlaylistState(void)
 {
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
        return __addToPlaylistState;
 }
 
 void
 CommonUtil::SetAddtoPlaylistName(const Tizen::Base::String& addToPlayName)
 {
+       AppLogDebug("ENTER");
        __AddToPlaylistName = addToPlayName;
+       AppLogDebug("EXIT");
 }
 
 Tizen::Base::String
 CommonUtil::GetAddtoPlaylistName(void)
 {
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
        return __AddToPlaylistName;
 }
 
 void
 CommonUtil::SetButtonEnabled(const Tizen::Ui::Controls::Form& form, int checkedItemCount, int actionId)
 {
+       AppLogDebug("ENTER");
        Footer* pFooter = form.GetFooter();
        if (pFooter == null)
        {
                return;
        }
 
-       if (actionId == IDA_CHECK_BUTTON ||
-        actionId == IDA_UNCHECK_BUTTON ||
-        actionId == IDA_FOOTER_BUTTON_ADD_TO_PLAYLIST ||
-        actionId == IDA_FOOTER_BUTTON_DELETE)
+       if (actionId == IDA_CHECK_BUTTON
+               || actionId == IDA_UNCHECK_BUTTON
+               || actionId == IDA_FOOTER_BUTTON_ADD_TO_PLAYLIST
+               || actionId == IDA_FOOTER_BUTTON_DELETE)
        {
                bool buttonState = checkedItemCount == 0 ? false : true;
-               for(int iCount = 0; iCount < pFooter->GetItemCount() - 1; iCount++)
+               for (int iCount = 0; iCount < pFooter->GetItemCount() - 1; iCount++)
                {
                        pFooter->SetItemEnabled(iCount, buttonState);
                        pFooter->Invalidate(true);
                }
        }
-
        else if (actionId == IDA_FOOTER_BUTTON_CANCEL)
        {
-               for(int iCount = 0; iCount < pFooter->GetItemCount() - 1; iCount++)
+               for (int iCount = 0; iCount < pFooter->GetItemCount() - 1; iCount++)
                {
                        pFooter->SetItemEnabled(iCount, true);
                        pFooter->Invalidate(true);
                }
        }
+       AppLogDebug("EXIT");
 }
 
 void
 CommonUtil::SetButtonEnabled(const Tizen::Ui::Controls::Form& form, int checkedItemCount)
 {
+       AppLogDebug("ENTER");
        Footer* pFooter = form.GetFooter();
        if (pFooter == null)
        {
@@ -1073,16 +1142,18 @@ CommonUtil::SetButtonEnabled(const Tizen::Ui::Controls::Form& form, int checkedI
        }
 
        bool buttonState = checkedItemCount == 0 ? false : true;
-       for(int iCount = 0; iCount < pFooter->GetItemCount() - 1; iCount++)
+       for (int iCount = 0; iCount < pFooter->GetItemCount() - 1; iCount++)
        {
                pFooter->SetItemEnabled(iCount, buttonState);
                pFooter->Invalidate(true);
        }
+       AppLogDebug("EXIT");
 }
 
 void
 CommonUtil::ShowNoContentImage(int contentTotal, Tizen::Ui::Controls::TableView& contentTableView, Tizen::Ui::Controls::Label& contentImageLabel, Tizen::Ui::Controls::Label& contentTextLabel)
 {
+       AppLogDebug("ENTER");
        if (contentTotal == 0)
        {
                contentTableView.SetShowState(false);
@@ -1099,16 +1170,18 @@ CommonUtil::ShowNoContentImage(int contentTotal, Tizen::Ui::Controls::TableView&
        contentTableView.Invalidate(true);
        contentImageLabel.Invalidate(true);
        contentTextLabel.Invalidate(true);
+       AppLogDebug("EXIT");
 }
 
 Bitmap*
 CommonUtil::GetColorizedBitmapN(const Tizen::Graphics::Bitmap& bitmap, const Tizen::Graphics::Color& color)
 {
+       AppLogDebug("ENTER");
        if (bitmap.GetPixelColorFormat() != BITMAP_PIXEL_FORMAT_ARGB8888)
        {
                return null;
        }
-       std::unique_ptr<Bitmap> pRet(new (std::nothrow) Bitmap);
+       std::unique_ptr<Bitmap> pRet(new (std::nothrow) Bitmap());
        if (pRet == null)
        {
                return null;
@@ -1129,12 +1202,13 @@ CommonUtil::GetColorizedBitmapN(const Tizen::Graphics::Bitmap& bitmap, const Tiz
                {
                        for (int x = 0; x < bi.width; x++)
                        {
-                       *pDst = (*pDst & 0xFF000000) | replacing;
-                       pDst++;
+                               *pDst = (*pDst & 0xFF000000) | replacing;
+                               pDst++;
                        }
                        pDst += dstPadding;
                }
        }
        pRet->Unlock();
+       AppLogDebug("EXIT");
        return pRet.release();
-}
+}
\ No newline at end of file
diff --git a/src/MpComposerContentListForm.cpp b/src/MpComposerContentListForm.cpp
new file mode 100644 (file)
index 0000000..19ff570
--- /dev/null
@@ -0,0 +1,917 @@
+//
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.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://floralicense.org/license/
+//
+// 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.
+//
+
+/**
+ * @file               MpComposerContentListForm.cpp
+ * @brief              This is the implementation file for ComposerContentListForm class.
+ */
+
+#include <FSocial.h>
+#include "MpComposerContentListForm.h"
+#include "MpComposerListPresentationModel.h"
+#include "MpPlaylistPickerPopup.h"
+#include "MpSharePopup.h"
+#include "MpThumbnailInfo.h"
+
+using namespace Tizen::App;
+using namespace Tizen::Base;
+using namespace Tizen::Base::Collection;
+using namespace Tizen::Content;
+using namespace Tizen::Graphics;
+using namespace Tizen::Io;
+using namespace Tizen::Social;
+using namespace Tizen::System;
+using namespace Tizen::Ui;
+using namespace Tizen::Ui::Controls;
+using namespace Tizen::Ui::Scenes;
+
+static const int X_OFFSET_EDIT_STYLE_TABLE_VIEW = 96;
+static const int COUNT_MESSAGE_BOX_TIMEOUT = 3000;
+
+static const Tizen::Graphics::Rectangle RECT_COMPOSER_ITEM_THUMBNAIL (16, 8, 112, 112);
+static const Tizen::Graphics::Rectangle RECT_COMPOSER_ITEM_TITLE_NAME (144, 8, 300, 66);
+static const Tizen::Graphics::Rectangle RECT_COMPOSER_ITEM_TIME (444, 8, 260, 66);
+static const Tizen::Graphics::Rectangle RECT_COMPOSER_ITEM_ARTIST_NAME (144, 66, 560, 46);
+
+static const Tizen::Graphics::Rectangle RECT_COMPOSER_EDIT_ITEM_TITLE_NAME (144, 8, (300 - X_OFFSET_EDIT_STYLE_TABLE_VIEW), 66);
+static const Tizen::Graphics::Rectangle RECT_COMPOSER_EDIT_ITEM_TIME ((444 - X_OFFSET_EDIT_STYLE_TABLE_VIEW), 8, 260, 66);
+static const Tizen::Graphics::Rectangle RECT_COMPOSER_EDIT_ITEM_ARTIST_NAME (144, 66, (560 - X_OFFSET_EDIT_STYLE_TABLE_VIEW), 46);
+
+ComposerContentListForm::ComposerContentListForm(void)
+       : ContentListForm::ContentListForm()
+       , ThumbnailBase::ThumbnailBase()
+       , __pPresentationModel(null)
+       , __pThumbnail(null)
+{
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
+}
+
+ComposerContentListForm::~ComposerContentListForm(void)
+{
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
+}
+
+result
+ComposerContentListForm::OnInitializing(void)
+{
+       AppLogDebug("ENTER");
+       CreateTableview();
+       CreateSelectAllCheckedButton();
+       CreateCheckedCountLabel();
+       CreateNoContentImage(L"IDS_MUSIC_HEADER_NO_SONGS");
+       __pContextItem = new (std::nothrow) TableViewContextItem();
+       __pContextItem->Construct(Dimension(GetClientAreaBounds().width, ITEM_HEIGHT));
+       CreateTableViewContextItem(*__pContextItem);
+       CreateDeletePopup();
+       AppLogDebug("EXIT");
+       return ThumbnailBase::Construct();
+}
+
+result
+ComposerContentListForm::OnTerminating(void)
+{
+       AppLogDebug("ENTER");
+       __checkedItemCount = 0;
+       DestroyPlayListPickerPopup();
+
+       delete __pContextItem;
+       __pContextItem = null;
+
+       AppLogDebug("EXIT");
+       return E_SUCCESS;
+}
+
+void
+ComposerContentListForm::OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previousSceneId,
+                                       const Tizen::Ui::Scenes::SceneId& currentSceneId,
+                                       Tizen::Base::Collection::IList* pArgs)
+{
+       AppLogDebug("ENTER");
+       if (pArgs != null)
+       {
+               __pStrSceneId = static_cast<String*>(pArgs->GetAt(DATA_ITEM_SCENE_NAME));
+               __pStrContentName = static_cast<String*>(pArgs->GetAt(DATA_ITEM_CONTENT_NAME));
+               __currentContentIndex = static_cast<Integer*>(pArgs->GetAt(DATA_ITEM_CONTENT_TYPE))->ToInt();
+               __pPresentationModel = ComposerListPresentationModel::GetInstance();
+               __pPresentationModel->UpdateComposerList();
+               __pPresentationModel->InitializeContentList(__currentContentIndex);
+       }
+       else
+       {
+               // Empty statement
+       }
+
+       ContentInformation* pContentInfoStruct = null;
+       pContentInfoStruct = __pPresentationModel->GetContentInfoN(0);
+       if (pContentInfoStruct == null)
+       {
+               return;
+       }
+
+       InitializeHeader(*pContentInfoStruct);
+       if (__checkEdit == true)
+       {
+               Footer* pFooter = CommonUtil::CreateDeleteFooter(*this);
+               pFooter->AddActionEventListener(*this);
+       }
+       else
+       {
+               Footer* pFooter = CommonUtil::CreateEditFooter(*this);
+               pFooter->AddActionEventListener(*this);
+               pFooter->SetBackButton();
+               SetFormBackEventListener(this);
+       }
+       __pContentTableView->UpdateTableView();
+
+       delete pContentInfoStruct;
+       pContentInfoStruct = null;
+       AppLogDebug("EXIT");
+}
+
+void
+ComposerContentListForm::OnSceneDeactivated(const Tizen::Ui::Scenes::SceneId& currentSceneId,
+                                                                       const Tizen::Ui::Scenes::SceneId& nextSceneId)
+{
+       AppLogDebug("ENTER");
+       Footer* pFooter = GetFooter();
+       pFooter->RemoveAllButtons();
+       pFooter->RemoveAllItems();
+       pFooter->RemoveActionEventListener(*this);
+       CancelAllThumbnailRequest();
+       AppLogDebug("EXIT");
+}
+
+void
+ComposerContentListForm::OnActionPerformed(const Tizen::Ui::Control& source, int actionId)
+{
+       AppLogDebug("ENTER");
+       SceneManager* pSceneManager = SceneManager::GetInstance();
+
+       AppAssert(pSceneManager);
+
+       switch (actionId)
+       {
+       case IDA_FLICK_BUTTON_SHARE:
+               // fall through
+       case IDA_FLICK_BUTTON_SET:
+               {
+                       CreateContextMenu(source);
+               }
+               break;
+
+       case IDA_FLICK_BUTTON_ADD_TO_PALYLIST:
+               {
+                       Tizen::Base::Collection::ArrayList* pDataList = new (std::nothrow) ArrayList();
+                       pDataList->Construct();
+                       ContentInformation* pContentInfo;
+                       pContentInfo = __pPresentationModel->GetContentInfoN(__itemIndex);
+
+                       if (pContentInfo == null)
+                       {
+                               pDataList->RemoveAll(true);
+                               delete pDataList;
+                               pDataList = null;
+                               return;
+                       }
+                       pDataList->Add(*(new (std::nothrow) String(pContentInfo->ContentFilePath)));
+
+                       delete pContentInfo;
+                       pContentInfo = null;
+
+                       __pPlayListPickerPopup = new (std::nothrow) PlayListPickerPopup();
+                       __pPlayListPickerPopup->Initialize(this, pDataList);
+                       __pPlayListPickerPopup->SetShowState(true);
+                       __pPlayListPickerPopup->Show();
+                       //__pPlayListPickerPopup->SetCollectedContent(pDataList);
+               }
+               break;
+
+       case IDA_FLICK_BUTTON_DELETE:
+               {
+                       if (__pDeletePopup != null)
+                       {
+                               __pDeletePopup->SetShowState(true);
+                               __pDeletePopup->Show();
+                       }
+               }
+               break;
+
+       case IDA_DELETE_POPUP_DELETE:
+               // fall through
+       case IDA_DELETE_POPUP_CANCEL:
+               {
+                       __pDeletePopup->SetShowState(false);
+                       __pDeletePopup->Show();
+                       if (actionId == IDA_DELETE_POPUP_DELETE && __pPresentationModel != null)
+                       {
+                               ContentManager contentManager;
+                               contentManager.Construct();
+                               ContentInformation* pContentInfo = __pPresentationModel->GetContentInfoN(__itemIndex);
+                               contentManager.DeleteContent(pContentInfo->contentId);
+                               Footer* pFooter = GetFooter();
+
+                               delete pContentInfo;
+                               pContentInfo = null;
+
+                               __pPresentationModel->RefreshContentList(__currentContentIndex);
+                               if (__pPresentationModel->GetContentCount(__currentContentIndex) <= INIT_VALUE)
+                               {
+                                       CommonUtil::ShowNoContentImage(INIT_VALUE, *__pContentTableView, *__pNoContentImageLabel, *__pNoContentTextLabel);
+                                       pFooter->SetItemEnabled(INDEX_EDIT_FOOTER_EDIT, false);
+                                       pFooter->Invalidate(true);
+                               }
+                               __pContentTableView->RefreshItem(__itemIndex, TABLE_VIEW_REFRESH_TYPE_ITEM_REMOVE);
+                       }
+               }
+               break;
+
+       case IDA_SHARE_CONTEXT_MENU_EMAIL:
+               // fall through
+       case IDA_SHARE_CONTEXT_MENU_MESSAGE:
+               {
+                       String providerID = ((actionId == IDA_SHARE_CONTEXT_MENU_EMAIL) ? PROVIDER_ID_EMAIL : PROVIDER_ID_MESSAGE);
+                       AppControl* pAppControl = AppManager::FindAppControlN(providerID, OPERATION_ID_COMPOSE);
+                       if (pAppControl == null)
+                       {
+                               return;
+                       }
+
+                       ContentInformation* pContentInfo = null;
+                       pContentInfo = __pPresentationModel->GetContentInfoN(__itemIndex);
+
+                       if (pContentInfo == null)
+                       {
+                               return;
+                       }
+
+                       HashMap* pDataList = new (std::nothrow) HashMap(SingleObjectDeleter);
+                       pDataList->Construct();
+                       pDataList->Add(new (std::nothrow) String(APPCONTROL_KEY_ATTACHMENTS), new (std::nothrow) String(pContentInfo->ContentFilePath));
+
+                       pAppControl->Start(null, null, pDataList, this);
+
+                       if (pAppControl != null)
+                       {
+                               delete pAppControl;
+                               pAppControl = null;
+                       }
+
+                       delete pContentInfo;
+                       pContentInfo = null;
+               }
+               break;
+
+       case IDA_SET_CONTEXT_MENU_CALL:
+               {
+                       result r = E_SUCCESS;
+                       ContentInformation* pContentInfo = __pPresentationModel->GetContentInfoN(__itemIndex);
+
+                       if (pContentInfo == null)
+                       {
+                               return;
+                       }
+                       r = SettingInfo::SetValue(CALL_RINGTONE_KEY, pContentInfo->ContentFilePath);
+
+                       delete pContentInfo;
+                       pContentInfo = null;
+
+                       if (r == E_SUCCESS)
+                       {
+                               MessageBox messageBox;
+                               messageBox.Construct(L"", ResourceManager::GetString(L"IDS_COM_POP_SUCCESS"),
+                                                                       MSGBOX_STYLE_OK,
+                                                                       COUNT_MESSAGE_BOX_TIMEOUT);
+                               int modalResult = 0;
+                               messageBox.ShowAndWait(modalResult);
+                       }
+               }
+               break;
+
+       case IDA_SET_CONTEXT_MENU_CALLER:
+               {
+                       AppControl* pAppControl = AppManager::FindAppControlN(TIZEN_APPCONTROL_PROVIDER_CONTACT, TIZEN_APPCONTROL_OPERATION_PICK);
+                       if (pAppControl == null)
+                       {
+                               return;
+                       }
+
+                       HashMap* pDataList = new (std::nothrow) HashMap(SingleObjectDeleter);
+                       pDataList->Construct();
+                       pDataList->Add(new (std::nothrow) String(APPCONTROL_KEY_SINGLE_MODE), new (std::nothrow) String(APPCONTROL_VALUE_SINGLE));
+                       pDataList->Add(new (std::nothrow) String(APPCONTROL_KEY_RETURNTYPE), new (std::nothrow) String(APPCONTROL_VALUE_CONTACTID));
+
+                       pAppControl->Start(null, null, pDataList, this);
+                       if (pAppControl != null)
+                       {
+                               delete pAppControl;
+                               pAppControl = null;
+                       }
+               }
+               break;
+
+       case IDA_FOOTER_BUTTON_EDIT:
+               {
+                       ToggleViewMode(false);
+               }
+               break;
+
+       case IDA_FOOTER_BUTTON_CANCEL:
+               {
+                       __checkedItemCount = INIT_VALUE;
+                       __pSelectAllCheckedButton->SetSelected(false);
+                       CommonUtil::SetAllCheckState(false, *__pContentTableView, __pPresentationModel->GetContentCount(__currentContentIndex));
+                       CommonUtil::ShowCheckedCountLabel(*__pCheckedCountLabel, __checkedItemCount, *__pContentTableView, *this);
+                       ToggleViewMode(true);
+               }
+               break;
+
+       case IDA_FOOTER_BUTTON_SEARCH:
+               {
+                       pSceneManager->GoForward(ForwardSceneTransition(IDSCN_SEARCH));
+               }
+               break;
+
+       case IDA_CHECK_BUTTON:
+               {
+                       __checkedItemCount = __pPresentationModel->GetContentCount(__currentContentIndex);
+                       if (__checkedItemCount > INIT_VALUE)
+                       {
+                               Footer* pFooter = GetFooter();
+
+                               pFooter->SetItemEnabled(INDEX_FOOTER_DELETE, true);
+                               pFooter->SetItemEnabled(INDEX_FOOTER_SHARE, true);
+                               pFooter->SetItemEnabled(INDEX_FOOTER_ADDTOPLATLIST, true);
+
+                               pFooter->Invalidate(true);
+                       }
+                       CommonUtil::SetAllCheckState(true, *__pContentTableView, __pPresentationModel->GetContentCount(__currentContentIndex));
+                       CommonUtil::ShowCheckedCountLabel(*__pCheckedCountLabel, __checkedItemCount, *__pContentTableView, *this);
+               }
+               break;
+
+       case IDA_UNCHECK_BUTTON:
+               {
+                       Footer* pFooter = GetFooter();
+
+                       pFooter->SetItemEnabled(INDEX_FOOTER_DELETE, false);
+                       pFooter->SetItemEnabled(INDEX_FOOTER_SHARE, false);
+                       pFooter->SetItemEnabled(INDEX_FOOTER_ADDTOPLATLIST, false);
+
+                       pFooter->Invalidate(true);
+
+                       __checkedItemCount = INIT_VALUE;
+                       CommonUtil::SetAllCheckState(false, *__pContentTableView, __pPresentationModel->GetContentCount(__currentContentIndex));
+                       CommonUtil::ShowCheckedCountLabel(*__pCheckedCountLabel, __checkedItemCount, *__pContentTableView, *this);
+               }
+               break;
+
+       case IDA_FOOTER_BUTTON_DELETE:
+               {
+                       ContentManager contentManager;
+                       Footer* pFooter = GetFooter();
+                       int totalCount = __pPresentationModel->GetContentCount(__currentContentIndex);
+                       int iCount = 0;
+
+                       if (__checkedItemCount <= INIT_VALUE)
+                       {
+                               return;
+                       }
+
+                       pFooter->SetItemEnabled(INDEX_FOOTER_DELETE, false);
+                       pFooter->SetItemEnabled(INDEX_FOOTER_SHARE, false);
+                       pFooter->SetItemEnabled(INDEX_FOOTER_ADDTOPLATLIST, false);
+                       pFooter->Invalidate(true);
+
+                       contentManager.Construct();
+                       for (iCount = 0; iCount < totalCount; iCount++)
+                       {
+                               if (__pContentTableView->IsItemChecked(iCount) == true)
+                               {
+                                       __pContentTableView->SetItemChecked(iCount, false);
+                                       ContentInformation* pContentInfoStruct = __pPresentationModel->GetContentInfoN(iCount);
+                                       contentManager.DeleteContent(pContentInfoStruct->contentId);
+
+                                       delete pContentInfoStruct;
+                                       pContentInfoStruct = null;
+                               }
+                       }
+                       __pPresentationModel->RefreshContentList(__currentContentIndex);
+                       __pContentTableView->UpdateTableView();
+                       __pContentTableView->Invalidate(true);
+
+                       __checkedItemCount = INIT_VALUE;
+                       CommonUtil::ShowCheckedCountLabel(*__pCheckedCountLabel, __checkedItemCount, *__pContentTableView, *this);
+
+                       if (__pPresentationModel->GetContentCount(__currentContentIndex) > 0)
+                       {
+                               CommonUtil::ShowSelectAllCheckButton(*__pSelectAllCheckedButton);
+                       }
+                       else
+                       {
+                               __pSelectAllCheckedButton->SetEnabled(false);
+                               __pSelectAllCheckedButton->SetShowState(false);
+                               CommonUtil::ShowNoContentImage(INIT_VALUE, *__pContentTableView, *__pNoContentImageLabel, *__pNoContentTextLabel);
+                       }
+               }
+               break;
+
+       case IDA_FOOTER_BUTTON_SHARE:
+               {
+                       Tizen::Base::Collection::ArrayList* pDataList = new (std::nothrow) ArrayList();
+                       Footer* pFooter = GetFooter();
+                       int totalCount = __pPresentationModel->GetContentCount(__currentContentIndex);
+
+                       pDataList->Construct();
+
+                       for (int iCount = 0; iCount < totalCount; iCount++)
+                       {
+                               if (__pContentTableView->IsItemChecked(iCount) == true)
+                               {
+                                       ContentInformation* pContentInfoStruct = __pPresentationModel->GetContentInfoN(iCount);
+                                       if (pContentInfoStruct == null)
+                                       {
+                                               pDataList->RemoveAll(true);
+                                               delete pDataList;
+                                               pDataList = null;
+                                               return;
+                                       }
+                                       pDataList->Add(*(new (std::nothrow) String(L"attachment:" + pContentInfoStruct->ContentFilePath)));
+
+                                       __pContentTableView->SetItemChecked(iCount, false);
+
+                                       delete pContentInfoStruct;
+                                       pContentInfoStruct = null;
+                               }
+                       }
+                       pFooter->SetItemEnabled(INDEX_FOOTER_DELETE, false);
+                       pFooter->SetItemEnabled(INDEX_FOOTER_SHARE, false);
+                       pFooter->SetItemEnabled(INDEX_FOOTER_ADDTOPLATLIST, false);
+
+                       __checkedItemCount = INIT_VALUE;
+                       CommonUtil::ShowCheckedCountLabel(*__pCheckedCountLabel, __checkedItemCount, *__pContentTableView, *this);
+                       CommonUtil::ShowSelectAllCheckButton(*__pSelectAllCheckedButton);
+
+                       Invalidate(true);
+
+                       if (__pSharePopup == null)
+                       {
+                               __pSharePopup = new (std::nothrow) SharePopup();
+                               __pSharePopup->Initialize();
+                       }
+                       __pSharePopup->SetShowState(true);
+                       __pSharePopup->Show();
+                       __pSharePopup->SetArguments(pDataList);
+               }
+               break;
+
+       case IDA_FOOTER_BUTTON_ADD_TO_PLAYLIST:
+               {
+                       ContentManager contentManager;
+                       Footer* pFooter = GetFooter();
+                       Tizen::Base::Collection::ArrayList* pDataList = new (std::nothrow) ArrayList();
+                       int totalCount = 0;
+
+                       __pPlayListPickerPopup = new (std::nothrow) PlayListPickerPopup();
+                       __pPlayListPickerPopup->Initialize(this, pDataList);
+                       __pPlayListPickerPopup->SetShowState(true);
+                       __pPlayListPickerPopup->Show();
+
+                       if (__checkedItemCount <= 0)
+                       {
+                               return;
+                       }
+
+                       pDataList->Construct();
+                       contentManager.Construct();
+                       totalCount = __pPresentationModel->GetContentCount(__currentContentIndex);
+
+                       for (int iCount = 0; iCount < totalCount; iCount++)
+                       {
+                               if (__pContentTableView->IsItemChecked(iCount) == true)
+                               {
+                                       ContentInformation* pContentInfoStruct = __pPresentationModel->GetContentInfoN(iCount);
+                                       if (pContentInfoStruct == null)
+                                       {
+                                               pDataList->RemoveAll(true);
+                                               delete pDataList;
+                                               pDataList = null;
+                                               return;
+                                       }
+
+                                       pDataList->Add(*(new (std::nothrow) String(pContentInfoStruct->ContentFilePath)));
+
+                                       __pContentTableView->SetItemChecked(iCount, false);
+
+                                       delete pContentInfoStruct;
+                                       pContentInfoStruct = null;
+                               }
+                       }
+                       //__pPlayListPickerPopup->SetCollectedContent(pDataList);
+
+                       pFooter->SetItemEnabled(INDEX_FOOTER_DELETE, false);
+                       pFooter->SetItemEnabled(INDEX_FOOTER_SHARE, false);
+                       pFooter->SetItemEnabled(INDEX_FOOTER_ADDTOPLATLIST, false);
+
+                       __checkedItemCount = INIT_VALUE;
+                       CommonUtil::ShowCheckedCountLabel(*__pCheckedCountLabel, __checkedItemCount, *__pContentTableView, *this);
+                       CommonUtil::ShowSelectAllCheckButton(*__pSelectAllCheckedButton);
+
+                       Invalidate(true);
+               }
+               break;
+
+       default:
+               break;
+       }
+       AppLogDebug("EXIT");
+}
+
+int
+ComposerContentListForm::GetItemCount(void)
+{
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
+       return __pPresentationModel->GetContentCount(__currentContentIndex);
+}
+
+Tizen::Ui::Controls::TableViewItem*
+ComposerContentListForm::CreateItem(const int itemIndex, int itemWidth)
+{
+       AppLogDebug("ENTER");
+       ContentInformation* pContentInfoStruct = null;
+
+       TableViewItem* pItem = new (std::nothrow) TableViewItem();
+       if (__checkEdit)
+       {
+               pItem->Construct(Dimension(itemWidth, ITEM_HEIGHT), TABLE_VIEW_ANNEX_STYLE_MARK);
+       }
+       else
+       {
+               pItem->Construct(Dimension(itemWidth, ITEM_HEIGHT), TABLE_VIEW_ANNEX_STYLE_NORMAL);
+               pItem->SetContextItem(__pContextItem);
+       }
+       pItem->SetBackgroundColor(COLOR_WHITE);
+
+       pContentInfoStruct = __pPresentationModel->GetContentInfoN(itemIndex);
+       if (pContentInfoStruct == null)
+       {
+               delete pItem;
+               pItem = null;
+               return null;
+       }
+
+       RequestThumbnail(pContentInfoStruct->contentId, (new (std::nothrow) int(itemIndex)));
+       CreateTableViewItem(*pItem, *pContentInfoStruct);
+
+       delete pContentInfoStruct;
+       pContentInfoStruct = null;
+
+       AppLogDebug("EXIT");
+       return pItem;
+}
+
+void
+ComposerContentListForm::OnTableViewItemStateChanged(Tizen::Ui::Controls::TableView& tableView,
+                                                       int itemIndex,
+                                                       Tizen::Ui::Controls::TableViewItem* pItem,
+                                                       Tizen::Ui::Controls::TableViewItemStatus status)
+{
+       AppLogDebug("ENTER");
+       switch (status)
+       {
+       case TABLE_VIEW_ITEM_STATUS_CHECKED:
+               {
+                       Footer* pFooter = GetFooter();
+                       __checkedItemCount++;
+                       tableView.SetItemChecked(itemIndex, true);
+
+                       pFooter->SetItemEnabled(INDEX_FOOTER_DELETE, true);
+                       pFooter->SetItemEnabled(INDEX_FOOTER_SHARE, true);
+                       pFooter->SetItemEnabled(INDEX_FOOTER_ADDTOPLATLIST, true);
+
+                       pFooter->Invalidate(true);
+                       if (__checkedItemCount == __pPresentationModel->GetContentCount(__currentContentIndex))
+                       {
+                               __pSelectAllCheckedButton->SetSelected(true);
+                       }
+                       CommonUtil::ShowCheckedCountLabel(*__pCheckedCountLabel, __checkedItemCount, *__pContentTableView, *this);
+               }
+               break;
+
+       case TABLE_VIEW_ITEM_STATUS_UNCHECKED:
+               {
+                       Footer* pFooter = GetFooter();
+
+                       __checkedItemCount--;
+                       tableView.SetItemChecked(itemIndex, false);
+
+                       if (__checkedItemCount == INIT_VALUE)
+                       {
+                               pFooter->SetItemEnabled(INDEX_FOOTER_DELETE, false);
+                               pFooter->SetItemEnabled(INDEX_FOOTER_SHARE, false);
+                               pFooter->SetItemEnabled(INDEX_FOOTER_ADDTOPLATLIST, false);
+
+                               pFooter->Invalidate(true);
+                       }
+
+                       if (__checkedItemCount != __pPresentationModel->GetContentCount(__currentContentIndex))
+                       {
+                               __pSelectAllCheckedButton->SetSelected(false);
+                       }
+                       CommonUtil::ShowCheckedCountLabel(*__pCheckedCountLabel, __checkedItemCount, *__pContentTableView, *this);
+               }
+               break;
+
+       case TABLE_VIEW_ITEM_STATUS_SELECTED:
+               {
+                       SceneManager* pSceneManager = SceneManager::GetInstance();
+                       ArrayList* tempArg;
+                       AppAssert(pSceneManager);
+                       tempArg = MakePlayerSceneParam(itemIndex);
+                       pSceneManager->GoForward(ForwardSceneTransition(IDSCN_PLAYER), tempArg);
+
+                       if (tempArg != null)
+                       {
+                               tempArg->RemoveAll();
+                               delete tempArg;
+                               tempArg = null;
+                       }
+               }
+               break;
+
+       default:
+               break;
+       }
+       AppLogDebug("EXIT");
+}
+
+Tizen::Base::Collection::ArrayList*
+ComposerContentListForm::MakePlayerSceneParam(int startIndex)
+{
+       AppLogDebug("ENTER");
+       ArrayList* pTempList = new (std::nothrow) ArrayList();
+       ArrayList* pSelectedMusicContent = null;
+
+       pSelectedMusicContent = __pPresentationModel->GetContentPathListN(__currentContentIndex);
+       if (pTempList == null || pSelectedMusicContent == null)
+       {
+               AppLogDebug("EXIT");
+               return null;
+       }
+       pTempList->Construct();
+
+       pTempList->Add(*(new (std::nothrow) String(MUSIC)));
+       pTempList->Add(*(new (std::nothrow) Integer(startIndex)));
+       pTempList->Add(*(pSelectedMusicContent));
+
+       AppLogDebug("EXIT");
+       return pTempList;
+}
+
+result
+ComposerContentListForm::CreateTableViewItem(Tizen::Ui::Container& parent,
+                                                                               const ContentInformation& contentInfoStruct)
+{
+       AppLogDebug("ENTER");
+       result r = E_SUCCESS;
+       Rectangle rectTitleName;
+       Rectangle rectPlayTime;
+       Rectangle rectArtistName;
+
+       if (__checkEdit)
+       {
+               rectTitleName = RECT_COMPOSER_EDIT_ITEM_TITLE_NAME;
+               rectArtistName = RECT_COMPOSER_EDIT_ITEM_ARTIST_NAME;
+               rectPlayTime = RECT_COMPOSER_EDIT_ITEM_TIME;
+       }
+       else
+       {
+               rectTitleName = RECT_COMPOSER_ITEM_TITLE_NAME;
+               rectArtistName = RECT_COMPOSER_ITEM_ARTIST_NAME;
+               rectPlayTime = RECT_COMPOSER_ITEM_TIME;
+       }
+
+       Label* pThumbnailLabel = new (std::nothrow) Label();
+       pThumbnailLabel->Construct(RECT_COMPOSER_ITEM_THUMBNAIL, L"");
+       pThumbnailLabel->SetTextConfig(FONT_SIZE, LABEL_TEXT_STYLE_NORMAL);
+       pThumbnailLabel->SetBackgroundBitmap(*GetDefaultThumbnail());
+       pThumbnailLabel->SetName(L"pThumbnailLabel");
+
+       Label* pTitleLabel = new (std::nothrow) Label();
+       pTitleLabel->Construct(rectTitleName, L"");
+       pTitleLabel->SetTextConfig(FONT_SIZE, LABEL_TEXT_STYLE_NORMAL);
+       pTitleLabel->SetTextHorizontalAlignment(ALIGNMENT_LEFT);
+       pTitleLabel->SetText(contentInfoStruct.TitleName);
+
+       Label* pArtistNameLabel = new (std::nothrow) Label();
+       pArtistNameLabel->Construct(rectArtistName, L"");
+       pArtistNameLabel->SetTextConfig(FONT_SIZE, LABEL_TEXT_STYLE_NORMAL);
+       pArtistNameLabel->SetTextHorizontalAlignment(ALIGNMENT_LEFT);
+       pArtistNameLabel->SetText(contentInfoStruct.ArtistName);
+
+       Label* pTimeLabel = new (std::nothrow) Label();
+       pTimeLabel->Construct(rectPlayTime, L"");
+       pTimeLabel->SetTextConfig(FONT_SIZE, LABEL_TEXT_STYLE_NORMAL);
+       pTimeLabel->SetTextHorizontalAlignment(ALIGNMENT_RIGHT);
+       pTimeLabel->SetText(CommonUtil::GetFormatDate(contentInfoStruct.Duration));
+
+       parent.AddControl(*pThumbnailLabel);
+       parent.AddControl(*pTitleLabel);
+       parent.AddControl(*pArtistNameLabel);
+       parent.AddControl(*pTimeLabel);
+       AppLogDebug("EXIT");
+       return r;
+}
+
+void
+ComposerContentListForm::ToggleViewMode(bool editMode)
+{
+       AppLogDebug("ENTER");
+       Footer* pFooter = GetFooter();
+
+       if (editMode)
+       {
+               int currentAlbumContentCount = 0;
+               currentAlbumContentCount = __pPresentationModel->GetContentCount(__currentContentIndex);
+
+               pFooter->RemoveAllButtons();
+               pFooter->RemoveAllItems();
+               pFooter->RemoveActionEventListener(*this);
+               pFooter = CommonUtil::CreateEditFooter(*this);
+               pFooter->AddActionEventListener(*this);
+               pFooter->SetBackButton();
+               SetFormBackEventListener(this);
+
+               if (currentAlbumContentCount > INIT_VALUE)
+               {
+                       SetTitleText(__strHeaderName);
+               }
+               else
+               {
+                       SetTitleText("No songs");
+                       CommonUtil::ShowNoContentImage(INIT_VALUE, *__pContentTableView, *__pNoContentImageLabel, *__pNoContentTextLabel);
+                       pFooter->SetItemEnabled(INDEX_FOOTER_EDIT, false);
+               }
+
+               __pSelectAllCheckedButton->SetEnabled(false);
+               __pSelectAllCheckedButton->SetShowState(false);
+
+               __checkEdit = false;
+               __pContentTableView->SetBounds(Rectangle(0, 0, GetClientAreaBounds().width, GetClientAreaBounds().height));
+               __pContentTableView->Invalidate(true);
+               __pContentTableView->UpdateTableView();
+       }
+       else
+       {
+               SetTitleText(ResourceManager::GetString("IDS_COM_BODY_EDIT"));
+
+               pFooter->RemoveAllButtons();
+               pFooter->RemoveAllItems();
+               pFooter->RemoveActionEventListener(*this);
+
+               pFooter = CommonUtil::CreateDeleteFooter(*this);
+               pFooter->AddActionEventListener(*this);
+
+               __pSelectAllCheckedButton->SetEnabled(true);
+               __pSelectAllCheckedButton->SetShowState(true);
+
+               __checkEdit = true;
+               __pContentTableView->SetBounds(Rectangle(0, __pSelectAllCheckedButton->GetHeight(), GetClientAreaBounds().width, (GetClientAreaBounds().height - __pSelectAllCheckedButton->GetHeight())));
+               __pContentTableView->Invalidate(true);
+               __pContentTableView->UpdateTableView();
+       }
+       Invalidate(true);
+       AppLogDebug("EXIT");
+}
+
+void
+ComposerContentListForm::OnAppControlCompleteResponseReceived(const AppId& appId,
+               const String& operationId, AppCtrlResult appControlResult,
+               const IMap* pExtraData)
+{
+       AppLogDebug("ENTER");
+       if (pExtraData == null)
+       {
+               AppLogDebug("EXIT");
+               return;
+       }
+       AppLogDebug("%ls, %ls", appId.GetPointer(), operationId.GetPointer());
+       if (appId.Equals(String(TIZEN_APPCONTROL_PROVIDER_CONTACT)))
+       {
+               if (appControlResult == APP_CTRL_RESULT_SUCCEEDED)
+               {
+                       const String* pContactId = static_cast<const String*>(pExtraData->GetValue(String(APPCONTROL_KEY_RETURNTYPE)));
+                       if (pContactId->Equals(APPCONTROL_VALUE_CONTACTID, true))
+                       {
+                               const String* pResultString = static_cast<const String*>(pExtraData->GetValue(String(APPCONTROL_KEY_VALUE)));
+
+                               AppLogDebug("%ls", pResultString->GetPointer());
+                               int contactId;
+                               Integer::Parse(*pResultString, contactId);
+
+                               AddressbookManager* pAddressbookManager = AddressbookManager::GetInstance();
+                               Addressbook* pAddressbook = pAddressbookManager->GetAddressbookN(DEFAULT_ADDRESSBOOK_ID);
+
+                               ContentInformation* pCcontentInfo = __pPresentationModel->GetContentInfoN(__itemIndex);
+                               if (pCcontentInfo == null)
+                               {
+                                       delete pAddressbook;
+                                       pAddressbook = null;
+                                       return;
+                               }
+
+                               Contact* pContact = pAddressbook->GetContactN(contactId);
+                               pContact->SetValue(CONTACT_PROPERTY_ID_RINGTONE, pCcontentInfo->ContentFilePath);
+                               result r = pAddressbook->UpdateContact(*pContact);
+
+                               if (r == E_SUCCESS)
+                               {
+                                       MessageBox messageBox;
+                                       messageBox.Construct(L"", ResourceManager::GetString(L"IDS_COM_POP_SUCCESS"),
+                                                       MSGBOX_STYLE_OK,
+                                                       COUNT_MESSAGE_BOX_TIMEOUT);
+                                       int modalResult = 0;
+                                       messageBox.ShowAndWait(modalResult);
+                               }
+
+                               delete pCcontentInfo;
+                               pCcontentInfo = null;
+
+                               delete pContact;
+                               pContact = null;
+
+                               delete pAddressbook;
+                               pAddressbook = null;
+                       }
+               }
+       }
+       AppLogDebug("EXIT");
+}
+
+void
+ComposerContentListForm::OnThumbnailInfoReveivedN(ThumbnailInfo* pThumbnailInfo)
+{
+       AppLogDebug("ENTER");
+       int itemIndex = 0;
+       void* pParam = null;
+       __pThumbnail = pThumbnailInfo->GetBitmapN();
+       pParam = pThumbnailInfo->GetUserParamN();
+       if (pParam)
+       {
+               itemIndex = *(static_cast<int*>(pParam));
+       }
+       __pContentTableView->RefreshItem(itemIndex, TABLE_VIEW_REFRESH_TYPE_ITEM_MODIFY);
+       delete pThumbnailInfo;
+       delete static_cast<int*>(pParam);
+       AppLogDebug("EXIT");
+}
+
+void
+ComposerContentListForm::OnUserEventReceivedN(RequestId requestId, Tizen::Base::Collection::IList* pArgs)
+{
+       AppLogDebug("ENTER");
+       AppLogDebug("OnUserEventReceivedN %d", requestId);
+       if (requestId == ID_DESTORY_PLAY_LIST_PICKER_POPUP)
+       {
+               if (__pPlayListPickerPopup != null)
+               {
+                       delete __pPlayListPickerPopup;
+                       __pPlayListPickerPopup = null;
+               }
+       }
+       AppLogDebug("EXIT");
+}
+
+void
+ComposerContentListForm::UpdateItem(int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem)
+{
+       AppLogDebug("ENTER");
+       Label* pThumbnailLabel = static_cast<Label*>(pItem->GetControl(L"pThumbnailLabel"));
+       if (__pThumbnail == null || pThumbnailLabel == null)
+       {
+               AppLogDebug("__pThumbnail or pThumbnailLabel is null");
+               delete __pThumbnail;
+               __pThumbnail = null;
+               return;
+       }
+       pThumbnailLabel->SetBackgroundBitmap(*__pThumbnail);
+       delete __pThumbnail;
+       __pThumbnail = null;
+       pThumbnailLabel->Invalidate(true);
+       AppLogDebug("EXIT");
+}
\ No newline at end of file
old mode 100755 (executable)
new mode 100644 (file)
index 03ceffc..07f5996
@@ -1,4 +1,4 @@
-//
+//
 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
 //
 // Licensed under the Flora License, Version 1.0 (the License);
 // See the License for the specific language governing permissions and
 // limitations under the License.
 //
+
+/**
+ * @file               MpComposerContentPickerPanel.cpp
+ * @brief              This is the implementation file for ComposerContentPickerPanel class.
+ */
+
 #include "MpComposerContentPickerPanel.h"
 
 using namespace Tizen::Base;
 using namespace Tizen::Base::Collection;
 using namespace Tizen::Content;
 using namespace Tizen::Graphics;
+using namespace Tizen::Social;
 using namespace Tizen::Ui;
 using namespace Tizen::Ui::Controls;
 using namespace Tizen::Ui::Scenes;
-using namespace Tizen::Social;
 
-ComposerContentPickerPanel::ComposerContentPickerPanel()
-: __checkedItemCount(0)
-, __pContentTableView(null)
-, __pSelectAllCheckedButton(null)
-, __pCheckedCountLabel(null)
+ComposerContentPickerPanel::ComposerContentPickerPanel(void)
+       : __checkedItemCount(0)
+       , __pContentTableView(null)
+       , __pSelectAllCheckedButton(null)
+       , __pCheckedCountLabel(null)
 {
-       //AppLogDebug("ComposerContentPickerPanel");
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 
-ComposerContentPickerPanel::~ComposerContentPickerPanel()
+ComposerContentPickerPanel::~ComposerContentPickerPanel(void)
 {
-       //AppLogDebug("~ComposerContentPickerPanel");
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 
-
 bool
 ComposerContentPickerPanel::Initialize(void)
 {
-       //AppLogDebug("Initialize");
+       AppLogDebug("ENTER");
        result r = Construct(Rectangle(INIT_VALUE, INIT_VALUE, INIT_VALUE, INIT_VALUE));
        if (IsFailed(r))
        {
                return false;
        }
+       AppLogDebug("EXIT");
        return true;
 }
 
 result
 ComposerContentPickerPanel::OnInitializing(void)
 {
-       //AppLogDebug("OnInitializing");
+       AppLogDebug("ENTER");
        Form* pForm = dynamic_cast<Form*>(GetParent());
        AppAssert(pForm);
 
-       int width  = pForm->GetClientAreaBounds().width;
+       int width = pForm->GetClientAreaBounds().width;
        int height = pForm->GetClientAreaBounds().height;
 
        SetBounds(INIT_VALUE, INIT_VALUE, width, height);
@@ -79,123 +87,110 @@ ComposerContentPickerPanel::OnInitializing(void)
 
        __pPresentationModel = ComposerListPresentationModel::GetInstance();
 
+       AppLogDebug("EXIT");
        return E_SUCCESS;
 }
 
 result
 ComposerContentPickerPanel::OnTerminating(void)
 {
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
        return E_SUCCESS;
 }
 
 void
 ComposerContentPickerPanel::OnActionPerformed(const Tizen::Ui::Control& source, int actionId)
 {
-       //AppLogDebug("OnActionPerformed");
+       AppLogDebug("ENTER");
        SceneManager* pSceneManager = SceneManager::GetInstance();
        AppAssert(pSceneManager);
 
-       int totalCount = __pPresentationModel->GetSongContentCount();
+       int totalCount = __pPresentationModel->GetContentCount(__pPresentationModel->GetCurrentComposerIndex());
 
-       switch(actionId)
+       switch (actionId)
        {
        case IDA_CHECK_BUTTON:
-       {
-               //AppLogDebug("IDA_CHECK_BUTTON");
-               __checkedItemCount = totalCount;
-               CommonUtil::SetAllCheckState(true, *__pContentTableView, totalCount);
-               Form* pForm = dynamic_cast<Form*>(GetParent());
-               AppAssert(pForm);
-               CommonUtil::ShowCheckedCountLabel(*__pCheckedCountLabel, __checkedItemCount, *__pContentTableView, *pForm);
-               CommonUtil::SetButtonEnabled(*pForm, __checkedItemCount, actionId);
+               {
+                       //AppLogDebug("IDA_CHECK_BUTTON");
+                       __checkedItemCount = totalCount;
+                       CommonUtil::SetAllCheckState(true, *__pContentTableView, totalCount);
+                       Form* pForm = dynamic_cast<Form*>(GetParent());
+                       AppAssert(pForm);
+                       CommonUtil::ShowCheckedCountLabel(*__pCheckedCountLabel, __checkedItemCount, *__pContentTableView, *pForm);
+                       CommonUtil::SetButtonEnabled(*pForm, __checkedItemCount, actionId);
+               }
                break;
-       }
+
        case IDA_UNCHECK_BUTTON:
-       {
-               //AppLogDebug("IDA_UNCHECK_BUTTON");
-               __checkedItemCount = INIT_VALUE;
-               CommonUtil::SetAllCheckState(false, *__pContentTableView, totalCount);
-               Form* pForm = dynamic_cast<Form*>(GetParent());
-               AppAssert(pForm);
-               CommonUtil::ShowCheckedCountLabel(*__pCheckedCountLabel, __checkedItemCount, *__pContentTableView, *pForm);
-               CommonUtil::SetButtonEnabled(*pForm, __checkedItemCount, actionId);
-               break;
-       }
-       case IDA_FOOTER_BUTTON_ADD_TO_PLAYLIST:
-       {
-               if (__checkedItemCount <= 0)
                {
-                       return;
+                       //AppLogDebug("IDA_UNCHECK_BUTTON");
+                       __checkedItemCount = INIT_VALUE;
+                       CommonUtil::SetAllCheckState(false, *__pContentTableView, totalCount);
+                       Form* pForm = dynamic_cast<Form*>(GetParent());
+                       AppAssert(pForm);
+                       CommonUtil::ShowCheckedCountLabel(*__pCheckedCountLabel, __checkedItemCount, *__pContentTableView, *pForm);
+                       CommonUtil::SetButtonEnabled(*pForm, __checkedItemCount, actionId);
                }
+               break;
 
-               PlayList* pPlayList = PlayListManager::GetInstance()->GetPlayListN(CommonUtil::GetAddtoPlaylistName());
-
-               int totalCount = __pPresentationModel->GetSongContentCount();
-               for(int iCount = 0; iCount < totalCount; iCount++)
+       case IDA_FOOTER_BUTTON_ADD_TO_PLAYLIST:
                {
-                       if (__pContentTableView->IsItemChecked(iCount) == true)
+                       if (__checkedItemCount <= 0)
+                       {
+                               return;
+                       }
+
+                       int totalCount = __pPresentationModel->GetContentCount(__pPresentationModel->GetCurrentComposerIndex());
+                       for (int iCount = 0; iCount < totalCount; iCount++)
                        {
-                               ContentInformationStruct* pContentInfoStruct = __pPresentationModel->GetSongContentInfoN(iCount);
-                               if (pContentInfoStruct == null)
+                               if (__pContentTableView->IsItemChecked(iCount) == true)
                                {
-                                       continue;
+                                       __pPresentationModel->AddContent(*new (std::nothrow) String(CommonUtil::GetAddtoPlaylistName()), iCount);
+                                       __pContentTableView->SetItemChecked(iCount, false);
                                }
-                               pPlayList->AddItem(pContentInfoStruct->contentId);
-
-                               __pContentTableView->SetItemChecked(iCount, false);
-
-                               delete pContentInfoStruct->pThumbnail;
-                               pContentInfoStruct->pThumbnail = null;
-
-                               delete pContentInfoStruct;
-                               pContentInfoStruct = null;
                        }
-               }
 
-               delete pPlayList;
-               pPlayList = null;
+                       Form* pForm = dynamic_cast<Form*>(GetParent());
+                       AppAssert(pForm);
+                       CommonUtil::SetButtonEnabled(*pForm, __checkedItemCount, actionId);
 
-               Form* pForm = dynamic_cast<Form*>(GetParent());
-               AppAssert(pForm);
-               CommonUtil::SetButtonEnabled(*pForm, __checkedItemCount, actionId);
+                       __checkedItemCount = INIT_VALUE;
+                       CommonUtil::ShowCheckedCountLabel(*__pCheckedCountLabel, __checkedItemCount, *__pContentTableView, *pForm);
+                       CommonUtil::ShowSelectAllCheckButton(*__pSelectAllCheckedButton);
+                       CommonUtil::SetAddtoPlaylistState(false);
 
-               __checkedItemCount = INIT_VALUE;
-               CommonUtil::ShowCheckedCountLabel(*__pCheckedCountLabel, __checkedItemCount, *__pContentTableView, *pForm);
-               CommonUtil::ShowSelectAllCheckButton(*__pSelectAllCheckedButton);
-               CommonUtil::SetAddtoPlaylistState(false);
+                       Invalidate(true);
 
-               Invalidate(true);
-
-               pSceneManager->GoForward(ForwardSceneTransition(IDSCN_PLAYLIST_LIST,
+                       pSceneManager->GoForward(ForwardSceneTransition(IDSCN_PLAYLIST_LIST,
                                                                                                                SCENE_TRANSITION_ANIMATION_TYPE_NONE,
                                                                                                                SCENE_HISTORY_OPTION_NO_HISTORY,
                                                                                                                SCENE_DESTROY_OPTION_DESTROY));
-
+               }
                break;
-       }
+
        case IDA_FOOTER_BUTTON_CANCEL:
-       {
-               Form* pForm = dynamic_cast<Form*>(GetParent());
-               AppAssert(pForm);
-               CommonUtil::SetButtonEnabled(*pForm, __checkedItemCount, actionId);
-               //AppLogDebug("IDA_FOOTER_BUTTON_CANCEL");
-               pSceneManager->GoBackward(BackwardSceneTransition());
+               {
+                       Form* pForm = dynamic_cast<Form*>(GetParent());
+                       AppAssert(pForm);
+                       CommonUtil::SetButtonEnabled(*pForm, __checkedItemCount, actionId);
+                       //AppLogDebug("IDA_FOOTER_BUTTON_CANCEL");
+                       pSceneManager->GoBackward(BackwardSceneTransition());
+               }
                break;
-       }
+
        default:
-       {
                break;
-       }
        }//End of switch
+       AppLogDebug("EXIT");
 }
 
 void
 ComposerContentPickerPanel::OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previousSceneId,
-                                                                         const Tizen::Ui::Scenes::SceneId& currentSceneId,
-                                                                         Tizen::Base::Collection::IList* pArgs)
+                                                                               const Tizen::Ui::Scenes::SceneId& currentSceneId,
+                                                                               Tizen::Base::Collection::IList* pArgs)
 {
-       //AppLogDebug("OnSceneActivatedN");
-
+       AppLogDebug("ENTER");
        Form* pForm = dynamic_cast<Form*>(GetParent());
        AppAssert(pForm);
 
@@ -203,20 +198,20 @@ ComposerContentPickerPanel::OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId&
        pFooter->AddActionEventListener(*this);
 
        CommonUtil::SetButtonEnabled(*pForm, __checkedItemCount);
-
+       __pPresentationModel->UpdateComposerList();
        if (pArgs != null)
        {
                pArgs->RemoveAll(true);
                delete pArgs;
        }
+       AppLogDebug("EXIT");
 }
 
 void
 ComposerContentPickerPanel::OnSceneDeactivated(const Tizen::Ui::Scenes::SceneId& currentSceneId,
-                                                                                  const Tizen::Ui::Scenes::SceneId& nextSceneId)
+                                                                                       const Tizen::Ui::Scenes::SceneId& nextSceneId)
 {
-       //AppLogDebug("OnSceneDeactivated");
-
+       AppLogDebug("ENTER");
        Form* pForm = dynamic_cast<Form*>(GetParent());
        AppAssert(pForm);
 
@@ -224,100 +219,100 @@ ComposerContentPickerPanel::OnSceneDeactivated(const Tizen::Ui::Scenes::SceneId&
        pFooter->RemoveAllButtons();
        pFooter->RemoveAllItems();
        pFooter->RemoveActionEventListener(*this);
+       AppLogDebug("EXIT");
 }
 
 int
 ComposerContentPickerPanel::GetItemCount(void)
 {
-       //AppLogDebug("GetItemCount");
-
+       AppLogDebug("ENTER");
        if (__pPresentationModel == null)
        {
-               return 0;
+               return INIT_VALUE;
        }
-       return __pPresentationModel->GetSongContentCount();
+       AppLogDebug("EXIT");
+       return __pPresentationModel->GetContentCount(__pPresentationModel->GetCurrentComposerIndex());
 }
 
 Tizen::Ui::Controls::TableViewItem*
 ComposerContentPickerPanel::CreateItem(const int itemIndex, int itemWidth)
 {
-       //AppLogDebug("CreateTableViewItem");
-
-       ContentInformationStruct* pContentInfoStruct = __pPresentationModel->GetSongContentInfoN(itemIndex);
+       AppLogDebug("ENTER");
+       ContentInformation* pContentInfoStruct = __pPresentationModel->GetContentInfoN(itemIndex);
        if (pContentInfoStruct == null)
        {
                return null;
        }
 
        TableViewItem* pItem = new (std::nothrow) TableViewItem();
-       pItem->Construct(Dimension(itemWidth, ITEM_HEIGHT),TABLE_VIEW_ANNEX_STYLE_MARK);
+       pItem->Construct(Dimension(itemWidth, ITEM_HEIGHT), TABLE_VIEW_ANNEX_STYLE_MARK);
        pItem->SetBackgroundColor(COLOR_ITEM);
 
-       CommonUtil::CreateContentPikerTableViewItem(*pItem, pContentInfoStruct->TitleName,CommonUtil::GetFormatDate(pContentInfoStruct->Duration));
-
-       //test_code_start
-       delete pContentInfoStruct->pThumbnail;
-       pContentInfoStruct->pThumbnail = null;
+       CommonUtil::CreateContentPikerTableViewItem(*pItem, pContentInfoStruct->TitleName, CommonUtil::GetFormatDate(pContentInfoStruct->Duration));
 
        delete pContentInfoStruct;
        pContentInfoStruct = null;
-       //test_code_end
 
+       AppLogDebug("EXIT");
        return pItem;
 }
 
 bool
 ComposerContentPickerPanel::DeleteItem(const int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem)
 {
+       AppLogDebug("ENTER");
        delete pItem;
        pItem = null;
 
+       AppLogDebug("EXIT");
        return true;
 }
 
 void
 ComposerContentPickerPanel::UpdateItem(int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem)
 {
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 
 int
 ComposerContentPickerPanel::GetDefaultItemHeight(void)
 {
-       //AppLogDebug("GetDefaultItemHeight");
-
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
        return ITEM_HEIGHT;
 }
 
 void
 ComposerContentPickerPanel::OnTableViewItemStateChanged(Tizen::Ui::Controls::TableView& tableView,
-                                                        int itemIndex,
-                                                        Tizen::Ui::Controls::TableViewItem* pItem,
-                                                        Tizen::Ui::Controls::TableViewItemStatus status)
+                                                               int itemIndex,
+                                                               Tizen::Ui::Controls::TableViewItem* pItem,
+                                                               Tizen::Ui::Controls::TableViewItemStatus status)
 {
-       //AppLogDebug("OnTableViewItemStateChanged");
-       switch(status)
+       AppLogDebug("ENTER");
+       switch (status)
        {
        case TABLE_VIEW_ITEM_STATUS_CHECKED:
-       {
-               __checkedItemCount++;
-               tableView.SetItemChecked(itemIndex, true);
+               {
+                       __checkedItemCount++;
+                       tableView.SetItemChecked(itemIndex, true);
+               }
                break;
-       }
+
        case TABLE_VIEW_ITEM_STATUS_UNCHECKED:
-       {
-               __checkedItemCount--;
-               tableView.SetItemChecked(itemIndex, false);
+               {
+                       __checkedItemCount--;
+                       tableView.SetItemChecked(itemIndex, false);
+               }
                break;
-       }
+
        default:
-       {
                break;
-       }
        }//end of switch
 
        CommonUtil::ShowSelectAllCheckButton(*__pSelectAllCheckedButton);
 
-       if (__checkedItemCount == __pPresentationModel->GetSongContentCount())
+       if (__checkedItemCount == __pPresentationModel->GetContentCount(__pPresentationModel->GetCurrentComposerIndex()))
        {
                __pSelectAllCheckedButton->SetSelected(true);
        }
@@ -328,20 +323,23 @@ ComposerContentPickerPanel::OnTableViewItemStateChanged(Tizen::Ui::Controls::Tab
        AppAssert(pForm);
        CommonUtil::ShowCheckedCountLabel(*__pCheckedCountLabel, __checkedItemCount, *__pContentTableView, *pForm);
        CommonUtil::SetButtonEnabled(*pForm, __checkedItemCount);
+       AppLogDebug("EXIT");
 }
 
 void
 ComposerContentPickerPanel::OnTableViewContextItemActivationStateChanged(Tizen::Ui::Controls::TableView& tableView,
-                                                                      int itemIndex,
-                                                                      Tizen::Ui::Controls::TableViewContextItem* pContextItem,
-                                                                      bool activated)
+                                                                               int itemIndex,
+                                                                               Tizen::Ui::Controls::TableViewContextItem* pContextItem,
+                                                                               bool activated)
 {
-       //AppLogDebug("OnTableViewContextItemActivationStateChanged");
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 void
 ComposerContentPickerPanel::OnTableViewItemReordered(Tizen::Ui::Controls::TableView& tableView,
-                                                  int itemIndexFrom,
-                                                  int itemIndexTo)
+                                                               int itemIndexFrom,
+                                                               int itemIndexTo)
 {
-       //AppLogDebug("OnTableViewItemReordered");
-}
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
+}
\ No newline at end of file
old mode 100755 (executable)
new mode 100644 (file)
index 5409657..56cb9d6
@@ -1,4 +1,4 @@
-//
+//
 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
 //
 // Licensed under the Flora License, Version 1.0 (the License);
 // limitations under the License.
 //
 
+/**
+ * @file               MpComposerListEditorPanel.cpp
+ * @brief              This is the implementation file for ComposerListEditorPanel class.
+ */
+
 #include "MpComposerListEditorPanel.h"
 #include "MpPlaylistPickerPopup.h"
+#include "MpThumbnailInfo.h"
 
 using namespace Tizen::Base;
 using namespace Tizen::Base::Collection;
@@ -26,42 +32,47 @@ using namespace Tizen::Ui::Controls;
 using namespace Tizen::Ui::Scenes;
 
 ComposerListEditorPanel::ComposerListEditorPanel(void)
-: __checkedItemCount(0)
-, __pContentTableView(null)
-, __pSelectAllCheckedButton(null)
-, __pCheckedCountLabel(null)
-, __pPlayListPickerPopup(null)
+       : ThumbnailBase::ThumbnailBase()
+       , __checkedItemCount(0)
+       , __pContentTableView(null)
+       , __pSelectAllCheckedButton(null)
+       , __pCheckedCountLabel(null)
+       , __pThumbnail(null)
+       , __pPlayListPickerPopup(null)
 {
-       //AppLogDebug("ComposerListEditorPanel");
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 
 ComposerListEditorPanel::~ComposerListEditorPanel(void)
 {
-       //AppLogDebug("~ComposerListEditorPanel");
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 
 bool
 ComposerListEditorPanel::Initialize(void)
 {
-       //AppLogDebug("Initialize");
-       result r = Construct(Rectangle(INIT_VALUE, INIT_VALUE, INIT_VALUE, INIT_VALUE)); // Should be set proper area at OnInitializing().
+       AppLogDebug("ENTER");
+       result r = Panel::Construct(Rectangle(INIT_VALUE, INIT_VALUE, INIT_VALUE, INIT_VALUE)); // Should be set proper area at OnInitializing().
        if (IsFailed(r))
        {
                return false;
        }
+       AppLogDebug("EXIT");
        return true;
 }
 
 result
 ComposerListEditorPanel::OnInitializing(void)
 {
-       //AppLogDebug("OnInitializing");
+       AppLogDebug("ENTER");
        __pPresentationModel = ComposerListPresentationModel::GetInstance();
 
        Form* pForm = dynamic_cast<Form*>(GetParent());
        AppAssert(pForm);
 
-       int width  = pForm->GetClientAreaBounds().width;
+       int width = pForm->GetClientAreaBounds().width;
        int height = pForm->GetClientAreaBounds().height;
 
        SetBounds(INIT_VALUE, INIT_VALUE, width, height);
@@ -80,101 +91,101 @@ ComposerListEditorPanel::OnInitializing(void)
        AddControl(*__pSelectAllCheckedButton);
        AddControl(*__pCheckedCountLabel);
 
-       return E_SUCCESS;
+       AppLogDebug("EXIT");
+       return ThumbnailBase::Construct();
 }
 
 result
 ComposerListEditorPanel::OnTerminating(void)
 {
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
        return E_SUCCESS;
 }
 
 void
 ComposerListEditorPanel::OnActionPerformed(const Tizen::Ui::Control& source, int actionId)
 {
-       //AppLogDebug("OnActionPerformed");
+       AppLogDebug("ENTER");
        SceneManager* pSceneManager = SceneManager::GetInstance();
        AppAssert(pSceneManager);
 
-       int totalCount = __pPresentationModel->GetTotalComposerCount();
+       int totalCount = __pPresentationModel->GetAllComposerCount();
 
-       switch(actionId)
+       switch (actionId)
        {
        case IDA_CHECK_BUTTON:
-       {
-               //AppLogDebug("IDA_CHECK_BUTTON");
-               __checkedItemCount = totalCount;
-               CommonUtil::SetAllCheckState(true, *__pContentTableView, totalCount);
-               Form* pForm = dynamic_cast<Form*>(GetParent());
-               AppAssert(pForm);
-               CommonUtil::ShowCheckedCountLabel(*__pCheckedCountLabel, __checkedItemCount, *__pContentTableView, *pForm);
+               {
+                       //AppLogDebug("IDA_CHECK_BUTTON");
+                       __checkedItemCount = totalCount;
+                       CommonUtil::SetAllCheckState(true, *__pContentTableView, totalCount);
+                       Form* pForm = dynamic_cast<Form*>(GetParent());
+                       AppAssert(pForm);
+                       CommonUtil::ShowCheckedCountLabel(*__pCheckedCountLabel, __checkedItemCount, *__pContentTableView, *pForm);
+               }
                break;
-       }
+
        case IDA_UNCHECK_BUTTON:
-       {
-               //AppLogDebug("IDA_UNCHECK_BUTTON");
-               __checkedItemCount = INIT_VALUE;
-               CommonUtil::SetAllCheckState(false, *__pContentTableView, totalCount);
-               Form* pForm = dynamic_cast<Form*>(GetParent());
-               AppAssert(pForm);
-               CommonUtil::ShowCheckedCountLabel(*__pCheckedCountLabel, __checkedItemCount, *__pContentTableView, *pForm);
+               {
+                       //AppLogDebug("IDA_UNCHECK_BUTTON");
+                       __checkedItemCount = INIT_VALUE;
+                       CommonUtil::SetAllCheckState(false, *__pContentTableView, totalCount);
+                       Form* pForm = dynamic_cast<Form*>(GetParent());
+                       AppAssert(pForm);
+                       CommonUtil::ShowCheckedCountLabel(*__pCheckedCountLabel, __checkedItemCount, *__pContentTableView, *pForm);
+               }
                break;
-       }
+
        case IDA_FOOTER_BUTTON_ADD_TO_PLAYLIST:
-       {
-               if (__checkedItemCount <= INIT_VALUE)
                {
-                       return;
-               }
+                       if (__checkedItemCount <= INIT_VALUE)
+                       {
+                               return;
+                       }
 
-               ArrayList* pDataList = new (std::nothrow) ArrayList();
-               pDataList->Construct();
+                       ArrayList* pDataList = new (std::nothrow) ArrayList();
+                       pDataList->Construct();
 
-               int totalCount = __pPresentationModel->GetTotalComposerCount();
-               for(int iCount = 0; iCount < totalCount; iCount++)
-               {
-                       if (__pContentTableView->IsItemChecked(iCount) == true)
+                       int totalCount = __pPresentationModel->GetAllComposerCount();
+                       for (int iCount = 0; iCount < totalCount; iCount++)
                        {
-                               pDataList->AddItems(*(__pPresentationModel->SearchContentItemN(iCount)));
+                               if (__pContentTableView->IsItemChecked(iCount) == true)
+                               {
+                                       pDataList->AddItems(*(__pPresentationModel->GetContentPathListN(iCount)));
+                               }
                        }
-               }
 
-               if (__pPlayListPickerPopup == null)
-               {
                        __pPlayListPickerPopup = new (std::nothrow) PlayListPickerPopup();
-                       __pPlayListPickerPopup->Initialize();
+                       __pPlayListPickerPopup->Initialize(this, pDataList);
+                       //__pPlayListPickerPopup->SetCollectedContent(pDataList);
+                       __pPlayListPickerPopup->SetShowState(true);
+                       __pPlayListPickerPopup->Show();
                }
-
-               __pPlayListPickerPopup->SetCollectedContent(pDataList);
-               __pPlayListPickerPopup->SetShowState(true);
-               __pPlayListPickerPopup->Show();
-
                break;
-       }
+
        case IDA_FOOTER_BUTTON_CANCEL:
-       {
-               //AppLogDebug("IDA_FOOTER_BUTTON_CANCEL");
-               pSceneManager->GoBackward(BackwardSceneTransition());
+               {
+                       //AppLogDebug("IDA_FOOTER_BUTTON_CANCEL");
+                       pSceneManager->GoBackward(BackwardSceneTransition());
+               }
                break;
-       }
+
        default:
-       {
                break;
-       }
        }//End of switch
 
        Form* pForm = dynamic_cast<Form*>(GetParent());
        AppAssert(pForm);
        CommonUtil::SetButtonEnabled(*pForm, __checkedItemCount, actionId);
+       AppLogDebug("EXIT");
 }
 
 void
 ComposerListEditorPanel::OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previousSceneId,
-                                           const Tizen::Ui::Scenes::SceneId& currentSceneId,
-                                           Tizen::Base::Collection::IList* pArgs)
+                                                       const Tizen::Ui::Scenes::SceneId& currentSceneId,
+                                                       Tizen::Base::Collection::IList* pArgs)
 {
-       //AppLogDebug("OnSceneActivatedN");
-
+       AppLogDebug("ENTER");
        Form* pForm = dynamic_cast<Form*>(GetParent());
        AppAssert(pForm);
 
@@ -190,14 +201,14 @@ ComposerListEditorPanel::OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& pre
                pArgs->RemoveAll(true);
                delete pArgs;
        }
+       AppLogDebug("EXIT");
 }
 
 void
 ComposerListEditorPanel::OnSceneDeactivated(const Tizen::Ui::Scenes::SceneId& currentSceneId,
-                                            const Tizen::Ui::Scenes::SceneId& nextSceneId)
+                                                       const Tizen::Ui::Scenes::SceneId& nextSceneId)
 {
-       //AppLogDebug("OnSceneDeactivated");
-
+       AppLogDebug("ENTER");
        Form* pForm = dynamic_cast<Form*>(GetParent());
        AppAssert(pForm);
 
@@ -210,98 +221,96 @@ ComposerListEditorPanel::OnSceneDeactivated(const Tizen::Ui::Scenes::SceneId& cu
        CommonUtil::ShowCheckedCountLabel(*__pCheckedCountLabel, __checkedItemCount, *__pContentTableView, *pForm);
        CommonUtil::ShowSelectAllCheckButton(*__pSelectAllCheckedButton);
 
-       int totalCount = __pPresentationModel->GetTotalComposerCount();
-       for(int iCount = 0; iCount < totalCount; iCount++)
+       int totalCount = __pPresentationModel->GetAllComposerCount();
+       for (int iCount = 0; iCount < totalCount; iCount++)
        {
                __pContentTableView->SetItemChecked(iCount, false);
        }
+       CancelAllThumbnailRequest();
+       AppLogDebug("EXIT");
 }
 
 int
 ComposerListEditorPanel::GetItemCount(void)
 {
-       //AppLogDebug("GetItemCount");
+       AppLogDebug("ENTER");
        if (__pPresentationModel == null)
        {
                return INIT_VALUE;
        }
 
        int retCount = 0;
-       retCount = __pPresentationModel->GetTotalComposerCount();
+       retCount = __pPresentationModel->GetAllComposerCount();
 
+       AppLogDebug("EXIT");
        return retCount;
 }
 
 Tizen::Ui::Controls::TableViewItem*
 ComposerListEditorPanel::CreateItem(const int itemIndex, int itemWidth)
 {
-       //AppLogDebug("CreateTableViewItem");
-       ContentInformationStruct* pContentInfoStruct = __pPresentationModel->GetContentInfoN(itemIndex);
+       AppLogDebug("ENTER");
+       ContentInformation* pContentInfoStruct = __pPresentationModel->GetComposerInfoN(itemIndex);
        if (pContentInfoStruct == null)
        {
                return null;
        }
 
-       TableViewItem* pItem = new (std::nothrow) TableViewItem;
+       TableViewItem* pItem = new (std::nothrow) TableViewItem();
        pItem->Construct(Dimension(itemWidth, ITEM_HEIGHT), TABLE_VIEW_ANNEX_STYLE_MARK);
        pItem->SetBackgroundColor(COLOR_ITEM);
 
-       CommonUtil::CreateEditListTableViewItem(*pItem, *(pContentInfoStruct->pThumbnail), pContentInfoStruct->ComposerName, __pPresentationModel->GetTotalContentCount(itemIndex));
-
-       //test_code_start
-       delete pContentInfoStruct->pThumbnail;
-       pContentInfoStruct->pThumbnail = null;
+       RequestThumbnail(pContentInfoStruct->contentId, (new (std::nothrow) int(itemIndex)));
+       CommonUtil::CreateEditListTableViewItem(*pItem, *GetDefaultThumbnail(), pContentInfoStruct->ComposerName, __pPresentationModel->GetContentCount(itemIndex));
 
        delete pContentInfoStruct;
        pContentInfoStruct = null;
-       //test_code_end
 
+       AppLogDebug("EXIT");
        return pItem;
 }
 
 bool
 ComposerListEditorPanel::DeleteItem(const int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem)
 {
-       //AppLogDebug("DeleteItem");
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
        return true;
 }
 
-void
-ComposerListEditorPanel::UpdateItem(int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem)
-{
-}
-
 int
 ComposerListEditorPanel::GetDefaultItemHeight(void)
 {
-       //AppLogDebug("UpdateItem");
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
        return ITEM_HEIGHT;
 }
 
 void
 ComposerListEditorPanel::OnTableViewItemStateChanged(Tizen::Ui::Controls::TableView& tableView,
-                                                   int itemIndex,
-                                                   Tizen::Ui::Controls::TableViewItem* pItem,
-                                                   Tizen::Ui::Controls::TableViewItemStatus status)
+                                                               int itemIndex,
+                                                               Tizen::Ui::Controls::TableViewItem* pItem,
+                                                               Tizen::Ui::Controls::TableViewItemStatus status)
 {
-       switch(status)
+       AppLogDebug("ENTER");
+       switch (status)
        {
        case TABLE_VIEW_ITEM_STATUS_CHECKED:
-       {
-               __checkedItemCount++;
-               tableView.SetItemChecked(itemIndex, true);
+               {
+                       __checkedItemCount++;
+                       tableView.SetItemChecked(itemIndex, true);
+               }
                break;
-       }
+
        case TABLE_VIEW_ITEM_STATUS_UNCHECKED:
-       {
-               __checkedItemCount--;
-               tableView.SetItemChecked(itemIndex, false);
+               {
+                       __checkedItemCount--;
+                       tableView.SetItemChecked(itemIndex, false);
+               }
                break;
-       }
+
        default:
-       {
                break;
-       }
        }//end of switch
 
        Form* pForm = dynamic_cast<Form*>(GetParent());
@@ -310,44 +319,105 @@ ComposerListEditorPanel::OnTableViewItemStateChanged(Tizen::Ui::Controls::TableV
 
        CommonUtil::ShowSelectAllCheckButton(*__pSelectAllCheckedButton);
 
-       if (__checkedItemCount == __pPresentationModel->GetTotalComposerCount())
+       if (__checkedItemCount == __pPresentationModel->GetAllComposerCount())
        {
                __pSelectAllCheckedButton->SetSelected(true);
        }
 
        Invalidate(true);
        CommonUtil::ShowCheckedCountLabel(*__pCheckedCountLabel, __checkedItemCount, *__pContentTableView, *pForm);
+       AppLogDebug("EXIT");
 }
 
 void
 ComposerListEditorPanel::OnTableViewContextItemActivationStateChanged(Tizen::Ui::Controls::TableView& tableView,
-                                                                    int itemIndex,
-                                                                    Tizen::Ui::Controls::TableViewContextItem* pContextItem,
-                                                                    bool activated)
+                                                                               int itemIndex,
+                                                                               Tizen::Ui::Controls::TableViewContextItem* pContextItem,
+                                                                               bool activated)
 {
-
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 
 void
 ComposerListEditorPanel::OnTableViewItemReordered(Tizen::Ui::Controls::TableView& tableView,
-                                                int itemIndexFrom,
-                                                int itemIndexTo)
+                                                       int itemIndexFrom,
+                                                       int itemIndexTo)
 {
-
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 
 void
 ComposerListEditorPanel::OnUpdateContentList(void)
 {
+       AppLogDebug("ENTER");
        UpdateContentList();
+       AppLogDebug("EXIT");
 }
 
 void
 ComposerListEditorPanel::UpdateContentList(void)
 {
+       AppLogDebug("ENTER");
        if (__pPresentationModel != null && __pContentTableView != null)
        {
-               __pPresentationModel->RefreshContent();
+               __pPresentationModel->UpdateComposerList();
                __pContentTableView->UpdateTableView();
        }
+       AppLogDebug("EXIT");
 }
+
+void
+ComposerListEditorPanel::OnThumbnailInfoReveivedN(ThumbnailInfo* pThumbnailInfo)
+{
+       AppLogDebug("ENTER");
+       int itemIndex = 0;
+       void* pParam = null;
+       __pThumbnail = pThumbnailInfo->GetBitmapN();
+       pParam = pThumbnailInfo->GetUserParamN();
+       if (pParam)
+       {
+               itemIndex = *(static_cast<int*>(pParam));
+       }
+       __pContentTableView->RefreshItem(itemIndex, TABLE_VIEW_REFRESH_TYPE_ITEM_MODIFY);
+       delete pThumbnailInfo;
+       delete static_cast<int*>(pParam);
+       AppLogDebug("EXIT");
+}
+
+void
+ComposerListEditorPanel::OnUserEventReceivedN(RequestId requestId, Tizen::Base::Collection::IList* pArgs)
+{
+       AppLogDebug("ENTER");
+       AppLogDebug("OnUserEventReceivedN %d", requestId);
+       if (requestId == ID_DESTORY_PLAY_LIST_PICKER_POPUP)
+       {
+               if (__pPlayListPickerPopup != null)
+               {
+                       delete __pPlayListPickerPopup;
+                       __pPlayListPickerPopup = null;
+               }
+       }
+       AppLogDebug("EXIT");
+}
+
+void
+ComposerListEditorPanel::UpdateItem(int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem)
+{
+       AppLogDebug("ENTER");
+       Label* pThumbnailLabel = static_cast<Label*>(pItem->GetControl(L"pSongThumbnailLabel"));
+       if (__pThumbnail == null || pThumbnailLabel == null)
+       {
+               AppLogDebug("__pThumbnail or pThumbnailLabel is null");
+               delete __pThumbnail;
+               __pThumbnail = null;
+               return;
+       }
+
+       pThumbnailLabel->SetBackgroundBitmap(*__pThumbnail);
+       delete __pThumbnail;
+       __pThumbnail = null;
+       pThumbnailLabel->Invalidate(true);
+       AppLogDebug("EXIT");
+}
\ No newline at end of file
old mode 100755 (executable)
new mode 100644 (file)
index a44a5ea..db40952
@@ -1,4 +1,4 @@
-//
+//
 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
 //
 // Licensed under the Flora License, Version 1.0 (the License);
 // limitations under the License.
 //
 
+/**
+ * @file               MpComposerListPanel.cpp
+ * @brief              This is the implementation file for ComposerListPanel class.
+ */
+
 #include "MpComposerListPanel.h"
 #include "MpNowPlayContentPanel.h"
 #include "MpPlaylistPickerPopup.h"
+#include "MpThumbnailInfo.h"
 
 using namespace Tizen::Base;
 using namespace Tizen::Base::Collection;
@@ -27,44 +33,49 @@ using namespace Tizen::Ui::Controls;
 using namespace Tizen::Ui::Scenes;
 
 ComposerListPanel::ComposerListPanel(void)
-: __itemIndex(-1)
-, __pNowPlayContentPanel(null)
-, __pPlayListPickerPopup(null)
-, __pContextItem(null)
-, __pContentTableView(null)
-, __pNoContentImageLabel(null)
-, __pNoContentTextLabel(null)
+       : ThumbnailBase::ThumbnailBase()
+       , __itemIndex(-1)
+       , __pNowPlayContentPanel(null)
+       , __pPlayListPickerPopup(null)
+       , __pContextItem(null)
+       , __pContentTableView(null)
+       , __pNoContentImageLabel(null)
+       , __pNoContentTextLabel(null)
+       , __pThumbnail(null)
 {
-       //AppLogDebug("ComposerListPanel");
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 
 ComposerListPanel::~ComposerListPanel(void)
 {
-       //AppLogDebug("~ComposerListPanel");
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 
 bool
 ComposerListPanel::Initialize(void)
 {
-       //AppLogDebug("Initialize");
-       result r = Construct(Rectangle(INIT_VALUE, INIT_VALUE, INIT_VALUE, INIT_VALUE)); // Should be set proper area at OnInitializing().
+       AppLogDebug("ENTER");
+       result r = BasePanel::Construct(Rectangle(INIT_VALUE, INIT_VALUE, INIT_VALUE, INIT_VALUE)); // Should be set proper area at OnInitializing().
        if (IsFailed(r))
        {
                return false;
        }
+       AppLogDebug("EXIT");
        return true;
 }
 
 result
 ComposerListPanel::OnInitializing(void)
 {
-       AppLogDebug("Start");
+       AppLogDebug("ENTER");
        __pPresentationModel = ComposerListPresentationModel::GetInstance();
 
        Form* pForm = dynamic_cast<Form*>(GetParent());
        AppAssert(pForm);
 
-       int width  = pForm->GetClientAreaBounds().width;
+       int width = pForm->GetClientAreaBounds().width;
        int height = pForm->GetClientAreaBounds().height;
 
        SetBounds(INIT_VALUE, INIT_VALUE, width, height);
@@ -76,15 +87,15 @@ ComposerListPanel::OnInitializing(void)
        __pContentTableView->AddTableViewItemEventListener(*this);
 
        __pNoContentImageLabel = new (std::nothrow) Label();
-       __pNoContentImageLabel->Construct(Rectangle((pForm->GetWidth() - W_NO_CONTENT)/ 2, Y_GAP_NO_CONTENT, W_NO_CONTENT, H_NO_CONTENT),L"");
+       __pNoContentImageLabel->Construct(Rectangle((pForm->GetWidth() - W_NO_CONTENT) / 2, Y_GAP_NO_CONTENT, W_NO_CONTENT, H_NO_CONTENT), L"");
        __pNoContentImageLabel->SetBackgroundBitmap(*(ResourceManager::GetBitmapN(NO_CONTENT_BITMAP)));
 
        __pNoContentTextLabel = new (std::nothrow) Label();
        __pNoContentTextLabel->Construct(Rectangle(0,
-                                                  __pNoContentImageLabel->GetHeight() + __pNoContentImageLabel->GetY(),
-                                                  pForm->GetWidth(),
-                                                  H_TEXT_NO_CONTENT),
-                                                  ResourceManager::GetString(L"IDS_COM_BODY_NO_ITEMS"));
+                                                               __pNoContentImageLabel->GetHeight() + __pNoContentImageLabel->GetY(),
+                                                               pForm->GetWidth(),
+                                                               H_TEXT_NO_CONTENT),
+                                                               ResourceManager::GetString(L"IDS_COM_BODY_NO_ITEMS"));
        __pNoContentTextLabel->SetTextConfig(FONT_SIZE_NO_CONTENT, LABEL_TEXT_STYLE_BOLD);
 
        __pContextItem = new (std::nothrow) TableViewContextItem();
@@ -95,88 +106,94 @@ ComposerListPanel::OnInitializing(void)
        AddControl(*__pNoContentTextLabel);
        AddControl(*__pContentTableView);
 
-       return E_SUCCESS;
+       AppLogDebug("EXIT");
+       return ThumbnailBase::Construct();
 }
 
 result
 ComposerListPanel::OnTerminating(void)
 {
+       AppLogDebug("ENTER");
        delete __pContextItem;
        __pContextItem = null;
 
+       AppLogDebug("EXIT");
        return E_SUCCESS;
 }
 
 void
 ComposerListPanel::OnActionPerformed(const Tizen::Ui::Control& source, int actionId)
 {
-       //AppLogDebug("OnActionPerformed");
+       AppLogDebug("ENTER");
        SceneManager* pSceneManager = SceneManager::GetInstance();
        AppAssert(pSceneManager);
 
-       switch(actionId)
+       switch (actionId)
        {
        case IDA_FOOTER_BUTTON_ADD_TO_PLAYLIST:
-       {
-               if (__pPresentationModel->GetTotalComposerCount() == 0)
                {
-                       MessageBox messageBox;
-                       messageBox.Construct(L"", ResourceManager::GetString(L"IDS_COM_BODY_NO_ITEMS"), MSGBOX_STYLE_NONE, 500);
+                       if (__pPresentationModel->GetAllComposerCount() == 0)
+                       {
+                               MessageBox messageBox;
+                               messageBox.Construct(L"", ResourceManager::GetString(L"IDS_COM_BODY_NO_ITEMS"), MSGBOX_STYLE_NONE, 500);
 
-                       int modalResult = 0;
-                       messageBox.ShowAndWait(modalResult);
-                       break;
+                               int modalResult = 0;
+                               messageBox.ShowAndWait(modalResult);
+                               break;
+                       }
+                       pSceneManager->GoForward(ForwardSceneTransition(IDSCN_COMPOSER_LIST_EDITOR));
                }
-               pSceneManager->GoForward(ForwardSceneTransition(IDSCN_COMPOSER_LIST_EDITOR));
                break;
-       }
+
        case IDA_FOOTER_BUTTON_SEARCH:
-       {
-               pSceneManager->GoForward(ForwardSceneTransition(IDSCN_SEARCH));
+               {
+                       pSceneManager->GoForward(ForwardSceneTransition(IDSCN_SEARCH));
+               }
                break;
-       }
+
        case IDA_FLICK_BUTTON_ADD_TO_PALYLIST:
-       {
-               if (__pPlayListPickerPopup == null)
                {
                        __pPlayListPickerPopup = new (std::nothrow) PlayListPickerPopup();
-                       __pPlayListPickerPopup->Initialize();
+                       __pPlayListPickerPopup->Initialize(this, __pPresentationModel->GetContentPathListN(__itemIndex));
+                       //__pPlayListPickerPopup->SetCollectedContent(__pPresentationModel->GetContentPathListN(__itemIndex));
+                       __pPlayListPickerPopup->SetShowState(true);
+                       __pPlayListPickerPopup->Show();
                }
+               break;
 
-               __pPlayListPickerPopup->SetCollectedContent(__pPresentationModel->SearchContentItemN(__itemIndex));
-               __pPlayListPickerPopup->SetShowState(true);
-               __pPlayListPickerPopup->Show();
+       default:
                break;
-       }
        }//end of switch
-
+       AppLogDebug("EXIT");
 }
 
 void
 ComposerListPanel::OnFormBackRequested(Tizen::Ui::Controls::Form& source)
 {
+       AppLogDebug("ENTER");
        if (CommonUtil::GetAddtoPlaylistState() == true)
        {
                SceneManager* pSceneManager = SceneManager::GetInstance();
                AppAssert(pSceneManager);
                pSceneManager->GoForward(ForwardSceneTransition(IDSCN_PLAYLIST_LIST,
-                                                        SCENE_TRANSITION_ANIMATION_TYPE_NONE,
-                                                        SCENE_HISTORY_OPTION_NO_HISTORY,
-                                                        SCENE_DESTROY_OPTION_DESTROY));
+                                                               SCENE_TRANSITION_ANIMATION_TYPE_NONE,
+                                                               SCENE_HISTORY_OPTION_NO_HISTORY,
+                                                               SCENE_DESTROY_OPTION_DESTROY));
                CommonUtil::SetAddtoPlaylistState(false);
        }
        else
        {
                Tizen::App::Application::GetInstance()->Terminate();
        }
+       AppLogDebug("EXIT");
 }
 
 void
 ComposerListPanel::OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previousSceneId,
-                                                                const Tizen::Ui::Scenes::SceneId& currentSceneId,
-                                                                Tizen::Base::Collection::IList* pArgs)
+                                                                       const Tizen::Ui::Scenes::SceneId& currentSceneId,
+                                                                       Tizen::Base::Collection::IList* pArgs)
 {
-       AppLogDebug("Start");
+       AppLogDebug("ENTER");
        Form* pForm = dynamic_cast<Form*>(GetParent());
        AppAssert(pForm);
        pForm->SetFormBackEventListener(this);
@@ -202,19 +219,19 @@ ComposerListPanel::OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previousS
        OnUpdateContentList();
        if (__pPresentationModel != null)
        {
-               int totalComposerCount = __pPresentationModel->GetTotalComposerCount();
+               int totalComposerCount = __pPresentationModel->GetAllComposerCount();
                CommonUtil::SetButtonEnabled(*pForm, totalComposerCount, IDA_FOOTER_BUTTON_ADD_TO_PLAYLIST);
 
                CommonUtil::ShowNoContentImage(totalComposerCount, *__pContentTableView, *__pNoContentImageLabel, *__pNoContentTextLabel);
        }
+       AppLogDebug("EXIT");
 }
 
 void
 ComposerListPanel::OnSceneDeactivated(const Tizen::Ui::Scenes::SceneId& currentSceneId,
-                                      const Tizen::Ui::Scenes::SceneId& nextSceneId)
+                                               const Tizen::Ui::Scenes::SceneId& nextSceneId)
 {
-       //AppLogDebug("OnSceneDeactivated");
-
+       AppLogDebug("ENTER");
        Form* pForm = dynamic_cast<Form*>(GetParent());
        AppAssert(pForm);
 
@@ -222,107 +239,109 @@ ComposerListPanel::OnSceneDeactivated(const Tizen::Ui::Scenes::SceneId& currentS
        pFooter->RemoveAllButtons();
        pFooter->RemoveAllItems();
        pFooter->RemoveActionEventListener(*this);
+       CancelAllThumbnailRequest();
+       AppLogDebug("EXIT");
 }
 
 int
 ComposerListPanel::GetItemCount(void)
 {
-       //AppLogDebug("GetItemCount");
+       AppLogDebug("ENTER");
        if (__pPresentationModel == null)
        {
                return INIT_VALUE;
        }
 
-       return __pPresentationModel->GetTotalComposerCount();
+       AppLogDebug("EXIT");
+       return __pPresentationModel->GetAllComposerCount();
 }
 
 Tizen::Ui::Controls::TableViewItem*
 ComposerListPanel::CreateItem(const int itemIndex, int itemWidth)
 {
-       //AppLogDebug("CreateTableViewItem");
-       ContentInformationStruct* pContentInfoStruct = __pPresentationModel->GetContentInfoN(itemIndex);
+       AppLogDebug("ENTER");
+       ContentInformation* pContentInfoStruct = __pPresentationModel->GetComposerInfoN(itemIndex);
        if (pContentInfoStruct == null)
        {
                return null;
        }
 
-       TableViewItem* pItem = new (std::nothrow) TableViewItem;
+       TableViewItem* pItem = new (std::nothrow) TableViewItem();
        pItem->Construct(Dimension(itemWidth, ITEM_HEIGHT), TABLE_VIEW_ANNEX_STYLE_NORMAL);
        pItem->SetBackgroundColor(COLOR_ITEM);
 
-       CommonUtil::CreateTableViewItem(*pItem, *(pContentInfoStruct->pThumbnail), pContentInfoStruct->ComposerName, __pPresentationModel->GetTotalContentCount(itemIndex));
+       RequestThumbnail(pContentInfoStruct->contentId, (new (std::nothrow) int(itemIndex)));
+       CommonUtil::CreateTableViewItem(*pItem, *GetDefaultThumbnail(), pContentInfoStruct->ComposerName, __pPresentationModel->GetContentCount(itemIndex));
        pItem->SetContextItem(__pContextItem);
 
-       //test_code_start
-       delete pContentInfoStruct->pThumbnail;
-       pContentInfoStruct->pThumbnail = null;
-
        delete pContentInfoStruct;
        pContentInfoStruct = null;
-       //test_code_end
 
+       AppLogDebug("EXIT");
        return pItem;
 }
 
 bool
 ComposerListPanel::DeleteItem(const int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem)
 {
-       //AppLogDebug("DeleteItem");
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
        return true;
 }
 
-void
-ComposerListPanel::UpdateItem(int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem)
-{
-}
-
 int
 ComposerListPanel::GetDefaultItemHeight(void)
 {
-       //AppLogDebug("UpdateItem");
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
        return ITEM_HEIGHT;
 }
 
 void
 ComposerListPanel::OnTableViewItemStateChanged(Tizen::Ui::Controls::TableView& tableView,
-                                               int itemIndex,
-                                               Tizen::Ui::Controls::TableViewItem* pItem,
-                                               Tizen::Ui::Controls::TableViewItemStatus status)
+                                                       int itemIndex,
+                                                       Tizen::Ui::Controls::TableViewItem* pItem,
+                                                       Tizen::Ui::Controls::TableViewItemStatus status)
 {
-       //AppLogDebug("OnTableViewItemStateChanged");
+       AppLogDebug("ENTER");
        SceneManager* pSceneManager = SceneManager::GetInstance();
        AppAssert(pSceneManager);
 
        if (status == TABLE_VIEW_ITEM_STATUS_SELECTED)
        {
-               pSceneManager->GoForward(ForwardSceneTransition(IDSCN_CONTENT_LIST), GetContentListN(itemIndex));
+               pSceneManager->GoForward(ForwardSceneTransition(IDSCN_COMPOSER_CONTENT_LIST), GetContentListN(itemIndex));
        }
+       AppLogDebug("EXIT");
 }
 
 void
 ComposerListPanel::OnTableViewContextItemActivationStateChanged(Tizen::Ui::Controls::TableView& tableView,
-                                                                int itemIndex,
-                                                                Tizen::Ui::Controls::TableViewContextItem* pContextItem,
-                                                                bool activated)
+                                                                               int itemIndex,
+                                                                               Tizen::Ui::Controls::TableViewContextItem* pContextItem,
+                                                                               bool activated)
 {
+       AppLogDebug("ENTER");
        if (activated == true)
        {
                __itemIndex = itemIndex;
        }
+       AppLogDebug("EXIT");
 }
 
 void
 ComposerListPanel::OnTableViewItemReordered(Tizen::Ui::Controls::TableView& tableView,
-                                            int itemIndexFrom,
-                                            int itemIndexTo)
+                                                       int itemIndexFrom,
+                                                       int itemIndexTo)
 {
-
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 
 Tizen::Base::Collection::ArrayList*
 ComposerListPanel::GetContentListN(int itemIndex)
 {
-       ContentInformationStruct* pContentInfoStruct = __pPresentationModel->GetContentInfoN(itemIndex);
+       AppLogDebug("ENTER");
+       ContentInformation* pContentInfoStruct = __pPresentationModel->GetComposerInfoN(itemIndex);
        if (pContentInfoStruct == null)
        {
                return null;
@@ -335,28 +354,25 @@ ComposerListPanel::GetContentListN(int itemIndex)
        ArrayList* pData = new (std::nothrow) ArrayList();
        pData->Construct();
 
-       pData->Add(*(new String(IDSCN_COMPOSER_LIST)));
-       pData->Add(*(new String(_composerName)));
-
-       //test_code_start
-       delete pContentInfoStruct->pThumbnail;
-       pContentInfoStruct->pThumbnail = null;
+       pData->Add(*(new (std::nothrow) String(IDSCN_COMPOSER_LIST)));
+       pData->Add(*(new (std::nothrow) String(_composerName)));
+       pData->Add(*(new (std::nothrow) Integer(itemIndex)));
 
        delete pContentInfoStruct;
        pContentInfoStruct = null;
-       //test_code_end
 
+       AppLogDebug("EXIT");
        return pData;
 }
 
 void
 ComposerListPanel::OnFastScrollIndexSelected(Tizen::Ui::Control& source, Tizen::Base::String& index)
 {
-       AppLogDebug("Start");
-       int totalCount = __pPresentationModel->GetTotalComposerCount();
-       for(int iCount = 0; iCount < totalCount; iCount++)
+       AppLogDebug("ENTER");
+       int totalCount = __pPresentationModel->GetAllComposerCount();
+       for (int iCount = 0; iCount < totalCount; iCount++)
        {
-               String* pName = __pPresentationModel->GetContentName(iCount);
+               String* pName = __pPresentationModel->GetComposerName(iCount);
                String firstCharacter;
 
                pName->SubString(0, 1, firstCharacter);
@@ -367,12 +383,12 @@ ComposerListPanel::OnFastScrollIndexSelected(Tizen::Ui::Control& source, Tizen::
 
                if (Character::GetUnicodeCategory(language) == UNICODE_HANGUL)
                {
-                       Tizen::Base::String HangulIndex[] = {"ㄱ", "ㄲ", "ㄴ", "ㄷ", "ㄸ", "ㄹ", "ㅁ", "ㅂ", "ㅃ","ㅅ", "ㅆ", "ㅇ" , "ㅈ", "ㅉ", "ㅊ", "ㅋ", "ㅌ", "ㅍ", "ㅎ"        };
+                       Tizen::Base::String HangulIndex[] = {"ㄱ", "ㄲ", "ㄴ", "ㄷ", "ㄸ", "ㄹ", "ㅁ", "ㅂ", "ㅃ", "ㅅ", "ㅆ", "ㅇ" , "ㅈ", "ㅉ", "ㅊ", "ㅋ", "ㅌ", "ㅍ", "ㅎ"};
 
                        wchar_t songName;
                        pName->GetCharAt(0, songName);
 
-                       wchar_t UnicodeValue     = (songName - 0xAC00);
+                       wchar_t UnicodeValue = (songName - 0xAC00);
                        wchar_t InitialConsonant = ((UnicodeValue - (UnicodeValue % 28)) / 28) / 21;
                        int tempIndex = static_cast<int>(InitialConsonant);
 
@@ -393,20 +409,78 @@ ComposerListPanel::OnFastScrollIndexSelected(Tizen::Ui::Control& source, Tizen::
                        break;
                }
        }//end of for
+       AppLogDebug("EXIT");
 }
 
 void
 ComposerListPanel::OnUpdateContentList(void)
 {
+       AppLogDebug("ENTER");
        UpdateContentList();
+       AppLogDebug("EXIT");
 }
 
 void
 ComposerListPanel::UpdateContentList(void)
 {
+       AppLogDebug("ENTER");
        if (__pPresentationModel != null && __pContentTableView != null)
        {
-               __pPresentationModel->RefreshContent();
+               __pPresentationModel->UpdateComposerList();
                __pContentTableView->UpdateTableView();
        }
+       AppLogDebug("EXIT");
+}
+
+void
+ComposerListPanel::OnThumbnailInfoReveivedN(ThumbnailInfo* pThumbnailInfo)
+{
+       AppLogDebug("ENTER");
+       int itemIndex = 0;
+       void* pParam = null;
+       __pThumbnail = pThumbnailInfo->GetBitmapN();
+       pParam = pThumbnailInfo->GetUserParamN();
+       if (pParam)
+       {
+               itemIndex = *(static_cast<int*>(pParam));
+       }
+       __pContentTableView->RefreshItem(itemIndex, TABLE_VIEW_REFRESH_TYPE_ITEM_MODIFY);
+       delete pThumbnailInfo;
+       delete static_cast<int*>(pParam);
+       AppLogDebug("EXIT");
+}
+
+void
+ComposerListPanel::OnUserEventReceivedN(RequestId requestId, Tizen::Base::Collection::IList* pArgs)
+{
+       AppLogDebug("ENTER");
+       AppLogDebug("OnUserEventReceivedN %d",requestId);
+       if (requestId == ID_DESTORY_PLAY_LIST_PICKER_POPUP)
+       {
+               if (__pPlayListPickerPopup != null)
+               {
+                       delete __pPlayListPickerPopup;
+                       __pPlayListPickerPopup = null;
+               }
+       }
+       AppLogDebug("EXIT");
 }
+
+void
+ComposerListPanel::UpdateItem(int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem)
+{
+       AppLogDebug("ENTER");
+       Label* pThumbnailLabel = static_cast<Label*>(pItem->GetControl(L"pSongThumbnailLabel"));
+       if (__pThumbnail == null || pThumbnailLabel == null)
+       {
+               AppLogDebug("__pThumbnail or pThumbnailLabel is null");
+               delete __pThumbnail;
+               __pThumbnail = null;
+               return;
+       }
+       pThumbnailLabel->SetBackgroundBitmap(*__pThumbnail);
+       delete __pThumbnail;
+       __pThumbnail = null;
+       pThumbnailLabel->Invalidate(true);
+       AppLogDebug("EXIT");
+}
\ No newline at end of file
old mode 100755 (executable)
new mode 100644 (file)
index 94c52cc..b0318ad
@@ -1,4 +1,4 @@
-//
+//
 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
 //
 // Licensed under the Flora License, Version 1.0 (the License);
 // limitations under the License.
 //
 
+/**
+ * @file               MpComposerListPresentationModel.cpp
+ * @brief              This is the implementation file for ComposerListPresentationModel class.
+ */
+
 #include "MpComposerListPresentationModel.h"
 
 using namespace Tizen::Base;
-using namespace Tizen::Content;
 using namespace Tizen::Base::Collection;
+using namespace Tizen::Content;
 using namespace Tizen::Graphics;
-using namespace Tizen::Ui::Controls;
 using namespace Tizen::Social;
+using namespace Tizen::Ui::Controls;
 
 ComposerListPresentationModel* ComposerListPresentationModel::pComposerListPresentationModelInstance = null;
 
 ComposerListPresentationModel*
 ComposerListPresentationModel::GetInstance(void)
 {
-       //AppLogDebug("GetInstance");
+       AppLogDebug("ENTER");
        if (pComposerListPresentationModelInstance == null)
        {
                pComposerListPresentationModelInstance = new (std::nothrow) ComposerListPresentationModel();
@@ -45,191 +50,249 @@ CATCH:
 }
 
 ComposerListPresentationModel::ComposerListPresentationModel(void)
-: __pComposerList(null)
-, __pSongList(null)
+       : __pComposerList(null)
+       , __pContentList(null)
+       , __currentComposerIndex(-1)
 {
-       //AppLogDebug("ComposerListPresentationModel");
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 
 ComposerListPresentationModel::~ComposerListPresentationModel(void)
 {
-       //AppLogDebug("~ComposerListPresentationModel");
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 
 result
 ComposerListPresentationModel::Construct(void)
 {
-       //AppLogDebug("Construct");
-
-       result r = E_SUCCESS;
+       AppLogDebug("ENTER");
+       if (__pComposerList != null)
+       {
+               __pComposerList->RemoveAll(true);
+               delete __pComposerList;
+       }
 
        __pComposerList = CommonUtil::SearchContentList(STRING_SORT_COMPOSER);
 
-       return r;
+       AppLogDebug("EXIT");
+       return E_SUCCESS;
 }
 
 int
-ComposerListPresentationModel::GetTotalContentCount(int index)
+ComposerListPresentationModel::GetContentCount(int composerIndex)
 {
-       if (__pComposerList == null || (index > __pComposerList->GetCount()))
+       AppLogDebug("ENTER");
+       int totalCount = INIT_VALUE;
+       if (__pComposerList == null || (composerIndex > __pComposerList->GetCount()))
        {
                return INIT_VALUE;
        }
 
-       String WhereExpr = null;
-       WhereExpr = CommonUtil::SpecialReplaceChange(*(static_cast<String*>(__pComposerList->GetAt(index))));
-       WhereExpr = CommonUtil::MakeQuery(STRING_SORT_COMPOSER, WhereExpr);
-       IList* pSearchList = CommonUtil::SearchContentList(WhereExpr, STRING_SORT_TITLE);
-
-       if (pSearchList == null)
+       if ((__pContentList != null) && (__currentComposerIndex == composerIndex))
        {
-               return 0;
+               totalCount = __pContentList->GetCount();
        }
-
-       int RetTotalCount = pSearchList->GetCount();
-
-       pSearchList->RemoveAll(true);
-       delete pSearchList;
-       pSearchList = null;
-
-       return RetTotalCount;
+       else
+       {
+               IList* pContentSearchResultList = CommonUtil::ContentSearchResultListN(
+                                                                                       *(static_cast<String*>(__pComposerList->GetAt(composerIndex))), STRING_SORT_COMPOSER, STRING_SORT_TITLE);
+               if (pContentSearchResultList == null)
+               {
+                       AppLogDebug("CommonUtil::ContentSearchResultListN() failed");
+                       return INIT_VALUE;
+               }
+
+               totalCount = pContentSearchResultList->GetCount();
+
+               pContentSearchResultList->RemoveAll(true);
+               delete pContentSearchResultList;
+       }
+       AppLogDebug("EXIT");
+       return totalCount;
 }
 
 int
-ComposerListPresentationModel::GetTotalComposerCount(void)
+ComposerListPresentationModel::GetAllComposerCount(void)
 {
-       //AppLogDebug("GetCount");
+       AppLogDebug("ENTER");
        if (__pComposerList == null)
        {
                return INIT_VALUE;
        }
 
        int retValue = __pComposerList->GetCount();
+       AppLogDebug("EXIT");
        return retValue;
 }
 
-ContentInformationStruct*
-ComposerListPresentationModel::GetContentInfoN(int index)
+ContentInformation*
+ComposerListPresentationModel::GetComposerInfoN(int composerIndex)
 {
-       ContentInformationStruct* pContentInfoStruct = null;
-
-       String WhereExpr = null;
-       WhereExpr = CommonUtil::SpecialReplaceChange(*(static_cast<String*>(__pComposerList->GetAt(index))));
-       WhereExpr = CommonUtil::MakeQuery(STRING_SORT_COMPOSER, WhereExpr);
-       IList* pSearchList = CommonUtil::SearchContentList(WhereExpr, STRING_SORT_TITLE);
-
-       if (pSearchList == null)
+       AppLogDebug("ENTER");
+       IList* pContentSearchResultList = CommonUtil::ContentSearchResultListN(
+                                                                               *(static_cast<String*>(__pComposerList->GetAt(composerIndex))), STRING_SORT_COMPOSER, STRING_SORT_TITLE);
+       if (pContentSearchResultList == null)
        {
+               AppLogDebug("CommonUtil::ContentSearchResultListN() failed");
                return null;
        }
 
-       ContentSearchResult* pResult = static_cast<ContentSearchResult*>(pSearchList->GetAt(INIT_VALUE));
-       if(pResult != null && pResult->GetContentType() == CONTENT_TYPE_AUDIO)
+       ContentInformation* pContentInformation = null;
+       ContentSearchResult* pResult = static_cast<ContentSearchResult*>(pContentSearchResultList->GetAt(INIT_VALUE));
+       if (pResult != null && pResult->GetContentType() == CONTENT_TYPE_AUDIO)
        {
-               AudioContentInfo* pAudioContentInfo = static_cast<AudioContentInfo*>(pResult->GetContentInfo());
-               pContentInfoStruct = CommonUtil::GetContentInformationStructN(*pAudioContentInfo);
+               pContentInformation = CommonUtil::GetContentInformationN(*static_cast<AudioContentInfo*>(pResult->GetContentInfo()));
        }
 
-       pSearchList->RemoveAll(true);
-       delete pSearchList;
-       pSearchList = null;
+       pContentSearchResultList->RemoveAll(true);
+       delete pContentSearchResultList;
 
-       return pContentInfoStruct;
+       AppLogDebug("EXIT");
+       return pContentInformation;
 }
 
 Tizen::Base::String*
-ComposerListPresentationModel::GetContentName(int index)
+ComposerListPresentationModel::GetComposerName(int composerIndex)
 {
+       AppLogDebug("ENTER");
        if (__pComposerList == null)
        {
                return null;
        }
-       return static_cast<String*>(__pComposerList->GetAt(index));
+       AppLogDebug("EXIT");
+       return static_cast<String*>(__pComposerList->GetAt(composerIndex));
 }
 
 void
-ComposerListPresentationModel::RefreshContent(void)
+ComposerListPresentationModel::InitializeContentList(int composerIndex)
 {
-       if (__pComposerList != null)
+       AppLogDebug("ENTER");
+       if (__pContentList != null)
        {
-               __pComposerList->RemoveAll(true);
-               __pComposerList = CommonUtil::SearchContentList(STRING_SORT_COMPOSER);
-               //AppLogDebug("ComposerListPresentationModel : %d", __pComposerList->GetCount());
+               __pContentList->RemoveAll(true);
+               delete __pContentList;
        }
-}
 
-void
-ComposerListPresentationModel::SearchSong(int index)
-{
-       if (__pSongList != null)
-       {
-               __pSongList->RemoveAll(true);
-       }
-
-       String WhereExpr = null;
-       WhereExpr   = CommonUtil::SpecialReplaceChange(*(static_cast<String*>(__pComposerList->GetAt(index))));
-       WhereExpr   = CommonUtil::MakeQuery(STRING_SORT_COMPOSER, WhereExpr);
-       __pSongList = CommonUtil::SearchContentList(WhereExpr, STRING_SORT_TITLE);
-}
-
-int
-ComposerListPresentationModel::GetSongContentCount(void)
-{
-       if (__pSongList == null)
-       {
-               return INIT_VALUE;
-       }
-       return __pSongList->GetCount();
+       __currentComposerIndex = composerIndex;
+       __pContentList = CommonUtil::ContentSearchResultListN(
+                                                                               *(static_cast<String*>(__pComposerList->GetAt(composerIndex))), STRING_SORT_COMPOSER, STRING_SORT_TITLE);
+       AppLogDebug("EXIT");
 }
 
-ContentInformationStruct*
-ComposerListPresentationModel::GetSongContentInfoN(int index)
+ContentInformation*
+ComposerListPresentationModel::GetContentInfoN(int contentIndex)
 {
-       ContentInformationStruct* pContentInfoStruct = null;
-       ContentSearchResult* pResult = static_cast<ContentSearchResult*>(__pSongList->GetAt(index));
+       AppLogDebug("ENTER");
+       ContentInformation* pContentInfoStruct = null;
+       ContentSearchResult* pResult = static_cast<ContentSearchResult*>(__pContentList->GetAt(contentIndex));
        if (pResult != null && pResult->GetContentType() == CONTENT_TYPE_AUDIO)
        {
-               AudioContentInfo* pAudioContentInfo = static_cast<AudioContentInfo*>(pResult->GetContentInfo());
-               pContentInfoStruct = CommonUtil::GetContentInformationStructN(*pAudioContentInfo);
+               pContentInfoStruct = CommonUtil::GetContentInformationN(*static_cast<AudioContentInfo*>(pResult->GetContentInfo()));
        }
 
+       AppLogDebug("EXIT");
        return pContentInfoStruct;
 }
 
 Tizen::Base::Collection::ArrayList*
-ComposerListPresentationModel::SearchContentItemN(int index)
+ComposerListPresentationModel::GetContentPathListN(int composerIndex)
 {
+       AppLogDebug("ENTER");
        if (__pComposerList == null)
        {
                return null;
        }
 
-       String WhereExpr = null;
-       WhereExpr = CommonUtil::SpecialReplaceChange(*(static_cast<String*>(__pComposerList->GetAt(index))));
-       WhereExpr = CommonUtil::MakeQuery(STRING_SORT_COMPOSER, WhereExpr);
-       IList* pSearchList = CommonUtil::SearchContentList(WhereExpr, STRING_SORT_TITLE);
-
-       if (pSearchList == null)
+       IList* pContentSearchResultList = CommonUtil::ContentSearchResultListN(
+                                                                               *(static_cast<String*>(__pComposerList->GetAt(composerIndex))), STRING_SORT_COMPOSER, STRING_SORT_TITLE);
+       if (pContentSearchResultList == null)
        {
+               AppLogDebug("CommonUtil::ContentSearchResultListN() failed");
                return null;
        }
 
        ArrayList* pContentPath = new (std::nothrow) ArrayList();
        pContentPath->Construct();
 
-       ContentSearchResult* pResult;
-       int totalCount = pSearchList->GetCount();
-       for(int iCount = 0; iCount < totalCount; iCount++)
+       int totalCount = pContentSearchResultList->GetCount();
+       for (int iCount = 0; iCount < totalCount; iCount++)
        {
-               pResult = static_cast<ContentSearchResult*>(pSearchList->GetAt(iCount));
+               ContentSearchResult* pResult = static_cast<ContentSearchResult*>(pContentSearchResultList->GetAt(iCount));
                pContentPath->Add(*(new (std::nothrow) String(pResult->GetContentInfo()->GetContentPath())));
        }
 
-       pSearchList->RemoveAll(true);
-       delete pSearchList;
-       pSearchList = null;
-
-       AppLogDebug("End");
+       pContentSearchResultList->RemoveAll(true);
+       delete pContentSearchResultList;
 
+       AppLogDebug("EXIT");
        return pContentPath;
 }
+
+void
+ComposerListPresentationModel::RefreshContentList(int composerIndex)
+{
+       AppLogDebug("ENTER");
+       if (__pContentList != null)
+       {
+               __pContentList->RemoveAll(true);
+               delete __pContentList;
+       }
+
+       __pContentList = CommonUtil::ContentSearchResultListN(
+                                                                               *(static_cast<String*>(__pComposerList->GetAt(composerIndex))), STRING_SORT_COMPOSER, STRING_SORT_TITLE);
+       if (__pContentList != null && __pContentList->GetCount() == INIT_VALUE)
+       {
+               delete __pContentList;
+               __pContentList = null;
+       }
+       __currentComposerIndex = composerIndex;
+       AppLogDebug("EXIT");
+}
+
+int
+ComposerListPresentationModel::GetCurrentComposerIndex(void)
+{
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
+       return __currentComposerIndex;
+}
+
+void
+ComposerListPresentationModel::AddContent(String path, int playlistIndex)
+{
+       AppLogDebug("ENTER");
+       ContentInformation* pContentInfoStruct = GetContentInfoN(playlistIndex);
+       PlayList* pPlayList = PlayListManager::GetInstance()->GetPlayListN(path);
+       pPlayList->AddItem(pContentInfoStruct->contentId);
+
+       delete pContentInfoStruct;
+       pContentInfoStruct = null;
+
+       delete pPlayList;
+       pPlayList = null;
+       AppLogDebug("EXIT");
+}
+
+result
+ComposerListPresentationModel::UpdateComposerList(void)
+{
+       AppLogDebug("ENTER");
+       result r = E_SUCCESS;
+
+       if (__pComposerList != null)
+       {
+               __pComposerList->RemoveAll(true);
+               delete __pComposerList;
+       }
+
+       __pComposerList = CommonUtil::SearchContentList(STRING_SORT_COMPOSER);
+       TryCatch(__pComposerList != null, r = E_FAILURE, "__pComposerList is null");
+
+       AppLogDebug("EXIT");
+       return r;
+
+CATCH:
+       return r;
+}
\ No newline at end of file
old mode 100755 (executable)
new mode 100644 (file)
index b85dc85..f900ab7
@@ -1,4 +1,4 @@
-//
+//
 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
 //
 // Licensed under the Flora License, Version 1.0 (the License);
 // limitations under the License.
 //
 
+/**
+ * @file               MpComposerPickerPanel.cpp
+ * @brief              This is the implementation file for ComposerPickerPanel class.
+ */
+
 #include "MpComposerPickerPanel.h"
 #include "MpNowPlayContentPanel.h"
 
@@ -21,28 +26,29 @@ using namespace Tizen::Base;
 using namespace Tizen::Base::Collection;
 using namespace Tizen::Content;
 using namespace Tizen::Graphics;
+using namespace Tizen::Social;
 using namespace Tizen::Ui;
 using namespace Tizen::Ui::Controls;
 using namespace Tizen::Ui::Scenes;
-using namespace Tizen::Social;
 
 ComposerPickerPanel::ComposerPickerPanel(void)
 {
-       //AppLogDebug("ComposerPickerPanel");
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 
 ComposerPickerPanel::~ComposerPickerPanel(void)
 {
-       //AppLogDebug("~ComposerPickerPanel");
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 
 void
 ComposerPickerPanel::OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previousSceneId,
-                                       const Tizen::Ui::Scenes::SceneId& currentSceneId,
-                                       Tizen::Base::Collection::IList* pArgs)
+                                               const Tizen::Ui::Scenes::SceneId& currentSceneId,
+                                               Tizen::Base::Collection::IList* pArgs)
 {
-       //AppLogDebug("OnSceneActivatedN");
-
+       AppLogDebug("ENTER");
        Form* pForm = dynamic_cast<Form*>(GetParent());
        AppAssert(pForm);
 
@@ -51,10 +57,10 @@ ComposerPickerPanel::OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previou
 
        SceneManager* pSceneManager = SceneManager::GetInstance();
        AppAssert(pSceneManager);
-
+       __pPresentationModel->UpdateComposerList();
        if (__pPresentationModel != null)
        {
-               CommonUtil::ShowNoContentImage(__pPresentationModel->GetTotalComposerCount(), *__pContentTableView, *__pNoContentImageLabel, *__pNoContentTextLabel);
+               CommonUtil::ShowNoContentImage(__pPresentationModel->GetAllComposerCount(), *__pContentTableView, *__pNoContentImageLabel, *__pNoContentTextLabel);
        }
 
        if (pSceneManager->IsSceneAlive(IDSCN_PLAYER))
@@ -67,36 +73,37 @@ ComposerPickerPanel::OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previou
                }
                CommonUtil::ShowNowPlayPanel(*__pContentTableView, __pNowPlayContentPanel->GetPlayStatus(), pForm->GetClientAreaBounds());
        }
+       AppLogDebug("EXIT");
 }
 
 void
 ComposerPickerPanel::OnSceneDeactivated(const Tizen::Ui::Scenes::SceneId& currentSceneId,
-                                        const Tizen::Ui::Scenes::SceneId& nextSceneId)
+                                       const Tizen::Ui::Scenes::SceneId& nextSceneId)
 {
-       //AppLogDebug("OnSceneDeactivated");
-
+       AppLogDebug("ENTER");
        Form* pForm = dynamic_cast<Form*>(GetParent());
        AppAssert(pForm);
 
        Footer* pFooter = pForm->GetFooter();
        pFooter->RemoveAllButtons();
        pFooter->RemoveAllItems();
+       AppLogDebug("EXIT");
 }
 
 void
 ComposerPickerPanel::OnTableViewItemStateChanged(Tizen::Ui::Controls::TableView& tableView,
-                                                 int itemIndex,
-                                                 Tizen::Ui::Controls::TableViewItem* pItem,
-                                                 Tizen::Ui::Controls::TableViewItemStatus status)
+                                                       int itemIndex,
+                                                       Tizen::Ui::Controls::TableViewItem* pItem,
+                                                       Tizen::Ui::Controls::TableViewItemStatus status)
 {
-       //AppLogDebug("OnTableViewItemStateChanged");
-
+       AppLogDebug("ENTER");
        if (status == TABLE_VIEW_ITEM_STATUS_SELECTED)
        {
                SceneManager* pSceneManager = SceneManager::GetInstance();
                AppAssert(pSceneManager);
 
-               __pPresentationModel->SearchSong(itemIndex);
+               __pPresentationModel->InitializeContentList(itemIndex);
                pSceneManager->GoForward(ForwardSceneTransition(IDSCN_COMPOSER_CONTENT_PICKER));
        }
-}
+       AppLogDebug("EXIT");
+}
\ No newline at end of file
old mode 100755 (executable)
new mode 100644 (file)
index a232ea2..4007547
@@ -1,4 +1,4 @@
-//
+//
 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
 //
 // Licensed under the Flora License, Version 1.0 (the License);
 // limitations under the License.
 //
 
+/**
+ * @file               MpContentDetailForm.cpp
+ * @brief              This is the implementation file for ContentDetailForm class.
+ */
+
 #include "MpMusicPlayerPresentationModel.h"
 #include "MpContentDetailForm.h"
 #include "MpResourceManager.h"
 #include "MpCommonUtil.h"
 #include "MpTypes.h"
 
-using namespace Tizen::Ui;
-using namespace Tizen::Ui::Controls;
-using namespace Tizen::Graphics;
 using namespace Tizen::Base;
 using namespace Tizen::Base::Collection;
+using namespace Tizen::Content;
+using namespace Tizen::Graphics;
 using namespace Tizen::Media;
+using namespace Tizen::Ui;
+using namespace Tizen::Ui::Controls;
 using namespace Tizen::Ui::Scenes;
-using namespace Tizen::Content;
 
 //#define CONTENT_SIZE_BYTE(size) ((size < 1000))
 //#define CONTENT_SIZE_KBYTE(size) ((size < 1000) && (size < 999999))
-//#define CASTING_LONG_TO_DOUBLE(value)  (static_cast<double>(value + 0.0))
+//#define CASTING_LONG_TO_DOUBLE(value) (static_cast<double>(value + 0.0))
 
 static const int TOTAL_ITEM_COUNT = 7;
 static const int DETAIL_ITEM_HEIGHT = 112;
 //static const double DEVISION_VALUE = 1024.0;
-static const Tizen::Graphics::Rectangle RECT_ITEM                                      (16, 36, 468, 50);
-static const Tizen::Graphics::Rectangle RECT_TITLE_LABEL                       (16, 13, 468, 48);
-static const Tizen::Graphics::Rectangle RECT_DESCRIPTION_LABEL (16, 61, 468, 38);
+static const Tizen::Graphics::Rectangle RECT_ITEM (16, 36, 468, 50);
+static const Tizen::Graphics::Rectangle RECT_TITLE_LABEL (16, 13, 468, 48);
+static const Tizen::Graphics::Rectangle RECT_DESCRIPTION_LABEL (16, 61, 468, 38);
 
 enum DetailItemId
 {
@@ -53,35 +58,38 @@ enum DetailItemId
        CONTENT_END
 };
 
-static const Tizen::Graphics::Rectangle RECT_THUMBNAIL_LABEL                                                   (16, 16, 122, 122);
-static const Tizen::Graphics::Rectangle RECT_TABLE_VIEW                                                                (164, 0, 556, 1280 - (108 + 114 + 50));
+static const Tizen::Graphics::Rectangle RECT_THUMBNAIL_LABEL (16, 16, 122, 122);
+static const Tizen::Graphics::Rectangle RECT_TABLE_VIEW (164, 0, 556, 1280 - (108 + 114 + 50));
 
 ContentDetailForm::ContentDetailForm(void)
        : __pContentTableView(null)
        , __pThumbnailLabel(null)
 {
-       //AppLogDebug("ContentDetailForm");
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 
 ContentDetailForm::~ContentDetailForm(void)
 {
-       //AppLogDebug("~ContentDetailForm");
+       AppLogDebug("ENTER");
        delete [] __pItemTitle;
        delete [] __pItemDescription;
+       AppLogDebug("EXIT");
 }
 
 bool
 ContentDetailForm::Initialize(void)
 {
-       //AppLogDebug("Initialize(void)");
+       AppLogDebug("ENTER");
        Construct(FORM_STYLE_NORMAL | FORM_STYLE_INDICATOR | FORM_STYLE_HEADER | FORM_STYLE_FOOTER);
+       AppLogDebug("EXIT");
        return true;
 }
 
 result
 ContentDetailForm::OnInitializing(void)
 {
-       //AppLogDebug("OnInitializing(void)");
+       AppLogDebug("ENTER");
        result r = E_SUCCESS;
 
        __pPlayerPresentationModel = PlayerPresentationModel::GetInstance();
@@ -89,8 +97,8 @@ ContentDetailForm::OnInitializing(void)
        Header* pHeader = null;
        Footer* pFooter = null;
 
-       __pItemTitle = new String[CONTENT_END];
-       __pItemDescription = new String[CONTENT_END];
+       __pItemTitle = new (std::nothrow) String[CONTENT_END];
+       __pItemDescription = new (std::nothrow) String[CONTENT_END];
 
        pHeader = GetHeader();
        pHeader->AddActionEventListener(*this);
@@ -107,8 +115,8 @@ ContentDetailForm::OnInitializing(void)
 
        __pContentTableView = new (std::nothrow) TableView();
        __pContentTableView->Construct(RECT_TABLE_VIEW,
-                                                                  true,
-                                                                  TABLE_VIEW_SCROLL_BAR_STYLE_FADE_OUT);
+                                                                       true,
+                                                                       TABLE_VIEW_SCROLL_BAR_STYLE_FADE_OUT);
 
        __pContentTableView->AddTableViewItemEventListener(*this);
        __pContentTableView->SetItemProvider(this);
@@ -117,7 +125,7 @@ ContentDetailForm::OnInitializing(void)
        int currentContentIndex = __pPlayerPresentationModel->GetCurrentContentIndex();
        String* tempPath = __pPlayerPresentationModel->GetContentPath(currentContentIndex);
 
-       AudioContentInfo* pAudioInfo = CommonUtil::GetAudioContentInfo(*(tempPath));
+       AudioContentInfo* pAudioInfo = CommonUtil::GetAudioContentInfoN(*(tempPath));
 
        Tizen::Base::String title = null;
        Tizen::Base::String artist = null;
@@ -150,6 +158,7 @@ ContentDetailForm::OnInitializing(void)
                year = pAudioInfo->GetDateTime().GetYear();
                hour = pAudioInfo->GetDateTime().GetHour();
                minute = pAudioInfo->GetDateTime().GetMinute();
+               delete pAudioInfo;
        }
        else
        {
@@ -259,66 +268,71 @@ ContentDetailForm::OnInitializing(void)
        delete pThumbnail;
        pThumbnail = null;
 
+       AppLogDebug("EXIT");
        return r;
 }
 
 result
 ContentDetailForm::OnTerminating(void)
 {
-       //AppLogDebug("OnTerminating(void)");
-       result r = E_SUCCESS;
-
-       return r;
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
+       return E_SUCCESS;
 }
 
 void
 ContentDetailForm::OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previousSceneId,
-                                                         const Tizen::Ui::Scenes::SceneId& currentSceneId,
-                                                         Tizen::Base::Collection::IList* pArgs)
+                                                               const Tizen::Ui::Scenes::SceneId& currentSceneId,
+                                                               Tizen::Base::Collection::IList* pArgs)
 {
-       //AppLogDebug("OnSceneActivatedN");
+       AppLogDebug("ENTER");
        if (pArgs != null)
        {
                pArgs->RemoveAll(true);
                delete pArgs;
        }
+       AppLogDebug("EXIT");
 }
 
 void
 ContentDetailForm::OnSceneDeactivated(const Tizen::Ui::Scenes::SceneId& currentSceneId,
-                                                          const Tizen::Ui::Scenes::SceneId& nextSceneId)
+                                                               const Tizen::Ui::Scenes::SceneId& nextSceneId)
 {
-       //AppLogDebug("OnSceneDeactivated");
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 
 void
 ContentDetailForm::OnActionPerformed(const Tizen::Ui::Control& source, int actionId)
 {
-       //AppLogDebug("OnActionPerformed");
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 
 void
 ContentDetailForm::OnFormBackRequested(Tizen::Ui::Controls::Form& source)
 {
-       //AppLogDebug("OnFormBackRequested");
+       AppLogDebug("ENTER");
        SceneManager* pSceneManager = SceneManager::GetInstance();
        AppAssert(pSceneManager);
 
        pSceneManager->GoBackward(BackwardSceneTransition());
+       AppLogDebug("EXIT");
 }
 
 int
 ContentDetailForm::GetItemCount(void)
 {
-       //AppLogDebug("GetItemCount");
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
        return TOTAL_ITEM_COUNT;
 }
 
 Tizen::Ui::Controls::TableViewItem*
 ContentDetailForm::CreateItem(const int itemIndex, int itemWidth)
 {
-       //AppLogDebug("CreateTableViewItem");
-       TableViewItem* pTableItem = new TableViewItem();
+       AppLogDebug("ENTER");
+       TableViewItem* pTableItem = new (std::nothrow) TableViewItem();
 
        pTableItem->Construct(Dimension(itemWidth, DETAIL_ITEM_HEIGHT), TABLE_VIEW_ANNEX_STYLE_NORMAL);
        pTableItem->SetBackgroundColor(COLOR_ITEM);
@@ -353,50 +367,58 @@ ContentDetailForm::CreateItem(const int itemIndex, int itemWidth)
                pTableItem->AddControl(*pDescriptionItemLabel);
        }
 
+       AppLogDebug("EXIT");
        return pTableItem;
 }
 
 bool
 ContentDetailForm::DeleteItem(const int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem)
 {
-       //AppLogDebug("DeleteItem");
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
        return null;
 }
 
 void
 ContentDetailForm::UpdateItem(int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem)
 {
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 
 int
 ContentDetailForm::GetDefaultItemHeight(void)
 {
-       //AppLogDebug("UpdateItem");
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
        return ITEM_HEIGHT;
 }
 
 void
 ContentDetailForm::OnTableViewItemStateChanged(Tizen::Ui::Controls::TableView& tableView,
-                                               int itemIndex,
-                                               Tizen::Ui::Controls::TableViewItem* pItem,
-                                               Tizen::Ui::Controls::TableViewItemStatus status)
+                                                       int itemIndex,
+                                                       Tizen::Ui::Controls::TableViewItem* pItem,
+                                                       Tizen::Ui::Controls::TableViewItemStatus status)
 {
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 
 void
 ContentDetailForm::OnTableViewContextItemActivationStateChanged(Tizen::Ui::Controls::TableView& tableView,
-                                                                int itemIndex,
-                                                                Tizen::Ui::Controls::TableViewContextItem* pContextItem,
-                                                                bool activated)
+                                                                               int itemIndex,
+                                                                               Tizen::Ui::Controls::TableViewContextItem* pContextItem,
+                                                                               bool activated)
 {
-       //AppLogDebug("OnTableViewContextItemActivationStateChanged");
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 
 void
 ContentDetailForm::OnTableViewItemReordered(Tizen::Ui::Controls::TableView& tableView,
-                                            int itemIndexFrom,
-                                            int itemIndexTo)
+                                                       int itemIndexFrom,
+                                                       int itemIndexTo)
 {
-       //AppLogDebug("OnTableViewContextItemActivationStateChanged");
-}
-
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
+}
\ No newline at end of file
index bef9e34..fcdd3ab 100755 (executable)
@@ -1,4 +1,4 @@
-//
+//
 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
 //
 // Licensed under the Flora License, Version 1.0 (the License);
 // limitations under the License.
 //
 
+/**
+ * @file               MpContentForm.cpp
+ * @brief              This is the implementation file for ContentForm class.
+ */
+
 #include "MpContentForm.h"
 #include "MpSettingPresentationModel.h"
 
 using namespace Tizen::App;
 using namespace Tizen::Base;
+using namespace Tizen::Graphics;
+using namespace Tizen::Io;
 using namespace Tizen::Ui;
 using namespace Tizen::Ui::Controls;
 using namespace Tizen::Ui::Scenes;
-using namespace Tizen::Graphics;
-using namespace Tizen::Io;
 
-#define IMAGE_NORMAL_LOAD(n)   (n * 2)
+#define IMAGE_NORMAL_LOAD(n) (n * 2)
 #define IMAGE_PRESSEED_LOAD(n) ((n * 2) + 1)
 
-static const Tizen::Base::String ALL_TAB_ICON_NORMAL      = L"T02_controlbar_icon_all.png";
-static const Tizen::Base::String ALL_TAB_ICON_PRESS       = L"T02_controlbar_icon_all_press.png";
+static const Tizen::Base::String ALL_TAB_ICON_NORMAL = L"T02_controlbar_icon_all.png";
+static const Tizen::Base::String ALL_TAB_ICON_PRESS = L"T02_controlbar_icon_all_press.png";
 static const Tizen::Base::String PLAYLIST_TAB_ICON_NORMAL = L"T02_controlbar_icon_playlists.png";
-static const Tizen::Base::String PLAYLIST_TAB_ICON_PRESS  = L"T02_controlbar_icon_playlists_press.png";
-static const Tizen::Base::String ALBUM_TAB_ICON_NORMAL    = L"T02_controlbar_icon_music_albums.png";
-static const Tizen::Base::String ALBUM_TAB_ICON_PRESS     = L"T02_controlbar_icon_music_albums_press.png";
-static const Tizen::Base::String ARTIST_TAB_ICON_NORMAL   = L"T02_controlbar_icon_artist.png";
-static const Tizen::Base::String ARTIST_TAB_ICON_PRESS    = L"T02_controlbar_icon_artist_press.png";
-static const Tizen::Base::String GENRE_TAB_ICON_NORMAL    = L"T02_controlbar_icon_genres.png";
-static const Tizen::Base::String GENRE_TAB_ICON_PRESS     = L"T02_controlbar_icon_genres_press.png";
+static const Tizen::Base::String PLAYLIST_TAB_ICON_PRESS = L"T02_controlbar_icon_playlists_press.png";
+static const Tizen::Base::String ALBUM_TAB_ICON_NORMAL = L"T02_controlbar_icon_music_albums.png";
+static const Tizen::Base::String ALBUM_TAB_ICON_PRESS = L"T02_controlbar_icon_music_albums_press.png";
+static const Tizen::Base::String ARTIST_TAB_ICON_NORMAL = L"T02_controlbar_icon_artist.png";
+static const Tizen::Base::String ARTIST_TAB_ICON_PRESS = L"T02_controlbar_icon_artist_press.png";
+static const Tizen::Base::String GENRE_TAB_ICON_NORMAL = L"T02_controlbar_icon_genres.png";
+static const Tizen::Base::String GENRE_TAB_ICON_PRESS = L"T02_controlbar_icon_genres_press.png";
 static const Tizen::Base::String COMPOSER_TAB_ICON_NORMAL = L"T02_controlbar_icon_composer.png";
-static const Tizen::Base::String COMPOSER_TAB_ICON_PRESS  = L"T02_controlbar_icon_composer_press.png";
-static const Tizen::Base::String YEAR_TAB_ICON_NORMAL     = L"T02_controlbar_icon_years.png";
-static const Tizen::Base::String YEAR_TAB_ICON_PRESS      = L"T02_controlbar_icon_years_press.png";
-static const Tizen::Base::String FOLDER_TAB_ICON_NORMAL   = L"T02_controlbar_icon_folders.png";
-static const Tizen::Base::String FOLDER_TAB_ICON_PRESS    = L"T02_controlbar_icon_folders_press.png";
+static const Tizen::Base::String COMPOSER_TAB_ICON_PRESS = L"T02_controlbar_icon_composer_press.png";
+static const Tizen::Base::String YEAR_TAB_ICON_NORMAL = L"T02_controlbar_icon_years.png";
+static const Tizen::Base::String YEAR_TAB_ICON_PRESS = L"T02_controlbar_icon_years_press.png";
+static const Tizen::Base::String FOLDER_TAB_ICON_NORMAL = L"T02_controlbar_icon_folders.png";
+static const Tizen::Base::String FOLDER_TAB_ICON_PRESS = L"T02_controlbar_icon_folders_press.png";
 
 static const String CheckedName[HEAD_ITEM_COUNT] =
 {
-    L"SONGS_TAB",
-    L"PLAYERLISTS_TAB",
-    L"ALBUMS_TAB",
-    L"ARTISTS_TAB",
-    L"GENRES_TAB",
-    L"COMPOSERS_TAB",
-    L"YEARS_TAB",
-    L"FOLDERS_TAB"
+       L"SONGS_TAB",
+       L"PLAYERLISTS_TAB",
+       L"ALBUMS_TAB",
+       L"ARTISTS_TAB",
+       L"GENRES_TAB",
+       L"COMPOSERS_TAB",
+       L"YEARS_TAB",
+       L"FOLDERS_TAB"
 };
 
 static const String TabNameId[HEAD_ITEM_COUNT] =
@@ -91,39 +96,40 @@ static const String tabButtonImage[ICON_TOTAL_CONUT] =
 
 ContentForm::ContentForm(void)
 {
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 
 ContentForm::~ContentForm(void)
 {
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 
 bool
 ContentForm::Initialize(void)
 {
-       result r = Construct( FORM_STYLE_NORMAL | FORM_STYLE_INDICATOR | FORM_STYLE_HEADER | FORM_STYLE_FOOTER);
+       AppLogDebug("ENTER");
+       result r = Form::Construct(IDL_CONTENT_FORM);
        if (IsFailed(r))
        {
                return false;
        }
+       AppLogDebug("EXIT");
        return true;
 }
 
 result
-ContentForm::OnInitializing(void)
+ContentForm::InitializeHeaderItem(Tizen::Ui::Controls::Header& pHeader)
 {
-       this->SetName(CONTENT_FORM_REQUSEST_ID);
-
-       Header* pHeader = GetHeader();
-       pHeader->SetStyle(HEADER_STYLE_TAB);
-       pHeader->AddActionEventListener(*this);
+       AppLogDebug("ENTER");
 
        int headItemChecked = 0;
-
-       for(int iCount = 0; iCount < HEAD_ITEM_COUNT; iCount++)
+       for (int iCount = 0; iCount < HEAD_ITEM_COUNT; iCount++)
        {
-               if(CommonUtil::GetValue(CheckedName[iCount]) == true)
+               if (CommonUtil::GetValue(CheckedName[iCount]) == true)
                {
-                       Bitmap* pNormal  = ResourceManager::GetBitmapN(tabButtonImage[IMAGE_NORMAL_LOAD(iCount)]);
+                       Bitmap* pNormal = ResourceManager::GetBitmapN(tabButtonImage[IMAGE_NORMAL_LOAD(iCount)]);
                        Bitmap* pColorizedNormalBitmap = null;
                        Bitmap* pColorizedPressedBitmap = null;
 
@@ -131,12 +137,12 @@ ContentForm::OnInitializing(void)
                        pTabHeaderItem.Construct(IDA_HEADER_BUTTON_SONG + iCount);
                        pTabHeaderItem.SetText(ResourceManager::GetString(TabNameId[iCount]));
 
-                       pColorizedNormalBitmap = CommonUtil::GetColorizedBitmapN(*pNormal, Color(pHeader->GetItemTextColor(HEADER_ITEM_STATUS_NORMAL)));
-                       pColorizedPressedBitmap = CommonUtil::GetColorizedBitmapN(*pNormal, Color(pHeader->GetItemTextColor(HEADER_ITEM_STATUS_SELECTED)));
-                       pTabHeaderItem.SetIcon(HEADER_ITEM_STATUS_NORMAL ,pColorizedNormalBitmap);
-                       pTabHeaderItem.SetIcon(HEADER_ITEM_STATUS_PRESSED,pColorizedPressedBitmap);
-                       pTabHeaderItem.SetIcon(HEADER_ITEM_STATUS_SELECTED,pColorizedPressedBitmap);
-                       pHeader->AddItem(pTabHeaderItem);
+                       pColorizedNormalBitmap = CommonUtil::GetColorizedBitmapN(*pNormal, Color(pHeader.GetItemTextColor(HEADER_ITEM_STATUS_NORMAL)));
+                       pColorizedPressedBitmap = CommonUtil::GetColorizedBitmapN(*pNormal, Color(pHeader.GetItemTextColor(HEADER_ITEM_STATUS_SELECTED)));
+                       pTabHeaderItem.SetIcon(HEADER_ITEM_STATUS_NORMALpColorizedNormalBitmap);
+                       pTabHeaderItem.SetIcon(HEADER_ITEM_STATUS_PRESSED, pColorizedPressedBitmap);
+                       pTabHeaderItem.SetIcon(HEADER_ITEM_STATUS_SELECTED, pColorizedPressedBitmap);
+                       pHeader.AddItem(pTabHeaderItem);
 
                        delete pColorizedNormalBitmap;
                        pColorizedNormalBitmap = null;
@@ -153,9 +159,9 @@ ContentForm::OnInitializing(void)
 
        if (headItemChecked == INIT_VALUE)
        {
-               for(int iCount = 0; iCount < 2; iCount++)
+               for (int iCount = 0; iCount < 2; iCount++)
                {
-                       Bitmap* pNormal  = ResourceManager::GetBitmapN(tabButtonImage[IMAGE_NORMAL_LOAD(iCount)]);
+                       Bitmap* pNormal = ResourceManager::GetBitmapN(tabButtonImage[IMAGE_NORMAL_LOAD(iCount)]);
                        Bitmap* pColorizedNormalBitmap = null;
                        Bitmap* pColorizedPressedBitmap = null;
 
@@ -163,12 +169,12 @@ ContentForm::OnInitializing(void)
                        pTabHeaderItem.Construct(IDA_HEADER_BUTTON_SONG + iCount);
                        pTabHeaderItem.SetText(ResourceManager::GetString(TabNameId[iCount]));
 
-                       pColorizedNormalBitmap = CommonUtil::GetColorizedBitmapN(*pNormal, Color(pHeader->GetItemTextColor(HEADER_ITEM_STATUS_NORMAL)));
-                       pColorizedPressedBitmap = CommonUtil::GetColorizedBitmapN(*pNormal, Color(pHeader->GetItemTextColor(HEADER_ITEM_STATUS_SELECTED)));
-                       pTabHeaderItem.SetIcon(HEADER_ITEM_STATUS_NORMAL ,pColorizedNormalBitmap);
-                       pTabHeaderItem.SetIcon(HEADER_ITEM_STATUS_PRESSED,pColorizedPressedBitmap);
-                       pTabHeaderItem.SetIcon(HEADER_ITEM_STATUS_SELECTED,pColorizedPressedBitmap);
-                       pHeader->AddItem(pTabHeaderItem);
+                       pColorizedNormalBitmap = CommonUtil::GetColorizedBitmapN(*pNormal, Color(pHeader.GetItemTextColor(HEADER_ITEM_STATUS_NORMAL)));
+                       pColorizedPressedBitmap = CommonUtil::GetColorizedBitmapN(*pNormal, Color(pHeader.GetItemTextColor(HEADER_ITEM_STATUS_SELECTED)));
+                       pTabHeaderItem.SetIcon(HEADER_ITEM_STATUS_NORMALpColorizedNormalBitmap);
+                       pTabHeaderItem.SetIcon(HEADER_ITEM_STATUS_PRESSED, pColorizedPressedBitmap);
+                       pTabHeaderItem.SetIcon(HEADER_ITEM_STATUS_SELECTED, pColorizedPressedBitmap);
+                       pHeader.AddItem(pTabHeaderItem);
 
                        delete pColorizedNormalBitmap;
                        pColorizedNormalBitmap = null;
@@ -183,151 +189,110 @@ ContentForm::OnInitializing(void)
                }
        }
 
+       AppLogDebug("EXIT");
        return E_SUCCESS;
 }
 
 result
+ContentForm::OnInitializing(void)
+{
+       AppLogDebug("ENTER");
+       Header* pHeader = GetHeader();
+       pHeader->AddActionEventListener(*this);
+       AppLogDebug("EXIT");
+       return InitializeHeaderItem(*pHeader);
+}
+
+result
 ContentForm::OnTerminating(void)
 {
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
        return E_SUCCESS;
 }
 
 void
 ContentForm::OnActionPerformed(const Tizen::Ui::Control& source, int actionId)
 {
+       AppLogDebug("ENTER");
        SceneManager* pSceneManager = SceneManager::GetInstance();
        AppAssert(pSceneManager);
 
        bool addToPlaylistState = CommonUtil::GetAddtoPlaylistState();
 
-       switch(actionId)
+       switch (actionId)
        {
        case IDA_HEADER_BUTTON_SONG:
-       {
-               String sceneId = ((addToPlaylistState == true) ? IDSCN_ALL_CONTENT_PICKER : IDSCN_ALL_LIST);
-               pSceneManager->GoForward(ForwardSceneTransition(sceneId));
+               {
+                       String sceneId = ((addToPlaylistState == true) ? IDSCN_ALL_CONTENT_PICKER : IDSCN_ALL_LIST);
+                       pSceneManager->GoForward(ForwardSceneTransition(sceneId));
+               }
                break;
-       }
+
        case IDA_HEADER_BUTTON_PLAYLIST:
-       {
-               pSceneManager->GoForward(ForwardSceneTransition(IDSCN_PLAYLIST_LIST));
+               {
+                       pSceneManager->GoForward(ForwardSceneTransition(IDSCN_PLAYLIST_LIST));
+               }
                break;
-       }
+
        case IDA_HEADER_BUTTON_ALBUM:
-       {
-               String sceneId = ((addToPlaylistState == true) ? IDSCN_ALBUM_PICKER : IDSCN_ALBUM_LIST);
-               pSceneManager->GoForward(ForwardSceneTransition(sceneId));
+               {
+                       String sceneId = ((addToPlaylistState == true) ? IDSCN_ALBUM_PICKER : IDSCN_ALBUM_LIST);
+                       pSceneManager->GoForward(ForwardSceneTransition(sceneId));
                break;
-       }
+               }
+
        case IDA_HEADER_BUTTON_ARTIST:
-       {
-               String sceneId = ((addToPlaylistState == true) ? IDSCN_ARTIST_PICKER : IDSCN_ARTIST_LIST);
-               pSceneManager->GoForward(ForwardSceneTransition(sceneId));
+               {
+                       String sceneId = ((addToPlaylistState == true) ? IDSCN_ARTIST_PICKER : IDSCN_ARTIST_LIST);
+                       pSceneManager->GoForward(ForwardSceneTransition(sceneId));
+               }
                break;
-       }
+
        case IDA_HEADER_BUTTON_GENRES:
-       {
-               String sceneId = ((addToPlaylistState == true) ? IDSCN_GENRE_PICKER : IDSCN_GENRE_LIST);
-               pSceneManager->GoForward(ForwardSceneTransition(sceneId));
+               {
+                       String sceneId = ((addToPlaylistState == true) ? IDSCN_GENRE_PICKER : IDSCN_GENRE_LIST);
+                       pSceneManager->GoForward(ForwardSceneTransition(sceneId));
+               }
                break;
-       }
+
        case IDA_HEADER_BUTTON_COMPOSERS:
-       {
-               String sceneId = ((addToPlaylistState == true) ? IDSCN_COMPOSER_PICKER : IDSCN_COMPOSER_LIST);
-               pSceneManager->GoForward(ForwardSceneTransition(sceneId));
+               {
+                       String sceneId = ((addToPlaylistState == true) ? IDSCN_COMPOSER_PICKER : IDSCN_COMPOSER_LIST);
+                       pSceneManager->GoForward(ForwardSceneTransition(sceneId));
+               }
                break;
-       }
+
        case IDA_HEADER_BUTTON_YEARS:
-       {
-               String sceneId = ((addToPlaylistState == true) ? IDSCN_YEAR_PICKER : IDSCN_YEAR_LIST);
-               pSceneManager->GoForward(ForwardSceneTransition(sceneId));
+               {
+                       String sceneId = ((addToPlaylistState == true) ? IDSCN_YEAR_PICKER : IDSCN_YEAR_LIST);
+                       pSceneManager->GoForward(ForwardSceneTransition(sceneId));
+               }
                break;
-       }
+
        case IDA_HEADER_BUTTON_FOLDER:
-       {
-               String sceneId = ((addToPlaylistState == true) ? IDSCN_FOLDER_PICKER : IDSCN_FOLDER_LIST);
-               pSceneManager->GoForward(ForwardSceneTransition(sceneId));
+               {
+                       String sceneId = ((addToPlaylistState == true) ? IDSCN_FOLDER_PICKER : IDSCN_FOLDER_LIST);
+                       pSceneManager->GoForward(ForwardSceneTransition(sceneId));
+               }
                break;
-       }
+
        default:
-       {
                break;
-       }
        }//end of switch
+       AppLogDebug("EXIT");
 }
 
 void
 ContentForm::OnUserEventReceivedN(RequestId requestId, Tizen::Base::Collection::IList* pArgs)
 {
-       AppLogDebug("Start");
+       AppLogDebug("ENTER");
+
        Header* pHeader = GetHeader();
        pHeader->RemoveAllItems();
 
-       int headItemChecked = 0;
-
-       for(int iCount = 0; iCount < HEAD_ITEM_COUNT; iCount++)
-       {
-               if(CommonUtil::GetValue(CheckedName[iCount]) == true)
-               {
-                       Bitmap* pNormal  = ResourceManager::GetBitmapN(tabButtonImage[IMAGE_NORMAL_LOAD(iCount)]);
-                       Bitmap* pColorizedNormalBitmap = null;
-                       Bitmap* pColorizedPressedBitmap = null;
-
-                       HeaderItem pTabHeaderItem;
-                       pTabHeaderItem.Construct(IDA_HEADER_BUTTON_SONG + iCount);
-                       pTabHeaderItem.SetText(ResourceManager::GetString(TabNameId[iCount]));
-
-                       pColorizedNormalBitmap = CommonUtil::GetColorizedBitmapN(*pNormal, Color(pHeader->GetItemTextColor(HEADER_ITEM_STATUS_NORMAL)));
-                       pColorizedPressedBitmap = CommonUtil::GetColorizedBitmapN(*pNormal, Color(pHeader->GetItemTextColor(HEADER_ITEM_STATUS_SELECTED)));
-                       pTabHeaderItem.SetIcon(HEADER_ITEM_STATUS_NORMAL ,pColorizedNormalBitmap);
-                       pTabHeaderItem.SetIcon(HEADER_ITEM_STATUS_PRESSED,pColorizedPressedBitmap);
-                       pTabHeaderItem.SetIcon(HEADER_ITEM_STATUS_SELECTED,pColorizedPressedBitmap);
-                       pHeader->AddItem(pTabHeaderItem);
-
-                       delete pColorizedNormalBitmap;
-                       pColorizedNormalBitmap = null;
-
-                       delete pColorizedPressedBitmap;
-                       pColorizedPressedBitmap = null;
-
-                       delete pNormal;
-                       pNormal = null;
-
-                       headItemChecked++;
-               }
-       }
-
-       if (headItemChecked == INIT_VALUE)
-       {
-               for(int iCount = 0; iCount < 2; iCount++)
-               {
-                       Bitmap* pNormal  = ResourceManager::GetBitmapN(tabButtonImage[IMAGE_NORMAL_LOAD(iCount)]);
-                       Bitmap* pColorizedNormalBitmap = null;
-                       Bitmap* pColorizedPressedBitmap = null;
-
-                       HeaderItem pTabHeaderItem;
-                       pTabHeaderItem.Construct(IDA_HEADER_BUTTON_SONG + iCount);
-                       pTabHeaderItem.SetText(ResourceManager::GetString(TabNameId[iCount]));
-
-                       pColorizedNormalBitmap = CommonUtil::GetColorizedBitmapN(*pNormal, Color(pHeader->GetItemTextColor(HEADER_ITEM_STATUS_NORMAL)));
-                       pColorizedPressedBitmap = CommonUtil::GetColorizedBitmapN(*pNormal, Color(pHeader->GetItemTextColor(HEADER_ITEM_STATUS_SELECTED)));
-                       pTabHeaderItem.SetIcon(HEADER_ITEM_STATUS_NORMAL ,pColorizedNormalBitmap);
-                       pTabHeaderItem.SetIcon(HEADER_ITEM_STATUS_PRESSED,pColorizedPressedBitmap);
-                       pTabHeaderItem.SetIcon(HEADER_ITEM_STATUS_SELECTED,pColorizedPressedBitmap);
-                       pHeader->AddItem(pTabHeaderItem);
+       InitializeHeaderItem(*pHeader);
+       pHeader->Invalidate(true);
 
-                       delete pColorizedNormalBitmap;
-                       pColorizedNormalBitmap = null;
-
-                       delete pColorizedPressedBitmap;
-                       pColorizedPressedBitmap = null;
-
-                       delete pNormal;
-                       pNormal = null;
-
-                       headItemChecked++;
-               }
-       }
-       AppLogDebug("End");
-       Invalidate(true);
-}
+       AppLogDebug("EXIT");
+}
\ No newline at end of file
diff --git a/src/MpContentListEditorForm.cpp b/src/MpContentListEditorForm.cpp
deleted file mode 100755 (executable)
index 08962ac..0000000
+++ /dev/null
@@ -1,682 +0,0 @@
-//
-// Copyright (c) 2012 Samsung Electronics Co., Ltd.
-//
-// Licensed under the Flora License, Version 1.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://floralicense.org/license/
-//
-// 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 "MpContentListEditorForm.h"
-#include "MpSharePopup.h"
-#include "MpPlaylistPickerPopup.h"
-#include "MpTypes.h"
-
-using namespace Tizen::App;
-using namespace Tizen::Base;
-using namespace Tizen::Base::Collection;
-using namespace Tizen::Content;
-using namespace Tizen::Ui;
-using namespace Tizen::Ui::Controls;
-using namespace Tizen::Ui::Scenes;
-using namespace Tizen::Graphics;
-using namespace Tizen::Io;
-
-static const int Y_GAP_LABEL  =  16;
-static const int H_SONG_LABEL =  88;
-static const int W_SONG_LABEL = 186;
-static const int W_SONG_TIME  = 160;
-ContentListEditorForm::ContentListEditorForm(void)
-: __checkedItemCount(0)
-, __ContentType(-1)
-, __DeletedItem(false)
-, __pStrSceneId(null)
-, __pStrContentName(null)
-, __pSelectAllCheckedButton(null)
-, __pCheckedCountLabel(null)
-, __pContentTableView(null)
-, __pPlayListPickerPopup(null)
-, __pSharePopup(null)
-{
-       //AppLogDebug("ContentListEditorForm");
-}
-
-ContentListEditorForm::~ContentListEditorForm(void)
-{
-       //AppLogDebug("~ContentListEditorForm");
-}
-
-bool
-ContentListEditorForm::Initialize(void)
-{
-       //AppLogDebug("Initialize");
-       result r = Construct( FORM_STYLE_NORMAL | FORM_STYLE_INDICATOR | FORM_STYLE_HEADER | FORM_STYLE_FOOTER);
-       if (IsFailed(r))
-       {
-               //AppLogDebug("Unable to construct ContentForm");
-               return false;
-       }
-
-       return true;
-}
-
-result
-ContentListEditorForm::OnInitializing(void)
-{
-       //AppLogDebug("OnInitializing");
-       Header* pHeader = GetHeader();
-       pHeader->SetStyle(HEADER_STYLE_TITLE);
-       pHeader->SetTitleText(ResourceManager::GetString("IDS_COM_BODY_EDIT"));
-
-       int width  = this->GetClientAreaBounds().width;
-       int height = this->GetClientAreaBounds().height;
-
-       __pContentTableView = CommonUtil::CreateEditorTableView(width, height);
-       __pContentTableView->AddTableViewItemEventListener(*this);
-       __pContentTableView->SetItemProvider(this);
-
-       __pSelectAllCheckedButton = CommonUtil::CreateSelectAllCheckedButton(width);
-       __pSelectAllCheckedButton->AddActionEventListener(*this);
-
-       __pCheckedCountLabel = CommonUtil::CreateCheckedCountLabel(width, height);
-       __pCheckedCountLabel->SetShowState(false);
-
-       AddControl(*__pContentTableView);
-       AddControl(*__pSelectAllCheckedButton);
-       AddControl(*__pCheckedCountLabel);
-
-    return E_SUCCESS;
-}
-
-result
-ContentListEditorForm::OnTerminating(void)
-{
-       //AppLogDebug("OnTerminating");
-       if (__pStrSceneId != null)
-       {
-               delete __pStrSceneId;
-               __pStrSceneId = null;
-       }
-
-       if (__pStrContentName != null)
-       {
-               delete __pStrContentName;
-               __pStrContentName = null;
-       }
-
-       delete __pPlayListPickerPopup;
-       __pPlayListPickerPopup = null;
-
-       return E_SUCCESS;
-}
-
-void
-ContentListEditorForm::OnActionPerformed(const Tizen::Ui::Control& source, int actionId)
-{
-       //AppLogDebug("OnActionPerformed");
-       if (__pPresentationModel == null)
-       {
-               return;
-       }
-
-       SceneManager* pSceneManager = SceneManager::GetInstance();
-       AppAssert(pSceneManager);
-
-       int totalCount = __pPresentationModel->GetTotalContentCount();
-
-       switch(actionId)
-       {
-       case IDA_CHECK_BUTTON:
-       {
-               //AppLogDebug("IDA_CHECK_BUTTON");
-               __checkedItemCount = totalCount;
-               CommonUtil::SetAllCheckState(true, *__pContentTableView, totalCount);
-               CommonUtil::ShowCheckedCountLabel(*__pCheckedCountLabel, __checkedItemCount, *__pContentTableView, *this);
-               CommonUtil::SetButtonEnabled(*this, __checkedItemCount, actionId);
-               break;
-       }
-       case IDA_UNCHECK_BUTTON:
-       {
-               //AppLogDebug("IDA_UNCHECK_BUTTON");
-               __checkedItemCount = INIT_VALUE;
-               CommonUtil::SetAllCheckState(false, *__pContentTableView, totalCount);
-               CommonUtil::ShowCheckedCountLabel(*__pCheckedCountLabel, __checkedItemCount, *__pContentTableView, *this);
-               CommonUtil::SetButtonEnabled(*this, __checkedItemCount, actionId);
-               break;
-       }
-       case IDA_FOOTER_BUTTON_DELETE:
-       {
-               if (__checkedItemCount <= INIT_VALUE)
-               {
-                       return;
-               }
-
-               int totalCount = __pPresentationModel->GetTotalContentCount();
-
-               for(int index = totalCount - 1; index >= 0; index--)
-               {
-                       if (__pContentTableView->IsItemChecked(index) == true)
-                       {
-                               __pPresentationModel->RemoveContent(index, __ContentType);
-                               __pContentTableView->RefreshItem(index, TABLE_VIEW_REFRESH_TYPE_ITEM_REMOVE);
-                       }
-               }
-
-               __checkedItemCount = INIT_VALUE;
-               CommonUtil::ShowCheckedCountLabel(*__pCheckedCountLabel, __checkedItemCount, *__pContentTableView, *this);
-               CommonUtil::ShowSelectAllCheckButton(*__pSelectAllCheckedButton);
-               CommonUtil::SetButtonEnabled(*this, __checkedItemCount, actionId);
-
-               __DeletedItem = true;
-
-               if (__pPresentationModel->GetTotalContentCount() != 0)
-               {
-                       __pSelectAllCheckedButton->SetEnabled(true);
-               }
-               else
-               {
-                       __pSelectAllCheckedButton->SetEnabled(false);
-               }
-               break;
-       }
-       case IDA_FOOTER_BUTTON_SHARE:
-       {
-               Tizen::Base::Collection::ArrayList* pDataList = new (std::nothrow) ArrayList();
-               pDataList->Construct();
-
-               int totalCount = __pPresentationModel->GetTotalContentCount();
-               if (__pStrSceneId->Equals(IDSCN_PLAYLIST_LIST, true))
-               {
-                       for(int iCount = 0; iCount < totalCount; iCount++)
-                       {
-                               if (__pContentTableView->IsItemChecked(iCount) == true)
-                               {
-                                       ContentInformationStruct* pContentInfoStruct = __pPresentationModel->GetPlaylistContentInfoN(iCount);
-                                       if (pContentInfoStruct == null)
-                                       {
-                                               pDataList->RemoveAll(true);
-                                               delete pDataList;
-                                               pDataList = null;
-                                               return;
-                                       }
-                                       pDataList->Add(*(new String(pContentInfoStruct->ContentFilePath)));
-
-                                       //test_code_start
-                                       delete pContentInfoStruct->pThumbnail;
-                                       pContentInfoStruct->pThumbnail = null;
-
-                                       delete pContentInfoStruct;
-                                       pContentInfoStruct = null;
-                                       //test_code_end
-                               }
-                       }
-               }
-               else if (__pStrSceneId->Equals(IDSCN_FOLDER_LIST, true))
-               {
-                       AppLogDebug( "IDSCN_FOLDER_LIST");
-                       for(int iCount = 0; iCount < totalCount; iCount++)
-                       {
-                               if (__pContentTableView->IsItemChecked(iCount) == true)
-                               {
-                                       ContentInformationStruct* pContentInfoStruct = __pPresentationModel->GetFolderContentInfoN(iCount);
-                                       if (pContentInfoStruct == null)
-                                       {
-                                               pDataList->RemoveAll(true);
-                                               delete pDataList;
-                                               pDataList = null;
-                                               return;
-                                       }
-                                       pDataList->Add(*(new String(pContentInfoStruct->ContentFilePath)));
-
-                                       delete pContentInfoStruct->pThumbnail;
-                                       pContentInfoStruct->pThumbnail = null;
-
-                                       delete pContentInfoStruct;
-                                       pContentInfoStruct = null;
-                               }
-                       }
-               }
-               else
-               {
-                       for(int iCount = 0; iCount < totalCount; iCount++)
-                       {
-                               if (__pContentTableView->IsItemChecked(iCount) == true)
-                               {
-                                       ContentInformationStruct* pContentInfoStruct = __pPresentationModel->GetContentInfoN(iCount);
-                                       if (pContentInfoStruct == null)
-                                       {
-                                               pDataList->RemoveAll(true);
-                                               delete pDataList;
-                                               pDataList = null;
-                                               return;
-                                       }
-                                       pDataList->Add(*(new String(pContentInfoStruct->ContentFilePath)));
-
-                                       delete pContentInfoStruct->pThumbnail;
-                                       pContentInfoStruct->pThumbnail = null;
-
-                                       delete pContentInfoStruct;
-                                       pContentInfoStruct = null;
-                               }
-                       }
-               }
-
-               if (__pSharePopup == null)
-               {
-                       __pSharePopup = new SharePopup();
-                       __pSharePopup->Initialize();
-               }
-               __pSharePopup->SetShowState(true);
-               __pSharePopup->Show();
-               __pSharePopup->SetArguments(pDataList);
-
-               CommonUtil::SetButtonEnabled(*this, __checkedItemCount, actionId);
-
-               break;
-       }
-       case IDA_FOOTER_BUTTON_ADD_TO_PLAYLIST:
-       {
-               if (__checkedItemCount <= 0)
-               {
-                       return;
-               }
-
-               Tizen::Base::Collection::ArrayList* pDataList = new (std::nothrow) ArrayList();
-               pDataList->Construct();
-
-               ContentManager contentManager;
-               contentManager.Construct();
-
-               int totalCount = __pPresentationModel->GetTotalContentCount();
-               for(int iCount = 0; iCount < totalCount; iCount++)
-               {
-                       if (__pContentTableView->IsItemChecked(iCount) == true)
-                       {
-                               ContentInformationStruct* pContentInfoStruct = null;
-                               if (__pStrSceneId->Equals(IDSCN_PLAYLIST_LIST, true))
-                               {
-                                       pContentInfoStruct = __pPresentationModel->GetPlaylistContentInfoN(iCount);
-                               }
-                               else if (__pStrSceneId->Equals(IDSCN_FOLDER_LIST, true))
-                               {
-                                       pContentInfoStruct = __pPresentationModel->GetFolderContentInfoN(iCount);
-                               }
-                               else
-                               {
-                                       pContentInfoStruct = __pPresentationModel->GetContentInfoN(iCount);
-                               }
-
-                               if (pContentInfoStruct == null)
-                               {
-                                       pDataList->RemoveAll(true);
-                                       delete pDataList;
-                                       pDataList = null;
-                                       return;
-                               }
-
-                               pDataList->Add(*(new (std::nothrow) String(pContentInfoStruct->ContentFilePath)));
-
-                               delete pContentInfoStruct->pThumbnail;
-                               pContentInfoStruct->pThumbnail = null;
-
-                               delete pContentInfoStruct;
-                               pContentInfoStruct = null;
-                       }
-               }
-               if (__pPlayListPickerPopup == null)
-               {
-                       __pPlayListPickerPopup = new (std::nothrow) PlayListPickerPopup();
-                       __pPlayListPickerPopup->Initialize();
-               }
-               __pPlayListPickerPopup->SetShowState(true);
-               __pPlayListPickerPopup->Show();
-               __pPlayListPickerPopup->SetCollectedContent(pDataList);
-
-               /*__checkedItemCount = INIT_VALUE;
-               CommonUtil::ShowCheckedCountLabel(*__pCheckedCountLabel, __checkedItemCount, *__pContentTableView, *this);
-               CommonUtil::ShowSelectAllCheckButton(*__pSelectAllCheckedButton);*/
-               CommonUtil::SetButtonEnabled(*this, __checkedItemCount, actionId);
-
-               Invalidate(true);
-               break;
-       }
-       case IDA_FOOTER_BUTTON_CANCEL:
-       {
-               if (__DeletedItem == true)
-               {
-                       ArrayList* pData = new (std::nothrow) ArrayList();
-                       pData->Construct();
-                       pData->Add(*(new (std::nothrow)Boolean(__DeletedItem)));
-
-                       pSceneManager->GoBackward(BackwardSceneTransition(), pData);
-                       break;
-               }
-               pSceneManager->GoBackward(BackwardSceneTransition());
-               CommonUtil::SetButtonEnabled(*this, __checkedItemCount, actionId);
-               break;
-       }
-       default:
-       {
-               break;
-       }
-       }//end of switch
-}
-
-void
-ContentListEditorForm::OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previousSceneId,
-                                         const Tizen::Ui::Scenes::SceneId& currentSceneId,
-                                         Tizen::Base::Collection::IList* pArgs)
-{
-
-       Footer* pFooter = CommonUtil::CreateDeleteFooter(*this);
-       pFooter->AddActionEventListener(*this);
-
-       CommonUtil::SetButtonEnabled(*this, __checkedItemCount);
-
-       if (pArgs != null)
-       {
-               __pStrSceneId = static_cast<String*>(pArgs->GetAt(DATA_ITEM_SCENE_NAME));
-               __pStrContentName = static_cast<String*>(pArgs->GetAt(DATA_ITEM_CONTENT_NAME));
-               __ContentType = static_cast<Integer*>(pArgs->GetAt(DATA_ITEM_CONTENT_TYPE))->ToInt();
-               __pPresentationModel = static_cast<ContentListPresentationModel*>(pArgs->GetAt(DATA_ITEM_CONTENT_PM));
-       }
-
-       if (__pStrSceneId->Equals(IDSCN_FOLDER_LIST, true))
-       {
-               __ContentType = NORMAL_CONTENT;
-       }
-
-       if (__pStrSceneId->Equals(IDSCN_PLAYLIST_LIST, true))
-       {
-               __pPresentationModel->RefreshContent(true);
-       }
-       __pContentTableView->UpdateTableView();
-
-       if (__pPresentationModel->GetTotalContentCount() != 0)
-       {
-               __pSelectAllCheckedButton->SetEnabled(true);
-       }
-       else
-       {
-               __pSelectAllCheckedButton->SetEnabled(false);
-       }
-}
-
-void
-ContentListEditorForm::OnSceneDeactivated(const Tizen::Ui::Scenes::SceneId& currentSceneId,
-                                                                         const Tizen::Ui::Scenes::SceneId& nextSceneId)
-{
-       //AppLogDebug("OnSceneDeactivated");
-
-       Footer* pFooter = GetFooter();
-       pFooter->RemoveAllButtons();
-       pFooter->RemoveAllItems();
-       pFooter->RemoveActionEventListener(*this);
-
-       __checkedItemCount = INIT_VALUE;
-       CommonUtil::ShowCheckedCountLabel(*__pCheckedCountLabel, __checkedItemCount, *__pContentTableView, *this);
-       CommonUtil::ShowSelectAllCheckButton(*__pSelectAllCheckedButton);
-
-       int totalCount = __pPresentationModel->GetTotalContentCount();
-       for(int iCount = 0; iCount < totalCount; iCount++)
-       {
-               __pContentTableView->SetItemChecked(iCount, false);
-       }
-}
-
-int
-ContentListEditorForm::GetItemCount(void)
-{
-       //AppLogDebug("GetItemCount : %d", __pPresentationModel->GetTotalContentCount());
-       return __pPresentationModel->GetTotalContentCount();
-}
-
-Tizen::Ui::Controls::TableViewItem*
-ContentListEditorForm::CreateItem(const int itemIndex, int itemWidth)
-{
-       TableViewItem* pItem = new (std::nothrow) TableViewItem();
-       pItem->Construct(Dimension(itemWidth, ITEM_HEIGHT),TABLE_VIEW_ANNEX_STYLE_MARK);
-       pItem->SetBackgroundColor(COLOR_ITEM);
-
-       ContentInformationStruct* pContentInfoStruct = null;
-
-       if (__pStrSceneId->Equals(IDSCN_GENRE_LIST, true) ||
-        __pStrSceneId->Equals(IDSCN_COMPOSER_LIST, true) ||
-        __pStrSceneId->Equals(IDSCN_YEAR_LIST, true))
-       {
-               pContentInfoStruct = __pPresentationModel->GetContentInfoN(itemIndex);
-               if (pContentInfoStruct == null)
-               {
-                       delete pItem;
-                       pItem = null;
-                       return null;
-               }
-
-               Label* pThumbnailLabel = new (std::nothrow) Label();
-               pThumbnailLabel->Construct(Rectangle(0, Y_GAP_THUMBNAIL, W_THUMBNAIL ,H_THUMBNAIL), L"");
-               pThumbnailLabel->SetTextConfig(FONT_SIZE, LABEL_TEXT_STYLE_NORMAL);
-               pThumbnailLabel->SetBackgroundBitmap(*(pContentInfoStruct->pThumbnail));
-
-               int X_Gap   = W_THUMBNAIL;
-               int W_Label = W_CLIENT_AREA - X_Gap - W_TABLE_VIEW_MARK;
-
-               Label* pSongLabel = new (std::nothrow) Label();
-               pSongLabel->Construct(Rectangle(X_Gap, Y_GAP_THUMBNAIL, W_Label - W_SONG_TIME, (ITEM_HEIGHT - (Y_GAP_LABEL * 2)) / 2), L"");
-               pSongLabel->SetTextConfig(FONT_SIZE, LABEL_TEXT_STYLE_NORMAL);
-               pSongLabel->SetTextHorizontalAlignment(ALIGNMENT_LEFT);
-               pSongLabel->SetText(pContentInfoStruct->TitleName);
-
-               Label* pArtistNameLabel = new (std::nothrow) Label();
-               pArtistNameLabel->Construct(Rectangle(X_Gap, pSongLabel->GetHeight() + Y_GAP_LABEL, W_Label, pSongLabel->GetHeight()), L"");
-               pArtistNameLabel->SetTextConfig(FONT_SIZE, LABEL_TEXT_STYLE_NORMAL);
-               pArtistNameLabel->SetTextHorizontalAlignment(ALIGNMENT_LEFT);
-               pArtistNameLabel->SetText(pContentInfoStruct->ArtistName);
-
-               Label* pTimeLabel = new (std::nothrow) Label();
-               pTimeLabel->Construct(Rectangle(pSongLabel->GetWidth() + X_Gap, pSongLabel->GetY(), W_SONG_TIME, pSongLabel->GetHeight()), L"");
-               pTimeLabel->SetTextConfig(FONT_SIZE, LABEL_TEXT_STYLE_NORMAL);
-               pTimeLabel->SetTextHorizontalAlignment(ALIGNMENT_RIGHT);
-               pTimeLabel->SetText(CommonUtil::GetFormatDate(pContentInfoStruct->Duration));
-
-               pItem->AddControl(*pThumbnailLabel);
-               pItem->AddControl(*pSongLabel);
-               pItem->AddControl(*pArtistNameLabel);
-               pItem->AddControl(*pTimeLabel);
-       }
-       else if (__pStrSceneId->Equals(IDSCN_FOLDER_LIST, true))
-       {
-               pContentInfoStruct = __pPresentationModel->GetFolderContentInfoN(itemIndex);
-               if (pContentInfoStruct == null)
-               {
-                       delete pItem;
-                       pItem = null;
-                       return null;
-               }
-               GenericCreateTableViewItem(*pItem, *pContentInfoStruct);
-       }
-       else if (__pStrSceneId->Equals(IDSCN_PLAYLIST_LIST, true) == true)
-       {
-               pContentInfoStruct = __pPresentationModel->GetPlaylistContentInfoN(itemIndex);
-               if (pContentInfoStruct == null)
-               {
-                       delete pItem;
-                       pItem = null;
-                       return null;
-               }
-               PlaylistCreateTableViewItem(*pItem, *pContentInfoStruct);
-       }
-       else
-       {
-               pContentInfoStruct = __pPresentationModel->GetContentInfoN(itemIndex);
-               if (pContentInfoStruct == null)
-               {
-                       delete pItem;
-                       pItem = null;
-                       return null;
-               }
-               GenericCreateTableViewItem(*pItem, *pContentInfoStruct);
-       }
-
-       //test_code_start
-       delete pContentInfoStruct->pThumbnail;
-       pContentInfoStruct->pThumbnail = null;
-
-       delete pContentInfoStruct;
-       pContentInfoStruct = null;
-       //test_code_end
-
-       return pItem;
-}
-
-bool
-ContentListEditorForm::DeleteItem(const int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem)
-{
-       //AppLogDebug("DeleteItem");
-
-       delete pItem;
-       pItem = null;
-
-       return true;
-}
-
-void
-ContentListEditorForm::UpdateItem(int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem)
-{
-}
-
-int
-ContentListEditorForm::GetDefaultItemHeight(void)
-{
-       //AppLogDebug("UpdateItem");
-       return ITEM_HEIGHT;
-}
-
-void
-ContentListEditorForm::OnTableViewItemStateChanged(Tizen::Ui::Controls::TableView& tableView,
-                                                   int itemIndex,
-                                                   Tizen::Ui::Controls::TableViewItem* pItem,
-                                                   Tizen::Ui::Controls::TableViewItemStatus status)
-{
-       switch(status)
-       {
-       case TABLE_VIEW_ITEM_STATUS_CHECKED:
-       {
-               __checkedItemCount++;
-               tableView.SetItemChecked(itemIndex, true);
-               break;
-       }
-       case TABLE_VIEW_ITEM_STATUS_UNCHECKED:
-       {
-               __checkedItemCount--;
-               tableView.SetItemChecked(itemIndex, false);
-               break;
-       }
-       default:
-       {
-               break;
-       }
-       }//end of switch
-
-       CommonUtil::SetButtonEnabled(*this, __checkedItemCount);
-       CommonUtil::ShowSelectAllCheckButton(*__pSelectAllCheckedButton);
-
-       if (__checkedItemCount == __pPresentationModel->GetTotalContentCount())
-       {
-               __pSelectAllCheckedButton->SetSelected(true);
-       }
-
-       Invalidate(true);
-       CommonUtil::ShowCheckedCountLabel(*__pCheckedCountLabel, __checkedItemCount, *__pContentTableView, *this);
-}
-
-void
-ContentListEditorForm::OnTableViewContextItemActivationStateChanged(Tizen::Ui::Controls::TableView& tableView,
-                                                                    int itemIndex,
-                                                                    Tizen::Ui::Controls::TableViewContextItem* pContextItem,
-                                                                    bool activated)
-{
-}
-
-void
-ContentListEditorForm::OnTableViewItemReordered(Tizen::Ui::Controls::TableView& tableView,
-                                                int itemIndexFrom,
-                                                int itemIndexTo)
-{
-}
-
-result
-ContentListEditorForm::GenericCreateTableViewItem(Tizen::Ui::Container& parent, const ContentInformationStruct& contentInfoStruct)
-{
-       //AppLogDebug("CreateTableViewItem");
-
-       result r = E_SUCCESS;
-
-       Label* pSongName = new (std::nothrow) Label();
-       pSongName->Construct(Rectangle(0,
-                                   Y_GAP_LABEL,
-                                   GetClientAreaBounds().width - (W_SONG_LABEL + W_TABLE_VIEW_ANNEX_STYLE_MARK),
-                                   H_SONG_LABEL),
-                         contentInfoStruct.TitleName);
-       pSongName->SetTextConfig(FONT_SIZE, LABEL_TEXT_STYLE_NORMAL);
-       pSongName->SetTextHorizontalAlignment(ALIGNMENT_LEFT);
-
-       Label* pSongTime = new (std::nothrow) Label();
-       pSongTime->Construct(Rectangle(pSongName->GetX() + pSongName->GetWidth(),
-                                   Y_GAP_LABEL,
-                                   W_SONG_LABEL,
-                                   H_SONG_LABEL),
-                         CommonUtil::GetFormatDate(contentInfoStruct.Duration));
-       pSongTime->SetTextConfig(FONT_SIZE, LABEL_TEXT_STYLE_NORMAL);
-       pSongTime->SetTextHorizontalAlignment(ALIGNMENT_RIGHT);
-
-       parent.AddControl(*pSongName);
-       parent.AddControl(*pSongTime);
-
-       return r;
-}
-
-result
-ContentListEditorForm::PlaylistCreateTableViewItem(Tizen::Ui::Container& parent,
-                                                                                                  const ContentInformationStruct& contentInfoStruct)
-{
-       result r = E_SUCCESS;
-
-       Label* pSongThumbnailLabel = new (std::nothrow) Label();
-       pSongThumbnailLabel->Construct(Rectangle(0, Y_GAP_THUMBNAIL, W_THUMBNAIL ,H_THUMBNAIL), L"");
-       pSongThumbnailLabel->SetBackgroundBitmap(*contentInfoStruct.pThumbnail);
-
-       int X_Gap   = W_THUMBNAIL;
-       int W_Label = W_CLIENT_AREA - X_Gap - W_TABLE_VIEW_MARK;
-
-       Label* pSongTitleLabel = new (std::nothrow) Label();
-       pSongTitleLabel->Construct(Rectangle(X_Gap, Y_GAP_THUMBNAIL, W_Label - W_SONG_TIME, (ITEM_HEIGHT - (Y_GAP_LABEL * 2)) / 2), contentInfoStruct.TitleName);
-       pSongTitleLabel->SetTextColor(COLOR_MAIN_TEXT);
-       pSongTitleLabel->SetTextConfig(MAIN_TEXT_SIZE, LABEL_TEXT_STYLE_NORMAL);
-       pSongTitleLabel->SetTextHorizontalAlignment(ALIGNMENT_LEFT);
-
-       Label* pSongTimeLabel = new (std::nothrow) Label();
-       pSongTimeLabel->Construct(Rectangle(pSongTitleLabel->GetWidth() + X_Gap, pSongTitleLabel->GetY(), W_SONG_TIME, pSongTitleLabel->GetHeight()), CommonUtil::GetFormatDate(contentInfoStruct.Duration));
-       pSongTimeLabel->SetTextColor(COLOR_SUB_TEXT);
-       pSongTimeLabel->SetTextConfig(SUB_TEXT_SIZE, LABEL_TEXT_STYLE_NORMAL);
-       pSongTimeLabel->SetTextHorizontalAlignment(ALIGNMENT_RIGHT);
-
-       Label* pSongArtistLabel = new (std::nothrow) Label();
-       pSongArtistLabel->Construct(Rectangle(X_Gap, pSongTimeLabel->GetHeight() + Y_GAP_LABEL, W_Label, pSongTitleLabel->GetHeight()), contentInfoStruct.ArtistName);
-       pSongArtistLabel->SetTextColor(COLOR_SUB_TEXT);
-       pSongArtistLabel->SetTextConfig(SUB_TEXT_SIZE, LABEL_TEXT_STYLE_NORMAL);
-       pSongArtistLabel->SetTextHorizontalAlignment(ALIGNMENT_LEFT);
-
-       parent.AddControl(*pSongThumbnailLabel);
-       parent.AddControl(*pSongTitleLabel);
-       parent.AddControl(*pSongTimeLabel);
-       parent.AddControl(*pSongArtistLabel);
-
-       return r;
-}
old mode 100644 (file)
new mode 100755 (executable)
index c89ba8f..cdcfc17
@@ -1,4 +1,4 @@
-//
+//
 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
 //
 // Licensed under the Flora License, Version 1.0 (the License);
 // limitations under the License.
 //
 
+/**
+ * @file               MpContentListForm.cpp
+ * @brief              This is the implementation file for ContentListForm class.
+ */
+
 #include "MpContentListForm.h"
 #include "MpNowPlayContentPanel.h"
+#include "MpPlaylistPickerPopup.h"
+#include "MpSharePopup.h"
+#include "MpTypes.h"
 
 using namespace Tizen::App;
 using namespace Tizen::Base;
 using namespace Tizen::Base::Collection;
 using namespace Tizen::Content;
-using namespace Tizen::Ui;
-using namespace Tizen::Ui::Controls;
-using namespace Tizen::Ui::Scenes;
 using namespace Tizen::Graphics;
 using namespace Tizen::Io;
-using namespace Tizen::System;
 using namespace Tizen::Social;
+using namespace Tizen::System;
+using namespace Tizen::Ui;
+using namespace Tizen::Ui::Controls;
+using namespace Tizen::Ui::Scenes;
 
 static const int Y_GAP_TABLE_VIEW_CONTENT_ITEM = 25;
-static const int X_GAP_TABLE_VIEW_CONTENT_ITEM =  10;
-static const int H_DELETE_POPUP                = 100;
-static const int Y_DELETE_POPUP                =  10;
-static const int DELETE_WIDTH_POPUP            = 600;
-static const int DELETE_HEIGHT_POPUP           = 500;
-
-static const Tizen::Graphics::Rectangle RECT_PAENL           (  0,  0,720,128);
-
-static const Tizen::Graphics::Rectangle RECT_ALBUM_NAME      ( 16, 16,500, 88);
-static const Tizen::Graphics::Rectangle RECT_ALBUM_TIME      (516, 16,188, 88);
-
-static const Tizen::Graphics::Rectangle RECT_HEADER_THUMBNAIL  ( 16, 16, 76, 76);
-static const Tizen::Graphics::Rectangle RECT_HEADER_ALBUM_NAME (108,  9,450, 48);
-static const Tizen::Graphics::Rectangle RECT_HEADER_ARTIST_NAME(108, 57,450, 42);
-static const Tizen::Graphics::Rectangle RECT_HEADER_COUNT      (560,  9,144, 90);
-
-static const Tizen::Graphics::Rectangle RECT_FOLDER_ICON_THUMBNAIL ( 82, 74, 46, 46);
-static const Tizen::Graphics::Rectangle RECT_GENRE_ITEM_THUMBNAIL  ( 16,  8,112,112);
-static const Tizen::Graphics::Rectangle RECT_GENRE_ITEM_TITLE_NAME (144,  8,300, 66);
-static const Tizen::Graphics::Rectangle RECT_GENRE_ITEM_TIME       (444,  8,260, 66);
-static const Tizen::Graphics::Rectangle RECT_GENRE_ITEM_ARTIST_NAME(144, 66,560, 46);
-
-static const Tizen::Graphics::Color COLOR_PAENL_BG           (182,200,214,230);
+static const int X_GAP_TABLE_VIEW_CONTENT_ITEM = 10;
 
-static const Tizen::Base::String STORAGE_PHONE_PATH     = Environment::GetMediaPath() + L"Sounds/";
-static const Tizen::Base::String STORAGE_SDCARD_PATH    = Environment::GetExternalStoragePath();
-static const Tizen::Base::String STORAGE_EXTERNAL_PATH  = Environment::GetMediaPath();
-
-static const wchar_t* SHARE_BUTTON_NAME = L"ShareButton";
-static const wchar_t* SET_BUTTON_NAME   = L"SetButton";
+static const int H_DELETE_POPUP = 100;
+static const int Y_DELETE_POPUP = 10;
+static const int DELETE_WIDTH_POPUP = 600;
+static const int DELETE_HEIGHT_POPUP = 500;
 
 ContentListForm::ContentListForm(void)
-: __ContentType(-1)
-, __itemIndex(-1)
-, __scrolledDistance(0)
-, __isDeletedItem(false)
-, __pStrSceneId(null)
-, __pStrContentName(null)
-, __pShareContextMenu(null)
-, __pSetContextMenu(null)
-, __pDeletePopup(null)
-, __pContentInfoPanel(null)
-, __pNowPlayContentPanel(null)
-, __pPlayListPickerPopup(null)
-, __pNoContentImageLabel(null)
-, __pNoContentTextLabel(null)
-, __pContextItem(null)
-{
-       AppLogDebug("Start");
-       AppLogDebug("End");
+       : __itemIndex(-1)
+       , __currentContentIndex(0)
+       , __scrolledDistance(0)
+       , __checkedItemCount(0)
+       , __checkEdit(false)
+       , __pStrSceneId(null)
+       , __pStrContentName(null)
+       , __pContentTableView(null)
+       , __pSelectAllCheckedButton(null)
+       , __pCheckedCountLabel(null)
+       , __pSharePopup(null)
+       , __pPlayListPickerPopup(null)
+       , __pNoContentImageLabel(null)
+       , __pNoContentTextLabel(null)
+       , __pContextItem(null)
+       , __pDeletePopup(null)
+       , __pShareContextMenu(null)
+       , __pSetContextMenu(null)
+{
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 
 ContentListForm::~ContentListForm(void)
 {
-       AppLogDebug("Start");
-       AppLogDebug("End");
-}
-
-bool
-ContentListForm::Initialize(void)
-{
-       AppLogDebug("Start");
-       result r = Construct( FORM_STYLE_NORMAL | FORM_STYLE_INDICATOR | FORM_STYLE_HEADER | FORM_STYLE_FOOTER);
-       if (IsFailed(r))
-       {
-               AppLogDebug("End");
-               //AppLogDebug("Unable to construct ContentForm");
-               return false;
-       }
-       AppLogDebug("End");
-       return true;
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 
-result
-ContentListForm::OnInitializing(void)
+void
+ContentListForm::CreateNoContentImage(Tizen::Base::String noContentText)
 {
-       AppLogDebug("Start");
-
-       __pContentTableView = new (std::nothrow) TableView();
-       __pContentTableView->Construct(Rectangle(0, 0,  GetClientAreaBounds().width, GetClientAreaBounds().height),
-                                   true,
-                                   TABLE_VIEW_SCROLL_BAR_STYLE_FADE_OUT);
-       __pContentTableView->SetItemProvider(this);
-       __pContentTableView->AddTableViewItemEventListener(*this);
-
+       AppLogDebug("ENTER");
        __pNoContentImageLabel = new (std::nothrow) Label();
-       __pNoContentImageLabel->Construct(Rectangle((GetWidth() - W_NO_CONTENT)/ 2, Y_GAP_NO_CONTENT, W_NO_CONTENT, H_NO_CONTENT),L"");
+       __pNoContentImageLabel->Construct(Rectangle((GetWidth() - W_NO_CONTENT) / 2, Y_GAP_NO_CONTENT, W_NO_CONTENT, H_NO_CONTENT), L"");
        __pNoContentImageLabel->SetBackgroundBitmap(*(ResourceManager::GetBitmapN(NO_CONTENT_BITMAP)));
+       AddControl(*__pNoContentImageLabel);
+
+       __pNoContentImageLabel->SetEnabled(false);
+       __pNoContentImageLabel->SetShowState(false);
 
        __pNoContentTextLabel = new (std::nothrow) Label();
        __pNoContentTextLabel->Construct(Rectangle(0,
-                                                  __pNoContentImageLabel->GetHeight() + __pNoContentImageLabel->GetY(),
-                                                  GetWidth(),
-                                                  H_TEXT_NO_CONTENT),
-                                                  ResourceManager::GetString(L"IDS_MUSIC_HEADER_NO_SONGS"));
+                                                                                       __pNoContentImageLabel->GetHeight() + __pNoContentImageLabel->GetY(),
+                                                                                       GetWidth(),
+                                                                                       H_TEXT_NO_CONTENT),
+                                                                                       ResourceManager::GetString(noContentText));
        __pNoContentTextLabel->SetTextConfig(FONT_SIZE_NO_CONTENT, LABEL_TEXT_STYLE_BOLD);
-
-       __pContextItem = new (std::nothrow) TableViewContextItem();
-       __pContextItem->Construct(Dimension(GetClientAreaBounds().width, ITEM_HEIGHT));
-       CreateTableViewContextItem(*__pContextItem);
-
-       AddControl(*__pContentTableView);
-       AddControl(*__pNoContentImageLabel);
        AddControl(*__pNoContentTextLabel);
 
-       __pDeletePopup = new (std::nothrow) Popup();
-       __pDeletePopup->Construct(true, Dimension(DELETE_WIDTH_POPUP, DELETE_HEIGHT_POPUP));
-
-       Label* pDeleteTitleLabel = new (std::nothrow) Label();
-       pDeleteTitleLabel->Construct(Rectangle(0,
-                                           0,
-                                           __pDeletePopup->GetClientAreaBounds().width,
-                                           __pDeletePopup->GetClientAreaBounds().height - H_DELETE_POPUP),
-                                            ResourceManager::GetString(L"IDS_MUSIC_POP_DELETE_Q"));
-
-       Button* pPopupDeleteButton = new (std::nothrow) Button();
-       pPopupDeleteButton->Construct(Rectangle(0,
-                                            pDeleteTitleLabel->GetHeight() - Y_DELETE_POPUP,
-                                            __pDeletePopup->GetClientAreaBounds().width / 2,
-                                            H_DELETE_POPUP),
-                                  ResourceManager::GetString(L"IDS_MUSIC_OPT_DELETE"));
-       pPopupDeleteButton->SetActionId(IDA_DELETE_POPUP_DELETE);
-       pPopupDeleteButton->AddActionEventListener(*this);
-
-       Button* pPopupCancelButton = new (std::nothrow) Button();
-       pPopupCancelButton->Construct(Rectangle(pPopupDeleteButton->GetX() + pPopupDeleteButton->GetWidth(),
-                                            pPopupDeleteButton->GetY(),
-                                            pPopupDeleteButton->GetWidth(),
-                                            pPopupDeleteButton->GetHeight()),
-                                  ResourceManager::GetString(L"IDS_COM_BODY_EDIT_CANCEL"));
-       pPopupCancelButton->SetActionId(IDA_DELETE_POPUP_CANCEL);
-       pPopupCancelButton->AddActionEventListener(*this);
+       __pNoContentTextLabel->SetEnabled(false);
+       __pNoContentTextLabel->SetShowState(false);
+       AppLogDebug("EXIT");
+}
 
-       __pDeletePopup->AddControl(*pDeleteTitleLabel);
-       __pDeletePopup->AddControl(*pPopupDeleteButton);
-       __pDeletePopup->AddControl(*pPopupCancelButton);
+void
+ContentListForm::CreateTableview(void)
+{
+       AppLogDebug("ENTER");
+       __pContentTableView = new (std::nothrow) TableView();
+       __pContentTableView->Construct(Rectangle(0, 0, GetClientAreaBounds().width, GetClientAreaBounds().height),
+                                                       true,
+                                                       TABLE_VIEW_SCROLL_BAR_STYLE_FADE_OUT);
+       __pContentTableView->AddTableViewItemEventListener(*this);
+       __pContentTableView->SetItemProvider(this);
 
-       AppLogDebug("End");
-    return E_SUCCESS;
+       AddControl(*__pContentTableView);
+       AppLogDebug("EXIT");
 }
 
-result
-ContentListForm::OnTerminating(void)
+bool
+ContentListForm::Initialize(void)
 {
-       if (__pPresentationModel != null)
+       AppLogDebug("ENTER");
+       if (IsFailed(Construct(FORM_STYLE_NORMAL | FORM_STYLE_INDICATOR | FORM_STYLE_HEADER | FORM_STYLE_FOOTER)))
        {
-               delete __pPresentationModel;
-               __pPresentationModel = null;
+               AppLogDebug("Unable to construct ContentForm");
+               return false;
        }
 
-       delete __pContextItem;
-       __pContextItem = null;
-
-       return E_SUCCESS;
+       AppLogDebug("EXIT");
+       return true;
 }
 
 void
-ContentListForm::OnAppControlCompleteResponseReceived(const AppId& appId,
-               const String& operationId, AppCtrlResult appControlResult,
-               const IMap* pExtraData)
+ContentListForm::CreateSelectAllCheckedButton(void)
 {
-       AppLogDebug("Start");
-       if (pExtraData == null)
-       {
-               AppLogDebug("End");
-               return;
-       }
-
-       AppLogDebug("%ls, %ls", appId.GetPointer(), operationId.GetPointer());
-       if (appId.Equals(String(TIZEN_APPCONTROL_PROVIDER_CONTACT))/* && operationId.Equals(String(OPERATION_ID_PICK))*/)
-       {
-               if (appControlResult == APP_CTRL_RESULT_SUCCEEDED)
-               {
-//                     pReturnValue->Add(new (std::nothrow) String(RETURN_KEY_TYPE), new (std::nothrow) String(RETURN_TYPE_CONTACT_ID));
-//                     pReturnValue->Add(new (std::nothrow) String(RETURN_KEY_VALUE), new (std::nothrow) String(pContactId));
-
-                       const String* pContactId = static_cast<const String *>(pExtraData->GetValue(String(APPCONTROL_KEY_RETURNTYPE)));
-                       if (pContactId->Equals(APPCONTROL_VALUE_CONTACTID, true))
-                       {
-                               const String* pResultString = static_cast<const String *>(pExtraData->GetValue(String(APPCONTROL_KEY_VALUE)));
-
-                               AppLogDebug("%ls", pResultString->GetPointer());
-                               int contactId;
-                               Integer::Parse(*pResultString, contactId);
-
-                               AddressbookManager* pAddressbookManager = AddressbookManager::GetInstance();
-                               Addressbook* pAddressbook = pAddressbookManager->GetAddressbookN(DEFAULT_ADDRESSBOOK_ID);
-
-                               ContentInformationStruct* pCcontentInfoStruct =  __pPresentationModel->GetContentInfoN(__itemIndex);
-                               if (pCcontentInfoStruct == null)
-                               {
-                                       delete pAddressbook;
-                                       pAddressbook = null;
-                                       return;
-                               }
-
-                               Contact* pContact = pAddressbook->GetContactN(contactId);
-                               pContact->SetValue(CONTACT_PROPERTY_ID_RINGTONE, pCcontentInfoStruct->ContentFilePath);
-                               result r = pAddressbook->UpdateContact(*pContact);
-
-                               if (r == E_SUCCESS)
-                               {
-                                       MessageBox messageBox;
-                                       messageBox.Construct(L"", ResourceManager::GetString(L"IDS_COM_POP_SUCCESS"),
-                                                MSGBOX_STYLE_OK,
-                                                3000);
-                                       int modalResult = 0;
-                                       messageBox.ShowAndWait(modalResult);
-                               }
-
-                               if (pCcontentInfoStruct != null)
-                               {
-                                       delete pCcontentInfoStruct->pThumbnail;
-                                       pCcontentInfoStruct->pThumbnail  = null;
-                               }
-
-                               delete pCcontentInfoStruct;
-                               pCcontentInfoStruct = null;
-
-                               delete pContact;
-                               pContact = null;
-
-                               delete pAddressbook;
-                               pAddressbook = null;
-                       }
-               }
-       }
-       AppLogDebug("End");
+       AppLogDebug("ENTER");
+       __pSelectAllCheckedButton = CommonUtil::CreateSelectAllCheckedButton(GetClientAreaBounds().width);
+       __pSelectAllCheckedButton->AddActionEventListener(*this);
+       AddControl(*__pSelectAllCheckedButton);
+       __pSelectAllCheckedButton->SetEnabled(false);
+       __pSelectAllCheckedButton->SetShowState(false);
+       AppLogDebug("EXIT");
 }
 
 void
-ContentListForm::OnActionPerformed(const Tizen::Ui::Control& source, int actionId)
+ContentListForm::CreateCheckedCountLabel(void)
 {
-       AppLogDebug("Start");
-       //AppLogDebug("OnActionPerformed");
-       SceneManager* pSceneManager = SceneManager::GetInstance();
-       AppAssert(pSceneManager);
-
-       //AppLogDebug("actionId : %d", actionId);
-
-       switch(actionId)
-       {
-       case IDA_FLICK_BUTTON_SHARE:
-       case IDA_FLICK_BUTTON_SET:
-       {
-               Point itemPoint;
-
-               int screenHeight = CoordinateSystem::GetLogicalResolution().height;
-               Point convertPosition = source.ConvertToScreenPosition(Point(source.GetWidth() / 2,0));
-               itemPoint.x = convertPosition.x;
-               itemPoint.y = convertPosition.y + source.GetHeight();
-
-               ContextMenuAnchorDirection direction = CONTEXT_MENU_ANCHOR_DIRECTION_DOWNWARD;
-
-               if( itemPoint.y > screenHeight / 2)
-               {
-                       itemPoint.y = itemPoint.y - source.GetHeight();
-                       direction = CONTEXT_MENU_ANCHOR_DIRECTION_UPWARD;
-               }
-
-               if (source.GetName() == SHARE_BUTTON_NAME)
-               {
-                       if (__pShareContextMenu != null)
-                       {
-                               delete __pShareContextMenu;
-                               __pShareContextMenu = null;
-                       }
-                       __pShareContextMenu = new (std::nothrow) ContextMenu();
-                       __pShareContextMenu->Construct(Point(0,0), CONTEXT_MENU_STYLE_LIST, direction);
-                       __pShareContextMenu->AddItem(ResourceManager::GetString(L"IDS_COM_BODY_EMAIL"), IDA_SHARE_CONTEXT_MENU_EMAIL);
-                       __pShareContextMenu->AddActionEventListener(*this);
-                       __pShareContextMenu->SetAnchorPosition(itemPoint);
-                       __pShareContextMenu->SetShowState(true);
-                       __pShareContextMenu->Show();
-
-               }
-               else if (source.GetName() == SET_BUTTON_NAME)
-               {
-                       if (__pSetContextMenu != null)
-                       {
-                               delete __pSetContextMenu;
-                               __pSetContextMenu = null;
-                       }
-                       __pSetContextMenu = new (std::nothrow) ContextMenu();
-                       __pSetContextMenu->Construct(Point(0,0), CONTEXT_MENU_STYLE_LIST, direction);
-                       __pSetContextMenu->AddItem(ResourceManager::GetString(L"IDS_MUSIC_OPT_CALL_RINGTONE"), IDA_SET_CONTEXT_MENU_CALL);
-                       __pSetContextMenu->AddItem(ResourceManager::GetString(L"IDS_MUSIC_OPT_SETAS_CALLER_RINGTONE"), IDA_SET_CONTEXT_MENU_CALLER);
-                       __pSetContextMenu->AddActionEventListener(*this);
-                       __pSetContextMenu->SetAnchorPosition(itemPoint);
-                       __pSetContextMenu->SetShowState(true);
-                       __pSetContextMenu->Show();
-               }
-               break;
-       }
-       case IDA_FOOTER_BUTTON_EDIT:
-       {
-               String tempSceneId = __pStrSceneId->GetPointer();
-               String tempContentName = __pStrContentName->GetPointer();
+       AppLogDebug("ENTER");
+       __pCheckedCountLabel = CommonUtil::CreateCheckedCountLabel(GetClientAreaBounds().width, GetClientAreaBounds().height);
+       AddControl(*__pCheckedCountLabel);
+       __pCheckedCountLabel->SetEnabled(false);
+       __pCheckedCountLabel->SetShowState(false);
+       AppLogDebug("EXIT");
+}
 
-               ArrayList* pData = new ArrayList();
-               pData->Construct();
-               pData->Add(*(new String(tempSceneId)));
-               pData->Add(*(new String(tempContentName)));
-               pData->Add(*(new Integer(__ContentType)));
-               pData->Add(*__pPresentationModel);
+void
+ContentListForm::CreateContextMenu(const Tizen::Ui::Control& source)
+{
+       AppLogDebug("ENTER");
+       Point itemPoint;
 
-               pSceneManager->GoForward(ForwardSceneTransition(IDSCN_CONTENT_LIST_EDIT), pData);
+       int screenHeight = CoordinateSystem::GetLogicalResolution().height;
+       Point convertPosition = source.ConvertToScreenPosition(Point(source.GetWidth() / 2, 0));
+       itemPoint.x = convertPosition.x;
+       itemPoint.y = convertPosition.y + source.GetHeight();
 
-               break;
+       ContextMenuAnchorDirection direction = CONTEXT_MENU_ANCHOR_DIRECTION_DOWNWARD;
 
-       }
-       /*case IDA_FOOTER_BUTTON_SEARCH:
-       {
-               pSceneManager->GoForward(ForwardSceneTransition(IDSCN_SEARCH));
-               break;
-       }*/
-       case IDA_DELETE_POPUP_DELETE:
-       case IDA_DELETE_POPUP_CANCEL:
+       if (itemPoint.y > screenHeight / 2)
        {
-               __pDeletePopup->SetShowState(false);
-               __pDeletePopup->Show();
-
-               if (actionId == IDA_DELETE_POPUP_DELETE && __pPresentationModel != null)
-               {
-//                     ContentInformationStruct* pContentInfoStruct = null;
-                       if (__pStrSceneId->Equals(IDSCN_FOLDER_LIST, true))
-                       {
-//                             pContentInfoStruct = __pPresentationModel->GetFolderContentInfoN(__itemIndex);
-                               __pPresentationModel->RemoveContent(__itemIndex, NORMAL_CONTENT);
-                       }
-                       else
-                       {
-//                             pContentInfoStruct = __pPresentationModel->GetContentInfoN(__itemIndex);
-                               __pPresentationModel->RemoveContent(__itemIndex, RECENTLY_ADDED_CONTENT);
-                       }
-
-//                     if (pContentInfoStruct == null)
-//                     {
-//                             return;
-//                     }
-
-//                     ContentManager manager;
-//                     manager.Construct();
-//                     manager.DeleteContent(pContentInfoStruct->contentId);
-                       __pContentTableView->RefreshItem(__itemIndex, TABLE_VIEW_REFRESH_TYPE_ITEM_REMOVE);
-
-//                     delete pContentInfoStruct->pThumbnail;
-//                     pContentInfoStruct->pThumbnail = null;
-//
-//                     delete pContentInfoStruct;
-//                     pContentInfoStruct = null;
-               }
-               break;
+               itemPoint.y = itemPoint.y - source.GetHeight();
+               direction = CONTEXT_MENU_ANCHOR_DIRECTION_UPWARD;
        }
-       case IDA_SHARE_CONTEXT_MENU_EMAIL:
-       /* blocked this code (TDIS-1672 */
-       case IDA_SHARE_CONTEXT_MENU_MESSAGE:
-       {
-               String providerID = ((actionId == IDA_SHARE_CONTEXT_MENU_EMAIL) ? PROVIDER_ID_EMAIL : PROVIDER_ID_MESSAGE);
-               AppControl* pAppControl = AppManager::FindAppControlN(providerID, OPERATION_ID_COMPOSE);
-               if (pAppControl == null)
-               {
-                       return;
-               }
 
-               ContentInformationStruct* pContentInfoStruct = null;
-               if (__pStrSceneId->Equals(IDSCN_FOLDER_LIST, true))
-               {
-                       pContentInfoStruct = __pPresentationModel->GetFolderContentInfoN(__itemIndex);
-               }
-               else
-               {
-                       pContentInfoStruct = __pPresentationModel->GetContentInfoN(__itemIndex);
-               }
-
-               if (pContentInfoStruct == null)
-               {
-                       return;
-               }
-
-               HashMap* pDataList = new (std::nothrow) HashMap(SingleObjectDeleter);
-               pDataList->Construct();
-               pDataList->Add(new (std::nothrow) String(APPCONTROL_KEY_ATTACHMENTS), new (std::nothrow) String(pContentInfoStruct->ContentFilePath));
-
-               pAppControl->Start(null, null, pDataList, this);
-               if (pAppControl != null)
-               {
-                       delete pAppControl;
-                       pAppControl = null;
-               }
-
-               if(pContentInfoStruct != null)
-               {
-                       delete pContentInfoStruct->pThumbnail;
-                       pContentInfoStruct->pThumbnail = null;
-               }
-               delete pContentInfoStruct;
-               pContentInfoStruct = null;
-
-               break;
-       }
-       /* blocked this code (TDIS-1672 */
-       case IDA_SET_CONTEXT_MENU_CALL:
+       if (source.GetName() == SHARE_BUTTON_NAME)
        {
-               result r = __pPresentationModel->SetCallRingtone(__itemIndex);
-               if (r == E_SUCCESS)
+               if (__pShareContextMenu != null)
                {
-                       MessageBox messageBox;
-                       messageBox.Construct(L"", ResourceManager::GetString(L"IDS_COM_POP_SUCCESS"),
-                                 MSGBOX_STYLE_OK,
-                                 3000);
-                       int modalResult = 0;
-                       messageBox.ShowAndWait(modalResult);
+                       delete __pShareContextMenu;
+                       __pShareContextMenu = null;
                }
-               break;
+               __pShareContextMenu = new (std::nothrow) ContextMenu();
+               __pShareContextMenu->Construct(Point(0, 0), CONTEXT_MENU_STYLE_LIST, direction);
+               __pShareContextMenu->AddItem(ResourceManager::GetString(L"IDS_COM_BODY_EMAIL"), IDA_SHARE_CONTEXT_MENU_EMAIL);
+               __pShareContextMenu->AddActionEventListener(*this);
+               __pShareContextMenu->SetAnchorPosition(itemPoint);
+               __pShareContextMenu->SetShowState(true);
+               __pShareContextMenu->Show();
        }
-       case IDA_SET_CONTEXT_MENU_CALLER:
+       else if (source.GetName() == SET_BUTTON_NAME)
        {
-               AppControl* pAppControl = AppManager::FindAppControlN(TIZEN_APPCONTROL_PROVIDER_CONTACT, TIZEN_APPCONTROL_OPERATION_PICK);
-               if (pAppControl == null)
-               {
-                       return;
-               }
-
-               HashMap* pDataList = new (std::nothrow) HashMap(SingleObjectDeleter);
-               pDataList->Construct();
-               pDataList->Add(new (std::nothrow) String(APPCONTROL_KEY_SINGLE_MODE), new (std::nothrow) String(APPCONTROL_VALUE_SINGLE));
-               pDataList->Add(new (std::nothrow) String(APPCONTROL_KEY_RETURNTYPE), new (std::nothrow) String(APPCONTROL_VALUE_CONTACTID));
-
-               pAppControl->Start(null, null, pDataList, this);
-               if (pAppControl != null)
+               if (__pSetContextMenu != null)
                {
-                       delete pAppControl;
-                       pAppControl = null;
+                       delete __pSetContextMenu;
+                       __pSetContextMenu = null;
                }
-               break;
+               __pSetContextMenu = new (std::nothrow) ContextMenu();
+               __pSetContextMenu->Construct(Point(0, 0), CONTEXT_MENU_STYLE_LIST, direction);
+               __pSetContextMenu->AddItem(ResourceManager::GetString(L"IDS_MUSIC_OPT_CALL_RINGTONE"), IDA_SET_CONTEXT_MENU_CALL);
+               __pSetContextMenu->AddItem(ResourceManager::GetString(L"IDS_MUSIC_OPT_SETAS_CALLER_RINGTONE"), IDA_SET_CONTEXT_MENU_CALLER);
+               __pSetContextMenu->AddActionEventListener(*this);
+               __pSetContextMenu->SetAnchorPosition(itemPoint);
+               __pSetContextMenu->SetShowState(true);
+               __pSetContextMenu->Show();
        }
-       case IDA_FLICK_BUTTON_ADD_TO_PALYLIST:
-       {
-               Tizen::Base::Collection::ArrayList* pDataList = new (std::nothrow) ArrayList();
-               pDataList->Construct();
-
-               ContentInformationStruct* pContentInfoStruct = __pPresentationModel->GetFolderContentInfoN(__itemIndex);
-               if (pContentInfoStruct == null)
-               {
-                       pDataList->RemoveAll(true);
-                       delete pDataList;
-                       pDataList = null;
-                       return;
-               }
-               pDataList->Add(*(new String(pContentInfoStruct->ContentFilePath)));
-
-               delete pContentInfoStruct->pThumbnail;
-               pContentInfoStruct->pThumbnail = null;
+       AppLogDebug("EXIT");
+}
 
-               delete pContentInfoStruct;
-               pContentInfoStruct = null;
+void
+ContentListForm::CreateDeletePopup(void)
+{
+       AppLogDebug("ENTER");
+       __pDeletePopup = new (std::nothrow) Popup();
+       __pDeletePopup->Construct(true, Dimension(DELETE_WIDTH_POPUP, DELETE_HEIGHT_POPUP));
 
-               if (__pPlayListPickerPopup == null)
-               {
-                       __pPlayListPickerPopup = new (std::nothrow) PlayListPickerPopup();
-                       __pPlayListPickerPopup->Initialize();
-               }
+       Label* pDeleteTitleLabel = new (std::nothrow) Label();
+       pDeleteTitleLabel->Construct(Rectangle(0,
+                                                                               0,
+                                                                               __pDeletePopup->GetClientAreaBounds().width,
+                                                                               __pDeletePopup->GetClientAreaBounds().height - H_DELETE_POPUP),
+                                                                       ResourceManager::GetString(L"IDS_MUSIC_POP_DELETE_Q"));
 
-               __pPlayListPickerPopup->SetShowState(true);
-               __pPlayListPickerPopup->Show();
-               __pPlayListPickerPopup->SetCollectedContent(pDataList);
+       Button* pPopupDeleteButton = new (std::nothrow) Button();
+       pPopupDeleteButton->Construct(Rectangle(0,
+                                                                                       pDeleteTitleLabel->GetHeight() - Y_DELETE_POPUP,
+                                                                                       __pDeletePopup->GetClientAreaBounds().width / 2,
+                                                                                       H_DELETE_POPUP),
+                                                                       ResourceManager::GetString(L"IDS_MUSIC_OPT_DELETE"));
+       pPopupDeleteButton->SetActionId(IDA_DELETE_POPUP_DELETE);
+       pPopupDeleteButton->AddActionEventListener(*this);
 
-               break;
-       }
-       case IDA_FLICK_BUTTON_DELETE:
-       {
-               if (__pDeletePopup != null)
-               {
-                       __pDeletePopup->SetShowState(true);
-                       __pDeletePopup->Show();
-               }
-               break;
-       }
+       Button* pPopupCancelButton = new (std::nothrow) Button();
+       pPopupCancelButton->Construct(Rectangle(pPopupDeleteButton->GetX() + pPopupDeleteButton->GetWidth(),
+                                                                                       pPopupDeleteButton->GetY(),
+                                                                                       pPopupDeleteButton->GetWidth(),
+                                                                                       pPopupDeleteButton->GetHeight()),
+                                                                       ResourceManager::GetString(L"IDS_COM_BODY_EDIT_CANCEL"));
+       pPopupCancelButton->SetActionId(IDA_DELETE_POPUP_CANCEL);
+       pPopupCancelButton->AddActionEventListener(*this);
 
-       default:
-       {
-               break;
-       }
-       }//end of switch
-       AppLogDebug("End");
+       __pDeletePopup->AddControl(*pDeleteTitleLabel);
+       __pDeletePopup->AddControl(*pPopupDeleteButton);
+       __pDeletePopup->AddControl(*pPopupCancelButton);
+       AppLogDebug("EXIT");
 }
 
-void
-ContentListForm::OnFormBackRequested(Tizen::Ui::Controls::Form& source)
+result
+ContentListForm::CreatePlayListPickerPopup(Tizen::Base::Collection::IList* pDataList)
 {
-       SceneManager* pSceneManager = SceneManager::GetInstance();
-       AppAssert(pSceneManager);
-
-       ArrayList* pData = null;
-
-       if (__isDeletedItem == true)
+       AppLogDebug("ENTER");
+       if (__pPlayListPickerPopup != null )
        {
-               pData = new ArrayList();
-               pData->Construct();
-               pData->Add(*(new Boolean(__isDeletedItem)));
+               DestroyPlayListPickerPopup();
        }
 
-//     pSceneManager->GoForward(ForwardSceneTransition(__pStrSceneId->GetPointer(),
-//                                                     SCENE_TRANSITION_ANIMATION_TYPE_NONE,
-//                                                                                                     SCENE_HISTORY_OPTION_NO_HISTORY,
-//                                                                                                     SCENE_DESTROY_OPTION_DESTROY),
-//                                                                                                     pData);
-       pSceneManager->GoBackward(BackwardSceneTransition(), pData);
+       __pPlayListPickerPopup = new (std::nothrow) PlayListPickerPopup();
+       AppLogDebug("EXIT");
+       return __pPlayListPickerPopup->Initialize(this, pDataList);
 }
 
 void
-ContentListForm::OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previousSceneId,
-                                   const Tizen::Ui::Scenes::SceneId& currentSceneId,
-                                   Tizen::Base::Collection::IList* pArgs)
+ContentListForm::DestroyPlayListPickerPopup(void)
 {
-       AppLogDebug("Start");
-
-       if (pArgs != null && previousSceneId.Equals(IDSCN_PLAYLIST_LIST, true) == true)
-       {
-               __pStrSceneId     = static_cast<String*>(pArgs->GetAt(DATA_ITEM_SCENE_NAME));
-               __pStrContentName = static_cast<String*>(pArgs->GetAt(DATA_ITEM_CONTENT_NAME));
-               __ContentType     = static_cast<Integer*>(pArgs->GetAt(DATA_ITEM_CONTENT_TYPE))->ToInt();
-               __pPresentationModel = new ContentListPresentationModel();
-               __pPresentationModel->Construct(*__pStrContentName, *__pStrSceneId, __ContentType);
-       }
-       else if(pArgs != null && previousSceneId.Equals(IDSCN_CONTENT_LIST_EDIT, true) == false)
-       {
-               __pStrSceneId     = static_cast<String*>(pArgs->GetAt(DATA_ITEM_SCENE_NAME));
-               __pStrContentName = static_cast<String*>(pArgs->GetAt(DATA_ITEM_CONTENT_NAME));
-               __pPresentationModel = new ContentListPresentationModel();
-               __pPresentationModel->Construct(*__pStrContentName, *__pStrSceneId, __ContentType);
-       }
-       else if(pArgs != null && previousSceneId.Equals(IDSCN_CONTENT_LIST_EDIT, true) == true &&
-                       __pStrSceneId->Equals(IDSCN_PLAYLIST_LIST, true) == false)
-       {
-               __isDeletedItem = true;
-               if (__pPresentationModel->GetTotalContentCount() == 0)
-               {
-                       SetHeaderTitleChanged("No Album");
-
-                       if ( __pContentInfoPanel != null)
-                       {
-                               __pContentInfoPanel->SetShowState(false);
-                               __pContentInfoPanel->Invalidate(true);
-                       }
-               }
-               __pContentTableView->UpdateTableView();
-       }
-
-       Footer* pFooter = null;
-       if (__pStrSceneId != null && __pStrSceneId->Equals(IDSCN_SEARCH, true))
-       {
-               pFooter = GetFooter();
-               pFooter->SetStyle(FOOTER_STYLE_BUTTON_ICON_TEXT);
-
-               FooterItem editButtonItem;
-               editButtonItem.Construct(IDA_FOOTER_BUTTON_EDIT);
-               editButtonItem.SetText(ResourceManager::GetString(L"IDS_COM_BODY_EDIT"));
-               pFooter->AddItem(editButtonItem);
-       }
-       else
-       {
-               pFooter = CommonUtil::CreateEditFooter(*this);
-       }
-
-       if (pFooter != null)
-       {
-               pFooter->AddActionEventListener(*this);
-               pFooter->SetBackButton();
-       }
-
-       SetFormBackEventListener(this);
-
-       CommonUtil::ShowNoContentImage(__pPresentationModel->GetTotalContentCount(), *__pContentTableView, *__pNoContentImageLabel, *__pNoContentTextLabel);
-
-       int totalCount = __pPresentationModel->GetTotalContentCount();
-       bool buttonState = totalCount == 0 ? false : true;
-       pFooter->SetItemEnabled(0, buttonState);
-       pFooter->Invalidate(true);
-
-       ContentInformationStruct* pContentInfoStruct = null;
-       if (__pStrSceneId->Equals(IDSCN_ALBUM_LIST, true) || __pStrSceneId->Equals(IDSCN_SEARCH, true))
-       {
-               __pContentTableView->SetBounds(Rectangle(0, H_NOW_PLAY_BAR, GetClientAreaBounds().width, GetClientAreaBounds().height - H_NOW_PLAY_BAR));
-               __pContentTableView->Invalidate(true);
-
-               pContentInfoStruct = __pPresentationModel->GetContentInfoN(0);
-               if(pContentInfoStruct == null)
-               {
-                       return;
-               }
-
-               InitializeHeader(*pContentInfoStruct);
-               InitializeGenericContentInfoPanel(*pContentInfoStruct, __pPresentationModel->GetTotalContentCount());
-       }
-       else if (__pStrSceneId->Equals(IDSCN_GENRE_LIST, true) ||
-             __pStrSceneId->Equals(IDSCN_COMPOSER_LIST, true) ||
-             __pStrSceneId->Equals(IDSCN_YEAR_LIST, true))
-       {
-               pContentInfoStruct = __pPresentationModel->GetContentInfoN(0);
-               if (pContentInfoStruct == null)
-               {
-                       return;
-               }
-               InitializeHeader(*pContentInfoStruct);
-       }
-       else if (__pStrSceneId->Equals(IDSCN_FOLDER_LIST, true))
-       {
-               pContentInfoStruct = __pPresentationModel->GetFolderContentInfoN(0);
-               if (pContentInfoStruct == null)
-               {
-                       return;
-               }
-               InitializeHeader(*pContentInfoStruct);
-       }
-       else if (__pStrSceneId->Equals(IDSCN_PLAYLIST_LIST, true))
-       {
-               SceneManager* pSceneManager = SceneManager::GetInstance();
-               AppAssert(pSceneManager);
-
-//             if (pSceneManager->IsSceneAlive(IDSCN_PLAYER))
-//             {
-//                     if (__pNowPlayContentPanel == null)
-//                     {
-//                             __pNowPlayContentPanel = new (std::nothrow) NowPlayContentPanel();
-//                             __pNowPlayContentPanel->Initialize();
-//                             AddControl(*__pNowPlayContentPanel);
-//                     }
-//                     CommonUtil::ShowNowPlayPanel(*__pContentTableView, __pNowPlayContentPanel->GetPlayStatus(), GetClientAreaBounds());
-//             }
-
-               Header* pHeader = GetHeader();
-               pHeader->SetStyle(HEADER_STYLE_TITLE);
-               pHeader->SetTitleText(*__pStrContentName);
-       }
-       else
-       {
-               pContentInfoStruct = __pPresentationModel->GetContentInfoN(0);
-               if (pContentInfoStruct == null)
-               {
-                       return;
-               }
-               InitializeHeader(*pContentInfoStruct);
-       }
-
-       __pContentTableView->UpdateTableView();
-
-       if (pContentInfoStruct != null && __pStrSceneId->Equals(IDSCN_PLAYLIST_LIST, true) == false)
+       AppLogDebug("ENTER");
+       if (__pPlayListPickerPopup != null )
        {
-               delete pContentInfoStruct->pThumbnail;
-               pContentInfoStruct->pThumbnail = null;
-
-               delete pContentInfoStruct;
-               pContentInfoStruct = null;
+               delete __pPlayListPickerPopup;
+               __pPlayListPickerPopup = null;
        }
-
-       AppLogDebug("End");
+       AppLogDebug("EXIT");
 }
 
 void
-ContentListForm::OnSceneDeactivated(const Tizen::Ui::Scenes::SceneId& currentSceneId,
-                                                                   const Tizen::Ui::Scenes::SceneId& nextSceneId)
+ContentListForm::UpdateItem(int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem)
 {
-       AppLogDebug("Start");
-
-       Footer* pFooter = GetFooter();
-       pFooter->RemoveAllButtons();
-       pFooter->RemoveAllItems();
-       pFooter->RemoveActionEventListener(*this);
-
-       AppLogDebug("End");
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 
 int
-ContentListForm::GetItemCount(void)
-{
-       AppLogDebug("Start");
-       return __pPresentationModel->GetTotalContentCount();
-}
-
-Tizen::Ui::Controls::TableViewItem*
-ContentListForm::CreateItem(const int itemIndex, int itemWidth)
+ContentListForm::GetDefaultItemHeight(void)
 {
-       AppLogDebug("Start");
-       ContentInformationStruct* pContentInfoStruct = null;
-
-       TableViewItem* pItem = new (std::nothrow) TableViewItem();
-       pItem->Construct(Dimension(itemWidth, ITEM_HEIGHT),TABLE_VIEW_ANNEX_STYLE_NORMAL);
-       pItem->SetBackgroundColor(COLOR_ITEM);
-
-       if( __pStrSceneId->Equals(IDSCN_ARTIST_ALBUM_LIST, true))
-       {
-               pContentInfoStruct = __pPresentationModel->GetContentInfoN(itemIndex);
-               if (pContentInfoStruct == null)
-               {
-                       delete pItem;
-                       pItem = null;
-                       return null;
-               }
-               ArtistsCreateTableViewItem(*pItem, *pContentInfoStruct);
-       }
-       else if (__pStrSceneId->Equals(IDSCN_GENRE_LIST, true))
-       {
-               pContentInfoStruct = __pPresentationModel->GetContentInfoN(itemIndex);
-               if (pContentInfoStruct == null)
-               {
-                       delete pItem;
-                       pItem = null;
-
-                       return null;
-               }
-
-               GenreCreateTableViewItem(*pItem, *pContentInfoStruct);
-               pItem->SetContextItem(__pContextItem);
-       }
-       else if (__pStrSceneId->Equals(IDSCN_COMPOSER_LIST, true))
-       {
-               TableViewContextItem* pContextItem = new (std::nothrow) TableViewContextItem();
-               pContextItem->Construct(Dimension(itemWidth, ITEM_HEIGHT));
-
-               pContentInfoStruct = __pPresentationModel->GetContentInfoN(itemIndex);
-               if (pContentInfoStruct == null)
-               {
-                       delete pItem;
-                       pItem = null;
-
-                       delete pContextItem;
-                       pContextItem = null;
-
-                       return null;
-               }
-
-               ComposersCreateTableViewItem(*pItem, *pContentInfoStruct);
-               pItem->SetContextItem(__pContextItem);
-       }
-       else if (__pStrSceneId->Equals(IDSCN_YEAR_LIST, true))
-       {
-               TableViewContextItem* pContextItem = new (std::nothrow) TableViewContextItem();
-               pContextItem->Construct(Dimension(itemWidth, ITEM_HEIGHT));
-
-               pContentInfoStruct = __pPresentationModel->GetContentInfoN(itemIndex);
-               if (pContentInfoStruct == null)
-               {
-                       delete pItem;
-                       pItem = null;
-
-                       delete pContextItem;
-                       pContextItem = null;
-
-                       return null;
-               }
-
-               YearCreateTableViewItem(*pItem, *pContentInfoStruct);
-               pItem->SetContextItem(__pContextItem);
-       }
-       else if (__pStrSceneId->Equals(IDSCN_ALBUM_LIST, true) || __pStrSceneId->Equals(IDSCN_SEARCH, true))
-       {
-               pContentInfoStruct = __pPresentationModel->GetContentInfoN(itemIndex);
-               if (pContentInfoStruct == null)
-               {
-                       delete pItem;
-                       pItem = null;
-                       return null;
-               }
-
-               AlbumCreateTableViewItem(*pItem, *pContentInfoStruct);
-       }
-       else if (__pStrSceneId->Equals(IDSCN_FOLDER_LIST, true))
-       {
-               TableViewContextItem* pContextItem = new (std::nothrow) TableViewContextItem();
-               pContextItem->Construct(Dimension(itemWidth, ITEM_HEIGHT));
-
-               pContentInfoStruct = __pPresentationModel->GetFolderContentInfoN(itemIndex);
-               if (pContentInfoStruct == null)
-               {
-                       delete pItem;
-                       pItem = null;
-
-                       delete pContextItem;
-                       pContextItem = null;
-
-                       return null;
-               }
-
-               FolderCreateTableViewItem(*pItem, *pContentInfoStruct);
-               pItem->SetContextItem(__pContextItem);
-       }
-       else if (__pStrSceneId->Equals(IDSCN_PLAYLIST_LIST, true))
-       {
-               if (__ContentType <= RECENTLY_ADDED_CONTENT)
-               {
-                       pContentInfoStruct = __pPresentationModel->GetPlaylistContentInfoN(itemIndex);
-               }
-               else if (__ContentType == USER_CONTENT)
-               {
-                       pContentInfoStruct = __pPresentationModel->GetContentInfoN(itemIndex);
-               }
-
-               if (pContentInfoStruct == null)
-               {
-                       delete pItem;
-                       pItem = null;
-                       return null;
-               }
-               PlaylistCreateTableViewItem(*pItem, *pContentInfoStruct);
-       }
-       AppLogDebug("End");
-
-       //test_code_start
-       if (pContentInfoStruct != null)
-       {
-               delete pContentInfoStruct->pThumbnail;
-               pContentInfoStruct->pThumbnail = null;
-       }
-
-       delete pContentInfoStruct;
-       pContentInfoStruct = null;
-       //test_code_end
-
-       return pItem;
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
+       return ITEM_HEIGHT;
 }
 
 bool
 ContentListForm::DeleteItem(const int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem)
 {
-       AppLogDebug("Start");
-       AppLogDebug("End");
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
        return true;
 }
 
 void
-ContentListForm::UpdateItem(int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem)
+ContentListForm::OnTableViewItemReordered(Tizen::Ui::Controls::TableView& tableView,
+                                                       int itemIndexFrom,
+                                                       int itemIndexTo)
 {
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 
 int
-ContentListForm::GetDefaultItemHeight(void)
+ContentListForm::GetItemCount(void)
 {
-       AppLogDebug("Start");
-       AppLogDebug("End");
-       //AppLogDebug("GetDefaultItemHeight");
-       return ITEM_HEIGHT;
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
+       return INIT_VALUE;
 }
 
-void
-ContentListForm::OnTableViewItemStateChanged(Tizen::Ui::Controls::TableView& tableView,
-                                             int itemIndex,
-                                             Tizen::Ui::Controls::TableViewItem* pItem,
-                                             Tizen::Ui::Controls::TableViewItemStatus status)
+Tizen::Ui::Controls::TableViewItem*
+ContentListForm::CreateItem(const int itemIndex, int itemWidth)
 {
-       AppLogDebug("Start");
-       //AppLogDebug("OnTableViewItemStateChanged");
-       if (status == TABLE_VIEW_ITEM_STATUS_SELECTED)
-       {
-               SceneManager* pSceneManager = SceneManager::GetInstance();
-               AppAssert(pSceneManager);
-
-               if (__pStrSceneId->Equals(IDSCN_FOLDER_LIST, true) == true)
-               {
-                       pSceneManager->GoForward(ForwardSceneTransition(IDSCN_PLAYER),GetAudioContentInfoContentList(itemIndex));
-               }
-               else if (__pStrSceneId->Equals(IDSCN_PLAYLIST_LIST, true) && __ContentType != RECENTLY_ADDED_CONTENT)
-               {
-                       pSceneManager->GoForward(ForwardSceneTransition(IDSCN_PLAYER),GetAudioContentInfoContentList(itemIndex));
-               }
-               else if (__pStrSceneId->Equals(IDSCN_PLAYLIST_LIST, true) && __ContentType == RECENTLY_ADDED_CONTENT)
-               {
-                       pSceneManager->GoForward(ForwardSceneTransition(IDSCN_PLAYER),GetSearchResultContentList(itemIndex));
-               }
-               else
-               {
-                       pSceneManager->GoForward(ForwardSceneTransition(IDSCN_PLAYER),GetSearchResultContentList(itemIndex));
-               }
-       }
-       AppLogDebug("End");
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
+       return null;
 }
 
 void
-ContentListForm::OnTableViewContextItemActivationStateChanged(Tizen::Ui::Controls::TableView& tableView,
-                                                                int itemIndex,
-                                                                Tizen::Ui::Controls::TableViewContextItem* pContextItem,
-                                                                bool activated)
+ContentListForm::OnTableViewContextItemActivationStateChanged(Tizen::Ui::Controls::TableView& tableView, int itemIndex,
+                                                                               Tizen::Ui::Controls::TableViewContextItem* pContextItem,
+                                                                               bool activated)
 {
-       AppLogDebug("Start");
+       AppLogDebug("ENTER");
        if (itemIndex >= 0)
        {
+               AppLogDebug("INDEX %d", itemIndex);
                __itemIndex = itemIndex;
        }
-       AppLogDebug("End");
+       AppLogDebug("EXIT");
 }
 
 void
-ContentListForm::OnTableViewItemReordered(Tizen::Ui::Controls::TableView& tableView,
-                                            int itemIndexFrom,
-                                            int itemIndexTo)
+ContentListForm::OnTableViewItemStateChanged(Tizen::Ui::Controls::TableView& tableView, int itemIndex,
+                                               Tizen::Ui::Controls::TableViewItem* pItem,
+                                               Tizen::Ui::Controls::TableViewItemStatus status)
 {
-
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 
 result
-ContentListForm::InitializeHeader(const ContentInformationStruct& contentInfoStruct)
+ContentListForm::InitializeHeader(const ContentInformation& contentInfoStruct)
 {
-       AppLogDebug("Start");
-       result r = E_SUCCESS;
-
+       AppLogDebug("ENTER");
        Header* pHeader = GetHeader();
        pHeader->SetStyle(HEADER_STYLE_TITLE);
-       pHeader->SetTitleText(CommonUtil::GetContentInfo(contentInfoStruct, *__pStrSceneId));
-       AppLogDebug("End");
-       return r;
-}
-
-result
-ContentListForm::InitializeGenericContentInfoPanel(const ContentInformationStruct& contentInfoStruct,
-                                                                                  const int Songs)
-{
-       AppLogDebug("Start");
-       AppLogDebug("InitializeGenericContentInfoPanel - Start");
-       result r = E_SUCCESS;
-
-       __pContentInfoPanel = new (std::nothrow) Panel();
-       __pContentInfoPanel->Construct(RECT_PAENL);
-       __pContentInfoPanel->SetBackgroundColor(COLOR_PAENL_BG);
-
-       Label* pHeaderThumbnailLabel = new (std::nothrow) Label();
-       pHeaderThumbnailLabel->Construct(RECT_HEADER_THUMBNAIL, L"");
-       pHeaderThumbnailLabel->SetTextHorizontalAlignment(ALIGNMENT_LEFT);
-       pHeaderThumbnailLabel->SetTextConfig(FONT_SIZE, LABEL_TEXT_STYLE_NORMAL);
-       pHeaderThumbnailLabel->SetBackgroundBitmap(*contentInfoStruct.pThumbnail);
-
-       Label* pHeaderAlbumNameLabel = new (std::nothrow) Label();
-       pHeaderAlbumNameLabel->Construct(RECT_HEADER_ALBUM_NAME, L"");
-       pHeaderAlbumNameLabel->SetTextHorizontalAlignment(ALIGNMENT_LEFT);
-       pHeaderAlbumNameLabel->SetTextConfig(FONT_SIZE, LABEL_TEXT_STYLE_NORMAL);
-       pHeaderAlbumNameLabel->SetText(contentInfoStruct.AlbumName);
-
-       Label* pHeaderArtistNameLabel = new (std::nothrow) Label();
-       pHeaderArtistNameLabel->Construct(RECT_HEADER_ARTIST_NAME, L"");
-       pHeaderArtistNameLabel->SetTextHorizontalAlignment(ALIGNMENT_LEFT);
-       pHeaderArtistNameLabel->SetTextConfig(FONT_SIZE, LABEL_TEXT_STYLE_NORMAL);
-       pHeaderArtistNameLabel->SetText(contentInfoStruct.ArtistName);
-
-       Label* pHeaderAblumCountLabel = new (std::nothrow) Label();
-       pHeaderAblumCountLabel->Construct(RECT_HEADER_COUNT, L"");
-       pHeaderAblumCountLabel->SetTextHorizontalAlignment(ALIGNMENT_LEFT);
-       pHeaderAblumCountLabel->SetTextConfig(FONT_SIZE, LABEL_TEXT_STYLE_NORMAL);
-       pHeaderAblumCountLabel->SetText(CommonUtil::SetSongsString(Songs));
-
-       __pContentInfoPanel->AddControl(*pHeaderThumbnailLabel);
-       __pContentInfoPanel->AddControl(*pHeaderAlbumNameLabel);
-       __pContentInfoPanel->AddControl(*pHeaderArtistNameLabel);
-       __pContentInfoPanel->AddControl(*pHeaderAblumCountLabel);
-
-    AddControl(*__pContentInfoPanel);
-    __pContentInfoPanel->Invalidate(true);
-
-    AppLogDebug("InitializeGenericContentInfoPanel - End");
-    AppLogDebug("End");
-       return r;
-}
-
-result
-ContentListForm::PlaylistCreateTableViewItem(Tizen::Ui::Container& parent,
-                                                    const ContentInformationStruct& contentInfoStruct)
-{
-       AppLogDebug("Start");
-       result r = E_SUCCESS;
 
-       Label* pSongThumbnailBGLabel = new (std::nothrow) Label();
-       pSongThumbnailBGLabel->Construct(Rectangle(X_GAP_THUMBNAIL - 1, Y_GAP_THUMBNAIL - 1, W_THUMBNAIL + 1, W_THUMBNAIL + 1), L"");
-
-       Label* pSongThumbnailLabel = new (std::nothrow) Label();
-       pSongThumbnailLabel->Construct(Rectangle(X_GAP_THUMBNAIL, Y_GAP_THUMBNAIL, W_THUMBNAIL ,H_THUMBNAIL), L"");
-       pSongThumbnailLabel->SetBackgroundBitmap(*contentInfoStruct.pThumbnail);
-
-       int X_Gap   = W_THUMBNAIL + (X_GAP_THUMBNAIL * 2);
-       int W_Label = W_CLIENT_AREA - X_Gap;
-
-       int W_SONG_TIME     = 160;
-       int Y_GAP_LABEL     =  10;
-
-       Label* pSongTitleLabel = new (std::nothrow) Label();
-       pSongTitleLabel->Construct(Rectangle(X_Gap,Y_GAP_LABEL, W_Label - W_SONG_TIME, (ITEM_HEIGHT - (Y_GAP_LABEL * 2)) / 2), L"");
-       pSongTitleLabel->SetTextColor(COLOR_MAIN_TEXT);
-       pSongTitleLabel->SetTextConfig(MAIN_TEXT_SIZE, LABEL_TEXT_STYLE_NORMAL);
-       pSongTitleLabel->SetTextHorizontalAlignment(ALIGNMENT_LEFT);
-       pSongTitleLabel->SetText(contentInfoStruct.TitleName);
-
-       Label* pSongTimeLabel = new (std::nothrow) Label();
-       pSongTimeLabel->Construct(Rectangle(pSongTitleLabel->GetWidth() + X_Gap, pSongTitleLabel->GetY(), W_SONG_TIME, pSongTitleLabel->GetHeight()) , L"");
-       pSongTimeLabel->SetTextColor(COLOR_SUB_TEXT);
-       pSongTimeLabel->SetTextConfig(SUB_TEXT_SIZE, LABEL_TEXT_STYLE_NORMAL);
-       pSongTimeLabel->SetTextHorizontalAlignment(ALIGNMENT_CENTER);
-       pSongTimeLabel->SetText(CommonUtil::GetFormatDate(contentInfoStruct.Duration));
-
-       Label* pSongArtistLabel = new (std::nothrow) Label();
-       pSongArtistLabel->Construct(Rectangle(X_Gap, pSongTimeLabel->GetHeight() + Y_GAP_LABEL, W_Label, pSongTitleLabel->GetHeight()), L"");
-       pSongArtistLabel->SetTextColor(COLOR_SUB_TEXT);
-       pSongArtistLabel->SetTextConfig(SUB_TEXT_SIZE, LABEL_TEXT_STYLE_NORMAL);
-       pSongArtistLabel->SetTextHorizontalAlignment(ALIGNMENT_LEFT);
-       pSongArtistLabel->SetText(contentInfoStruct.ArtistName);
-
-       parent.AddControl(*pSongThumbnailBGLabel);
-       parent.AddControl(*pSongThumbnailLabel);
-       parent.AddControl(*pSongTitleLabel);
-       parent.AddControl(*pSongTimeLabel);
-       parent.AddControl(*pSongArtistLabel);
-       AppLogDebug("End");
-       return r;
-}
-
-result
-ContentListForm::AlbumCreateTableViewItem(Tizen::Ui::Container& parent,
-                                                                             const ContentInformationStruct& contentInfoStruct)
-{
-       AppLogDebug("Start");
-       //AppLogDebug("CreateTableViewItem");
-
-       result r = E_SUCCESS;
-
-       Label* pAlbumName = new (std::nothrow) Label();
-       pAlbumName->Construct(RECT_ALBUM_NAME, L"");
-       pAlbumName->SetTextConfig(FONT_SIZE, LABEL_TEXT_STYLE_NORMAL);
-       pAlbumName->SetTextHorizontalAlignment(ALIGNMENT_LEFT);
-       pAlbumName->SetText(contentInfoStruct.TitleName);
-
-       Label* pAlbumTime = new (std::nothrow) Label();
-       pAlbumTime->Construct(RECT_ALBUM_TIME, L"");
-       pAlbumTime->SetTextConfig(FONT_SIZE, LABEL_TEXT_STYLE_NORMAL);
-       pAlbumTime->SetTextHorizontalAlignment(ALIGNMENT_RIGHT);
-       pAlbumTime->SetText(CommonUtil::GetFormatDate(contentInfoStruct.Duration));
-
-       parent.AddControl(*pAlbumName);
-       parent.AddControl(*pAlbumTime);
-       AppLogDebug("End");
-       return r;
-}
-
-result
-ContentListForm::GenreCreateTableViewItem(Tizen::Ui::Container& parent,
-                                                                             const ContentInformationStruct& contentInfoStruct)
-{
-       AppLogDebug("Start");
-       //AppLogDebug("CreateTableViewItem");
-
-       result r = E_SUCCESS;
-
-       Label* pThumbnailLabel = new (std::nothrow) Label();
-       pThumbnailLabel->Construct(RECT_GENRE_ITEM_THUMBNAIL, L"");
-       pThumbnailLabel->SetTextConfig(FONT_SIZE, LABEL_TEXT_STYLE_NORMAL);
-       pThumbnailLabel->SetBackgroundBitmap(*contentInfoStruct.pThumbnail);
-
-       Label* pTitleLabel = new (std::nothrow) Label();
-       pTitleLabel->Construct(RECT_GENRE_ITEM_TITLE_NAME, L"");
-       pTitleLabel->SetTextConfig(FONT_SIZE, LABEL_TEXT_STYLE_NORMAL);
-       pTitleLabel->SetTextHorizontalAlignment(ALIGNMENT_LEFT);
-       pTitleLabel->SetText(contentInfoStruct.TitleName);
-
-       Label* pArtistNameLabel = new (std::nothrow) Label();
-       pArtistNameLabel->Construct(RECT_GENRE_ITEM_ARTIST_NAME, L"");
-       pArtistNameLabel->SetTextConfig(FONT_SIZE, LABEL_TEXT_STYLE_NORMAL);
-       pArtistNameLabel->SetTextHorizontalAlignment(ALIGNMENT_LEFT);
-       pArtistNameLabel->SetText(contentInfoStruct.ArtistName);
-
-       Label* pTimeLabel = new (std::nothrow) Label();
-       pTimeLabel->Construct(RECT_GENRE_ITEM_TIME, L"");
-       pTimeLabel->SetTextConfig(FONT_SIZE, LABEL_TEXT_STYLE_NORMAL);
-       pTimeLabel->SetTextHorizontalAlignment(ALIGNMENT_RIGHT);
-       pTimeLabel->SetText(CommonUtil::GetFormatDate(contentInfoStruct.Duration));
-
-       parent.AddControl(*pThumbnailLabel);
-       parent.AddControl(*pTitleLabel);
-       parent.AddControl(*pArtistNameLabel);
-       parent.AddControl(*pTimeLabel);
-       AppLogDebug("End");
-       return r;
-}
-
-result
-ContentListForm::ComposersCreateTableViewItem(Tizen::Ui::Container& parent,
-                                                                                 const ContentInformationStruct& contentInfoStruct)
-{
-       AppLogDebug("Start");
-       //AppLogDebug("CreateTableViewItem");
-
-       result r = E_SUCCESS;
-
-       Label* pThumbnailLabel = new (std::nothrow) Label();
-       pThumbnailLabel->Construct(RECT_GENRE_ITEM_THUMBNAIL, L"");
-       pThumbnailLabel->SetTextConfig(FONT_SIZE, LABEL_TEXT_STYLE_NORMAL);
-       pThumbnailLabel->SetBackgroundBitmap(*contentInfoStruct.pThumbnail);
-
-       Label* pTitleLabel = new (std::nothrow) Label();
-       pTitleLabel->Construct(RECT_GENRE_ITEM_TITLE_NAME, L"");
-       pTitleLabel->SetTextConfig(FONT_SIZE, LABEL_TEXT_STYLE_NORMAL);
-       pTitleLabel->SetTextHorizontalAlignment(ALIGNMENT_LEFT);
-       pTitleLabel->SetText(contentInfoStruct.TitleName);
-
-       Label* pArtistNameLabel = new (std::nothrow) Label();
-       pArtistNameLabel->Construct(RECT_GENRE_ITEM_ARTIST_NAME, L"");
-       pArtistNameLabel->SetTextConfig(FONT_SIZE, LABEL_TEXT_STYLE_NORMAL);
-       pArtistNameLabel->SetTextHorizontalAlignment(ALIGNMENT_LEFT);
-       pArtistNameLabel->SetText(contentInfoStruct.ArtistName);
-
-       Label* pTimeLabel = new (std::nothrow) Label();
-       pTimeLabel->Construct(RECT_GENRE_ITEM_TIME, L"");
-       pTimeLabel->SetTextConfig(FONT_SIZE, LABEL_TEXT_STYLE_NORMAL);
-       pTimeLabel->SetTextHorizontalAlignment(ALIGNMENT_RIGHT);
-       pTimeLabel->SetText(CommonUtil::GetFormatDate(contentInfoStruct.Duration));
-
-       parent.AddControl(*pThumbnailLabel);
-       parent.AddControl(*pTitleLabel);
-       parent.AddControl(*pArtistNameLabel);
-       parent.AddControl(*pTimeLabel);
-       AppLogDebug("End");
-       return r;
-}
-
-result
-ContentListForm::FolderCreateTableViewItem(Tizen::Ui::Container& parent,
-                                                                              const ContentInformationStruct& contentInfoStruct)
-{
-       AppLogDebug("Start");
-       //AppLogDebug("CreateTableViewItem");
-
-       result r = E_SUCCESS;
-
-       String filePath = contentInfoStruct.ContentFilePath;
-
-       int indexOf = -1;
-       String tempPath = contentInfoStruct.ContentFilePath;
-       String fileName = null;
-       tempPath.LastIndexOf(L"/", tempPath.GetLength() - 1,  indexOf);
-       tempPath.SubString(indexOf + 1, fileName);
-
-       Label* pFolderIconLabel = new (std::nothrow) Label();
-       pFolderIconLabel->Construct(RECT_FOLDER_ICON_THUMBNAIL, L"");
-       pFolderIconLabel->SetTextConfig(FONT_SIZE, LABEL_TEXT_STYLE_NORMAL);
-       if (filePath.StartsWith(STORAGE_SDCARD_PATH, INIT_VALUE) == true)
-       {
-               pFolderIconLabel->SetBackgroundBitmap(*ResourceManager::GetBitmapN(L"T02_memory card_02.png"));
-       }
-       else if (filePath.StartsWith(STORAGE_PHONE_PATH, INIT_VALUE) == true)
-       {
-               pFolderIconLabel->SetBackgroundBitmap(*ResourceManager::GetBitmapN(L"T02_phone_02.png"));
-       }
-       else if (filePath.StartsWith(STORAGE_EXTERNAL_PATH, INIT_VALUE) == true)
-       {
-               pFolderIconLabel->SetBackgroundBitmap(*ResourceManager::GetBitmapN(L"T02_external_storage_02.png"));
-       }
-       else
-       {
-               pFolderIconLabel->SetBackgroundBitmap(*contentInfoStruct.pThumbnail);
-       }
-
-       Label* pThumbnailLabel = new (std::nothrow) Label();
-       pThumbnailLabel->Construct(RECT_GENRE_ITEM_THUMBNAIL, L"");
-       pThumbnailLabel->SetTextConfig(FONT_SIZE, LABEL_TEXT_STYLE_NORMAL);
-       pThumbnailLabel->SetBackgroundBitmap(*contentInfoStruct.pThumbnail);
-
-       Label* pTitleLabel = new (std::nothrow) Label();
-       pTitleLabel->Construct(RECT_GENRE_ITEM_TITLE_NAME, L"");
-       pTitleLabel->SetTextConfig(FONT_SIZE, LABEL_TEXT_STYLE_NORMAL);
-       pTitleLabel->SetTextHorizontalAlignment(ALIGNMENT_LEFT);
-       pTitleLabel->SetText(fileName);
-
-       Label* pArtistNameLabel = new (std::nothrow) Label();
-       pArtistNameLabel->Construct(RECT_GENRE_ITEM_ARTIST_NAME, L"");
-       pArtistNameLabel->SetTextConfig(FONT_SIZE, LABEL_TEXT_STYLE_NORMAL);
-       pArtistNameLabel->SetTextHorizontalAlignment(ALIGNMENT_LEFT);
-       pArtistNameLabel->SetText(contentInfoStruct.ArtistName);
-
-       Label* pTimeLabel = new (std::nothrow) Label();
-       pTimeLabel->Construct(RECT_GENRE_ITEM_TIME, L"");
-       pTimeLabel->SetTextConfig(FONT_SIZE, LABEL_TEXT_STYLE_NORMAL);
-       pTimeLabel->SetTextHorizontalAlignment(ALIGNMENT_RIGHT);
-       pTimeLabel->SetText(CommonUtil::GetFormatDate(contentInfoStruct.Duration));
-
-       parent.AddControl(*pThumbnailLabel);
-       parent.AddControl(*pFolderIconLabel);
-       parent.AddControl(*pTitleLabel);
-       parent.AddControl(*pArtistNameLabel);
-       parent.AddControl(*pTimeLabel);
-       AppLogDebug("End");
-       return r;
-}
-
-result
-ContentListForm::YearCreateTableViewItem(Tizen::Ui::Container& parent,
-                                                                            const ContentInformationStruct& contentInfoStruct)
-{
-       AppLogDebug("Start");
-       //AppLogDebug("CreateTableViewItem");
-
-       result r = E_SUCCESS;
-
-       Label* pThumbnailLabel = new (std::nothrow) Label();
-       pThumbnailLabel->Construct(RECT_GENRE_ITEM_THUMBNAIL, L"");
-       pThumbnailLabel->SetTextConfig(FONT_SIZE, LABEL_TEXT_STYLE_NORMAL);
-       pThumbnailLabel->SetBackgroundBitmap(*contentInfoStruct.pThumbnail);
-
-       Label* pTitleLabel = new (std::nothrow) Label();
-       pTitleLabel->Construct(RECT_GENRE_ITEM_TITLE_NAME, L"");
-       pTitleLabel->SetTextConfig(FONT_SIZE, LABEL_TEXT_STYLE_NORMAL);
-       pTitleLabel->SetTextHorizontalAlignment(ALIGNMENT_LEFT);
-       pTitleLabel->SetText(contentInfoStruct.TitleName);
-
-       Label* pArtistNameLabel = new (std::nothrow) Label();
-       pArtistNameLabel->Construct(RECT_GENRE_ITEM_ARTIST_NAME, L"");
-       pArtistNameLabel->SetTextConfig(FONT_SIZE, LABEL_TEXT_STYLE_NORMAL);
-       pArtistNameLabel->SetTextHorizontalAlignment(ALIGNMENT_LEFT);
-       pArtistNameLabel->SetText(contentInfoStruct.ArtistName);
-
-       Label* pTimeLabel = new (std::nothrow) Label();
-       pTimeLabel->Construct(RECT_GENRE_ITEM_TIME, L"");
-       pTimeLabel->SetTextConfig(FONT_SIZE, LABEL_TEXT_STYLE_NORMAL);
-       pTimeLabel->SetTextHorizontalAlignment(ALIGNMENT_RIGHT);
-       pTimeLabel->SetText(CommonUtil::GetFormatDate(contentInfoStruct.Duration));
-
-       parent.AddControl(*pThumbnailLabel);
-       parent.AddControl(*pTitleLabel);
-       parent.AddControl(*pArtistNameLabel);
-       parent.AddControl(*pTimeLabel);
-       AppLogDebug("End");
-       return r;
+       __strHeaderName = CommonUtil::GetContentInfo(contentInfoStruct, *__pStrSceneId);
+       pHeader->SetTitleText(__strHeaderName);
+       pHeader->Invalidate(true);
+       AppLogDebug("EXIT");
+       return E_SUCCESS;
 }
 
-result
-ContentListForm::ArtistsCreateTableViewItem(Tizen::Ui::Container& parent,
-                                                                           const ContentInformationStruct& contentInfoStruct)
+void
+ContentListForm::SetTitleText(const Tizen::Base::String& title)
 {
-       AppLogDebug("Start");
-       //AppLogDebug("CreateTableViewItem");
-
-       result r = E_SUCCESS;
-
-       Label* pAlbumName = new (std::nothrow) Label();
-       pAlbumName->Construct(RECT_ALBUM_NAME, L"");
-       pAlbumName->SetTextConfig(FONT_SIZE, LABEL_TEXT_STYLE_NORMAL);
-       pAlbumName->SetTextHorizontalAlignment(ALIGNMENT_LEFT);
-       pAlbumName->SetText(contentInfoStruct.TitleName);
+       AppLogDebug("ENTER");
+       Header* pHeader = GetHeader();
 
-       Label* pAlbumTime = new (std::nothrow) Label();
-       pAlbumTime->Construct(RECT_ALBUM_TIME, L"");
-       pAlbumTime->SetTextConfig(FONT_SIZE, LABEL_TEXT_STYLE_NORMAL);
-       pAlbumTime->SetTextHorizontalAlignment(ALIGNMENT_RIGHT);
-       pAlbumTime->SetText(CommonUtil::GetFormatDate(contentInfoStruct.Duration));
+       pHeader->RemoveAllButtons();
+       pHeader->RemoveAllItems();
 
-       parent.AddControl(*pAlbumName);
-       parent.AddControl(*pAlbumTime);
-       AppLogDebug("End");
-       return r;
+       pHeader->SetTitleText(title);
+       pHeader->Invalidate(true);
+       AppLogDebug("EXIT");
 }
 
 result
 ContentListForm::CreateTableViewContextItem(Tizen::Ui::Controls::TableViewContextItem& parent)
 {
-       AppLogDebug("Start");
+       AppLogDebug("ENTER");
        result r = E_SUCCESS;
 
        AppResource* pAppResource = Application::GetInstance()->GetAppResource();
@@ -1296,7 +380,7 @@ ContentListForm::CreateTableViewContextItem(Tizen::Ui::Controls::TableViewContex
 
        String buttonName = null;
 
-       int ButtonWidth  = (parent.GetWidth() - Y_GAP_TABLE_VIEW_CONTENT_ITEM ) / 4;
+       int ButtonWidth = (parent.GetWidth() - Y_GAP_TABLE_VIEW_CONTENT_ITEM ) / 4;
        int ButtonHeight = parent.GetHeight() - (Y_GAP_TABLE_VIEW_CONTENT_ITEM * 2);
 
        Button* pShareButton = new (std::nothrow) Button();
@@ -1339,78 +423,50 @@ ContentListForm::CreateTableViewContextItem(Tizen::Ui::Controls::TableViewContex
        parent.AddControl(*pAddToPlaylistButton);
        parent.AddControl(*pDeleteButton);
 
-       AppLogDebug("End");
+       AppLogDebug("EXIT");
        return r;
 }
 
-
-Tizen::Base::Collection::ArrayList*
-ContentListForm::GetSearchResultContentList(int itemIndex)
-{
-       AppLogDebug("Start");
-       ArrayList* pTempList = new (std::nothrow)ArrayList();
-       if (pTempList == null)
-       {
-               AppLogDebug("End");
-               return null;
-       }
-       pTempList->Construct();
-
-       pTempList->Add(*(new String(MUSIC)));
-       pTempList->Add(*(new Integer(itemIndex)));
-       pTempList->Add(*(__pPresentationModel->GetSearchResultContentList()));
-       pTempList->Add(*(new (std::nothrow)String(*__pStrSceneId)));
-       AppLogDebug("End");
-       return pTempList;
-}
-
-Tizen::Base::Collection::ArrayList*
-ContentListForm::GetAudioContentInfoContentList(int itemIndex)
+void
+ContentListForm::OnScrollPositionChanged (Tizen::Ui::Control& source, int scrollPos)
 {
-       AppLogDebug("Start");
-       ArrayList* pTempList = new (std::nothrow)ArrayList();
-       if (pTempList == null)
-       {
-               AppLogDebug("End");
-               return null;
-       }
-       pTempList->Construct();
-
-       pTempList->Add(*(new String(MUSIC)));
-       pTempList->Add(*(new Integer(itemIndex)));
-       pTempList->Add(*(__pPresentationModel->GetAudioContentInfoContentList()));
-       pTempList->Add(*(new (std::nothrow)String(*__pStrSceneId)));
-       AppLogDebug("End");
-       return pTempList;
+       AppLogDebug("ENTER");
+       __scrolledDistance = scrollPos;
+       AppLogDebug("EXIT");
 }
 
 void
-ContentListForm::SetHeaderTitleChanged(const Tizen::Base::String& title)
+ContentListForm::OnScrollEndReached (Tizen::Ui::Control& source, Tizen::Ui::Controls::ScrollEndEvent type)
 {
-       AppLogDebug("Start");
-       //AppLogDebug("SetHeaderTitleChanged");
-       Header* pHeader = GetHeader();
-
-       pHeader->RemoveAllButtons();
-       pHeader->RemoveAllItems();
-
-       pHeader->SetTitleText(title);
-       AppLogDebug("End");
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 
 void
-ContentListForm::OnScrollEndReached (Tizen::Ui::Control &source, Tizen::Ui::Controls::ScrollEndEvent type)
+ContentListForm::OnScrollStopped (Tizen::Ui::Control& source)
 {
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 
 void
-ContentListForm::OnScrollPositionChanged (Tizen::Ui::Control &source, int scrollPos)
+ContentListForm::OnFormBackRequested(Tizen::Ui::Controls::Form& source)
 {
-       AppLogDebug( "scrollPos : %d", scrollPos);
-       __scrolledDistance = scrollPos;
+       AppLogDebug("ENTER");
+       SceneManager* pSceneManager = SceneManager::GetInstance();
+       AppAssert(pSceneManager);
+       pSceneManager->GoBackward(BackwardSceneTransition(), null);
+       AppLogDebug("EXIT");
 }
 
 void
-ContentListForm::OnScrollStopped (Tizen::Ui::Control &source)
+ContentListForm::OnUserEventReceivedN(RequestId requestId, Tizen::Base::Collection::IList* pArgs)
 {
-}
+       AppLogDebug("ENTER");
+       AppLogDebug("OnUserEventReceivedN %d", requestId);
+       if (requestId == ID_DESTORY_PLAY_LIST_PICKER_POPUP)
+       {
+               DestroyPlayListPickerPopup();
+       }
+       AppLogDebug("EXIT");
+}
\ No newline at end of file
diff --git a/src/MpContentListPresentationModel.cpp b/src/MpContentListPresentationModel.cpp
deleted file mode 100755 (executable)
index 85ef938..0000000
+++ /dev/null
@@ -1,544 +0,0 @@
-//
-// Copyright (c) 2012 Samsung Electronics Co., Ltd.
-//
-// Licensed under the Flora License, Version 1.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://floralicense.org/license/
-//
-// 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 "MpContentListPresentationModel.h"
-#include "MpPlaylistDB.h"
-
-using namespace Tizen::Base;
-using namespace Tizen::Content;
-using namespace Tizen::Base::Collection;
-using namespace Tizen::Graphics;
-using namespace Tizen::Ui::Controls;
-using namespace Tizen::Social;
-
-ContentListPresentationModel::ContentListPresentationModel(void)
-: __pContentList(null)
-, __pQueryName(null)
-, __pSceneId(null)
-, __contentType(-1)
-{
-}
-
-ContentListPresentationModel::~ContentListPresentationModel(void)
-{
-       if(__pContentList != null)
-       {
-               __pContentList->RemoveAll(true);
-               delete __pContentList;
-               __pContentList = null;
-       }
-
-       delete __pQueryName;
-       __pQueryName = null;
-
-       delete __pSceneId;
-       __pSceneId = null;
-}
-
-result
-ContentListPresentationModel::Construct(const Tizen::Base::String& ContentName,
-                                        const Tizen::Base::String& SceneId,
-                                        const int contentType)
-{
-       AppLogDebug("1");
-       __pQueryName = new String(ContentName);
-       __pSceneId   = new String(SceneId);
-       __contentType = contentType;
-
-       if (__pSceneId->Equals(IDSCN_FOLDER_LIST, true))
-       {
-               ContentDirectory contentDirectory;
-               result r = contentDirectory.Construct(CONTENT_TYPE_AUDIO);
-               if (IsFailed(r))
-               {
-                       return E_INIT_FAILED;
-               }
-               __pContentList = contentDirectory.GetContentDirectoryItemListN(*__pQueryName, SEARCH_PAGE_NO, SEARCH_COUNT_PER_PAGE, STRING_SORT_TITLE, SORT_ORDER_ASCENDING);
-
-               if (IsFailed(GetLastResult()))
-               {
-                       //AppLogDebug("ContentDirectory GetContentDirectoryItemCount Error");
-                       __pContentList = null;
-                       return E_INIT_FAILED;
-               }
-       }
-       else if (__pSceneId->Equals(IDSCN_PLAYLIST_LIST, true))
-       {
-               AppLogDebug("2");
-               switch(__contentType)
-               {
-               case MOST_PLAYED_CONTENT:
-               case RECENTLY_PLAYED_CONTENT:
-               {
-                       PlaylistDB* playlistDB = new (std::nothrow) PlaylistDB();
-                       playlistDB->CreatePlaylistDatabase();
-                       Tizen::Base::Collection::ArrayList* pTempList = new (std::nothrow)ArrayList();
-                       pTempList->Construct();
-
-                       Tizen::Io::DbEnumerator* pDbEnumerator = playlistDB->SearchN(__contentType);
-                       Tizen::Base::String contentId = null;
-
-                       Tizen::Base::Collection::ArrayList* pContentIdList = new (std::nothrow)ArrayList();
-                       pContentIdList->Construct();
-
-                       if (pDbEnumerator != null)
-                       {
-                               while (pDbEnumerator->MoveNext()== E_SUCCESS)
-                               {
-                                       pDbEnumerator->GetStringAt(0, contentId);
-
-                                       Tizen::Content::AudioContentInfo* pAudioContentInfo = null;
-                                       pAudioContentInfo = CommonUtil::GetPlaylistAudioContentInfo(contentId);
-                                       if (pAudioContentInfo != null)
-                                       {
-                                               pTempList->Add(*pAudioContentInfo);
-                                       }
-                                       else
-                                       {
-                                               pContentIdList->Add(*new String(contentId));
-                                       }
-                               }
-                       }
-
-                       if (pTempList != null)
-                       {
-                               __pContentList = pTempList;
-                       }
-
-                       delete pDbEnumerator;
-                       pDbEnumerator = null;
-
-                       if (pContentIdList != null)
-                       {
-                               for (int i = 0; i < pContentIdList->GetCount(); i++)
-                               {
-                                       playlistDB->Delete(*static_cast<String*>(pContentIdList->GetAt(i)));
-                               }
-
-                       }
-
-                       delete pContentIdList;
-                       pContentIdList = null;
-
-                       break;
-               }
-               case RECENTLY_ADDED_CONTENT:
-               {
-                       DateTime playTime;
-                       Tizen::System::SystemTime::GetCurrentTime(Tizen::System::TIME_MODE_STANDARD, playTime);
-
-                       String whereQuery = L"DateTime<'";
-                       whereQuery.Append(playTime.ToString());
-                       whereQuery.Append("'");
-
-                       __pContentList = CommonUtil::SearchContentList(whereQuery, L"DateTime", SORT_ORDER_DESCENDING);
-                       break;
-               }
-               case USER_CONTENT:
-               {
-                       AppLogDebug("3");
-                       if (__pQueryName->Equals(L"", true) != true)
-                       {
-                               PlayList* pPlaylist = PlayListManager::GetInstance()->GetPlayListN(*__pQueryName);
-                               AppLogDebug("%ls", pPlaylist->GetPlayListName().GetPointer());
-                               __pContentList = pPlaylist->GetContentInfoListN();
-                               delete pPlaylist;
-                               pPlaylist = null;
-                       }
-                       else
-                       {
-                               __pContentList = null;
-                       }
-                       break;
-               }
-               default:
-               {
-                       break;
-               }
-               }//end of switch
-       }
-       else
-       {
-               __pContentList = CommonUtil::SearchContentList(*__pQueryName, STRING_SORT_TITLE);
-
-       }
-
-       return E_SUCCESS;
-}
-
-int
-ContentListPresentationModel::GetTotalContentCount(void)
-{
-       AppLogDebug("Start");
-       if (__pContentList == null)
-       {
-               return 0;
-       }
-       return __pContentList->GetCount();
-}
-
-ContentInformationStruct*
-ContentListPresentationModel::GetContentInfoN(int index)
-{
-       ContentInformationStruct* pContentInfoStruct = null;
-       ContentSearchResult* pResult = static_cast<ContentSearchResult*>(__pContentList->GetAt(index));
-
-       if(pResult != null && pResult->GetContentType() == CONTENT_TYPE_AUDIO)
-       {
-               AudioContentInfo* pAudioContentInfo = static_cast<AudioContentInfo*>(pResult->GetContentInfo());
-               return pContentInfoStruct = CommonUtil::GetContentInformationStructN(*pAudioContentInfo);
-       }
-
-       return pContentInfoStruct;
-}
-
-ContentInformationStruct*
-ContentListPresentationModel::GetFolderContentInfoN(int index)
-{
-       ContentInformationStruct* pContentInfoStruct = null;
-       ContentInfo* pContentInfo = static_cast<ContentInfo*>(__pContentList->GetAt(index));
-
-       if (pContentInfo != null && pContentInfo->GetContentType() == CONTENT_TYPE_AUDIO)
-       {
-               AudioContentInfo* pAudioContentInfo = static_cast<AudioContentInfo*>(pContentInfo);
-               pContentInfoStruct = CommonUtil::GetContentInformationStructN(*pAudioContentInfo);
-       }
-
-       return pContentInfoStruct;
-}
-
-ContentInformationStruct*
-ContentListPresentationModel::GetPlaylistContentInfoN(int index)
-{
-       AppLogDebug("Start");
-       if (__pContentList == null)
-       {
-               return null;
-       }
-
-       ContentInformationStruct* pContentInfoStruct = null;
-       switch(__contentType)
-       {
-       case MOST_PLAYED_CONTENT:
-       case RECENTLY_PLAYED_CONTENT:
-       {
-               AudioContentInfo* pAudioContentInfo;
-               pAudioContentInfo = static_cast<AudioContentInfo*>(__pContentList->GetAt(index));
-               if (pAudioContentInfo == null)
-               {
-                       return pContentInfoStruct;
-               }
-               pContentInfoStruct = CommonUtil::GetContentInformationStructN(*pAudioContentInfo);
-               break;
-       }
-       case RECENTLY_ADDED_CONTENT:
-       {
-               ContentSearchResult* pResult = static_cast<ContentSearchResult*>(__pContentList->GetAt(index));
-               if(pResult != null && pResult->GetContentType() == CONTENT_TYPE_AUDIO)
-               {
-                       AudioContentInfo* pAudioContentInfo = static_cast<AudioContentInfo*>(pResult->GetContentInfo());
-                       pContentInfoStruct = CommonUtil::GetContentInformationStructN(*pAudioContentInfo);
-               }
-               break;
-       }
-       case USER_CONTENT:
-       {
-               ContentInfo* pContentInfo = static_cast<ContentInfo*>(__pContentList->GetAt(index));
-               if (pContentInfo != null && pContentInfo->GetContentType() == CONTENT_TYPE_AUDIO)
-               {
-                       AudioContentInfo* pAudioContentInfo = static_cast<AudioContentInfo*>(pContentInfo);
-                       pContentInfoStruct = CommonUtil::GetContentInformationStructN(*pAudioContentInfo);
-               }
-               break;
-       }
-       default:
-       {
-               break;
-       }
-       }//end of switch
-
-       AppLogDebug("End");
-       return pContentInfoStruct;
-}
-
-Tizen::Base::Collection::ArrayList*
-ContentListPresentationModel::GetSearchResultContentList(void)
-{
-       AppLogDebug("Start");
-       if (__pContentList == null)
-       {
-               AppLogDebug("End");
-               return null;
-       }
-
-       String StrTemp = null;
-       ContentSearchResult* pResult = null;
-       ArrayList* pTempPath = new ArrayList();
-       pTempPath->Construct();
-
-       for(int iCount = INIT_VALUE; iCount < __pContentList->GetCount(); iCount++)
-       {
-               pResult = static_cast<ContentSearchResult*>(__pContentList->GetAt(iCount));
-               if(pResult != null)
-               {
-                       StrTemp = pResult->GetContentInfo()->GetContentPath();
-                       pTempPath->Add(*(new String(StrTemp)));
-               }
-       }
-       AppLogDebug("End");
-    return pTempPath;
-}
-
-Tizen::Base::Collection::ArrayList*
-ContentListPresentationModel::GetPlaylistContentInfoContentList(void)
-{
-       AppLogDebug("Start");
-       if (__pContentList == null)
-       {
-               AppLogDebug("End");
-               return null;
-       }
-
-       String StrTemp = null;
-       ArrayList* pTempPath = new ArrayList();
-       pTempPath->Construct();
-
-       ContentInfo* pContentInfo;
-
-       for(int iCount = INIT_VALUE; iCount < __pContentList->GetCount(); iCount++)
-       {
-               pContentInfo = static_cast<ContentInfo*>(__pContentList->GetAt(iCount));
-               if (pContentInfo != null && pContentInfo->GetContentType() == CONTENT_TYPE_AUDIO)
-               {
-                       AudioContentInfo* pAudioContentInfo = static_cast<AudioContentInfo*>(pContentInfo);
-                       StrTemp = pAudioContentInfo->GetContentPath();
-                       AppLogDebug("%ls", StrTemp.GetPointer());
-                       pTempPath->Add(*(new String(StrTemp)));
-               }
-       }
-       AppLogDebug("End : %d", __pContentList->GetCount());
-    return pTempPath;
-}
-
-Tizen::Base::Collection::ArrayList*
-ContentListPresentationModel::GetAudioContentInfoContentList(void)
-{
-       AppLogDebug("Start");
-       if (__pContentList == null)
-       {
-               AppLogDebug("End");
-               return null;
-       }
-
-       String StrTemp = null;
-       ArrayList* pTempPath = new ArrayList();
-       pTempPath->Construct();
-
-       AudioContentInfo* pAudioContentInfo;
-
-       for(int iCount = INIT_VALUE; iCount < __pContentList->GetCount(); iCount++)
-       {
-               pAudioContentInfo = static_cast<AudioContentInfo*>(__pContentList->GetAt(iCount));
-               if(pAudioContentInfo != null)
-               {
-                       StrTemp = pAudioContentInfo->GetContentPath();
-                       pTempPath->Add(*(new String(StrTemp)));
-               }
-       }
-       AppLogDebug("End");
-    return pTempPath;
-}
-
-void
-ContentListPresentationModel::RefreshContent(bool isPlaylist)
-{
-       if (isPlaylist == false)
-       {
-               if (__pContentList != null)
-               {
-                       __pContentList->RemoveAll(true);
-                       if (__pSceneId->Equals(IDSCN_FOLDER_LIST, true))
-                       {
-                               ContentDirectory contentDirectory;
-                               result r = contentDirectory.Construct(CONTENT_TYPE_AUDIO);
-                               __pContentList = contentDirectory.GetContentDirectoryItemListN(*__pQueryName, SEARCH_PAGE_NO, SEARCH_COUNT_PER_PAGE, STRING_SORT_TITLE, SORT_ORDER_ASCENDING);
-                       }
-                       else
-                       {
-                               __pContentList = CommonUtil::SearchContentList(*__pQueryName, STRING_SORT_TITLE);
-                       }
-                       //AppLogDebug("AllListPresentationModel : %d", __pContentList->GetCount());
-               }
-       }
-       else
-       {
-               if (__pContentList != null)
-               {
-                       if (__contentType == MOST_PLAYED_CONTENT || __contentType == RECENTLY_PLAYED_CONTENT)
-                       {
-                               __pContentList->RemoveAll(true);
-                               PlaylistDB* playlistDB = new (std::nothrow) PlaylistDB();
-                               Tizen::Base::Collection::ArrayList* pTempList = new (std::nothrow)ArrayList();
-                               pTempList->Construct();
-                               Tizen::Io::DbEnumerator* pDbEnumerator = playlistDB->SearchN(__contentType);
-                               Tizen::Base::String contentId = null;
-
-                               if (pDbEnumerator != null)
-                               {
-                                       while (pDbEnumerator->MoveNext()== E_SUCCESS)
-                                       {
-                                               pDbEnumerator->GetStringAt(0, contentId);
-
-                                               Tizen::Content::AudioContentInfo* pAudioContentInfo = null;
-                                               pAudioContentInfo = CommonUtil::GetPlaylistAudioContentInfo(contentId);
-                                               pTempList->Add(*pAudioContentInfo);
-                                       }
-                               }
-                               __pContentList = pTempList;
-
-                               delete pDbEnumerator;
-                               pDbEnumerator = null;
-                       }
-                       else if (__contentType == RECENTLY_ADDED_CONTENT)
-                       {
-                               DateTime playTime;
-                               Tizen::System::SystemTime::GetCurrentTime(Tizen::System::TIME_MODE_STANDARD, playTime);
-
-                               String whereQuery = L"DateTime<'";
-                               whereQuery.Append(playTime.ToString());
-                               whereQuery.Append("'");
-                               __pContentList = CommonUtil::SearchContentList(whereQuery, L"DateTime", SORT_ORDER_DESCENDING);
-                       }
-                       else if (__contentType == USER_CONTENT)
-                       {
-                               __pContentList->RemoveAll(true);
-                               PlayList* pPlaylist = PlayListManager::GetInstance()->GetPlayListN(*__pQueryName);
-
-                               if (pPlaylist)
-                               {
-                               __pContentList = pPlaylist->GetContentInfoListN();
-                               }
-                               delete pPlaylist;
-                               pPlaylist = null;
-                       }
-                       else
-                       {
-
-                       }
-               }
-       }
-}
-
-result
-ContentListPresentationModel::RemoveContent(int index, int contentType)
-{
-       AudioContentInfo* pAudioContentInfo;
-       if (contentType == MOST_PLAYED_CONTENT
-        || contentType == RECENTLY_PLAYED_CONTENT
-        || contentType == USER_CONTENT
-        || contentType == NORMAL_CONTENT)
-       {
-               ContentInfo* pContentInfo = static_cast<ContentInfo*>(__pContentList->GetAt(index));
-               TryReturn(pContentInfo != null, E_INVALID_ARG, "index is invalid value.");
-               TryReturn(pContentInfo->GetContentType() == CONTENT_TYPE_AUDIO, E_INVALID_ARG, "Invalid content type.");
-               pAudioContentInfo = static_cast<AudioContentInfo*>(pContentInfo);
-       }
-       else
-       {
-               ContentSearchResult* pResult = static_cast<ContentSearchResult*>(__pContentList->GetAt(index));
-               TryReturn(pResult != null, E_INVALID_ARG, "index is invalid value");
-               pAudioContentInfo = static_cast<AudioContentInfo*>(pResult->GetContentInfo());
-       }
-
-
-       switch (contentType)
-       {
-       case MOST_PLAYED_CONTENT:
-       case RECENTLY_PLAYED_CONTENT:
-               {
-                       String contentId = pAudioContentInfo->GetContentId().ToString();
-                       PlaylistDB* playlistDB = new (std::nothrow) PlaylistDB();
-                       ArrayList* pTempList = new ArrayList();
-                       pTempList->Construct();
-
-                       pTempList = playlistDB->ReadValueN(contentId);
-                       int playCount = static_cast<Integer*>(pTempList->GetAt(0))->ToInt();
-                       String playTime = null;
-                       playTime.Append(*static_cast<String*>(pTempList->GetAt(1)));
-                       if (contentType == MOST_PLAYED_CONTENT)
-                       {
-                               playlistDB->Update(contentId, null, playTime);
-                       }
-                       else
-                       {
-                               String tempPlayTime = null;
-                               tempPlayTime.Append(IDS_BLANK);
-                               playlistDB->Update(contentId, playCount, tempPlayTime);
-                       }
-
-                       delete pTempList;
-                       pTempList = null;
-
-                       pTempList = playlistDB->ReadValueN(contentId);
-                       playCount = static_cast<Integer*>(pTempList->GetAt(0))->ToInt();
-                       playTime = null;
-                       playTime.Append(*static_cast<String*>(pTempList->GetAt(1)));
-
-                       if (playCount == 0 && playTime.Equals(IDS_BLANK, true))
-                       {
-                               playlistDB->Delete(contentId);
-                       }
-
-                       delete pTempList;
-                       pTempList = null;
-
-                       RefreshContent(true);
-               }
-               break;
-       case USER_CONTENT:
-               {
-                       PlayList* pPlaylist = PlayListManager::GetInstance()->GetPlayListN(*__pQueryName);
-                       pPlaylist->RemoveItem(pAudioContentInfo->GetContentId());
-
-                       RefreshContent(true);
-                       delete pPlaylist;
-                       pPlaylist = null;
-               break;
-               }
-       default:
-               {
-                       ContentManager manager;
-                       manager.Construct();
-                       manager.DeleteContent(pAudioContentInfo->GetContentId());
-
-                       __pContentList->RemoveAt(index);
-               }
-               break;
-       }
-       return E_SUCCESS;
-}
-
-result
-ContentListPresentationModel::SetCallRingtone(int index)
-{
-       if (__pSceneId->Equals(IDSCN_FOLDER_LIST, true))
-       {
-               ContentInfo* pContentInfo = static_cast<ContentInfo*>(__pContentList->GetAt(index));
-               return Tizen::System::SettingInfo::SetValue(CALL_RINGTONE_KEY, pContentInfo->GetContentPath());
-       }
-       ContentSearchResult* pResult = static_cast<ContentSearchResult*>(__pContentList->GetAt(index));
-       return Tizen::System::SettingInfo::SetValue(CALL_RINGTONE_KEY, pResult->GetContentInfo()->GetContentPath());
-}
diff --git a/src/MpFolderContentListForm.cpp b/src/MpFolderContentListForm.cpp
new file mode 100644 (file)
index 0000000..b478433
--- /dev/null
@@ -0,0 +1,956 @@
+//
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.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://floralicense.org/license/
+//
+// 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.
+//
+
+/**
+ * @file               MpFolderContentListForm.cpp
+ * @brief              This is the implementation file for FolderContentListForm class.
+ */
+
+#include <FSocial.h>
+#include "MpFolderContentListForm.h"
+#include "MpFolderListPresentationModel.h"
+#include "MpPlaylistPickerPopup.h"
+#include "MpSharePopup.h"
+#include "MpThumbnailInfo.h"
+
+using namespace Tizen::App;
+using namespace Tizen::Base;
+using namespace Tizen::Base::Collection;
+using namespace Tizen::Content;
+using namespace Tizen::Graphics;
+using namespace Tizen::Io;
+using namespace Tizen::Social;
+using namespace Tizen::System;
+using namespace Tizen::Ui;
+using namespace Tizen::Ui::Controls;
+using namespace Tizen::Ui::Scenes;
+
+static const Tizen::Graphics::Rectangle RECT_CONTENT_NAME (16, 16, 500, 88);
+static const Tizen::Graphics::Rectangle RECT_CONTENT_PLAY_TIME (516, 16, 188, 88);
+static const Tizen::Graphics::Rectangle RECT_FOLDER_ICON_THUMBNAIL (82, 74, 46, 46);
+static const Tizen::Graphics::Rectangle RECT_GENRE_ITEM_THUMBNAIL (16, 8, 112, 112);
+static const Tizen::Graphics::Rectangle RECT_GENRE_ITEM_TITLE_NAME (144, 8, 300, 66);
+static const Tizen::Graphics::Rectangle RECT_GENRE_ITEM_TIME (444, 8, 260, 66);
+static const Tizen::Graphics::Rectangle RECT_GENRE_ITEM_ARTIST_NAME (144, 66, 560, 46);
+
+static const int X_OFFSET_EDIT_STYLE_TABLE_VIEW = 96;
+static const int COUNT_MESSAGE_BOX_TIMEOUT = 3000;
+
+static const Tizen::Base::String STORAGE_PHONE_PATH = Environment::GetMediaPath() + L"Sounds/";
+static const Tizen::Base::String STORAGE_SDCARD_PATH = Environment::GetExternalStoragePath();
+static const Tizen::Base::String STORAGE_EXTERNAL_PATH = Environment::GetMediaPath();
+
+FolderContentListForm::FolderContentListForm(void)
+       : ContentListForm::ContentListForm()
+       , ThumbnailBase::ThumbnailBase()
+       , __pThumbnail(null)
+       , __pPresentationModel(null)
+{
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
+}
+
+FolderContentListForm::~FolderContentListForm(void)
+{
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
+}
+
+result
+FolderContentListForm::OnInitializing(void)
+{
+       AppLogDebug("ENTER");
+       CreateTableview();
+       CreateSelectAllCheckedButton();
+       CreateCheckedCountLabel();
+       CreateNoContentImage(L"IDS_MUSIC_HEADER_NO_SONGS");
+       __pContextItem = new (std::nothrow) TableViewContextItem();
+       __pContextItem->Construct(Dimension(GetClientAreaBounds().width, ITEM_HEIGHT));
+       CreateTableViewContextItem(*__pContextItem);
+       CreateDeletePopup();
+       AppLogDebug("EXIT");
+       return ThumbnailBase::Construct();
+}
+
+result
+FolderContentListForm::OnTerminating(void)
+{
+       AppLogDebug("ENTER");
+       __checkedItemCount = 0;
+       DestroyPlayListPickerPopup();
+
+       delete __pContextItem;
+       __pContextItem = null;
+
+       AppLogDebug("EXIT");
+       return E_SUCCESS;
+}
+
+void
+FolderContentListForm::OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previousSceneId,
+                                       const Tizen::Ui::Scenes::SceneId& currentSceneId,
+                                       Tizen::Base::Collection::IList* pArgs)
+{
+       AppLogDebug("ENTER");
+       if (pArgs != null)
+       {
+               __pStrSceneId = static_cast<String*>(pArgs->GetAt(DATA_ITEM_SCENE_NAME));
+               __pStrContentName = static_cast<String*>(pArgs->GetAt(DATA_ITEM_CONTENT_NAME));
+               __currentContentIndex = static_cast<Integer*>(pArgs->GetAt(DATA_ITEM_CONTENT_TYPE))->ToInt();
+               __pPresentationModel = FolderListPresentationModel::GetInstance();
+               __pPresentationModel->UpdateFolderPathList();
+               __pPresentationModel->InitializeContentList(__currentContentIndex);
+       }
+       else
+       {
+               // Empty statement
+       }
+
+       ContentInformation* pContentInfoStruct = null;
+       pContentInfoStruct = __pPresentationModel->GetContentInfoN(0);
+       if (pContentInfoStruct == null)
+       {
+               return;
+       }
+       InitializeHeader(*pContentInfoStruct);
+       if (__checkEdit == true)
+       {
+               Footer* pFooter = CommonUtil::CreateDeleteFooter(*this);
+               pFooter->AddActionEventListener(*this);
+       }
+       else
+       {
+               Footer* pFooter = CommonUtil::CreateEditFooter(*this);
+               pFooter->AddActionEventListener(*this);
+               pFooter->SetBackButton();
+               SetFormBackEventListener(this);
+       }
+       __pContentTableView->UpdateTableView();
+
+       delete pContentInfoStruct;
+       pContentInfoStruct = null;
+       AppLogDebug("EXIT");
+}
+
+void
+FolderContentListForm::OnSceneDeactivated(const Tizen::Ui::Scenes::SceneId& currentSceneId,
+                                                                       const Tizen::Ui::Scenes::SceneId& nextSceneId)
+{
+       AppLogDebug("ENTER");
+       Footer* pFooter = GetFooter();
+       pFooter->RemoveAllButtons();
+       pFooter->RemoveAllItems();
+       pFooter->RemoveActionEventListener(*this);
+
+       CancelAllThumbnailRequest();
+       AppLogDebug("EXIT");
+}
+
+void
+FolderContentListForm::OnActionPerformed(const Tizen::Ui::Control& source, int actionId)
+{
+       AppLogDebug("ENTER");
+       SceneManager* pSceneManager = SceneManager::GetInstance();
+
+       AppAssert(pSceneManager);
+
+       switch (actionId)
+       {
+       case IDA_FLICK_BUTTON_SHARE:
+               // fall through
+       case IDA_FLICK_BUTTON_SET:
+               {
+                       CreateContextMenu(source);
+               }
+               break;
+
+       case IDA_FLICK_BUTTON_ADD_TO_PALYLIST:
+               {
+                       Tizen::Base::Collection::ArrayList* pDataList = new (std::nothrow) ArrayList();
+                       pDataList->Construct();
+                       ContentInformation* pContentInfo;
+                       pContentInfo = __pPresentationModel->GetContentInfoN(__itemIndex);
+
+                       if (pContentInfo == null)
+                       {
+                               pDataList->RemoveAll(true);
+                               delete pDataList;
+                               pDataList = null;
+                               return;
+                       }
+                       pDataList->Add(*(new (std::nothrow) String(pContentInfo->ContentFilePath)));
+
+                       delete pContentInfo;
+                       pContentInfo = null;
+
+                       __pPlayListPickerPopup = new (std::nothrow) PlayListPickerPopup();
+                       __pPlayListPickerPopup->Initialize(this, pDataList);
+                       __pPlayListPickerPopup->SetShowState(true);
+                       __pPlayListPickerPopup->Show();
+                       //__pPlayListPickerPopup->SetCollectedContent(pDataList);
+               }
+               break;
+
+       case IDA_FLICK_BUTTON_DELETE:
+               {
+                       if (__pDeletePopup != null)
+                       {
+                               __pDeletePopup->SetShowState(true);
+                               __pDeletePopup->Show();
+                       }
+               }
+               break;
+
+       case IDA_DELETE_POPUP_DELETE:
+               // fall through
+       case IDA_DELETE_POPUP_CANCEL:
+               {
+                       __pDeletePopup->SetShowState(false);
+                       __pDeletePopup->Show();
+                       if (actionId == IDA_DELETE_POPUP_DELETE && __pPresentationModel != null)
+                       {
+                               ContentManager contentManager;
+                               contentManager.Construct();
+                               ContentInformation* pContentInfo = __pPresentationModel->GetContentInfoN(__itemIndex);
+                               contentManager.DeleteContent(pContentInfo->contentId);
+                               Footer* pFooter = GetFooter();
+
+                               delete pContentInfo;
+                               pContentInfo = null;
+
+                               __pPresentationModel->RefreshContentList(__currentContentIndex);
+
+                               if (__pPresentationModel->GetContentCount(__currentContentIndex) <= INIT_VALUE)
+                               {
+                                       CommonUtil::ShowNoContentImage(INIT_VALUE, *__pContentTableView, *__pNoContentImageLabel, *__pNoContentTextLabel);
+                                       pFooter->SetItemEnabled(INDEX_EDIT_FOOTER_EDIT, false);
+                                       pFooter->Invalidate(true);
+                               }
+
+                               __pContentTableView->RefreshItem(__itemIndex, TABLE_VIEW_REFRESH_TYPE_ITEM_REMOVE);
+                       }
+               }
+               break;
+
+       case IDA_SHARE_CONTEXT_MENU_EMAIL:
+               // fall through
+       case IDA_SHARE_CONTEXT_MENU_MESSAGE:
+               {
+                       String providerID = ((actionId == IDA_SHARE_CONTEXT_MENU_EMAIL) ? PROVIDER_ID_EMAIL : PROVIDER_ID_MESSAGE);
+                       AppControl* pAppControl = AppManager::FindAppControlN(providerID, OPERATION_ID_COMPOSE);
+                       if (pAppControl == null)
+                       {
+                               return;
+                       }
+
+                       ContentInformation* pContentInfo = null;
+                       pContentInfo = __pPresentationModel->GetContentInfoN(__itemIndex);
+
+                       if (pContentInfo == null)
+                       {
+                               return;
+                       }
+
+                       HashMap* pDataList = new (std::nothrow) HashMap(SingleObjectDeleter);
+                       pDataList->Construct();
+                       pDataList->Add(new (std::nothrow) String(APPCONTROL_KEY_ATTACHMENTS), new (std::nothrow) String(pContentInfo->ContentFilePath));
+
+                       pAppControl->Start(null, null, pDataList, this);
+
+                       if (pAppControl != null)
+                       {
+                               delete pAppControl;
+                               pAppControl = null;
+                       }
+
+                       delete pContentInfo;
+                       pContentInfo = null;
+               }
+               break;
+
+       case IDA_SET_CONTEXT_MENU_CALL:
+               {
+                       result r = E_SUCCESS;
+                       ContentInformation* pContentInfo = __pPresentationModel->GetContentInfoN(__itemIndex);
+
+                       if (pContentInfo == null)
+                       {
+                               return;
+                       }
+                       r = SettingInfo::SetValue(CALL_RINGTONE_KEY, pContentInfo->ContentFilePath);
+
+                       delete pContentInfo;
+                       pContentInfo = null;
+
+                       if (r == E_SUCCESS)
+                       {
+                               MessageBox messageBox;
+                               messageBox.Construct(L"", ResourceManager::GetString(L"IDS_COM_POP_SUCCESS"),
+                                                                       MSGBOX_STYLE_OK,
+                                                                       COUNT_MESSAGE_BOX_TIMEOUT);
+                               int modalResult = 0;
+                               messageBox.ShowAndWait(modalResult);
+                       }
+               }
+               break;
+
+       case IDA_SET_CONTEXT_MENU_CALLER:
+               {
+                       AppControl* pAppControl = AppManager::FindAppControlN(TIZEN_APPCONTROL_PROVIDER_CONTACT, TIZEN_APPCONTROL_OPERATION_PICK);
+                       if (pAppControl == null)
+                       {
+                               return;
+                       }
+
+                       HashMap* pDataList = new (std::nothrow) HashMap(SingleObjectDeleter);
+                       pDataList->Construct();
+                       pDataList->Add(new (std::nothrow) String(APPCONTROL_KEY_SINGLE_MODE), new (std::nothrow) String(APPCONTROL_VALUE_SINGLE));
+                       pDataList->Add(new (std::nothrow) String(APPCONTROL_KEY_RETURNTYPE), new (std::nothrow) String(APPCONTROL_VALUE_CONTACTID));
+
+                       pAppControl->Start(null, null, pDataList, this);
+                       if (pAppControl != null)
+                       {
+                               delete pAppControl;
+                               pAppControl = null;
+                       }
+               }
+               break;
+
+       case IDA_FOOTER_BUTTON_EDIT:
+               {
+                       ToggleViewMode(false);
+               }
+               break;
+
+       case IDA_FOOTER_BUTTON_CANCEL:
+               {
+                       __checkedItemCount = INIT_VALUE;
+                       __pSelectAllCheckedButton->SetSelected(false);
+                       CommonUtil::SetAllCheckState(false, *__pContentTableView, __pPresentationModel->GetContentCount(__currentContentIndex));
+                       CommonUtil::ShowCheckedCountLabel(*__pCheckedCountLabel, __checkedItemCount, *__pContentTableView, *this);
+                       ToggleViewMode(true);
+               }
+               break;
+
+       case IDA_FOOTER_BUTTON_SEARCH:
+               {
+                       pSceneManager->GoForward(ForwardSceneTransition(IDSCN_SEARCH));
+               }
+               break;
+
+       case IDA_CHECK_BUTTON:
+               {
+                       __checkedItemCount = __pPresentationModel->GetContentCount(__currentContentIndex);
+                       if (__checkedItemCount > INIT_VALUE)
+                       {
+                               Footer* pFooter = GetFooter();
+
+                               pFooter->SetItemEnabled(INDEX_FOOTER_DELETE, true);
+                               pFooter->SetItemEnabled(INDEX_FOOTER_SHARE, true);
+                               pFooter->SetItemEnabled(INDEX_FOOTER_ADDTOPLATLIST, true);
+
+                               pFooter->Invalidate(true);
+                       }
+                       CommonUtil::SetAllCheckState(true, *__pContentTableView, __pPresentationModel->GetContentCount(__currentContentIndex));
+                       CommonUtil::ShowCheckedCountLabel(*__pCheckedCountLabel, __checkedItemCount, *__pContentTableView, *this);
+               }
+               break;
+
+       case IDA_UNCHECK_BUTTON:
+               {
+                       Footer* pFooter = GetFooter();
+
+                       pFooter->SetItemEnabled(INDEX_FOOTER_DELETE, false);
+                       pFooter->SetItemEnabled(INDEX_FOOTER_SHARE, false);
+                       pFooter->SetItemEnabled(INDEX_FOOTER_ADDTOPLATLIST, false);
+
+                       pFooter->Invalidate(true);
+
+                       __checkedItemCount = INIT_VALUE;
+                       CommonUtil::SetAllCheckState(false, *__pContentTableView, __pPresentationModel->GetContentCount(__currentContentIndex));
+                       CommonUtil::ShowCheckedCountLabel(*__pCheckedCountLabel, __checkedItemCount, *__pContentTableView, *this);
+               }
+               break;
+
+       case IDA_FOOTER_BUTTON_DELETE:
+               {
+                       ContentManager contentManager;
+                       Footer* pFooter = GetFooter();
+                       int totalCount = __pPresentationModel->GetContentCount(__currentContentIndex);
+                       int iCount = 0;
+
+                       if (__checkedItemCount <= INIT_VALUE)
+                       {
+                               return;
+                       }
+
+                       pFooter->SetItemEnabled(INDEX_FOOTER_DELETE, false);
+                       pFooter->SetItemEnabled(INDEX_FOOTER_SHARE, false);
+                       pFooter->SetItemEnabled(INDEX_FOOTER_ADDTOPLATLIST, false);
+                       pFooter->Invalidate(true);
+
+                       contentManager.Construct();
+                       for (iCount = 0; iCount < totalCount; iCount++)
+                       {
+                               if (__pContentTableView->IsItemChecked(iCount) == true)
+                               {
+                                       __pContentTableView->SetItemChecked(iCount, false);
+                                       ContentInformation* pContentInfoStruct = __pPresentationModel->GetContentInfoN(iCount);
+                                       contentManager.DeleteContent(pContentInfoStruct->contentId);
+
+                                       delete pContentInfoStruct;
+                                       pContentInfoStruct = null;
+                               }
+                       }
+                       __pPresentationModel->RefreshContentList(__currentContentIndex);
+                       __pContentTableView->UpdateTableView();
+                       __pContentTableView->Invalidate(true);
+
+                       __checkedItemCount = INIT_VALUE;
+                       CommonUtil::ShowCheckedCountLabel(*__pCheckedCountLabel, __checkedItemCount, *__pContentTableView, *this);
+
+                       if (__pPresentationModel->GetContentCount(__currentContentIndex) > 0)
+                       {
+                               CommonUtil::ShowSelectAllCheckButton(*__pSelectAllCheckedButton);
+                       }
+                       else
+                       {
+                               __pSelectAllCheckedButton->SetEnabled(false);
+                               __pSelectAllCheckedButton->SetShowState(false);
+                               CommonUtil::ShowNoContentImage(INIT_VALUE, *__pContentTableView, *__pNoContentImageLabel, *__pNoContentTextLabel);
+                       }
+               }
+               break;
+
+       case IDA_FOOTER_BUTTON_SHARE:
+               {
+                       Tizen::Base::Collection::ArrayList* pDataList = new (std::nothrow) ArrayList();
+                       Footer* pFooter = GetFooter();
+                       int totalCount = __pPresentationModel->GetContentCount(__currentContentIndex);
+
+                       pDataList->Construct();
+
+                       for (int iCount = 0; iCount < totalCount; iCount++)
+                       {
+                               if (__pContentTableView->IsItemChecked(iCount) == true)
+                               {
+                                       ContentInformation* pContentInfoStruct = __pPresentationModel->GetContentInfoN(iCount);
+                                       if (pContentInfoStruct == null)
+                                       {
+                                               pDataList->RemoveAll(true);
+                                               delete pDataList;
+                                               pDataList = null;
+                                               return;
+                                       }
+                                       pDataList->Add(*(new (std::nothrow) String(L"attachment:" + pContentInfoStruct->ContentFilePath)));
+
+                                       __pContentTableView->SetItemChecked(iCount, false);
+
+                                       delete pContentInfoStruct;
+                                       pContentInfoStruct = null;
+                               }
+                       }
+                       pFooter->SetItemEnabled(INDEX_FOOTER_DELETE, false);
+                       pFooter->SetItemEnabled(INDEX_FOOTER_SHARE, false);
+                       pFooter->SetItemEnabled(INDEX_FOOTER_ADDTOPLATLIST, false);
+
+                       __checkedItemCount = INIT_VALUE;
+                       CommonUtil::ShowCheckedCountLabel(*__pCheckedCountLabel, __checkedItemCount, *__pContentTableView, *this);
+                       CommonUtil::ShowSelectAllCheckButton(*__pSelectAllCheckedButton);
+
+                       Invalidate(true);
+                       if (__pSharePopup == null)
+                       {
+                               __pSharePopup = new (std::nothrow) SharePopup();
+                               __pSharePopup->Initialize();
+                       }
+                       __pSharePopup->SetShowState(true);
+                       __pSharePopup->Show();
+                       __pSharePopup->SetArguments(pDataList);
+               }
+               break;
+
+       case IDA_FOOTER_BUTTON_ADD_TO_PLAYLIST:
+               {
+                       ContentManager contentManager;
+                       Footer* pFooter = GetFooter();
+                       Tizen::Base::Collection::ArrayList* pDataList = new (std::nothrow) ArrayList();
+                       int totalCount = 0;
+
+                       if (__checkedItemCount <= 0)
+                       {
+                               return;
+                       }
+
+                       pDataList->Construct();
+                       contentManager.Construct();
+                       totalCount = __pPresentationModel->GetContentCount(__currentContentIndex);
+
+                       for (int iCount = 0; iCount < totalCount; iCount++)
+                       {
+                               if (__pContentTableView->IsItemChecked(iCount) == true)
+                               {
+                                       ContentInformation* pContentInfoStruct = __pPresentationModel->GetContentInfoN(iCount);
+                                       if (pContentInfoStruct == null)
+                                       {
+                                               pDataList->RemoveAll(true);
+                                               delete pDataList;
+                                               pDataList = null;
+                                               return;
+                                       }
+
+                                       pDataList->Add(*(new (std::nothrow) String(pContentInfoStruct->ContentFilePath)));
+
+                                       __pContentTableView->SetItemChecked(iCount, false);
+
+                                       delete pContentInfoStruct;
+                                       pContentInfoStruct = null;
+                               }
+                       }
+
+                       if (IsFailed(CreatePlayListPickerPopup(pDataList)))
+                       {
+                               AppLogDebug("CreatePlayListPickerPopup failed(%s)", GetLastResult());
+                               return;
+                       }
+                       __pPlayListPickerPopup->SetShowState(true);
+                       __pPlayListPickerPopup->Show();
+                       //__pPlayListPickerPopup->SetCollectedContent(pDataList);
+
+                       pFooter->SetItemEnabled(INDEX_FOOTER_DELETE, false);
+                       pFooter->SetItemEnabled(INDEX_FOOTER_SHARE, false);
+                       pFooter->SetItemEnabled(INDEX_FOOTER_ADDTOPLATLIST, false);
+
+                       __checkedItemCount = INIT_VALUE;
+                       CommonUtil::ShowCheckedCountLabel(*__pCheckedCountLabel, __checkedItemCount, *__pContentTableView, *this);
+                       CommonUtil::ShowSelectAllCheckButton(*__pSelectAllCheckedButton);
+
+                       Invalidate(true);
+               }
+               break;
+
+       default:
+               break;
+       }
+       AppLogDebug("EXIT");
+}
+
+int
+FolderContentListForm::GetItemCount(void)
+{
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
+       return __pPresentationModel->GetContentCount(__currentContentIndex);
+}
+
+Tizen::Ui::Controls::TableViewItem*
+FolderContentListForm::CreateItem(const int itemIndex, int itemWidth)
+{
+       AppLogDebug("ENTER");
+       ContentInformation* pContentInfoStruct = null;
+
+       TableViewItem* pItem = new (std::nothrow) TableViewItem();
+       if (__checkEdit)
+       {
+               pItem->Construct(Dimension(itemWidth, ITEM_HEIGHT), TABLE_VIEW_ANNEX_STYLE_MARK);
+       }
+       else
+       {
+               pItem->Construct(Dimension(itemWidth, ITEM_HEIGHT), TABLE_VIEW_ANNEX_STYLE_NORMAL);
+               pItem->SetContextItem(__pContextItem);
+       }
+       pItem->SetBackgroundColor(COLOR_WHITE);
+
+       pContentInfoStruct = __pPresentationModel->GetContentInfoN(itemIndex);
+       if (pContentInfoStruct == null)
+       {
+               delete pItem;
+               pItem = null;
+               return null;
+       }
+
+       RequestThumbnail(pContentInfoStruct->contentId, (new (std::nothrow) int(itemIndex)));
+       CreateTableViewItem(*pItem, *pContentInfoStruct);
+
+       delete pContentInfoStruct;
+       pContentInfoStruct = null;
+
+       AppLogDebug("EXIT");
+       return pItem;
+}
+
+void
+FolderContentListForm::OnTableViewItemStateChanged(Tizen::Ui::Controls::TableView& tableView,
+                                                       int itemIndex,
+                                                       Tizen::Ui::Controls::TableViewItem* pItem,
+                                                       Tizen::Ui::Controls::TableViewItemStatus status)
+{
+       AppLogDebug("ENTER");
+       switch (status)
+       {
+       case TABLE_VIEW_ITEM_STATUS_CHECKED:
+               {
+                       Footer* pFooter = GetFooter();
+                       __checkedItemCount++;
+                       tableView.SetItemChecked(itemIndex, true);
+
+                       pFooter->SetItemEnabled(INDEX_FOOTER_DELETE, true);
+                       pFooter->SetItemEnabled(INDEX_FOOTER_SHARE, true);
+                       pFooter->SetItemEnabled(INDEX_FOOTER_ADDTOPLATLIST, true);
+
+                       pFooter->Invalidate(true);
+                       if (__checkedItemCount == __pPresentationModel->GetContentCount(__currentContentIndex))
+                       {
+                               __pSelectAllCheckedButton->SetSelected(true);
+                       }
+                       CommonUtil::ShowCheckedCountLabel(*__pCheckedCountLabel, __checkedItemCount, *__pContentTableView, *this);
+               }
+               break;
+
+       case TABLE_VIEW_ITEM_STATUS_UNCHECKED:
+               {
+                       Footer* pFooter = GetFooter();
+
+                       __checkedItemCount--;
+                       tableView.SetItemChecked(itemIndex, false);
+
+                       if (__checkedItemCount == INIT_VALUE)
+                       {
+                               pFooter->SetItemEnabled(INDEX_FOOTER_DELETE, false);
+                               pFooter->SetItemEnabled(INDEX_FOOTER_SHARE, false);
+                               pFooter->SetItemEnabled(INDEX_FOOTER_ADDTOPLATLIST, false);
+
+                               pFooter->Invalidate(true);
+                       }
+
+                       if (__checkedItemCount != __pPresentationModel->GetContentCount(__currentContentIndex))
+                       {
+                               __pSelectAllCheckedButton->SetSelected(false);
+                       }
+                       CommonUtil::ShowCheckedCountLabel(*__pCheckedCountLabel, __checkedItemCount, *__pContentTableView, *this);
+               }
+               break;
+
+       case TABLE_VIEW_ITEM_STATUS_SELECTED:
+               {
+                       SceneManager* pSceneManager = SceneManager::GetInstance();
+                       ArrayList* tempArg;
+                       AppAssert(pSceneManager);
+                       tempArg = MakePlayerSceneParam(itemIndex);
+                       pSceneManager->GoForward(ForwardSceneTransition(IDSCN_PLAYER), tempArg);
+
+                       if (tempArg != null)
+                       {
+                               tempArg->RemoveAll();
+                               delete tempArg;
+                               tempArg = null;
+                       }
+               }
+               break;
+
+       default:
+               break;
+       }
+       AppLogDebug("EXIT");
+}
+
+Tizen::Base::Collection::ArrayList*
+FolderContentListForm::MakePlayerSceneParam(int startIndex)
+{
+       AppLogDebug("ENTER");
+       ArrayList* pTempList = new (std::nothrow) ArrayList();
+       ArrayList* pSelectedMusicContent = null;
+
+       pSelectedMusicContent = __pPresentationModel->GetContentPathListN(__currentContentIndex);
+       if (pTempList == null || pSelectedMusicContent == null)
+       {
+               return null;
+       }
+       pTempList->Construct();
+       pTempList->Add(*(new (std::nothrow) String(MUSIC)));
+       pTempList->Add(*(new (std::nothrow) Integer(startIndex)));
+       pTempList->Add(*(pSelectedMusicContent));
+
+       AppLogDebug("EXIT");
+       return pTempList;
+}
+
+result
+FolderContentListForm::CreateTableViewItem(Tizen::Ui::Container& parent,
+                                                                               const ContentInformation& contentInfo)
+{
+       AppLogDebug("ENTER");
+       result r = E_SUCCESS;
+       if (__checkEdit)
+       {
+               Rectangle rectContentName = RECT_CONTENT_NAME;
+               Rectangle rectContentPlayTime = RECT_CONTENT_PLAY_TIME;
+               Label* pLabelContentName = new (std::nothrow) Label();
+               Label* pLabelContentPlayTime = new (std::nothrow) Label();
+
+               rectContentName.width = rectContentName.width - X_OFFSET_EDIT_STYLE_TABLE_VIEW;
+               rectContentPlayTime.x = rectContentPlayTime.x - X_OFFSET_EDIT_STYLE_TABLE_VIEW;
+
+               pLabelContentName->Construct(rectContentName, L"");
+               pLabelContentName->SetTextConfig(FONT_SIZE, LABEL_TEXT_STYLE_NORMAL);
+               pLabelContentName->SetTextHorizontalAlignment(ALIGNMENT_LEFT);
+               pLabelContentName->SetText(contentInfo.TitleName);
+
+               pLabelContentPlayTime->Construct(rectContentPlayTime, L"");
+               pLabelContentPlayTime->SetTextConfig(FONT_SIZE, LABEL_TEXT_STYLE_NORMAL);
+               pLabelContentPlayTime->SetTextHorizontalAlignment(ALIGNMENT_RIGHT);
+               pLabelContentPlayTime->SetText(CommonUtil::GetFormatDate(contentInfo.Duration));
+
+               parent.AddControl(*pLabelContentName);
+               parent.AddControl(*pLabelContentPlayTime);
+       }
+       else
+       {
+               String filePath = contentInfo.ContentFilePath;
+               Label* pThumbnailLabel = new (std::nothrow) Label();
+               Label* pFolderIconLabel = new (std::nothrow) Label();
+               Label* pTitleLabel = new (std::nothrow) Label();
+               Label* pArtistNameLabel = new (std::nothrow) Label();
+               Label* pTimeLabel = new (std::nothrow) Label();
+               int indexOf = -1;
+
+               String tempPath = contentInfo.ContentFilePath;
+               String fileName = null;
+               tempPath.LastIndexOf(L"/", tempPath.GetLength() - 1, indexOf);
+               tempPath.SubString(indexOf + 1, fileName);
+
+               pFolderIconLabel->Construct(RECT_FOLDER_ICON_THUMBNAIL, L"");
+               pFolderIconLabel->SetTextConfig(FONT_SIZE, LABEL_TEXT_STYLE_NORMAL);
+               if (filePath.StartsWith(STORAGE_SDCARD_PATH, INIT_VALUE) == true)
+               {
+                       pFolderIconLabel->SetBackgroundBitmap(*ResourceManager::GetBitmapN(L"T02_memory card_02.png"));
+               }
+               else if (filePath.StartsWith(STORAGE_PHONE_PATH, INIT_VALUE) == true)
+               {
+                       pFolderIconLabel->SetBackgroundBitmap(*ResourceManager::GetBitmapN(L"T02_phone_02.png"));
+               }
+               else if (filePath.StartsWith(STORAGE_EXTERNAL_PATH, INIT_VALUE) == true)
+               {
+                       pFolderIconLabel->SetBackgroundBitmap(*ResourceManager::GetBitmapN(L"T02_external_storage_02.png"));
+               }
+
+               pThumbnailLabel->Construct(RECT_GENRE_ITEM_THUMBNAIL, L"");
+               pThumbnailLabel->SetTextConfig(FONT_SIZE, LABEL_TEXT_STYLE_NORMAL);
+               pThumbnailLabel->SetBackgroundBitmap(*GetDefaultThumbnail());
+               pThumbnailLabel->SetName(L"ThumbnailLabel");
+
+               pTitleLabel->Construct(RECT_GENRE_ITEM_TITLE_NAME, L"");
+               pTitleLabel->SetTextConfig(FONT_SIZE, LABEL_TEXT_STYLE_NORMAL);
+               pTitleLabel->SetTextHorizontalAlignment(ALIGNMENT_LEFT);
+               pTitleLabel->SetText(fileName);
+
+               pArtistNameLabel->Construct(RECT_GENRE_ITEM_ARTIST_NAME, L"");
+               pArtistNameLabel->SetTextConfig(FONT_SIZE, LABEL_TEXT_STYLE_NORMAL);
+               pArtistNameLabel->SetTextHorizontalAlignment(ALIGNMENT_LEFT);
+               pArtistNameLabel->SetText(contentInfo.ArtistName);
+
+               pTimeLabel->Construct(RECT_GENRE_ITEM_TIME, L"");
+               pTimeLabel->SetTextConfig(FONT_SIZE, LABEL_TEXT_STYLE_NORMAL);
+               pTimeLabel->SetTextHorizontalAlignment(ALIGNMENT_RIGHT);
+               pTimeLabel->SetText(CommonUtil::GetFormatDate(contentInfo.Duration));
+
+               parent.AddControl(*pThumbnailLabel);
+               parent.AddControl(*pFolderIconLabel);
+               parent.AddControl(*pTitleLabel);
+               parent.AddControl(*pArtistNameLabel);
+               parent.AddControl(*pTimeLabel);
+       }
+       AppLogDebug("EXIT");
+       return r;
+}
+
+void
+FolderContentListForm::ToggleViewMode(bool editMode)
+{
+       AppLogDebug("ENTER");
+       Footer* pFooter = GetFooter();
+
+       if (editMode)
+       {
+               int currentAlbumContentCount = 0;
+               currentAlbumContentCount = __pPresentationModel->GetContentCount(__currentContentIndex);
+
+               pFooter->RemoveAllButtons();
+               pFooter->RemoveAllItems();
+               pFooter->RemoveActionEventListener(*this);
+               pFooter = CommonUtil::CreateEditFooter(*this);
+               pFooter->AddActionEventListener(*this);
+               pFooter->SetBackButton();
+               SetFormBackEventListener(this);
+
+               if (currentAlbumContentCount > INIT_VALUE)
+               {
+                       SetTitleText(__strHeaderName);
+               }
+               else
+               {
+                       SetTitleText("No songs");
+                       CommonUtil::ShowNoContentImage(INIT_VALUE, *__pContentTableView, *__pNoContentImageLabel, *__pNoContentTextLabel);
+                       pFooter->SetItemEnabled(INDEX_FOOTER_EDIT, false);
+               }
+
+               __pSelectAllCheckedButton->SetEnabled(false);
+               __pSelectAllCheckedButton->SetShowState(false);
+
+               __checkEdit = false;
+               __pContentTableView->SetBounds(Rectangle(0, 0, GetClientAreaBounds().width, GetClientAreaBounds().height));
+               __pContentTableView->Invalidate(true);
+               __pContentTableView->UpdateTableView();
+       }
+       else
+       {
+               SetTitleText(ResourceManager::GetString("IDS_COM_BODY_EDIT"));
+
+               pFooter->RemoveAllButtons();
+               pFooter->RemoveAllItems();
+               pFooter->RemoveActionEventListener(*this);
+
+               pFooter = CommonUtil::CreateDeleteFooter(*this);
+               pFooter->AddActionEventListener(*this);
+
+               __pSelectAllCheckedButton->SetEnabled(true);
+               __pSelectAllCheckedButton->SetShowState(true);
+
+               __checkEdit = true;
+               __pContentTableView->SetBounds(Rectangle(0, __pSelectAllCheckedButton->GetHeight(), GetClientAreaBounds().width, (GetClientAreaBounds().height - __pSelectAllCheckedButton->GetHeight())));
+               __pContentTableView->Invalidate(true);
+               __pContentTableView->UpdateTableView();
+       }
+       Invalidate(true);
+       AppLogDebug("EXIT");
+}
+
+void
+FolderContentListForm::OnAppControlCompleteResponseReceived(const AppId& appId,
+               const String& operationId, AppCtrlResult appControlResult,
+               const IMap* pExtraData)
+{
+       AppLogDebug("ENTER");
+       if (pExtraData == null)
+       {
+               AppLogDebug("EXIT");
+               return;
+       }
+       AppLogDebug("%ls, %ls", appId.GetPointer(), operationId.GetPointer());
+       if (appId.Equals(String(TIZEN_APPCONTROL_PROVIDER_CONTACT)))
+       {
+               if (appControlResult == APP_CTRL_RESULT_SUCCEEDED)
+               {
+                       const String* pContactId = static_cast<const String*>(pExtraData->GetValue(String(APPCONTROL_KEY_RETURNTYPE)));
+                       if (pContactId->Equals(APPCONTROL_VALUE_CONTACTID, true))
+                       {
+                               const String* pResultString = static_cast<const String*>(pExtraData->GetValue(String(APPCONTROL_KEY_VALUE)));
+
+                               AppLogDebug("%ls", pResultString->GetPointer());
+                               int contactId;
+                               Integer::Parse(*pResultString, contactId);
+
+                               AddressbookManager* pAddressbookManager = AddressbookManager::GetInstance();
+                               Addressbook* pAddressbook = pAddressbookManager->GetAddressbookN(DEFAULT_ADDRESSBOOK_ID);
+
+                               ContentInformation* pCcontentInfo = __pPresentationModel->GetContentInfoN(__itemIndex);
+                               if (pCcontentInfo == null)
+                               {
+                                       delete pAddressbook;
+                                       pAddressbook = null;
+                                       return;
+                               }
+
+                               Contact* pContact = pAddressbook->GetContactN(contactId);
+                               pContact->SetValue(CONTACT_PROPERTY_ID_RINGTONE, pCcontentInfo->ContentFilePath);
+                               result r = pAddressbook->UpdateContact(*pContact);
+
+                               if (r == E_SUCCESS)
+                               {
+                                       MessageBox messageBox;
+                                       messageBox.Construct(L"", ResourceManager::GetString(L"IDS_COM_POP_SUCCESS"),
+                                                       MSGBOX_STYLE_OK,
+                                                       COUNT_MESSAGE_BOX_TIMEOUT);
+                                       int modalResult = 0;
+                                       messageBox.ShowAndWait(modalResult);
+                               }
+
+                               delete pCcontentInfo;
+                               pCcontentInfo = null;
+
+                               delete pContact;
+                               pContact = null;
+
+                               delete pAddressbook;
+                               pAddressbook = null;
+                       }
+               }
+       }
+       AppLogDebug("EXIT");
+}
+
+void
+FolderContentListForm::OnThumbnailInfoReveivedN(ThumbnailInfo* pThumbnailInfo)
+{
+       AppLogDebug("ENTER");
+       int itemIndex = 0;
+       void* pParam = null;
+       __pThumbnail = pThumbnailInfo->GetBitmapN();
+       pParam = pThumbnailInfo->GetUserParamN();
+       if (pParam)
+       {
+               itemIndex = *(static_cast<int*>(pParam));
+       }
+       __pContentTableView->RefreshItem(itemIndex, TABLE_VIEW_REFRESH_TYPE_ITEM_MODIFY);
+       delete pThumbnailInfo;
+       delete static_cast<int*>(pParam);
+       AppLogDebug("EXIT");
+}
+
+void
+FolderContentListForm::OnUserEventReceivedN(RequestId requestId, Tizen::Base::Collection::IList* pArgs)
+{
+       AppLogDebug("ENTER");
+       AppLogDebug("OnUserEventReceivedN %d", requestId);
+       if (requestId == ID_DESTORY_PLAY_LIST_PICKER_POPUP)
+       {
+               if (__pPlayListPickerPopup != null)
+               {
+                       delete __pPlayListPickerPopup;
+                       __pPlayListPickerPopup = null;
+               }
+       }
+       AppLogDebug("EXIT");
+}
+
+void
+FolderContentListForm::UpdateItem(int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem)
+{
+       AppLogDebug("ENTER");
+       Label* pThumbnailLabel = static_cast<Label*>(pItem->GetControl(L"ThumbnailLabel"));
+       if (__pThumbnail == null || pThumbnailLabel == null)
+       {
+               AppLogDebug("__pThumbnail or pThumbnailLabel is null");
+               delete __pThumbnail;
+               __pThumbnail = null;
+               return;
+       }
+       pThumbnailLabel->SetBackgroundBitmap(*__pThumbnail);
+       delete __pThumbnail;
+       __pThumbnail = null;
+       pThumbnailLabel->Invalidate(true);
+       AppLogDebug("EXIT");
+}
\ No newline at end of file
old mode 100755 (executable)
new mode 100644 (file)
index eea94a8..4715736
@@ -1,4 +1,4 @@
-//
+//
 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
 //
 // Licensed under the Flora License, Version 1.0 (the License);
 // limitations under the License.
 //
 
+/**
+ * @file               MpFolderContentPickerPanel.cpp
+ * @brief              This is the implementation file for FolderContentPickerPanel class.
+ */
+
 #include "MpFolderContentPickerPanel.h"
 
 using namespace Tizen::Base;
 using namespace Tizen::Base::Collection;
 using namespace Tizen::Content;
 using namespace Tizen::Graphics;
+using namespace Tizen::Social;
 using namespace Tizen::Ui;
 using namespace Tizen::Ui::Controls;
 using namespace Tizen::Ui::Scenes;
-using namespace Tizen::Social;
 
-FolderContentPickerPanel::FolderContentPickerPanel()
-: __checkedItemCount(0)
-, __pContentTableView(null)
-, __pSelectAllCheckedButton(null)
-, __pCheckedCountLabel(null)
+FolderContentPickerPanel::FolderContentPickerPanel(void)
+       : __checkedItemCount(0)
+       , __pContentTableView(null)
+       , __pSelectAllCheckedButton(null)
+       , __pCheckedCountLabel(null)
 {
-       //AppLogDebug("FolderContentPickerPanel");
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 
-FolderContentPickerPanel::~FolderContentPickerPanel()
+FolderContentPickerPanel::~FolderContentPickerPanel(void)
 {
-       //AppLogDebug("~FolderContentPickerPanel");
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 
-
 bool
 FolderContentPickerPanel::Initialize(void)
 {
-       //AppLogDebug("Initialize");
+       AppLogDebug("ENTER");
        result r = Construct(Rectangle(INIT_VALUE, INIT_VALUE, INIT_VALUE, INIT_VALUE));
        if (IsFailed(r))
        {
                return false;
        }
+       AppLogDebug("EXIT");
        return true;
 }
 
 result
 FolderContentPickerPanel::OnInitializing(void)
 {
-       //AppLogDebug("OnInitializing");
+       AppLogDebug("ENTER");
        Form* pForm = dynamic_cast<Form*>(GetParent());
        AppAssert(pForm);
 
-       int width  = pForm->GetClientAreaBounds().width;
+       int width = pForm->GetClientAreaBounds().width;
        int height = pForm->GetClientAreaBounds().height;
 
        SetBounds(INIT_VALUE, INIT_VALUE, width, height);
@@ -80,122 +87,110 @@ FolderContentPickerPanel::OnInitializing(void)
 
        __pPresentationModel = FolderListPresentationModel::GetInstance();
 
+       AppLogDebug("EXIT");
        return E_SUCCESS;
 }
 
 result
 FolderContentPickerPanel::OnTerminating(void)
 {
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
        return E_SUCCESS;
 }
 
 void
 FolderContentPickerPanel::OnActionPerformed(const Tizen::Ui::Control& source, int actionId)
 {
-       //AppLogDebug("OnActionPerformed");
+       AppLogDebug("ENTER");
        SceneManager* pSceneManager = SceneManager::GetInstance();
        AppAssert(pSceneManager);
 
-       int totalCount = __pPresentationModel->GetSongContentCount();
+       int totalCount = __pPresentationModel->GetContentCount(__pPresentationModel->GetCurrentFolderIndex());
 
-       switch(actionId)
+       switch (actionId)
        {
        case IDA_CHECK_BUTTON:
-       {
-               //AppLogDebug("IDA_CHECK_BUTTON");
-               __checkedItemCount = totalCount;
-               CommonUtil::SetAllCheckState(true, *__pContentTableView, totalCount);
-               Form* pForm = dynamic_cast<Form*>(GetParent());
-               AppAssert(pForm);
-               CommonUtil::ShowCheckedCountLabel(*__pCheckedCountLabel, __checkedItemCount, *__pContentTableView, *pForm);
-               CommonUtil::SetButtonEnabled(*pForm, __checkedItemCount, actionId);
+               {
+                       //AppLogDebug("IDA_CHECK_BUTTON");
+                       __checkedItemCount = totalCount;
+                       CommonUtil::SetAllCheckState(true, *__pContentTableView, totalCount);
+                       Form* pForm = dynamic_cast<Form*>(GetParent());
+                       AppAssert(pForm);
+                       CommonUtil::ShowCheckedCountLabel(*__pCheckedCountLabel, __checkedItemCount, *__pContentTableView, *pForm);
+                       CommonUtil::SetButtonEnabled(*pForm, __checkedItemCount, actionId);
+               }
                break;
-       }
+
        case IDA_UNCHECK_BUTTON:
-       {
-               //AppLogDebug("IDA_UNCHECK_BUTTON");
-               __checkedItemCount = INIT_VALUE;
-               CommonUtil::SetAllCheckState(false, *__pContentTableView, totalCount);
-               Form* pForm = dynamic_cast<Form*>(GetParent());
-               AppAssert(pForm);
-               CommonUtil::ShowCheckedCountLabel(*__pCheckedCountLabel, __checkedItemCount, *__pContentTableView, *pForm);
-               CommonUtil::SetButtonEnabled(*pForm, __checkedItemCount, actionId);
-               break;
-       }
-       case IDA_FOOTER_BUTTON_ADD_TO_PLAYLIST:
-       {
-               if (__checkedItemCount <= 0)
                {
-                       return;
+                       //AppLogDebug("IDA_UNCHECK_BUTTON");
+                       __checkedItemCount = INIT_VALUE;
+                       CommonUtil::SetAllCheckState(false, *__pContentTableView, totalCount);
+                       Form* pForm = dynamic_cast<Form*>(GetParent());
+                       AppAssert(pForm);
+                       CommonUtil::ShowCheckedCountLabel(*__pCheckedCountLabel, __checkedItemCount, *__pContentTableView, *pForm);
+                       CommonUtil::SetButtonEnabled(*pForm, __checkedItemCount, actionId);
                }
+               break;
 
-               PlayList* pPlayList = PlayListManager::GetInstance()->GetPlayListN(CommonUtil::GetAddtoPlaylistName());
-
-               int totalCount = __pPresentationModel->GetSongContentCount();
-               for(int iCount = 0; iCount < totalCount; iCount++)
+       case IDA_FOOTER_BUTTON_ADD_TO_PLAYLIST:
                {
-                       if (__pContentTableView->IsItemChecked(iCount) == true)
+                       if (__checkedItemCount <= 0)
                        {
-                               ContentInformationStruct* pContentInfoStruct = __pPresentationModel->GetSongContentInfoN(iCount);
-                               if (pContentInfoStruct == null)
+                               return;
+                       }
+
+                       int totalCount = __pPresentationModel->GetContentCount(__pPresentationModel->GetCurrentFolderIndex());
+                       for (int iCount = 0; iCount < totalCount; iCount++)
+                       {
+                               if (__pContentTableView->IsItemChecked(iCount) == true)
                                {
-                                       continue;
+                                       __pPresentationModel->AddContent(*new (std::nothrow) String(CommonUtil::GetAddtoPlaylistName()), iCount);
+                                       __pContentTableView->SetItemChecked(iCount, false);
                                }
-                               pPlayList->AddItem(pContentInfoStruct->contentId);
-
-                               __pContentTableView->SetItemChecked(iCount, false);
-
-                               delete pContentInfoStruct->pThumbnail;
-                               pContentInfoStruct->pThumbnail = null;
-
-                               delete pContentInfoStruct;
-                               pContentInfoStruct = null;
                        }
-               }
-
-               delete pPlayList;
-               pPlayList = null;
 
-               Form* pForm = dynamic_cast<Form*>(GetParent());
-               AppAssert(pForm);
-               CommonUtil::SetButtonEnabled(*pForm, __checkedItemCount, actionId);
+                       Form* pForm = dynamic_cast<Form*>(GetParent());
+                       AppAssert(pForm);
+                       CommonUtil::SetButtonEnabled(*pForm, __checkedItemCount, actionId);
 
-               __checkedItemCount = INIT_VALUE;
-               CommonUtil::ShowCheckedCountLabel(*__pCheckedCountLabel, __checkedItemCount, *__pContentTableView, *pForm);
-               CommonUtil::ShowSelectAllCheckButton(*__pSelectAllCheckedButton);
-               CommonUtil::SetAddtoPlaylistState(false);
+                       __checkedItemCount = INIT_VALUE;
+                       CommonUtil::ShowCheckedCountLabel(*__pCheckedCountLabel, __checkedItemCount, *__pContentTableView, *pForm);
+                       CommonUtil::ShowSelectAllCheckButton(*__pSelectAllCheckedButton);
+                       CommonUtil::SetAddtoPlaylistState(false);
 
-               Invalidate(true);
+                       Invalidate(true);
 
-               pSceneManager->GoForward(ForwardSceneTransition(IDSCN_PLAYLIST_LIST,
+                       pSceneManager->GoForward(ForwardSceneTransition(IDSCN_PLAYLIST_LIST,
                                                                                                                SCENE_TRANSITION_ANIMATION_TYPE_NONE,
                                                                                                                SCENE_HISTORY_OPTION_NO_HISTORY,
                                                                                                                SCENE_DESTROY_OPTION_DESTROY));
+               }
                break;
-       }
+
        case IDA_FOOTER_BUTTON_CANCEL:
-       {
-               //AppLogDebug("IDA_FOOTER_BUTTON_CANCEL");
-               Form* pForm = dynamic_cast<Form*>(GetParent());
-               AppAssert(pForm);
-               CommonUtil::SetButtonEnabled(*pForm, __checkedItemCount, actionId);
-               pSceneManager->GoBackward(BackwardSceneTransition());
+               {
+                       //AppLogDebug("IDA_FOOTER_BUTTON_CANCEL");
+                       Form* pForm = dynamic_cast<Form*>(GetParent());
+                       AppAssert(pForm);
+                       CommonUtil::SetButtonEnabled(*pForm, __checkedItemCount, actionId);
+                       pSceneManager->GoBackward(BackwardSceneTransition());
+               }
                break;
-       }
+
        default:
-       {
                break;
-       }
        }//End of switch
+       AppLogDebug("EXIT");
 }
 
 void
 FolderContentPickerPanel::OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previousSceneId,
-                                                                       const Tizen::Ui::Scenes::SceneId& currentSceneId,
-                                                                       Tizen::Base::Collection::IList* pArgs)
+                                                                               const Tizen::Ui::Scenes::SceneId& currentSceneId,
+                                                                               Tizen::Base::Collection::IList* pArgs)
 {
-       //AppLogDebug("OnSceneActivatedN");
-
+       AppLogDebug("ENTER");
        Form* pForm = dynamic_cast<Form*>(GetParent());
        AppAssert(pForm);
 
@@ -203,20 +198,20 @@ FolderContentPickerPanel::OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& pr
        pFooter->AddActionEventListener(*this);
 
        CommonUtil::SetButtonEnabled(*pForm, __checkedItemCount);
-
+       __pPresentationModel->UpdateFolderPathList();
        if (pArgs != null)
        {
                pArgs->RemoveAll(true);
                delete pArgs;
        }
+       AppLogDebug("EXIT");
 }
 
 void
 FolderContentPickerPanel::OnSceneDeactivated(const Tizen::Ui::Scenes::SceneId& currentSceneId,
-                                                                                const Tizen::Ui::Scenes::SceneId& nextSceneId)
+                                                                                       const Tizen::Ui::Scenes::SceneId& nextSceneId)
 {
-       //AppLogDebug("OnSceneDeactivated");
-
+       AppLogDebug("ENTER");
        Form* pForm = dynamic_cast<Form*>(GetParent());
        AppAssert(pForm);
 
@@ -224,95 +219,93 @@ FolderContentPickerPanel::OnSceneDeactivated(const Tizen::Ui::Scenes::SceneId& c
        pFooter->RemoveAllButtons();
        pFooter->RemoveAllItems();
        pFooter->RemoveActionEventListener(*this);
+       AppLogDebug("EXIT");
 }
 
 int
 FolderContentPickerPanel::GetItemCount(void)
 {
-       //AppLogDebug("GetItemCount");
-
+       AppLogDebug("ENTER");
        if (__pPresentationModel == null)
        {
-               return 0;
+               return INIT_VALUE;
        }
-       return __pPresentationModel->GetSongContentCount();
+       AppLogDebug("EXIT");
+       return __pPresentationModel->GetContentCount(__pPresentationModel->GetCurrentFolderIndex());
 }
 
 Tizen::Ui::Controls::TableViewItem*
 FolderContentPickerPanel::CreateItem(const int itemIndex, int itemWidth)
 {
-       //AppLogDebug("CreateTableViewItem");
-
-       ContentInformationStruct *pContentInfoStruct = __pPresentationModel->GetSongContentInfoN(itemIndex);
+       AppLogDebug("ENTER");
+       ContentInformation *pContentInfoStruct = __pPresentationModel->GetContentInfoN(itemIndex);
 
        TableViewItem* pItem = new (std::nothrow) TableViewItem();
-       pItem->Construct(Dimension(itemWidth, ITEM_HEIGHT),TABLE_VIEW_ANNEX_STYLE_MARK);
+       pItem->Construct(Dimension(itemWidth, ITEM_HEIGHT), TABLE_VIEW_ANNEX_STYLE_MARK);
        pItem->SetBackgroundColor(COLOR_ITEM);
 
-       CommonUtil::CreateContentPikerTableViewItem(*pItem, pContentInfoStruct->TitleName,CommonUtil::GetFormatDate(pContentInfoStruct->Duration));
-
-       //test_code_start
-       delete pContentInfoStruct->pThumbnail;
-       pContentInfoStruct->pThumbnail = null;
+       CommonUtil::CreateContentPikerTableViewItem(*pItem, pContentInfoStruct->TitleName, CommonUtil::GetFormatDate(pContentInfoStruct->Duration));
 
        delete pContentInfoStruct;
        pContentInfoStruct = null;
-       //test_code_end
 
+       AppLogDebug("EXIT");
        return pItem;
 }
 
 bool
 FolderContentPickerPanel::DeleteItem(const int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem)
 {
-       //AppLogDebug("DeleteItem");
-
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
        return true;
 }
 
 void
 FolderContentPickerPanel::UpdateItem(int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem)
 {
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 
 int
 FolderContentPickerPanel::GetDefaultItemHeight(void)
 {
-       //AppLogDebug("GetDefaultItemHeight");
-
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
        return ITEM_HEIGHT;
 }
 
 void
 FolderContentPickerPanel::OnTableViewItemStateChanged(Tizen::Ui::Controls::TableView& tableView,
-                                                      int itemIndex,
-                                                      Tizen::Ui::Controls::TableViewItem* pItem,
-                                                      Tizen::Ui::Controls::TableViewItemStatus status)
+                                                               int itemIndex,
+                                                               Tizen::Ui::Controls::TableViewItem* pItem,
+                                                               Tizen::Ui::Controls::TableViewItemStatus status)
 {
-       //AppLogDebug("OnTableViewItemStateChanged");
-       switch(status)
+       AppLogDebug("ENTER");
+       switch (status)
        {
        case TABLE_VIEW_ITEM_STATUS_CHECKED:
-       {
-               __checkedItemCount++;
-               tableView.SetItemChecked(itemIndex, true);
+               {
+                       __checkedItemCount++;
+                       tableView.SetItemChecked(itemIndex, true);
+               }
                break;
-       }
+
        case TABLE_VIEW_ITEM_STATUS_UNCHECKED:
-       {
-               __checkedItemCount--;
-               tableView.SetItemChecked(itemIndex, false);
+               {
+                       __checkedItemCount--;
+                       tableView.SetItemChecked(itemIndex, false);
+               }
                break;
-       }
+
        default:
-       {
                break;
-       }
        }//end of switch
 
        CommonUtil::ShowSelectAllCheckButton(*__pSelectAllCheckedButton);
 
-       if (__checkedItemCount == __pPresentationModel->GetSongContentCount())
+       if (__checkedItemCount == __pPresentationModel->GetContentCount(__pPresentationModel->GetCurrentFolderIndex()))
        {
                __pSelectAllCheckedButton->SetSelected(true);
        }
@@ -323,21 +316,23 @@ FolderContentPickerPanel::OnTableViewItemStateChanged(Tizen::Ui::Controls::Table
        AppAssert(pForm);
        CommonUtil::ShowCheckedCountLabel(*__pCheckedCountLabel, __checkedItemCount, *__pContentTableView, *pForm);
        CommonUtil::SetButtonEnabled(*pForm, __checkedItemCount);
+       AppLogDebug("EXIT");
 }
 
 void
 FolderContentPickerPanel::OnTableViewContextItemActivationStateChanged(Tizen::Ui::Controls::TableView& tableView,
-                                                                      int itemIndex,
-                                                                      Tizen::Ui::Controls::TableViewContextItem* pContextItem,
-                                                                      bool activated)
+                                                                               int itemIndex,
+                                                                               Tizen::Ui::Controls::TableViewContextItem* pContextItem,
+                                                                               bool activated)
 {
-       //AppLogDebug("OnTableViewContextItemActivationStateChanged");
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 void
 FolderContentPickerPanel::OnTableViewItemReordered(Tizen::Ui::Controls::TableView& tableView,
-                                                  int itemIndexFrom,
-                                                  int itemIndexTo)
+                                                               int itemIndexFrom,
+                                                               int itemIndexTo)
 {
-       //AppLogDebug("OnTableViewItemReordered");
-}
-
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
+}
\ No newline at end of file
old mode 100755 (executable)
new mode 100644 (file)
index e9f3b08..b5632d3
@@ -1,4 +1,4 @@
-//
+//
 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
 //
 // Licensed under the Flora License, Version 1.0 (the License);
 // limitations under the License.
 //
 
+/**
+ * @file               MpFolderListEditorPanel.cpp
+ * @brief              This is the implementation file for FolderListEditorPanel class.
+ */
+
 #include "MpFolderListEditorPanel.h"
 #include "MpPlaylistPickerPopup.h"
 
 using namespace Tizen::Base;
 using namespace Tizen::Base::Collection;
-using namespace Tizen::Graphics;
 using namespace Tizen::Content;
+using namespace Tizen::Graphics;
 using namespace Tizen::Social;
+using namespace Tizen::System;
 using namespace Tizen::Ui::Controls;
 using namespace Tizen::Ui::Scenes;
-using namespace Tizen::System;
 
-static const Tizen::Base::String STORAGE_PHONE_PATH     = Environment::GetMediaPath() + L"Sounds/";
-static const Tizen::Base::String STORAGE_SDCARD_PATH    = Environment::GetExternalStoragePath();
-static const Tizen::Base::String STORAGE_EXTERNAL_PATH  = Environment::GetMediaPath();
+static const Tizen::Base::String MEDIA_PATH = Environment::GetMediaPath();
+static const Tizen::Base::String EXTERNAL_STORAGE_PATH = Environment::GetExternalStoragePath();
+static const Tizen::Base::String MEDIA_SOUND_PATH = Environment::GetMediaPath() + L"Sounds";
+static const Tizen::Base::String SEPARATOR_SLASH = L"/";
+static const int DEPTH = 3;
 
-static const Tizen::Graphics::Rectangle RECT_FOLDER_ITEM_THUMBNAIL ( 16, 32, 64, 64);
-static const Tizen::Graphics::Rectangle RECT_FOLDER_ITEM_NAME      ( 96,  8,338, 56);
-static const Tizen::Graphics::Rectangle RECT_FOLDER_ITEM_COUNT     (434,  8,200, 56);
-static const Tizen::Graphics::Rectangle RECT_FOLDER_ITEM_PATH_NAME ( 96, 64,538, 56);
+static const Tizen::Graphics::Rectangle RECT_FOLDER_ITEM_THUMBNAIL (16, 32, 64, 64);
+static const Tizen::Graphics::Rectangle RECT_FOLDER_ITEM_NAME (96, 8, 338, 56);
+static const Tizen::Graphics::Rectangle RECT_FOLDER_ITEM_COUNT (434, 8, 200, 56);
+static const Tizen::Graphics::Rectangle RECT_FOLDER_ITEM_PATH_NAME (96, 64, 538, 56);
 
 FolderListEditorPanel::FolderListEditorPanel(void)
-: __pContentTableView(null)
-, __pSelectAllCheckedButton(null)
-, __pCheckedCountLabel(null)
-, __checkedItemCount(0)
-, __pPlayListPickerPopup(null)
+       : __pContentTableView(null)
+       , __pSelectAllCheckedButton(null)
+       , __pCheckedCountLabel(null)
+       , __checkedItemCount(0)
+       , __pPlayListPickerPopup(null)
 {
-       //AppLogDebug("FolderListEditorPanel");
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 
 FolderListEditorPanel::~FolderListEditorPanel(void)
 {
-       //AppLogDebug("~FolderListEditorPanel");
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 
 bool
 FolderListEditorPanel::Initialize(void)
 {
-       //AppLogDebug("Initialize");
+       AppLogDebug("ENTER");
        result r = Construct(Rectangle(INIT_VALUE, INIT_VALUE, INIT_VALUE, INIT_VALUE));
        if (IsFailed(r))
        {
                return false;
        }
+       AppLogDebug("EXIT");
        return true;
 }
 
 result
 FolderListEditorPanel::OnInitializing(void)
 {
-       //AppLogDebug("OnInitializing");
+       AppLogDebug("ENTER");
        __pPresentationModel = FolderListPresentationModel::GetInstance();
 
        Form* pForm = dynamic_cast<Form*>(GetParent());
        AppAssert(pForm);
 
-       int width  = pForm->GetClientAreaBounds().width;
+       int width = pForm->GetClientAreaBounds().width;
        int height = pForm->GetClientAreaBounds().height;
 
        SetBounds(INIT_VALUE, INIT_VALUE, width, height);
@@ -90,105 +100,106 @@ FolderListEditorPanel::OnInitializing(void)
        AddControl(*__pSelectAllCheckedButton);
        AddControl(*__pCheckedCountLabel);
 
+       AppLogDebug("EXIT");
        return E_SUCCESS;
 }
 
 result
 FolderListEditorPanel::OnTerminating(void)
 {
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
        return E_SUCCESS;
 }
 
 void
 FolderListEditorPanel::OnActionPerformed(const Tizen::Ui::Control& source, int actionId)
 {
-       //AppLogDebug("OnActionPerformed");
+       AppLogDebug("ENTER");
        SceneManager* pSceneManager = SceneManager::GetInstance();
        AppAssert(pSceneManager);
 
-       int totalCount = __pPresentationModel->GetTotalFolderCount();
+       int totalCount = __pPresentationModel->GetAllFolderCount();
 
-       switch(actionId)
+       switch (actionId)
        {
        case IDA_CHECK_BUTTON:
-       {
-               __checkedItemCount = totalCount;
-               CommonUtil::SetAllCheckState(true, *__pContentTableView, totalCount);
-               Form* pForm = dynamic_cast<Form*>(GetParent());
-               AppAssert(pForm);
-               CommonUtil::ShowCheckedCountLabel(*__pCheckedCountLabel, __checkedItemCount, *__pContentTableView, *pForm);
-               CommonUtil::SetButtonEnabled(*pForm, __checkedItemCount, actionId);
+               {
+                       __checkedItemCount = totalCount;
+                       CommonUtil::SetAllCheckState(true, *__pContentTableView, totalCount);
+                       Form* pForm = dynamic_cast<Form*>(GetParent());
+                       AppAssert(pForm);
+                       CommonUtil::ShowCheckedCountLabel(*__pCheckedCountLabel, __checkedItemCount, *__pContentTableView, *pForm);
+                       CommonUtil::SetButtonEnabled(*pForm, __checkedItemCount, actionId);
+               }
                break;
-       }
+
        case IDA_UNCHECK_BUTTON:
-       {
-               //AppLogDebug("IDA_UNCHECK_BUTTON");
-               __checkedItemCount = INIT_VALUE;
-               CommonUtil::SetAllCheckState(false, *__pContentTableView, totalCount);
-               Form* pForm = dynamic_cast<Form*>(GetParent());
-               AppAssert(pForm);
-               CommonUtil::ShowCheckedCountLabel(*__pCheckedCountLabel, __checkedItemCount, *__pContentTableView, *pForm);
-               CommonUtil::SetButtonEnabled(*pForm, __checkedItemCount, actionId);
+               {
+                       //AppLogDebug("IDA_UNCHECK_BUTTON");
+                       __checkedItemCount = INIT_VALUE;
+                       CommonUtil::SetAllCheckState(false, *__pContentTableView, totalCount);
+                       Form* pForm = dynamic_cast<Form*>(GetParent());
+                       AppAssert(pForm);
+                       CommonUtil::ShowCheckedCountLabel(*__pCheckedCountLabel, __checkedItemCount, *__pContentTableView, *pForm);
+                       CommonUtil::SetButtonEnabled(*pForm, __checkedItemCount, actionId);
+               }
                break;
-       }
+
        case IDA_FOOTER_BUTTON_ADD_TO_PLAYLIST:
-       {
-               if (__checkedItemCount <= INIT_VALUE)
                {
-                       return;
-               }
+                       if (__checkedItemCount <= INIT_VALUE)
+                       {
+                               return;
+                       }
 
-               ArrayList* pDataList = new (std::nothrow) ArrayList();
-               pDataList->Construct();
+                       ArrayList* pDataList = new (std::nothrow) ArrayList();
+                       pDataList->Construct();
 
-               int totalCount = __pPresentationModel->GetTotalFolderCount();
-               for(int iCount = 0; iCount < totalCount; iCount++)
-               {
-                       if (__pContentTableView->IsItemChecked(iCount) == true)
+                       int totalCount = __pPresentationModel->GetAllFolderCount();
+                       for (int iCount = 0; iCount < totalCount; iCount++)
                        {
-                               pDataList->AddItems(*(__pPresentationModel->SearchContentItemN(iCount)));
+                               if (__pContentTableView->IsItemChecked(iCount) == true)
+                               {
+                                       pDataList->AddItems(*(__pPresentationModel->GetContentPathListN(iCount)));
+                               }
                        }
-               }
 
-               if (__pPlayListPickerPopup == null)
-               {
                        __pPlayListPickerPopup = new (std::nothrow) PlayListPickerPopup();
-                       __pPlayListPickerPopup->Initialize();
+                       __pPlayListPickerPopup->Initialize(this, pDataList);
+                       //__pPlayListPickerPopup->SetCollectedContent(pDataList);
+                       __pPlayListPickerPopup->SetShowState(true);
+                       __pPlayListPickerPopup->Show();
+
+                       Form* pForm = dynamic_cast<Form*>(GetParent());
+                       AppAssert(pForm);
+                       CommonUtil::SetButtonEnabled(*pForm, __checkedItemCount, actionId);
                }
-
-               __pPlayListPickerPopup->SetCollectedContent(pDataList);
-               __pPlayListPickerPopup->SetShowState(true);
-               __pPlayListPickerPopup->Show();
-
-               Form* pForm = dynamic_cast<Form*>(GetParent());
-               AppAssert(pForm);
-               CommonUtil::SetButtonEnabled(*pForm, __checkedItemCount, actionId);
                break;
-       }
+
        case IDA_FOOTER_BUTTON_CANCEL:
-       {
-               //AppLogDebug("IDA_FOOTER_BUTTON_CANCEL");
-               pSceneManager->GoBackward(BackwardSceneTransition());
-               Form* pForm = dynamic_cast<Form*>(GetParent());
-               AppAssert(pForm);
+               {
+                       //AppLogDebug("IDA_FOOTER_BUTTON_CANCEL");
+                       pSceneManager->GoBackward(BackwardSceneTransition());
+                       Form* pForm = dynamic_cast<Form*>(GetParent());
+                       AppAssert(pForm);
 
-               CommonUtil::SetButtonEnabled(*pForm, __checkedItemCount, actionId);
+                       CommonUtil::SetButtonEnabled(*pForm, __checkedItemCount, actionId);
+               }
                break;
-       }
+
        default:
-       {
                break;
-       }
        }//end of switch
+       AppLogDebug("EXIT");
 }
 
 void
 FolderListEditorPanel::OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previousSceneId,
-                                                                    const Tizen::Ui::Scenes::SceneId& currentSceneId,
-                                                                    Tizen::Base::Collection::IList* pArgs)
+                                                                       const Tizen::Ui::Scenes::SceneId& currentSceneId,
+                                                                       Tizen::Base::Collection::IList* pArgs)
 {
-       //AppLogDebug("OnSceneActivatedN");
-
+       AppLogDebug("ENTER");
        Form* pForm = dynamic_cast<Form*>(GetParent());
        AppAssert(pForm);
 
@@ -204,14 +215,14 @@ FolderListEditorPanel::OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previ
                pArgs->RemoveAll(true);
                delete pArgs;
        }
+       AppLogDebug("EXIT");
 }
 
 void
 FolderListEditorPanel::OnSceneDeactivated(const Tizen::Ui::Scenes::SceneId& currentSceneId,
-                                          const Tizen::Ui::Scenes::SceneId& nextSceneId)
+                                               const Tizen::Ui::Scenes::SceneId& nextSceneId)
 {
-       //AppLogDebug("OnSceneDeactivated");
-
+       AppLogDebug("ENTER");
        Form* pForm = dynamic_cast<Form*>(GetParent());
        AppAssert(pForm);
 
@@ -224,120 +235,187 @@ FolderListEditorPanel::OnSceneDeactivated(const Tizen::Ui::Scenes::SceneId& curr
        CommonUtil::ShowCheckedCountLabel(*__pCheckedCountLabel, __checkedItemCount, *__pContentTableView, *pForm);
        CommonUtil::ShowSelectAllCheckButton(*__pSelectAllCheckedButton);
 
-       int totalCount = __pPresentationModel->GetTotalFolderCount();
-       for(int iCount = 0; iCount < totalCount; iCount++)
+       int totalCount = __pPresentationModel->GetAllFolderCount();
+       for (int iCount = 0; iCount < totalCount; iCount++)
        {
                __pContentTableView->SetItemChecked(iCount, false);
        }
+       AppLogDebug("EXIT");
 }
 
 int
 FolderListEditorPanel::GetItemCount(void)
 {
-       //AppLogDebug("GetItemCount");
-
+       AppLogDebug("ENTER");
        if (__pPresentationModel == null)
        {
                return INIT_VALUE;
        }
 
-       return __pPresentationModel->GetTotalFolderCount();
+       AppLogDebug("EXIT");
+       return __pPresentationModel->GetAllFolderCount();
 }
 
 Tizen::Ui::Controls::TableViewItem*
 FolderListEditorPanel::CreateItem(const int itemIndex, int itemWidth)
 {
-       //AppLogDebug("CreateTableViewItem");
-       ContentInformationStruct* pContentInfoStruct = __pPresentationModel->GetContentInfoN(itemIndex);
-       if (pContentInfoStruct == null)
-       {
-               return null;
-       }
-
-       TableViewItem* pItem = new (std::nothrow) TableViewItem;
+       AppLogDebug("ENTER");
+       TableViewItem* pItem = new (std::nothrow) TableViewItem();
        pItem->Construct(Dimension(itemWidth, ITEM_HEIGHT), TABLE_VIEW_ANNEX_STYLE_MARK);
        pItem->SetBackgroundColor(COLOR_ITEM);
 
-       String filePath = pContentInfoStruct->ContentFilePath;
+       String* pContentPath = __pPresentationModel->GetFolderPath(itemIndex);
        Bitmap* pFolderBitmap = null;
+       String fullContentPath = null;
+       String strFolderName = null;
+
+       int folderNamePosition = 0;
+       pContentPath->LastIndexOf(SEPARATOR_SLASH, pContentPath->GetLength() - 1, folderNamePosition);
+       pContentPath->SubString(folderNamePosition + 1, strFolderName);
 
-       if (filePath.StartsWith(STORAGE_SDCARD_PATH, 0) == true)
+       if (*pContentPath == MEDIA_SOUND_PATH)
+       {
+               pFolderBitmap = ResourceManager::GetBitmapN(STORAGE_PHONE_BITMAP);
+               fullContentPath = MEDIA_PATH;
+               fullContentPath.SubString(1, fullContentPath);
+       }
+       else if (*pContentPath == EXTERNAL_STORAGE_PATH)
        {
                pFolderBitmap = ResourceManager::GetBitmapN(STORAGE_SDCARD_BITMAP);
+               fullContentPath = EXTERNAL_STORAGE_PATH;
+               fullContentPath.SubString(1, fullContentPath);
        }
-       else if (filePath.StartsWith(STORAGE_PHONE_PATH, 0) == true)
+       else if (*pContentPath == MEDIA_PATH)
+       {
+               pFolderBitmap = ResourceManager::GetBitmapN(STORAGE_EXTERNAL_BITMAP);
+               pContentPath->SubString(0, folderNamePosition + 1, fullContentPath);
+               fullContentPath.SubString(1, fullContentPath);
+       }
+       else
        {
                pFolderBitmap = ResourceManager::GetBitmapN(STORAGE_PHONE_BITMAP);
+               pContentPath->SubString(0, folderNamePosition + 1, fullContentPath);
+               fullContentPath.SubString(1, fullContentPath);
        }
-       else if (filePath.StartsWith(STORAGE_EXTERNAL_PATH, 0) == true)
+
+       if (fullContentPath.GetLength() == 0)
        {
-               pFolderBitmap = ResourceManager::GetBitmapN(STORAGE_EXTERNAL_BITMAP);
+               fullContentPath = ResourceManager::GetString(L"IDS_EMAIL_OPT_MY_FOLDERS");
        }
 
-       CreateTableViewItem(*pItem, *pFolderBitmap, *pContentInfoStruct, __pPresentationModel->GetTotalContentCount(itemIndex));
+       int depthCount = 0;
+       wchar_t tempChar;
+       for (int iCount = 0; iCount < fullContentPath.GetLength(); iCount++)
+       {
+               fullContentPath.GetCharAt(iCount, tempChar);
+               if (SEPARATOR_SLASH.CompareTo(tempChar) == 0)
+               {
+                       depthCount++;
+               }
+       }
+       if (depthCount > DEPTH)
+       {
+               folderNamePosition = 0;
+               int tempIndex = 0;
+               for (int iCount = 0; iCount < DEPTH; iCount++)
+               {
+                       fullContentPath.IndexOf(SEPARATOR_SLASH, tempIndex, folderNamePosition);
+                       tempIndex = folderNamePosition + 1;
+               }
+               fullContentPath.SubString(tempIndex - 1, fullContentPath);
+               fullContentPath.Insert(L".", 0);
+       }
 
-       delete pFolderBitmap;
-       pFolderBitmap = null;
+       Label* pFolderThumbnailBG = new (std::nothrow) Label();
+       pFolderThumbnailBG->Construct(RECT_FOLDER_ITEM_THUMBNAIL, L"");
+       pFolderThumbnailBG->SetBackgroundColor(Color::GetColor(COLOR_ID_BLACK));
 
-       //test_code_start
-       delete pContentInfoStruct->pThumbnail;
-       pContentInfoStruct->pThumbnail = null;
+       Label* pFolderThumbnail = new (std::nothrow) Label();
+       pFolderThumbnail->Construct(RECT_FOLDER_ITEM_THUMBNAIL, L"");
+       pFolderThumbnail->SetBackgroundBitmap(*pFolderBitmap);
+
+       Label* pFolderName = new (std::nothrow) Label();
+       pFolderName->Construct(RECT_FOLDER_ITEM_NAME,L"");
+       pFolderName->SetTextConfig(FONT_SIZE, LABEL_TEXT_STYLE_NORMAL);
+       pFolderName->SetTextHorizontalAlignment(ALIGNMENT_LEFT);
+       pFolderName->SetText(strFolderName);
+
+       Label* pFolderCount = new (std::nothrow) Label();
+       pFolderCount->Construct(RECT_FOLDER_ITEM_COUNT, L"");
+       pFolderCount->SetTextConfig(FONT_SIZE, LABEL_TEXT_STYLE_NORMAL);
+       pFolderCount->SetTextHorizontalAlignment(ALIGNMENT_RIGHT);
+       pFolderCount->SetText(CommonUtil::SetSongsString(__pPresentationModel->GetContentCount(itemIndex)));
+
+       Label* pFolderPathName = new (std::nothrow) Label();
+       pFolderPathName->Construct(RECT_FOLDER_ITEM_PATH_NAME, L"");
+       pFolderPathName->SetTextConfig(FONT_SIZE, LABEL_TEXT_STYLE_NORMAL);
+       pFolderPathName->SetTextHorizontalAlignment(ALIGNMENT_LEFT);
+       pFolderPathName->SetText(fullContentPath);
+
+       pItem->AddControl(*pFolderThumbnailBG);
+       pItem->AddControl(*pFolderThumbnail);
+       pItem->AddControl(*pFolderName);
+       pItem->AddControl(*pFolderCount);
+       pItem->AddControl(*pFolderPathName);
 
-       delete pContentInfoStruct;
-       pContentInfoStruct = null;
-       //test_code_end
+       delete pFolderBitmap;
+       pFolderBitmap = null;
 
+       AppLogDebug("EXIT");
        return pItem;
 }
 
 bool
 FolderListEditorPanel::DeleteItem(const int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem)
 {
-       //AppLogDebug("DeleteItem");
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
        return true;
 }
 
-
 void
 FolderListEditorPanel::UpdateItem(int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem)
 {
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 
 int
 FolderListEditorPanel::GetDefaultItemHeight(void)
 {
-       //AppLogDebug("UpdateItem");
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
        return ITEM_HEIGHT;
 }
 
 void
 FolderListEditorPanel::OnTableViewItemStateChanged(Tizen::Ui::Controls::TableView& tableView,
-                                                 int itemIndex,
-                                                 Tizen::Ui::Controls::TableViewItem* pItem,
-                                                 Tizen::Ui::Controls::TableViewItemStatus status)
+                                                       int itemIndex,
+                                                       Tizen::Ui::Controls::TableViewItem* pItem,
+                                                       Tizen::Ui::Controls::TableViewItemStatus status)
 {
-       //AppLogDebug("OnTableViewItemStateChanged");
-       switch(status)
+       AppLogDebug("ENTER");
+       switch (status)
        {
        case TABLE_VIEW_ITEM_STATUS_CHECKED:
-       {
-               __checkedItemCount++;
-               tableView.SetItemChecked(itemIndex, true);
+               {
+                       __checkedItemCount++;
+                       tableView.SetItemChecked(itemIndex, true);
+               }
                break;
-       }
+
        case TABLE_VIEW_ITEM_STATUS_UNCHECKED:
-       {
-               if (__checkedItemCount > 0)
                {
-                       __checkedItemCount--;
+                       if (__checkedItemCount > 0)
+                       {
+                               __checkedItemCount--;
+                       }
+                       tableView.SetItemChecked(itemIndex, false);
                }
-               tableView.SetItemChecked(itemIndex, false);
                break;
-       }
+
        default:
-       {
                break;
-       }
        }//end of switch
 
        Form* pForm = dynamic_cast<Form*>(GetParent());
@@ -346,88 +424,67 @@ FolderListEditorPanel::OnTableViewItemStateChanged(Tizen::Ui::Controls::TableVie
 
        CommonUtil::ShowSelectAllCheckButton(*__pSelectAllCheckedButton);
 
-       if (__checkedItemCount == __pPresentationModel->GetTotalFolderCount())
+       if (__checkedItemCount == __pPresentationModel->GetAllFolderCount())
        {
                __pSelectAllCheckedButton->SetSelected(true);
        }
 
        Invalidate(true);
        CommonUtil::ShowCheckedCountLabel(*__pCheckedCountLabel, __checkedItemCount, *__pContentTableView, *pForm);
+       AppLogDebug("EXIT");
 }
 
 void
 FolderListEditorPanel::OnTableViewContextItemActivationStateChanged(Tizen::Ui::Controls::TableView& tableView,
-                                                                  int itemIndex,
-                                                                  Tizen::Ui::Controls::TableViewContextItem* pContextItem,
-                                                                  bool activated)
+                                                                               int itemIndex,
+                                                                               Tizen::Ui::Controls::TableViewContextItem* pContextItem,
+                                                                               bool activated)
 {
-       //AppLogDebug("OnTableViewContextItemActivationStateChanged");
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 
 void
 FolderListEditorPanel::OnTableViewItemReordered(Tizen::Ui::Controls::TableView& tableView,
-                                            int itemIndexFrom,
-                                            int itemIndexTo)
+                                                       int itemIndexFrom,
+                                                       int itemIndexTo)
 {
-       //AppLogDebug("OnTableViewItemReordered");
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 
-result
-FolderListEditorPanel::CreateTableViewItem(Tizen::Ui::Container& parent,
-                                           const Tizen::Graphics::Bitmap& folderIconBitmap,
-                                           const ContentInformationStruct& contentInfoStruct,
-                                           const int contentTotalCount)
+void
+FolderListEditorPanel::OnUpdateContentList(void)
 {
-       //AppLogDebug("CreateTableViewItem");
-       result r = E_SUCCESS;
-
-       Label* pFolderThumbnailBG = new Label();
-       pFolderThumbnailBG->Construct(RECT_FOLDER_ITEM_THUMBNAIL, L"");
-       pFolderThumbnailBG->SetBackgroundColor(Color::GetColor(COLOR_ID_BLACK));
-
-       Label* pItemThumbnail = new Label();
-       pItemThumbnail->Construct(RECT_FOLDER_ITEM_THUMBNAIL, L"");
-       pItemThumbnail->SetBackgroundBitmap(folderIconBitmap);
-
-       Label* pItemName = new Label();
-       pItemName->Construct(RECT_FOLDER_ITEM_NAME,L"");
-       pItemName->SetTextConfig(FONT_SIZE, LABEL_TEXT_STYLE_NORMAL);
-       pItemName->SetTextHorizontalAlignment(ALIGNMENT_LEFT);
-       pItemName->SetText(contentInfoStruct.AlbumName);
-
-       Label* pItemCount = new Label();
-       pItemCount->Construct(RECT_FOLDER_ITEM_COUNT, L"");
-       pItemCount->SetTextConfig(FONT_SIZE, LABEL_TEXT_STYLE_NORMAL);
-       pItemCount->SetTextHorizontalAlignment(ALIGNMENT_RIGHT);
-       pItemCount->SetText(CommonUtil::SetSongsString(contentTotalCount));
-
-       Label* pItemPathName = new Label();
-       pItemPathName->Construct(RECT_FOLDER_ITEM_PATH_NAME, L"");
-       pItemPathName->SetTextConfig(FONT_SIZE, LABEL_TEXT_STYLE_NORMAL);
-       pItemPathName->SetTextHorizontalAlignment(ALIGNMENT_LEFT);
-       pItemPathName->SetText(contentInfoStruct.ArtistName);
-
-       parent.AddControl(*pFolderThumbnailBG);
-       parent.AddControl(*pItemThumbnail);
-       parent.AddControl(*pItemName);
-       parent.AddControl(*pItemCount);
-       parent.AddControl(*pItemPathName);
-
-       return r;
+       AppLogDebug("ENTER");
+       UpdateContentList();
+       AppLogDebug("EXIT");
 }
 
 void
-FolderListEditorPanel::OnUpdateContentList(void)
+FolderListEditorPanel::OnUserEventReceivedN(RequestId requestId, Tizen::Base::Collection::IList* pArgs)
 {
-       UpdateContentList();
+       AppLogDebug("ENTER");
+       AppLogDebug("OnUserEventReceivedN %d", requestId);
+       if (requestId == ID_DESTORY_PLAY_LIST_PICKER_POPUP)
+       {
+               if (__pPlayListPickerPopup != null)
+               {
+                       delete __pPlayListPickerPopup;
+                       __pPlayListPickerPopup = null;
+               }
+       }
+       AppLogDebug("EXIT");
 }
 
 void
 FolderListEditorPanel::UpdateContentList(void)
 {
+       AppLogDebug("ENTER");
        if (__pPresentationModel != null && __pContentTableView != null)
        {
-               __pPresentationModel->RefreshContent();
+               __pPresentationModel->UpdateFolderPathList();
                __pContentTableView->UpdateTableView();
        }
-}
+       AppLogDebug("EXIT");
+}
\ No newline at end of file
old mode 100755 (executable)
new mode 100644 (file)
index dbf1b7d..ad9c64e
@@ -1,4 +1,4 @@
-//
+//
 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
 //
 // Licensed under the Flora License, Version 1.0 (the License);
 // limitations under the License.
 //
 
+/**
+ * @file               MpFolderListPanel.cpp
+ * @brief              This is the implementation file for FolderListPanel class.
+ */
+
 #include "MpFolderListPanel.h"
 #include "MpNowPlayContentPanel.h"
+#include "MpPlaylistPickerPopup.h"
 
 using namespace Tizen::Base;
 using namespace Tizen::Base::Collection;
-using namespace Tizen::Graphics;
 using namespace Tizen::Content;
+using namespace Tizen::Graphics;
+using namespace Tizen::Io;
 using namespace Tizen::Social;
+using namespace Tizen::System;
 using namespace Tizen::Ui;
 using namespace Tizen::Ui::Controls;
 using namespace Tizen::Ui::Scenes;
-using namespace Tizen::System;
-using namespace Tizen::Io;
 
 static const int W_FAST_SCROLL = 50;
-static const int SLASH_COUNT = 3;
 
-static const Tizen::Base::String STORAGE_PHONE_PATH     = Environment::GetMediaPath() + L"Sounds/";
-static const Tizen::Base::String STORAGE_SDCARD_PATH    = Environment::GetExternalStoragePath();
-static const Tizen::Base::String STORAGE_EXTERNAL_PATH  = Environment::GetMediaPath();
-static const Tizen::Base::String SEARCH_FOLDER_KEYWORD  = "/";
+static const Tizen::Base::String MEDIA_PATH = Environment::GetMediaPath();
+static const Tizen::Base::String EXTERNAL_STORAGE_PATH = Environment::GetExternalStoragePath();
+static const Tizen::Base::String MEDIA_SOUND_PATH = Environment::GetMediaPath() + L"Sounds";
+static const Tizen::Base::String SEPARATOR_SLASH = L"/";
+static const int DEPTH = 3;
 
-static const Tizen::Graphics::Rectangle RECT_FOLDER_ITEM_THUMBNAIL ( 16, 32, 64, 64);
-static const Tizen::Graphics::Rectangle RECT_FOLDER_ITEM_NAME      ( 96,  8,400, 56);
-static const Tizen::Graphics::Rectangle RECT_FOLDER_ITEM_COUNT     (496,  8,208, 56);
-static const Tizen::Graphics::Rectangle RECT_FOLDER_ITEM_PATH_NAME ( 96, 64,608, 56);
+static const Tizen::Graphics::Rectangle RECT_FOLDER_ITEM_THUMBNAIL (16, 32, 64, 64);
+static const Tizen::Graphics::Rectangle RECT_FOLDER_ITEM_NAME (96, 8, 400, 56);
+static const Tizen::Graphics::Rectangle RECT_FOLDER_ITEM_COUNT (496, 8, 208, 56);
+static const Tizen::Graphics::Rectangle RECT_FOLDER_ITEM_PATH_NAME (96, 64, 608, 56);
 
 FolderListPanel::FolderListPanel(void)
-: __itemIndex(-1)
-, __pNowPlayContentPanel(null)
-, __pContextItem(null)
-, __pContentTableView(null)
-, __pNoContentImageLabel(null)
-, __pNoContentTextLabel(null)
-, __pRenameEditArea(null)
-, __pRenamePanel(null)
-, __scrolledDistance(0)
+       : __itemIndex(-1)
+       , __pNowPlayContentPanel(null)
+       , __pPlayListPickerPopup(null)
+       , __pContextItem(null)
+       , __pContentTableView(null)
+       , __pNoContentImageLabel(null)
+       , __pNoContentTextLabel(null)
+       , __pRenameEditArea(null)
+       , __pRenamePanel(null)
+       , __scrolledDistance(0)
 {
-       AppLogDebug("Start");
-       AppLogDebug("End");
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 
 FolderListPanel::~FolderListPanel(void)
 {
-       AppLogDebug("Start");
-       AppLogDebug("End");
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 
 bool
 FolderListPanel::Initialize(void)
 {
-       AppLogDebug("Start");
+       AppLogDebug("ENTER");
 
        result r = Construct(Rectangle(0, 0, 0, 0));
        if (IsFailed(r))
@@ -73,7 +80,7 @@ FolderListPanel::Initialize(void)
                return false;
        }
 
-       AppLogDebug("End");
+       AppLogDebug("EXIT");
 
        return true;
 }
@@ -81,11 +88,11 @@ FolderListPanel::Initialize(void)
 result
 FolderListPanel::OnInitializing(void)
 {
-       AppLogDebug("Start");
+       AppLogDebug("ENTER");
        Form* pForm = dynamic_cast<Form*>(GetParent());
        AppAssert(pForm);
 
-       int width  = pForm->GetClientAreaBounds().width;
+       int width = pForm->GetClientAreaBounds().width;
        int height = pForm->GetClientAreaBounds().height;
 
        SetBounds(INIT_VALUE, INIT_VALUE, width, height);
@@ -97,15 +104,15 @@ FolderListPanel::OnInitializing(void)
        __pContentTableView->AddScrollEventListener(*this);
 
        __pNoContentImageLabel = new (std::nothrow) Label();
-       __pNoContentImageLabel->Construct(Rectangle((pForm->GetWidth() - W_NO_CONTENT)/ 2, Y_GAP_NO_CONTENT, W_NO_CONTENT, H_NO_CONTENT),L"");
+       __pNoContentImageLabel->Construct(Rectangle((pForm->GetWidth() - W_NO_CONTENT) / 2, Y_GAP_NO_CONTENT, W_NO_CONTENT, H_NO_CONTENT), L"");
        __pNoContentImageLabel->SetBackgroundBitmap(*(ResourceManager::GetBitmapN(NO_CONTENT_BITMAP)));
 
        __pNoContentTextLabel = new (std::nothrow) Label();
        __pNoContentTextLabel->Construct(Rectangle(0,
-                                                  __pNoContentImageLabel->GetHeight() + __pNoContentImageLabel->GetY(),
-                                                  pForm->GetWidth(),
-                                                  H_TEXT_NO_CONTENT),
-                                                  ResourceManager::GetString(L"IDS_COM_BODY_NO_ITEMS"));
+                                                               __pNoContentImageLabel->GetHeight() + __pNoContentImageLabel->GetY(),
+                                                               pForm->GetWidth(),
+                                                               H_TEXT_NO_CONTENT),
+                                                               ResourceManager::GetString(L"IDS_COM_BODY_NO_ITEMS"));
        __pNoContentTextLabel->SetTextConfig(FONT_SIZE_NO_CONTENT, LABEL_TEXT_STYLE_BOLD);
 
        __pContextItem = new (std::nothrow) TableViewContextItem();
@@ -117,14 +124,14 @@ FolderListPanel::OnInitializing(void)
        AddControl(*__pContentTableView);
 
        __pRenamePanel = new (std::nothrow) Panel();
-       __pRenamePanel->Construct(Rectangle(0,0, width - W_FAST_SCROLL, ITEM_HEIGHT -1));
+       __pRenamePanel->Construct(Rectangle(0, 0, width - W_FAST_SCROLL, ITEM_HEIGHT - 1));
 
        Label* pLabel = new (std::nothrow) Label();
-       pLabel->Construct(Rectangle(0,0,__pRenamePanel->GetWidth(),ITEM_HEIGHT),L"");
+       pLabel->Construct(Rectangle(0, 0, __pRenamePanel->GetWidth(), ITEM_HEIGHT), L"");
        pLabel->SetBackgroundColor(Color::GetColor(COLOR_ID_WHITE));
 
        __pRenameEditArea = new (std::nothrow) EditArea();
-       __pRenameEditArea->Construct(Rectangle(10, pLabel->GetY() + 10 ,540, pLabel->GetHeight() - 20), INPUT_STYLE_OVERLAY, 100);
+       __pRenameEditArea->Construct(Rectangle(10, pLabel->GetY() + 10540, pLabel->GetHeight() - 20), INPUT_STYLE_OVERLAY, 100);
        __pRenameEditArea->SetName(RENAME_EDIT_AREA);
        __pRenameEditArea->SetTextSize(28);
        __pRenameEditArea->SetTextAlignment(ALIGNMENT_LEFT);
@@ -149,7 +156,7 @@ FolderListPanel::OnInitializing(void)
 
        __pPresentationModel = FolderListPresentationModel::GetInstance();
 
-       AppLogDebug("End");
+       AppLogDebug("EXIT");
 
        return E_SUCCESS;
 }
@@ -157,118 +164,114 @@ FolderListPanel::OnInitializing(void)
 result
 FolderListPanel::OnTerminating(void)
 {
-       AppLogDebug("Start");
+       AppLogDebug("ENTER");
 
        delete __pContextItem;
        __pContextItem = null;
 
-       AppLogDebug("End");
+       AppLogDebug("EXIT");
        return E_SUCCESS;
 }
 
 void
 FolderListPanel::OnActionPerformed(const Tizen::Ui::Control& source, int actionId)
 {
-       AppLogDebug("Start");
+       AppLogDebug("ENTER");
 
        SceneManager* pSceneManager = SceneManager::GetInstance();
        AppAssert(pSceneManager);
 
-       switch(actionId)
+       switch (actionId)
        {
        case IDA_FOOTER_BUTTON_ADD_TO_PLAYLIST:
-       {
-               if (__pPresentationModel->GetTotalFolderCount() == 0)
                {
-                       MessageBox messageBox;
-                       messageBox.Construct(L"", ResourceManager::GetString(L"IDS_COM_BODY_NO_ITEMS"), MSGBOX_STYLE_NONE, 500);
+                       if (__pPresentationModel->GetAllFolderCount() == 0)
+                       {
+                               MessageBox messageBox;
+                               messageBox.Construct(L"", ResourceManager::GetString(L"IDS_COM_BODY_NO_ITEMS"), MSGBOX_STYLE_NONE, 500);
 
-                       int modalResult = 0;
-                       messageBox.ShowAndWait(modalResult);
-                       break;
+                               int modalResult = 0;
+                               messageBox.ShowAndWait(modalResult);
+                               break;
+                       }
+                       pSceneManager->GoForward(ForwardSceneTransition(IDSCN_FOLDER_LIST_EDITOR));
                }
-               pSceneManager->GoForward(ForwardSceneTransition(IDSCN_FOLDER_LIST_EDITOR));
                break;
-       }
+
        case IDA_FOOTER_BUTTON_SEARCH:
-       {
-               pSceneManager->GoForward(ForwardSceneTransition(IDSCN_SEARCH));
+               {
+                       pSceneManager->GoForward(ForwardSceneTransition(IDSCN_SEARCH));
+               }
                break;
-       }
+
        case IDA_FLICK_BUTTON_PLAY_ALL:
-       {
-               ArrayList* pData = new (std::nothrow) ArrayList();
-               pData->Construct();
+               {
+                       ArrayList* pData = new (std::nothrow) ArrayList();
+                       pData->Construct();
 
-               pData->Add(*(new (std::nothrow) String(MUSIC)));
-               pData->Add(*(new (std::nothrow) Integer(0)));
-               pData->Add(*(__pPresentationModel->GetContenList(__itemIndex)));
+                       pData->Add(*(new (std::nothrow) String(MUSIC)));
+                       pData->Add(*(new (std::nothrow) Integer(0)));
+                       pData->Add(*(__pPresentationModel->GetContentPathListN(__itemIndex)));
 
-               pSceneManager->GoForward(ForwardSceneTransition(IDSCN_PLAYER), pData);
+                       pSceneManager->GoForward(ForwardSceneTransition(IDSCN_PLAYER), pData);
+               }
                break;
-       }
-//     case IDA_FLICK_BUTTON_RENAME:
-//     {
-//             if (__pRenameEditArea != null && __pPresentationModel != null)
-//             {
-//                     int textPosition = 0;
-//                     String strResult = null;
-//                     String* pContentPath = __pPresentationModel->GetPath(__itemIndex);
-//
-//                     pContentPath->LastIndexOf(SEARCH_FOLDER_KEYWORD, pContentPath->GetLength() -1, textPosition);
-//                     pContentPath->SubString(textPosition + 1, strResult);
-//
-//                     __pRenameEditArea->SetText(strResult);
-//             }
-//             break;
-//     }
+
        case IDA_FLICK_BUTTON_DELETE:
-       {
-//             __pPresentationModel->RemoveContent(__itemIndex);
-//             __pContentTableView->RefreshItem(__itemIndex, TABLE_VIEW_REFRESH_TYPE_ITEM_REMOVE);
+               {
+               }
                break;
-       }
+
        case IDA_RENAME_CANCEL_BUTTON:
-       {
-               HideKeypadAndRenamePanel();
+               {
+                       HideKeypadAndRenamePanel();
+               }
                break;
-       }
+
+       case IDA_FLICK_BUTTON_ADD_TO_PALYLIST:
+               {
+                       __pPlayListPickerPopup = new (std::nothrow) PlayListPickerPopup();
+                       __pPlayListPickerPopup->Initialize(this, __pPresentationModel->GetContentPathListN(__itemIndex));
+                       //__pPlayListPickerPopup->SetCollectedContent(__pPresentationModel->GetContentPathListN(__itemIndex));
+                       __pPlayListPickerPopup->SetShowState(true);
+                       __pPlayListPickerPopup->Show();
+               }
+               break;
+
        default:
-       {
                break;
        }
-       }//end of switch
 
-       AppLogDebug("End");
+       AppLogDebug("EXIT");
 }
 
 void
 FolderListPanel::OnFormBackRequested(Tizen::Ui::Controls::Form& source)
 {
-       AppLogDebug("Start");
+       AppLogDebug("ENTER");
        if (CommonUtil::GetAddtoPlaylistState() == true)
        {
                SceneManager* pSceneManager = SceneManager::GetInstance();
                AppAssert(pSceneManager);
                pSceneManager->GoForward(ForwardSceneTransition(IDSCN_PLAYLIST_LIST,
-                                                        SCENE_TRANSITION_ANIMATION_TYPE_NONE,
-                                                        SCENE_HISTORY_OPTION_NO_HISTORY,
-                                                        SCENE_DESTROY_OPTION_DESTROY));
+                                                               SCENE_TRANSITION_ANIMATION_TYPE_NONE,
+                                                               SCENE_HISTORY_OPTION_NO_HISTORY,
+                                                               SCENE_DESTROY_OPTION_DESTROY));
                CommonUtil::SetAddtoPlaylistState(false);
        }
        else
        {
                Tizen::App::Application::GetInstance()->Terminate();
        }
-       AppLogDebug("End");
+       AppLogDebug("EXIT");
 }
 
 void
 FolderListPanel::OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previousSceneId,
-                                   const Tizen::Ui::Scenes::SceneId& currentSceneId,
-                                   Tizen::Base::Collection::IList* pArgs)
+                                       const Tizen::Ui::Scenes::SceneId& currentSceneId,
+                                       Tizen::Base::Collection::IList* pArgs)
 {
-       AppLogDebug("Start");
+       AppLogDebug("ENTER");
 
        Form* pForm = dynamic_cast<Form*>(GetParent());
        AppAssert(pForm);
@@ -295,7 +298,7 @@ FolderListPanel::OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previousSce
        UpdateContentList();
        if (__pPresentationModel != null)
        {
-               int totalFolderCount = __pPresentationModel->GetTotalFolderCount();
+               int totalFolderCount = __pPresentationModel->GetAllFolderCount();
                CommonUtil::SetButtonEnabled(*pForm, totalFolderCount, IDA_FOOTER_BUTTON_ADD_TO_PLAYLIST);
 
                CommonUtil::ShowNoContentImage(totalFolderCount, *__pContentTableView, *__pNoContentImageLabel, *__pNoContentTextLabel);
@@ -306,14 +309,14 @@ FolderListPanel::OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previousSce
                delete pArgs;
        }
 
-       AppLogDebug("End");
+       AppLogDebug("EXIT");
 }
 
 void
 FolderListPanel::OnSceneDeactivated(const Tizen::Ui::Scenes::SceneId& currentSceneId,
-                                                               const Tizen::Ui::Scenes::SceneId& nextSceneId)
+                                                               const Tizen::Ui::Scenes::SceneId& nextSceneId)
 {
-       AppLogDebug("Start");
+       AppLogDebug("ENTER");
 
        HideKeypadAndRenamePanel();
 
@@ -325,56 +328,65 @@ FolderListPanel::OnSceneDeactivated(const Tizen::Ui::Scenes::SceneId& currentSce
        pFooter->RemoveAllItems();
        pFooter->RemoveActionEventListener(*this);
 
-       AppLogDebug("End");
+       AppLogDebug("EXIT");
 }
 
 int
 FolderListPanel::GetItemCount(void)
 {
-       AppLogDebug("Start");
+       AppLogDebug("ENTER");
 
        if (__pPresentationModel == null)
        {
                return INIT_VALUE;
        }
 
-       AppLogDebug("End");
+       AppLogDebug("EXIT");
 
-       return __pPresentationModel->GetTotalFolderCount();
+       return __pPresentationModel->GetAllFolderCount();
 }
 
 Tizen::Ui::Controls::TableViewItem*
 FolderListPanel::CreateItem(const int itemIndex, int itemWidth)
 {
-       AppLogDebug("Start");
+       AppLogDebug("ENTER");
 
        TableViewItem* pItem = new (std::nothrow) TableViewItem();
        pItem->Construct(Dimension(itemWidth, ITEM_HEIGHT), TABLE_VIEW_ANNEX_STYLE_NORMAL);
        pItem->SetBackgroundColor(COLOR_ITEM);
 
-       String* pContentPath = __pPresentationModel->GetPath(itemIndex);
+       String* pContentPath = __pPresentationModel->GetFolderPath(itemIndex);
        Bitmap* pFolderBitmap = null;
-
-       int textPosition = 0;
-       String strFolderName = null;
        String fullContentPath = null;
-       pContentPath->LastIndexOf(SEARCH_FOLDER_KEYWORD, pContentPath->GetLength()-1, textPosition);
-       pContentPath->SubString(textPosition + 1, strFolderName);
+       String strFolderName = null;
+
+       int folderNamePosition = 0;
+       pContentPath->LastIndexOf(SEPARATOR_SLASH, pContentPath->GetLength() - 1, folderNamePosition);
+       pContentPath->SubString(folderNamePosition + 1, strFolderName);
 
-       if (String::Compare(STORAGE_SDCARD_PATH, *pContentPath) > 0)
+       if (*pContentPath == MEDIA_SOUND_PATH)
        {
-               pFolderBitmap = ResourceManager::GetBitmapN(STORAGE_SDCARD_BITMAP);
-               pContentPath->SubString(STORAGE_SDCARD_PATH.GetLength(), fullContentPath);
+               pFolderBitmap = ResourceManager::GetBitmapN(STORAGE_PHONE_BITMAP);
+               fullContentPath = MEDIA_PATH;
+               fullContentPath.SubString(1, fullContentPath);
        }
-       else if (String::Compare(STORAGE_PHONE_BITMAP, *pContentPath) > 0)
+       else if (*pContentPath == EXTERNAL_STORAGE_PATH)
        {
-               pFolderBitmap = ResourceManager::GetBitmapN(STORAGE_PHONE_BITMAP);
-               pContentPath->SubString(STORAGE_PHONE_PATH.GetLength(), fullContentPath);
+               pFolderBitmap = ResourceManager::GetBitmapN(STORAGE_SDCARD_BITMAP);
+               fullContentPath = EXTERNAL_STORAGE_PATH;
+               fullContentPath.SubString(1, fullContentPath);
        }
-       else if (String::Compare(STORAGE_EXTERNAL_BITMAP, *pContentPath) > 0)
+       else if (*pContentPath == MEDIA_PATH)
        {
                pFolderBitmap = ResourceManager::GetBitmapN(STORAGE_EXTERNAL_BITMAP);
-               pContentPath->SubString(STORAGE_EXTERNAL_PATH.GetLength(), fullContentPath);
+               pContentPath->SubString(0, folderNamePosition + 1, fullContentPath);
+               fullContentPath.SubString(1, fullContentPath);
+       }
+       else
+       {
+               pFolderBitmap = ResourceManager::GetBitmapN(STORAGE_PHONE_BITMAP);
+               pContentPath->SubString(0, folderNamePosition + 1, fullContentPath);
+               fullContentPath.SubString(1, fullContentPath);
        }
 
        if (fullContentPath.GetLength() == 0)
@@ -382,65 +394,50 @@ FolderListPanel::CreateItem(const int itemIndex, int itemWidth)
                fullContentPath = ResourceManager::GetString(L"IDS_EMAIL_OPT_MY_FOLDERS");
        }
 
-       textPosition = 0;
-       fullContentPath.LastIndexOf(SEARCH_FOLDER_KEYWORD, fullContentPath.GetLength()-1, textPosition);
-
-       if(textPosition >= 0)
+       int depthCount = 0;
+       wchar_t tempChar;
+       for (int iCount = 0; iCount < fullContentPath.GetLength(); iCount++)
        {
-               int slashCount = 0;
-               wchar_t tempChar;
-               for(int iCount = 0; iCount < fullContentPath.GetLength(); iCount++)
+               fullContentPath.GetCharAt(iCount, tempChar);
+               if (SEPARATOR_SLASH.CompareTo(tempChar) == 0)
                {
-                       fullContentPath.GetCharAt(iCount, tempChar);
-                       if (SEARCH_FOLDER_KEYWORD.CompareTo(tempChar) == 0)
-                       {
-                               slashCount++;
-                       }
+                       depthCount++;
                }
-
-               if (slashCount >= SLASH_COUNT)
+       }
+       if (depthCount > DEPTH)
+       {
+               folderNamePosition = 0;
+               int tempIndex = 0;
+               for (int iCount = 0; iCount < DEPTH; iCount++)
                {
-                       textPosition = 0;
-                       if ((slashCount - SLASH_COUNT) == 0)
-                       {
-                               fullContentPath.IndexOf(SEARCH_FOLDER_KEYWORD, 0, textPosition);
-                       }
-                       else
-                       {
-                               int tempIndex = 0;
-                               for(int iCount = 0; iCount <= (slashCount - SLASH_COUNT); iCount++)
-                               {
-                                       fullContentPath.IndexOf(SEARCH_FOLDER_KEYWORD, tempIndex, textPosition);
-                                       tempIndex = textPosition + 1;
-                               }
-                       }
-
-                       fullContentPath.SubString(textPosition, fullContentPath);
-                       fullContentPath.Insert(L".", 0);
+                       fullContentPath.IndexOf(SEPARATOR_SLASH, tempIndex, folderNamePosition);
+                       tempIndex = folderNamePosition + 1;
                }
+               fullContentPath.SubString(tempIndex - 1, fullContentPath);
+               fullContentPath.Insert(L".", 0);
        }
 
-       Label* pFolderThumbnailBG = new Label();
+       Label* pFolderThumbnailBG = new (std::nothrow) Label();
        pFolderThumbnailBG->Construct(RECT_FOLDER_ITEM_THUMBNAIL, L"");
        pFolderThumbnailBG->SetBackgroundColor(Color::GetColor(COLOR_ID_BLACK));
 
-       Label* pFolderThumbnail = new Label();
+       Label* pFolderThumbnail = new (std::nothrow) Label();
        pFolderThumbnail->Construct(RECT_FOLDER_ITEM_THUMBNAIL, L"");
        pFolderThumbnail->SetBackgroundBitmap(*pFolderBitmap);
 
-       Label* pFolderName = new Label();
+       Label* pFolderName = new (std::nothrow) Label();
        pFolderName->Construct(RECT_FOLDER_ITEM_NAME,L"");
        pFolderName->SetTextConfig(FONT_SIZE, LABEL_TEXT_STYLE_NORMAL);
        pFolderName->SetTextHorizontalAlignment(ALIGNMENT_LEFT);
        pFolderName->SetText(strFolderName);
 
-       Label* pFolderCount = new Label();
+       Label* pFolderCount = new (std::nothrow) Label();
        pFolderCount->Construct(RECT_FOLDER_ITEM_COUNT, L"");
        pFolderCount->SetTextConfig(FONT_SIZE, LABEL_TEXT_STYLE_NORMAL);
        pFolderCount->SetTextHorizontalAlignment(ALIGNMENT_RIGHT);
-       pFolderCount->SetText(CommonUtil::SetSongsString(__pPresentationModel->GetTotalContentCount(itemIndex)));
+       pFolderCount->SetText(CommonUtil::SetSongsString(__pPresentationModel->GetContentCount(itemIndex)));
 
-       Label* pFolderPathName = new Label();
+       Label* pFolderPathName = new (std::nothrow) Label();
        pFolderPathName->Construct(RECT_FOLDER_ITEM_PATH_NAME, L"");
        pFolderPathName->SetTextConfig(FONT_SIZE, LABEL_TEXT_STYLE_NORMAL);
        pFolderPathName->SetTextHorizontalAlignment(ALIGNMENT_LEFT);
@@ -457,7 +454,7 @@ FolderListPanel::CreateItem(const int itemIndex, int itemWidth)
 
        pItem->SetContextItem(__pContextItem);
 
-       AppLogDebug("End");
+       AppLogDebug("EXIT");
 
        return pItem;
 }
@@ -465,33 +462,33 @@ FolderListPanel::CreateItem(const int itemIndex, int itemWidth)
 bool
 FolderListPanel::DeleteItem(const int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem)
 {
-       AppLogDebug("Start");
-       AppLogDebug("End");
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
        return true;
 }
 
 void
 FolderListPanel::UpdateItem(int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem)
 {
-       AppLogDebug("Start");
-       AppLogDebug("End");
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 
 int
 FolderListPanel::GetDefaultItemHeight(void)
 {
-       AppLogDebug("Start");
-       AppLogDebug("End");
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
        return ITEM_HEIGHT;
 }
 
 void
 FolderListPanel::OnTableViewItemStateChanged(Tizen::Ui::Controls::TableView& tableView,
-                                             int itemIndex,
-                                             Tizen::Ui::Controls::TableViewItem* pItem,
-                                             Tizen::Ui::Controls::TableViewItemStatus status)
+                                                       int itemIndex,
+                                                       Tizen::Ui::Controls::TableViewItem* pItem,
+                                                       Tizen::Ui::Controls::TableViewItemStatus status)
 {
-       AppLogDebug("Start");
+       AppLogDebug("ENTER");
 
        SceneManager* pSceneManager = SceneManager::GetInstance();
        AppAssert(pSceneManager);
@@ -500,24 +497,24 @@ FolderListPanel::OnTableViewItemStateChanged(Tizen::Ui::Controls::TableView& tab
        {
                ArrayList* pData = new (std::nothrow) ArrayList();
                pData->Construct();
-               pData->Add(*(new String(IDSCN_FOLDER_LIST)));
-               pData->Add(*(__pPresentationModel->GetPath(itemIndex)));
-
-               pSceneManager->GoForward(ForwardSceneTransition(IDSCN_CONTENT_LIST), pData);
+               pData->Add(*(new (std::nothrow) String(IDSCN_FOLDER_LIST)));
+               pData->Add(*(__pPresentationModel->GetFolderPath(itemIndex)));
+               pData->Add(*(new (std::nothrow) Integer(itemIndex)));
+               pSceneManager->GoForward(ForwardSceneTransition(IDSCN_FOLDER_CONTENT_LIST), pData);
        }
 
        HideKeypadAndRenamePanel();
 
-       AppLogDebug("End");
+       AppLogDebug("EXIT");
 }
 
 void
 FolderListPanel::OnTableViewContextItemActivationStateChanged(Tizen::Ui::Controls::TableView& tableView,
-                                                              int itemIndex,
-                                                              Tizen::Ui::Controls::TableViewContextItem* pContextItem,
-                                                              bool activated)
+                                                                       int itemIndex,
+                                                                       Tizen::Ui::Controls::TableViewContextItem* pContextItem,
+                                                                       bool activated)
 {
-       AppLogDebug("Start");
+       AppLogDebug("ENTER");
 
        if (activated == true)
        {
@@ -526,71 +523,28 @@ FolderListPanel::OnTableViewContextItemActivationStateChanged(Tizen::Ui::Control
 
        HideKeypadAndRenamePanel();
 
-       AppLogDebug("End");
+       AppLogDebug("EXIT");
 }
 
 void
 FolderListPanel::OnTableViewItemReordered(Tizen::Ui::Controls::TableView& tableView,
-                                          int itemIndexFrom,
-                                          int itemIndexTo)
+                                               int itemIndexFrom,
+                                               int itemIndexTo)
 {
-       AppLogDebug("Start");
-       AppLogDebug("End");
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 
-/*result
-FolderListPanel::CreateTableViewContextItem(Tizen::Ui::Controls::TableViewContextItem& parent)
-{
-       AppLogDebug("Start");
-
-       result r = E_SUCCESS;
-
-       int button_W = (parent.GetWidth() - (X_GAP_CONTEXT_ITME * 2)) / 2;
-       int button_H = parent.GetHeight() - (Y_GAP_CONTEXT_ITEM * 2);
-
-       Button* pPlayAllButton = new Button();
-       pPlayAllButton->Construct(Rectangle(X_GAP_CONTEXT_ITME, Y_GAP_CONTEXT_ITEM, button_W, button_H));
-       pPlayAllButton->SetText(ResourceManager::GetString(L"IDS_MUSIC_OPT_MOREMENU_PLAY_ALL"));
-       pPlayAllButton->SetActionId(IDA_FLICK_BUTTON_PLAY_ALL);
-       pPlayAllButton->SetTextSize(FONT_SIZE - 2);
-       pPlayAllButton->AddActionEventListener(*this);
-
-//     Button* pRenameButton = new Button();
-//     pRenameButton->Construct(Rectangle(222, 60, 212, 65), ResourceManager::GetString("IDS_FLICK_RENAME"));
-//     pRenameButton->SetTextSize(FONT_SIZE - 2);
-//     pRenameButton->SetActionId(IDA_FLICK_BUTTON_RENAME);
-//     pRenameButton->AddActionEventListener(*this);
-//     pRenameButton->AddTouchEventListener(*this);
-
-//     Button* pDeleteButton = new Button();
-//     pDeleteButton->Construct(Rectangle(pPlayAllButton->GetX() + button_W, Y_GAP_CONTEXT_ITEM,  button_W, button_H));
-//     pDeleteButton->SetText(ResourceManager::GetString("IDS_MUSIC_SK3_DELETE"));
-//     pDeleteButton->SetActionId(IDA_FLICK_BUTTON_DELETE);
-//     pDeleteButton->SetTextSize(FONT_SIZE - 2);
-//     pDeleteButton->AddActionEventListener(*this);
-
-       parent.SetIndividualSelectionEnabled(pPlayAllButton, true);
-//     parent.SetIndividualSelectionEnabled(pRenameButton, true);
-//     parent.SetIndividualSelectionEnabled(pDeleteButton, true);
-
-       parent.AddControl(*pPlayAllButton);
-//     parent.AddControl(*pRenameButton);
-//     parent.AddControl(*pDeleteButton);
-
-       AppLogDebug("End");
-
-       return r;
-}*/
 
 void
 FolderListPanel::OnFastScrollIndexSelected(Tizen::Ui::Control& source, Tizen::Base::String& index)
 {
-       AppLogDebug("Start");
+       AppLogDebug("ENTER");
 
-       int totalCount = __pPresentationModel->GetTotalFolderCount();
-       for(int iCount = 0; iCount < totalCount; iCount++)
+       int totalCount = __pPresentationModel->GetAllFolderCount();
+       for (int iCount = 0; iCount < totalCount; iCount++)
        {
-               String* pName = __pPresentationModel->GetContentName(iCount);
+               String* pName = __pPresentationModel->GetFolderName(iCount);
                String firstCharacter;
 
                pName->SubString(0, 1, firstCharacter);
@@ -601,12 +555,12 @@ FolderListPanel::OnFastScrollIndexSelected(Tizen::Ui::Control& source, Tizen::Ba
 
                if (Character::GetUnicodeCategory(language) == UNICODE_HANGUL)
                {
-                       Tizen::Base::String HangulIndex[] = {"ㄱ", "ㄲ", "ㄴ", "ㄷ", "ㄸ", "ㄹ", "ㅁ", "ㅂ", "ㅃ","ㅅ", "ㅆ", "ㅇ" , "ㅈ", "ㅉ", "ㅊ", "ㅋ", "ㅌ", "ㅍ", "ㅎ"        };
+                       Tizen::Base::String HangulIndex[] = {"ㄱ", "ㄲ", "ㄴ", "ㄷ", "ㄸ", "ㄹ", "ㅁ", "ㅂ", "ㅃ", "ㅅ", "ㅆ", "ㅇ" , "ㅈ", "ㅉ", "ㅊ", "ㅋ", "ㅌ", "ㅍ", "ㅎ"};
 
                        wchar_t songName;
                        pName->GetCharAt(0, songName);
 
-                       wchar_t UnicodeValue     = (songName - 0xAC00);
+                       wchar_t UnicodeValue = (songName - 0xAC00);
                        wchar_t InitialConsonant = ((UnicodeValue - (UnicodeValue % 28)) / 28) / 21;
                        int tempIndex = static_cast<int>(InitialConsonant);
 
@@ -628,26 +582,26 @@ FolderListPanel::OnFastScrollIndexSelected(Tizen::Ui::Control& source, Tizen::Ba
                }
        }//end of for
 
-       AppLogDebug("End");
+       AppLogDebug("EXIT");
 }
 
 void
-FolderListPanel::OnScrollEndReached (Tizen::Ui::Control &source, Tizen::Ui::Controls::ScrollEndEvent type)
+FolderListPanel::OnScrollEndReached (Tizen::Ui::Controlsource, Tizen::Ui::Controls::ScrollEndEvent type)
 {
-       AppLogDebug("Start");
+       AppLogDebug("ENTER");
 
        if (type == SCROLL_END_EVENT_END_TOP)
        {
                __scrolledDistance = 0;
        }
 
-       AppLogDebug("End");
+       AppLogDebug("EXIT");
 }
 
 void
-FolderListPanel::OnScrollPositionChanged (Tizen::Ui::Control &source, int scrollPos)
+FolderListPanel::OnScrollPositionChanged (Tizen::Ui::Controlsource, int scrollPos)
 {
-       AppLogDebug("Start");
+       AppLogDebug("ENTER");
 
        if (__pRenamePanel != null && __pRenamePanel->GetShowState() == true)
        {
@@ -656,27 +610,27 @@ FolderListPanel::OnScrollPositionChanged (Tizen::Ui::Control &source, int scroll
        }
        __scrolledDistance = scrollPos;
 
-       AppLogDebug("End");
+       AppLogDebug("EXIT");
 }
 
 void
-FolderListPanel::OnScrollStopped (Tizen::Ui::Control &source)
+FolderListPanel::OnScrollStopped (Tizen::Ui::Controlsource)
 {
-       AppLogDebug("Start");
-       AppLogDebug("End");
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 
-void
+/*void
 FolderListPanel::OnTouchPressed(const Tizen::Ui::Control& source, const Tizen::Graphics::Point& currentPosition, const Tizen::Ui::TouchEventInfo& touchInfo)
 {
-       AppLogDebug("Start");
-       AppLogDebug("End");
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 
 void
 FolderListPanel::OnTouchReleased(const Tizen::Ui::Control& source, const Tizen::Graphics::Point& currentPosition, const Tizen::Ui::TouchEventInfo& touchInfo)
 {
-       AppLogDebug("Start");
+       AppLogDebug("ENTER");
 
        TableViewContextItem* pParent = static_cast<TableViewContextItem*>(source.GetParent());
        if (pParent == null)
@@ -688,9 +642,9 @@ FolderListPanel::OnTouchReleased(const Tizen::Ui::Control& source, const Tizen::
        {
                int textPosition = 0;
                String strResult = null;
-               String* pContentPath = __pPresentationModel->GetPath(__itemIndex);
+               String* pContentPath = __pPresentationModel->GetFolderPath(__itemIndex);
 
-               pContentPath->LastIndexOf(SEARCH_FOLDER_KEYWORD, pContentPath->GetLength() -1, textPosition);
+               pContentPath->LastIndexOf(SEPARATOR_SLASH, pContentPath->GetLength() - 1, textPosition);
                pContentPath->SubString(textPosition + 1, strResult);
 
                __pRenameEditArea->SetText(strResult);
@@ -721,109 +675,108 @@ FolderListPanel::OnTouchReleased(const Tizen::Ui::Control& source, const Tizen::
 
        Invalidate(true);
 
-       AppLogDebug("End");
+       AppLogDebug("EXIT");
 }
 
 void
 FolderListPanel::OnTouchMoved(const Tizen::Ui::Control& source, const Tizen::Graphics::Point& currentPosition, const Tizen::Ui::TouchEventInfo& touchInfo)
 {
-       AppLogDebug("Start");
-       AppLogDebug("End");
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 
 void
 FolderListPanel::OnTouchFocusIn(const Tizen::Ui::Control& source, const Tizen::Graphics::Point& currentPosition, const Tizen::Ui::TouchEventInfo& touchInfo)
 {
-       AppLogDebug("Start");
-       AppLogDebug("End");
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 
 void
 FolderListPanel::OnTouchFocusOut(const Tizen::Ui::Control& source, const Tizen::Graphics::Point& currentPosition, const Tizen::Ui::TouchEventInfo& touchInfo)
 {
-       AppLogDebug("Start");
-       AppLogDebug("End");
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 
 void
 FolderListPanel::OnTouchLongPressed(const Tizen::Ui::Control& source, const Tizen::Graphics::Point& currentPosition, const Tizen::Ui::TouchEventInfo& touchInfo)
 {
-       AppLogDebug("Start");
-       AppLogDebug("End");
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 
 void
 FolderListPanel::OnTouchDoublePressed(const Tizen::Ui::Control& source, const Tizen::Graphics::Point& currentPosition, const Tizen::Ui::TouchEventInfo& touchInfo)
 {
-       AppLogDebug("Start");
-       AppLogDebug("End");
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 
 void
 FolderListPanel::OnTouchCanceled(const Tizen::Ui::Control& source, const Tizen::Graphics::Point& currentPosition, const Tizen::Ui::TouchEventInfo& touchInfo)
 {
-       AppLogDebug("Start");
-       AppLogDebug("End");
-}
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
+}*/
 
 void
 FolderListPanel::OnKeypadActionPerformed(Tizen::Ui::Control& source, Tizen::Ui::KeypadAction keypadAction)
 {
-       AppLogDebug("Start");
+       AppLogDebug("ENTER");
 
        if (__pPresentationModel == null)
        {
                return;
        }
 
-       switch(keypadAction)
+       switch (keypadAction)
        {
        case KEYPAD_ACTION_DONE:
-       {
-               int textPosition = 0;
-               String strResult = null;
-               String* pContentPath = __pPresentationModel->GetPath(__itemIndex);
-
-               pContentPath->LastIndexOf(SEARCH_FOLDER_KEYWORD, pContentPath->GetLength() -1, textPosition);
-               pContentPath->SubString(textPosition + 1, strResult);
-
-               if (strResult.CompareTo(__pRenameEditArea->GetText()) != 0)
                {
-                       String modifyDirectoryName = null;
+                       int textPosition = 0;
+                       String strResult = null;
+                       String* pContentPath = __pPresentationModel->GetFolderPath(__itemIndex);
 
-                       pContentPath->SubString(0, textPosition + 1, modifyDirectoryName);
-                       modifyDirectoryName.Append(__pRenameEditArea->GetText());
+                       pContentPath->LastIndexOf(SEPARATOR_SLASH, pContentPath->GetLength() -1, textPosition);
+                       pContentPath->SubString(textPosition + 1, strResult);
 
-                       result r = Directory::Rename(*pContentPath, modifyDirectoryName);
-                       if (IsFailed(r))
+                       if (strResult.CompareTo(__pRenameEditArea->GetText()) != 0)
                        {
-                               HideKeypadAndRenamePanel();
-                               break;
-                       }
+                               String modifyDirectoryName = null;
 
-                       if (__pPresentationModel != null && __pContentTableView != null)
-                       {
-                               __pPresentationModel->RefreshContent();
-                               __pContentTableView->UpdateTableView();
+                               pContentPath->SubString(0, textPosition + 1, modifyDirectoryName);
+                               modifyDirectoryName.Append(__pRenameEditArea->GetText());
+
+                               result r = Directory::Rename(*pContentPath, modifyDirectoryName);
+                               if (IsFailed(r))
+                               {
+                                       HideKeypadAndRenamePanel();
+                                       break;
+                               }
+
+                               if (__pPresentationModel != null && __pContentTableView != null)
+                               {
+                                       __pPresentationModel->UpdateFolderPathList();
+                                       __pContentTableView->UpdateTableView();
+                               }
                        }
                }
                break;
-       }
+
        default:
-       {
                break;
-       }
        }//end of switch
 
        HideKeypadAndRenamePanel();
 
-       AppLogDebug("End");
+       AppLogDebug("EXIT");
 }
 
 void
 FolderListPanel::OnKeypadClosed(Tizen::Ui::Control& source)
 {
-       AppLogDebug("Start");
+       AppLogDebug("ENTER");
 
        Form* pForm = dynamic_cast<Form*>(GetParent());
        AppAssert(pForm);
@@ -835,13 +788,13 @@ FolderListPanel::OnKeypadClosed(Tizen::Ui::Control& source)
 
        Invalidate(true);
 
-       AppLogDebug("End");
+       AppLogDebug("EXIT");
 }
 
 void
 FolderListPanel::OnKeypadOpened(Tizen::Ui::Control& source)
 {
-       AppLogDebug("Start");
+       AppLogDebug("ENTER");
 
        Form* pForm = dynamic_cast<Form*>(GetParent());
        AppAssert(pForm);
@@ -852,20 +805,20 @@ FolderListPanel::OnKeypadOpened(Tizen::Ui::Control& source)
        }
        Invalidate(true);
 
-       AppLogDebug("End");
+       AppLogDebug("EXIT");
 }
 
 void
 FolderListPanel::OnKeypadWillOpen(Tizen::Ui::Control &source)
 {
-       AppLogDebug("Start");
-       AppLogDebug("End");
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 
 void
 FolderListPanel::HideKeypadAndRenamePanel(void)
 {
-       AppLogDebug("Start");
+       AppLogDebug("ENTER");
 
        if (__pRenameEditArea != null && __pRenameEditArea->IsKeypadEnabled())
        {
@@ -878,23 +831,42 @@ FolderListPanel::HideKeypadAndRenamePanel(void)
                __pRenamePanel->Invalidate(true);
        }
 
-       AppLogDebug("End");
-
        Invalidate(true);
+       AppLogDebug("EXIT");
 }
 
 void
 FolderListPanel::OnUpdateContentList(void)
 {
+       AppLogDebug("ENTER");
        UpdateContentList();
+       AppLogDebug("EXIT");
+}
+
+void
+FolderListPanel::OnUserEventReceivedN(RequestId requestId, Tizen::Base::Collection::IList* pArgs)
+{
+       AppLogDebug("ENTER");
+       AppLogDebug("OnUserEventReceivedN %d", requestId);
+       if (requestId == ID_DESTORY_PLAY_LIST_PICKER_POPUP)
+       {
+               if (__pPlayListPickerPopup != null)
+               {
+                       delete __pPlayListPickerPopup;
+                       __pPlayListPickerPopup = null;
+               }
+       }
+       AppLogDebug("EXIT");
 }
 
 void
 FolderListPanel::UpdateContentList(void)
 {
+       AppLogDebug("ENTER");
        if (__pPresentationModel != null && __pContentTableView != null)
        {
-               __pPresentationModel->RefreshContent();
+               __pPresentationModel->UpdateFolderPathList();
                __pContentTableView->UpdateTableView();
        }
-}
+       AppLogDebug("EXIT");
+}
\ No newline at end of file
old mode 100755 (executable)
new mode 100644 (file)
index 11806b3..502e9d7
@@ -1,4 +1,4 @@
-//
+//
 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
 //
 // Licensed under the Flora License, Version 1.0 (the License);
 // limitations under the License.
 //
 
+/**
+ * @file               MpFolderListPresentationModel.cpp
+ * @brief              This is the implementation file for FolderListPresentationModel class.
+ */
+
 #include "MpFolderListPresentationModel.h"
 
 using namespace Tizen::Base;
 using namespace Tizen::Base::Collection;
-using namespace Tizen::Graphics;
-using namespace Tizen::Ui::Controls;
-using namespace Tizen::Social;
 using namespace Tizen::Content;
+using namespace Tizen::Graphics;
 using namespace Tizen::Io;
+using namespace Tizen::Social;
+using namespace Tizen::Ui::Controls;
 
 FolderListPresentationModel* FolderListPresentationModel::pFolderListPresentationModelInstance = null;
 
 FolderListPresentationModel::FolderListPresentationModel(void)
-: __pFolderPathList(null)
-, __pSongList(null)
+       : __pFolderPathList(null)
+       , __pContentList(null)
+       , __currentFolderIndex(-1)
 {
-       //AppLogDebug("FolderListPresentationModel");
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 
 FolderListPresentationModel::~FolderListPresentationModel(void)
 {
-       //AppLogDebug("~FolderListPresentationModel");
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 
 FolderListPresentationModel*
 FolderListPresentationModel::GetInstance(void)
 {
-       //AppLogDebug("GetInstance");
+       AppLogDebug("ENTER");
        if (pFolderListPresentationModelInstance == null)
        {
                pFolderListPresentationModelInstance = new (std::nothrow) FolderListPresentationModel();
@@ -50,6 +58,7 @@ FolderListPresentationModel::GetInstance(void)
                result r = pFolderListPresentationModelInstance->Construct();
                TryCatch(r == E_SUCCESS, , null, "FolderListPresentationModel instance is not constrcuted.");
        }
+       AppLogDebug("EXIT");
        return pFolderListPresentationModelInstance;
 
 CATCH:
@@ -60,106 +69,111 @@ CATCH:
 Tizen::Base::Collection::IList*
 FolderListPresentationModel::ContentDirectoryPathList(void)
 {
+       AppLogDebug("ENTER");
        ContentDirectory directory;
        result r = directory.Construct(CONTENT_TYPE_AUDIO);
-       if(IsFailed(r))
+       if (IsFailed(r))
        {
-               //AppLogDebug("ContentDirectory Construct Error");
                return null;
        }
+       AppLogDebug("EXIT");
        return directory.GetContentDirectoryPathListN(SORT_ORDER_ASCENDING);
 }
 
 result
 FolderListPresentationModel::Construct(void)
 {
+       AppLogDebug("ENTER");
        result r = E_SUCCESS;
-
-       if (__pFolderPathList == null)
-       {
-               __pFolderPathList = ContentDirectoryPathList();
-       }
-
+       AppLogDebug("EXIT");
        return r;
 }
 
 int
-FolderListPresentationModel::GetTotalFolderCount(void)
+FolderListPresentationModel::GetAllFolderCount(void)
 {
+       AppLogDebug("ENTER");
        if (__pFolderPathList == null)
        {
                return INIT_VALUE;
        }
+       AppLogDebug("EXIT");
        return __pFolderPathList->GetCount();
 }
 
 int
-FolderListPresentationModel::GetTotalContentCount(int index)
+FolderListPresentationModel::GetContentCount(int folderIndex)
 {
+       AppLogDebug("ENTER");
        result r = E_SUCCESS;
+       int totalCount = INIT_VALUE;
 
-       String* pStrPath = static_cast<String*>(__pFolderPathList->GetAt(index));
-
-       ContentDirectory directory;
-       r = directory.Construct(CONTENT_TYPE_AUDIO);
-       if(IsFailed(r))
+       if ((__pContentList != null) && (__currentFolderIndex == folderIndex))
        {
-               //AppLogDebug("ContentDirectory Construct Error");
-               return 0;
+               totalCount = __pContentList->GetCount();
        }
-
-       int tempCount = directory.GetContentDirectoryItemCount(*pStrPath);
-       if(IsFailed(GetLastResult()))
+       else
        {
-               //AppLogDebug("ContentDirectory GetContentDirectoryItemCount Error");
-               return 0;
+               String* pStrPath = static_cast<String*>(__pFolderPathList->GetAt(folderIndex));
+               ContentDirectory directory;
+               r = directory.Construct(CONTENT_TYPE_AUDIO);
+               if (IsFailed(r))
+               {
+                       return INIT_VALUE;
+               }
+               totalCount = directory.GetContentDirectoryItemCount(*pStrPath);
+               if (IsFailed(GetLastResult()))
+               {
+                       return INIT_VALUE;
+               }
        }
-
-       return tempCount;
+       AppLogDebug("EXIT");
+       return totalCount;
 }
 
-ContentInformationStruct*
-FolderListPresentationModel::GetContentInfoN(int index)
+ContentInformation*
+FolderListPresentationModel::GetFolderInfoN(int folderIndex)
 {
-       //AppLogDebug("GetContentInfoN, index : %d", index);
-
+       AppLogDebug("ENTER");
        if (__pFolderPathList == null)
        {
                return null;
        }
-
        ContentDirectory contentDirectory;
        result r = contentDirectory.Construct(CONTENT_TYPE_AUDIO);
+
        if (IsFailed(r))
        {
-               //AppLogDebug("ContentDirectory Construct Error");
                return null;
        }
 
-       IList* pSearchList = contentDirectory.GetContentDirectoryItemListN(*(static_cast<String*>(__pFolderPathList->GetAt(index))),SEARCH_PAGE_NO,SEARCH_COUNT_PER_PAGE,STRING_SORT_TITLE,SORT_ORDER_ASCENDING);
+       IList* pSearchList = contentDirectory.GetContentDirectoryItemListN(*(static_cast<String*>(__pFolderPathList->GetAt(folderIndex))),SEARCH_PAGE_NO,SEARCH_COUNT_PER_PAGE,STRING_SORT_TITLE,SORT_ORDER_ASCENDING);
        if (pSearchList == null)
        {
                return null;
        }
 
-       ContentInformationStruct* pContentInfoStruct = null;
+       ContentInformation* pContentInfoStruct = null;
        ContentInfo* pContentInfo = static_cast<ContentInfo*>(pSearchList->GetAt(INIT_VALUE));
        AudioContentInfo* pAudioContentInfo = static_cast<AudioContentInfo*>(pContentInfo);
+
        if (pAudioContentInfo != null && pAudioContentInfo->GetContentType() == CONTENT_TYPE_AUDIO)
        {
-               pContentInfoStruct = CommonUtil::GetContentInformationStructN(*pAudioContentInfo);
+               pContentInfoStruct = CommonUtil::GetContentInformationN(*pAudioContentInfo);
        }
 
        pSearchList->RemoveAll(true);
        delete pSearchList;
        pSearchList = null;
 
+       AppLogDebug("EXIT");
        return pContentInfoStruct;
 }
 
 Tizen::Base::Collection::ArrayList*
-FolderListPresentationModel::GetContenList(int index)
+FolderListPresentationModel::GetContentPathListN(int folderIndex)
 {
+       AppLogDebug("ENTER");
        if (__pFolderPathList == null)
        {
                return null;
@@ -169,11 +183,10 @@ FolderListPresentationModel::GetContenList(int index)
        result r = contentDirectory.Construct(CONTENT_TYPE_AUDIO);
        if (IsFailed(r))
        {
-               //AppLogDebug("ContentDirectory Construct Error");
                return null;
        }
 
-       IList* pSearchList = contentDirectory.GetContentDirectoryItemListN(*(static_cast<String*>(__pFolderPathList->GetAt(index))),SEARCH_PAGE_NO,SEARCH_COUNT_PER_PAGE,STRING_SORT_TITLE,SORT_ORDER_ASCENDING);
+       IList* pSearchList = contentDirectory.GetContentDirectoryItemListN(*(static_cast<String*>(__pFolderPathList->GetAt(folderIndex))), SEARCH_PAGE_NO, SEARCH_COUNT_PER_PAGE, STRING_SORT_TITLE, SORT_ORDER_ASCENDING);
        if (pSearchList == null)
        {
                return null;
@@ -182,7 +195,7 @@ FolderListPresentationModel::GetContenList(int index)
        ArrayList* pContentPathList = new (std::nothrow) ArrayList();
        pContentPathList->Construct();
 
-       for(int iCount = 0; iCount < pSearchList->GetCount(); iCount++)
+       for (int iCount = 0; iCount < pSearchList->GetCount(); iCount++)
        {
                ContentInfo* pContentInfo = static_cast<ContentInfo*>(pSearchList->GetAt(iCount));
                pContentPathList->Add(*(new (std::nothrow) String(pContentInfo->GetContentPath())));
@@ -192,161 +205,154 @@ FolderListPresentationModel::GetContenList(int index)
        delete pSearchList;
        pSearchList = null;
 
+       AppLogDebug("EXIT");
        return pContentPathList;
 }
 
 Tizen::Base::String*
-FolderListPresentationModel::GetPath(int index)
+FolderListPresentationModel::GetFolderPath(int folderIndex)
 {
+       AppLogDebug("ENTER");
        if (__pFolderPathList == null)
        {
                return null;
        }
-       return static_cast<String*>(__pFolderPathList->GetAt(index));
-}
-
-void
-FolderListPresentationModel::RefreshContent(void)
-{
-       if (__pFolderPathList != null)
-       {
-               __pFolderPathList->RemoveAll(true);
-               __pFolderPathList = ContentDirectoryPathList();
-               //AppLogDebug("FolderListPresentationModel : %d", __pFolderPathList->GetCount());
-       }
+       AppLogDebug("EXIT");
+       return static_cast<String*>(__pFolderPathList->GetAt(folderIndex));
 }
 
 void
-FolderListPresentationModel::SearchSong(int index)
+FolderListPresentationModel::InitializeContentList(int folderIndex)
 {
-       if (__pSongList != null)
+       AppLogDebug("ENTER");
+       if (__pContentList != null)
        {
-               __pSongList->RemoveAll(true);
+               __pContentList->RemoveAll(true);
        }
 
-       String* pFolderPath = static_cast<String*>(__pFolderPathList->GetAt(index));
-       //AppLogDebug("SearchPath : %ls", pFolderPath->GetPointer());
+       String* pFolderPath = static_cast<String*>(__pFolderPathList->GetAt(folderIndex));
 
        ContentDirectory contentDirectory;
        result r = contentDirectory.Construct(CONTENT_TYPE_AUDIO);
        if (IsFailed(r))
        {
-               //AppLogDebug("ContentDirectory Construct Error");
-               return;
-       }
-
-       __pSongList = contentDirectory.GetContentDirectoryItemListN(*pFolderPath,
-                                                                                                                                SEARCH_PAGE_NO,
-                                                                                                                                SEARCH_COUNT_PER_PAGE,
-                                                                                                                                STRING_SORT_TITLE,
-                                                                                                                                SORT_ORDER_ASCENDING);
-       //AppLogDebug("__pSongList : %d", __pSongList->GetCount());
-
-       if (IsFailed(GetLastResult()))
-       {
-               //AppLogDebug("ContentDirectory GetContentDirectoryItemCount Error");
                return;
        }
+       __pContentList = contentDirectory.GetContentDirectoryItemListN(*pFolderPath,
+                                                                                                                               SEARCH_PAGE_NO,
+                                                                                                                               SEARCH_COUNT_PER_PAGE,
+                                                                                                                               STRING_SORT_TITLE,
+                                                                                                                               SORT_ORDER_ASCENDING);
+       __currentFolderIndex = folderIndex;
+       AppLogDebug("EXIT");
 }
 
-int
-FolderListPresentationModel::GetSongContentCount(void)
+ContentInformation*
+FolderListPresentationModel::GetContentInfoN(int contentIndex)
 {
-       if (__pSongList == null)
-       {
-               return INIT_VALUE;
-       }
-       return __pSongList->GetCount();
-}
-
-ContentInformationStruct*
-FolderListPresentationModel::GetSongContentInfoN(int index)
-{
-       ContentInformationStruct* pContentInfoStruct = null;
+       AppLogDebug("ENTER");
+       ContentInformation* pContentInfoStruct = null;
 
-       ContentInfo* pContentInfo = static_cast<ContentInfo*>(__pSongList->GetAt(index));
+       ContentInfo* pContentInfo = static_cast<ContentInfo*>(__pContentList->GetAt(contentIndex));
        if (pContentInfo != null && pContentInfo->GetContentType() == CONTENT_TYPE_AUDIO)
        {
                AudioContentInfo* pAudioContentInfo = static_cast<AudioContentInfo*>(pContentInfo);
-               pContentInfoStruct = CommonUtil::GetContentInformationStructN(*pAudioContentInfo);
+               pContentInfoStruct = CommonUtil::GetContentInformationN(*pAudioContentInfo);
        }
 
+       AppLogDebug("EXIT");
        return pContentInfoStruct;
 }
 
 Tizen::Base::String*
-FolderListPresentationModel::GetContentName(int index)
+FolderListPresentationModel::GetFolderName(int folderIndex)
 {
+       AppLogDebug("ENTER");
        if (__pFolderPathList == null)
        {
                return null;
        }
 
-       return static_cast<String*>(__pFolderPathList->GetAt(index));
+       AppLogDebug("EXIT");
+       return static_cast<String*>(__pFolderPathList->GetAt(folderIndex));
 }
 
-Tizen::Base::Collection::ArrayList*
-FolderListPresentationModel::SearchContentItemN(int index)
+void
+FolderListPresentationModel::RefreshContentList(int folderIndex)
 {
-       AppLogDebug("Start");
-       if (__pFolderPathList == null)
+       AppLogDebug("ENTER");
+       if (__pContentList != null)
        {
-               return null;
+               __pContentList->RemoveAll(true);
        }
 
-       String* pFolderPath = static_cast<String*>(__pFolderPathList->GetAt(index));
+       String* pFolderPath = static_cast<String*>(__pFolderPathList->GetAt(folderIndex));
 
        ContentDirectory contentDirectory;
        result r = contentDirectory.Construct(CONTENT_TYPE_AUDIO);
        if (IsFailed(r))
        {
-               delete pFolderPath;
-               pFolderPath = null;
-
-               return null;
+               return;
        }
-
-       IList* pSearchList = contentDirectory.GetContentDirectoryItemListN(*pFolderPath,
-                                                                                                                                SEARCH_PAGE_NO,
-                                                                                                                                SEARCH_COUNT_PER_PAGE,
-                                                                                                                                STRING_SORT_TITLE,
-                                                                                                                                SORT_ORDER_ASCENDING);
-       if (IsFailed(GetLastResult()))
+       __pContentList = contentDirectory.GetContentDirectoryItemListN(*pFolderPath,
+                                                                                                                               SEARCH_PAGE_NO,
+                                                                                                                               SEARCH_COUNT_PER_PAGE,
+                                                                                                                               STRING_SORT_TITLE,
+                                                                                                                               SORT_ORDER_ASCENDING);
+       //__pContentList null check
+       if (__pContentList->GetCount() == INIT_VALUE)
        {
-               delete pFolderPath;
-               pFolderPath = null;
+               __pContentList->RemoveAll(true);
+               delete __pContentList;
+               __pContentList = null;
 
-               return null;
        }
+       __currentFolderIndex = folderIndex;
+       AppLogDebug("EXIT");
+}
 
-       int totalCount = pSearchList->GetCount();
-       ArrayList* pContentPath = new (std::nothrow) ArrayList();
-       pContentPath->Construct();
-
-       ContentInfo* pContentInfo;
-       for(int iCount = 0; iCount < totalCount; iCount++)
-       {
-               pContentInfo = static_cast<ContentInfo*>(pSearchList->GetAt(iCount));
-               pContentPath->Add(*(new (std::nothrow) String(pContentInfo->GetContentPath())));
-       }
+int
+FolderListPresentationModel::GetCurrentFolderIndex(void)
+{
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
+       return __currentFolderIndex;
+}
 
-       pSearchList->RemoveAll(true);
-       delete pSearchList;
-       pSearchList = null;
+void
+FolderListPresentationModel::AddContent(String path, int playlistIndex)
+{
+       AppLogDebug("ENTER");
+       ContentInformation* pContentInfoStruct = GetContentInfoN(playlistIndex);
+       PlayList* pPlayList = PlayListManager::GetInstance()->GetPlayListN(path);
+       pPlayList->AddItem(pContentInfoStruct->contentId);
 
-       AppLogDebug("End");
+       delete pContentInfoStruct;
+       pContentInfoStruct = null;
 
-       return pContentPath;
+       delete pPlayList;
+       pPlayList = null;
+       AppLogDebug("EXIT");
 }
 
 result
-FolderListPresentationModel::RemoveContent(int index)
+FolderListPresentationModel::UpdateFolderPathList(void)
 {
-       String* pStrPath = static_cast<String*>(__pFolderPathList->GetAt(index));
-       TryReturn(pStrPath != null, E_INVALID_ARG, "index is invalid value");
+       AppLogDebug("ENTER");
+       result r = E_SUCCESS;
 
-       result r = Directory::Remove(*pStrPath, true);
-       __pFolderPathList->RemoveAt(index);
+       if (__pFolderPathList != null)
+       {
+               __pFolderPathList->RemoveAll(true);
+               delete __pFolderPathList;
+       }
+
+       __pFolderPathList = ContentDirectoryPathList();
+       TryCatch(__pFolderPathList != null, r = E_FAILURE, "__pFolderPathList is null");
 
+       AppLogDebug("EXIT");
        return r;
-}
+
+CATCH:
+       return r;
+}
\ No newline at end of file
old mode 100755 (executable)
new mode 100644 (file)
index c72e78c..9b9fc2b
@@ -1,4 +1,4 @@
-//
+//
 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
 //
 // Licensed under the Flora License, Version 1.0 (the License);
 // limitations under the License.
 //
 
+/**
+ * @file               MpFolderPickerPanel.cpp
+ * @brief              This is the implementation file for FolderPickerPanel class.
+ */
+
 #include "MpFolderPickerPanel.h"
 #include "MpNowPlayContentPanel.h"
 
@@ -21,28 +26,29 @@ using namespace Tizen::Base;
 using namespace Tizen::Base::Collection;
 using namespace Tizen::Content;
 using namespace Tizen::Graphics;
+using namespace Tizen::Social;
 using namespace Tizen::Ui;
 using namespace Tizen::Ui::Controls;
 using namespace Tizen::Ui::Scenes;
-using namespace Tizen::Social;
 
 FolderPickerPanel::FolderPickerPanel(void)
 {
-       //AppLogDebug("FolderPickerPanel");
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 
 FolderPickerPanel::~FolderPickerPanel(void)
 {
-       //AppLogDebug("~FolderPickerPanel");
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 
 void
 FolderPickerPanel::OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previousSceneId,
-                                     const Tizen::Ui::Scenes::SceneId& currentSceneId,
-                                     Tizen::Base::Collection::IList* pArgs)
+                                               const Tizen::Ui::Scenes::SceneId& currentSceneId,
+                                               Tizen::Base::Collection::IList* pArgs)
 {
-       //AppLogDebug("OnSceneActivatedN");
-
+       AppLogDebug("ENTER");
        Form* pForm = dynamic_cast<Form*>(GetParent());
        AppAssert(pForm);
 
@@ -51,10 +57,10 @@ FolderPickerPanel::OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previousS
 
        SceneManager* pSceneManager = SceneManager::GetInstance();
        AppAssert(pSceneManager);
-
+       __pPresentationModel->UpdateFolderPathList();
        if (__pPresentationModel != null)
        {
-               CommonUtil::ShowNoContentImage(__pPresentationModel->GetTotalFolderCount(), *__pContentTableView, *__pNoContentImageLabel, *__pNoContentTextLabel);
+               CommonUtil::ShowNoContentImage(__pPresentationModel->GetAllFolderCount(), *__pContentTableView, *__pNoContentImageLabel, *__pNoContentTextLabel);
        }
 
        if (pSceneManager->IsSceneAlive(IDSCN_PLAYER))
@@ -73,35 +79,37 @@ FolderPickerPanel::OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previousS
                pArgs->RemoveAll(true);
                delete pArgs;
        }
+       AppLogDebug("EXIT");
 }
 
 void
 FolderPickerPanel::OnSceneDeactivated(const Tizen::Ui::Scenes::SceneId& currentSceneId,
-                                      const Tizen::Ui::Scenes::SceneId& nextSceneId)
+                                               const Tizen::Ui::Scenes::SceneId& nextSceneId)
 {
-       //AppLogDebug("OnSceneDeactivated");
-
+       AppLogDebug("ENTER");
        Form* pForm = dynamic_cast<Form*>(GetParent());
        AppAssert(pForm);
 
        Footer* pFooter = pForm->GetFooter();
        pFooter->RemoveAllButtons();
        pFooter->RemoveAllItems();
+       AppLogDebug("EXIT");
 }
 
 void
 FolderPickerPanel::OnTableViewItemStateChanged(Tizen::Ui::Controls::TableView& tableView,
-                                               int itemIndex,
-                                               Tizen::Ui::Controls::TableViewItem* pItem,
-                                               Tizen::Ui::Controls::TableViewItemStatus status)
+                                                       int itemIndex,
+                                                       Tizen::Ui::Controls::TableViewItem* pItem,
+                                                       Tizen::Ui::Controls::TableViewItemStatus status)
 {
-       //AppLogDebug("OnTableViewItemStateChanged");
+       AppLogDebug("ENTER");
        if (status == TABLE_VIEW_ITEM_STATUS_SELECTED)
        {
                SceneManager* pSceneManager = SceneManager::GetInstance();
                AppAssert(pSceneManager);
 
-               __pPresentationModel->SearchSong(itemIndex);
+               __pPresentationModel->InitializeContentList(itemIndex);
                pSceneManager->GoForward(ForwardSceneTransition(IDSCN_FOLDER_CONTENT_PICKER));
        }
-}
+       AppLogDebug("EXIT");
+}
\ No newline at end of file
index 9d07d96..7807a93 100755 (executable)
@@ -1,4 +1,4 @@
-//
+//
 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
 //
 // Licensed under the Flora License, Version 1.0 (the License);
 // limitations under the License.
 //
 
+/**
+ * @file               MpFormFactory.cpp
+ * @brief              This is the implementation file for FormFactory class.
+ */
+
 #include "MpFormFactory.h"
 
 using namespace Tizen::Ui::Scenes;
 
-const wchar_t* IDC_PLAYER_FORM                      = L"PlayForm";
-const wchar_t* IDC_MUSIC_SETTING_FORM               = L"SettingForm";
-const wchar_t* IDC_SEARCH_FORM                      = L"Search";
-const wchar_t* IDC_CONTENT_FORM                     = L"ContentForm";
-const wchar_t* IDC_ALBUM_CONTENT_FORM               = L"AlbumContentForm";
-const wchar_t* IDC_CONTENT_EDIT_FORM                = L"ContentEditForm";
-const wchar_t* IDC_CONTENT_LIST_FORM                = L"ContentListForm";
-const wchar_t* IDC_PLAYLIST_CONTENT_LIST_FORM       = L"PlayListContentListForm";
-const wchar_t* IDC_CONTENT_LIST_EDIT_FORM           = L"ContentListEditorForm";
-const wchar_t* IDC_PLAYLIST_CREATOR_FORM            = L"PlaylistCreatorForm";
-const wchar_t* IDC_USER_PLAYLIST_CONTENT_LIST_FORM  = L"UserPlaylistContentListForm";
-const wchar_t* IDC_CONTENT_DETAIL_FORM              = L"ContentDetailForm";
-const wchar_t* IDC_ARTIST_ALBUM_LIST_FORM           = L"ArtistAlbumListForm";
-const wchar_t* IDC_ARTIST_ALBUM_LIST_SEARCH_FORM    = L"ArtistAlbumListSearchForm";
-const wchar_t* IDC_ARTIST_ALBUM_LIST_EDIT_FORM      = L"ArtistAlbumListEditorForm";
-const wchar_t* IDC_ARTIST_ALL_SONG_LIST_FORM        = L"ArtistAllSongListForm";
+const wchar_t* IDC_PLAYER_FORM = L"PlayForm";
+const wchar_t* IDC_MUSIC_SETTING_FORM = L"SettingForm";
+const wchar_t* IDC_SEARCH_FORM = L"Search";
+const wchar_t* IDC_CONTENT_FORM = L"ContentForm";
+const wchar_t* IDC_CONTENT_EDIT_FORM = L"ContentEditForm";
+const wchar_t* IDC_ALBUM_CONTENT_LIST_FORM = L"AlbumContentListForm";
+const wchar_t* IDC_ARTIST_CONTENT_LIST_FORM = L"ArtistContentListForm";
+const wchar_t* IDC_GENRE_CONTENT_LIST_FORM = L"GenreContentListForm";
+const wchar_t* IDC_COMPOSER_CONTENT_LIST_FORM = L"ComposerContentListForm";
+const wchar_t* IDC_YEAR_CONTENT_LIST_FORM = L"YearContentListForm";
+const wchar_t* IDC_FOLDER_CONTENT_LIST_FORM = L"FolderContentListForm";
+const wchar_t* IDC_PLAYLIST_CONTENT_LIST_FORM = L"PlayListContentListForm";
+const wchar_t* IDC_PLAYLIST_CREATOR_FORM = L"PlaylistCreatorForm";
+const wchar_t* IDC_USER_PLAYLIST_CONTENT_LIST_FORM = L"UserPlaylistContentListForm";
+const wchar_t* IDC_CONTENT_DETAIL_FORM = L"ContentDetailForm";
+const wchar_t* IDC_ARTIST_ALBUM_LIST_FORM = L"ArtistAlbumListForm";
+const wchar_t* IDC_ARTIST_ALBUM_LIST_SEARCH_FORM = L"ArtistAlbumListSearchForm";
+const wchar_t* IDC_ARTIST_ALBUM_LIST_EDIT_FORM = L"ArtistAlbumListEditorForm";
+const wchar_t* IDC_ARTIST_ALL_SONG_LIST_FORM = L"ArtistAllSongListForm";
 
 FormFactory::FormFactory(void)
 {
-       AppLogDebug("Start");
-       AppLogDebug("End");
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 
-FormFactory::~FormFactory()
+FormFactory::~FormFactory(void)
 {
-       AppLogDebug("Start");
-       AppLogDebug("End");
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 
 Tizen::Ui::Controls::Form*
 FormFactory::CreateFormN(const Tizen::Base::String& formId, const Tizen::Ui::Scenes::SceneId& sceneId)
 {
-       AppLogDebug("Start");
+       AppLogDebug("ENTER");
        Tizen::Ui::Controls::Form* pNewForm = null;
        SceneManager* pSceneManager = SceneManager::GetInstance();
        AppAssert(pSceneManager);
@@ -61,7 +69,7 @@ FormFactory::CreateFormN(const Tizen::Base::String& formId, const Tizen::Ui::Sce
                if (pForm == null)
                {
                        //AppLogDebug("[E_OUT_OF_MEMORY] Unable to create PlayerForm.");
-                       AppLogDebug("End");
+                       AppLogDebug("EXIT");
                        return null;
                }
                pForm->Initialize();
@@ -74,7 +82,7 @@ FormFactory::CreateFormN(const Tizen::Base::String& formId, const Tizen::Ui::Sce
                if (pForm == null)
                {
                        //AppLogDebug("[E_OUT_OF_MEMORY] Unable to create SettingForm.");
-                       AppLogDebug("End");
+                       AppLogDebug("EXIT");
                        return null;
                }
                pForm->Initialize();
@@ -87,7 +95,7 @@ FormFactory::CreateFormN(const Tizen::Base::String& formId, const Tizen::Ui::Sce
                if (pForm == null)
                {
                        //AppLogDebug("[E_OUT_OF_MEMORY] Unable to create ContentForm.");
-                       AppLogDebug("End");
+                       AppLogDebug("EXIT");
                        return null;
                }
                pForm->Initialize();
@@ -99,59 +107,84 @@ FormFactory::CreateFormN(const Tizen::Base::String& formId, const Tizen::Ui::Sce
                if (pForm == null)
                {
                        //AppLogDebug("[E_OUT_OF_MEMORY] Unable to create ContentForm.");
-                       AppLogDebug("End");
+                       AppLogDebug("EXIT");
                        return null;
                }
                pForm->Initialize();
                pSceneManager->AddSceneEventListener(sceneId, *pForm);
                pNewForm = pForm;
        }
-       else if (formId == IDC_CONTENT_LIST_FORM)
+       else if (formId == IDC_ALBUM_CONTENT_LIST_FORM)
        {
-               ContentListForm* pForm = new (std::nothrow) ContentListForm();
+               AlbumContentListForm* pForm = new (std::nothrow) AlbumContentListForm();
                if (pForm == null)
                {
-                       //AppLogDebug("[E_OUT_OF_MEMORY] Unable to create ContentForm.");
-                       AppLogDebug("End");
                        return null;
                }
                pForm->Initialize();
                pSceneManager->AddSceneEventListener(sceneId, *pForm);
                pNewForm = pForm;
        }
-       else if (formId == IDC_PLAYLIST_CONTENT_LIST_FORM)
+       else if (formId == IDC_ARTIST_CONTENT_LIST_FORM)
        {
-               ContentListForm* pForm = new (std::nothrow) ContentListForm();
+               ArtistContentListForm* pForm = new (std::nothrow) ArtistContentListForm();
                if (pForm == null)
                {
-                       //AppLogDebug("[E_OUT_OF_MEMORY] Unable to create ContentForm.");
-                       AppLogDebug("End");
                        return null;
                }
                pForm->Initialize();
                pSceneManager->AddSceneEventListener(sceneId, *pForm);
                pNewForm = pForm;
        }
-       else if (formId == IDC_ALBUM_CONTENT_FORM)
+       else if (formId == IDC_GENRE_CONTENT_LIST_FORM)
        {
-               ContentListForm* pForm = new (std::nothrow) ContentListForm();
+               GenreContentListForm* pForm = new (std::nothrow) GenreContentListForm();
                if (pForm == null)
                {
-                       //AppLogDebug("[E_OUT_OF_MEMORY] Unable to create ContentForm.");
-                       AppLogDebug("End");
                        return null;
                }
                pForm->Initialize();
                pSceneManager->AddSceneEventListener(sceneId, *pForm);
                pNewForm = pForm;
        }
-       else if (formId == IDC_CONTENT_LIST_EDIT_FORM)
+       else if (formId == IDC_COMPOSER_CONTENT_LIST_FORM)
        {
-               ContentListEditorForm* pForm = new (std::nothrow) ContentListEditorForm();
+               ComposerContentListForm* pForm = new (std::nothrow) ComposerContentListForm();
+               if (pForm == null)
+               {
+                       return null;
+               }
+               pForm->Initialize();
+               pSceneManager->AddSceneEventListener(sceneId, *pForm);
+               pNewForm = pForm;
+       }
+       else if (formId == IDC_YEAR_CONTENT_LIST_FORM)
+       {
+               YearContentListForm* pForm = new (std::nothrow) YearContentListForm();
+               if (pForm == null)
+               {
+                       return null;
+               }
+               pForm->Initialize();
+               pSceneManager->AddSceneEventListener(sceneId, *pForm);
+               pNewForm = pForm;
+       }
+       else if (formId == IDC_FOLDER_CONTENT_LIST_FORM)
+       {
+               FolderContentListForm* pForm = new (std::nothrow) FolderContentListForm();
+               if (pForm == null)
+               {
+                       return null;
+               }
+               pForm->Initialize();
+               pSceneManager->AddSceneEventListener(sceneId, *pForm);
+               pNewForm = pForm;
+       }
+       else if (formId == IDC_PLAYLIST_CONTENT_LIST_FORM)
+       {
+               PlaylistContentListForm* pForm = new (std::nothrow) PlaylistContentListForm();
                if (pForm == null)
                {
-                       //AppLogDebug("[E_OUT_OF_MEMORY] Unable to create ContentForm.");
-                       AppLogDebug("End");
                        return null;
                }
                pForm->Initialize();
@@ -164,7 +197,7 @@ FormFactory::CreateFormN(const Tizen::Base::String& formId, const Tizen::Ui::Sce
                if (pForm == null)
                {
                        //AppLogDebug("[E_OUT_OF_MEMORY] Unable to create ContentForm.");
-                       AppLogDebug("End");
+                       AppLogDebug("EXIT");
                        return null;
                }
                pForm->Initialize();
@@ -177,7 +210,7 @@ FormFactory::CreateFormN(const Tizen::Base::String& formId, const Tizen::Ui::Sce
                if (pForm == null)
                {
                        //AppLogDebug("[E_OUT_OF_MEMORY] Unable to create PlayerForm.");
-                       AppLogDebug("End");
+                       AppLogDebug("EXIT");
                        return null;
                }
                pForm->Initialize();
@@ -190,7 +223,7 @@ FormFactory::CreateFormN(const Tizen::Base::String& formId, const Tizen::Ui::Sce
                if (pForm == null)
                {
                        //AppLogDebug("[E_OUT_OF_MEMORY] Unable to create PlayerForm.");
-                       AppLogDebug("End");
+                       AppLogDebug("EXIT");
                        return null;
                }
                pForm->Initialize();
@@ -203,7 +236,7 @@ FormFactory::CreateFormN(const Tizen::Base::String& formId, const Tizen::Ui::Sce
                if (pForm == null)
                {
                        //AppLogDebug("[E_OUT_OF_MEMORY] Unable to create PlayerForm.");
-                       AppLogDebug("End");
+                       AppLogDebug("EXIT");
                        return null;
                }
                pForm->Initialize();
@@ -216,7 +249,7 @@ FormFactory::CreateFormN(const Tizen::Base::String& formId, const Tizen::Ui::Sce
                if (pForm == null)
                {
                        //AppLogDebug("[E_OUT_OF_MEMORY] Unable to create PlayerForm.");
-                       AppLogDebug("End");
+                       AppLogDebug("EXIT");
                        return null;
                }
                pForm->Initialize();
@@ -229,7 +262,7 @@ FormFactory::CreateFormN(const Tizen::Base::String& formId, const Tizen::Ui::Sce
                if (pForm == null)
                {
                        //AppLogDebug("[E_OUT_OF_MEMORY] Unable to create PlayerForm.");
-                       AppLogDebug("End");
+                       AppLogDebug("EXIT");
                        return null;
                }
                pForm->Initialize();
@@ -242,13 +275,13 @@ FormFactory::CreateFormN(const Tizen::Base::String& formId, const Tizen::Ui::Sce
                if (pForm == null)
                {
                        //AppLogDebug("[E_OUT_OF_MEMORY] Unable to create ContentForm.");
-                       AppLogDebug("End");
+                       AppLogDebug("EXIT");
                        return null;
                }
                pForm->Initialize();
                pSceneManager->AddSceneEventListener(sceneId, *pForm);
                pNewForm = pForm;
        }
-       AppLogDebug("End");
+       AppLogDebug("EXIT");
        return pNewForm;
-}
+}
\ No newline at end of file
diff --git a/src/MpGenreContentListForm.cpp b/src/MpGenreContentListForm.cpp
new file mode 100644 (file)
index 0000000..3657670
--- /dev/null
@@ -0,0 +1,915 @@
+//
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.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://floralicense.org/license/
+//
+// 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.
+//
+
+/**
+ * @file               MpGenreContentListForm.cpp
+ * @brief              This is the implementation file for GenreContentListForm class.
+ */
+
+#include <FSocial.h>
+#include "MpGenreContentListForm.h"
+#include "MpGenreListPresentationModel.h"
+#include "MpPlaylistPickerPopup.h"
+#include "MpSharePopup.h"
+#include "MpThumbnailInfo.h"
+
+using namespace Tizen::App;
+using namespace Tizen::Base;
+using namespace Tizen::Base::Collection;
+using namespace Tizen::Content;
+using namespace Tizen::Graphics;
+using namespace Tizen::Io;
+using namespace Tizen::Social;
+using namespace Tizen::System;
+using namespace Tizen::Ui;
+using namespace Tizen::Ui::Controls;
+using namespace Tizen::Ui::Scenes;
+
+static const int X_OFFSET_EDIT_STYLE_TABLE_VIEW = 96;
+static const int COUNT_MESSAGE_BOX_TIMEOUT = 3000;
+
+static const Tizen::Graphics::Rectangle RECT_GENRE_ITEM_THUMBNAIL (16, 8, 112, 112);
+static const Tizen::Graphics::Rectangle RECT_GENRE_ITEM_TITLE_NAME (144, 8, 300, 66);
+static const Tizen::Graphics::Rectangle RECT_GENRE_ITEM_TIME (444, 8, 260, 66);
+static const Tizen::Graphics::Rectangle RECT_GENRE_ITEM_ARTIST_NAME (144, 66, 560, 46);
+
+static const Tizen::Graphics::Rectangle RECT_GENRE_EDIT_ITEM_TITLE_NAME (144, 8, (300 - X_OFFSET_EDIT_STYLE_TABLE_VIEW), 66);
+static const Tizen::Graphics::Rectangle RECT_GENRE_EDIT_ITEM_TIME ((444 - X_OFFSET_EDIT_STYLE_TABLE_VIEW), 8, 260, 66);
+static const Tizen::Graphics::Rectangle RECT_GENRE_EDIT_ITEM_ARTIST_NAME (144, 66, (560 - X_OFFSET_EDIT_STYLE_TABLE_VIEW), 46);
+
+GenreContentListForm::GenreContentListForm(void)
+       : ContentListForm::ContentListForm()
+       , ThumbnailBase::ThumbnailBase()
+       , __pThumbnail(null)
+       , __pPresentationModel(null)
+{
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
+}
+
+GenreContentListForm::~GenreContentListForm(void)
+{
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
+}
+
+result
+GenreContentListForm::OnInitializing(void)
+{
+       AppLogDebug("ENTER");
+       CreateTableview();
+       CreateSelectAllCheckedButton();
+       CreateCheckedCountLabel();
+       CreateNoContentImage(L"IDS_MUSIC_HEADER_NO_SONGS");
+       __pContextItem = new (std::nothrow) TableViewContextItem();
+       __pContextItem->Construct(Dimension(GetClientAreaBounds().width, ITEM_HEIGHT));
+       CreateTableViewContextItem(*__pContextItem);
+       CreateDeletePopup();
+       AppLogDebug("EXIT");
+       return ThumbnailBase::Construct();
+}
+
+result
+GenreContentListForm::OnTerminating(void)
+{
+       AppLogDebug("ENTER");
+       __checkedItemCount = 0;
+       DestroyPlayListPickerPopup();
+
+       delete __pContextItem;
+       __pContextItem = null;
+
+       AppLogDebug("EXIT");
+       return E_SUCCESS;
+}
+
+void
+GenreContentListForm::OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previousSceneId,
+                                       const Tizen::Ui::Scenes::SceneId& currentSceneId,
+                                       Tizen::Base::Collection::IList* pArgs)
+{
+       AppLogDebug("ENTER");
+       if (pArgs != null)
+       {
+               __pStrSceneId = static_cast<String*>(pArgs->GetAt(DATA_ITEM_SCENE_NAME));
+               __pStrContentName = static_cast<String*>(pArgs->GetAt(DATA_ITEM_CONTENT_NAME));
+               __currentContentIndex = static_cast<Integer*>(pArgs->GetAt(DATA_ITEM_CONTENT_TYPE))->ToInt();
+               __pPresentationModel = GenreListPresentationModel::GetInstance();
+               __pPresentationModel->UpdateGnereList();
+               __pPresentationModel->InitializeContentList(__currentContentIndex);
+       }
+       else
+       {
+               // Empty statement
+       }
+
+       ContentInformation* pContentInfo = null;
+       pContentInfo = __pPresentationModel->GetContentInfoN(0);
+       if (pContentInfo == null)
+       {
+               return;
+       }
+
+       InitializeHeader(*pContentInfo);
+       if (__checkEdit == true)
+       {
+               Footer* pFooter = CommonUtil::CreateDeleteFooter(*this);
+               pFooter->AddActionEventListener(*this);
+       }
+       else
+       {
+               Footer* pFooter = CommonUtil::CreateEditFooter(*this);
+               pFooter->AddActionEventListener(*this);
+               pFooter->SetBackButton();
+               SetFormBackEventListener(this);
+       }
+       __pContentTableView->UpdateTableView();
+
+       delete pContentInfo;
+       pContentInfo = null;
+       AppLogDebug("EXIT");
+}
+
+void
+GenreContentListForm::OnSceneDeactivated(const Tizen::Ui::Scenes::SceneId& currentSceneId,
+                                                                       const Tizen::Ui::Scenes::SceneId& nextSceneId)
+{
+       AppLogDebug("ENTER");
+       Footer* pFooter = GetFooter();
+       pFooter->RemoveAllButtons();
+       pFooter->RemoveAllItems();
+       pFooter->RemoveActionEventListener(*this);
+       CancelAllThumbnailRequest();
+       AppLogDebug("EXIT");
+}
+
+void
+GenreContentListForm::OnActionPerformed(const Tizen::Ui::Control& source, int actionId)
+{
+       AppLogDebug("ENTER");
+       SceneManager* pSceneManager = SceneManager::GetInstance();
+
+       AppAssert(pSceneManager);
+       switch (actionId)
+       {
+       case IDA_FLICK_BUTTON_SHARE:
+               // fall through
+       case IDA_FLICK_BUTTON_SET:
+               {
+                       CreateContextMenu(source);
+               }
+               break;
+
+       case IDA_FLICK_BUTTON_ADD_TO_PALYLIST:
+               {
+                       Tizen::Base::Collection::ArrayList* pDataList = new (std::nothrow) ArrayList();
+                       pDataList->Construct();
+                       ContentInformation* pContentInfo;
+                       pContentInfo = __pPresentationModel->GetContentInfoN(__itemIndex);
+
+                       if (pContentInfo == null)
+                       {
+                               pDataList->RemoveAll(true);
+                               delete pDataList;
+                               pDataList = null;
+                               return;
+                       }
+                       pDataList->Add(*(new (std::nothrow) String(pContentInfo->ContentFilePath)));
+
+                       delete pContentInfo;
+                       pContentInfo = null;
+
+                       __pPlayListPickerPopup = new (std::nothrow) PlayListPickerPopup();
+                       __pPlayListPickerPopup->Initialize(this, pDataList);
+                       __pPlayListPickerPopup->SetShowState(true);
+                       __pPlayListPickerPopup->Show();
+                       //__pPlayListPickerPopup->SetCollectedContent(pDataList);
+               }
+               break;
+
+       case IDA_FLICK_BUTTON_DELETE:
+               {
+                       if (__pDeletePopup != null)
+                       {
+                               __pDeletePopup->SetShowState(true);
+                               __pDeletePopup->Show();
+                       }
+               }
+               break;
+
+       case IDA_DELETE_POPUP_DELETE:
+               // fall through
+       case IDA_DELETE_POPUP_CANCEL:
+               {
+                       __pDeletePopup->SetShowState(false);
+                       __pDeletePopup->Show();
+                       if (actionId == IDA_DELETE_POPUP_DELETE && __pPresentationModel != null)
+                       {
+                               ContentManager contentManager;
+                               contentManager.Construct();
+                               ContentInformation* pContentInfo = __pPresentationModel->GetContentInfoN(__itemIndex);
+                               contentManager.DeleteContent(pContentInfo->contentId);
+                               Footer* pFooter = GetFooter();
+
+                               delete pContentInfo;
+                               pContentInfo = null;
+
+                               __pPresentationModel->RefreshContentList(__currentContentIndex);
+
+                               if (__pPresentationModel->GetContentCount(__currentContentIndex) <= INIT_VALUE)
+                               {
+                                       CommonUtil::ShowNoContentImage(INIT_VALUE, *__pContentTableView, *__pNoContentImageLabel, *__pNoContentTextLabel);
+                                       pFooter->SetItemEnabled(INDEX_EDIT_FOOTER_EDIT, false);
+                                       pFooter->Invalidate(true);
+                               }
+
+                               __pContentTableView->RefreshItem(__itemIndex, TABLE_VIEW_REFRESH_TYPE_ITEM_REMOVE);
+                       }
+               }
+               break;
+
+       case IDA_SHARE_CONTEXT_MENU_EMAIL:
+               // fall through
+       case IDA_SHARE_CONTEXT_MENU_MESSAGE:
+               {
+                       String providerID = ((actionId == IDA_SHARE_CONTEXT_MENU_EMAIL) ? PROVIDER_ID_EMAIL : PROVIDER_ID_MESSAGE);
+                       AppControl* pAppControl = AppManager::FindAppControlN(providerID, OPERATION_ID_COMPOSE);
+                       if (pAppControl == null)
+                       {
+                               return;
+                       }
+
+                       ContentInformation* pContentInfo = null;
+                       pContentInfo = __pPresentationModel->GetContentInfoN(__itemIndex);
+
+                       if (pContentInfo == null)
+                       {
+                               return;
+                       }
+
+                       HashMap* pDataList = new (std::nothrow) HashMap(SingleObjectDeleter);
+                       pDataList->Construct();
+                       pDataList->Add(new (std::nothrow) String(APPCONTROL_KEY_ATTACHMENTS), new (std::nothrow) String(pContentInfo->ContentFilePath));
+
+                       pAppControl->Start(null, null, pDataList, this);
+
+                       if (pAppControl != null)
+                       {
+                               delete pAppControl;
+                               pAppControl = null;
+                       }
+
+                       delete pContentInfo;
+                       pContentInfo = null;
+               }
+               break;
+
+       case IDA_SET_CONTEXT_MENU_CALL:
+               {
+                       result r = E_SUCCESS;
+                       ContentInformation* pContentInfo = __pPresentationModel->GetContentInfoN(__itemIndex);
+
+                       if (pContentInfo == null)
+                       {
+                               return;
+                       }
+                       r = SettingInfo::SetValue(CALL_RINGTONE_KEY, pContentInfo->ContentFilePath);
+
+                       delete pContentInfo;
+                       pContentInfo = null;
+
+                       if (r == E_SUCCESS)
+                       {
+                               MessageBox messageBox;
+                               messageBox.Construct(L"", ResourceManager::GetString(L"IDS_COM_POP_SUCCESS"),
+                                                                       MSGBOX_STYLE_OK,
+                                                                       COUNT_MESSAGE_BOX_TIMEOUT);
+                               int modalResult = 0;
+                               messageBox.ShowAndWait(modalResult);
+                       }
+               }
+               break;
+
+       case IDA_SET_CONTEXT_MENU_CALLER:
+               {
+                       AppControl* pAppControl = AppManager::FindAppControlN(TIZEN_APPCONTROL_PROVIDER_CONTACT, TIZEN_APPCONTROL_OPERATION_PICK);
+                       if (pAppControl == null)
+                       {
+                               return;
+                       }
+
+                       HashMap* pDataList = new (std::nothrow) HashMap(SingleObjectDeleter);
+                       pDataList->Construct();
+                       pDataList->Add(new (std::nothrow) String(APPCONTROL_KEY_SINGLE_MODE), new (std::nothrow) String(APPCONTROL_VALUE_SINGLE));
+                       pDataList->Add(new (std::nothrow) String(APPCONTROL_KEY_RETURNTYPE), new (std::nothrow) String(APPCONTROL_VALUE_CONTACTID));
+
+                       pAppControl->Start(null, null, pDataList, this);
+                       if (pAppControl != null)
+                       {
+                               delete pAppControl;
+                               pAppControl = null;
+                       }
+               }
+               break;
+
+       case IDA_FOOTER_BUTTON_EDIT:
+               {
+                       ToggleViewMode(false);
+               }
+               break;
+
+       case IDA_FOOTER_BUTTON_CANCEL:
+               {
+                       __checkedItemCount = INIT_VALUE;
+                       __pSelectAllCheckedButton->SetSelected(false);
+                       CommonUtil::SetAllCheckState(false, *__pContentTableView, __pPresentationModel->GetContentCount(__currentContentIndex));
+                       CommonUtil::ShowCheckedCountLabel(*__pCheckedCountLabel, __checkedItemCount, *__pContentTableView, *this);
+                       ToggleViewMode(true);
+               }
+               break;
+
+       case IDA_CHECK_BUTTON:
+               {
+                       __checkedItemCount = __pPresentationModel->GetContentCount(__currentContentIndex);
+                       if (__checkedItemCount > INIT_VALUE)
+                       {
+                               Footer* pFooter = GetFooter();
+
+                               pFooter->SetItemEnabled(INDEX_FOOTER_DELETE, true);
+                               pFooter->SetItemEnabled(INDEX_FOOTER_SHARE, true);
+                               pFooter->SetItemEnabled(INDEX_FOOTER_ADDTOPLATLIST, true);
+
+                               pFooter->Invalidate(true);
+                       }
+                       CommonUtil::SetAllCheckState(true, *__pContentTableView, __pPresentationModel->GetContentCount(__currentContentIndex));
+                       CommonUtil::ShowCheckedCountLabel(*__pCheckedCountLabel, __checkedItemCount, *__pContentTableView, *this);
+               }
+               break;
+
+       case IDA_UNCHECK_BUTTON:
+               {
+                       Footer* pFooter = GetFooter();
+
+                       pFooter->SetItemEnabled(INDEX_FOOTER_DELETE, false);
+                       pFooter->SetItemEnabled(INDEX_FOOTER_SHARE, false);
+                       pFooter->SetItemEnabled(INDEX_FOOTER_ADDTOPLATLIST, false);
+
+                       pFooter->Invalidate(true);
+
+                       __checkedItemCount = INIT_VALUE;
+                       CommonUtil::SetAllCheckState(false, *__pContentTableView, __pPresentationModel->GetContentCount(__currentContentIndex));
+                       CommonUtil::ShowCheckedCountLabel(*__pCheckedCountLabel, __checkedItemCount, *__pContentTableView, *this);
+               }
+               break;
+
+       case IDA_FOOTER_BUTTON_DELETE:
+               {
+                       ContentManager contentManager;
+                       Footer* pFooter = GetFooter();
+                       int totalCount = __pPresentationModel->GetContentCount(__currentContentIndex);
+                       int iCount = 0;
+
+                       if (__checkedItemCount <= INIT_VALUE)
+                       {
+                               return;
+                       }
+
+                       pFooter->SetItemEnabled(INDEX_FOOTER_DELETE, false);
+                       pFooter->SetItemEnabled(INDEX_FOOTER_SHARE, false);
+                       pFooter->SetItemEnabled(INDEX_FOOTER_ADDTOPLATLIST, false);
+                       pFooter->Invalidate(true);
+
+                       contentManager.Construct();
+                       for (iCount = 0; iCount < totalCount; iCount++)
+                       {
+                               if (__pContentTableView->IsItemChecked(iCount) == true)
+                               {
+                                       __pContentTableView->SetItemChecked(iCount,false);
+                                       ContentInformation* pContentInfo = __pPresentationModel->GetContentInfoN(iCount);
+                                       contentManager.DeleteContent(pContentInfo->contentId);
+
+                                       delete pContentInfo;
+                                       pContentInfo = null;
+                               }
+                       }
+                       __pPresentationModel->RefreshContentList(__currentContentIndex);
+                       __pContentTableView->UpdateTableView();
+                       __pContentTableView->Invalidate(true);
+
+                       __checkedItemCount = INIT_VALUE;
+                       CommonUtil::ShowCheckedCountLabel(*__pCheckedCountLabel, __checkedItemCount, *__pContentTableView, *this);
+
+                       if (__pPresentationModel->GetContentCount(__currentContentIndex) > 0)
+                       {
+                               CommonUtil::ShowSelectAllCheckButton(*__pSelectAllCheckedButton);
+                       }
+                       else
+                       {
+                               __pSelectAllCheckedButton->SetEnabled(false);
+                               __pSelectAllCheckedButton->SetShowState(false);
+                               CommonUtil::ShowNoContentImage(INIT_VALUE, *__pContentTableView, *__pNoContentImageLabel, *__pNoContentTextLabel);
+                       }
+               }
+               break;
+
+       case IDA_FOOTER_BUTTON_SHARE:
+               {
+                       Tizen::Base::Collection::ArrayList* pDataList = new (std::nothrow) ArrayList();
+                       Footer* pFooter = GetFooter();
+                       int totalCount = __pPresentationModel->GetContentCount(__currentContentIndex);
+
+                       pDataList->Construct();
+
+                       for (int iCount = 0; iCount < totalCount; iCount++)
+                       {
+                               if (__pContentTableView->IsItemChecked(iCount) == true)
+                               {
+                                       ContentInformation* pContentInfo = __pPresentationModel->GetContentInfoN(iCount);
+                                       if (pContentInfo == null)
+                                       {
+                                               pDataList->RemoveAll(true);
+                                               delete pDataList;
+                                               pDataList = null;
+                                               return;
+                                       }
+                                       pDataList->Add(*(new (std::nothrow) String(L"attachment:" + pContentInfo->ContentFilePath)));
+
+                                       __pContentTableView->SetItemChecked(iCount, false);
+
+                                       delete pContentInfo;
+                                       pContentInfo = null;
+                               }
+                       }
+                       pFooter->SetItemEnabled(INDEX_FOOTER_DELETE, false);
+                       pFooter->SetItemEnabled(INDEX_FOOTER_SHARE, false);
+                       pFooter->SetItemEnabled(INDEX_FOOTER_ADDTOPLATLIST, false);
+
+                       __checkedItemCount = INIT_VALUE;
+                       CommonUtil::ShowCheckedCountLabel(*__pCheckedCountLabel, __checkedItemCount, *__pContentTableView, *this);
+                       CommonUtil::ShowSelectAllCheckButton(*__pSelectAllCheckedButton);
+
+                       Invalidate(true);
+
+                       if (__pSharePopup == null)
+                       {
+                               __pSharePopup = new (std::nothrow) SharePopup();
+                               __pSharePopup->Initialize();
+                       }
+                       __pSharePopup->SetShowState(true);
+                       __pSharePopup->Show();
+                       __pSharePopup->SetArguments(pDataList);
+               }
+               break;
+
+       case IDA_FOOTER_BUTTON_ADD_TO_PLAYLIST:
+               {
+                       ContentManager contentManager;
+                       Footer* pFooter = GetFooter();
+                       Tizen::Base::Collection::ArrayList* pDataList = new (std::nothrow) ArrayList();
+                       int totalCount = 0;
+
+                       if (__checkedItemCount <= 0)
+                       {
+                               return;
+                       }
+
+                       pDataList->Construct();
+                       contentManager.Construct();
+                       totalCount = __pPresentationModel->GetContentCount(__currentContentIndex);
+
+                       for (int iCount = 0; iCount < totalCount; iCount++)
+                       {
+                               if (__pContentTableView->IsItemChecked(iCount) == true)
+                               {
+                                       ContentInformation* pContentInfo = __pPresentationModel->GetContentInfoN(iCount);
+                                       if (pContentInfo == null)
+                                       {
+                                               pDataList->RemoveAll(true);
+                                               delete pDataList;
+                                               pDataList = null;
+                                               return;
+                                       }
+
+                                       pDataList->Add(*(new (std::nothrow) String(pContentInfo->ContentFilePath)));
+
+                                       __pContentTableView->SetItemChecked(iCount, false);
+
+                                       delete pContentInfo;
+                                       pContentInfo = null;
+                               }
+                       }
+
+                       if (IsFailed(CreatePlayListPickerPopup(pDataList)))
+                       {
+                               AppLogDebug("CreatePlayListPickerPopup failed(%s)", GetLastResult());
+                               return;
+                       }
+                       __pPlayListPickerPopup->SetShowState(true);
+                       __pPlayListPickerPopup->Show();
+                       //__pPlayListPickerPopup->SetCollectedContent(pDataList);
+
+                       pFooter->SetItemEnabled(INDEX_FOOTER_DELETE, false);
+                       pFooter->SetItemEnabled(INDEX_FOOTER_SHARE, false);
+                       pFooter->SetItemEnabled(INDEX_FOOTER_ADDTOPLATLIST, false);
+
+                       __checkedItemCount = INIT_VALUE;
+                       CommonUtil::ShowCheckedCountLabel(*__pCheckedCountLabel, __checkedItemCount, *__pContentTableView, *this);
+                       CommonUtil::ShowSelectAllCheckButton(*__pSelectAllCheckedButton);
+                       Invalidate(true);
+               }
+               break;
+
+       default:
+               break;
+       }
+       AppLogDebug("EXIT");
+}
+
+int
+GenreContentListForm::GetItemCount(void)
+{
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
+       return __pPresentationModel->GetContentCount(__currentContentIndex);
+}
+
+Tizen::Ui::Controls::TableViewItem*
+GenreContentListForm::CreateItem(const int itemIndex, int itemWidth)
+{
+       AppLogDebug("ENTER");
+       ContentInformation* pContentInfo = null;
+
+       TableViewItem* pItem = new (std::nothrow) TableViewItem();
+       if (__checkEdit)
+       {
+               pItem->Construct(Dimension(itemWidth, ITEM_HEIGHT), TABLE_VIEW_ANNEX_STYLE_MARK);
+       }
+       else
+       {
+               pItem->Construct(Dimension(itemWidth, ITEM_HEIGHT), TABLE_VIEW_ANNEX_STYLE_NORMAL);
+               pItem->SetContextItem(__pContextItem);
+       }
+       pItem->SetBackgroundColor(COLOR_WHITE);
+
+       pContentInfo = __pPresentationModel->GetContentInfoN(itemIndex);
+       if (pContentInfo == null)
+       {
+               delete pItem;
+               pItem = null;
+               return null;
+       }
+
+       RequestThumbnail(pContentInfo->contentId, (new (std::nothrow) int(itemIndex)));
+       CreateTableViewItem(*pItem, *pContentInfo);
+
+       delete pContentInfo;
+       pContentInfo = null;
+
+       AppLogDebug("EXIT");
+       return pItem;
+}
+
+void
+GenreContentListForm::OnTableViewItemStateChanged(Tizen::Ui::Controls::TableView& tableView,
+                                                       int itemIndex,
+                                                       Tizen::Ui::Controls::TableViewItem* pItem,
+                                                       Tizen::Ui::Controls::TableViewItemStatus status)
+{
+       AppLogDebug("ENTER");
+       switch (status)
+       {
+       case TABLE_VIEW_ITEM_STATUS_CHECKED:
+               {
+                       Footer* pFooter = GetFooter();
+                       __checkedItemCount++;
+                       tableView.SetItemChecked(itemIndex, true);
+
+                       pFooter->SetItemEnabled(INDEX_FOOTER_DELETE, true);
+                       pFooter->SetItemEnabled(INDEX_FOOTER_SHARE, true);
+                       pFooter->SetItemEnabled(INDEX_FOOTER_ADDTOPLATLIST, true);
+
+                       pFooter->Invalidate(true);
+                       if (__checkedItemCount == __pPresentationModel->GetContentCount(__currentContentIndex))
+                       {
+                               __pSelectAllCheckedButton->SetSelected(true);
+                       }
+                       CommonUtil::ShowCheckedCountLabel(*__pCheckedCountLabel, __checkedItemCount, *__pContentTableView, *this);
+               }
+               break;
+
+       case TABLE_VIEW_ITEM_STATUS_UNCHECKED:
+               {
+                       Footer* pFooter = GetFooter();
+
+                       __checkedItemCount--;
+                       tableView.SetItemChecked(itemIndex, false);
+
+                       if (__checkedItemCount == INIT_VALUE)
+                       {
+                               pFooter->SetItemEnabled(INDEX_FOOTER_DELETE, false);
+                               pFooter->SetItemEnabled(INDEX_FOOTER_SHARE, false);
+                               pFooter->SetItemEnabled(INDEX_FOOTER_ADDTOPLATLIST, false);
+
+                               pFooter->Invalidate(true);
+                       }
+
+                       if (__checkedItemCount != __pPresentationModel->GetContentCount(__currentContentIndex))
+                       {
+                               __pSelectAllCheckedButton->SetSelected(false);
+                       }
+                       CommonUtil::ShowCheckedCountLabel(*__pCheckedCountLabel, __checkedItemCount, *__pContentTableView, *this);
+               }
+               break;
+
+       case TABLE_VIEW_ITEM_STATUS_SELECTED:
+               {
+                       SceneManager* pSceneManager = SceneManager::GetInstance();
+                       ArrayList* tempArg;
+                       AppAssert(pSceneManager);
+                       tempArg = MakePlayerSceneParam(itemIndex);
+                       pSceneManager->GoForward(ForwardSceneTransition(IDSCN_PLAYER),tempArg);
+
+                       if (tempArg != null)
+                       {
+                               tempArg->RemoveAll();
+                               delete tempArg;
+                               tempArg = null;
+                       }
+               }
+               break;
+
+       default:
+               break;
+       }
+       AppLogDebug("EXIT");
+}
+
+Tizen::Base::Collection::ArrayList*
+GenreContentListForm::MakePlayerSceneParam(int startIndex)
+{
+       AppLogDebug("ENTER");
+       ArrayList* pTempList = new (std::nothrow) ArrayList();
+       ArrayList* pSelectedMusicContent = null;
+
+       pSelectedMusicContent = __pPresentationModel->GetContentPathListN(__currentContentIndex);
+       if (pTempList == null || pSelectedMusicContent == null)
+       {
+               AppLogDebug("EXIT");
+               return null;
+       }
+       pTempList->Construct();
+
+       pTempList->Add(*(new (std::nothrow) String(MUSIC)));
+       pTempList->Add(*(new (std::nothrow) Integer(startIndex)));
+       pTempList->Add(*(pSelectedMusicContent));
+
+       AppLogDebug("EXIT");
+       return pTempList;
+}
+
+result
+GenreContentListForm::CreateTableViewItem(Tizen::Ui::Container& parent,
+                                                                               const ContentInformation& contentInfo)
+{
+       AppLogDebug("ENTER");
+       result r = E_SUCCESS;
+       Rectangle rectTitleName;
+       Rectangle rectPlayTime;
+       Rectangle rectArtistName;
+
+       if (__checkEdit)
+       {
+               rectTitleName = RECT_GENRE_EDIT_ITEM_TITLE_NAME;
+               rectArtistName = RECT_GENRE_EDIT_ITEM_ARTIST_NAME;
+               rectPlayTime = RECT_GENRE_EDIT_ITEM_TIME;
+       }
+       else
+       {
+               rectTitleName = RECT_GENRE_ITEM_TITLE_NAME;
+               rectArtistName = RECT_GENRE_ITEM_ARTIST_NAME;
+               rectPlayTime = RECT_GENRE_ITEM_TIME;
+       }
+
+       Label* pThumbnailLabel = new (std::nothrow) Label();
+       pThumbnailLabel->Construct(RECT_GENRE_ITEM_THUMBNAIL, L"");
+       pThumbnailLabel->SetTextConfig(FONT_SIZE, LABEL_TEXT_STYLE_NORMAL);
+       pThumbnailLabel->SetBackgroundBitmap(*GetDefaultThumbnail());
+       pThumbnailLabel->SetName(L"ThumbnailLabel");
+
+       Label* pTitleLabel = new (std::nothrow) Label();
+       pTitleLabel->Construct(rectTitleName, L"");
+       pTitleLabel->SetTextConfig(FONT_SIZE, LABEL_TEXT_STYLE_NORMAL);
+       pTitleLabel->SetTextHorizontalAlignment(ALIGNMENT_LEFT);
+       pTitleLabel->SetText(contentInfo.TitleName);
+
+       Label* pArtistNameLabel = new (std::nothrow) Label();
+       pArtistNameLabel->Construct(rectArtistName, L"");
+       pArtistNameLabel->SetTextConfig(FONT_SIZE, LABEL_TEXT_STYLE_NORMAL);
+       pArtistNameLabel->SetTextHorizontalAlignment(ALIGNMENT_LEFT);
+       pArtistNameLabel->SetText(contentInfo.ArtistName);
+
+       Label* pTimeLabel = new (std::nothrow) Label();
+       pTimeLabel->Construct(rectPlayTime, L"");
+       pTimeLabel->SetTextConfig(FONT_SIZE, LABEL_TEXT_STYLE_NORMAL);
+       pTimeLabel->SetTextHorizontalAlignment(ALIGNMENT_RIGHT);
+       pTimeLabel->SetText(CommonUtil::GetFormatDate(contentInfo.Duration));
+
+       parent.AddControl(*pThumbnailLabel);
+       parent.AddControl(*pTitleLabel);
+       parent.AddControl(*pArtistNameLabel);
+       parent.AddControl(*pTimeLabel);
+       AppLogDebug("EXIT");
+       return r;
+}
+
+void
+GenreContentListForm::ToggleViewMode(bool editMode)
+{
+       AppLogDebug("ENTER");
+       Footer* pFooter = GetFooter();
+
+       if (editMode)
+       {
+               int currentAlbumContentCount = 0;
+               currentAlbumContentCount = __pPresentationModel->GetContentCount(__currentContentIndex);
+
+               pFooter->RemoveAllButtons();
+               pFooter->RemoveAllItems();
+               pFooter->RemoveActionEventListener(*this);
+               pFooter = CommonUtil::CreateEditFooter(*this);
+               pFooter->AddActionEventListener(*this);
+               pFooter->SetBackButton();
+               SetFormBackEventListener(this);
+
+               if ( currentAlbumContentCount > INIT_VALUE)
+               {
+                       SetTitleText(__strHeaderName);
+               }
+               else
+               {
+                       SetTitleText("No songs");
+                       CommonUtil::ShowNoContentImage(INIT_VALUE, *__pContentTableView, *__pNoContentImageLabel, *__pNoContentTextLabel);
+                       pFooter->SetItemEnabled(INDEX_FOOTER_EDIT, false);
+               }
+
+               __pSelectAllCheckedButton->SetEnabled(false);
+               __pSelectAllCheckedButton->SetShowState(false);
+
+               __checkEdit = false;
+               __pContentTableView->SetBounds(Rectangle(0, 0, GetClientAreaBounds().width, GetClientAreaBounds().height));
+               __pContentTableView->Invalidate(true);
+               __pContentTableView->UpdateTableView();
+       }
+       else
+       {
+               SetTitleText(ResourceManager::GetString("IDS_COM_BODY_EDIT"));
+
+               pFooter->RemoveAllButtons();
+               pFooter->RemoveAllItems();
+               pFooter->RemoveActionEventListener(*this);
+
+               pFooter = CommonUtil::CreateDeleteFooter(*this);
+               pFooter->AddActionEventListener(*this);
+
+               __pSelectAllCheckedButton->SetEnabled(true);
+               __pSelectAllCheckedButton->SetShowState(true);
+
+               __checkEdit = true;
+               __pContentTableView->SetBounds(Rectangle(0, __pSelectAllCheckedButton->GetHeight(), GetClientAreaBounds().width, (GetClientAreaBounds().height - __pSelectAllCheckedButton->GetHeight())));
+               __pContentTableView->Invalidate(true);
+               __pContentTableView->UpdateTableView();
+       }
+       Invalidate(true);
+       AppLogDebug("EXIT");
+}
+
+void
+GenreContentListForm::OnAppControlCompleteResponseReceived(const AppId& appId,
+               const String& operationId, AppCtrlResult appControlResult,
+               const IMap* pExtraData)
+{
+       AppLogDebug("ENTER");
+       if (pExtraData == null)
+       {
+               AppLogDebug("EXIT");
+               return;
+       }
+
+       AppLogDebug("appId(%ls), operationId(%ls)", appId.GetPointer(), operationId.GetPointer());
+       if (appId.Equals(String(TIZEN_APPCONTROL_PROVIDER_CONTACT)))
+       {
+               if (appControlResult == APP_CTRL_RESULT_SUCCEEDED)
+               {
+                       const String* pContactId = static_cast<const String*>(pExtraData->GetValue(String(APPCONTROL_KEY_RETURNTYPE)));
+                       if (pContactId->Equals(APPCONTROL_VALUE_CONTACTID, true))
+                       {
+                               const String* pResultString = static_cast<const String*>(pExtraData->GetValue(String(APPCONTROL_KEY_VALUE)));
+
+                               AppLogDebug("%ls", pResultString->GetPointer());
+                               int contactId;
+                               Integer::Parse(*pResultString, contactId);
+
+                               AddressbookManager* pAddressbookManager = AddressbookManager::GetInstance();
+                               Addressbook* pAddressbook = pAddressbookManager->GetAddressbookN(DEFAULT_ADDRESSBOOK_ID);
+
+                               ContentInformation* pCcontentInfo = __pPresentationModel->GetContentInfoN(__itemIndex);
+                               if (pCcontentInfo == null)
+                               {
+                                       delete pAddressbook;
+                                       pAddressbook = null;
+                                       return;
+                               }
+
+                               Contact* pContact = pAddressbook->GetContactN(contactId);
+                               pContact->SetValue(CONTACT_PROPERTY_ID_RINGTONE, pCcontentInfo->ContentFilePath);
+                               result r = pAddressbook->UpdateContact(*pContact);
+
+                               if (r == E_SUCCESS)
+                               {
+                                       MessageBox messageBox;
+                                       messageBox.Construct(L"", ResourceManager::GetString(L"IDS_COM_POP_SUCCESS"),
+                                                       MSGBOX_STYLE_OK,
+                                                       COUNT_MESSAGE_BOX_TIMEOUT);
+                                       int modalResult = 0;
+                                       messageBox.ShowAndWait(modalResult);
+                               }
+
+                               delete pCcontentInfo;
+                               pCcontentInfo = null;
+
+                               delete pContact;
+                               pContact = null;
+
+                               delete pAddressbook;
+                               pAddressbook = null;
+                       }
+               }
+       }
+       AppLogDebug("EXIT");
+}
+
+void
+GenreContentListForm::OnThumbnailInfoReveivedN(ThumbnailInfo* pThumbnailInfo)
+{
+       AppLogDebug("ENTER");
+       int itemIndex = 0;
+       void* pParam = null;
+       __pThumbnail = pThumbnailInfo->GetBitmapN();
+       pParam = pThumbnailInfo->GetUserParamN();
+       if (pParam)
+       {
+               itemIndex = *(static_cast<int*>(pParam));
+       }
+       __pContentTableView->RefreshItem(itemIndex, TABLE_VIEW_REFRESH_TYPE_ITEM_MODIFY);
+       delete pThumbnailInfo;
+       delete static_cast<int*>(pParam);
+       AppLogDebug("EXIT");
+}
+
+void
+GenreContentListForm::OnUserEventReceivedN(RequestId requestId, Tizen::Base::Collection::IList* pArgs)
+{
+       AppLogDebug("ENTER");
+       AppLogDebug("OnUserEventReceivedN %d", requestId);
+       if (requestId == ID_DESTORY_PLAY_LIST_PICKER_POPUP)
+       {
+               if (__pPlayListPickerPopup != null)
+               {
+                       delete __pPlayListPickerPopup;
+                       __pPlayListPickerPopup = null;
+               }
+       }
+       AppLogDebug("EXIT");
+}
+
+void
+GenreContentListForm::UpdateItem(int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem)
+{
+       AppLogDebug("ENTER");
+       Label* pThumbnailLabel = static_cast<Label*>(pItem->GetControl(L"ThumbnailLabel"));
+       if (__pThumbnail == null || pThumbnailLabel == null)
+       {
+               AppLogDebug("__pThumbnail or pThumbnailLabel is null");
+               delete __pThumbnail;
+               __pThumbnail = null;
+               return;
+       }
+       pThumbnailLabel->SetBackgroundBitmap(*__pThumbnail);
+       delete __pThumbnail;
+       __pThumbnail = null;
+       pThumbnailLabel->Invalidate(true);
+       AppLogDebug("EXIT");
+}
\ No newline at end of file
old mode 100755 (executable)
new mode 100644 (file)
index 055d0d8..301600d
@@ -1,4 +1,4 @@
-//
+//
 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
 //
 // Licensed under the Flora License, Version 1.0 (the License);
 // limitations under the License.
 //
 
+/**
+ * @file               MpGenreContentPickerPanel.cpp
+ * @brief              This is the implementation file for GenreContentPickerPanel class.
+ */
+
 #include "MpGenreContentPickerPanel.h"
 
 using namespace Tizen::Base;
 using namespace Tizen::Base::Collection;
 using namespace Tizen::Content;
 using namespace Tizen::Graphics;
+using namespace Tizen::Social;
 using namespace Tizen::Ui;
 using namespace Tizen::Ui::Controls;
 using namespace Tizen::Ui::Scenes;
-using namespace Tizen::Social;
 
-GenreContentPickerPanel::GenreContentPickerPanel()
-: __checkedItemCount(0)
-, __pContentTableView(null)
-, __pSelectAllCheckedButton(null)
-, __pCheckedCountLabel(null)
+GenreContentPickerPanel::GenreContentPickerPanel(void)
+       : __checkedItemCount(0)
+       , __pContentTableView(null)
+       , __pSelectAllCheckedButton(null)
+       , __pCheckedCountLabel(null)
 {
-       //AppLogDebug("GenreContentPickerPanel");
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 
-GenreContentPickerPanel::~GenreContentPickerPanel()
+GenreContentPickerPanel::~GenreContentPickerPanel(void)
 {
-       //AppLogDebug("~GenreContentPickerPanel");
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 
-
 bool
 GenreContentPickerPanel::Initialize(void)
 {
-       //AppLogDebug("Initialize");
+       AppLogDebug("ENTER");
        result r = Construct(Rectangle(INIT_VALUE, INIT_VALUE, INIT_VALUE, INIT_VALUE));
        if (IsFailed(r))
        {
                return false;
        }
+       AppLogDebug("EXIT");
        return true;
 }
 
 result
 GenreContentPickerPanel::OnInitializing(void)
 {
-       //AppLogDebug("OnInitializing");
+       AppLogDebug("ENTER");
        Form* pForm = dynamic_cast<Form*>(GetParent());
        AppAssert(pForm);
 
-       int width  = pForm->GetClientAreaBounds().width;
+       int width = pForm->GetClientAreaBounds().width;
        int height = pForm->GetClientAreaBounds().height;
 
        SetBounds(INIT_VALUE, INIT_VALUE, width, height);
@@ -80,124 +87,112 @@ GenreContentPickerPanel::OnInitializing(void)
 
        __pPresentationModel = GenreListPresentationModel::GetInstance();
 
+       AppLogDebug("EXIT");
        return E_SUCCESS;
 }
 
 result
 GenreContentPickerPanel::OnTerminating(void)
 {
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
        return E_SUCCESS;
 }
 
 void
 GenreContentPickerPanel::OnActionPerformed(const Tizen::Ui::Control& source, int actionId)
 {
-       //AppLogDebug("OnActionPerformed");
+       AppLogDebug("ENTER");
        SceneManager* pSceneManager = SceneManager::GetInstance();
        AppAssert(pSceneManager);
        Form* pForm = dynamic_cast<Form*>(GetParent());
        AppAssert(pForm);
 
-       int totalCount = __pPresentationModel->GetSongContentCount();
+       int totalCount = __pPresentationModel->GetContentCount(__pPresentationModel->GetCurrentGenreIndex());
 
-       switch(actionId)
+       switch (actionId)
        {
        case IDA_CHECK_BUTTON:
-       {
-               //AppLogDebug("IDA_CHECK_BUTTON");
-               __checkedItemCount = totalCount;
-               CommonUtil::SetAllCheckState(true, *__pContentTableView, totalCount);
-               Form* pForm = dynamic_cast<Form*>(GetParent());
-               AppAssert(pForm);
-               CommonUtil::ShowCheckedCountLabel(*__pCheckedCountLabel, __checkedItemCount, *__pContentTableView, *pForm);
-               CommonUtil::SetButtonEnabled(*pForm, __checkedItemCount, actionId);
+               {
+                       //AppLogDebug("IDA_CHECK_BUTTON");
+                       __checkedItemCount = totalCount;
+                       CommonUtil::SetAllCheckState(true, *__pContentTableView, totalCount);
+                       Form* pForm = dynamic_cast<Form*>(GetParent());
+                       AppAssert(pForm);
+                       CommonUtil::ShowCheckedCountLabel(*__pCheckedCountLabel, __checkedItemCount, *__pContentTableView, *pForm);
+                       CommonUtil::SetButtonEnabled(*pForm, __checkedItemCount, actionId);
+               }
                break;
-       }
+
        case IDA_UNCHECK_BUTTON:
-       {
-               //AppLogDebug("IDA_UNCHECK_BUTTON");
-               __checkedItemCount = INIT_VALUE;
-               CommonUtil::SetAllCheckState(false, *__pContentTableView, totalCount);
-               Form* pForm = dynamic_cast<Form*>(GetParent());
-               AppAssert(pForm);
-               CommonUtil::ShowCheckedCountLabel(*__pCheckedCountLabel, __checkedItemCount, *__pContentTableView, *pForm);
-               CommonUtil::SetButtonEnabled(*pForm, __checkedItemCount, actionId);
-               break;
-       }
-       case IDA_FOOTER_BUTTON_ADD_TO_PLAYLIST:
-       {
-               if (__checkedItemCount <= 0)
                {
-                       return;
+                       //AppLogDebug("IDA_UNCHECK_BUTTON");
+                       __checkedItemCount = INIT_VALUE;
+                       CommonUtil::SetAllCheckState(false, *__pContentTableView, totalCount);
+                       Form* pForm = dynamic_cast<Form*>(GetParent());
+                       AppAssert(pForm);
+                       CommonUtil::ShowCheckedCountLabel(*__pCheckedCountLabel, __checkedItemCount, *__pContentTableView, *pForm);
+                       CommonUtil::SetButtonEnabled(*pForm, __checkedItemCount, actionId);
                }
+               break;
 
-               PlayList* pPlayList = PlayListManager::GetInstance()->GetPlayListN(CommonUtil::GetAddtoPlaylistName());
-
-               int totalCount = __pPresentationModel->GetSongContentCount();
-               for(int iCount = 0; iCount < totalCount; iCount++)
+       case IDA_FOOTER_BUTTON_ADD_TO_PLAYLIST:
                {
-                       if (__pContentTableView->IsItemChecked(iCount) == true)
+                       if (__checkedItemCount <= 0)
+                       {
+                               return;
+                       }
+
+                       int totalCount = __pPresentationModel->GetContentCount(__pPresentationModel->GetCurrentGenreIndex());
+                       for (int iCount = 0; iCount < totalCount; iCount++)
                        {
-                               ContentInformationStruct* pContentInfoStruct = __pPresentationModel->GetSongContentInfoN(iCount);
-                               if (pContentInfoStruct == null)
+                               if (__pContentTableView->IsItemChecked(iCount) == true)
                                {
-                                       continue;
+                                       __pPresentationModel->AddContent(*new (std::nothrow) String(CommonUtil::GetAddtoPlaylistName()), iCount);
+                                       __pContentTableView->SetItemChecked(iCount, false);
                                }
-                               pPlayList->AddItem(pContentInfoStruct->contentId);
-
-                               __pContentTableView->SetItemChecked(iCount, false);
-
-                               delete pContentInfoStruct->pThumbnail;
-                               pContentInfoStruct->pThumbnail = null;
-
-                               delete pContentInfoStruct;
-                               pContentInfoStruct = null;
                        }
-               }
 
-               delete pPlayList;
-               pPlayList = null;
+                       Form* pForm = dynamic_cast<Form*>(GetParent());
+                       AppAssert(pForm);
+                       CommonUtil::SetButtonEnabled(*pForm, __checkedItemCount, actionId);
 
-               Form* pForm = dynamic_cast<Form*>(GetParent());
-               AppAssert(pForm);
-               CommonUtil::SetButtonEnabled(*pForm, __checkedItemCount, actionId);
+                       __checkedItemCount = INIT_VALUE;
+                       CommonUtil::ShowCheckedCountLabel(*__pCheckedCountLabel, __checkedItemCount, *__pContentTableView, *pForm);
+                       CommonUtil::ShowSelectAllCheckButton(*__pSelectAllCheckedButton);
+                       CommonUtil::SetAddtoPlaylistState(false);
 
-               __checkedItemCount = INIT_VALUE;
-               CommonUtil::ShowCheckedCountLabel(*__pCheckedCountLabel, __checkedItemCount, *__pContentTableView, *pForm);
-               CommonUtil::ShowSelectAllCheckButton(*__pSelectAllCheckedButton);
-               CommonUtil::SetAddtoPlaylistState(false);
+                       Invalidate(true);
 
-               Invalidate(true);
-
-               pSceneManager->GoForward(ForwardSceneTransition(IDSCN_PLAYLIST_LIST,
+                       pSceneManager->GoForward(ForwardSceneTransition(IDSCN_PLAYLIST_LIST,
                                                                                                                SCENE_TRANSITION_ANIMATION_TYPE_NONE,
                                                                                                                SCENE_HISTORY_OPTION_NO_HISTORY,
                                                                                                                SCENE_DESTROY_OPTION_DESTROY));
+               }
                break;
-       }
+
        case IDA_FOOTER_BUTTON_CANCEL:
-       {
-               //AppLogDebug("IDA_FOOTER_BUTTON_CANCEL");
-               Form* pForm = dynamic_cast<Form*>(GetParent());
-               AppAssert(pForm);
-               CommonUtil::SetButtonEnabled(*pForm, __checkedItemCount, actionId);
-               pSceneManager->GoBackward(BackwardSceneTransition());
+               {
+                       //AppLogDebug("IDA_FOOTER_BUTTON_CANCEL");
+                       Form* pForm = dynamic_cast<Form*>(GetParent());
+                       AppAssert(pForm);
+                       CommonUtil::SetButtonEnabled(*pForm, __checkedItemCount, actionId);
+                       pSceneManager->GoBackward(BackwardSceneTransition());
+               }
                break;
-       }
+
        default:
-       {
                break;
-       }
        }//End of switch
+       AppLogDebug("EXIT");
 }
 
 void
 GenreContentPickerPanel::OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previousSceneId,
-                                                                      const Tizen::Ui::Scenes::SceneId& currentSceneId,
-                                                                      Tizen::Base::Collection::IList* pArgs)
+                                                                               const Tizen::Ui::Scenes::SceneId& currentSceneId,
+                                                                               Tizen::Base::Collection::IList* pArgs)
 {
-       //AppLogDebug("OnSceneActivatedN");
-
+       AppLogDebug("ENTER");
        Form* pForm = dynamic_cast<Form*>(GetParent());
        AppAssert(pForm);
 
@@ -205,20 +200,20 @@ GenreContentPickerPanel::OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& pre
        pFooter->AddActionEventListener(*this);
 
        CommonUtil::SetButtonEnabled(*pForm, __checkedItemCount);
-
+       __pPresentationModel->UpdateGnereList();
        if (pArgs != null)
        {
                pArgs->RemoveAll(true);
                delete pArgs;
        }
+       AppLogDebug("EXIT");
 }
 
 void
 GenreContentPickerPanel::OnSceneDeactivated(const Tizen::Ui::Scenes::SceneId& currentSceneId,
-                                                                               const Tizen::Ui::Scenes::SceneId& nextSceneId)
+                                                                                       const Tizen::Ui::Scenes::SceneId& nextSceneId)
 {
-       //AppLogDebug("OnSceneDeactivated");
-
+       AppLogDebug("ENTER");
        Form* pForm = dynamic_cast<Form*>(GetParent());
        AppAssert(pForm);
 
@@ -226,99 +221,97 @@ GenreContentPickerPanel::OnSceneDeactivated(const Tizen::Ui::Scenes::SceneId& cu
        pFooter->RemoveAllButtons();
        pFooter->RemoveAllItems();
        pFooter->RemoveActionEventListener(*this);
+       AppLogDebug("EXIT");
 }
 
 int
 GenreContentPickerPanel::GetItemCount(void)
 {
-       //AppLogDebug("GetItemCount");
-
+       AppLogDebug("ENTER");
        if (__pPresentationModel == null)
        {
-               return 0;
+               return INIT_VALUE;
        }
-       return __pPresentationModel->GetSongContentCount();
+       AppLogDebug("EXIT");
+       return __pPresentationModel->GetContentCount(__pPresentationModel->GetCurrentGenreIndex());
 }
 
 Tizen::Ui::Controls::TableViewItem*
 GenreContentPickerPanel::CreateItem(const int itemIndex, int itemWidth)
 {
-       //AppLogDebug("CreateTableViewItem");
-
-       ContentInformationStruct* pContentInfoStruct = __pPresentationModel->GetSongContentInfoN(itemIndex);
+       AppLogDebug("ENTER");
+       ContentInformation* pContentInfoStruct = __pPresentationModel->GetContentInfoN(itemIndex);
        if (pContentInfoStruct == null)
        {
                return null;
        }
 
        TableViewItem* pItem = new (std::nothrow) TableViewItem();
-       pItem->Construct(Dimension(itemWidth, ITEM_HEIGHT),TABLE_VIEW_ANNEX_STYLE_MARK);
+       pItem->Construct(Dimension(itemWidth, ITEM_HEIGHT), TABLE_VIEW_ANNEX_STYLE_MARK);
        pItem->SetBackgroundColor(COLOR_ITEM);
 
-       CommonUtil::CreateContentPikerTableViewItem(*pItem, pContentInfoStruct->TitleName,CommonUtil::GetFormatDate(pContentInfoStruct->Duration));
-
-       //test_code_start
-       delete pContentInfoStruct->pThumbnail;
-       pContentInfoStruct->pThumbnail = null;
+       CommonUtil::CreateContentPikerTableViewItem(*pItem, pContentInfoStruct->TitleName, CommonUtil::GetFormatDate(pContentInfoStruct->Duration));
 
        delete pContentInfoStruct;
        pContentInfoStruct = null;
-       //test_code_end
 
+       AppLogDebug("EXIT");
        return pItem;
 }
 
 bool
 GenreContentPickerPanel::DeleteItem(const int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem)
 {
-       //AppLogDebug("DeleteItem");
-
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
        return true;
 }
 
 void
 GenreContentPickerPanel::UpdateItem(int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem)
 {
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 
 int
 GenreContentPickerPanel::GetDefaultItemHeight(void)
 {
-       //AppLogDebug("GetDefaultItemHeight");
-
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
        return ITEM_HEIGHT;
 }
 
 void
 GenreContentPickerPanel::OnTableViewItemStateChanged(Tizen::Ui::Controls::TableView& tableView,
-                                                     int itemIndex,
-                                                     Tizen::Ui::Controls::TableViewItem* pItem,
-                                                     Tizen::Ui::Controls::TableViewItemStatus status)
+                                                               int itemIndex,
+                                                               Tizen::Ui::Controls::TableViewItem* pItem,
+                                                               Tizen::Ui::Controls::TableViewItemStatus status)
 {
-       //AppLogDebug("OnTableViewItemStateChanged");
-       switch(status)
+       AppLogDebug("ENTER");
+       switch (status)
        {
        case TABLE_VIEW_ITEM_STATUS_CHECKED:
-       {
-               __checkedItemCount++;
-               tableView.SetItemChecked(itemIndex, true);
+               {
+                       __checkedItemCount++;
+                       tableView.SetItemChecked(itemIndex, true);
+               }
                break;
-       }
+
        case TABLE_VIEW_ITEM_STATUS_UNCHECKED:
-       {
-               __checkedItemCount--;
-               tableView.SetItemChecked(itemIndex, false);
+               {
+                       __checkedItemCount--;
+                       tableView.SetItemChecked(itemIndex, false);
+               }
                break;
-       }
+
        default:
-       {
                break;
-       }
        }//end of switch
 
        CommonUtil::ShowSelectAllCheckButton(*__pSelectAllCheckedButton);
 
-       if (__checkedItemCount == __pPresentationModel->GetSongContentCount())
+       if (__checkedItemCount == __pPresentationModel->GetContentCount(__pPresentationModel->GetCurrentGenreIndex()))
        {
                __pSelectAllCheckedButton->SetSelected(true);
        }
@@ -329,22 +322,24 @@ GenreContentPickerPanel::OnTableViewItemStateChanged(Tizen::Ui::Controls::TableV
        AppAssert(pForm);
        CommonUtil::ShowCheckedCountLabel(*__pCheckedCountLabel, __checkedItemCount, *__pContentTableView, *pForm);
        CommonUtil::SetButtonEnabled(*pForm, __checkedItemCount);
+       AppLogDebug("EXIT");
 }
 
 void
 GenreContentPickerPanel::OnTableViewContextItemActivationStateChanged(Tizen::Ui::Controls::TableView& tableView,
-                                                                      int itemIndex,
-                                                                      Tizen::Ui::Controls::TableViewContextItem* pContextItem,
-                                                                      bool activated)
+                                                                               int itemIndex,
+                                                                               Tizen::Ui::Controls::TableViewContextItem* pContextItem,
+                                                                               bool activated)
 {
-       //AppLogDebug("OnTableViewContextItemActivationStateChanged");
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
+
 void
 GenreContentPickerPanel::OnTableViewItemReordered(Tizen::Ui::Controls::TableView& tableView,
-                                                  int itemIndexFrom,
-                                                  int itemIndexTo)
+                                                               int itemIndexFrom,
+                                                               int itemIndexTo)
 {
-       //AppLogDebug("OnTableViewItemReordered");
-}
-
-
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
+}
\ No newline at end of file
old mode 100755 (executable)
new mode 100644 (file)
index 7c1a027..9b40046
@@ -1,4 +1,4 @@
-//
+//
 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
 //
 // Licensed under the Flora License, Version 1.0 (the License);
 // limitations under the License.
 //
 
+/**
+ * @file               MpGenreListEditorPanel.cpp
+ * @brief              This is the implementation file for GenreListEditorPanel class.
+ */
 
 #include "MpGenreListEditorPanel.h"
 #include "MpPlaylistPickerPopup.h"
+#include "MpThumbnailInfo.h"
 
 using namespace Tizen::Base;
 using namespace Tizen::Base::Collection;
@@ -27,42 +32,47 @@ using namespace Tizen::Ui::Controls;
 using namespace Tizen::Ui::Scenes;
 
 GenresListEditorPanel::GenresListEditorPanel(void)
-: __checkedItemCount(0)
-, __pContentTableView(null)
-, __pSelectAllCheckedButton(null)
-, __pCheckedCountLabel(null)
-, __pPlayListPickerPopup(null)
+       : ThumbnailBase::ThumbnailBase()
+       , __checkedItemCount(0)
+       , __pContentTableView(null)
+       , __pSelectAllCheckedButton(null)
+       , __pCheckedCountLabel(null)
+       , __pThumbnail(null)
+       , __pPlayListPickerPopup(null)
 {
-       //AppLogDebug("GenresListEditorPanel");
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 
 GenresListEditorPanel::~GenresListEditorPanel(void)
 {
-       //AppLogDebug("~GenresListEditorPanel");
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 
 bool
 GenresListEditorPanel::Initialize(void)
 {
-       //AppLogDebug("Initialize");
-       result r = Construct(Rectangle(INIT_VALUE, INIT_VALUE, INIT_VALUE, INIT_VALUE));
+       AppLogDebug("ENTER");
+       result r = BasePanel::Construct(Rectangle(INIT_VALUE, INIT_VALUE, INIT_VALUE, INIT_VALUE));
        if (IsFailed(r))
        {
                return false;
        }
+       AppLogDebug("EXIT");
        return true;
 }
 
 result
 GenresListEditorPanel::OnInitializing(void)
 {
-       //AppLogDebug("OnInitializing");
+       AppLogDebug("ENTER");
        __pPresentationModel = GenreListPresentationModel::GetInstance();
 
        Form* pForm = dynamic_cast<Form*>(GetParent());
        AppAssert(pForm);
 
-       int width  = pForm->GetClientAreaBounds().width;
+       int width = pForm->GetClientAreaBounds().width;
        int height = pForm->GetClientAreaBounds().height;
 
        SetBounds(INIT_VALUE, INIT_VALUE, width, height);
@@ -81,101 +91,100 @@ GenresListEditorPanel::OnInitializing(void)
        AddControl(*__pSelectAllCheckedButton);
        AddControl(*__pCheckedCountLabel);
 
-       return E_SUCCESS;
+       AppLogDebug("EXIT");
+       return ThumbnailBase::Construct();
 }
 
 result
 GenresListEditorPanel::OnTerminating(void)
 {
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
        return E_SUCCESS;
 }
 
 void
 GenresListEditorPanel::OnActionPerformed(const Tizen::Ui::Control& source, int actionId)
 {
-       //AppLogDebug("OnActionPerformed");
+       AppLogDebug("ENTER");
        SceneManager* pSceneManager = SceneManager::GetInstance();
        AppAssert(pSceneManager);
 
-       int totalCount = __pPresentationModel->GetTotalGenreCount();
+       int totalCount = __pPresentationModel->GetAllGenreCount();
 
-       switch(actionId)
+       switch (actionId)
        {
        case IDA_CHECK_BUTTON:
-       {
-               //AppLogDebug("IDA_CHECK_BUTTON");
-               __checkedItemCount = totalCount;
-               CommonUtil::SetAllCheckState(true, *__pContentTableView, totalCount);
-               Form* pForm = dynamic_cast<Form*>(GetParent());
-               AppAssert(pForm);
-               CommonUtil::ShowCheckedCountLabel(*__pCheckedCountLabel, __checkedItemCount, *__pContentTableView, *pForm);
+               {
+                       //AppLogDebug("IDA_CHECK_BUTTON");
+                       __checkedItemCount = totalCount;
+                       CommonUtil::SetAllCheckState(true, *__pContentTableView, totalCount);
+                       Form* pForm = dynamic_cast<Form*>(GetParent());
+                       AppAssert(pForm);
+                       CommonUtil::ShowCheckedCountLabel(*__pCheckedCountLabel, __checkedItemCount, *__pContentTableView, *pForm);
+               }
                break;
-       }
+
        case IDA_UNCHECK_BUTTON:
-       {
-               //AppLogDebug("IDA_UNCHECK_BUTTON");
-               __checkedItemCount = INIT_VALUE;
-               CommonUtil::SetAllCheckState(false, *__pContentTableView, totalCount);
-               Form* pForm = dynamic_cast<Form*>(GetParent());
-               AppAssert(pForm);
-               CommonUtil::ShowCheckedCountLabel(*__pCheckedCountLabel, __checkedItemCount, *__pContentTableView, *pForm);
+               {
+                       //AppLogDebug("IDA_UNCHECK_BUTTON");
+                       __checkedItemCount = INIT_VALUE;
+                       CommonUtil::SetAllCheckState(false, *__pContentTableView, totalCount);
+                       Form* pForm = dynamic_cast<Form*>(GetParent());
+                       AppAssert(pForm);
+                       CommonUtil::ShowCheckedCountLabel(*__pCheckedCountLabel, __checkedItemCount, *__pContentTableView, *pForm);
+               }
                break;
-       }
+
        case IDA_FOOTER_BUTTON_ADD_TO_PLAYLIST:
-       {
-               if (__checkedItemCount <= INIT_VALUE)
                {
-                       return;
-               }
+                       if (__checkedItemCount <= INIT_VALUE)
+                       {
+                               return;
+                       }
 
-               ArrayList* pDataList = new (std::nothrow) ArrayList();
-               pDataList->Construct();
+                       ArrayList* pDataList = new (std::nothrow) ArrayList();
+                       pDataList->Construct();
 
-               int totalCount = __pPresentationModel->GetTotalGenreCount();
-               for(int iCount = 0; iCount < totalCount; iCount++)
-               {
-                       if (__pContentTableView->IsItemChecked(iCount) == true)
+                       int totalCount = __pPresentationModel->GetAllGenreCount();
+                       for (int iCount = 0; iCount < totalCount; iCount++)
                        {
-                               pDataList->AddItems(*(__pPresentationModel->SearchContentItemN(iCount)));
+                               if (__pContentTableView->IsItemChecked(iCount) == true)
+                               {
+                                       pDataList->AddItems(*(__pPresentationModel->GetContentPathListN(iCount)));
+                               }
                        }
-               }
 
-               if (__pPlayListPickerPopup == null)
-               {
                        __pPlayListPickerPopup = new (std::nothrow) PlayListPickerPopup();
-                       __pPlayListPickerPopup->Initialize();
+                       __pPlayListPickerPopup->Initialize(this, pDataList);
+                       //__pPlayListPickerPopup->SetCollectedContent(pDataList);
+                       __pPlayListPickerPopup->SetShowState(true);
+                       __pPlayListPickerPopup->Show();
                }
-
-               __pPlayListPickerPopup->SetCollectedContent(pDataList);
-               __pPlayListPickerPopup->SetShowState(true);
-               __pPlayListPickerPopup->Show();
-
                break;
-       }
 
        case IDA_FOOTER_BUTTON_CANCEL:
-       {
-               //AppLogDebug("IDA_FOOTER_BUTTON_CANCEL");
-               pSceneManager->GoBackward(BackwardSceneTransition());
+               {
+                       //AppLogDebug("IDA_FOOTER_BUTTON_CANCEL");
+                       pSceneManager->GoBackward(BackwardSceneTransition());
+               }
                break;
-       }
+
        default:
-       {
                break;
-       }
        }//End of switch
 
        Form* pForm = dynamic_cast<Form*>(GetParent());
        AppAssert(pForm);
        CommonUtil::SetButtonEnabled(*pForm, __checkedItemCount, actionId);
+       AppLogDebug("EXIT");
 }
 
 void
 GenresListEditorPanel::OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previousSceneId,
-                                                         const Tizen::Ui::Scenes::SceneId& currentSceneId, Tizen::Base::Collection::IList* pArgs)
+                                                               const Tizen::Ui::Scenes::SceneId& currentSceneId, Tizen::Base::Collection::IList* pArgs)
 {
-       //AppLogDebug("OnSceneActivatedN");
-
+       AppLogDebug("ENTER");
        Form* pForm = dynamic_cast<Form*>(GetParent());
        AppAssert(pForm);
 
@@ -191,14 +200,14 @@ GenresListEditorPanel::OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previ
                pArgs->RemoveAll(true);
                delete pArgs;
        }
+       AppLogDebug("EXIT");
 }
 
 void
 GenresListEditorPanel::OnSceneDeactivated(const Tizen::Ui::Scenes::SceneId& currentSceneId,
-                                                                     const Tizen::Ui::Scenes::SceneId& nextSceneId)
+                                                                       const Tizen::Ui::Scenes::SceneId& nextSceneId)
 {
-       //AppLogDebug("OnSceneDeactivated");
-
+       AppLogDebug("ENTER");
        Form* pForm = dynamic_cast<Form*>(GetParent());
        AppAssert(pForm);
 
@@ -211,99 +220,94 @@ GenresListEditorPanel::OnSceneDeactivated(const Tizen::Ui::Scenes::SceneId& curr
        CommonUtil::ShowCheckedCountLabel(*__pCheckedCountLabel, __checkedItemCount, *__pContentTableView, *pForm);
        CommonUtil::ShowSelectAllCheckButton(*__pSelectAllCheckedButton);
 
-       int totalCount = __pPresentationModel->GetTotalGenreCount();
-       for(int iCount = 0; iCount < totalCount; iCount++)
+       int totalCount = __pPresentationModel->GetAllGenreCount();
+       for (int iCount = 0; iCount < totalCount; iCount++)
        {
                __pContentTableView->SetItemChecked(iCount, false);
        }
+       
+       CancelAllThumbnailRequest();
+       AppLogDebug("EXIT");
 }
 
 int
 GenresListEditorPanel::GetItemCount(void)
 {
-       //AppLogDebug("GetItemCount");
+       AppLogDebug("ENTER");
        if (__pPresentationModel == null)
        {
                return INIT_VALUE;
        }
 
-       int retCount = 0;
-       retCount = __pPresentationModel->GetTotalGenreCount();
-
-       return retCount;
+       AppLogDebug("EXIT");
+       return __pPresentationModel->GetAllGenreCount();
 }
 
 Tizen::Ui::Controls::TableViewItem*
 GenresListEditorPanel::CreateItem(const int itemIndex, int itemWidth)
 {
-       //AppLogDebug("CreateTableViewItem");
-       ContentInformationStruct* pContentInfoStruct = __pPresentationModel->GetContentInfoN(itemIndex);
+       AppLogDebug("ENTER");
+       ContentInformation* pContentInfoStruct = __pPresentationModel->GetGenreInfoN(itemIndex);
        if (pContentInfoStruct == null)
        {
                return null;
        }
 
-       TableViewItem* pItem = new (std::nothrow) TableViewItem;
+       TableViewItem* pItem = new (std::nothrow) TableViewItem();
        pItem->Construct(Dimension(itemWidth, ITEM_HEIGHT), TABLE_VIEW_ANNEX_STYLE_MARK);
        pItem->SetBackgroundColor(COLOR_ITEM);
 
-       CommonUtil::CreateEditListTableViewItem(*pItem, *(pContentInfoStruct->pThumbnail), pContentInfoStruct->GenreName, __pPresentationModel->GetTotalContentCount(itemIndex));
-
-       //test_code_start
-       delete pContentInfoStruct->pThumbnail;
-       pContentInfoStruct->pThumbnail = null;
+       RequestThumbnail(pContentInfoStruct->contentId, (new (std::nothrow) int(itemIndex)));
+       CommonUtil::CreateEditListTableViewItem(*pItem, *GetDefaultThumbnail(), pContentInfoStruct->GenreName, __pPresentationModel->GetContentCount(itemIndex));
 
        delete pContentInfoStruct;
        pContentInfoStruct = null;
-       //test_code_end
 
+       AppLogDebug("EXIT");
        return pItem;
 }
 
 bool
 GenresListEditorPanel::DeleteItem(const int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem)
 {
-       //AppLogDebug("DeleteItem");
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
        return true;
 }
 
-void
-GenresListEditorPanel::UpdateItem(int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem)
-{
-}
-
 int
 GenresListEditorPanel::GetDefaultItemHeight(void)
 {
-       //AppLogDebug("UpdateItem");
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
        return ITEM_HEIGHT;
 }
 
 void
 GenresListEditorPanel::OnTableViewItemStateChanged(Tizen::Ui::Controls::TableView& tableView,
-                                               int itemIndex,
-                                               Tizen::Ui::Controls::TableViewItem* pItem,
-                                               Tizen::Ui::Controls::TableViewItemStatus status)
+                                                       int itemIndex,
+                                                       Tizen::Ui::Controls::TableViewItem* pItem,
+                                                       Tizen::Ui::Controls::TableViewItemStatus status)
 {
-       //AppLogDebug("OnTableViewItemStateChanged");
+       AppLogDebug("ENTER");
        switch(status)
        {
        case TABLE_VIEW_ITEM_STATUS_CHECKED:
-       {
-               __checkedItemCount++;
-               tableView.SetItemChecked(itemIndex, true);
+               {
+                       __checkedItemCount++;
+                       tableView.SetItemChecked(itemIndex, true);
+               }
                break;
-       }
+
        case TABLE_VIEW_ITEM_STATUS_UNCHECKED:
-       {
-               __checkedItemCount--;
-               tableView.SetItemChecked(itemIndex, false);
+               {
+                       __checkedItemCount--;
+                       tableView.SetItemChecked(itemIndex, false);
+               }
                break;
-       }
+
        default:
-       {
                break;
-       }
        }//end of switch
 
        Form* pForm = dynamic_cast<Form*>(GetParent());
@@ -312,43 +316,104 @@ GenresListEditorPanel::OnTableViewItemStateChanged(Tizen::Ui::Controls::TableVie
 
        CommonUtil::ShowSelectAllCheckButton(*__pSelectAllCheckedButton);
 
-       if (__checkedItemCount == __pPresentationModel->GetTotalGenreCount())
+       if (__checkedItemCount == __pPresentationModel->GetAllGenreCount())
        {
                __pSelectAllCheckedButton->SetSelected(true);
        }
 
        Invalidate(true);
        CommonUtil::ShowCheckedCountLabel(*__pCheckedCountLabel, __checkedItemCount, *__pContentTableView, *pForm);
+       AppLogDebug("EXIT");
 }
 
 void
 GenresListEditorPanel::OnTableViewContextItemActivationStateChanged(Tizen::Ui::Controls::TableView& tableView,
-                                                                int itemIndex,
-                                                                Tizen::Ui::Controls::TableViewContextItem* pContextItem,
-                                                                bool activated)
+                                                                               int itemIndex,
+                                                                               Tizen::Ui::Controls::TableViewContextItem* pContextItem,
+                                                                               bool activated)
 {
-       //AppLogDebug("OnTableViewContextItemActivationStateChanged");
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 
 void
 GenresListEditorPanel::OnTableViewItemReordered(Tizen::Ui::Controls::TableView& tableView,
-                                            int itemIndexFrom,
-                                            int itemIndexTo)
+                                                       int itemIndexFrom,
+                                                       int itemIndexTo)
 {
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 
 void
 GenresListEditorPanel::OnUpdateContentList(void)
 {
+       AppLogDebug("ENTER");
        UpdateContentList();
+       AppLogDebug("EXIT");
 }
 
 void
 GenresListEditorPanel::UpdateContentList(void)
 {
+       AppLogDebug("ENTER");
        if (__pPresentationModel != null && __pContentTableView != null)
        {
-               __pPresentationModel->RefreshContent();
+               __pPresentationModel->UpdateGnereList();
                __pContentTableView->UpdateTableView();
        }
+       AppLogDebug("EXIT");
 }
+
+void
+GenresListEditorPanel::OnThumbnailInfoReveivedN(ThumbnailInfo* pThumbnailInfo)
+{
+       AppLogDebug("ENTER");
+       int itemIndex = 0;
+       void* pParam = null;
+       __pThumbnail = pThumbnailInfo->GetBitmapN();
+       pParam = pThumbnailInfo->GetUserParamN();
+       if (pParam)
+       {
+               itemIndex = *(static_cast<int*>(pParam));
+       }
+       __pContentTableView->RefreshItem(itemIndex, TABLE_VIEW_REFRESH_TYPE_ITEM_MODIFY);
+       delete pThumbnailInfo;
+       delete static_cast<int*>(pParam);
+       AppLogDebug("EXIT");
+}
+
+void
+GenresListEditorPanel::OnUserEventReceivedN(RequestId requestId, Tizen::Base::Collection::IList* pArgs)
+{
+       AppLogDebug("ENTER");
+       AppLogDebug("OnUserEventReceivedN %d", requestId);
+       if (requestId == ID_DESTORY_PLAY_LIST_PICKER_POPUP)
+       {
+               if (__pPlayListPickerPopup != null)
+               {
+                       delete __pPlayListPickerPopup;
+                       __pPlayListPickerPopup = null;
+               }
+       }
+       AppLogDebug("EXIT");
+}
+
+void
+GenresListEditorPanel::UpdateItem(int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem)
+{
+       AppLogDebug("ENTER");
+       Label* pThumbnailLabel = static_cast<Label*>(pItem->GetControl(L"pSongThumbnailLabel"));
+       if (__pThumbnail == null || pThumbnailLabel == null)
+       {
+               AppLogDebug("__pThumbnail or pThumbnailLabel is null");
+               delete __pThumbnail;
+               __pThumbnail = null;
+               return;
+       }
+       pThumbnailLabel->SetBackgroundBitmap(*__pThumbnail);
+       delete __pThumbnail;
+       __pThumbnail = null;
+       pThumbnailLabel->Invalidate(true);
+       AppLogDebug("EXIT");
+}
\ No newline at end of file
old mode 100755 (executable)
new mode 100644 (file)
index 1863316..586d08c
@@ -1,4 +1,4 @@
-//
+//
 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
 //
 // Licensed under the Flora License, Version 1.0 (the License);
 // limitations under the License.
 //
 
+/**
+ * @file               MpGenreListPanel.cpp
+ * @brief              This is the implementation file for GenreListPanel class.
+ */
+
 #include "MpGenreListPanel.h"
 #include "MpNowPlayContentPanel.h"
 #include "MpPlaylistPickerPopup.h"
+#include "MpThumbnailInfo.h"
 
 using namespace Tizen::Base;
 using namespace Tizen::Base::Collection;
@@ -27,42 +33,47 @@ using namespace Tizen::Ui::Controls;
 using namespace Tizen::Ui::Scenes;
 
 GenreListPanel::GenreListPanel(void)
-: __itemIndex(-1)
-, __pNowPlayContentPanel(null)
-, __pPlayListPickerPopup(null)
-, __pContextItem(null)
-, __pContentTableView(null)
-, __pNoContentImageLabel(null)
-, __pNoContentTextLabel(null)
+       : ThumbnailBase::ThumbnailBase()
+       , __itemIndex(-1)
+       , __pNowPlayContentPanel(null)
+       , __pPlayListPickerPopup(null)
+       , __pContextItem(null)
+       , __pContentTableView(null)
+       , __pNoContentImageLabel(null)
+       , __pNoContentTextLabel(null)
+       , __pThumbnail(null)
 {
-       //AppLogDebug("GenreListPanel");
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 
 GenreListPanel::~GenreListPanel(void)
 {
-       //AppLogDebug("~GenreListPanel");
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 
 bool
 GenreListPanel::Initialize(void)
 {
-       //AppLogDebug("Initialize");
-       result r = Construct(Rectangle(INIT_VALUE, INIT_VALUE, INIT_VALUE, INIT_VALUE)); // Should be set proper area at OnInitializing().
+       AppLogDebug("ENTER");
+       result r = BasePanel::Construct(Rectangle(INIT_VALUE, INIT_VALUE, INIT_VALUE, INIT_VALUE)); // Should be set proper area at OnInitializing().
        if (IsFailed(r))
        {
                return false;
        }
+       AppLogDebug("EXIT");
        return true;
 }
 
 result
 GenreListPanel::OnInitializing(void)
 {
-       //AppLogDebug("OnInitializing");
+       AppLogDebug("ENTER");
        Form* pForm = dynamic_cast<Form*>(GetParent());
        AppAssert(pForm);
 
-       int width  = pForm->GetClientAreaBounds().width;
+       int width = pForm->GetClientAreaBounds().width;
        int height = pForm->GetClientAreaBounds().height;
 
        SetBounds(INIT_VALUE, INIT_VALUE, width, height);
@@ -73,15 +84,15 @@ GenreListPanel::OnInitializing(void)
        __pContentTableView->AddTableViewItemEventListener(*this);
 
        __pNoContentImageLabel = new (std::nothrow) Label();
-       __pNoContentImageLabel->Construct(Rectangle((pForm->GetWidth() - W_NO_CONTENT)/ 2, Y_GAP_NO_CONTENT, W_NO_CONTENT, H_NO_CONTENT),L"");
+       __pNoContentImageLabel->Construct(Rectangle((pForm->GetWidth() - W_NO_CONTENT) / 2, Y_GAP_NO_CONTENT, W_NO_CONTENT, H_NO_CONTENT), L"");
        __pNoContentImageLabel->SetBackgroundBitmap(*(ResourceManager::GetBitmapN(NO_CONTENT_BITMAP)));
 
        __pNoContentTextLabel = new (std::nothrow) Label();
        __pNoContentTextLabel->Construct(Rectangle(0,
-                                                  __pNoContentImageLabel->GetHeight() + __pNoContentImageLabel->GetY(),
-                                                  pForm->GetWidth(),
-                                                  H_TEXT_NO_CONTENT),
-                                                  ResourceManager::GetString(L"IDS_COM_BODY_NO_ITEMS"));
+                                                               __pNoContentImageLabel->GetHeight() + __pNoContentImageLabel->GetY(),
+                                                               pForm->GetWidth(),
+                                                               H_TEXT_NO_CONTENT),
+                                                               ResourceManager::GetString(L"IDS_COM_BODY_NO_ITEMS"));
        __pNoContentTextLabel->SetTextConfig(FONT_SIZE_NO_CONTENT, LABEL_TEXT_STYLE_BOLD);
 
        __pContextItem = new (std::nothrow) TableViewContextItem();
@@ -94,87 +105,94 @@ GenreListPanel::OnInitializing(void)
 
        __pPresentationModel = GenreListPresentationModel::GetInstance();
 
-       return E_SUCCESS;
+       AppLogDebug("EXIT");
+       return ThumbnailBase::Construct();
 }
 
 result
 GenreListPanel::OnTerminating(void)
 {
+       AppLogDebug("ENTER");
        delete __pContextItem;
        __pContextItem = null;
 
+       AppLogDebug("EXIT");
        return E_SUCCESS;
 }
 
 void
 GenreListPanel::OnActionPerformed(const Tizen::Ui::Control& source, int actionId)
 {
-       //AppLogDebug("OnActionPerformed");
+       AppLogDebug("ENTER");
        SceneManager* pSceneManager = SceneManager::GetInstance();
        AppAssert(pSceneManager);
 
-       switch(actionId)
+       switch (actionId)
        {
        case IDA_FOOTER_BUTTON_ADD_TO_PLAYLIST:
-       {
-               if (__pPresentationModel->GetTotalGenreCount() == 0)
                {
-                       MessageBox messageBox;
-                       messageBox.Construct(L"", ResourceManager::GetString(L"IDS_COM_BODY_NO_ITEMS"), MSGBOX_STYLE_NONE, 500);
+                       if (__pPresentationModel->GetAllGenreCount() == 0)
+                       {
+                               MessageBox messageBox;
+                               messageBox.Construct(L"", ResourceManager::GetString(L"IDS_COM_BODY_NO_ITEMS"), MSGBOX_STYLE_NONE, 500);
 
-                       int modalResult = 0;
-                       messageBox.ShowAndWait(modalResult);
-                       break;
+                               int modalResult = 0;
+                               messageBox.ShowAndWait(modalResult);
+                               break;
+                       }
+                       pSceneManager->GoForward(ForwardSceneTransition(IDSCN_GENRE_LIST_EDITOR));
                }
-               pSceneManager->GoForward(ForwardSceneTransition(IDSCN_GENRE_LIST_EDITOR));
                break;
-       }
 
        case IDA_FOOTER_BUTTON_SEARCH:
-       {
-               pSceneManager->GoForward(ForwardSceneTransition(IDSCN_SEARCH));
+               {
+                       pSceneManager->GoForward(ForwardSceneTransition(IDSCN_SEARCH));
+               }
                break;
-       }
+
        case IDA_FLICK_BUTTON_ADD_TO_PALYLIST:
-       {
-               if (__pPlayListPickerPopup == null)
                {
                        __pPlayListPickerPopup = new (std::nothrow) PlayListPickerPopup();
-                       __pPlayListPickerPopup->Initialize();
+                       __pPlayListPickerPopup->Initialize(this, __pPresentationModel->GetContentPathListN(__itemIndex));
+                       //__pPlayListPickerPopup->SetCollectedContent(__pPresentationModel->GetContentPathListN(__itemIndex));
+                       __pPlayListPickerPopup->SetShowState(true);
+                       __pPlayListPickerPopup->Show();
                }
+               break;
 
-               __pPlayListPickerPopup->SetCollectedContent(__pPresentationModel->SearchContentItemN(__itemIndex));
-               __pPlayListPickerPopup->SetShowState(true);
-               __pPlayListPickerPopup->Show();
+       default:
                break;
-       }
        }//end of switch
+       AppLogDebug("EXIT");
 }
 
 void
 GenreListPanel::OnFormBackRequested(Tizen::Ui::Controls::Form& source)
 {
+       AppLogDebug("ENTER");
        if (CommonUtil::GetAddtoPlaylistState() == true)
        {
                SceneManager* pSceneManager = SceneManager::GetInstance();
                AppAssert(pSceneManager);
                pSceneManager->GoForward(ForwardSceneTransition(IDSCN_PLAYLIST_LIST,
-                                                        SCENE_TRANSITION_ANIMATION_TYPE_NONE,
-                                                        SCENE_HISTORY_OPTION_NO_HISTORY,
-                                                        SCENE_DESTROY_OPTION_DESTROY));
+                                                               SCENE_TRANSITION_ANIMATION_TYPE_NONE,
+                                                               SCENE_HISTORY_OPTION_NO_HISTORY,
+                                                               SCENE_DESTROY_OPTION_DESTROY));
                CommonUtil::SetAddtoPlaylistState(false);
        }
        else
        {
                Tizen::App::Application::GetInstance()->Terminate();
        }
+       AppLogDebug("EXIT");
 }
 
 void
 GenreListPanel::OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previousSceneId,
-                                  const Tizen::Ui::Scenes::SceneId& currentSceneId,
-                                  Tizen::Base::Collection::IList* pArgs)
+                                       const Tizen::Ui::Scenes::SceneId& currentSceneId,
+                                       Tizen::Base::Collection::IList* pArgs)
 {
+       AppLogDebug("ENTER");
        Form* pForm = dynamic_cast<Form*>(GetParent());
        AppAssert(pForm);
        pForm->SetFormBackEventListener(this);
@@ -200,7 +218,7 @@ GenreListPanel::OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previousScen
        UpdateContentList();
        if (__pPresentationModel != null)
        {
-               int totalGenreCount = __pPresentationModel->GetTotalGenreCount();
+               int totalGenreCount = __pPresentationModel->GetAllGenreCount();
                CommonUtil::SetButtonEnabled(*pForm, totalGenreCount, IDA_FOOTER_BUTTON_ADD_TO_PLAYLIST);
 
                CommonUtil::ShowNoContentImage(totalGenreCount, *__pContentTableView, *__pNoContentImageLabel, *__pNoContentTextLabel);
@@ -210,14 +228,14 @@ GenreListPanel::OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previousScen
                pArgs->RemoveAll(true);
                delete pArgs;
        }
+       AppLogDebug("EXIT");
 }
 
 void
 GenreListPanel::OnSceneDeactivated(const Tizen::Ui::Scenes::SceneId& currentSceneId,
-                                   const Tizen::Ui::Scenes::SceneId& nextSceneId)
+                                       const Tizen::Ui::Scenes::SceneId& nextSceneId)
 {
-       //AppLogDebug("OnSceneDeactivated");
-
+       AppLogDebug("ENTER");
        Form* pForm = dynamic_cast<Form*>(GetParent());
        AppAssert(pForm);
 
@@ -225,114 +243,112 @@ GenreListPanel::OnSceneDeactivated(const Tizen::Ui::Scenes::SceneId& currentScen
        pFooter->RemoveAllButtons();
        pFooter->RemoveAllItems();
        pFooter->RemoveActionEventListener(*this);
+       
+       CancelAllThumbnailRequest();
+       AppLogDebug("EXIT");
 }
 
 int
 GenreListPanel::GetItemCount(void)
 {
-       //AppLogDebug("GetItemCount");
-
+       AppLogDebug("ENTER");
        if (__pPresentationModel == null)
        {
                return INIT_VALUE;
        }
 
-       int retCount = INIT_VALUE;
-       retCount = __pPresentationModel->GetTotalGenreCount();
-
-       return retCount;
+       AppLogDebug("EXIT");
+       return __pPresentationModel->GetAllGenreCount();
 }
 
 Tizen::Ui::Controls::TableViewItem*
 GenreListPanel::CreateItem(const int itemIndex, int itemWidth)
 {
-       //AppLogDebug("CreateTableViewItem");
-       ContentInformationStruct* pContentInfoStruct = __pPresentationModel->GetContentInfoN(itemIndex);
+       AppLogDebug("ENTER");
+       ContentInformation* pContentInfoStruct = __pPresentationModel->GetGenreInfoN(itemIndex);
        if (pContentInfoStruct == null)
        {
                return null;
        }
 
-       TableViewItem* pItem = new (std::nothrow) TableViewItem;
+       TableViewItem* pItem = new (std::nothrow) TableViewItem();
        pItem->Construct(Dimension(itemWidth, ITEM_HEIGHT), TABLE_VIEW_ANNEX_STYLE_NORMAL);
        pItem->SetBackgroundColor(COLOR_ITEM);
 
-       String itemName = pContentInfoStruct->GenreName;
-       CommonUtil::CreateTableViewItem(*pItem, *(pContentInfoStruct->pThumbnail), itemName, __pPresentationModel->GetTotalContentCount(itemIndex));
+       RequestThumbnail(pContentInfoStruct->contentId, (new (std::nothrow) int(itemIndex)));
+       CommonUtil::CreateTableViewItem(*pItem, *GetDefaultThumbnail(), pContentInfoStruct->GenreName, __pPresentationModel->GetContentCount(itemIndex));
        pItem->SetContextItem(__pContextItem);
 
-       //test_code_start
-       delete pContentInfoStruct->pThumbnail;
-       pContentInfoStruct->pThumbnail = null;
-
        delete pContentInfoStruct;
        pContentInfoStruct = null;
-       //test_code_end
 
+       AppLogDebug("EXIT");
        return pItem;
 }
 
 bool
 GenreListPanel::DeleteItem(const int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem)
 {
-       //AppLogDebug("DeleteItem");
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
        return true;
 }
 
-void
-GenreListPanel::UpdateItem(int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem)
-{
-}
-
 int
 GenreListPanel::GetDefaultItemHeight(void)
 {
-       //AppLogDebug("UpdateItem");
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
        return ITEM_HEIGHT;
 }
 
 void
 GenreListPanel::OnTableViewItemStateChanged(Tizen::Ui::Controls::TableView& tableView,
-                                               int itemIndex,
-                                               Tizen::Ui::Controls::TableViewItem* pItem,
-                                               Tizen::Ui::Controls::TableViewItemStatus status)
+                                                       int itemIndex,
+                                                       Tizen::Ui::Controls::TableViewItem* pItem,
+                                                       Tizen::Ui::Controls::TableViewItemStatus status)
 {
-       //AppLogDebug("OnTableViewItemStateChanged");
+       AppLogDebug("ENTER");
        SceneManager* pSceneManager = SceneManager::GetInstance();
        AppAssert(pSceneManager);
 
        if (itemIndex >= INIT_VALUE)
        {
-               pSceneManager->GoForward(ForwardSceneTransition(IDSCN_CONTENT_LIST,
+               pSceneManager->GoForward(ForwardSceneTransition(IDSCN_GENRE_CONTENT_LIST,
                                                                                                                SCENE_TRANSITION_ANIMATION_TYPE_NONE),
                                                                                                                GetContentListN(itemIndex));
        }
+       AppLogDebug("EXIT");
 }
 
 void
 GenreListPanel::OnTableViewContextItemActivationStateChanged(Tizen::Ui::Controls::TableView& tableView,
-                                                                int itemIndex,
-                                                                Tizen::Ui::Controls::TableViewContextItem* pContextItem,
-                                                                bool activated)
+                                                                               int itemIndex,
+                                                                               Tizen::Ui::Controls::TableViewContextItem* pContextItem,
+                                                                               bool activated)
 {
-       if(activated == true)
+       AppLogDebug("ENTER");
+       if (activated == true)
        {
                __itemIndex = itemIndex;
        }
+       AppLogDebug("EXIT");
 }
 
 void
 GenreListPanel::OnTableViewItemReordered(Tizen::Ui::Controls::TableView& tableView,
-                                            int itemIndexFrom,
-                                            int itemIndexTo)
+                                                       int itemIndexFrom,
+                                                       int itemIndexTo)
 {
-       //AppLogDebug("OnTableViewItemReordered");
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 
 Tizen::Base::Collection::ArrayList*
 GenreListPanel::GetContentListN(int itemIndex)
 {
-       ContentInformationStruct* pContentInfoStruct = __pPresentationModel->GetContentInfoN(itemIndex);
+       AppLogDebug("ENTER");
+       ContentInformation* pContentInfoStruct = __pPresentationModel->GetGenreInfoN(itemIndex);
        if (pContentInfoStruct == null)
        {
                return null;
@@ -345,28 +361,25 @@ GenreListPanel::GetContentListN(int itemIndex)
        ArrayList* pRetList = new (std::nothrow) ArrayList();
        pRetList->Construct();
 
-       pRetList->Add(*(new String(IDSCN_GENRE_LIST)));
-       pRetList->Add(*(new String(genreName)));
-
-       //test_code_start
-       delete pContentInfoStruct->pThumbnail;
-       pContentInfoStruct->pThumbnail = null;
+       pRetList->Add(*(new (std::nothrow) String(IDSCN_GENRE_LIST)));
+       pRetList->Add(*(new (std::nothrow) String(genreName)));
+       pRetList->Add(*(new (std::nothrow) Integer(itemIndex)));
 
        delete pContentInfoStruct;
        pContentInfoStruct = null;
-       //test_code_end
 
+       AppLogDebug("EXIT");
        return pRetList;
 }
 
 void
 GenreListPanel::OnFastScrollIndexSelected(Tizen::Ui::Control& source, Tizen::Base::String& index)
 {
-       AppLogDebug("Start");
-       int totalCount = __pPresentationModel->GetTotalGenreCount();
-       for(int iCount = 0; iCount < totalCount; iCount++)
+       AppLogDebug("ENTER");
+       int totalCount = __pPresentationModel->GetAllGenreCount();
+       for (int iCount = 0; iCount < totalCount; iCount++)
        {
-               String* pName = __pPresentationModel->GetContentName(iCount);
+               String* pName = __pPresentationModel->GetGenreName(iCount);
                String firstCharacter;
 
                pName->SubString(0, 1, firstCharacter);
@@ -377,12 +390,12 @@ GenreListPanel::OnFastScrollIndexSelected(Tizen::Ui::Control& source, Tizen::Bas
 
                if (Character::GetUnicodeCategory(language) == UNICODE_HANGUL)
                {
-                       Tizen::Base::String HangulIndex[] = {"ㄱ", "ㄲ", "ㄴ", "ㄷ", "ㄸ", "ㄹ", "ㅁ", "ㅂ", "ㅃ","ㅅ", "ㅆ", "ㅇ" , "ㅈ", "ㅉ", "ㅊ", "ㅋ", "ㅌ", "ㅍ", "ㅎ"        };
+                       Tizen::Base::String HangulIndex[] = {"ㄱ", "ㄲ", "ㄴ", "ㄷ", "ㄸ", "ㄹ", "ㅁ", "ㅂ", "ㅃ", "ㅅ", "ㅆ", "ㅇ" , "ㅈ", "ㅉ", "ㅊ", "ㅋ", "ㅌ", "ㅍ", "ㅎ"};
 
                        wchar_t songName;
                        pName->GetCharAt(0, songName);
 
-                       wchar_t UnicodeValue     = (songName - 0xAC00);
+                       wchar_t UnicodeValue = (songName - 0xAC00);
                        wchar_t InitialConsonant = ((UnicodeValue - (UnicodeValue % 28)) / 28) / 21;
                        int tempIndex = static_cast<int>(InitialConsonant);
 
@@ -403,20 +416,78 @@ GenreListPanel::OnFastScrollIndexSelected(Tizen::Ui::Control& source, Tizen::Bas
                        break;
                }
        }//end of for
+       AppLogDebug("EXIT");
 }
 
 void
 GenreListPanel::OnUpdateContentList(void)
 {
+       AppLogDebug("ENTER");
        UpdateContentList();
+       AppLogDebug("EXIT");
 }
 
 void
 GenreListPanel::UpdateContentList(void)
 {
+       AppLogDebug("ENTER");
        if (__pPresentationModel != null && __pContentTableView != null)
        {
-               __pPresentationModel->RefreshContent();
+               __pPresentationModel->UpdateGnereList();
                __pContentTableView->UpdateTableView();
        }
+       AppLogDebug("EXIT");
+}
+
+void
+GenreListPanel::OnThumbnailInfoReveivedN(ThumbnailInfo* pThumbnailInfo)
+{
+       AppLogDebug("ENTER");
+       int itemIndex = 0;
+       void* pParam = null;
+       __pThumbnail = pThumbnailInfo->GetBitmapN();
+       pParam = pThumbnailInfo->GetUserParamN();
+       if (pParam)
+       {
+               itemIndex = *(static_cast<int*>(pParam));
+       }
+       __pContentTableView->RefreshItem(itemIndex, TABLE_VIEW_REFRESH_TYPE_ITEM_MODIFY);
+       delete pThumbnailInfo;
+       delete static_cast<int*>(pParam);
+       AppLogDebug("EXIT");
 }
+
+void
+GenreListPanel::OnUserEventReceivedN(RequestId requestId, Tizen::Base::Collection::IList* pArgs)
+{
+       AppLogDebug("ENTER");
+       AppLogDebug("OnUserEventReceivedN %d", requestId);
+       if (requestId == ID_DESTORY_PLAY_LIST_PICKER_POPUP)
+       {
+               if (__pPlayListPickerPopup != null)
+               {
+                       delete __pPlayListPickerPopup;
+                       __pPlayListPickerPopup = null;
+               }
+       }
+       AppLogDebug("EXIT");
+}
+
+void
+GenreListPanel::UpdateItem(int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem)
+{
+       AppLogDebug("ENTER");
+       Label* pThumbnailLabel = static_cast<Label*>(pItem->GetControl(L"pSongThumbnailLabel"));
+       if (__pThumbnail == null || pThumbnailLabel == null)
+       {
+               AppLogDebug("__pThumbnail or pThumbnailLabel is null");
+               delete __pThumbnail;
+               __pThumbnail = null;
+               return;
+       }
+       pThumbnailLabel->SetBackgroundBitmap(*__pThumbnail);
+       delete __pThumbnail;
+       __pThumbnail = null;
+       pThumbnailLabel->Invalidate(true);
+       AppLogDebug("EXIT");
+}
\ No newline at end of file
old mode 100755 (executable)
new mode 100644 (file)
index 929b60b..91512fb
@@ -1,4 +1,4 @@
-//
+//
 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
 //
 // Licensed under the Flora License, Version 1.0 (the License);
 // limitations under the License.
 //
 
+/**
+ * @file               MpGenreListPresentationModel.cpp
+ * @brief              This is the implementation file for GenreListPresentationModel class.
+ */
+
 #include "MpGenreListPresentationModel.h"
 
 using namespace Tizen::Base;
 using namespace Tizen::Base::Collection;
+using namespace Tizen::Content;
 using namespace Tizen::Graphics;
-using namespace Tizen::Ui::Controls;
 using namespace Tizen::Social;
-using namespace Tizen::Content;
+using namespace Tizen::Ui::Controls;
 
 GenreListPresentationModel* GenreListPresentationModel::pGenreListPresentationModelInstance = null;
 
 GenreListPresentationModel*
 GenreListPresentationModel::GetInstance(void)
 {
-       //AppLogDebug("GetInstance");
+       AppLogDebug("ENTER");
        if (pGenreListPresentationModelInstance == null)
        {
                pGenreListPresentationModelInstance = new (std::nothrow) GenreListPresentationModel();
@@ -37,6 +42,7 @@ GenreListPresentationModel::GetInstance(void)
                result r = pGenreListPresentationModelInstance->Construct();
                TryCatch(r == E_SUCCESS, , null, "GenreListPresentationModel instance is not constrcuted.");
        }
+       AppLogDebug("EXIT");
        return pGenreListPresentationModelInstance;
 
 CATCH:
@@ -45,197 +51,254 @@ CATCH:
 }
 
 GenreListPresentationModel::GenreListPresentationModel(void)
-: __pGnereList(null)
-, __pSongList(null)
+       : __pGnereList(null)
+       , __pContentList(null)
+       , __currentGenreIndex(-1)
 {
-       //AppLogDebug("GenreListPresentationModel");
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 
 GenreListPresentationModel::~GenreListPresentationModel(void)
 {
-       //AppLogDebug("~GenreListPresentationModel");
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 
 result
 GenreListPresentationModel::Construct(void)
 {
-       //AppLogDebug("Construct");
-
-       result r=E_SUCCESS;
+       AppLogDebug("ENTER");
+       if (__pGnereList != null)
+       {
+               __pGnereList->RemoveAll(true);
+               delete __pGnereList;
+       }
 
        __pGnereList = CommonUtil::SearchContentList(STRING_SORT_GENRE);
 
-       return r;
+       AppLogDebug("EXIT");
+       return E_SUCCESS;
 }
 
 int
-GenreListPresentationModel::GetTotalContentCount(int index)
+GenreListPresentationModel::GetContentCount(int genreIndex)
 {
+       AppLogDebug("ENTER");
+       int totalCount = INIT_VALUE;
        if (__pGnereList == null)
        {
-               return 0;
+               return INIT_VALUE;
        }
 
-       String WhereExpr = null;
-       WhereExpr  = CommonUtil::SpecialReplaceChange(*(static_cast<String*>(__pGnereList->GetAt(index))));
-       WhereExpr  = CommonUtil::MakeQuery(STRING_SORT_GENRE, WhereExpr);
-       IList* pSearchList = CommonUtil::SearchContentList(WhereExpr, STRING_SORT_TITLE);
-
-       if (pSearchList == null)
+       if ((__pContentList != null) && (__currentGenreIndex == genreIndex))
        {
-               return 0;
+               totalCount = __pContentList->GetCount();
        }
-
-       int RetTotalCount = pSearchList->GetCount();
-
-       pSearchList->RemoveAt(true);
-       delete pSearchList;
-       pSearchList = null;
-
-       return RetTotalCount;
+       else
+       {
+               IList* pContentSearchResultList = CommonUtil::ContentSearchResultListN(
+                                                                                       *(static_cast<String*>(__pGnereList->GetAt(genreIndex))), STRING_SORT_GENRE, STRING_SORT_TITLE);
+               if (pContentSearchResultList == null)
+               {
+                       AppLogDebug("CommonUtil::ContentSearchResultListN() failed");
+                       return INIT_VALUE;
+               }
+
+               totalCount = pContentSearchResultList->GetCount();
+
+               pContentSearchResultList->RemoveAt(true);
+               delete pContentSearchResultList;
+       }
+       AppLogDebug("EXIT");
+       return totalCount;
 }
 
 int
-GenreListPresentationModel::GetTotalGenreCount(void)
+GenreListPresentationModel::GetAllGenreCount(void)
 {
-       //AppLogDebug("GetCount");
+       AppLogDebug("ENTER");
        if (__pGnereList == null)
        {
-               return 0;
+               return INIT_VALUE;
        }
+       AppLogDebug("EXIT");
        return __pGnereList->GetCount();
 }
 
-ContentInformationStruct*
-GenreListPresentationModel::GetContentInfoN(int index)
+ContentInformation*
+GenreListPresentationModel::GetGenreInfoN(int genreIndex)
 {
+       AppLogDebug("ENTER");
        if (__pGnereList == null)
        {
                return null;
        }
 
-       String WhereExpr = null;
-       WhereExpr = CommonUtil::SpecialReplaceChange(*(static_cast<String*>(__pGnereList->GetAt(index))));
-       WhereExpr = CommonUtil::MakeQuery(STRING_SORT_GENRE, WhereExpr);
-       IList* pSearchList = CommonUtil::SearchContentList(WhereExpr, STRING_SORT_TITLE);
-       if (pSearchList == null)
+       IList* pContentSearchResultList = CommonUtil::ContentSearchResultListN(
+                                                                               *(static_cast<String*>(__pGnereList->GetAt(genreIndex))), STRING_SORT_GENRE, STRING_SORT_TITLE);
+       if (pContentSearchResultList == null)
        {
+               AppLogDebug("EXIT");
                return null;
        }
 
-       ContentInformationStruct* pContentInfoStruct = null;
-       ContentSearchResult* pResult = static_cast<ContentSearchResult*>(pSearchList->GetAt(INIT_VALUE));
-       if(pResult != null && pResult->GetContentType() == CONTENT_TYPE_AUDIO)
+       ContentInformation* pContentInformation = null;
+       ContentSearchResult* pResult = static_cast<ContentSearchResult*>(pContentSearchResultList->GetAt(INIT_VALUE));
+       if (pResult != null && pResult->GetContentType() == CONTENT_TYPE_AUDIO)
        {
-               AudioContentInfo* pAudioContentInfo = static_cast<AudioContentInfo*>(pResult->GetContentInfo());
-               pContentInfoStruct = CommonUtil::GetContentInformationStructN(*pAudioContentInfo);
+               pContentInformation = CommonUtil::GetContentInformationN(*static_cast<AudioContentInfo*>(pResult->GetContentInfo()));
        }
 
-       pSearchList->RemoveAll(true);
-       delete pSearchList;
-       pSearchList = null;
+       pContentSearchResultList->RemoveAll(true);
+       delete pContentSearchResultList;
 
-       return pContentInfoStruct;
+       AppLogDebug("EXIT");
+       return pContentInformation;
 }
 
 Tizen::Base::String*
-GenreListPresentationModel::GetContentName(int index)
+GenreListPresentationModel::GetGenreName(int genreIndex)
 {
+       AppLogDebug("ENTER");
        if (__pGnereList == null)
        {
                return null;
        }
 
-       return static_cast<String*>(__pGnereList->GetAt(index));
+       AppLogDebug("EXIT");
+       return static_cast<String*>(__pGnereList->GetAt(genreIndex));
 }
 
 void
-GenreListPresentationModel::RefreshContent(void)
+GenreListPresentationModel::InitializeContentList(int genreIndex)
 {
-       if (__pGnereList != null)
+       AppLogDebug("ENTER");
+       if (__pContentList != null)
        {
-               __pGnereList->RemoveAll(true);
-               __pGnereList = CommonUtil::SearchContentList(STRING_SORT_GENRE);
-               //AppLogDebug("GenreListPresentationModel : %d", __pGnereList->GetCount());
+               __pContentList->RemoveAll(true);
+               delete __pContentList;
        }
-}
 
-void
-GenreListPresentationModel::SearchSong(int index)
-{
-       if (__pSongList != null)
-       {
-               __pSongList->RemoveAll(true);
-       }
-
-       String WhereExpr = null;
-       String* pGenreName = static_cast<String*>(__pGnereList->GetAt(index));
-       WhereExpr   = CommonUtil::SpecialReplaceChange(*pGenreName);
-       WhereExpr   = CommonUtil::MakeQuery(STRING_SORT_GENRE, WhereExpr);
-       __pSongList = CommonUtil::SearchContentList(WhereExpr, STRING_SORT_TITLE);
+       __currentGenreIndex = genreIndex;
+       __pContentList = CommonUtil::ContentSearchResultListN(
+                                                                               *(static_cast<String*>(__pGnereList->GetAt(genreIndex))), STRING_SORT_GENRE, STRING_SORT_TITLE);
+       AppLogDebug("EXIT");
 }
 
-int
-GenreListPresentationModel::GetSongContentCount(void)
+ContentInformation*
+GenreListPresentationModel::GetContentInfoN(int contentIndex)
 {
-       if (__pSongList == null)
-       {
-               return INIT_VALUE;
-       }
-       return __pSongList->GetCount();
-}
-
-ContentInformationStruct*
-GenreListPresentationModel::GetSongContentInfoN(int index)
-{
-       ContentSearchResult* pResult = static_cast<ContentSearchResult*>(__pSongList->GetAt(index));
-
-       ContentInformationStruct* pContentInfoStruct = null;
+       AppLogDebug("ENTER");
+       ContentInformation* pContentInfoStruct = null;
+       ContentSearchResult* pResult = static_cast<ContentSearchResult*>(__pContentList->GetAt(contentIndex));
        if (pResult != null && pResult->GetContentType() == CONTENT_TYPE_AUDIO)
        {
-               AudioContentInfo* pAudioContentInfo = static_cast<AudioContentInfo*>(pResult->GetContentInfo());
-               pContentInfoStruct = CommonUtil::GetContentInformationStructN(*pAudioContentInfo);
+               pContentInfoStruct = CommonUtil::GetContentInformationN(*static_cast<AudioContentInfo*>(pResult->GetContentInfo()));
        }
 
+       AppLogDebug("EXIT");
        return pContentInfoStruct;
 }
 
-
 Tizen::Base::Collection::ArrayList*
-GenreListPresentationModel::SearchContentItemN(int index)
+GenreListPresentationModel::GetContentPathListN(int genreIndex)
 {
-       AppLogDebug("Start");
+       AppLogDebug("ENTER");
        if (__pGnereList == null)
        {
+               AppLogDebug("EXIT");
                return null;
        }
 
-       String WhereExpr = null;
-       WhereExpr = CommonUtil::SpecialReplaceChange(*(static_cast<String*>(__pGnereList->GetAt(index))));
-       WhereExpr = CommonUtil::MakeQuery(STRING_SORT_GENRE, WhereExpr);
-       IList* pSearchList = CommonUtil::SearchContentList(WhereExpr, STRING_SORT_TITLE);
-
-       if (pSearchList == null)
+       IList* pContentSearchResultList = CommonUtil::ContentSearchResultListN(
+                                                                               *(static_cast<String*>(__pGnereList->GetAt(genreIndex))), STRING_SORT_GENRE, STRING_SORT_TITLE);
+       if (pContentSearchResultList == null)
        {
+               AppLogDebug("CommonUtil::ContentSearchResultListN() failed");
                return null;
        }
 
        ArrayList* pContentPath = new (std::nothrow) ArrayList();
        pContentPath->Construct();
 
-       ContentSearchResult* pResult;
-       int totalCount = pSearchList->GetCount();
-       for(int iCount = 0; iCount < totalCount; iCount++)
+       int totalCount = pContentSearchResultList->GetCount();
+       for (int iCount = 0; iCount < totalCount; iCount++)
        {
-               pResult = static_cast<ContentSearchResult*>(pSearchList->GetAt(iCount));
+               ContentSearchResult* pResult = static_cast<ContentSearchResult*>(pContentSearchResultList->GetAt(iCount));
                pContentPath->Add(*(new (std::nothrow) String(pResult->GetContentInfo()->GetContentPath())));
        }
 
-       pSearchList->RemoveAt(true);
-       delete pSearchList;
-       pSearchList = null;
-
-       AppLogDebug("End");
+       pContentSearchResultList->RemoveAt(true);
+       delete pContentSearchResultList;
 
+       AppLogDebug("EXIT");
        return pContentPath;
 }
+
+void
+GenreListPresentationModel::RefreshContentList(int genreIndex)
+{
+       AppLogDebug("ENTER");
+       if (__pContentList != null)
+       {
+               __pContentList->RemoveAll(true);
+               delete __pContentList;
+       }
+
+       __pContentList = CommonUtil::ContentSearchResultListN(
+                                                                               *(static_cast<String*>(__pGnereList->GetAt(genreIndex))), STRING_SORT_GENRE, STRING_SORT_TITLE);
+       if (__pContentList != null && __pContentList->GetCount() == INIT_VALUE)
+       {
+               delete __pContentList;
+               __pContentList = null;
+       }
+       __currentGenreIndex = genreIndex;
+       AppLogDebug("EXIT");
+}
+
+int
+GenreListPresentationModel::GetCurrentGenreIndex(void)
+{
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
+       return __currentGenreIndex;
+}
+
+void
+GenreListPresentationModel::AddContent(Tizen::Base::String path, int playlistIndex)
+{
+       AppLogDebug("ENTER");
+       ContentInformation* pContentInfoStruct = GetContentInfoN(playlistIndex);
+       PlayList* pPlayList = PlayListManager::GetInstance()->GetPlayListN(path);
+       pPlayList->AddItem(pContentInfoStruct->contentId);
+
+       delete pContentInfoStruct;
+       pContentInfoStruct = null;
+
+       delete pPlayList;
+       pPlayList = null;
+       AppLogDebug("EXIT");
+}
+
+result
+GenreListPresentationModel::UpdateGnereList(void)
+{
+       AppLogDebug("ENTER");
+       result r = E_SUCCESS;
+
+       if (__pGnereList != null)
+       {
+               __pGnereList->RemoveAll(true);
+               delete __pGnereList;
+       }
+
+       __pGnereList = CommonUtil::SearchContentList(STRING_SORT_GENRE);
+       TryCatch(__pGnereList != null, r = E_FAILURE, "__pGnereList is null");
+
+       AppLogDebug("EXIT");
+       return r;
+
+CATCH:
+       return r;
+}
\ No newline at end of file
old mode 100755 (executable)
new mode 100644 (file)
index 03d599a..4493b02
@@ -1,4 +1,4 @@
-//
+//
 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
 //
 // Licensed under the Flora License, Version 1.0 (the License);
 // limitations under the License.
 //
 
+/**
+ * @file               MpGenrePickerPanel.cpp
+ * @brief              This is the implementation file for GenrePickerPanel class.
+ */
+
 #include "MpGenrePickerPanel.h"
 #include "MpNowPlayContentPanel.h"
 
@@ -21,28 +26,29 @@ using namespace Tizen::Base;
 using namespace Tizen::Base::Collection;
 using namespace Tizen::Content;
 using namespace Tizen::Graphics;
+using namespace Tizen::Social;
 using namespace Tizen::Ui;
 using namespace Tizen::Ui::Controls;
 using namespace Tizen::Ui::Scenes;
-using namespace Tizen::Social;
 
 GenrePickerPanel::GenrePickerPanel(void)
 {
-       //AppLogDebug("GenrePickerPanel");
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 
 GenrePickerPanel::~GenrePickerPanel(void)
 {
-       //AppLogDebug("~GenrePickerPanel");
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 
 void
 GenrePickerPanel::OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previousSceneId,
-                                           const Tizen::Ui::Scenes::SceneId& currentSceneId,
-                                           Tizen::Base::Collection::IList* pArgs)
+                                                       const Tizen::Ui::Scenes::SceneId& currentSceneId,
+                                                       Tizen::Base::Collection::IList* pArgs)
 {
-       //AppLogDebug("OnSceneActivatedN");
-
+       AppLogDebug("ENTER");
        Form* pForm = dynamic_cast<Form*>(GetParent());
        AppAssert(pForm);
 
@@ -51,10 +57,10 @@ GenrePickerPanel::OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previousSc
 
        SceneManager* pSceneManager = SceneManager::GetInstance();
        AppAssert(pSceneManager);
-
+       __pPresentationModel->UpdateGnereList();
        if (__pPresentationModel != null)
        {
-               CommonUtil::ShowNoContentImage(__pPresentationModel->GetTotalGenreCount(), *__pContentTableView, *__pNoContentImageLabel, *__pNoContentTextLabel);
+               CommonUtil::ShowNoContentImage(__pPresentationModel->GetAllGenreCount(), *__pContentTableView, *__pNoContentImageLabel, *__pNoContentTextLabel);
        }
 
        if (pSceneManager->IsSceneAlive(IDSCN_PLAYER))
@@ -72,36 +78,37 @@ GenrePickerPanel::OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previousSc
                pArgs->RemoveAll(true);
                delete pArgs;
        }
+       AppLogDebug("EXIT");
 }
 
 void
 GenrePickerPanel::OnSceneDeactivated(const Tizen::Ui::Scenes::SceneId& currentSceneId,
-                                            const Tizen::Ui::Scenes::SceneId& nextSceneId)
+                                                       const Tizen::Ui::Scenes::SceneId& nextSceneId)
 {
-       //AppLogDebug("OnSceneDeactivated");
-
+       AppLogDebug("ENTER");
        Form* pForm = dynamic_cast<Form*>(GetParent());
        AppAssert(pForm);
 
        Footer* pFooter = pForm->GetFooter();
        pFooter->RemoveAllButtons();
        pFooter->RemoveAllItems();
+       AppLogDebug("EXIT");
 }
 
 void
 GenrePickerPanel::OnTableViewItemStateChanged(Tizen::Ui::Controls::TableView& tableView,
-                                                     int itemIndex,
-                                                     Tizen::Ui::Controls::TableViewItem* pItem,
-                                                     Tizen::Ui::Controls::TableViewItemStatus status)
+                                                               int itemIndex,
+                                                               Tizen::Ui::Controls::TableViewItem* pItem,
+                                                               Tizen::Ui::Controls::TableViewItemStatus status)
 {
-       //AppLogDebug("OnTableViewItemStateChanged");
-
+       AppLogDebug("ENTER");
        if (status == TABLE_VIEW_ITEM_STATUS_SELECTED && itemIndex >= 0)
        {
                SceneManager* pSceneManager = SceneManager::GetInstance();
                AppAssert(pSceneManager);
 
-               __pPresentationModel->SearchSong(itemIndex);
+               __pPresentationModel->InitializeContentList(itemIndex);
                pSceneManager->GoForward(ForwardSceneTransition(IDSCN_GENRE_CONTENT_PICKER));
        }
-}
+       AppLogDebug("EXIT");
+}
\ No newline at end of file
old mode 100644 (file)
new mode 100755 (executable)
index abf7cb9..e6826fd
@@ -1,4 +1,4 @@
-//
+//
 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
 //
 // Licensed under the Flora License, Version 1.0 (the License);
 // limitations under the License.
 //
 
+/**
+ * @file               MpMainFrame.cpp
+ * @brief              This is the implementation file for MainFrame class.
+ */
+
 #include "MpMainFrame.h"
 #include "MpSceneRegister.h"
 
@@ -24,33 +29,33 @@ using namespace Tizen::Ui::Scenes;
 
 MainFrame::MainFrame(void)
 {
-       AppLogDebug("Start");
-       AppLogDebug("End");
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 
 MainFrame::~MainFrame(void)
 {
-       AppLogDebug("Start");
-       AppLogDebug("End");
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 
 result
 MainFrame::OnInitializing(void)
 {
-       AppLogDebug("Start");
+       AppLogDebug("ENTER");
        result r = E_SUCCESS;
        r = SceneRegister::RegisterAllScenes();
        TryReturn(r == E_SUCCESS, r, "[%s] Scene registering Failed.", GetErrorMessage(r));
-       AppLogDebug("End");
+       AppLogDebug("EXIT");
        return r;
 }
 
 result
 MainFrame::OnTerminating(void)
 {
-       AppLogDebug("Start");
+       AppLogDebug("ENTER");
        result r = E_SUCCESS;
-       AppLogDebug("End");
+       AppLogDebug("EXIT");
        return r;
 }
 
@@ -72,6 +77,6 @@ MainFrame::GoToInitialScene(const Tizen::Ui::Scenes::SceneId& sceneId, Tizen::Ba
        r = pSceneManager->GoForward(ForwardSceneTransition(sceneId), pArgs);
        TryReturn(r == E_SUCCESS, r, "[%s] Scene transition Failed.", GetErrorMessage(r));
 
-       AppLogDebug("End");
+       AppLogDebug("EXIT");
        return r;
-}
+}
\ No newline at end of file
index cfeac11..d3b3116 100644 (file)
@@ -1,4 +1,4 @@
-//
+//
 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
 //
 // Licensed under the Flora License, Version 1.0 (the License);
 // limitations under the License.
 //
 
+/**
+ * @file               MpMusicPlayerApp.cpp
+ * @brief              This is the implementation file for MusicPlayerApp class.
+ */
+
 #include "MpBaseForm.h"
 #include "MpBasePanel.h"
 #include "MpCommonUtil.h"
 #include "MpMusicPlayerApp.h"
 #include "MpResourceManager.h"
 #include "MpSceneRegister.h"
+#include "MpThumbnailProvider.h"
 #include "MpTypes.h"
 
 using namespace Tizen::App;
@@ -31,12 +37,12 @@ using namespace Tizen::Ui::Scenes;
 using namespace Tizen::Base::Collection;
 
 const wchar_t* TIZEN_APPCONTORL_PROVIDER_AUDIO = L"http://tizen.org/appcontrol/provider/musicplayer";
-const wchar_t* TIZEN_APPCONTROL_OPERATION_PLAY      = L"http://tizen.org/appcontrol/operation/play";
-const wchar_t* TIZEN_APPCONTROL_OPERATION_VIEW      = L"http://tizen.org/appcontrol/operation/view";
+const wchar_t* TIZEN_APPCONTROL_OPERATION_PLAY = L"http://tizen.org/appcontrol/operation/play";
+const wchar_t* TIZEN_APPCONTROL_OPERATION_VIEW = L"http://tizen.org/appcontrol/operation/view";
 const wchar_t* TIZEN_APPCONTROL_OPERATION_CONFIGURE = L"http://tizen.org/appcontrol/operation/configure";
-const static Tizen::Base::String APPCONTROL_KEYFIELD_PATH    = L"path";
+const static Tizen::Base::String APPCONTROL_KEYFIELD_PATH = L"path";
 static const wchar_t* PARAM_LANGUAGE = L"http://tizen.org/setting/locale.language";
-static const wchar_t* PARAM_COUNTRY  = L"http://tizen.org/setting/locale.country";
+static const wchar_t* PARAM_COUNTRY = L"http://tizen.org/setting/locale.country";
 
 MusicPlayerApp::MusicPlayerApp(void)
        : __requestId(null)
@@ -45,22 +51,28 @@ MusicPlayerApp::MusicPlayerApp(void)
        , __pDataList(null)
        , __pMainFrame(null)
 {
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 
 MusicPlayerApp::~MusicPlayerApp(void)
 {
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 
 UiApp*
 MusicPlayerApp::CreateInstance(void)
 {
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
        return new MusicPlayerApp();
 }
 
 bool
 MusicPlayerApp::OnAppInitializing(AppRegistry& appRegistry)
 {
-       AppLogDebug("Start");
+       AppLogDebug("ENTER");
        result r = E_SUCCESS;
        AppControlProviderManager* pAppControlProviderManager = null;
 
@@ -72,17 +84,18 @@ MusicPlayerApp::OnAppInitializing(AppRegistry& appRegistry)
        r = pAppControlProviderManager->SetAppControlProviderEventListener(this);
        TryCatch(r == E_SUCCESS, , "Failed SetAppControlProviderEventListener");
 
-       AppLogDebug("End");
+       AppLogDebug("EXIT");
        return true;
+
 CATCH:
-       //AppLogExceptionTag("MusicPlayerApp","[%s]",GetErrorMessage(r));
+       //AppLogException("[%s]",GetErrorMessage(r));
        return false;
 }
 
 bool
 MusicPlayerApp::OnAppInitialized(void)
 {
-       AppLogDebug("Start");
+       AppLogDebug("ENTER");
        result r = E_SUCCESS;
        __pMainFrame = new (std::nothrow) MainFrame();
        if (__pMainFrame == null)
@@ -108,7 +121,7 @@ MusicPlayerApp::OnAppInitialized(void)
                delete __pDataList;
                __pDataList = null;
        }
-       AppLogDebug("End");
+       AppLogDebug("EXIT");
        return true;
 
 CATCH:
@@ -119,28 +132,36 @@ CATCH:
 bool
 MusicPlayerApp::OnAppWillTerminate(void)
 {
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
        return true;
 }
 
 bool
 MusicPlayerApp::OnAppTerminating(AppRegistry& appRegistry, bool forcedTermination)
 {
-       AppLogDebug("Start");
+       AppLogDebug("ENTER");
        CommonUtil::SetValue(AUTO_OFF_LEVEL, 0);
-       /*if (__operationId.Equals(TIZEN_APPCONTROL_OPERATION_PLAY, true) ||
-                       __operationId.Equals(TIZEN_APPCONTROL_OPERATION_VIEW, true) ||
-                       __operationId.Equals(TIZEN_APPCONTROL_OPERATION_CONFIGURE, true))
+       /*if (__operationId.Equals(TIZEN_APPCONTROL_OPERATION_PLAY, true)
+               || __operationId.Equals(TIZEN_APPCONTROL_OPERATION_VIEW, true)
+               || __operationId.Equals(TIZEN_APPCONTROL_OPERATION_CONFIGURE, true))
        {
                AppControlProviderManager::GetInstance()->SendAppControlResult(__requestId, APP_CTRL_RESULT_TERMINATED, null);
        }*/
-       AppLogDebug("End");
+       ThumbnailProvider* pThumbnailProvider = dynamic_cast<ThumbnailProvider*>(ThumbnailProvider::GetInstance());
+       if (pThumbnailProvider != null)
+       {
+               pThumbnailProvider->ClearThumbnailRequests();
+               Tizen::Base::Runtime::Thread::Sleep(1000);
+       }
+       AppLogDebug("EXIT");
        return true;
 }
 
 void
 MusicPlayerApp::OnForeground(void)
 {
-       AppLogDebug("Start");
+       AppLogDebug("ENTER");
 
        static bool bFirst = true;
        if (bFirst)
@@ -157,7 +178,7 @@ MusicPlayerApp::OnForeground(void)
 
        BasePanel* pBasePanel = dynamic_cast<BasePanel*>(pScene->GetPanel());
        BaseForm* pBaseForm = dynamic_cast<BaseForm*>(pScene->GetForm());
-       if(pBasePanel)
+       if (pBasePanel)
        {
                pBasePanel->OnUpdateContentList();
        }
@@ -175,7 +196,6 @@ MusicPlayerApp::OnForeground(void)
                {
                        pBaseForm->OnChangedContentList(__pDataList);
                }
-
        }
        else
        {
@@ -187,38 +207,48 @@ MusicPlayerApp::OnForeground(void)
                delete __pDataList;
                __pDataList = null;
        }
-       AppLogDebug("End");
+       AppLogDebug("EXIT");
 }
 
 void
 MusicPlayerApp::OnBackground(void)
 {
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 
 void
 MusicPlayerApp::OnLowMemory(void)
 {
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 
 void
 MusicPlayerApp::OnBatteryLevelChanged(BatteryLevel batteryLevel)
 {
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 
 void
 MusicPlayerApp::OnScreenOn(void)
 {
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 
 void
 MusicPlayerApp::OnScreenOff(void)
 {
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 
 void
 MusicPlayerApp::OnSettingChanged(Tizen::Base::String& key)
 {
-       AppLog("ENTER");
+       AppLogDebug("ENTER");
 
        if (key.Equals(PARAM_LANGUAGE, true) || key.Equals(PARAM_COUNTRY, true))
        {
@@ -226,15 +256,15 @@ MusicPlayerApp::OnSettingChanged(Tizen::Base::String& key)
                pApp->Terminate();
        }
 
-       AppLog("EXIT");
+       AppLogDebug("EXIT");
 }
 
 void
 MusicPlayerApp::OnAppControlRequestReceived(RequestId reqId, const Tizen::Base::String& operationId, const Tizen::Base::String* pUriData, const Tizen::Base::String* pMimeType, const Tizen::Base::Collection::IMap* pExtraData)
 {
-       AppLogDebug("Start");
+       AppLogDebug("ENTER");
 //     result r = E_SUCCESS;
-//     TryCatch(__pDataList == null,r = E_OBJ_ALREADY_EXIST,"The application has already launched");
+//     TryCatch(__pDataList == null, r = E_OBJ_ALREADY_EXIST, "The application has already launched");
 
        __requestId = reqId;
        __operationId = operationId;
@@ -250,16 +280,17 @@ MusicPlayerApp::OnAppControlRequestReceived(RequestId reqId, const Tizen::Base::
        }
        else
        {
+               // Empty statement
        }
        __pMainFrame->GoToInitialScene(__sceneId, __pDataList);
-       AppLogDebug("End");
+       AppLogDebug("EXIT");
        return;
 }
 
 void
 MusicPlayerApp::ParsingArgument(const Tizen::Base::String* pUriData, const Tizen::Base::Collection::IMap* pArgs)
 {
-       AppLogDebug("Start");
+       AppLogDebug("ENTER");
 
        const String* pContentPath = null;
        String sourceStr;
@@ -285,7 +316,7 @@ MusicPlayerApp::ParsingArgument(const Tizen::Base::String* pUriData, const Tizen
                return;
        }
 
-       ArrayList* pContentPathArrayList = new (std::nothrow)ArrayList();
+       ArrayList* pContentPathArrayList = new (std::nothrow) ArrayList();
        pContentPathArrayList->Construct();
 
        if (pContentPath != null)
@@ -309,7 +340,7 @@ MusicPlayerApp::ParsingArgument(const Tizen::Base::String* pUriData, const Tizen
 
                Tizen::Base::Utility::StringTokenizer PathStringTokenizer(*pContentPath, delim);
 
-               while(PathStringTokenizer.HasMoreTokens())
+               while (PathStringTokenizer.HasMoreTokens())
                {
                        PathStringTokenizer.GetNextToken(token);
 //                     if (File::IsFileExist(token))
@@ -322,12 +353,13 @@ MusicPlayerApp::ParsingArgument(const Tizen::Base::String* pUriData, const Tizen
                __pDataList->Add(*(new Integer(0)));
        }
 
-       AppLogDebug("End");
+       AppLogDebug("EXIT");
 }
 
-
 Tizen::Base::String
 MusicPlayerApp::GetOperationId(void)
 {
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
        return __operationId;
-}
+}
\ No newline at end of file
old mode 100644 (file)
new mode 100755 (executable)
index 070c660..990c09a
@@ -1,4 +1,4 @@
-//
+//
 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
 //
 // Licensed under the Flora License, Version 1.0 (the License);
 // limitations under the License.
 //
 
+/**
+ * @file               MpMusicPlayerEntry.cpp
+ * @brief              This is the implementation file for MusicPlayerEntry class.
+ */
+
 #include <new>
 #include "MpMusicPlayerApp.h"
 
@@ -27,14 +32,13 @@ extern "C"
 
 _EXPORT_ int OspMain(int argc, char *pArgv[]);
 #ifdef _PROFILE
-extern void start_profile (void);
-extern void end_profile (void);
+extern void start_profile(void);
+extern void end_profile(void);
 #else
 #define start_profile()
 #define end_profile()
 #endif
 
-
 /**
  * The entry function of Tizen application called by the operating system.
  */
@@ -53,13 +57,15 @@ OspMain(int argc, char *pArgv[])
 
        pArgs->Construct();
        for (int i = 0; i < argc; i++)
-               pArgs->Add(*(new String(pArgv[i])));
+       {
+               pArgs->Add(*(new (std::nothrow) String(pArgv[i])));
+       }
 
        start_profile();
        r = Tizen::App::UiApp::Execute(MusicPlayerApp::CreateInstance, pArgs);
        if (IsFailed(r))
        {
-               //AppLogExceptionTag("MusicPlayerEntry", "Application execution failed-[%s].", GetErrorMessage(r));
+               //AppLogException("Application execution failed-[%s].", GetErrorMessage(r));
                r &= 0x0000FFFF;
        }
        end_profile();
@@ -71,4 +77,4 @@ OspMain(int argc, char *pArgv[])
 }
 #ifdef __cplusplus
 }
-#endif // __cplusplus
+#endif // __cplusplus
\ No newline at end of file
index 1751642..18d6a1c 100644 (file)
@@ -1,4 +1,4 @@
-//
+//
 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
 //
 // Licensed under the Flora License, Version 1.0 (the License);
 // limitations under the License.
 //
 
-#include "MpMusicPlayerForm.h"
+/**
+ * @file               MpMusicPlayerForm.h
+ * @brief              This is the implementation file for MusicPlayerForm class.
+ */
 
 #include <FApp.h>
 #include <FBase.h>
 #include <FMedia.h>
 #include <FUi.h>
 #include <FUiScenes.h>
-
-#include "MpMusicPlayerPresentationModel.h"
-#include "MpSettingPresentationModel.h"
+#include "MpCommonUtil.h"
 #include "MpMusicPlayerApp.h"
+#include "MpMusicPlayerForm.h"
+#include "MpMusicPlayerPresentationModel.h"
+#include "MpPlaylistPickerPopup.h"
 #include "MpResourceManager.h"
 #include "MpSceneRegister.h"
-#include "MpPlaylistPickerPopup.h"
-#include "MpSharePopup.h"
 #include "MpSetAsPopup.h"
+#include "MpSettingPresentationModel.h"
+#include "MpSharePopup.h"
 #include "MpSoundPathPopup.h"
-#include "MpCommonUtil.h"
 
 using namespace Tizen::App;
 using namespace Tizen::Base;
 using namespace Tizen::Base::Collection;
-using namespace Tizen::Media;
 using namespace Tizen::Graphics;
 using namespace Tizen::Io;
+using namespace Tizen::Media;
+using namespace Tizen::System;
 using namespace Tizen::Ui;
+using namespace Tizen::Ui::Animations;
 using namespace Tizen::Ui::Controls;
 using namespace Tizen::Ui::Scenes;
-using namespace Tizen::System;
-using namespace Tizen::Ui::Animations;
 
 static const int X_ALBUMART_LABEL = 116;
 static const int Y_ALBUMART_LABEL = 186 + 108 + 50;
@@ -166,20 +169,20 @@ static const int POINT_Y_CONTEXT_MENU_BITMAP = 132;
 static const int POINT_X_HORIZONTAL_CONTEXT_MENU_BITMAP = 1230;
 static const int POINT_Y_HORIZONTAL_CONTEXT_MENU_BITMAP = 132;
 
-static const Tizen::Graphics::Color COLOR_PLAYER_FORM                                                  (62, 62, 62);
-static const Tizen::Graphics::Color COLOR_PLAYER_PANEL_SEPERATOR                                       (255, 255, 255, 77);
-static const Tizen::Graphics::Color COLOR_PLAYER_BOTTOM_PANEL                                  (0, 0, 0, 51);
-static const Tizen::Graphics::Color COLOR_PLAYER_HEADER                                                        (0, 0, 0, 51);
+static const Tizen::Graphics::Color COLOR_PLAYER_FORM (62, 62, 62);
+static const Tizen::Graphics::Color COLOR_PLAYER_PANEL_SEPERATOR (255, 255, 255, 77);
+static const Tizen::Graphics::Color COLOR_PLAYER_BOTTOM_PANEL (0, 0, 0, 51);
+static const Tizen::Graphics::Color COLOR_PLAYER_HEADER (0, 0, 0, 51);
 
-static const Tizen::Graphics::Color COLOR_PLAYER_TIME                                                  (255, 255, 255);
+static const Tizen::Graphics::Color COLOR_PLAYER_TIME (255, 255, 255);
 
-static const Tizen::Graphics::Color COLOR_HORIZONTAL_BG_ITEM                                           (249, 249, 249);
+static const Tizen::Graphics::Color COLOR_HORIZONTAL_BG_ITEM (249, 249, 249);
 
-static const Tizen::Graphics::Color COLOR_HORIZONTAL_HEADER_BG                                 (0, 0, 0, 100);
-static const Tizen::Graphics::Color COLOR_HORIZONTAL_HEADER_TEXT                                       (255, 255, 255);
+static const Tizen::Graphics::Color COLOR_HORIZONTAL_HEADER_BG (0, 0, 0, 100);
+static const Tizen::Graphics::Color COLOR_HORIZONTAL_HEADER_TEXT (255, 255, 255);
 
-static const Tizen::Graphics::Color MAIN_TEXT_COLOR                                                            (0, 0, 0);
-static const Tizen::Graphics::Color SUB_TEXT_COLOR                                                             (124, 124, 124);
+static const Tizen::Graphics::Color MAIN_TEXT_COLOR (0, 0, 0);
+static const Tizen::Graphics::Color SUB_TEXT_COLOR (124, 124, 124);
 
 static const int TRANSPARENT_COLOR = 0x00000000;
 
@@ -221,7 +224,7 @@ enum RepeatType
 {
        IDA_TYPE_REPEAT_A = 0,          /**< The repeat type is OFF */
        IDA_TYPE_REPEAT_ONE,            /**< The repeat type is ONE */
-       IDA_TYPE_REPEAT_ALL                     /**< The repeat type is ALL */
+       IDA_TYPE_REPEAT_ALL             /**< The repeat type is ALL */
 };
 
 PlayerForm::PlayerForm(void)
@@ -263,28 +266,34 @@ PlayerForm::PlayerForm(void)
        , __pPreviousSceneId(null)
        , __pPath(null)
 {
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 
 PlayerForm::~PlayerForm(void)
 {
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 
 void
 PlayerForm::Initialize(void)
 {
-       Form::Construct(FORM_STYLE_NORMAL| FORM_STYLE_INDICATOR| FORM_STYLE_HEADER);
+       AppLogDebug("ENTER");
+       Form::Construct(FORM_STYLE_NORMAL | FORM_STYLE_INDICATOR | FORM_STYLE_HEADER);
+       AppLogDebug("EXIT");
 }
 
 result
 PlayerForm::OnInitializing(void)
 {
-       AppLogDebug("Start");
+       AppLogDebug("ENTER");
        SetBackgroundColor(COLOR_PLAYER_FORM);
 
        __pPlayerPresentationModel = PlayerPresentationModel::GetInstance();
        __pPlayerPresentationModel->AddMusicPlayerEventListener(*this);
 
-       ButtonItem  buttonRightItem;
+       ButtonItem buttonRightItem;
        Header* pHeader = GetHeader();
 
        buttonRightItem.Construct(BUTTON_ITEM_STYLE_ICON, IDA_HEADER_OPTION_BUTTON);
@@ -297,7 +306,6 @@ PlayerForm::OnInitializing(void)
 
        Rectangle clientBounds = GetClientAreaBounds();
 
-
        AddTouchEventListener(*this);
 
        __pAlbumArtElements = new (std::nothrow) VisualElement();
@@ -367,9 +375,9 @@ PlayerForm::OnInitializing(void)
 
        __pControllerRightButtonSeperatorLabel = new (std::nothrow) Label();
        __pControllerRightButtonSeperatorLabel->Construct(Rectangle(X_CONTROLLER_RIGHT_BUTTON_SEPERATOR_LABEL
-                       , Y_CONTROLLER_BUTTON_SEPERATOR_LABEL
-                       , W_CONTROLLER_BUTTON_SEPERATOR_LABEL
-                       , H_CONTROLLER_BUTTON_SEPERATOR_LABEL), IDS_BLANK);
+                                                                                                                       , Y_CONTROLLER_BUTTON_SEPERATOR_LABEL
+                                                                                                                       , W_CONTROLLER_BUTTON_SEPERATOR_LABEL
+                                                                                                                       , H_CONTROLLER_BUTTON_SEPERATOR_LABEL), IDS_BLANK);
        __pControllerPanel->AddControl(*__pControllerRightButtonSeperatorLabel);
 
        __pRepeatButton = new (std::nothrow) Button();
@@ -600,16 +608,16 @@ PlayerForm::OnInitializing(void)
        delete pControllerFocusBGBitmap;
        pControllerFocusBGBitmap = null;
 
-       AppLogDebug("End");
+       AppLogDebug("EXIT");
        return E_SUCCESS;
 }
 
 void
 PlayerForm::OnOrientationChanged(const Tizen::Ui::Control& source, Tizen::Ui::OrientationStatus orientationStatus)
 {
-       AppLogDebug("Start");
+       AppLogDebug("ENTER");
        if (orientationStatus == ORIENTATION_STATUS_LANDSCAPE
-                       || orientationStatus == ORIENTATION_STATUS_LANDSCAPE_REVERSE)
+               || orientationStatus == ORIENTATION_STATUS_LANDSCAPE_REVERSE)
        {
                Header* pHeader = GetHeader();
                Rectangle bounds = GetBounds();
@@ -713,7 +721,7 @@ PlayerForm::OnOrientationChanged(const Tizen::Ui::Control& source, Tizen::Ui::Or
                Invalidate(true);
        }
        else if (orientationStatus == ORIENTATION_STATUS_PORTRAIT
-                        || orientationStatus == ORIENTATION_STATUS_PORTRAIT_REVERSE)
+                       || orientationStatus == ORIENTATION_STATUS_PORTRAIT_REVERSE)
        {
                GetHeader()->SetShowState(true);
                Rectangle clientBounds = GetClientAreaBounds();
@@ -759,14 +767,15 @@ PlayerForm::OnOrientationChanged(const Tizen::Ui::Control& source, Tizen::Ui::Or
        }
        else
        {
-               //AppLogDebug("OnOrientationChanged ???");
+               // Empty statement
        }
-       AppLogDebug("End");
+       AppLogDebug("EXIT");
 }
 
 result
 PlayerForm::OnTerminating(void)
 {
+       AppLogDebug("ENTER");
        /* Comment out this code temporarily in 2.0. This will be supported in 2.1.
        ReleaseKeyCapture(KEY_SIDE_UP);
        ReleaseKeyCapture(KEY_SIDE_DOWN);
@@ -816,267 +825,300 @@ PlayerForm::OnTerminating(void)
        }
        SettingPresentationModel::GetInstance()->RemoveSettingEventListener(*this);
        SettingPresentationModel::GetInstance()->DestroySettingPresentationModel();
+       AppLogDebug("EXIT");
        return E_SUCCESS;
 }
 
 void
 PlayerForm::OnActionPerformed(const Tizen::Ui::Control& source, int actionId)
 {
+       AppLogDebug("ENTER");
        SceneManager* pSceneManager = SceneManager::GetInstance();
        AppAssert(pSceneManager);
 
        int currentContentIndex = -1;
        String* contentPath = null;
 
-       switch(actionId)
+       switch (actionId)
        {
        case IDA_HEADER_OPTION_BUTTON:
-       {
-               AppLogDebug("%d", GetOrientationStatus());
-               if ((GetOrientationStatus() == ORIENTATION_STATUS_PORTRAIT) || (GetOrientationStatus() == ORIENTATION_STATUS_PORTRAIT_REVERSE))
-               {
-                       __pContextMenuIconText->SetAnchorPosition(Point(POINT_X_CONTEXT_MENU_BITMAP, POINT_Y_CONTEXT_MENU_BITMAP));
-               }
-               else if ((GetOrientationStatus() == ORIENTATION_STATUS_LANDSCAPE) || (GetOrientationStatus() == ORIENTATION_STATUS_LANDSCAPE_REVERSE))
                {
-                       __pContextMenuIconText->SetAnchorPosition(Point(POINT_X_HORIZONTAL_CONTEXT_MENU_BITMAP, POINT_Y_HORIZONTAL_CONTEXT_MENU_BITMAP));
+                       AppLogDebug("%d", GetOrientationStatus());
+                       if ((GetOrientationStatus() == ORIENTATION_STATUS_PORTRAIT) || (GetOrientationStatus() == ORIENTATION_STATUS_PORTRAIT_REVERSE))
+                       {
+                               __pContextMenuIconText->SetAnchorPosition(Point(POINT_X_CONTEXT_MENU_BITMAP, POINT_Y_CONTEXT_MENU_BITMAP));
+                       }
+                       else if ((GetOrientationStatus() == ORIENTATION_STATUS_LANDSCAPE) || (GetOrientationStatus() == ORIENTATION_STATUS_LANDSCAPE_REVERSE))
+                       {
+                               __pContextMenuIconText->SetAnchorPosition(Point(POINT_X_HORIZONTAL_CONTEXT_MENU_BITMAP, POINT_Y_HORIZONTAL_CONTEXT_MENU_BITMAP));
+                       }
+                       __pContextMenuIconText->SetShowState(true);
+                       __pContextMenuIconText->Show();
                }
-               __pContextMenuIconText->SetShowState(true);
-               __pContextMenuIconText->Show();
                break;
-       }
+
        case IDA_BUTTON_VOLUME:
-       {
-               if (__pVolumePanel == null)
                {
-                       InitializeVolumeBar();
-               }
-               else
-               {
-                       if (__pVolumePanel->GetShowState() == true)
+                       if (__pVolumePanel == null)
                        {
-                               __pVolumePanel->SetShowState(false);
+                               InitializeVolumeBar();
                        }
                        else
                        {
-                               int MediaSoundVolume = 0;
-                               SettingInfo::GetValue(MEDIA_VOLUME, MediaSoundVolume);
-                               __pPlayerPresentationModel->SetVolume(MediaSoundVolume);
-                               __pVolumeSlider->SetValue(__pPlayerPresentationModel->GetVolume());
-                               __pVolumeSlider->Invalidate(true);
-                               __pVolumePanel->SetShowState(true);
+                               if (__pVolumePanel->GetShowState() == true)
+                               {
+                                       __pVolumePanel->SetShowState(false);
+                               }
+                               else
+                               {
+                                       int MediaSoundVolume = 0;
+                                       SettingInfo::GetValue(MEDIA_VOLUME, MediaSoundVolume);
+                                       __pPlayerPresentationModel->SetVolume(MediaSoundVolume);
+                                       __pVolumeSlider->SetValue(__pPlayerPresentationModel->GetVolume());
+                                       __pVolumeSlider->Invalidate(true);
+                                       __pVolumePanel->SetShowState(true);
+                               }
                        }
                }
                break;
-       }
+
        case IDA_BUTTON_PLAY:
-       {
-               int currentContentIndex = -1;
-               String* currentPlayConent = null;
-               String* ContentPath = null;
+               {
+                       int currentContentIndex = -1;
+                       String* currentPlayConent = null;
+                       String* ContentPath = null;
 
-               currentContentIndex = __pPlayerPresentationModel->GetCurrentContentIndex();
-               currentPlayConent = __pPlayerPresentationModel->GetPlayContentPath();
-               ContentPath = __pPlayerPresentationModel->GetContentPath(currentContentIndex);
+                       currentContentIndex = __pPlayerPresentationModel->GetCurrentContentIndex();
+                       currentPlayConent = __pPlayerPresentationModel->GetPlayContentPath();
+                       ContentPath = __pPlayerPresentationModel->GetContentPath(currentContentIndex);
 
-               if (currentPlayConent->Equals(*ContentPath))
-               {
-                       __pPlayerPresentationModel->Play(__pPlayerPresentationModel->GetCurrentContentIndex(), __pPlayStateSlider->GetValue(), true);
-               }
-               else
-               {
-                       __pPlayerPresentationModel->Play(__pPlayerPresentationModel->GetCurrentContentIndex(), __pPlayStateSlider->GetValue());
+                       if (currentPlayConent->Equals(*ContentPath))
+                       {
+                               __pPlayerPresentationModel->Play(__pPlayerPresentationModel->GetCurrentContentIndex(), __pPlayStateSlider->GetValue(), true);
+                       }
+                       else
+                       {
+                               __pPlayerPresentationModel->Play(__pPlayerPresentationModel->GetCurrentContentIndex(), __pPlayStateSlider->GetValue());
+                       }
+
+                       if (__pPlayerPresentationModel->IsFileExist(__pPlayerPresentationModel->GetCurrentContentIndex()) != true)
+                       {
+                               SetAddToPlaylistButtonImage(false);
+                       }
                }
                break;
-       }
+
        case IDA_BUTTON_PAUSE:
-       {
-               __pPlayerPresentationModel->Pause();
+               {
+                       __pPlayerPresentationModel->Pause();
+               }
                break;
-       }
-       case IDA_BUTTON_BACK:
-       {
-               result r = pSceneManager->GoBackward(BackwardSceneTransition(SCENE_TRANSITION_ANIMATION_TYPE_NONE, SCENE_DESTROY_OPTION_KEEP));
 
-               if (r != E_SUCCESS)
+       case IDA_BUTTON_BACK:
                {
-                       UiApp* pApp = UiApp::GetInstance();
-                       pApp->Terminate();
+                       result r = pSceneManager->GoBackward(BackwardSceneTransition(SCENE_TRANSITION_ANIMATION_TYPE_NONE, SCENE_DESTROY_OPTION_KEEP));
+
+                       if (r != E_SUCCESS)
+                       {
+                               UiApp* pApp = UiApp::GetInstance();
+                               pApp->Terminate();
+                       }
                }
                break;
-       }
-       case IDA_BUTTON_REPEAT:
-       {
-               int repeatState = __pPlayerPresentationModel->GetRepeatState();
 
-               switch(repeatState)
+       case IDA_BUTTON_REPEAT:
                {
-               case IDA_TYPE_REPEAT_A:
-                       SetRepeatButtonImage(IDA_TYPE_REPEAT_ONE);
-                       break;
-               case IDA_TYPE_REPEAT_ONE:
-                       SetRepeatButtonImage(IDA_TYPE_REPEAT_ALL);
-                       break;
-               case IDA_TYPE_REPEAT_ALL:
-                       SetRepeatButtonImage(IDA_TYPE_REPEAT_A);
-                       break;
+                       int repeatState = __pPlayerPresentationModel->GetRepeatState();
+
+                       switch (repeatState)
+                       {
+                       case IDA_TYPE_REPEAT_A:
+                               {
+                                       SetRepeatButtonImage(IDA_TYPE_REPEAT_ONE);
+                               }
+                               break;
+
+                       case IDA_TYPE_REPEAT_ONE:
+                               {
+                                       SetRepeatButtonImage(IDA_TYPE_REPEAT_ALL);
+                               }
+                               break;
+
+                       case IDA_TYPE_REPEAT_ALL:
+                               {
+                                       SetRepeatButtonImage(IDA_TYPE_REPEAT_A);
+                               }
+                               break;
+
+                       default:
+                               break;
+                       }
                }
                break;
-       }
+
        case IDA_BUTTON_SHUFFLE:
-       {
-               if (__pPlayerPresentationModel->IsShuffleEnable() == false)
-               {
-                       SetShuffleButtonImage(true);
-               }
-               else
                {
-                       SetShuffleButtonImage(false);
+                       if (__pPlayerPresentationModel->IsShuffleEnable() == false)
+                       {
+                               SetShuffleButtonImage(true);
+                       }
+                       else
+                       {
+                               SetShuffleButtonImage(false);
+                       }
                }
                break;
-       }
-       case IDA_BUTTON_ADD_TO_PLAYLIST:
-       {
-               currentContentIndex = __pPlayerPresentationModel->GetCurrentContentIndex();
-               contentPath = __pPlayerPresentationModel->GetContentPath(currentContentIndex);
 
-               Tizen::Base::Collection::ArrayList* pDataList = new (std::nothrow) ArrayList();
-               pDataList->Construct();
-               pDataList->Add(*(new String(*contentPath)));
-               if (__pPlayListPickerPopup != null)
+       case IDA_BUTTON_ADD_TO_PLAYLIST:
                {
-                       AppLogDebug("1");
-                       delete __pPlayListPickerPopup;
-                       __pPlayListPickerPopup = null;
-                       AppLogDebug("2");
-               }
+                       currentContentIndex = __pPlayerPresentationModel->GetCurrentContentIndex();
+                       contentPath = __pPlayerPresentationModel->GetContentPath(currentContentIndex);
+
+                       Tizen::Base::Collection::ArrayList* pDataList = new (std::nothrow) ArrayList();
+                       pDataList->Construct();
+                       pDataList->Add(*(new (std::nothrow) String(*contentPath)));
+                       if (__pPlayListPickerPopup != null)
+                       {
+                               AppLogDebug("1");
+                               delete __pPlayListPickerPopup;
+                               __pPlayListPickerPopup = null;
+                               AppLogDebug("2");
+                       }
 
-               if (__pPlayListPickerPopup == null)
-               {
                        __pPlayListPickerPopup = new (std::nothrow) PlayListPickerPopup();
-                       __pPlayListPickerPopup->Initialize();
+                       __pPlayListPickerPopup->Initialize(this, pDataList);
+                       //__pPlayListPickerPopup->SetCollectedContent(pDataList);
+                       __pPlayListPickerPopup->SetShowState(true);
+                       __pPlayListPickerPopup->Show();
                }
-               __pPlayListPickerPopup->SetCollectedContent(pDataList);
-               __pPlayListPickerPopup->SetShowState(true);
-               __pPlayListPickerPopup->Show();
                break;
-       }
+
        case IDA_CONTEXT_SHARE:
-       {
-               currentContentIndex = __pPlayerPresentationModel->GetCurrentContentIndex();
-               contentPath = __pPlayerPresentationModel->GetContentPath(currentContentIndex);
+               {
+                       currentContentIndex = __pPlayerPresentationModel->GetCurrentContentIndex();
+                       contentPath = __pPlayerPresentationModel->GetContentPath(currentContentIndex);
 
-               Tizen::Base::Collection::ArrayList* pDataList = new (std::nothrow) ArrayList();
-               pDataList->Construct();
+                       Tizen::Base::Collection::ArrayList* pDataList = new (std::nothrow) ArrayList();
+                       pDataList->Construct();
 
-               if (__pSharePopup == null)
-               {
-                       __pSharePopup = new (std::nothrow) SharePopup();
-                       __pSharePopup->Initialize();
-               }
-               pDataList->Add(*(new String(*contentPath)));
-               __pSharePopup->SetArguments(pDataList);
+                       if (__pSharePopup == null)
+                       {
+                               __pSharePopup = new (std::nothrow) SharePopup();
+                               __pSharePopup->Initialize();
+                       }
+                       pDataList->Add(*(new (std::nothrow) String(*contentPath)));
+                       __pSharePopup->SetArguments(pDataList);
 
-               __pSharePopup->SetShowState(true);
-               __pSharePopup->Show();
+                       __pSharePopup->SetShowState(true);
+                       __pSharePopup->Show();
+               }
                break;
-       }
-       case IDA_CONTEXT_SET:
-       {
-               currentContentIndex = __pPlayerPresentationModel->GetCurrentContentIndex();
-               contentPath = __pPlayerPresentationModel->GetContentPath(currentContentIndex);
 
-               if (__pSetAsPopup == null)
+       case IDA_CONTEXT_SET:
                {
-                       __pSetAsPopup = new (std::nothrow) SetAsPopup();
-                       __pSetAsPopup->Initialize();
+                       currentContentIndex = __pPlayerPresentationModel->GetCurrentContentIndex();
+                       contentPath = __pPlayerPresentationModel->GetContentPath(currentContentIndex);
+
+                       if (__pSetAsPopup == null)
+                       {
+                               __pSetAsPopup = new (std::nothrow) SetAsPopup();
+                               __pSetAsPopup->Initialize();
+                       }
+                       __pSetAsPopup->SetCurrentContentPath(contentPath);
+                       __pSetAsPopup->SetShowState(true);
+                       __pSetAsPopup->Show();
                }
-               __pSetAsPopup->SetCurrentContentPath(contentPath);
-               __pSetAsPopup->SetShowState(true);
-               __pSetAsPopup->Show();
-               break;
                break;
-       }
+
        case IDA_CONTEXT_SOUND_PATH:
-       {
-               if (__pSoundPathPopup == null)
                {
-                       __pSoundPathPopup = new (std::nothrow) SoundPathPopup();
-                       __pSoundPathPopup->Initialize();
+                       if (__pSoundPathPopup == null)
+                       {
+                               __pSoundPathPopup = new (std::nothrow) SoundPathPopup();
+                               __pSoundPathPopup->Initialize();
+                       }
+                       __pSoundPathPopup->ShowPopup(true);
                }
-               __pSoundPathPopup->ShowPopup(true);
                break;
-       }
+
        case IDA_CONTEXT_DETAILS:
-       {
-               pSceneManager->GoForward(ForwardSceneTransition(IDSCN_CONTENT_DETAIL));
+               {
+                       pSceneManager->GoForward(ForwardSceneTransition(IDSCN_CONTENT_DETAIL));
+               }
                break;
-       }
+
        case IDA_CONTEXT_SETTINGS:
-       {
-               SettingPresentationModel::GetInstance()->InitializeSettingValue();
-               pSceneManager->GoForward(ForwardSceneTransition(IDSCN_MUSIC_SETTING));
+               {
+                       SettingPresentationModel::GetInstance()->InitializeSettingValue();
+                       pSceneManager->GoForward(ForwardSceneTransition(IDSCN_MUSIC_SETTING));
+               }
                break;
-       }
+
        default:
-       {
                break;
        }
-       }
+       AppLogDebug("EXIT");
 }
 
 void
 PlayerForm::OnKeyPressed(const Tizen::Ui::Control& source, Tizen::Ui::KeyCode keyCode)
 {
-       switch(keyCode)
+       AppLogDebug("ENTER");
+       switch (keyCode)
        {
        case KEY_SIDE_UP:
-       {
-               if (__pVolumePanel == null)
                {
-                       InitializeVolumeBar();
-               }
+                       if (__pVolumePanel == null)
+                       {
+                               InitializeVolumeBar();
+                       }
 
-               __pVolumePanel->SetShowState(true);
-               __pPlayerPresentationModel->SetVolume(__pPlayerPresentationModel->GetVolume() + 1);
-               __pVolumeSlider->SetValue(__pPlayerPresentationModel->GetVolume());
-               __pVolumeSlider->Invalidate(true);
+                       __pVolumePanel->SetShowState(true);
+                       __pPlayerPresentationModel->SetVolume(__pPlayerPresentationModel->GetVolume() + 1);
+                       __pVolumeSlider->SetValue(__pPlayerPresentationModel->GetVolume());
+                       __pVolumeSlider->Invalidate(true);
+               }
                break;
-       }
+
        case KEY_SIDE_DOWN:
-       {
-               if (__pVolumePanel == null)
                {
-                       InitializeVolumeBar();
-               }
+                       if (__pVolumePanel == null)
+                       {
+                               InitializeVolumeBar();
+                       }
 
-               __pVolumePanel->SetShowState(true);
-               __pPlayerPresentationModel->SetVolume(__pPlayerPresentationModel->GetVolume() - 1);
-               __pVolumeSlider->SetValue(__pPlayerPresentationModel->GetVolume());
-               __pVolumeSlider->Invalidate(true);
+                       __pVolumePanel->SetShowState(true);
+                       __pPlayerPresentationModel->SetVolume(__pPlayerPresentationModel->GetVolume() - 1);
+                       __pVolumeSlider->SetValue(__pPlayerPresentationModel->GetVolume());
+                       __pVolumeSlider->Invalidate(true);
+               }
                break;
-       }
+
        default:
                break;
        }
+       AppLogDebug("EXIT");
 }
 
 void
 PlayerForm::OnKeyReleased(const Tizen::Ui::Control& source, Tizen::Ui::KeyCode keyCode)
 {
-
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 
 void
 PlayerForm::OnKeyLongPressed(const Tizen::Ui::Control& source, Tizen::Ui::KeyCode keyCode)
 {
-
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 
 void
 PlayerForm::OnTouchLongPressed(const Control& source, const Point& currentPosition, const TouchEventInfo& touchInfo)
 {
-       if(source.Equals(*__pForwardButton) || source.Equals(*__pRewindButton))
+       AppLogDebug("ENTER");
+       if (source.Equals(*__pForwardButton) || source.Equals(*__pRewindButton))
        {
                __isLongPressed = true;
                if (source.Equals(*__pRewindButton))
@@ -1090,12 +1132,15 @@ PlayerForm::OnTouchLongPressed(const Control& source, const Point& currentPositi
        }
        else
        {
+               // Empty statement
        }
+       AppLogDebug("EXIT");
 }
 
 void
 PlayerForm::OnTouchMoved(const Tizen::Ui::Control& source, const Tizen::Graphics::Point& currentPosition, const Tizen::Ui::TouchEventInfo& touchInfo)
 {
+       AppLogDebug("ENTER");
        if (__isAnimationPerformed == true)
        {
                return;
@@ -1115,8 +1160,8 @@ PlayerForm::OnTouchMoved(const Tizen::Ui::Control& source, const Tizen::Graphics
        {
                if (__pPlayerPresentationModel->GetContentListCount() > 1)
                {
-                       while(__pPlayerPresentationModel->IsFileExist(__pPlayerPresentationModel->GetPreviousContentIndex()) == false &&
-                                       __pPlayerPresentationModel->GetContentListCount() > 0)
+                       while (__pPlayerPresentationModel->IsFileExist(__pPlayerPresentationModel->GetPreviousContentIndex()) == false
+                               && __pPlayerPresentationModel->GetContentListCount() > 0)
                        {
                                __pPlayerPresentationModel->RemoveContent(*__pPlayerPresentationModel->GetContentPath(__pPlayerPresentationModel->GetPreviousContentIndex()));
                        }
@@ -1140,8 +1185,8 @@ PlayerForm::OnTouchMoved(const Tizen::Ui::Control& source, const Tizen::Graphics
        {
                if (__pPlayerPresentationModel->GetContentListCount() > 1)
                {
-                       while(__pPlayerPresentationModel->IsFileExist(__pPlayerPresentationModel->GetNextContentIndex()) == false &&
-                                       __pPlayerPresentationModel->GetContentListCount() > 0)
+                       while (__pPlayerPresentationModel->IsFileExist(__pPlayerPresentationModel->GetNextContentIndex()) == false
+                               && __pPlayerPresentationModel->GetContentListCount() > 0)
                        {
                                __pPlayerPresentationModel->RemoveContent(*__pPlayerPresentationModel->GetContentPath(__pPlayerPresentationModel->GetNextContentIndex()));
                        }
@@ -1161,11 +1206,13 @@ PlayerForm::OnTouchMoved(const Tizen::Ui::Control& source, const Tizen::Graphics
                        __isAnimationPerformed = true;
                }
        }
+       AppLogDebug("EXIT");
 }
 
 void
 PlayerForm::OnTouchPressed(const Control& source, const Point& currentPosition, const TouchEventInfo& touchInfo)
 {
+       AppLogDebug("ENTER");
        if (source.Equals(*__pForwardButton) || source.Equals(*__pRewindButton))
        {
                __isLongPressed = false;
@@ -1182,11 +1229,13 @@ PlayerForm::OnTouchPressed(const Control& source, const Point& currentPosition,
                        __pVolumePanel->SetShowState(false);
                }
        }
+       AppLogDebug("EXIT");
 }
 
 void
 PlayerForm::OnTouchReleased(const Control& source, const Point& currentPosition, const TouchEventInfo& touchInfo)
 {
+       AppLogDebug("ENTER");
        if (source.Equals(*__pForwardButton) || source.Equals(*__pRewindButton))
        {
                if (__isLongPressed == true)
@@ -1199,8 +1248,8 @@ PlayerForm::OnTouchReleased(const Control& source, const Point& currentPosition,
                        {
                                if (__pPlayerPresentationModel->GetContentListCount() > 1)
                                {
-                                       while(__pPlayerPresentationModel->IsFileExist(__pPlayerPresentationModel->GetPreviousContentIndex()) == false &&
-                                                       __pPlayerPresentationModel->GetContentListCount() > 0)
+                                       while (__pPlayerPresentationModel->IsFileExist(__pPlayerPresentationModel->GetPreviousContentIndex()) == false
+                                               && __pPlayerPresentationModel->GetContentListCount() > 0)
                                        {
                                                __pPlayerPresentationModel->RemoveContent(*__pPlayerPresentationModel->GetContentPath(__pPlayerPresentationModel->GetPreviousContentIndex()));
                                        }
@@ -1224,8 +1273,8 @@ PlayerForm::OnTouchReleased(const Control& source, const Point& currentPosition,
                        {
                                if (__pPlayerPresentationModel->GetContentListCount() > 1)
                                {
-                                       while(__pPlayerPresentationModel->IsFileExist(__pPlayerPresentationModel->GetNextContentIndex()) == false &&
-                                                       __pPlayerPresentationModel->GetContentListCount() > 0)
+                                       while (__pPlayerPresentationModel->IsFileExist(__pPlayerPresentationModel->GetNextContentIndex()) == false
+                                               && __pPlayerPresentationModel->GetContentListCount() > 0)
                                        {
                                                __pPlayerPresentationModel->RemoveContent(*__pPlayerPresentationModel->GetContentPath(__pPlayerPresentationModel->GetNextContentIndex()));
                                        }
@@ -1249,12 +1298,15 @@ PlayerForm::OnTouchReleased(const Control& source, const Point& currentPosition,
        }
        else
        {
+               // Empty statement
        }
+       AppLogDebug("EXIT");
 }
 
 void
 PlayerForm::PlayAnimation(void)
 {
+       AppLogDebug("ENTER");
        if (AnimationTransaction::GetStatus(__transactionID) == ANIMATION_TRANSACTION_STATUS_STOPPED)
        {
                if (flickDirection == FLICK_DIRECTION_RIGHT)
@@ -1314,19 +1366,23 @@ PlayerForm::PlayAnimation(void)
                }
                else
                {
+                       // Empty statement
                }
-
        }
+       AppLogDebug("EXIT");
 }
 
 void
 PlayerForm::StopAnimation(void)
 {
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 
 void
 PlayerForm::OnAnimationTransactionStarted(int transactionId)
 {
+       AppLogDebug("ENTER");
        __pContentPlayTimer->Cancel();
        AppLogDebug("OnAnimationTransactionStarted");
 }
@@ -1334,21 +1390,23 @@ PlayerForm::OnAnimationTransactionStarted(int transactionId)
 void
 PlayerForm::OnAnimationTransactionStopped(int transactionId)
 {
-       //AppLogDebug("OnAnimationTransactionStopped");
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 
 void
 PlayerForm::OnAnimationTransactionFinished(int transactionId)
 {
-       AppLogDebug("OnAnimationTransactionFinished");
-
+       AppLogDebug("ENTER");
        __pAnimationFinishedTimer->Start(1);
        __pContentPlayTimer->Start(700);
+       AppLogDebug("EXIT");
 }
 
 void
 PlayerForm::OnSliderBarMoved(Tizen::Ui::Controls::Slider& source, int value)
 {
+       AppLogDebug("ENTER");
        if (source.Equals(*__pPlayStateSlider))
        {
                __pPlayerPresentationModel->SetPlayPosition(value);
@@ -1357,11 +1415,13 @@ PlayerForm::OnSliderBarMoved(Tizen::Ui::Controls::Slider& source, int value)
        {
                __pPlayerPresentationModel->SetVolume(value);
        }
+       AppLogDebug("EXIT");
 }
 
 void
 PlayerForm::OnTimerExpired(Tizen::Base::Runtime::Timer& timer)
 {
+       AppLogDebug("ENTER");
        if (&timer == __pAnimationFinishedTimer)
        {
                if (flickDirection == FLICK_DIRECTION_RIGHT)
@@ -1376,7 +1436,7 @@ PlayerForm::OnTimerExpired(Tizen::Base::Runtime::Timer& timer)
 
                        __pPlayerPresentationModel->MovePreviousContent(true);
                }
-               else    if (flickDirection == FLICK_DIRECTION_LEFT)
+               else if (flickDirection == FLICK_DIRECTION_LEFT)
                {
                        Tizen::Ui::Animations::VisualElement* pTempVisualElement = __pAlbumArtElement[ALBUM_ART_IMAGE_PREVIOUS];
                        pTempVisualElement->SetBounds(rectangleNextElement);
@@ -1393,24 +1453,35 @@ PlayerForm::OnTimerExpired(Tizen::Base::Runtime::Timer& timer)
        }
        else
        {
-               __pPlayerPresentationModel->Play(__pPlayerPresentationModel->GetCurrentContentIndex(), MIN_PLAY_STATE_SLIDER_COUNT);
+               if (__pPlayerPresentationModel->GetPlayerState() != PLAYER_STATE_PAUSED)
+               {
+                       __pPlayerPresentationModel->Play(__pPlayerPresentationModel->GetCurrentContentIndex(), MIN_PLAY_STATE_SLIDER_COUNT);
+               }
+               if (__pPlayerPresentationModel->IsFileExist(__pPlayerPresentationModel->GetCurrentContentIndex()) != true)
+               {
+                       SetAddToPlaylistButtonImage(false);
+               }
        }
+       AppLogDebug("EXIT");
 }
 
 int
 PlayerForm::GetItemCount(void)
 {
+       AppLogDebug("ENTER");
        if (__pPlayerPresentationModel == null)
        {
-               return 0;
+               return INIT_VALUE;
        }
+       AppLogDebug("EXIT");
        return __pPlayerPresentationModel->GetContentListCount();
 }
 
 Tizen::Ui::Controls::TableViewItem*
 PlayerForm::CreateItem(int index, int itemWidth)
 {
-       ContentInformationStruct* pContentInfoStruct = __pPlayerPresentationModel->GetContentInfoN(index);
+       AppLogDebug("ENTER");
+       ContentInformation* pContentInfoStruct = __pPlayerPresentationModel->GetContentInfoN(index);
        if (pContentInfoStruct == null)
        {
                return null;
@@ -1446,67 +1517,84 @@ PlayerForm::CreateItem(int index, int itemWidth)
        pItem->AddControl(*pTitleLabel);
        pItem->AddControl(*pArtistLabel);
 
-
        delete pContentInfoStruct;
        pContentInfoStruct = null;
 
+       AppLogDebug("EXIT");
        return pItem;
 }
 
 bool
 PlayerForm::DeleteItem(const int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem)
 {
+       AppLogDebug("ENTER");
        delete pItem;
        pItem = null;
+       AppLogDebug("EXIT");
        return true;
 }
 
-
 void
 PlayerForm::UpdateItem(int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem)
 {
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 
 int
 PlayerForm::GetDefaultItemHeight(void)
 {
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
        return ITEM_HEIGHT;
 }
 
 void
 PlayerForm::OnTableViewItemStateChanged(Tizen::Ui::Controls::TableView& tableView, int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem, Tizen::Ui::Controls::TableViewItemStatus status)
 {
+       AppLogDebug("ENTER");
        SceneManager* pSceneManager = SceneManager::GetInstance();
        AppAssert(pSceneManager);
 
        if (status == TABLE_VIEW_ITEM_STATUS_SELECTED)
        {
                __pPlayerPresentationModel->Play(itemIndex, MIN_PLAY_STATE_SLIDER_COUNT);
+
+               if (__pPlayerPresentationModel->IsFileExist(__pPlayerPresentationModel->GetCurrentContentIndex()) != true)
+               {
+                       SetAddToPlaylistButtonImage(false);
+               }
        }
+       AppLogDebug("EXIT");
 }
 
 void
 PlayerForm::OnTableViewContextItemActivationStateChanged(Tizen::Ui::Controls::TableView& tableView, int itemIndex, Tizen::Ui::Controls::TableViewContextItem* pContextItem, bool activated)
 {
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 
 void
 PlayerForm::OnTableViewItemReordered(Tizen::Ui::Controls::TableView& tableView, int itemIndexFrom, int itemIndexTo)
 {
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 
 void
 PlayerForm::OnFormBackRequested(Tizen::Ui::Controls::Form& source)
 {
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 
 void
 PlayerForm::OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previousSceneId,
-                              const Tizen::Ui::Scenes::SceneId& currentSceneId,
-                              Tizen::Base::Collection::IList* pArgs)
+                                       const Tizen::Ui::Scenes::SceneId& currentSceneId,
+                                       Tizen::Base::Collection::IList* pArgs)
 {
-       AppLogDebug("Start");
-       result r = E_SUCCESS;
+       AppLogDebug("ENTER");
 
        MusicPlayerApp* pMusicPlayerApp = static_cast<MusicPlayerApp*>(MusicPlayerApp::GetInstance());
        TryReturnVoid(pMusicPlayerApp != null, "Unable to cast UiApp to MusicPlayerApp");
@@ -1523,23 +1611,17 @@ PlayerForm::OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previousSceneId,
 
                if (pArgs != null)
                {
-                               __pPlayerPresentationModel->SetContentList(pArgs);
+                       __pPlayerPresentationModel->SetContentList(pArgs);
 
                        int playIndex = (static_cast<Integer*>(pArgs->GetAt(1)))->ToInt();
-                       r = __pPlayerPresentationModel->Play(playIndex, MIN_PLAY_STATE_SLIDER_COUNT);
-
+                       __pPlayerPresentationModel->Play(playIndex, MIN_PLAY_STATE_SLIDER_COUNT);
                        SetRepeatButtonImage(__pPlayerPresentationModel->GetRepeatState());// 0 - 2 (OFF, ONE, ALL)
                        SetShuffleButtonImage(__pPlayerPresentationModel->IsShuffleEnable());// 0 - 1 (OFF, ON)
-                       if (r != E_SUCCESS)
-                       {
-                               SetAddToPlaylistButtonImage(false);
-                       }
                }
        }
        else
        {
                OnPlayStateChanged(__pPlayerPresentationModel->GetPlayerState());
-//             __pPlayerPresentationModel->AddMusicPlayerEventListener(*this);
        }
 
        OrientationStatus orientationStatus = GetOrientationStatus();
@@ -1563,23 +1645,29 @@ PlayerForm::OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previousSceneId,
        }
        else
        {
-               //AppLogDebug("OnSceneActivatedN ???");
+               // Empty statement
        }
 
-       AppLogDebug("End");
+       if (__pPlayerPresentationModel->IsFileExist(__pPlayerPresentationModel->GetCurrentContentIndex()) != true)
+       {
+               SetAddToPlaylistButtonImage(false);
+       }
        Invalidate(true);
+       AppLogDebug("EXIT");
 }
 
 void
 PlayerForm::OnSceneDeactivated(const Tizen::Ui::Scenes::SceneId& currentSceneId,
-                                                                                  const Tizen::Ui::Scenes::SceneId& nextSceneId)
+                                                                                       const Tizen::Ui::Scenes::SceneId& nextSceneId)
 {
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 
 void
 PlayerForm::OnChangedContentList(Tizen::Base::Collection::IList* pArgs)
 {
-       AppLogDebug("Start");
+       AppLogDebug("ENTER");
        MusicPlayerApp* pMusicPlayerApp = static_cast<MusicPlayerApp*>(MusicPlayerApp::GetInstance());
        TryReturnVoid(pMusicPlayerApp != null, "Unable to cast UiApp to MusicPlayerApp");
 
@@ -1612,107 +1700,137 @@ PlayerForm::OnChangedContentList(Tizen::Base::Collection::IList* pArgs)
        }
        else
        {
-               //AppLogDebug("OnSceneActivatedN ???");
+               // Empty statement
        }
 
+       if (__pPlayerPresentationModel->IsFileExist(__pPlayerPresentationModel->GetCurrentContentIndex()) != true)
+       {
+               SetAddToPlaylistButtonImage(false);
+       }
        Invalidate(true);
-       AppLogDebug("End");
+       AppLogDebug("EXIT");
+}
+
+void
+PlayerForm::OnUserEventReceivedN(RequestId requestId, Tizen::Base::Collection::IList* pArgs)
+{
+       AppLogDebug("ENTER");
+       AppLogDebug("OnUserEventReceivedN %d", requestId);
+       if (requestId == ID_DESTORY_PLAY_LIST_PICKER_POPUP)
+       {
+               if (__pPlayListPickerPopup != null)
+               {
+                       delete __pPlayListPickerPopup;
+                       __pPlayListPickerPopup = null;
+               }
+       }
+       AppLogDebug("EXIT");
 }
 
 void
 PlayerForm::OnPlayStateChanged(PlayerState playerState)
 {
-       AppLogDebug("Start");
+       AppLogDebug("ENTER");
+       AppLogDebug("%d", playerState);
        if (playerState == PLAYER_STATE_ERROR)
        {
-               ShowMessageBox();
+               ShowMessageBox(L"file play failed");
+               __pPlayStateSlider->SetEnabled(false);
+               SetAddToPlaylistButtonImage(false);
        }
+       /*else
+       {
+               __pPlayStateSlider->SetEnabled(true);
+               SetAddToPlaylistButtonImage(true);
+       }*/
        SetPlayPauseButtonImage(playerState);
-       AppLogDebug("End");
+       AppLogDebug("EXIT");
 }
 
 void
 PlayerForm::OnPlayContentChanged(int currentContentIndex)
 {
-       AppLogDebug("Start");
+       AppLogDebug("ENTER");
        SetContentInfo(currentContentIndex);
-       AppLogDebug("End");
+       AppLogDebug("EXIT");
 }
 
 void
 PlayerForm::OnPlayContentRemoved(int removedContentIndex)
 {
-       AppLogDebug("Start");
+       AppLogDebug("ENTER");
        int currentIndex = __pPlayerPresentationModel->GetCurrentContentIndex();
        int currentContentCount = __pPlayerPresentationModel->GetContentListCount();
 
-       if ((removedContentIndex == currentIndex - 1) ||
-               (currentIndex == 0 && removedContentIndex == 0) ||
-               (currentIndex == removedContentIndex) ||
-               (currentIndex == __pPlayerPresentationModel->GetPreviousContentIndex()))
+       if ((removedContentIndex == currentIndex - 1)
+               || (currentIndex == 0 && removedContentIndex == 0)
+               || (currentIndex == removedContentIndex)
+               || (currentIndex == __pPlayerPresentationModel->GetPreviousContentIndex()))
        {
                UpdateAnimationAlbumArt(ALBUM_ART_IMAGE_PREVIOUS);
        }
-       else if ((removedContentIndex == currentIndex + 1) ||
-                        (currentIndex == currentContentCount - 1 && removedContentIndex == 0))
+       else if ((removedContentIndex == currentIndex + 1)
+                       || (currentIndex == currentContentCount - 1 && removedContentIndex == 0))
        {
                UpdateAnimationAlbumArt(ALBUM_ART_IMAGE_NEXT);
        }
-       AppLogDebug("End");
+       AppLogDebug("EXIT");
 }
 
 void
 PlayerForm::OnPlayVolumeBarStateChanged(void)
 {
+       AppLogDebug("ENTER");
        if (__pVolumePanel->GetShowState() == true)
        {
                __pVolumePanel->SetShowState(false);
        }
+       AppLogDebug("EXIT");
 }
 
 void
 PlayerForm::OnPlayTimeChanged(const Tizen::Base::String& currentDuration, int currentPosition)
 {
-       AppLogDebug("Start");
+       AppLogDebug("ENTER");
        __pCurrentTimeLabel->SetText(currentDuration);
        __pPlayStateSlider->SetValue(currentPosition);
        __pCurrentTimeLabel->Invalidate(true);
        __pPlayStateSlider->Invalidate(true);
-       AppLogDebug("End");
+       AppLogDebug("EXIT");
 }
 
 void
 PlayerForm::OnAutoOffTimeChanged(int autoOffTime)
 {
-       AppLogDebug("Start");
+       AppLogDebug("ENTER");
        __pPlayerPresentationModel->StartAutoOffTimer(autoOffTime);
-       AppLogDebug("End");
+       AppLogDebug("EXIT");
 }
 
 void
 PlayerForm::OnPlayPresentationModelDestroying(void)
 {
-       AppLogDebug("Start");
+       AppLogDebug("ENTER");
        if (__pPlayerPresentationModel != null)
        {
                __pPlayerPresentationModel = null;
        }
-       AppLogDebug("End");
+       AppLogDebug("EXIT");
 }
 
 result
-PlayerForm::ShowMessageBox(void)
+PlayerForm::ShowMessageBox(const Tizen::Base::String& showText)
 {
+       AppLogDebug("ENTER");
        MessageBox messageBox;
-       messageBox.Construct(L"Error", "file play failed.", MSGBOX_STYLE_NONE, 500);
-
+       messageBox.Construct(L"Error", showText, MSGBOX_STYLE_NONE, 3000);
        int modalResult = 0;
        messageBox.ShowAndWait(modalResult);
 
        SceneManager* pSceneManager = SceneManager::GetInstance();
        AppAssert(pSceneManager);
 //     if (static_cast<MusicPlayerApp*>(MusicPlayerApp::GetInstance())->GetOperationId().Equals(TIZEN_APPCONTROL_OPERATION_PLAY, true)
-//                     || static_cast<MusicPlayerApp*>(MusicPlayerApp::GetInstance())->GetOperationId().Equals(TIZEN_APPCONTROL_OPERATION_VIEW, true))
+//             || static_cast<MusicPlayerApp*>(MusicPlayerApp::GetInstance())->GetOperationId().Equals(TIZEN_APPCONTROL_OPERATION_VIEW, true))
 //     {
 //             UiApp* pApp = UiApp::GetInstance();
 //             pApp->Terminate();
@@ -1729,14 +1847,15 @@ PlayerForm::ShowMessageBox(void)
 //                     pApp->Terminate();
 //             }
        }
+       AppLogDebug("EXIT");
        return E_SUCCESS;
-
 }
 
 void
 PlayerForm::SetContentInfo(int currentContentIndex)
 {
-       ContentInformationStruct* pContentInfoStruct = __pPlayerPresentationModel->GetContentInfoN(currentContentIndex);
+       AppLogDebug("ENTER");
+       ContentInformation* pContentInfoStruct = __pPlayerPresentationModel->GetContentInfoN(currentContentIndex);
        TryReturnVoid(pContentInfoStruct != null, "The currentContentIndex is invalid");
 
        Header* pHeader = GetHeader();
@@ -1771,7 +1890,14 @@ PlayerForm::SetContentInfo(int currentContentIndex)
        }
        else
        {
-               SetAddToPlaylistButtonImage(true);
+               if (__pPlayerPresentationModel->GetPlayerState() != PLAYER_STATE_ERROR)
+               {
+                       if (__pPlayStateSlider->IsEnabled() != true)
+                       {
+                               __pPlayStateSlider->SetEnabled(true);
+                       }
+                       SetAddToPlaylistButtonImage(true);
+               }
        }
 
        Invalidate(true);
@@ -1783,38 +1909,47 @@ PlayerForm::SetContentInfo(int currentContentIndex)
        }
 
        UpdateAnimationAlbumArt(ALBUM_ART_IMAGE_CURRENT);
-       AppLogDebug("End");
+       AppLogDebug("EXIT");
 }
 
 void
 PlayerForm::UpdateAnimationAlbumArt(AlbumArtImage position)
 {
+       AppLogDebug("ENTER");
        Bitmap* pAlbumArtBitmap[ALBUM_ART_IMAGE_CURRENT];
 
-       switch(position)
+       switch (position)
        {
        case ALBUM_ART_IMAGE_CURRENT:
-               pAlbumArtBitmap[ALBUM_ART_IMAGE_CURRENT] = __pPlayerPresentationModel->GetContentAlbumArtN(__pPlayerPresentationModel->GetCurrentContentIndex());
-               pAlbumArtBitmap[ALBUM_ART_IMAGE_PREVIOUS] = __pPlayerPresentationModel->GetContentAlbumArtN(__pPlayerPresentationModel->GetPreviousContentIndex());
-       pAlbumArtBitmap[ALBUM_ART_IMAGE_NEXT] = __pPlayerPresentationModel->GetContentAlbumArtN(__pPlayerPresentationModel->GetNextContentIndex());
+               {
+                       pAlbumArtBitmap[ALBUM_ART_IMAGE_CURRENT] = __pPlayerPresentationModel->GetContentAlbumArtN(__pPlayerPresentationModel->GetCurrentContentIndex());
+                       pAlbumArtBitmap[ALBUM_ART_IMAGE_PREVIOUS] = __pPlayerPresentationModel->GetContentAlbumArtN(__pPlayerPresentationModel->GetPreviousContentIndex());
+                       pAlbumArtBitmap[ALBUM_ART_IMAGE_NEXT] = __pPlayerPresentationModel->GetContentAlbumArtN(__pPlayerPresentationModel->GetNextContentIndex());
+               }
                break;
+
        case ALBUM_ART_IMAGE_PREVIOUS:
-               pAlbumArtBitmap[ALBUM_ART_IMAGE_CURRENT] = null;
-               pAlbumArtBitmap[ALBUM_ART_IMAGE_PREVIOUS] = __pPlayerPresentationModel->GetContentAlbumArtN(__pPlayerPresentationModel->GetPreviousContentIndex());
-               pAlbumArtBitmap[ALBUM_ART_IMAGE_NEXT] = null;
+               {
+                       pAlbumArtBitmap[ALBUM_ART_IMAGE_CURRENT] = null;
+                       pAlbumArtBitmap[ALBUM_ART_IMAGE_PREVIOUS] = __pPlayerPresentationModel->GetContentAlbumArtN(__pPlayerPresentationModel->GetPreviousContentIndex());
+                       pAlbumArtBitmap[ALBUM_ART_IMAGE_NEXT] = null;
+               }
                break;
+
        case ALBUM_ART_IMAGE_NEXT:
-               pAlbumArtBitmap[ALBUM_ART_IMAGE_CURRENT] = null;
-               pAlbumArtBitmap[ALBUM_ART_IMAGE_PREVIOUS] = null;
-               pAlbumArtBitmap[ALBUM_ART_IMAGE_NEXT] = __pPlayerPresentationModel->GetContentAlbumArtN(__pPlayerPresentationModel->GetNextContentIndex());
+               {
+                       pAlbumArtBitmap[ALBUM_ART_IMAGE_CURRENT] = null;
+                       pAlbumArtBitmap[ALBUM_ART_IMAGE_PREVIOUS] = null;
+                       pAlbumArtBitmap[ALBUM_ART_IMAGE_NEXT] = __pPlayerPresentationModel->GetContentAlbumArtN(__pPlayerPresentationModel->GetNextContentIndex());
+               }
                break;
+
        default:
-               return;
+               break;
        }
 
        Canvas* pCanvas = null;
 
-
        if (pAlbumArtBitmap[ALBUM_ART_IMAGE_CURRENT] != null)
        {
                pCanvas = __pAlbumArtElement[ALBUM_ART_IMAGE_CURRENT]->GetCanvasN();
@@ -1856,40 +1991,43 @@ PlayerForm::UpdateAnimationAlbumArt(AlbumArtImage position)
                }
                delete pAlbumArtBitmap[ALBUM_ART_IMAGE_NEXT];
        }
+       AppLogDebug("EXIT");
        return;
 }
 
 void
 PlayerForm::SetRepeatButtonImage(int repeatValue)// 0 - 2 (OFF, ONE, ALL)
 {
+       AppLogDebug("ENTER");
        Bitmap* pOptionRepeatBitmap;
        Bitmap* pOptionRepeatPressBitmap;
 
-       switch(repeatValue)
+       switch (repeatValue)
        {
        case 0:
-       {
-               pOptionRepeatBitmap = ResourceManager::GetBitmapN(L"T02_option_rep_A.png");
-               pOptionRepeatPressBitmap = ResourceManager::GetBitmapN(L"T02_option_rep_A_press.png");
+               {
+                       pOptionRepeatBitmap = ResourceManager::GetBitmapN(L"T02_option_rep_A.png");
+                       pOptionRepeatPressBitmap = ResourceManager::GetBitmapN(L"T02_option_rep_A_press.png");
+               }
                break;
-       }
+
        case 1:
-       {
-               pOptionRepeatBitmap = ResourceManager::GetBitmapN(L"T02_option_rep_1.png");
-               pOptionRepeatPressBitmap = ResourceManager::GetBitmapN(L"T02_option_rep_1_press.png");
+               {
+                       pOptionRepeatBitmap = ResourceManager::GetBitmapN(L"T02_option_rep_1.png");
+                       pOptionRepeatPressBitmap = ResourceManager::GetBitmapN(L"T02_option_rep_1_press.png");
+               }
                break;
-       }
+
        case 2:
-       {
-               pOptionRepeatBitmap = ResourceManager::GetBitmapN(L"T02_option_rep_all.png");
-               pOptionRepeatPressBitmap = ResourceManager::GetBitmapN(L"T02_option_rep_all_press.png");
+               {
+                       pOptionRepeatBitmap = ResourceManager::GetBitmapN(L"T02_option_rep_all.png");
+                       pOptionRepeatPressBitmap = ResourceManager::GetBitmapN(L"T02_option_rep_all_press.png");
+               }
                break;
-       }
+
        default:
-       {
                break;
        }
-       }
        __pRepeatButton->SetNormalBitmap(Point(POINT_X_OPTION_BUTTON_BITMAP, POINT_Y_OPTION_BUTTON_BITMAP), *pOptionRepeatBitmap);
        __pRepeatButton->SetPressedBitmap(Point(POINT_X_OPTION_BUTTON_BITMAP, POINT_Y_OPTION_BUTTON_BITMAP), *pOptionRepeatPressBitmap);
        __pPlayerPresentationModel->SetRepeatMode(repeatValue);
@@ -1898,11 +2036,13 @@ PlayerForm::SetRepeatButtonImage(int repeatValue)// 0 - 2 (OFF, ONE, ALL)
        pOptionRepeatBitmap = null;
        delete pOptionRepeatPressBitmap;
        pOptionRepeatPressBitmap = null;
+       AppLogDebug("EXIT");
 }
 
 void
 PlayerForm::SetShuffleButtonImage(bool shuffleEnable)
 {
+       AppLogDebug("ENTER");
        Bitmap* pOptionShuffleBitmap;
 
        if (shuffleEnable == false)
@@ -1920,11 +2060,13 @@ PlayerForm::SetShuffleButtonImage(bool shuffleEnable)
 
        delete pOptionShuffleBitmap;
        pOptionShuffleBitmap = null;
+       AppLogDebug("EXIT");
 }
 
 void
 PlayerForm::SetAddToPlaylistButtonImage(bool buttonEnable)
 {
+       AppLogDebug("ENTER");
        Bitmap* pOptionAddToPlaylistOnBitmap = ResourceManager::GetBitmapN(L"T02_option_add_playlist.png");
        Bitmap* pColorizedBitmap = null;
 
@@ -1946,13 +2088,16 @@ PlayerForm::SetAddToPlaylistButtonImage(bool buttonEnable)
                __pAddToPlaylistButton->SetNormalBitmap(Point(POINT_X_OPTION_BUTTON_BITMAP, POINT_Y_OPTION_BUTTON_BITMAP), *pOptionAddToPlaylistOnBitmap);
        }
 
+       __pAddToPlaylistButton->Invalidate(true);
        delete pOptionAddToPlaylistOnBitmap;
        pOptionAddToPlaylistOnBitmap = null;
+       AppLogDebug("EXIT");
 }
 
 void
 PlayerForm::SetControlButtonImage(void)
 {
+       AppLogDebug("ENTER");
        Bitmap* pVolumeNormalBitmap = ResourceManager::GetBitmapN(L"T02_controller_icon_volume.png");
        Bitmap* pVolumePressBitmap = ResourceManager::GetBitmapN(L"T02_controller_icon_volume_press.png");
 
@@ -1996,11 +2141,13 @@ PlayerForm::SetControlButtonImage(void)
        pBackNormalBitmap = null;
        delete pBackPressBitmap;
        pBackPressBitmap = null;
+       AppLogDebug("EXIT");
 }
 
 void
 PlayerForm::SetPlayPauseButtonImage(PlayerState playerState)
 {
+       AppLogDebug("ENTER");
        Bitmap* pPlayPauseNormalBitmap;
        Bitmap* pPlayPausePressBitmap;
 
@@ -2026,11 +2173,13 @@ PlayerForm::SetPlayPauseButtonImage(PlayerState playerState)
        pPlayPauseNormalBitmap = null;
        delete pPlayPausePressBitmap;
        pPlayPausePressBitmap = null;
+       AppLogDebug("EXIT");
 }
 
 result
 PlayerForm::InitializeVolumeBar(void)
 {
+       AppLogDebug("ENTER");
        int MediaSoundVolume = 0;
        SettingInfo::GetValue(MEDIA_VOLUME, MediaSoundVolume);
        __pPlayerPresentationModel->SetVolume(MediaSoundVolume);
@@ -2042,7 +2191,7 @@ PlayerForm::InitializeVolumeBar(void)
        Rectangle bounds = GetBounds();
 
        if (orientationStatue == ORIENTATION_STATUS_LANDSCAPE
-                               || orientationStatue == ORIENTATION_STATUS_LANDSCAPE_REVERSE)
+               || orientationStatue == ORIENTATION_STATUS_LANDSCAPE_REVERSE)
        {
                __pVolumePanel->Construct(Rectangle(clientBounds.width - W_HORIZONTAL_PLAYER
                                                                , GetClientAreaBounds().height - H_HORIZONTAL_CONTROLLER_PANEL - H_VOLUME_PANEL
@@ -2058,7 +2207,7 @@ PlayerForm::InitializeVolumeBar(void)
                                                                , GROUP_STYLE_NONE);
        }
        else if (orientationStatue == ORIENTATION_STATUS_PORTRAIT
-                                || orientationStatue == ORIENTATION_STATUS_PORTRAIT_REVERSE)
+                       || orientationStatue == ORIENTATION_STATUS_PORTRAIT_REVERSE)
        {
                __pVolumePanel->Construct(Rectangle(0
                                                                , clientBounds.height - H_CONTROLLER_PANEL - H_VOLUME_PANEL
@@ -2095,5 +2244,6 @@ PlayerForm::InitializeVolumeBar(void)
        delete pVolumeRightIconBitmap;
        pVolumeRightIconBitmap = null;
 
+       AppLogDebug("EXIT");
        return E_SUCCESS;
-}
+}
\ No newline at end of file
index d63efc4..9b82561 100644 (file)
@@ -1,4 +1,4 @@
-//
+//
 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
 //
 // Licensed under the Flora License, Version 1.0 (the License);
 // limitations under the License.
 //
 
+/**
+ * @file               MpMusicPlayerPresentationModel.cpp
+ * @brief              This is the implementation file for MusicPlayerPresentationModel class.
+ */
+
+#include <time.h>
 #include <FBase.h>
 #include <FGraphics.h>
 #include <FIo.h>
+#include <FSystem.h>
 #include <FUi.h>
-#include <time.h>
-#include "FSystem.h"
 #include "MpCommonUtil.h"
 #include "MpIMusicPlayerEventListener.h"
 #include "MpMusicPlayerPresentationModel.h"
 
 using namespace Tizen::App;
 using namespace Tizen::Base;
-using namespace Tizen::Media;
+using namespace Tizen::Base::Collection;
+using namespace Tizen::Base::Runtime;
+using namespace Tizen::Base::Utility;
 using namespace Tizen::Content;
 using namespace Tizen::Graphics;
 using namespace Tizen::Io;
-using namespace Tizen::Ui::Controls;
-using namespace Tizen::Base::Runtime;
-using namespace Tizen::Base::Collection;
-using namespace Tizen::Base::Utility;
+using namespace Tizen::Media;
 using namespace Tizen::System;
-using namespace Tizen::Telephony;
+/*using namespace Tizen::Telephony;*/
+using namespace Tizen::Ui::Controls;
 
 #define BUFFER_INFO_OF_PLAYER  0
 
 static const int PROGRESS_TIMER_DURATION = 250;
 static const int MIN_SLIDER_COUNT = 0;
+static const int MAX_SLIDER_COUNT = 100;
 static const int INIT_X_VALUE = 0;
 static const int INIT_CONTENT_INDEX = -1;
 static const int VOLUMEBAR_INTERVAL = 3000;
 static const int PAUSE_AUTO_OFF_TIME = 1000 * 60 * 2;
 
-
 PlayerPresentationModel* PlayerPresentationModel::pPlayerPresentationModel = null;
 
 PlayerPresentationModel*
 PlayerPresentationModel::GetInstance(void)
 {
-       AppLogDebug("Start");
+       AppLogDebug("ENTER");
        if (pPlayerPresentationModel == null)
        {
                pPlayerPresentationModel = new (std::nothrow) PlayerPresentationModel();
@@ -64,7 +69,7 @@ PlayerPresentationModel::GetInstance(void)
                result r = pPlayerPresentationModel->Construct();
                TryCatch(r == E_SUCCESS, , null, "PlayerPresentationModel instance is not constructed.");
        }
-       AppLogDebug("End");
+       AppLogDebug("EXIT");
        return pPlayerPresentationModel;
 
 CATCH:
@@ -100,19 +105,17 @@ PlayerPresentationModel::PlayerPresentationModel(void)
        , __playposition(MIN_SLIDER_COUNT)
        , __previousPlayerState(PLAYER_STATE_ERROR)
        , __xTimesValue(INIT_X_VALUE)
-       , __pCallManager(null)
+       /*, __pCallManager(null)*/
 {
-       AppLogDebug("Start");
-       AppLogDebug("End");
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 
 PlayerPresentationModel::~PlayerPresentationModel(void)
 {
-       AppLogDebug("Start");
-       //AppLogDebug("~PlayerPresentationModel");
+       AppLogDebug("ENTER");
        result r = E_SUCCESS;
 
-
        if (__repeatMode != CommonUtil::GetValue(REPEAT_MODE))
        {
                CommonUtil::SetValue(REPEAT_MODE, __repeatMode);
@@ -170,56 +173,70 @@ PlayerPresentationModel::~PlayerPresentationModel(void)
 
        if (__pPlayer == null)
        {
-               AppLogDebug("End");
+               AppLogDebug("EXIT");
                        return;
        }
        if (__pPlayer != null)
        {
                PlayerState state = __pPlayer->GetState();
-               switch(state)
+               switch (state)
                {
-                       case PLAYER_STATE_PLAYING:
-                       case PLAYER_STATE_PAUSED:
+               case PLAYER_STATE_PLAYING:
+                       // fall through
+               case PLAYER_STATE_PAUSED:
+                       {
                                r = __pPlayer->Stop();
                                TryLog(r == E_SUCCESS, "[%s] Failed Stop",GetErrorMessage(r));
                                r = __pPlayer->Close();
                                TryLog(r == E_SUCCESS, "[%s] Failed Close",GetErrorMessage(r));
-                               break;
-                       case PLAYER_STATE_ENDOFCLIP:
-                       case PLAYER_STATE_OPENED:
-                       case PLAYER_STATE_STOPPED:
+                       }
+                       break;
+
+               case PLAYER_STATE_ENDOFCLIP:
+                       // fall through
+               case PLAYER_STATE_OPENED:
+                       // fall through                 
+               case PLAYER_STATE_STOPPED:
+                       {
                                r = __pPlayer->Close();
                                TryLog(r == E_SUCCESS, "[%s] Failed Close",GetErrorMessage(r));
-                               break;
-                       case PLAYER_STATE_CLOSED:
-                               break;
-                       default:
-                               break;
+                       }
+                       break;
+
+               case PLAYER_STATE_CLOSED:
+                       {
+                       }
+                       break;
+
+               default:
+                       break;
                }
                delete __pPlayer;
                __pPlayer = null;
        }
-       AppLogDebug("End");
+       AppLogDebug("EXIT");
 }
 
 void
 PlayerPresentationModel::DestroyPlayerPresentationModel(void)
 {
-       AppLogDebug("Start");
-       if(pPlayerPresentationModel != null)
+       AppLogDebug("ENTER");
+       if (pPlayerPresentationModel != null)
        {
                CallOnPlayPresentationModelDestroying();
-               AppLogDebug("End");
+
                delete pPlayerPresentationModel;
                pPlayerPresentationModel = null;
        }
+       AppLogDebug("EXIT");
 }
 
-void
+/*void
 PlayerPresentationModel::OnTelephonyCallStatusChangedN(Tizen::Telephony::CallStatus callStatus, Tizen::Telephony::CallInfo* pCallInfo)
 {
+       AppLogDebug("ENTER");
        AppLogDebug("callStatus : %d", callStatus);
-/*     if (callStatus == CALL_STATUS_IDLE && __audioFocusChanged == true)
+       if (callStatus == CALL_STATUS_IDLE && __audioFocusChanged == true)
        {
                AppLogDebug("callStatus : %d", callStatus);
                if (__pCurrentPlayContentPath->Equals(*GetContentPath(__currentContentIndex)))
@@ -231,18 +248,18 @@ PlayerPresentationModel::OnTelephonyCallStatusChangedN(Tizen::Telephony::CallSta
                        Play(__currentContentIndex, __playposition);
                }
                __audioFocusChanged = false;
-       }*/
-}
+       }
+       AppLogDebug("EXIT");
+}*/
 
 result
 PlayerPresentationModel::Construct(void)
 {
-       AppLogDebug("Start");
+       AppLogDebug("ENTER");
        result r = E_SUCCESS;
 
-       AudioSessionManager::GetInstance()->SetAudioSessionEventListener(this);
-//     AppLogDebug("%s", GetErrorMessage(r));
-       AudioSessionManager::GetInstance()->SetMode(AUDIO_SESSION_MODE_EXCLUSIVE);
+       /*AudioSessionManager::GetInstance()->SetAudioSessionEventListener(this);
+       AudioSessionManager::GetInstance()->SetMode(AUDIO_SESSION_MODE_EXCLUSIVE);*/
 
        __pPlayStateTimer = new (std::nothrow) Timer();
        r = __pPlayStateTimer->Construct(*this);
@@ -273,13 +290,14 @@ PlayerPresentationModel::Construct(void)
        __repeatMode = CommonUtil::GetValue(REPEAT_MODE);
        __shuffleEnable = static_cast<bool>(CommonUtil::GetValue(SHUFFLE_MODE));
 
-       __pCallManager = new (std::nothrow) CallManager();
-       __pCallManager->Construct(*this);
+       /*__pCallManager = new (std::nothrow) CallManager();
+       __pCallManager->Construct(*this);*/
 
        InitializePlayer();
 
-       AppLogDebug("End");
+       AppLogDebug("EXIT");
        return r;
+
 CATCH:
        //AppLogException( "[%s]", GetErrorMessage(r));
        if (__pPlayStateTimer != null)
@@ -323,7 +341,7 @@ CATCH:
 result
 PlayerPresentationModel::InitializePlayer(void)
 {
-       AppLogDebug("Start");
+       AppLogDebug("ENTER");
        result r = E_SUCCESS;
 
        if (__pPlayer != null)
@@ -336,8 +354,9 @@ PlayerPresentationModel::InitializePlayer(void)
        r = __pPlayer->Construct(*this, BUFFER_INFO_OF_PLAYER);
        TryCatch(r == E_SUCCESS, r = E_OUT_OF_MEMORY, "Unable to construct Player.\n");
 
-       AppLogDebug("End");
+       AppLogDebug("EXIT");
        return r;
+
 CATCH:
        delete __pPlayer;
        __pPlayer = null;
@@ -348,7 +367,7 @@ CATCH:
 result
 PlayerPresentationModel::StartAutoOffTimer(int autoOffValue)
 {
-       AppLogDebug("Start");
+       AppLogDebug("ENTER");
        result r = E_SUCCESS;
        if (__pAutoOffTimer != null)
        {
@@ -364,11 +383,12 @@ PlayerPresentationModel::StartAutoOffTimer(int autoOffValue)
                        AppLogDebug("%s", GetErrorMessage(r));
                        TryCatch(r == E_SUCCESS, r = E_OUT_OF_MEMORY, "Unable to Start __pAutoOffTimer.\n");
                }
-               AppLogDebug("End");
+               AppLogDebug("EXIT");
                return r;
        }
-       AppLogDebug("End");
+       AppLogDebug("EXIT");
        return r;
+
 CATCH:
        //AppLogException( "[%s]", GetErrorMessage(r));
        return r;
@@ -377,7 +397,8 @@ CATCH:
 void
 PlayerPresentationModel::RemoveContent(const Tizen::Base::String& filePath)
 {
-       TryReturnVoid(__pPlayContentList != null,"There is not a playlist");
+       AppLogDebug("ENTER");
+       TryReturnVoid(__pPlayContentList != null, "There is not a playlist");
        IEnumerator* pEnum = __pPlayContentList->GetEnumeratorN();
        String* pFilePath = null;
        int index = 0;
@@ -412,133 +433,164 @@ PlayerPresentationModel::RemoveContent(const Tizen::Base::String& filePath)
                }
                index++;
        }
+       AppLogDebug("EXIT");
        return;
 }
 
 PlayerState
 PlayerPresentationModel::GetPlayerState(void)
 {
-       AppLogDebug("Start");
+       AppLogDebug("ENTER");
        if (__pPlayer == null)
        {
-               AppLogDebug("End");
+               AppLogDebug("EXIT");
                return PLAYER_STATE_ERROR;
        }
-       AppLogDebug("End");
+       AppLogDebug("EXIT");
        return __pPlayer->GetState();
 }
 
 void
 PlayerPresentationModel::ClosePlayer(void)
 {
-       AppLogDebug("Start");
+       AppLogDebug("ENTER");
        result r = E_SUCCESS;
 
        if (__pPlayer == null)
        {
-               AppLogDebug("End");
+               AppLogDebug("EXIT");
                return;
        }
 
        __previousPlayerState = __pPlayer->GetState();
 
-       switch(__previousPlayerState)
+       switch (__previousPlayerState)
        {
-               case PLAYER_STATE_PLAYING:
-               case PLAYER_STATE_PAUSED:
+       case PLAYER_STATE_PLAYING:
+               // fall through
+       case PLAYER_STATE_PAUSED:
+               {
                        r = __pPlayer->Stop();
-                       TryLog(r == E_SUCCESS, "[%s] Failed Stop",GetErrorMessage(r));
+                       TryLog(r == E_SUCCESS, "[%s] Failed Stop", GetErrorMessage(r));
                        r = __pPlayer->Close();
-                       TryLog(r == E_SUCCESS, "[%s] Failed Close",GetErrorMessage(r));
-                       break;
-               case PLAYER_STATE_OPENED:
-               case PLAYER_STATE_STOPPED:
+                       TryLog(r == E_SUCCESS, "[%s] Failed Close", GetErrorMessage(r));
+               }
+               break;
+
+       case PLAYER_STATE_OPENED:
+               // fall through
+       case PLAYER_STATE_STOPPED:
+               {
                        r = __pPlayer->Close();
-                       TryLog(r == E_SUCCESS, "[%s] Failed Close",GetErrorMessage(r));
-                       break;
-               case PLAYER_STATE_CLOSED:
-                       break;
-               case PLAYER_STATE_ENDOFCLIP:
-                       break;
-               default:
-                       break;
+                       TryLog(r == E_SUCCESS, "[%s] Failed Close", GetErrorMessage(r));
+               }
+               break;
+
+       case PLAYER_STATE_CLOSED:
+               {
+               }
+               break;
+
+       case PLAYER_STATE_ENDOFCLIP:
+               {
+               }
+               break;
+
+       default:
+               break;
        }
-       AppLogDebug("End");
+       AppLogDebug("EXIT");
 }
 
 Tizen::Base::String*
 PlayerPresentationModel::GetPlayContentPath(void)
 {
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
        return __pCurrentPlayContentPath;
 }
 
 Tizen::Base::String*
 PlayerPresentationModel::GetPlayContentTitle(void)
 {
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
        return __pCurrentPlayContentTitle;
 }
 
 Tizen::Base::String*
 PlayerPresentationModel::GetPlayContentArtist(void)
 {
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
        return __pCurrentPlayContentArtist;
 }
 
 Tizen::Graphics::Bitmap*
 PlayerPresentationModel::GetPlayContentThumbnail(void)
 {
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
        return __pCurrentPlayContentThumbnail;
 }
 
 long
 PlayerPresentationModel::GetPlayContentDuration(void)
 {
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
        return __currentPlayContentDuration;
 }
 
 Tizen::Base::String*
 PlayerPresentationModel::GetContentPath(int contentIndex)const
 {
-       AppLogDebug("Start");
+       AppLogDebug("ENTER");
        String* pFilePath = null;
 
        TryReturn(contentIndex >= 0 && contentIndex < __pPlayContentList->GetCount(), null, "contentIndex is invalid.");
        pFilePath = static_cast<String*>(__pPlayContentList->GetAt(contentIndex));
-       AppLogDebug("End");
 
+       AppLogDebug("EXIT");
        return pFilePath;
 }
 
 int
-PlayerPresentationModel::GetPreviousContentIndex(void)const
+PlayerPresentationModel::GetPreviousContentIndex(void) const
 {
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
        return __previousContentIndex;
 }
 
 int
-PlayerPresentationModel::GetCurrentContentIndex(void)const
+PlayerPresentationModel::GetCurrentContentIndex(void) const
 {
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
        return __currentContentIndex;
 }
 
 int
-PlayerPresentationModel::GetNextContentIndex(void)const
+PlayerPresentationModel::GetNextContentIndex(void) const
 {
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
        return __nextContentIndex;
 }
 
-ContentInformationStruct*
+ContentInformation*
 PlayerPresentationModel::GetContentInfoN(int contentIndex)
 {
-       AppLogDebug("Start");
+       AppLogDebug("ENTER");
        Tizen::Base::String contentPath = *static_cast<String*>(__pPlayContentList->GetAt(contentIndex));
 
        if (File::IsFileExist(contentPath) == false)
        {
                return null;
        }
-       ContentInformationStruct* pContentInfoStruct = new ContentInformationStruct;
-       AudioContentInfo* pAudioContentInfo = CommonUtil::GetAudioContentInfo(contentPath);
+       ContentInformation* pContentInfoStruct = new (std::nothrow) ContentInformation();
+       AudioContentInfo* pAudioContentInfo = CommonUtil::GetAudioContentInfoN(contentPath);
        if (pAudioContentInfo != null)
        {
                if (pAudioContentInfo->GetArtist() == null)
@@ -571,7 +623,6 @@ PlayerPresentationModel::GetContentInfoN(int contentIndex)
                if (pAudioMeta == null)
                {
                        delete pContentInfoStruct;
-                       delete pAudioContentInfo;
                        return null;
                }
 
@@ -592,39 +643,39 @@ PlayerPresentationModel::GetContentInfoN(int contentIndex)
                {
                        pContentInfoStruct->TitleName = pAudioMeta->GetTitle();
                }
-               pContentInfoStruct->Duration  = __pPlayer->GetDuration();
+               pContentInfoStruct->Duration = __pPlayer->GetDuration();
 
                delete pAudioMeta;
        }
 
        delete pAudioContentInfo;
-       AppLogDebug("End");
+       AppLogDebug("EXIT");
        return pContentInfoStruct;
 }
 
 Tizen::Graphics::Bitmap*
 PlayerPresentationModel::GetContentAlbumArtN(int contentIndex)
 {
-       AppLogDebug("Start");
+       AppLogDebug("ENTER");
        Bitmap* pAlbumArtBitmap = null;
        pAlbumArtBitmap = CommonUtil::GetContentAlbumArtN(*static_cast<String*>(__pPlayContentList->GetAt(contentIndex)));
        if (pAlbumArtBitmap == null)
        {
                pAlbumArtBitmap = ResourceManager::GetBitmapN(L"34_thumb_07.png");
        }
-       AppLogDebug("End");
+       AppLogDebug("EXIT");
        return pAlbumArtBitmap;
 }
 
 result
 PlayerPresentationModel::Play(int contentIndex, int sliderPosition, bool bPausePlay)
 {
-       AppLogDebug("Start");
+       AppLogDebug("ENTER");
        result r = E_SUCCESS;
 
        if (__seekCompleted == false)
        {
-               AppLogDebug("End");
+               AppLogDebug("EXIT");
                return E_FAILURE;
        }
 
@@ -646,8 +697,8 @@ PlayerPresentationModel::Play(int contentIndex, int sliderPosition, bool bPauseP
                pPath = GetContentPath(contentIndex);
                AppLogDebug("pPath = %ls", pPath->GetPointer());
                AppLogDebug("__pCurrentPlayContentPath = %ls", __pCurrentPlayContentPath->GetPointer());
-               if (__pPlayer->GetState() == PLAYER_STATE_ENDOFCLIP ||
-                       pPath->Equals(*__pCurrentPlayContentPath) == false)
+               if (__pPlayer->GetState() == PLAYER_STATE_ENDOFCLIP
+                       || pPath->Equals(*__pCurrentPlayContentPath) == false)
                {
                        ClosePlayer();
                        InitializeProgress();
@@ -658,57 +709,58 @@ PlayerPresentationModel::Play(int contentIndex, int sliderPosition, bool bPauseP
                        __pCurrentPlayContentPath->Clear();
                        __pCurrentPlayContentPath->Append(pPath->GetPointer());
 
-                       AudioContentInfo* pAudioInfo = CommonUtil::GetAudioContentInfo(*(__pCurrentPlayContentPath));
+                       AudioContentInfo* pAudioInfo = CommonUtil::GetAudioContentInfoN(*(__pCurrentPlayContentPath));
 
                        if (pAudioInfo != null)
                        {
-                               __pCurrentPlayContentTitle = new String(pAudioInfo->GetTitle());
+                               __pCurrentPlayContentTitle = new (std::nothrow) String(pAudioInfo->GetTitle());
                                __pCurrentPlayContentThumbnail = pAudioInfo->GetThumbnailN();
                                if (__pCurrentPlayContentThumbnail == null)
                                {
                                        __pCurrentPlayContentThumbnail = ResourceManager::GetBitmapN(L"34_thumb_07.png");
                                }
-                               __pCurrentPlayContentArtist = new String(pAudioInfo->GetArtist());
+                               __pCurrentPlayContentArtist = new (std::nothrow) String(pAudioInfo->GetArtist());
                                __currentPlayContentDuration = pAudioInfo->GetDuration();
                                if (__currentPlayContentDuration == null)
                                {
-                                       __currentPlayContentDuration  = __pPlayer->GetDuration();
+                                       __currentPlayContentDuration = __pPlayer->GetDuration();
                                }
+                               delete pAudioInfo;
                        }
                        else
                        {
                                Tizen::Content::AudioMetadata* pAudioMeta = Tizen::Content::ContentManagerUtil::GetAudioMetaN(*static_cast<String*>(__pPlayContentList->GetAt(contentIndex)));
                                if (pAudioMeta == null)
                                {
-                                       __pCurrentPlayContentTitle = new String(ResourceManager::GetString(L"IDS_MUSIC_BODY_UNKNOWN"));
-                                       __pCurrentPlayContentArtist = new String(ResourceManager::GetString(L"IDS_MUSIC_BODY_UNKNOWN"));
-                                       __pCurrentPlayContentThumbnail  = ResourceManager::GetBitmapN(L"34_thumb_07.png");
-                                       __currentPlayContentDuration  = __pPlayer->GetDuration();
+                                       __pCurrentPlayContentTitle = new (std::nothrow) String(ResourceManager::GetString(L"IDS_MUSIC_BODY_UNKNOWN"));
+                                       __pCurrentPlayContentArtist = new (std::nothrow) String(ResourceManager::GetString(L"IDS_MUSIC_BODY_UNKNOWN"));
+                                       __pCurrentPlayContentThumbnail = ResourceManager::GetBitmapN(L"34_thumb_07.png");
+                                       __currentPlayContentDuration = __pPlayer->GetDuration();
                                }
                                else
                                {
-                                       __pCurrentPlayContentTitle = new String(pAudioMeta->GetTitle());
+                                       __pCurrentPlayContentTitle = new (std::nothrow) String(pAudioMeta->GetTitle());
                                        if (__pCurrentPlayContentTitle == null)
                                        {
-                                               __pCurrentPlayContentTitle = new String(ResourceManager::GetString(L"IDS_MUSIC_BODY_UNKNOWN"));
+                                               __pCurrentPlayContentTitle = new (std::nothrow) String(ResourceManager::GetString(L"IDS_MUSIC_BODY_UNKNOWN"));
                                        }
 
-                                       __pCurrentPlayContentArtist = new String(pAudioMeta->GetArtist());
+                                       __pCurrentPlayContentArtist = new (std::nothrow) String(pAudioMeta->GetArtist());
                                        if (__pCurrentPlayContentArtist == null)
                                        {
-                                               __pCurrentPlayContentArtist = new String(ResourceManager::GetString(L"IDS_MUSIC_BODY_UNKNOWN"));
+                                               __pCurrentPlayContentArtist = new (std::nothrow) String(ResourceManager::GetString(L"IDS_MUSIC_BODY_UNKNOWN"));
                                        }
 
                                        __pCurrentPlayContentThumbnail = pAudioMeta->GetThumbnailN();
                                        if (__pCurrentPlayContentThumbnail == null)
                                        {
-                                               __pCurrentPlayContentThumbnail  = ResourceManager::GetBitmapN(L"34_thumb_07.png");
+                                               __pCurrentPlayContentThumbnail = ResourceManager::GetBitmapN(L"34_thumb_07.png");
                                        }
 
-                                       __currentPlayContentDuration  = pAudioMeta->GetDuration();
+                                       __currentPlayContentDuration = pAudioMeta->GetDuration();
                                        if (__currentPlayContentDuration == null)
                                        {
-                                               __currentPlayContentDuration  = __pPlayer->GetDuration();
+                                               __currentPlayContentDuration = __pPlayer->GetDuration();
                                        }
                                }
                        }
@@ -731,7 +783,7 @@ PlayerPresentationModel::Play(int contentIndex, int sliderPosition, bool bPauseP
                                }
                                index++;
                        }
-                       if (__pPlayer->GetState() != PLAYER_STATE_PAUSED)
+                       if (__pPlayer->GetState() == PLAYER_STATE_PLAYING)
                        {
                                return E_SUCCESS;
                        }
@@ -740,19 +792,26 @@ PlayerPresentationModel::Play(int contentIndex, int sliderPosition, bool bPauseP
 
        playerState = __pPlayer->GetState();
 
-       switch(playerState)
+       switch (playerState)
        {
-               case PLAYER_STATE_PLAYING:
+       case PLAYER_STATE_PLAYING:
+               {
                        CallOnPlayContentChanged(__currentContentIndex);
-                       break;
-               case PLAYER_STATE_STOPPED:
-               case PLAYER_STATE_OPENED:
-               case PLAYER_STATE_PAUSED:
-               case PLAYER_STATE_ENDOFCLIP:
+               }
+               break;
+
+       case PLAYER_STATE_STOPPED:
+               // fall through
+       case PLAYER_STATE_OPENED:
+               // fall through
+       case PLAYER_STATE_PAUSED:
+               // fall through
+       case PLAYER_STATE_ENDOFCLIP:
+               {
                        if (__pPauseAutoOffTimer != null)
                        {
                                r = __pPauseAutoOffTimer->Cancel();
-                               TryLog(r == E_SUCCESS, "__pPauseAutoOffTimer cancel failed\n(%s)",GetErrorMessage(r));
+                               TryLog(r == E_SUCCESS, "__pPauseAutoOffTimer cancel failed\n(%s)", GetErrorMessage(r));
                        }
                        if (__pPlayStateTimer != null)
                        {
@@ -776,24 +835,32 @@ PlayerPresentationModel::Play(int contentIndex, int sliderPosition, bool bPauseP
 
                        currentDuration = CommonUtil::GetFormatDate(__pPlayer->GetPosition());
                        CallOnPlayTimeChanged(currentDuration, __playposition);
-                       break;
-               case PLAYER_STATE_ERROR:
+               }
+               break;
+
+       case PLAYER_STATE_ERROR:
+               {
                        AppLogDebug("PlayerState : %d", playerState);
-                       TryCatch(true, , "PLAYER_STATE_ERROR occured.%n");
-                       break;
-               case PLAYER_STATE_CLOSED:
-               case PLAYER_STATE_INITIALIZED:
+                       r = E_FAILURE;
+                       TryCatch(r == E_SUCCESS, , "PLAYER_STATE_ERROR occured.\n");
+               }
+               break;
+
+       case PLAYER_STATE_CLOSED:
+               // fall through
+       case PLAYER_STATE_INITIALIZED:
+               {
                        TryCatch(__pPlayer != null && pPath != null, r = E_FAILURE, "Player is not initialized or pPath is null.");
                        r = __pPlayer->OpenFile(*pPath);
                        TryCatch(r == E_SUCCESS, , "[%ls] OpenFile failed\n(%s).", pPath->GetPointer(), GetErrorMessage(r));
 
                        if ((__previousPlayerState == PLAYER_STATE_PLAYING) || (__previousPlayerState == PLAYER_STATE_ENDOFCLIP)
-                                       || (__previousPlayerState == PLAYER_STATE_INITIALIZED))
+                               || (__previousPlayerState == PLAYER_STATE_INITIALIZED))
                        {
                                if (__pPauseAutoOffTimer != null)
                                {
                                        r = __pPauseAutoOffTimer->Cancel();
-                                       TryLog(r == E_SUCCESS, "__pPauseAutoOffTimer cancel failed\n(%s)",GetErrorMessage(r));
+                                       TryLog(r == E_SUCCESS, "__pPauseAutoOffTimer cancel failed\n(%s)", GetErrorMessage(r));
                                }
                                if (__pPlayStateTimer != null)
                                {
@@ -825,28 +892,31 @@ PlayerPresentationModel::Play(int contentIndex, int sliderPosition, bool bPauseP
 
                        currentDuration = CommonUtil::GetFormatDate(__pPlayer->GetPosition());
                        CallOnPlayTimeChanged(currentDuration, __playposition);
-                       break;
-               case PLAYER_STATE_OPENING:
-                       break;
-               default:
-                       break;
+               }
+               break;
+
+       case PLAYER_STATE_OPENING:
+               {
+               }
+               break;
+
+       default:
+               break;
        }
 
        CallOnPlayStateChanged(__pPlayer->GetState());
-       AppLogDebug("End");
+       AppLogDebug("EXIT");
        return E_SUCCESS;
 
 CATCH:
-//     Pause();
        CallOnPlayStateChanged(PLAYER_STATE_ERROR);
-       CallOnPlayContentChanged(__currentContentIndex);
        return E_FAILURE;
 }
 
 void
 PlayerPresentationModel::Pause(void)
 {
-       AppLogDebug("Start");
+       AppLogDebug("ENTER");
        result r = E_SUCCESS;
        PlayerState playerState = __pPlayer->GetState() ;
        AppLogDebug("%d", playerState);
@@ -867,8 +937,9 @@ PlayerPresentationModel::Pause(void)
                }
        }
        CallOnPlayStateChanged(__pPlayer->GetState());
-       AppLogDebug("End");
+       AppLogDebug("EXIT");
        return;
+
 CATCH:
        //AppLogException("[%ls]", GetErrorMessage(r));
        return;
@@ -877,7 +948,7 @@ CATCH:
 void
 PlayerPresentationModel::MovePreviousContent(bool forceMove)
 {
-       AppLogDebug("Start");
+       AppLogDebug("ENTER");
        result r = E_SUCCESS;
        String currentDuration = null;
 
@@ -889,7 +960,7 @@ PlayerPresentationModel::MovePreviousContent(bool forceMove)
                __playposition = MIN_SLIDER_COUNT;
                currentDuration = CommonUtil::GetFormatDate(__pPlayer->GetPosition());
                CallOnPlayTimeChanged(currentDuration, __playposition);
-               AppLogDebug("End");
+               AppLogDebug("EXIT");
                return;
        }
 
@@ -899,7 +970,7 @@ PlayerPresentationModel::MovePreviousContent(bool forceMove)
 /*     if(IsShuffleEnable())
        {
                srand(int(time(NULL)));
-               __currentContentIndex = rand()%__pPlayContentList->GetCount();
+               __currentContentIndex = rand() % __pPlayContentList->GetCount();
        }
        else
        {
@@ -915,7 +986,6 @@ PlayerPresentationModel::MovePreviousContent(bool forceMove)
                __removedContentIndex = INIT_CONTENT_INDEX;
        }*/
 
-
        __currentContentIndex = __previousContentIndex;
        GenerateNextIndex();
        __removedContentIndex = INIT_CONTENT_INDEX;
@@ -923,11 +993,17 @@ PlayerPresentationModel::MovePreviousContent(bool forceMove)
        if (__pPlayContentList->GetCount() > 0)
        {
                CallOnPlayContentChanged(__currentContentIndex);
+               if (GetPlayerState() == PLAYER_STATE_PAUSED)
+               {
+                       __pPlayer->SeekTo(MIN_SLIDER_COUNT);
+                       InitializeProgress();
+               }
        }
 //     Play(__currentContentIndex, MIN_SLIDER_COUNT);
 
-       AppLogDebug("End");
+       AppLogDebug("EXIT");
        return;
+
 CATCH:
        //AppLogException("[%s]", GetErrorMessage(r));
        return;
@@ -936,35 +1012,35 @@ CATCH:
 void
 PlayerPresentationModel::MoveNextContent(void)
 {
-       AppLogDebug("Start");
+       AppLogDebug("ENTER");
 //     String currentDuration = null;
 
 //     ClosePlayer();
 //     InitializeProgress();
 //     InitializePlayer();
 
-/*     if(IsShuffleEnable())
+/*     if (IsShuffleEnable())
        {
                srand(int(time(NULL)));
-               __currentContentIndex = rand()%__pPlayContentList->GetCount();
+               __currentContentIndex = rand() % __pPlayContentList->GetCount();
        }
        else
        {
-               if(__currentContentIndex == __pPlayContentList->GetCount() - 1 ||
-                               __removedContentIndex == __pPlayContentList->GetCount())
-       {
-               __currentContentIndex = 0;
-       }
-       else
-       {
-                       if(__removedContentIndex != INIT_CONTENT_INDEX)
+               if(__currentContentIndex == __pPlayContentList->GetCount() - 1
+                       || __removedContentIndex == __pPlayContentList->GetCount())
+               {
+                       __currentContentIndex = 0;
+               }
+               else
+               {
+                       if (__removedContentIndex != INIT_CONTENT_INDEX)
                        {
                                __currentContentIndex = __removedContentIndex;
                        }
                        else
                        {
-               __currentContentIndex++;
-       }
+                               __currentContentIndex++;
+                       }
                }
                __removedContentIndex = INIT_CONTENT_INDEX;
        }
@@ -977,17 +1053,22 @@ PlayerPresentationModel::MoveNextContent(void)
        if (__pPlayContentList->GetCount() > 0)
        {
                CallOnPlayContentChanged(__currentContentIndex);
+               if (GetPlayerState() == PLAYER_STATE_PAUSED)
+               {
+                       __pPlayer->SeekTo(MIN_SLIDER_COUNT);
+                       InitializeProgress();
+               }
        }
 //     Play(__currentContentIndex, MIN_SLIDER_COUNT);
 
-       AppLogDebug("End");
+       AppLogDebug("EXIT");
        return;
 }
 
 void
 PlayerPresentationModel::Rewind(void)
 {
-       AppLogDebug("Start");
+       AppLogDebug("ENTER");
        result r = E_SUCCESS;
        if (__pFastRewindTimer != null)
        {
@@ -996,12 +1077,18 @@ PlayerPresentationModel::Rewind(void)
        }
        __playposition = __playposition - __xTimesValue;
 
-       if ((__playposition >= MIN_SLIDER_COUNT) && (__playposition <= __pPlayer->GetDuration()))
+//     if ((__playposition >= MIN_SLIDER_COUNT) && (__playposition <= MAX_SLIDER_COUNT))
        {
                SetPlayPosition(__playposition);
        }
-       AppLogDebug("End");
+       AppLogDebug("__playposition : %d", __playposition);
+       if (__playposition < MIN_SLIDER_COUNT && GetPlayerState() == PLAYER_STATE_PAUSED)
+       {
+               StopForwardRewind();
+       }
+       AppLogDebug("EXIT");
        return;
+
 CATCH:
        //AppLogException("[%ls]", GetErrorMessage(r));
        return;
@@ -1010,7 +1097,7 @@ CATCH:
 void
 PlayerPresentationModel::Forward(void)
 {
-       AppLogDebug("Start");
+       AppLogDebug("ENTER");
        result r = E_SUCCESS;
        if (__pFastForwardTimer != null)
        {
@@ -1019,12 +1106,18 @@ PlayerPresentationModel::Forward(void)
        }
        __playposition = __playposition - __xTimesValue;
 
-       if ((__playposition >= MIN_SLIDER_COUNT) && (__playposition <= __pPlayer->GetDuration()))
+//     if ((__playposition >= MIN_SLIDER_COUNT) && (__playposition <= MAX_SLIDER_COUNT))
        {
                SetPlayPosition(__playposition);
        }
-       AppLogDebug("End");
+       AppLogDebug("__playposition : %d", __playposition);
+       if (__playposition > MAX_SLIDER_COUNT && GetPlayerState() == PLAYER_STATE_PAUSED)
+       {
+               StopForwardRewind();
+       }
+       AppLogDebug("EXIT");
        return;
+
 CATCH:
        //AppLogException("[%ls]", GetErrorMessage(r));
        return;
@@ -1033,45 +1126,45 @@ CATCH:
 void
 PlayerPresentationModel::StopForwardRewind(void)
 {
-       AppLogDebug("Start");
+       AppLogDebug("ENTER");
        result r = E_SUCCESS;
        if (__pFastForwardTimer != null)
        {
                r = __pFastForwardTimer->Cancel();
-               TryLog(r == E_SUCCESS, "[%s] __pFastForwardTimer cancel failed",GetErrorMessage(r));
+               TryLog(r == E_SUCCESS, "[%s] __pFastForwardTimer cancel failed", GetErrorMessage(r));
        }
        if (__pFastRewindTimer != null)
        {
                r = __pFastRewindTimer->Cancel();
-               TryLog(r == E_SUCCESS, "[%s] __pFastRewindTimer cancel failed",GetErrorMessage(r));
+               TryLog(r == E_SUCCESS, "[%s] __pFastRewindTimer cancel failed", GetErrorMessage(r));
        }
        __xTimesValue = INIT_X_VALUE;
-       AppLogDebug("End");
+       AppLogDebug("EXIT");
        return;
 }
 
 void
 PlayerPresentationModel::SetPlayPosition(int playPosition)
 {
-       AppLogDebug("Start");
+       AppLogDebug("ENTER");
        result r = E_SUCCESS;
        String currentDuration = null;
 
-       if ((playPosition >= MIN_SLIDER_COUNT) && (playPosition <= TIMER_INTERVAL) && __seekCompleted == true)
+       if (/*(playPosition >= MIN_SLIDER_COUNT) && (playPosition <= TIMER_INTERVAL) &&*/ __seekCompleted == true)
        {
                if (GetPlayerState() == PLAYER_STATE_PLAYING || GetPlayerState() == PLAYER_STATE_PAUSED)
                {
-                       if (playPosition > TIMER_INTERVAL)
+                       if (playPosition >= MAX_SLIDER_COUNT)
                        {
                                r = __pPlayer->SeekTo(__pPlayer->GetDuration());
                                TryCatch(r == E_SUCCESS, , "__pPlayer seekto failed..\n");
-                               StopForwardRewind();
-                               __seekCompleted = false;
-                               return;
+//                             StopForwardRewind();
+//                             __seekCompleted = false;
+//                             return;
                        }
-                       else if (playPosition == TIMER_INTERVAL)
+                       else if (playPosition <= MIN_SLIDER_COUNT)
                        {
-                               r = __pPlayer->SeekTo(__pPlayer->GetDuration());
+                               r = __pPlayer->SeekTo(MIN_SLIDER_COUNT);
                                TryCatch(r == E_SUCCESS, , "__pPlayer seekto failed..\n");
                        }
                        else
@@ -1089,12 +1182,13 @@ PlayerPresentationModel::SetPlayPosition(int playPosition)
                else
                {
                        __playposition = playPosition;
-                       currentDuration = CommonUtil::GetFormatDate(playPosition * TIMER_INTERVAL);
+                       currentDuration = CommonUtil::GetFormatDate(playPosition * (__currentPlayContentDuration / TIMER_INTERVAL));
                        CallOnPlayTimeChanged(currentDuration, __playposition);
                        __seekCompleted = true;
                }
        }
        return;
+
 CATCH:
        //AppLogException( "[%s]", GetErrorMessage(r));
        if (__pPlayer->GetDuration() > MIN_SLIDER_COUNT)
@@ -1103,20 +1197,22 @@ CATCH:
                CallOnPlayTimeChanged(currentDuration, __playposition);
        }
        __seekCompleted = false;
-       AppLogDebug("End");
+       AppLogDebug("EXIT");
        return;
 }
 
 int
 PlayerPresentationModel::GetPlayPosition(void)
 {
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
        return __playposition;
 }
 
 result
 PlayerPresentationModel::SetContentList(IList* pArgs)
 {
-       AppLogDebug("Start");
+       AppLogDebug("ENTER");
        result r = E_SUCCESS;
        String* temp = null;
 
@@ -1161,7 +1257,7 @@ PlayerPresentationModel::SetContentList(IList* pArgs)
                }
        }
 
-       AppLogDebug("End");
+       AppLogDebug("EXIT");
        return r;
 
 CATCH:
@@ -1177,30 +1273,30 @@ CATCH:
 int
 PlayerPresentationModel::GetContentListCount(void)const
 {
-       AppLogDebug("Start");
+       AppLogDebug("ENTER");
        if (__pPlayContentList != null)
        {
-               AppLogDebug("End");
+               AppLogDebug("EXIT");
                return __pPlayContentList->GetCount();
        }
        else
        {
-               AppLogDebug("End");
-               return 0;
+               AppLogDebug("EXIT");
+               return INIT_VALUE;
        }
 }
 
 result
 PlayerPresentationModel::SetVolume(int volume)
 {
-       AppLogDebug("Start");
+       AppLogDebug("ENTER");
        String key(MEDIA_VOLUME);
        result r = E_SUCCESS;
 
        if (__pVolumeBarStateTimer != null)
        {
                r = __pVolumeBarStateTimer->Cancel();
-               TryLog(r == E_SUCCESS, "[%s] __pVolumeBarStateTimer cancel failed.",GetErrorMessage(r));
+               TryLog(r == E_SUCCESS, "[%s] __pVolumeBarStateTimer cancel failed.", GetErrorMessage(r));
                r = __pVolumeBarStateTimer->Start(VOLUMEBAR_INTERVAL);
                TryCatch(r == E_SUCCESS, r = E_OUT_OF_MEMORY, "Unable to Start __pVolumeBarStateTimer.\n");
        }
@@ -1209,8 +1305,9 @@ PlayerPresentationModel::SetVolume(int volume)
        {
                SettingInfo::SetValue(key, volume);
        }
-       AppLogDebug("End");
+       AppLogDebug("EXIT");
        return r;
+
 CATCH:
        //AppLogException("[%ls]", GetErrorMessage(r));
        return r;
@@ -1219,19 +1316,19 @@ CATCH:
 int
 PlayerPresentationModel::GetVolume(void)
 {
-       AppLogDebug("Start");
+       AppLogDebug("ENTER");
        int volume = 0;
        String key(MEDIA_VOLUME);
        SettingInfo::GetValue(key, volume);
-       AppLogDebug("End");
+       AppLogDebug("EXIT");
        return volume;
 }
 
 void
 PlayerPresentationModel::SetShuffleEnable(bool shuffleEnable)
 {
-/*     AppLogDebug("Start");
-       int __totalCount = 0;
+       AppLogDebug("ENTER");
+/*     int __totalCount = 0;
 
        if (__pPlayContentList != null)
        {
@@ -1240,12 +1337,14 @@ PlayerPresentationModel::SetShuffleEnable(bool shuffleEnable)
 
        if (shuffleEnable == true)
        {// 0 - 1 (OFF, ON)
-               int nDust,nSour,nTemp;
+               int nDust;
+               int nSour;
+               int nTemp;
                srand(int(time(NULL)));
-               for(int i = 0; i < __totalCount; i++)
+               for (int i = 0; i < __totalCount; i++)
                {
-                       nDust = rand()%__totalCount;
-                       nSour = rand()%__totalCount;
+                       nDust = rand() % __totalCount;
+                       nSour = rand() % __totalCount;
 
                        nTemp = __pPlayContentIndexOrder[nDust];
                        __pPlayContentIndexOrder[nDust] = __pPlayContentIndexOrder[nSour];
@@ -1266,30 +1365,36 @@ PlayerPresentationModel::SetShuffleEnable(bool shuffleEnable)
        {
                int currentIndex = __currentContentIndex;
                __currentContentIndex = __pPlayContentIndexOrder[currentIndex] - 1;
-               for(int i=0;i<__totalCount;i++)
+               for (int i=0; i<__totalCount; i++)
                {
                        __pPlayContentIndexOrder[i]=i + 1;
                }
        }*/
        __shuffleEnable = shuffleEnable;
        GenerateNextIndex();
+       AppLogDebug("EXIT");
 }
 
 void
 PlayerPresentationModel::SetRepeatMode(int repeatMode)
 {
+       AppLogDebug("ENTER");
        __repeatMode = repeatMode;
+       AppLogDebug("EXIT");
 }
 
 bool
 PlayerPresentationModel::IsShuffleEnable(void)
 {
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
        return __shuffleEnable;
 }
 
 bool
-PlayerPresentationModel::IsFileExist(int contentIndex)const
+PlayerPresentationModel::IsFileExist(int contentIndex) const
 {
+       AppLogDebug("ENTER");
        TryReturn(contentIndex >= 0 && contentIndex < __pPlayContentList->GetCount(), false, "contentIndex is invalid.")
        String* pFilePath = GetContentPath(contentIndex);
 
@@ -1298,36 +1403,39 @@ PlayerPresentationModel::IsFileExist(int contentIndex)const
        result r = file.Construct(*pFilePath, "r");
        TryReturn(r == E_SUCCESS, false, "File construct was failed.")
 
+       AppLogDebug("EXIT");
        return file.IsFileExist(*pFilePath);
 }
 
 int
 PlayerPresentationModel::GetRepeatState(void)
 {
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
        return __repeatMode;
 }
 
 String
 PlayerPresentationModel::GetFileName(String* pFilePath)
 {
-       AppLogDebug("Start");
+       AppLogDebug("ENTER");
        String path = Tizen::Io::File::GetFileName(*pFilePath);
        String strRemoveTemp = IDS_BLANK;
        int removeIndex = -1 ;
        path.LastIndexOf(IDS_PERIOD, path.GetLength() - 1, removeIndex);
-       path.SubString(removeIndex + 1,strRemoveTemp);
+       path.SubString(removeIndex + 1, strRemoveTemp);
        String strTemp = IDS_BLANK;
 
        path.Remove(removeIndex, strRemoveTemp.GetLength() + 1);
-       path.SubString(0,strTemp);
-       AppLogDebug("End");
+       path.SubString(0, strTemp);
+       AppLogDebug("EXIT");
        return strTemp;
 }
 
 void
 PlayerPresentationModel::InitializeProgress(void)
 {
-       AppLogDebug("Start");
+       AppLogDebug("ENTER");
        result r = E_SUCCESS;
 
        String currentDuration = null;
@@ -1341,62 +1449,63 @@ PlayerPresentationModel::InitializeProgress(void)
        }
 
        if (__pPlayStateTimer != null /*&& __previousPlayerState != PLAYER_STATE_INITIALIZED*/
-                       && __previousPlayerState != PLAYER_STATE_PAUSED
-                       && __previousPlayerState != PLAYER_STATE_CLOSED)
+               && __previousPlayerState != PLAYER_STATE_PAUSED
+               && __previousPlayerState != PLAYER_STATE_CLOSED)
        {
                r = __pPlayStateTimer->Cancel();
-               TryLog(r == E_SUCCESS, "[%s] __pPlayStateTimer cancel failed.",GetErrorMessage(r));
+               TryLog(r == E_SUCCESS, "[%s] __pPlayStateTimer cancel failed.", GetErrorMessage(r));
        }
        __playposition = MIN_SLIDER_COUNT;
+       __seekCompleted = true;
+       __xTimesValue = INIT_VALUE;
        CallOnPlayTimeChanged(currentDuration, __playposition);
-       AppLogDebug("End");
+       AppLogDebug("EXIT");
        return;
 }
 
 void
 PlayerPresentationModel::UpdateContentDB(void)
 {
-       AppLogDebug("Start");
+       AppLogDebug("ENTER");
        Tizen::Base::String contentPath = *static_cast<String*>(__pPlayContentList->GetAt(__currentContentIndex));
        if (File::IsFileExist(contentPath) == false)
        {
+               AppLogDebug("File not exist(%ls)", contentPath.GetPointer());
                return;
        }
-       AudioContentInfo* pAudioContentInfo = CommonUtil::GetAudioContentInfo(contentPath);
-       if (pAudioContentInfo == null)
+
+       ContentId contentId = CommonUtil::GetContentId(contentPath);
+       if (IsFailed(GetLastResult()))
        {
-               AppLogDebug("UpdateContentDB failed. pAudioContentInfo is null.");
-               AppLogDebug("End");
+               AppLogDebug("CommonUtil::GetContentId(%ls) failed", contentPath.GetPointer());
                return;
        }
 
-       Tizen::Base::String contentId = null;
        DateTime playTime;
        Tizen::System::SystemTime::GetCurrentTime(Tizen::System::TIME_MODE_STANDARD, playTime);
        Tizen::Base::String playTimeString = playTime.ToString();
 
        PlaylistDB* playlistDB = new (std::nothrow) PlaylistDB();
        playlistDB->CreatePlaylistDatabase();
-       contentId = pAudioContentInfo->GetContentId().ToString();
 
-       ArrayList* pTempList = new ArrayList();
+       ArrayList* pTempList = new (std::nothrow) ArrayList();
        pTempList->Construct();
 
        int playCount = 0;
-
-       if (playlistDB->Read(contentId) != E_KEY_ALREADY_EXIST)
+       String contentIdString = contentId.ToString();
+       if (playlistDB->Read(contentIdString) != E_KEY_ALREADY_EXIST)
        {
-               playlistDB->Insert(contentId, playCount + 1, playTimeString);
+               playlistDB->Insert(contentIdString, playCount + 1, playTimeString);
        }
        else
        {
-               pTempList = playlistDB->ReadValueN(contentId);
+               pTempList = playlistDB->ReadValueN(contentIdString);
                if (pTempList != null)
                {
                        playCount = static_cast<Integer*>(pTempList->GetAt(0))->ToInt();
                        //AppLogDebug("playCount : %d", playCount);
                }
-               playlistDB->Update(contentId, playCount + 1, playTimeString);
+               playlistDB->Update(contentIdString, playCount + 1, playTimeString);
        }
 
        delete playlistDB;
@@ -1409,36 +1518,41 @@ PlayerPresentationModel::UpdateContentDB(void)
                pTempList = null;
        }
 
-       AppLogDebug("End");
+       AppLogDebug("EXIT");
 }
 
 void
 PlayerPresentationModel::GenerateNextIndex(void)
 {
-       if(IsShuffleEnable())
+       AppLogDebug("ENTER");
+       if (IsShuffleEnable())
        {
                int totalCount = __pPlayContentList->GetCount();
 
-               if(totalCount < 2)
+               if (totalCount < 2)
                {
                        __previousContentIndex = 0;
                        __nextContentIndex = 0;
                }
                else
                {
-               srand(int(time(NULL)));
-                       __previousContentIndex = rand()%totalCount;
-               while(__previousContentIndex == __currentContentIndex)
-                               __previousContentIndex = rand()%totalCount;
+                       srand(int(time(NULL)));
+                       __previousContentIndex = rand() % totalCount;
+                       while (__previousContentIndex == __currentContentIndex)
+                       {
+                               __previousContentIndex = rand() % totalCount;
+                       }
 
-                       __nextContentIndex = rand()%totalCount;
-               while(__nextContentIndex == __currentContentIndex)
-                               __nextContentIndex = rand()%totalCount;
+                       __nextContentIndex = rand() % totalCount;
+                       while (__nextContentIndex == __currentContentIndex)
+                       {
+                               __nextContentIndex = rand() % totalCount;
+                       }
                }
        }
        else
        {
-               if(__pPlayContentList->GetCount() == 0)
+               if (__pPlayContentList->GetCount() == 0)
                {
                        __previousContentIndex = 0;
                        __nextContentIndex = 0;
@@ -1454,18 +1568,20 @@ PlayerPresentationModel::GenerateNextIndex(void)
                        __previousContentIndex = __currentContentIndex - 1;
                }
 
-               if(__currentContentIndex == __pPlayContentList->GetCount() - 1 ||
-                               __removedContentIndex == __pPlayContentList->GetCount())
+               if (__currentContentIndex == __pPlayContentList->GetCount() - 1
+                       || __removedContentIndex == __pPlayContentList->GetCount())
                {
                        __nextContentIndex = 0;
                }
                else
                {
-                       if(__removedContentIndex != INIT_CONTENT_INDEX)
+                       if (__removedContentIndex != INIT_CONTENT_INDEX)
                        {
                                __nextContentIndex = __previousContentIndex + 1;
                                if (__nextContentIndex > __pPlayContentList->GetCount() - 1)
+                               {
                                        __nextContentIndex = 0;
+                               }
                        }
                        else
                        {
@@ -1473,51 +1589,57 @@ PlayerPresentationModel::GenerateNextIndex(void)
                        }
                }
        }
+       AppLogDebug("EXIT");
 }
 
 void
 PlayerPresentationModel::OnPlayerOpened(result r)
 {
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 
 void
 PlayerPresentationModel::OnPlayerReleased(void)
 {
-       AppLogDebug("Start");
+       AppLogDebug("ENTER");
        if (__pPlayer != null && (__pPlayer->GetState() == PLAYER_STATE_PAUSED))
        {
                Play(__currentContentIndex, MIN_SLIDER_COUNT);
        }
-       AppLogDebug("End");
+       AppLogDebug("EXIT");
 }
 
 void
 PlayerPresentationModel::OnPlayerEndOfClip(void)
 {
-       AppLogDebug("Start");
-       StopForwardRewind();
+       AppLogDebug("ENTER");
+//     StopForwardRewind();
 
-       switch(GetRepeatState())// 0 - 2 (OFF, ONE, ALL)
+       AppLogDebug("GetRepeatState() : %d", GetRepeatState());
+       switch (GetRepeatState())// 0 - 2 (OFF, ONE, ALL)
        {
-               case 1:
+       case 1:
                {
                        while (__pPlayContentList->GetCount() > 0 && IsFileExist(__currentContentIndex) == false)
                        {
                                RemoveContent(*GetContentPath(__currentContentIndex));
                        }
+                       ClosePlayer();
                        InitializeProgress();
+                       InitializePlayer();
                        Play(__currentContentIndex, MIN_SLIDER_COUNT);
-                       break;
                }
-               case 0:
+               break;
+
+       case 0:
                {
                        if (__pPlayContentList->GetCount() - 1 == __currentContentIndex)
                        {
+                               StopForwardRewind();
+                               __pPlayer->SeekTo(MIN_SLIDER_COUNT);
                                InitializeProgress();
                                Pause();
-                               String currentDuration = CommonUtil::GetFormatDate(__pPlayer->GetPosition());
-                               __playposition = MIN_SLIDER_COUNT;
-                               CallOnPlayTimeChanged(currentDuration, __playposition);
                        }
                        else
                        {
@@ -1526,57 +1648,59 @@ PlayerPresentationModel::OnPlayerEndOfClip(void)
                                        RemoveContent(*GetContentPath(GetNextContentIndex()));
                                }
                                MoveNextContent();
+                               InitializeProgress();
                                Play(__currentContentIndex, MIN_SLIDER_COUNT);
                        }
-                       break;
                }
-               case 2:
+               break;
+
+       case 2:
                {
                        while (__pPlayContentList->GetCount() > 0 && IsFileExist(GetNextContentIndex()) == false)
                        {
                                RemoveContent(*GetContentPath(GetNextContentIndex()));
                        }
                        MoveNextContent();
+                       InitializeProgress();
                        Play(__currentContentIndex, MIN_SLIDER_COUNT);
-                       break;
-               }
-               default:
-               {
-                       break;
                }
+               break;
+
+       default:
+               break;
        }
-       AppLogDebug("End");
+       AppLogDebug("EXIT");
 }
 
 void
 PlayerPresentationModel::OnPlayerBuffering(int percent)
 {
-       AppLogDebug("Start");
+       AppLogDebug("ENTER");
        CallOnPlayStateChanged(__pPlayer->GetState());
-       AppLogDebug("End");
+       AppLogDebug("EXIT");
 }
 
 void
-PlayerPresentationModel::OnPlayerErrorOccurred(PlayerErrorReason r )
+PlayerPresentationModel::OnPlayerErrorOccurred(PlayerErrorReason r)
 {
-       AppLogDebug("Start");
+       AppLogDebug("ENTER");
        CallOnPlayStateChanged(__pPlayer->GetState());
-       AppLogDebug("End");
+       AppLogDebug("EXIT");
 }
 
 void
 PlayerPresentationModel::OnPlayerInterrupted(void)
 {
-       AppLogDebug("Start");
+       AppLogDebug("ENTER");
        Pause();
-       AppLogDebug("End");
+       AppLogDebug("EXIT");
        return;
 }
 
 void
 PlayerPresentationModel::OnPlayerSeekCompleted(result r)
 {
-       AppLogDebug("Start");
+       AppLogDebug("ENTER");
        if (r == E_SUCCESS)
        {
                __seekCompleted = true;
@@ -1585,104 +1709,110 @@ PlayerPresentationModel::OnPlayerSeekCompleted(result r)
        {
                __seekCompleted = false;
        }
-       AppLogDebug("End");
+       AppLogDebug("EXIT");
 }
 
 void
 PlayerPresentationModel::OnPlayerAudioFocusChanged(void)
 {
-       AppLogDebug("Start");
+       AppLogDebug("ENTER");
        /*__audioFocusChanged = true;*/
        Pause();
-       AppLogDebug("End");
+       AppLogDebug("EXIT");
 }
 
-void
+/*void
 PlayerPresentationModel::OnAudioSessionInterrupted(void)
 {
-       AppLogDebug("Start");
-       AppLogDebug("End");
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 
 void
 PlayerPresentationModel::OnAudioSessionInterruptReleased(void)
 {
-       AppLogDebug("Start");
-       AppLogDebug("End");
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 
-/*void
+void
 PlayerPresentationModel::OnAudioSessionAudioFocusChanged(void)
 {
-       AppLogDebug("Start");
-       AppLogDebug("End");
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }*/
 
 void
 PlayerPresentationModel::OnTimerExpired(Timer& timer)
 {
-       AppLogDebug("Start");
+       AppLogDebug("ENTER");
        result r = E_SUCCESS;
-       if (__pPlayStateTimer != null && timer.GetHashCode() == __pPlayStateTimer->GetHashCode())
+       if (__pPlayStateTimer == &timer)
        {
                PlayerState playerState = __pPlayer->GetState() ;
                String currentDuration = null;
+               int playDuration = __pPlayer->GetDuration();
 
-               switch(playerState)
+               switch (playerState)
                {
                case PLAYER_STATE_PLAYING:
-               {
-                       r = __pPlayStateTimer->Start(PROGRESS_TIMER_DURATION);
-                       TryCatch(r == E_SUCCESS, , "__pPlayStateTimer start failed..\n");
-                       currentDuration = CommonUtil::GetFormatDate(__pPlayer->GetPosition());
-                       __playposition = static_cast<int>(__pPlayer->GetPosition() / (__pPlayer->GetDuration() / TIMER_INTERVAL));
-                       CallOnPlayTimeChanged(currentDuration, __playposition);
+                       {
+                               TryReturnVoid(playDuration != 0, "playDuration is zero.");
+                               r = __pPlayStateTimer->Start(PROGRESS_TIMER_DURATION);
+                               TryCatch(r == E_SUCCESS, , "__pPlayStateTimer start failed..\n");
+                               TryReturnVoid(__seekCompleted == true, "SeekTo is not complete.");
+                               currentDuration = CommonUtil::GetFormatDate(__pPlayer->GetPosition());
+                               __playposition = static_cast<int>(__pPlayer->GetPosition() / (playDuration / TIMER_INTERVAL));
+                               CallOnPlayTimeChanged(currentDuration, __playposition);
+                       }
                        break;
-               }
+
                case PLAYER_STATE_PAUSED:
-               {
-                       currentDuration = CommonUtil::GetFormatDate(__pPlayer->GetPosition());
-                       __playposition = static_cast<int>(__pPlayer->GetPosition() / (__pPlayer->GetDuration() / TIMER_INTERVAL));
-                       CallOnPlayTimeChanged(currentDuration, __playposition);
+                       {
+                               TryReturnVoid(__seekCompleted == true, "SeekTo is not complete.");
+                               TryReturnVoid(playDuration != 0, "playDuration is zero.");
+                               currentDuration = CommonUtil::GetFormatDate(__pPlayer->GetPosition());
+                               __playposition = static_cast<int>(__pPlayer->GetPosition() / (playDuration / TIMER_INTERVAL));
+                               CallOnPlayTimeChanged(currentDuration, __playposition);
+                       }
                        break;
-               }
+
                default:
-               {
                        break;
                }
-               }
        }
-       else if (__pFastForwardTimer != null && timer.GetHashCode() == __pFastForwardTimer->GetHashCode())
+       else if (__pFastForwardTimer == &timer)
        {
                __xTimesValue--;
                Forward();
        }
-       else if (__pFastRewindTimer != null && timer.GetHashCode() == __pFastRewindTimer->GetHashCode())
+       else if (__pFastRewindTimer == &timer)
        {
                __xTimesValue++;
                Rewind();
        }
-       else if (__pAutoOffTimer != null && timer.GetHashCode() == __pAutoOffTimer->GetHashCode())
+       else if (__pAutoOffTimer == &timer)
        {
                Application::GetInstance()->Terminate();
        }
-       else if (__pPauseAutoOffTimer != null && timer.GetHashCode() == __pPauseAutoOffTimer->GetHashCode())
+       else if (__pPauseAutoOffTimer == &timer)
        {
                Application::GetInstance()->Terminate();
        }
-       else if (__pVolumeBarStateTimer != null && timer.GetHashCode() == __pVolumeBarStateTimer->GetHashCode())
+       else if (__pVolumeBarStateTimer == &timer)
        {
                r = __pVolumeBarStateTimer->Cancel();
-               TryLog(r == E_SUCCESS, "[%s] __pVolumeBarStateTimer cancel Failed.",GetErrorMessage(r));
+               TryLog(r == E_SUCCESS, "[%s] __pVolumeBarStateTimer cancel Failed.", GetErrorMessage(r));
                CallOnPlayVolumeBarStateChanged();
        }
        else
        {
                //AppLogDebug("Timer is invalid value.");
        }
-       AppLogDebug("End");
+       AppLogDebug("EXIT");
 
        return;
+
 CATCH:
        //AppLogException("[%ls]", GetErrorMessage(r));
        return;
@@ -1691,23 +1821,23 @@ CATCH:
 void
 PlayerPresentationModel::AddMusicPlayerEventListener(const IMusicPlayerEventListener& listener)
 {
-       AppLogDebug("Start");
+       AppLogDebug("ENTER");
        __musicPlayerEventListener.Add(const_cast<IMusicPlayerEventListener*>(&listener));
-       AppLogDebug("End");
+       AppLogDebug("EXIT");
 }
 
 void
 PlayerPresentationModel::RemoveMusicPlayerEventListener(const IMusicPlayerEventListener& listener)
 {
-       AppLogDebug("Start");
+       AppLogDebug("ENTER");
        __musicPlayerEventListener.Remove(const_cast<IMusicPlayerEventListener*>(&listener));
-       AppLogDebug("End");
+       AppLogDebug("EXIT");
 }
 
 void
 PlayerPresentationModel::CallOnPlayStateChanged(PlayerState playerState)
 {
-       AppLogDebug("Start");
+       AppLogDebug("ENTER");
        IMusicPlayerEventListener* pListener = null;
        IEnumeratorT<IMusicPlayerEventListener*>* pEnum = __musicPlayerEventListener.GetEnumeratorN();
        while (pEnum->MoveNext() == E_SUCCESS)
@@ -1715,13 +1845,13 @@ PlayerPresentationModel::CallOnPlayStateChanged(PlayerState playerState)
                pEnum->GetCurrent(pListener);
                pListener->OnPlayStateChanged(playerState);
        }
-       AppLogDebug("End");
+       AppLogDebug("EXIT");
 }
 
 void
 PlayerPresentationModel::CallOnPlayContentChanged(int currentContentIndex)
 {
-       AppLogDebug("Start");
+       AppLogDebug("ENTER");
        IMusicPlayerEventListener* pListener = null;
        IEnumeratorT<IMusicPlayerEventListener*>* pEnum = __musicPlayerEventListener.GetEnumeratorN();
        while (pEnum->MoveNext() == E_SUCCESS)
@@ -1729,13 +1859,13 @@ PlayerPresentationModel::CallOnPlayContentChanged(int currentContentIndex)
                pEnum->GetCurrent(pListener);
                pListener->OnPlayContentChanged(currentContentIndex);
        }
-       AppLogDebug("End");
+       AppLogDebug("EXIT");
 }
 
 void
 PlayerPresentationModel::CallOnPlayContentRemoved(int removedContentIndex)
 {
-       AppLogDebug("Start");
+       AppLogDebug("ENTER");
        IMusicPlayerEventListener* pListener = null;
        IEnumeratorT<IMusicPlayerEventListener*>* pEnum = __musicPlayerEventListener.GetEnumeratorN();
        while (pEnum->MoveNext() == E_SUCCESS)
@@ -1743,13 +1873,13 @@ PlayerPresentationModel::CallOnPlayContentRemoved(int removedContentIndex)
                pEnum->GetCurrent(pListener);
                pListener->OnPlayContentRemoved(removedContentIndex);
        }
-       AppLogDebug("End");
+       AppLogDebug("EXIT");
 }
 
 void
 PlayerPresentationModel::CallOnPlayTimeChanged(Tizen::Base::String& currentDuration, int currentPosition)
 {
-       AppLogDebug("Start");
+       AppLogDebug("ENTER");
        IMusicPlayerEventListener* pListener = null;
        IEnumeratorT<IMusicPlayerEventListener*>* pEnum = __musicPlayerEventListener.GetEnumeratorN();
        while (pEnum->MoveNext() == E_SUCCESS)
@@ -1757,13 +1887,13 @@ PlayerPresentationModel::CallOnPlayTimeChanged(Tizen::Base::String& currentDurat
                pEnum->GetCurrent(pListener);
                pListener->OnPlayTimeChanged(currentDuration, currentPosition);
        }
-       AppLogDebug("End");
+       AppLogDebug("EXIT");
 }
 
 void
 PlayerPresentationModel::CallOnPlayVolumeBarStateChanged(void)
 {
-       AppLogDebug("Start");
+       AppLogDebug("ENTER");
        IMusicPlayerEventListener* pListener = null;
        IEnumeratorT<IMusicPlayerEventListener*>* pEnum = __musicPlayerEventListener.GetEnumeratorN();
        while (pEnum->MoveNext() == E_SUCCESS)
@@ -1771,13 +1901,13 @@ PlayerPresentationModel::CallOnPlayVolumeBarStateChanged(void)
                pEnum->GetCurrent(pListener);
                pListener->OnPlayVolumeBarStateChanged();
        }
-       AppLogDebug("End");
+       AppLogDebug("EXIT");
 }
 
 void
 PlayerPresentationModel::CallOnPlayPresentationModelDestroying(void)
 {
-       AppLogDebug("Start");
+       AppLogDebug("ENTER");
        IMusicPlayerEventListener* pListener = null;
        IEnumeratorT<IMusicPlayerEventListener*>* pEnum = __musicPlayerEventListener.GetEnumeratorN();
        while (pEnum->MoveNext() == E_SUCCESS)
@@ -1785,5 +1915,5 @@ PlayerPresentationModel::CallOnPlayPresentationModelDestroying(void)
                pEnum->GetCurrent(pListener);
                pListener->OnPlayPresentationModelDestroying();
        }
-       AppLogDebug("End");
-}
+       AppLogDebug("EXIT");
+}
\ No newline at end of file
index 95c4c1d..fa1b217 100644 (file)
@@ -1,4 +1,4 @@
-//
+//
 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
 //
 // Licensed under the Flora License, Version 1.0 (the License);
 // limitations under the License.
 //
 
+/**
+ * @file               MpNowPlayContentPanel.cpp
+ * @brief              This is the implementation file for NowPlayContentPanel class.
+ */
+
 #include "MpNowPlayContentPanel.h"
 #include "MpResourceManager.h"
 
@@ -21,201 +26,196 @@ using namespace Tizen::App;
 using namespace Tizen::Base;
 using namespace Tizen::Base::Collection;
 using namespace Tizen::Content;
-using namespace Tizen::Media;
 using namespace Tizen::Graphics;
+using namespace Tizen::Io;
+using namespace Tizen::Media;
+using namespace Tizen::Ui;
 using namespace Tizen::Ui::Controls;
 using namespace Tizen::Ui::Scenes;
-using namespace Tizen::Ui;
-using namespace Tizen::Io;
 
-static const Tizen::Graphics::Rectangle RECT_MUSIC_THUMBNAIL32, 22, 76, 76);
-static const Tizen::Graphics::Rectangle RECT_MUSIC_TOUCH    (140,  0,590,120);
-static const Tizen::Graphics::Rectangle RECT_MUSIC_TITLE    (140,  5,550, 38);
-static const Tizen::Graphics::Rectangle RECT_SLIDER         (120,  0,600,120);
+static const Tizen::Graphics::Rectangle RECT_MUSIC_THUMBNAIL (32, 22, 76, 76);
+static const Tizen::Graphics::Rectangle RECT_MUSIC_TOUCH (140, 0, 590, 120);
+static const Tizen::Graphics::Rectangle RECT_MUSIC_TITLE (140, 5, 550, 38);
+static const Tizen::Graphics::Rectangle RECT_SLIDER (120, 0, 600,120);
 
-static const Tizen::Graphics::Color COLOR_NOW_PLAY_TITLE ( 90, 99,104);//Artist Color 90, 99,104
-static const Tizen::Graphics::Color COLOR_NOW_PLAY_PANEL (182,200,210);
+static const Tizen::Graphics::Color COLOR_NOW_PLAY_TITLE (90, 99, 104);//Artist Color 90, 99,104
+static const Tizen::Graphics::Color COLOR_NOW_PLAY_PANEL (182, 200, 210);
 
-static const Tizen::Base::String PLAYING_ICON_PLAY  = L"T02_now_playing_icon_play.png";
+static const Tizen::Base::String PLAYING_ICON_PLAY = L"T02_now_playing_icon_play.png";
 static const Tizen::Base::String PLAYING_ICON_PAUSE = L"T02_now_playing_icon_pause.png";
 
-static const Tizen::Base::String PLAYING_TEXT   = L"PlayIcon";
+static const Tizen::Base::String PLAYING_TEXT = L"PlayIcon";
 static const Tizen::Base::String PLAY_FORM_TEXT = L"PlayForm";
 
-static const int SLIDER_MAX_VALUE =  100;
-static const int SECOND           = 1000;
+static const int SLIDER_MAX_VALUE = 100;
 
 NowPlayContentPanel::NowPlayContentPanel(void)
 {
-       AppLogDebug("Start");
-       AppLogDebug("End");
-       //AppLogDebug("NowPlayContentPanel");
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 
 NowPlayContentPanel::~NowPlayContentPanel(void)
 {
-       AppLogDebug("Start");
-       //AppLogDebug("~NowPlayContentPanel");
+       AppLogDebug("ENTER");
        if (__pPresentationModel != null)
        {
                __pPresentationModel->RemoveMusicPlayerEventListener(*this);
        }
-       AppLogDebug("End");
+       AppLogDebug("EXIT");
 }
 
 result
 NowPlayContentPanel::Initialize(void)
 {
-       AppLogDebug("Start");
-       //AppLogDebug("Initialize");
+       AppLogDebug("ENTER");
        result r = E_SUCCESS;
 
-    __pPresentationModel = PlayerPresentationModel::GetInstance();
+       __pPresentationModel = PlayerPresentationModel::GetInstance();
 
        r = Construct(Rectangle(INIT_VALUE, INIT_VALUE, W_NOW_PLAY_BAR, H_NOW_PLAY_BAR));
        if (IsFailed(r))
        {
-               AppLogDebug("End");
+               AppLogDebug("EXIT");
                return E_INVALID_STATE;
        }
 
-    SetBackgroundColor(COLOR_NOW_PLAY_PANEL);
+       SetBackgroundColor(COLOR_NOW_PLAY_PANEL);
 
-    __pThumbnailLabel = new (std::nothrow) Label();
-    __pThumbnailLabel->Construct(RECT_MUSIC_THUMBNAIL, L"");
+       __pThumbnailLabel = new (std::nothrow) Label();
+       __pThumbnailLabel->Construct(RECT_MUSIC_THUMBNAIL, L"");
 
-    __pPlayStatusLabel = new (std::nothrow) Label();
-    __pPlayStatusLabel->Construct(RECT_MUSIC_THUMBNAIL, L"");
-    __pPlayStatusLabel->SetName(PLAYING_TEXT);
-    __pPlayStatusLabel->AddTouchEventListener(*this);
+       __pPlayStatusLabel = new (std::nothrow) Label();
+       __pPlayStatusLabel->Construct(RECT_MUSIC_THUMBNAIL, L"");
+       __pPlayStatusLabel->SetName(PLAYING_TEXT);
+       __pPlayStatusLabel->AddTouchEventListener(*this);
 
-    __pTitleLabel = new (std::nothrow) Label();
-    __pTitleLabel->Construct(RECT_MUSIC_TITLE, L"");
-    __pTitleLabel->SetTextColor(COLOR_NOW_PLAY_TITLE);
-    __pTitleLabel->SetTextConfig(FONT_SIZE, LABEL_TEXT_STYLE_NORMAL);
-    __pTitleLabel->SetTextHorizontalAlignment(ALIGNMENT_LEFT);
+       __pTitleLabel = new (std::nothrow) Label();
+       __pTitleLabel->Construct(RECT_MUSIC_TITLE, L"");
+       __pTitleLabel->SetTextColor(COLOR_NOW_PLAY_TITLE);
+       __pTitleLabel->SetTextConfig(FONT_SIZE, LABEL_TEXT_STYLE_NORMAL);
+       __pTitleLabel->SetTextHorizontalAlignment(ALIGNMENT_LEFT);
 
-    __pPlayStateSlider = new Slider();
-    __pPlayStateSlider->Construct(RECT_SLIDER, BACKGROUND_STYLE_NONE, false, INIT_VALUE, SLIDER_MAX_VALUE);
-    __pPlayStateSlider->SetBarColor(Color::GetColor(COLOR_ID_WHITE));
-    __pPlayStateSlider->SetColor(Color::GetColor(COLOR_ID_BLUE));
+       __pPlayStateSlider = new (std::nothrow) Slider();
+       __pPlayStateSlider->Construct(RECT_SLIDER, BACKGROUND_STYLE_NONE, false, INIT_VALUE, SLIDER_MAX_VALUE);
+       __pPlayStateSlider->SetBarColor(Color::GetColor(COLOR_ID_WHITE));
+       __pPlayStateSlider->SetColor(Color::GetColor(COLOR_ID_BLUE));
 
-    __pTouchLabel = new (std::nothrow) Label();
-    __pTouchLabel->Construct(RECT_MUSIC_TOUCH, L"");
-    __pTouchLabel->SetName(PLAY_FORM_TEXT);
-    __pTouchLabel->AddTouchEventListener(*this);
+       __pTouchLabel = new (std::nothrow) Label();
+       __pTouchLabel->Construct(RECT_MUSIC_TOUCH, L"");
+       __pTouchLabel->SetName(PLAY_FORM_TEXT);
+       __pTouchLabel->AddTouchEventListener(*this);
 
-    AddControl(*__pPlayStateSlider);
-    AddControl(*__pThumbnailLabel);
+       AddControl(*__pPlayStateSlider);
+       AddControl(*__pThumbnailLabel);
        AddControl(*__pPlayStatusLabel);
-    AddControl(*__pTitleLabel);
-    AddControl(*__pTouchLabel);
+       AddControl(*__pTitleLabel);
+       AddControl(*__pTouchLabel);
 
-    __pPresentationModel->AddMusicPlayerEventListener(*this);
+       __pPresentationModel->AddMusicPlayerEventListener(*this);
 
-       if (GetPlayStatus() == true)
-       {
-               Bitmap* SongThumbnail = null;
-               String SongTitle = null;
-               String SongArtist = null;
-               int SongDuration = 0;
+       Bitmap* SongThumbnail = null;
+       String SongTitle = null;
+       String SongArtist = null;
+       int SongDuration = 0;
 
-               SongThumbnail = __pPresentationModel->GetPlayContentThumbnail();
-               SongTitle = *__pPresentationModel->GetPlayContentTitle();
-               SongArtist = *__pPresentationModel->GetPlayContentArtist();
-               SongDuration = __pPresentationModel->GetPlayContentDuration();
+       SongThumbnail = __pPresentationModel->GetPlayContentThumbnail();
+       SongTitle = *__pPresentationModel->GetPlayContentTitle();
+       SongArtist = *__pPresentationModel->GetPlayContentArtist();
+       SongDuration = __pPresentationModel->GetPlayContentDuration();
 
-               String titleBar = null;
-               titleBar.Format(STRING_LENGTH, L"%ls / %ls", SongTitle.GetPointer(), SongArtist.GetPointer());
+       String titleBar = null;
+       titleBar.Format(STRING_LENGTH, L"%ls / %ls", SongTitle.GetPointer(), SongArtist.GetPointer());
 
-               __pThumbnailLabel->SetBackgroundBitmap(*SongThumbnail);
+       __pThumbnailLabel->SetBackgroundBitmap(*SongThumbnail);
 
-               switch(__pPresentationModel->GetPlayerState())
-               {
-               case PLAYER_STATE_PLAYING:
+       switch (__pPresentationModel->GetPlayerState())
+       {
+       case PLAYER_STATE_PLAYING:
                {
                        __pPlayStatusLabel->SetBackgroundBitmap(*ResourceManager::GetBitmapN(PLAYING_ICON_PAUSE));
-                       break;
                }
-               case PLAYER_STATE_PAUSED:
+               break;
+
+       case PLAYER_STATE_PAUSED:
                {
                        __pPresentationModel->Pause();
                        __pPlayStatusLabel->SetBackgroundBitmap(*ResourceManager::GetBitmapN(PLAYING_ICON_PLAY));
-                       break;
-               }
-               default:
-               {
-                       break;
                }
-               }//end of switch
+               break;
 
-               __pTitleLabel->SetText(titleBar);
+       default:
+               break;
+       }//end of switch
 
-               __pPlayStateSlider->SetRange(INIT_VALUE, SongDuration / SECOND);
-               __pPlayStateSlider->SetValue(__pPresentationModel->GetPlayPosition());
-               __pPlayStateSlider->SetEnabled(false);
-               __pPlayStateSlider->SetThumbBitmap(SLIDER_THUMB_STATUS_NORMAL, *ResourceManager::GetBitmapN(L"T02_player_progress_handle.png"));
-           __pPlayStateSlider->SetThumbBitmap(SLIDER_THUMB_STATUS_DISABLED, *ResourceManager::GetBitmapN(L"T02_player_progress_handle.png"));
-               __pPlayStateSlider->SetThumbTextColor(SLIDER_THUMB_STATUS_NORMAL, Color(255, 255, 255, 0));
-           __pPlayStateSlider->SetThumbTextColor(SLIDER_THUMB_STATUS_DISABLED, Color(255, 255, 255, 0));
+       __pTitleLabel->SetText(titleBar);
 
-               Invalidate(true);
-       }
-       AppLogDebug("End");
-    return r;
+       __pPlayStateSlider->SetRange(INIT_VALUE, SLIDER_MAX_VALUE);
+       __pPlayStateSlider->SetValue(__pPresentationModel->GetPlayPosition());
+       __pPlayStateSlider->SetEnabled(false);
+       __pPlayStateSlider->SetThumbBitmap(SLIDER_THUMB_STATUS_NORMAL, *ResourceManager::GetBitmapN(L"T02_player_progress_handle.png"));
+       __pPlayStateSlider->SetThumbBitmap(SLIDER_THUMB_STATUS_DISABLED, *ResourceManager::GetBitmapN(L"T02_player_progress_handle.png"));
+       __pPlayStateSlider->SetThumbTextColor(SLIDER_THUMB_STATUS_NORMAL, Color(255, 255, 255, 0));
+       __pPlayStateSlider->SetThumbTextColor(SLIDER_THUMB_STATUS_DISABLED, Color(255, 255, 255, 0));
+
+       Invalidate(true);
+       AppLogDebug("EXIT");
+       return r;
 }
 
 bool
 NowPlayContentPanel::GetPlayStatus(void)
 {
-       AppLogDebug("Start");
-       //AppLogDebug("GetNowPlayStatus");
+       AppLogDebug("ENTER");
 
        bool StatusDisplay = true;
 
-       switch(__pPresentationModel->GetPlayerState())
+       switch (__pPresentationModel->GetPlayerState())
        {
        case PLAYER_STATE_PAUSED:
+               // fall through
        case PLAYER_STATE_PLAYING:
+               // fall through
        case PLAYER_STATE_OPENING:
-       {
-       SetShowState(true);
+               {
+                       SetShowState(true);
+               }
                break;
-       }
+
        default:
-       {
-       SetShowState(false);
-       StatusDisplay = false;
+               {
+                       SetShowState(false);
+                       StatusDisplay = false;
+               }
                break;
-       }
        }//end of switch
 
        Invalidate(true);
-       AppLogDebug("End");
-    return StatusDisplay;
+       AppLogDebug("EXIT");
+       return StatusDisplay;
 }
 
 void
 NowPlayContentPanel::OnPlayStateChanged(Tizen::Media::PlayerState playerState)
 {
-       AppLogDebug("Start");
+       AppLogDebug("ENTER");
        if (playerState == PLAYER_STATE_PLAYING)
        {
                __pPlayStatusLabel->SetBackgroundBitmap(*ResourceManager::GetBitmapN(PLAYING_ICON_PAUSE));
        }
-       else if (playerState == PLAYER_STATE_PAUSED)
+       else
        {
                __pPlayStatusLabel->SetBackgroundBitmap(*ResourceManager::GetBitmapN(PLAYING_ICON_PLAY));
        }
        __pPlayStatusLabel->Invalidate(true);
-       AppLogDebug("End");
+       AppLogDebug("EXIT");
 }
 
 void
 NowPlayContentPanel::OnPlayContentChanged(int currentContentIndex)
 {
-       AppLogDebug("Start");
-       ContentInformationStruct* pContentInfoStruct = __pPresentationModel->GetContentInfoN(currentContentIndex);
+       AppLogDebug("ENTER");
+       ContentInformation* pContentInfoStruct = __pPresentationModel->GetContentInfoN(currentContentIndex);
        if (pContentInfoStruct == null)
        {
                return;
@@ -232,7 +232,7 @@ NowPlayContentPanel::OnPlayContentChanged(int currentContentIndex)
        __pTitleLabel->SetText(titleBar);
        __pTitleLabel->Invalidate(true);
 
-       __pPlayStateSlider->SetRange(INIT_VALUE, static_cast<int>(pContentInfoStruct->Duration / 1000));
+       __pPlayStateSlider->SetRange(INIT_VALUE, SLIDER_MAX_VALUE);
 
        delete pContentInfoStruct;
        pContentInfoStruct = null;
@@ -240,37 +240,40 @@ NowPlayContentPanel::OnPlayContentChanged(int currentContentIndex)
        delete pAlbumArt;
        pAlbumArt = null;
 
-       AppLogDebug("End");
+       AppLogDebug("EXIT");
 }
 
 void
 NowPlayContentPanel::OnPlayTimeChanged(const Tizen::Base::String& currentDuration, int currentPosition)
 {
-       AppLogDebug("Start");
+       AppLogDebug("ENTER");
        __pPlayStateSlider->SetValue(currentPosition);
        __pPlayStateSlider->Invalidate(true);
-       AppLogDebug("End");
+       AppLogDebug("EXIT");
 }
 
 void
 NowPlayContentPanel::OnPlayVolumeBarStateChanged(void)
 {
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 
 void
 NowPlayContentPanel::OnPlayPresentationModelDestroying(void)
 {
-       AppLogDebug("Start");
+       AppLogDebug("ENTER");
        if (__pPresentationModel != null)
        {
                __pPresentationModel = null;
        }
-       AppLogDebug("End");
+       AppLogDebug("EXIT");
 }
 
 void
 NowPlayContentPanel::OnTouchPressed(const Tizen::Ui::Control& source, const Tizen::Graphics::Point& currentPosition, const Tizen::Ui::TouchEventInfo& touchInfo)
 {
+       AppLogDebug("ENTER");
        if (__pPresentationModel == null)
        {
                return;
@@ -278,24 +281,30 @@ NowPlayContentPanel::OnTouchPressed(const Tizen::Ui::Control& source, const Tize
 
        if (source.GetName().Equals(PLAYING_TEXT, true))
        {
-               switch(__pPresentationModel->GetPlayerState())
+               switch (__pPresentationModel->GetPlayerState())
                {
                case PLAYER_STATE_PLAYING:
-               {
-                       __pPresentationModel->Pause();
-                       __pPlayStatusLabel->SetBackgroundBitmap(*ResourceManager::GetBitmapN(PLAYING_ICON_PLAY));
+                       {
+                               __pPresentationModel->Pause();
+//                             __pPlayStatusLabel->SetBackgroundBitmap(*ResourceManager::GetBitmapN(PLAYING_ICON_PLAY));
+                       }
                        break;
-               }
-               case PLAYER_STATE_PAUSED:
-               {
-                       __pPresentationModel->Play(__pPresentationModel->GetCurrentContentIndex(), __pPlayStateSlider->GetValue(), true);
-                       __pPlayStatusLabel->SetBackgroundBitmap(*ResourceManager::GetBitmapN(PLAYING_ICON_PAUSE));
+
+/*             case PLAYER_STATE_PAUSED:
+                       // fall through
+               case PLAYER_STATE_ENDOFCLIP:
+                       {
+                               __pPresentationModel->Play(__pPresentationModel->GetCurrentContentIndex(), __pPlayStateSlider->GetValue(), true);
+                               __pPlayStatusLabel->SetBackgroundBitmap(*ResourceManager::GetBitmapN(PLAYING_ICON_PAUSE));
+                       }
                        break;
-               }
+*/
+
                default:
-               {
+                       {
+                               __pPresentationModel->Play(__pPresentationModel->GetCurrentContentIndex(), __pPlayStateSlider->GetValue(), true);
+                       }
                        break;
-               }
                }//end of switch
                Invalidate(true);
        }
@@ -329,30 +338,40 @@ NowPlayContentPanel::OnTouchPressed(const Tizen::Ui::Control& source, const Tize
                        pSceneManager->GoForward(ForwardSceneTransition(IDSCN_PLAYER));
                }
        }
+       AppLogDebug("EXIT");
 }
 
 void
 NowPlayContentPanel::OnTouchReleased(const Tizen::Ui::Control& source, const Tizen::Graphics::Point& currentPosition, const Tizen::Ui::TouchEventInfo& touchInfo)
 {
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 
 void
 NowPlayContentPanel::OnTouchMoved(const Tizen::Ui::Control& source, const Tizen::Graphics::Point& currentPosition, const Tizen::Ui::TouchEventInfo& touchInfo)
 {
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 
 void
 NowPlayContentPanel::OnTouchFocusIn(const Tizen::Ui::Control& source, const Tizen::Graphics::Point& currentPosition, const Tizen::Ui::TouchEventInfo& touchInfo)
 {
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 
 void
 NowPlayContentPanel::OnTouchFocusOut(const Tizen::Ui::Control& source, const Tizen::Graphics::Point& currentPosition, const Tizen::Ui::TouchEventInfo& touchInfo)
 {
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 
 void
 NowPlayContentPanel::OnTouchCanceled(const Tizen::Ui::Control& source, const Tizen::Graphics::Point& currentPosition, const Tizen::Ui::TouchEventInfo& touchInfo)
 {
-}
-
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
+}
\ No newline at end of file
old mode 100644 (file)
new mode 100755 (executable)
index 85ecb86..1a3b886
@@ -1,4 +1,4 @@
-//
+//
 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
 //
 // Licensed under the Flora License, Version 1.0 (the License);
 // limitations under the License.
 //
 
+/**
+ * @file               MpPanelFactory.cpp
+ * @brief              This is the implementation file for PanelFactory class.
+ */
+
 #include <new>
-#include "MpPanelFactory.h"
-#include "MpAllListPanel.h"
-#include "MpPlaylistListPanel.h"
+#include "MpAlbumContentPickerPanel.h"
+#include "MpAlbumListEditorPanel.h"
 #include "MpAlbumListPanel.h"
-#include "MpArtistListPanel.h"
-#include "MpGenreListPanel.h"
-#include "MpComposerListPanel.h"
-#include "MpYearListPanel.h"
-#include "MpFolderListPanel.h"
-
+#include "MpAlbumPickerPanel.h"
+#include "MpAllContentPickerPanel.h"
 #include "MpAllListEditorPanel.h"
-#include "MpPlaylistListEditorPanel.h"
-#include "MpAlbumListEditorPanel.h"
+#include "MpAllListPanel.h"
+#include "MpArtistContentPickerPanel.h"
 #include "MpArtistListEditorPanel.h"
-#include "MpGenreListEditorPanel.h"
-#include "MpComposerListEditorPanel.h"
-#include "MpYearListEditorPanel.h"
-#include "MpFolderListEditorPanel.h"
-
-#include "MpAlbumPickerPanel.h"
+#include "MpArtistListPanel.h"
 #include "MpArtistPickerPanel.h"
-#include "MpGenrePickerPanel.h"
+#include "MpComposerContentPickerPanel.h"
+#include "MpComposerListEditorPanel.h"
+#include "MpComposerListPanel.h"
 #include "MpComposerPickerPanel.h"
-#include "MpYearPickerPanel.h"
+#include "MpFolderContentPickerPanel.h"
+#include "MpFolderListEditorPanel.h"
+#include "MpFolderListPanel.h"
 #include "MpFolderPickerPanel.h"
-
-#include "MpAllContentPickerPanel.h"
-#include "MpAlbumContentPickerPanel.h"
-#include "MpArtistContentPickerPanel.h"
-#include "MpComposerContentPickerPanel.h"
 #include "MpGenreContentPickerPanel.h"
+#include "MpGenreListEditorPanel.h"
+#include "MpGenreListPanel.h"
+#include "MpGenrePickerPanel.h"
+#include "MpPanelFactory.h"
+#include "MpPlaylistListEditorPanel.h"
+#include "MpPlaylistListPanel.h"
 #include "MpYearContentPickerPanel.h"
-#include "MpFolderContentPickerPanel.h"
+#include "MpYearListEditorPanel.h"
+#include "MpYearListPanel.h"
+#include "MpYearPickerPanel.h"
 
 using namespace Tizen::Ui::Controls;
 using namespace Tizen::Ui::Scenes;
 
-const wchar_t* IDC_ALL_LIST_PANEL               = L"AllListPanel";
-const wchar_t* IDC_PLAYLIST_LIST_PANEL          = L"PlaylistListPanel";
-const wchar_t* IDC_ALBUM_LIST_PANEL             = L"AlbumlistListPanel";
-const wchar_t* IDC_ARTIST_LIST_PANEL            = L"ArtistListPanel";
-const wchar_t* IDC_GENRES_LIST_PANEL            = L"GenreListPanel";
-const wchar_t* IDC_COMPOSER_LIST_PANEL          = L"ComposerListPanel";
-const wchar_t* IDC_YEAR_LIST_PANEL              = L"YearListPanel";
-const wchar_t* IDC_FOLDER_LIST_PANEL            = L"FolderListPanel";
-
-const wchar_t* IDC_ALL_LIST_EDITOR_PANEL        = L"AllListEditorPanel";
-const wchar_t* IDC_PLAYLIST_LIST_EDITOR_PANEL   = L"PlaylistListEditorPanel";
-const wchar_t* IDC_ALBUM_LIST_EDITOR_PANEL      = L"AlbumlistListEditorPanel";
-const wchar_t* IDC_ARTIST_LIST_EDITOR_PANEL     = L"ArtistListEditorPanel";
-const wchar_t* IDC_GENRES_LIST_EDITOR_PANEL     = L"GenresListEditorPanel";
-const wchar_t* IDC_COMPOSER_LIST_EDITOR_PANEL   = L"ComposerListEditorPanel";
-const wchar_t* IDC_YEAR_LIST_EDITOR_PANEL       = L"YearListEditorPanel";
-const wchar_t* IDC_FOLDER_LIST_EDITOR_PANEL     = L"FolderListEditorPanel";
-
-const wchar_t* IDC_ALBUM_PICKER_PANEL            = L"AlbumPickerPanel";
-const wchar_t* IDC_ARTIST_PICKER_PANEL           = L"ArtistPickerPanel";
-const wchar_t* IDC_GENRE_PICKER_PANEL            = L"GenrePickerPanel";
-const wchar_t* IDC_COMPOSER_PICKER_PANEL         = L"ComposerPickerPanel";
-const wchar_t* IDC_YEAR_PICKER_PANEL             = L"YearPickerPanel";
-const wchar_t* IDC_FOLDER_PICKER_PANEL           = L"FolderPickerPanel";
-
-const wchar_t* IDC_ALL_CONTENT_PICKER_PANEL      = L"AllContentPickerPanel";
-const wchar_t* IDC_ALBUM_CONTENT_PICKER_PANEL    = L"AlbumContentEditorPickerPanel";
-const wchar_t* IDC_ARTIST_CONTENT_PICKER_PANEL   = L"ArtistContentEditorPickerPanel";
-const wchar_t* IDC_GENRE_CONTENT_PICKER_PANEL    = L"GenreContentEditorPickerPanel";
+const wchar_t* IDC_ALL_LIST_PANEL = L"AllListPanel";
+const wchar_t* IDC_PLAYLIST_LIST_PANEL = L"PlaylistListPanel";
+const wchar_t* IDC_ALBUM_LIST_PANEL = L"AlbumlistListPanel";
+const wchar_t* IDC_ARTIST_LIST_PANEL = L"ArtistListPanel";
+const wchar_t* IDC_GENRES_LIST_PANEL = L"GenreListPanel";
+const wchar_t* IDC_COMPOSER_LIST_PANEL = L"ComposerListPanel";
+const wchar_t* IDC_YEAR_LIST_PANEL = L"YearListPanel";
+const wchar_t* IDC_FOLDER_LIST_PANEL = L"FolderListPanel";
+
+const wchar_t* IDC_ALL_LIST_EDITOR_PANEL = L"AllListEditorPanel";
+const wchar_t* IDC_PLAYLIST_LIST_EDITOR_PANEL = L"PlaylistListEditorPanel";
+const wchar_t* IDC_ALBUM_LIST_EDITOR_PANEL = L"AlbumlistListEditorPanel";
+const wchar_t* IDC_ARTIST_LIST_EDITOR_PANEL = L"ArtistListEditorPanel";
+const wchar_t* IDC_GENRES_LIST_EDITOR_PANEL = L"GenresListEditorPanel";
+const wchar_t* IDC_COMPOSER_LIST_EDITOR_PANEL = L"ComposerListEditorPanel";
+const wchar_t* IDC_YEAR_LIST_EDITOR_PANEL = L"YearListEditorPanel";
+const wchar_t* IDC_FOLDER_LIST_EDITOR_PANEL = L"FolderListEditorPanel";
+
+const wchar_t* IDC_ALBUM_PICKER_PANEL = L"AlbumPickerPanel";
+const wchar_t* IDC_ARTIST_PICKER_PANEL = L"ArtistPickerPanel";
+const wchar_t* IDC_GENRE_PICKER_PANEL = L"GenrePickerPanel";
+const wchar_t* IDC_COMPOSER_PICKER_PANEL = L"ComposerPickerPanel";
+const wchar_t* IDC_YEAR_PICKER_PANEL = L"YearPickerPanel";
+const wchar_t* IDC_FOLDER_PICKER_PANEL = L"FolderPickerPanel";
+
+const wchar_t* IDC_ALL_CONTENT_PICKER_PANEL = L"AllContentPickerPanel";
+const wchar_t* IDC_ALBUM_CONTENT_PICKER_PANEL = L"AlbumContentEditorPickerPanel";
+const wchar_t* IDC_ARTIST_CONTENT_PICKER_PANEL = L"ArtistContentEditorPickerPanel";
+const wchar_t* IDC_GENRE_CONTENT_PICKER_PANEL = L"GenreContentEditorPickerPanel";
 const wchar_t* IDC_COMPOSER_CONTENT_PICKER_PANEL = L"ComposerContentEditorPickerPanel";
-const wchar_t* IDC_YEAR_CONTENT_PICKER_PANEL     = L"YearContentEditorPickerPanel";
-const wchar_t* IDC_FOLDER_CONTENT_PICKER_PANEL   = L"FolderContentEditorPickerPanel";
+const wchar_t* IDC_YEAR_CONTENT_PICKER_PANEL = L"YearContentEditorPickerPanel";
+const wchar_t* IDC_FOLDER_CONTENT_PICKER_PANEL = L"FolderContentEditorPickerPanel";
 
-PanelFactory::PanelFactory()
+PanelFactory::PanelFactory(void)
 {
-       AppLogDebug("Start");
-       AppLogDebug("End");
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 
-PanelFactory::~PanelFactory()
+PanelFactory::~PanelFactory(void)
 {
-       AppLogDebug("Start");
-       AppLogDebug("End");
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 
 Tizen::Ui::Controls::Panel*
 PanelFactory::CreatePanelN(const Tizen::Base::String& panelId, const Tizen::Ui::Scenes::SceneId& sceneId)
 {
-       AppLogDebug("Start");
+       AppLogDebug("ENTER");
        SceneManager* pSceneManager = SceneManager::GetInstance();
        AppAssert(pSceneManager);
 
        Panel* pNewPanel = null;
-
        if (panelId == IDC_ALL_LIST_PANEL)
        {
                AllListPanel* pPanel = new (std::nothrow) AllListPanel();
@@ -186,7 +187,6 @@ PanelFactory::CreatePanelN(const Tizen::Base::String& panelId, const Tizen::Ui::
                pPanel->Initialize();
                pSceneManager->AddSceneEventListener(sceneId, *pPanel);
                pNewPanel = pPanel;
-
        }
        else if (panelId == IDC_PLAYLIST_LIST_EDITOR_PANEL)
        {
@@ -196,7 +196,6 @@ PanelFactory::CreatePanelN(const Tizen::Base::String& panelId, const Tizen::Ui::
                pPanel->Initialize();
                pSceneManager->AddSceneEventListener(sceneId, *pPanel);
                pNewPanel = pPanel;
-
        }
        else if (panelId == IDC_ALBUM_LIST_EDITOR_PANEL)
        {
@@ -206,7 +205,6 @@ PanelFactory::CreatePanelN(const Tizen::Base::String& panelId, const Tizen::Ui::
                pPanel->Initialize();
                pSceneManager->AddSceneEventListener(sceneId, *pPanel);
                pNewPanel = pPanel;
-
        }
        else if (panelId == IDC_ARTIST_LIST_EDITOR_PANEL)
        {
@@ -216,7 +214,6 @@ PanelFactory::CreatePanelN(const Tizen::Base::String& panelId, const Tizen::Ui::
                pPanel->Initialize();
                pSceneManager->AddSceneEventListener(sceneId, *pPanel);
                pNewPanel = pPanel;
-
        }
        else if (panelId == IDC_GENRES_LIST_EDITOR_PANEL)
        {
@@ -226,7 +223,6 @@ PanelFactory::CreatePanelN(const Tizen::Base::String& panelId, const Tizen::Ui::
                pPanel->Initialize();
                pSceneManager->AddSceneEventListener(sceneId, *pPanel);
                pNewPanel = pPanel;
-
        }
        else if (panelId == IDC_COMPOSER_LIST_EDITOR_PANEL)
        {
@@ -236,7 +232,6 @@ PanelFactory::CreatePanelN(const Tizen::Base::String& panelId, const Tizen::Ui::
                pPanel->Initialize();
                pSceneManager->AddSceneEventListener(sceneId, *pPanel);
                pNewPanel = pPanel;
-
        }
        else if (panelId == IDC_YEAR_LIST_EDITOR_PANEL)
        {
@@ -246,7 +241,6 @@ PanelFactory::CreatePanelN(const Tizen::Base::String& panelId, const Tizen::Ui::
                pPanel->Initialize();
                pSceneManager->AddSceneEventListener(sceneId, *pPanel);
                pNewPanel = pPanel;
-
        }
        else if (panelId == IDC_FOLDER_LIST_EDITOR_PANEL)
        {
@@ -272,7 +266,7 @@ PanelFactory::CreatePanelN(const Tizen::Base::String& panelId, const Tizen::Ui::
                if (pPanel == null)
                {
                        //AppLogDebug("[E_OUT_OF_MEMORY] Unable to create AllContentPicker.");
-                       AppLogDebug("End");
+                       AppLogDebug("EXIT");
                        return null;
                }
                pPanel->Initialize();
@@ -378,9 +372,9 @@ PanelFactory::CreatePanelN(const Tizen::Base::String& panelId, const Tizen::Ui::
                pSceneManager->AddSceneEventListener(sceneId, *pPanel);
                pNewPanel = pPanel;
        }
-       AppLogDebug("End");
+       AppLogDebug("EXIT");
        return pNewPanel;
 
 CATCH:
        return null;
-}
+}
\ No newline at end of file
diff --git a/src/MpPlaylistContentListForm.cpp b/src/MpPlaylistContentListForm.cpp
new file mode 100644 (file)
index 0000000..e9ec951
--- /dev/null
@@ -0,0 +1,778 @@
+//
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.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://floralicense.org/license/
+//
+// 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.
+//
+
+/**
+ * @file               MpPlaylistContentListForm.cpp
+ * @brief              This is the implementation file for PlaylistContentListForm class.
+ */
+
+#include <FSocial.h>
+#include "MpNowPlayContentPanel.h"
+#include "MpPlaylistContentListForm.h"
+#include "MpPlaylistListPresentationModel.h"
+#include "MpPlaylistPickerPopup.h"
+#include "MpSharePopup.h"
+#include "MpThumbnailInfo.h"
+
+using namespace Tizen::App;
+using namespace Tizen::Base;
+using namespace Tizen::Base::Collection;
+using namespace Tizen::Content;
+using namespace Tizen::Graphics;
+using namespace Tizen::Io;
+using namespace Tizen::Social;
+using namespace Tizen::System;
+using namespace Tizen::Ui;
+using namespace Tizen::Ui::Controls;
+using namespace Tizen::Ui::Scenes;
+
+static const Tizen::Graphics::Rectangle RECT_THUMBNAIL_BG (15, 7, 113, 113);
+static const Tizen::Graphics::Rectangle RECT_THUMBNAIL (16, 8, 112, 112);
+static const Tizen::Graphics::Rectangle RECT_SONG_TITLE (144, 10, 416, 60);
+static const Tizen::Graphics::Rectangle RECT_SONG_ARTIST (144, 70, 576, 48);
+static const Tizen::Graphics::Rectangle RECT_SONG_TIME (560, 10, 160, 60);
+
+static const int X_OFFSET_EDIT_STYLE_TABLE_VIEW = 96;
+static const int COUNT_MESSAGE_BOX_TIMEOUT = 3000;
+
+PlaylistContentListForm::PlaylistContentListForm(void)
+       : ContentListForm::ContentListForm()
+       , ThumbnailBase::ThumbnailBase()
+       , __pThumbnail(null)
+       , __ContentType(0)
+       , __pPresentationModel(null)
+{
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
+}
+
+PlaylistContentListForm::~PlaylistContentListForm(void)
+{
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
+}
+
+result
+PlaylistContentListForm::OnInitializing(void)
+{
+       AppLogDebug("ENTER");
+       CreateTableview();
+       CreateSelectAllCheckedButton();
+       CreateCheckedCountLabel();
+       CreateNoContentImage(L"IDS_MUSIC_HEADER_NO_SONGS");
+
+       AppLogDebug("EXIT");
+       return ThumbnailBase::Construct();
+}
+
+result
+PlaylistContentListForm::OnTerminating(void)
+{
+       AppLogDebug("ENTER");
+       __checkedItemCount = 0;
+       DestroyPlayListPickerPopup();
+       AppLogDebug("EXIT");
+       return E_SUCCESS;
+}
+
+void
+PlaylistContentListForm::OnActionPerformed(const Tizen::Ui::Control& source, int actionId)
+{
+       AppLogDebug("ENTER");
+       SceneManager* pSceneManager = SceneManager::GetInstance();
+
+       AppAssert(pSceneManager);
+       switch (actionId)
+       {
+       case IDA_FOOTER_BUTTON_EDIT:
+               {
+                       ToggleViewMode(false);
+               }
+               break;
+
+       case IDA_FOOTER_BUTTON_CANCEL:
+               {
+                       __checkedItemCount = INIT_VALUE;
+                       __pSelectAllCheckedButton->SetSelected(false);
+                       CommonUtil::SetAllCheckState(false, *__pContentTableView, __pPresentationModel->GetContentCount());
+                       CommonUtil::ShowCheckedCountLabel(*__pCheckedCountLabel, __checkedItemCount, *__pContentTableView, *this);
+                       ToggleViewMode(true);
+               }
+               break;
+
+       case IDA_FOOTER_BUTTON_SEARCH:
+               {
+                       pSceneManager->GoForward(ForwardSceneTransition(IDSCN_SEARCH));
+               }
+               break;
+
+       case IDA_CHECK_BUTTON:
+               {
+                       __checkedItemCount = __pPresentationModel->GetContentCount();
+                       if (__checkedItemCount > INIT_VALUE)
+                       {
+                               Footer* pFooter = GetFooter();
+
+                               pFooter->SetItemEnabled(INDEX_FOOTER_DELETE, true);
+                               pFooter->SetItemEnabled(INDEX_FOOTER_SHARE, true);
+                               pFooter->SetItemEnabled(INDEX_FOOTER_ADDTOPLATLIST, true);
+
+                               pFooter->Invalidate(true);
+                       }
+                       CommonUtil::SetAllCheckState(true, *__pContentTableView, __pPresentationModel->GetContentCount());
+                       CommonUtil::ShowCheckedCountLabel(*__pCheckedCountLabel, __checkedItemCount, *__pContentTableView, *this);
+               }
+               break;
+
+       case IDA_UNCHECK_BUTTON:
+               {
+                       Footer* pFooter = GetFooter();
+
+                       pFooter->SetItemEnabled(INDEX_FOOTER_DELETE, false);
+                       pFooter->SetItemEnabled(INDEX_FOOTER_SHARE, false);
+                       pFooter->SetItemEnabled(INDEX_FOOTER_ADDTOPLATLIST, false);
+
+                       pFooter->Invalidate(true);
+
+                       __checkedItemCount = INIT_VALUE;
+                       CommonUtil::SetAllCheckState(false, *__pContentTableView, __pPresentationModel->GetContentCount());
+                       CommonUtil::ShowCheckedCountLabel(*__pCheckedCountLabel, __checkedItemCount, *__pContentTableView, *this);
+               }
+               break;
+
+       case IDA_FOOTER_BUTTON_DELETE:
+               {
+                       Footer* pFooter = GetFooter();
+                       int totalCount = __pPresentationModel->GetContentCount();
+                       int iCount = 0;
+
+                       if (__checkedItemCount <= INIT_VALUE)
+                       {
+                               return;
+                       }
+
+                       pFooter->SetItemEnabled(INDEX_FOOTER_DELETE, false);
+                       pFooter->SetItemEnabled(INDEX_FOOTER_SHARE, false);
+                       pFooter->SetItemEnabled(INDEX_FOOTER_ADDTOPLATLIST, false);
+                       pFooter->Invalidate(true);
+
+                       if (__ContentType == RECENTLY_ADDED_CONTENT)
+                       {
+                               ContentManager contentManager;
+                               contentManager.Construct();
+
+                               for (iCount = 0; iCount < totalCount; iCount++)
+                               {
+                                       if (__pContentTableView->IsItemChecked(iCount) == true)
+                                       {
+                                               ContentInformation* pContentInfoStruct = __pPresentationModel->GetContentInfoN(iCount);
+                                               if (pContentInfoStruct == null)
+                                               {
+                                                       return;
+                                               }
+                                               __pContentTableView->SetItemChecked(iCount, false);
+                                               contentManager.DeleteContent(pContentInfoStruct->contentId);
+
+                                               delete pContentInfoStruct;
+                                               pContentInfoStruct = null;
+                                       }
+                               }
+
+                               __pPresentationModel->UpdatePlaylistContentList(__ContentType, *__pStrContentName);
+                               __pContentTableView->UpdateTableView();
+                               __pContentTableView->Invalidate(true);
+                       }
+                       else
+                       {
+                               for (iCount = 0; iCount < totalCount; iCount++)
+                               {
+                                       if (__pContentTableView->IsItemChecked(iCount) == true)
+                                       {
+                                               ContentInformation* pContentInfoStruct = __pPresentationModel->GetContentInfoN(iCount);
+                                               if (pContentInfoStruct == null)
+                                               {
+                                                       return;
+                                               }
+                                               __pContentTableView->SetItemChecked(iCount,false);
+                                               __pPresentationModel->DeleteContent(__ContentType, *pContentInfoStruct);
+
+                                               delete pContentInfoStruct;
+                                               pContentInfoStruct = null;
+                                       }
+                               }
+                               __pPresentationModel->UpdatePlaylistContentList(__ContentType, *__pStrContentName);
+                               __pContentTableView->UpdateTableView();
+                               __pContentTableView->Invalidate(true);
+                       }
+
+                       __checkedItemCount = INIT_VALUE;
+                       CommonUtil::ShowCheckedCountLabel(*__pCheckedCountLabel, __checkedItemCount, *__pContentTableView, *this);
+
+                       if (__pPresentationModel->GetContentCount() > 0)
+                       {
+                               CommonUtil::ShowSelectAllCheckButton(*__pSelectAllCheckedButton);
+                       }
+                       else
+                       {
+                               __pSelectAllCheckedButton->SetEnabled(false);
+                               __pSelectAllCheckedButton->SetShowState(false);
+                               CommonUtil::ShowNoContentImage(INIT_VALUE, *__pContentTableView, *__pNoContentImageLabel, *__pNoContentTextLabel);
+                       }
+               }
+               break;
+
+       case IDA_FOOTER_BUTTON_SHARE:
+               {
+                       Tizen::Base::Collection::ArrayList* pDataList = new (std::nothrow) ArrayList();
+                       Footer* pFooter = GetFooter();
+                       int totalCount = __pPresentationModel->GetContentCount();
+
+                       pDataList->Construct();
+
+                       for (int iCount = 0; iCount < totalCount; iCount++)
+                       {
+                               if (__pContentTableView->IsItemChecked(iCount) == true)
+                               {
+                                       ContentInformation* pContentInfoStruct = __pPresentationModel->GetContentInfoN(iCount);
+                                       if (pContentInfoStruct == null)
+                                       {
+                                               pDataList->RemoveAll(true);
+                                               delete pDataList;
+                                               pDataList = null;
+                                               return;
+                                       }
+                                       pDataList->Add(*(new (std::nothrow) String(L"attachment:" + pContentInfoStruct->ContentFilePath)));
+
+                                       __pContentTableView->SetItemChecked(iCount, false);
+
+                                       delete pContentInfoStruct;
+                                       pContentInfoStruct = null;
+                               }
+                       }
+                       pFooter->SetItemEnabled(INDEX_FOOTER_DELETE, false);
+                       pFooter->SetItemEnabled(INDEX_FOOTER_SHARE, false);
+                       pFooter->SetItemEnabled(INDEX_FOOTER_ADDTOPLATLIST, false);
+
+                       __checkedItemCount = INIT_VALUE;
+                       CommonUtil::ShowCheckedCountLabel(*__pCheckedCountLabel, __checkedItemCount, *__pContentTableView, *this);
+                       CommonUtil::ShowSelectAllCheckButton(*__pSelectAllCheckedButton);
+                       Invalidate(true);
+                       if (__pSharePopup == null)
+                       {
+                               __pSharePopup = new (std::nothrow) SharePopup();
+                               __pSharePopup->Initialize();
+                       }
+                       __pSharePopup->SetShowState(true);
+                       __pSharePopup->Show();
+                       __pSharePopup->SetArguments(pDataList);
+               }
+               break;
+
+       case IDA_FOOTER_BUTTON_ADD_TO_PLAYLIST:
+               {
+                       ContentManager contentManager;
+                       Footer* pFooter = GetFooter();
+                       Tizen::Base::Collection::ArrayList* pDataList = new (std::nothrow) ArrayList();
+                       int totalCount = 0;
+
+                       if (__checkedItemCount <= 0)
+                       {
+                               return;
+                       }
+
+                       pDataList->Construct();
+                       contentManager.Construct();
+                       totalCount = __pPresentationModel->GetContentCount();
+
+                       for (int iCount = 0; iCount < totalCount; iCount++)
+                       {
+                               if (__pContentTableView->IsItemChecked(iCount) == true)
+                               {
+                                       ContentInformation* pContentInfoStruct = __pPresentationModel->GetContentInfoN(iCount);
+                                       if (pContentInfoStruct == null)
+                                       {
+                                               pDataList->RemoveAll(true);
+                                               delete pDataList;
+                                               pDataList = null;
+                                               return;
+                                       }
+
+                                       pDataList->Add(*(new (std::nothrow) String(pContentInfoStruct->ContentFilePath)));
+
+                                       __pContentTableView->SetItemChecked(iCount, false);
+
+                                       delete pContentInfoStruct;
+                                       pContentInfoStruct = null;
+                               }
+                       }
+
+                       if (IsFailed(CreatePlayListPickerPopup(pDataList)))
+                       {
+                               AppLogDebug("CreatePlayListPickerPopup failed(%s)", GetLastResult());
+                               return;
+                       }
+                       __pPlayListPickerPopup->SetShowState(true);
+                       __pPlayListPickerPopup->Show();
+                       //__pPlayListPickerPopup->SetCollectedContent(pDataList);
+
+                       pFooter->SetItemEnabled(INDEX_FOOTER_DELETE, false);
+                       pFooter->SetItemEnabled(INDEX_FOOTER_SHARE, false);
+                       pFooter->SetItemEnabled(INDEX_FOOTER_ADDTOPLATLIST, false);
+
+                       __checkedItemCount = INIT_VALUE;
+                       CommonUtil::ShowCheckedCountLabel(*__pCheckedCountLabel, __checkedItemCount, *__pContentTableView, *this);
+                       CommonUtil::ShowSelectAllCheckButton(*__pSelectAllCheckedButton);
+                       Invalidate(true);
+               }
+               break;
+
+       default:
+               break;
+       }
+       AppLogDebug("EXIT");
+}
+
+void
+PlaylistContentListForm::OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previousSceneId,
+                                       const Tizen::Ui::Scenes::SceneId& currentSceneId,
+                                       Tizen::Base::Collection::IList* pArgs)
+{
+       AppLogDebug("ENTER");
+       if (pArgs != null && previousSceneId.Equals(IDSCN_PLAYLIST_LIST, true) == true)
+       {
+               __pStrSceneId = static_cast<String*>(pArgs->GetAt(DATA_ITEM_SCENE_NAME));
+               __pStrContentName = static_cast<String*>(pArgs->GetAt(DATA_ITEM_CONTENT_NAME));
+               __ContentType = static_cast<Integer*>(pArgs->GetAt(DATA_ITEM_CONTENT_TYPE))->ToInt();
+               __pPresentationModel = PlaylistListPresentationModel::GetInstance();
+               __pPresentationModel->UpdatePlaylistContentList(__ContentType, *__pStrContentName);
+       }
+       else
+       {
+               // Empty statement
+       }
+
+       if (__checkEdit == false)
+       {
+               Footer* pFooter = CommonUtil::CreateEditFooter(*this);
+               pFooter->AddActionEventListener(*this);
+               pFooter->SetBackButton();
+               SetFormBackEventListener(this);
+
+               if (__pPresentationModel->GetContentCount() <= INIT_VALUE)
+               {
+                       CommonUtil::ShowNoContentImage(INIT_VALUE, *__pContentTableView, *__pNoContentImageLabel, *__pNoContentTextLabel);
+                       pFooter->SetItemEnabled(INDEX_FOOTER_EDIT, false);
+               }
+       }
+       else
+       {
+               ToggleViewMode(false);
+       }
+
+       SetTitleText(*__pStrContentName);
+       __pContentTableView->UpdateTableView();
+       AppLogDebug("EXIT");
+}
+
+void
+PlaylistContentListForm::OnSceneDeactivated(const Tizen::Ui::Scenes::SceneId& currentSceneId,
+                                                                       const Tizen::Ui::Scenes::SceneId& nextSceneId)
+{
+       AppLogDebug("ENTER");
+       Footer* pFooter = GetFooter();
+       pFooter->RemoveAllButtons();
+       pFooter->RemoveAllItems();
+       pFooter->RemoveActionEventListener(*this);
+       CancelAllThumbnailRequest();
+       AppLogDebug("EXIT");
+}
+
+int
+PlaylistContentListForm::GetItemCount(void)
+{
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
+       return __pPresentationModel->GetContentCount();
+}
+
+Tizen::Ui::Controls::TableViewItem*
+PlaylistContentListForm::CreateItem(const int itemIndex, int itemWidth)
+{
+       AppLogDebug("ENTER");
+       ContentInformation* pContentInfoStruct = null;
+
+       TableViewItem* pItem = new (std::nothrow) TableViewItem();
+       if (__checkEdit)
+       {
+               pItem->Construct(Dimension(itemWidth, ITEM_HEIGHT), TABLE_VIEW_ANNEX_STYLE_MARK);
+       }
+       else
+       {
+               pItem->Construct(Dimension(itemWidth, ITEM_HEIGHT), TABLE_VIEW_ANNEX_STYLE_NORMAL);
+       }
+       pItem->SetBackgroundColor(COLOR_WHITE);
+
+       pContentInfoStruct = __pPresentationModel->GetContentInfoN(itemIndex);
+       if (pContentInfoStruct == null)
+       {
+               delete pItem;
+               pItem = null;
+               return null;
+       }
+
+       RequestThumbnail(pContentInfoStruct->contentId, (new (std::nothrow) int(itemIndex)));
+       CreateTableViewItem(*pItem, *pContentInfoStruct);
+
+       delete pContentInfoStruct;
+       pContentInfoStruct = null;
+
+       AppLogDebug("EXIT");
+       return pItem;
+}
+
+void
+PlaylistContentListForm::OnTableViewItemStateChanged(Tizen::Ui::Controls::TableView& tableView,
+                                                       int itemIndex,
+                                                       Tizen::Ui::Controls::TableViewItem* pItem,
+                                                       Tizen::Ui::Controls::TableViewItemStatus status)
+{
+       AppLogDebug("ENTER");
+       switch (status)
+       {
+       case TABLE_VIEW_ITEM_STATUS_CHECKED:
+               {
+                       Footer* pFooter = GetFooter();
+                       __checkedItemCount++;
+                       tableView.SetItemChecked(itemIndex, true);
+
+                       pFooter->SetItemEnabled(INDEX_FOOTER_DELETE, true);
+                       pFooter->SetItemEnabled(INDEX_FOOTER_SHARE, true);
+                       pFooter->SetItemEnabled(INDEX_FOOTER_ADDTOPLATLIST, true);
+
+                       pFooter->Invalidate(true);
+                       if (__checkedItemCount == __pPresentationModel->GetContentCount())
+                       {
+                               __pSelectAllCheckedButton->SetSelected(true);
+                       }
+                       CommonUtil::ShowCheckedCountLabel(*__pCheckedCountLabel, __checkedItemCount, *__pContentTableView, *this);
+               }
+               break;
+
+       case TABLE_VIEW_ITEM_STATUS_UNCHECKED:
+               {
+                       Footer* pFooter = GetFooter();
+
+                       __checkedItemCount--;
+                       tableView.SetItemChecked(itemIndex, false);
+
+                       if (__checkedItemCount == INIT_VALUE)
+                       {
+                               pFooter->SetItemEnabled(INDEX_FOOTER_DELETE, false);
+                               pFooter->SetItemEnabled(INDEX_FOOTER_SHARE, false);
+                               pFooter->SetItemEnabled(INDEX_FOOTER_ADDTOPLATLIST, false);
+
+                               pFooter->Invalidate(true);
+                       }
+
+                       if (__checkedItemCount != __pPresentationModel->GetContentCount())
+                       {
+                               __pSelectAllCheckedButton->SetSelected(false);
+                       }
+                       CommonUtil::ShowCheckedCountLabel(*__pCheckedCountLabel, __checkedItemCount, *__pContentTableView, *this);
+               }
+               break;
+
+       case TABLE_VIEW_ITEM_STATUS_SELECTED:
+               {
+                       SceneManager* pSceneManager = SceneManager::GetInstance();
+
+                       AppAssert(pSceneManager);
+                       if (__ContentType != RECENTLY_ADDED_CONTENT)
+                       {
+                               pSceneManager->GoForward(ForwardSceneTransition(IDSCN_PLAYER), GetAudioContentInfoContentList(itemIndex));
+                       }
+                       else if (__ContentType == RECENTLY_ADDED_CONTENT)
+                       {
+                               pSceneManager->GoForward(ForwardSceneTransition(IDSCN_PLAYER), GetSearchResultContentList(itemIndex));
+                       }
+               }
+               break;
+
+       default:
+               break;
+       }
+       AppLogDebug("EXIT");
+}
+
+Tizen::Base::Collection::ArrayList*
+PlaylistContentListForm::GetSearchResultContentList(int itemIndex)
+{
+       AppLogDebug("ENTER");
+       ArrayList* pTempList = new (std::nothrow) ArrayList();
+       if (pTempList == null)
+       {
+               AppLogDebug("EXIT");
+               return null;
+       }
+       pTempList->Construct();
+
+       pTempList->Add(*(new (std::nothrow) String(MUSIC)));
+       pTempList->Add(*(new (std::nothrow) Integer(itemIndex)));
+       pTempList->Add(*(__pPresentationModel->GetContentPathListN(__ContentType)));
+       AppLogDebug("EXIT");
+       return pTempList;
+}
+
+Tizen::Base::Collection::ArrayList*
+PlaylistContentListForm::GetAudioContentInfoContentList(int itemIndex)
+{
+       AppLogDebug("ENTER");
+       ArrayList* pTempList = new (std::nothrow) ArrayList();
+       if (pTempList == null)
+       {
+               AppLogDebug("EXIT");
+               return null;
+       }
+       pTempList->Construct();
+
+       pTempList->Add(*(new (std::nothrow) String(MUSIC)));
+       pTempList->Add(*(new (std::nothrow) Integer(itemIndex)));
+       pTempList->Add(*(__pPresentationModel->GetContentPathListN(__ContentType)));
+       AppLogDebug("EXIT");
+       return pTempList;
+}
+
+result
+PlaylistContentListForm::CreateTableViewItem(Tizen::Ui::Container& parent,
+                                                                               const ContentInformation& contentInfo)
+{
+       AppLogDebug("ENTER");
+       result r = E_SUCCESS;
+
+       Rectangle rectSongTitle = RECT_SONG_TITLE;
+       Rectangle rectSongArtist = RECT_SONG_ARTIST;
+       Rectangle rectSongTime = RECT_SONG_TIME;
+
+       if (__checkEdit)
+       {
+               rectSongTitle.width = rectSongTitle.width - X_OFFSET_EDIT_STYLE_TABLE_VIEW;
+               rectSongArtist.width = rectSongArtist.width - X_OFFSET_EDIT_STYLE_TABLE_VIEW;
+               rectSongTime.x = rectSongTime.x - X_OFFSET_EDIT_STYLE_TABLE_VIEW;
+       }
+
+       Label* pSongThumbnailBGLabel = new (std::nothrow) Label();
+       pSongThumbnailBGLabel->Construct(RECT_THUMBNAIL_BG, L"");
+       parent.AddControl(*pSongThumbnailBGLabel);
+
+       Label* pSongThumbnailLabel = new (std::nothrow) Label();
+       pSongThumbnailLabel->Construct(RECT_THUMBNAIL, L"");
+       pSongThumbnailLabel->SetBackgroundBitmap(*GetDefaultThumbnail());
+       pSongThumbnailLabel->SetName(L"pSongThumbnailLabel");
+       parent.AddControl(*pSongThumbnailLabel);
+
+       Label* pSongTitleLabel = new (std::nothrow) Label();
+       pSongTitleLabel->Construct(rectSongTitle, L"");
+       pSongTitleLabel->SetTextColor(COLOR_MAIN_TEXT);
+       pSongTitleLabel->SetTextConfig(MAIN_TEXT_SIZE, LABEL_TEXT_STYLE_NORMAL);
+       pSongTitleLabel->SetTextHorizontalAlignment(ALIGNMENT_LEFT);
+       pSongTitleLabel->SetText(contentInfo.TitleName);
+       parent.AddControl(*pSongTitleLabel);
+
+       Label* pSongArtistLabel = new (std::nothrow) Label();
+       pSongArtistLabel->Construct(rectSongArtist, L"");
+       pSongArtistLabel->SetTextColor(COLOR_SUB_TEXT);
+       pSongArtistLabel->SetTextConfig(SUB_TEXT_SIZE, LABEL_TEXT_STYLE_NORMAL);
+       pSongArtistLabel->SetTextHorizontalAlignment(ALIGNMENT_LEFT);
+       pSongArtistLabel->SetText(contentInfo.ArtistName);
+       parent.AddControl(*pSongArtistLabel);
+
+       Label* pSongTimeLabel = new (std::nothrow) Label();
+       pSongTimeLabel->Construct(rectSongTime, L"");
+       pSongTimeLabel->SetTextColor(COLOR_SUB_TEXT);
+       pSongTimeLabel->SetTextConfig(SUB_TEXT_SIZE, LABEL_TEXT_STYLE_NORMAL);
+       pSongTimeLabel->SetTextHorizontalAlignment(ALIGNMENT_CENTER);
+       pSongTimeLabel->SetText(CommonUtil::GetFormatDate(contentInfo.Duration));
+       parent.AddControl(*pSongTimeLabel);
+       AppLogDebug("EXIT");
+       return r;
+}
+
+void
+PlaylistContentListForm::ToggleViewMode(bool editMode)
+{
+       AppLogDebug("ENTER");
+       Footer* pFooter = GetFooter();
+       SceneManager* pSceneManager = SceneManager::GetInstance();
+       AppAssert(pSceneManager);
+
+       if (editMode)
+       {
+               int currentContentCount = 0;
+               currentContentCount = __pPresentationModel->GetContentCount();
+
+               pFooter->RemoveAllButtons();
+               pFooter->RemoveAllItems();
+               pFooter->RemoveActionEventListener(*this);
+               pFooter = CommonUtil::CreateEditFooter(*this);
+               pFooter->AddActionEventListener(*this);
+               pFooter->SetBackButton();
+               SetFormBackEventListener(this);
+
+               if ( currentContentCount > INIT_VALUE)
+               {
+                       SetTitleText(*__pStrContentName);
+               }
+               else
+               {
+                       SetTitleText("No songs");
+                       CommonUtil::ShowNoContentImage(INIT_VALUE, *__pContentTableView, *__pNoContentImageLabel, *__pNoContentTextLabel);
+                       pFooter->SetItemEnabled(INDEX_FOOTER_EDIT, false);
+               }
+
+               __pSelectAllCheckedButton->SetEnabled(false);
+               __pSelectAllCheckedButton->SetShowState(false);
+
+               __pContentTableView->SetBounds(Rectangle(0, 0, GetClientAreaBounds().width, GetClientAreaBounds().height));
+               __pContentTableView->Invalidate(true);
+
+               __checkEdit = false;
+               __pContentTableView->UpdateTableView();
+       }
+       else
+       {
+               SetTitleText(ResourceManager::GetString("IDS_COM_BODY_EDIT"));
+
+               pFooter->RemoveAllButtons();
+               pFooter->RemoveAllItems();
+               pFooter->RemoveActionEventListener(*this);
+
+               pFooter = CommonUtil::CreateDeleteFooter(*this);
+               pFooter->AddActionEventListener(*this);
+
+               __pSelectAllCheckedButton->SetEnabled(true);
+
+               __pContentTableView->SetBounds(Rectangle(0, __pSelectAllCheckedButton->GetHeight(), GetClientAreaBounds().width, (GetClientAreaBounds().height - __pSelectAllCheckedButton->GetHeight())));
+
+               __pSelectAllCheckedButton->SetShowState(true);
+               __pContentTableView->Invalidate(true);
+
+               __checkEdit = true;
+               __pContentTableView->UpdateTableView();
+       }
+       Invalidate(true);
+       AppLogDebug("EXIT");
+}
+
+void
+PlaylistContentListForm::OnAppControlCompleteResponseReceived(const AppId& appId,
+               const String& operationId, AppCtrlResult appControlResult,
+               const IMap* pExtraData)
+{
+       AppLogDebug("ENTER");
+       if (pExtraData == null)
+       {
+               AppLogDebug("EXIT");
+               return;
+       }
+       AppLogDebug("%ls, %ls", appId.GetPointer(), operationId.GetPointer());
+       if (appId.Equals(String(TIZEN_APPCONTROL_PROVIDER_CONTACT)))
+       {
+               if (appControlResult == APP_CTRL_RESULT_SUCCEEDED)
+               {
+                       const String* pContactId = static_cast<const String*>(pExtraData->GetValue(String(APPCONTROL_KEY_RETURNTYPE)));
+                       if (pContactId->Equals(APPCONTROL_VALUE_CONTACTID, true))
+                       {
+                               const String* pResultString = static_cast<const String*>(pExtraData->GetValue(String(APPCONTROL_KEY_VALUE)));
+
+                               AppLogDebug("%ls", pResultString->GetPointer());
+                               int contactId;
+                               Integer::Parse(*pResultString, contactId);
+
+                               AddressbookManager* pAddressbookManager = AddressbookManager::GetInstance();
+                               Addressbook* pAddressbook = pAddressbookManager->GetAddressbookN(DEFAULT_ADDRESSBOOK_ID);
+
+                               ContentInformation* pCcontentInfo = __pPresentationModel->GetContentInfoN(__itemIndex);
+                               if (pCcontentInfo == null)
+                               {
+                                       delete pAddressbook;
+                                       pAddressbook = null;
+                                       return;
+                               }
+
+                               Contact* pContact = pAddressbook->GetContactN(contactId);
+                               pContact->SetValue(CONTACT_PROPERTY_ID_RINGTONE, pCcontentInfo->ContentFilePath);
+                               result r = pAddressbook->UpdateContact(*pContact);
+
+                               if (r == E_SUCCESS)
+                               {
+                                       MessageBox messageBox;
+                                       messageBox.Construct(L"", ResourceManager::GetString(L"IDS_COM_POP_SUCCESS"),
+                                                       MSGBOX_STYLE_OK,
+                                                       COUNT_MESSAGE_BOX_TIMEOUT);
+                                       int modalResult = 0;
+                                       messageBox.ShowAndWait(modalResult);
+                               }
+
+                               delete pCcontentInfo;
+                               pCcontentInfo = null;
+
+                               delete pContact;
+                               pContact = null;
+
+                               delete pAddressbook;
+                               pAddressbook = null;
+                       }
+               }
+       }
+       AppLogDebug("EXIT");
+}
+
+void
+PlaylistContentListForm::OnThumbnailInfoReveivedN(ThumbnailInfo* pThumbnailInfo)
+{
+       AppLogDebug("ENTER");
+       int itemIndex = 0;
+       void* pParam = null;
+       __pThumbnail = pThumbnailInfo->GetBitmapN();
+       pParam = pThumbnailInfo->GetUserParamN();
+       if (pParam)
+       {
+               itemIndex = *(static_cast<int*>(pParam));
+       }
+       __pContentTableView->RefreshItem(itemIndex, TABLE_VIEW_REFRESH_TYPE_ITEM_MODIFY);
+       delete pThumbnailInfo;
+       delete static_cast<int*>(pParam);
+       AppLogDebug("EXIT");
+}
+
+void
+PlaylistContentListForm::UpdateItem(int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem)
+{
+       AppLogDebug("ENTER");
+       Label* pThumbnailLabel = static_cast<Label*>(pItem->GetControl(L"pSongThumbnailLabel"));
+       if (__pThumbnail == null || pThumbnailLabel == null)
+       {
+               AppLogDebug("__pThumbnail or pThumbnailLabel is null");
+               delete __pThumbnail;
+               __pThumbnail = null;
+               return;
+       }
+       pThumbnailLabel->SetBackgroundBitmap(*__pThumbnail);
+       delete __pThumbnail;
+       __pThumbnail = null;
+       pThumbnailLabel->Invalidate(true);
+       AppLogDebug("EXIT");
+}
\ No newline at end of file
index 36cbb9e..d849e8f 100644 (file)
@@ -1,4 +1,4 @@
-//
+//
 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
 //
 // Licensed under the Flora License, Version 1.0 (the License);
 // limitations under the License.
 //
 
+/**
+ * @file               MpPlaylistCreatorForm.cpp
+ * @brief              This is the implementation file for PlaylistCreatorForm class.
+ */
+
+#include "MpCommonUtil.h"
 #include "MpPlaylistCreatorForm.h"
 #include "MpPlaylistEditorPresentationModel.h"
-// test code start
-// test code end
 #include "MpResourceManager.h"
 #include "MpSceneRegister.h"
 #include "MpTypes.h"
-#include "MpCommonUtil.h"
 
-using namespace Tizen::Ui;
-using namespace Tizen::Ui::Controls;
-using namespace Tizen::Graphics;
 using namespace Tizen::Base;
 using namespace Tizen::Base::Collection;
+using namespace Tizen::Content;
+using namespace Tizen::Graphics;
 using namespace Tizen::Media;
+using namespace Tizen::Ui;
+using namespace Tizen::Ui::Controls;
 using namespace Tizen::Ui::Scenes;
-using namespace Tizen::Content;
 
 static const int IDC_BUTTON_SAVE = 101;
 static const int IDC_BUTTON_CANCEL = 102;
@@ -41,22 +44,28 @@ PlaylistCreatorForm::PlaylistCreatorForm(void)
        , __pDataList(null)
        , __previousSceneId(L"")
 {
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 
 PlaylistCreatorForm::~PlaylistCreatorForm(void)
 {
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 
 void
 PlaylistCreatorForm::Initialize(void)
 {
-       Form::Construct(FORM_STYLE_NORMAL| FORM_STYLE_INDICATOR| FORM_STYLE_HEADER);
+       AppLogDebug("ENTER");
+       Form::Construct(FORM_STYLE_NORMAL | FORM_STYLE_INDICATOR | FORM_STYLE_HEADER);
+       AppLogDebug("EXIT");
 }
 
 result
 PlaylistCreatorForm::OnInitializing(void)
 {
-       //AppLogDebug("OnInitializing(void)");
+       AppLogDebug("ENTER");
        ButtonItem buttonRightItem;
        buttonRightItem.Construct(BUTTON_ITEM_STYLE_ICON, IDC_BUTTON_CANCEL);
        buttonRightItem.SetText(ResourceManager::GetString(L"IDS_COM_BODY_EDIT_CANCEL"));
@@ -83,49 +92,60 @@ PlaylistCreatorForm::OnInitializing(void)
        __pPlaylistEditField->ShowKeypad();
        __pPlaylistEditorPresentationModel = PlaylistEditorPresentationModel::GetInstance();
 
+       AppLogDebug("EXIT");
        return E_SUCCESS;
 }
 
 result
 PlaylistCreatorForm::OnTerminating(void)
 {
-       //AppLogDebug("OnTerminating(void)");
+       AppLogDebug("ENTER");
        if (__pDataList != null)
        {
                __pDataList->RemoveAll(true);
                delete __pDataList;
        }
+       AppLogDebug("EXIT");
        return E_SUCCESS;
 }
 
 void
 PlaylistCreatorForm::OnKeypadActionPerformed(Tizen::Ui::Control& source,
-                                             Tizen::Ui::KeypadAction keypadAction)
+                                                       Tizen::Ui::KeypadAction keypadAction)
 {
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 
 void
 PlaylistCreatorForm::OnKeypadClosed(Tizen::Ui::Control& source)
 {
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 
 void
 PlaylistCreatorForm::OnKeypadOpened(Tizen::Ui::Control& source)
 {
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 
 void
 PlaylistCreatorForm::OnKeypadWillOpen(Tizen::Ui::Control &source)
 {
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 
 void
 PlaylistCreatorForm::OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previousSceneId,
-                                       const Tizen::Ui::Scenes::SceneId& currentSceneId,
-                                       Tizen::Base::Collection::IList* pArgs)
+                                               const Tizen::Ui::Scenes::SceneId& currentSceneId,
+                                               Tizen::Base::Collection::IList* pArgs)
 {
+       AppLogDebug("ENTER");
        String PlayListName = L"Playlist_";
-       ArrayList* pNumberList = new (std::nothrow)ArrayList();
+       ArrayList* pNumberList = new (std::nothrow) ArrayList();
        pNumberList->Construct();
 
        int numericPlaylist = 1;
@@ -137,7 +157,7 @@ PlaylistCreatorForm::OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previou
                int lastNum = 0;
                for (int i = 0; i < totalPlaylistCount; i++)
                {
-                       String* pStr = __pPlaylistEditorPresentationModel->GetPlayListName(i);
+                       String* pStr = __pPlaylistEditorPresentationModel->GetPlayListNameN(i);
                        if (pStr->GetLength() >= PlayListName.GetLength())
                        {
                                String pCompareStr = null;
@@ -163,7 +183,7 @@ PlaylistCreatorForm::OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previou
                                        if (pLastStr != null)
                                        {
                                                Integer::Parse(pLastStr, lastNum);
-                                               pNumberList->Add((new Integer(lastNum)));
+                                               pNumberList->Add((new (std::nothrow) Integer(lastNum)));
                                        }
                                }
                        }
@@ -218,25 +238,28 @@ PlaylistCreatorForm::OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previou
        {
                __pDataList = pArgs;
        }
+       AppLogDebug("EXIT");
 }
 
 void
 PlaylistCreatorForm::OnSceneDeactivated(const Tizen::Ui::Scenes::SceneId& currentSceneId,
-                                                          const Tizen::Ui::Scenes::SceneId& nextSceneId)
+                                                               const Tizen::Ui::Scenes::SceneId& nextSceneId)
 {
-       //AppLogDebug("OnSceneDeactivated : %ls, %ls", currentSceneId.GetPointer(), nextSceneId.GetPointer());
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 
 void
 PlaylistCreatorForm::OnActionPerformed(const Tizen::Ui::Control& source, int actionId)
 {
+       AppLogDebug("ENTER");
        SceneManager* pSceneManager = SceneManager::GetInstance();
        AppAssert(pSceneManager);
-       result r = E_SUCCESS;
+       result r = E_FAILURE;
 
-       switch(actionId)
+       switch (actionId)
        {
-               case IDC_BUTTON_SAVE:
+       case IDC_BUTTON_SAVE:
                {
                        if (__pPlaylistEditField->GetText().GetLength() == 0)
                        {
@@ -265,43 +288,37 @@ PlaylistCreatorForm::OnActionPerformed(const Tizen::Ui::Control& source, int act
                                        __pPlaylistEditField->ShowKeypad();
                                        break;
                                }
+                               r = E_FAILURE;
                                if (__pDataList != null)
                                {
                                        for (int index = 0; index < __pDataList->GetCount(); index++)
                                        {
-                                               AudioContentInfo* pAudioInfo = CommonUtil::GetAudioContentInfo(*(static_cast<String*>(__pDataList->GetAt(index))));
-                                               __pPlaylistEditorPresentationModel->AddItem(pAudioInfo->GetContentId(), editFieldName);
-                                       }
-
-                                       if (__previousSceneId.Equals(IDSCN_PLAYER, true) != true)
-                                       {
-                                               IListT<SceneId>* sceneList = pSceneManager->GetSceneHistoryN();
-                                                       pSceneManager->DestroyScene(__previousSceneId);
-
-                                               IEnumeratorT<SceneId>* pEnum = sceneList->GetEnumeratorN();
-                                               SceneId sceneID;
-                                               while (pEnum->MoveNext() == E_SUCCESS)
+                                               ContentId contentId = CommonUtil::GetContentId(*(static_cast<String*>(__pDataList->GetAt(index))));
+                                               if (!IsFailed(GetLastResult()))
                                                {
-                                                       pEnum->GetCurrent(sceneID);
-
-                                                       if (sceneID.Equals(__previousSceneId) == false)
-                                                       {
-                                                               pSceneManager->AddToSceneHistory(sceneID);
-                                                       }
+                                                       __pPlaylistEditorPresentationModel->AddItem(contentId, editFieldName);
                                                }
-                                               delete pEnum;
-                                               delete sceneList;
                                        }
+                                       __pPlaylistEditField->HideKeypad();
                                        pSceneManager->GoBackward(BackwardSceneTransition());
+                                       if (r == E_SUCCESS)
+                                       {
+                                               MessageBox messageBox;
+                                               messageBox.Construct(L"", ResourceManager::GetString(L"IDS_COM_POP_SUCCESS"),
+                                                                                               MSGBOX_STYLE_OK,
+                                                                                               3000);
+                                               int modalResult = 0;
+                                               messageBox.ShowAndWait(modalResult);
+                                       }
                                }
                                else
                                {
                                        CommonUtil::SetAddtoPlaylistState(true);
                                        CommonUtil::SetAddtoPlaylistName(editFieldName);
                                        pSceneManager->GoForward(ForwardSceneTransition(IDSCN_ALL_CONTENT_PICKER,
-                                                                                                                                  SCENE_TRANSITION_ANIMATION_TYPE_NONE,
-                                                                                                                                  SCENE_HISTORY_OPTION_NO_HISTORY,
-                                                                                                                                  SCENE_DESTROY_OPTION_DESTROY));
+                                                                                                                                       SCENE_TRANSITION_ANIMATION_TYPE_NONE,
+                                                                                                                                       SCENE_HISTORY_OPTION_NO_HISTORY,
+                                                                                                                                       SCENE_DESTROY_OPTION_DESTROY));
                                }
                        }
                        else
@@ -313,28 +330,32 @@ PlaylistCreatorForm::OnActionPerformed(const Tizen::Ui::Control& source, int act
                                __pPlaylistEditField->SetFocus();
                                __pPlaylistEditField->ShowKeypad();
                        }
-                       break;
                }
-               case IDC_BUTTON_CANCEL:
+               break;
+
+       case IDC_BUTTON_CANCEL:
                {
+                       __pPlaylistEditField->HideKeypad();
                        pSceneManager->GoBackward(BackwardSceneTransition());
-                       break;
-               }
-               default:
-               {
-                       break;
                }
+               break;
+
+       default:
+               break;
        }
+       AppLogDebug("EXIT");
 }
 
 void
 PlaylistCreatorForm::OnTextValueChanged(const Tizen::Ui::Control& source)
 {
-       //AppLogDebug("OnTextValueChanged");
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 
 void
 PlaylistCreatorForm::OnTextValueChangeCanceled(const Tizen::Ui::Control& source)
 {
-       //AppLogDebug("OnTextValueChangeCanceled");
-}
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
+}
\ No newline at end of file
index 6601312..4932e57 100644 (file)
@@ -1,4 +1,4 @@
-//
+//
 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
 //
 // Licensed under the Flora License, Version 1.0 (the License);
 // limitations under the License.
 //
 
-#include "MpPlaylistDB.h"
-#include "MpCommonUtil.h"
-#include "MpTypes.h"
+/**
+ * @file               MpPlaylistDB.cpp
+ * @brief              This is the implementation file for PlaylistDB class.
+ */
 
 #include <FApp.h>
+#include "MpCommonUtil.h"
+#include "MpPlaylistDB.h"
+#include "MpTypes.h"
 
-using namespace Tizen::Io;
 using namespace Tizen::App;
 using namespace Tizen::Base;
 using namespace Tizen::Base::Collection;
+using namespace Tizen::Io;
 
-PlaylistDB::PlaylistDB()
+PlaylistDB::PlaylistDB(void)
 {
-       AppLogDebug("Start");
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 
-PlaylistDB::~PlaylistDB()
+PlaylistDB::~PlaylistDB(void)
 {
-       AppLogDebug("End");
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 
 result
 PlaylistDB::CreatePlaylistDatabase(void)
 {
-       AppLogDebug("Start");
+       AppLogDebug("ENTER");
        Tizen::Base::String dbName(App::GetInstance()->GetAppRootPath() + DATABASE_PATH);
        Tizen::Base::String sql = null;
 
@@ -48,7 +54,7 @@ PlaylistDB::CreatePlaylistDatabase(void)
        {
                return r;
        }
-       Tizen::Io::Database *pDatabase = new (std::nothrow) Database();
+       Tizen::Io::DatabasepDatabase = new (std::nothrow) Database();
        TryCatch(pDatabase != null, r = E_FAILURE, "Database can not used new operator.%n[%ls]", GetErrorMessage(r));
        r = pDatabase->Construct(dbName, true);
        TryCatch(r == E_SUCCESS, r = E_FAILURE, "Database can not construct.%n[%ls]", GetErrorMessage(r));
@@ -61,11 +67,11 @@ PlaylistDB::CreatePlaylistDatabase(void)
        delete pDatabase;
        pDatabase = null;
 
-       AppLogDebug("End");
+       AppLogDebug("EXIT");
        return E_SUCCESS;
 
 CATCH:
-       if(pDatabase)
+       if (pDatabase)
        {
                delete pDatabase;
                pDatabase = null;
@@ -80,7 +86,7 @@ CATCH:
 result
 PlaylistDB::Insert(Tizen::Base::String& contentId, int playCount, Tizen::Base::String& playTime)
 {
-       AppLogDebug("Start");
+       AppLogDebug("ENTER");
        Tizen::Base::String dbName(App::GetInstance()->GetAppRootPath() + DATABASE_PATH);
        result r = E_SUCCESS;
 
@@ -88,7 +94,7 @@ PlaylistDB::Insert(Tizen::Base::String& contentId, int playCount, Tizen::Base::S
        Tizen::Base::String statement = null;
        DbEnumerator* pEnum = null;
 
-       Tizen::Io::Database *pDatabase = new (std::nothrow) Database();
+       Tizen::Io::DatabasepDatabase = new (std::nothrow) Database();
        TryCatch(pDatabase != null, r = E_FAILURE, "Database can not used new operator.%n[%ls]", GetErrorMessage(r));
        r = pDatabase->Construct(dbName, false);
        TryCatch(r == E_SUCCESS, r = E_FAILURE, "Database can not construct.%n[%ls]", GetErrorMessage(r));
@@ -116,7 +122,7 @@ PlaylistDB::Insert(Tizen::Base::String& contentId, int playCount, Tizen::Base::S
 
        delete pDatabase;
        pDatabase = null;
-       AppLogDebug("End");
+       AppLogDebug("EXIT");
        return r;
 
 CATCH:
@@ -130,7 +136,7 @@ CATCH:
                delete pStmt;
                pStmt = null;
        }
-       if(pDatabase)
+       if (pDatabase)
        {
                delete pDatabase;
                pDatabase = null;
@@ -145,7 +151,7 @@ CATCH:
 result
 PlaylistDB::Update(Tizen::Base::String& contentId, int playCount, Tizen::Base::String& playTime)
 {
-       AppLogDebug("Start");
+       AppLogDebug("ENTER");
        Tizen::Base::String dbName(App::GetInstance()->GetAppRootPath() + DATABASE_PATH);
 
        result r = E_SUCCESS;
@@ -154,7 +160,7 @@ PlaylistDB::Update(Tizen::Base::String& contentId, int playCount, Tizen::Base::S
        Tizen::Base::String statement = null;
        DbEnumerator* pEnum = null;
 
-       Tizen::Io::Database *pDatabase = new (std::nothrow) Database();
+       Tizen::Io::DatabasepDatabase = new (std::nothrow) Database();
        TryCatch(pDatabase != null, r = E_FAILURE, "Database can not used new operator.%n[%ls]", GetErrorMessage(r));
        r = pDatabase->Construct(dbName, false);
        TryCatch(r == E_SUCCESS, r = E_FAILURE, "Database can not construct.%n[%ls]", GetErrorMessage(r));
@@ -185,7 +191,7 @@ PlaylistDB::Update(Tizen::Base::String& contentId, int playCount, Tizen::Base::S
 
        delete pDatabase;
        pDatabase = null;
-       AppLogDebug("End");
+       AppLogDebug("EXIT");
        return r;
 
 CATCH:
@@ -199,7 +205,7 @@ CATCH:
                delete pStmt;
                pStmt = null;
        }
-       if(pDatabase)
+       if (pDatabase)
        {
                delete pDatabase;
                pDatabase = null;
@@ -214,7 +220,7 @@ CATCH:
 result
 PlaylistDB::Delete(Tizen::Base::String& contentId)
 {
-       AppLogDebug("Start");
+       AppLogDebug("ENTER");
        Tizen::Base::String dbName(App::GetInstance()->GetAppRootPath() + DATABASE_PATH);
        result r = E_SUCCESS;
 
@@ -222,7 +228,7 @@ PlaylistDB::Delete(Tizen::Base::String& contentId)
        Tizen::Base::String statement = null;
        DbEnumerator* pEnum = null;
 
-       Tizen::Io::Database *pDatabase = new (std::nothrow) Database();
+       Tizen::Io::DatabasepDatabase = new (std::nothrow) Database();
        TryCatch(pDatabase != null, r = E_FAILURE, "Database can not used new operator.%n[%ls]", GetErrorMessage(r));
        r = pDatabase->Construct(dbName, false);
        TryCatch(r == E_SUCCESS, r = E_FAILURE, "Database can not construct.%n[%ls]", GetErrorMessage(r));
@@ -246,7 +252,7 @@ PlaylistDB::Delete(Tizen::Base::String& contentId)
 
        delete pDatabase;
        pDatabase = null;
-       AppLogDebug("End");
+       AppLogDebug("EXIT");
        return r;
 
 CATCH:
@@ -260,7 +266,7 @@ CATCH:
                delete pStmt;
                pStmt = null;
        }
-       if(pDatabase)
+       if (pDatabase)
        {
                delete pDatabase;
                pDatabase = null;
@@ -275,7 +281,7 @@ CATCH:
 Tizen::Io::DbEnumerator*
 PlaylistDB::SearchN(int index)
 {
-       AppLogDebug("Start");
+       AppLogDebug("ENTER");
        Tizen::Base::String dbName(App::GetInstance()->GetAppRootPath() + DATABASE_PATH);
 
        result r = E_SUCCESS;
@@ -283,7 +289,7 @@ PlaylistDB::SearchN(int index)
        Tizen::Base::String statement = null;
        DbEnumerator* pEnum = null;
 
-       Tizen::Io::Database *pDatabase = new (std::nothrow) Database();
+       Tizen::Io::DatabasepDatabase = new (std::nothrow) Database();
        r = pDatabase->Construct(dbName, false);
        if (index == MOST_PLAYED_CONTENT)
        {
@@ -295,20 +301,20 @@ PlaylistDB::SearchN(int index)
        }
        else
        {
-               AppLogDebug("End");
+               AppLogDebug("EXIT");
                return null;
        }
 
        pEnum = pDatabase->QueryN(statement);
 
-       AppLogDebug("End");
+       AppLogDebug("EXIT");
        return pEnum;
 }
 
 result
 PlaylistDB::Read(Tizen::Base::String& contentId)
 {
-       AppLogDebug("Start");
+       AppLogDebug("ENTER");
        Tizen::Base::String dbName(App::GetInstance()->GetAppRootPath() + DATABASE_PATH);
 
        result r = E_KEY_NOT_FOUND;
@@ -318,7 +324,7 @@ PlaylistDB::Read(Tizen::Base::String& contentId)
        DbEnumerator* pEnum = null;
 //     int playCount = 0;
 
-       Tizen::Io::Database *pDatabase = new (std::nothrow) Database();
+       Tizen::Io::DatabasepDatabase = new (std::nothrow) Database();
 //     TryCatch(pDatabase != null, r = E_FAILURE, "Database can not used new operator.%n[%ls]", GetErrorMessage(r));
        pDatabase->Construct(dbName, false);
 //     TryCatch(r == E_SUCCESS, r = E_FAILURE, "Database can not construct.%n[%ls]", GetErrorMessage(r));
@@ -350,14 +356,14 @@ PlaylistDB::Read(Tizen::Base::String& contentId)
        delete pDatabase;
        pDatabase = null;
        //AppLogDebug("Read 8 : %d", playCount);
-       AppLogDebug("End");
+       AppLogDebug("EXIT");
        return r;
 }
 
 Tizen::Base::Collection::ArrayList*
 PlaylistDB::ReadValueN(Tizen::Base::String& contentId)
 {
-       AppLogDebug("Start");
+       AppLogDebug("ENTER");
        Tizen::Base::String dbName(App::GetInstance()->GetAppRootPath() + DATABASE_PATH);
 
        result r = E_SUCCESS;
@@ -365,7 +371,7 @@ PlaylistDB::ReadValueN(Tizen::Base::String& contentId)
        Tizen::Base::String statement = null;
        DbEnumerator* pEnum = null;
 
-       Tizen::Io::Database *pDatabase = new (std::nothrow) Database();
+       Tizen::Io::DatabasepDatabase = new (std::nothrow) Database();
        r = pDatabase->Construct(dbName, false);
        statement.Append(L"SELECT playCount, playTime FROM playlisttable");
 
@@ -373,7 +379,7 @@ PlaylistDB::ReadValueN(Tizen::Base::String& contentId)
        int playCount = 0;
        Tizen::Base::String playTime;
 
-       Tizen::Base::Collection::ArrayList* pTempList = new (std::nothrow)ArrayList();
+       Tizen::Base::Collection::ArrayList* pTempList = new (std::nothrow) ArrayList();
        pTempList->Construct();
 
        if (pEnum != null)
@@ -382,10 +388,10 @@ PlaylistDB::ReadValueN(Tizen::Base::String& contentId)
                {
                        pEnum->GetIntAt(0, playCount);
                        pEnum->GetStringAt(1, playTime);
-                       pTempList->Add(*(new Integer(playCount)));
-                       pTempList->Add(*(new String(playTime)));
+                       pTempList->Add(*(new (std::nothrow) Integer(playCount)));
+                       pTempList->Add(*(new (std::nothrow) String(playTime)));
                }
-               AppLogDebug("End");
+               AppLogDebug("EXIT");
        }
        else
        {
@@ -397,7 +403,7 @@ PlaylistDB::ReadValueN(Tizen::Base::String& contentId)
 
        delete pDatabase;
        pDatabase = null;
-       AppLogDebug("End");
 
+       AppLogDebug("EXIT");
        return pTempList;
-}
+}
\ No newline at end of file
old mode 100755 (executable)
new mode 100644 (file)
index 6ca936a..a59d468
@@ -1,4 +1,4 @@
-//
+//
 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
 //
 // Licensed under the Flora License, Version 1.0 (the License);
 // limitations under the License.
 //
 
+/**
+ * @file               MpPlaylistEditorPresentationModel.cpp
+ * @brief              This is the implementation file for PlaylistEditorPresentationModel class.
+ */
+
+#include "MpCommonUtil.h"
 #include "MpPlaylistEditorPresentationModel.h"
 #include "MpResourceManager.h"
-#include "MpCommonUtil.h"
 #include "MpTypes.h"
 
-using namespace Tizen::Base;
 using namespace Tizen::App;
-using namespace Tizen::Io;
-using namespace std;
+using namespace Tizen::Base;
 using namespace Tizen::Base::Collection;
 using namespace Tizen::Content;
+using namespace Tizen::Io;
 
 PlaylistEditorPresentationModel* PlaylistEditorPresentationModel::pPlaylistEditorPresentationModel = null;
 
 PlaylistEditorPresentationModel*
 PlaylistEditorPresentationModel::GetInstance(void)
 {
+       AppLogDebug("ENTER");
        if (pPlaylistEditorPresentationModel == null)
        {
                pPlaylistEditorPresentationModel = new (std::nothrow) PlaylistEditorPresentationModel();
@@ -40,66 +45,79 @@ PlaylistEditorPresentationModel::GetInstance(void)
                TryCatch(r == E_SUCCESS, , null, "PlayerPresentationModel instance is not constructed.");
        }
 
+       AppLogDebug("EXIT");
        return pPlaylistEditorPresentationModel;
 
 CATCH:
-//AppLogExceptionTag("PlaylistEditorPresentationModel", "PlaylistEditorPresentationModel::GetInstance(void) Error");
+       //AppLogException("PlaylistEditorPresentationModel::GetInstance(void) Error");
        delete pPlaylistEditorPresentationModel;
 
+       AppLogDebug("EXIT - CATCH");
        return null;
 }
 
 PlaylistEditorPresentationModel::PlaylistEditorPresentationModel(void)
 {
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 
 PlaylistEditorPresentationModel::~PlaylistEditorPresentationModel(void)
 {
-       //AppLogDebug("~PlaylistEditorPresentationModel");
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 
 result
-PlaylistEditorPresentationModel::Construct()
+PlaylistEditorPresentationModel::Construct(void)
 {
+       AppLogDebug("ENTER");
        result r = E_SUCCESS;
+       AppLogDebug("EXIT");
        return r;
 }
 
 int
 PlaylistEditorPresentationModel::GetPlayListItemCount(Tizen::Base::String& playlist)
 {
-       AppLogDebug("Start");
+       AppLogDebug("ENTER");
        PlayList* pPlayList = PlayListManager::GetInstance()->GetPlayListN(playlist);
        int itemCount = pPlayList->GetPlayListItemCount();
        delete pPlayList;
        pPlayList = null;
+
+       AppLogDebug("EXIT");
        return itemCount;
 }
 
 int
 PlaylistEditorPresentationModel::GetAllPlayListCount(void)
 {
-       AppLogDebug("Start");
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
        return PlayListManager::GetInstance()->GetAllPlayListCount();
 }
 
 Tizen::Base::Collection::IList*
 PlaylistEditorPresentationModel::GetAllPlayListNameN(void)
 {
+       AppLogDebug("ENTER");
 //     IList* pTempList = PlayListManager::GetInstance()->GetAllPlayListNameN();
 //     StringComparer strComparer;
 //     pTempList->Sort(strComparer);
+       AppLogDebug("EXIT");
 //     return pTempList;
        return PlayListManager::GetInstance()->GetAllPlayListNameN();
 }
 
 Tizen::Base::String*
-PlaylistEditorPresentationModel::GetPlayListName(int playlistIndex)
+PlaylistEditorPresentationModel::GetPlayListNameN(int playlistIndex)
 {
-       AppLogDebug("Start");
+       AppLogDebug("ENTER");
 //     IList* pTempList = PlayListManager::GetInstance()->GetAllPlayListNameN();
 //     StringComparer strComparer;
 //     pTempList->Sort(strComparer);
+       AppLogDebug("EXIT");
 //     return static_cast<String*>(pTempList->GetAt(playlistIndex));
        return static_cast<String*>(PlayListManager::GetInstance()->GetAllPlayListNameN()->GetAt(playlistIndex));
 }
@@ -107,7 +125,7 @@ PlaylistEditorPresentationModel::GetPlayListName(int playlistIndex)
 result
 PlaylistEditorPresentationModel::SetPlayListName(const Tizen::Base::String& oldPlayListName, const Tizen::Base::String& newPlayListName)
 {
-       AppLogDebug("Start");
+       AppLogDebug("ENTER");
        AppLogDebug("%ls, %ls", oldPlayListName.GetPointer(), newPlayListName.GetPointer());
        result r = E_SUCCESS;
        if (oldPlayListName != null)
@@ -125,13 +143,15 @@ PlaylistEditorPresentationModel::SetPlayListName(const Tizen::Base::String& oldP
                delete pPlaylist;
                pPlaylist = null;
        }
+
+       AppLogDebug("EXIT");
        return r;
 }
 
 Tizen::Graphics::Bitmap*
 PlaylistEditorPresentationModel::GetPlayListItemBitmap(Tizen::Base::String& playlist)
 {
-       AppLogDebug("Start");
+       AppLogDebug("ENTER");
        PlayList* pPlaylist = PlayListManager::GetInstance()->GetPlayListN(playlist);
        IList* pSearchList = pPlaylist->GetContentInfoListN();
        if (pSearchList == null)
@@ -165,21 +185,57 @@ PlaylistEditorPresentationModel::GetPlayListItemBitmap(Tizen::Base::String& play
        delete pPlaylist;
        pPlaylist = null;
 
+       AppLogDebug("EXIT");
        return pBitmap;
 }
 
+Tizen::Content::ContentId
+PlaylistEditorPresentationModel::GetPlayListItemContentId(Tizen::Base::String& playlist)
+{
+       AppLogDebug("ENTER");
+       PlayList* pPlaylist = PlayListManager::GetInstance()->GetPlayListN(playlist);
+       IList* pSearchList = pPlaylist->GetContentInfoListN();
+       if (pSearchList == null)
+       {
+               return null;
+       }
+       ContentInfo* pContentInfo = static_cast<ContentInfo*>(pSearchList->GetAt(0));
+       AudioContentInfo* pAudioContentInfo = static_cast<AudioContentInfo*>(pContentInfo);
+       if (pAudioContentInfo == null)
+       {
+               pSearchList->RemoveAll(true);
+               delete pSearchList;
+               pSearchList = null;
+               SetLastResult(E_FAILURE);
+               return ContentId();
+       }
+       ContentId contentId = pAudioContentInfo->GetContentId();
+       pSearchList->RemoveAll(true);
+       delete pSearchList;
+       pSearchList = null;
+       delete pPlaylist;
+       pPlaylist = null;
+
+       AppLogDebug("EXIT");
+       return contentId;
+}
+
 void
 PlaylistEditorPresentationModel::RemovePlayList(Tizen::Base::String& playlistName)
 {
+       AppLogDebug("ENTER");
        AppLogDebug("%ls", playlistName.GetPointer());
        PlayListManager::GetInstance()->RemovePlayList(playlistName);
+       AppLogDebug("EXIT");
 }
 
 void
 PlaylistEditorPresentationModel::AddItem(const Tizen::Content::ContentId& contentId, Tizen::Base::String& name)
 {
+       AppLogDebug("ENTER");
        PlayList* pPlayList = PlayListManager::GetInstance()->GetPlayListN(name);
        pPlayList->AddItem(contentId);
        delete pPlayList;
        pPlayList = null;
-}
+       AppLogDebug("EXIT");
+}
\ No newline at end of file
old mode 100755 (executable)
new mode 100644 (file)
index b6f9aaa..00e5b55
@@ -1,4 +1,4 @@
-//
+//
 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
 //
 // Licensed under the Flora License, Version 1.0 (the License);
 // limitations under the License.
 //
 
-#include "MpPlaylistListEditorPanel.h"
+/**
+ * @file               MpPlaylistListEditorPanel.cpp
+ * @brief              This is the implementation file for PlaylistListEditorPanel class.
+ */
+
 #include "MpPlaylistEditorPresentationModel.h"
-#include "MpSharePopup.h"
+#include "MpPlaylistListEditorPanel.h"
 #include "MpPlaylistPickerPopup.h"
+#include "MpSharePopup.h"
+#include "MpThumbnailInfo.h"
 
 using namespace Tizen::Base;
 using namespace Tizen::Base::Collection;
 using namespace Tizen::Content;
 using namespace Tizen::Graphics;
+using namespace Tizen::Social;
 using namespace Tizen::Ui;
 using namespace Tizen::Ui::Controls;
 using namespace Tizen::Ui::Scenes;
-using namespace Tizen::Social;
 
-static const int IDA_RENAME_EDIT_BUTTON   = 101;
+static const int IDA_RENAME_EDIT_BUTTON = 101;
 
 PlaylistListEditorPanel::PlaylistListEditorPanel(void)
-: __isEditMode(false)
-, __selectedItemIndex(-1)
-, __checkedItemCount(0)
-, __pContentTableView(null)
-, __pSelectAllCheckedButton(null)
-, __pCheckedCountLabel(null)
-, __pPlayListPickerPopup(null)
-, __pSharePopup(null)
-, __pPlaylistName(null)
-, __pItemPressedBackgroundColor(null)
+       : ThumbnailBase::ThumbnailBase()
+       , __isEditMode(false)
+       , __selectedItemIndex(-1)
+       , __checkedItemCount(0)
+       , __pContentTableView(null)
+       , __pSelectAllCheckedButton(null)
+       , __pCheckedCountLabel(null)
+       , __pThumbnail(null)
+       , __pPlayListPickerPopup(null)
+       , __pSharePopup(null)
+       , __pPlaylistName(null)
+       , __pItemPressedBackgroundColor(null)
 {
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 
 PlaylistListEditorPanel::~PlaylistListEditorPanel(void)
 {
-       //AppLogDebug("~PlaylistListEditorPanel");
-       AppLogDebug("Start");
-       AppLogDebug("End");
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 
 bool
 PlaylistListEditorPanel::Initialize(void)
 {
-       AppLogDebug("Start");
-       //AppLogDebug("Initialize");
-       result r = Construct(Rectangle(0, 0, W_INITIAL_PANEL, H_INITIAL_PANEL));
+       AppLogDebug("ENTER");
+       result r = BasePanel::Construct(Rectangle(0, 0, W_INITIAL_PANEL, H_INITIAL_PANEL));
        if (IsFailed(r))
        {
-               AppLogDebug("End");
+               AppLogDebug("EXIT");
                return false;
        }
-       AppLogDebug("End");
+       AppLogDebug("EXIT");
        return true;
 }
 
 result
 PlaylistListEditorPanel::OnInitializing(void)
 {
-       AppLogDebug("Start");
-       //AppLogDebug("OnInitializing");
+       AppLogDebug("ENTER");
        Form* pForm = dynamic_cast<Form*>(GetParent());
        AppAssert(pForm);
 
-       int width  = pForm->GetClientAreaBounds().width;
+       int width = pForm->GetClientAreaBounds().width;
        int height = pForm->GetClientAreaBounds().height;
 
        SetBounds(Rectangle(0, 0, width, height));
@@ -100,16 +107,14 @@ PlaylistListEditorPanel::OnInitializing(void)
        {
                __pSelectAllCheckedButton->SetShowState(true);
        }
-       AppLogDebug("End");
-       return E_SUCCESS;
+       AppLogDebug("EXIT");
+       return ThumbnailBase::Construct();
 }
 
 result
 PlaylistListEditorPanel::OnTerminating(void)
 {
-       AppLogDebug("Start");
-       //AppLogDebug("OnTerminating Start");
-       //AppLogDebug("OnTerminating End");
+       AppLogDebug("ENTER");
 
        delete __pPlayListPickerPopup;
        __pPlayListPickerPopup = null;
@@ -117,14 +122,14 @@ PlaylistListEditorPanel::OnTerminating(void)
        delete __pSharePopup;
        __pSharePopup = null;
 
-       AppLogDebug("End");
+       AppLogDebug("EXIT");
        return E_SUCCESS;
 }
 
 void
 PlaylistListEditorPanel::OnActionPerformed(const Tizen::Ui::Control& source, int actionId)
 {
-       AppLogDebug("Start");
+       AppLogDebug("ENTER");
        SceneManager* pSceneManager = SceneManager::GetInstance();
        AppAssert(pSceneManager);
 
@@ -135,194 +140,196 @@ PlaylistListEditorPanel::OnActionPerformed(const Tizen::Ui::Control& source, int
 
        Footer* pFooter = pForm->GetFooter();
 
-       switch(actionId)
+       switch (actionId)
        {
        case IDA_CHECK_BUTTON:
-       {
-               //AppLogDebug("IDA_CHECK_BUTTON");
-               if (__isEditMode == false)
-               {
-                       __checkedItemCount = totalCount;
-                       CommonUtil::SetAllCheckState(true, *__pContentTableView, totalCount);
-                       CommonUtil::ShowCheckedCountLabel(*__pCheckedCountLabel, __checkedItemCount, *__pContentTableView, *pForm);
-
-                       if (__checkedItemCount != 0)
-                       {
-                               pFooter->SetItemEnabled(0, true);
-                       }
-                       else
-                       {
-                               pFooter->SetItemEnabled(0, false);
-                       }
-                       pFooter->Invalidate(true);
-               }
-               else
                {
-                       if (__pSelectAllCheckedButton->IsSelected() == false)
+                       //AppLogDebug("IDA_CHECK_BUTTON");
+                       if (__isEditMode == false)
                        {
-                               __pSelectAllCheckedButton->SetSelected(true);
+                               __checkedItemCount = totalCount;
+                               CommonUtil::SetAllCheckState(true, *__pContentTableView, totalCount);
+                               CommonUtil::ShowCheckedCountLabel(*__pCheckedCountLabel, __checkedItemCount, *__pContentTableView, *pForm);
+
+                               if (__checkedItemCount != 0)
+                               {
+                                       pFooter->SetItemEnabled(0, true);
+                               }
+                               else
+                               {
+                                       pFooter->SetItemEnabled(0, false);
+                               }
+                               pFooter->Invalidate(true);
                        }
                        else
                        {
-                               __pSelectAllCheckedButton->SetSelected(false);
+                               if (__pSelectAllCheckedButton->IsSelected() == false)
+                               {
+                                       __pSelectAllCheckedButton->SetSelected(true);
+                               }
+                               else
+                               {
+                                       __pSelectAllCheckedButton->SetSelected(false);
+                               }
+                               __pEditingArea->HideKeypad();
+                               __isEditMode = false;
+                               __pContentTableView->RefreshItem(__selectedItemIndex, TABLE_VIEW_REFRESH_TYPE_ITEM_MODIFY);
+                               ShowFooter();
                        }
-                       __pEditingArea->HideKeypad();
-                       __isEditMode = false;
-                       __pContentTableView->RefreshItem(__selectedItemIndex, TABLE_VIEW_REFRESH_TYPE_ITEM_MODIFY);
-                       ShowFooter();
                }
                break;
-       }
+
        case IDA_UNCHECK_BUTTON:
-       {
-               //AppLogDebug("IDA_UNCHECK_BUTTON");
-               if (__isEditMode == false)
-               {
-                       __checkedItemCount = INIT_VALUE;
-                       CommonUtil::SetAllCheckState(false, *__pContentTableView, totalCount);
-                       CommonUtil::ShowCheckedCountLabel(*__pCheckedCountLabel, __checkedItemCount, *__pContentTableView, *pForm);
-                       if (__checkedItemCount != 0)
-                       {
-                               pFooter->SetItemEnabled(0, true);
-                       }
-                       else
-                       {
-                               pFooter->SetItemEnabled(0, false);
-                       }
-                       pFooter->Invalidate(true);
-               }
-               else
                {
-                       if (__pSelectAllCheckedButton->IsSelected() == false)
+                       //AppLogDebug("IDA_UNCHECK_BUTTON");
+                       if (__isEditMode == false)
                        {
-                               __pSelectAllCheckedButton->SetSelected(true);
+                               __checkedItemCount = INIT_VALUE;
+                               CommonUtil::SetAllCheckState(false, *__pContentTableView, totalCount);
+                               CommonUtil::ShowCheckedCountLabel(*__pCheckedCountLabel, __checkedItemCount, *__pContentTableView, *pForm);
+                               if (__checkedItemCount != 0)
+                               {
+                                       pFooter->SetItemEnabled(0, true);
+                               }
+                               else
+                               {
+                                       pFooter->SetItemEnabled(0, false);
+                               }
+                               pFooter->Invalidate(true);
                        }
                        else
                        {
-                               __pSelectAllCheckedButton->SetSelected(false);
+                               if (__pSelectAllCheckedButton->IsSelected() == false)
+                               {
+                                       __pSelectAllCheckedButton->SetSelected(true);
+                               }
+                               else
+                               {
+                                       __pSelectAllCheckedButton->SetSelected(false);
+                               }
+                               __pEditingArea->HideKeypad();
+                               __isEditMode = false;
+                               __pContentTableView->RefreshItem(__selectedItemIndex, TABLE_VIEW_REFRESH_TYPE_ITEM_MODIFY);
+                               ShowFooter();
                        }
-                       __pEditingArea->HideKeypad();
-                       __isEditMode = false;
-                       __pContentTableView->RefreshItem(__selectedItemIndex, TABLE_VIEW_REFRESH_TYPE_ITEM_MODIFY);
-                       ShowFooter();
                }
                break;
-       }
+
        case IDA_FOOTER_BUTTON_DELETE:
-       {
+               {
                if (__checkedItemCount <= INIT_VALUE)
                {
-                       AppLogDebug("End");
+                       AppLogDebug("EXIT");
                        return;
                }
 
-               ContentManager contentManager;
-               contentManager.Construct();
+                       ContentManager contentManager;
+                       contentManager.Construct();
 
-               int totalCount = __pPresentationModel->GetAllPlayListCount();
-               ArrayList* pTempList = new (std::nothrow) ArrayList();
-               pTempList->Construct();
-               for(int iCount = 0; iCount < totalCount; iCount++)
-               {
-                       AppLogDebug("%d", iCount);
-                       if (__pContentTableView->IsItemChecked(iCount) == true)
+                       int totalCount = __pPresentationModel->GetAllPlayListCount();
+                       ArrayList* pTempList = new (std::nothrow) ArrayList();
+                       pTempList->Construct();
+                       for (int iCount = 0; iCount < totalCount; iCount++)
                        {
-                               AppLogDebug("true %d", iCount);
-                               pTempList->Add(*(new String(*__pPresentationModel->GetPlayListName(iCount))));
-                       }
+                               AppLogDebug("%d", iCount);
+                               if (__pContentTableView->IsItemChecked(iCount) == true)
+                               {
+                                       AppLogDebug("true %d", iCount);
+                                       pTempList->Add(*(new (std::nothrow) String(*__pPresentationModel->GetPlayListNameN(iCount))));
+                               }
 
-                       __pContentTableView->SetItemChecked(iCount, false);
-               }
+                               __pContentTableView->SetItemChecked(iCount, false);
+                       }
 
-               if (pTempList != null)
-               {
-                       for (int i = 0; i < pTempList->GetCount(); i++)
+                       if (pTempList != null)
                        {
-                               __pPresentationModel->RemovePlayList(*static_cast<String*>(pTempList->GetAt(i)));
+                               for (int i = 0; i < pTempList->GetCount(); i++)
+                               {
+                                       __pPresentationModel->RemovePlayList(*static_cast<String*>(pTempList->GetAt(i)));
+                               }
                        }
-               }
-               __pContentTableView->UpdateTableView();
-               __pContentTableView->Invalidate(true);
+                       __pContentTableView->UpdateTableView();
+                       __pContentTableView->Invalidate(true);
 
-               __checkedItemCount = INIT_VALUE;
-               CommonUtil::ShowCheckedCountLabel(*__pCheckedCountLabel, __checkedItemCount, *__pContentTableView, *pForm);
-               CommonUtil::ShowSelectAllCheckButton(*__pSelectAllCheckedButton);
+                       __checkedItemCount = INIT_VALUE;
+                       CommonUtil::ShowCheckedCountLabel(*__pCheckedCountLabel, __checkedItemCount, *__pContentTableView, *pForm);
+                       CommonUtil::ShowSelectAllCheckButton(*__pSelectAllCheckedButton);
 
-               if (__pPresentationModel->GetAllPlayListCount() != 0)
-               {
-                       __pSelectAllCheckedButton->SetEnabled(true);
-               }
-               else
-               {
-                       __pSelectAllCheckedButton->SetEnabled(false);
+                       if (__pPresentationModel->GetAllPlayListCount() != 0)
+                       {
+                               __pSelectAllCheckedButton->SetEnabled(true);
+                       }
+                       else
+                       {
+                               __pSelectAllCheckedButton->SetEnabled(false);
+                       }
+                       pFooter->SetItemEnabled(0, false);
+                       pFooter->Invalidate(true);
                }
-               pFooter->SetItemEnabled(0, false);
-               pFooter->Invalidate(true);
                break;
-       }
+
        case IDA_FOOTER_BUTTON_CANCEL:
-       {
-               pSceneManager->GoBackward(BackwardSceneTransition());
-               break;
-       }
-       case IDA_RENAME_EDIT_BUTTON:
-       {
-               if (__isEditMode == false)
                {
-                       Integer::Parse(source.GetName(), __selectedItemIndex);
-                       AppLogDebug("__selectedItemIndex : %d", __selectedItemIndex);
-                       __isEditMode = true;
-                       __pContentTableView->RefreshItem(__selectedItemIndex, TABLE_VIEW_REFRESH_TYPE_ITEM_MODIFY);
-                       __pEditingArea->SetFocus();
-                       /* hojun.cheong */
-                       /*__pEditingArea->ShowKeypad();*/
-                       /* hojun.cheong */
-//                     pFooter->SetItemEnabled(0, false);
-//                     pFooter->Invalidate(true);
+                       pSceneManager->GoBackward(BackwardSceneTransition());
                }
-               else
+               break;
+
+       case IDA_RENAME_EDIT_BUTTON:
                {
-                       __pEditingArea->HideKeypad();
-                       AppLogDebug("__selectedItemIndex : %d", __selectedItemIndex);
-                       __isEditMode = false;
-                       __pContentTableView->RefreshItem(__selectedItemIndex, TABLE_VIEW_REFRESH_TYPE_ITEM_MODIFY);
-                       ShowFooter();
+                       if (__isEditMode == false)
+                       {
+                               Integer::Parse(source.GetName(), __selectedItemIndex);
+                               AppLogDebug("__selectedItemIndex : %d", __selectedItemIndex);
+                               __isEditMode = true;
+                               __pContentTableView->RefreshItem(__selectedItemIndex, TABLE_VIEW_REFRESH_TYPE_ITEM_MODIFY);
+                               __pEditingArea->SetFocus();
+                               /* hojun.cheong */
+                               /*__pEditingArea->ShowKeypad();*/
+                               /* hojun.cheong */
+//                             pFooter->SetItemEnabled(0, false);
+//                             pFooter->Invalidate(true);
+                       }
+                       else
+                       {
+                               __pEditingArea->HideKeypad();
+                               AppLogDebug("__selectedItemIndex : %d", __selectedItemIndex);
+                               __isEditMode = false;
+                               __pContentTableView->RefreshItem(__selectedItemIndex, TABLE_VIEW_REFRESH_TYPE_ITEM_MODIFY);
+                               ShowFooter();
+                       }
+//                     HideFooter();
+                       pFooter->SetItemEnabled(0, false);
+                       pFooter->Invalidate(true);
                }
-//             HideFooter();
-               pFooter->SetItemEnabled(0, false);
-               pFooter->Invalidate(true);
-
                break;
-       }
+
        case IDA_RENAME_CANCEL_BUTTON:
-       {
-               if (__isEditMode == true)
                {
-//                     __pEditingArea->HideKeypad();
-                       AppLogDebug("__selectedItemIndex : %d", __selectedItemIndex);
-                       __isEditMode = false;
-                       __pContentTableView->RefreshItem(__selectedItemIndex, TABLE_VIEW_REFRESH_TYPE_ITEM_MODIFY);
-                       /* hojun.cheong */
-                       /*ShowFooter();*/
-                       /* hojun.cheong */
+                       if (__isEditMode == true)
+                       {
+//                             __pEditingArea->HideKeypad();
+                               AppLogDebug("__selectedItemIndex : %d", __selectedItemIndex);
+                               __isEditMode = false;
+                               __pContentTableView->RefreshItem(__selectedItemIndex, TABLE_VIEW_REFRESH_TYPE_ITEM_MODIFY);
+                               /* hojun.cheong */
+                               /*ShowFooter();*/
+                               /* hojun.cheong */
+                       }
                }
                break;
-       }
+
        default:
-       {
                break;
-       }
        }//End of switch
-       AppLogDebug("End");
+       AppLogDebug("EXIT");
 }
 
 void
 PlaylistListEditorPanel::OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previousSceneId,
-                                                                          const Tizen::Ui::Scenes::SceneId& currentSceneId,
-                                                                          Tizen::Base::Collection::IList* pArgs)
+                                                                               const Tizen::Ui::Scenes::SceneId& currentSceneId,
+                                                                               Tizen::Base::Collection::IList* pArgs)
 {
-       AppLogDebug("Start");
-       //AppLogDebug("OnSceneActivatedN");
+       AppLogDebug("ENTER");
 
        Form* pForm = dynamic_cast<Form*>(GetParent());
        AppAssert(pForm);
@@ -355,14 +362,14 @@ PlaylistListEditorPanel::OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& pre
 
        UpdateContentList();
 
-       AppLogDebug("End");
+       AppLogDebug("EXIT");
 }
 
 void
 PlaylistListEditorPanel::OnSceneDeactivated(const Tizen::Ui::Scenes::SceneId& currentSceneId,
-                                            const Tizen::Ui::Scenes::SceneId& nextSceneId)
+                                                       const Tizen::Ui::Scenes::SceneId& nextSceneId)
 {
-       AppLogDebug("Start");
+       AppLogDebug("ENTER");
 
        if (__isEditMode == true)
        {
@@ -391,25 +398,25 @@ PlaylistListEditorPanel::OnSceneDeactivated(const Tizen::Ui::Scenes::SceneId& cu
        pFooter->RemoveAllItems();
        pFooter->RemoveActionEventListener(*this);
 
-
        __checkedItemCount = INIT_VALUE;
        CommonUtil::ShowCheckedCountLabel(*__pCheckedCountLabel, __checkedItemCount, *__pContentTableView, *pForm);
        CommonUtil::ShowSelectAllCheckButton(*__pSelectAllCheckedButton);
 
        int totalCount = __pPresentationModel->GetAllPlayListCount();
-       for(int iCount = 0; iCount < totalCount; iCount++)
+       for (int iCount = 0; iCount < totalCount; iCount++)
        {
                __pContentTableView->SetItemChecked(iCount, false);
        }
 
-       AppLogDebug("End");
+       CancelAllThumbnailRequest();
+       AppLogDebug("EXIT");
 }
 
 void
 PlaylistListEditorPanel::OnKeypadActionPerformed(Tizen::Ui::Control& source,
-                                                 Tizen::Ui::KeypadAction keypadAction)
+                                                               Tizen::Ui::KeypadAction keypadAction)
 {
-       AppLogDebug("Start");
+       AppLogDebug("ENTER");
        AppLogDebug("%d", keypadAction);
        result r = E_SUCCESS;
        if (keypadAction == KEYPAD_ACTION_DONE)
@@ -450,13 +457,13 @@ PlaylistListEditorPanel::OnKeypadActionPerformed(Tizen::Ui::Control& source,
                __pContentTableView->RefreshItem(__selectedItemIndex, TABLE_VIEW_REFRESH_TYPE_ITEM_MODIFY);
                ShowFooter();
        }
-       AppLogDebug("End");
+       AppLogDebug("EXIT");
 }
 
 void
 PlaylistListEditorPanel::OnKeypadClosed(Tizen::Ui::Control& source)
 {
-       AppLogDebug("Start");
+       AppLogDebug("ENTER");
        ShowFooter();
 //     int totalCount = __pPresentationModel->GetAllPlayListCount();
 //     for (int index = 0; index < totalCount; index++)
@@ -466,34 +473,34 @@ PlaylistListEditorPanel::OnKeypadClosed(Tizen::Ui::Control& source)
 //                     __pContentTableView->SetItemEnabled(index, true);
 //             }
 //     }
-       AppLogDebug("End");
+       AppLogDebug("EXIT");
 }
 
 void
 PlaylistListEditorPanel::OnKeypadOpened(Tizen::Ui::Control& source)
 {
-       AppLogDebug("Start");
+       AppLogDebug("ENTER");
 //     HideFooter();
 //     SetBoundList();
-       AppLogDebug("End");
+       AppLogDebug("EXIT");
 }
 
 void
-PlaylistListEditorPanel::OnKeypadWillOpen(Tizen::Ui::Control &source)
+PlaylistListEditorPanel::OnKeypadWillOpen(Tizen::Ui::Controlsource)
 {
-       AppLogDebug("Start");
+       AppLogDebug("ENTER");
        HideFooter();
-       AppLogDebug("End");
+       AppLogDebug("EXIT");
 }
 
 void
 PlaylistListEditorPanel::OnTextValueChanged(const Tizen::Ui::Control& source)
 {
-       AppLogDebug("Start : %ls", source.GetName().GetPointer());
+       AppLogDebug("ENTER : %ls", source.GetName().GetPointer());
        result r = E_SUCCESS;
-       EditArea* pEditArea = const_cast<EditArea *>(static_cast<const EditArea *>(&source));
-       __pPlaylistName = new String(pEditArea->GetText());
-       /* hojun.cheong */
+       EditArea* pEditArea = const_cast<EditArea*>(static_cast<const EditArea*>(&source));
+       __pPlaylistName = new (std::nothrow) String(pEditArea->GetText());
+
        if (__pPlaylistName->GetLength() == 0)
        {
                MessageBox messageBox;
@@ -528,64 +535,66 @@ PlaylistListEditorPanel::OnTextValueChanged(const Tizen::Ui::Control& source)
        __isEditMode = false;
        __pContentTableView->RefreshItem(__selectedItemIndex, TABLE_VIEW_REFRESH_TYPE_ITEM_MODIFY);
        ShowFooter();
-       /* hojun.cheong */
-       AppLogDebug("End");
+
+       AppLogDebug("EXIT");
 }
 
 void
 PlaylistListEditorPanel::OnTextValueChangeCanceled(const Tizen::Ui::Control& source)
 {
-       AppLogDebug("Start");
+       AppLogDebug("ENTER");
        __isEditMode = false;
        __pContentTableView->RefreshItem(__selectedItemIndex, TABLE_VIEW_REFRESH_TYPE_ITEM_MODIFY);
        ShowFooter();
-       AppLogDebug("End");
+       AppLogDebug("EXIT");
 }
 
 int
 PlaylistListEditorPanel::GetItemCount(void)
 {
-       AppLogDebug("Start");
+       AppLogDebug("ENTER");
 
        if (__pPresentationModel == null)
        {
-               AppLogDebug("End");
+               AppLogDebug("EXIT");
                return 0;
        }
-       AppLogDebug("End");
 
+       AppLogDebug("EXIT");
        return __pPresentationModel->GetAllPlayListCount();
 }
 
 Tizen::Ui::Controls::TableViewItem*
 PlaylistListEditorPanel::CreateItem(const int itemIndex, int itemWidth)
 {
-       AppLogDebug("Start");
+       AppLogDebug("ENTER");
        AppLogDebug("%d", itemIndex);
-       TableViewItem* pItem = new (std::nothrow) TableViewItem;
+       TableViewItem* pItem = new (std::nothrow) TableViewItem();
        pItem->Construct(Dimension(itemWidth, ITEM_HEIGHT), TABLE_VIEW_ANNEX_STYLE_MARK);
        pItem->SetBackgroundColor(COLOR_ITEM);
 
-       Tizen::Base::String* playlistName = __pPresentationModel->GetPlayListName(itemIndex);
-       Tizen::Graphics::Bitmap* thumbnail = null;
+       Tizen::Base::String* playlistName = __pPresentationModel->GetPlayListNameN(itemIndex);
+       Label* pThumbnailLabel = new (std::nothrow) Label();
+       pThumbnailLabel->Construct(Rectangle(16, 8, 112, 112), L"");
 
        int playlistItemCount = __pPresentationModel->GetPlayListItemCount(*playlistName);
-
-       if (playlistItemCount > 0)
+       ContentId contentId = __pPresentationModel->GetPlayListItemContentId(*playlistName);
+       if (playlistItemCount > 0 && !IsFailed(GetLastResult()))
        {
-               thumbnail = __pPresentationModel->GetPlayListItemBitmap(*playlistName);
+               RequestThumbnail(contentId, (new (std::nothrow) int(itemIndex)));
+               pThumbnailLabel->SetBackgroundBitmap(*GetDefaultThumbnail());
+               pThumbnailLabel->SetName(L"pThumbnailLabel");
        }
        else
        {
-               thumbnail = (ResourceManager::GetBitmapN(L"34_player_list_thum_noitems.png"));
-       }
-
-       thumbnail->Scale(Dimension(W_THUMBNAIL, H_THUMBNAIL));
+               Bitmap* thumbnail = (ResourceManager::GetBitmapN(L"34_player_list_thum_noitems.png"));
 
+               thumbnail->Scale(Dimension(W_THUMBNAIL, H_THUMBNAIL));
 
-       Label* pThumbnailLabel = new (std::nothrow) Label();
-       pThumbnailLabel->Construct(Rectangle(16, 8, 112, 112), L"");
-       pThumbnailLabel->SetBackgroundBitmap(*thumbnail);
+               pThumbnailLabel->SetBackgroundBitmap(*thumbnail);
+               delete thumbnail;
+               thumbnail = null;
+       }
 
        Label* pThumbnailBGLabel = new (std::nothrow) Label();
        pThumbnailBGLabel->Construct(Rectangle(15, 7, 113, 113), L"");
@@ -624,9 +633,6 @@ PlaylistListEditorPanel::CreateItem(const int itemIndex, int itemWidth)
        pItem->SetIndividualSelectionEnabled(pEditButton, true);
        str = null;
 
-       delete thumbnail;
-       thumbnail = null;
-
        delete pNormalBitmap;
        pNormalBitmap = null;
        delete pPressedBitmap;
@@ -636,14 +642,14 @@ PlaylistListEditorPanel::CreateItem(const int itemIndex, int itemWidth)
        delete pBackgroundPressBitmap;
        pBackgroundPressBitmap = null;
 
-       AppLogDebug("End");
+       AppLogDebug("EXIT");
        return pItem;
 }
 
 bool
 PlaylistListEditorPanel::DeleteItem(const int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem)
 {
-       AppLogDebug("Start");
+       AppLogDebug("ENTER");
        AppLogDebug("%d", itemIndex);
        if (__isEditMode == true)
        {
@@ -659,23 +665,36 @@ PlaylistListEditorPanel::DeleteItem(const int itemIndex, Tizen::Ui::Controls::Ta
        delete pItem;
        pItem = null;
 
-       AppLogDebug("End");
+       AppLogDebug("EXIT");
        return true;
 }
 
 void
 PlaylistListEditorPanel::UpdateItem(int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem)
 {
-       AppLogDebug("Start");
+       AppLogDebug("ENTER");
+       if (__pThumbnail != null)
+       {
+               Label* pThumbnailLabel = static_cast<Label*>(pItem->GetControl(L"pThumbnailLabel"));
+               if (pThumbnailLabel == null)
+               {
+                       AppLogDebug("pThumbnailLabel is null");
+                       return;
+               }
+               pThumbnailLabel->SetBackgroundBitmap(*__pThumbnail);
+               delete __pThumbnail;
+               __pThumbnail = null;
+               pThumbnailLabel->Invalidate(true);
+               return;
+       }
        if (__isEditMode == true)
        {
                pItem->RemoveAllControls();
 
                Tizen::Ui::Controls::EditArea* pEditArea = new (std::nothrow) EditArea();
-               /* hojun.cheong */
+
                /*pEditArea->Construct(Rectangle(0, 0, 500, 128), INPUT_STYLE_OVERLAY, 100);*/
-               pEditArea->Construct(Rectangle(0, 0, 500, 128), INPUT_STYLE_FULLSCREEN, 100);
-               /* hojun.cheong */
+               pEditArea->Construct(Rectangle(0, 0, 600, 128), INPUT_STYLE_FULLSCREEN, 100);
                pEditArea->SetName(RENAME_EDIT_AREA);
                pEditArea->SetOverlayKeypadCommandButtonVisible(false);
                pEditArea->SetKeypadActionEnabled(true);
@@ -685,50 +704,54 @@ PlaylistListEditorPanel::UpdateItem(int itemIndex, Tizen::Ui::Controls::TableVie
                pEditArea->AddActionEventListener(*this);
                __pEditingArea = pEditArea;
 
-               Tizen::Ui::Controls::Button* pCancelButton = new (std::nothrow) Button();
+               /*Tizen::Ui::Controls::Button* pCancelButton = new (std::nothrow) Button();
                pCancelButton->Construct(Rectangle(500, 0, 100, 128));
                pCancelButton->SetText(ResourceManager::GetString(L"IDS_COM_BODY_EDIT_CANCEL"));
                pCancelButton->SetTextSize(22);
 
                pCancelButton->SetName(RENAME_CALCEL_BUTTON);
                pCancelButton->SetActionId(IDA_RENAME_CANCEL_BUTTON);
-               pCancelButton->AddActionEventListener(*this);
+               pCancelButton->AddActionEventListener(*this);*/
 
                pItem->AddControl(*pEditArea);
-               pItem->AddControl(*pCancelButton);
+               /*pItem->AddControl(*pCancelButton);*/
 
                pItem->SetIndividualSelectionEnabled(pEditArea, true);
-               pItem->SetIndividualSelectionEnabled(pCancelButton, true);
+               /*pItem->SetIndividualSelectionEnabled(pCancelButton, true);*/
 
                pEditArea->SetText(*(static_cast<String*>(__pPresentationModel->GetAllPlayListNameN()->GetAt(itemIndex))));
-//             pEditArea->SetText(*(static_cast<String*>(__pPresentationModel->GetPlayListName(itemIndex))));
-               __pPlaylistName = new String(pEditArea->GetText());
+//             pEditArea->SetText(*(static_cast<String*>(__pPresentationModel->GetPlayListNameN(itemIndex))));
+               __pPlaylistName = new (std::nothrow) String(pEditArea->GetText());
 //             pEditArea->SetFocus();
 //             pEditArea->ShowKeypad();
 
 //             __pSelectAllCheckedButton->SetEnabled(false);
                __pItemPressedBackgroundColor = pItem->GetBackgroundColor(TABLE_VIEW_ITEM_DRAWING_STATUS_PRESSED);
-               pItem->SetBackgroundColor(Color(0,0,0,0),TABLE_VIEW_ITEM_DRAWING_STATUS_PRESSED);
+               pItem->SetBackgroundColor(Color(0, 0, 0, 0), TABLE_VIEW_ITEM_DRAWING_STATUS_PRESSED);
        }
        else if (__isEditMode == false)
        {
                pItem->RemoveAllControls();
-               Tizen::Base::String* playlistName = __pPresentationModel->GetPlayListName(itemIndex);
-               Tizen::Graphics::Bitmap* thumbnail = null;
+               Tizen::Base::String* playlistName = __pPresentationModel->GetPlayListNameN(itemIndex);
+               Label* pThumbnailLabel = new (std::nothrow) Label();
+               pThumbnailLabel->Construct(Rectangle(16, 8, 112, 112), L"");
                int playlistItemCount = __pPresentationModel->GetPlayListItemCount(*playlistName);
-               if (playlistItemCount > 0)
+               ContentId contentId = __pPresentationModel->GetPlayListItemContentId(*playlistName);
+               if (playlistItemCount > 0 && !IsFailed(GetLastResult()))
                {
-                       thumbnail = __pPresentationModel->GetPlayListItemBitmap(*playlistName);
+                       RequestThumbnail(contentId, (new (std::nothrow) int(itemIndex)));
+                       pThumbnailLabel->SetBackgroundBitmap(*GetDefaultThumbnail());
+                       pThumbnailLabel->SetName(L"pThumbnailLabel");
                }
                else
                {
-                       thumbnail = (ResourceManager::GetBitmapN(L"34_player_list_thum_noitems.png"));
-               }
-               thumbnail->Scale(Dimension(W_THUMBNAIL, H_THUMBNAIL));
+                       Bitmap* thumbnail = (ResourceManager::GetBitmapN(L"34_player_list_thum_noitems.png"));
+                       thumbnail->Scale(Dimension(W_THUMBNAIL, H_THUMBNAIL));
 
-               Label* pThumbnailLabel = new (std::nothrow) Label();
-               pThumbnailLabel->Construct(Rectangle(16, 8, 112, 112), L"");
-               pThumbnailLabel->SetBackgroundBitmap(*thumbnail);
+                       pThumbnailLabel->SetBackgroundBitmap(*thumbnail);
+                       delete thumbnail;
+                       thumbnail = null;
+               }
                Label* pThumbnailBGLabel = new (std::nothrow) Label();
                pThumbnailBGLabel->Construct(Rectangle(15, 7, 113, 113), L"");
                Label* pTitleLabel = new (std::nothrow) Label();
@@ -765,10 +788,7 @@ PlaylistListEditorPanel::UpdateItem(int itemIndex, Tizen::Ui::Controls::TableVie
                AppLogDebug("2");
                str = null;
 
-               pItem->SetBackgroundColor(__pItemPressedBackgroundColor,TABLE_VIEW_ITEM_DRAWING_STATUS_PRESSED);
-
-               delete thumbnail;
-               thumbnail = null;
+               pItem->SetBackgroundColor(__pItemPressedBackgroundColor, TABLE_VIEW_ITEM_DRAWING_STATUS_PRESSED);
 
                delete pNormalBitmap;
                pNormalBitmap = null;
@@ -787,25 +807,24 @@ PlaylistListEditorPanel::UpdateItem(int itemIndex, Tizen::Ui::Controls::TableVie
        {
                __pSelectAllCheckedButton->SetSelected(true);
        }
-       AppLogDebug("End");
+       AppLogDebug("EXIT");
 }
 
 int
 PlaylistListEditorPanel::GetDefaultItemHeight(void)
 {
-       AppLogDebug("Start");
-       AppLogDebug("End");
-       //AppLogDebug("UpdateItem");
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
        return ITEM_HEIGHT;
 }
 
 void
 PlaylistListEditorPanel::OnTableViewItemStateChanged(Tizen::Ui::Controls::TableView& tableView,
-                                                     int itemIndex,
-                                                     Tizen::Ui::Controls::TableViewItem* pItem,
-                                                     Tizen::Ui::Controls::TableViewItemStatus status)
+                                                               int itemIndex,
+                                                               Tizen::Ui::Controls::TableViewItem* pItem,
+                                                               Tizen::Ui::Controls::TableViewItemStatus status)
 {
-       AppLogDebug("Start");
+       AppLogDebug("ENTER");
        Form* pForm = dynamic_cast<Form*>(GetParent());
        AppAssert(pForm);
        if (__isEditMode == true)
@@ -836,27 +855,27 @@ PlaylistListEditorPanel::OnTableViewItemStateChanged(Tizen::Ui::Controls::TableV
 
        __selectedItemIndex = itemIndex;
 
-       switch(status)
+       switch (status)
        {
        case TABLE_VIEW_ITEM_STATUS_CHECKED:
-       {
-               __checkedItemCount++;
-               tableView.SetItemChecked(itemIndex, true);
+               {
+                       __checkedItemCount++;
+                       tableView.SetItemChecked(itemIndex, true);
+               }
                break;
-       }
+
        case TABLE_VIEW_ITEM_STATUS_UNCHECKED:
-       {
-               if (__checkedItemCount >0)
                {
-                       __checkedItemCount--;
+                       if (__checkedItemCount >0)
+                       {
+                               __checkedItemCount--;
+                       }
+                       tableView.SetItemChecked(itemIndex, false);
                }
-               tableView.SetItemChecked(itemIndex, false);
                break;
-       }
+
        default:
-       {
                break;
-       }
        }//end of switch
 
        if (__checkedItemCount == 0)
@@ -880,38 +899,36 @@ PlaylistListEditorPanel::OnTableViewItemStateChanged(Tizen::Ui::Controls::TableV
 
        Invalidate(true);
        CommonUtil::ShowCheckedCountLabel(*__pCheckedCountLabel, __checkedItemCount, *__pContentTableView, *pForm);
-       AppLogDebug("End");
+       AppLogDebug("EXIT");
 }
 
 void
 PlaylistListEditorPanel::OnTableViewContextItemActivationStateChanged(Tizen::Ui::Controls::TableView& tableView,
-                                                               int itemIndex,
-                                                               Tizen::Ui::Controls::TableViewContextItem* pContextItem,
-                                                               bool activated)
+                                                                       int itemIndex,
+                                                                       Tizen::Ui::Controls::TableViewContextItem* pContextItem,
+                                                                       bool activated)
 {
-       AppLogDebug("Start");
+       AppLogDebug("ENTER");
        if (activated == false)
        {
                return;
        }
-       AppLogDebug("End");
-       //AppLogDebug("PlaylistListEditorPanel__ OnTableViewContextItemActivationStateChanged");
+       AppLogDebug("EXIT");
 }
 
 void
 PlaylistListEditorPanel::OnTableViewItemReordered(Tizen::Ui::Controls::TableView& tableView,
-                                           int itemIndexFrom,
-                                           int itemIndexTo)
+                                                       int itemIndexFrom,
+                                                       int itemIndexTo)
 {
-       AppLogDebug("Start");
-       AppLogDebug("End");
-       //AppLogDebug("PlaylistListEditorPanel__ OnTableViewItemReordered");
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 
 void
 PlaylistListEditorPanel::ShowFooter(void)
 {
-       AppLogDebug( "Start");
+       AppLogDebug( "ENTER");
        Form* pForm = dynamic_cast<Form*>(GetParent());
        AppAssert(pForm);
        Footer* pFooter = pForm->GetFooter();
@@ -934,13 +951,13 @@ PlaylistListEditorPanel::ShowFooter(void)
 
 //     SetBoundList();
        CommonUtil::ShowCheckedCountLabel(*__pCheckedCountLabel, __checkedItemCount, *__pContentTableView, *pForm);
-       AppLogDebug( "End");
+       AppLogDebug( "EXIT");
 }
 
 void
 PlaylistListEditorPanel::HideFooter(void)
 {
-       AppLogDebug( "Start");
+       AppLogDebug( "ENTER");
        Form* pForm = dynamic_cast<Form*>(GetParent());
        AppAssert(pForm);
        Footer* pFooter = pForm->GetFooter();
@@ -954,32 +971,56 @@ PlaylistListEditorPanel::HideFooter(void)
        pForm->SetActionBarsVisible(FORM_ACTION_BAR_FOOTER, false);
 
        CommonUtil::ShowCheckedCountLabel(*__pCheckedCountLabel, 0, *__pContentTableView, *pForm);
-       AppLogDebug( "End");
+       AppLogDebug( "EXIT");
 }
 
 void
 PlaylistListEditorPanel::SetBoundList(void)
 {
+       AppLogDebug("ENTER");
        Form* pForm = dynamic_cast<Form*>(GetParent());
        AppAssert(pForm);
 
        Rectangle clientBounds = pForm->GetClientAreaBounds();
        __pContentTableView->SetBounds(0, H_SELECT_ALL_BUTTON, clientBounds.width, clientBounds.height - H_SELECT_ALL_BUTTON);
        __pContentTableView->Invalidate(true);
+       AppLogDebug("EXIT");
 }
 
 void
 PlaylistListEditorPanel::OnUpdateContentList(void)
 {
+       AppLogDebug("ENTER");
        UpdateContentList();
+       AppLogDebug("EXIT");
 }
 
 void
 PlaylistListEditorPanel::UpdateContentList(void)
 {
+       AppLogDebug("ENTER");
        if (__pPresentationModel != null && __pContentTableView != null)
        {
 //             __pPresentationModel->RefreshContent();
                __pContentTableView->UpdateTableView();
        }
+       AppLogDebug("EXIT");
 }
+
+void
+PlaylistListEditorPanel::OnThumbnailInfoReveivedN(ThumbnailInfo* pThumbnailInfo)
+{
+       AppLogDebug("ENTER");
+       int itemIndex = 0;
+       void* pParam = null;
+       __pThumbnail = pThumbnailInfo->GetBitmapN();
+       pParam = pThumbnailInfo->GetUserParamN();
+       if (pParam)
+       {
+               itemIndex = *(static_cast<int*>(pParam));
+       }
+       __pContentTableView->RefreshItem(itemIndex, TABLE_VIEW_REFRESH_TYPE_ITEM_MODIFY);
+       delete pThumbnailInfo;
+       delete static_cast<int*>(pParam);
+       AppLogDebug("EXIT");
+}
\ No newline at end of file
old mode 100755 (executable)
new mode 100644 (file)
index 0f8e5e2..d631db6
@@ -1,4 +1,4 @@
-//
+//
 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
 //
 // Licensed under the Flora License, Version 1.0 (the License);
 // limitations under the License.
 //
 
+/**
+ * @file               MpPlaylistListPanel.cpp
+ * @brief              This is the implementation file for PlaylistListPanel class.
+ */
+
+#include "MpCommonUtil.h"
+#include "MpNowPlayContentPanel.h"
 #include "MpPlaylistListPanel.h"
 #include "MpPlaylistListPresentationModel.h"
-#include "MpNowPlayContentPanel.h"
 #include "MpResourceManager.h"
-#include "MpCommonUtil.h"
 #include "MpSceneRegister.h"
+#include "MpThumbnailInfo.h"
 #include "MpTypes.h"
 
 using namespace Tizen::Base;
 using namespace Tizen::Base::Collection;
 using namespace Tizen::Content;
 using namespace Tizen::Graphics;
+using namespace Tizen::Social;
 using namespace Tizen::Ui;
 using namespace Tizen::Ui::Controls;
 using namespace Tizen::Ui::Scenes;
-using namespace Tizen::Social;
 
-static const Tizen::Graphics::Rectangle RECT_ITEM (144,  29, 400,  70);
+static const Tizen::Graphics::Rectangle RECT_ITEM (144, 29, 400, 70);
 
-static const int W_SONG_TIME              = 200;
-static const int H_DELETE_POPUP                = 100;
-static const int Y_DELETE_POPUP                =  10;
-static const int DELETE_WIDTH_POPUP            = 600;
-static const int DELETE_HEIGHT_POPUP           = 500;
+static const int W_SONG_TIME = 200;
+static const int H_DELETE_POPUP = 100;
+static const int Y_DELETE_POPUP =  10;
+static const int DELETE_WIDTH_POPUP = 600;
+static const int DELETE_HEIGHT_POPUP = 500;
 
-static const int Y_GAP_TABLE_VIEW_CONTENT_ITEM =  25;
-static const int X_GAP_TABLE_VIEW_CONTENT_ITEM =  14;
+static const int Y_GAP_TABLE_VIEW_CONTENT_ITEM = 25;
+static const int X_GAP_TABLE_VIEW_CONTENT_ITEM = 14;
 
 PlaylistListPanel::PlaylistListPanel(void)
-       : __pPlaylistListPresentationModel(null)
+       : ThumbnailBase::ThumbnailBase()
+       , __pPlaylistListPresentationModel(null)
+       , __pThumbnail(null)
        , __pContentTableView(null)
        , __pContextItem_default(null)
        , __pContextItem_user(null)
@@ -53,38 +61,34 @@ PlaylistListPanel::PlaylistListPanel(void)
        , __selectedItemIndex(-1)
        , __pPlaylistName(null)
 {
-       AppLogDebug("Start");
-       AppLogDebug("End");
-       //AppLogDebug("PlaylistListPanel");
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 
 PlaylistListPanel::~PlaylistListPanel(void)
 {
-       AppLogDebug("Start");
-       AppLogDebug("End");
-       //AppLogDebug("~PlaylistListPanel");
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 
 bool
 PlaylistListPanel::Initialize(void)
 {
-       //AppLogDebug("Initialize");
-       AppLogDebug("Start");
-       result r = Construct(Rectangle(0, 0, W_INITIAL_PANEL, H_INITIAL_PANEL));
+       AppLogDebug("ENTER");
+       result r = BasePanel::Construct(Rectangle(0, 0, W_INITIAL_PANEL, H_INITIAL_PANEL));
        if (IsFailed(r))
        {
-               AppLogDebug("End");
+               AppLogDebug("EXIT");
                return false;
        }
-       AppLogDebug("End");
+       AppLogDebug("EXIT");
        return true;
 }
 
 result
 PlaylistListPanel::OnInitializing(void)
 {
-       AppLogDebug("Start");
-       //AppLogDebug("OnInitializing");
+       AppLogDebug("ENTER");
 
        const Form* pForm = dynamic_cast<Form*> (GetParent());
        AppAssert(pForm);
@@ -94,14 +98,10 @@ PlaylistListPanel::OnInitializing(void)
 
        __pContentTableView = new (std::nothrow) TableView();
        __pContentTableView->Construct(Rectangle(0, 0, clientBounds.width, clientBounds.height),
-                                                                  true,
-                                                                  TABLE_VIEW_SCROLL_BAR_STYLE_FADE_OUT);
+                                                                       true,
+                                                                       TABLE_VIEW_SCROLL_BAR_STYLE_FADE_OUT);
        __pContentTableView->SetItemProvider(this);
        __pContentTableView->AddTableViewItemEventListener(*this);
-       __pContentTableView->AddTouchEventListener(*this);
-       __pContentTableView->SetDragEnabled(true);
-       __pContentTableView->SetDropEnabled(true);
-       __pContentTableView->AddDragDropEventListener(*this);
 
        __pContextItem_default = new (std::nothrow) TableViewContextItem();
        __pContextItem_default->Construct(Dimension(clientBounds.width, ITEM_HEIGHT));
@@ -116,17 +116,17 @@ PlaylistListPanel::OnInitializing(void)
 
        Label* pDeleteTitleLabel = new (std::nothrow) Label();
        pDeleteTitleLabel->Construct(Rectangle(0,
-                                                                                  0,
-                                                                                  __pDeletePopup->GetClientAreaBounds().width,
-                                                                                  __pDeletePopup->GetClientAreaBounds().height - H_DELETE_POPUP),
-                                                                ResourceManager::GetString(L"IDS_MUSIC_POP_DELETE_Q"));
+                                                                                       0,
+                                                                                       __pDeletePopup->GetClientAreaBounds().width,
+                                                                                       __pDeletePopup->GetClientAreaBounds().height - H_DELETE_POPUP),
+                                                                       ResourceManager::GetString(L"IDS_MUSIC_POP_DELETE_Q"));
 
        Button* pPopupDeleteButton = new (std::nothrow) Button();
        pPopupDeleteButton->Construct(Rectangle(0,
                                                                                        pDeleteTitleLabel->GetHeight() - Y_DELETE_POPUP,
                                                                                        __pDeletePopup->GetClientAreaBounds().width / 2,
                                                                                        H_DELETE_POPUP),
-                                                                 ResourceManager::GetString(L"IDS_MUSIC_OPT_DELETE"));
+                                                                       ResourceManager::GetString(L"IDS_MUSIC_OPT_DELETE"));
        pPopupDeleteButton->SetActionId(IDA_DELETE_POPUP_DELETE);
        pPopupDeleteButton->AddActionEventListener(*this);
 
@@ -135,7 +135,7 @@ PlaylistListPanel::OnInitializing(void)
                                                                                        pPopupDeleteButton->GetY(),
                                                                                        pPopupDeleteButton->GetWidth(),
                                                                                        pPopupDeleteButton->GetHeight()),
-                                                                 ResourceManager::GetString(L"IDS_COM_BODY_EDIT_CANCEL"));
+                                                                       ResourceManager::GetString(L"IDS_COM_BODY_EDIT_CANCEL"));
        pPopupCancelButton->SetActionId(IDA_DELETE_POPUP_CANCEL);
        pPopupCancelButton->AddActionEventListener(*this);
 
@@ -147,28 +147,29 @@ PlaylistListPanel::OnInitializing(void)
 
        __pPlaylistListPresentationModel = PlaylistListPresentationModel::GetInstance();
 
-       AppLogDebug("End");
-       return E_SUCCESS;
+       AppLogDebug("EXIT");
+       return ThumbnailBase::Construct();
 }
 
 result
 PlaylistListPanel::OnTerminating(void)
 {
-       AppLogDebug("Start");
-       AppLogDebug("End");
+       AppLogDebug("ENTER");
 
        delete __pContextItem_default;
        __pContextItem_default = null;
 
        delete __pContextItem_user;
        __pContextItem_user = null;
+
+       AppLogDebug("EXIT");
        return E_SUCCESS;
 }
 
 void
 PlaylistListPanel::OnActionPerformed(const Tizen::Ui::Control& source, int actionId)
 {
-       AppLogDebug("Start");
+       AppLogDebug("ENTER");
        AppLogDebug("OnActionPerformed : %d", actionId);
 
        SceneManager* pSceneManager = SceneManager::GetInstance();
@@ -179,126 +180,131 @@ PlaylistListPanel::OnActionPerformed(const Tizen::Ui::Control& source, int actio
 //
 //     Footer* pFooter = pForm->GetFooter();
 
-       switch(actionId)
+       switch (actionId)
        {
        case IDA_DELETE_POPUP_DELETE:
+               // fall through
        case IDA_DELETE_POPUP_CANCEL:
-       {
-               __pDeletePopup->SetShowState(false);
-               __pDeletePopup->Show();
-
-               if (actionId == IDA_DELETE_POPUP_DELETE)
                {
-                       String* pPlayName = __pPlaylistListPresentationModel->GetPlayListName(__selectedItemIndex - USER_CONTENT);
-                       __pPlaylistListPresentationModel->RemovePlayList(*pPlayName);
-
-                       __pContentTableView->UpdateTableView();
-                       Invalidate(true);
+                       __pDeletePopup->SetShowState(false);
+                       __pDeletePopup->Show();
 
+                       if (actionId == IDA_DELETE_POPUP_DELETE)
+                       {
+                               String* pPlayName = __pPlaylistListPresentationModel->GetPlayListNameN(__selectedItemIndex - USER_CONTENT);
+                               __pPlaylistListPresentationModel->RemovePlayList(*pPlayName);
+                               __pPlaylistListPresentationModel->UpdatePlaylistList();
+                               __pContentTableView->UpdateTableView();
+                               Invalidate(true);
+                       }
                }
                break;
-       }
+
        case IDA_FOOTER_BUTTON_EDIT:
-       {
-               if (__pPlaylistListPresentationModel->GetPlayListCount() == 0)
                {
-                       MessageBox messageBox;
-                       messageBox.Construct(L"", ResourceManager::GetString(L"IDS_MUSIC_BODY_NO_PLAYLISTS"), MSGBOX_STYLE_NONE, 500);
+                       if (__pPlaylistListPresentationModel->GetAllPlayListCount() == 0)
+                       {
+                               MessageBox messageBox;
+                               messageBox.Construct(L"", ResourceManager::GetString(L"IDS_MUSIC_BODY_NO_PLAYLISTS"), MSGBOX_STYLE_NONE, 500);
 
-                       int modalResult = 0;
-                       messageBox.ShowAndWait(modalResult);
-                       break;
-               }
+                               int modalResult = 0;
+                               messageBox.ShowAndWait(modalResult);
+                               break;
+                       }
 
-               if (__pPlaylistListPresentationModel->GetPlayListCount() != 0)
-               {
-                       pSceneManager->GoForward(ForwardSceneTransition(IDSCN_PLAYLIST_LIST_EDITOR));
+                       if (__pPlaylistListPresentationModel->GetAllPlayListCount() != 0)
+                       {
+                               pSceneManager->GoForward(ForwardSceneTransition(IDSCN_PLAYLIST_LIST_EDITOR));
+                       }
                }
                break;
-       }
+
        case IDA_FOOTER_BUTTON_CREATE_PLAYLIST:
-       {
-               pSceneManager->GoForward(ForwardSceneTransition(IDSCN_PLAYLIST_CREATOR));
+               {
+                       pSceneManager->GoForward(ForwardSceneTransition(IDSCN_PLAYLIST_CREATOR));
+               }
                break;
-       }
+
        case IDA_FOOTER_BUTTON_SEARCH:
-       {
-               pSceneManager->GoForward(ForwardSceneTransition(IDSCN_SEARCH));
+               {
+                       pSceneManager->GoForward(ForwardSceneTransition(IDSCN_SEARCH));
+               }
                break;
-       }
+
        case IDA_FLICK_BUTTON_PLAY_ALL:
-       {
-               ArrayList* pContentPath = __pPlaylistListPresentationModel->GetPlaylistContentList(__selectedItemIndex);
-               if (pContentPath == null || pContentPath->GetCount() == 0)
                {
-                       return;
-               }
+                       if (__selectedItemIndex >= USER_CONTENT)
+                       {
+                               String* pPlayName = __pPlaylistListPresentationModel->GetPlayListNameN(__selectedItemIndex - USER_CONTENT);
+                               __pPlaylistListPresentationModel->UpdatePlaylistContentList(USER_CONTENT, *pPlayName);
+                               delete pPlayName;
+                       }
+                       ArrayList* pContentPath = __pPlaylistListPresentationModel->GetContentPathListN(__selectedItemIndex);
 
-               ArrayList* pData = new (std::nothrow) ArrayList();
-               pData->Construct();
+                       if (pContentPath == null || pContentPath->GetCount() == 0)
+                       {
+                               return;
+                       }
 
-               pData->Add(*(new (std::nothrow)String(MUSIC)));
-               pData->Add(*(new (std::nothrow)Integer(0)));
-               pData->Add(*pContentPath);
+                       ArrayList* pData = new (std::nothrow) ArrayList();
+                       pData->Construct();
 
-               pSceneManager->GoForward(ForwardSceneTransition(IDSCN_PLAYER), pData);
+                       pData->Add(*(new (std::nothrow) String(MUSIC)));
+                       pData->Add(*(new (std::nothrow) Integer(0)));
+                       pData->Add(*pContentPath);
 
+                       pSceneManager->GoForward(ForwardSceneTransition(IDSCN_PLAYER), pData);
+               }
                break;
-       }
-       case IDA_FLICK_BUTTON_RENAME:
-       {
-               AppLogDebug("OnActionPerformed : %d", __selectedItemIndex);
-               __isEditMode = true;
-               __pContentTableView->RefreshItem(__selectedItemIndex, TABLE_VIEW_REFRESH_TYPE_ITEM_MODIFY);
-               __pEditingArea->SetFocus();
-               /* hojun.cheong */
-               /*__pEditingArea->ShowKeypad();*/
-               /* hojun.cheong */
 
-//             HideFooter();
+       case IDA_FLICK_BUTTON_RENAME:
+               {
+                       AppLogDebug("OnActionPerformed : %d", __selectedItemIndex);
+                       __isEditMode = true;
+                       __pContentTableView->RefreshItem(__selectedItemIndex, TABLE_VIEW_REFRESH_TYPE_ITEM_MODIFY);
+                       __pEditingArea->SetFocus();
+                       /* hojun.cheong */
+                       /*__pEditingArea->ShowKeypad();*/
+                       /* hojun.cheong */
+
+//                     HideFooter();
+               }
                break;
-       }
+
        case IDA_FLICK_BUTTON_DELETE:
-       {
-               if (__pDeletePopup != null)
                {
-                       __pDeletePopup->SetShowState(true);
-                       __pDeletePopup->Show();
+                       if (__pDeletePopup != null)
+                       {
+                               __pDeletePopup->SetShowState(true);
+                               __pDeletePopup->Show();
+                       }
                }
                break;
-       }
+
        case IDA_RENAME_CANCEL_BUTTON:
-       {
-       //      __pEditingArea->HideKeypad();
+               {
+//                     __pEditingArea->HideKeypad();
 
-               __isEditMode = false;
-               __pContentTableView->RefreshItem(__selectedItemIndex, TABLE_VIEW_REFRESH_TYPE_ITEM_MODIFY);
-               /* hojun.cheong */
-               /*ShowFooter();*/
-               /* hojun.cheong */
+                       __isEditMode = false;
+                       __pContentTableView->RefreshItem(__selectedItemIndex, TABLE_VIEW_REFRESH_TYPE_ITEM_MODIFY);
+                       /* hojun.cheong */
+                       /*ShowFooter();*/
+                       /* hojun.cheong */
+               }
                break;
-       }
+
        default:
-       {
                break;
-       }
        }//end of switch
 
-       AppLogDebug("End");
-}
-
-void
-PlaylistListPanel::OnTouchPressed(const Tizen::Ui::Control& source, const Tizen::Graphics::Point& currentPosition, const Tizen::Ui::TouchEventInfo& touchInfo)
-{
-       AppLogDebug("Start");
-       AppLogDebug("End");
+       AppLogDebug("EXIT");
 }
 
 void
 PlaylistListPanel::OnKeypadActionPerformed(Tizen::Ui::Control& source,
-                                           Tizen::Ui::KeypadAction keypadAction)
+                                                       Tizen::Ui::KeypadAction keypadAction)
 {
-       AppLogDebug("Start");
+       AppLogDebug("ENTER");
        result r = E_SUCCESS;
        if (keypadAction == KEYPAD_ACTION_DONE)
        {
@@ -315,7 +321,7 @@ PlaylistListPanel::OnKeypadActionPerformed(Tizen::Ui::Control& source,
                        inputString->Trim();
                        if (inputString->GetLength() != 0)
                        {
-                               r = __pPlaylistListPresentationModel->SetPlayListName(*__pPlaylistListPresentationModel->GetPlayListName(__selectedItemIndex - USER_CONTENT), *__pPlaylistName);
+                               r = __pPlaylistListPresentationModel->SetPlayListName(*__pPlaylistListPresentationModel->GetPlayListNameN(__selectedItemIndex - USER_CONTENT), *__pPlaylistName);
                                if (r != E_SUCCESS)
                                {
                                        MessageBox messageBox;
@@ -333,49 +339,50 @@ PlaylistListPanel::OnKeypadActionPerformed(Tizen::Ui::Control& source,
                                messageBox.ShowAndWait(modalResult);
                        }
                }
-//             __pPlaylistListPresentationModel->SetPlayListName(*__pPlaylistListPresentationModel->GetPlayListName(__selectedItemIndex - USER_CONTENT), *__pPlaylistName);
+//             __pPlaylistListPresentationModel->SetPlayListName(*__pPlaylistListPresentationModel->GetPlayListNameN(__selectedItemIndex - USER_CONTENT), *__pPlaylistName);
                __pEditingArea->HideKeypad();
 
                __isEditMode = false;
+               __pPlaylistListPresentationModel->UpdatePlaylistList();
                __pContentTableView->RefreshItem(__selectedItemIndex, TABLE_VIEW_REFRESH_TYPE_ITEM_MODIFY);
                ShowFooter();
        }
-       AppLogDebug("End");
+       AppLogDebug("EXIT");
 }
 
 void
 PlaylistListPanel::OnKeypadClosed(Tizen::Ui::Control& source)
 {
-       AppLogDebug("Start");
+       AppLogDebug("ENTER");
        ShowFooter();
-       AppLogDebug("End");
+       AppLogDebug("EXIT");
 }
 
 void
 PlaylistListPanel::OnKeypadOpened(Tizen::Ui::Control& source)
 {
-       AppLogDebug("Start");
+       AppLogDebug("ENTER");
 //     HideFooter();
 //     SetBoundList();
-       AppLogDebug("End");
+       AppLogDebug("EXIT");
 }
 
 void
 PlaylistListPanel::OnKeypadWillOpen(Tizen::Ui::Control &source)
 {
-       AppLogDebug("Start");
+       AppLogDebug("ENTER");
        HideFooter();
-       AppLogDebug("End");
+       AppLogDebug("EXIT");
 }
 
 void
 PlaylistListPanel::OnTextValueChanged(const Tizen::Ui::Control& source)
 {
-       AppLogDebug("Start");
+       AppLogDebug("ENTER");
        result r = E_SUCCESS;
-       EditArea* pEditArea = const_cast<EditArea *>(static_cast<const EditArea *>(&source));
-       __pPlaylistName = new String(pEditArea->GetText());
-       /* hojun.cheong */
+       EditArea* pEditArea = const_cast<EditArea*>(static_cast<const EditArea*>(&source));
+       __pPlaylistName = new (std::nothrow) String(pEditArea->GetText());
+
        if (__pPlaylistName->GetLength() == 0)
        {
                __isEditMode = false;
@@ -392,8 +399,7 @@ PlaylistListPanel::OnTextValueChanged(const Tizen::Ui::Control& source)
                inputString->Trim();
                if (inputString->GetLength() != 0)
                {
-                       r = __pPlaylistListPresentationModel->SetPlayListName(*__pPlaylistListPresentationModel->GetPlayListName(__selectedItemIndex - USER_CONTENT), *__pPlaylistName);
-                       AppLogDebug("111111");
+                       r = __pPlaylistListPresentationModel->SetPlayListName(*__pPlaylistListPresentationModel->GetPlayListNameN(__selectedItemIndex - USER_CONTENT), *__pPlaylistName);
                        if (r != E_SUCCESS)
                        {
                                MessageBox messageBox;
@@ -411,54 +417,38 @@ PlaylistListPanel::OnTextValueChanged(const Tizen::Ui::Control& source)
                        messageBox.ShowAndWait(modalResult);
                }
                __isEditMode = false;
+               __pPlaylistListPresentationModel->UpdatePlaylistList();
                __pContentTableView->RefreshItem(__selectedItemIndex, TABLE_VIEW_REFRESH_TYPE_ITEM_MODIFY);
        }
-       /* hojun.cheong */
-       AppLogDebug("End");
+
+       AppLogDebug("EXIT");
 }
 
 void
 PlaylistListPanel::OnTextValueChangeCanceled(const Tizen::Ui::Control& source)
 {
-       AppLogDebug("Start");
-       /* hojun.cheong */
+       AppLogDebug("ENTER");
+
        __isEditMode = false;
        __pContentTableView->RefreshItem(__selectedItemIndex, TABLE_VIEW_REFRESH_TYPE_ITEM_MODIFY);
-       /* hojun.cheong */
-       AppLogDebug("End");
-}
-
-void
-PlaylistListPanel::OnTouchDragged(const Tizen::Ui::Control& source,
-                                  const Tizen::Graphics::Point& startPosition,
-                                  const Tizen::Graphics::Point& currentPosition)
-{
-       AppLogDebug("Start");
-       AppLogDebug("End");
-}
 
-void
-PlaylistListPanel::OnTouchDropped(const Tizen::Ui::Control& source,
-                                  const Tizen::Graphics::Point& startPosition,
-                                  const Tizen::Graphics::Point& currentPosition)
-{
-       AppLogDebug("Start");
-       AppLogDebug("End");
+       AppLogDebug("EXIT");
 }
 
 void
 PlaylistListPanel::OnFormBackRequested(Tizen::Ui::Controls::Form& source)
 {
+       AppLogDebug("ENTER");
        Tizen::App::Application::GetInstance()->Terminate();
+       AppLogDebug("EXIT");
 }
 
 void
 PlaylistListPanel::OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previousSceneId,
-                                                                const Tizen::Ui::Scenes::SceneId& currentSceneId,
-                                                                Tizen::Base::Collection::IList* pArgs)
+                                                                       const Tizen::Ui::Scenes::SceneId& currentSceneId,
+                                                                       Tizen::Base::Collection::IList* pArgs)
 {
-       //AppLogDebug("OnSceneActivatedN");
-       AppLogDebug("Start");
+       AppLogDebug("ENTER");
        Form* pForm = dynamic_cast<Form*>(GetParent());
        AppAssert(pForm);
 
@@ -482,21 +472,19 @@ PlaylistListPanel::OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previousS
                }
                CommonUtil::ShowNowPlayPanel(*__pContentTableView, __pNowPlayContentPanel->GetPlayStatus(), pForm->GetClientAreaBounds());
        }
-
-       if (__pPlaylistListPresentationModel->GetPlayListCount() == 0)
+       UpdateContentList();
+       if (__pPlaylistListPresentationModel->GetAllPlayListCount() == 0)
        {
                pFooter->SetItemEnabled(0, false);
        }
-       UpdateContentList();
-       AppLogDebug("End");
+       AppLogDebug("EXIT");
 }
 
 void
 PlaylistListPanel::OnSceneDeactivated(const Tizen::Ui::Scenes::SceneId& currentSceneId,
-                                      const Tizen::Ui::Scenes::SceneId& nextSceneId)
+                                               const Tizen::Ui::Scenes::SceneId& nextSceneId)
 {
-       //AppLogDebug("OnSceneDeactivated");
-       AppLogDebug("Start");
+       AppLogDebug("ENTER");
        Form* pForm = dynamic_cast<Form*>(GetParent());
        AppAssert(pForm);
 
@@ -514,46 +502,59 @@ PlaylistListPanel::OnSceneDeactivated(const Tizen::Ui::Scenes::SceneId& currentS
        pFooter->RemoveAllButtons();
        pFooter->RemoveAllItems();
        pFooter->RemoveActionEventListener(*this);
-       AppLogDebug("End");
+       CancelAllThumbnailRequest();
+       AppLogDebug("EXIT");
 }
 
 int
 PlaylistListPanel::GetItemCount(void)
 {
-       if(__pPlaylistListPresentationModel == null)
+       AppLogDebug("ENTER");
+       if (__pPlaylistListPresentationModel == null)
        {
                return USER_CONTENT;
        }
-       return USER_CONTENT + __pPlaylistListPresentationModel->GetPlayListCount();
+       AppLogDebug("EXIT");
+       return USER_CONTENT + __pPlaylistListPresentationModel->GetAllPlayListCount();
 }
 
 Tizen::Ui::Controls::TableViewItem*
 PlaylistListPanel::CreateItem(const int itemIndex, int itemWidth)
 {
-       AppLogDebug("Start");
+       AppLogDebug("ENTER");
        AppLogDebug("%d", itemIndex);
 
-       TableViewItem* pTableItem = new TableViewItem();
+       TableViewItem* pTableItem = new (std::nothrow) TableViewItem();
        pTableItem->Construct(Dimension(itemWidth, ITEM_HEIGHT), TABLE_VIEW_ANNEX_STYLE_NORMAL);
-       pTableItem->AddDragDropEventListener(*this);
        pTableItem->SetBackgroundColor(COLOR_ITEM);
 
-       int ButtonWidth  = (pTableItem->GetWidth() - X_GAP_TABLE_VIEW_CONTENT_ITEM ) / 3;
+       int ButtonWidth = (pTableItem->GetWidth() - X_GAP_TABLE_VIEW_CONTENT_ITEM ) / 3;
        int ButtonHeight = pTableItem->GetHeight() - (Y_GAP_TABLE_VIEW_CONTENT_ITEM * 2);
 
        if (itemIndex < USER_CONTENT)
        {
                Tizen::Base::String pDefaultPlaylistTitle = null;
-               switch(itemIndex)
+               switch (itemIndex)
                {
                case MOST_PLAYED_CONTENT:
-                       pDefaultPlaylistTitle = ResourceManager::GetString(L"IDS_MUSIC_BODY_MOST_PLAYED");
+                       {
+                               pDefaultPlaylistTitle = ResourceManager::GetString(L"IDS_MUSIC_BODY_MOST_PLAYED");
+                       }
                        break;
+
                case RECENTLY_PLAYED_CONTENT:
-                       pDefaultPlaylistTitle = ResourceManager::GetString(L"IDS_MUSIC_BODY_RECENTLY_PLAYED");
+                       {
+                               pDefaultPlaylistTitle = ResourceManager::GetString(L"IDS_MUSIC_BODY_RECENTLY_PLAYED");
+                       }
                        break;
+
                case RECENTLY_ADDED_CONTENT:
-                       pDefaultPlaylistTitle = ResourceManager::GetString(L"IDS_MUSIC_BODY_RECENTLY_ADDED");
+                       {
+                               pDefaultPlaylistTitle = ResourceManager::GetString(L"IDS_MUSIC_BODY_RECENTLY_ADDED");
+                       }
+                       break;
+
+               default:
                        break;
                }
 
@@ -574,30 +575,30 @@ PlaylistListPanel::CreateItem(const int itemIndex, int itemWidth)
                __pContextItem_default->AddControl(*pPlayAllButton);
                pTableItem->SetContextItem(__pContextItem_default);
 
-               AppLogDebug( "__pContextItem_default->GetHeight() : %d, __pContextItem_default->GetWidth() : %d", __pContextItem_default->GetHeight(),__pContextItem_default->GetWidth());
+               AppLogDebug("__pContextItem_default->GetHeight() : %d, __pContextItem_default->GetWidth() : %d", __pContextItem_default->GetHeight(), __pContextItem_default->GetWidth());
        }
        else
        {
-               Tizen::Base::String* playlistName = __pPlaylistListPresentationModel->GetPlayListName(itemIndex - USER_CONTENT);
-               Tizen::Graphics::Bitmap* thumbnail = null;
+               Tizen::Base::String* playlistName = __pPlaylistListPresentationModel->GetPlayListNameN(itemIndex - USER_CONTENT);
 
                int playlistItemCount = __pPlaylistListPresentationModel->GetPlayListItemCount(*playlistName);
-
-               if (playlistItemCount > 0)
+               ContentId contentId = __pPlaylistListPresentationModel->GetPlayListItemContentId(*playlistName);
+               if (playlistItemCount > 0 && !IsFailed(GetLastResult()))
                {
-                       thumbnail = __pPlaylistListPresentationModel->GetPlayListItemBitmap(*playlistName);
+                       RequestThumbnail(contentId, (new (std::nothrow) int(itemIndex)));
+                       CreateTableViewItem(*pTableItem, *playlistName, *GetDefaultThumbnail(), playlistItemCount);
                }
                else
                {
-                       thumbnail = (ResourceManager::GetBitmapN(L"34_player_list_thum_noitems.png"));
-               }
+                       Bitmap* thumbnail = (ResourceManager::GetBitmapN(L"34_player_list_thum_noitems.png"));
 
-               thumbnail->Scale(Dimension(W_THUMBNAIL, H_THUMBNAIL));
+                       thumbnail->Scale(Dimension(W_THUMBNAIL, H_THUMBNAIL));
 
-               CreateTableViewItem(*pTableItem, *playlistName, *thumbnail, playlistItemCount);
+                       CreateTableViewItem(*pTableItem, *playlistName, *thumbnail, playlistItemCount);
 
-               delete thumbnail;
-               thumbnail = null;
+                       delete thumbnail;
+                       thumbnail = null;
+               }
 
                Button* pPlayAllButton = new (std::nothrow) Button();
                pPlayAllButton->Construct(Rectangle(X_GAP_TABLE_VIEW_CONTENT_ITEM,
@@ -639,14 +640,14 @@ PlaylistListPanel::CreateItem(const int itemIndex, int itemWidth)
                pTableItem->SetContextItem(__pContextItem_user);
        }
 
-       AppLogDebug("End");
+       AppLogDebug("EXIT");
        return pTableItem;
 }
 
 bool
 PlaylistListPanel::DeleteItem(const int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem)
 {
-       AppLogDebug("Start");
+       AppLogDebug("ENTER");
        AppLogDebug("%d", itemIndex);
 
        if (__isEditMode == true)
@@ -663,23 +664,36 @@ PlaylistListPanel::DeleteItem(const int itemIndex, Tizen::Ui::Controls::TableVie
        delete pItem;
        pItem = null;
 
-       AppLogDebug("End");
+       AppLogDebug("EXIT");
        return true;
 }
 
 void
 PlaylistListPanel::UpdateItem(int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem)
 {
-       AppLogDebug("Start");
+       AppLogDebug("ENTER");
+       if (__pThumbnail != null)
+       {
+               Label* pThumbnailLabel = static_cast<Label*>(pItem->GetControl(L"pSongThumbnailLabel"));
+               if (pThumbnailLabel == null)
+               {
+                       AppLogDebug("pThumbnailLabel is null");
+                       return;
+               }
+               pThumbnailLabel->SetBackgroundBitmap(*__pThumbnail);
+               delete __pThumbnail;
+               __pThumbnail = null;
+               pThumbnailLabel->Invalidate(true);
+               return;
+       }
        if (__isEditMode == true)
        {
                pItem->RemoveAllControls();
 
                Tizen::Ui::Controls::EditArea* pEditArea = new (std::nothrow) EditArea();
-               /* hojun.cheong */
+
                /*pEditArea->Construct(Rectangle(0, 0, 592, 128), INPUT_STYLE_OVERLAY, 100);*/
-               pEditArea->Construct(Rectangle(0, 0, 592, 128), INPUT_STYLE_FULLSCREEN, 100);
-               /* hojun.cheong */
+               pEditArea->Construct(Rectangle(0, 0, pItem->GetWidth(), 128), INPUT_STYLE_FULLSCREEN, 100);
                pEditArea->SetName(RENAME_EDIT_AREA);
                pEditArea->SetOverlayKeypadCommandButtonVisible(false);
                pEditArea->SetKeypadActionEnabled(true);
@@ -689,52 +703,52 @@ PlaylistListPanel::UpdateItem(int itemIndex, Tizen::Ui::Controls::TableViewItem*
                pEditArea->AddActionEventListener(*this);
                __pEditingArea = pEditArea;
 
-               Tizen::Ui::Controls::Button* pCancelButton = new (std::nothrow) Button();
+               /*Tizen::Ui::Controls::Button* pCancelButton = new (std::nothrow) Button();
                pCancelButton->Construct(Rectangle(592, 0, 128, 128));
                pCancelButton->SetText(ResourceManager::GetString(L"IDS_COM_BODY_EDIT_CANCEL"));
                pCancelButton->SetTextSize(22);
 
                pCancelButton->SetName(RENAME_CALCEL_BUTTON);
                pCancelButton->SetActionId(IDA_RENAME_CANCEL_BUTTON);
-               pCancelButton->AddActionEventListener(*this);
+               pCancelButton->AddActionEventListener(*this);*/
 
                pItem->AddControl(*pEditArea);
-               pItem->AddControl(*pCancelButton);
+               /*pItem->AddControl(*pCancelButton);*/
 
                pItem->SetIndividualSelectionEnabled(pEditArea, true);
-               pItem->SetIndividualSelectionEnabled(pCancelButton, true);
+               /*pItem->SetIndividualSelectionEnabled(pCancelButton, true);*/
 
                pItem->SetContextItem(null);
 
-               pEditArea->SetText(*__pPlaylistListPresentationModel->GetPlayListName(itemIndex - USER_CONTENT));
-               __pPlaylistName = new String(pEditArea->GetText());
+               pEditArea->SetText(*__pPlaylistListPresentationModel->GetPlayListNameN(itemIndex - USER_CONTENT));
+               __pPlaylistName = new (std::nothrow) String(pEditArea->GetText());
        }
        else if (__isEditMode == false)
        {
                pItem->RemoveAllControls();
 
-               Tizen::Base::String* playlistName = __pPlaylistListPresentationModel->GetPlayListName(itemIndex - USER_CONTENT);
-               Tizen::Graphics::Bitmap* thumbnail = null;
+               Tizen::Base::String* playlistName = __pPlaylistListPresentationModel->GetPlayListNameN(itemIndex - USER_CONTENT);
 
                int playlistItemCount = __pPlaylistListPresentationModel->GetPlayListItemCount(*playlistName);
-
-               if (playlistItemCount > 0)
+               ContentId contentId = __pPlaylistListPresentationModel->GetPlayListItemContentId(*playlistName);
+               if (playlistItemCount > 0 && !IsFailed(GetLastResult()))
                {
-                       thumbnail = __pPlaylistListPresentationModel->GetPlayListItemBitmap(*playlistName);
+                       RequestThumbnail(contentId, (new (std::nothrow) int(itemIndex)));
+                       CreateTableViewItem(*pItem, *playlistName, *GetDefaultThumbnail(), playlistItemCount);
                }
                else
                {
-                       thumbnail = (ResourceManager::GetBitmapN(L"34_player_list_thum_noitems.png"));
-               }
+                       Bitmap* thumbnail = (ResourceManager::GetBitmapN(L"34_player_list_thum_noitems.png"));
 
-               thumbnail->Scale(Dimension(W_THUMBNAIL, H_THUMBNAIL));
+                       thumbnail->Scale(Dimension(W_THUMBNAIL, H_THUMBNAIL));
 
-               CreateTableViewItem(*pItem, *playlistName, *thumbnail, playlistItemCount);
+                       CreateTableViewItem(*pItem, *playlistName, *thumbnail, playlistItemCount);
 
-               delete thumbnail;
-               thumbnail = null;
+                       delete thumbnail;
+                       thumbnail = null;
+               }
 
-               int ButtonWidth  = (pItem->GetWidth() - X_GAP_TABLE_VIEW_CONTENT_ITEM ) / 3;
+               int ButtonWidth = (pItem->GetWidth() - X_GAP_TABLE_VIEW_CONTENT_ITEM ) / 3;
                int ButtonHeight = pItem->GetHeight() - (Y_GAP_TABLE_VIEW_CONTENT_ITEM * 2);
 
                Button* pPlayAllButton = new (std::nothrow) Button();
@@ -785,24 +799,24 @@ PlaylistListPanel::UpdateItem(int itemIndex, Tizen::Ui::Controls::TableViewItem*
                }
                pItem->SetContextItem(__pContextItem_user);
        }
-       AppLogDebug("End");
+       AppLogDebug("EXIT");
 }
 
 int
 PlaylistListPanel::GetDefaultItemHeight(void)
 {
-       AppLogDebug("Start");
-       AppLogDebug("End");
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
        return ITEM_HEIGHT;
 }
 
 void
 PlaylistListPanel::OnTableViewItemStateChanged(Tizen::Ui::Controls::TableView& tableView,
-                                               int itemIndex,
-                                               Tizen::Ui::Controls::TableViewItem* pItem,
-                                               Tizen::Ui::Controls::TableViewItemStatus status)
+                                                       int itemIndex,
+                                                       Tizen::Ui::Controls::TableViewItem* pItem,
+                                                       Tizen::Ui::Controls::TableViewItemStatus status)
 {
-       AppLogDebug("Start");
+       AppLogDebug("ENTER");
        if (__isEditMode == true)
        {
                __pEditingArea->HideKeypad();
@@ -819,41 +833,52 @@ PlaylistListPanel::OnTableViewItemStateChanged(Tizen::Ui::Controls::TableView& t
 
                ArrayList* pData = new (std::nothrow) ArrayList();
                pData->Construct();
-               pData->Add(*(new String(IDSCN_PLAYLIST_LIST)));
+               pData->Add(*(new (std::nothrow) String(IDSCN_PLAYLIST_LIST)));
 
                if (itemIndex <= RECENTLY_ADDED_CONTENT)
                {
                        Tizen::Base::String pDefaultPlaylistTitle = null;
-                       switch(itemIndex)
+                       switch (itemIndex)
                        {
                        case MOST_PLAYED_CONTENT:
-                               pDefaultPlaylistTitle = ResourceManager::GetString(L"IDS_MUSIC_BODY_MOST_PLAYED");
+                               {
+                                       pDefaultPlaylistTitle = ResourceManager::GetString(L"IDS_MUSIC_BODY_MOST_PLAYED");
+                               }
                                break;
+
                        case RECENTLY_PLAYED_CONTENT:
-                               pDefaultPlaylistTitle = ResourceManager::GetString(L"IDS_MUSIC_BODY_RECENTLY_PLAYED");
+                               {
+                                       pDefaultPlaylistTitle = ResourceManager::GetString(L"IDS_MUSIC_BODY_RECENTLY_PLAYED");
+                               }
                                break;
+
                        case RECENTLY_ADDED_CONTENT:
-                               pDefaultPlaylistTitle = ResourceManager::GetString(L"IDS_MUSIC_BODY_RECENTLY_ADDED");
+                               {
+                                       pDefaultPlaylistTitle = ResourceManager::GetString(L"IDS_MUSIC_BODY_RECENTLY_ADDED");
+                               }
+                               break;
+
+                       default:
                                break;
                        }
 
-                       pData->Add(*(new String(pDefaultPlaylistTitle)));
-                       pData->Add(*(new Integer(itemIndex)));
+                       pData->Add(*(new (std::nothrow) String(pDefaultPlaylistTitle)));
+                       pData->Add(*(new (std::nothrow) Integer(itemIndex)));
 
                        pSceneManager->GoForward(ForwardSceneTransition(IDSCN_PLAYLIST_CONTENT_LIST), pData);
                }
                else
                {
-                       Tizen::Base::String* pPlaylistName = __pPlaylistListPresentationModel->GetPlayListName(itemIndex - USER_CONTENT);
+                       Tizen::Base::String* pPlaylistName = __pPlaylistListPresentationModel->GetPlayListNameN(itemIndex - USER_CONTENT);
                        if (pPlaylistName != null)
                        {
-                               pData->Add(*(new String(*pPlaylistName)));
+                               pData->Add(*(new (std::nothrow) String(*pPlaylistName)));
                        }
                        else
                        {
-                               pData->Add(*(new String(L"")));
+                               pData->Add(*(new (std::nothrow) String(L"")));
                        }
-//                     pData->Add(*(new String(*__pPlaylistListPresentationModel->GetPlayListName(itemIndex - USER_CONTENT))));
+//                     pData->Add(*(new (std::nothrow) String(*__pPlaylistListPresentationModel->GetPlayListNameN(itemIndex - USER_CONTENT))));
 
                        pSceneManager->GoForward(ForwardSceneTransition(IDSCN_USER_PLAYLIST_CONTENT_LIST), pData);
                }
@@ -862,19 +887,19 @@ PlaylistListPanel::OnTableViewItemStateChanged(Tizen::Ui::Controls::TableView& t
                pData = null;
        }
 
-       AppLogDebug("End");
+       AppLogDebug("EXIT");
 }
 
 void
 PlaylistListPanel::OnTableViewContextItemActivationStateChanged(Tizen::Ui::Controls::TableView& tableView,
-                                                                int itemIndex,
-                                                                Tizen::Ui::Controls::TableViewContextItem* pContextItem,
-                                                                bool activated)
+                                                                               int itemIndex,
+                                                                               Tizen::Ui::Controls::TableViewContextItem* pContextItem,
+                                                                               bool activated)
 {
-       AppLogDebug("Start");
+       AppLogDebug("ENTER");
        if (activated == false)
        {
-               AppLogDebug("End");
+               AppLogDebug("EXIT");
                return;
        }
        if (__isEditMode == true)
@@ -886,27 +911,26 @@ PlaylistListPanel::OnTableViewContextItemActivationStateChanged(Tizen::Ui::Contr
                ShowFooter();
        }
        __selectedItemIndex = itemIndex;
-       AppLogDebug("End");
+       AppLogDebug("EXIT");
        //AppLogDebug("OnTableViewContextItemActivationStateChanged");
 }
 
 void
 PlaylistListPanel::OnTableViewItemReordered(Tizen::Ui::Controls::TableView& tableView,
-                                            int itemIndexFrom,
-                                            int itemIndexTo)
+                                                       int itemIndexFrom,
+                                                       int itemIndexTo)
 {
-       //AppLogDebug("OnTableViewItemReordered");
-       AppLogDebug("Start");
-       AppLogDebug("End");
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 
 result
 PlaylistListPanel::CreateTableViewItem(Tizen::Ui::Container& parent,
-                                       Tizen::Base::String& labelName,
-                                                              Tizen::Graphics::Bitmap& bitmap,
-                                                              int totalCount)
+                                                               Tizen::Base::String& labelName,
+                                                               const Tizen::Graphics::Bitmap& bitmap,
+                                                               int totalCount)
 {
-       AppLogDebug("Start");
+       AppLogDebug("ENTER");
 
        result r = E_SUCCESS;
 
@@ -915,8 +939,9 @@ PlaylistListPanel::CreateTableViewItem(Tizen::Ui::Container& parent,
        parent.AddControl(*pSongThumbnailBGLabel);
 
        Label* pSongThumbnailLabel = new (std::nothrow) Label();
-       pSongThumbnailLabel->Construct(Rectangle(X_GAP_THUMBNAIL, Y_GAP_THUMBNAIL, W_THUMBNAIL ,H_THUMBNAIL), L"");
+       pSongThumbnailLabel->Construct(Rectangle(X_GAP_THUMBNAIL, Y_GAP_THUMBNAIL, W_THUMBNAILH_THUMBNAIL), L"");
        pSongThumbnailLabel->SetBackgroundBitmap(bitmap);
+       pSongThumbnailLabel->SetName(L"pSongThumbnailLabel");
        parent.AddControl(*pSongThumbnailLabel);
 
        Label* pPlaylistTitleLabel = new (std::nothrow) Label();
@@ -930,7 +955,7 @@ PlaylistListPanel::CreateTableViewItem(Tizen::Ui::Container& parent,
        {
                int X_Gap   = W_THUMBNAIL + (X_GAP_THUMBNAIL * 2);
                Label* pPlaylistItemCountLabel = new (std::nothrow) Label();
-               pPlaylistItemCountLabel->Construct(Rectangle(pPlaylistTitleLabel->GetWidth() + X_Gap, pPlaylistTitleLabel->GetY(), W_SONG_TIME, pPlaylistTitleLabel->GetHeight()) , L"");
+               pPlaylistItemCountLabel->Construct(Rectangle(pPlaylistTitleLabel->GetWidth() + X_Gap, pPlaylistTitleLabel->GetY(), W_SONG_TIME, pPlaylistTitleLabel->GetHeight()), L"");
                pPlaylistItemCountLabel->SetTextColor(COLOR_SUB_TEXT);
                pPlaylistItemCountLabel->SetTextConfig(SUB_TEXT_SIZE, LABEL_TEXT_STYLE_NORMAL);
                pPlaylistItemCountLabel->SetTextHorizontalAlignment(ALIGNMENT_CENTER);
@@ -938,14 +963,14 @@ PlaylistListPanel::CreateTableViewItem(Tizen::Ui::Container& parent,
                parent.AddControl(*pPlaylistItemCountLabel);
        }
 
-       AppLogDebug("End");
+       AppLogDebug("EXIT");
        return r;
 }
 
 void
 PlaylistListPanel::ShowFooter(void)
 {
-       AppLogDebug( "Start");
+       AppLogDebug( "ENTER");
        Form* pForm = dynamic_cast<Form*>(GetParent());
        AppAssert(pForm);
        Footer* pFooter = pForm->GetFooter();
@@ -957,13 +982,13 @@ PlaylistListPanel::ShowFooter(void)
        pForm->SetActionBarsVisible(FORM_ACTION_BAR_FOOTER, true);
 
 //     SetBoundList();
-       AppLogDebug( "End");
+       AppLogDebug( "EXIT");
 }
 
 void
 PlaylistListPanel::HideFooter(void)
 {
-       AppLogDebug( "Start");
+       AppLogDebug( "ENTER");
        Form* pForm = dynamic_cast<Form*>(GetParent());
        AppAssert(pForm);
        Footer* pFooter = pForm->GetFooter();
@@ -973,12 +998,13 @@ PlaylistListPanel::HideFooter(void)
        }
        pFooter->SetShowState(false);
        pForm->SetActionBarsVisible(FORM_ACTION_BAR_FOOTER, false);
-       AppLogDebug( "End");
+       AppLogDebug( "EXIT");
 }
 
 void
 PlaylistListPanel::SetBoundList(void)
 {
+       AppLogDebug("ENTER");
        Form* pForm = dynamic_cast<Form*>(GetParent());
        AppAssert(pForm);
 
@@ -993,21 +1019,43 @@ PlaylistListPanel::SetBoundList(void)
                __pContentTableView->SetBounds(0, 0, clientBounds.width, clientBounds.height);
                __pContentTableView->Invalidate(true);
        }
-
+       AppLogDebug("EXIT");
 }
 
 void
 PlaylistListPanel::OnUpdateContentList(void)
 {
+       AppLogDebug("ENTER");
        UpdateContentList();
+       AppLogDebug("EXIT");
 }
 
 void
 PlaylistListPanel::UpdateContentList(void)
 {
+       AppLogDebug("ENTER");
        if (__pPlaylistListPresentationModel != null && __pContentTableView != null)
        {
-//             __pPlaylistListPresentationModel->RefreshContent();
+               __pPlaylistListPresentationModel->UpdatePlaylistList();
                __pContentTableView->UpdateTableView();
        }
+       AppLogDebug("EXIT");
 }
+
+void
+PlaylistListPanel::OnThumbnailInfoReveivedN(ThumbnailInfo* pThumbnailInfo)
+{
+       AppLogDebug("ENTER");
+       int itemIndex = 0;
+       void* pParam = null;
+       __pThumbnail = pThumbnailInfo->GetBitmapN();
+       pParam = pThumbnailInfo->GetUserParamN();
+       if (pParam)
+       {
+               itemIndex = *(static_cast<int*>(pParam));
+       }
+       __pContentTableView->RefreshItem(itemIndex, TABLE_VIEW_REFRESH_TYPE_ITEM_MODIFY);
+       delete pThumbnailInfo;
+       delete static_cast<int*>(pParam);
+       AppLogDebug("EXIT");
+}
\ No newline at end of file
old mode 100755 (executable)
new mode 100644 (file)
index 7ea6b24..b99bcdc
@@ -1,4 +1,4 @@
-//
+//
 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
 //
 // Licensed under the Flora License, Version 1.0 (the License);
 // limitations under the License.
 //
 
+/**
+ * @file               MpPlaylistListPresentationModel.cpp
+ * @brief              This is the implementation file for PlaylistListPresentationModel class.
+ */
+
+#include "MpCommonUtil.h"
+#include "MpPlaylistDB.h"
 #include "MpPlaylistListPresentationModel.h"
 #include "MpResourceManager.h"
-#include "MpPlaylistDB.h"
-#include "MpCommonUtil.h"
 #include "MpTypes.h"
 
-using namespace Tizen::Base;
 using namespace Tizen::App;
-using namespace Tizen::Io;
-using namespace std;
+using namespace Tizen::Base;
 using namespace Tizen::Base::Collection;
 using namespace Tizen::Content;
+using namespace Tizen::Io;
 
 PlaylistListPresentationModel* PlaylistListPresentationModel::pPlaylistListPresentationModel = null;
 
 PlaylistListPresentationModel*
 PlaylistListPresentationModel::GetInstance(void)
 {
+       AppLogDebug("ENTER");
        if (pPlaylistListPresentationModel == null)
        {
-               AppLogDebug("Start");
+               AppLogDebug("ENTER");
                pPlaylistListPresentationModel = new (std::nothrow) PlaylistListPresentationModel();
                TryReturn(pPlaylistListPresentationModel != null, null, "PlaylistListPresentationModel instance is not created.");
 
@@ -44,57 +49,76 @@ PlaylistListPresentationModel::GetInstance(void)
        return pPlaylistListPresentationModel;
 
 CATCH:
-//AppLogExceptionTag("PlaylistListPresentationModel", "PlaylistListPresentationModel::GetInstance(void) Error");
+       //AppLogException("PlaylistListPresentationModel::GetInstance(void) Error");
        delete pPlaylistListPresentationModel;
 
        return null;
 }
 
 PlaylistListPresentationModel::PlaylistListPresentationModel(void)
+       : __pPlaylistList(null)
+       , __pContentList(null)
+       , __contentType(0)
+       , __pQueryName(null)
 {
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 
 PlaylistListPresentationModel::~PlaylistListPresentationModel(void)
 {
-       //AppLogDebug("~PlaylistListPresentationModel");
+       AppLogDebug("ENTER");
+       if (__pPlaylistList != null)
+       {
+               __pPlaylistList->RemoveAll(true);
+               delete __pPlaylistList;
+       }
+       if (__pContentList != null)
+       {
+               __pContentList->RemoveAll(true);
+               delete __pContentList;
+       }
+       AppLogDebug("EXIT");
 }
 
-
 void
 PlaylistListPresentationModel::DestroyPlaylistListPresentationModel(void)
 {
-       if(pPlaylistListPresentationModel != null)
+       AppLogDebug("ENTER");
+       if (pPlaylistListPresentationModel != null)
        {
                delete pPlaylistListPresentationModel;
                pPlaylistListPresentationModel = null;
        }
+       AppLogDebug("EXIT");
 }
 
 result
-PlaylistListPresentationModel::Construct()
+PlaylistListPresentationModel::Construct(void)
 {
-       AppLogDebug("Start 0");
-
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
        return E_SUCCESS;
 }
 
 int
 PlaylistListPresentationModel::GetPlayListItemCount(Tizen::Base::String& playlist)
 {
-       AppLogDebug("Start");
+       AppLogDebug("ENTER");
        PlayList* pPlayList = PlayListManager::GetInstance()->GetPlayListN(playlist);
        int itemCount = pPlayList->GetPlayListItemCount();
        delete pPlayList;
        pPlayList = null;
 
+       AppLogDebug("EXIT");
        return itemCount;
 }
 
 Tizen::Graphics::Bitmap*
-PlaylistListPresentationModel::GetPlayListItemBitmap(Tizen::Base::String& playlist)
+PlaylistListPresentationModel::GetPlayListItemBitmap(Tizen::Base::String& playList)
 {
-       AppLogDebug("Start");
-       PlayList* pPlayList = PlayListManager::GetInstance()->GetPlayListN(playlist);
+       AppLogDebug("ENTER");
+       PlayList* pPlayList = PlayListManager::GetInstance()->GetPlayListN(playList);
        IList* pSearchList = pPlayList->GetContentInfoListN();
        if (pSearchList == null)
        {
@@ -127,19 +151,58 @@ PlaylistListPresentationModel::GetPlayListItemBitmap(Tizen::Base::String& playli
        delete pPlayList;
        pPlayList = null;
 
+       AppLogDebug("EXIT");
        return pBitmap;
 }
 
+Tizen::Content::ContentId
+PlaylistListPresentationModel::GetPlayListItemContentId(Tizen::Base::String& playlist)
+{
+       AppLogDebug("ENTER");
+       PlayList* pPlaylist = PlayListManager::GetInstance()->GetPlayListN(playlist);
+       IList* pSearchList = pPlaylist->GetContentInfoListN();
+       if (pSearchList == null)
+       {
+               return null;
+       }
+       ContentInfo* pContentInfo = static_cast<ContentInfo*>(pSearchList->GetAt(0));
+       AudioContentInfo* pAudioContentInfo = static_cast<AudioContentInfo*>(pContentInfo);
+       if (pAudioContentInfo == null)
+       {
+               pSearchList->RemoveAll(true);
+               delete pSearchList;
+               pSearchList = null;
+               SetLastResult(E_FAILURE);
+               return ContentId();
+       }
+       ContentId contentId = pAudioContentInfo->GetContentId();
+       pSearchList->RemoveAll(true);
+       delete pSearchList;
+       pSearchList = null;
+       delete pPlaylist;
+       pPlaylist = null;
+
+       AppLogDebug("EXIT");
+       return contentId;
+}
+
 int
-PlaylistListPresentationModel::GetPlayListCount(void)
+PlaylistListPresentationModel::GetAllPlayListCount(void)
 {
-       AppLogDebug("Start");
-       return PlayListManager::GetInstance()->GetAllPlayListCount();
+       AppLogDebug("ENTER");
+       if (__pPlaylistList == null)
+       {
+               return INIT_VALUE;
+       }
+       AppLogDebug("EXIT");
+       return __pPlaylistList->GetCount();
+//     return PlayListManager::GetInstance()->GetAllPlayListCount();
 }
 
 Tizen::Base::Collection::ArrayList*
-PlaylistListPresentationModel::GetPlaylistContentList(int contentType)
+PlaylistListPresentationModel::GetContentPathListN(int contentType)
 {
+       AppLogDebug("ENTER");
        Tizen::Base::Collection::ArrayList* __pPlaylistContentList = new (std::nothrow) ArrayList();
        __pPlaylistContentList->Construct();
 
@@ -151,7 +214,7 @@ PlaylistListPresentationModel::GetPlaylistContentList(int contentType)
                Tizen::Io::DbEnumerator* pDbEnumerator = playlistDB->SearchN(contentType);
                Tizen::Base::String contentId = null;
 
-               Tizen::Base::Collection::ArrayList* pTempList = new (std::nothrow)ArrayList();
+               Tizen::Base::Collection::ArrayList* pTempList = new (std::nothrow) ArrayList();
                pTempList->Construct();
 
                if (pDbEnumerator != null)
@@ -161,24 +224,27 @@ PlaylistListPresentationModel::GetPlaylistContentList(int contentType)
                                pDbEnumerator->GetStringAt(0, contentId);
 
                                String contentPath = null;
-                               AudioContentInfo* pAudioContentInfo = CommonUtil::GetPlaylistAudioContentInfo(contentId);
-//                             AppAssert(pAudioContentInfo);
-                               if (pAudioContentInfo == null)
+                               ContentId outContentId;
+
+                               CommonUtil::StringToContentId(contentId, outContentId);
+                               ContentInfo* pContentInfo = CommonUtil::GetContentInfoN(outContentId);
+                               if (pContentInfo != null && pContentInfo->GetContentType() == CONTENT_TYPE_AUDIO)
                                {
-                                       pTempList->Add(*new String(contentId));
+                                       contentPath = pContentInfo->GetContentPath();
+                                       delete pContentInfo;
                                }
                                else
                                {
-                                       contentPath = pAudioContentInfo->GetContentPath();
+                                       pTempList->Add(*new (std::nothrow) String(contentId));
                                }
 
                                if (contentPath == null)
                                {
-                                       pTempList->Add(*new String(contentId));
+                                       pTempList->Add(*new (std::nothrow) String(contentId));
                                }
                                else
                                {
-                                       __pPlaylistContentList->Add(*(new String(contentPath)));
+                                       __pPlaylistContentList->Add(*(new (std::nothrow) String(contentPath)));
                                }
                        }
                }
@@ -204,7 +270,7 @@ PlaylistListPresentationModel::GetPlaylistContentList(int contentType)
 
                String whereQuery = L"DateTime<'";
                whereQuery.Append(playTime.ToString());
-               whereQuery.Append("'");
+               whereQuery.Append(L"'");
 
                IList* pSearchList = CommonUtil::SearchContentList(whereQuery, L"DateTime", SORT_ORDER_DESCENDING);
                if (pSearchList == null)
@@ -213,7 +279,7 @@ PlaylistListPresentationModel::GetPlaylistContentList(int contentType)
                }
 
                int totalCount = pSearchList->GetCount();
-               for(int iCount = 0; iCount < totalCount; iCount++)
+               for (int iCount = 0; iCount < totalCount; iCount++)
                {
                        ContentSearchResult* pResult = static_cast<ContentSearchResult*>(pSearchList->GetAt(iCount));
                        AudioContentInfo* pAudioContentInfo = static_cast<AudioContentInfo*>(pResult->GetContentInfo());
@@ -224,50 +290,40 @@ PlaylistListPresentationModel::GetPlaylistContentList(int contentType)
                delete pSearchList;
                pSearchList = null;
        }
-       else
+       else if (contentType >= USER_CONTENT)
        {
-               String* pPlayListName = static_cast<String*>(PlayListManager::GetInstance()->GetAllPlayListNameN()->GetAt(contentType - USER_CONTENT));
-               PlayList* pPlayList = PlayListManager::GetInstance()->GetPlayListN(*pPlayListName);
-               IList* pSearchList = pPlayList->GetContentInfoListN();
-
-               if (pSearchList == null)
+               if (__pContentList == null)
                {
+                       AppLogDebug("EXIT");
                        return null;
                }
 
-               int totalCount = pSearchList->GetCount();
-               for(int iCount = 0; iCount < totalCount; iCount++)
+               String StrTemp = null;
+               ArrayList* pTempPath = new (std::nothrow) ArrayList();
+               pTempPath->Construct();
+
+               AudioContentInfo* pAudioContentInfo;
+               for (int iCount = INIT_VALUE; iCount < __pContentList->GetCount(); iCount++)
                {
-                       ContentInfo* pContentInfo = static_cast<ContentInfo*>(pSearchList->GetAt(iCount));
-                       AudioContentInfo* pAudioContentInfo = static_cast<AudioContentInfo*>(pContentInfo);
-                       __pPlaylistContentList->Add(*(new (std::nothrow) String(pAudioContentInfo->GetContentPath())));
+                       pAudioContentInfo = static_cast<AudioContentInfo*>(__pContentList->GetAt(iCount));
+                       if (pAudioContentInfo != null)
+                       {
+                               StrTemp = pAudioContentInfo->GetContentPath();
+                               pTempPath->Add(*(new (std::nothrow) String(StrTemp)));
+                       }
                }
-
-               pSearchList->RemoveAll(true);
-               delete pSearchList;
-               pSearchList = null;
-
-               delete pPlayList;
-               pPlayList = null;
+               AppLogDebug("EXIT");
+               return pTempPath;
        }
 
+       AppLogDebug("EXIT");
        return __pPlaylistContentList;
 }
 
-Tizen::Base::Collection::IList*
-PlaylistListPresentationModel::GetPlayListNameN(void)
-{
-       AppLogDebug("Start");
-//     IList* pTempList = PlayListManager::GetInstance()->GetAllPlayListNameN();
-//     StringComparer strComparer;
-//     pTempList->Sort(strComparer);
-//     return pTempList;
-       return PlayListManager::GetInstance()->GetAllPlayListNameN();
-}
-
 result
 PlaylistListPresentationModel::SetPlayListName(const Tizen::Base::String& oldPlayListName, const Tizen::Base::String& newPlayListName)
 {
+       AppLogDebug("ENTER");
        result r = E_SUCCESS;
        if (oldPlayListName != null)
        {
@@ -284,57 +340,295 @@ PlaylistListPresentationModel::SetPlayListName(const Tizen::Base::String& oldPla
                delete pPlaylist;
                pPlaylist = null;
        }
+       AppLogDebug("EXIT");
        return r;
 }
 
 Tizen::Base::String*
-PlaylistListPresentationModel::GetPlayListName(int playlistIndex)
+PlaylistListPresentationModel::GetPlayListNameN(int playlistIndex)
 {
-       AppLogDebug("Start");
-//     IList* pTempList = PlayListManager::GetInstance()->GetAllPlayListNameN();
-//     StringComparer strComparer;
-//     pTempList->Sort(strComparer);
-//     return static_cast<String*>(pTempList->GetAt(playlistIndex));
-       Tizen::Base::Collection::IList* pAllPlaylistNameList = PlayListManager::GetInstance()->GetAllPlayListNameN();
+       AppLogDebug("ENTER");
+       /*Tizen::Base::Collection::IList* pAllPlaylistNameList = PlayListManager::GetInstance()->GetAllPlayListNameN();
        if (pAllPlaylistNameList != null)
        {
-               AppLogDebug("End");
+               AppLogDebug("EXIT");
                return static_cast<String*>(pAllPlaylistNameList->GetAt(playlistIndex));
+       }*/
+       if (__pPlaylistList != null)
+       {
+               AppLogDebug("EXIT");
+               return static_cast<String*>(__pPlaylistList->GetAt(playlistIndex));
        }
-       AppLogDebug("End");
+       AppLogDebug("EXIT");
        return null;
-//     return static_cast<String*>(PlayListManager::GetInstance()->GetAllPlayListNameN()->GetAt(playlistIndex));
 }
 
 void
 PlaylistListPresentationModel::RemovePlayList(Tizen::Base::String& playlistName)
 {
+       AppLogDebug("ENTER");
        AppLogDebug("%ls", playlistName.GetPointer());
        PlayListManager::GetInstance()->RemovePlayList(playlistName);
+       AppLogDebug("EXIT");
 }
 
 void
-PlaylistListPresentationModel::AddItem(const Tizen::Content::ContentId& contentId, Tizen::Base::String& name)
+PlaylistListPresentationModel::AddContent(const Tizen::Content::ContentId& contentId, int playlistIndex)
 {
-       AppLogDebug("1");
-       AppLogDebug("%ls", name.GetPointer());
-       PlayList* pPlayList = PlayListManager::GetInstance()->GetPlayListN(name);
+       AppLogDebug("ENTER");
+       Tizen::Base::String* pPlayListName;
+       pPlayListName = static_cast<String*>(__pPlaylistList->GetAt(playlistIndex));
+
+       PlayList* pPlayList = PlayListManager::GetInstance()->GetPlayListN(*pPlayListName);
        pPlayList->AddItem(contentId);
        delete pPlayList;
        pPlayList = null;
+       AppLogDebug("EXIT");
 }
 
 void
-PlaylistListPresentationModel::AddItems(const Tizen::Base::Collection::IList& contentIdList)
+PlaylistListPresentationModel::UpdatePlaylistContentList(const int contentType, const Tizen::Base::String& playlistName)
+{
+       AppLogDebug("ENTER");
+       if (__pQueryName != null)
+       {
+               delete __pQueryName;
+               __pQueryName = null;
+       }
+
+       if (__pContentList != null)
+       {
+               __pContentList->RemoveAll(true);
+               delete __pContentList;
+               __pContentList = null;
+       }
+
+       __contentType = contentType;
+       __pQueryName = new (std::nothrow) String(playlistName);
+
+       if (contentType == MOST_PLAYED_CONTENT || contentType == RECENTLY_PLAYED_CONTENT)
+       {
+               PlaylistDB* playlistDB = new (std::nothrow) PlaylistDB();
+               playlistDB->CreatePlaylistDatabase();
+               Tizen::Base::Collection::ArrayList* pTempList = new (std::nothrow) ArrayList();
+               pTempList->Construct();
+
+               Tizen::Io::DbEnumerator* pDbEnumerator = playlistDB->SearchN(__contentType);
+               if (pDbEnumerator != null)
+               {
+                       Tizen::Base::Collection::ArrayList* pContentIdList = new (std::nothrow) ArrayList(SingleObjectDeleter);
+                       pContentIdList->Construct();
+
+                       while (pDbEnumerator->MoveNext()== E_SUCCESS)
+                       {
+                               Tizen::Base::String contentId;
+                               pDbEnumerator->GetStringAt(0, contentId);
+
+                               ContentId outContentId;
+                               CommonUtil::StringToContentId(contentId, outContentId);
+                               ContentInfo* pContentInfo = CommonUtil::GetContentInfoN(outContentId);
+                               if (pContentInfo != null && pContentInfo->GetContentType() == CONTENT_TYPE_AUDIO)
+                               {
+                                       pTempList->Add(*pContentInfo);
+                               }
+                               else
+                               {
+                                       pContentIdList->Add(*new (std::nothrow) String(contentId));
+                                       delete pContentInfo;
+                               }
+                       }
+
+                       if (pTempList != null)
+                       {
+                               __pContentList = pTempList;
+                       }
+
+                       if (pContentIdList != null)
+                       {
+                               for (int i = 0; i < pContentIdList->GetCount(); i++)
+                               {
+                                       playlistDB->Delete(*static_cast<String*>(pContentIdList->GetAt(i)));
+                               }
+
+                               delete pContentIdList;
+                               pContentIdList = null;
+                       }
+               }
+
+               delete pDbEnumerator;
+               pDbEnumerator = null;
+       }
+       else if (contentType == RECENTLY_ADDED_CONTENT)
+       {
+               DateTime playTime;
+               Tizen::System::SystemTime::GetCurrentTime(Tizen::System::TIME_MODE_STANDARD, playTime);
+
+               String whereQuery = L"DateTime<'";
+               whereQuery.Append(playTime.ToString());
+               whereQuery.Append(L"'");
+
+               __pContentList = CommonUtil::SearchContentList(whereQuery, L"DateTime", SORT_ORDER_DESCENDING);
+       }
+       else if (contentType == USER_CONTENT)
+       {
+               PlayList* pPlaylist = PlayListManager::GetInstance()->GetPlayListN(*__pQueryName);
+               __pContentList = pPlaylist->GetContentInfoListN();
+               delete pPlaylist;
+               pPlaylist = null;
+       }
+       AppLogDebug("EXIT");
+}
+
+int
+PlaylistListPresentationModel::GetContentCount(void)
 {
+       AppLogDebug("ENTER");
+       if (__pContentList == null)
+       {
+               return 0;
+       }
+       AppLogDebug("EXIT");
+       return __pContentList->GetCount();
 }
 
 void
-PlaylistListPresentationModel::RemoveItem(const int contentId)
+PlaylistListPresentationModel::UpdatePlaylistList(void)
 {
+       AppLogDebug("ENTER");
+       if (__pPlaylistList != null)
+       {
+               __pPlaylistList->RemoveAll(true);
+       }
+       __pPlaylistList = PlayListManager::GetInstance()->GetAllPlayListNameN();
+       AppLogDebug("EXIT");
 }
 
-void
-PlaylistListPresentationModel::RemoveItems(const Tizen::Base::Collection::IList& contentIdList)
+ContentInformation*
+PlaylistListPresentationModel::GetContentInfoN(int contentIndex)
 {
+       AppLogDebug("ENTER");
+       if (__pContentList == null)
+       {
+               return null;
+       }
+
+       ContentInformation* pContentInfoStruct = null;
+       switch (__contentType)
+       {
+       case MOST_PLAYED_CONTENT:
+               // fall through
+       case RECENTLY_PLAYED_CONTENT:
+               {
+                       AudioContentInfo* pAudioContentInfo;
+                       pAudioContentInfo = static_cast<AudioContentInfo*>(__pContentList->GetAt(contentIndex));
+                       if (pAudioContentInfo == null)
+                       {
+                               return pContentInfoStruct;
+                       }
+                       pContentInfoStruct = CommonUtil::GetContentInformationN(*pAudioContentInfo);
+               }
+               break;
+
+       case RECENTLY_ADDED_CONTENT:
+               {
+                       ContentSearchResult* pResult = static_cast<ContentSearchResult*>(__pContentList->GetAt(contentIndex));
+                       if (pResult != null && pResult->GetContentType() == CONTENT_TYPE_AUDIO)
+                       {
+                               AudioContentInfo* pAudioContentInfo = static_cast<AudioContentInfo*>(pResult->GetContentInfo());
+                               pContentInfoStruct = CommonUtil::GetContentInformationN(*pAudioContentInfo);
+                       }
+               }
+               break;
+
+       case USER_CONTENT:
+               {
+                       ContentInfo* pContentInfo = static_cast<ContentInfo*>(__pContentList->GetAt(contentIndex));
+                       if (pContentInfo != null && pContentInfo->GetContentType() == CONTENT_TYPE_AUDIO)
+                       {
+                               AudioContentInfo* pAudioContentInfo = static_cast<AudioContentInfo*>(pContentInfo);
+                               pContentInfoStruct = CommonUtil::GetContentInformationN(*pAudioContentInfo);
+                       }
+               }
+               break;
+
+       default:
+               break;
+       }
+       AppLogDebug("EXIT");
+       return pContentInfoStruct;
 }
+
+void
+PlaylistListPresentationModel::DeleteContent(int contentType, const ContentInformation& contentInfoStruct)
+{
+       AppLogDebug("ENTER");
+       switch (contentType)
+       {
+       case NORMAL_CONTENT:
+               {
+               }
+               break;
+
+       case MOST_PLAYED_CONTENT:
+               // fall through
+       case RECENTLY_PLAYED_CONTENT:
+               {
+                       PlaylistDB* playlistDB = new (std::nothrow) PlaylistDB();
+                       String contentId = contentInfoStruct.contentId.ToString();
+
+                       ArrayList* pTempList = new (std::nothrow) ArrayList();
+                       pTempList->Construct();
+
+                       pTempList = playlistDB->ReadValueN(contentId);
+                       int playCount = static_cast<Integer*>(pTempList->GetAt(0))->ToInt();
+                       String playTime = null;
+                       playTime.Append(*static_cast<String*>(pTempList->GetAt(1)));
+                       if (contentType == MOST_PLAYED_CONTENT)
+                       {
+                               playlistDB->Update(contentId, null, playTime);
+                       }
+                       else
+                       {
+                               String tempPlayTime = null;
+                               tempPlayTime.Append(IDS_BLANK);
+                               playlistDB->Update(contentId, playCount, tempPlayTime);
+                       }
+
+                       delete pTempList;
+                       pTempList = null;
+
+                       pTempList = playlistDB->ReadValueN(contentId);
+                       playCount = static_cast<Integer*>(pTempList->GetAt(0))->ToInt();
+                       playTime = null;
+                       playTime.Append(*static_cast<String*>(pTempList->GetAt(1)));
+
+                       if (playCount == 0 && playTime.Equals(IDS_BLANK, true))
+                       {
+                               playlistDB->Delete(contentId);
+                       }
+
+                       delete pTempList;
+                       pTempList = null;
+               }
+               break;
+
+       case RECENTLY_ADDED_CONTENT:
+               {
+               }
+               break;
+
+       case USER_CONTENT:
+               {
+                       PlayList* pPlaylist = PlayListManager::GetInstance()->GetPlayListN(*__pQueryName);
+                       pPlaylist->RemoveItem(contentInfoStruct.contentId);
+
+                       delete pPlaylist;
+                       pPlaylist = null;
+               }
+               break;
+
+       default:
+               break;
+       }
+       AppLogDebug("EXIT");
+}
\ No newline at end of file
old mode 100755 (executable)
new mode 100644 (file)
index 9025754..b3a4e1a
@@ -1,4 +1,4 @@
-//
+//
 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
 //
 // Licensed under the Flora License, Version 1.0 (the License);
 // limitations under the License.
 //
 
+/**
+ * @file               MpPlaylistPickerPopup.cpp
+ * @brief              This is the implementation file for PlaylistPickerPopup class.
+ */
+
+#include "MpCommonUtil.h"
+#include "MpPlaylistListPresentationModel.h"
 #include "MpPlaylistPickerPopup.h"
-#include "MpSceneRegister.h"
 #include "MpResourceManager.h"
-#include "MpPlaylistListPresentationModel.h"
-#include "MpCommonUtil.h"
+#include "MpSceneRegister.h"
 #include "MpTypes.h"
 
 using namespace Tizen::App;
 using namespace Tizen::Base;
 using namespace Tizen::Base::Runtime;
 using namespace Tizen::Base::Utility;
-using namespace Tizen::Base::Runtime;
-using namespace Tizen::Ui;
-using namespace Tizen::Ui::Controls;
+using namespace Tizen::Content;
 using namespace Tizen::Graphics;
 using namespace Tizen::Io;
 using namespace Tizen::Media;
 using namespace Tizen::System;
+using namespace Tizen::Ui;
+using namespace Tizen::Ui::Controls;
 using namespace Tizen::Ui::Scenes;
-using namespace Tizen::Content;
 
-static const Tizen::Graphics::Rectangle RECT_LABEL                                                             (0, 0, 560, 128);
+static const Tizen::Graphics::Rectangle RECT_LABEL (0, 0, 560, 128);
 
 PlayListPickerPopup::PlayListPickerPopup(void)
-: __pPlaylistListPresentationModel(null)
-, __pPlaylistTableView(null)
-, __pCancelButton(null)
-, __pPlaylistContentList(null)
+       : __pPlaylistListPresentationModel(null)
+       , __pPlaylistTableView(null)
+       , __pCancelButton(null)
+       , __pPlaylistContentList(null)
+       , __pControl(null)
 {
-       //AppLogDebug("PlayListPickerPopup");
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 
 PlayListPickerPopup::~PlayListPickerPopup(void)
 {
-       //AppLogDebug("~PlayListPickerPopup");
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 
 result
-PlayListPickerPopup::Initialize(void)
+PlayListPickerPopup::Initialize(Tizen::Ui::Control* pControl, Tizen::Base::Collection::IList* pDataList)
 {
-       //AppLogDebug("PlayListPickerPopup");
+       AppLogDebug("ENTER");
        result r = E_SUCCESS;
 
        __pPlaylistListPresentationModel = PlaylistListPresentationModel::GetInstance();
+       __pPlaylistListPresentationModel->UpdatePlaylistList();
        //Popup_Init
        Construct(true, Dimension(POPUP_WIDTH, POPUP_HEIGHT));
        SetTitleText(ResourceManager::GetString(L"IDS_MUSIC_BODY_ADD_TO_PLAYLIST"));
@@ -66,154 +74,164 @@ PlayListPickerPopup::Initialize(void)
 
        __pPlaylistTableView  = new (std::nothrow) TableView();
        __pPlaylistTableView->Construct(Rectangle(0, 0, GetClientAreaBounds().width, GetClientAreaBounds().height - H_CANCEL_BUTTON),
-                                               true,
-                                               TABLE_VIEW_SCROLL_BAR_STYLE_FADE_OUT);
+                                                       true,
+                                                       TABLE_VIEW_SCROLL_BAR_STYLE_FADE_OUT);
        __pPlaylistTableView->AddTableViewItemEventListener(*this);
        __pPlaylistTableView->SetItemProvider(this);
 
        __pCancelButton = new (std::nothrow) Button();
-       __pCancelButton->Construct(Rectangle(0, __pPlaylistTableView->GetHeight() - Y_GAP_CANCEL_BUTTON, GetClientAreaBounds().width, H_CANCEL_BUTTON), L"Cancel");
+       __pCancelButton->Construct(Rectangle(0, __pPlaylistTableView->GetHeight() - Y_GAP_CANCEL_BUTTON, GetClientAreaBounds().width, H_CANCEL_BUTTON), ResourceManager::GetString(L"IDS_COM_BODY_EDIT_CANCEL"));
        __pCancelButton->SetActionId(IDA_BUTTON_CANCEL);
        __pCancelButton->AddActionEventListener(*this);
 
+       __pControl = pControl;
+       __pPlaylistContentList = pDataList;
        AddControl(*__pPlaylistTableView);
-    AddControl(*__pCancelButton);
-
-    return r;
-}
+       AddControl(*__pCancelButton);
 
-void
-PlayListPickerPopup::SetCollectedContent(Tizen::Base::Collection::IList* pDataList)
-{
-       __pPlaylistTableView->UpdateTableView();
-       __pPlaylistContentList = pDataList;
+       AppLogDebug("EXIT");
+       return r;
 }
 
 void
 PlayListPickerPopup::OnActionPerformed(const Tizen::Ui::Control& source, int actionId)
 {
-       //AppLogDebug("OnActionPerformed");
+       AppLogDebug("ENTER");
        if(actionId == IDA_BUTTON_CANCEL)
        {
-
                SetShowState(false);
                Invalidate(true);
+               __pControl->SendUserEvent(ID_DESTORY_PLAY_LIST_PICKER_POPUP, null);
        }
+       AppLogDebug("EXIT");
 }
 
 void
-PlayListPickerPopup::OnTouchDoublePressed(const Tizen::Ui::Control &source,
-                                                        const Tizen::Graphics::Point &currentPosition,
-                                 const Tizen::Ui::TouchEventInfo &touchInfo)
+PlayListPickerPopup::OnTouchDoublePressed(const Tizen::Ui::Controlsource,
+                                                               const Tizen::Graphics::Point& currentPosition,
+                                                               const Tizen::Ui::TouchEventInfo& touchInfo)
 {
-       //AppLogDebug("OnTouchDoublePressed");
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 
 void
-PlayListPickerPopup::OnTouchLongPressed(const Tizen::Ui::Control &source,
-                               const Tizen::Graphics::Point &currentPosition,
-                               const Tizen::Ui::TouchEventInfo &touchInfo)
+PlayListPickerPopup::OnTouchLongPressed(const Tizen::Ui::Controlsource,
+                                       const Tizen::Graphics::Point& currentPosition,
+                                       const Tizen::Ui::TouchEventInfo& touchInfo)
 {
-       //AppLogDebug("OnTouchLongPressed");
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 
 void
-PlayListPickerPopup::OnTouchFocusIn(const Tizen::Ui::Control &source,
-                           const Tizen::Graphics::Point &currentPosition,
-                           const Tizen::Ui::TouchEventInfo &touchInfo)
+PlayListPickerPopup::OnTouchFocusIn(const Tizen::Ui::Controlsource,
+                                       const Tizen::Graphics::Point& currentPosition,
+                                       const Tizen::Ui::TouchEventInfo& touchInfo)
 {
-       //AppLogDebug("OnTouchFocusIn");
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 
-void PlayListPickerPopup::OnTouchFocusOut(const Tizen::Ui::Control &source,
-                                 const Tizen::Graphics::Point &currentPosition,
-                                 const Tizen::Ui::TouchEventInfo &touchInfo)
+void
+PlayListPickerPopup::OnTouchFocusOut(const Tizen::Ui::Control& source,
+                                       const Tizen::Graphics::Point& currentPosition,
+                                       const Tizen::Ui::TouchEventInfo& touchInfo)
 {
-       //AppLogDebug("OnTouchFocusOut");
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 
-void PlayListPickerPopup::OnTouchMoved(const Tizen::Ui::Control &source,
-                              const Tizen::Graphics::Point &currentPosition,
-                              const Tizen::Ui::TouchEventInfo &touchInfo)
+void
+PlayListPickerPopup::OnTouchMoved(const Tizen::Ui::Control& source,
+                                       const Tizen::Graphics::Point& currentPosition,
+                                       const Tizen::Ui::TouchEventInfo& touchInfo)
 {
-       //AppLogDebug("OnTouchMoved");
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 
-void PlayListPickerPopup::OnTouchPressed(const Tizen::Ui::Control &source,
-                                const Tizen::Graphics::Point &currentPosition,
-                                const Tizen::Ui::TouchEventInfo &touchInfo)
+void
+PlayListPickerPopup::OnTouchPressed(const Tizen::Ui::Control& source,
+                                       const Tizen::Graphics::Point& currentPosition,
+                                       const Tizen::Ui::TouchEventInfo& touchInfo)
 {
-       //AppLogDebug("OnTouchPressed");
-       ifGetShowState()
-                       && (currentPosition.x < 0
-                                       || currentPosition.y < 0
-                                       || this->GetBounds().width
-                                       || this->GetBounds().height))
-    {
+       AppLogDebug("ENTER");
+       if (GetShowState()
+               && (currentPosition.x < 0
+               || currentPosition.y < 0
+               || this->GetBounds().width
+               || this->GetBounds().height))
+       {
 //             SetShowState(false);
 //             Invalidate(true);
-    }
+       }
+       AppLogDebug("EXIT");
 }
 
-void PlayListPickerPopup::OnTouchReleased(const Tizen::Ui::Control &source,
-                                 const Tizen::Graphics::Point &currentPosition,
-                                 const Tizen::Ui::TouchEventInfo &touchInfo)
+void
+PlayListPickerPopup::OnTouchReleased(const Tizen::Ui::Control& source,
+                                       const Tizen::Graphics::Point& currentPosition,
+                                       const Tizen::Ui::TouchEventInfo& touchInfo)
 {
-       //AppLogDebug("OnTouchReleased");
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 
 void
 PlayListPickerPopup::OnKeyPressed(const Tizen::Ui::Control& source, Tizen::Ui::KeyCode keyCode)
 {
-       //AppLogDebug("OnKeyPressed");
-
-       if( Tizen::Ui::KEY_SIDE_UP == keyCode || Tizen::Ui::KEY_SIDE_DOWN == keyCode )
+       AppLogDebug("ENTER");
+       if (Tizen::Ui::KEY_SIDE_UP == keyCode || Tizen::Ui::KEY_SIDE_DOWN == keyCode)
        {
                ConsumeInputEvent();
        }
+       AppLogDebug("EXIT");
 }
 
 void
 PlayListPickerPopup::OnKeyReleased(const Tizen::Ui::Control& source, Tizen::Ui::KeyCode keyCode)
 {
-       //AppLogDebug("OnKeyReleased");
-
-       if( Tizen::Ui::KEY_SIDE_UP == keyCode || Tizen::Ui::KEY_SIDE_DOWN == keyCode )
+       AppLogDebug("ENTER");
+       if (Tizen::Ui::KEY_SIDE_UP == keyCode || Tizen::Ui::KEY_SIDE_DOWN == keyCode)
        {
                ConsumeInputEvent();
        }
+       AppLogDebug("EXIT");
 }
 
 void
 PlayListPickerPopup::OnKeyLongPressed(const Tizen::Ui::Control& source, Tizen::Ui::KeyCode keyCode)
 {
-       //AppLogDebug("OnKeyLongPressed");
-
-       //AppLogDebug("OnKeyLongPressed Control : %ls, KeyCode : %d",source.GetName().GetPointer(), keyCode );
-
-       if( Tizen::Ui::KEY_SIDE_UP == keyCode || Tizen::Ui::KEY_SIDE_DOWN == keyCode )
+       AppLogDebug("ENTER");
+       //AppLogDebug("OnKeyLongPressed Control : %ls, KeyCode : %d",source.GetName().GetPointer(), keyCode);
+       if (Tizen::Ui::KEY_SIDE_UP == keyCode || Tizen::Ui::KEY_SIDE_DOWN == keyCode)
        {
                ConsumeInputEvent();
        }
+       AppLogDebug("EXIT");
 }
 
 int
 PlayListPickerPopup::GetItemCount(void)
 {
-       return __pPlaylistListPresentationModel->GetPlayListCount() + 1;
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
+       return __pPlaylistListPresentationModel->GetAllPlayListCount() + 1;
 }
 
 Tizen::Ui::Controls::TableViewItem*
 PlayListPickerPopup::CreateItem(const int itemIndex, int itemWidth)
 {
-       TableViewItem* pItem = new (std::nothrow) TableViewItem;
+       AppLogDebug("ENTER");
+       TableViewItem* pItem = new (std::nothrow) TableViewItem();
        if (pItem == null)
        {
                //AppLogDebug("Unable to create TableViewItem.");
                return null;
        }
        pItem->Construct(Dimension(itemWidth, 128), TABLE_VIEW_ANNEX_STYLE_NORMAL);
-       pItem->SetBackgroundColor(Color(255,255,255));
+       pItem->SetBackgroundColor(Color(255, 255, 255));
 
        if (itemIndex == 0)
        {
@@ -224,36 +242,43 @@ PlayListPickerPopup::CreateItem(const int itemIndex, int itemWidth)
        else
        {
                //AppLogDebug("CreateItem : %d", itemIndex);
-               CreateTableViewItem(*pItem, *(__pPlaylistListPresentationModel->GetPlayListName(itemIndex - 1)));
+               CreateTableViewItem(*pItem, *(__pPlaylistListPresentationModel->GetPlayListNameN(itemIndex - 1)));
        }
 
+       AppLogDebug("EXIT");
        return pItem;
 }
 
 bool
 PlayListPickerPopup::DeleteItem(const int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem)
 {
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
        return true;
 }
 
 void
 PlayListPickerPopup::UpdateItem(int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem)
 {
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 
 int
 PlayListPickerPopup::GetDefaultItemHeight(void)
 {
-       //AppLogDebug("UpdateItem");
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
        return ITEM_HEIGHT;
 }
 
 void
 PlayListPickerPopup::OnTableViewItemStateChanged(Tizen::Ui::Controls::TableView& tableView,
-                                                 int itemIndex,
-                                                 Tizen::Ui::Controls::TableViewItem* pItem,
-                                                 Tizen::Ui::Controls::TableViewItemStatus status)
+                                                       int itemIndex,
+                                                       Tizen::Ui::Controls::TableViewItem* pItem,
+                                                       Tizen::Ui::Controls::TableViewItemStatus status)
 {
+       AppLogDebug("ENTER");
        SceneManager* pSceneManager = SceneManager::GetInstance();
        AppAssert(pSceneManager);
 
@@ -269,6 +294,7 @@ PlayListPickerPopup::OnTableViewItemStateChanged(Tizen::Ui::Controls::TableView&
                {
                        pSceneManager->GoForward(ForwardSceneTransition(IDSCN_PLAYLIST_CREATOR));
                }
+               __pControl->SendUserEvent(ID_DESTORY_PLAY_LIST_PICKER_POPUP, null);
        }
        else if (itemIndex != 0 && status == TABLE_VIEW_ITEM_STATUS_SELECTED)
        {
@@ -279,8 +305,11 @@ PlayListPickerPopup::OnTableViewItemStateChanged(Tizen::Ui::Controls::TableView&
                {
                        for (int index = 0; index < __pPlaylistContentList->GetCount(); index++)
                        {
-                               AudioContentInfo* pAudioInfo = CommonUtil::GetAudioContentInfo(*(static_cast<String*>(__pPlaylistContentList->GetAt(index))));
-                               __pPlaylistListPresentationModel->AddItem(pAudioInfo->GetContentId(),*__pPlaylistListPresentationModel->GetPlayListName(itemIndex - 1));
+                               ContentId contentId = CommonUtil::GetContentId(*(static_cast<String*>(__pPlaylistContentList->GetAt(index))));
+                               if (!IsFailed(GetLastResult()))
+                               {
+                                       __pPlaylistListPresentationModel->AddContent(contentId, (itemIndex - 1));
+                               }
                        }
                }
 
@@ -288,41 +317,39 @@ PlayListPickerPopup::OnTableViewItemStateChanged(Tizen::Ui::Controls::TableView&
                {
                        MessageBox messageBox;
                        messageBox.Construct(L"", ResourceManager::GetString(L"IDS_COM_POP_SUCCESS"),
-                                                                MSGBOX_STYLE_OK,
-                                                                3000);
+                                                                       MSGBOX_STYLE_OK,
+                                                                       3000);
                        int modalResult = 0;
                        messageBox.ShowAndWait(modalResult);
                }
-
-               if (pSceneManager->GetCurrentSceneId().Equals(IDSCN_PLAYER, true) != true)
-               {
-                       pSceneManager->GoBackward(BackwardSceneTransition());
-               }
-               //AppLogDebug("add selected content to created playlist.");
+               __pControl->SendUserEvent(ID_DESTORY_PLAY_LIST_PICKER_POPUP, null);
        }
+       AppLogDebug("EXIT");
 }
 
 void
 PlayListPickerPopup::OnTableViewContextItemActivationStateChanged(Tizen::Ui::Controls::TableView& tableView,
-                                                                  int itemIndex,
-                                                                  Tizen::Ui::Controls::TableViewContextItem* pContextItem,
-                                                                  bool activated)
+                                                                               int itemIndex,
+                                                                               Tizen::Ui::Controls::TableViewContextItem* pContextItem,
+                                                                               bool activated)
 {
-
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 
 void
 PlayListPickerPopup::OnTableViewItemReordered(Tizen::Ui::Controls::TableView& tableView,
-                                              int itemIndexFrom,
-                                              int itemIndexTo)
+                                                       int itemIndexFrom,
+                                                       int itemIndexTo)
 {
-
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 
 result
 PlayListPickerPopup::CreateTableViewItem(Tizen::Ui::Container& parent, Tizen::Base::String& labelName)
 {
-       //AppLogDebug("CreateTableViewItem");
+       AppLogDebug("ENTER");
        result r = E_SUCCESS;
 
        Label* pStrLabel = new (std::nothrow) Label();
@@ -345,5 +372,6 @@ PlayListPickerPopup::CreateTableViewItem(Tizen::Ui::Container& parent, Tizen::Ba
 
        parent.AddControl(*pStrLabel);
 
+       AppLogDebug("EXIT");
        return r;
-}
+}
\ No newline at end of file
old mode 100644 (file)
new mode 100755 (executable)
index bb6c0da..0fa62d2
@@ -1,4 +1,4 @@
-//
+//
 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
 //
 // Licensed under the Flora License, Version 1.0 (the License);
 // limitations under the License.
 //
 
+/**
+ * @file               MpResourceManager.cpp
+ * @brief              This is the implementation file for ResourceManager class.
+ */
+
 #include <FApp.h>
 #include <FBase.h>
 #include <FGraphics.h>
@@ -27,31 +32,33 @@ using namespace Tizen::Ui;
 Bitmap*
 ResourceManager::GetBitmapN(const Tizen::Base::String& resourceName)
 {
-       AppLogDebug("Start");
-    AppResource* pAppResource = Application::GetInstance()->GetAppResource();
-    if (pAppResource == null)
-    {
-       AppLogDebug("End");
-        //AppLogDebug("[%s] Unable to get app resource.");
-        return null;
-    }
-    AppLogDebug("End");
-    return pAppResource->GetBitmapN(resourceName);
+       AppLogDebug("ENTER");
+       AppResource* pAppResource = Application::GetInstance()->GetAppResource();
+       if (pAppResource == null)
+       {
+               AppLogDebug("EXIT");
+               //AppLogDebug("[%s] Unable to get app resource.");
+               return null;
+       }
+       AppLogDebug("EXIT");
+       return pAppResource->GetBitmapN(resourceName);
 }
 
 String
 ResourceManager::GetString(const Tizen::Base::String& id)
 {
-       AppLogDebug("Start");
+       AppLogDebug("ENTER");
        AppResource* pAppResource = Application::GetInstance()->GetAppResource();
        if (pAppResource == null)
        {
-               AppLogDebug("End");
+               AppLogDebug("EXIT");
                //AppLogDebug("[%s] Unable to get app resource.");
                return null;
        }
-       AppLogDebug("End");
+
        String str;
        pAppResource->GetString(id, str);
+
+       AppLogDebug("EXIT");
        return str;
-}
+}
\ No newline at end of file
old mode 100755 (executable)
new mode 100644 (file)
index c1d4fcc..edbbb0d
@@ -1,4 +1,4 @@
-//
+//
 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
 //
 // Licensed under the Flora License, Version 1.0 (the License);
 // limitations under the License.
 //
 
+/**
+ * @file               MpAlbumListEditorPanel.cpp
+ * @brief              This is the implementation file for AlbumListEditorPanel class.
+ */
+
 #include "MpFormFactory.h"
 #include "MpPanelFactory.h"
 #include "MpSceneRegister.h"
 
 using namespace Tizen::Ui::Scenes;
 
-const wchar_t* IDSCN_ALL_LIST                      = L"AllList";
-const wchar_t* IDSCN_ALL_LIST_EDITOR               = L"AllListEditor";
-const wchar_t* IDSCN_ALL_CONTENT_PICKER            = L"AllContentPicker";
-
-const wchar_t* IDSCN_PLAYLIST_LIST                 = L"PlaylistList";
-const wchar_t* IDSCN_PLAYLIST_LIST_EDITOR          = L"PlaylistListEditor";
-const wchar_t* IDSCN_PLAYLIST_CREATOR              = L"PlaylistCreator";
-const wchar_t* IDSCN_PLAYLIST_NAME_EDITOR          = L"PlaylistNameEditor";
-const wchar_t* IDSCN_PLAYLIST_CONTENT_LIST         = L"PlaylistContentList";
-const wchar_t* IDSCN_PLAYLIST_CONTENT_LIST_EDITOR  = L"PlaylistContentListEditor";
-const wchar_t* IDSCN_USER_PLAYLIST_CONTENT_LIST    = L"UserPlaylistContentList";
-
-const wchar_t* IDSCN_ALBUM_LIST                    = L"AlbumList";
-const wchar_t* IDSCN_ALBUM_LIST_EDITOR             = L"AlbumListEditor";
-const wchar_t* IDSCN_ALBUM_PICKER                  = L"AlbumPicker";
-const wchar_t* IDSCN_ALBUM_CONTENT_PICKER          = L"AlbumContentPicker";
-const wchar_t* IDSCN_ALBUM_CONTENT_LIST            = L"AlbumContentList";
-const wchar_t* IDSCN_ALBUM_CONTENT_LIST_EDITOR     = L"AlbumContentListEditor";
-
-const wchar_t* IDSCN_ARTIST_LIST                   = L"ArtistList";
-const wchar_t* IDSCN_ARTIST_LIST_EDITOR            = L"ArtistListEditor";
-const wchar_t* IDSCN_ARTIST_PICKER                 = L"ArtistPicker";
-const wchar_t* IDSCN_ARTIST_CONTENT_PICKER         = L"ArtistContentPicker";
-const wchar_t* IDSCN_ARTIST_ALL_SONG_LIST          = L"ArtistAllSongList";
-const wchar_t* IDSCN_ARTIST_ALBUM_LIST             = L"ArtistAlbumList";
-const wchar_t* IDSCN_ARTIST_ALBUM_SEARCH_LIST      = L"ArtistAlbumSearchList";
-const wchar_t* IDSCN_ARTIST_ALBUM_LIST_EDITOR      = L"ArtistAlbumListEditor";
-
-const wchar_t* IDSCN_GENRE_LIST                    = L"GenreList";
-const wchar_t* IDSCN_GENRE_LIST_EDITOR             = L"GenreListEditor";
-const wchar_t* IDSCN_GENRE_PICKER                  = L"GenrePicker";
-const wchar_t* IDSCN_GENRE_CONTENT_PICKER          = L"GenreContentPicker";
-const wchar_t* IDSCN_GENRE_CONTENT_LIST            = L"GenresContentList";
-const wchar_t* IDSCN_GENRE_CONTENT_LIST_EDITOR     = L"GenreContentListEditor";
-
-const wchar_t* IDSCN_COMPOSER_LIST                 = L"ComposerList";
-const wchar_t* IDSCN_COMPOSER_LIST_EDITOR          = L"ComposerListEditor";
-const wchar_t* IDSCN_COMPOSER_PICKER               = L"ComposerPicker";
-const wchar_t* IDSCN_COMPOSER_CONTENT_PICKER       = L"ComposerContentPicker";
-const wchar_t* IDSCN_COMPOSER_CONTENT_LIST         = L"ComposerContentList";
-const wchar_t* IDSCN_COMPOSER_CONTENT_LIST_EDITOR  = L"ComposerContentListEditor";
-
-const wchar_t* IDSCN_YEAR_LIST                     = L"YearList";
-const wchar_t* IDSCN_YEAR_LIST_EDITOR              = L"YearListEditor";
-const wchar_t* IDSCN_YEAR_PICKER                   = L"YearPicker";
-const wchar_t* IDSCN_YEAR_CONTENT_PICKER           = L"YearContentPicker";
-const wchar_t* IDSCN_YEAR_CONTENT_LIST             = L"YearContentList";
-const wchar_t* IDSCN_YEAR_CONTENT_LIST_EDITOR      = L"YearContentListEditor";
-
-const wchar_t* IDSCN_FOLDER_LIST                   = L"FolderList";
-const wchar_t* IDSCN_FOLDER_LIST_EDITOR            = L"FolderContentPickerEditor";
-const wchar_t* IDSCN_FOLDER_PICKER                 = L"FolderPicker";
-const wchar_t* IDSCN_FOLDER_CONTENT_PICKER         = L"FolderContentPicker";
-const wchar_t* IDSCN_FOLDER_CONTENT_LIST           = L"FolderContentList";
-const wchar_t* IDSCN_FOLDER_CONTENT_LIST_EDIT      = L"FolderContentListEditor";
-
-const wchar_t* IDSCN_SEARCH                        = L"Search";
-const wchar_t* IDSCN_PLAYER                        = L"Player";
-const wchar_t* IDSCN_MUSIC_SETTING                 = L"MusicSetting";
-const wchar_t* IDSCN_CONTENT_DETAIL                = L"ContentDetail";
-const wchar_t* IDSCN_CONTENT_LIST                  = L"ContentList";
-const wchar_t* IDSCN_ALBUM_CONTENT_FORM            = L"AlbumContentListForm";
-const wchar_t* IDSCN_CONTENT_LIST_EDIT             = L"ContentListEdit";
-
-
-SceneRegister::SceneRegister()
+const wchar_t* IDSCN_ALL_LIST = L"AllList";
+const wchar_t* IDSCN_ALL_LIST_EDITOR = L"AllListEditor";
+const wchar_t* IDSCN_ALL_CONTENT_PICKER = L"AllContentPicker";
+
+const wchar_t* IDSCN_PLAYLIST_LIST = L"PlaylistList";
+const wchar_t* IDSCN_PLAYLIST_LIST_EDITOR = L"PlaylistListEditor";
+const wchar_t* IDSCN_PLAYLIST_CREATOR = L"PlaylistCreator";
+const wchar_t* IDSCN_PLAYLIST_NAME_EDITOR = L"PlaylistNameEditor";
+const wchar_t* IDSCN_PLAYLIST_CONTENT_LIST = L"PlaylistContentList";
+const wchar_t* IDSCN_PLAYLIST_CONTENT_LIST_EDITOR = L"PlaylistContentListEditor";
+const wchar_t* IDSCN_USER_PLAYLIST_CONTENT_LIST = L"UserPlaylistContentList";
+
+const wchar_t* IDSCN_ALBUM_LIST = L"AlbumList";
+const wchar_t* IDSCN_ALBUM_LIST_EDITOR = L"AlbumListEditor";
+const wchar_t* IDSCN_ALBUM_PICKER = L"AlbumPicker";
+const wchar_t* IDSCN_ALBUM_CONTENT_PICKER = L"AlbumContentPicker";
+const wchar_t* IDSCN_ALBUM_CONTENT_LIST = L"AlbumContentList";
+const wchar_t* IDSCN_ALBUM_CONTENT_LIST_EDITOR = L"AlbumContentListEditor";
+
+const wchar_t* IDSCN_ARTIST_LIST = L"ArtistList";
+const wchar_t* IDSCN_ARTIST_LIST_EDITOR = L"ArtistListEditor";
+const wchar_t* IDSCN_ARTIST_PICKER = L"ArtistPicker";
+const wchar_t* IDSCN_ARTIST_CONTENT_PICKER = L"ArtistContentPicker";
+const wchar_t* IDSCN_ARTIST_CONTENT_LIST = L"ArtistContentList";
+const wchar_t* IDSCN_ARTIST_ALL_SONG_LIST = L"ArtistAllSongList";
+const wchar_t* IDSCN_ARTIST_ALBUM_LIST = L"ArtistAlbumList";
+const wchar_t* IDSCN_ARTIST_ALBUM_SEARCH_LIST = L"ArtistAlbumSearchList";
+const wchar_t* IDSCN_ARTIST_ALBUM_LIST_EDITOR = L"ArtistAlbumListEditor";
+
+const wchar_t* IDSCN_GENRE_LIST = L"GenreList";
+const wchar_t* IDSCN_GENRE_LIST_EDITOR = L"GenreListEditor";
+const wchar_t* IDSCN_GENRE_PICKER = L"GenrePicker";
+const wchar_t* IDSCN_GENRE_CONTENT_PICKER = L"GenreContentPicker";
+const wchar_t* IDSCN_GENRE_CONTENT_LIST = L"GenresContentList";
+const wchar_t* IDSCN_GENRE_CONTENT_LIST_EDITOR = L"GenreContentListEditor";
+
+const wchar_t* IDSCN_COMPOSER_LIST = L"ComposerList";
+const wchar_t* IDSCN_COMPOSER_LIST_EDITOR = L"ComposerListEditor";
+const wchar_t* IDSCN_COMPOSER_PICKER = L"ComposerPicker";
+const wchar_t* IDSCN_COMPOSER_CONTENT_PICKER = L"ComposerContentPicker";
+const wchar_t* IDSCN_COMPOSER_CONTENT_LIST = L"ComposerContentList";
+const wchar_t* IDSCN_COMPOSER_CONTENT_LIST_EDITOR = L"ComposerContentListEditor";
+
+const wchar_t* IDSCN_YEAR_LIST = L"YearList";
+const wchar_t* IDSCN_YEAR_LIST_EDITOR = L"YearListEditor";
+const wchar_t* IDSCN_YEAR_PICKER = L"YearPicker";
+const wchar_t* IDSCN_YEAR_CONTENT_PICKER = L"YearContentPicker";
+const wchar_t* IDSCN_YEAR_CONTENT_LIST = L"YearContentList";
+const wchar_t* IDSCN_YEAR_CONTENT_LIST_EDITOR = L"YearContentListEditor";
+
+const wchar_t* IDSCN_FOLDER_LIST = L"FolderList";
+const wchar_t* IDSCN_FOLDER_LIST_EDITOR = L"FolderContentPickerEditor";
+const wchar_t* IDSCN_FOLDER_PICKER = L"FolderPicker";
+const wchar_t* IDSCN_FOLDER_CONTENT_PICKER = L"FolderContentPicker";
+const wchar_t* IDSCN_FOLDER_CONTENT_LIST = L"FolderContentList";
+const wchar_t* IDSCN_FOLDER_CONTENT_LIST_EDIT = L"FolderContentListEditor";
+
+const wchar_t* IDSCN_SEARCH = L"Search";
+const wchar_t* IDSCN_PLAYER = L"Player";
+const wchar_t* IDSCN_MUSIC_SETTING = L"MusicSetting";
+const wchar_t* IDSCN_CONTENT_DETAIL = L"ContentDetail";
+
+SceneRegister::SceneRegister(void)
 {
-       AppLogDebug("Start");
-       AppLogDebug("End");
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 
-SceneRegister::~SceneRegister()
+SceneRegister::~SceneRegister(void)
 {
-       AppLogDebug("Start");
-       AppLogDebug("End");
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 
 result
 SceneRegister::RegisterAllScenes(void)
 {
-       AppLogDebug("Start");
+       AppLogDebug("ENTER");
        result r = E_SUCCESS;
        static const wchar_t* PANEL_BLANK = L"";
        static FormFactory formFactory;
@@ -112,56 +114,60 @@ SceneRegister::RegisterAllScenes(void)
        r = pSceneManager->RegisterFormFactory(formFactory);
        r = pSceneManager->RegisterPanelFactory(panelFactory);
 
-       r = pSceneManager->RegisterScene(IDSCN_PLAYER,          IDC_PLAYER_FORM,        PANEL_BLANK);
-       r = pSceneManager->RegisterScene(IDSCN_MUSIC_SETTING,   IDC_MUSIC_SETTING_FORM, PANEL_BLANK);
-       r = pSceneManager->RegisterScene(IDSCN_SEARCH,          IDC_SEARCH_FORM,        PANEL_BLANK);
+       r = pSceneManager->RegisterScene(IDSCN_PLAYER, IDC_PLAYER_FORM, PANEL_BLANK);
+       r = pSceneManager->RegisterScene(IDSCN_MUSIC_SETTING, IDC_MUSIC_SETTING_FORM, PANEL_BLANK);
+       r = pSceneManager->RegisterScene(IDSCN_SEARCH, IDC_SEARCH_FORM, PANEL_BLANK);
 
-       r = pSceneManager->RegisterScene(IDSCN_ALL_LIST,             IDC_CONTENT_FORM, IDC_ALL_LIST_PANEL);
-       r = pSceneManager->RegisterScene(IDSCN_PLAYLIST_LIST,        IDC_CONTENT_FORM, IDC_PLAYLIST_LIST_PANEL);
-       r = pSceneManager->RegisterScene(IDSCN_ALBUM_LIST,           IDC_CONTENT_FORM, IDC_ALBUM_LIST_PANEL);
-       r = pSceneManager->RegisterScene(IDSCN_ARTIST_LIST,          IDC_CONTENT_FORM, IDC_ARTIST_LIST_PANEL);
-       r = pSceneManager->RegisterScene(IDSCN_GENRE_LIST,           IDC_CONTENT_FORM, IDC_GENRES_LIST_PANEL);
-       r = pSceneManager->RegisterScene(IDSCN_COMPOSER_LIST,        IDC_CONTENT_FORM, IDC_COMPOSER_LIST_PANEL);
-       r = pSceneManager->RegisterScene(IDSCN_YEAR_LIST,            IDC_CONTENT_FORM, IDC_YEAR_LIST_PANEL);
-       r = pSceneManager->RegisterScene(IDSCN_FOLDER_LIST,          IDC_CONTENT_FORM, IDC_FOLDER_LIST_PANEL);
+       r = pSceneManager->RegisterScene(IDSCN_ALL_LIST, IDC_CONTENT_FORM, IDC_ALL_LIST_PANEL);
+       r = pSceneManager->RegisterScene(IDSCN_PLAYLIST_LIST, IDC_CONTENT_FORM, IDC_PLAYLIST_LIST_PANEL);
+       r = pSceneManager->RegisterScene(IDSCN_ALBUM_LIST, IDC_CONTENT_FORM, IDC_ALBUM_LIST_PANEL);
+       r = pSceneManager->RegisterScene(IDSCN_ARTIST_LIST, IDC_CONTENT_FORM, IDC_ARTIST_LIST_PANEL);
+       r = pSceneManager->RegisterScene(IDSCN_GENRE_LIST, IDC_CONTENT_FORM, IDC_GENRES_LIST_PANEL);
+       r = pSceneManager->RegisterScene(IDSCN_COMPOSER_LIST, IDC_CONTENT_FORM, IDC_COMPOSER_LIST_PANEL);
+       r = pSceneManager->RegisterScene(IDSCN_YEAR_LIST, IDC_CONTENT_FORM, IDC_YEAR_LIST_PANEL);
+       r = pSceneManager->RegisterScene(IDSCN_FOLDER_LIST, IDC_CONTENT_FORM, IDC_FOLDER_LIST_PANEL);
 
-       r = pSceneManager->RegisterScene(IDSCN_ALL_LIST_EDITOR,      IDC_CONTENT_FORM, IDC_ALL_LIST_EDITOR_PANEL);
+       r = pSceneManager->RegisterScene(IDSCN_ALL_LIST_EDITOR, IDC_CONTENT_FORM, IDC_ALL_LIST_EDITOR_PANEL);
        r = pSceneManager->RegisterScene(IDSCN_PLAYLIST_LIST_EDITOR, IDC_CONTENT_FORM, IDC_PLAYLIST_LIST_EDITOR_PANEL);
-       r = pSceneManager->RegisterScene(IDSCN_ALBUM_LIST_EDITOR,    IDC_CONTENT_FORM, IDC_ALBUM_LIST_EDITOR_PANEL);
-       r = pSceneManager->RegisterScene(IDSCN_ARTIST_LIST_EDITOR,   IDC_CONTENT_FORM, IDC_ARTIST_LIST_EDITOR_PANEL);
-       r = pSceneManager->RegisterScene(IDSCN_GENRE_LIST_EDITOR,    IDC_CONTENT_FORM, IDC_GENRES_LIST_EDITOR_PANEL);
+       r = pSceneManager->RegisterScene(IDSCN_ALBUM_LIST_EDITOR, IDC_CONTENT_FORM, IDC_ALBUM_LIST_EDITOR_PANEL);
+       r = pSceneManager->RegisterScene(IDSCN_ARTIST_LIST_EDITOR, IDC_CONTENT_FORM, IDC_ARTIST_LIST_EDITOR_PANEL);
+       r = pSceneManager->RegisterScene(IDSCN_GENRE_LIST_EDITOR, IDC_CONTENT_FORM, IDC_GENRES_LIST_EDITOR_PANEL);
        r = pSceneManager->RegisterScene(IDSCN_COMPOSER_LIST_EDITOR, IDC_CONTENT_FORM, IDC_COMPOSER_LIST_EDITOR_PANEL);
-       r = pSceneManager->RegisterScene(IDSCN_YEAR_LIST_EDITOR,     IDC_CONTENT_FORM, IDC_YEAR_LIST_EDITOR_PANEL);
-       r = pSceneManager->RegisterScene(IDSCN_FOLDER_LIST_EDITOR,   IDC_CONTENT_FORM, IDC_FOLDER_LIST_EDITOR_PANEL);
+       r = pSceneManager->RegisterScene(IDSCN_YEAR_LIST_EDITOR, IDC_CONTENT_FORM, IDC_YEAR_LIST_EDITOR_PANEL);
+       r = pSceneManager->RegisterScene(IDSCN_FOLDER_LIST_EDITOR, IDC_CONTENT_FORM, IDC_FOLDER_LIST_EDITOR_PANEL);
 
-       r = pSceneManager->RegisterScene(IDSCN_ALBUM_PICKER,   IDC_CONTENT_FORM, IDC_ALBUM_PICKER_PANEL);
-       r = pSceneManager->RegisterScene(IDSCN_ARTIST_PICKER,  IDC_CONTENT_FORM, IDC_ARTIST_PICKER_PANEL);
-       r = pSceneManager->RegisterScene(IDSCN_GENRE_PICKER,   IDC_CONTENT_FORM, IDC_GENRE_PICKER_PANEL);
+       r = pSceneManager->RegisterScene(IDSCN_ALBUM_PICKER, IDC_CONTENT_FORM, IDC_ALBUM_PICKER_PANEL);
+       r = pSceneManager->RegisterScene(IDSCN_ARTIST_PICKER, IDC_CONTENT_FORM, IDC_ARTIST_PICKER_PANEL);
+       r = pSceneManager->RegisterScene(IDSCN_GENRE_PICKER, IDC_CONTENT_FORM, IDC_GENRE_PICKER_PANEL);
        r = pSceneManager->RegisterScene(IDSCN_COMPOSER_PICKER,IDC_CONTENT_FORM, IDC_COMPOSER_PICKER_PANEL);
-       r = pSceneManager->RegisterScene(IDSCN_YEAR_PICKER,    IDC_CONTENT_FORM, IDC_YEAR_PICKER_PANEL);
-       r = pSceneManager->RegisterScene(IDSCN_FOLDER_PICKER,  IDC_CONTENT_FORM, IDC_FOLDER_PICKER_PANEL);
+       r = pSceneManager->RegisterScene(IDSCN_YEAR_PICKER, IDC_CONTENT_FORM, IDC_YEAR_PICKER_PANEL);
+       r = pSceneManager->RegisterScene(IDSCN_FOLDER_PICKER, IDC_CONTENT_FORM, IDC_FOLDER_PICKER_PANEL);
 
-       r = pSceneManager->RegisterScene(IDSCN_ALL_CONTENT_PICKER,     IDC_CONTENT_FORM, IDC_ALL_CONTENT_PICKER_PANEL);
-       r = pSceneManager->RegisterScene(IDSCN_ALBUM_CONTENT_PICKER,   IDC_CONTENT_FORM, IDC_ALBUM_CONTENT_PICKER_PANEL);
-       r = pSceneManager->RegisterScene(IDSCN_ARTIST_CONTENT_PICKER,  IDC_CONTENT_FORM, IDC_ARTIST_CONTENT_PICKER_PANEL);
-       r = pSceneManager->RegisterScene(IDSCN_GENRE_CONTENT_PICKER,   IDC_CONTENT_FORM, IDC_GENRE_CONTENT_PICKER_PANEL);
+       r = pSceneManager->RegisterScene(IDSCN_ALL_CONTENT_PICKER, IDC_CONTENT_FORM, IDC_ALL_CONTENT_PICKER_PANEL);
+       r = pSceneManager->RegisterScene(IDSCN_ALBUM_CONTENT_PICKER, IDC_CONTENT_FORM, IDC_ALBUM_CONTENT_PICKER_PANEL);
+       r = pSceneManager->RegisterScene(IDSCN_ARTIST_CONTENT_PICKER, IDC_CONTENT_FORM, IDC_ARTIST_CONTENT_PICKER_PANEL);
+       r = pSceneManager->RegisterScene(IDSCN_GENRE_CONTENT_PICKER, IDC_CONTENT_FORM, IDC_GENRE_CONTENT_PICKER_PANEL);
        r = pSceneManager->RegisterScene(IDSCN_COMPOSER_CONTENT_PICKER,IDC_CONTENT_FORM, IDC_COMPOSER_CONTENT_PICKER_PANEL);
-       r = pSceneManager->RegisterScene(IDSCN_YEAR_CONTENT_PICKER,    IDC_CONTENT_FORM, IDC_YEAR_CONTENT_PICKER_PANEL);
-       r = pSceneManager->RegisterScene(IDSCN_FOLDER_CONTENT_PICKER,  IDC_CONTENT_FORM, IDC_FOLDER_CONTENT_PICKER_PANEL);
-
-       r = pSceneManager->RegisterScene(IDSCN_CONTENT_LIST,             IDC_CONTENT_LIST_FORM,            PANEL_BLANK);
-       r = pSceneManager->RegisterScene(IDSCN_ALBUM_CONTENT_FORM,       IDC_ALBUM_CONTENT_FORM,           PANEL_BLANK);
-       r = pSceneManager->RegisterScene(IDSCN_CONTENT_LIST_EDIT,        IDC_CONTENT_LIST_EDIT_FORM,       PANEL_BLANK);
-       r = pSceneManager->RegisterScene(IDSCN_PLAYLIST_CONTENT_LIST,    IDC_PLAYLIST_CONTENT_LIST_FORM,   PANEL_BLANK);
-       r = pSceneManager->RegisterScene(IDSCN_ARTIST_ALBUM_LIST,        IDC_ARTIST_ALBUM_LIST_FORM,       PANEL_BLANK);
+       r = pSceneManager->RegisterScene(IDSCN_YEAR_CONTENT_PICKER, IDC_CONTENT_FORM, IDC_YEAR_CONTENT_PICKER_PANEL);
+       r = pSceneManager->RegisterScene(IDSCN_FOLDER_CONTENT_PICKER, IDC_CONTENT_FORM, IDC_FOLDER_CONTENT_PICKER_PANEL);
+
+       r = pSceneManager->RegisterScene(IDSCN_ALBUM_CONTENT_LIST, IDC_ALBUM_CONTENT_LIST_FORM, PANEL_BLANK);
+       r = pSceneManager->RegisterScene(IDSCN_ARTIST_CONTENT_LIST, IDC_ARTIST_CONTENT_LIST_FORM, PANEL_BLANK);
+       r = pSceneManager->RegisterScene(IDSCN_GENRE_CONTENT_LIST, IDC_GENRE_CONTENT_LIST_FORM, PANEL_BLANK);
+       r = pSceneManager->RegisterScene(IDSCN_COMPOSER_CONTENT_LIST,  IDC_COMPOSER_CONTENT_LIST_FORM,PANEL_BLANK);
+       r = pSceneManager->RegisterScene(IDSCN_YEAR_CONTENT_LIST, IDC_YEAR_CONTENT_LIST_FORM, PANEL_BLANK);
+       r = pSceneManager->RegisterScene(IDSCN_FOLDER_CONTENT_LIST, IDC_FOLDER_CONTENT_LIST_FORM, PANEL_BLANK);
+       r = pSceneManager->RegisterScene(IDSCN_PLAYLIST_CONTENT_LIST, IDC_PLAYLIST_CONTENT_LIST_FORM, PANEL_BLANK);
+
+       r = pSceneManager->RegisterScene(IDSCN_ARTIST_ALBUM_LIST, IDC_ARTIST_ALBUM_LIST_FORM, PANEL_BLANK);
        r = pSceneManager->RegisterScene(IDSCN_ARTIST_ALBUM_SEARCH_LIST, IDC_ARTIST_ALBUM_LIST_SEARCH_FORM,PANEL_BLANK);
-       r = pSceneManager->RegisterScene(IDSCN_ARTIST_ALBUM_LIST_EDITOR, IDC_ARTIST_ALBUM_LIST_EDIT_FORM,  PANEL_BLANK);
-       r = pSceneManager->RegisterScene(IDSCN_ARTIST_ALL_SONG_LIST,     IDC_ARTIST_ALL_SONG_LIST_FORM,    PANEL_BLANK);
+       r = pSceneManager->RegisterScene(IDSCN_ARTIST_ALBUM_LIST_EDITOR, IDC_ARTIST_ALBUM_LIST_EDIT_FORM, PANEL_BLANK);
+       r = pSceneManager->RegisterScene(IDSCN_ARTIST_ALL_SONG_LIST, IDC_ARTIST_ALL_SONG_LIST_FORM, PANEL_BLANK);
 
-       r = pSceneManager->RegisterScene(IDSCN_PLAYLIST_CREATOR,           IDC_PLAYLIST_CREATOR_FORM,           PANEL_BLANK);
+       r = pSceneManager->RegisterScene(IDSCN_PLAYLIST_CREATOR, IDC_PLAYLIST_CREATOR_FORM, PANEL_BLANK);
        r = pSceneManager->RegisterScene(IDSCN_USER_PLAYLIST_CONTENT_LIST, IDC_USER_PLAYLIST_CONTENT_LIST_FORM, PANEL_BLANK);
 
        r = pSceneManager->RegisterScene(IDSCN_CONTENT_DETAIL, IDC_CONTENT_DETAIL_FORM, PANEL_BLANK);
-       AppLogDebug("End");
+       AppLogDebug("EXIT");
        return r;
-}
+}
\ No newline at end of file
index eedc240..4b6c75b 100644 (file)
@@ -1,4 +1,4 @@
-//
+//
 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
 //
 // Licensed under the Flora License, Version 1.0 (the License);
 // limitations under the License.
 //
 
+/**
+ * @file               MpSearchForm.cpp
+ * @brief              This is the implementation file for SearchForm class.
+ */
+
 #include "MpSearchForm.h"
 
-using namespace Tizen::Ui;
-using namespace Tizen::Ui::Controls;
-using namespace Tizen::Graphics;
 using namespace Tizen::Base;
 using namespace Tizen::Base::Collection;
+using namespace Tizen::Content;
+using namespace Tizen::Graphics;
 using namespace Tizen::Media;
+using namespace Tizen::Ui;
+using namespace Tizen::Ui::Controls;
 using namespace Tizen::Ui::Scenes;
-using namespace Tizen::Content;
 
-static const int H_SEARCH_BAR    = 86;
-static const int H_GROUP_NAME    =  80;
+static const int H_SEARCH_BAR = 86;
+static const int H_GROUP_NAME = 80;
 static const int X_GAP = 16;
 static const int SEARCH_FONT_SIZE = 50;
 static const Tizen::Graphics::Color COLOR_GROUP_NAME_BG (127, 127, 127);
-static const Tizen::Graphics::Color COLOR_GROUP_TEXT    (255, 255, 255);
+static const Tizen::Graphics::Color COLOR_GROUP_TEXT (255, 255, 255);
 
 SearchForm::SearchForm(void)
-: __pSearchTableView(null)
-, __pSearchBar(null)
-, __pNoContentTextLabel(null)
-, __pSceneId(null)
+       : __pSearchTableView(null)
+       , __pSearchBar(null)
+       , __pNoContentTextLabel(null)
+       , __pSceneId(null)
 {
-       AppLogDebug("SearchForm");
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 
 SearchForm::~SearchForm(void)
 {
-       AppLogDebug("~SearchForm");
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 
 bool
 SearchForm::Initialize(void)
 {
-       AppLogDebug("Initialize(void)");
-       Construct(FORM_STYLE_NORMAL| FORM_STYLE_INDICATOR| FORM_STYLE_HEADER| FORM_STYLE_FOOTER);
+       AppLogDebug("ENTER");
+       Construct(FORM_STYLE_NORMAL | FORM_STYLE_INDICATOR | FORM_STYLE_HEADER | FORM_STYLE_FOOTER);
+       AppLogDebug("EXIT");
        return true;
 }
 
 result
 SearchForm::OnInitializing(void)
 {
-       AppLogDebug("OnInitializing(void)");
+       AppLogDebug("ENTER");
        GetHeader()->SetTitleText(ResourceManager::GetString("IDS_COM_BODY_SEARCH"));
 
        __pSearchBar = new (std::nothrow) SearchBar();
@@ -69,9 +77,9 @@ SearchForm::OnInitializing(void)
        __pSearchBar->SetLowerCaseModeEnabled(true);
 
        __pSearchTableView = new (std::nothrow) TableView();
-       __pSearchTableView->Construct(Rectangle(0, 0,  GetClientAreaBounds().width, GetClientAreaBounds().height - __pSearchBar->GetHeight()),
-                                  true,
-                                  TABLE_VIEW_SCROLL_BAR_STYLE_FADE_OUT);
+       __pSearchTableView->Construct(Rectangle(0, 0, GetClientAreaBounds().width, GetClientAreaBounds().height - __pSearchBar->GetHeight()),
+                                       true,
+                                       TABLE_VIEW_SCROLL_BAR_STYLE_FADE_OUT);
        __pSearchTableView->SetItemProvider(this);
        __pSearchTableView->AddTableViewItemEventListener(*this);
        __pSearchTableView->AddTouchEventListener(*this);
@@ -85,20 +93,23 @@ SearchForm::OnInitializing(void)
 
        __pPresentationModel = SearchPresentationModel::GetInstance();
 
+       AppLogDebug("EXIT");
        return E_SUCCESS;
 }
 
 result
 SearchForm::OnTerminating(void)
 {
-       AppLogDebug("OnTerminating(void)");
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
        return E_SUCCESS;
 }
 
 void
 SearchForm::OnSearchBarModeChanged(Tizen::Ui::Controls::SearchBar& source,
-                                                                  Tizen::Ui::Controls::SearchBarMode mode)
+                                                                       Tizen::Ui::Controls::SearchBarMode mode)
 {
+       AppLogDebug("ENTER");
        __pPresentationModel->RemoveSearchResult();
 
        if (__pSearchTableView != null)
@@ -107,24 +118,24 @@ SearchForm::OnSearchBarModeChanged(Tizen::Ui::Controls::SearchBar& source,
                __pSearchTableView->ScrollToItem(INIT_VALUE);
                __pSearchTableView->Invalidate(true);
        }
-       AppLogDebug("OnSearchBarModeChanged");
+       AppLogDebug("EXIT");
 }
 
 void
 SearchForm::OnSearchBarContentAreaResized(Tizen::Ui::Controls::SearchBar& source,
-                                                                                  Dimension& size)
+                                                                                       Dimension& size)
 {
-       AppLogDebug("OnSearchBarContentAreaResized");
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 
 void
 SearchForm::OnTextValueChanged(const Tizen::Ui::Control& source)
 {
-       AppLogDebug("OnTextValueChanged...");
-
+       AppLogDebug("ENTER");
        if (__pSearchBar->GetText().GetLength() != INIT_VALUE)
        {
-               __pPresentationModel->SearchSong(__pSearchBar->GetText());
+               __pPresentationModel->InitializeContentList(__pSearchBar->GetText());
        }
        else
        {
@@ -136,25 +147,27 @@ SearchForm::OnTextValueChanged(const Tizen::Ui::Control& source)
                __pSearchTableView->ScrollToItem(INIT_VALUE);
                __pSearchTableView->Invalidate(true);
        }
+       AppLogDebug("EXIT");
 }
 
 void
 SearchForm::OnTextValueChangeCanceled(const Tizen::Ui::Control& source)
 {
-       AppLogDebug("OnTextValueChangedCanceled...");
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 
 void
 SearchForm::OnKeypadActionPerformed(Tizen::Ui::Control& source,
                                                                        Tizen::Ui::KeypadAction keypadAction)
 {
-       AppLogDebug("Start");
+       AppLogDebug("ENTER");
        if (keypadAction == KEYPAD_ACTION_SEARCH)
        {
                __pSearchBar->HideKeypad();
                if (__pSearchBar->GetText().GetLength() != INIT_VALUE)
                {
-                       __pPresentationModel->SearchSong(__pSearchBar->GetText());
+                       __pPresentationModel->InitializeContentList(__pSearchBar->GetText());
                }
                else
                {
@@ -167,37 +180,40 @@ SearchForm::OnKeypadActionPerformed(Tizen::Ui::Control& source,
                        __pSearchTableView->Invalidate(true);
                }
        }
-       AppLogDebug("End");
+       AppLogDebug("EXIT");
 }
 
 void
 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()));
-       AppLogDebug("OnKeypadClosed");
+       AppLogDebug("EXIT");
 }
 
 void
 SearchForm::OnKeypadOpened(Tizen::Ui::Control& source)
 {
-       AppLogDebug("OnKeypadOpened");
-
+       AppLogDebug("ENTER");
        Rectangle clientBounds = GetClientAreaBounds();
        __pSearchTableView->SetBounds(Rectangle(0, 0, clientBounds.width, clientBounds.height - __pSearchBar->GetHeight()));
+       AppLogDebug("EXIT");
 }
 
 void
 SearchForm::OnKeypadWillOpen(Tizen::Ui::Control &source)
 {
+       AppLogDebug("ENTER");
        GetFooter()->SetShowState(false);
-       AppLogDebug("OnKeypadWillOpen");
+       AppLogDebug("EXIT");
 }
 
 int
 SearchForm::GetItemCount(void)
 {
+       AppLogDebug("ENTER");
        int contentCount = __pPresentationModel->GetTotalContentCount();
 
        if ( __pNoContentTextLabel != null)
@@ -213,21 +229,20 @@ SearchForm::GetItemCount(void)
        }
 
        Invalidate(true);
-
+       AppLogDebug("EXIT");
        return contentCount;
 }
 
 Tizen::Ui::Controls::TableViewItem*
 SearchForm::CreateItem(const int itemIndex, int itemWidth)
 {
-       AppLogDebug("CreateTableViewItem");
-
+       AppLogDebug("ENTER");
 
-       TableViewItem* pItem = new (std::nothrow) TableViewItem;
+       TableViewItem* pItem = new (std::nothrow) TableViewItem();
        pItem->Construct(Dimension(itemWidth, H_GROUP_NAME), TABLE_VIEW_ANNEX_STYLE_NORMAL);
        pItem->SetBackgroundColor(COLOR_ITEM);
 
-       if(__pPresentationModel->GetArtistIndex() == itemIndex)
+       if (__pPresentationModel->GetArtistIndex() == itemIndex)
        {
                CreateGroupNameTableViewItem(*pItem, ResourceManager::GetString(L"IDS_MUSIC_BODY_ARTISTS"));
                return pItem;
@@ -237,7 +252,7 @@ SearchForm::CreateItem(const int itemIndex, int itemWidth)
                CreateGroupNameTableViewItem(*pItem, ResourceManager::GetString(L"IDS_MUSIC_BODY_ALBUMS"));
                return pItem;
        }
-       else if(__pPresentationModel->GetSongIndex() == itemIndex)
+       else if (__pPresentationModel->GetSongIndex() == itemIndex)
        {
                CreateGroupNameTableViewItem(*pItem, ResourceManager::GetString(L"IDS_MUSIC_HEADER_SONGS"));
                return pItem;
@@ -246,12 +261,12 @@ SearchForm::CreateItem(const int itemIndex, int itemWidth)
        delete pItem;
        pItem = null;
 
-       ContentInformationStruct* pContentInfoStruct = __pPresentationModel->GetContentInfo(itemIndex);
+       ContentInformation* pContentInfoStruct = __pPresentationModel->GetContentInfo(itemIndex);
        if (pContentInfoStruct == null)
        {
                return null;
        }
-       pItem = new (std::nothrow) TableViewItem;
+       pItem = new (std::nothrow) TableViewItem();
        pItem->Construct(Dimension(itemWidth, ITEM_HEIGHT), TABLE_VIEW_ANNEX_STYLE_NORMAL);
        pItem->SetBackgroundColor(COLOR_ITEM);
 
@@ -292,50 +307,47 @@ SearchForm::CreateItem(const int itemIndex, int itemWidth)
                pItem->AddControl(*pSongNameLabel);
        }
 
-       //test_code_start
-       if (pContentInfoStruct != null)
-       {
-               delete pContentInfoStruct->pThumbnail;
-               pContentInfoStruct->pThumbnail = null;
-       }
-
        delete pContentInfoStruct;
        pContentInfoStruct = null;
-       //test_code_end
 
+       AppLogDebug("EXIT");
        return pItem;
 }
 
 bool
 SearchForm::DeleteItem(const int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem)
 {
-       AppLogDebug("DeleteItem");
+       AppLogDebug("ENTER");
 
        delete pItem;
        pItem = null;
 
+       AppLogDebug("EXIT");
        return true;
 }
 
 void
 SearchForm::UpdateItem(int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem)
 {
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 
 int
 SearchForm::GetDefaultItemHeight(void)
 {
-       AppLogDebug("UpdateItem");
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
        return ITEM_HEIGHT;
 }
 
 void
 SearchForm::OnTableViewItemStateChanged(Tizen::Ui::Controls::TableView& tableView,
-                                        int itemIndex,
-                                        Tizen::Ui::Controls::TableViewItem* pItem,
-                                        Tizen::Ui::Controls::TableViewItemStatus status)
+                                               int itemIndex,
+                                               Tizen::Ui::Controls::TableViewItem* pItem,
+                                               Tizen::Ui::Controls::TableViewItemStatus status)
 {
-       AppLogDebug("OnTableViewItemStateChanged");
+       AppLogDebug("ENTER");
 
        if (status != TABLE_VIEW_ITEM_STATUS_SELECTED)
        {
@@ -345,14 +357,14 @@ SearchForm::OnTableViewItemStateChanged(Tizen::Ui::Controls::TableView& tableVie
        __pSearchBar->HideKeypad();
        Invalidate(true);
 
-       if (itemIndex == __pPresentationModel->GetArtistIndex() ||
-        itemIndex == __pPresentationModel->GetAlbumIndex()  ||
-        itemIndex == __pPresentationModel->GetSongIndex())
+       if (itemIndex == __pPresentationModel->GetArtistIndex()
+               || itemIndex == __pPresentationModel->GetAlbumIndex()
+               || itemIndex == __pPresentationModel->GetSongIndex())
        {
                return;
        }
 
-       ContentInformationStruct* pContentInfoStruct;
+       ContentInformation* pContentInfoStruct;
        SceneManager* pSceneManager = SceneManager::GetInstance();
        AppAssert(pSceneManager);
 
@@ -378,8 +390,9 @@ SearchForm::OnTableViewItemStateChanged(Tizen::Ui::Controls::TableView& tableVie
                pData->Construct();
                pData->Add(*(new (std::nothrow) String(IDSCN_SEARCH)));
                pData->Add(*(new (std::nothrow) String(temp)));
+               pData->Add(*(new (std::nothrow) Integer(itemIndex)));
 
-               pSceneManager->GoForward(ForwardSceneTransition(IDSCN_ALBUM_CONTENT_FORM), pData);
+               pSceneManager->GoForward(ForwardSceneTransition(IDSCN_ALBUM_CONTENT_LIST), pData);
        }
        else
        {
@@ -397,41 +410,39 @@ SearchForm::OnTableViewItemStateChanged(Tizen::Ui::Controls::TableView& tableVie
                pSceneManager->GoForward(ForwardSceneTransition(IDSCN_PLAYER), pData);
        }
 
-       //test_code_start
-       delete pContentInfoStruct->pThumbnail;
-       pContentInfoStruct->pThumbnail = null;
-
        delete pContentInfoStruct;
        pContentInfoStruct = null;
-       //test_code_end
+       AppLogDebug("EXIT");
 }
 
 void
 SearchForm::OnTableViewContextItemActivationStateChanged(Tizen::Ui::Controls::TableView& tableView,
-                                                         int itemIndex,
-                                                         Tizen::Ui::Controls::TableViewContextItem* pContextItem,
-                                                         bool activated)
+                                                                       int itemIndex,
+                                                                       Tizen::Ui::Controls::TableViewContextItem* pContextItem,
+                                                                       bool activated)
 {
-       AppLogDebug("OnTableViewContextItemActivationStateChanged");
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 
 void
 SearchForm::OnTableViewItemReordered(Tizen::Ui::Controls::TableView& tableView,
-                                     int itemIndexFrom,
-                                     int itemIndexTo)
+                                               int itemIndexFrom,
+                                               int itemIndexTo)
 {
-       AppLogDebug("OnTableViewItemReordered");
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 
 void
 SearchForm::OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previousSceneId,
-                                                         const Tizen::Ui::Scenes::SceneId& currentSceneId,
-                                                         Tizen::Base::Collection::IList* pArgs)
+                                                               const Tizen::Ui::Scenes::SceneId& currentSceneId,
+                                                               Tizen::Base::Collection::IList* pArgs)
 {
-       AppLogDebug("OnSceneActivatedN");
+       AppLogDebug("ENTER");
        if (__pSceneId == null)
        {
-               __pSceneId = new String(previousSceneId);
+               __pSceneId = new (std::nothrow) String(previousSceneId);
        }
 
        if (__pPresentationModel->GetTotalContentCount() == 0)
@@ -440,7 +451,7 @@ SearchForm::OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previousSceneId,
                {
                        __pNoContentTextLabel = new (std::nothrow) Label();
                        __pNoContentTextLabel->Construct(Rectangle(X_GAP, Y_GAP_NO_CONTENT, GetWidth() - (X_GAP * 2), H_NO_CONTENT),
-                                             ResourceManager::GetString(L"IDS_COM_BODY_NO_ITEMS"));
+                                                       ResourceManager::GetString(L"IDS_COM_BODY_NO_ITEMS"));
                        __pNoContentTextLabel->SetTextConfig(SEARCH_FONT_SIZE, LABEL_TEXT_STYLE_BOLD);
                        AddControl(*__pNoContentTextLabel);
                }
@@ -454,6 +465,12 @@ SearchForm::OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previousSceneId,
                        pArgs->RemoveAll(true);
                        delete pArgs;
                }
+
+               if (__pSearchBar->GetMode() != SEARCH_BAR_MODE_INPUT)
+               {
+                       __pSearchBar->SetMode(SEARCH_BAR_MODE_INPUT);
+               }
+
                Invalidate(true);
                return;
        }
@@ -469,13 +486,14 @@ SearchForm::OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previousSceneId,
                pArgs->RemoveAll(true);
                delete pArgs;
        }
+       AppLogDebug("EXIT");
 }
 
 void
 SearchForm::OnSceneDeactivated(const Tizen::Ui::Scenes::SceneId& currentSceneId,
-                                                          const Tizen::Ui::Scenes::SceneId& nextSceneId)
+                                                               const Tizen::Ui::Scenes::SceneId& nextSceneId)
 {
-       AppLogDebug("OnSceneDeactivated");
+       AppLogDebug("ENTER");
 
        if (__pSearchBar != null)
        {
@@ -496,19 +514,23 @@ SearchForm::OnSceneDeactivated(const Tizen::Ui::Scenes::SceneId& currentSceneId,
 //     __pSearchTableView->RemoveTableViewItemEventListener(*this);
 //     __pSearchTableView->RemoveTouchEventListener(*this);
 //     __pSearchTableView->RemoveScrollEventListener(*this);
+       AppLogDebug("EXIT");
 }
 
 void
 SearchForm::OnActionPerformed(const Tizen::Ui::Control& source, int actionId)
 {
+       AppLogDebug("ENTER");
        SceneManager* pSceneManager = SceneManager::GetInstance();
        AppAssert(pSceneManager);
        AppLogDebug("OnActionPerformed : %d", actionId);
+       AppLogDebug("EXIT");
 }
 
 result
 SearchForm::CreateGroupNameTableViewItem(Tizen::Ui::Container& parent, const Tizen::Base::String& GroupName)
 {
+       AppLogDebug("ENTER");
        result r = E_SUCCESS;
 
        Label* pGroupNameLabel = new (std::nothrow) Label();
@@ -521,12 +543,14 @@ SearchForm::CreateGroupNameTableViewItem(Tizen::Ui::Container& parent, const Tiz
 
        parent.AddControl(*pGroupNameLabel);
 
+       AppLogDebug("EXIT");
        return r;
 }
 
 Tizen::Base::String
 SearchForm::MakeQuery(const Tizen::Base::String& WhereExpr, const Tizen::Base::String& SearchName)
 {
+       AppLogDebug("ENTER");
        if (WhereExpr == null || SearchName == null)
        {
                return null;
@@ -534,106 +558,107 @@ SearchForm::MakeQuery(const Tizen::Base::String& WhereExpr, const Tizen::Base::S
 
        String StrMakeQuery = WhereExpr;
 
-       StrMakeQuery.Append(" like '%");
+       StrMakeQuery.Append(L" like '%");
        StrMakeQuery.Append(SearchName);
-       StrMakeQuery.Append("%'");
+       StrMakeQuery.Append(L"%'");
 
        AppLogDebug("MakeQuery : %ls", StrMakeQuery.GetPointer());
-
+       AppLogDebug("EXIT");
        return StrMakeQuery;
 }
 
 void
-SearchForm::OnTouchDoublePressed (const Tizen::Ui::Control &source,
-                                  const Tizen::Graphics::Point &currentPosition,
-                                  const Tizen::Ui::TouchEventInfo &touchInfo)
+SearchForm::OnTouchDoublePressed (const Tizen::Ui::Controlsource,
+                                       const Tizen::Graphics::Point& currentPosition,
+                                       const Tizen::Ui::TouchEventInfo& touchInfo)
 {
-       AppLogDebug("Start");
-       AppLogDebug("End");
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 
 void
-SearchForm::OnTouchFocusIn (const Tizen::Ui::Control &source,
-                            const Tizen::Graphics::Point &currentPosition,
-                            const Tizen::Ui::TouchEventInfo &touchInfo)
+SearchForm::OnTouchFocusIn (const Tizen::Ui::Controlsource,
+                                       const Tizen::Graphics::Point& currentPosition,
+                                       const Tizen::Ui::TouchEventInfo& touchInfo)
 {
-       AppLogDebug("Start");
-       AppLogDebug("End");
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 
 void
-SearchForm::OnTouchFocusOut (const Tizen::Ui::Control &source,
-                             const Tizen::Graphics::Point &currentPosition,
-                             const Tizen::Ui::TouchEventInfo &touchInfo)
+SearchForm::OnTouchFocusOut (const Tizen::Ui::Controlsource,
+                                       const Tizen::Graphics::Point& currentPosition,
+                                       const Tizen::Ui::TouchEventInfo& touchInfo)
 {
-       AppLogDebug("Start");
-       AppLogDebug("End");
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 
 void
-SearchForm::OnTouchLongPressed (const Tizen::Ui::Control &source,
-                                const Tizen::Graphics::Point &currentPosition,
-                                const Tizen::Ui::TouchEventInfo &touchInfo)
+SearchForm::OnTouchLongPressed (const Tizen::Ui::Controlsource,
+                                       const Tizen::Graphics::Point& currentPosition,
+                                       const Tizen::Ui::TouchEventInfo& touchInfo)
 {
-       AppLogDebug("Start");
-       AppLogDebug("End");
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 
 void
-SearchForm::OnTouchMoved (const Tizen::Ui::Control &source,
-                          const Tizen::Graphics::Point &currentPosition,
-                          const Tizen::Ui::TouchEventInfo &touchInfo)
+SearchForm::OnTouchMoved (const Tizen::Ui::Controlsource,
+                                       const Tizen::Graphics::Point& currentPosition,
+                                       const Tizen::Ui::TouchEventInfo& touchInfo)
 {
-       AppLogDebug("Start");
-       AppLogDebug("End");
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 
 void
-SearchForm::OnTouchPressed (const Tizen::Ui::Control &source,
-                            const Tizen::Graphics::Point &currentPosition,
-                            const Tizen::Ui::TouchEventInfo &touchInfo)
+SearchForm::OnTouchPressed (const Tizen::Ui::Controlsource,
+                                       const Tizen::Graphics::Point& currentPosition,
+                                       const Tizen::Ui::TouchEventInfo& touchInfo)
 {
-       AppLogDebug("Start");
-       AppLogDebug("End");
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 
 void
-SearchForm::OnTouchReleased (const Tizen::Ui::Control &source,
-                             const Tizen::Graphics::Point &currentPosition,
-                             const Tizen::Ui::TouchEventInfo &touchInfo)
+SearchForm::OnTouchReleased (const Tizen::Ui::Controlsource,
+                                       const Tizen::Graphics::Point& currentPosition,
+                                       const Tizen::Ui::TouchEventInfo& touchInfo)
 {
-       AppLogDebug("Start");
-       AppLogDebug("End");
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 
 void
-SearchForm::OnScrollEndReached (Tizen::Ui::Control &source, Tizen::Ui::Controls::ScrollEndEvent type)
+SearchForm::OnScrollEndReached (Tizen::Ui::Controlsource, Tizen::Ui::Controls::ScrollEndEvent type)
 {
-       AppLogDebug( "Start");
-       AppLogDebug( "End");
+       AppLogDebug( "ENTER");
+       AppLogDebug( "EXIT");
 }
 
 void
-SearchForm::OnScrollPositionChanged (Tizen::Ui::Control &source, int scrollPos)
+SearchForm::OnScrollPositionChanged (Tizen::Ui::Controlsource, int scrollPos)
 {
-       AppLogDebug( "Start");
-       AppLogDebug( "End");
+       AppLogDebug( "ENTER");
+       AppLogDebug( "EXIT");
 }
 
 void
-SearchForm::OnScrollStopped (Tizen::Ui::Control &source)
+SearchForm::OnScrollStopped (Tizen::Ui::Controlsource)
 {
-       AppLogDebug( "Start");
-       AppLogDebug( "End");
+       AppLogDebug( "ENTER");
+       AppLogDebug( "EXIT");
 }
 
 void
 SearchForm::OnFormBackRequested(Tizen::Ui::Controls::Form& source)
 {
-       //AppLogDebug("OnFormBackRequested");
+       AppLogDebug("ENTER");
        __pPresentationModel->RemoveSearchResult();
        SceneManager* pSceneManager = SceneManager::GetInstance();
        AppAssert(pSceneManager);
 
        pSceneManager->GoForward(ForwardSceneTransition(__pSceneId->GetPointer(), SCENE_TRANSITION_ANIMATION_TYPE_NONE, SCENE_HISTORY_OPTION_NO_HISTORY, SCENE_DESTROY_OPTION_DESTROY));
-}
+       AppLogDebug("EXIT");
+}
\ No newline at end of file
old mode 100755 (executable)
new mode 100644 (file)
index ab0c4e0..c4a9a27
@@ -1,4 +1,4 @@
-//
+//
 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
 //
 // Licensed under the Flora License, Version 1.0 (the License);
 // limitations under the License.
 //
 
+/**
+ * @file               MpSearchPresentationModel.cpp
+ * @brief              This is the implementation file for SearchPresentationModel class.
+ */
+
 #include "MpSearchPresentationModel.h"
 
 using namespace Tizen::Base;
 using namespace Tizen::Base::Collection;
+using namespace Tizen::Content;
 using namespace Tizen::Graphics;
-using namespace Tizen::Ui::Controls;
 using namespace Tizen::Social;
-using namespace Tizen::Content;
+using namespace Tizen::Ui::Controls;
 
 static const wchar_t* QUERY_PREFIX = L" like '%";
 static const wchar_t* QUERY_SUFFIX = L"%'";
@@ -29,24 +34,31 @@ static const wchar_t* QUERY_SUFFIX = L"%'";
 SearchPresentationModel* SearchPresentationModel::pSearchPresentationModelInstance = null;
 
 SearchPresentationModel::SearchPresentationModel(void)
-: __pSearchList(null)
+       : __pSearchList(null)
 {
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 
 SearchPresentationModel::~SearchPresentationModel(void)
 {
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 
 result
 SearchPresentationModel::Construct(void)
 {
-    result r = E_SUCCESS;
-    return r;
+       AppLogDebug("ENTER");
+       result r = E_SUCCESS;
+       AppLogDebug("EXIT");
+       return r;
 }
 
 SearchPresentationModel*
 SearchPresentationModel::GetInstance(void)
 {
+       AppLogDebug("ENTER");
        if (pSearchPresentationModelInstance == null)
        {
                pSearchPresentationModelInstance = new (std::nothrow) SearchPresentationModel();
@@ -55,6 +67,7 @@ SearchPresentationModel::GetInstance(void)
                result r = pSearchPresentationModelInstance->Construct();
                TryCatch(r == E_SUCCESS, , null, "SearchPresentationModel instance is not constrcuted.");
        }
+       AppLogDebug("EXIT");
        return pSearchPresentationModelInstance;
 
 CATCH:
@@ -65,70 +78,85 @@ CATCH:
 int
 SearchPresentationModel::GetAlbumIndex(void)
 {
+       AppLogDebug("ENTER");
        int index = -1;
        if (__pSearchList == null)
        {
                return index;
        }
        __pSearchList->IndexOf(STRING_SORT_ALBUM, index);
+
+       AppLogDebug("EXIT");
        return index;
 }
 
 int
 SearchPresentationModel::GetArtistIndex(void)
 {
+       AppLogDebug("ENTER");
        int index = -1;
        if (__pSearchList == null)
        {
                return index;
        }
        __pSearchList->IndexOf(STRING_SORT_ARTIST, index);
+
+       AppLogDebug("EXIT");
        return index;
 }
 
 int
 SearchPresentationModel::GetSongIndex(void)
 {
+       AppLogDebug("ENTER");
        int index = -1;
        if (__pSearchList == null)
        {
                return index;
        }
        __pSearchList->IndexOf(STRING_SORT_TITLE, index);
+
+       AppLogDebug("EXIT");
        return index;
 }
 
 int
 SearchPresentationModel::GetTotalContentCount(void)
 {
+       AppLogDebug("ENTER");
        if (__pSearchList == null)
        {
-               return 0;
+               return INIT_VALUE;
        }
 
+       AppLogDebug("EXIT");
        return __pSearchList->GetCount();
 }
 
 void
 SearchPresentationModel::RemoveSearchResult(void)
 {
+       AppLogDebug("ENTER");
        if (__pSearchList != null)
        {
                __pSearchList->RemoveAll(true);
        }
+       AppLogDebug("EXIT");
 }
 
 void
-SearchPresentationModel::SearchSong(const Tizen::Base::String& keyword)
+SearchPresentationModel::InitializeContentList(const Tizen::Base::String& keyword)
 {
+       AppLogDebug("ENTER");
        if (__pSearchList != null)
        {
                __pSearchList->RemoveAll(true);
+               delete __pSearchList;
        }
 
-       IList* pArtistSearch = CommonUtil::SearchContentList(MakeQuery(STRING_SORT_ARTIST,keyword), STRING_SORT_ARTIST);
-       IList* pAlbumSearch  = CommonUtil::SearchContentList(MakeQuery(STRING_SORT_ALBUM, keyword), STRING_SORT_ALBUM);
-       IList* pSongSearch   = CommonUtil::SearchContentList(MakeQuery(STRING_SORT_TITLE, keyword), STRING_SORT_TITLE);
+       IList* pArtistSearch = CommonUtil::SearchContentList(MakeQuery(STRING_SORT_ARTIST, keyword), STRING_SORT_ARTIST);
+       IList* pAlbumSearch = CommonUtil::SearchContentList(MakeQuery(STRING_SORT_ALBUM, keyword), STRING_SORT_ALBUM);
+       IList* pSongSearch = CommonUtil::SearchContentList(MakeQuery(STRING_SORT_TITLE, keyword), STRING_SORT_TITLE);
 
        if (pArtistSearch != null && pArtistSearch->GetCount() != 0)
        {
@@ -141,7 +169,7 @@ SearchPresentationModel::SearchSong(const Tizen::Base::String& keyword)
                        __pSearchList->AddItems(*pAlbumSearch);
                }
 
-               if(pSongSearch != null && pSongSearch->GetCount() != 0)
+               if (pSongSearch != null && pSongSearch->GetCount() != 0)
                {
                        pSongSearch->InsertAt(*(new (std::nothrow) String(STRING_SORT_TITLE)), 0);
                        __pSearchList->AddItems(*pSongSearch);
@@ -152,7 +180,7 @@ SearchPresentationModel::SearchSong(const Tizen::Base::String& keyword)
                pAlbumSearch->InsertAt(*(new (std::nothrow) String(STRING_SORT_ALBUM)), 0);
                __pSearchList = pAlbumSearch;
 
-               if(pSongSearch != null && pSongSearch->GetCount() != 0)
+               if (pSongSearch != null && pSongSearch->GetCount() != 0)
                {
                        pSongSearch->InsertAt(*(new (std::nothrow) String(STRING_SORT_TITLE)), 0);
                        __pSearchList->AddItems(*pSongSearch);
@@ -167,37 +195,42 @@ SearchPresentationModel::SearchSong(const Tizen::Base::String& keyword)
        {
                __pSearchList = null;
        }
-
+       AppLogDebug("EXIT");
 }
 
 void
 SearchPresentationModel::Release(void)
 {
-       if(pSearchPresentationModelInstance != null)
+       AppLogDebug("ENTER");
+       if (pSearchPresentationModelInstance != null)
        {
                delete pSearchPresentationModelInstance;
                pSearchPresentationModelInstance = null;
        }
+       AppLogDebug("EXIT");
 }
 
-ContentInformationStruct*
+ContentInformation*
 SearchPresentationModel::GetContentInfo(int index)
 {
-       ContentInformationStruct* pContentInfoStruct = null;
+       AppLogDebug("ENTER");
+       ContentInformation* pContentInfoStruct = null;
 
        ContentSearchResult* pResult = static_cast<ContentSearchResult*>(__pSearchList->GetAt(index));
-       if(pResult->GetContentType() == CONTENT_TYPE_AUDIO)
+       if (pResult->GetContentType() == CONTENT_TYPE_AUDIO)
        {
                AudioContentInfo* pAudioContentInfo = static_cast<AudioContentInfo*>(pResult->GetContentInfo());
-               pContentInfoStruct = CommonUtil::GetContentInformationStructN(*pAudioContentInfo);
+               pContentInfoStruct = CommonUtil::GetContentInformationN(*pAudioContentInfo);
        }
 
+       AppLogDebug("EXIT");
        return pContentInfoStruct;
 }
 
 Tizen::Base::String
 SearchPresentationModel::MakeQuery(const Tizen::Base::String& WhereExpr, const Tizen::Base::String& keyword)
 {
+       AppLogDebug("ENTER");
        if (WhereExpr == null || keyword == null)
        {
                return null;
@@ -208,5 +241,6 @@ SearchPresentationModel::MakeQuery(const Tizen::Base::String& WhereExpr, const T
        StrMakeQuery.Append(CommonUtil::SpecialReplaceChange(keyword));
        StrMakeQuery.Append(QUERY_SUFFIX);
 
+       AppLogDebug("EXIT");
        return StrMakeQuery;
-}
+}
\ No newline at end of file
old mode 100755 (executable)
new mode 100644 (file)
index 921bcde..1d2abae
@@ -1,4 +1,4 @@
-//
+//
 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
 //
 // Licensed under the Flora License, Version 1.0 (the License);
 // limitations under the License.
 //
 
-#include "MpSetAsPopup.h"
-#include "MpResourceManager.h"
-#include "MpTypes.h"
+/**
+ * @file               MpSetAsPopup.cpp
+ * @brief              This is the implementation file for SetAsPopup class.
+ */
+
 #include <FBase.h>
 #include <FSclAddressbook.h>
 #include <FSclAddressbookManager.h>
 #include <FSclContact.h>
 #include <FSysSettingInfo.h>
+#include "MpResourceManager.h"
+#include "MpSetAsPopup.h"
+#include "MpTypes.h"
 
 using namespace Tizen::App;
 using namespace Tizen::Base;
 using namespace Tizen::Base::Collection;
 using namespace Tizen::Base::Runtime;
-using namespace Tizen::Ui;
-using namespace Tizen::Ui::Controls;
 using namespace Tizen::Graphics;
 using namespace Tizen::Social;
 using namespace Tizen::System;
+using namespace Tizen::Ui;
+using namespace Tizen::Ui::Controls;
 
 enum SetAsId
 {
@@ -43,20 +48,23 @@ enum SetAsId
 static const int SET_AT_POPUP_HEIGHT = 450;
 
 SetAsPopup::SetAsPopup(void)
-: __pSetAsItemTableView(null)
-, __pCancelButton(null)
+       : __pSetAsItemTableView(null)
+       , __pCancelButton(null)
 {
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 
 SetAsPopup::~SetAsPopup(void)
 {
-       //AppLogDebug("~SetAsPopup");
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 
 result
 SetAsPopup::Initialize(void)
 {
-       //AppLogDebug("SetAsPopup_Initialize_Start");
+       AppLogDebug("ENTER");
        result r = E_SUCCESS;
 
        //Popup_Init_Start
@@ -68,8 +76,8 @@ SetAsPopup::Initialize(void)
 
        __pSetAsItemTableView = new (std::nothrow) TableView();
        __pSetAsItemTableView->Construct(Rectangle(0, 0, GetClientAreaBounds().width, GetClientAreaBounds().height - H_CANCEL_BUTTON),
-                                                  true,
-                                                  TABLE_VIEW_SCROLL_BAR_STYLE_FADE_OUT);
+                                                       true,
+                                                       TABLE_VIEW_SCROLL_BAR_STYLE_FADE_OUT);
        TryCatch(r == E_SUCCESS, r = E_OUT_OF_MEMORY, "Unable to construct table view.\n");
        __pSetAsItemTableView->AddTableViewItemEventListener(*this);
        __pSetAsItemTableView->SetItemProvider(this);
@@ -80,12 +88,12 @@ SetAsPopup::Initialize(void)
        __pCancelButton->SetActionId(IDA_BUTTON_CANCEL);
        __pCancelButton->AddActionEventListener(*this);
 
-    AddControl(*__pSetAsItemTableView);
-    AddControl(*__pCancelButton);
+       AddControl(*__pSetAsItemTableView);
+       AddControl(*__pCancelButton);
 
-    //AppLogDebug("SetAsPopup_Initialize_End");
+       AppLogDebug("EXIT");
+       return r;
 
-    return r;
 CATCH:
        //AppLogException("[%ls]", GetErrorMessage(r));
        if (__pCancelButton != null)
@@ -104,120 +112,135 @@ CATCH:
 void
 SetAsPopup::OnActionPerformed(const Tizen::Ui::Control& source, int actionId)
 {
-       //AppLogDebug("OnActionPerformed");
-       if(actionId == IDA_BUTTON_CANCEL)
+       AppLogDebug("ENTER");
+       if (actionId == IDA_BUTTON_CANCEL)
        {
                SetShowState(false);
                Invalidate(true);
        }
+       AppLogDebug("EXIT");
 }
 
 void
-SetAsPopup::OnTouchDoublePressed(const Tizen::Ui::Control &source,
-                                                        const Tizen::Graphics::Point &currentPosition,
-                                 const Tizen::Ui::TouchEventInfo &touchInfo)
+SetAsPopup::OnTouchDoublePressed(const Tizen::Ui::Controlsource,
+                                       const Tizen::Graphics::Point& currentPosition,
+                                       const Tizen::Ui::TouchEventInfo& touchInfo)
 {
-       //AppLogDebug("OnTouchDoublePressed");
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 
 void
-SetAsPopup::OnTouchLongPressed(const Tizen::Ui::Control &source,
-                               const Tizen::Graphics::Point &currentPosition,
-                               const Tizen::Ui::TouchEventInfo &touchInfo)
+SetAsPopup::OnTouchLongPressed(const Tizen::Ui::Controlsource,
+                                       const Tizen::Graphics::Point& currentPosition,
+                                       const Tizen::Ui::TouchEventInfo& touchInfo)
 {
-       //AppLogDebug("OnTouchLongPressed");
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 
 void
-SetAsPopup::OnTouchFocusIn(const Tizen::Ui::Control &source,
-                           const Tizen::Graphics::Point &currentPosition,
-                           const Tizen::Ui::TouchEventInfo &touchInfo)
+SetAsPopup::OnTouchFocusIn(const Tizen::Ui::Controlsource,
+                                       const Tizen::Graphics::Point& currentPosition,
+                                       const Tizen::Ui::TouchEventInfo& touchInfo)
 {
-       //AppLogDebug("OnTouchFocusIn");
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 
-void SetAsPopup::OnTouchFocusOut(const Tizen::Ui::Control &source,
-                                 const Tizen::Graphics::Point &currentPosition,
-                                 const Tizen::Ui::TouchEventInfo &touchInfo)
+void
+SetAsPopup::OnTouchFocusOut(const Tizen::Ui::Control& source,
+                                       const Tizen::Graphics::Point& currentPosition,
+                                       const Tizen::Ui::TouchEventInfo& touchInfo)
 {
-       //AppLogDebug("OnTouchFocusOut");
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 
-void SetAsPopup::OnTouchMoved(const Tizen::Ui::Control &source,
-                              const Tizen::Graphics::Point &currentPosition,
-                              const Tizen::Ui::TouchEventInfo &touchInfo)
+void
+SetAsPopup::OnTouchMoved(const Tizen::Ui::Control& source,
+                                       const Tizen::Graphics::Point& currentPosition,
+                                       const Tizen::Ui::TouchEventInfo& touchInfo)
 {
-       //AppLogDebug("OnTouchMoved");
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 
-void SetAsPopup::OnTouchPressed(const Tizen::Ui::Control &source,
-                                const Tizen::Graphics::Point &currentPosition,
-                                const Tizen::Ui::TouchEventInfo &touchInfo)
+void
+SetAsPopup::OnTouchPressed(const Tizen::Ui::Control& source,
+                                       const Tizen::Graphics::Point& currentPosition,
+                                       const Tizen::Ui::TouchEventInfo& touchInfo)
 {
-       //AppLogDebug("OnTouchPressed");
-       ifGetShowState()
-                       && (currentPosition.x < 0
-                                       || currentPosition.y < 0
-                                       || this->GetBounds().width
-                                       || this->GetBounds().height))
-    {
+       AppLogDebug("ENTER");
+       if (GetShowState()
+               && (currentPosition.x < 0
+               || currentPosition.y < 0
+               || this->GetBounds().width
+               || this->GetBounds().height))
+       {
 //             SetShowState(false);
 //             Invalidate(true);
-    }
+       }
+       AppLogDebug("EXIT");
 }
 
-void SetAsPopup::OnTouchReleased(const Tizen::Ui::Control &source,
-                                 const Tizen::Graphics::Point &currentPosition,
-                                 const Tizen::Ui::TouchEventInfo &touchInfo)
+void
+SetAsPopup::OnTouchReleased(const Tizen::Ui::Control& source,
+                                       const Tizen::Graphics::Point& currentPosition,
+                                       const Tizen::Ui::TouchEventInfo& touchInfo)
 {
-       //AppLogDebug("OnTouchReleased");
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 
 void
 SetAsPopup::OnKeyPressed(const Tizen::Ui::Control& source, Tizen::Ui::KeyCode keyCode)
 {
-       //AppLogDebug("OnKeyPressed");
-
-       if( Tizen::Ui::KEY_SIDE_UP == keyCode || Tizen::Ui::KEY_SIDE_DOWN == keyCode )
+       AppLogDebug("ENTER");
+       if (Tizen::Ui::KEY_SIDE_UP == keyCode || Tizen::Ui::KEY_SIDE_DOWN == keyCode)
        {
                ConsumeInputEvent();
        }
+       AppLogDebug("EXIT");
 }
 
 void
 SetAsPopup::OnKeyReleased(const Tizen::Ui::Control& source, Tizen::Ui::KeyCode keyCode)
 {
-       //AppLogDebug("OnKeyReleased");
-
-       if( Tizen::Ui::KEY_SIDE_UP == keyCode || Tizen::Ui::KEY_SIDE_DOWN == keyCode )
+       AppLogDebug("ENTER");
+       if (Tizen::Ui::KEY_SIDE_UP == keyCode || Tizen::Ui::KEY_SIDE_DOWN == keyCode)
        {
                ConsumeInputEvent();
        }
+       AppLogDebug("EXIT");
 }
 
 void
 SetAsPopup::OnKeyLongPressed(const Tizen::Ui::Control& source, Tizen::Ui::KeyCode keyCode)
 {
-       //AppLogDebug("OnKeyLongPressed");
+       AppLogDebug("ENTER");
+       //AppLogDebug("OnKeyLongPressed Control : %ls, KeyCode : %d",source.GetName().GetPointer(), keyCode);
 
-       //AppLogDebug("OnKeyLongPressed Control : %ls, KeyCode : %d",source.GetName().GetPointer(), keyCode );
-
-       if( Tizen::Ui::KEY_SIDE_UP == keyCode || Tizen::Ui::KEY_SIDE_DOWN == keyCode )
+       if (Tizen::Ui::KEY_SIDE_UP == keyCode || Tizen::Ui::KEY_SIDE_DOWN == keyCode)
        {
                ConsumeInputEvent();
        }
+       AppLogDebug("EXIT");
 }
 
 int
 SetAsPopup::GetItemCount(void)
 {
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
        return SET_AS_END;
 }
 
 Tizen::Ui::Controls::TableViewItem*
 SetAsPopup::CreateItem(const int itemIndex, int itemWidth)
 {
-       TableViewItem* pItem = new (std::nothrow) TableViewItem;
+       AppLogDebug("ENTER");
+       TableViewItem* pItem = new (std::nothrow) TableViewItem();
        if (pItem == null)
        {
                //AppLogDebug("Unable to create TableViewItem.");
@@ -229,44 +252,59 @@ SetAsPopup::CreateItem(const int itemIndex, int itemWidth)
        if (itemIndex < SET_AS_END)
        {
                String labelName = L"";
-               switch(itemIndex)
+               switch (itemIndex)
                {
                case SET_AS_CALL_RINGTONE:
-                       labelName = ResourceManager::GetString(L"IDS_MUSIC_OPT_CALL_RINGTONE");
+                       {
+                               labelName = ResourceManager::GetString(L"IDS_MUSIC_OPT_CALL_RINGTONE");
+                       }
                        break;
+
                case SET_AS_CALLER_RINGTONE:
-                       labelName = ResourceManager::GetString(L"IDS_MUSIC_OPT_SETAS_CALLER_RINGTONE");
+                       {
+                               labelName = ResourceManager::GetString(L"IDS_MUSIC_OPT_SETAS_CALLER_RINGTONE");
+                       }
+                       break;
+
+               default:
                        break;
                }
                CreateTableViewItem(*pItem, labelName);
        }
+       AppLogDebug("EXIT");
        return pItem;
 }
 
 bool
 SetAsPopup::DeleteItem(const int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem)
 {
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
        return true;
 }
 
 void
 SetAsPopup::UpdateItem(int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem)
 {
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 
 int
 SetAsPopup::GetDefaultItemHeight(void)
 {
-       //AppLogDebug("UpdateItem");
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
        return ITEM_HEIGHT;
 }
 
 void
 SetAsPopup::OnTableViewItemStateChanged(Tizen::Ui::Controls::TableView& tableView,
-                                        int itemIndex,
-                                        Tizen::Ui::Controls::TableViewItem* pItem,
-                                        Tizen::Ui::Controls::TableViewItemStatus status)
+                                               int itemIndex,
+                                               Tizen::Ui::Controls::TableViewItem* pItem,
+                                               Tizen::Ui::Controls::TableViewItemStatus status)
 {
+       AppLogDebug("ENTER");
        if (itemIndex == 0)
        {
                result r = Tizen::System::SettingInfo::SetValue(CALL_RINGTONE_KEY, *__pCurrentContentPath);
@@ -277,8 +315,8 @@ SetAsPopup::OnTableViewItemStateChanged(Tizen::Ui::Controls::TableView& tableVie
 
                        MessageBox messageBox;
                        messageBox.Construct(L"", ResourceManager::GetString(L"IDS_COM_POP_SUCCESS"),
-                                 MSGBOX_STYLE_OK,
-                                 3000);
+                                       MSGBOX_STYLE_OK,
+                                       3000);
                        int modalResult = 0;
                        messageBox.ShowAndWait(modalResult);
                }
@@ -311,30 +349,33 @@ SetAsPopup::OnTableViewItemStateChanged(Tizen::Ui::Controls::TableView& tableVie
                        pAppControl = null;
                }
        }
+       AppLogDebug("EXIT");
 }
 
 void
 SetAsPopup::OnTableViewContextItemActivationStateChanged(Tizen::Ui::Controls::TableView& tableView,
-                                                                int itemIndex,
-                                                                Tizen::Ui::Controls::TableViewContextItem* pContextItem,
-                                                                bool activated)
+                                                                               int itemIndex,
+                                                                               Tizen::Ui::Controls::TableViewContextItem* pContextItem,
+                                                                               bool activated)
 {
-       //AppLogDebug("OnTableViewContextItemActivationStateChanged");
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 
 void
 SetAsPopup::OnTableViewItemReordered(Tizen::Ui::Controls::TableView& tableView,
-                                            int itemIndexFrom,
-                                            int itemIndexTo)
+                                                       int itemIndexFrom,
+                                                       int itemIndexTo)
 {
-       //AppLogDebug("OnTableViewItemReordered");
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 
 result
 SetAsPopup::CreateTableViewItem(Tizen::Ui::Container& parent,
-                            Tizen::Base::String& labelName)
+                               Tizen::Base::String& labelName)
 {
-       //AppLogDebug("CreateTableViewItem");
+       AppLogDebug("ENTER");
        result r = E_SUCCESS;
 
        Label* pStrLabel = new (std::nothrow) Label();
@@ -357,6 +398,7 @@ SetAsPopup::CreateTableViewItem(Tizen::Ui::Container& parent,
 
        parent.AddControl(*pStrLabel);
 
+       AppLogDebug("EXIT");
        return r;
 }
 
@@ -365,7 +407,7 @@ SetAsPopup::OnAppControlCompleteResponseReceived(const AppId& appId,
                const String& operationId, AppCtrlResult appControlResult,
                const IMap* pExtraData)
 {
-       AppLogDebug("Start");
+       AppLogDebug("ENTER");
        if (pExtraData == null)
        {
                AppLogDebug("End");
@@ -380,10 +422,10 @@ SetAsPopup::OnAppControlCompleteResponseReceived(const AppId& appId,
 //                     pReturnValue->Add(new (std::nothrow) String(RETURN_KEY_TYPE), new (std::nothrow) String(RETURN_TYPE_CONTACT_ID));
 //                     pReturnValue->Add(new (std::nothrow) String(RETURN_KEY_VALUE), new (std::nothrow) String(pContactId));
 
-                       const String* pContactId = static_cast<const String *>(pExtraData->GetValue(String(APPCONTROL_KEY_RETURNTYPE)));
+                       const String* pContactId = static_cast<const String*>(pExtraData->GetValue(String(APPCONTROL_KEY_RETURNTYPE)));
                        if (pContactId->Equals(APPCONTROL_VALUE_CONTACTID, true))
                        {
-                               const String* pResultString = static_cast<const String *>(pExtraData->GetValue(String(APPCONTROL_KEY_VALUE)));
+                               const String* pResultString = static_cast<const String*>(pExtraData->GetValue(String(APPCONTROL_KEY_VALUE)));
 
                                AppLogDebug("%ls", pResultString->GetPointer());
                                int contactId;
@@ -400,8 +442,8 @@ SetAsPopup::OnAppControlCompleteResponseReceived(const AppId& appId,
                                {
                                        MessageBox messageBox;
                                        messageBox.Construct(L"", ResourceManager::GetString(L"IDS_COM_POP_SUCCESS"),
-                                                MSGBOX_STYLE_OK,
-                                                3000);
+                                                       MSGBOX_STYLE_OK,
+                                                       3000);
                                        int modalResult = 0;
                                        messageBox.ShowAndWait(modalResult);
                                }
@@ -414,11 +456,13 @@ SetAsPopup::OnAppControlCompleteResponseReceived(const AppId& appId,
                        }
                }
        }
-       AppLogDebug("End");
+       AppLogDebug("EXIT");
 }
 
 void
 SetAsPopup::SetCurrentContentPath(Tizen::Base::String* contentPath)
 {
+       AppLogDebug("ENTER");
        __pCurrentContentPath = contentPath;
-}
+       AppLogDebug("EXIT");
+}
\ No newline at end of file
index 7a1aa89..4017872 100644 (file)
@@ -1,4 +1,4 @@
-//
+//
 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
 //
 // Licensed under the Flora License, Version 1.0 (the License);
 // limitations under the License.
 //
 
+/**
+ * @file               MpSettingForm.cpp
+ * @brief              This is the implementation file for SettingForm class.
+ */
+
 #include <FApp.h>
 #include <FBase.h>
 #include <FUi.h>
 #include "MpSettingPresentationModel.h"
 #include "MpTypes.h"
 
-using namespace Tizen::Base;
 using namespace Tizen::App;
-using namespace Tizen::Ui;
+using namespace Tizen::Base;
 using namespace Tizen::Graphics;
+using namespace Tizen::Ui;
 using namespace Tizen::Ui::Controls;
 using namespace Tizen::Ui::Scenes;
 
 static const int SETTING_ITEM_HEIGHT = 100;
-static const Tizen::Graphics::Rectangle RECT_MAIN_ITEM                                                         (20, 10, 720, 80);
+static const Tizen::Graphics::Rectangle RECT_MAIN_ITEM (20, 10, 720, 80);
 
 static const int ID_MAIN_TAB_MENU_ITEM = 0;
 static const int ID_SUB_ALBUM_ITEM = 0;
@@ -60,28 +65,28 @@ SettingForm::SettingForm(void)
        , __pNowPlayContentPanel(null)
        , __pSettingTableView(null)
 {
-       AppLogDebug("Start");
-       AppLogDebug("End");
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 
 SettingForm::~SettingForm(void)
 {
-       AppLogDebug("Start");
-       AppLogDebug("End");
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 
 void
 SettingForm::Initialize(void)
 {
-       AppLogDebug("Start");
-       Construct(FORM_STYLE_NORMAL| FORM_STYLE_INDICATOR| FORM_STYLE_HEADER | FORM_STYLE_FOOTER);
-       AppLogDebug("End");
+       AppLogDebug("ENTER");
+       Construct(FORM_STYLE_NORMAL | FORM_STYLE_INDICATOR | FORM_STYLE_HEADER | FORM_STYLE_FOOTER);
+       AppLogDebug("EXIT");
 }
 
 result
 SettingForm::OnInitializing(void)
 {
-       AppLogDebug("Start");
+       AppLogDebug("ENTER");
        result r = E_SUCCESS;
 
        Header* pHeader = GetHeader();
@@ -116,15 +121,14 @@ SettingForm::OnInitializing(void)
        __pSettingTableView->SetItemChecked(1, __pSettingPresentationModel->GetAutoOffTime(), true);
 
        Invalidate(true);
-       AppLogDebug("End");
+       AppLogDebug("EXIT");
        return r;
 }
 
 result
 SettingForm::OnTerminating(void)
 {
-       AppLogDebug("Start");
-       //AppLogDebug("OnTerminating");
+       AppLogDebug("ENTER");
        result r = E_SUCCESS;
 
        /*Frame* pFrame = Application::GetInstance()->GetAppFrame()->GetFrame();
@@ -135,60 +139,68 @@ SettingForm::OnTerminating(void)
                pForm->SendUserEvent(0, null);
        }*/
 //     __pSettingPresentationModel->DestroySettingPresentationModel();
-       AppLogDebug("End");
+       AppLogDebug("EXIT");
        return r;
 }
 
 int
 SettingForm::GetGroupCount(void)
 {
-       AppLogDebug("Start");
-       AppLogDebug("End");
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
        return 2;
 }
 
 int
 SettingForm::GetItemCount(int groupIndex)
 {
-       AppLogDebug("Start");
+       AppLogDebug("ENTER");
        int itemCount = 0;
 
-       switch(groupIndex)
+       switch (groupIndex)
        {
        case ID_MAIN_TAB_MENU_ITEM:
-               itemCount = ID_MAIN_MENU_TAB_ITEM_COUNT;
+               {
+                       itemCount = ID_MAIN_MENU_TAB_ITEM_COUNT;
+               }
                break;
+
        case ID_MAIN_AUTO_OFF_ITEM:
-               itemCount = ID_MAIN_AUTO_OFF_ITEM_COUNT;
+               {
+                       itemCount = ID_MAIN_AUTO_OFF_ITEM_COUNT;
+               }
                break;
+
        default:
                break;
        }
-       AppLogDebug("End");
+       AppLogDebug("EXIT");
        return itemCount;
 }
 
 Tizen::Ui::Controls::TableViewGroupItem*
 SettingForm::CreateGroupItem(int groupIndex, int itemWidth)
 {
-       AppLogDebug("Start");
+       AppLogDebug("ENTER");
        TableViewGroupItem* pItem = new (std::nothrow) TableViewGroupItem();
        Tizen::Ui::Controls::Label* pGroupNameLabel = new (std::nothrow) Label();
 
        switch (groupIndex)
        {
        case ID_MAIN_TAB_MENU_ITEM:
-       {
-               pItem->Construct(Dimension(itemWidth, SETTING_ITEM_HEIGHT));
-               pGroupNameLabel->Construct(Rectangle(0, 0, itemWidth, SETTING_ITEM_HEIGHT), ResourceManager::GetString(L"IDS_MUSIC_BODY_MUSIC_MENU"));
+               {
+                       pItem->Construct(Dimension(itemWidth, SETTING_ITEM_HEIGHT));
+                       pGroupNameLabel->Construct(Rectangle(0, 0, itemWidth, SETTING_ITEM_HEIGHT), ResourceManager::GetString(L"IDS_MUSIC_BODY_MUSIC_MENU"));
+               }
                break;
-       }
+
        case ID_MAIN_AUTO_OFF_ITEM:
-       {
-               pItem->Construct(Dimension(itemWidth, SETTING_ITEM_HEIGHT));
-               pGroupNameLabel->Construct(Rectangle(0, 0, itemWidth, SETTING_ITEM_HEIGHT), ResourceManager::GetString(L"IDS_MUSIC_BODY_MUSIC_AUTO_OFF"));
+               {
+                       pItem->Construct(Dimension(itemWidth, SETTING_ITEM_HEIGHT));
+                       pGroupNameLabel->Construct(Rectangle(0, 0, itemWidth, SETTING_ITEM_HEIGHT), ResourceManager::GetString(L"IDS_MUSIC_BODY_MUSIC_AUTO_OFF"));
+               }
                break;
-       }
+
        default:
                break;
        }
@@ -196,23 +208,23 @@ SettingForm::CreateGroupItem(int groupIndex, int itemWidth)
        pGroupNameLabel->SetTextHorizontalAlignment(ALIGNMENT_LEFT);
        pItem->AddControl(*pGroupNameLabel);
 
-       AppLogDebug("End");
+       AppLogDebug("EXIT");
        return pItem;
 }
 
 bool
 SettingForm::DeleteGroupItem(int groupIndex, TableViewGroupItem* pItem)
 {
-       AppLogDebug("Start");
+       AppLogDebug("ENTER");
        delete pItem;
-       AppLogDebug("End");
+       AppLogDebug("EXIT");
        return true;
 }
 
 Tizen::Ui::Controls::TableViewItem*
 SettingForm::CreateItem(int groupIndex, int itemIndex, int itemWidth)
 {
-       AppLogDebug("Start");
+       AppLogDebug("ENTER");
        TableViewItem* pItem = new (std::nothrow) TableViewItem();
 
        Label* pGroupNameLable = null;
@@ -223,25 +235,45 @@ SettingForm::CreateItem(int groupIndex, int itemIndex, int itemWidth)
 
                pGroupNameLable = new (std::nothrow) Label();
 
-               switch(itemIndex)
+               switch (itemIndex)
                {
                case ID_SUB_ALBUM_ITEM:
-                       pGroupNameLable->Construct(RECT_MAIN_ITEM, ResourceManager::GetString(L"IDS_MUSIC_BODY_ALBUMS"));
+                       {
+                               pGroupNameLable->Construct(RECT_MAIN_ITEM, ResourceManager::GetString(L"IDS_MUSIC_BODY_ALBUMS"));
+                       }
                        break;
+
                case ID_SUB_ARTIST_ITEM:
-                       pGroupNameLable->Construct(RECT_MAIN_ITEM, ResourceManager::GetString(L"IDS_MUSIC_BODY_ARTISTS"));
+                       {
+                               pGroupNameLable->Construct(RECT_MAIN_ITEM, ResourceManager::GetString(L"IDS_MUSIC_BODY_ARTISTS"));
+                       }
                        break;
+
                case ID_SUB_GENRE_ITEM:
-                       pGroupNameLable->Construct(RECT_MAIN_ITEM, ResourceManager::GetString(L"IDS_MUSIC_BODY_GENRES"));
+                       {
+                               pGroupNameLable->Construct(RECT_MAIN_ITEM, ResourceManager::GetString(L"IDS_MUSIC_BODY_GENRES"));
+                       }
                        break;
+
                case ID_SUB_COMPOSER_ITEM:
-                       pGroupNameLable->Construct(RECT_MAIN_ITEM, ResourceManager::GetString(L"IDS_MUSIC_BODY_COMPOSERS"));
+                       {
+                               pGroupNameLable->Construct(RECT_MAIN_ITEM, ResourceManager::GetString(L"IDS_MUSIC_BODY_COMPOSERS"));
+                       }
                        break;
+
                case ID_SUB_YEAR_ITEM:
-                       pGroupNameLable->Construct(RECT_MAIN_ITEM, ResourceManager::GetString(L"IDS_MUSIC_BODY_YEARS"));
+                       {
+                               pGroupNameLable->Construct(RECT_MAIN_ITEM, ResourceManager::GetString(L"IDS_MUSIC_BODY_YEARS"));
+                       }
                        break;
+
                case ID_SUB_FOLDER_ITEM:
-                       pGroupNameLable->Construct(RECT_MAIN_ITEM, ResourceManager::GetString(L"IDS_MUSIC_TAB4_FOLDERS"));
+                       {
+                               pGroupNameLable->Construct(RECT_MAIN_ITEM, ResourceManager::GetString(L"IDS_MUSIC_TAB4_FOLDERS"));
+                       }
+                       break;
+
+               default:
                        break;
                }
                pItem->AddControl(*pGroupNameLable);
@@ -252,77 +284,96 @@ SettingForm::CreateItem(int groupIndex, int itemIndex, int itemWidth)
 
                pGroupNameLable = new (std::nothrow) Label();
 
-               switch(itemIndex)
+               switch (itemIndex)
                {
                case ID_SUB_ZERO_ITEM:
-                       pGroupNameLable->Construct(RECT_MAIN_ITEM, ResourceManager::GetString(L"IDS_MUSIC_BUTTON_OFF"));
+                       {
+                               pGroupNameLable->Construct(RECT_MAIN_ITEM, ResourceManager::GetString(L"IDS_MUSIC_BUTTON_OFF"));
+                       }
                        break;
+
                case ID_SUB_FIFTEEN_ITEM:
-                       pGroupNameLable->Construct(RECT_MAIN_ITEM, ResourceManager::GetString(L"IDS_MUSIC_OPT_AFTER_15_MIN_ABB"));
+                       {
+                               pGroupNameLable->Construct(RECT_MAIN_ITEM, ResourceManager::GetString(L"IDS_MUSIC_OPT_AFTER_15_MIN_ABB"));
+                       }
                        break;
+
                case ID_SUB_THIRTY_ITEM:
-                       pGroupNameLable->Construct(RECT_MAIN_ITEM, ResourceManager::GetString(L"IDS_MUSIC_BODY_AFTER_30_MIN"));
+                       {
+                               pGroupNameLable->Construct(RECT_MAIN_ITEM, ResourceManager::GetString(L"IDS_MUSIC_BODY_AFTER_30_MIN"));
+                       }
                        break;
+
                case ID_SUB_ONE_HOUR_ITEM:
-                       pGroupNameLable->Construct(RECT_MAIN_ITEM, ResourceManager::GetString(L"IDS_MUSIC_BODY_AFTER_1_HOUR"));
+                       {
+                               pGroupNameLable->Construct(RECT_MAIN_ITEM, ResourceManager::GetString(L"IDS_MUSIC_BODY_AFTER_1_HOUR"));
+                       }
                        break;
+
                case ID_SUB_ONE_HOUR_THIRTY_ITEM:
-                       pGroupNameLable->Construct(RECT_MAIN_ITEM, ResourceManager::GetString(L"IDS_MUSIC_POP_AFTER_1_HOUR_30_MIN"));
+                       {
+                               pGroupNameLable->Construct(RECT_MAIN_ITEM, ResourceManager::GetString(L"IDS_MUSIC_POP_AFTER_1_HOUR_30_MIN"));
+                       }
                        break;
+
                case ID_SUB_TWO_HOURS_ITEM:
-                       pGroupNameLable->Construct(RECT_MAIN_ITEM, ResourceManager::GetString(L"IDS_MUSIC_BODY_AFTER_2_HOURS"));
+                       {
+                               pGroupNameLable->Construct(RECT_MAIN_ITEM, ResourceManager::GetString(L"IDS_MUSIC_BODY_AFTER_2_HOURS"));
+                       }
+                       break;
+
+               default:
                        break;
                }
                pItem->AddControl(*pGroupNameLable);
        }
-       AppLogDebug("End");
+       AppLogDebug("EXIT");
        return pItem;
 }
 
 void
 SettingForm::UpdateItem(int groupIndex, int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem)
 {
-       AppLogDebug("Start");
-       AppLogDebug("End");
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 
 void
 SettingForm::UpdateGroupItem(int groupIndex, Tizen::Ui::Controls::TableViewGroupItem* pItem)
 {
-       AppLogDebug("Start");
-       AppLogDebug("End");
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 
 int
 SettingForm::GetDefaultItemHeight(void)
 {
-       AppLogDebug("Start");
-       AppLogDebug("End");
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
        return SETTING_ITEM_HEIGHT;
 }
 
 int
 SettingForm::GetDefaultGroupItemHeight(void)
 {
-       AppLogDebug("Start");
-       AppLogDebug("End");
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
        return SETTING_ITEM_HEIGHT;
 }
 
 bool
 SettingForm::DeleteItem(int groupIndex, int itemIndex, TableViewItem* pItem)
 {
-       AppLogDebug("Start");
-
+       AppLogDebug("ENTER");
        delete pItem;
-       AppLogDebug("End");
+       AppLogDebug("EXIT");
        return true;
 }
 
 void
 SettingForm::OnGroupedTableViewGroupItemStateChanged(Tizen::Ui::Controls::GroupedTableView& tableView, int groupIndex, Tizen::Ui::Controls::TableViewGroupItem* pItem, Tizen::Ui::Controls::TableViewItemStatus status)
 {
-       AppLogDebug("Start");
+       AppLogDebug("ENTER");
        if (tableView.IsGroupExpanded(groupIndex) == true)
        {
                tableView.CollapseGroup(groupIndex);
@@ -331,74 +382,76 @@ SettingForm::OnGroupedTableViewGroupItemStateChanged(Tizen::Ui::Controls::Groupe
        {
                tableView.ExpandGroup(groupIndex);
        }
-       AppLogDebug("End");
+       AppLogDebug("EXIT");
 }
 void
 SettingForm::OnGroupedTableViewItemStateChanged(Tizen::Ui::Controls::GroupedTableView& tableView, int groupIndex, int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem, Tizen::Ui::Controls::TableViewItemStatus status)
 {
-       AppLogDebug("Start");
+       AppLogDebug("ENTER");
        bool isChecked = false;
-       switch(groupIndex)
+       switch (groupIndex)
        {
        case ID_MAIN_TAB_MENU_ITEM:
-       {
-               if (status == TABLE_VIEW_ITEM_STATUS_CHECKED)
-               {
-                       isChecked = true;
-               }
-               __pSettingPresentationModel->SetTabEnable(itemIndex, isChecked);
-               Frame* pFrame = Application::GetInstance()->GetAppFrame()->GetFrame();
-               Form* pForm = static_cast<Form*>(pFrame->GetControl(CONTENT_FORM_REQUSEST_ID));
-               if (pForm != null)
                {
-                       AppLogDebug("AForm");
-                       pForm->SendUserEvent(0, null);
+                       if (status == TABLE_VIEW_ITEM_STATUS_CHECKED)
+                       {
+                               isChecked = true;
+                       }
+                       __pSettingPresentationModel->SetTabEnable(itemIndex, isChecked);
+                       Frame* pFrame = Application::GetInstance()->GetAppFrame()->GetFrame();
+                       Form* pForm = static_cast<Form*>(pFrame->GetControl(CONTENT_FORM_REQUSEST_ID));
+                       if (pForm != null)
+                       {
+                               AppLogDebug("AForm");
+                               pForm->SendUserEvent(0, null);
+                       }
                }
                break;
-       }
+
        case ID_MAIN_AUTO_OFF_ITEM:
-       {
-               for (int i = 0; i < __pSettingTableView->GetItemCountAt(ID_MAIN_AUTO_OFF_ITEM); i++)
                {
-                       if (i == itemIndex)
-                       {
-                               AppLogDebug("true : %d", i);
-                               __pSettingTableView->SetItemChecked(groupIndex, i, true);
-                       }
-                       else
+                       for (int i = 0; i < __pSettingTableView->GetItemCountAt(ID_MAIN_AUTO_OFF_ITEM); i++)
                        {
-                               AppLogDebug("false : %d", i);
-                               __pSettingTableView->SetItemChecked(groupIndex, i, false);
+                               if (i == itemIndex)
+                               {
+                                       AppLogDebug("true : %d", i);
+                                       __pSettingTableView->SetItemChecked(groupIndex, i, true);
+                               }
+                               else
+                               {
+                                       AppLogDebug("false : %d", i);
+                                       __pSettingTableView->SetItemChecked(groupIndex, i, false);
+                               }
                        }
+                       __pSettingTableView->Invalidate(true);
+                       __pSettingPresentationModel->SetAutoOffTime(itemIndex);
                }
-               __pSettingTableView->Invalidate(true);
-               __pSettingPresentationModel->SetAutoOffTime(itemIndex);
                break;
-       }
+
        default:
                break;
        }
-       AppLogDebug("End");
+       AppLogDebug("EXIT");
 }
 
 void
 SettingForm::OnGroupedTableViewContextItemActivationStateChanged(Tizen::Ui::Controls::GroupedTableView& tableView, int groupIndex, int itemIndex, Tizen::Ui::Controls::TableViewContextItem* pContextItem, bool activated)
 {
-       AppLogDebug("Start");
-       AppLogDebug("End");
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 
 void
 SettingForm::OnActionPerformed(const Tizen::Ui::Control& source, int actionId)
 {
-       AppLogDebug("Start");
-       AppLogDebug("End");
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 
 void
 SettingForm::OnFormBackRequested(Tizen::Ui::Controls::Form& source)
 {
-       AppLogDebug("Start");
+       AppLogDebug("ENTER");
        SceneManager* pSceneManager = SceneManager::GetInstance();
        AppAssert(pSceneManager);
        result r = pSceneManager->GoBackward(BackwardSceneTransition());
@@ -408,14 +461,15 @@ SettingForm::OnFormBackRequested(Tizen::Ui::Controls::Form& source)
                UiApp* pApp = UiApp::GetInstance();
                pApp->Terminate();
        }
-       AppLogDebug("End");
+       AppLogDebug("EXIT");
 }
 
 void
 SettingForm::OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previousSceneId,
-                                                          const Tizen::Ui::Scenes::SceneId& currentSceneId,
-                                                          Tizen::Base::Collection::IList* pArgs)
+                                                               const Tizen::Ui::Scenes::SceneId& currentSceneId,
+                                                               Tizen::Base::Collection::IList* pArgs)
 {
+       AppLogDebug("ENTER");
        SceneManager* pSceneManager = SceneManager::GetInstance();
        AppAssert(pSceneManager);
 
@@ -448,13 +502,13 @@ SettingForm::OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previousSceneId
                pArgs->RemoveAll(true);
                delete pArgs;
        }
-       AppLogDebug("End");
+       AppLogDebug("EXIT");
 }
 
 void
 SettingForm::OnSceneDeactivated(const Tizen::Ui::Scenes::SceneId& currentSceneId,
-                                const Tizen::Ui::Scenes::SceneId& nextSceneId)
+                                       const Tizen::Ui::Scenes::SceneId& nextSceneId)
 {
-       AppLogDebug("Start");
-       AppLogDebug("End");
-}
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
+}
\ No newline at end of file
index 1e779e9..3432cba 100644 (file)
@@ -1,4 +1,4 @@
-//
+//
 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
 //
 // Licensed under the Flora License, Version 1.0 (the License);
 // limitations under the License.
 //
 
+/**
+ * @file               MpSettingPresentationModel.cpp
+ * @brief              This is the implementation file for SettingPresentationModel class.
+ */
+
 #include "MpCommonUtil.h"
 #include "MpIMusicSettingEventListener.h"
 #include "MpSettingPresentationModel.h"
 #include "MpTypes.h"
 
-using namespace Tizen::Base;
 using namespace Tizen::App;
-using namespace Tizen::Io;
-using namespace std;
-using namespace Tizen::Base::Runtime;
+using namespace Tizen::Base;
 using namespace Tizen::Base::Collection;
+using namespace Tizen::Base::Runtime;
+using namespace Tizen::Io;
 
 static const int FIFTEEN_MINUTE = 15 * 60 * 1000;
 static const int THIRTY_MINUTE = 30 * 60 * 1000;
@@ -46,7 +50,7 @@ SettingPresentationModel* SettingPresentationModel::pSettingPresentationModel =
 SettingPresentationModel*
 SettingPresentationModel::GetInstance(void)
 {
-       AppLogDebug("Start");
+       AppLogDebug("ENTER");
        if (pSettingPresentationModel == null)
        {
                pSettingPresentationModel = new (std::nothrow) SettingPresentationModel();
@@ -55,11 +59,11 @@ SettingPresentationModel::GetInstance(void)
                result r = pSettingPresentationModel->Construct();
                TryCatch(r == E_SUCCESS, , null, "PlayerPresentationModel instance is not constructed.");
        }
-       AppLogDebug("End");
+       AppLogDebug("EXIT");
        return pSettingPresentationModel;
 
 CATCH:
-//AppLogExceptionTag("SettingPresentationModel", "SettingPresentationModel::GetInstance(void) Error");
+       //AppLogException("SettingPresentationModel::GetInstance(void) Error");
        delete pSettingPresentationModel;
 
        return null;
@@ -76,31 +80,32 @@ SettingPresentationModel::SettingPresentationModel(void)
        , __isPlayerListsTab(false)
        , __autoOffTime(null)
 {
-       AppLogDebug("Start");
-       AppLogDebug("End");
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 
 SettingPresentationModel::~SettingPresentationModel(void)
 {
-       AppLogDebug("Start");
-       AppLogDebug("End");
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 
 void
 SettingPresentationModel::DestroySettingPresentationModel(void)
 {
-       AppLogDebug("Start");
-       if(pSettingPresentationModel != null)
+       AppLogDebug("ENTER");
+       if (pSettingPresentationModel != null)
        {
-               AppLogDebug("End");
                delete pSettingPresentationModel;
                pSettingPresentationModel = null;
        }
+       AppLogDebug("EXIT");
 }
 
 void
 SettingPresentationModel::InitializeSettingValue(void)
 {
+       AppLogDebug("ENTER");
        __isAlbumsTab = static_cast<bool>(CommonUtil::GetValue(ALBUMS_TAB));
        __isArtistTab = static_cast<bool>(CommonUtil::GetValue(ARTISTS_TAB));
        __isGenresTab = static_cast<bool>(CommonUtil::GetValue(GENRES_TAB));
@@ -110,149 +115,212 @@ SettingPresentationModel::InitializeSettingValue(void)
        __isSongsTab = true;
        __isPlayerListsTab = true;
        __autoOffTime = CommonUtil::GetValue(AUTO_OFF_LEVEL);
+       AppLogDebug("EXIT");
 }
 
 result
 SettingPresentationModel::Construct(void)
 {
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
        return E_SUCCESS;
 }
 
 void
 SettingPresentationModel::SetTabEnable(int tabId, bool enabled)
 {
-       AppLogDebug("Start");
-       switch(tabId)
+       AppLogDebug("ENTER");
+       switch (tabId)
        {
-               case ID_SUB_ALBUM_ITEM:
+       case ID_SUB_ALBUM_ITEM:
+               {
                        __isAlbumsTab = enabled;
                        CommonUtil::SetValue(ALBUMS_TAB, static_cast<int>(enabled));
-                       break;
-               case ID_SUB_ARTIST_ITEM:
+               }
+               break;
+
+       case ID_SUB_ARTIST_ITEM:
+               {
                        __isArtistTab = enabled;
                        CommonUtil::SetValue(ARTISTS_TAB, static_cast<int>(enabled));
-                       break;
-               case ID_SUB_GENRE_ITEM:
+               }
+               break;
+
+       case ID_SUB_GENRE_ITEM:
+               {
                        __isGenresTab = enabled;
                        CommonUtil::SetValue(GENRES_TAB, static_cast<int>(enabled));
-                       break;
-               case ID_SUB_COMPOSER_ITEM:
+               }
+               break;
+
+       case ID_SUB_COMPOSER_ITEM:
+               {
                        __isComposersTab = enabled;
                        CommonUtil::SetValue(COMPOSERS_TAB, static_cast<int>(enabled));
-                       break;
-               case ID_SUB_YEAR_ITEM:
+               }
+               break;
+
+       case ID_SUB_YEAR_ITEM:
+               {
                        __isYearsTab = enabled;
                        CommonUtil::SetValue(YEARS_TAB, static_cast<int>(enabled));
-                       break;
-               case ID_SUB_FOLDER_ITEM:
+               }
+               break;
+
+       case ID_SUB_FOLDER_ITEM:
+               {
                        __isFoldersTab = enabled;
                        CommonUtil::SetValue(FOLDERS_TAB, static_cast<int>(enabled));
-                       break;
-               default:
-                       break;
+               }
+               break;
+
+       default:
+               break;
        }
 
-       AppLogDebug("End");
+       AppLogDebug("EXIT");
 }
 bool
 SettingPresentationModel::IsTabEnable(int tabId)
 {
-       AppLogDebug("Start");
+       AppLogDebug("ENTER");
        bool enable = false;
-       switch(tabId)
+       switch (tabId)
        {
-               case ID_SUB_ALBUM_ITEM:
+       case ID_SUB_ALBUM_ITEM:
+               {
                        enable = __isAlbumsTab;
-                       break;
-               case ID_SUB_ARTIST_ITEM:
+               }
+               break;
+
+       case ID_SUB_ARTIST_ITEM:
+               {
                        enable = __isArtistTab;
-                       break;
-               case ID_SUB_GENRE_ITEM:
+               }
+               break;
+
+       case ID_SUB_GENRE_ITEM:
+               {
                        enable = __isGenresTab;
-                       break;
-               case ID_SUB_COMPOSER_ITEM:
+               }
+               break;
+
+       case ID_SUB_COMPOSER_ITEM:
+               {
                        enable = __isComposersTab;
-                       break;
-               case ID_SUB_YEAR_ITEM:
+               }
+               break;
+
+       case ID_SUB_YEAR_ITEM:
+               {
                        enable = __isYearsTab;
-                       break;
-               case ID_SUB_FOLDER_ITEM:
+               }
+               break;
+
+       case ID_SUB_FOLDER_ITEM:
+               {
                        enable = __isFoldersTab;
-                       break;
-               case ID_SUB_SONG_ITEM:
+               }
+               break;
+
+       case ID_SUB_SONG_ITEM:
+               {
                        enable = __isSongsTab;
-                       break;
-               case ID_SUB_PLAYERLIST_ITEM:
+               }
+               break;
+
+       case ID_SUB_PLAYERLIST_ITEM:
+               {
                        enable = __isPlayerListsTab;
-                       break;
-               default:
-                       break;
+               }
+               break;
+
+       default:
+               break;
        }
-       AppLogDebug("End");
+       AppLogDebug("EXIT");
        return enable;
 }
 
 void
 SettingPresentationModel::SetAutoOffTime(int autoOffTime)// 0 - 5 (OFF, 15 MIN, 30 MIN, 1 HOUR, 1 HOUR 30 MIN, 2 HOURS)
 {
-       AppLogDebug("Start");
+       AppLogDebug("ENTER");
        int millisecondValue = 0;
-       switch(autoOffTime)
+       switch (autoOffTime)
        {
-               case 0:
-                       break;
-               case 1:
+       case 0:
+               {
+               }
+               break;
+
+       case 1:
+               {
                        millisecondValue = FIFTEEN_MINUTE;
-                       break;
-               case 2:
+               }
+               break;
+
+       case 2:
+               {
                        millisecondValue = THIRTY_MINUTE;
-                       break;
-               case 3:
+               }
+               break;
+
+       case 3:
+               {
                        millisecondValue = ONE_HOUR;
-                       break;
-               case 4:
+               }
+               break;
+
+       case 4:
+               {
                        millisecondValue = ONE_HOUR_THIRTY_MINUTE;
-                       break;
-               case 5:
+               }
+               break;
+
+       case 5:
+               {
                        millisecondValue = TWO_HOURS;
-                       break;
-               default:
-                       break;
+               }
+               break;
+
+       default:
+               break;
        }
        CommonUtil::SetValue(AUTO_OFF_LEVEL, autoOffTime);
        CallOnAutoOffTimeChanged(millisecondValue);
        __autoOffTime = autoOffTime;
-       AppLogDebug("End");
+       AppLogDebug("EXIT");
 }
 
 int
 SettingPresentationModel::GetAutoOffTime(void)
 {
-       AppLogDebug("Start");
-       AppLogDebug("End");
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
        return __autoOffTime;
 }
 
 void
 SettingPresentationModel::AddSettingEventListener(const IMusicSettingEventListener& listener)
 {
-       AppLogDebug("Start");
+       AppLogDebug("ENTER");
        __settingEventListener.Add(const_cast<IMusicSettingEventListener*>(&listener));
-       AppLogDebug("End");
+       AppLogDebug("EXIT");
 }
 
 void
 SettingPresentationModel::RemoveSettingEventListener(const IMusicSettingEventListener& listener)
 {
-       AppLogDebug("Start");
+       AppLogDebug("ENTER");
        __settingEventListener.Remove(const_cast<IMusicSettingEventListener*>(&listener));
-       AppLogDebug("End");
+       AppLogDebug("EXIT");
 }
 
 void
 SettingPresentationModel::CallOnAutoOffTimeChanged(int autoOffTime)
 {
-       AppLogDebug("Start");
+       AppLogDebug("ENTER");
        IMusicSettingEventListener* pListener = null;
        IEnumeratorT<IMusicSettingEventListener*>* pEnum = __settingEventListener.GetEnumeratorN();
 
@@ -261,5 +329,5 @@ SettingPresentationModel::CallOnAutoOffTimeChanged(int autoOffTime)
                pEnum->GetCurrent(pListener);
                pListener->OnAutoOffTimeChanged(autoOffTime);
        }
-       AppLogDebug("End");
-}
+       AppLogDebug("EXIT");
+}
\ No newline at end of file
old mode 100755 (executable)
new mode 100644 (file)
index 3b8b20c..b25023c
@@ -1,4 +1,4 @@
-//
+//
 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
 //
 // Licensed under the Flora License, Version 1.0 (the License);
 // limitations under the License.
 //
 
-#include "MpSharePopup.h"
+/**
+ * @file               MpSharePopup.cpp
+ * @brief              This is the implementation file for SharePopup class.
+ */
+
+#include <FApp.h>
 #include "MpResourceManager.h"
+#include "MpSharePopup.h"
 #include "MpTypes.h"
-#include "FApp.h"
 
 using namespace Tizen::App;
 using namespace Tizen::Base;
+using namespace Tizen::Base::Collection;
 using namespace Tizen::Base::Runtime;
+using namespace Tizen::Graphics;
 using namespace Tizen::Ui;
 using namespace Tizen::Ui::Controls;
-using namespace Tizen::Graphics;
-using namespace Tizen::Base::Collection;
 
-static const int SHART_ITEM_EMAIL   = 0;
+static const int SHART_ITEM_EMAIL = 0;
 /* blocked this code (TDIS-1672 */
 /*static const int SHART_ITEM_MESSAGE = 1;*/
-/*static const int SHARE_TOTAL_COUNT  = 2;*/
-static const int SHARE_TOTAL_COUNT  = 1;
+/*static const int SHARE_TOTAL_COUNT = 2;*/
+static const int SHARE_TOTAL_COUNT = 1;
 /* blocked this code (TDIS-1672 */
 static const int SHARE_POPUP_HEIGHT = 350;
 
 const wchar_t* EMPTY_SPACE = L"";
 
 SharePopup::SharePopup(void)
-: __pShareItemTableView(null)
-, __pCancelButton(null)
-, __pDataList(null)
+       : __pShareItemTableView(null)
+       , __pCancelButton(null)
+       , __pDataList(null)
 {
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 
 SharePopup::~SharePopup(void)
 {
+       AppLogDebug("ENTER");
        if (__pDataList != null)
        {
                __pDataList->RemoveAll(true);
                delete __pDataList;
                __pDataList = null;
        }
-       //AppLogDebug("~SharePopup");
+       AppLogDebug("EXIT");
 }
 
 result
 SharePopup::Initialize(void)
 {
+       AppLogDebug("ENTER");
        result r = E_SUCCESS;
 
        Construct(true, Dimension(POPUP_WIDTH, SHARE_POPUP_HEIGHT));
@@ -67,123 +76,153 @@ SharePopup::Initialize(void)
 
        __pShareItemTableView  = new (std::nothrow) TableView();
        __pShareItemTableView->Construct(Rectangle(0, 0, GetClientAreaBounds().width, GetClientAreaBounds().height - H_CANCEL_BUTTON),
-                                               true,
-                                               TABLE_VIEW_SCROLL_BAR_STYLE_FADE_OUT);
+                                                       true,
+                                                       TABLE_VIEW_SCROLL_BAR_STYLE_FADE_OUT);
        __pShareItemTableView->AddTableViewItemEventListener(*this);
        __pShareItemTableView->SetItemProvider(this);
 
        __pCancelButton = new (std::nothrow) Button();
        __pCancelButton->Construct(Rectangle(0,
-                                         __pShareItemTableView->GetHeight() - Y_GAP_CANCEL_BUTTON,
-                                         GetClientAreaBounds().width,
-                                         H_CANCEL_BUTTON),
-                               ResourceManager::GetString("IDS_COM_BODY_EDIT_CANCEL"));
+                                               __pShareItemTableView->GetHeight() - Y_GAP_CANCEL_BUTTON,
+                                               GetClientAreaBounds().width,
+                                               H_CANCEL_BUTTON),
+                                       ResourceManager::GetString("IDS_COM_BODY_EDIT_CANCEL"));
        __pCancelButton->SetActionId(IDA_BUTTON_CANCEL);
        __pCancelButton->AddActionEventListener(*this);
 
        AddControl(*__pShareItemTableView);
-    AddControl(*__pCancelButton);
+       AddControl(*__pCancelButton);
 
-    return r;
+       AppLogDebug("EXIT");
+       return r;
 }
 
 void
 SharePopup::OnActionPerformed(const Tizen::Ui::Control& source, int actionId)
 {
-       if(actionId == IDA_BUTTON_CANCEL)
+       AppLogDebug("ENTER");
+       if (actionId == IDA_BUTTON_CANCEL)
        {
                SetShowState(false);
                Invalidate(true);
        }
+       AppLogDebug("EXIT");
 }
 
 void
-SharePopup::OnTouchDoublePressed(const Tizen::Ui::Control &source,
-                                                        const Tizen::Graphics::Point &currentPosition,
-                                 const Tizen::Ui::TouchEventInfo &touchInfo)
+SharePopup::OnTouchDoublePressed(const Tizen::Ui::Controlsource,
+                                       const Tizen::Graphics::Point& currentPosition,
+                                       const Tizen::Ui::TouchEventInfo& touchInfo)
 {
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 
 void
-SharePopup::OnTouchLongPressed(const Tizen::Ui::Control &source,
-                               const Tizen::Graphics::Point &currentPosition,
-                               const Tizen::Ui::TouchEventInfo &touchInfo)
+SharePopup::OnTouchLongPressed(const Tizen::Ui::Controlsource,
+                                       const Tizen::Graphics::Point& currentPosition,
+                                       const Tizen::Ui::TouchEventInfo& touchInfo)
 {
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 
 void
-SharePopup::OnTouchFocusIn(const Tizen::Ui::Control &source,
-                           const Tizen::Graphics::Point &currentPosition,
-                           const Tizen::Ui::TouchEventInfo &touchInfo)
+SharePopup::OnTouchFocusIn(const Tizen::Ui::Controlsource,
+                                       const Tizen::Graphics::Point& currentPosition,
+                                       const Tizen::Ui::TouchEventInfo& touchInfo)
 {
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 
-void SharePopup::OnTouchFocusOut(const Tizen::Ui::Control &source,
-                                 const Tizen::Graphics::Point &currentPosition,
-                                 const Tizen::Ui::TouchEventInfo &touchInfo)
+void
+SharePopup::OnTouchFocusOut(const Tizen::Ui::Control& source,
+                                       const Tizen::Graphics::Point& currentPosition,
+                                       const Tizen::Ui::TouchEventInfo& touchInfo)
 {
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 
-void SharePopup::OnTouchMoved(const Tizen::Ui::Control &source,
-                              const Tizen::Graphics::Point &currentPosition,
-                              const Tizen::Ui::TouchEventInfo &touchInfo)
+void
+SharePopup::OnTouchMoved(const Tizen::Ui::Control& source,
+                                       const Tizen::Graphics::Point& currentPosition,
+                                       const Tizen::Ui::TouchEventInfo& touchInfo)
 {
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 
-void SharePopup::OnTouchPressed(const Tizen::Ui::Control &source,
-                                const Tizen::Graphics::Point &currentPosition,
-                                const Tizen::Ui::TouchEventInfo &touchInfo)
+void
+SharePopup::OnTouchPressed(const Tizen::Ui::Control& source,
+                                       const Tizen::Graphics::Point& currentPosition,
+                                       const Tizen::Ui::TouchEventInfo& touchInfo)
 {
-       if( GetShowState() && (currentPosition.x < 0  || currentPosition.y < 0  || GetBounds().width || GetBounds().height))
-    {
+       AppLogDebug("ENTER");
+       if (GetShowState() && (currentPosition.x < 0  || currentPosition.y < 0  || GetBounds().width || GetBounds().height))
+       {
 //             SetShowState(false);
 //             Invalidate(true);
-    }
+       }
+       AppLogDebug("EXIT");
 }
 
-void SharePopup::OnTouchReleased(const Tizen::Ui::Control &source,
-                                 const Tizen::Graphics::Point &currentPosition,
-                                 const Tizen::Ui::TouchEventInfo &touchInfo)
+void
+SharePopup::OnTouchReleased(const Tizen::Ui::Control& source,
+                                       const Tizen::Graphics::Point& currentPosition,
+                                       const Tizen::Ui::TouchEventInfo& touchInfo)
 {
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 
 void
 SharePopup::OnKeyPressed(const Tizen::Ui::Control& source, Tizen::Ui::KeyCode keyCode)
 {
-       if( Tizen::Ui::KEY_SIDE_UP == keyCode || Tizen::Ui::KEY_SIDE_DOWN == keyCode )
+       AppLogDebug("ENTER");
+       if (Tizen::Ui::KEY_SIDE_UP == keyCode || Tizen::Ui::KEY_SIDE_DOWN == keyCode)
        {
                ConsumeInputEvent();
        }
+       AppLogDebug("EXIT");
 }
 
 void
 SharePopup::OnKeyReleased(const Tizen::Ui::Control& source, Tizen::Ui::KeyCode keyCode)
 {
-       if( Tizen::Ui::KEY_SIDE_UP == keyCode || Tizen::Ui::KEY_SIDE_DOWN == keyCode )
+       AppLogDebug("ENTER");
+       if (Tizen::Ui::KEY_SIDE_UP == keyCode || Tizen::Ui::KEY_SIDE_DOWN == keyCode)
        {
                ConsumeInputEvent();
        }
+       AppLogDebug("EXIT");
 }
 
 void
 SharePopup::OnKeyLongPressed(const Tizen::Ui::Control& source, Tizen::Ui::KeyCode keyCode)
 {
-       if( Tizen::Ui::KEY_SIDE_UP == keyCode || Tizen::Ui::KEY_SIDE_DOWN == keyCode )
+       AppLogDebug("ENTER");
+       if (Tizen::Ui::KEY_SIDE_UP == keyCode || Tizen::Ui::KEY_SIDE_DOWN == keyCode)
        {
                ConsumeInputEvent();
        }
+       AppLogDebug("EXIT");
 }
 
 int
 SharePopup::GetItemCount(void)
 {
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");;
        return SHARE_TOTAL_COUNT;
 }
 
 Tizen::Ui::Controls::TableViewItem*
 SharePopup::CreateItem(const int itemIndex, int itemWidth)
 {
-       TableViewItem* pItem = new (std::nothrow) TableViewItem;
+       AppLogDebug("ENTER");
+       TableViewItem* pItem = new (std::nothrow) TableViewItem();
        pItem->Construct(Dimension(itemWidth, ITEM_HEIGHT), TABLE_VIEW_ANNEX_STYLE_NORMAL);
        pItem->SetBackgroundColor(COLOR_ITEM);
 
@@ -200,77 +239,90 @@ SharePopup::CreateItem(const int itemIndex, int itemWidth)
 
        pItem->AddControl(*pShareItemLabel);
 
+       AppLogDebug("EXIT");
        return pItem;
 }
 
 bool
 SharePopup::DeleteItem(const int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem)
 {
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
        return true;
 }
 
 void
 SharePopup::UpdateItem(int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem)
 {
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 
 int
 SharePopup::GetDefaultItemHeight(void)
 {
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
        return ITEM_HEIGHT;
 }
 
 void
 SharePopup::OnTableViewItemStateChanged(Tizen::Ui::Controls::TableView& tableView,
-                                        int itemIndex,
-                                        Tizen::Ui::Controls::TableViewItem* pItem,
-                                        Tizen::Ui::Controls::TableViewItemStatus status)
+                                               int itemIndex,
+                                               Tizen::Ui::Controls::TableViewItem* pItem,
+                                               Tizen::Ui::Controls::TableViewItemStatus status)
 {
+       AppLogDebug("ENTER");
        if (status == TABLE_VIEW_ITEM_STATUS_SELECTED)
        {
-               switch(itemIndex)
+               switch (itemIndex)
                {
                case SHART_ITEM_EMAIL:
-               {
-                       LaunchAppControl(OPERATION_ID_COMPOSE, PROVIDER_ID_EMAIL);
+                       {
+                               LaunchAppControl(OPERATION_ID_COMPOSE, PROVIDER_ID_EMAIL);
+                       }
                        break;
-               }
+
                /* blocked this code (TDIS-1672 */
                /*case SHART_ITEM_MESSAGE:
-               {
-                       LaunchAppControl(OPERATION_ID_COMPOSE, PROVIDER_ID_MESSAGE);
-                       break;
-               }*/
+                       {
+                               LaunchAppControl(OPERATION_ID_COMPOSE, PROVIDER_ID_MESSAGE);
+                       }
+                       break;*/
                /* blocked this code (TDIS-1672 */
+
                default:
-               {
                        break;
-               }
                }//end of switch
                SetShowState(false);
                Invalidate(true);
        }//end of if
+       AppLogDebug("EXIT");
 }
 
 void
 SharePopup::OnTableViewContextItemActivationStateChanged(Tizen::Ui::Controls::TableView& tableView,
-                                                         int itemIndex,
-                                                         Tizen::Ui::Controls::TableViewContextItem* pContextItem,
-                                                         bool activated)
+                                                                       int itemIndex,
+                                                                       Tizen::Ui::Controls::TableViewContextItem* pContextItem,
+                                                                       bool activated)
 {
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 
 void
 SharePopup::OnTableViewItemReordered(Tizen::Ui::Controls::TableView& tableView,
-                                            int itemIndexFrom,
-                                            int itemIndexTo)
+                                                       int itemIndexFrom,
+                                                       int itemIndexTo)
 {
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 
 void
 SharePopup::SetArguments(Tizen::Base::Collection::IList* pIList)
 {
-       AppLogDebug("Start");
+       AppLogDebug("ENTER");
        if (pIList != null)
        {
                String combineText;
@@ -307,13 +359,14 @@ SharePopup::SetArguments(Tizen::Base::Collection::IList* pIList)
                        }
                }*/
 //             pAppControlResponseListener = pListener;
-               AppLogDebug("End");
+               AppLogDebug("EXIT");
        }
 }
 
 result
 SharePopup::LaunchAppControl(const Tizen::Base::String& operationId, const Tizen::Base::String& providerId)
 {
+       AppLogDebug("ENTER");
        AppControl* pAc = AppManager::FindAppControlN(providerId, operationId);
        if (pAc == null)
        {
@@ -326,6 +379,7 @@ SharePopup::LaunchAppControl(const Tizen::Base::String& operationId, const Tizen
                delete pAc;
        }
 
+       AppLogDebug("EXIT");
        return E_SUCCESS;
 }
 
@@ -334,6 +388,6 @@ SharePopup::OnAppControlCompleteResponseReceived(const AppId& appId,
                const String& operationId, AppCtrlResult appControlResult,
                const IMap* pExtraData)
 {
-       AppLogDebug("Start");
-       AppLogDebug("End");
-}
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
+}
\ No newline at end of file
old mode 100755 (executable)
new mode 100644 (file)
index ed90dd2..54ffc6e
@@ -1,4 +1,4 @@
-//
+//
 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
 //
 // Licensed under the Flora License, Version 1.0 (the License);
 // limitations under the License.
 //
 
+/**
+ * @file               MpSoundPathPopup.cpp
+ * @brief              This is the implementation file for SoundPathPopup class.
+ */
 
-#include "MpSoundPathPopup.h"
 #include "MpResourceManager.h"
+#include "MpSoundPathPopup.h"
 
 using namespace Tizen::App;
 using namespace Tizen::Base;
@@ -25,7 +29,6 @@ using namespace Tizen::Base::Runtime;
 using namespace Tizen::Graphics;
 using namespace Tizen::Media;
 using namespace Tizen::Ui::Controls;
-using namespace std;
 
 static const int W_SOUNDPATH_POPUP = 550;
 static const int H_SOUNDPATH_POPUP = 450;
@@ -51,25 +54,30 @@ static const int Y_CLOSE_BUTTON = 210;
 static const int W_CLOSE_BUTTON = 400;
 static const int H_CLOSE_BUTTON = 90;
 
-SoundPathPopup::SoundPathPopup()
+SoundPathPopup::SoundPathPopup(void)
        : __pCloseButton(null)
        , __pCheckButton1st(null)
        , __pCheckButton2nd(null)
        , __pAudioRouteManager(null)
        , __selectedAudioRouteMode(0)
 {
+       AppLogDebug("ENTER");
        for (int count = 0; count < AUDIO_ROUTE_MAX; count++)
        {
                __availableAudioRoute[count] = false;
        }
+       AppLogDebug("EXIT");
 }
 
-SoundPathPopup::~SoundPathPopup()
+SoundPathPopup::~SoundPathPopup(void)
 {
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 
 result SoundPathPopup::Initialize(void)
 {
+       AppLogDebug("ENTER");
        result r = E_SUCCESS;
 
        int listCount = 0;
@@ -84,11 +92,11 @@ result SoundPathPopup::Initialize(void)
        r = Popup::Construct(true, Dimension(W_SOUNDPATH_POPUP, H_SOUNDPATH_POPUP));
        TryCatch(r == E_SUCCESS, , "Popup::Construct() Failed:%s", GetErrorMessage(r));
 
-       __pCheckButton1st = new (nothrow) CheckButton();
+       __pCheckButton1st = new (std::nothrow) CheckButton();
 
-       __pCheckButton2nd = new (nothrow) CheckButton();
+       __pCheckButton2nd = new (std::nothrow) CheckButton();
 
-       __pCloseButton = new (nothrow) Button();
+       __pCloseButton = new (std::nothrow) Button();
 
        checkBoxString = ResourceManager::GetString("IDS_MUSIC_HEADER_SELECT_DEVICE");
 
@@ -274,6 +282,68 @@ result SoundPathPopup::Initialize(void)
                        __pCheckButton2nd->SetSelected(false);
                }
        }
+       else if (currentAudioRoute.GetOutputAudioDevice() == OUTPUT_AUDIO_DEVICE_NONE)
+       {
+               if ((__availableAudioRoute[AUDIO_ROUTE_WIRED_ACCESSORY] == false)
+                       && (__availableAudioRoute[AUDIO_ROUTE_BT_A2DP] == false))
+               {
+                       r = __pCheckButton1st->Construct(Rectangle(X_CHECK_BUTTON_1ST, Y_CHECK_BUTTON_1ST, W_CHECK_BUTTON_1ST, H_CHECK_BUTTON_1ST), CHECK_BUTTON_STYLE_ONOFF, BACKGROUND_STYLE_DEFAULT, false, ResourceManager::GetString(L"IDS_VCALL_BODY_BT_HEADSET"));
+                       TryCatch(r == E_SUCCESS, , "__pCheckButton1st->Construct() Failed:%s", GetErrorMessage(r));
+
+                       r = __pCheckButton2nd->Construct(Rectangle(X_CHECK_BUTTON_2ND, Y_CHECK_BUTTON_2ND, W_CHECK_BUTTON_2ND, H_CHECK_BUTTON_2ND), CHECK_BUTTON_STYLE_ONOFF, BACKGROUND_STYLE_DEFAULT, false, ResourceManager::GetString(L"IDS_COM_OPT_HEADPHONES_ABB"));
+                       TryCatch(r == E_SUCCESS, , "__pCheckButton2nd->Construct() Failed:%s", GetErrorMessage(r));
+
+                       __selectedAudioRouteMode = AUDIO_ROUTE_SPEAKER_ONLY;
+
+                       __pCheckButton1st->SetSelected(true);
+                       __pCheckButton2nd->SetSelected(false);
+               }
+               else if ((__availableAudioRoute[AUDIO_ROUTE_WIRED_ACCESSORY] == true)
+                               && (__availableAudioRoute[AUDIO_ROUTE_BT_A2DP] == false))
+               {
+                       checkBoxString = ResourceManager::GetString(L"IDS_COM_OPT_HEADPHONES_ABB");
+
+                       r = __pCheckButton1st->Construct(Rectangle(X_CHECK_BUTTON_1ST, Y_CHECK_BUTTON_1ST, W_CHECK_BUTTON_1ST, H_CHECK_BUTTON_1ST), CHECK_BUTTON_STYLE_ONOFF, BACKGROUND_STYLE_DEFAULT, false, checkBoxString);
+                       TryCatch(r == E_SUCCESS, , "__pCheckButton1st->Construct() Failed:%s", GetErrorMessage(r));
+
+                       checkBoxString = ResourceManager::GetString("IDS_COM_OPT_SPEAKER_ABB");
+
+                       r = __pCheckButton2nd->Construct(Rectangle(X_CHECK_BUTTON_2ND, Y_CHECK_BUTTON_2ND, W_CHECK_BUTTON_2ND, H_CHECK_BUTTON_2ND), CHECK_BUTTON_STYLE_ONOFF, BACKGROUND_STYLE_DEFAULT, false, checkBoxString);
+                       TryCatch(r == E_SUCCESS, , "__pCheckButton2nd->Construct() Failed:%s", GetErrorMessage(r));
+
+                       __selectedAudioRouteMode = AUDIO_ROUTE_WIRED_ACCESSORY_AND_SPEAKER;
+
+                       __pCheckButton1st->SetSelected(false);
+                       __pCheckButton2nd->SetSelected(true);
+               }
+               else if ((__availableAudioRoute[AUDIO_ROUTE_WIRED_ACCESSORY] == false)
+                               && (__availableAudioRoute[AUDIO_ROUTE_BT_A2DP] == true))
+               {
+                       r = __pCheckButton1st->Construct(Rectangle(X_CHECK_BUTTON_1ST, Y_CHECK_BUTTON_1ST, W_CHECK_BUTTON_1ST, H_CHECK_BUTTON_1ST), CHECK_BUTTON_STYLE_ONOFF, BACKGROUND_STYLE_DEFAULT, false, __pAudioRouteManager->GetActiveBluetoothA2dpName());
+                       TryCatch(r == E_SUCCESS, , "__pCheckButton1st->Construct() Failed:%s", GetErrorMessage(r));
+
+                       checkBoxString = ResourceManager::GetString("IDS_COM_OPT_SPEAKER_ABB");
+
+                       r = __pCheckButton2nd->Construct(Rectangle(X_CHECK_BUTTON_2ND, Y_CHECK_BUTTON_2ND, W_CHECK_BUTTON_2ND, H_CHECK_BUTTON_2ND), CHECK_BUTTON_STYLE_ONOFF, BACKGROUND_STYLE_DEFAULT, false, checkBoxString);
+                       TryCatch(r == E_SUCCESS, , "__pCheckButton2nd->Construct() Failed:%s", GetErrorMessage(r));
+
+                       __selectedAudioRouteMode = AUDIO_ROUTE_BT_A2DP_AND_SPEAKER;
+
+                       __pCheckButton1st->SetSelected(true);
+                       __pCheckButton2nd->SetSelected(false);
+               }
+               else
+               {
+                       r = __pCheckButton1st->Construct(Rectangle(X_CHECK_BUTTON_1ST, Y_CHECK_BUTTON_1ST, W_CHECK_BUTTON_1ST, H_CHECK_BUTTON_1ST), CHECK_BUTTON_STYLE_ONOFF, BACKGROUND_STYLE_DEFAULT, false, ResourceManager::GetString(L"IDS_VCALL_BODY_BT_HEADSET"));
+                       TryCatch(r == E_SUCCESS, , "__pCheckButton1st->Construct() Failed:%s", GetErrorMessage(r));
+
+                       r = __pCheckButton2nd->Construct(Rectangle(X_CHECK_BUTTON_2ND, Y_CHECK_BUTTON_2ND, W_CHECK_BUTTON_2ND, H_CHECK_BUTTON_2ND), CHECK_BUTTON_STYLE_ONOFF, BACKGROUND_STYLE_DEFAULT, false, ResourceManager::GetString(L"IDS_COM_OPT_HEADPHONES_ABB"));
+                       TryCatch(r == E_SUCCESS, , "__pCheckButton2nd->Construct() Failed:%s", GetErrorMessage(r));
+
+                       __pCheckButton1st->SetSelected(true);
+                       __pCheckButton2nd->SetSelected(false);
+               }
+       }
 
        checkBoxString = ResourceManager::GetString("IDS_COM_BODY_CLOSE");
 
@@ -297,6 +367,7 @@ result SoundPathPopup::Initialize(void)
        r = AddControl(*__pCloseButton);
        TryCatch(r == E_SUCCESS, , "AddControl(*__CloseButton) Failed:%s", GetErrorMessage(r));
 
+       AppLogDebug("EXIT");
        return r;
 
 CATCH:
@@ -315,6 +386,7 @@ CATCH:
 void
 SoundPathPopup::OnActionPerformed(const Tizen::Ui::Control& source, int actionId)
 {
+       AppLogDebug("ENTER");
        result r = E_SUCCESS;
 
        AudioRouteInfo currentAudioRoute(INPUT_AUDIO_DEVICE_NONE, OUTPUT_AUDIO_DEVICE_NONE);
@@ -412,15 +484,15 @@ SoundPathPopup::OnActionPerformed(const Tizen::Ui::Control& source, int actionId
        default:
                break;
        }
+       AppLogDebug("EXIT");
 }
 
 void
 SoundPathPopup::OnActiveAudioRouteChanged(const Tizen::Media::AudioRouteInfo& route)
 {
+       AppLogDebug("ENTER");
        String checkBoxString = L"";
 
-       AppLogDebug("OnActiveAudioRouteChanged");
-
        switch (route.GetOutputAudioDevice())
        {
        case OUTPUT_AUDIO_DEVICE_BT_A2DP:
@@ -512,13 +584,13 @@ SoundPathPopup::OnActiveAudioRouteChanged(const Tizen::Media::AudioRouteInfo& ro
        default:
                break;
        }
+       AppLogDebug("EXIT");
 }
 
 void
 SoundPathPopup::OnAudioRouteAdded(const Tizen::Media::AudioRouteInfo& route)
 {
-       AppLogDebug("OnAudioRouteAdded");
-
+       AppLogDebug("ENTER");
        switch (route.GetOutputAudioDevice())
        {
        case OUTPUT_AUDIO_DEVICE_NONE:
@@ -560,17 +632,17 @@ SoundPathPopup::OnAudioRouteAdded(const Tizen::Media::AudioRouteInfo& route)
        default:
                break;
        }
+       AppLogDebug("EXIT");
 }
 
 void
 SoundPathPopup::OnAudioRouteRemoved(const Tizen::Media::AudioRouteInfo& route)
 {
+       AppLogDebug("ENTER");
        String checkBoxString = L"";
 
        AudioRouteInfo currentAudioRoute(INPUT_AUDIO_DEVICE_NONE, OUTPUT_AUDIO_DEVICE_NONE);
 
-       AppLogDebug("OnAudioRouteRemoved");
-
        currentAudioRoute = __pAudioRouteManager->GetActiveAudioRoute();
 
        switch (route.GetOutputAudioDevice())
@@ -651,11 +723,13 @@ SoundPathPopup::OnAudioRouteRemoved(const Tizen::Media::AudioRouteInfo& route)
                        }
                }
        }
+       AppLogDebug("EXIT");
 }
 
 void
 SoundPathPopup::ShowPopup(bool state)
 {
+       AppLogDebug("ENTER");
        result r = E_FAILURE;
 
        r = SetShowState(state);
@@ -663,4 +737,5 @@ SoundPathPopup::ShowPopup(bool state)
 
        r = Show();
        TryReturnVoid(r == E_SUCCESS, "Show() failed:%s", GetErrorMessage(r));
-}
+       AppLogDebug("EXIT");
+}
\ No newline at end of file
diff --git a/src/MpThumbnailBase.cpp b/src/MpThumbnailBase.cpp
new file mode 100644 (file)
index 0000000..7f84fe8
--- /dev/null
@@ -0,0 +1,142 @@
+//\r
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.\r
+//\r
+// Licensed under the Flora License, Version 1.0 (the License);\r
+// you may not use this file except in compliance with the License.\r
+// You may obtain a copy of the License at\r
+//\r
+//     http://floralicense.org/license/\r
+//\r
+// Unless required by applicable law or agreed to in writing, software\r
+// distributed under the License is distributed on an AS IS BASIS,\r
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+// See the License for the specific language governing permissions and\r
+// limitations under the License.\r
+//\r
+\r
+/**\r
+ * @file               MpThumbnailBase.cpp\r
+ * @brief              This is the implementation file for ThumbnailBase class.\r
+ */\r
+\r
+#include <cstdlib>\r
+#include <FApp.h>\r
+#include "MpIThumbnailProviderHandler.h"\r
+#include "MpThumbnailBase.h"\r
+#include "MpThumbnailEventArg.h"\r
+#include "MpThumbnailProvider.h"\r
+#include "MpThumbnailInfo.h"\r
+#include "MpTypes.h"\r
+\r
+using namespace Tizen::App;\r
+using namespace Tizen::Graphics;\r
+\r
+ThumbnailBase::ThumbnailBase(void)\r
+       : __pIThumbnailProviderHandler(null)\r
+       , __pThumbnailEvent(null)\r
+{\r
+       AppLogDebug("ENTER");\r
+       AppLogDebug("EXIT");\r
+}\r
+\r
+ThumbnailBase::~ThumbnailBase(void)\r
+{\r
+       AppLogDebug("ENTER");\r
+       RemoveThumbnailEventListner();\r
+       __pIThumbnailProviderHandler = null;\r
+       AppLogDebug("EXIT");\r
+}\r
+\r
+result\r
+ThumbnailBase::Construct(void)\r
+{\r
+       AppLogDebug("ENTER");\r
+       __pIThumbnailProviderHandler = ThumbnailProvider::GetInstance();\r
+       if (__pIThumbnailProviderHandler == null)\r
+       {\r
+               AppLogDebug("ThumbnailProvider::GetInstance() is null");\r
+               return E_FAILURE;\r
+       }\r
+\r
+       SetThumbnailEventListner();\r
+       AppLogDebug("EXIT");\r
+       return E_SUCCESS;\r
+}\r
+\r
+void\r
+ThumbnailBase::SetThumbnailEventListner(void)\r
+{\r
+       AppLogDebug("ENTER");\r
+       CancelAllThumbnailRequest();\r
+\r
+       if (__pThumbnailEvent != null)\r
+       {\r
+               delete __pThumbnailEvent;\r
+               __pThumbnailEvent = null;\r
+       }\r
+\r
+       __pThumbnailEvent = new (std::nothrow) ThumbnailEvent();\r
+       __pThumbnailEvent->AddListener(*(static_cast<IThumbnailEventListener*>(this)));\r
+       AppLogDebug("EXIT");\r
+}\r
+\r
+void\r
+ThumbnailBase::RemoveThumbnailEventListner(void)\r
+{\r
+       AppLogDebug("ENTER");\r
+       CancelAllThumbnailRequest();\r
+\r
+       __pThumbnailEvent->RemoveListener(*(static_cast<IThumbnailEventListener*>(this)));\r
+       delete __pThumbnailEvent;\r
+       __pThumbnailEvent = null;\r
+       AppLogDebug("EXIT");\r
+}\r
+\r
+void\r
+ThumbnailBase::CancelAllThumbnailRequest(void)\r
+{\r
+       AppLogDebug("ENTER");\r
+       __pIThumbnailProviderHandler->CancelAllThumbnailRequest(__pThumbnailEvent);\r
+       AppLogDebug("EXIT");\r
+}\r
+\r
+void\r
+ThumbnailBase::RequestThumbnail(const Tizen::Content::ContentId& contentId, void* pParam) const\r
+{\r
+       AppLogDebug("ENTER");\r
+       __pIThumbnailProviderHandler->RequestThumbnail(contentId, __pThumbnailEvent, pParam);\r
+       AppLogDebug("EXIT");\r
+}\r
+\r
+const Tizen::Graphics::Bitmap*\r
+ThumbnailBase::GetDefaultThumbnail(void) const\r
+{\r
+       AppLogDebug("ENTER");\r
+       AppLogDebug("EXIT");\r
+       return __pIThumbnailProviderHandler->GetDefaultThumbnail();\r
+}\r
+\r
+void\r
+ThumbnailBase::OnThumbnailReceivedN(Tizen::Base::Runtime::IEventArg& eventArg)\r
+{\r
+       AppLogDebug("ENTER");\r
+       ThumbnailInfo* pThumbnailInfo = GetThumbnailInfo(eventArg);\r
+       OnThumbnailInfoReveivedN(pThumbnailInfo);\r
+       AppLogDebug("EXIT");\r
+}\r
+\r
+ThumbnailInfo*\r
+ThumbnailBase::GetThumbnailInfo(Tizen::Base::Runtime::IEventArg& eventArg)\r
+{\r
+       AppLogDebug("ENTER");\r
+       ThumbnailEventArg* pThumbnailEventArg = static_cast<ThumbnailEventArg*>(&eventArg);\r
+       if (pThumbnailEventArg == null)\r
+       {\r
+               AppLogDebug("pThumbnailEventArg is null(%s)", GetErrorMessage(GetLastResult()));\r
+               return null;\r
+       }\r
+\r
+       ThumbnailInfo* pThumbnailInfo = pThumbnailEventArg->GetThumbnailInfoN();\r
+       AppLogDebug("EXIT");\r
+       return pThumbnailInfo;\r
+}
\ No newline at end of file
diff --git a/src/MpThumbnailEvent.cpp b/src/MpThumbnailEvent.cpp
new file mode 100644 (file)
index 0000000..8da5d6a
--- /dev/null
@@ -0,0 +1,44 @@
+//
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.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://floralicense.org/license/
+//
+// 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.
+//
+
+/**
+ * @file               MpThumbnailEvent.cpp
+ * @brief              This is the implementation file for ThumbnailEvent class.
+ */
+
+#include <FBase.h>
+#include "MpThumbnailEvent.h"
+#include "MpThumbnailEventListener.h"
+
+using namespace Tizen::Base::Runtime;
+
+ThumbnailEvent::~ThumbnailEvent(void)
+{
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
+}
+
+void
+ThumbnailEvent::FireImpl(IEventListener& listener, const IEventArg& eventArg)
+{
+       AppLogDebug("ENTER");
+       IThumbnailEventListener* plistener = static_cast<IThumbnailEventListener*>(&listener);
+       if (plistener != null)
+       {
+               plistener->OnThumbnailReceivedN(*(const_cast<IEventArg*>(&eventArg)));
+       }
+       AppLogDebug("EXIT");
+}
\ No newline at end of file
diff --git a/src/MpThumbnailEventArg.cpp b/src/MpThumbnailEventArg.cpp
new file mode 100644 (file)
index 0000000..8b8b4b4
--- /dev/null
@@ -0,0 +1,60 @@
+//
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.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://floralicense.org/license/
+//
+// 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.
+//
+
+/**
+ * @file               MpThumbnailEventArg.cpp
+ * @brief              This is the implementation file for ThumbnailEventArg class.
+ */
+
+#include <FGraphics.h>
+#include "MpThumbnailEventArg.h"
+#include "MpThumbnailInfo.h"
+
+using namespace Tizen::Graphics;
+
+ThumbnailEventArg::ThumbnailEventArg(ThumbnailInfo* pThumbnailInfo)
+       : _pThumbnailInfo(pThumbnailInfo)
+{
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
+}
+
+ThumbnailEventArg::~ThumbnailEventArg(void)
+{
+       AppLogDebug("ENTER");
+       if (_pThumbnailInfo != null)
+       {
+               delete _pThumbnailInfo;
+       }
+       AppLogDebug("EXIT");
+}
+
+ThumbnailInfo*
+ThumbnailEventArg::GetThumbnailInfoN(void)
+{
+       AppLogDebug("ENTER");
+       if (_pThumbnailInfo == null)
+       {
+               return null;
+       }
+
+       Bitmap* pBitmap = _pThumbnailInfo->GetBitmapN();
+       ThumbnailInfo* pThumbnailInfo = new (std::nothrow) ThumbnailInfo();
+       pThumbnailInfo->Construct(_pThumbnailInfo->GetContentId(), *pBitmap, _pThumbnailInfo->GetUserParamN());
+
+       AppLogDebug("EXIT");
+       return pThumbnailInfo;
+}
\ No newline at end of file
diff --git a/src/MpThumbnailInfo.cpp b/src/MpThumbnailInfo.cpp
new file mode 100644 (file)
index 0000000..4943a87
--- /dev/null
@@ -0,0 +1,96 @@
+//
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.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://floralicense.org/license/
+//
+// 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.
+//
+
+/**
+ * @file               MpThumbnailInfo.cpp
+ * @brief              This is the implementation file for ThumbnailInfo class.
+ */
+
+#include <FGraphics.h>
+#include "MpThumbnailInfo.h"
+
+using namespace Tizen::Base;
+using namespace Tizen::Content;
+using namespace Tizen::Graphics;
+
+ThumbnailInfo::ThumbnailInfo(void)
+       : __pBitmap(null)
+       , __pParam(null)
+{
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
+}
+
+ThumbnailInfo::~ThumbnailInfo(void)
+{
+       AppLogDebug("ENTER");
+       delete __pBitmap;
+       __pBitmap = null;
+       AppLogDebug("EXIT");
+}
+
+void
+ThumbnailInfo::Construct(const Tizen::Content::ContentId& contentId,
+                                               const Tizen::Graphics::Bitmap& bitmap, void* pParam)
+{
+       AppLogDebug("ENTER");
+       __contentId = contentId;
+       __pBitmap = &bitmap;
+       __pParam = pParam;
+       AppLogDebug("EXIT");
+}
+
+ContentId
+ThumbnailInfo::GetContentId(void) const
+{
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
+       return __contentId;
+}
+
+Bitmap*
+ThumbnailInfo::GetBitmapN(void) const
+{
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
+       return CloneBitmapN(*__pBitmap);
+}
+
+void*
+ThumbnailInfo::GetUserParamN(void)
+{
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
+       return __pParam;
+}
+
+Bitmap*
+ThumbnailInfo::CloneBitmapN(const Bitmap& bitmap) const
+{
+       AppLogDebug("ENTER");
+       Bitmap* pResultBitmap = null;
+       if (&bitmap != null)
+       {
+               Rectangle mainRect(0, 0, bitmap.GetWidth(), bitmap.GetHeight());
+               Canvas mainCanvas;
+               mainCanvas.Construct(mainRect);
+               mainCanvas.DrawBitmap(mainRect, bitmap);
+               pResultBitmap = new (std::nothrow) Bitmap();
+               pResultBitmap->Construct(mainCanvas, mainRect);
+       }
+       AppLogDebug("EXIT");
+       return pResultBitmap;
+}
\ No newline at end of file
diff --git a/src/MpThumbnailJob.cpp b/src/MpThumbnailJob.cpp
new file mode 100644 (file)
index 0000000..8a58010
--- /dev/null
@@ -0,0 +1,85 @@
+//
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.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://floralicense.org/license/
+//
+// 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.
+//
+
+/**
+ * @file               MpThumbnailJob.cpp
+ * @brief              This is the implementation file for ThumbnailJob class.
+ */
+
+#include <FBase.h>
+#include "MpThumbnailEvent.h"
+#include "MpThumbnailJob.h"
+
+using namespace Tizen::Base::Runtime;
+using namespace Tizen::Content;
+
+ThumbnailJob::ThumbnailJob(void)
+       : __requestId(0)
+       , __pParam(null)
+{
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
+}
+
+ThumbnailJob::~ThumbnailJob(void)
+{
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
+}
+
+void
+ThumbnailJob::Construct(const ContentId& contentId, const unsigned long requestId,
+               const ThumbnailEvent* pRequestEvent, void* pParam)
+{
+       AppLogDebug("ENTER");
+       __contentId = contentId;
+       __requestId = requestId;
+       __pRequestEvent = pRequestEvent;
+       __pParam = pParam;
+       AppLogDebug("EXIT");
+}
+
+ContentId
+ThumbnailJob::GetContentId(void) const
+{
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
+       return __contentId;
+}
+
+unsigned long
+ThumbnailJob::GetRequestId(void) const
+{
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
+       return __requestId;
+}
+
+const ThumbnailEvent*
+ThumbnailJob::GetEvent(void) const
+{
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
+       return __pRequestEvent;
+}
+
+void*
+ThumbnailJob::GetUserParam(void) const
+{
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
+       return __pParam;
+}
\ No newline at end of file
diff --git a/src/MpThumbnailProvider.cpp b/src/MpThumbnailProvider.cpp
new file mode 100644 (file)
index 0000000..1528936
--- /dev/null
@@ -0,0 +1,485 @@
+//
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.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://floralicense.org/license/
+//
+// 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.
+//
+
+/**
+ * @file               MpThumbnailProvider.cpp
+ * @brief              This is the implementation file for ThumbnailProvider class.
+ */
+
+#include <cstdlib>
+#include <FApp.h>
+#include <FContent.h>
+#include <FMedia.h>
+#include "MpThumbnailEvent.h"
+#include "MpThumbnailEventArg.h"
+#include "MpThumbnailJob.h"
+#include "MpThumbnailProvider.h"
+
+using namespace Tizen::App;
+using namespace Tizen::Base;
+using namespace Tizen::Base::Collection;
+using namespace Tizen::Base::Runtime;
+using namespace Tizen::Base::Utility;
+using namespace Tizen::Content;
+using namespace Tizen::Graphics;
+using namespace Tizen::Media;
+
+static const int W_THUMBNAIL = 112;
+static const int H_THUMBNAIL = 112;
+static const Tizen::Base::String DEFAULT_THUMBNAIL = L"34_thumb_07.png";
+
+ThumbnailProvider* ThumbnailProvider::__pThumbnailProviderInstance = null;
+
+ThumbnailProvider::ThumbnailProvider(void)
+       : __pMutexCmd(null)
+       , __pCmdQueue(null)
+       , __pDefaultThumbnail(null)
+       , __requestId(0)
+{
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
+}
+
+ThumbnailProvider::~ThumbnailProvider(void)
+{
+       AppLogDebug("ENTER");
+       if (__pThumbnailProviderInstance != null)
+       {
+               __pThumbnailProviderInstance->Stop();
+               __pThumbnailProviderInstance->Join();
+       }
+
+       if (__pMutexCmd != null)
+       {
+               delete __pMutexCmd;
+       }
+
+       if (__pCmdQueue != null)
+       {
+               delete __pCmdQueue;
+       }
+
+       DestroyDefaultThumbnailBitmap();
+
+       AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
+}
+
+IThumbnailProviderHandler*
+ThumbnailProvider::GetInstance(void)
+{
+       AppLogDebug("ENTER");
+       if (__pThumbnailProviderInstance == null)
+       {
+               if (!IsFailed(CreateInstance()))
+               {
+                       __pThumbnailProviderInstance->Start();
+               }
+       }
+
+       AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
+       return __pThumbnailProviderInstance;
+}
+
+result
+ThumbnailProvider::Construct(void)
+{
+       AppLogDebug("ENTER");
+       __pMutexCmd = new (std::nothrow) Mutex();
+       result r = __pMutexCmd->Create();
+       TryCatch(r == E_SUCCESS, , "[%s] Unable to create mutex", GetErrorMessage(r));
+
+       if (__pCmdQueue != null)
+       {
+               delete __pCmdQueue;
+       }
+       __pCmdQueue = new (std::nothrow) ArrayList(SingleObjectDeleter);
+       r = __pCmdQueue->Construct();
+       TryCatch(r == E_SUCCESS, , "[%s] Unable to construct queue", GetErrorMessage(r));
+
+       CreateDefaultThumbnailBitmap();
+
+       AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
+       return EventDrivenThread::Construct();
+
+CATCH:
+       if (__pMutexCmd != null)
+       {
+               delete __pMutexCmd;
+               __pMutexCmd = null;
+       }
+
+       if (__pCmdQueue != null)
+       {
+               delete __pCmdQueue;
+               __pCmdQueue = null;
+       }
+       AppLogDebug("EXIT with exception(%s)", GetErrorMessage(GetLastResult()));
+
+       return E_FAILURE;
+}
+
+result
+ThumbnailProvider::CreateInstance(void)
+{
+       AppLogDebug("ENTER");
+       __pThumbnailProviderInstance = new (std::nothrow) ThumbnailProvider();
+       result r = __pThumbnailProviderInstance->Construct();
+
+       if (IsFailed(r))
+       {
+               delete __pThumbnailProviderInstance;
+               __pThumbnailProviderInstance = null;
+               AppLogDebug("EXIT 1(%s)", GetErrorMessage(GetLastResult()));
+
+               return r;
+       }
+
+       std::atexit(DestroyInstance);
+       AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
+       return E_SUCCESS;
+}
+
+void
+ThumbnailProvider::DestroyInstance(void)
+{
+       AppLogDebug("ENTER");
+       delete __pThumbnailProviderInstance;
+       __pThumbnailProviderInstance = null;
+       AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
+}
+
+void
+ThumbnailProvider::Release(void)
+{
+       AppLogDebug("ENTER");
+       if (__pThumbnailProviderInstance != null)
+       {
+               delete __pThumbnailProviderInstance;
+               __pThumbnailProviderInstance = null;
+       }
+       AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
+}
+
+void
+ThumbnailProvider::RequestThumbnail(const ContentId& contentId, const ThumbnailEvent* event, void* pParam)
+{
+       AppLogDebug("ENTER");
+       AppLogDebug("[THREAD] Request Job - (MainThread)");
+
+       if (contentId.ToString().IsEmpty() == true || event == null
+               || __pMutexCmd == null || __pCmdQueue == null)
+       {
+               AppLogDebug("EXIT 1(%s)", GetErrorMessage(GetLastResult()));
+               return;
+       }
+
+       __pMutexCmd->Acquire();
+
+       ThumbnailJob* pThumbnailJob = new (std::nothrow) ThumbnailJob();
+       pThumbnailJob->Construct(contentId, ++__requestId, event, pParam);
+       __pCmdQueue->Add(pThumbnailJob);
+
+       __pMutexCmd->Release();
+
+       SendUserEvent(null, null);
+       AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
+}
+
+void
+ThumbnailProvider::CancelThumbnailRequest(const ContentId& contentId, const ThumbnailEvent* event)
+{
+       AppLogDebug("ENTER");
+       ThumbnailJob* pThumbnailJob = null;
+
+       __pMutexCmd->Acquire();
+
+       int loopCount = __pCmdQueue->GetCount();
+       for (int i = 0; i < loopCount; ++i)
+       {
+               pThumbnailJob = static_cast<ThumbnailJob*>(__pCmdQueue->GetAt(i));
+
+               if (pThumbnailJob != null
+                       && pThumbnailJob->GetContentId() == contentId
+                       && pThumbnailJob->GetEvent() == event)
+               {
+                       AppLogDebug("ENTER i(%d) event(%x)", i, event);
+                       __pCmdQueue->RemoveAt(i, true);
+                       break;
+               }
+       }
+       __pMutexCmd->Release();
+       AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
+}
+
+void
+ThumbnailProvider::CancelAllThumbnailRequest(const ThumbnailEvent* event)
+{
+       AppLogDebug("ENTER");
+       ThumbnailJob* pThumbnailJob = null;
+
+       __pMutexCmd->Acquire();
+       int loopCount = __pCmdQueue->GetCount();
+       for (int i = 0; i < loopCount; ++i)
+       {
+               pThumbnailJob = static_cast<ThumbnailJob*>(__pCmdQueue->GetAt(i));
+
+               if (pThumbnailJob != null
+                       && pThumbnailJob->GetEvent() == event)
+               {
+                       AppLogDebug("ENTER i(%d) event(%x)", i, event);
+                       __pCmdQueue->RemoveAt(i, true);
+               }
+       }
+       __pMutexCmd->Release();
+       AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
+}
+
+void
+ThumbnailProvider::ClearThumbnailRequests(void)
+{
+       AppLogDebug("ENTER");
+       __pMutexCmd->Acquire();
+       __pCmdQueue->RemoveAll(true);
+       __pMutexCmd->Release();
+       AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
+}
+
+const Tizen::Graphics::Bitmap*
+ThumbnailProvider::GetDefaultThumbnail(void) const
+{
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
+       return __pDefaultThumbnail;
+}
+
+bool
+ThumbnailProvider::OnStart(void)
+{
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
+
+       return true;
+}
+
+void
+ThumbnailProvider::OnStop(void)
+{
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
+}
+
+void
+ThumbnailProvider::OnUserEventReceivedN(RequestId requestId, IList* pArgs)
+{
+       AppLogDebug("ENTER");
+       AppLogDebug("[THREAD] Receive Job Message - (SubThread)");
+       ThumbnailJob* pThumbnailJob = null;
+       ThumbnailInfo* pThumbnailInfo = null;
+       ContentId contentId;
+
+       if (__pMutexCmd == null || __pCmdQueue == null)
+       {
+               delete pArgs;
+               AppLogDebug("EXIT1(%s)", GetErrorMessage(GetLastResult()));
+               return;
+       }
+
+       __pMutexCmd->Acquire();
+       if (__pCmdQueue->GetCount() > 0)
+       {
+               pThumbnailJob = static_cast<ThumbnailJob*>(__pCmdQueue->GetAt(0));
+               if (pThumbnailJob == null)
+               {
+                       __pCmdQueue->RemoveAt(0);
+                       __pMutexCmd->Release();
+                       return;
+               }
+
+               unsigned long requestId = pThumbnailJob->GetRequestId();
+               ContentId contentId = pThumbnailJob->GetContentId();
+               __pMutexCmd->Release();
+
+               pThumbnailInfo = GetThumbnailInfoN(contentId, pThumbnailJob->GetUserParam());
+               if (pThumbnailInfo == null)
+               {
+                       __pMutexCmd->Acquire();
+                       __pCmdQueue->RemoveAt(0, true);
+                       __pMutexCmd->Release();
+                       AppLogDebug("pThumbnailInfo null");
+                       return;
+               }
+
+               __pMutexCmd->Acquire();
+               pThumbnailJob = static_cast<ThumbnailJob*>(__pCmdQueue->GetAt(0));
+               if (pThumbnailJob != null && requestId == pThumbnailJob->GetRequestId())
+               {
+                       ThumbnailEvent* pThumbnailEvent = const_cast<ThumbnailEvent*>(pThumbnailJob->GetEvent());
+                       if (pThumbnailEvent != null)
+                       {
+                               ThumbnailEventArg* pSendingArg = new (std::nothrow) ThumbnailEventArg(pThumbnailInfo);
+                               pThumbnailEvent->Fire(*pSendingArg);
+                       }
+                       __pCmdQueue->RemoveAt(0, true);
+               }
+               else
+               {
+                       __pCmdQueue->RemoveAt(0, true);
+                       delete pThumbnailInfo;
+               }
+       }
+       __pMutexCmd->Release();
+
+       delete pArgs;
+
+       AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
+}
+
+ThumbnailInfo*
+ThumbnailProvider::GetThumbnailInfoN(const ContentId& contentId, void* pParam) const
+{
+       AppLogDebug("ENTER");
+       ThumbnailInfo* pNewThumbnailInfo = null;
+
+       ContentManager contentManager;
+       result r = contentManager.Construct();
+       if (r == E_SUCCESS)
+       {
+               Bitmap* pBitmap = null;
+               long duration = 0;
+
+               ContentInfo* pContentInfo = contentManager.GetContentInfoN(contentId);
+
+               if (pContentInfo != null && GetLastResult() == E_SUCCESS)
+               {
+                       pBitmap = pContentInfo->GetThumbnailN();
+
+                       if (pBitmap == null)
+                       {
+                               pBitmap = GetThumbnailByDecodeN(pContentInfo->GetContentPath(), pContentInfo->GetContentType());
+                               if (pBitmap == null)
+                               {
+                                       delete pContentInfo;
+                                       return null;
+                               //      pBitmap = ResourceManager::GetBitmapN(IDB_NO_CONTENTS_BROKEN);
+                               }
+                       }
+
+                       pBitmap->Scale(Dimension(W_THUMBNAIL, H_THUMBNAIL));
+               }
+               else
+               {
+                       delete pContentInfo;
+                       AppLogDebug("EXIT 1(%s)", GetErrorMessage(GetLastResult()));
+
+                       return null;
+               }
+
+               ContentType contentType = pContentInfo->GetContentType();
+               if (contentType == CONTENT_TYPE_VIDEO)
+               {
+                       VideoContentInfo* pVideoContentInfo = static_cast<VideoContentInfo*>(pContentInfo);
+                       duration = pVideoContentInfo->GetDuration();
+               }
+               pNewThumbnailInfo = new (std::nothrow) ThumbnailInfo();
+               pNewThumbnailInfo->Construct(contentId, *pBitmap, pParam);
+       }
+       AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
+
+       return pNewThumbnailInfo;
+}
+
+Bitmap*
+ThumbnailProvider::GetThumbnailByDecodeN(const String& filePath, const ContentType contentType) const
+{
+       AppLogDebug("ENTER");
+       Bitmap* pBitmap = null;
+       if (&filePath == null || filePath.GetLength() <= 0)
+       {
+               pBitmap = new (std::nothrow) Bitmap();
+               pBitmap->Construct(Dimension(W_THUMBNAIL, H_THUMBNAIL), BITMAP_PIXEL_FORMAT_RGB565);
+       }
+       else
+       {
+               AudioMetadata* pAudioMeta = ContentManagerUtil::GetAudioMetaN(filePath);
+
+               TryReturn(pAudioMeta != null, null, "filepath is [%ls]", filePath.GetPointer());
+
+               pBitmap = pAudioMeta->GetAlbumArtN();
+               TryReturn(pBitmap != null, null, "There is not a AlbumArt image");
+
+               pBitmap->Scale(Dimension(W_THUMBNAIL, H_THUMBNAIL));
+       }
+       AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
+
+       return pBitmap;
+}
+
+void
+ThumbnailProvider::CreateDefaultThumbnailBitmap(void)
+{
+       AppLogDebug("ENTER");
+       AppResource* pAppResource = Application::GetInstance()->GetAppResource();
+       __pDefaultThumbnail = pAppResource->GetBitmapN(DEFAULT_THUMBNAIL);
+       __pDefaultThumbnail->Scale(Dimension(W_THUMBNAIL, H_THUMBNAIL));
+       AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
+}
+
+void
+ThumbnailProvider::DestroyDefaultThumbnailBitmap(void)
+{
+       AppLogDebug("ENTER");
+       delete __pDefaultThumbnail;
+       __pDefaultThumbnail = null;
+       AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
+}
+
+/*String
+ThumbnailProvider::GetFileNameFromFullPath(const String& fullPath, bool withExt) const
+{
+       AppLogDebug("ENTER");
+       if (fullPath.CompareTo(EMPTY_SPACE) == 0)
+       {
+               AppLogDebug("EXIT 1(%s)", GetErrorMessage(GetLastResult()));
+
+               return EMPTY_SPACE;
+       }
+
+       String delim(DIRECTORY_SEPARATOR);
+       StringTokenizer st(fullPath,delim);
+       String token;
+       while (st.HasMoreTokens())
+       {
+               st.GetNextToken(token);
+       }
+
+       if (withExt == true)
+       {
+               AppLogDebug("EXIT 2(%s)", GetErrorMessage(GetLastResult()));
+
+               return token;
+       }
+       else
+       {
+               String subDelim(FILE_EXT_SEPARATOR);
+               StringTokenizer subSt(token, subDelim);
+               String subToken;
+               subSt.GetNextToken(subToken);
+               AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
+
+               return subToken;
+       }
+}
+*/
\ No newline at end of file
index ac13ec9..6aac518 100644 (file)
@@ -1,4 +1,4 @@
-//
+//
 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
 //
 // Licensed under the Flora License, Version 1.0 (the License);
 // limitations under the License.
 //
 
+/**
+ * @file               MpTypes.cpp
+ * @brief              This is the implementation file for Types class.
+ */
+
 #include <FGraphics.h>
 #include "MpTypes.h"
 
 using namespace Tizen::Graphics;
+
+const Tizen::Base::String IDS_ALBUM_CONTENT_COUNT = L"AlbumContentCount";
+
+const unsigned int COLOR_PANEL_BACKGROUND_GRAY_BLUE = Color32<182, 200, 214>::Value;
+const unsigned int COLOR_WHITE = Color32<255, 255, 255>::Value;
+const wchar_t* IDL_CONTENT_FORM = L"IDL_CONTENT_FORM";
old mode 100755 (executable)
new mode 100644 (file)
index f367f11..eee040e
@@ -1,4 +1,4 @@
-//
+//
 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
 //
 // Licensed under the Flora License, Version 1.0 (the License);
 // limitations under the License.
 //
 
-#include "MpUserPlaylistContentListForm.h"
+/**
+ * @file               MpUserPlaylistContentListForm.cpp
+ * @brief              This is the implementation file for UserPlaylistContentListForm class.
+ */
+
 #include "MpNowPlayContentPanel.h"
-#include "MpContentListPresentationModel.h"
-#include "MpTypes.h"
+#include "MpPlaylistListPresentationModel.h"
+#include "MpPlaylistPickerPopup.h"
+#include "MpSharePopup.h"
+#include "MpThumbnailInfo.h"
+#include "MpUserPlaylistContentListForm.h"
 
 using namespace Tizen::App;
 using namespace Tizen::Base;
 using namespace Tizen::Base::Collection;
 using namespace Tizen::Content;
-using namespace Tizen::Ui;
-using namespace Tizen::Ui::Controls;
-using namespace Tizen::Ui::Scenes;
 using namespace Tizen::Graphics;
 using namespace Tizen::Io;
 using namespace Tizen::System;
+using namespace Tizen::Ui;
+using namespace Tizen::Ui::Controls;
+using namespace Tizen::Ui::Scenes;
 
-static const int Y_GAP_LABEL     =  10;
-static const int W_SONG_TIME     = 120;
+static const int Y_GAP_LABEL = 10;
+static const int W_SONG_TIME = 160;
+static const int X_OFFSET_EDIT_STYLE_TABLE_VIEW = 96;
 
 UserPlaylistContentListForm::UserPlaylistContentListForm(void)
-: __deletedItem(false)
-, __pStrSceneId(null)
-, __pStrContentName(null)
-, __pContentTableView(null)
-, __pPresentationModel(null)
-, __pNowPlayContentPanel(null)
-, __pNoContentImageLabel(null)
-, __pNoContentTextLabel(null)
+       : ContentListForm::ContentListForm()
+       , ThumbnailBase::ThumbnailBase()
+       , __pThumbnail(null)
+       , __deletedItem(false)
+       , __pPresentationModel(null)
 {
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 
 UserPlaylistContentListForm::~UserPlaylistContentListForm(void)
 {
-}
-
-bool
-UserPlaylistContentListForm::Initialize(void)
-{
-       result r = Construct( FORM_STYLE_NORMAL | FORM_STYLE_INDICATOR | FORM_STYLE_HEADER | FORM_STYLE_FOOTER);
-       if (IsFailed(r))
-       {
-               //AppLogDebug("Unable to construct ContentForm");
-               return false;
-       }
-
-       return true;
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 
 result
 UserPlaylistContentListForm::OnInitializing(void)
 {
-       __pContentTableView = new (std::nothrow) TableView();
-       __pContentTableView->Construct(Rectangle(0, 0, GetClientAreaBounds().width, GetClientAreaBounds().height),
-                                              true,
-                                              TABLE_VIEW_SCROLL_BAR_STYLE_FADE_OUT);
-       __pContentTableView->AddTableViewItemEventListener(*this);
-       __pContentTableView->SetItemProvider(this);
-
-       __pNoContentImageLabel = new (std::nothrow) Label();
-       __pNoContentImageLabel->Construct(Rectangle((GetWidth() - W_NO_CONTENT)/ 2, Y_GAP_NO_CONTENT, W_NO_CONTENT, H_NO_CONTENT),L"");
-       __pNoContentImageLabel->SetBackgroundBitmap(*(ResourceManager::GetBitmapN(NO_CONTENT_BITMAP)));
-
-       __pNoContentTextLabel = new (std::nothrow) Label();
-       __pNoContentTextLabel->Construct(Rectangle(0,
-                                                  __pNoContentImageLabel->GetHeight() + __pNoContentImageLabel->GetY(),
-                                                  GetWidth(),
-                                                  H_TEXT_NO_CONTENT),
-                                                  ResourceManager::GetString(L"IDS_COM_BODY_NO_ITEMS"));
-       __pNoContentTextLabel->SetTextConfig(FONT_SIZE_NO_CONTENT, LABEL_TEXT_STYLE_BOLD);
-
-       AddControl(*__pContentTableView);
-       AddControl(*__pNoContentImageLabel);
-       AddControl(*__pNoContentTextLabel);
-
-    return E_SUCCESS;
+       AppLogDebug("ENTER");
+       CreateTableview();
+       CreateNoContentImage(L"IDS_MUSIC_HEADER_NO_SONGS");
+       CreateSelectAllCheckedButton();
+       CreateCheckedCountLabel();
+
+       AppLogDebug("EXIT");
+       return ThumbnailBase::Construct();
 }
 
 result
 UserPlaylistContentListForm::OnTerminating(void)
 {
-       if (__pPresentationModel != null)
-       {
-               delete __pPresentationModel;
-               __pPresentationModel = null;
-       }
-
+       AppLogDebug("ENTER");
+       __pPresentationModel = null;
+       AppLogDebug("EXIT");
        return E_SUCCESS;
 }
 
 void
 UserPlaylistContentListForm::OnActionPerformed(const Tizen::Ui::Control& source, int actionId)
 {
-       //AppLogDebug("OnActionPerformed");
+       AppLogDebug("ENTER");
        SceneManager* pSceneManager = SceneManager::GetInstance();
        AppAssert(pSceneManager);
 
        //AppLogDebug("actionId : %d", actionId);
 
-       switch(actionId)
+       switch (actionId)
        {
+       case IDA_CHECK_BUTTON:
+               {
+                       __checkedItemCount = __pPresentationModel->GetContentCount();
+                       if (__checkedItemCount > INIT_VALUE)
+                       {
+                               Footer* pFooter = GetFooter();
+
+                               pFooter->SetItemEnabled(INDEX_FOOTER_DELETE, true);
+                               pFooter->SetItemEnabled(INDEX_FOOTER_SHARE, true);
+                               pFooter->SetItemEnabled(INDEX_FOOTER_ADDTOPLATLIST, true);
+
+                               pFooter->Invalidate(true);
+                       }
+                       CommonUtil::SetAllCheckState(true, *__pContentTableView, __pPresentationModel->GetContentCount());
+                       CommonUtil::ShowCheckedCountLabel(*__pCheckedCountLabel, __checkedItemCount, *__pContentTableView, *this);
+               }
+               break;
+
+       case IDA_UNCHECK_BUTTON:
+               {
+                       Footer* pFooter = GetFooter();
+
+                       pFooter->SetItemEnabled(INDEX_FOOTER_DELETE, false);
+                       pFooter->SetItemEnabled(INDEX_FOOTER_SHARE, false);
+                       pFooter->SetItemEnabled(INDEX_FOOTER_ADDTOPLATLIST, false);
+
+                       pFooter->Invalidate(true);
+
+                       __checkedItemCount = INIT_VALUE;
+                       CommonUtil::SetAllCheckState(false, *__pContentTableView, __pPresentationModel->GetContentCount());
+                       CommonUtil::ShowCheckedCountLabel(*__pCheckedCountLabel, __checkedItemCount, *__pContentTableView, *this);
+               }
+               break;
+
        case IDA_FOOTER_BUTTON_EDIT:
-       {
-               String tempSceneId = __pStrSceneId->GetPointer();
-               String tempContentName = __pStrContentName->GetPointer();
-               ArrayList* pData = new ArrayList();
-               pData->Construct();
-               pData->Add(*(new String(tempSceneId)));
-               pData->Add(*(new String(tempContentName)));
-               pData->Add(*(new Integer(USER_CONTENT)));
-               pData->Add(*__pPresentationModel);
-
-               pSceneManager->GoForward(ForwardSceneTransition(IDSCN_CONTENT_LIST_EDIT,
-                                                                                                               SCENE_TRANSITION_ANIMATION_TYPE_NONE),
-                                                                                                               pData);
+               {
+                       ToggleViewMode(false);
+               }
                break;
-       }
-       case IDA_FOOTER_BUTTON_ADD_TO_PLAYLIST:
-       {
-               CommonUtil::SetAddtoPlaylistState(true);
-               CommonUtil::SetAddtoPlaylistName(*__pStrContentName);
 
-               pSceneManager->GoForward(ForwardSceneTransition(IDSCN_ALL_CONTENT_PICKER));
+       case IDA_FOOTER_BUTTON_CANCEL:
+               {
+                       __pSelectAllCheckedButton->SetSelected(false);
+                       __checkedItemCount = INIT_VALUE;
+                       CommonUtil::SetAllCheckState(false, *__pContentTableView, __pPresentationModel->GetContentCount());
+                       CommonUtil::ShowCheckedCountLabel(*__pCheckedCountLabel, __checkedItemCount, *__pContentTableView, *this);
+                       ToggleViewMode(true);
+               }
                break;
-       }
-       /*case IDA_FOOTER_BUTTON_SEARCH:
-       {
-               pSceneManager->GoForward(ForwardSceneTransition(IDSCN_SEARCH));
+
+       case IDA_FOOTER_BUTTON_DELETE:
+               {
+                       Footer* pFooter = GetFooter();
+
+                       if (__checkedItemCount <= INIT_VALUE)
+                       {
+                               return;
+                       }
+
+                       pFooter->SetItemEnabled(INDEX_FOOTER_DELETE, false);
+                       pFooter->SetItemEnabled(INDEX_FOOTER_SHARE, false);
+                       pFooter->SetItemEnabled(INDEX_FOOTER_ADDTOPLATLIST, false);
+                       pFooter->Invalidate(true);
+
+                       int totalCount = __pPresentationModel->GetContentCount();
+                       for (int iCount = 0; iCount < totalCount; iCount++)
+                       {
+                               if (__pContentTableView->IsItemChecked(iCount) == true)
+                               {
+                                       ContentInformation* pContentInfoStruct = __pPresentationModel->GetContentInfoN(iCount);
+                                       __pContentTableView->SetItemChecked(iCount,false);
+                                       if (pContentInfoStruct == null)
+                                       {
+                                               return;
+                                       }
+                                       __pPresentationModel->DeleteContent(USER_CONTENT, *pContentInfoStruct);
+
+                                       delete pContentInfoStruct;
+                                       pContentInfoStruct = null;
+                               }
+                       }
+                       __pPresentationModel->UpdatePlaylistContentList(USER_CONTENT, *__pStrContentName);
+                       __pContentTableView->UpdateTableView();
+                       __pContentTableView->Invalidate(true);
+
+                       __checkedItemCount = INIT_VALUE;
+                       CommonUtil::ShowCheckedCountLabel(*__pCheckedCountLabel, __checkedItemCount, *__pContentTableView, *this);
+                       if (__pPresentationModel->GetContentCount() > 0)
+                       {
+                               CommonUtil::ShowSelectAllCheckButton(*__pSelectAllCheckedButton);
+                       }
+                       else
+                       {
+                               __pSelectAllCheckedButton->SetEnabled(false);
+                               __pSelectAllCheckedButton->SetShowState(false);
+                               CommonUtil::ShowNoContentImage(INIT_VALUE, *__pContentTableView, *__pNoContentImageLabel, *__pNoContentTextLabel);
+                       }
+
+               }
                break;
-       }*/
+
+       case IDA_FOOTER_BUTTON_SHARE:
+               {
+                       Tizen::Base::Collection::ArrayList* pDataList = new (std::nothrow) ArrayList();
+                       Footer* pFooter = GetFooter();
+                       int totalCount = __pPresentationModel->GetContentCount();
+
+                       pDataList->Construct();
+
+                       for (int iCount = 0; iCount < totalCount; iCount++)
+                       {
+                               if (__pContentTableView->IsItemChecked(iCount) == true)
+                               {
+                                       ContentInformation* pContentInfoStruct = __pPresentationModel->GetContentInfoN(iCount);
+                                       if (pContentInfoStruct == null)
+                                       {
+                                               pDataList->RemoveAll(true);
+                                               delete pDataList;
+                                               pDataList = null;
+                                               return;
+                                       }
+                                       pDataList->Add(*(new (std::nothrow) String(L"attachment:" + pContentInfoStruct->ContentFilePath)));
+
+                                       __pContentTableView->SetItemChecked(iCount, false);
+
+                                       delete pContentInfoStruct;
+                                       pContentInfoStruct = null;
+                               }
+                       }
+                       pFooter->SetItemEnabled(INDEX_FOOTER_DELETE, false);
+                       pFooter->SetItemEnabled(INDEX_FOOTER_SHARE, false);
+                       pFooter->SetItemEnabled(INDEX_FOOTER_ADDTOPLATLIST, false);
+
+                       __checkedItemCount = INIT_VALUE;
+                       CommonUtil::ShowCheckedCountLabel(*__pCheckedCountLabel, __checkedItemCount, *__pContentTableView, *this);
+                       CommonUtil::ShowSelectAllCheckButton(*__pSelectAllCheckedButton);
+
+                       Invalidate(true);
+
+                       if (__pSharePopup == null)
+                       {
+                               __pSharePopup = new (std::nothrow) SharePopup();
+                               __pSharePopup->Initialize();
+                       }
+                       __pSharePopup->SetShowState(true);
+                       __pSharePopup->Show();
+                       __pSharePopup->SetArguments(pDataList);
+               }
+               break;
+
+       case IDA_FOOTER_BUTTON_ADD_TO_PLAYLIST:
+               {
+                       if (__checkEdit)
+                       {
+                               CommonUtil::SetAddtoPlaylistState(false);
+                               ContentManager contentManager;
+                               Footer* pFooter = GetFooter();
+                               Tizen::Base::Collection::ArrayList* pDataList = new (std::nothrow) ArrayList();
+                               int totalCount = 0;
+
+                               if (__checkedItemCount <= 0)
+                               {
+                                       return;
+                               }
+
+                               pDataList->Construct();
+                               contentManager.Construct();
+                               totalCount = __pPresentationModel->GetContentCount();
+                               for (int iCount = 0; iCount < totalCount; iCount++)
+                               {
+                                       if (__pContentTableView->IsItemChecked(iCount) == true)
+                                       {
+                                               ContentInformation* pContentInfoStruct = __pPresentationModel->GetContentInfoN(iCount);
+                                               if (pContentInfoStruct == null)
+                                               {
+                                                       pDataList->RemoveAll(true);
+                                                       delete pDataList;
+                                                       pDataList = null;
+                                                       return;
+                                               }
+
+                                               pDataList->Add(*(new (std::nothrow) String(pContentInfoStruct->ContentFilePath)));
+                                               __pContentTableView->SetItemChecked(iCount, false);
+
+                                               delete pContentInfoStruct;
+                                               pContentInfoStruct = null;
+                                       }
+                               }
+                               __pPlayListPickerPopup = new (std::nothrow) PlayListPickerPopup();
+                               __pPlayListPickerPopup->Initialize(this, pDataList);
+                               __pPlayListPickerPopup->SetShowState(true);
+                               __pPlayListPickerPopup->Show();
+                               //__pPlayListPickerPopup->SetCollectedContent(pDataList);
+
+                               pFooter->SetItemEnabled(INDEX_FOOTER_DELETE, false);
+                               pFooter->SetItemEnabled(INDEX_FOOTER_SHARE, false);
+                               pFooter->SetItemEnabled(INDEX_FOOTER_ADDTOPLATLIST, false);
+
+                               __checkedItemCount = INIT_VALUE;
+                               CommonUtil::ShowCheckedCountLabel(*__pCheckedCountLabel, __checkedItemCount, *__pContentTableView, *this);
+                               CommonUtil::ShowSelectAllCheckButton(*__pSelectAllCheckedButton);
+                               Invalidate(true);
+                       }
+                       else
+                       {
+                               CommonUtil::SetAddtoPlaylistState(true);
+                               CommonUtil::SetAddtoPlaylistName(*__pStrContentName);
+                               if (__pPresentationModel != null)
+                               {
+                                       //__pPresentationModel->Release();
+                               }
+                               pSceneManager->GoForward(ForwardSceneTransition(IDSCN_ALL_CONTENT_PICKER));
+                       }
+               }
+               break;
+
+//     case IDA_FOOTER_BUTTON_SEARCH:
+//             {
+//                     pSceneManager->GoForward(ForwardSceneTransition(IDSCN_SEARCH));
+//             }
+//             break;
+
        default:
-       {
                break;
        }
-       }
+       AppLogDebug("EXIT");
 }
 
 void
 UserPlaylistContentListForm::OnFormBackRequested(Tizen::Ui::Controls::Form& source)
 {
+       AppLogDebug("ENTER");
        SceneManager* pSceneManager = SceneManager::GetInstance();
        AppAssert(pSceneManager);
 
        if (__deletedItem == true)
        {
-               ArrayList* pTransmissionDate = new ArrayList();
+               ArrayList* pTransmissionDate = new (std::nothrow) ArrayList();
                pTransmissionDate->Construct();
-               pTransmissionDate->Add(*(new Boolean(__deletedItem)));
+               pTransmissionDate->Add(*(new (std::nothrow) Boolean(__deletedItem)));
                pSceneManager->GoForward(ForwardSceneTransition(__pStrSceneId->GetPointer(),
                                                                                                                SCENE_TRANSITION_ANIMATION_TYPE_NONE,
                                                                                                                SCENE_HISTORY_OPTION_NO_HISTORY,
@@ -174,184 +344,233 @@ UserPlaylistContentListForm::OnFormBackRequested(Tizen::Ui::Controls::Form& sour
                                                                                                                SCENE_HISTORY_OPTION_NO_HISTORY,
                                                                                                                SCENE_DESTROY_OPTION_DESTROY));
        }
+       AppLogDebug("EXIT");
 }
 
 void
 UserPlaylistContentListForm::OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previousSceneId,
-                                               const Tizen::Ui::Scenes::SceneId& currentSceneId,
-                                               Tizen::Base::Collection::IList* pArgs)
+                                                       const Tizen::Ui::Scenes::SceneId& currentSceneId,
+                                                       Tizen::Base::Collection::IList* pArgs)
 {
-       Footer* pFooter = CommonUtil::CreateUserPlaylistContentListFooter(*this);
-       pFooter->AddActionEventListener(*this);
-       pFooter->SetBackButton();
-       SetFormBackEventListener(this);
-       Header* pHeader = GetHeader();
-       pHeader->SetStyle(HEADER_STYLE_TITLE);
-
+       AppLogDebug("ENTER");
        if (pArgs != null)
        {
                if (pArgs->GetCount() == 1)
                {
                        __deletedItem = true;
+
+                       if (__pPresentationModel->GetContentCount() == 0)
+                       {
+                               __pContentTableView->UpdateTableView();
+                               return;
+                       }
                }
                else if (pArgs->GetCount() > 1)
                {
-                       __pStrSceneId     = static_cast<String*>(pArgs->GetAt(DATA_ITEM_SCENE_NAME));
+                       __pStrSceneId = static_cast<String*>(pArgs->GetAt(DATA_ITEM_SCENE_NAME));
                        __pStrContentName = static_cast<String*>(pArgs->GetAt(DATA_ITEM_CONTENT_NAME));
-                       __pPresentationModel = new ContentListPresentationModel();
-                       __pPresentationModel->Construct(*__pStrContentName, *__pStrSceneId, USER_CONTENT);
-
+                       __pPresentationModel = PlaylistListPresentationModel::GetInstance();
+                       __pPresentationModel->UpdatePlaylistContentList(USER_CONTENT, *__pStrContentName);
                }
                else
                {
-
+                       // Empty statement
                }
        }
 
-       pHeader->SetTitleText(*__pStrContentName);
-       SceneManager* pSceneManager = SceneManager::GetInstance();
-       AppAssert(pSceneManager);
-
-       __pPresentationModel->RefreshContent(true);
-       __pContentTableView->UpdateTableView();
-
-       int totalCount = __pPresentationModel->GetTotalContentCount();
-       CommonUtil::ShowNoContentImage(totalCount, *__pContentTableView, *__pNoContentImageLabel, *__pNoContentTextLabel);
-
-       bool buttonState = totalCount == 0 ? false : true;
-       pFooter->SetItemEnabled(0, buttonState);
-       pFooter->Invalidate(true);
+       if (__checkEdit == false)
+       {
+               Footer* pFooter = CommonUtil::CreateUserPlaylistContentListFooter(*this);
+               int contentCount = INIT_VALUE;
+               pFooter->AddActionEventListener(*this);
+               pFooter->SetBackButton();
+               SetFormBackEventListener(this);
+               contentCount = __pPresentationModel->GetContentCount();
+               if (contentCount <= INIT_VALUE)
+               {
+                       pFooter->SetItemEnabled(INDEX_FOOTER_EDIT, false);
+               }
+               CommonUtil::ShowNoContentImage(contentCount, *__pContentTableView, *__pNoContentImageLabel, *__pNoContentTextLabel);
+               SetTitleText(*__pStrContentName);
+               __pContentTableView->UpdateTableView();
+       }
+       else
+       {
+               ToggleViewMode(false);
+       }
+       AppLogDebug("EXIT");
 }
 
 void
 UserPlaylistContentListForm::OnSceneDeactivated(const Tizen::Ui::Scenes::SceneId& currentSceneId,
-                                                                               const Tizen::Ui::Scenes::SceneId& nextSceneId)
+                                                                                       const Tizen::Ui::Scenes::SceneId& nextSceneId)
 {
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 
 int
 UserPlaylistContentListForm::GetItemCount(void)
 {
-       return __pPresentationModel->GetTotalContentCount();
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
+       return __pPresentationModel->GetContentCount();
 }
 
 Tizen::Ui::Controls::TableViewItem*
 UserPlaylistContentListForm::CreateItem(const int itemIndex, int itemWidth)
 {
-       ContentInformationStruct* pContentInfoStruct = __pPresentationModel->GetPlaylistContentInfoN(itemIndex);
+       AppLogDebug("ENTER");
+       ContentInformation* pContentInfoStruct = __pPresentationModel->GetContentInfoN(itemIndex);
        if (pContentInfoStruct == null)
        {
                return null;
        }
 
        TableViewItem* pItem = new (std::nothrow) TableViewItem();
-       pItem->Construct(Dimension(itemWidth, ITEM_HEIGHT),TABLE_VIEW_ANNEX_STYLE_NORMAL);
-       pItem->SetBackgroundColor(COLOR_ITEM);
-
-       PlaylistCreateTableViewItem(*pItem, *pContentInfoStruct);
+       if (__checkEdit)
+       {
+               pItem->Construct(Dimension(itemWidth, ITEM_HEIGHT), TABLE_VIEW_ANNEX_STYLE_MARK);
+       }
+       else
+       {
+               pItem->Construct(Dimension(itemWidth, ITEM_HEIGHT), TABLE_VIEW_ANNEX_STYLE_NORMAL);
+       }
+       pItem->SetBackgroundColor(COLOR_WHITE);
 
-       //test_code_start
-       delete pContentInfoStruct->pThumbnail;
-       pContentInfoStruct->pThumbnail = null;
+       RequestThumbnail(pContentInfoStruct->contentId, (new (std::nothrow) int(itemIndex)));
+       CreateTableViewItem(*pItem, *pContentInfoStruct);
 
        delete pContentInfoStruct;
        pContentInfoStruct = null;
-       //test_code_end
 
+       AppLogDebug("EXIT");
        return pItem;
 }
 
-bool
-UserPlaylistContentListForm::DeleteItem(const int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem)
-{
-       return true;
-}
-
-void
-UserPlaylistContentListForm::UpdateItem(int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem)
-{
-}
-
-int
-UserPlaylistContentListForm::GetDefaultItemHeight(void)
-{
-       //AppLogDebug("UpdateItem");
-       return ITEM_HEIGHT;
-}
-
 void
 UserPlaylistContentListForm::OnTableViewItemStateChanged(Tizen::Ui::Controls::TableView& tableView,
-                                               int itemIndex,
-                                               Tizen::Ui::Controls::TableViewItem* pItem,
-                                               Tizen::Ui::Controls::TableViewItemStatus status)
+                                                       int itemIndex,
+                                                       Tizen::Ui::Controls::TableViewItem* pItem,
+                                                       Tizen::Ui::Controls::TableViewItemStatus status)
 {
+       AppLogDebug("ENTER");
        SceneManager* pSceneManager = SceneManager::GetInstance();
+       Footer* pFooter = GetFooter();
        AppAssert(pSceneManager);
-
-       if (status == TABLE_VIEW_ITEM_STATUS_SELECTED)
+       switch (status)
        {
-               ArrayList* pTempList = new (std::nothrow)ArrayList();
-               pTempList->Construct();
+       case TABLE_VIEW_ITEM_STATUS_SELECTED:
+               {
+                       ArrayList* pTempList = new (std::nothrow) ArrayList();
+                       pTempList->Construct();
 
-               pTempList->Add(*(new String(MUSIC)));
-               pTempList->Add(*(new Integer(itemIndex)));
-               pTempList->Add(*(__pPresentationModel->GetPlaylistContentInfoContentList()));
+                       pTempList->Add(*(new (std::nothrow) String(MUSIC)));
+                       pTempList->Add(*(new (std::nothrow) Integer(itemIndex)));
+                       pTempList->Add(*(__pPresentationModel->GetContentPathListN(USER_CONTENT)));
 
-               pSceneManager->GoForward(ForwardSceneTransition(IDSCN_PLAYER), pTempList);
-       }
-}
+                       pSceneManager->GoForward(ForwardSceneTransition(IDSCN_PLAYER), pTempList);
+               }
+               break;
 
-void
-UserPlaylistContentListForm::OnTableViewContextItemActivationStateChanged(Tizen::Ui::Controls::TableView& tableView,
-                                                                          int itemIndex,
-                                                                          Tizen::Ui::Controls::TableViewContextItem* pContextItem,
-                                                                          bool activated)
-{
+       case TABLE_VIEW_ITEM_STATUS_CHECKED:
+               {
+                       __checkedItemCount++;
+                       tableView.SetItemChecked(itemIndex, true);
+
+                       pFooter->SetItemEnabled(INDEX_FOOTER_DELETE, true);
+                       pFooter->SetItemEnabled(INDEX_FOOTER_SHARE, true);
+                       pFooter->SetItemEnabled(INDEX_FOOTER_ADDTOPLATLIST, true);
+
+                       pFooter->Invalidate(true);
+                       if (__checkedItemCount == __pPresentationModel->GetContentCount())
+                       {
+                               __pSelectAllCheckedButton->SetSelected(true);
+                       }
+                       CommonUtil::ShowCheckedCountLabel(*__pCheckedCountLabel, __checkedItemCount, *__pContentTableView, *this);
+               }
+               break;
+
+       case TABLE_VIEW_ITEM_STATUS_UNCHECKED:
+               {
+                       __checkedItemCount--;
+                       tableView.SetItemChecked(itemIndex, false);
+
+                       if (__checkedItemCount == INIT_VALUE)
+                       {
+                               pFooter->SetItemEnabled(INDEX_FOOTER_DELETE, false);
+                               pFooter->SetItemEnabled(INDEX_FOOTER_SHARE, false);
+                               pFooter->SetItemEnabled(INDEX_FOOTER_ADDTOPLATLIST, false);
+
+                               pFooter->Invalidate(true);
+                       }
 
+                       __pSelectAllCheckedButton->SetSelected(false);
+                       CommonUtil::ShowCheckedCountLabel(*__pCheckedCountLabel, __checkedItemCount, *__pContentTableView, *this);
+               }
+               break;
+
+       default:
+               break;
+       }
+       AppLogDebug("EXIT");
 }
 
 void
-UserPlaylistContentListForm::OnTableViewItemReordered(Tizen::Ui::Controls::TableView& tableView,
-                                                      int itemIndexFrom,
-                                                      int itemIndexTo)
+UserPlaylistContentListForm::OnTableViewContextItemActivationStateChanged(Tizen::Ui::Controls::TableView& tableView,
+                                                                                       int itemIndex,
+                                                                                       Tizen::Ui::Controls::TableViewContextItem* pContextItem,
+                                                                                       bool activated)
 {
-
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 
 result
-UserPlaylistContentListForm::PlaylistCreateTableViewItem(Tizen::Ui::Container& parent,
-                                                                const ContentInformationStruct& contentInfoStruct)
+UserPlaylistContentListForm::CreateTableViewItem(Tizen::Ui::Container& parent,
+                                                                       const ContentInformation& contentInfoStruct)
 {
 
-       AppLogDebug("Start");
+       AppLogDebug("ENTER");
        result r = E_SUCCESS;
 
        Label* pSongThumbnailBGLabel = new (std::nothrow) Label();
        pSongThumbnailBGLabel->Construct(Rectangle(X_GAP_THUMBNAIL - 1, Y_GAP_THUMBNAIL - 1, W_THUMBNAIL + 1, W_THUMBNAIL + 1), L"");
+       parent.AddControl(*pSongThumbnailBGLabel);
 
        Label* pSongThumbnailLabel = new (std::nothrow) Label();
-       pSongThumbnailLabel->Construct(Rectangle(X_GAP_THUMBNAIL, Y_GAP_THUMBNAIL, W_THUMBNAIL ,H_THUMBNAIL), L"");
-       pSongThumbnailLabel->SetBackgroundBitmap(*contentInfoStruct.pThumbnail);
+       pSongThumbnailLabel->Construct(Rectangle(X_GAP_THUMBNAIL, Y_GAP_THUMBNAIL, W_THUMBNAIL, H_THUMBNAIL), L"");
+       pSongThumbnailLabel->SetBackgroundBitmap(*GetDefaultThumbnail());
+       pSongThumbnailLabel->SetName(L"pSongThumbnailLabel");
+       parent.AddControl(*pSongThumbnailLabel);
 
-       int X_Gap   = W_THUMBNAIL + (X_GAP_THUMBNAIL * 2);
+       int X_Gap = W_THUMBNAIL + (X_GAP_THUMBNAIL * 2);
        int W_Label = W_CLIENT_AREA - X_Gap;
-
-       int W_SONG_TIME     = 160;
-       int Y_GAP_LABEL     =  10;
+       int edit_Y_Offset = 0;
+       if (__checkEdit)
+       {
+               edit_Y_Offset = X_OFFSET_EDIT_STYLE_TABLE_VIEW;
+       }
+       else
+       {
+               edit_Y_Offset = 0;
+       }
 
        Label* pSongTitleLabel = new (std::nothrow) Label();
-       pSongTitleLabel->Construct(Rectangle(X_Gap,Y_GAP_LABEL, W_Label - W_SONG_TIME, (ITEM_HEIGHT - (Y_GAP_LABEL * 2)) / 2), L"");
+       pSongTitleLabel->Construct(Rectangle(X_Gap, Y_GAP_LABEL, (W_Label - W_SONG_TIME - edit_Y_Offset), (ITEM_HEIGHT - (Y_GAP_LABEL * 2)) / 2), L"");
        pSongTitleLabel->SetTextColor(COLOR_MAIN_TEXT);
        pSongTitleLabel->SetTextConfig(MAIN_TEXT_SIZE, LABEL_TEXT_STYLE_NORMAL);
        pSongTitleLabel->SetTextHorizontalAlignment(ALIGNMENT_LEFT);
        pSongTitleLabel->SetText(contentInfoStruct.TitleName);
+       parent.AddControl(*pSongTitleLabel);
 
        Label* pSongTimeLabel = new (std::nothrow) Label();
-       pSongTimeLabel->Construct(Rectangle(pSongTitleLabel->GetWidth() + X_Gap, pSongTitleLabel->GetY(), W_SONG_TIME, pSongTitleLabel->GetHeight()) , L"");
+       pSongTimeLabel->Construct(Rectangle(pSongTitleLabel->GetWidth() + X_Gap, pSongTitleLabel->GetY(), W_SONG_TIME, pSongTitleLabel->GetHeight()), L"");
        pSongTimeLabel->SetTextColor(COLOR_SUB_TEXT);
        pSongTimeLabel->SetTextConfig(SUB_TEXT_SIZE, LABEL_TEXT_STYLE_NORMAL);
        pSongTimeLabel->SetTextHorizontalAlignment(ALIGNMENT_CENTER);
        pSongTimeLabel->SetText(CommonUtil::GetFormatDate(contentInfoStruct.Duration));
+       parent.AddControl(*pSongTimeLabel);
 
        Label* pSongArtistLabel = new (std::nothrow) Label();
        pSongArtistLabel->Construct(Rectangle(X_Gap, pSongTimeLabel->GetHeight() + Y_GAP_LABEL, W_Label, pSongTitleLabel->GetHeight()), L"");
@@ -359,13 +578,129 @@ UserPlaylistContentListForm::PlaylistCreateTableViewItem(Tizen::Ui::Container& p
        pSongArtistLabel->SetTextConfig(SUB_TEXT_SIZE, LABEL_TEXT_STYLE_NORMAL);
        pSongArtistLabel->SetTextHorizontalAlignment(ALIGNMENT_LEFT);
        pSongArtistLabel->SetText(contentInfoStruct.ArtistName);
-
-       parent.AddControl(*pSongThumbnailBGLabel);
-       parent.AddControl(*pSongThumbnailLabel);
-       parent.AddControl(*pSongTitleLabel);
-       parent.AddControl(*pSongTimeLabel);
        parent.AddControl(*pSongArtistLabel);
 
-       AppLogDebug("End");
+       AppLogDebug("EXIT");
        return r;
 }
+
+void
+UserPlaylistContentListForm::ToggleViewMode(bool editMode)
+{
+       AppLogDebug("ENTER");
+       Footer* pFooter = GetFooter();
+
+       if (editMode)
+       {
+               int currentContentCount = 0;
+               currentContentCount = __pPresentationModel->GetContentCount();
+
+               pFooter->RemoveAllButtons();
+               pFooter->RemoveAllItems();
+               pFooter->RemoveActionEventListener(*this);
+
+               pFooter = CommonUtil::CreateUserPlaylistContentListFooter(*this);
+               pFooter->AddActionEventListener(*this);
+               pFooter->SetBackButton();
+               SetFormBackEventListener(this);
+
+               if ( currentContentCount > INIT_VALUE)
+               {
+                       SetTitleText(*__pStrContentName);
+               }
+               else
+               {
+                       SetTitleText("No songs");
+                       CommonUtil::ShowNoContentImage(INIT_VALUE, *__pContentTableView, *__pNoContentImageLabel, *__pNoContentTextLabel);
+                       pFooter->SetItemEnabled(INDEX_FOOTER_EDIT, false);
+               }
+
+               __pSelectAllCheckedButton->SetEnabled(false);
+               __pSelectAllCheckedButton->SetShowState(false);
+
+               __checkEdit = false;
+
+               __pContentTableView->SetBounds(Rectangle(0, 0, GetClientAreaBounds().width, GetClientAreaBounds().height ));
+
+               __pContentTableView->Invalidate(true);
+               __pContentTableView->UpdateTableView();
+       }
+       else
+       {
+               SetTitleText(ResourceManager::GetString("IDS_COM_BODY_EDIT"));
+
+               pFooter->RemoveAllButtons();
+               pFooter->RemoveAllItems();
+               pFooter->RemoveActionEventListener(*this);
+
+               pFooter = CommonUtil::CreateDeleteFooter(*this);
+               pFooter->AddActionEventListener(*this);
+
+               __pSelectAllCheckedButton->SetEnabled(true);
+               __pSelectAllCheckedButton->SetShowState(true);
+
+               __checkEdit = true;
+
+               __pContentTableView->SetBounds(Rectangle(0, __pSelectAllCheckedButton->GetHeight(), GetClientAreaBounds().width, (GetClientAreaBounds().height - __pSelectAllCheckedButton->GetHeight())));
+
+               __pContentTableView->Invalidate(true);
+               __pContentTableView->UpdateTableView();
+       }
+       Invalidate(true);
+       AppLogDebug("EXIT");
+}
+
+void
+UserPlaylistContentListForm::OnThumbnailInfoReveivedN(ThumbnailInfo* pThumbnailInfo)
+{
+       AppLogDebug("ENTER");
+       int itemIndex = 0;
+       void* pParam = null;
+       __pThumbnail = pThumbnailInfo->GetBitmapN();
+       pParam = pThumbnailInfo->GetUserParamN();
+       if (pParam)
+       {
+               itemIndex = *(static_cast<int*>(pParam));
+       }
+       __pContentTableView->RefreshItem(itemIndex, TABLE_VIEW_REFRESH_TYPE_ITEM_MODIFY);
+       delete pThumbnailInfo;
+       delete static_cast<int*>(pParam);
+       AppLogDebug("EXIT");
+}
+
+void
+UserPlaylistContentListForm::OnUserEventReceivedN(RequestId requestId, Tizen::Base::Collection::IList* pArgs)
+{
+       AppLogDebug("ENTER");
+       AppLogDebug("OnUserEventReceivedN %d", requestId);
+       if (requestId == ID_DESTORY_PLAY_LIST_PICKER_POPUP)
+       {
+               if (__pPlayListPickerPopup != null)
+               {
+                       delete __pPlayListPickerPopup;
+                       __pPlayListPickerPopup = null;
+               }
+               __pPresentationModel->UpdatePlaylistContentList(USER_CONTENT, *__pStrContentName);
+               __pContentTableView->UpdateTableView();
+       }
+       AppLogDebug("EXIT");
+}
+
+void
+UserPlaylistContentListForm::UpdateItem(int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem)
+{
+       AppLogDebug("ENTER");
+       Label* pThumbnailLabel = static_cast<Label*>(pItem->GetControl(L"pSongThumbnailLabel"));
+       if (__pThumbnail == null || pThumbnailLabel == null)
+       {
+               AppLogDebug("__pThumbnail or pThumbnailLabel is null");
+               delete __pThumbnail;
+               __pThumbnail = null;
+               return;
+       }
+       pThumbnailLabel->SetBackgroundBitmap(*__pThumbnail);
+       delete __pThumbnail;
+       __pThumbnail = null;
+       pThumbnailLabel->Invalidate(true);
+       AppLogDebug("EXIT");
+}
\ No newline at end of file
diff --git a/src/MpYearContentListForm.cpp b/src/MpYearContentListForm.cpp
new file mode 100644 (file)
index 0000000..8364a27
--- /dev/null
@@ -0,0 +1,919 @@
+//
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.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://floralicense.org/license/
+//
+// 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.
+//
+
+/**
+ * @file               MpYearContentListForm.cpp
+ * @brief              This is the implementation file for YearContentListForm class.
+ */
+
+#include <FSocial.h>
+#include "MpPlaylistPickerPopup.h"
+#include "MpSharePopup.h"
+#include "MpThumbnailInfo.h"
+#include "MpYearContentListForm.h"
+#include "MpYearListPresentationModel.h"
+
+using namespace Tizen::App;
+using namespace Tizen::Base;
+using namespace Tizen::Base::Collection;
+using namespace Tizen::Content;
+using namespace Tizen::Graphics;
+using namespace Tizen::Io;
+using namespace Tizen::Social;
+using namespace Tizen::System;
+using namespace Tizen::Ui;
+using namespace Tizen::Ui::Controls;
+using namespace Tizen::Ui::Scenes;
+
+static const int X_OFFSET_EDIT_STYLE_TABLE_VIEW = 96;
+static const int COUNT_MESSAGE_BOX_TIMEOUT = 3000;
+
+static const Tizen::Graphics::Rectangle RECT_YEAR_ITEM_THUMBNAIL (16, 8, 112, 112);
+static const Tizen::Graphics::Rectangle RECT_YEAR_ITEM_TITLE_NAME (144, 8, 300, 66);
+static const Tizen::Graphics::Rectangle RECT_YEAR_ITEM_TIME (444, 8, 260, 66);
+static const Tizen::Graphics::Rectangle RECT_YEAR_ITEM_ARTIST_NAME (144, 66, 560, 46);
+
+static const Tizen::Graphics::Rectangle RECT_YEAR_EDIT_ITEM_TITLE_NAME (144, 8, (300 - X_OFFSET_EDIT_STYLE_TABLE_VIEW), 66);
+static const Tizen::Graphics::Rectangle RECT_YEAR_EDIT_ITEM_TIME ((444 - X_OFFSET_EDIT_STYLE_TABLE_VIEW), 8, 260, 66);
+static const Tizen::Graphics::Rectangle RECT_YEAR_EDIT_ITEM_ARTIST_NAME        (144, 66, (560 - X_OFFSET_EDIT_STYLE_TABLE_VIEW), 46);
+
+YearContentListForm::YearContentListForm(void)
+       : ContentListForm::ContentListForm()
+       , ThumbnailBase::ThumbnailBase()
+       , __pThumbnail(null)
+       , __pPresentationModel(null)
+{
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
+}
+
+YearContentListForm::~YearContentListForm(void)
+{
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
+}
+
+result
+YearContentListForm::OnInitializing(void)
+{
+       AppLogDebug("ENTER");
+       CreateTableview();
+       CreateSelectAllCheckedButton();
+       CreateCheckedCountLabel();
+       CreateNoContentImage(L"IDS_MUSIC_HEADER_NO_SONGS");
+       __pContextItem = new (std::nothrow) TableViewContextItem();
+       __pContextItem->Construct(Dimension(GetClientAreaBounds().width, ITEM_HEIGHT));
+       CreateTableViewContextItem(*__pContextItem);
+       CreateDeletePopup();
+
+       AppLogDebug("EXIT");
+       return ThumbnailBase::Construct();
+}
+
+result
+YearContentListForm::OnTerminating(void)
+{
+       AppLogDebug("ENTER");
+       __checkedItemCount = 0;
+       DestroyPlayListPickerPopup();
+
+       delete __pContextItem;
+       __pContextItem = null;
+
+       AppLogDebug("EXIT");
+       return E_SUCCESS;
+}
+
+void
+YearContentListForm::OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previousSceneId,
+                                       const Tizen::Ui::Scenes::SceneId& currentSceneId,
+                                       Tizen::Base::Collection::IList* pArgs)
+{
+       AppLogDebug("ENTER");
+       if (pArgs != null)
+       {
+               __pStrSceneId = static_cast<String*>(pArgs->GetAt(DATA_ITEM_SCENE_NAME));
+               __pStrContentName = static_cast<String*>(pArgs->GetAt(DATA_ITEM_CONTENT_NAME));
+               __currentContentIndex = static_cast<Integer*>(pArgs->GetAt(DATA_ITEM_CONTENT_TYPE))->ToInt();
+               __pPresentationModel = YearListPresentationModel::GetInstance();
+               __pPresentationModel->UpdateYearList();
+               __pPresentationModel->InitializeContentList(__currentContentIndex);
+       }
+       else
+       {
+               // Empty statement
+       }
+
+       ContentInformation* pContentInfoStruct = null;
+       pContentInfoStruct = __pPresentationModel->GetContentInfoN(0);
+       if (pContentInfoStruct == null)
+       {
+               return;
+       }
+
+       InitializeHeader(*pContentInfoStruct);
+       if (__checkEdit == true)
+       {
+               Footer* pFooter = CommonUtil::CreateDeleteFooter(*this);
+               pFooter->AddActionEventListener(*this);
+       }
+       else
+       {
+               Footer* pFooter = CommonUtil::CreateEditFooter(*this);
+               pFooter->AddActionEventListener(*this);
+               pFooter->SetBackButton();
+               SetFormBackEventListener(this);
+       }
+       __pContentTableView->UpdateTableView();
+
+       delete pContentInfoStruct;
+       pContentInfoStruct = null;
+       AppLogDebug("EXIT");
+}
+
+void
+YearContentListForm::OnSceneDeactivated(const Tizen::Ui::Scenes::SceneId& currentSceneId,
+                                                                       const Tizen::Ui::Scenes::SceneId& nextSceneId)
+{
+       AppLogDebug("ENTER");
+       Footer* pFooter = GetFooter();
+       pFooter->RemoveAllButtons();
+       pFooter->RemoveAllItems();
+       pFooter->RemoveActionEventListener(*this);
+       CancelAllThumbnailRequest();
+       AppLogDebug("EXIT");
+}
+
+void
+YearContentListForm::OnActionPerformed(const Tizen::Ui::Control& source, int actionId)
+{
+       AppLogDebug("ENTER");
+       SceneManager* pSceneManager = SceneManager::GetInstance();
+
+       AppAssert(pSceneManager);
+
+       switch (actionId)
+       {
+       case IDA_FLICK_BUTTON_SHARE:
+               // fall through
+       case IDA_FLICK_BUTTON_SET:
+               {
+                       CreateContextMenu(source);
+               }
+               break;
+
+       case IDA_FLICK_BUTTON_ADD_TO_PALYLIST:
+               {
+                       Tizen::Base::Collection::ArrayList* pDataList = new (std::nothrow) ArrayList();
+                       pDataList->Construct();
+                       ContentInformation* pContentInfo;
+                       pContentInfo = __pPresentationModel->GetContentInfoN(__itemIndex);
+
+                       if (pContentInfo == null)
+                       {
+                               pDataList->RemoveAll(true);
+                               delete pDataList;
+                               pDataList = null;
+                               return;
+                       }
+                       pDataList->Add(*(new (std::nothrow) String(pContentInfo->ContentFilePath)));
+
+                       delete pContentInfo;
+                       pContentInfo = null;
+
+                       __pPlayListPickerPopup = new (std::nothrow) PlayListPickerPopup();
+                       __pPlayListPickerPopup->Initialize(this, pDataList);
+                       __pPlayListPickerPopup->SetShowState(true);
+                       __pPlayListPickerPopup->Show();
+                       //__pPlayListPickerPopup->SetCollectedContent(pDataList);
+               }
+               break;
+
+       case IDA_FLICK_BUTTON_DELETE:
+               {
+                       if (__pDeletePopup != null)
+                       {
+                               __pDeletePopup->SetShowState(true);
+                               __pDeletePopup->Show();
+                       }
+               }
+               break;
+
+       case IDA_DELETE_POPUP_DELETE:
+               // fall through
+       case IDA_DELETE_POPUP_CANCEL:
+               {
+                       __pDeletePopup->SetShowState(false);
+                       __pDeletePopup->Show();
+                       if (actionId == IDA_DELETE_POPUP_DELETE && __pPresentationModel != null)
+                       {
+                               ContentManager contentManager;
+                               contentManager.Construct();
+                               ContentInformation* pContentInfo = __pPresentationModel->GetContentInfoN(__itemIndex);
+                               contentManager.DeleteContent(pContentInfo->contentId);
+                               Footer* pFooter = GetFooter();
+
+                               delete pContentInfo;
+                               pContentInfo = null;
+
+                               __pPresentationModel->RefreshContentList(__currentContentIndex);
+
+                               if (__pPresentationModel->GetContentCount(__currentContentIndex) <= INIT_VALUE)
+                               {
+                                       CommonUtil::ShowNoContentImage(INIT_VALUE, *__pContentTableView, *__pNoContentImageLabel, *__pNoContentTextLabel);
+                                       pFooter->SetItemEnabled(INDEX_EDIT_FOOTER_EDIT, false);
+                                       pFooter->Invalidate(true);
+                               }
+
+                               __pContentTableView->RefreshItem(__itemIndex, TABLE_VIEW_REFRESH_TYPE_ITEM_REMOVE);
+                       }
+               }
+               break;
+
+       case IDA_SHARE_CONTEXT_MENU_EMAIL:
+               // fall through
+       case IDA_SHARE_CONTEXT_MENU_MESSAGE:
+               {
+                       String providerID = ((actionId == IDA_SHARE_CONTEXT_MENU_EMAIL) ? PROVIDER_ID_EMAIL : PROVIDER_ID_MESSAGE);
+                       AppControl* pAppControl = AppManager::FindAppControlN(providerID, OPERATION_ID_COMPOSE);
+                       if (pAppControl == null)
+                       {
+                               return;
+                       }
+
+                       ContentInformation* pContentInfo = null;
+                       pContentInfo = __pPresentationModel->GetContentInfoN(__itemIndex);
+
+                       if (pContentInfo == null)
+                       {
+                               return;
+                       }
+
+                       HashMap* pDataList = new (std::nothrow) HashMap(SingleObjectDeleter);
+                       pDataList->Construct();
+                       pDataList->Add(new (std::nothrow) String(APPCONTROL_KEY_ATTACHMENTS), new (std::nothrow) String(pContentInfo->ContentFilePath));
+
+                       pAppControl->Start(null, null, pDataList, this);
+
+                       if (pAppControl != null)
+                       {
+                               delete pAppControl;
+                               pAppControl = null;
+                       }
+
+                       delete pContentInfo;
+                       pContentInfo = null;
+               }
+               break;
+
+       case IDA_SET_CONTEXT_MENU_CALL:
+               {
+                       result r = E_SUCCESS;
+                       ContentInformation* pContentInfo = __pPresentationModel->GetContentInfoN(__itemIndex);
+
+                       if (pContentInfo == null)
+                       {
+                               return;
+                       }
+                       r = SettingInfo::SetValue(CALL_RINGTONE_KEY, pContentInfo->ContentFilePath);
+
+                       delete pContentInfo;
+                       pContentInfo = null;
+
+                       if (r == E_SUCCESS)
+                       {
+                               MessageBox messageBox;
+                               messageBox.Construct(L"", ResourceManager::GetString(L"IDS_COM_POP_SUCCESS"),
+                                                                       MSGBOX_STYLE_OK,
+                                                                       COUNT_MESSAGE_BOX_TIMEOUT);
+                               int modalResult = 0;
+                               messageBox.ShowAndWait(modalResult);
+                       }
+               }
+               break;
+
+       case IDA_SET_CONTEXT_MENU_CALLER:
+               {
+                       AppControl* pAppControl = AppManager::FindAppControlN(TIZEN_APPCONTROL_PROVIDER_CONTACT, TIZEN_APPCONTROL_OPERATION_PICK);
+                       if (pAppControl == null)
+                       {
+                               return;
+                       }
+
+                       HashMap* pDataList = new (std::nothrow) HashMap(SingleObjectDeleter);
+                       pDataList->Construct();
+                       pDataList->Add(new (std::nothrow) String(APPCONTROL_KEY_SINGLE_MODE), new (std::nothrow) String(APPCONTROL_VALUE_SINGLE));
+                       pDataList->Add(new (std::nothrow) String(APPCONTROL_KEY_RETURNTYPE), new (std::nothrow) String(APPCONTROL_VALUE_CONTACTID));
+
+                       pAppControl->Start(null, null, pDataList, this);
+                       if (pAppControl != null)
+                       {
+                               delete pAppControl;
+                               pAppControl = null;
+                       }
+               }
+               break;
+
+       case IDA_FOOTER_BUTTON_EDIT:
+               {
+                       ToggleViewMode(false);
+               }
+               break;
+
+       case IDA_FOOTER_BUTTON_CANCEL:
+               {
+                       __checkedItemCount = INIT_VALUE;
+                       __pSelectAllCheckedButton->SetSelected(false);
+                       CommonUtil::SetAllCheckState(false, *__pContentTableView, __pPresentationModel->GetContentCount(__currentContentIndex));
+                       CommonUtil::ShowCheckedCountLabel(*__pCheckedCountLabel, __checkedItemCount, *__pContentTableView, *this);
+                       ToggleViewMode(true);
+               }
+               break;
+
+       case IDA_FOOTER_BUTTON_SEARCH:
+               {
+                       pSceneManager->GoForward(ForwardSceneTransition(IDSCN_SEARCH));
+               }
+               break;
+
+       case IDA_CHECK_BUTTON:
+               {
+                       __checkedItemCount = __pPresentationModel->GetContentCount(__currentContentIndex);
+                       if (__checkedItemCount > INIT_VALUE)
+                       {
+                               Footer* pFooter = GetFooter();
+
+                               pFooter->SetItemEnabled(INDEX_FOOTER_DELETE, true);
+                               pFooter->SetItemEnabled(INDEX_FOOTER_SHARE, true);
+                               pFooter->SetItemEnabled(INDEX_FOOTER_ADDTOPLATLIST, true);
+
+                               pFooter->Invalidate(true);
+                       }
+                       CommonUtil::SetAllCheckState(true, *__pContentTableView, __pPresentationModel->GetContentCount(__currentContentIndex));
+                       CommonUtil::ShowCheckedCountLabel(*__pCheckedCountLabel, __checkedItemCount, *__pContentTableView, *this);
+               }
+               break;
+
+       case IDA_UNCHECK_BUTTON:
+               {
+                       Footer* pFooter = GetFooter();
+
+                       pFooter->SetItemEnabled(INDEX_FOOTER_DELETE, false);
+                       pFooter->SetItemEnabled(INDEX_FOOTER_SHARE, false);
+                       pFooter->SetItemEnabled(INDEX_FOOTER_ADDTOPLATLIST, false);
+
+                       pFooter->Invalidate(true);
+
+                       __checkedItemCount = INIT_VALUE;
+                       CommonUtil::SetAllCheckState(false, *__pContentTableView, __pPresentationModel->GetContentCount(__currentContentIndex));
+                       CommonUtil::ShowCheckedCountLabel(*__pCheckedCountLabel, __checkedItemCount, *__pContentTableView, *this);
+               }
+               break;
+
+       case IDA_FOOTER_BUTTON_DELETE:
+               {
+                       ContentManager contentManager;
+                       Footer* pFooter = GetFooter();
+                       int totalCount = __pPresentationModel->GetContentCount(__currentContentIndex);
+                       int iCount = 0;
+
+                       if (__checkedItemCount <= INIT_VALUE)
+                       {
+                               return;
+                       }
+
+                       pFooter->SetItemEnabled(INDEX_FOOTER_DELETE, false);
+                       pFooter->SetItemEnabled(INDEX_FOOTER_SHARE, false);
+                       pFooter->SetItemEnabled(INDEX_FOOTER_ADDTOPLATLIST, false);
+                       pFooter->Invalidate(true);
+
+                       contentManager.Construct();
+                       for (iCount = 0; iCount < totalCount; iCount++)
+                       {
+                               if (__pContentTableView->IsItemChecked(iCount) == true)
+                               {
+                                       __pContentTableView->SetItemChecked(iCount,false);
+                                       ContentInformation* pContentInfoStruct = __pPresentationModel->GetContentInfoN(iCount);
+                                       contentManager.DeleteContent(pContentInfoStruct->contentId);
+
+                                       delete pContentInfoStruct;
+                                       pContentInfoStruct = null;
+                               }
+                       }
+                       __pPresentationModel->RefreshContentList(__currentContentIndex);
+                       __pContentTableView->UpdateTableView();
+                       __pContentTableView->Invalidate(true);
+
+                       __checkedItemCount = INIT_VALUE;
+                       CommonUtil::ShowCheckedCountLabel(*__pCheckedCountLabel, __checkedItemCount, *__pContentTableView, *this);
+
+                       if (__pPresentationModel->GetContentCount(__currentContentIndex) > 0)
+                       {
+                               CommonUtil::ShowSelectAllCheckButton(*__pSelectAllCheckedButton);
+                       }
+                       else
+                       {
+                               __pSelectAllCheckedButton->SetEnabled(false);
+                               __pSelectAllCheckedButton->SetShowState(false);
+                               CommonUtil::ShowNoContentImage(INIT_VALUE, *__pContentTableView, *__pNoContentImageLabel, *__pNoContentTextLabel);
+                       }
+               }
+               break;
+
+       case IDA_FOOTER_BUTTON_SHARE:
+               {
+                       Tizen::Base::Collection::ArrayList* pDataList = new (std::nothrow) ArrayList();
+                       Footer* pFooter = GetFooter();
+                       int totalCount = __pPresentationModel->GetContentCount(__currentContentIndex);
+
+                       pDataList->Construct();
+
+                       for (int iCount = 0; iCount < totalCount; iCount++)
+                       {
+                               if (__pContentTableView->IsItemChecked(iCount) == true)
+                               {
+                                       ContentInformation* pContentInfoStruct = __pPresentationModel->GetContentInfoN(iCount);
+                                       if (pContentInfoStruct == null)
+                                       {
+                                               pDataList->RemoveAll(true);
+                                               delete pDataList;
+                                               pDataList = null;
+                                               return;
+                                       }
+                                       pDataList->Add(*(new (std::nothrow) String(L"attachment:" + pContentInfoStruct->ContentFilePath)));
+
+                                       __pContentTableView->SetItemChecked(iCount, false);
+
+                                       delete pContentInfoStruct;
+                                       pContentInfoStruct = null;
+                               }
+                       }
+                       pFooter->SetItemEnabled(INDEX_FOOTER_DELETE, false);
+                       pFooter->SetItemEnabled(INDEX_FOOTER_SHARE, false);
+                       pFooter->SetItemEnabled(INDEX_FOOTER_ADDTOPLATLIST, false);
+
+                       __checkedItemCount = INIT_VALUE;
+                       CommonUtil::ShowCheckedCountLabel(*__pCheckedCountLabel, __checkedItemCount, *__pContentTableView, *this);
+                       CommonUtil::ShowSelectAllCheckButton(*__pSelectAllCheckedButton);
+                       Invalidate(true);
+                       if (__pSharePopup == null)
+                       {
+                               __pSharePopup = new (std::nothrow) SharePopup();
+                               __pSharePopup->Initialize();
+                       }
+                       __pSharePopup->SetShowState(true);
+                       __pSharePopup->Show();
+                       __pSharePopup->SetArguments(pDataList);
+               }
+               break;
+
+       case IDA_FOOTER_BUTTON_ADD_TO_PLAYLIST:
+               {
+                       ContentManager contentManager;
+                       Footer* pFooter = GetFooter();
+                       Tizen::Base::Collection::ArrayList* pDataList = new (std::nothrow) ArrayList();
+                       int totalCount = 0;
+
+                       if (__checkedItemCount <= 0)
+                       {
+                               return;
+                       }
+
+                       pDataList->Construct();
+                       contentManager.Construct();
+                       totalCount = __pPresentationModel->GetContentCount(__currentContentIndex);
+
+                       for (int iCount = 0; iCount < totalCount; iCount++)
+                       {
+                               if (__pContentTableView->IsItemChecked(iCount) == true)
+                               {
+                                       ContentInformation* pContentInfoStruct = __pPresentationModel->GetContentInfoN(iCount);
+                                       if (pContentInfoStruct == null)
+                                       {
+                                               pDataList->RemoveAll(true);
+                                               delete pDataList;
+                                               pDataList = null;
+                                               return;
+                                       }
+
+                                       pDataList->Add(*(new (std::nothrow) String(pContentInfoStruct->ContentFilePath)));
+                                       __pContentTableView->SetItemChecked(iCount, false);
+
+                                       delete pContentInfoStruct;
+                                       pContentInfoStruct = null;
+                               }
+                       }
+
+                       if (IsFailed(CreatePlayListPickerPopup(pDataList)))
+                       {
+                               AppLogDebug("CreatePlayListPickerPopup failed(%s)", GetLastResult());
+                               return;
+                       }
+                       __pPlayListPickerPopup->SetShowState(true);
+                       __pPlayListPickerPopup->Show();
+                       //__pPlayListPickerPopup->SetCollectedContent(pDataList);
+
+                       pFooter->SetItemEnabled(INDEX_FOOTER_DELETE, false);
+                       pFooter->SetItemEnabled(INDEX_FOOTER_SHARE, false);
+                       pFooter->SetItemEnabled(INDEX_FOOTER_ADDTOPLATLIST, false);
+
+                       __checkedItemCount = INIT_VALUE;
+                       CommonUtil::ShowCheckedCountLabel(*__pCheckedCountLabel, __checkedItemCount, *__pContentTableView, *this);
+                       CommonUtil::ShowSelectAllCheckButton(*__pSelectAllCheckedButton);
+                       Invalidate(true);
+               }
+               break;
+
+       default:
+               break;
+       }
+       AppLogDebug("EXIT");
+}
+
+int
+YearContentListForm::GetItemCount(void)
+{
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
+       return __pPresentationModel->GetContentCount(__currentContentIndex);
+}
+
+Tizen::Ui::Controls::TableViewItem*
+YearContentListForm::CreateItem(const int itemIndex, int itemWidth)
+{
+       AppLogDebug("ENTER");
+       ContentInformation* pContentInfoStruct = null;
+
+       TableViewItem* pItem = new (std::nothrow) TableViewItem();
+       if (__checkEdit)
+       {
+               pItem->Construct(Dimension(itemWidth, ITEM_HEIGHT), TABLE_VIEW_ANNEX_STYLE_MARK);
+       }
+       else
+       {
+               pItem->Construct(Dimension(itemWidth, ITEM_HEIGHT), TABLE_VIEW_ANNEX_STYLE_NORMAL);
+               pItem->SetContextItem(__pContextItem);
+       }
+       pItem->SetBackgroundColor(COLOR_WHITE);
+
+       pContentInfoStruct = __pPresentationModel->GetContentInfoN(itemIndex);
+       if (pContentInfoStruct == null)
+       {
+               delete pItem;
+               pItem = null;
+               return null;
+       }
+
+       RequestThumbnail(pContentInfoStruct->contentId, (new (std::nothrow) int(itemIndex)));
+       CreateTableViewItem(*pItem, *pContentInfoStruct);
+
+       delete pContentInfoStruct;
+       pContentInfoStruct = null;
+
+       AppLogDebug("EXIT");
+       return pItem;
+}
+
+void
+YearContentListForm::OnTableViewItemStateChanged(Tizen::Ui::Controls::TableView& tableView,
+                                                       int itemIndex,
+                                                       Tizen::Ui::Controls::TableViewItem* pItem,
+                                                       Tizen::Ui::Controls::TableViewItemStatus status)
+{
+       AppLogDebug("ENTER");
+       switch (status)
+       {
+       case TABLE_VIEW_ITEM_STATUS_CHECKED:
+               {
+                       Footer* pFooter = GetFooter();
+                       __checkedItemCount++;
+                       tableView.SetItemChecked(itemIndex, true);
+
+                       pFooter->SetItemEnabled(INDEX_FOOTER_DELETE, true);
+                       pFooter->SetItemEnabled(INDEX_FOOTER_SHARE, true);
+                       pFooter->SetItemEnabled(INDEX_FOOTER_ADDTOPLATLIST, true);
+
+                       pFooter->Invalidate(true);
+                       if (__checkedItemCount == __pPresentationModel->GetContentCount(__currentContentIndex))
+                       {
+                               __pSelectAllCheckedButton->SetSelected(true);
+                       }
+                       CommonUtil::ShowCheckedCountLabel(*__pCheckedCountLabel, __checkedItemCount, *__pContentTableView, *this);
+               }
+               break;
+
+       case TABLE_VIEW_ITEM_STATUS_UNCHECKED:
+               {
+                       Footer* pFooter = GetFooter();
+
+                       __checkedItemCount--;
+                       tableView.SetItemChecked(itemIndex, false);
+
+                       if (__checkedItemCount == INIT_VALUE)
+                       {
+                               pFooter->SetItemEnabled(INDEX_FOOTER_DELETE, false);
+                               pFooter->SetItemEnabled(INDEX_FOOTER_SHARE, false);
+                               pFooter->SetItemEnabled(INDEX_FOOTER_ADDTOPLATLIST, false);
+
+                               pFooter->Invalidate(true);
+                       }
+
+                       if (__checkedItemCount != __pPresentationModel->GetContentCount(__currentContentIndex))
+                       {
+                               __pSelectAllCheckedButton->SetSelected(false);
+                       }
+                       CommonUtil::ShowCheckedCountLabel(*__pCheckedCountLabel, __checkedItemCount, *__pContentTableView, *this);
+               }
+               break;
+
+       case TABLE_VIEW_ITEM_STATUS_SELECTED:
+               {
+                       SceneManager* pSceneManager = SceneManager::GetInstance();
+                       ArrayList* tempArg;
+                       AppAssert(pSceneManager);
+                       tempArg = MakePlayerSceneParam(itemIndex);
+                       pSceneManager->GoForward(ForwardSceneTransition(IDSCN_PLAYER), tempArg);
+
+                       if (tempArg != null)
+                       {
+                               tempArg->RemoveAll();
+                               delete tempArg;
+                               tempArg = null;
+                       }
+               }
+               break;
+
+       default:
+               break;
+       }
+       AppLogDebug("EXIT");
+}
+
+Tizen::Base::Collection::ArrayList*
+YearContentListForm::MakePlayerSceneParam(int startIndex)
+{
+       AppLogDebug("ENTER");
+       ArrayList* pTempList = new (std::nothrow) ArrayList();
+       ArrayList* pSelectedMusicContent = null;
+
+       pSelectedMusicContent = __pPresentationModel->GetContentPathListN(__currentContentIndex);
+       if (pTempList == null || pSelectedMusicContent == null)
+       {
+               AppLogDebug("EXIT");
+               return null;
+       }
+       pTempList->Construct();
+
+       pTempList->Add(*(new (std::nothrow) String(MUSIC)));
+       pTempList->Add(*(new (std::nothrow) Integer(startIndex)));
+       pTempList->Add(*(pSelectedMusicContent));
+
+       AppLogDebug("EXIT");
+       return pTempList;
+}
+
+result
+YearContentListForm::CreateTableViewItem(Tizen::Ui::Container& parent,
+                                                                               const ContentInformation& contentInfoStruct)
+{
+       AppLogDebug("ENTER");
+       result r = E_SUCCESS;
+       Rectangle rectTitleName;
+       Rectangle rectPlayTime;
+       Rectangle rectArtistName;
+
+       if (__checkEdit)
+       {
+               rectTitleName = RECT_YEAR_EDIT_ITEM_TITLE_NAME;
+               rectArtistName = RECT_YEAR_EDIT_ITEM_ARTIST_NAME;
+               rectPlayTime = RECT_YEAR_EDIT_ITEM_TIME;
+       }
+       else
+       {
+               rectTitleName = RECT_YEAR_ITEM_TITLE_NAME;
+               rectArtistName = RECT_YEAR_ITEM_ARTIST_NAME;
+               rectPlayTime = RECT_YEAR_ITEM_TIME;
+       }
+
+       Label* pThumbnailLabel = new (std::nothrow) Label();
+       pThumbnailLabel->Construct(RECT_YEAR_ITEM_THUMBNAIL, L"");
+       pThumbnailLabel->SetTextConfig(FONT_SIZE, LABEL_TEXT_STYLE_NORMAL);
+       pThumbnailLabel->SetBackgroundBitmap(*GetDefaultThumbnail());
+       pThumbnailLabel->SetName(L"pThumbnailLabel");
+
+       Label* pTitleLabel = new (std::nothrow) Label();
+       pTitleLabel->Construct(rectTitleName, L"");
+       pTitleLabel->SetTextConfig(FONT_SIZE, LABEL_TEXT_STYLE_NORMAL);
+       pTitleLabel->SetTextHorizontalAlignment(ALIGNMENT_LEFT);
+       pTitleLabel->SetText(contentInfoStruct.TitleName);
+
+       Label* pArtistNameLabel = new (std::nothrow) Label();
+       pArtistNameLabel->Construct(rectArtistName, L"");
+       pArtistNameLabel->SetTextConfig(FONT_SIZE, LABEL_TEXT_STYLE_NORMAL);
+       pArtistNameLabel->SetTextHorizontalAlignment(ALIGNMENT_LEFT);
+       pArtistNameLabel->SetText(contentInfoStruct.ArtistName);
+
+       Label* pTimeLabel = new (std::nothrow) Label();
+       pTimeLabel->Construct(rectPlayTime, L"");
+       pTimeLabel->SetTextConfig(FONT_SIZE, LABEL_TEXT_STYLE_NORMAL);
+       pTimeLabel->SetTextHorizontalAlignment(ALIGNMENT_RIGHT);
+       pTimeLabel->SetText(CommonUtil::GetFormatDate(contentInfoStruct.Duration));
+
+       parent.AddControl(*pThumbnailLabel);
+       parent.AddControl(*pTitleLabel);
+       parent.AddControl(*pArtistNameLabel);
+       parent.AddControl(*pTimeLabel);
+       AppLogDebug("EXIT");
+       return r;
+}
+
+void
+YearContentListForm::ToggleViewMode(bool editMode)
+{
+       AppLogDebug("ENTER");
+       Footer* pFooter = GetFooter();
+
+       if (editMode)
+       {
+               int currentAlbumContentCount = 0;
+               currentAlbumContentCount = __pPresentationModel->GetContentCount(__currentContentIndex);
+
+               pFooter->RemoveAllButtons();
+               pFooter->RemoveAllItems();
+               pFooter->RemoveActionEventListener(*this);
+               pFooter = CommonUtil::CreateEditFooter(*this);
+               pFooter->AddActionEventListener(*this);
+               pFooter->SetBackButton();
+               SetFormBackEventListener(this);
+
+               if ( currentAlbumContentCount > INIT_VALUE)
+               {
+                       SetTitleText(__strHeaderName);
+               }
+               else
+               {
+                       SetTitleText("No songs");
+                       CommonUtil::ShowNoContentImage(INIT_VALUE, *__pContentTableView, *__pNoContentImageLabel, *__pNoContentTextLabel);
+                       pFooter->SetItemEnabled(INDEX_FOOTER_EDIT, false);
+               }
+
+               __pSelectAllCheckedButton->SetEnabled(false);
+               __pSelectAllCheckedButton->SetShowState(false);
+
+               __checkEdit = false;
+               __pContentTableView->SetBounds(Rectangle(0, 0, GetClientAreaBounds().width, GetClientAreaBounds().height));
+               __pContentTableView->Invalidate(true);
+               __pContentTableView->UpdateTableView();
+       }
+       else
+       {
+               SetTitleText(ResourceManager::GetString("IDS_COM_BODY_EDIT"));
+
+               pFooter->RemoveAllButtons();
+               pFooter->RemoveAllItems();
+               pFooter->RemoveActionEventListener(*this);
+
+               pFooter = CommonUtil::CreateDeleteFooter(*this);
+               pFooter->AddActionEventListener(*this);
+
+               __pSelectAllCheckedButton->SetEnabled(true);
+               __pSelectAllCheckedButton->SetShowState(true);
+
+               __checkEdit = true;
+               __pContentTableView->SetBounds(Rectangle(0, __pSelectAllCheckedButton->GetHeight(), GetClientAreaBounds().width, (GetClientAreaBounds().height - __pSelectAllCheckedButton->GetHeight())));
+               __pContentTableView->Invalidate(true);
+               __pContentTableView->UpdateTableView();
+       }
+       Invalidate(true);
+       AppLogDebug("EXIT");
+}
+
+void
+YearContentListForm::OnAppControlCompleteResponseReceived(const AppId& appId,
+               const String& operationId, AppCtrlResult appControlResult,
+               const IMap* pExtraData)
+{
+       AppLogDebug("ENTER");
+       if (pExtraData == null)
+       {
+               AppLogDebug("EXIT");
+               return;
+       }
+       AppLogDebug("%ls, %ls", appId.GetPointer(), operationId.GetPointer());
+       if (appId.Equals(String(TIZEN_APPCONTROL_PROVIDER_CONTACT)))
+       {
+               if (appControlResult == APP_CTRL_RESULT_SUCCEEDED)
+               {
+                       const String* pContactId = static_cast<const String*>(pExtraData->GetValue(String(APPCONTROL_KEY_RETURNTYPE)));
+                       if (pContactId->Equals(APPCONTROL_VALUE_CONTACTID, true))
+                       {
+                               const String* pResultString = static_cast<const String*>(pExtraData->GetValue(String(APPCONTROL_KEY_VALUE)));
+
+                               AppLogDebug("%ls", pResultString->GetPointer());
+                               int contactId;
+                               Integer::Parse(*pResultString, contactId);
+
+                               AddressbookManager* pAddressbookManager = AddressbookManager::GetInstance();
+                               Addressbook* pAddressbook = pAddressbookManager->GetAddressbookN(DEFAULT_ADDRESSBOOK_ID);
+
+                               ContentInformation* pCcontentInfo = __pPresentationModel->GetContentInfoN(__itemIndex);
+                               if (pCcontentInfo == null)
+                               {
+                                       delete pAddressbook;
+                                       pAddressbook = null;
+                                       return;
+                               }
+
+                               Contact* pContact = pAddressbook->GetContactN(contactId);
+                               pContact->SetValue(CONTACT_PROPERTY_ID_RINGTONE, pCcontentInfo->ContentFilePath);
+                               result r = pAddressbook->UpdateContact(*pContact);
+
+                               if (r == E_SUCCESS)
+                               {
+                                       MessageBox messageBox;
+                                       messageBox.Construct(L"", ResourceManager::GetString(L"IDS_COM_POP_SUCCESS"),
+                                                       MSGBOX_STYLE_OK,
+                                                       COUNT_MESSAGE_BOX_TIMEOUT);
+                                       int modalResult = 0;
+                                       messageBox.ShowAndWait(modalResult);
+                               }
+
+                               delete pCcontentInfo;
+                               pCcontentInfo = null;
+
+                               delete pContact;
+                               pContact = null;
+
+                               delete pAddressbook;
+                               pAddressbook = null;
+                       }
+               }
+       }
+       AppLogDebug("EXIT");
+}
+
+void
+YearContentListForm::OnThumbnailInfoReveivedN(ThumbnailInfo* pThumbnailInfo)
+{
+       AppLogDebug("ENTER");
+       int itemIndex = 0;
+       void* pParam = null;
+       __pThumbnail = pThumbnailInfo->GetBitmapN();
+       pParam = pThumbnailInfo->GetUserParamN();
+       if (pParam)
+       {
+               itemIndex = *(static_cast<int*>(pParam));
+       }
+       __pContentTableView->RefreshItem(itemIndex, TABLE_VIEW_REFRESH_TYPE_ITEM_MODIFY);
+       delete pThumbnailInfo;
+       delete static_cast<int*>(pParam);
+       AppLogDebug("EXIT");
+}
+
+void
+YearContentListForm::OnUserEventReceivedN(RequestId requestId, Tizen::Base::Collection::IList* pArgs)
+{
+       AppLogDebug("ENTER");
+       AppLogDebug("OnUserEventReceivedN %d", requestId);
+       if (requestId == ID_DESTORY_PLAY_LIST_PICKER_POPUP)
+       {
+               if (__pPlayListPickerPopup != null)
+               {
+                       delete __pPlayListPickerPopup;
+                       __pPlayListPickerPopup = null;
+               }
+       }
+       AppLogDebug("EXIT");
+}
+
+void
+YearContentListForm::UpdateItem(int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem)
+{
+       AppLogDebug("ENTER");
+       Label* pThumbnailLabel = static_cast<Label*>(pItem->GetControl(L"pThumbnailLabel"));
+       if (__pThumbnail == null || pThumbnailLabel == null)
+       {
+               AppLogDebug("__pThumbnail or pThumbnailLabel is null");
+               delete __pThumbnail;
+               __pThumbnail = null;
+               return;
+       }
+       pThumbnailLabel->SetBackgroundBitmap(*__pThumbnail);
+       delete __pThumbnail;
+       __pThumbnail = null;
+       pThumbnailLabel->Invalidate(true);
+       AppLogDebug("EXIT");
+}
\ No newline at end of file
old mode 100755 (executable)
new mode 100644 (file)
index 6bcc409..b7d42d5
@@ -1,4 +1,4 @@
-//
+//
 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
 //
 // Licensed under the Flora License, Version 1.0 (the License);
 // See the License for the specific language governing permissions and
 // limitations under the License.
 //
+
+/**
+ * @file               MpYearContentPickerPanel.cpp
+ * @brief              This is the implementation file for YearContentPickerPanel class.
+ */
+
 #include "MpYearContentPickerPanel.h"
 
 using namespace Tizen::Base;
 using namespace Tizen::Base::Collection;
 using namespace Tizen::Content;
 using namespace Tizen::Graphics;
+using namespace Tizen::Social;
 using namespace Tizen::Ui;
 using namespace Tizen::Ui::Controls;
 using namespace Tizen::Ui::Scenes;
-using namespace Tizen::Social;
 
-YearContentPickerPanel::YearContentPickerPanel()
-: __checkedItemCount(0)
-, __pContentTableView(null)
-, __pSelectAllCheckedButton(null)
-, __pCheckedCountLabel(null)
+YearContentPickerPanel::YearContentPickerPanel(void)
+       : __checkedItemCount(0)
+       , __pContentTableView(null)
+       , __pSelectAllCheckedButton(null)
+       , __pCheckedCountLabel(null)
 {
-       //AppLogDebug("YearContentPickerPanel");
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 
-YearContentPickerPanel::~YearContentPickerPanel()
+YearContentPickerPanel::~YearContentPickerPanel(void)
 {
-       //AppLogDebug("~YearContentPickerPanel");
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
+
 bool
 YearContentPickerPanel::Initialize(void)
 {
-       //AppLogDebug("Initialize");
+       AppLogDebug("ENTER");
        result r = Construct(Rectangle(INIT_VALUE, INIT_VALUE, INIT_VALUE, INIT_VALUE));
        if (IsFailed(r))
        {
                return false;
        }
+       AppLogDebug("EXIT");
        return true;
 }
 
 result
 YearContentPickerPanel::OnInitializing(void)
 {
-       //AppLogDebug("OnInitializing");
+       AppLogDebug("ENTER");
        Form* pForm = dynamic_cast<Form*>(GetParent());
        AppAssert(pForm);
 
-       int width  = pForm->GetClientAreaBounds().width;
+       int width = pForm->GetClientAreaBounds().width;
        int height = pForm->GetClientAreaBounds().height;
 
        SetBounds(INIT_VALUE, INIT_VALUE, width, height);
@@ -77,123 +87,111 @@ YearContentPickerPanel::OnInitializing(void)
 
        __pPresentationModel = YearListPresentationModel::GetInstance();
 
+       AppLogDebug("EXIT");
        return E_SUCCESS;
 }
 
 result
 YearContentPickerPanel::OnTerminating(void)
 {
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
        return E_SUCCESS;
 }
 
 void
 YearContentPickerPanel::OnActionPerformed(const Tizen::Ui::Control& source, int actionId)
 {
-       //AppLogDebug("OnActionPerformed");
+       AppLogDebug("ENTER");
        SceneManager* pSceneManager = SceneManager::GetInstance();
        AppAssert(pSceneManager);
 
-       int totalCount = __pPresentationModel->GetSongContentCount();
+       int totalCount = __pPresentationModel->GetContentCount(__pPresentationModel->GetCurrentYearIndex());
 
-       switch(actionId)
+       switch (actionId)
        {
        case IDA_CHECK_BUTTON:
-       {
-               //AppLogDebug("IDA_CHECK_BUTTON");
-               __checkedItemCount = totalCount;
-               CommonUtil::SetAllCheckState(true, *__pContentTableView, totalCount);
-               Form* pForm = dynamic_cast<Form*>(GetParent());
-               AppAssert(pForm);
-               CommonUtil::ShowCheckedCountLabel(*__pCheckedCountLabel, __checkedItemCount, *__pContentTableView, *pForm);
-               CommonUtil::SetButtonEnabled(*pForm, __checkedItemCount, actionId);
+               {
+                       //AppLogDebug("IDA_CHECK_BUTTON");
+                       __checkedItemCount = totalCount;
+                       CommonUtil::SetAllCheckState(true, *__pContentTableView, totalCount);
+                       Form* pForm = dynamic_cast<Form*>(GetParent());
+                       AppAssert(pForm);
+                       CommonUtil::ShowCheckedCountLabel(*__pCheckedCountLabel, __checkedItemCount, *__pContentTableView, *pForm);
+                       CommonUtil::SetButtonEnabled(*pForm, __checkedItemCount, actionId);
+               }
                break;
-       }
+
        case IDA_UNCHECK_BUTTON:
-       {
-               //AppLogDebug("IDA_UNCHECK_BUTTON");
-               __checkedItemCount = INIT_VALUE;
-               CommonUtil::SetAllCheckState(false, *__pContentTableView, totalCount);
-               Form* pForm = dynamic_cast<Form*>(GetParent());
-               AppAssert(pForm);
-               CommonUtil::ShowCheckedCountLabel(*__pCheckedCountLabel, __checkedItemCount, *__pContentTableView, *pForm);
-               CommonUtil::SetButtonEnabled(*pForm, __checkedItemCount, actionId);
-               break;
-       }
-       case IDA_FOOTER_BUTTON_ADD_TO_PLAYLIST:
-       {
-               if (__checkedItemCount <= 0)
                {
-                       return;
+                       //AppLogDebug("IDA_UNCHECK_BUTTON");
+                       __checkedItemCount = INIT_VALUE;
+                       CommonUtil::SetAllCheckState(false, *__pContentTableView, totalCount);
+                       Form* pForm = dynamic_cast<Form*>(GetParent());
+                       AppAssert(pForm);
+                       CommonUtil::ShowCheckedCountLabel(*__pCheckedCountLabel, __checkedItemCount, *__pContentTableView, *pForm);
+                       CommonUtil::SetButtonEnabled(*pForm, __checkedItemCount, actionId);
                }
+               break;
 
-               PlayList* pPlayList = PlayListManager::GetInstance()->GetPlayListN(CommonUtil::GetAddtoPlaylistName());
+       case IDA_FOOTER_BUTTON_ADD_TO_PLAYLIST:
+               {
+                       if (__checkedItemCount <= 0)
+                       {
+                               return;
+                       }
 
-               int totalCount = __pPresentationModel->GetSongContentCount();
+                       int totalCount = __pPresentationModel->GetContentCount(__pPresentationModel->GetCurrentYearIndex());
 
-               for(int iCount = 0; iCount < totalCount; iCount++)
-               {
-                       if (__pContentTableView->IsItemChecked(iCount) == true)
+                       for (int iCount = 0; iCount < totalCount; iCount++)
                        {
-                               ContentInformationStruct* pContentInfoStruct = __pPresentationModel->GetSongContentInfoN(iCount);
-                               if (pContentInfoStruct == null)
+                               if (__pContentTableView->IsItemChecked(iCount) == true)
                                {
-                                       continue;
+                                       __pPresentationModel->AddContent(*new (std::nothrow) String(CommonUtil::GetAddtoPlaylistName()), iCount);
+                                       __pContentTableView->SetItemChecked(iCount, false);
                                }
-                               pPlayList->AddItem(pContentInfoStruct->contentId);
-
-                               __pContentTableView->SetItemChecked(iCount, false);
-
-                               delete pContentInfoStruct->pThumbnail;
-                               pContentInfoStruct->pThumbnail = null;
-
-                               delete pContentInfoStruct;
-                               pContentInfoStruct = null;
                        }
-               }
-
-               delete pPlayList;
-               pPlayList = null;
 
-               Form* pForm = dynamic_cast<Form*>(GetParent());
-               AppAssert(pForm);
-               CommonUtil::SetButtonEnabled(*pForm, __checkedItemCount, actionId);
+                       Form* pForm = dynamic_cast<Form*>(GetParent());
+                       AppAssert(pForm);
+                       CommonUtil::SetButtonEnabled(*pForm, __checkedItemCount, actionId);
 
-               __checkedItemCount = INIT_VALUE;
-               CommonUtil::ShowCheckedCountLabel(*__pCheckedCountLabel, __checkedItemCount, *__pContentTableView, *pForm);
-               CommonUtil::ShowSelectAllCheckButton(*__pSelectAllCheckedButton);
-               CommonUtil::SetAddtoPlaylistState(false);
+                       __checkedItemCount = INIT_VALUE;
+                       CommonUtil::ShowCheckedCountLabel(*__pCheckedCountLabel, __checkedItemCount, *__pContentTableView, *pForm);
+                       CommonUtil::ShowSelectAllCheckButton(*__pSelectAllCheckedButton);
+                       CommonUtil::SetAddtoPlaylistState(false);
 
-               Invalidate(true);
+                       Invalidate(true);
 
-               pSceneManager->GoForward(ForwardSceneTransition(IDSCN_PLAYLIST_LIST,
+                       pSceneManager->GoForward(ForwardSceneTransition(IDSCN_PLAYLIST_LIST,
                                                                                                                SCENE_TRANSITION_ANIMATION_TYPE_NONE,
                                                                                                                SCENE_HISTORY_OPTION_NO_HISTORY,
                                                                                                                SCENE_DESTROY_OPTION_DESTROY));
+               }
                break;
-       }
+
        case IDA_FOOTER_BUTTON_CANCEL:
-       {
-               //AppLogDebug("IDA_FOOTER_BUTTON_CANCEL");
-               Form* pForm = dynamic_cast<Form*>(GetParent());
-               AppAssert(pForm);
-               CommonUtil::SetButtonEnabled(*pForm, __checkedItemCount, actionId);
-               pSceneManager->GoBackward(BackwardSceneTransition());
+               {
+                       //AppLogDebug("IDA_FOOTER_BUTTON_CANCEL");
+                       Form* pForm = dynamic_cast<Form*>(GetParent());
+                       AppAssert(pForm);
+                       CommonUtil::SetButtonEnabled(*pForm, __checkedItemCount, actionId);
+                       pSceneManager->GoBackward(BackwardSceneTransition());
+               }
                break;
-       }
+
        default:
-       {
                break;
-       }
        }//End of switch
+       AppLogDebug("EXIT");
 }
 
 void
 YearContentPickerPanel::OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previousSceneId,
-                                                                     const Tizen::Ui::Scenes::SceneId& currentSceneId,
-                                                                     Tizen::Base::Collection::IList* pArgs)
+                                                                       const Tizen::Ui::Scenes::SceneId& currentSceneId,
+                                                                       Tizen::Base::Collection::IList* pArgs)
 {
-       //AppLogDebug("OnSceneActivatedN");
-
+       AppLogDebug("ENTER");
        Form* pForm = dynamic_cast<Form*>(GetParent());
        AppAssert(pForm);
 
@@ -201,20 +199,20 @@ YearContentPickerPanel::OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& prev
        pFooter->AddActionEventListener(*this);
 
        CommonUtil::SetButtonEnabled(*pForm, __checkedItemCount);
-
+       __pPresentationModel->UpdateYearList();
        if (pArgs != null)
        {
                pArgs->RemoveAll(true);
                delete pArgs;
        }
+       AppLogDebug("EXIT");
 }
 
 void
 YearContentPickerPanel::OnSceneDeactivated(const Tizen::Ui::Scenes::SceneId& currentSceneId,
-                                                                              const Tizen::Ui::Scenes::SceneId& nextSceneId)
+                                                                               const Tizen::Ui::Scenes::SceneId& nextSceneId)
 {
-       //AppLogDebug("OnSceneDeactivated");
-
+       AppLogDebug("ENTER");
        Form* pForm = dynamic_cast<Form*>(GetParent());
        AppAssert(pForm);
 
@@ -222,53 +220,50 @@ YearContentPickerPanel::OnSceneDeactivated(const Tizen::Ui::Scenes::SceneId& cur
        pFooter->RemoveAllButtons();
        pFooter->RemoveAllItems();
        pFooter->RemoveActionEventListener(*this);
+       AppLogDebug("EXIT");
 }
 
 int
 YearContentPickerPanel::GetItemCount(void)
 {
-       //AppLogDebug("GetItemCount");
-
+       AppLogDebug("ENTER");
        if (__pPresentationModel == null)
        {
-               return 0;
+               return INIT_VALUE;
        }
-       return __pPresentationModel->GetSongContentCount();
+       AppLogDebug("EXIT");
+       return __pPresentationModel->GetContentCount(__pPresentationModel->GetCurrentYearIndex());
 }
 
 Tizen::Ui::Controls::TableViewItem*
 YearContentPickerPanel::CreateItem(const int itemIndex, int itemWidth)
 {
-       //AppLogDebug("CreateTableViewItem");
-
-       ContentInformationStruct* pContentInfoStruct = __pPresentationModel->GetSongContentInfoN(itemIndex);
+       AppLogDebug("ENTER");
+       ContentInformation* pContentInfoStruct = __pPresentationModel->GetContentInfoN(itemIndex);
        if (pContentInfoStruct == null)
        {
+               AppLogDebug("EXIT");
                return null;
        }
 
        TableViewItem* pItem = new (std::nothrow) TableViewItem();
-       pItem->Construct(Dimension(itemWidth, ITEM_HEIGHT),TABLE_VIEW_ANNEX_STYLE_MARK);
+       pItem->Construct(Dimension(itemWidth, ITEM_HEIGHT), TABLE_VIEW_ANNEX_STYLE_MARK);
        pItem->SetBackgroundColor(COLOR_ITEM);
 
-       CommonUtil::CreateContentPikerTableViewItem(*pItem, pContentInfoStruct->TitleName,CommonUtil::GetFormatDate(pContentInfoStruct->Duration));
-
-       //test_code_start
-       delete pContentInfoStruct->pThumbnail;
-       pContentInfoStruct->pThumbnail = null;
+       CommonUtil::CreateContentPikerTableViewItem(*pItem, pContentInfoStruct->TitleName, CommonUtil::GetFormatDate(pContentInfoStruct->Duration));
 
        delete pContentInfoStruct;
        pContentInfoStruct = null;
-       //test_code_end
 
+       AppLogDebug("EXIT");
        return pItem;
 }
 
 bool
 YearContentPickerPanel::DeleteItem(const int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem)
 {
-       //AppLogDebug("DeleteItem");
-
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
        return true;
 }
 
@@ -280,41 +275,41 @@ YearContentPickerPanel::UpdateItem(int itemIndex, Tizen::Ui::Controls::TableView
 int
 YearContentPickerPanel::GetDefaultItemHeight(void)
 {
-       //AppLogDebug("GetDefaultItemHeight");
-
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
        return ITEM_HEIGHT;
 }
 
 void
 YearContentPickerPanel::OnTableViewItemStateChanged(Tizen::Ui::Controls::TableView& tableView,
-                                                     int itemIndex,
-                                                     Tizen::Ui::Controls::TableViewItem* pItem,
-                                                     Tizen::Ui::Controls::TableViewItemStatus status)
+                                                               int itemIndex,
+                                                               Tizen::Ui::Controls::TableViewItem* pItem,
+                                                               Tizen::Ui::Controls::TableViewItemStatus status)
 {
-       //AppLogDebug("OnTableViewItemStateChanged");
-       switch(status)
+       AppLogDebug("ENTER");
+       switch (status)
        {
        case TABLE_VIEW_ITEM_STATUS_CHECKED:
-       {
-               __checkedItemCount++;
-               tableView.SetItemChecked(itemIndex, true);
+               {
+                       __checkedItemCount++;
+                       tableView.SetItemChecked(itemIndex, true);
+               }
                break;
-       }
+
        case TABLE_VIEW_ITEM_STATUS_UNCHECKED:
-       {
-               __checkedItemCount--;
-               tableView.SetItemChecked(itemIndex, false);
+               {
+                       __checkedItemCount--;
+                       tableView.SetItemChecked(itemIndex, false);
+               }
                break;
-       }
+
        default:
-       {
                break;
-       }
        }//end of switch
 
        CommonUtil::ShowSelectAllCheckButton(*__pSelectAllCheckedButton);
 
-       if (__checkedItemCount == __pPresentationModel->GetTotalYearCount())
+       if (__checkedItemCount == __pPresentationModel->GetAllYearCount())
        {
                __pSelectAllCheckedButton->SetSelected(true);
        }
@@ -325,21 +320,24 @@ YearContentPickerPanel::OnTableViewItemStateChanged(Tizen::Ui::Controls::TableVi
        AppAssert(pForm);
        CommonUtil::ShowCheckedCountLabel(*__pCheckedCountLabel, __checkedItemCount, *__pContentTableView, *pForm);
        CommonUtil::SetButtonEnabled(*pForm, __checkedItemCount);
+       AppLogDebug("EXIT");
 }
 
 void
 YearContentPickerPanel::OnTableViewContextItemActivationStateChanged(Tizen::Ui::Controls::TableView& tableView,
-                                                                      int itemIndex,
-                                                                      Tizen::Ui::Controls::TableViewContextItem* pContextItem,
-                                                                      bool activated)
+                                                                               int itemIndex,
+                                                                               Tizen::Ui::Controls::TableViewContextItem* pContextItem,
+                                                                               bool activated)
 {
-       //AppLogDebug("OnTableViewContextItemActivationStateChanged");
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
+
 void
 YearContentPickerPanel::OnTableViewItemReordered(Tizen::Ui::Controls::TableView& tableView,
-                                                  int itemIndexFrom,
-                                                  int itemIndexTo)
+                                                               int itemIndexFrom,
+                                                               int itemIndexTo)
 {
-       //AppLogDebug("OnTableViewItemReordered");
-}
-
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
+}
\ No newline at end of file
old mode 100755 (executable)
new mode 100644 (file)
index 2710fd2..1ea4a3d
@@ -1,4 +1,4 @@
-//
+//
 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
 //
 // Licensed under the Flora License, Version 1.0 (the License);
 // limitations under the License.
 //
 
-#include "MpYearListEditorPanel.h"
+/**
+ * @file               MpYearListEditPanel.cpp
+ * @brief              This is the implementation file for MpYearListEditPanel class.
+ */
+
 #include "MpPlaylistPickerPopup.h"
+#include "MpThumbnailInfo.h"
+#include "MpYearListEditorPanel.h"
 
 using namespace Tizen::Base;
 using namespace Tizen::Base::Collection;
 using namespace Tizen::Content;
 using namespace Tizen::Graphics;
+using namespace Tizen::Io;
 using namespace Tizen::Social;
 using namespace Tizen::Ui::Controls;
 using namespace Tizen::Ui::Scenes;
-using namespace Tizen::Io;
 
 YearsListEditorPanel::YearsListEditorPanel(void)
-: __pContentTableView(null)
-, __pSelectAllCheckedButton(null)
-, __pCheckedCountLabel(null)
-, __checkedItemCount(0)
-, __pPlayListPickerPopup(null)
+       : ThumbnailBase::ThumbnailBase()
+       , __pContentTableView(null)
+       , __pSelectAllCheckedButton(null)
+       , __pCheckedCountLabel(null)
+       , __pThumbnail(null)
+       , __checkedItemCount(0)
+       , __pPlayListPickerPopup(null)
 {
-
-       //AppLogDebug("YearsListEditorPanel");
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 
 YearsListEditorPanel::~YearsListEditorPanel(void)
 {
-       //AppLogDebug("~YearsListEditorPanel");
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 
 bool
 YearsListEditorPanel::Initialize(void)
 {
-       //AppLogDebug("Initialize");
-       result r = Construct(Rectangle(INIT_VALUE, INIT_VALUE, INIT_VALUE, INIT_VALUE));
+       AppLogDebug("ENTER");
+       result r = BasePanel::Construct(Rectangle(INIT_VALUE, INIT_VALUE, INIT_VALUE, INIT_VALUE));
        if (IsFailed(r))
        {
                return false;
        }
+       AppLogDebug("EXIT");
        return true;
 }
 
 result
 YearsListEditorPanel::OnInitializing(void)
 {
-       //AppLogDebug("OnInitializing");
+       AppLogDebug("ENTER");
        Form* pForm = dynamic_cast<Form*>(GetParent());
        AppAssert(pForm);
 
-       int width  = pForm->GetClientAreaBounds().width;
+       int width = pForm->GetClientAreaBounds().width;
        int height = pForm->GetClientAreaBounds().height;
 
        SetBounds(INIT_VALUE, INIT_VALUE, width, height);
@@ -82,100 +92,102 @@ YearsListEditorPanel::OnInitializing(void)
 
        __pPresentationModel = YearListPresentationModel::GetInstance();
 
-       return E_SUCCESS;
+       AppLogDebug("EXIT");
+       return ThumbnailBase::Construct();
 }
 
 result
 YearsListEditorPanel::OnTerminating(void)
 {
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
        return E_SUCCESS;
 }
 
 void
 YearsListEditorPanel::OnActionPerformed(const Tizen::Ui::Control& source, int actionId)
 {
-       //AppLogDebug("OnActionPerformed");
+       AppLogDebug("ENTER");
        SceneManager* pSceneManager = SceneManager::GetInstance();
        AppAssert(pSceneManager);
 
-       int totalCount = __pPresentationModel->GetTotalYearCount();
+       int totalCount = __pPresentationModel->GetAllYearCount();
 
-       switch(actionId)
+       switch (actionId)
        {
        case IDA_CHECK_BUTTON:
-       {
-               //AppLogDebug("IDA_CHECK_BUTTON");
-               __checkedItemCount = totalCount;
-               CommonUtil::SetAllCheckState(true, *__pContentTableView, totalCount);
-               Form* pForm = dynamic_cast<Form*>(GetParent());
-               AppAssert(pForm);
-               CommonUtil::ShowCheckedCountLabel(*__pCheckedCountLabel, __checkedItemCount, *__pContentTableView, *pForm);
+               {
+                       //AppLogDebug("IDA_CHECK_BUTTON");
+                       __checkedItemCount = totalCount;
+                       CommonUtil::SetAllCheckState(true, *__pContentTableView, totalCount);
+                       Form* pForm = dynamic_cast<Form*>(GetParent());
+                       AppAssert(pForm);
+                       CommonUtil::ShowCheckedCountLabel(*__pCheckedCountLabel, __checkedItemCount, *__pContentTableView, *pForm);
+               }
                break;
-       }
+
        case IDA_UNCHECK_BUTTON:
-       {
-               //AppLogDebug("IDA_UNCHECK_BUTTON");
-               __checkedItemCount = INIT_VALUE;
-               CommonUtil::SetAllCheckState(false, *__pContentTableView, totalCount);
-               Form* pForm = dynamic_cast<Form*>(GetParent());
-               AppAssert(pForm);
-               CommonUtil::ShowCheckedCountLabel(*__pCheckedCountLabel, __checkedItemCount, *__pContentTableView, *pForm);
+               {
+                       //AppLogDebug("IDA_UNCHECK_BUTTON");
+                       __checkedItemCount = INIT_VALUE;
+                       CommonUtil::SetAllCheckState(false, *__pContentTableView, totalCount);
+                       Form* pForm = dynamic_cast<Form*>(GetParent());
+                       AppAssert(pForm);
+                       CommonUtil::ShowCheckedCountLabel(*__pCheckedCountLabel, __checkedItemCount, *__pContentTableView, *pForm);
+               }
                break;
-       }
+
        case IDA_FOOTER_BUTTON_ADD_TO_PLAYLIST:
-       {
-               if (__checkedItemCount <= INIT_VALUE)
                {
-                       return;
-               }
+                       if (__checkedItemCount <= INIT_VALUE)
+                       {
+                               return;
+                       }
 
-               ArrayList* pDataList = new (std::nothrow) ArrayList();
-               pDataList->Construct();
+                       ArrayList* pDataList = new (std::nothrow) ArrayList();
+                       pDataList->Construct();
 
-               int totalCount = __pPresentationModel->GetTotalYearCount();
-               for(int iCount = 0; iCount < totalCount; iCount++)
-               {
-                       if (__pContentTableView->IsItemChecked(iCount) == true)
+                       int totalCount = __pPresentationModel->GetAllYearCount();
+                       for (int iCount = 0; iCount < totalCount; iCount++)
                        {
-                               pDataList->AddItems(*(__pPresentationModel->SearchContentItemN(iCount)));
+                               if (__pContentTableView->IsItemChecked(iCount) == true)
+                               {
+                                       pDataList->AddItems(*(__pPresentationModel->GetContentPathListN(iCount)));
+                               }
                        }
-               }
 
-               if (__pPlayListPickerPopup == null)
-               {
                        __pPlayListPickerPopup = new (std::nothrow) PlayListPickerPopup();
-                       __pPlayListPickerPopup->Initialize();
-               }
+                       __pPlayListPickerPopup->Initialize(this, pDataList);
 
-               __pPlayListPickerPopup->SetCollectedContent(pDataList);
-               __pPlayListPickerPopup->SetShowState(true);
-               __pPlayListPickerPopup->Show();
+                       //__pPlayListPickerPopup->SetCollectedContent(pDataList);
+                       __pPlayListPickerPopup->SetShowState(true);
+                       __pPlayListPickerPopup->Show();
+               }
                break;
-       }
+
        case IDA_FOOTER_BUTTON_CANCEL:
-       {
-               //AppLogDebug("IDA_FOOTER_BUTTON_CANCEL");
-               pSceneManager->GoBackward(BackwardSceneTransition());
+               {
+                       //AppLogDebug("IDA_FOOTER_BUTTON_CANCEL");
+                       pSceneManager->GoBackward(BackwardSceneTransition());
+               }
                break;
-       }
+
        default:
-       {
                break;
-       }
        }//End of switch
 
        Form* pForm = dynamic_cast<Form*>(GetParent());
        AppAssert(pForm);
        CommonUtil::SetButtonEnabled(*pForm, __checkedItemCount, actionId);
+       AppLogDebug("EXIT");
 }
 
 void
 YearsListEditorPanel::OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previousSceneId,
-                                                                   const Tizen::Ui::Scenes::SceneId& currentSceneId,
-                                                                   Tizen::Base::Collection::IList* pArgs)
+                                                                       const Tizen::Ui::Scenes::SceneId& currentSceneId,
+                                                                       Tizen::Base::Collection::IList* pArgs)
 {
-       //AppLogDebug("OnSceneActivatedN");
-
+       AppLogDebug("ENTER");
        Form* pForm = dynamic_cast<Form*>(GetParent());
        AppAssert(pForm);
 
@@ -191,14 +203,14 @@ YearsListEditorPanel::OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previo
                pArgs->RemoveAll(true);
                delete pArgs;
        }
+       AppLogDebug("EXIT");
 }
 
 void
 YearsListEditorPanel::OnSceneDeactivated(const Tizen::Ui::Scenes::SceneId& currentSceneId,
-                                                                    const Tizen::Ui::Scenes::SceneId& nextSceneId)
+                                                                       const Tizen::Ui::Scenes::SceneId& nextSceneId)
 {
-       //AppLogDebug("OnSceneDeactivated");
-
+       AppLogDebug("ENTER");
        Form* pForm = dynamic_cast<Form*>(GetParent());
        AppAssert(pForm);
 
@@ -211,101 +223,98 @@ YearsListEditorPanel::OnSceneDeactivated(const Tizen::Ui::Scenes::SceneId& curre
        CommonUtil::ShowCheckedCountLabel(*__pCheckedCountLabel, __checkedItemCount, *__pContentTableView, *pForm);
        CommonUtil::ShowSelectAllCheckButton(*__pSelectAllCheckedButton);
 
-       int totalCount = __pPresentationModel->GetTotalYearCount();
-       for(int iCount = 0; iCount < totalCount; iCount++)
+       int totalCount = __pPresentationModel->GetAllYearCount();
+       for (int iCount = 0; iCount < totalCount; iCount++)
        {
                __pContentTableView->SetItemChecked(iCount, false);
        }
+       CancelAllThumbnailRequest();
+       AppLogDebug("EXIT");
 }
 
 int
 YearsListEditorPanel::GetItemCount(void)
 {
-       //AppLogDebug("GetItemCount");
+       AppLogDebug("ENTER");
        if (__pPresentationModel == null)
        {
                return INIT_VALUE;
        }
 
-       return __pPresentationModel->GetTotalYearCount();
+       AppLogDebug("EXIT");
+       return __pPresentationModel->GetAllYearCount();
 }
 
 Tizen::Ui::Controls::TableViewItem*
 YearsListEditorPanel::CreateItem(const int itemIndex, int itemWidth)
 {
-       //AppLogDebug("CreateTableViewItem");
-       ContentInformationStruct* pContentInfoStruct = __pPresentationModel->GetContentInfoN(itemIndex);
+       AppLogDebug("ENTER");
+       ContentInformation* pContentInfoStruct = __pPresentationModel->GetYearInfoN(itemIndex);
        if (pContentInfoStruct == null)
        {
                return null;
        }
 
-       TableViewItem* pItem = new (std::nothrow) TableViewItem;
+       TableViewItem* pItem = new (std::nothrow) TableViewItem();
        pItem->Construct(Dimension(itemWidth, ITEM_HEIGHT), TABLE_VIEW_ANNEX_STYLE_MARK);
        pItem->SetBackgroundColor(COLOR_ITEM);
 
        String strYear = Integer::ToString(pContentInfoStruct->ReleaseYear);
-       if(strYear.Equals(L"0", true))
+       if (strYear.Equals(L"0", true))
        {
                strYear = STRING_UNKNOWN;
        }
-       CommonUtil::CreateEditListTableViewItem(*pItem, *(pContentInfoStruct->pThumbnail), strYear, __pPresentationModel->GetTotalContentCount(itemIndex));
-
-       //test_code_start
-       delete pContentInfoStruct->pThumbnail;
-       pContentInfoStruct->pThumbnail = null;
+       RequestThumbnail(pContentInfoStruct->contentId, (new (std::nothrow) int(itemIndex)));
+       CommonUtil::CreateEditListTableViewItem(*pItem, *GetDefaultThumbnail(), strYear, __pPresentationModel->GetContentCount(itemIndex));
 
        delete pContentInfoStruct;
        pContentInfoStruct = null;
-       //test_code_end
 
+       AppLogDebug("EXIT");
        return pItem;
 }
 
 bool
 YearsListEditorPanel::DeleteItem(const int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem)
 {
-       //AppLogDebug("DeleteItem");
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
        return true;
 }
 
-void
-YearsListEditorPanel::UpdateItem(int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem)
-{
-}
-
 int
 YearsListEditorPanel::GetDefaultItemHeight(void)
 {
-       //AppLogDebug("UpdateItem");
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
        return ITEM_HEIGHT;
 }
 
 void
 YearsListEditorPanel::OnTableViewItemStateChanged(Tizen::Ui::Controls::TableView& tableView,
-                                                  int itemIndex,
-                                                  Tizen::Ui::Controls::TableViewItem* pItem,
-                                                  Tizen::Ui::Controls::TableViewItemStatus status)
+                                                               int itemIndex,
+                                                               Tizen::Ui::Controls::TableViewItem* pItem,
+                                                               Tizen::Ui::Controls::TableViewItemStatus status)
 {
-       //AppLogDebug("OnTableViewItemStateChanged");
-       switch(status)
+       AppLogDebug("ENTER");
+       switch (status)
        {
        case TABLE_VIEW_ITEM_STATUS_CHECKED:
-       {
-               __checkedItemCount++;
-               tableView.SetItemChecked(itemIndex, true);
+               {
+                       __checkedItemCount++;
+                       tableView.SetItemChecked(itemIndex, true);
+               }
                break;
-       }
+
        case TABLE_VIEW_ITEM_STATUS_UNCHECKED:
-       {
-               __checkedItemCount--;
-               tableView.SetItemChecked(itemIndex, false);
+               {
+                       __checkedItemCount--;
+                       tableView.SetItemChecked(itemIndex, false);
+               }
                break;
-       }
+
        default:
-       {
                break;
-       }
        }//end of switch
 
        Form* pForm = dynamic_cast<Form*>(GetParent());
@@ -314,44 +323,104 @@ YearsListEditorPanel::OnTableViewItemStateChanged(Tizen::Ui::Controls::TableView
 
        CommonUtil::ShowSelectAllCheckButton(*__pSelectAllCheckedButton);
 
-       if (__checkedItemCount == __pPresentationModel->GetTotalYearCount())
+       if (__checkedItemCount == __pPresentationModel->GetAllYearCount())
        {
                __pSelectAllCheckedButton->SetSelected(true);
        }
 
        Invalidate(true);
        CommonUtil::ShowCheckedCountLabel(*__pCheckedCountLabel, __checkedItemCount, *__pContentTableView, *pForm);
+       AppLogDebug("EXIT");
 }
 
 void
 YearsListEditorPanel::OnTableViewContextItemActivationStateChanged(Tizen::Ui::Controls::TableView& tableView,
-                                                                   int itemIndex,
-                                                                   Tizen::Ui::Controls::TableViewContextItem* pContextItem,
-                                                                   bool activated)
+                                                                               int itemIndex,
+                                                                               Tizen::Ui::Controls::TableViewContextItem* pContextItem,
+                                                                               bool activated)
 {
-       //AppLogDebug("OnTableViewContextItemActivationStateChanged");
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 
 void
 YearsListEditorPanel::OnTableViewItemReordered(Tizen::Ui::Controls::TableView& tableView,
-                                               int itemIndexFrom,
-                                               int itemIndexTo)
+                                                       int itemIndexFrom,
+                                                       int itemIndexTo)
 {
-       //AppLogDebug("OnTableViewItemReordered");
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 
 void
 YearsListEditorPanel::OnUpdateContentList(void)
 {
+       AppLogDebug("ENTER");
        UpdateContentList();
+       AppLogDebug("EXIT");
 }
 
 void
 YearsListEditorPanel::UpdateContentList(void)
 {
+       AppLogDebug("ENTER");
        if (__pPresentationModel != null && __pContentTableView != null)
        {
-               __pPresentationModel->RefreshContent();
+               __pPresentationModel->UpdateYearList();
                __pContentTableView->UpdateTableView();
        }
+       AppLogDebug("EXIT");
+}
+
+void
+YearsListEditorPanel::OnThumbnailInfoReveivedN(ThumbnailInfo* pThumbnailInfo)
+{
+       AppLogDebug("ENTER");
+       int itemIndex = 0;
+       void* pParam = null;
+       __pThumbnail = pThumbnailInfo->GetBitmapN();
+       pParam = pThumbnailInfo->GetUserParamN();
+       if (pParam)
+       {
+               itemIndex = *(static_cast<int*>(pParam));
+       }
+       __pContentTableView->RefreshItem(itemIndex, TABLE_VIEW_REFRESH_TYPE_ITEM_MODIFY);
+       delete pThumbnailInfo;
+       delete static_cast<int*>(pParam);
+       AppLogDebug("EXIT");
 }
+
+void
+YearsListEditorPanel::OnUserEventReceivedN(RequestId requestId, Tizen::Base::Collection::IList* pArgs)
+{
+       AppLogDebug("ENTER");
+       AppLogDebug("OnUserEventReceivedN %d", requestId);
+       if (requestId == ID_DESTORY_PLAY_LIST_PICKER_POPUP)
+       {
+               if (__pPlayListPickerPopup != null)
+               {
+                       delete __pPlayListPickerPopup;
+                       __pPlayListPickerPopup = null;
+               }
+       }
+       AppLogDebug("EXIT");
+}
+
+void
+YearsListEditorPanel::UpdateItem(int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem)
+{
+       AppLogDebug("ENTER");
+       Label* pThumbnailLabel = static_cast<Label*>(pItem->GetControl(L"pSongThumbnailLabel"));
+       if (__pThumbnail == null || pThumbnailLabel == null)
+       {
+               AppLogDebug("__pThumbnail or pThumbnailLabel is null");
+               delete __pThumbnail;
+               __pThumbnail = null;
+               return;
+       }
+       pThumbnailLabel->SetBackgroundBitmap(*__pThumbnail);
+       delete __pThumbnail;
+       __pThumbnail = null;
+       pThumbnailLabel->Invalidate(true);
+       AppLogDebug("EXIT");
+}
\ No newline at end of file
old mode 100755 (executable)
new mode 100644 (file)
index 17d967b..7e2e8cd
@@ -1,4 +1,4 @@
-//
+//
 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
 //
 // Licensed under the Flora License, Version 1.0 (the License);
 // limitations under the License.
 //
 
-#include "MpYearListPanel.h"
+/**
+ * @file               MpYearListPanel.cpp
+ * @brief              This is the implementation file for YearListPanel class.
+ */
+
 #include "MpNowPlayContentPanel.h"
 #include "MpPlaylistPickerPopup.h"
+#include "MpThumbnailInfo.h"
+#include "MpYearListPanel.h"
 
 using namespace Tizen::Base;
 using namespace Tizen::Base::Collection;
@@ -27,38 +33,47 @@ using namespace Tizen::Ui::Controls;
 using namespace Tizen::Ui::Scenes;
 
 YearsListPanel::YearsListPanel(void)
-: __itemIndex(-1)
-, __pNowPlayContentPanel(null)
-, __pPlayListPickerPopup(null)
-, __pContextItem(null)
-, __pContentTableView(null)
-, __pNoContentImageLabel(null)
-, __pNoContentTextLabel(null)
+       : ThumbnailBase::ThumbnailBase()
+       , __itemIndex(-1)
+       , __pNowPlayContentPanel(null)
+       , __pPlayListPickerPopup(null)
+       , __pContextItem(null)
+       , __pContentTableView(null)
+       , __pNoContentImageLabel(null)
+       , __pNoContentTextLabel(null)
+       , __pThumbnail(null)
 {
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 
 YearsListPanel::~YearsListPanel(void)
 {
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 
 bool
 YearsListPanel::Initialize(void)
 {
-       result r = Construct(Rectangle(INIT_VALUE, INIT_VALUE, INIT_VALUE, INIT_VALUE)); // Should be set proper area at OnInitializing().
+       AppLogDebug("ENTER");
+       result r = BasePanel::Construct(Rectangle(INIT_VALUE, INIT_VALUE, INIT_VALUE, INIT_VALUE)); // Should be set proper area at OnInitializing().
        if (IsFailed(r))
        {
                return false;
        }
+       AppLogDebug("EXIT");
        return true;
 }
 
 result
 YearsListPanel::OnInitializing(void)
 {
+       AppLogDebug("ENTER");
        Form* pForm = dynamic_cast<Form*>(GetParent());
        AppAssert(pForm);
 
-       int width  = pForm->GetClientAreaBounds().width;
+       int width = pForm->GetClientAreaBounds().width;
        int height = pForm->GetClientAreaBounds().height;
 
        SetBounds(INIT_VALUE, INIT_VALUE, width, height);
@@ -69,15 +84,15 @@ YearsListPanel::OnInitializing(void)
        __pContentTableView->AddTableViewItemEventListener(*this);
 
        __pNoContentImageLabel = new (std::nothrow) Label();
-       __pNoContentImageLabel->Construct(Rectangle((pForm->GetWidth() - W_NO_CONTENT)/ 2, Y_GAP_NO_CONTENT, W_NO_CONTENT, H_NO_CONTENT),L"");
+       __pNoContentImageLabel->Construct(Rectangle((pForm->GetWidth() - W_NO_CONTENT) / 2, Y_GAP_NO_CONTENT, W_NO_CONTENT, H_NO_CONTENT), L"");
        __pNoContentImageLabel->SetBackgroundBitmap(*(ResourceManager::GetBitmapN(NO_CONTENT_BITMAP)));
 
        __pNoContentTextLabel = new (std::nothrow) Label();
        __pNoContentTextLabel->Construct(Rectangle(0,
-                                                  __pNoContentImageLabel->GetHeight() + __pNoContentImageLabel->GetY(),
-                                                  pForm->GetWidth(),
-                                                  H_TEXT_NO_CONTENT),
-                                                  ResourceManager::GetString(L"IDS_COM_BODY_NO_ITEMS"));
+                                                               __pNoContentImageLabel->GetHeight() + __pNoContentImageLabel->GetY(),
+                                                               pForm->GetWidth(),
+                                                               H_TEXT_NO_CONTENT),
+                                                               ResourceManager::GetString(L"IDS_COM_BODY_NO_ITEMS"));
        __pNoContentTextLabel->SetTextConfig(FONT_SIZE_NO_CONTENT, LABEL_TEXT_STYLE_BOLD);
 
        __pContextItem = new (std::nothrow) TableViewContextItem();
@@ -90,89 +105,94 @@ YearsListPanel::OnInitializing(void)
 
        __pPresentationModel = YearListPresentationModel::GetInstance();
 
-       return E_SUCCESS;
+       AppLogDebug("EXIT");
+       return ThumbnailBase::Construct();
 }
 
 result
 YearsListPanel::OnTerminating(void)
 {
+       AppLogDebug("ENTER");
        delete __pContextItem;
        __pContextItem = null;
 
+       AppLogDebug("EXIT");
        return E_SUCCESS;
 }
 
 void
 YearsListPanel::OnActionPerformed(const Tizen::Ui::Control& source, int actionId)
 {
+       AppLogDebug("ENTER");
        SceneManager* pSceneManager = SceneManager::GetInstance();
        AppAssert(pSceneManager);
 
-       switch(actionId)
+       switch (actionId)
        {
        case IDA_FOOTER_BUTTON_ADD_TO_PLAYLIST:
-       {
-               if (__pPresentationModel->GetTotalYearCount() == 0)
                {
-                       MessageBox messageBox;
-                       messageBox.Construct(L"", ResourceManager::GetString(L"IDS_COM_BODY_NO_ITEMS"), MSGBOX_STYLE_NONE, 500);
+                       if (__pPresentationModel->GetAllYearCount() == 0)
+                       {
+                               MessageBox messageBox;
+                               messageBox.Construct(L"", ResourceManager::GetString(L"IDS_COM_BODY_NO_ITEMS"), MSGBOX_STYLE_NONE, 500);
 
-                       int modalResult = 0;
-                       messageBox.ShowAndWait(modalResult);
-                       break;
+                               int modalResult = 0;
+                               messageBox.ShowAndWait(modalResult);
+                               break;
+                       }
+                       pSceneManager->GoForward(ForwardSceneTransition(IDSCN_YEAR_LIST_EDITOR));
                }
-               pSceneManager->GoForward(ForwardSceneTransition(IDSCN_YEAR_LIST_EDITOR));
                break;
-       }
+
        case IDA_FOOTER_BUTTON_SEARCH:
-       {
-               pSceneManager->GoForward(ForwardSceneTransition(IDSCN_SEARCH));
+               {
+                       pSceneManager->GoForward(ForwardSceneTransition(IDSCN_SEARCH));
+               }
                break;
-       }
+
        case IDA_FLICK_BUTTON_ADD_TO_PALYLIST:
-       {
-               if (__pPlayListPickerPopup == null)
                {
                        __pPlayListPickerPopup = new (std::nothrow) PlayListPickerPopup();
-                       __pPlayListPickerPopup->Initialize();
+                       __pPlayListPickerPopup->Initialize(this, __pPresentationModel->GetContentPathListN(__itemIndex));
+                       //__pPlayListPickerPopup->SetCollectedContent(__pPresentationModel->GetContentPathListN(__itemIndex));
+                       __pPlayListPickerPopup->SetShowState(true);
+                       __pPlayListPickerPopup->Show();
                }
-
-               __pPlayListPickerPopup->SetCollectedContent(__pPresentationModel->SearchContentItemN(__itemIndex));
-               __pPlayListPickerPopup->SetShowState(true);
-               __pPlayListPickerPopup->Show();
                break;
-       }
+
        default:
-       {
                break;
-       }
        }//end of switch
+       AppLogDebug("EXIT");
 }
 
 void
 YearsListPanel::OnFormBackRequested(Tizen::Ui::Controls::Form& source)
 {
+       AppLogDebug("ENTER");
        if (CommonUtil::GetAddtoPlaylistState() == true)
        {
                SceneManager* pSceneManager = SceneManager::GetInstance();
                AppAssert(pSceneManager);
                pSceneManager->GoForward(ForwardSceneTransition(IDSCN_PLAYLIST_LIST,
-                                                        SCENE_TRANSITION_ANIMATION_TYPE_NONE,
-                                                        SCENE_HISTORY_OPTION_NO_HISTORY,
-                                                        SCENE_DESTROY_OPTION_DESTROY));
+                                                               SCENE_TRANSITION_ANIMATION_TYPE_NONE,
+                                                               SCENE_HISTORY_OPTION_NO_HISTORY,
+                                                               SCENE_DESTROY_OPTION_DESTROY));
                CommonUtil::SetAddtoPlaylistState(false);
        }
        else
        {
                Tizen::App::Application::GetInstance()->Terminate();
        }
+       AppLogDebug("EXIT");
 }
 
 void
 YearsListPanel::OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previousSceneId,
-                                                             const Tizen::Ui::Scenes::SceneId& currentSceneId,
-                                                             Tizen::Base::Collection::IList* pArgs)
+                                                               const Tizen::Ui::Scenes::SceneId& currentSceneId,
+                                                               Tizen::Base::Collection::IList* pArgs)
 {
+       AppLogDebug("ENTER");
        Form* pForm = dynamic_cast<Form*>(GetParent());
        AppAssert(pForm);
        pForm->SetFormBackEventListener(this);
@@ -198,7 +218,7 @@ YearsListPanel::OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previousScen
        UpdateContentList();
        if (__pPresentationModel != null)
        {
-               int totalYearCount = __pPresentationModel->GetTotalYearCount();
+               int totalYearCount = __pPresentationModel->GetAllYearCount();
                CommonUtil::SetButtonEnabled(*pForm, totalYearCount, IDA_FOOTER_BUTTON_ADD_TO_PLAYLIST);
 
                CommonUtil::ShowNoContentImage(totalYearCount, *__pContentTableView, *__pNoContentImageLabel, *__pNoContentTextLabel);
@@ -208,12 +228,14 @@ YearsListPanel::OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previousScen
                pArgs->RemoveAll(true);
                delete pArgs;
        }
+       AppLogDebug("EXIT");
 }
 
 void
 YearsListPanel::OnSceneDeactivated(const Tizen::Ui::Scenes::SceneId& currentSceneId,
-                                                              const Tizen::Ui::Scenes::SceneId& nextSceneId)
+                                                               const Tizen::Ui::Scenes::SceneId& nextSceneId)
 {
+       AppLogDebug("ENTER");
        Form* pForm = dynamic_cast<Form*>(GetParent());
        AppAssert(pForm);
 
@@ -221,106 +243,114 @@ YearsListPanel::OnSceneDeactivated(const Tizen::Ui::Scenes::SceneId& currentScen
        pFooter->RemoveAllButtons();
        pFooter->RemoveAllItems();
        pFooter->RemoveActionEventListener(*this);
+       CancelAllThumbnailRequest();
+       AppLogDebug("EXIT");
 }
 
 int
 YearsListPanel::GetItemCount(void)
 {
+       AppLogDebug("ENTER");
        if (__pPresentationModel == null)
        {
                return INIT_VALUE;
        }
-       return __pPresentationModel->GetTotalYearCount();
+       AppLogDebug("EXIT");
+       return __pPresentationModel->GetAllYearCount();
 }
 
 Tizen::Ui::Controls::TableViewItem*
 YearsListPanel::CreateItem(const int itemIndex, int itemWidth)
 {
-       ContentInformationStruct* pContentInfoStruct = __pPresentationModel->GetContentInfoN(itemIndex);
+       AppLogDebug("ENTER");
+       ContentInformation* pContentInfoStruct = __pPresentationModel->GetYearInfoN(itemIndex);
        if (pContentInfoStruct == null)
        {
                return null;
        }
 
-       TableViewItem* pItem = new (std::nothrow) TableViewItem;
+       TableViewItem* pItem = new (std::nothrow) TableViewItem();
        pItem->Construct(Dimension(itemWidth, ITEM_HEIGHT), TABLE_VIEW_ANNEX_STYLE_NORMAL);
        pItem->SetBackgroundColor(COLOR_ITEM);
 
        String strYear = Integer::ToString(pContentInfoStruct->ReleaseYear);
-       if(strYear.Equals(L"0", true))
+       if (strYear.Equals(L"0", true))
        {
                strYear = STRING_UNKNOWN;
        }
 
-       CommonUtil::CreateTableViewItem(*pItem, *(pContentInfoStruct->pThumbnail), strYear, __pPresentationModel->GetTotalContentCount(itemIndex));
+       RequestThumbnail(pContentInfoStruct->contentId, (new (std::nothrow) int(itemIndex)));
+       CommonUtil::CreateTableViewItem(*pItem, *GetDefaultThumbnail(), strYear, __pPresentationModel->GetContentCount(itemIndex));
        pItem->SetContextItem(__pContextItem);
 
-       //test_code_start
-       delete pContentInfoStruct->pThumbnail;
-       pContentInfoStruct->pThumbnail = null;
-
        delete pContentInfoStruct;
        pContentInfoStruct = null;
-       //test_code_end
 
+       AppLogDebug("EXIT");
        return pItem;
 }
 
 bool
 YearsListPanel::DeleteItem(const int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem)
 {
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
        return true;
 }
 
-void
-YearsListPanel::UpdateItem(int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem)
-{
-}
-
 int
 YearsListPanel::GetDefaultItemHeight(void)
 {
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
        return ITEM_HEIGHT;
 }
 
 void
 YearsListPanel::OnTableViewItemStateChanged(Tizen::Ui::Controls::TableView& tableView,
-                                            int itemIndex,
-                                            Tizen::Ui::Controls::TableViewItem* pItem,
-                                            Tizen::Ui::Controls::TableViewItemStatus status)
+                                                       int itemIndex,
+                                                       Tizen::Ui::Controls::TableViewItem* pItem,
+                                                       Tizen::Ui::Controls::TableViewItemStatus status)
 {
+       AppLogDebug("ENTER");
        SceneManager* pSceneManager = SceneManager::GetInstance();
        AppAssert(pSceneManager);
 
        if (status == TABLE_VIEW_ITEM_STATUS_SELECTED)
        {
-               pSceneManager->GoForward(ForwardSceneTransition(IDSCN_CONTENT_LIST), GetContentListN(itemIndex));
+               pSceneManager->GoForward(ForwardSceneTransition(IDSCN_YEAR_CONTENT_LIST), GetContentListN(itemIndex));
        }
+       AppLogDebug("EXIT");
 }
 
 void
 YearsListPanel::OnTableViewContextItemActivationStateChanged(Tizen::Ui::Controls::TableView& tableView,
-                                                             int itemIndex,
-                                                             Tizen::Ui::Controls::TableViewContextItem* pContextItem,
-                                                             bool activated)
+                                                                       int itemIndex,
+                                                                       Tizen::Ui::Controls::TableViewContextItem* pContextItem,
+                                                                       bool activated)
 {
+       AppLogDebug("ENTER");
        if (activated == true)
        {
                __itemIndex = itemIndex;
        }
+       AppLogDebug("EXIT");
 }
 
 void
 YearsListPanel::OnTableViewItemReordered(Tizen::Ui::Controls::TableView& tableView,
-                                         int itemIndexFrom,
-                                         int itemIndexTo)
+                                               int itemIndexFrom,
+                                               int itemIndexTo)
 {
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 
 Tizen::Base::Collection::ArrayList*
 YearsListPanel::GetContentListN(int itemIndex)
 {
-       ContentInformationStruct* pContentInfoStruct = __pPresentationModel->GetContentInfoN(itemIndex);
+       AppLogDebug("ENTER");
+       ContentInformation* pContentInfoStruct = __pPresentationModel->GetYearInfoN(itemIndex);
        if (pContentInfoStruct == null)
        {
                return null;
@@ -328,7 +358,7 @@ YearsListPanel::GetContentListN(int itemIndex)
 
        String SceneId = IDSCN_YEAR_LIST;
        String YearsName = Integer::ToString(pContentInfoStruct->ReleaseYear);;
-       if(YearsName.Equals(L"0", true))
+       if (YearsName.Equals(L"0", true))
        {
                YearsName = STRING_UNKNOWN;
        }
@@ -339,28 +369,25 @@ YearsListPanel::GetContentListN(int itemIndex)
        ArrayList* pRetList = new (std::nothrow) ArrayList();
        pRetList->Construct();
 
-       pRetList->Add(*(new String(SceneId)));
-       pRetList->Add(*(new String(YearsName)));
-
-       //test_code_start
-       delete pContentInfoStruct->pThumbnail;
-       pContentInfoStruct->pThumbnail = null;
+       pRetList->Add(*(new (std::nothrow) String(SceneId)));
+       pRetList->Add(*(new (std::nothrow) String(YearsName)));
+       pRetList->Add(*(new (std::nothrow) Integer(itemIndex)));
 
        delete pContentInfoStruct;
        pContentInfoStruct = null;
-       //test_code_end
 
+       AppLogDebug("EXIT");
        return pRetList;
 }
 
 void
 YearsListPanel::OnFastScrollIndexSelected(Tizen::Ui::Control& source, Tizen::Base::String& index)
 {
-       AppLogDebug("Start");
-       int totalCount = __pPresentationModel->GetTotalYearCount();
-       for(int iCount = 0; iCount < totalCount; iCount++)
+       AppLogDebug("ENTER");
+       int totalCount = __pPresentationModel->GetAllYearCount();
+       for (int iCount = 0; iCount < totalCount; iCount++)
        {
-               String* pName = __pPresentationModel->GetContentName(iCount);
+               String* pName = __pPresentationModel->GetYearName(iCount);
                String firstCharacter;
 
                pName->SubString(0, 1, firstCharacter);
@@ -371,12 +398,12 @@ YearsListPanel::OnFastScrollIndexSelected(Tizen::Ui::Control& source, Tizen::Bas
 
                if (Character::GetUnicodeCategory(language) == UNICODE_HANGUL)
                {
-                       Tizen::Base::String HangulIndex[] = {"ㄱ", "ㄲ", "ㄴ", "ㄷ", "ㄸ", "ㄹ", "ㅁ", "ㅂ", "ㅃ","ㅅ", "ㅆ", "ㅇ" , "ㅈ", "ㅉ", "ㅊ", "ㅋ", "ㅌ", "ㅍ", "ㅎ"        };
+                       Tizen::Base::String HangulIndex[] = {"ㄱ", "ㄲ", "ㄴ", "ㄷ", "ㄸ", "ㄹ", "ㅁ", "ㅂ", "ㅃ", "ㅅ", "ㅆ", "ㅇ" , "ㅈ", "ㅉ", "ㅊ", "ㅋ", "ㅌ", "ㅍ", "ㅎ"};
 
                        wchar_t songName;
                        pName->GetCharAt(0, songName);
 
-                       wchar_t UnicodeValue     = (songName - 0xAC00);
+                       wchar_t UnicodeValue = (songName - 0xAC00);
                        wchar_t InitialConsonant = ((UnicodeValue - (UnicodeValue % 28)) / 28) / 21;
                        int tempIndex = static_cast<int>(InitialConsonant);
 
@@ -397,20 +424,78 @@ YearsListPanel::OnFastScrollIndexSelected(Tizen::Ui::Control& source, Tizen::Bas
                        break;
                }
        }//end of for
+       AppLogDebug("EXIT");
 }
 
 void
 YearsListPanel::OnUpdateContentList(void)
 {
+       AppLogDebug("ENTER");
        UpdateContentList();
+       AppLogDebug("EXIT");
 }
 
 void
 YearsListPanel::UpdateContentList(void)
 {
+       AppLogDebug("ENTER");
        if (__pPresentationModel != null && __pContentTableView != null)
        {
-               __pPresentationModel->RefreshContent();
+               __pPresentationModel->UpdateYearList();
                __pContentTableView->UpdateTableView();
        }
+       AppLogDebug("EXIT");
 }
+
+void
+YearsListPanel::OnThumbnailInfoReveivedN(ThumbnailInfo* pThumbnailInfo)
+{
+       AppLogDebug("ENTER");
+       int itemIndex = 0;
+       void* pParam = null;
+       __pThumbnail = pThumbnailInfo->GetBitmapN();
+       pParam = pThumbnailInfo->GetUserParamN();
+       if (pParam)
+       {
+               itemIndex = *(static_cast<int*>(pParam));
+       }
+       __pContentTableView->RefreshItem(itemIndex, TABLE_VIEW_REFRESH_TYPE_ITEM_MODIFY);
+       delete pThumbnailInfo;
+       delete static_cast<int*>(pParam);
+       AppLogDebug("EXIT");
+}
+
+void
+YearsListPanel::OnUserEventReceivedN(RequestId requestId, Tizen::Base::Collection::IList* pArgs)
+{
+       AppLogDebug("ENTER");
+       AppLogDebug("OnUserEventReceivedN %d", requestId);
+       if (requestId == ID_DESTORY_PLAY_LIST_PICKER_POPUP)
+       {
+               if (__pPlayListPickerPopup != null)
+               {
+                       delete __pPlayListPickerPopup;
+                       __pPlayListPickerPopup = null;
+               }
+       }
+       AppLogDebug("EXIT");
+}
+
+void
+YearsListPanel::UpdateItem(int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem)
+{
+       AppLogDebug("ENTER");
+       Label* pThumbnailLabel = static_cast<Label*>(pItem->GetControl(L"pSongThumbnailLabel"));
+       if (__pThumbnail == null || pThumbnailLabel == null)
+       {
+               AppLogDebug("__pThumbnail or pThumbnailLabel is null");
+               delete __pThumbnail;
+               __pThumbnail = null;
+               return;
+       }
+       pThumbnailLabel->SetBackgroundBitmap(*__pThumbnail);
+       delete __pThumbnail;
+       __pThumbnail = null;
+       pThumbnailLabel->Invalidate(true);
+       AppLogDebug("EXIT");
+}
\ No newline at end of file
old mode 100755 (executable)
new mode 100644 (file)
index 84da4df..cb7056e
@@ -1,4 +1,4 @@
-//
+//
 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
 //
 // Licensed under the Flora License, Version 1.0 (the License);
 // limitations under the License.
 //
 
+/**
+ * @file               MpYearListPresentationModel.cpp
+ * @brief              This is the implementation file for YearListPresentationModel class.
+ */
+
 #include "MpYearListPresentationModel.h"
 
 using namespace Tizen::Base;
 using namespace Tizen::Base::Collection;
+using namespace Tizen::Content;
 using namespace Tizen::Graphics;
-using namespace Tizen::Ui::Controls;
 using namespace Tizen::Social;
-using namespace Tizen::Content;
+using namespace Tizen::Ui::Controls;
 
 YearListPresentationModel* YearListPresentationModel::pYearListPresentationModelInstance = null;
 
 YearListPresentationModel*
 YearListPresentationModel::GetInstance(void)
 {
-       //AppLogDebug("GetInstance");
+       AppLogDebug("ENTER");
        if (pYearListPresentationModelInstance == null)
        {
                pYearListPresentationModelInstance = new (std::nothrow) YearListPresentationModel();
@@ -37,6 +42,7 @@ YearListPresentationModel::GetInstance(void)
                result r = pYearListPresentationModelInstance->Construct();
                TryCatch(r == E_SUCCESS, , null, "YearListPresentationModel instance is not constrcuted.");
        }
+       AppLogDebug("EXIT");
        return pYearListPresentationModelInstance;
 
 CATCH:
@@ -45,186 +51,245 @@ CATCH:
 }
 
 int
-YearListPresentationModel::GetTotalContentCount(int index)
+YearListPresentationModel::GetContentCount(int yearIndex)
 {
+       AppLogDebug("ENTER");
+       int totalCount = INIT_VALUE;
+
        if (__pYearList == null)
        {
-               return 0;
+               return INIT_VALUE;
        }
 
-       String WhereExpr = null;
-       WhereExpr  = CommonUtil::SpecialReplaceChange(*(static_cast<String*>(__pYearList->GetAt(index))));
-       WhereExpr  = CommonUtil::MakeQuery(STRING_SORT_YEAR, WhereExpr);
-
-       IList* pSearchList = CommonUtil::SearchContentList(WhereExpr, STRING_SORT_YEAR);
-       if (pSearchList == null)
+       if ((__pContentList != null) && (__currentYearIndex == yearIndex))
        {
-               return 0;
+               totalCount = __pContentList->GetCount();
        }
-
-       int totalCount = pSearchList->GetCount();
-
-       pSearchList->RemoveAll(true);
-       delete pSearchList;
-       pSearchList = null;
-
+       else
+       {
+               IList* pContentSearchResultList = CommonUtil::ContentSearchResultListN(
+                                                                                       *(static_cast<String*>(__pYearList->GetAt(yearIndex))), STRING_SORT_YEAR, STRING_SORT_YEAR);
+               if (pContentSearchResultList == null)
+               {
+                       AppLogDebug("CommonUtil::ContentSearchResultListN() failed");
+                       return INIT_VALUE;
+               }
+
+               totalCount = pContentSearchResultList->GetCount();
+
+               pContentSearchResultList->RemoveAll(true);
+               delete pContentSearchResultList;
+       }
+       AppLogDebug("EXIT");
        return totalCount;
 }
 
 int
-YearListPresentationModel::GetTotalYearCount(void)
+YearListPresentationModel::GetAllYearCount(void)
 {
-       //AppLogDebug("GetCount");
+       AppLogDebug("ENTER");
        if (__pYearList == null)
        {
-               return 0;
+               return INIT_VALUE;
        }
+       AppLogDebug("EXIT");
        return __pYearList->GetCount();
 }
 
 YearListPresentationModel::YearListPresentationModel(void)
-: __pYearList(null)
-, __pSongList(null)
+       : __pYearList(null)
+       , __pContentList(null)
+       , __currentYearIndex(-1)
 {
-       //AppLogDebug("YearListPresentationModel");
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 
 YearListPresentationModel::~YearListPresentationModel(void)
 {
-       //AppLogDebug("~YearListPresentationModel");
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 
 result
 YearListPresentationModel::Construct(void)
 {
-       //AppLogDebug("Construct");
-
-       result r = E_SUCCESS;
+       AppLogDebug("ENTER");
+/*
+       if (__pYearList != null)
+       {
+               __pYearList->RemoveAll(true);
+               delete __pYearList;
+       }
 
        __pYearList = CommonUtil::SearchContentList(STRING_SORT_YEAR);
-
-       return r;
+*/
+       AppLogDebug("EXIT");
+       return E_SUCCESS;
 }
 
-ContentInformationStruct*
-YearListPresentationModel::GetContentInfoN(int index)
+ContentInformation*
+YearListPresentationModel::GetYearInfoN(int yearIndex)
 {
-       //AppLogDebug("GetContentInfoN - Start");
-       String WhereExpr = null;
-       WhereExpr = CommonUtil::SpecialReplaceChange(*(static_cast<String*>(__pYearList->GetAt(index))));
-       WhereExpr = CommonUtil::MakeQuery(STRING_SORT_YEAR, WhereExpr);
-       IList* pSearchList = CommonUtil::SearchContentList(WhereExpr, STRING_SORT_YEAR);
-
-       if (pSearchList == null)
+       AppLogDebug("ENTER");
+       IList* pContentSearchResultList = CommonUtil::ContentSearchResultListN(
+                                                                               *(static_cast<String*>(__pYearList->GetAt(yearIndex))), STRING_SORT_YEAR, STRING_SORT_YEAR);
+       if (pContentSearchResultList == null)
        {
+               AppLogDebug("CommonUtil::ContentSearchResultListN() failed");
                return null;
        }
 
-       ContentInformationStruct* pContentInfoStruct = null;
-       ContentSearchResult* pResult = static_cast<ContentSearchResult*>(pSearchList->GetAt(INIT_VALUE));
-       if(pResult!= null && pResult->GetContentType() == CONTENT_TYPE_AUDIO)
+       ContentInformation* pContentInformation = null;
+       ContentSearchResult* pResult = static_cast<ContentSearchResult*>(pContentSearchResultList->GetAt(INIT_VALUE));
+       if (pResult!= null && pResult->GetContentType() == CONTENT_TYPE_AUDIO)
        {
-               AudioContentInfo* pAudioContentInfo = static_cast<AudioContentInfo*>(pResult->GetContentInfo());
-               pContentInfoStruct = CommonUtil::GetContentInformationStructN(*pAudioContentInfo);
+               pContentInformation = CommonUtil::GetContentInformationN(*static_cast<AudioContentInfo*>(pResult->GetContentInfo()));
        }
 
-       pSearchList->RemoveAll(true);
-       delete pSearchList;
-       pSearchList = null;
+       pContentSearchResultList->RemoveAll(true);
+       delete pContentSearchResultList;
 
-       return pContentInfoStruct;
+       AppLogDebug("EXIT");
+       return pContentInformation;
 }
 
 Tizen::Base::String*
-YearListPresentationModel::GetContentName(int index)
+YearListPresentationModel::GetYearName(int yearIndex)
 {
+       AppLogDebug("ENTER");
        if (__pYearList == null)
        {
                return null;
        }
-       return static_cast<String*>(__pYearList->GetAt(index));
+       AppLogDebug("EXIT");
+       return static_cast<String*>(__pYearList->GetAt(yearIndex));
 }
 
 void
-YearListPresentationModel::RefreshContent(void)
+YearListPresentationModel::InitializeContentList(int yearIndex)
 {
-       if (__pYearList != null)
+       AppLogDebug("ENTER");
+       if (__pContentList != null)
        {
-               __pYearList->RemoveAll(true);
-               __pYearList = CommonUtil::SearchContentList(STRING_SORT_YEAR);
-               //AppLogDebug("GenreListPresentationModel : %d", __pYearList->GetCount());
+               __pContentList->RemoveAll(true);
+               delete __pContentList;
        }
+
+       __pContentList = CommonUtil::ContentSearchResultListN(
+                                                                               *(static_cast<String*>(__pYearList->GetAt(yearIndex))), STRING_SORT_YEAR, STRING_SORT_TITLE);
+       __currentYearIndex = yearIndex;
+       AppLogDebug("EXIT");
 }
 
-void
-YearListPresentationModel::SearchSong(int index)
+ContentInformation*
+YearListPresentationModel::GetContentInfoN(int contentIndex)
 {
-       if (__pSongList != null)
+       AppLogDebug("ENTER");
+       ContentSearchResult* pResult = static_cast<ContentSearchResult*>(__pContentList->GetAt(contentIndex));
+       ContentInformation* pContentInformation = null;
+       if (pResult != null && pResult->GetContentType() == CONTENT_TYPE_AUDIO)
        {
-               __pSongList->RemoveAll(true);
+               pContentInformation = CommonUtil::GetContentInformationN(*static_cast<AudioContentInfo*>(pResult->GetContentInfo()));
        }
 
-       String WhereExpr = null;
-       WhereExpr = CommonUtil::SpecialReplaceChange(*(static_cast<String*>(__pYearList->GetAt(index))));
-       WhereExpr = CommonUtil::MakeQuery(STRING_SORT_YEAR, WhereExpr);
-       __pSongList = CommonUtil::SearchContentList(WhereExpr, STRING_SORT_TITLE);
+       AppLogDebug("EXIT");
+       return pContentInformation;
 }
 
-int
-YearListPresentationModel::GetSongContentCount(void)
+Tizen::Base::Collection::ArrayList*
+YearListPresentationModel::GetContentPathListN(int yearIndex)
 {
-       if (__pSongList == null)
+       AppLogDebug("ENTER");
+       IList* pContentSearchResultList = CommonUtil::ContentSearchResultListN(
+                                                                               *(static_cast<String*>(__pYearList->GetAt(yearIndex))), STRING_SORT_YEAR, STRING_SORT_TITLE);
+       if (pContentSearchResultList == null)
        {
-               return INIT_VALUE;
+               AppLogDebug("CommonUtil::ContentSearchResultListN() failed");
+               return null;
        }
-       return __pSongList->GetCount();
+
+       ArrayList* pContentPath = new (std::nothrow) ArrayList();
+       pContentPath->Construct();
+
+       int totalCount = pContentSearchResultList->GetCount();
+       for (int iCount = 0; iCount < totalCount; iCount++)
+       {
+               ContentSearchResult* pResult = static_cast<ContentSearchResult*>(pContentSearchResultList->GetAt(iCount));
+               pContentPath->Add(*(new (std::nothrow) String(pResult->GetContentInfo()->GetContentPath())));
+       }
+
+       pContentSearchResultList->RemoveAll(true);
+       delete pContentSearchResultList;
+
+       AppLogDebug("EXIT");
+       return pContentPath;
 }
 
-ContentInformationStruct*
-YearListPresentationModel::GetSongContentInfoN(int index)
+void
+YearListPresentationModel::RefreshContentList(int yearIndex)
 {
-       ContentSearchResult* pResult = static_cast<ContentSearchResult*>(__pSongList->GetAt(index));
-       ContentInformationStruct* pContentInfoStruct = null;
-       if (pResult != null && pResult->GetContentType() == CONTENT_TYPE_AUDIO)
+       AppLogDebug("ENTER");
+       if (__pContentList != null)
+       {
+               __pContentList->RemoveAll(true);
+               delete __pContentList;
+       }
+
+       __pContentList = CommonUtil::ContentSearchResultListN(
+                                                                               *(static_cast<String*>(__pYearList->GetAt(yearIndex))), STRING_SORT_YEAR, STRING_SORT_TITLE);
+       if (__pContentList != null && __pContentList->GetCount() == INIT_VALUE)
        {
-               AudioContentInfo* pAudioContentInfo = static_cast<AudioContentInfo*>(pResult->GetContentInfo());
-               pContentInfoStruct = CommonUtil::GetContentInformationStructN(*pAudioContentInfo);
+               __pContentList->RemoveAll(true);
+               delete __pContentList;
+               __pContentList = null;
        }
 
-       return pContentInfoStruct;
+       __currentYearIndex = yearIndex;
+       AppLogDebug("EXIT");
 }
 
-Tizen::Base::Collection::ArrayList*
-YearListPresentationModel::SearchContentItemN(int index)
+int
+YearListPresentationModel::GetCurrentYearIndex(void)
 {
-       AppLogDebug("Start");
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
+       return __currentYearIndex;
+}
 
-       String WhereExpr = null;
-       WhereExpr = CommonUtil::SpecialReplaceChange(*(static_cast<String*>(__pYearList->GetAt(index))));
-       WhereExpr = CommonUtil::MakeQuery(STRING_SORT_YEAR, WhereExpr);
+void
+YearListPresentationModel::AddContent(Tizen::Base::String path, int playlistIndex)
+{
+       AppLogDebug("ENTER");
+       ContentInformation* pContentInfoStruct = GetContentInfoN(playlistIndex);
+       PlayList* pPlayList = PlayListManager::GetInstance()->GetPlayListN(path);
+       pPlayList->AddItem(pContentInfoStruct->contentId);
 
-       IList* pSearchList = CommonUtil::SearchContentList(WhereExpr, STRING_SORT_TITLE);
-       if (pSearchList == null)
-       {
-               return null;
-       }
+       delete pContentInfoStruct;
+       pContentInfoStruct = null;
 
-       ArrayList* pContentPath = new (std::nothrow) ArrayList();
-       pContentPath->Construct();
+       delete pPlayList;
+       pPlayList = null;
+       AppLogDebug("EXIT");
+}
 
-       ContentSearchResult* pResult;
-       int totalCount = pSearchList->GetCount();
-       for(int iCount = 0; iCount < totalCount; iCount++)
+result
+YearListPresentationModel::UpdateYearList(void)
+{
+       AppLogDebug("ENTER");
+       result r = E_SUCCESS;
+
+       if (__pYearList != null)
        {
-               pResult = static_cast<ContentSearchResult*>(pSearchList->GetAt(iCount));
-               pContentPath->Add(*(new (std::nothrow) String(pResult->GetContentInfo()->GetContentPath())));
+               __pYearList->RemoveAll(true);
+               delete __pYearList;
        }
 
-       pSearchList->RemoveAll(true);
-       delete pSearchList;
-       pSearchList = null;
-
-       AppLogDebug("End");
+       __pYearList = CommonUtil::SearchContentList(STRING_SORT_YEAR);
+       TryCatch(__pYearList != null, r = E_FAILURE, "__pYearList is null");
+       AppLogDebug("EXIT");
+       return r;
 
-       return pContentPath;
-}
+CATCH:
+       return r;
+}
\ No newline at end of file
old mode 100755 (executable)
new mode 100644 (file)
index eaf588c..9f0de37
@@ -1,4 +1,4 @@
-//
+//
 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
 //
 // Licensed under the Flora License, Version 1.0 (the License);
 // limitations under the License.
 //
 
+/**
+ * @file               MpYearPickerPanel.cpp
+ * @brief              This is the implementation file for YearPickerPanel class.
+ */
+
 #include "MpYearPickerPanel.h"
 #include "MpNowPlayContentPanel.h"
 
@@ -21,28 +26,29 @@ using namespace Tizen::Base;
 using namespace Tizen::Base::Collection;
 using namespace Tizen::Content;
 using namespace Tizen::Graphics;
+using namespace Tizen::Social;
 using namespace Tizen::Ui;
 using namespace Tizen::Ui::Controls;
 using namespace Tizen::Ui::Scenes;
-using namespace Tizen::Social;
 
 YearPickerPanel::YearPickerPanel(void)
 {
-       //AppLogDebug("YearPickerPanel");
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 
 YearPickerPanel::~YearPickerPanel(void)
 {
-       //AppLogDebug("~YearPickerPanel");
+       AppLogDebug("ENTER");
+       AppLogDebug("EXIT");
 }
 
 void
 YearPickerPanel::OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previousSceneId,
-                                   const Tizen::Ui::Scenes::SceneId& currentSceneId,
-                                   Tizen::Base::Collection::IList* pArgs)
+                                       const Tizen::Ui::Scenes::SceneId& currentSceneId,
+                                       Tizen::Base::Collection::IList* pArgs)
 {
-       //AppLogDebug("OnSceneActivatedN");
-
+       AppLogDebug("ENTER");
        Form* pForm = dynamic_cast<Form*>(GetParent());
        AppAssert(pForm);
 
@@ -51,10 +57,10 @@ YearPickerPanel::OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previousSce
 
        SceneManager* pSceneManager = SceneManager::GetInstance();
        AppAssert(pSceneManager);
-
+       __pPresentationModel->UpdateYearList();
        if (__pPresentationModel != null)
        {
-               CommonUtil::ShowNoContentImage(__pPresentationModel->GetTotalYearCount(), *__pContentTableView, *__pNoContentImageLabel, *__pNoContentTextLabel);
+               CommonUtil::ShowNoContentImage(__pPresentationModel->GetAllYearCount(), *__pContentTableView, *__pNoContentImageLabel, *__pNoContentTextLabel);
        }
 
        if (pSceneManager->IsSceneAlive(IDSCN_PLAYER))
@@ -73,35 +79,37 @@ YearPickerPanel::OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previousSce
                pArgs->RemoveAll(true);
                delete pArgs;
        }
+       AppLogDebug("EXIT");
 }
 
 void
 YearPickerPanel::OnSceneDeactivated(const Tizen::Ui::Scenes::SceneId& currentSceneId,
-                                    const Tizen::Ui::Scenes::SceneId& nextSceneId)
+                                               const Tizen::Ui::Scenes::SceneId& nextSceneId)
 {
-       //AppLogDebug("OnSceneDeactivated");
-
+       AppLogDebug("ENTER");
        Form* pForm = dynamic_cast<Form*>(GetParent());
        AppAssert(pForm);
 
        Footer* pFooter = pForm->GetFooter();
        pFooter->RemoveAllButtons();
        pFooter->RemoveAllItems();
+       AppLogDebug("EXIT");
 }
 
 void
 YearPickerPanel::OnTableViewItemStateChanged(Tizen::Ui::Controls::TableView& tableView,
-                                             int itemIndex,
-                                             Tizen::Ui::Controls::TableViewItem* pItem,
-                                             Tizen::Ui::Controls::TableViewItemStatus status)
+                                                       int itemIndex,
+                                                       Tizen::Ui::Controls::TableViewItem* pItem,
+                                                       Tizen::Ui::Controls::TableViewItemStatus status)
 {
-       //AppLogDebug("OnTableViewItemStateChanged");
+       AppLogDebug("ENTER");
        SceneManager* pSceneManager = SceneManager::GetInstance();
        AppAssert(pSceneManager);
 
        if (status == TABLE_VIEW_ITEM_STATUS_SELECTED)
        {
-               __pPresentationModel->SearchSong(itemIndex);
+               __pPresentationModel->InitializeContentList(itemIndex);
                pSceneManager->GoForward(ForwardSceneTransition(IDSCN_YEAR_CONTENT_PICKER));
        }
-}
+       AppLogDebug("EXIT");
+}
\ No newline at end of file