-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMusicPlayer.h
92 lines (53 loc) · 1.49 KB
/
MusicPlayer.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
#ifndef MUSIC_PLAYER_H
#define MUSIC_PLAYER_H
#include "MusicPlayerInternal.h"
typedef struct _SongList SongList;
typedef char* SongName;
/**
* Gets file path to a file listing song paths
* File synthax: Each song on a new line containing nothing but its path
* Return value: a song list or NULL in case of failure
*/
SongList* newSongList(char* song_list_file_name);
/**
* Gets song list and plays next song
* Return value: 1 for found and played, 0 for end of song list or error
*/
uint32_t playNextSong(SongList* lst);
/**
* Gets song list and plays previous song
* Return value: 1 for found and played, 0 for start of song list or error
*/
uint32_t playPreviousSong(SongList* lst);
/**
* Gets song list and shuffles order
* Return value: 1 for success, 0 for error
*/
uint32_t shuffle(SongList* lst);
/**
* Goes to random song without changing song order
* Return value: 1 for success, 0 for error
*/
uint32_t getRandom(SongList* lst);
/**
* Gets song list and song name and return if song was found in list
*/
uint32_t isSongInList(SongList* lst, SongName song);
/**
* Gets song list and orders it by alphabetical order
* Return value: 1 for success, 0 for error
*/
uint32_t orderSongListByABC(SongList* lst);
/**
* Gets song list and frees it and all its values
*/
void freeSongList(SongList* lst);
/**
* Gets song list and starts playing
*/
uint32_t startPlaying(SongList* lst);
/**
* Gets song list and prints it out
*/
void printSongList(SongList* lst);
#endif //! MUSIC_PLAYER_H