Add getter for MatrixHTTPAPI:base-url

This commit is contained in:
Gergely Polonkai 2015-12-14 16:23:00 +01:00
parent 2215f7c5b3
commit 8ae80a755a
3 changed files with 16 additions and 0 deletions

View File

@ -56,6 +56,7 @@ matrix_api_get_type
matrix_http_api_new
matrix_http_api_get_validate_certificate
matrix_http_api_set_validate_certificate
matrix_http_api_get_base_url
<SUBSECTION Standard>
MatrixHTTPAPI
MatrixHTTPAPIClass

View File

@ -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;
}

View File

@ -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