posix: add feature test macro _GNU_SOURCE for exp10(3) and exp10f(3)
[vala-gnome.git] / vapi / rest-0.7.vapi
blobd8a7d44fc1313ab09b50532af40b0950c34fb91a
1 /* rest-0.7.vapi generated by vapigen, do not modify. */
3 [CCode (cprefix = "Rest", gir_namespace = "Rest", gir_version = "0.7", lower_case_cprefix = "rest_")]
4 namespace Rest {
5         [CCode (cheader_filename = "rest/oauth2-proxy.h", cname = "OAuth2Proxy", lower_case_cprefix = "oauth2_proxy_", type_id = "oauth2_proxy_get_type ()")]
6         public class OAuth2Proxy : Rest.Proxy {
7                 [CCode (has_construct_function = false, type = "RestProxy*")]
8                 public OAuth2Proxy (string client_id, string auth_endpoint, string url_format, bool binding_required);
9                 public string build_login_url (string redirect_uri);
10                 public string build_login_url_full (string redirect_uri, GLib.HashTable<void*,void*> extra_params);
11                 public static string extract_access_token (string url);
12                 public unowned string get_access_token ();
13                 public void set_access_token (string access_token);
14                 [CCode (has_construct_function = false, type = "RestProxy*")]
15                 public OAuth2Proxy.with_token (string client_id, string access_token, string auth_endpoint, string url_format, bool binding_required);
16                 public string access_token { get; set; }
17                 [NoAccessorMethod]
18                 public string auth_endpoint { owned get; construct; }
19                 [NoAccessorMethod]
20                 public string client_id { owned get; construct; }
21         }
22         [CCode (cheader_filename = "rest/oauth2-proxy-call.h", cname = "OAuth2ProxyCall", lower_case_cprefix = "oauth2_proxy_call_", type_id = "oauth2_proxy_call_get_type ()")]
23         public class OAuth2ProxyCall : Rest.ProxyCall {
24                 [CCode (has_construct_function = false)]
25                 protected OAuth2ProxyCall ();
26         }
27         [CCode (cheader_filename = "rest/oauth-proxy.h", cname = "OAuthProxy", lower_case_cprefix = "oauth_proxy_", type_id = "oauth_proxy_get_type ()")]
28         public class OAuthProxy : Rest.Proxy {
29                 [CCode (has_construct_function = false, type = "RestProxy*")]
30                 public OAuthProxy (string consumer_key, string consumer_secret, string url_format, bool binding_required);
31                 public bool access_token (string function, string verifier) throws GLib.Error;
32                 public bool access_token_async (string function, string verifier, [CCode (delegate_target_pos = 4.1, scope = "async")] Rest.OAuthProxyAuthCallback callback, GLib.Object weak_object) throws GLib.Error;
33                 public bool auth_step (string function) throws GLib.Error;
34                 public bool auth_step_async (string function, [CCode (delegate_target_pos = 3.1, scope = "async")] Rest.OAuthProxyAuthCallback callback, GLib.Object weak_object) throws GLib.Error;
35                 public unowned string get_signature_host ();
36                 public unowned string get_token ();
37                 public unowned string get_token_secret ();
38                 public bool is_oauth10a ();
39                 public Rest.Proxy new_echo_proxy (string service_url, string url_format, bool binding_required);
40                 public bool request_token (string function, string callback_uri) throws GLib.Error;
41                 public bool request_token_async (string function, string callback_uri, [CCode (delegate_target_pos = 4.1, scope = "async")] Rest.OAuthProxyAuthCallback callback, GLib.Object weak_object) throws GLib.Error;
42                 public void set_signature_host (string signature_host);
43                 public void set_token (string token);
44                 public void set_token_secret (string token_secret);
45                 [CCode (has_construct_function = false, type = "RestProxy*")]
46                 public OAuthProxy.with_token (string consumer_key, string consumer_secret, string token, string token_secret, string url_format, bool binding_required);
47                 [NoAccessorMethod]
48                 public string consumer_key { owned get; construct; }
49                 [NoAccessorMethod]
50                 public string consumer_secret { owned get; construct; }
51                 public string signature_host { get; set; }
52                 [NoAccessorMethod]
53                 public Rest.OAuthSignatureMethod signature_method { get; set; }
54                 public string token { get; set; }
55                 public string token_secret { get; set; }
56         }
57         [CCode (cheader_filename = "rest/oauth-proxy-call.h", cname = "OAuthProxyCall", lower_case_cprefix = "oauth_proxy_call_", type_id = "oauth_proxy_call_get_type ()")]
58         public class OAuthProxyCall : Rest.ProxyCall {
59                 [CCode (has_construct_function = false)]
60                 protected OAuthProxyCall ();
61                 public void parse_token_reponse ();
62                 public void parse_token_response ();
63         }
64         [CCode (cheader_filename = "rest/rest-param.h", ref_function = "rest_param_ref", type_id = "rest_param_get_type ()", unref_function = "rest_param_unref")]
65         [Compact]
66         public class Param {
67                 [CCode (has_construct_function = false)]
68                 public Param.full (global::string name, Rest.MemoryUse use, [CCode (array_length_cname = "length", array_length_pos = 3.5, array_length_type = "gsize")] uint8[] data, global::string content_type, global::string filename);
69                 public void* get_content ();
70                 public size_t get_content_length ();
71                 public unowned global::string get_content_type ();
72                 public unowned global::string get_file_name ();
73                 public unowned global::string get_name ();
74                 public bool is_string ();
75                 public unowned Rest.Param @ref ();
76                 [CCode (has_construct_function = false)]
77                 public Param.string (global::string name, Rest.MemoryUse use, global::string string);
78                 public void unref ();
79                 [CCode (has_construct_function = false)]
80                 public Param.with_owner (global::string name, [CCode (array_length_cname = "length", array_length_pos = 2.5, array_length_type = "gsize")] uint8[] data, global::string content_type, global::string? filename, owned void* owner, GLib.DestroyNotify? owner_dnotify);
81         }
82         [CCode (cheader_filename = "rest/rest-params.h", has_type_id = false)]
83         [Compact]
84         public class Params {
85                 public void add (owned Rest.Param param);
86                 public bool are_strings ();
87                 public GLib.HashTable<weak string,weak string> as_string_hash_table ();
88                 public void free ();
89                 public unowned Rest.Param? @get (string name);
90                 public void remove (string name);
91         }
92         [CCode (cheader_filename = "rest/rest-params.h", has_type_id = false)]
93         [Compact]
94         public class ParamsIter {
95                 public void init (Rest.Params @params);
96                 public bool next (string name, Rest.Param param);
97         }
98         [CCode (cheader_filename = "rest/rest-proxy.h", type_id = "rest_proxy_get_type ()")]
99         public class Proxy : GLib.Object {
100                 [CCode (has_construct_function = false)]
101                 public Proxy (string url_format, bool binding_required);
102                 [Version (since = "0.7.92")]
103                 public void add_soup_feature (Soup.SessionFeature feature);
104                 public bool bind (...);
105                 public unowned string get_user_agent ();
106                 public virtual Rest.ProxyCall new_call ();
107                 public void set_user_agent (string user_agent);
108                 [CCode (has_construct_function = false)]
109                 public Proxy.with_authentication (string url_format, bool binding_required, string username, string password);
110                 [NoAccessorMethod]
111                 public bool binding_required { get; set; }
112                 [NoAccessorMethod]
113                 public bool disable_cookies { get; construct; }
114                 [NoAccessorMethod]
115                 public string password { owned get; set; }
116                 [NoAccessorMethod]
117                 public string ssl_ca_file { owned get; set; }
118                 [NoAccessorMethod]
119                 public bool ssl_strict { get; set; }
120                 [NoAccessorMethod]
121                 public string url_format { owned get; set; }
122                 public string user_agent { get; set; }
123                 [NoAccessorMethod]
124                 public string username { owned get; set; }
125                 public virtual signal bool authenticate (Rest.ProxyAuth auth, bool retrying);
126         }
127         [CCode (cheader_filename = "rest/oauth-proxy-call.h,rest/oauth-proxy.h,rest/oauth2-proxy-call.h,rest/oauth2-proxy.h,rest/rest-enum-types.h,rest/rest-param.h,rest/rest-params.h,rest/rest-proxy-auth.h,rest/rest-proxy-call.h,rest/rest-proxy.h,rest/rest-xml-node.h,rest/rest-xml-parser.h", type_id = "rest_proxy_auth_get_type ()")]
128         public class ProxyAuth : GLib.Object {
129                 [CCode (has_construct_function = false)]
130                 protected ProxyAuth ();
131                 public void cancel ();
132                 public void pause ();
133                 public void unpause ();
134         }
135         [CCode (cheader_filename = "rest/rest-proxy-call.h", type_id = "rest_proxy_call_get_type ()")]
136         public class ProxyCall : GLib.Object {
137                 [CCode (has_construct_function = false)]
138                 protected ProxyCall ();
139                 public void add_header (string header, string value);
140                 public void add_headers (...);
141                 public void add_param (string name, string value);
142                 public void add_param_full (owned Rest.Param param);
143                 public void add_params (...);
144                 public bool cancel ();
145                 public bool continuous ([CCode (delegate_target_pos = 2.1)] Rest.ProxyCallContinuousCallback callback, GLib.Object weak_object) throws GLib.Error;
146                 [Version (since = "0.7.92")]
147                 public unowned string get_function ();
148                 public unowned string get_method ();
149                 public unowned Rest.Params get_params ();
150                 public unowned string get_payload ();
151                 public int64 get_payload_length ();
152                 public GLib.HashTable<weak string,weak string> get_response_headers ();
153                 public uint get_status_code ();
154                 public unowned string get_status_message ();
155                 public async bool invoke_async (GLib.Cancellable? cancellable) throws GLib.Error;
156                 public unowned string lookup_header (string header);
157                 public Rest.Param lookup_param (string name);
158                 public unowned string lookup_response_header (string header);
159                 [NoWrapper]
160                 public virtual bool prepare () throws GLib.Error;
161                 public void remove_header (string header);
162                 public void remove_param (string name);
163                 public bool run (out unowned GLib.MainLoop loop = null) throws GLib.Error;
164                 [CCode (cname = "rest_proxy_call_async")]
165                 public bool run_async ([CCode (delegate_target_pos = 2.1)] Rest.ProxyCallAsyncCallback callback, GLib.Object? weak_object = null) throws GLib.Error;
166                 public virtual bool serialize_params (out string content_type, out string content, out size_t content_len) throws GLib.Error;
167                 public void set_function (string function);
168                 public void set_method (string method);
169                 public bool sync () throws GLib.Error;
170                 public bool upload ([CCode (delegate_target_pos = 2.1, scope = "async")] Rest.ProxyCallUploadCallback callback, GLib.Object weak_object) throws GLib.Error;
171                 [NoAccessorMethod]
172                 public Rest.Proxy proxy { owned get; construct; }
173         }
174         [CCode (cheader_filename = "rest/rest-xml-node.h", ref_function = "rest_xml_node_ref", type_id = "rest_xml_node_get_type ()", unref_function = "rest_xml_node_unref")]
175         [Compact]
176         public class XmlNode {
177                 public weak GLib.HashTable<void*,void*> attrs;
178                 public weak GLib.HashTable<void*,void*> children;
179                 public weak string content;
180                 public weak string name;
181                 public weak Rest.XmlNode next;
182                 public void add_attr (string attribute, string value);
183                 public unowned Rest.XmlNode add_child (string tag);
184                 public Rest.XmlNode find (string tag);
185                 public void free ();
186                 public unowned string get_attr (string attr_name);
187                 public string print ();
188                 public unowned Rest.XmlNode @ref ();
189                 public void set_content (string value);
190                 public void unref ();
191         }
192         [CCode (cheader_filename = "rest/rest-xml-parser.h", type_id = "rest_xml_parser_get_type ()")]
193         public class XmlParser : GLib.Object {
194                 [CCode (has_construct_function = false)]
195                 public XmlParser ();
196                 public Rest.XmlNode parse_from_data (string data, int64 len);
197         }
198         [CCode (cheader_filename = "rest/rest-param.h", cprefix = "REST_MEMORY_", has_type_id = false)]
199         public enum MemoryUse {
200                 STATIC,
201                 TAKE,
202                 COPY
203         }
204         [CCode (cheader_filename = "rest/oauth-proxy.h", cname = "OAuthSignatureMethod", cprefix = "", type_id = "oauth_signature_method_get_type ()")]
205         public enum OAuthSignatureMethod {
206                 PLAINTEXT,
207                 HMAC_SHA1
208         }
209         [CCode (cheader_filename = "rest/rest-proxy-call.h", cprefix = "REST_PROXY_CALL_")]
210         public errordomain ProxyCallError {
211                 FAILED;
212                 public static GLib.Quark quark ();
213         }
214         [CCode (cheader_filename = "rest/rest-proxy.h", cprefix = "REST_PROXY_ERROR_")]
215         public errordomain ProxyError {
216                 CANCELLED,
217                 RESOLUTION,
218                 CONNECTION,
219                 SSL,
220                 IO,
221                 FAILED,
222                 HTTP_MULTIPLE_CHOICES,
223                 HTTP_MOVED_PERMANENTLY,
224                 HTTP_FOUND,
225                 HTTP_SEE_OTHER,
226                 HTTP_NOT_MODIFIED,
227                 HTTP_USE_PROXY,
228                 HTTP_THREEOHSIX,
229                 HTTP_TEMPORARY_REDIRECT,
230                 HTTP_BAD_REQUEST,
231                 HTTP_UNAUTHORIZED,
232                 HTTP_FOUROHTWO,
233                 HTTP_FORBIDDEN,
234                 HTTP_NOT_FOUND,
235                 HTTP_METHOD_NOT_ALLOWED,
236                 HTTP_NOT_ACCEPTABLE,
237                 HTTP_PROXY_AUTHENTICATION_REQUIRED,
238                 HTTP_REQUEST_TIMEOUT,
239                 HTTP_CONFLICT,
240                 HTTP_GONE,
241                 HTTP_LENGTH_REQUIRED,
242                 HTTP_PRECONDITION_FAILED,
243                 HTTP_REQUEST_ENTITY_TOO_LARGE,
244                 HTTP_REQUEST_URI_TOO_LONG,
245                 HTTP_UNSUPPORTED_MEDIA_TYPE,
246                 HTTP_REQUESTED_RANGE_NOT_SATISFIABLE,
247                 HTTP_EXPECTATION_FAILED,
248                 HTTP_INTERNAL_SERVER_ERROR,
249                 HTTP_NOT_IMPLEMENTED,
250                 HTTP_BAD_GATEWAY,
251                 HTTP_SERVICE_UNAVAILABLE,
252                 HTTP_GATEWAY_TIMEOUT,
253                 HTTP_HTTP_VERSION_NOT_SUPPORTED;
254                 public static GLib.Quark quark ();
255         }
256         [CCode (cheader_filename = "rest/oauth-proxy.h", instance_pos = 3.9)]
257         public delegate void OAuthProxyAuthCallback (Rest.OAuthProxy proxy, GLib.Error? error, GLib.Object? weak_object);
258         [CCode (cheader_filename = "rest/rest-proxy-call.h", instance_pos = 3.9)]
259         public delegate void ProxyCallAsyncCallback (Rest.ProxyCall call, GLib.Error? error, GLib.Object? weak_object);
260         [CCode (cheader_filename = "rest/rest-proxy-call.h", instance_pos = 5.9)]
261         public delegate void ProxyCallContinuousCallback (Rest.ProxyCall call, string buf, size_t len, GLib.Error? error, GLib.Object? weak_object);
262         [CCode (cheader_filename = "rest/rest-proxy-call.h", instance_pos = 5.9)]
263         public delegate void ProxyCallUploadCallback (Rest.ProxyCall call, size_t total, size_t uploaded, GLib.Error? error, GLib.Object? weak_object);