Go to the source code of this file.
Defines | |
#define | FAVLIST_MAGIC "FL1" |
#define | FAVLIST_SECTOR 16 |
Functions | |
static void | FavListClear (void) |
Clear favorites list. | |
int | FavListSet (int idx, CONST char *name, CONST char *uri) |
Set favorite list entry. | |
int | FavListCopy (int src, int dst) |
Copy a favorites list entry. | |
int | FavListSearch (int idx, int dir) |
Search favorite radio station. | |
size_t | FavListSize (void) |
Calculate total size of the favorites list. | |
int | FavListSave (void) |
Save favorites list in non-volatile memory. | |
int | FavListLoad (void) |
Load favorites list from non-volatile memory. | |
void | FavListResetFactory (void) |
Set pre-configured favorites list. | |
Variables | |
RADIOSTATION | favlist [MAX_FAVORITES] |
#define FAVLIST_MAGIC "FL1" |
#define FAVLIST_SECTOR 16 |
static void FavListClear | ( | void | ) | [static] |
Clear favorites list.
Will be called by FavListLoad() before loading a new list.
Definition at line 91 of file favlist.c.
References MAX_FAVORITES, and RADIOSTATION::rs_streams.
Referenced by FavListLoad(), and FavListResetFactory().
int FavListSet | ( | int | idx, | |
CONST char * | name, | |||
CONST char * | uri | |||
) |
Set favorite list entry.
idx | Index of the entry. Use MAX_FAVORITES to add a new entry. | |
name | Name of the station. Must be provided, if a new station is added. May be NULL when adding a URI. When used with an existing entry, the current name will be replaced. | |
uri | URI of the stream, that will be added. If NULL, then all existing entries are cleared. If both, the name and the URI are NULL, then the list entry is cleared. |
Definition at line 123 of file favlist.c.
Referenced by AddStationUris(), CgiFavoritesControl(), FavListResetFactory(), main(), and ShoutCastAddStation().
int FavListCopy | ( | int | src, | |
int | dst | |||
) |
Copy a favorites list entry.
src | Index of the source entry. | |
dst | Index of the destination entry. |
Definition at line 178 of file favlist.c.
Referenced by CgiFavoritesControl(), FavListResetFactory(), main(), and UserIfMainMenu().
int FavListSearch | ( | int | idx, | |
int | dir | |||
) |
Search favorite radio station.
idx | Start index. | |
dir | Direction to search, 1 (forward) or -1 (backwards). |
Definition at line 219 of file favlist.c.
Referenced by UserIfMainMenu().
size_t FavListSize | ( | void | ) |
int FavListSave | ( | void | ) |
Save favorites list in non-volatile memory.
Definition at line 275 of file favlist.c.
Referenced by CgiSettings(), and main().
int FavListLoad | ( | void | ) |
void FavListResetFactory | ( | void | ) |
Set pre-configured favorites list.
Definition at line 356 of file favlist.c.
Referenced by CgiSettings(), and main().
RADIOSTATION favlist[MAX_FAVORITES] |
Definition at line 84 of file favlist.c.
Referenced by CgiStationFavorites(), ConfigSize(), main(), UserIfMainMenu(), and UserIfShowStatus().