webradio/favlist.c-Dateireferenz

gehe zum Quellcode dieser Datei

Makrodefinitionen

#define FAVLIST_MAGIC   "FL1"
#define FAVLIST_SECTOR   16

Funktionen

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.

Variablen

RADIOSTATION favlist [MAX_FAVORITES]


Makro-Dokumentation

#define FAVLIST_MAGIC   "FL1"

Definiert in Zeile 80 der Datei favlist.c.

Wird benutzt von FavListLoad() und FavListSave().

#define FAVLIST_SECTOR   16

Definiert in Zeile 81 der Datei favlist.c.

Wird benutzt von FavListLoad() und FavListSave().


Dokumentation der Funktionen

static void FavListClear ( void   )  [static]

Clear favorites list.

Will be called by FavListLoad() before loading a new list.

Definiert in Zeile 91 der Datei favlist.c.

Benutzt MAX_FAVORITES und RADIOSTATION::rs_streams.

Wird benutzt von FavListLoad() und FavListResetFactory().

int FavListSet ( int  idx,
CONST char *  name,
CONST char *  uri 
)

Set favorite list entry.

Parameter:
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.
Rückgabe:
Entry index on success, -1 otherwise.

Definiert in Zeile 123 der Datei favlist.c.

Wird benutzt von AddStationUris(), CgiFavoritesControl(), FavListResetFactory(), main() und ShoutCastAddStation().

int FavListCopy ( int  src,
int  dst 
)

Copy a favorites list entry.

Parameter:
src Index of the source entry.
dst Index of the destination entry.
Rückgabe:
0 on success, -1 otherwise.

Definiert in Zeile 178 der Datei favlist.c.

Wird benutzt von CgiFavoritesControl(), FavListResetFactory(), main() und UserIfMainMenu().

int FavListSearch ( int  idx,
int  dir 
)

Search favorite radio station.

Parameter:
idx Start index.
dir Direction to search, 1 (forward) or -1 (backwards).
Rückgabe:
Index of the new station or -1 if none available.

Definiert in Zeile 219 der Datei favlist.c.

Wird benutzt von UserIfMainMenu().

size_t FavListSize ( void   ) 

Calculate total size of the favorites list.

Rückgabe:
Number of bytes used.

Definiert in Zeile 249 der Datei favlist.c.

int FavListSave ( void   ) 

Save favorites list in non-volatile memory.

Rückgabe:
0 on success, -1 otherwise.

Definiert in Zeile 275 der Datei favlist.c.

Wird benutzt von CgiSettings() und main().

int FavListLoad ( void   ) 

Load favorites list from non-volatile memory.

Rückgabe:
0 on success, -1 otherwise.

Definiert in Zeile 316 der Datei favlist.c.

Wird benutzt von main().

void FavListResetFactory ( void   ) 

Set pre-configured favorites list.

Definiert in Zeile 356 der Datei favlist.c.

Wird benutzt von CgiSettings() und main().


Variablen-Dokumentation

RADIOSTATION favlist[MAX_FAVORITES]

Definiert in Zeile 84 der Datei favlist.c.

Wird benutzt von CgiStationFavorites(), ConfigSize(), main(), UserIfMainMenu() und UserIfShowStatus().


© 2008 by egnite GmbH - besuchen Sie www.ethernut.de