diff options
author | Rob Bradford <rob@o-hand.com> | 2008-08-18 17:34:25 +0100 |
---|---|---|
committer | Rob Bradford <rob@o-hand.com> | 2008-08-18 17:34:25 +0100 |
commit | daacff4204496756124af8492a85a3a36ce591cc (patch) | |
tree | a42fbb708d50d4ec4241254cc7273e73a3a19653 /rest/rest-proxy.h | |
download | librest-daacff4204496756124af8492a85a3a36ce591cc.tar.gz |
Initial commit
Diffstat (limited to 'rest/rest-proxy.h')
-rw-r--r-- | rest/rest-proxy.h | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/rest/rest-proxy.h b/rest/rest-proxy.h new file mode 100644 index 0000000..10122ad --- /dev/null +++ b/rest/rest-proxy.h @@ -0,0 +1,60 @@ +#ifndef _REST_PROXY +#define _REST_PROXY + +#include <glib-object.h> + +G_BEGIN_DECLS + +#define REST_TYPE_PROXY rest_proxy_get_type() + +#define REST_PROXY(obj) \ + (G_TYPE_CHECK_INSTANCE_CAST ((obj), REST_TYPE_PROXY, RestProxy)) + +#define REST_PROXY_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_CAST ((klass), REST_TYPE_PROXY, RestProxyClass)) + +#define REST_IS_PROXY(obj) \ + (G_TYPE_CHECK_INSTANCE_TYPE ((obj), REST_TYPE_PROXY)) + +#define REST_IS_PROXY_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_TYPE ((klass), REST_TYPE_PROXY)) + +#define REST_PROXY_GET_CLASS(obj) \ + (G_TYPE_INSTANCE_GET_CLASS ((obj), REST_TYPE_PROXY, RestProxyClass)) + +typedef struct { + GObject parent; +} RestProxy; + +typedef struct { + GObjectClass parent_class; +} RestProxyClass; + +typedef void (*RestProxyCallRawCallback)(RestProxy *proxy, + guint status_code, + const gchar *response_message, + GHashTable *headers, + const gchar *payload, + gssize len, + GObject *weak_object, + gpointer userdata); + +GType rest_proxy_get_type (void); + +RestProxy *rest_proxy_new (const gchar *url_format, + gboolean binding_required); + +gboolean rest_proxy_call_raw_async (RestProxy *proxy, + const gchar *function, + const gchar *method, + RestProxyCallRawCallback callback, + GObject *weak_object, + gpointer userdata, + GError *error, + const gchar *first_field_name, + ...); + +G_END_DECLS + +#endif /* _REST_PROXY */ + |