* * $Id$ * *
Definiert in Datei favlist.h.
gehe zum Quellcode dieser Datei
Makrodefinitionen | |
#define | MAX_FAVORITES 128 |
#define | TOP_FAVORITE 0 |
#define | LAST_FAVORITE 1 |
Funktionen | |
int | FavListSet (int idx, CONST char *symbol, 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. | |
Variablen | |
RADIOSTATION | favlist [MAX_FAVORITES] |
#define MAX_FAVORITES 128 |
Definiert in Zeile 52 der Datei favlist.h.
Wird benutzt von CgiFavoritesControl(), CgiShoutCastControl(), CgiStationFavorites(), ConfigSize(), FavListClear(), FavListLoad(), FavListResetFactory(), FavListSave(), FavListSearch(), FavListSet() und FavListSize().
#define TOP_FAVORITE 0 |
Definiert in Zeile 58 der Datei favlist.h.
Wird benutzt von CgiFavoritesControl(), CgiShoutCastControl(), main() und UserIfMainMenu().
#define LAST_FAVORITE 1 |
Definiert in Zeile 59 der Datei favlist.h.
Wird benutzt von CgiStationFavorites(), FavListLoad(), FavListResetFactory(), FavListSave(), FavListSearch(), FavListSet(), main() und UserIfShowStatus().
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. |
Definiert in Zeile 123 der Datei favlist.c.
Benutzt LAST_FAVORITE, LOG_CONFIG, LogMsg(), MAX_FAVORITES, MAXNUM_STREAMS, RADIOSTATION::rs_name, RADIOSTATION::rs_streams, RADIOSTATION::rs_uri und strdup().
int FavListCopy | ( | int | src, | |
int | dst | |||
) |
Copy a favorites list entry.
src | Index of the source entry. | |
dst | Index of the destination entry. |
Definiert in Zeile 178 der Datei favlist.c.
Benutzt LOG_CONFIG, LogMsg(), RADIOSTATION::rs_name, RADIOSTATION::rs_streams, RADIOSTATION::rs_uri und strdup().
int FavListSearch | ( | int | idx, | |
int | dir | |||
) |
Search favorite radio station.
idx | Start index. | |
dir | Direction to search, 1 (forward) or -1 (backwards). |
Definiert in Zeile 219 der Datei favlist.c.
Benutzt LAST_FAVORITE, LOG_CONFIG, LogMsg() und MAX_FAVORITES.
size_t FavListSize | ( | void | ) |
Calculate total size of the favorites list.
Definiert in Zeile 249 der Datei favlist.c.
Benutzt MAX_FAVORITES, RADIOSTATION::rs_name, RADIOSTATION::rs_streams und RADIOSTATION::rs_uri.
int FavListSave | ( | void | ) |
Save favorites list in non-volatile memory.
Definiert in Zeile 275 der Datei favlist.c.
Benutzt ConfigFlush(), ConfigRewind(), ConfigSaveString(), FAVLIST_MAGIC, FAVLIST_SECTOR, LAST_FAVORITE, LOG_CONFIG, LogMsg(), MAX_FAVORITES, RADIOSTATION::rs_name, RADIOSTATION::rs_streams und RADIOSTATION::rs_uri.
int FavListLoad | ( | void | ) |
Load favorites list from non-volatile memory.
Definiert in Zeile 316 der Datei favlist.c.
Benutzt ConfigLoadString(), ConfigRewind(), FAVLIST_MAGIC, FAVLIST_SECTOR, FavListClear(), LAST_FAVORITE, LOG_CONFIG, LogMsg(), MAX_FAVORITES, MAXNUM_STREAMS, RADIOSTATION::rs_name, RADIOSTATION::rs_streams, RADIOSTATION::rs_uri und strdup().
void FavListResetFactory | ( | void | ) |
Set pre-configured favorites list.
Definiert in Zeile 356 der Datei favlist.c.
Benutzt FavListClear(), FavListCopy(), FavListSet(), LAST_FAVORITE und MAX_FAVORITES.
RADIOSTATION favlist[MAX_FAVORITES] |