D-Bus: Emit cast to avoid C warning for signal handling in clients
[vala-lang.git] / vapi / rest-0.6.vapi
blob4133a001e180b198da8c93f57a6f0f2da201e738
1 /* rest-0.6.vapi generated by vapigen, do not modify. */
3 [CCode (cprefix = "Rest", lower_case_cprefix = "rest_")]
4 namespace Rest {
5         [CCode (cname = "OAuthProxy", cheader_filename = "rest/oauth-proxy.h")]
6         public class OAuthProxy : Rest.Proxy {
7                 [CCode (cname = "oauth_proxy_new", type = "RestProxy*", has_construct_function = false)]
8                 public OAuthProxy (string consumer_key, string consumer_secret, string url_format, bool binding_required);
9                 [CCode (cname = "oauth_proxy_access_token")]
10                 public bool access_token (string function, string verifier) throws GLib.Error;
11                 [CCode (cname = "oauth_proxy_access_token_async")]
12                 public bool access_token_async (string function, string verifier, [CCode (delegate_target_pos = 4.9)] Rest.OAuthProxyAuthCallback callback, GLib.Object? weak_object) throws GLib.Error;
13                 [Deprecated]
14                 [CCode (cname = "oauth_proxy_auth_step")]
15                 public bool auth_step (string function) throws GLib.Error;
16                 [Deprecated]
17                 [CCode (cname = "oauth_proxy_auth_step_async")]
18                 public bool auth_step_async (string function, [CCode (delegate_target_pos = 3.9)] Rest.OAuthProxyAuthCallback callback, GLib.Object? weak_object) throws GLib.Error;
19                 [CCode (cname = "oauth_proxy_get_token")]
20                 public unowned string get_token ();
21                 [CCode (cname = "oauth_proxy_get_token_secret")]
22                 public unowned string get_token_secret ();
23                 [CCode (cname = "oauth_proxy_is_oauth10a")]
24                 public bool is_oauth10a ();
25                 [CCode (cname = "oauth_proxy_request_token")]
26                 public bool request_token (string function, string callback_uri) throws GLib.Error;
27                 [CCode (cname = "oauth_proxy_request_token_async")]
28                 public bool request_token_async (string function, string callback_uri, [CCode (delegate_target_pos = 4.9)] Rest.OAuthProxyAuthCallback callback, GLib.Object? weak_object) throws GLib.Error;
29                 [CCode (cname = "oauth_proxy_set_token")]
30                 public void set_token (string token);
31                 [CCode (cname = "oauth_proxy_set_token_secret")]
32                 public void set_token_secret (string token_secret);
33                 [CCode (cname = "oauth_proxy_new_with_token", type = "RestProxy*", has_construct_function = false)]
34                 public OAuthProxy.with_token (string consumer_key, string consumer_secret, string token, string token_secret, string url_format, bool binding_required);
35                 [NoAccessorMethod]
36                 public string consumer_key { owned get; construct; }
37                 [NoAccessorMethod]
38                 public string consumer_secret { owned get; construct; }
39                 public string token { get; set; }
40                 public string token_secret { get; set; }
41         }
42         [CCode (cheader_filename = "rest/oauth-proxy-call.h")]
43         public class OAuthProxyCall : Rest.ProxyCall {
44                 [CCode (has_construct_function = false)]
45                 protected OAuthProxyCall ();
46         }
47         [CCode (cheader_filename = "rest/rest-proxy.h")]
48         public class Proxy : GLib.Object {
49                 [CCode (has_construct_function = false)]
50                 public Proxy (string url_format, bool binding_required);
51                 public bool bind (...);
52                 public virtual bool bind_valist (void* @params);
53                 public static GLib.Quark error_quark ();
54                 public unowned string get_user_agent ();
55                 public virtual Rest.ProxyCall new_call ();
56                 public void set_user_agent (string user_agent);
57                 public bool simple_run (string payload, int64 len) throws GLib.Error;
58                 public virtual bool simple_run_valist (string payload, int64 len, void* @params) throws GLib.Error;
59                 [NoAccessorMethod]
60                 public bool binding_required { get; set; }
61                 [NoAccessorMethod]
62                 public string url_format { owned get; set; }
63                 public string user_agent { get; set; }
64         }
65         [CCode (cheader_filename = "rest/rest-proxy-call.h")]
66         public class ProxyCall : GLib.Object {
67                 [CCode (has_construct_function = false)]
68                 protected ProxyCall ();
69                 public void add_header (string header, string value);
70                 public void add_headers (...);
71                 public void add_headers_from_valist (void* headers);
72                 public void add_param (string param, string value);
73                 public void add_params (...);
74                 public void add_params_from_valist (void* @params);
75                 public bool cancel ();
76                 public static GLib.Quark error_quark ();
77                 public unowned string get_method ();
78                 public GLib.HashTable<string,string> get_params ();
79                 public unowned string get_payload ();
80                 public int64 get_payload_length ();
81                 public unowned GLib.HashTable get_response_headers ();
82                 public uint get_status_code ();
83                 public unowned string get_status_message ();
84                 public unowned string lookup_header (string header);
85                 public unowned string lookup_param (string param);
86                 public unowned string lookup_response_header (string header);
87                 [NoWrapper]
88                 public virtual bool prepare () throws GLib.Error;
89                 public void remove_header (string header);
90                 public void remove_param (string param);
91                 public bool run (out unowned GLib.MainLoop loop) throws GLib.Error;
92                 [CCode (cname = "rest_proxy_call_async")]
93                 public bool run_async ([CCode (delegate_target_pos = 2.9)] Rest.ProxyCallAsyncCallback callback, GLib.Object? weak_object) throws GLib.Error;
94                 public void set_function (string function);
95                 public void set_method (string method);
96                 public bool sync () throws GLib.Error;
97                 [NoAccessorMethod]
98                 public Rest.Proxy proxy { owned get; construct; }
99         }
100         [Compact]
101         [CCode (ref_function = "rest_xml_node_ref", unref_function = "rest_xml_node_unref", type_id = "REST_TYPE_XML_NODE", cheader_filename = "rest/rest-xml-parser.h")]
102         public class XmlNode {
103                 public weak GLib.HashTable attrs;
104                 public weak GLib.HashTable children;
105                 public weak string content;
106                 public weak string name;
107                 public weak Rest.XmlNode next;
108                 public int ref_count;
109                 public unowned Rest.XmlNode find (string tag);
110                 public unowned string get_attr (string attr_name);
111         }
112         [CCode (cheader_filename = "rest/rest-xml-parser.h")]
113         public class XmlParser : GLib.Object {
114                 [CCode (has_construct_function = false)]
115                 public XmlParser ();
116                 public unowned Rest.XmlNode parse_from_data (string data, int64 len);
117         }
118         [CCode (cprefix = "", has_type_id = false, cheader_filename = "rest/oauth-proxy.h")]
119         public enum OAuthSignatureMethod {
120                 PLAINTEXT,
121                 HMAC_SHA1
122         }
123         [CCode (cprefix = "REST_PROXY_CALL_", cheader_filename = "rest/rest-proxy-call.h")]
124         public errordomain ProxyCallError {
125                 FAILED,
126         }
127         [CCode (cprefix = "REST_PROXY_ERROR_", cheader_filename = "rest/rest-proxy.h")]
128         public errordomain ProxyError {
129                 CANCELLED,
130                 RESOLUTION,
131                 CONNECTION,
132                 SSL,
133                 IO,
134                 FAILED,
135                 HTTP_MULTIPLE_CHOICES,
136                 HTTP_MOVED_PERMANENTLY,
137                 HTTP_FOUND,
138                 HTTP_SEE_OTHER,
139                 HTTP_NOT_MODIFIED,
140                 HTTP_USE_PROXY,
141                 HTTP_THREEOHSIX,
142                 HTTP_TEMPORARY_REDIRECT,
143                 HTTP_BAD_REQUEST,
144                 HTTP_UNAUTHORIZED,
145                 HTTP_FOUROHTWO,
146                 HTTP_FORBIDDEN,
147                 HTTP_NOT_FOUND,
148                 HTTP_METHOD_NOT_ALLOWED,
149                 HTTP_NOT_ACCEPTABLE,
150                 HTTP_PROXY_AUTHENTICATION_REQUIRED,
151                 HTTP_REQUEST_TIMEOUT,
152                 HTTP_CONFLICT,
153                 HTTP_GONE,
154                 HTTP_LENGTH_REQUIRED,
155                 HTTP_PRECONDITION_FAILED,
156                 HTTP_REQUEST_ENTITY_TOO_LARGE,
157                 HTTP_REQUEST_URI_TOO_LONG,
158                 HTTP_UNSUPPORTED_MEDIA_TYPE,
159                 HTTP_REQUESTED_RANGE_NOT_SATISFIABLE,
160                 HTTP_EXPECTATION_FAILED,
161                 HTTP_INTERNAL_SERVER_ERROR,
162                 HTTP_NOT_IMPLEMENTED,
163                 HTTP_BAD_GATEWAY,
164                 HTTP_SERVICE_UNAVAILABLE,
165                 HTTP_GATEWAY_TIMEOUT,
166                 HTTP_HTTP_VERSION_NOT_SUPPORTED,
167         }
168         [CCode (cheader_filename = "rest/oauth-proxy.h")]
169         public delegate void OAuthProxyAuthCallback (Rest.OAuthProxy proxy, GLib.Error? error, GLib.Object? weak_object);
170         [CCode (cheader_filename = "rest/rest-proxy-call.h")]
171         public delegate void ProxyCallAsyncCallback (Rest.ProxyCall call, GLib.Error? error, GLib.Object? weak_object);