GtuberClient

GtuberClient — a web client that fetches media info

Functions

Types and Values

Object Hierarchy

    GObject
    ╰── GtuberClient

Description

Functions

gtuber_client_new ()

GtuberClient *
gtuber_client_new (void);

Creates a new GtuberClient instance.

Returns

a new GtuberClient instance.

[transfer full]


gtuber_client_fetch_media_info ()

GtuberMediaInfo *
gtuber_client_fetch_media_info (GtuberClient *client,
                                const gchar *uri,
                                GCancellable *cancellable,
                                GError **error);

Synchronously obtains media info for requested URI.

Parameters

client

a GtuberClient

 

uri

a media source URI

 

cancellable

optional GCancellable object, NULL to ignore.

[nullable]

error

return location for a GError, or NULL.

[nullable]

Returns

a GtuberMediaInfo or NULL on error.

[transfer full]


gtuber_client_fetch_media_info_async ()

void
gtuber_client_fetch_media_info_async (GtuberClient *client,
                                      const gchar *uri,
                                      GCancellable *cancellable,
                                      GAsyncReadyCallback callback,
                                      gpointer user_data);

Asynchronously obtains media info for requested URI.

When the operation is finished, callback will be called. You can then call gtuber_client_fetch_media_info_finish() to get the result of the operation.

Parameters

client

a GtuberClient

 

uri

a media source URI

 

cancellable

optional GCancellable object, NULL to ignore.

[nullable]

callback

a GAsyncReadyCallback to call when the request is satisfied.

[scope async]

user_data

the data to pass to callback function.

[closure]

gtuber_client_fetch_media_info_finish ()

GtuberMediaInfo *
gtuber_client_fetch_media_info_finish (GtuberClient *client,
                                       GAsyncResult *res,
                                       GError **error);

Finishes an asynchronous obtain media info operation started with gtuber_client_fetch_media_info_async().

Parameters

client

a GtuberClient

 

res

a GAsyncResult

 

error

return location for a GError, or NULL.

[nullable]

Returns

a GtuberMediaInfo or NULL on error.

[transfer full]


gtuber_client_error_quark ()

GQuark
gtuber_client_error_quark (void);

Types and Values

GTUBER_CLIENT_ERROR

#define GTUBER_CLIENT_ERROR           (gtuber_client_error_quark ())

GtuberClient

typedef struct _GtuberClient GtuberClient;

Gtuber web client used to obtain media info.