gst.uri

Module for [Uri] class

class Uri

Types 1

A #GstUri object can be used to parse and split a URI string into its constituent parts. Two #GstUri objects can be joined to make a new #GstUri using the algorithm described in RFC3986.

Methods
void * _cPtr(Flag!"Dup" dup = No.Dup) nothrow
GType _getGType() static nothrow
GType _gType() @property nothrow
Uri self() nothrowReturns `this`, for use in `with` statements.
bool appendPath(string relativePath = null) nothrowAppend a path onto the end of the path in the URI. The path is not normalized, call #[gst.uri.Uri.normalize] to normalize the path.
bool appendPathSegment(string pathSegment = null) nothrowAppend a single path segment onto the end of the URI path.
bool equal(gst.uri.Uri second) nothrowCompares two #GstUri objects to see if they represent the same normalized URI.
gst.uri.Uri fromStringWithBase(string uri) nothrowLike [gst.uri.Uri.fromString] but also joins with a base URI.
string getFragment() nothrowGet the fragment name from the URI or null if it doesn't exist. If uri is null then returns null. Returns: The host name from the #GstUri object or null.
string getHost() nothrowGet the host name from the URI or null if it doesn't exist. If uri is null then returns null. Returns: The host name from the #GstUri object or null.
string[string] getMediaFragmentTable() nothrowGet the media fragment table from the URI, as defined by "Media Fragments URI 1.0". Hash table returned by this API is a list of "key-value" pairs, and the each pair is generated by splitting "URI ...
string getPath() nothrowExtract the path string from the URI object. Returns: The path from the URI. Once finished with the string should be [glib.global.gfree]'d.
string[] getPathSegments() nothrowGet a list of path segments from the URI. Returns: A #GList of path segment strings or null if no path segments are available. Free the list when no longer needed with g_list_free_full(list, g_free).
string getPathString() nothrowExtract the path string from the URI object as a percent encoded URI path. Returns: The path from the URI. Once finished with the string should be [glib.global.gfree]'d.
uint getPort() nothrowGet the port number from the URI or [gst.types.URI_NO_PORT] if it doesn't exist. If uri is null then returns [gst.types.URI_NO_PORT]. Returns: The port number from the #GstUri object or [gst.types....
string[] getQueryKeys() nothrowGet a list of the query keys from the URI. Returns: A list of keys from the URI query. Free the list with [glib.list.List.free].
string getQueryString() nothrowGet a percent encoded URI query string from the uri. Returns: A percent encoded query string. Use [glib.global.gfree] when no longer needed.
string getQueryStringOrdered(string[] keys = null) nothrowGet a percent encoded URI query string from the uri, with query parameters in the order provided by the keys list. Only parameter keys in the list will be added to the resulting URI string. This me...
string[string] getQueryTable() nothrowGet the query table from the URI. Keys and values in the table are freed with g_free when they are deleted. A value may be null to indicate that the key should appear in the query string in the URI...
string getQueryValue(string queryKey) nothrowGet the value associated with the query_key key. Will return null if the key has no value or if the key does not exist in the URI query table. Because null is returned for both missing keys and key...
string getScheme() nothrowGet the scheme name from the URI or null if it doesn't exist. If uri is null then returns null. Returns: The scheme from the #GstUri object or null.
string getUserinfo() nothrowGet the userinfo (usually in the form "username:password") from the URI or null if it doesn't exist. If uri is null then returns null. Returns: The userinfo from the #GstUri object or null.
bool isNormalized() nothrowTests the uri to see if it is normalized. A null uri is considered to be normalized. Returns: TRUE if the URI is normalized or is null.
bool isWritable() nothrowCheck if it is safe to write to this #GstUri.
gst.uri.Uri join(gst.uri.Uri refUri = null) nothrowJoin a reference URI onto a base URI using the method from RFC 3986. If either URI is null then the other URI will be returned with the ref count increased.
gst.uri.Uri makeWritable() nothrowMake the #GstUri writable.
gst.uri.Uri newWithBase(string scheme, string userinfo, string host, uint port, string path = null, string query = null, string fragment = null) nothrowLike [gst.uri.Uri.new_], but joins the new URI onto a base URI.
bool normalize() nothrowNormalization will remove extra path segments ("." and "..") from the URI. It will also convert the scheme and host name to lower case and any percent-encoded values to uppercase.
bool queryHasKey(string queryKey) nothrowCheck if there is a query table entry for the query_key key.
bool removeQueryKey(string queryKey) nothrowRemove an entry from the query table by key.
bool setFragment(string fragment = null) nothrowSets the fragment string in the URI. Use a value of null in fragment to unset the fragment string.
bool setHost(string host) nothrowSet or unset the host for the URI.
bool setPath(string path = null) nothrowSets or unsets the path in the URI.
bool setPathString(string path) nothrowSets or unsets the path in the URI.
bool setPort(uint port) nothrowSet or unset the port number for the URI.
bool setQueryString(string query = null) nothrowSets or unsets the query table in the URI.
bool setQueryTable(string[string] queryTable = null) nothrowSet the query table to use in the URI. The old table is unreferenced and a reference to the new one is used instead. A value if null for query_table will remove the query string from the URI.
bool setQueryValue(string queryKey, string queryValue = null) nothrowThis inserts or replaces a key in the query table. A query_value of null indicates that the key has no associated value, but will still be present in the query string.
bool setScheme(string scheme) nothrowSet or unset the scheme for the URI.
bool setUserinfo(string userinfo) nothrowSet or unset the user information for the URI.
string toString_() nothrowConvert the URI to a string.
string toStringWithKeys(string[] keys = null) nothrowConvert the URI to a string, with the query arguments in a specific order. Only the keys in the keys list will be added to the resulting string.
string construct(string protocol, string location) static nothrowConstructs a URI for a given valid protocol and location.
gst.uri.Uri fromString(string uri) static nothrowParses a URI string into a new #GstUri object. Will return NULL if the URI cannot be parsed.
gst.uri.Uri fromStringEscaped(string uri) static nothrowParses a URI string into a new #GstUri object. Will return NULL if the URI cannot be parsed. This is identical to [gst.uri.Uri.fromString] except that the userinfo and fragment components of the UR...
string getLocation(string uri) static nothrowExtracts the location out of a given valid URI, ie. the protocol and "://" are stripped from the URI, which means that the location returned includes the hostname if one is specified. The returned ...
string getProtocol(string uri) static nothrowExtracts the protocol out of a given valid URI. The returned string must be freed using [glib.global.gfree].
bool hasProtocol(string uri, string protocol) static nothrowChecks if the protocol of a given valid URI matches protocol.
bool isValid(string uri) static nothrowTests if the given string is a valid URI identifier. URIs start with a valid scheme followed by ":" and maybe a string identifying the location.
string joinStrings(string baseUri, string refUri) static nothrowThis is a convenience function to join two URI strings and return the result. The returned string should be [glib.global.gfree]'d after use.
bool protocolIsSupported(gst.types.URIType type, string protocol) static nothrowChecks if an element exists that supports the given URI protocol. Note that a positive return value does not imply that a subsequent call to [gst.element.Element.makeFromUri] is guaranteed to work.
bool protocolIsValid(string protocol) static nothrowTests if the given string is a valid protocol identifier. Protocols must consist of alphanumeric characters, '+', '-' and '.' and must start with a alphabetic character. See RFC 3986 Section 3.1.
Constructors
this(void * ptr, Flag!"Take" take)
this(string scheme, string userinfo, string host, uint port, string path = null, string query = null, string fragment = null)Creates a new #GstUri object with the given URI parts. The path and query strings will be broken down into their elements. All strings should not be escaped except where indicated.