GtuberWebsite

GtuberWebsite — a base class for creating plugins

Functions

Types and Values

Object Hierarchy

    GObject
    ╰── GtuberWebsite

Description

Functions

gtuber_website_get_uri ()

const gchar *
gtuber_website_get_uri (GtuberWebsite *website);

[skip]

Parameters

website

a GtuberWebsite

 

Returns

current requested URI.

[transfer none]


gtuber_website_set_uri ()

void
gtuber_website_set_uri (GtuberWebsite *website,
                        const gchar *uri);

Set current requested URI.

This is only useful for plugin implementations where user requested URI needs to be altered, otherwise GtuberClient will set it automatically.

[skip]

Parameters

website

a GtuberWebsite

 

uri

requested URI

 

gtuber_website_error_quark ()

GQuark
gtuber_website_error_quark (void);

Types and Values

GTUBER_WEBSITE_ERROR

#define GTUBER_WEBSITE_ERROR           (gtuber_website_error_quark ())

struct GtuberWebsite

struct GtuberWebsite;

Plugin website base class.


struct GtuberWebsiteClass

struct GtuberWebsiteClass {
  GObjectClass parent_class;

  gboolean handles_input_stream;

  GtuberFlow (* create_request) (GtuberWebsite   *website,
                                 GtuberMediaInfo *info,
                                 SoupMessage    **msg,
                                 GError         **error);

  GtuberFlow (* parse_response) (GtuberWebsite   *website,
                                 gchar           *data,
                                 GtuberMediaInfo *info,
                                 GError         **error);

  GtuberFlow (* parse_input_stream) (GtuberWebsite   *website,
                                     GInputStream    *stream,
                                     GtuberMediaInfo *info,
                                     GError         **error);
};

Members

gboolean handles_input_stream;

When set to TRUE, parse_input_stream() will be called at parsing stage otherwise parse_response() will be used.

 

create_request ()

Create and pass SoupMessage to send.

 

parse_response ()

Read SoupMessage response body and fill GtuberMediaInfo.

 

parse_input_stream ()

Read GInputStream and fill GtuberMediaInfo.