Add getter for MatrixHTTPAPI:base-url
This commit is contained in:
@@ -305,3 +305,17 @@ matrix_http_api_get_validate_certificate(MatrixHTTPAPI *api)
|
||||
|
||||
return priv->validate_certificate;
|
||||
}
|
||||
|
||||
/**
|
||||
* matrix_http_api_get_base_url:
|
||||
* @api: a #MatrixHTTPAPI implementation
|
||||
*
|
||||
* Returns: (transfer none): the base URL set for @api
|
||||
*/
|
||||
const gchar *
|
||||
matrix_http_api_get_base_url(MatrixHTTPAPI *api)
|
||||
{
|
||||
MatrixHTTPAPIPrivate *priv = matrix_http_api_get_instance_private(api);
|
||||
|
||||
return priv->url;
|
||||
}
|
||||
|
@@ -48,6 +48,7 @@ GType matrix_http_api_get_type(void) G_GNUC_CONST;
|
||||
void matrix_http_api_set_validate_certificate(MatrixHTTPAPI *api,
|
||||
gboolean validate_certificate);
|
||||
gboolean matrix_http_api_get_validate_certificate(MatrixHTTPAPI *api);
|
||||
const gchar *matrix_http_api_get_base_url(MatrixHTTPAPI *api);
|
||||
|
||||
MatrixHTTPAPI *matrix_http_api_new(const gchar *base_url, const gchar *token);
|
||||
G_END_DECLS
|
||||
|
Reference in New Issue
Block a user