ETVDB  0.6.0
ETVDB is a tool and a library to get data from The TV Database (TVDB)
Functions
Infrastructure

General TVDB infrastructure API. More...

Functions

EAPI Eina_Hash * etvdb_languages_get (const char *lang_file_path)
 Function to retrieve supported languages. More...
 
EAPI Eina_Bool etvdb_language_set (Eina_Hash *hash, char *lang)
 Change the global language setting. More...
 
EAPI time_t etvdb_server_time_get (void)
 Function to retrieve time from TVDB's servers. More...
 

Detailed Description

General TVDB infrastructure API.

These functions retrieve basic infrastructure Data from the TVDB which are not directly related to any media.

Function Documentation

EAPI Eina_Bool etvdb_language_set ( Eina_Hash *  hash,
char *  lang 
)

Change the global language setting.

This function sets the global language to a user setting. It is optional and there always is a default setting in place.

Parameters
hashhash table holding supported languages, as generated by
See also
etvdb_languages_get()
Parameters
lang2 character language code, e.g. "en" or "fr" (required)
Returns
EINA_TRUE on success, EINA_FALSE on failure
EAPI Eina_Hash* etvdb_languages_get ( const char *  lang_file_path)

Function to retrieve supported languages.

This function parses a xml file containing tvdb language data, and adds it to a hash table (which it initializes). The xml data will be downloaded, or (optionally) read from a file.

If you no longer need the data, you'll have to free the hashtable (with eina_hash_free()), but not the data in the table.

Parameters
lang_file_pathPath to a XML file containing TVDB's supported languages. This allows to provide a custom XML language file. It is recommended to pass NULL. In this case the languages.xml file provide with etvdb will be used and, if not available, the languages will be retrieved online.
Returns
a pointer to a Eina hashtable on success, NULL on failure
EAPI time_t etvdb_server_time_get ( void  )

Function to retrieve time from TVDB's servers.

This function will retrieve the server time from TVDB which is useful to update existing data. For larger persistent data sets, it is recommended to store this time with the data.

Returns
> 0 if successful If 0 is returned, the time could not be retrieved from the TVDB servers.