webradio/favlist.h-Dateireferenz


Ausführliche Beschreibung

Configuration items.

 *
 * $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]


Makro-Dokumentation

#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().


Dokumentation der Funktionen

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.

Benutzt LAST_FAVORITE, LOG_CONFIG, LogMsg(), MAX_FAVORITES, MAXNUM_STREAMS, RADIOSTATION::rs_name, RADIOSTATION::rs_streams, RADIOSTATION::rs_uri und strdup().

Hier ist ein Graph der zeigt, was diese Funktion aufruft:

LogMsgstrdup

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.

Benutzt LOG_CONFIG, LogMsg(), RADIOSTATION::rs_name, RADIOSTATION::rs_streams, RADIOSTATION::rs_uri und strdup().

Hier ist ein Graph der zeigt, was diese Funktion aufruft:

LogMsgstrdup

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.

Benutzt LAST_FAVORITE, LOG_CONFIG, LogMsg() und MAX_FAVORITES.

Hier ist ein Graph der zeigt, was diese Funktion aufruft:

LogMsg

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.

Benutzt MAX_FAVORITES, RADIOSTATION::rs_name, RADIOSTATION::rs_streams und RADIOSTATION::rs_uri.

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.

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.

Hier ist ein Graph der zeigt, was diese Funktion aufruft:

ConfigFlushConfigRewindConfigSaveStringLogMsg

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.

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().

Hier ist ein Graph der zeigt, was diese Funktion aufruft:

ConfigLoadStringConfigRewindFavListClearLogMsgstrdup

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.

Hier ist ein Graph der zeigt, was diese Funktion aufruft:

FavListClearFavListCopyFavListSet


Variablen-Dokumentation

RADIOSTATION favlist[MAX_FAVORITES]

Definiert in Zeile 84 der Datei favlist.c.


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