Gjsify LogoGjsify Logo

FIXME

record

Hierarchy

  • Uri

Index

Constructors

  • Parses uri_string according to flags. If the result is not a valid absolute URI, it will be discarded, and an error returned.

    Parameters

    • uri_string: string

      a string representing an absolute URI

    • flags: UriParseFlags

      flags describing how to parse uri_string

    Returns Ide.Uri

Properties

name: string

Methods

  • get_auth_params(): string
  • Gets uri's authentication parameters. Depending on the URI scheme, ide_uri_parse_params() may be useful for further parsing this information.

    Returns string

  • get_fragment(): string
  • Gets uri's fragment, which may contain %-encoding, depending on the flags with which uri was parsed.

    Returns string

  • get_host(): string
  • Gets uri's host. If uri contained an IPv6 address literal, this value will not include the brackets that are required by the URI syntax.

    Returns string

  • get_password(): string
  • Gets uri's password. If uri was not parsed with %IDE_URI_PARSE_PASSWORD, this will always be %NULL.

    Returns string

  • get_path(): string
  • Gets uri's path, which may contain %-encoding, depending on the flags with which uri was parsed.

    Returns string

  • get_port(): number
  • get_query(): string
  • Gets uri's query, which may contain %-encoding, depending on the flags with which uri was parsed.

    For queries consisting of a series of "name=value" parameters, ide_uri_parse_params() may be useful.

    Returns string

  • get_scheme(): string
  • get_user(): string
  • Gets uri's user. If uri was parsed with %IDE_URI_PARSE_PASSWORD or %IDE_URI_PARSE_AUTH_PARAMS, this is the string that appears before the password and parameters in the userinfo. If not, then the entire userinfo is considered the user.

    Returns string

  • Parses uri_string according to flags and, if it is a relative URI, merges it with base_uri. If the result is not a valid absolute URI, it will be discarded, and an error returned.

    Parameters

    • uri_string: string

      a string representing a relative or absolute URI

    • flags: UriParseFlags

      flags describing how to parse uri_string

    Returns Ide.Uri

  • set_auth_params(auth_params: string): void
  • Sets uri's authentication parameters to auth_params.

    Parameters

    • auth_params: string

      the authentication parameters, or %NULL

    Returns void

  • set_fragment(fragment: string): void
  • Sets uri's fragment to fragment, which is assumed to have been %-encoded by the caller. See ide_uri_set_path() for more details.

    Parameters

    • fragment: string

      the (%-encoded) fragment

    Returns void

  • set_host(host: string): void
  • Sets uri's host to host.

    If host is an IPv6 IP address, it should not include the brackets required by the URI syntax; they will be added automatically when converting uri to a string.

    Parameters

    • host: string

      the hostname or IP address, or %NULL

    Returns void

  • set_password(password: string): void
  • set_path(path: string): void
  • Sets uri's path to path, which is assumed to have been appropriately %-encoded. In particular, this means that if you want to include a literal percent sign the path, you must write it as "%25". That being said, if path contains an unencoded '?' or '#' character, it will get encoded, since otherwise converting uri to a string and then back to a #IdeUri again would give a different result.

    Parameters

    • path: string

      the (%-encoded) path

    Returns void

  • set_port(port: number): void
  • Sets uri's port to port. If port is 0, it will not be output when calling ide_uri_to_string().

    Parameters

    • port: number

      the port, or %0

    Returns void

  • set_query(query: string): void
  • Sets uri's query to query, which is assumed to have been %-encoded by the caller. See ide_uri_set_path() for more details.

    Parameters

    • query: string

      the (%-encoded) query

    Returns void

  • set_scheme(scheme: string): void
  • set_user(user: string): void
  • Sets uri's user to user. See ide_uri_get_user() for a description of how this interacts with various parsing flags.

    Parameters

    • user: string

      the username, or %NULL

    Returns void

  • unref(): void
  • Decrements the reference count of uri by 1. If the reference count reaches zero, the structure will be freed.

    Returns void

  • build(scheme: string, userinfo: string, host: string, port: string, path: string, query: string, fragment: string): string
  • Parameters

    • scheme: string
    • userinfo: string
    • host: string
    • port: string
    • path: string
    • query: string
    • fragment: string

    Returns string

  • error_quark(): number
  • Parses uri_string according to flags. If the result is not a valid absolute URI, it will be discarded, and an error returned.

    Parameters

    • uri_string: string

      a string representing an absolute URI

    • flags: UriParseFlags

      flags describing how to parse uri_string

    Returns Ide.Uri

  • parse_host(uri_string: string, flags: UriParseFlags): [boolean, string, string, number]
  • Utility function for parsing "network" URIs. This extracts just the scheme, host, and port from uri_string. All three out parameters are mandatory.

    Parameters

    • uri_string: string

      a string containing a network URI

    • flags: UriParseFlags

      flags for parsing uri_string

    Returns [boolean, string, string, number]

  • parse_params(params: string, length: number, separator: number, case_insensitive: boolean): HashTable<string | number | symbol, string | number | boolean>
  • Many URI schemes include one or more attribute/value pairs as part of the URI value. This method can be used to parse them into a hash table.

    The params string is assumed to still be %-encoded, but the returned values will be fully decoded. (Thus it is possible that the returned values may contain '=' or separator, if the value was encoded in the input.) Invalid %-encoding is treated as with the non-%IDE_URI_PARSE_STRICT rules for ide_uri_new(). (However, if params is the path or query string from a #IdeUri that was parsed with %IDE_URI_PARSE_STRICT, then you already know that it does not contain any invalid encoding.)

    Parameters

    • params: string

      a string containing "attribute=value" parameters

    • length: number

      the length of params, or -1 if it is NUL-terminated

    • separator: number

      the separator character between parameters. (usually ';', but sometimes '&')

    • case_insensitive: boolean

      whether to match parameter names case-insensitively

    Returns HashTable<string | number | symbol, string | number | boolean>

  • split(uri_string: string, strict: boolean): [string, string, string, string, string, string, string]
  • Parses uri_string more-or-less according to the generic grammar of RFC 3986 ("more" if strict is %TRUE, "less" if %FALSE), and outputs the pieces into the provided variables. This is a low-level method that does not do any pre- or post-processing of uri_string, and is "garbage in, garbage out"; it just splits uri_string into pieces at the appropriate punctuation characters (consuming delimiters as appropriate), and returns the pieces. Components that are not present in uri_string will be set to %NULL (but note that the path is always present, though it may be an empty string).

    Parameters

    • uri_string: string

      a string containing a relative or absolute URI

    • strict: boolean

      whether to parse uri_string strictly

    Returns [string, string, string, string, string, string, string]

Legend

  • Module
  • Object literal
  • Variable
  • Function
  • Function with type parameter
  • Index signature
  • Type alias
  • Type alias with type parameter
  • Enumeration
  • Enumeration member
  • Property
  • Method
  • Interface
  • Interface with type parameter
  • Constructor
  • Property
  • Method
  • Index signature
  • Class
  • Class with type parameter
  • Constructor
  • Property
  • Method
  • Accessor
  • Index signature
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Inherited accessor
  • Protected property
  • Protected method
  • Protected accessor
  • Private property
  • Private method
  • Private accessor
  • Static property
  • Static method