webradio/station.h File Reference


Detailed Description

Radio station connect and disconnect routines.

 *
 * $Log$
 *
 * 

Definition in file station.h.

Go to the source code of this file.

Data Structures

struct  RADIOSTATION
 Station configuration structure. More...
struct  STATIONINFO
 Station information structure. More...

Server Protocol Types



#define PROTOCOL_TYPE_UNKNOWN   0
 Protocol not determined.
#define PROTOCOL_TYPE_SHOUTCAST   1
 Receiver is connected to a SHOUTcast server.
#define PROTOCOL_TYPE_ICECAST   2
 Receiver is connected to an Icecast server.

Server Content Types



#define CONTENT_TYPE_UNKNOWN   0
 Unknown content.
#define CONTENT_TYPE_MP3   1
 MP3 encoded audio data.
#define CONTENT_TYPE_OGG   2
 Ogg Vorbis encoded audio data.
#define CONTENT_TYPE_AACP   3
 AAC+ encoded audio data.

Defines

#define MAXNUM_STREAMS   32

Functions

STATIONINFOStationConnect (RADIOSTATION *radio, int sidx)
 Connect to a radio station.
void StationDisconnect (STATIONINFO *sip)
 Disconnect from a radio station.


Define Documentation

#define MAXNUM_STREAMS   32

Definition at line 53 of file station.h.

Referenced by FavListLoad(), and FavListSet().

#define PROTOCOL_TYPE_UNKNOWN   0

Protocol not determined.

Definition at line 62 of file station.h.

#define PROTOCOL_TYPE_SHOUTCAST   1

Receiver is connected to a SHOUTcast server.

Definition at line 64 of file station.h.

Referenced by ShoutCastSetup().

#define PROTOCOL_TYPE_ICECAST   2

Receiver is connected to an Icecast server.

Definition at line 66 of file station.h.

Referenced by ShoutCastSetup().

#define CONTENT_TYPE_UNKNOWN   0

Unknown content.

Definition at line 72 of file station.h.

Referenced by ShoutCastSetup().

#define CONTENT_TYPE_MP3   1

MP3 encoded audio data.

Definition at line 74 of file station.h.

Referenced by ShoutCastSetup().

#define CONTENT_TYPE_OGG   2

Ogg Vorbis encoded audio data.

Definition at line 76 of file station.h.

Referenced by ShoutCastSetup().

#define CONTENT_TYPE_AACP   3

AAC+ encoded audio data.

Definition at line 78 of file station.h.

Referenced by ShoutCastSetup().


Function Documentation

STATIONINFO* StationConnect ( RADIOSTATION scp,
int  sidx 
)

Connect to a radio station.

Parameters:
scp Pointer to the station configuration table entry.
sidx Stream index.
Returns:
Pointer to a new station information structure. In case of an error, a NULL pointer is returned.

Definition at line 104 of file station.c.

References HttpSchemeParse(), HttpSchemeRelease(), LOG_STATION, LogMsg(), MAX_TCPBUF_SIZE, MAX_TCPRCV_WAIT, MAX_TCPSEG_SIZE, proxy, HTTP_PROXY::proxy_port, RADIOSTATION::rs_uri, HTTP_SCHEME::schm_host, HTTP_SCHEME::schm_path, HTTP_SCHEME::schm_portnum, STATIONINFO::si_header, STATIONINFO::si_scp, STATIONINFO::si_sock, StationDisconnect(), TcpGetHeaderLines(), TcpHostConnect(), and TcpPutString().

Here is the call graph for this function:

HttpSchemeParseHttpSchemeReleaseLogMsgStationDisconnectTcpGetHeaderLinesTcpHostConnectTcpPutString

void StationDisconnect ( STATIONINFO sip  ) 

Disconnect from a radio station.

Parameters:
sip Pointer to a station information structure.

Definition at line 83 of file station.c.

References LOG_STATION, LogMsg(), STATIONINFO::si_header, STATIONINFO::si_name, STATIONINFO::si_sock, and TcpReleaseHeaderLines().

Here is the call graph for this function:

LogMsgTcpReleaseHeaderLines


© 2008 by egnite GmbH - visit www.ethernut.de