-
public unowned
TimeoutSource add_completion (MainContext async_context, SourceFunc function, void* data)
Adds function to be executed from inside async_context with the default priority.
-
public unowned
TimeoutSource add_idle (MainContext async_context, SourceFunc function, void* data)
Adds an idle event as with g_idle_add, but using the given If you want function to
run "right away", use add_completion, since that sets a higher priority on the
GSource than add_idle does.
-
public unowned
TimeoutSource add_timeout (MainContext async_context, uint interval, SourceFunc function, void* data)
Adds a timeout as with g_timeout_add, but using the given with g_source_destroy.
-
public
SList<Cookie> cookies_from_request (Message msg)
Parses msg's Cookie request header and returns a GSList of
Cookies.
-
public
SList<Cookie> cookies_from_response (Message msg)
Parses msg's Set-Cookie response headers and returns a GSList of
Cookies.
-
public unowned
string cookies_to_cookie_header (SList<Cookie> cookies)
Serializes a GSList of Cookie into a string
suitable for setting as the value of the "Cookie" header.
-
public void cookies_to_request (
SList<Cookie> cookies, Message msg)
Adds the name and value of each cookie in cookies to msg's "Cookie" request.
-
public void cookies_to_response (
SList<Cookie> cookies, Message msg)
Appends a "Set-Cookie" response header to msg for each cookie in
-
public
HashTable<string,string> form_decode (string encoded_form)
Decodes form, which is an urlencoded dataset as defined in the HTML 4.
-
public
HashTable<string,string> form_decode_multipart (Message msg, string file_control_name, out string filename, out string content_type, out Buffer file)
Decodes the "multipart/form-data" request in msg; this is a convenience method for the case
when you have a single file upload control in a form.
-
public unowned
string form_encode (...)
-
public unowned
string form_encode_datalist (void* form_data_set)
Encodes form_data_set into a value of type "application/x-www-form-urlencoded", as defined in
the HTML 4.
-
public unowned
string form_encode_hash (HashTable<string,string> form_data_set)
Encodes form_data_set into a value of type "application/x-www-form-urlencoded", as defined in
the HTML 4.
-
public unowned
string form_encode_valist (string first_field, void* args)
-
public unowned Message form_request_new (
string method, string uri, ...)
-
public unowned Message form_request_new_from_datalist (
string method, string uri, void* form_data_set)
Creates a new Message and sets it up to send
form_data_set to
-
public unowned Message form_request_new_from_hash (
string method, string uri, HashTable<string,string> form_data_set)
Creates a new Message and sets it up to send
form_data_set to
-
public unowned Message form_request_new_from_multipart (
string uri, Multipart multipart)
-
public
bool header_contains (string header, string token)
Parses header to see if it contains the token token (matched case-insensitively).
-
public void header_g_string_append_param (
StringBuilder str, string name, string value)
Appends something like @name=@value to string, taking care to quote value
if needed, and if so, to escape any quotes or backslashes in value.
-
public void header_g_string_append_param_quoted (
StringBuilder str, string name, string value)
Appends something like @name="@value" to
-
public
SList<string> header_parse_list (string header)
-
public
HashTable<string,string> header_parse_param_list (string header)
Parses a header which is a comma-delimited list of something like: token [ "=" ( token | quoted-string
) ].
-
public
SList<string> header_parse_quality_list (string header, SList<string> unacceptable)
-
public
HashTable<string,string> header_parse_semi_param_list (string header)
Parses a header which is a semicolon-delimited list of something Tokens that don't have an associated value
will still be added to the resulting hash table, but with a null value.
-
public
bool headers_parse (string str, int len, MessageHeaders dest)
Parses the headers of an HTTP request or response in str and stores the results in dest
.
-
public
uint headers_parse_request (string str, int len, MessageHeaders req_headers, out string req_method, out string req_path, HTTPVersion ver)
Parses the headers of an HTTP request in str and stores the results in req_method,
req_path, ver, and req_headers.
-
public
bool headers_parse_response (string str, int len, MessageHeaders headers, HTTPVersion ver, uint status_code, out string reason_phrase)
Parses the headers of an HTTP response in str and stores the results in ver,
status_code, reason_phrase, and headers.
-
public
bool headers_parse_status_line (string status_line, HTTPVersion ver, uint status_code, out string reason_phrase)
Parses the HTTP Status-Line string in status_line into ver, either "\0" or "\r\n".
-
public
Quark http_error_quark ()
-
public
Quark ssl_error_quark ()
-
public unowned
string status_get_phrase (uint status_code)
Looks up the stock HTTP description of status_code.
-
public
uint status_proxify (uint status_code)
-
public
bool str_case_equal (void* v1, void* v2)
Compares v1 and v2 in a case-insensitive manner
-
public
uint str_case_hash (void* key)
Hashes key in a case-insensitive manner.
-
public void value_array_append (
ValueArray array, Type type)
-
public void value_array_append_vals (
ValueArray array, ...)
-
public unowned
ValueArray value_array_from_args (void* args)
-
public
bool value_array_get_nth (ValueArray array, uint index_, Type type)
-
public void value_array_insert (
ValueArray array, uint index_, Type type)
-
public unowned
ValueArray value_array_new ()
Creates a new GValueArray.
-
public unowned
ValueArray value_array_new_with_vals (...)
-
public
bool value_array_to_args (ValueArray array, void* args)
-
public void value_hash_insert (
HashTable<string,Value> hash, string key, Type type, ...)
-
public void value_hash_insert_vals (
HashTable<string,Value> hash, ...)
-
public void value_hash_insert_value (
HashTable<string,Value> hash, string key, Value value)
Inserts value into hash.
-
public
bool value_hash_lookup (HashTable<string,Value> hash, string key, Type type)
-
public
bool value_hash_lookup_vals (HashTable<string,Value> hash, ...)
-
public
HashTable<string,Value> value_hash_new ()
Creates a GHashTable whose keys are strings and whose values are GValue.
-
public
HashTable<string,Value> value_hash_new_with_vals (...)
-
public unowned
string xmlrpc_build_fault (int fault_code, string fault_format, ...)
-
public unowned
string xmlrpc_build_method_call (string method_name, Value[] params)
This creates an XML-RPC methodCall and returns it as a string.
-
public unowned
string xmlrpc_build_method_response (Value value)
This creates a (successful) XML-RPC methodResponse and returns it as a string.
-
public
Quark xmlrpc_error_quark ()
-
public
bool xmlrpc_extract_method_call (string method_call, int length, out string method_name, ...)
-
public
bool xmlrpc_extract_method_response (string method_response, int length, ...) throws Error
-
public
Quark xmlrpc_fault_quark ()
-
public
bool xmlrpc_parse_method_call (string method_call, int length, out string method_name, out ValueArray params)
Parses method_call to get the name and parameters, and returns the parameter values in a
GValueArray; see also xmlrpc_extract_method_call, which is more
convenient if you know in advance what the types of the parameters will be.
-
public
bool xmlrpc_parse_method_response (string method_response, int length, Value value) throws Error
Parses method_response and returns the return value in value.
-
public unowned Message xmlrpc_request_new (
string uri, string method_name, ...)
-
public void xmlrpc_set_fault (Message msg,
int fault_code, string fault_format, ...)
-
public void xmlrpc_set_response (Message msg, ...)