Apply IActivatedListener for gengrid / genlist.
[profile/tv/apps/native/musicplayer.git] / include / playlist-mgr.h
1 /*
2  * Copyright (c) 2014 Samsung Electronics Co., Ltd All Rights Reserved
3  *
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
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
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.
15  */
16
17 #ifndef __PLAYLIST_MGR_H__
18 #define __PLAYLIST_MGR_H__
19
20
21 #include <Eina.h>
22
23
24 struct SSongInfo;
25
26
27 class CPlaylist {
28 private:
29         struct SPlaylist* m;
30
31 public:
32         CPlaylist() : m(0) {}
33         virtual ~CPlaylist() {}
34         bool FlagCreate(void) { return !!m; }
35
36         bool Create(Eina_List *songlist);
37         virtual void Destroy(void);
38
39         bool Update(Eina_List *songlist, int addmode);
40
41         const char *SongpathFromIndex(int index);
42         bool GetSonginfoFromIndex(int index, CSongInfo **const csinfo);
43         bool GetTotalSongs(int *total_songs);
44         bool GetCurSongIndex(int *index);
45         bool SetCurSongIndex(int index);
46         bool LoadNextSong(int shufstate);
47         bool LoadPreviousSong(int shufstate);
48         bool RemoveSong(CSongInfo *sinfo, int index, int shufstate);
49         bool UpdateShuffle(void);
50         bool SetCurrentSong(char *mediaid);
51 };
52
53 /*
54 struct playlist *playlist_create(Eina_List *songlist);
55 struct playlist *playlist_update(struct playlist *plist, Eina_List *songlist,
56                 int addmode);
57 void playlist_destroy(struct playlist *plist);
58
59 const char *playlist_get_songpath_from_index(struct playlist *plist, int index);
60 int playlist_get_songinfo_from_index(struct playlist *plist, int index,
61                 struct SSongInfo **const csinfo);
62 int playlist_get_total_songs(struct playlist *plist, int *total_songs);
63 int playlist_get_cur_song_index(struct playlist *plist, int *index);
64 int playlist_set_cur_song_index(struct playlist *plist, int index);
65 int playlist_load_next_song(struct playlist *plist, int shufstate);
66 int playlist_load_previous_song(struct playlist *plist, int shufstate);
67 int playlist_remove_song(struct playlist *plist, struct SSongInfo *sinfo,
68                 int index, int shufstate);
69 void playlist_update_shuffle(struct playlist *plist);
70 int playlist_set_current_song(struct playlist *plist, char *mediaid);
71 */
72
73 #endif /*__PLAYLIST_MGR_H__*/