libquvi
 All Files Functions Typedefs Enumerations Enumerator Macros Groups Pages
Functions
Subtitle property

Functions

const char * quvi_subtitle_export_data (quvi_subtitle_export_t handle)
 Return exported data.
void quvi_subtitle_export_free (quvi_subtitle_export_t handle)
 Free all of memory used by a subtitle export handle.
quvi_subtitle_export_t quvi_subtitle_export_new (quvi_subtitle_lang_t handle, char *to_format)
 Create a new subtitle export handle.
void quvi_subtitle_free (quvi_subtitle_t handle)
 Free all of memory used by a subtitle handle.
void quvi_subtitle_lang_get (quvi_subtitle_lang_t handle, QuviSubtitleLangProperty n,...)
 Return a subtitle property.
const quvi_subtitle_lang_t quvi_subtitle_lang_next (quvi_subtitle_type_t handle)
 Traverse to next available language Subtitle type.
void quvi_subtitle_lang_reset (quvi_subtitle_type_t handle)
 Resets to the first available Subtitle language.
quvi_subtitle_t quvi_subtitle_new (quvi_t handle, const char *url)
 Parse subtitle properties for URL.
const quvi_subtitle_lang_t quvi_subtitle_select (quvi_subtitle_t handle, const char *id)
 Select a Subtitle language matching a Subtitle language ID.
void quvi_subtitle_type_get (quvi_subtitle_type_t handle, QuviSubtitleTypeProperty n,...)
 Return a subtitle property.
const quvi_subtitle_type_t quvi_subtitle_type_next (quvi_subtitle_t handle)
 Traverse to next available Subtitle type.
void quvi_subtitle_type_reset (quvi_subtitle_t handle)
 Resets to the first available Subtitle type.

Detailed Description

Function Documentation

const char* quvi_subtitle_export_data ( quvi_subtitle_export_t  handle)

Return exported data.

Note
Do not attempt to free the returned string
See Also
quvi_subtitle_export_free
Parsing subtitle properties
void quvi_subtitle_export_free ( quvi_subtitle_export_t  handle)

Free all of memory used by a subtitle export handle.

Note
If handle is NULL the function simply returns
See Also
Parsing subtitle properties
quvi_subtitle_export_t quvi_subtitle_export_new ( quvi_subtitle_lang_t  handle,
char *  to_format 
)

Create a new subtitle export handle.

Returns
New handle, quvi_subtitle_export_free it when done using it
Note
Use quvi_ok to check if an occurred
See Also
Parsing subtitle properties
void quvi_subtitle_free ( quvi_subtitle_t  handle)

Free all of memory used by a subtitle handle.

Note
If handle is NULL the function simply returns
See Also
Parsing subtitle properties
void quvi_subtitle_lang_get ( quvi_subtitle_lang_t  handle,
QuviSubtitleLangProperty  n,
  ... 
)

Return a subtitle property.

See Also
Parsing subtitle properties
Note
URLs will be returned in the escaped form
const quvi_subtitle_lang_t quvi_subtitle_lang_next ( quvi_subtitle_type_t  handle)

Traverse to next available language Subtitle type.

Returns
NULL if none was found
See Also
Parsing subtitle properties @
void quvi_subtitle_lang_reset ( quvi_subtitle_type_t  handle)

Resets to the first available Subtitle language.

See Also
Parsing subtitle properties
quvi_subtitle_t quvi_subtitle_new ( quvi_t  handle,
const char *  url 
)

Parse subtitle properties for URL.

Returns
New handle, quvi_subtitle_free when done using it
Note
  • Calling this function restores the current libcURL session handle to its initial state (cookies cleared, custom headers cleared, default user-agent string restored, ...)
  • Use quvi_ok for checking if an error occurred
See Also
Parsing subtitle properties
const quvi_subtitle_lang_t quvi_subtitle_select ( quvi_subtitle_t  handle,
const char *  id 
)

Select a Subtitle language matching a Subtitle language ID.

Matches the Subtitle language ID (pattern) to the available subtitle language IDs and selects the language. This function returns immediately if a matching ID was found. The ID value may be a comma-separated value (e.g. "foo,bar,baz"). The ID may also contain the keyword 'croak' (see the notes below).

Note
  • ID value is used as regular expression pattern
  • ID may contain the keyword 'croak'
    • This will cause the function to exit immediately when it is reached
    • The result may be checked with quvi_ok
      • The code may be retrieved using quvi_get
      • The error message may be retrieved using quvi_errmsg
  • If nothing matched (and the 'croak' keyword was not specified) the function will either:
    • return the first (default) available language, or
    • NULL if the library failed to find any subtitle languages for the media
  • Always confirm the result with quvi_ok
  • Calling this function will reset the list pointers for both Subtitle type and Subtitle language
See Also
Parsing subtitle properties
quvi_subtitle_type_reset
quvi_subtitle_lang_reset
quvi_subtitle_type_next
quvi_subtitle_lang_next
quvi_subtitle_new
void quvi_subtitle_type_get ( quvi_subtitle_type_t  handle,
QuviSubtitleTypeProperty  n,
  ... 
)

Return a subtitle property.

See Also
Parsing subtitle properties
const quvi_subtitle_type_t quvi_subtitle_type_next ( quvi_subtitle_t  handle)

Traverse to next available Subtitle type.

Returns
NULL if none was found
See Also
Parsing subtitle properties @
void quvi_subtitle_type_reset ( quvi_subtitle_t  handle)

Resets to the first available Subtitle type.

See Also
Parsing subtitle properties