Crosstales.Radio.Model.RadioStation Class Reference

Model for a radio station. More...

Inheritance diagram for Crosstales.Radio.Model.RadioStation:
Crosstales.Radio.OnRadio.Model.RadioStationExt

Public Member Functions

 RadioStation ()
 Default-constructor for a RadioStation. More...
 
 RadioStation (string name, string url, AudioFormat format)
 Constructor for a RadioStation. More...
 
 RadioStation (string name, string url, AudioFormat format, string station, string genres, int bitrate, float rating, string description, Sprite icon, string iconUrl, string city, string country, string language, int chunkSize=64, int bufferSize=64, AudioCodec excludeCodec=AudioCodec.None)
 Constructor for a RadioStation. More...
 
 RadioStation (RadioStation station)
 Copy constructor for a given RadioStation. More...
 
string ToTextLine (bool detailed=true)
 ToString()-variant for exporting the object. More...
 
string ToShortString ()
 ToString()-variant for displaying the object in the Editor. More...
 
string StationInfo (bool withLabel=true, int maxLength=0, bool shortInfo=false)
 Shows the complete station information. More...
 
string StationInfoLabels (bool shortInfo=false)
 Shows the labels for the complete station information. More...
 
override bool Equals (object obj)
 
override int GetHashCode ()
 
override string ToString ()
 

Public Attributes

string Name
 Name of the radio station. More...
 
string Url
 URL of the station. More...
 
System.Collections.Generic.List< RequestHeaderTupleRequestHeaders = new System.Collections.Generic.List<RequestHeaderTuple>()
 HTTP-request headers for the connection to the current radio station (e.g. authentication). More...
 
string Station
 Name of the station. More...
 
string Genres
 Genres of the radio. More...
 
float Rating
 Your rating of the radio. More...
 
string Description
 Description of the radio station. More...
 
Sprite Icon
 Icon representing the radio station. More...
 
string IconUrl
 Icon url for the radio station. More...
 
string City
 City of the radio. More...
 
string Country
 Country of the radio (ISO 3166-1, e.g. 'ch'). More...
 
string Language
 Language of the radio (like 'german'). More...
 
AudioFormat Format = AudioFormat.MP3
 Audio format of the station (default: AudioFormat.MP3). More...
 
int Bitrate = Config.DEFAULT_BITRATE
 Bitrate in kbit/s (default: 128). More...
 
int ChunkSize = Config.DEFAULT_CHUNKSIZE
 Size of the streaming-chunk in KB (default: 32). More...
 
int BufferSize = Config.DEFAULT_BUFFERSIZE
 Size of the local buffer in KB (default: 48). More...
 
AudioCodec ExcludedCodec = AudioCodec.None
 Exclude this station if the current RadioPlayer codec is equals this one (default: AudioCodec.None). More...
 
bool UpdateDataAtPlay = true
 Updates the data of the station when played (default: true). More...
 
int Channels = 2
 Channels of the station. More...
 
int SampleRate = 44100
 Sample rate of the station. More...
 
long TotalDataSize
 Total downloaded data size in bytes. More...
 
int TotalDataRequests
 Total number of data requests. More...
 
float TotalPlayTime
 Total playtime in seconds. More...
 
System.Collections.Generic.List< RecordInfoPlayedRecords = new System.Collections.Generic.List<RecordInfo>()
 List of all played records. More...
 
string ServerInfo = string.Empty
 Information about the streaming server (if available). More...
 

Static Public Attributes

const string UNKNOWN_STATION = "Unknown radio station"
 

Detailed Description

Model for a radio station.

Constructor & Destructor Documentation

◆ RadioStation() [1/4]

Crosstales.Radio.Model.RadioStation.RadioStation ( )

Default-constructor for a RadioStation.

◆ RadioStation() [2/4]

Crosstales.Radio.Model.RadioStation.RadioStation ( string  name,
string  url,
AudioFormat  format 
)

Constructor for a RadioStation.

Parameters
nameName of the radio station.
urlStream-URL of the station.
formatAudioFormat of the station.

◆ RadioStation() [3/4]

Crosstales.Radio.Model.RadioStation.RadioStation ( string  name,
string  url,
AudioFormat  format,
string  station,
string  genres,
int  bitrate,
float  rating,
string  description,
Sprite  icon,
string  iconUrl,
string  city,
string  country,
string  language,
int  chunkSize = 64,
int  bufferSize = 64,
AudioCodec  excludeCodec = AudioCodec.None 
)

Constructor for a RadioStation.

Parameters
nameName of the radio station.
urlStream-URL of the station.
formatAudioFormat of the station.
stationName of the station.
genresGenres of the radio.
bitrateBitrate in kbit/s.
ratingYour rating of the radio.
descriptionDescription of the radio station.
iconIcon of the radio station.
iconUrlIcon url of the radio station.
cityCity of the radio station.
countryCountry of the radio station (ISO 3166-1, e.g. 'ch').
languageLanguage of the radio station (like 'german').
chunkSizeSize of the streaming-chunk in KB (default: 64, optional).
bufferSizeSize of the local buffer in KB (default: 64, optional).
excludeCodecExcluded codec (default: AudioCodec.NONE, optional).

◆ RadioStation() [4/4]

Crosstales.Radio.Model.RadioStation.RadioStation ( RadioStation  station)

Copy constructor for a given RadioStation.

Parameters
stationStation to copy.

Member Function Documentation

◆ StationInfo()

string Crosstales.Radio.Model.RadioStation.StationInfo ( bool  withLabel = true,
int  maxLength = 0,
bool  shortInfo = false 
)

Shows the complete station information.

Parameters
withLabelAdd the label for every information (default: true, optional)
maxLengthMaximal length of a row (default: 0 (= unlimited), optional)
shortInfoReduced information (default: false, optional)
Returns
The complete station information.

◆ StationInfoLabels()

string Crosstales.Radio.Model.RadioStation.StationInfoLabels ( bool  shortInfo = false)

Shows the labels for the complete station information.

Parameters
shortInfoReduced information (default: false, optional)
Returns
The complete station information.

◆ ToShortString()

string Crosstales.Radio.Model.RadioStation.ToShortString ( )

ToString()-variant for displaying the object in the Editor.

Returns
Text description of the object.

◆ ToTextLine()

string Crosstales.Radio.Model.RadioStation.ToTextLine ( bool  detailed = true)

ToString()-variant for exporting the object.

Parameters
detailedDetailed export with Chunk- and Buffer-size.
Returns
Text-line of the object.

Member Data Documentation

◆ Bitrate

int Crosstales.Radio.Model.RadioStation.Bitrate = Config.DEFAULT_BITRATE

Bitrate in kbit/s (default: 128).

◆ BufferSize

int Crosstales.Radio.Model.RadioStation.BufferSize = Config.DEFAULT_BUFFERSIZE

Size of the local buffer in KB (default: 48).

◆ Channels

int Crosstales.Radio.Model.RadioStation.Channels = 2

Channels of the station.

◆ ChunkSize

int Crosstales.Radio.Model.RadioStation.ChunkSize = Config.DEFAULT_CHUNKSIZE

Size of the streaming-chunk in KB (default: 32).

◆ City

string Crosstales.Radio.Model.RadioStation.City

City of the radio.

◆ Country

string Crosstales.Radio.Model.RadioStation.Country

Country of the radio (ISO 3166-1, e.g. 'ch').

◆ Description

string Crosstales.Radio.Model.RadioStation.Description

Description of the radio station.

◆ ExcludedCodec

AudioCodec Crosstales.Radio.Model.RadioStation.ExcludedCodec = AudioCodec.None

Exclude this station if the current RadioPlayer codec is equals this one (default: AudioCodec.None).

◆ Format

AudioFormat Crosstales.Radio.Model.RadioStation.Format = AudioFormat.MP3

Audio format of the station (default: AudioFormat.MP3).

◆ Genres

string Crosstales.Radio.Model.RadioStation.Genres

Genres of the radio.

◆ Icon

Sprite Crosstales.Radio.Model.RadioStation.Icon

Icon representing the radio station.

◆ IconUrl

string Crosstales.Radio.Model.RadioStation.IconUrl

Icon url for the radio station.

◆ Language

string Crosstales.Radio.Model.RadioStation.Language

Language of the radio (like 'german').

◆ Name

string Crosstales.Radio.Model.RadioStation.Name

Name of the radio station.

◆ PlayedRecords

System.Collections.Generic.List<RecordInfo> Crosstales.Radio.Model.RadioStation.PlayedRecords = new System.Collections.Generic.List<RecordInfo>()

List of all played records.

◆ Rating

float Crosstales.Radio.Model.RadioStation.Rating

Your rating of the radio.

◆ RequestHeaders

System.Collections.Generic.List<RequestHeaderTuple> Crosstales.Radio.Model.RadioStation.RequestHeaders = new System.Collections.Generic.List<RequestHeaderTuple>()

HTTP-request headers for the connection to the current radio station (e.g. authentication).

◆ SampleRate

int Crosstales.Radio.Model.RadioStation.SampleRate = 44100

Sample rate of the station.

◆ ServerInfo

string Crosstales.Radio.Model.RadioStation.ServerInfo = string.Empty

Information about the streaming server (if available).

◆ Station

string Crosstales.Radio.Model.RadioStation.Station

Name of the station.

◆ TotalDataRequests

int Crosstales.Radio.Model.RadioStation.TotalDataRequests

Total number of data requests.

◆ TotalDataSize

long Crosstales.Radio.Model.RadioStation.TotalDataSize

Total downloaded data size in bytes.

◆ TotalPlayTime

float Crosstales.Radio.Model.RadioStation.TotalPlayTime

Total playtime in seconds.

◆ UpdateDataAtPlay

bool Crosstales.Radio.Model.RadioStation.UpdateDataAtPlay = true

Updates the data of the station when played (default: true).

◆ Url

string Crosstales.Radio.Model.RadioStation.Url

URL of the station.


The documentation for this class was generated from the following file:
  • C:/Users/slaub/Unity/assets/Radio/RadioPro/Assets/Plugins/crosstales/Radio/Scripts/Model/RadioStation.cs