Utilities

Utilities — Helper and utilities functions

Functions

void flu_stream_list_free ()
void flu_bookmark_list_free ()
void flu_free ()
void flu_screen_saver_enable ()
gboolean flu_uri_is_valid ()
gchar * flu_uri_from_filename ()
const gchar * flu_language_iso_to_639_2T ()
const gchar * flu_language_iso_to_639_2B ()
const gchar * flu_language_iso_to_639_1 ()
const gchar * flu_language_iso_to_long_name ()

Description

Helper and utilities functions

Functions

flu_stream_list_free ()

void
flu_stream_list_free (GList *l);

Frees a list of streams

Parameters

l

The list of streams to free.

[element-type FluStream]

flu_bookmark_list_free ()

void
flu_bookmark_list_free (GList *l);

Frees a list of bookmarks

Parameters

l

The list of bookmarks to free.

[element-type FluBookmark]

flu_free ()

void
flu_free (gpointer ptr);

Frees a pointer

Parameters

ptr

The pointer to free Use this for methods where the library allocated the memory, like flu_stream_text_pango_get() or flu_stream_text_plain_get(), etc

 

flu_screen_saver_enable ()

void
flu_screen_saver_enable (gboolean enable);

Enables or disables the screen saver

Parameters

enable

TRUE to enable the screen saver, FALSE to disable it

 

flu_uri_is_valid ()

gboolean
flu_uri_is_valid (const gchar *uri);

Checks if an URI is valid

Parameters

uri

The URI to validate

 

Returns

TRUE if the URI is valid, FALSE otherwise


flu_uri_from_filename ()

gchar *
flu_uri_from_filename (const gchar *filename);

Creates an URI string from a filename

Parameters

filename

The filename to convert to an URI

 

Returns

The newly allocated URI. Use g_free() to free it.

[transfer full]


flu_language_iso_to_639_2T ()

const gchar *
flu_language_iso_to_639_2T (const gchar *lang);

Converts language code in any of iso 639-1/2T/2B to constant static string with iso 639-2T

Parameters

lang

language code in any of iso 639-1/2T/2B

 

Returns

constant static string with iso 639-2T language code ("und" if language code is undetermined).


flu_language_iso_to_639_2B ()

const gchar *
flu_language_iso_to_639_2B (const gchar *lang);

Converts language code in any of iso 639-1/2T/2B to constant static string with iso 639-2B

Parameters

lang

language code in any of iso 639-1/2T/2B

 

Returns

constant static string with iso 639-2B language code ("und" if language code is undetermined).


flu_language_iso_to_639_1 ()

const gchar *
flu_language_iso_to_639_1 (const gchar *lang);

Converts language code in any of iso 639-1/2T/2B to constant static string with iso 639-1. May return NULL, if there's no correspondent iso 639-1 code.

Parameters

lang

language code in any of iso 639-1/2T/2B

 

Returns

constant static string with iso 639-1 language code, or NULL.


flu_language_iso_to_long_name ()

const gchar *
flu_language_iso_to_long_name (const gchar *lang);

Converts language code in any of iso 639-1/2T/2B to constant static string with language name.

Parameters

lang

language code in any of iso 639-1/2T/2B

 

Returns

constant static string with name of corresponding language or "Undetermined".

Types and Values