[vala/staging: 1/2] glib-2.0: Add GLib.Uri bindings (since 2.66)
- From: Rico Tzschichholz <ricotz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala/staging: 1/2] glib-2.0: Add GLib.Uri bindings (since 2.66)
- Date: Fri, 26 Jun 2020 16:36:19 +0000 (UTC)
commit 3c69e297eda4b287a6a37d30d4bf46b83241a453
Author: Rico Tzschichholz <ricotz ubuntu com>
Date: Fri Jun 26 18:22:12 2020 +0200
glib-2.0: Add GLib.Uri bindings (since 2.66)
vapi/glib-2.0.vapi | 102 ++++++++++++++++++++++++++++++++++++++++++++++++++++-
1 file changed, 101 insertions(+), 1 deletion(-)
---
diff --git a/vapi/glib-2.0.vapi b/vapi/glib-2.0.vapi
index 2374928c6..53a1a73ee 100644
--- a/vapi/glib-2.0.vapi
+++ b/vapi/glib-2.0.vapi
@@ -3947,26 +3947,126 @@ namespace GLib {
/* URI Functions */
- namespace Uri {
+ [Compact]
+ [CCode (ref_function = "g_uri_ref", unref_function = "g_uri_unref", type_id = "G_TYPE_URI")]
+ public class Uri {
+ [Version (since = "2.16")]
public const string RESERVED_CHARS_ALLOWED_IN_PATH;
+ [Version (since = "2.16")]
public const string RESERVED_CHARS_ALLOWED_IN_PATH_ELEMENT;
+ [Version (since = "2.16")]
public const string RESERVED_CHARS_ALLOWED_IN_USERINFO;
+ [Version (since = "2.16")]
public const string RESERVED_CHARS_GENERIC_DELIMITERS;
+ [Version (since = "2.16")]
public const string RESERVED_CHARS_SUBCOMPONENT_DELIMITERS;
+ [Version (since = "2.66")]
+ public static bool split (string uri_string, UriFlags flags, out string? scheme, out string?
userinfo, out string? host, out int port, out string? path, out string? query, out string? fragment) throws
UriError;
+ [Version (since = "2.66")]
+ public static bool split_with_user (string uri_string, UriFlags flags, out string? scheme,
out string? user, out string? password, out string? auth_params, out string? host, out int port, out string?
path, out string? query, out string? fragment) throws UriError;
+ [Version (since = "2.66")]
+ public static bool split_network (string uri_string, UriFlags flags, out string? scheme, out
string? host, out int port) throws UriError;
+ [Version (since = "2.66")]
+ public static bool is_valid (string uri_string, UriFlags flags) throws UriError;
+ [Version (since = "2.66")]
+ public static string join (UriFlags flags, string scheme, string? userinfo, string? host, int
port, string path, string? query, string? fragment);
+ [Version (since = "2.66")]
+ public static string join_with_user (UriFlags flags, string scheme, string? user, string?
password, string? auth_params, string? host, int port, string path, string? query, string? fragment);
+
+ [Version (since = "2.66")]
+ public static Uri parse (string uri_string, UriFlags flags) throws UriError;
+ [Version (since = "2.66")]
+ public static Uri parse_relative (Uri? base_uri, string uri_string, UriFlags flags) throws
UriError;
+ [Version (since = "2.66")]
+ public static string resolve_relative (string base_uri_string, string uri_string, UriFlags
flags) throws UriError;
+ [Version (since = "2.66")]
+ public static Uri build (UriFlags flags, string scheme, string? userinfo, string? host, int
port, string path, string? query, string? fragment);
+ [Version (since = "2.66")]
+ public static Uri build_with_user (UriFlags flags, string scheme, string? user, string?
password, string? auth_params, string? host, int port, string path, string? query, string? fragment);
+
+ [Version (since = "2.66")]
+ public unowned string get_scheme ();
+ [Version (since = "2.66")]
+ public unowned string? get_userinfo ();
+ [Version (since = "2.66")]
+ public unowned string? get_user ();
+ [Version (since = "2.66")]
+ public unowned string? get_password ();
+ [Version (since = "2.66")]
+ public unowned string? get_auth_params ();
+ [Version (since = "2.66")]
+ public unowned string? get_host ();
+ [Version (since = "2.66")]
+ public int get_port ();
+ [Version (since = "2.66")]
+ public unowned string get_path ();
+ [Version (since = "2.66")]
+ public unowned string? get_query ();
+ [Version (since = "2.66")]
+ public unowned string? get_fragment ();
+ [Version (since = "2.66")]
+ public UriFlags get_flags ();
+
+ [Version (since = "2.16")]
+ public static string? parse_params (string uri, size_t length, char separator, bool
case_insensitive);
[Version (since = "2.16")]
public static string? parse_scheme (string uri);
+ [Version (since = "2.66")]
+ public static unowned string? peek_scheme (string uri);
[Version (since = "2.16")]
public static string escape_string (string unescaped, string? reserved_chars_allowed = null,
bool allow_utf8 = true);
[Version (since = "2.16")]
public static string? unescape_string (string escaped_string, string? illegal_characters =
null);
[Version (since = "2.16")]
public static string? unescape_segment (string? escaped_string, string? escaped_string_end,
string? illegal_characters = null);
+ [Version (since = "2.66")]
+ public static Bytes? unescape_bytes (string escaped_string, size_t length);
+ [Version (since = "2.66")]
+ public static string? escape_bytes ([CCode (array_length_type = "gsize")] uint8[] unescaped,
string? reserved_chars_allowed = null);
[Version (since = "2.6")]
[CCode (array_length = false, array_null_terminated = true)]
public static string[] list_extract_uris (string uri_list);
}
+ [Version (since = "2.66")]
+ public errordomain UriError {
+ MISC,
+ BAD_SCHEME,
+ BAD_USER,
+ BAD_PASSWORD,
+ BAD_AUTH_PARAMS,
+ BAD_HOST,
+ BAD_PORT,
+ BAD_PATH,
+ BAD_QUERY,
+ BAD_FRAGMENT;
+ public static GLib.Quark quark ();
+ }
+
+ [Flags]
+ [Version (since = "2.66")]
+ [CCode (cprefix = "G_URI_FLAGS_", has_type_id = false)]
+ public enum UriFlags {
+ NONE,
+ PARSE_STRICT,
+ HAS_PASSWORD,
+ HAS_AUTH_PARAMS,
+ ENCODED,
+ NON_DNS
+ }
+
+ [Flags]
+ [Version (since = "2.66")]
+ [CCode (cprefix = "G_URI_HIDE_", has_type_id = false)]
+ public enum UriHideFlags {
+ NONE,
+ USERINFO,
+ PASSWORD,
+ AUTH_PARAMS,
+ FRAGMENT
+ }
+
/* Shell-related Utilities */
public errordomain ShellError {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]