Top | ![]() |
![]() |
![]() |
![]() |
#define | GTUBER_WEBSITE_PLUGIN_DECLARE() |
#define | GTUBER_WEBSITE_PLUGIN_DEFINE() |
#define | GTUBER_WEBSITE_PLUGIN_EXPORT_SCHEMES() |
#define | GTUBER_WEBSITE_PLUGIN_EXPORT_HOSTS() |
#define | GTUBER_WEBSITE_PLUGIN_EXPORT_HOSTS_FROM_FILE() |
#define | GTUBER_WEBSITE_PLUGIN_EXPORT_HOSTS_FROM_FILE_WITH_FALLBACK() |
#define | GTUBER_WEBSITE_PLUGIN_EXPORT_HOSTS_FROM_FILE_WITH_PREPEND() |
GUri * | gtuber_website_get_uri () |
void | gtuber_website_set_uri () |
const gchar * | gtuber_website_get_uri_string () |
gboolean | gtuber_website_set_uri_from_string () |
SoupCookieJar * | gtuber_website_get_cookies_jar () |
GQuark | gtuber_website_error_quark () |
#define GTUBER_WEBSITE_PLUGIN_DECLARE(camel,lower,upper)
Convenient macro to declare a new plugin that extends GtuberWebsite.
#define GTUBER_WEBSITE_PLUGIN_DEFINE(camel,lower)
Convenient macro that wraps around G_DEFINE_TYPE with GtuberWebsite.
#define GTUBER_WEBSITE_PLUGIN_EXPORT_SCHEMES(...)
Convenient macro that exports plugin supported schemes.
#define GTUBER_WEBSITE_PLUGIN_EXPORT_HOSTS(...)
Convenient macro that exports plugin supported hosts.
#define GTUBER_WEBSITE_PLUGIN_EXPORT_HOSTS_FROM_FILE(lower)
Convenient macro that exports plugin supported hosts from user provided config file.
#define GTUBER_WEBSITE_PLUGIN_EXPORT_HOSTS_FROM_FILE_WITH_FALLBACK(lower, ...)
Convenient macro that exports plugin supported hosts from user provided config file and if it does not exists uses hardcoded list of hosts as fallback.
#define GTUBER_WEBSITE_PLUGIN_EXPORT_HOSTS_FROM_FILE_WITH_PREPEND(lower, ...)
Convenient macro that exports plugin supported hosts from user provided config file with prepended additional hosts without touching said file.
void gtuber_website_set_uri (GtuberWebsite *website
,GUri *uri
);
Sets new URI for handling. URI cannot be NULL
.
This is mainly useful together with reconfigure flow event.
const gchar *
gtuber_website_get_uri_string (GtuberWebsite *website
);
gboolean gtuber_website_set_uri_from_string (GtuberWebsite *website
,const gchar *uri_str
,GError **error
);
Sets URI from string for handling.
This is mainly useful together with reconfigure flow event.
SoupCookieJar *
gtuber_website_get_cookies_jar (GtuberWebsite *website
);
Get SoupCookieJar with user provided cookies.
Note that first call into this function causes blocking I/O as cookies are read. Next call will return the same jar, so its safe to use this function multiple times without getting a hold of the jar in the subclass.
struct GtuberWebsiteClass { GObjectClass parent_class; void (* prepare) (GtuberWebsite *website); GtuberFlow (* create_request) (GtuberWebsite *website, GtuberMediaInfo *info, SoupMessage **msg, GError **error); GtuberFlow (* read_response) (GtuberWebsite *website, SoupMessage *msg, GError **error); GtuberFlow (* parse_input_stream) (GtuberWebsite *website, GInputStream *stream, GtuberMediaInfo *info, GError **error); GtuberFlow (* set_user_req_headers) (GtuberWebsite *website, SoupMessageHeaders *req_headers, GHashTable *user_headers, GError **error); };
If plugin needs to do some post init blocking IO (like reading cache) before it can be used, this is a good place to do so. |
||
Create and pass SoupMessage to send. |
||
Use to check SoupStatus and response SoupMessageHeaders from send SoupMessage. |
||
Read GInputStream and fill GtuberMediaInfo. |
||
Set request headers for user. Default implementation will set them from last SoupMessage, skipping some common and invalid ones. |