Enum Class UriFlags

java.lang.Object
java.lang.Enum<UriFlags>
org.gnome.glib.UriFlags
All Implemented Interfaces:
Serializable, Comparable<UriFlags>, Constable, Enumeration

@Generated("org.javagi.JavaGI") public enum UriFlags extends Enum<UriFlags> implements Enumeration

Flags that describe a URI.

When parsing a URI, if you need to choose different flags based on the type of URI, you can use g_uri_peek_scheme() on the URI string to check the scheme first, and use that to decide what flags to parse it with.

Since:
2.66
  • Nested Class Summary

    Nested classes/interfaces inherited from class Enum

    Enum.EnumDesc<E>
  • Enum Constant Summary

    Enum Constants
    Enum Constant
    Description
    When parsing a URI, this indicates that %-encoded characters in the userinfo, path, query, and fragment fields should not be decoded.
    Same as ENCODED, for the fragment only.
    Same as ENCODED, for the path only.
    Same as ENCODED, for the query field only.
    The userinfo may contain additional authentication-related parameters, which will be separated from the username and/or password by ;.
    The userinfo field may contain a password, which will be separated from the username by :.
    The host component should not be assumed to be a DNS hostname or IP address (for example, for smb URIs with NetBIOS hostnames).
    No flags set.
    Parse the URI more relaxedly than the RFC 3986 grammar specifies, fixing up or ignoring common mistakes in URIs coming from external sources.
    A scheme-based normalization will be applied.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    Get the numeric value of this enum
    static Set<UriFlags>
    of(int flags)
    Create a new EnumSet<UriFlags> for the provided bitfield
    static Set<UriFlags>
    of(MemorySegment address)
    Create a new EnumSet<UriFlags> for the bitfield in the provided memory address.
    static UriFlags
    Returns the enum constant of this class with the specified name.
    static UriFlags[]
    Returns an array containing the constants of this enum class, in the order they are declared.

    Methods inherited from class Object

    getClass, notify, notifyAll, wait, wait, wait
  • Enum Constant Details

    • NONE

      public static final UriFlags NONE
      No flags set.
    • PARSE_RELAXED

      public static final UriFlags PARSE_RELAXED
      Parse the URI more relaxedly than the RFC 3986 grammar specifies, fixing up or ignoring common mistakes in URIs coming from external sources. This is also needed for some obscure URI schemes where ; separates the host from the path. Don’t use this flag unless you need to.
    • HAS_PASSWORD

      public static final UriFlags HAS_PASSWORD
      The userinfo field may contain a password, which will be separated from the username by :.
    • HAS_AUTH_PARAMS

      public static final UriFlags HAS_AUTH_PARAMS
      The userinfo may contain additional authentication-related parameters, which will be separated from the username and/or password by ;.
    • ENCODED

      public static final UriFlags ENCODED
      When parsing a URI, this indicates that %-encoded characters in the userinfo, path, query, and fragment fields should not be decoded. (And likewise the host field if NON_DNS is also set.) When building a URI, it indicates that you have already %-encoded the components, and so GUri should not do any encoding itself.
    • NON_DNS

      public static final UriFlags NON_DNS
      The host component should not be assumed to be a DNS hostname or IP address (for example, for smb URIs with NetBIOS hostnames).
    • ENCODED_QUERY

      public static final UriFlags ENCODED_QUERY
      Same as ENCODED, for the query field only.
    • ENCODED_PATH

      public static final UriFlags ENCODED_PATH
      Same as ENCODED, for the path only.
    • ENCODED_FRAGMENT

      public static final UriFlags ENCODED_FRAGMENT
      Same as ENCODED, for the fragment only.
    • SCHEME_NORMALIZE

      public static final UriFlags SCHEME_NORMALIZE
      A scheme-based normalization will be applied. For example, when parsing an HTTP URI changing omitted path to / and omitted port to 80; and when building a URI, changing empty path to / and default port 80). This only supports a subset of known schemes. (Since: 2.68)
  • Method Details

    • values

      public static UriFlags[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static UriFlags valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • getValue

      public int getValue()
      Get the numeric value of this enum
      Specified by:
      getValue in interface Enumeration
      Returns:
      the enum value
    • of

      public static Set<UriFlags> of(int flags)
      Create a new EnumSet<UriFlags> for the provided bitfield
      Parameters:
      flags - the UriFlags bitfield
      Returns:
      the EnumSet for the provided bitfield
    • of

      public static Set<UriFlags> of(MemorySegment address)
      Create a new EnumSet<UriFlags> for the bitfield in the provided memory address.
      Parameters:
      address - the memory address holding a bitfield value
      Returns:
      the EnumSet for the bitfield in the provided memory address