Uri
Object Hierarchy:
Description:
[ CCode ( ref_function = "gst_uri_ref" , type_id = "gst_uri_get_type ()" , unref_function = "gst_uri_unref" ) ]
public sealed class Uri
public sealed class Uri
A Uri object can be used to parse and split a URI string into its constituent parts.
Two Uri objects can be joined to make a new Uri using the algorithm described in RFC3986.
Namespace: Gst
Package: gstreamer-1.0
Content:
Static methods:
- public static string @construct (string protocol, string location)
- public static Uri? from_string (string uri)
- public static Uri? from_string_escaped (string uri)
- public static string? get_location (string uri)
- public static string? get_protocol (string uri)
- public static bool has_protocol (string uri, string protocol)
- public static bool is_valid (string uri)
- public static string? join_strings (string base_uri, string ref_uri)
- public static bool protocol_is_supported (URIType type, string protocol)
- public static bool protocol_is_valid (string protocol)
Creation methods:
- public Uri (string? scheme, string? userinfo, string? host, uint port, string? path, string? query, string? fragment)
Creates a new Uri object with the given URI parts.
Methods:
- public unowned Uri @ref ()
Add a reference to this Uri object.
- public bool append_path (string? relative_path)
Append a path onto the end of the path in the URI.
- public bool append_path_segment (string? path_segment)
Append a single path segment onto the end of the URI path.
- public Uri copy ()
Create a new Uri object with the same data as this Uri object.
- public bool equal (Uri second)
Compares two Uri objects to see if they represent the same normalized URI.
- public Uri? from_string_with_base (string uri)
Like from_string but also joins with a base URI.
- public unowned string? get_fragment ()
Get the fragment name from the URI or
null
if it doesn't exist. - public unowned string? get_host ()
Get the host name from the URI or
null
if it doesn't exist. - public HashTable<string,string>? get_media_fragment_table ()
Get the media fragment table from the URI, as defined by "Media Fragments URI 1.0".
- public string? get_path ()
Extract the path string from the URI object.
- public List<string> get_path_segments ()
Get a list of path segments from the URI.
- public string? get_path_string ()
Extract the path string from the URI object as a percent encoded URI path.
- public uint get_port ()
Get the port number from the URI or URI_NO_PORT if it doesn't exist.
- public List<unowned string> get_query_keys ()
Get a list of the query keys from the URI.
- public string? get_query_string ()
Get a percent encoded URI query string from the this.
- public string? get_query_string_ordered (List<string>? keys)
Get a percent encoded URI query string from the this, with query parameters in the order provided by the
keys
list. - public HashTable<string,string>? get_query_table ()
Get the query table from the URI.
- public unowned string? get_query_value (string query_key)
Get the value associated with the
query_key
key. - public unowned string? get_scheme ()
Get the scheme name from the URI or
null
if it doesn't exist. - public unowned string? get_userinfo ()
Get the userinfo (usually in the form "username:password") from the URI or
null
if it doesn't exist. - public bool is_normalized ()
Tests the this to see if it is normalized.
- public bool is_writable ()
Check if it is safe to write to this Uri.
- public Uri? join (Uri? ref_uri)
Join a reference URI onto a base URI using the method from RFC 3986.
- public Uri make_writable ()
Make the Uri writable.
- public Uri new_with_base (string? scheme, string? userinfo, string? host, uint port, string? path, string? query, string? fragment)
Like Uri , but joins the new URI onto a base URI.
- public bool normalize ()
Normalization will remove extra path segments (".
- public bool query_has_key (string query_key)
Check if there is a query table entry for the
query_key
key. - public bool remove_query_key (string query_key)
Remove an entry from the query table by key.
- public bool set_fragment (string? fragment)
Sets the fragment string in the URI.
- public bool set_host (string host)
Set or unset the host for the URI.
- public bool set_path (string? path)
Sets or unsets the path in the URI.
- public bool set_path_segments (owned List<string>? path_segments)
Replace the path segments list in the URI.
- public bool set_path_string (string path)
Sets or unsets the path in the URI.
- public bool set_port (uint port)
Set or unset the port number for the URI.
- public bool set_query_string (string? query)
Sets or unsets the query table in the URI.
- public bool set_query_table (HashTable<string,string>? query_table)
Set the query table to use in the URI.
- public bool set_query_value (string query_key, string? query_value)
This inserts or replaces a key in the query table.
- public bool set_scheme (string scheme)
Set or unset the scheme for the URI.
- public bool set_userinfo (string userinfo)
Set or unset the user information for the URI.
- public string to_string ()
Convert the URI to a string.
- public string to_string_with_keys (List<string>? keys)
Convert the URI to a string, with the query arguments in a specific order.
- public void unref ()
Decrement the reference count to this Uri object.