2 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
4 // Licensed under the Flora License, Version 1.1 (the License);
5 // you may not use this file except in compliance with the License.
6 // You may obtain a copy of the License at
8 // http://floralicense.org/license/
10 // Unless required by applicable law or agreed to in writing, software
11 // distributed under the License is distributed on an AS IS BASIS,
12 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 // See the License for the specific language governing permissions and
14 // limitations under the License.
18 * @file MpMusicPlayerApp.h
19 * @brief This is the header file for MusicPlayerApp class.
22 #ifndef _MP_MUSIC_PLAYER_APP_H_
23 #define _MP_MUSIC_PLAYER_APP_H_
31 #include <FUiScenes.h>
32 #include "MpMainFrame.h"
35 : public Tizen::App::UiApp
36 , public Tizen::App::IAppControlProviderEventListener
37 , public Tizen::Base::Runtime::ITimerEventListener
38 , public Tizen::Content::IContentUpdateEventListener
39 , public Tizen::System::IScreenEventListener
40 , public Tizen::System::ISettingEventListener
43 static Tizen::App::UiApp* CreateInstance(void);
47 virtual~MusicPlayerApp(void);
49 bool OnAppInitializing(Tizen::App::AppRegistry& appRegistry);
50 bool OnAppInitialized(void);
51 bool OnAppWillTerminate(void);
52 bool OnAppTerminating(Tizen::App::AppRegistry& appRegistry, bool forcedTermination = false);
53 void OnForeground(void);
54 void OnBackground(void);
55 void OnLowMemory(void);
56 void OnBatteryLevelChanged(Tizen::System::BatteryLevel batteryLevel);
57 void OnScreenOn(void);
58 void OnScreenOff(void);
60 Tizen::Base::String GetOperationId(void);
61 RequestId GetRequestId(void);
62 void ResetRequestId(void);
64 virtual void OnAppControlRequestReceived(RequestId reqId, const Tizen::Base::String& operationId, const Tizen::Base::String* pUriData,
65 const Tizen::Base::String* pMimeType, const Tizen::Base::Collection::IMap* pExtraData);
67 virtual void OnSettingChanged(Tizen::Base::String& key);
69 virtual void OnContentFileCreated(Tizen::Content::ContentId contentId, Tizen::Content::ContentType contentType, result r);
70 virtual void OnContentFileUpdated(Tizen::Content::ContentId contentId, Tizen::Content::ContentType contentType, result r);
71 virtual void OnContentFileDeleted(Tizen::Content::ContentId contentId, Tizen::Content::ContentType contentType, result r);
72 virtual void OnContentDirectoryScanCompleted(const Tizen::Base::String& directoryPath, result r);
74 virtual void OnTimerExpired(Tizen::Base::Runtime::Timer& timer);
77 void ParsingArgument(const Tizen::Base::String* pUriData, const Tizen::Base::Collection::IMap* pArgs);
78 void ReStartContentUpdateTimer(void);
79 void CallOnMusicContentUpdateCompleted(void);
81 void ShowContentUpdateInProgressPopup(void);
82 void HideContentUpdateInProgressPopup(void);
85 RequestId __requestId;
86 Tizen::Base::String __operationId;
87 Tizen::Ui::Scenes::SceneId __sceneId;
88 Tizen::Base::Collection::ArrayList* __pDataList;
90 MainFrame* __pMainFrame;
92 Tizen::Content::ContentManager* __pContentManager;
93 Tizen::Base::Runtime::Timer* __pContentUpdateCompleteTimer;
94 Tizen::Ui::Controls::Popup* __pContentUpdateInProgressPopup;
97 #endif // _MP_MUSIC_PLAYER_APP_H_