2 * Copyright (c) 2014 Samsung Electronics Co., Ltd All Rights Reserved
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 #ifndef __PLAYLIST_MGR_H__
18 #define __PLAYLIST_MGR_H__
33 virtual ~CPlaylist() {}
34 bool FlagCreate(void) { return !!m; }
36 bool Create(Eina_List *songlist);
37 virtual void Destroy(void);
39 bool Update(Eina_List *songlist, int addmode);
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);
54 struct playlist *playlist_create(Eina_List *songlist);
55 struct playlist *playlist_update(struct playlist *plist, Eina_List *songlist,
57 void playlist_destroy(struct playlist *plist);
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);
73 #endif /*__PLAYLIST_MGR_H__*/