2 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
4 // Licensed under the Apache License, Version 2.0 (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://www.apache.org/licenses/LICENSE-2.0
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.
17 * @file FCntPlayListManager.h
18 * @brief This is the header file for the %PlayListManager class.
20 * This header file contains the declarations of the %PlayListManager class.
23 #ifndef _FCNT_CONTENT_PLAYLIST_MANAGER_H_
24 #define _FCNT_CONTENT_PLAYLIST_MANAGER_H_
26 #include <FBaseString.h>
27 #include <FCntTypes.h>
29 namespace Tizen { namespace Base { namespace Collection
34 namespace Tizen { namespace Content
38 class _PlayListManagerImpl;
41 * @class PlayListManager
42 * @brief This class provides methods to manage the playlist.
46 * @final This class is not intended for extension.
48 * The %PlayListManager class provides methods to manage the playlist.
49 * The methods of this class help to immediately access the database and update it.
51 * The following example demonstrates how to use the %PlayListManager class.
55 * #include <FContent.h>
57 * using namespace Tizen::Content;
62 * PlayListManager* pManager = PlayListManager::GetInstance();
64 * Tizen::Base::Collection::IList* pList = pManager->GetAllPlayListNameN();
65 * result r = GetLastResult();
67 * pList->RemoveAll(true);
72 class _OSP_EXPORT_ PlayListManager
73 : public Tizen::Base::Object
83 * @return A pointer to the PlayList instance
84 * @param[in] playListName The playlist name
85 * @exception E_SUCCESS The method is successful.
86 * @exception E_INVALID_ARG The specified input parameter is invalid.
87 * @exception E_OUT_OF_MEMORY The memory is insufficient.
88 * @exception E_SERVICE_BUSY The database is busy.
89 * @exception E_DATABASE The method cannot access the database.
90 * @remarks The specific error code can be accessed using the GetLastResult() method.
92 PlayList* GetPlayListN(const Tizen::Base::String& playListName) const;
95 * Removes the playlist.
99 * @return An error code
100 * @param[in] playListName The playlist name
101 * @exception E_SUCCESS The method is successful.
102 * @exception E_INVALID_ARG The specified input parameter is invalid.
103 * @exception E_SERVICE_BUSY The database is busy.
104 * @exception E_DATABASE The method cannot access the database.
106 result RemovePlayList(const Tizen::Base::String& playListName);
109 * Gets the count of all the playlists.
113 * @return The count of all the playlists
114 * @exception E_SUCCESS The method is successful.
115 * @exception E_SERVICE_BUSY The database is busy.
116 * @exception E_DATABASE The method cannot access the database.
117 * @remarks The specific error code can be accessed using the GetLastResult() method.
119 int GetAllPlayListCount(void) const;
122 * Gets all the playlist names.
126 * @return The list that contains the playlist names as Tizen::Base::String
127 * @exception E_SUCCESS The method is successful.
128 * @exception E_OUT_OF_MEMORY The memory is insufficient.
129 * @exception E_SERVICE_BUSY The database is busy.
130 * @exception E_DATABASE The method cannot access the database.
131 * @remarks The specific error code can be accessed using the GetLastResult() method.
133 Tizen::Base::Collection::IList* GetAllPlayListNameN(void) const;
136 * Gets the playlist manager instance.
140 * @return A pointer to the %PlayListManager instance
141 * @exception E_SUCCESS The method is successful.
142 * @exception E_OUT_OF_MEMORY The memory is insufficient.
143 * @remarks The specific error code can be accessed using the GetLastResult() method.
145 static PlayListManager* GetInstance(void);
149 static PlayListManager* __pPlayListManager;
152 * This default constructor is intentionally declared as private to implement the Singleton semantic.
154 PlayListManager(void);
157 * This destructor is intentionally declared as private to implement the Singleton semantic.
159 virtual ~PlayListManager(void);
162 * This constructor is intentionally declared as private so that only the platform can create an instance.
164 result Construct(void);
167 * The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying of objects.
169 PlayListManager(const PlayListManager& rhs);
172 * The implementation of this copy assignment operator is intentionally blank and declared as private to prohibit copying of objects.
174 PlayListManager & operator =(const PlayListManager& rhs);
176 friend class _PlayListManagerImpl;
177 _PlayListManagerImpl* __pImpl;
179 static void InitSingleton(void);
180 static void DestroySingleton(void);
182 }; // class PlayListManager
186 #endif // _FCNT_CONTENT_PLAYLIST_MANAGER_H_