libtizdirble¶
-
group
libtizdirble
library
A C library to access the Dirble streaming service.
Typedefs
-
typedef struct tiz_dirble
tiz_dirble_t
¶ The dirble opaque structure
-
typedef enum tiz_dirble_playback_mode
tiz_dirble_playback_mode_t
¶ Various playback modes that control the playback queue.
Enums
Functions
-
int
tiz_dirble_init
(tiz_dirble_ptr_t * app_dirble, const char * ap_api_key)¶ Initialize the dirble handle.
- Return
- 0 on success.
- Parameters
app_dirble
: A pointer to the dirble handle which will be initialised.ap_api_key
: A Dirble email account.
-
void
tiz_dirble_set_playback_mode
(tiz_dirble_t * ap_dirble, const tiz_dirble_playback_mode_t mode)¶ Clear the playback queue.
- Parameters
ap_dirble
: The dirble handle.
-
int
tiz_dirble_play_popular_stations
(tiz_dirble_t * ap_dirble)¶ Add popular stations to the playback queue.
After calling this method, the various tiz_dirble_get* methods can be used to interact with the playback queue.
- Return
- 0 on success
- Parameters
ap_dirble
: The dirble handle.
-
int
tiz_dirble_play_stations
(tiz_dirble_t * ap_dirble, const char * ap_query)¶ Search Dirble for stations matching the query string and add them to the playback queue.
After calling this method, the various tiz_dirble_get* methods can be used to interact with the playback queue.
- Return
- 0 on success
- Parameters
ap_dirble
: The dirble handle.ap_query
: The query string.
-
int
tiz_dirble_play_category
(tiz_dirble_t * ap_dirble, const char * ap_category)¶ Search Dirble for a category and add matching stations to the playback queue.
After calling this method, the various tiz_dirble_get* methods can be used to interact with the playback queue.
- Return
- 0 on success
- Parameters
ap_dirble
: The dirble handle.ap_category
: The category.
-
int
tiz_dirble_play_country
(tiz_dirble_t * ap_dirble, const char * ap_country_code)¶ Search Dirble for a country code and add its stations to the playback queue.
After calling this method, the various tiz_dirble_get* methods can be used to interact with the playback queue.
- Return
- 0 on success
- Parameters
ap_dirble
: The dirble handle.ap_country_code
: A two-letter country code.
-
void
tiz_dirble_clear_queue
(tiz_dirble_t * ap_dirble)¶ Clear the playback queue.
- Parameters
ap_dirble
: The dirble handle.
-
const char*
tiz_dirble_get_next_url
(tiz_dirble_t * ap_dirble, const bool a_remove_current_url)¶ Retrieve the next station url
The playback queue pointer moves one position forwards.
- Return
- The next url in the playback queue or NULL if the playback queue is empty.
- Parameters
ap_dirble
: The dirble handle.a_remove_current_url
: If true, delete the current url from the playback queue before moving to the next url.
-
const char*
tiz_dirble_get_prev_url
(tiz_dirble_t * ap_dirble, const bool a_remove_current_url)¶ Retrieve the previous station url.
The playback queue pointer moves one position backwards.
- Return
- The previous url in the playback queue or NULL if the playback queue is empty.
- Parameters
ap_dirble
: The dirble handle.a_remove_current_url
: If true, delete the current url from the playback queue before moving to the previous url.
-
const char*
tiz_dirble_get_current_station_name
(tiz_dirble_t * ap_dirble)¶ Retrieve the current station’s name.
- Parameters
ap_dirble
: The dirble handle.
-
const char*
tiz_dirble_get_current_station_country
(tiz_dirble_t * ap_dirble)¶ Retrieve the current station’s country.
- Parameters
ap_dirble
: The dirble handle.
-
const char*
tiz_dirble_get_current_station_category
(tiz_dirble_t * ap_dirble)¶ Retrieve the current station’s category.
- Parameters
ap_dirble
: The dirble handle.
-
const char*
tiz_dirble_get_current_station_website
(tiz_dirble_t * ap_dirble)¶ Retrieve the current station’s website.
- Parameters
ap_dirble
: The dirble handle.
-
const char*
tiz_dirble_get_current_station_bitrate
(tiz_dirble_t * ap_dirble)¶ Retrieve the current station’s bitrate.
- Parameters
ap_dirble
: The dirble handle.
-
const char*
tiz_dirble_get_current_station_stream_url
(tiz_dirble_t * ap_dirble)¶ Retrieve the current station’s stream url.
- Parameters
ap_dirble
: The dirble handle.
-
void
tiz_dirble_destroy
(tiz_dirble_t * ap_dirble)¶ Destroy the dirble handle.
- Parameters
ap_dirble
: The dirble handle.
-
typedef struct tiz_dirble