diff options
| author | Michael Biebl <biebl@debian.org> | 2020-10-05 22:27:18 +0200 |
|---|---|---|
| committer | Michael Biebl <biebl@debian.org> | 2020-10-05 22:27:18 +0200 |
| commit | aafc1dbe4712c86189bbc1d4d54ad8cb4c69be7e (patch) | |
| tree | a2a9bb4d007339a0b1304540388230ccedac32bd /clients/cloud-setup/nm-http-client.h | |
| parent | e7b44ef4c80907346ec7492a09c45277459924fc (diff) | |
New upstream version 1.27.90 upstream/1.27.90
Diffstat (limited to 'clients/cloud-setup/nm-http-client.h')
| -rw-r--r-- | clients/cloud-setup/nm-http-client.h | 98 |
1 files changed, 50 insertions, 48 deletions
diff --git a/clients/cloud-setup/nm-http-client.h b/clients/cloud-setup/nm-http-client.h index ef7c984a..fc465e35 100644 --- a/clients/cloud-setup/nm-http-client.h +++ b/clients/cloud-setup/nm-http-client.h @@ -1,4 +1,4 @@ -// SPDX-License-Identifier: LGPL-2.1+ +/* SPDX-License-Identifier: LGPL-2.1+ */ #ifndef __NM_HTTP_CLIENT_C__ #define __NM_HTTP_CLIENT_C__ @@ -8,61 +8,63 @@ typedef struct _NMHttpClient NMHttpClient; typedef struct _NMHttpClientClass NMHttpClientClass; -#define NM_TYPE_HTTP_CLIENT (nm_http_client_get_type ()) -#define NM_HTTP_CLIENT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), NM_TYPE_HTTP_CLIENT, NMHttpClient)) -#define NM_HTTP_CLIENT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), NM_TYPE_HTTP_CLIENT, NMHttpClientClass)) -#define NM_IS_HTTP_CLIENT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), NM_TYPE_HTTP_CLIENT)) -#define NM_IS_HTTP_CLIENT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), NM_TYPE_HTTP_CLIENT)) -#define NM_HTTP_CLIENT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), NM_TYPE_HTTP_CLIENT, NMHttpClientClass)) +#define NM_TYPE_HTTP_CLIENT (nm_http_client_get_type()) +#define NM_HTTP_CLIENT(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), NM_TYPE_HTTP_CLIENT, NMHttpClient)) +#define NM_HTTP_CLIENT_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_CAST((klass), NM_TYPE_HTTP_CLIENT, NMHttpClientClass)) +#define NM_IS_HTTP_CLIENT(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), NM_TYPE_HTTP_CLIENT)) +#define NM_IS_HTTP_CLIENT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), NM_TYPE_HTTP_CLIENT)) +#define NM_HTTP_CLIENT_GET_CLASS(obj) \ + (G_TYPE_INSTANCE_GET_CLASS((obj), NM_TYPE_HTTP_CLIENT, NMHttpClientClass)) -GType nm_http_client_get_type (void); +GType nm_http_client_get_type(void); -NMHttpClient *nm_http_client_new (void); +NMHttpClient *nm_http_client_new(void); /*****************************************************************************/ -GMainContext *nm_http_client_get_main_context (NMHttpClient *self); +GMainContext *nm_http_client_get_main_context(NMHttpClient *self); /*****************************************************************************/ -void nm_http_client_get (NMHttpClient *self, - const char *uri, - int timeout_msec, - gssize max_data, - const char *const *http_headers, - GCancellable *cancellable, - GAsyncReadyCallback callback, - gpointer user_data); - -gboolean nm_http_client_get_finish (NMHttpClient *self, - GAsyncResult *result, - long *out_response_code, - GBytes **out_response_data, - GError **error); - -typedef gboolean (*NMHttpClientPollGetCheckFcn) (long response_code, - GBytes *response_data, - gpointer check_user_data, - GError **error); - -void nm_http_client_poll_get (NMHttpClient *self, - const char *uri, - int request_timeout_ms, - gssize request_max_data, - int poll_timeout_ms, - int ratelimit_timeout_ms, - const char *const *http_headers, - GCancellable *cancellable, - NMHttpClientPollGetCheckFcn check_fcn, - gpointer check_user_data, - GAsyncReadyCallback callback, - gpointer user_data); - -gboolean nm_http_client_poll_get_finish (NMHttpClient *self, - GAsyncResult *result, - long *out_response_code, - GBytes **out_response_data, - GError **error); +void nm_http_client_get(NMHttpClient * self, + const char * uri, + int timeout_msec, + gssize max_data, + const char *const * http_headers, + GCancellable * cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + +gboolean nm_http_client_get_finish(NMHttpClient *self, + GAsyncResult *result, + long * out_response_code, + GBytes ** out_response_data, + GError ** error); + +typedef gboolean (*NMHttpClientPollGetCheckFcn)(long response_code, + GBytes * response_data, + gpointer check_user_data, + GError **error); + +void nm_http_client_poll_get(NMHttpClient * self, + const char * uri, + int request_timeout_ms, + gssize request_max_data, + int poll_timeout_ms, + int ratelimit_timeout_ms, + const char *const * http_headers, + GCancellable * cancellable, + NMHttpClientPollGetCheckFcn check_fcn, + gpointer check_user_data, + GAsyncReadyCallback callback, + gpointer user_data); + +gboolean nm_http_client_poll_get_finish(NMHttpClient *self, + GAsyncResult *result, + long * out_response_code, + GBytes ** out_response_data, + GError ** error); /*****************************************************************************/ |