-
public weak TimeoutSource add_completion (MainContext? async_context, SourceFunc function)
Adds function to be executed from inside async_context with the default
priority. Use this when you want to complete an action in async_context's main loop, as soon as possible.
-
public weak TimeoutSource add_idle (MainContext? async_context, SourceFunc function)
Adds an idle event as with g_idle_add, but using the given async_context.
-
public weak TimeoutSource add_io_watch (MainContext? async_context, IOChannel chan, IOCondition condition, IOFunc function)
Adds an I/O watch as with add_watch
, but using the given async_context.
-
public weak TimeoutSource add_timeout (MainContext? async_context, uint interval, SourceFunc function)
Adds a timeout as with g_timeout_add, but using the given async_context.
-
public SList<Cookie> cookies_from_request (Message msg)
Parses msg's Cookie request header and returns a
SList of Cookies. As the
"Cookie" header, unlike "Set-Cookie", only contains cookie names and values, none of the other
Cookie fields will be filled in. (Thus, you can't generally pass a cookie returned from
this method directly to cookies_to_response.)
-
public SList<Cookie> cookies_from_response (Message msg)
Parses msg's Set-Cookie response headers and returns a
SList of Cookies. Cookies that
do not specify "path" or "domain" attributes will have their values defaulted from msg.
-
public string cookies_to_cookie_header (SList<Cookie> cookies)
Serializes a SList 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.
(If msg already has a "Cookie" request header, these cookies will be appended to the cookies already present. Be
careful that you do not append the same cookies twice, eg, when requeuing a message.)
-
public void cookies_to_response (SList<Cookie> cookies, Message msg)
Appends a "Set-Cookie" response header to msg for each cookie in cookies.
(This is in addition to any other "Set-Cookie" headers msg may already have.)
-
public HashTable<string,string> form_decode (string encoded_form)
-
public HashTable<string,string> form_decode_multipart (Message msg, string file_control_name, out string filename, out string content_type, out Buffer file)
-
public string form_encode (...)
-
public string form_encode_datalist (void* form_data_set)
-
public string form_encode_hash (HashTable<string,string> form_data_set)
-
public string form_encode_valist (string first_field, void* args)
-
public Message form_request_new (string method, string uri, ...)
-
public Message form_request_new_from_datalist (string method, string uri, void* form_data_set)
-
public Message form_request_new_from_hash (string method, string uri, HashTable<string,string> form_data_set)
-
public 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). Note that this can't be used with lists that have qvalues.
-
public void header_free_param_list (HashTable<string,string> param_list)
Frees param_list.
-
public void header_g_string_append_param (StringBuilder string, 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 string, string name, string value)
Appends something like
name="@value" to string, taking care to escape any quotes or backslashes in value.
-
public SList<string> header_parse_list (string header)
Parses a header whose content is described by RFC2616 as "#something", where "something" does not
itself contain commas, except as part of quoted-strings.
-
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, out SList<string> unacceptable)
Parses a header whose content is a list of items with optional "qvalue"s (eg, Accept, Accept-Charset,
Accept-Encoding, Accept-Language, TE).
-
public HashTable<string,string> header_parse_semi_param_list (string header)
Parses a header which is a semicolon-delimited list of something like: token [ "=" ( token |
quoted-string ) ].
-
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. Beware that dest may be modified even on failure.
-
public uint headers_parse_request (string str, int len, MessageHeaders req_headers, out string req_method, out string req_path, out 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, out HTTPVersion ver, out 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, out HTTPVersion ver, out uint status_code, out string reason_phrase)
Parses the HTTP Status-Line string in status_line into ver,
status_code, and reason_phrase. status_line must be terminated by 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. This is used by
set_status to get the correct text to go with a given 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, ...)
Appends the provided value of type type to array as with
append. (The provided data is copied rather than being
inserted directly.)
-
public void value_array_append_vals (ValueArray array, ...)
Appends the provided values into array as with
append. (The provided data is copied rather than being
inserted directly.)
-
public ValueArray value_array_from_args (va_list args)
Creates a ValueArray from the provided
arguments, which must consist of pairs of a Type and a value of that
type, terminated by INVALID. (The array will contain copies of
the provided data rather than pointing to the passed-in data directly.)
-
public bool value_array_get_nth (ValueArray array, uint index_, Type type, ...)
Gets the index_ element of array and stores its value into the provided
location.
-
public void value_array_insert (ValueArray array, uint index_, Type type, ...)
Inserts the provided value of type type into array as with
insert. (The provided data is copied rather than being
inserted directly.)
-
public ValueArray value_array_new ()
Creates a new ValueArray. (This is
just a wrapper around ValueArray, for naming
consistency purposes.)
-
public ValueArray value_array_new_with_vals (...)
Creates a new ValueArray and copies
the provided values into it.
-
public bool value_array_to_args (ValueArray array, va_list args)
Extracts a ValueArray into the
provided arguments, which must consist of pairs of a Type and a value of
pointer-to-that-type, terminated by INVALID. The returned
values will point to the same memory as the values in the array.
-
public void value_hash_insert (HashTable<string,Value> hash, string key, Type type, ...)
Inserts the provided value of type type into hash. (Unlike with
set, both the key and the value are copied).
-
public void value_hash_insert_vals (HashTable<string,Value> hash, ...)
Inserts the given data into hash. As with
value_hash_insert, the keys and values are copied rather than being
inserted directly.
-
public void value_hash_insert_value (HashTable<string,Value> hash, string key, Value value)
Inserts value into hash. (Unlike with
set, both the key and the value are copied).
-
public bool value_hash_lookup (HashTable<string,Value> hash, string key, Type type, ...)
Looks up key in hash and stores its value into the provided location.
-
public bool value_hash_lookup_vals (HashTable<string,Value> hash, ...)
Looks up a number of keys in hash and returns their values.
-
public HashTable<string,Value> value_hash_new ()
Creates a HashTable whose keys are strings
and whose values are Value.
-
public HashTable<string,Value> value_hash_new_with_vals (...)
Creates a HashTable whose keys are strings
and whose values are Value, and initializes it with the provided data.
As with value_hash_insert, the keys and values are copied rather than being
inserted directly.
-
public unowned string xmlrpc_build_fault (int fault_code, string fault_format, ...)
-
public unowned string xmlrpc_build_method_call (string method_name, Value[] params)
-
public unowned string xmlrpc_build_method_response (Value value)
-
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)
-
public bool xmlrpc_parse_method_response (string method_response, int length, Value value) throws Error
-
public weak 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, ...)