Gjsify LogoGjsify Logo

Index

Type Aliases

AttributeList: GLib.Array

Variables

ITEM_APPLICATION_SECRET: number
ITEM_INFO_ALL: number
ITEM_TYPE_MASK: number
SESSION: string
A keyring only stored in memory.

Functions

  • attribute_list_append_string(attributes: GLib.Array, name: string, value: string): void
  • Store a key-value-pair with a string value in attributes.

    Parameters

    • attributes: GLib.Array

      A #GnomeKeyringAttributeList

    • name: string

      The name of the new attribute

    • value: string

      The value to store in attributes

    Returns void

  • attribute_list_append_uint32(attributes: GLib.Array, name: string, value: number): void
  • Store a key-value-pair with an unsigned 32bit number value in attributes.

    Parameters

    • attributes: GLib.Array

      A #GnomeKeyringAttributeList

    • name: string

      The name of the new attribute

    • value: number

      The value to store in attributes

    Returns void

  • attribute_list_free(attributes: GLib.Array): void
  • attribute_list_get_type(): GType
  • cancel_request(request: object): void
  • Cancel an asynchronous request.

    If a callback was registered when making the asynchronous request, that callback function will be called with a result of %GNOME_KEYRING_RESULT_CANCELLED

    Parameters

    • request: object

      The request returned from the asynchronous call function.

    Returns void

  • change_password_sync(keyring: string, original: string, password: string): GnomeKeyring.Result
  • Change the password for keyring. In most cases you would specify %NULL for both the original and password arguments and allow the user to type the correct passwords.

    For an asynchronous version of this function see gnome_keyring_change_password().

    Parameters

    • keyring: string

      The name of the keyring to change the password for. Cannot be %NULL

    • original: string

      The old keyring password, or %NULL to prompt the user for it.

    • password: string

      The new keyring password, or %NULL to prompt the user for it.

    Returns GnomeKeyring.Result

  • Create a new keyring with the specified name. In most cases %NULL will be passed in as the password, which will prompt the user to enter a password of their choice.

    For an asynchronous version of this function see gnome_keyring_create().

    Parameters

    • keyring_name: string

      The new keyring name. Must not be %NULL

    • password: string

      The password for the new keyring. If %NULL user will be prompted.

    Returns GnomeKeyring.Result

  • Delete keyring. Once a keyring is deleted there is no mechanism for recovery of its contents.

    For an asynchronous version of this function see gnome_keyring_delete().

    Parameters

    • keyring: string

      The name of the keyring to delete. Cannot be %NULL

    Returns GnomeKeyring.Result

  • Searches through all keyrings for items that match the attributes and type. The matches are for exact equality.

    A %GList of GnomeKeyringFound structures is returned in found. The list may have zero items if nothing matched the criteria. The list should be freed using gnome_keyring_found_list_free().

    The user may have been prompted to unlock necessary keyrings, and user will have been prompted for access to the items if needed.

    For an asynchronous version of this function see gnome_keyring_find_items().

    Parameters

    • type: ItemType

      The type of items to find.

    • attributes: GLib.Array

      A list of attributes to search for. This cannot be an empty list.

    Returns [GnomeKeyring.Result, Found[]]

  • Find a previously stored network password. Searches all keyrings.

    A %GList of #GnomeKeyringNetworkPasswordData structures are returned in the out_list argument. The list should be freed with gnome_keyring_network_password_list_free()

    The user may have been prompted to unlock necessary keyrings, and user will have been prompted for access to the items if needed.

    Network passwords are items with the item type %GNOME_KEYRING_ITEM_NETWORK_PASSWORD

    Parameters

    • user: string

      The user name or %NULL.

    • domain: string

      The domain name or %NULL.

    • server: string

      The server or %NULL.

    • object: string

      The remote object or %NULL.

    • protocol: string

      The network protocol or %NULL.

    • authtype: string

      The authentication type or %NULL.

    • port: number

      The network port or zero.

    Returns [GnomeKeyring.Result, NetworkPasswordData[]]

  • found_list_free(found_list: Found[]): void
  • free_password(password: string): void
  • Clears the memory used by password by filling with '\0' and frees the memory after doing this. You should use this function instead of g_free() for secret information.

    Parameters

    • password: string

      the password to be freed

    Returns void

  • Get information about keyring.

    The #GnomeKeyringInfo structure returned in info must be freed with gnome_keyring_info_free().

    For an asynchronous version of this function see gnome_keyring_get_info().

    Parameters

    • keyring: string

      The name of the keyring, or %NULL for the default keyring.

    Returns [GnomeKeyring.Result, GnomeKeyring.Info]

  • is_available(): boolean
  • Create a new item in a keyring.

    The secret must be a null terminated string. It should be allocated using secure memory whenever possible. See gnome_keyring_memory_strdup()

    The user may have been prompted to unlock necessary keyrings. If %NULL is specified as the keyring and no default keyring exists, the user will be prompted to create a new keyring.

    When update_if_exists is set to %TRUE, the user may be prompted for access to the previously existing item.

    For an asynchronous version of this function see gnome_keyring_item_create().

    Parameters

    • keyring: string

      The name of the keyring in which to create the item, or %NULL for the default keyring.

    • type: ItemType

      The item type.

    • display_name: string

      The name of the item. This will be displayed to the user where necessary.

    • attributes: GLib.Array

      A (possibly empty) list of attributes to store with the item.

    • secret: string

      The password or secret of the item.

    • update_if_exists: boolean

      If true, then another item matching the type, and attributes will be updated instead of creating a new item.

    Returns [GnomeKeyring.Result, number]

  • Delete an item in a keyring.

    The user may be prompted if the calling application doesn't have necessary access to delete the item.

    For an asynchronous version of this function see gnome_keyring_item_delete().

    Parameters

    • keyring: string

      The name of the keyring from which to delete the item, or %NULL for the default keyring.

    • id: number

      The id of the item

    Returns GnomeKeyring.Result

  • Get all attributes for an item.

    A #GnomeKeyringAttributeList will be returned in attributes. This should be freed using gnome_keyring_attribute_list_free().

    For an asynchronous version of this function see gnome_keyring_item_get_attributes().

    Parameters

    • keyring: string

      The name of the keyring in which the item exists, or %NULL for the default keyring.

    • id: number

      The id of the item

    • attributes: GLib.Array

      The location to return a pointer to the attribute list.

    Returns GnomeKeyring.Result

  • Get information about an item, optionally retrieving its secret.

    If flags includes %GNOME_KEYRING_ITEM_INFO_SECRET then the user may be prompted if the calling application doesn't have necessary access to read the item with its secret.

    A #GnomeKeyringItemInfo structure will be returned in info. Certain fields of this structure may be %NULL or zero if they were not specified in flags. This must be freed using gnome_keyring_item_info_free().

    For an asynchronous version of this function see gnome_keyring_item_get_info_full().

    Parameters

    • keyring: string

      The name of the keyring in which the item exists, or %NULL for the default keyring.

    • id: number

      The id of the item

    • flags: number

      The parts of the item to retrieve.

    Returns [GnomeKeyring.Result, ItemInfo]

  • Get information about an item and its secret.

    The user may be prompted if the calling application doesn't have necessary access to read the item with its secret.

    A #GnomeKeyringItemInfo structure will be returned in info. This must be freed using gnome_keyring_item_info_free().

    For an asynchronous version of this function see gnome_keyring_item_get_info().

    Parameters

    • keyring: string

      The name of the keyring in which the item exists, or %NULL for the default keyring.

    • id: number

      The id of the item

    Returns [GnomeKeyring.Result, ItemInfo]

  • item_grant_access_rights_sync(keyring: string, display_name: string, full_path: string, id: number, rights: AccessType): GnomeKeyring.Result
  • Will grant the application access rights to the item, provided callee has write access to said item.

    Parameters

    • keyring: string

      The keyring name, or %NULL for the default keyring.

    • display_name: string

      The display name for the application, as returned by g_get_application_name().

    • full_path: string

      The full filepath to the application.

    • id: number

      The id of the item to grant access to.

    • rights: AccessType

      The type of rights to grant.

    Returns GnomeKeyring.Result

  • Set all the attributes for an item. This will replace any previous attributes set on the item.

    For an asynchronous version of this function see gnome_keyring_item_set_attributes().

    Parameters

    • keyring: string

      The name of the keyring in which the item exists, or %NULL for the default keyring.

    • id: number

      The id of the item

    • attributes: GLib.Array

      The full list of attributes to set on the item.

    Returns GnomeKeyring.Result

  • Set information on an item, like its display name, secret etc...

    Only the fields in the info pointer that are non-null or non-zero will be set on the item.

    For an asynchronous version of this function see gnome_keyring_item_set_info().

    Parameters

    • keyring: string

      The name of the keyring in which the item exists, or %NULL for the default keyring.

    • id: number

      The id of the item

    • info: ItemInfo

      The item info to save into the item.

    Returns GnomeKeyring.Result

  • Get a list of all the ids for items in keyring.

    Use GPOINTER_TO_UINT() on the list to access the integer ids. The list should be freed with g_list_free().

    For an asynchronous version of this function see gnome_keyring_list_item_ids().

    Parameters

    • keyring: string

      The name of the keyring, or %NULL for the default keyring.

    Returns [GnomeKeyring.Result, number[]]

  • Get a list of keyring names.

    The list returned in in keyrings must be freed using gnome_keyring_string_list_free().

    For an asynchronous version of this function see gnome_keyring_list_keyring_names().

    Returns [GnomeKeyring.Result, string[]]

  • Lock a keyring, so that its contents may not be accessed without first supplying a password.

    Most keyring opretaions involving items require that you first unlock the keyring. One exception is gnome_keyring_find_items_sync() and related functions.

    For an asynchronous version of this function see gnome_keyring_lock().

    Parameters

    • keyring: string

      The name of the keyring to lock, or %NULL for the default keyring.

    Returns GnomeKeyring.Result

  • The #GNOME_KEYRING_RESULT_OK and #GNOME_KEYRING_RESULT_CANCELLED codes will return an empty string.

    Note that there are some results for which the application will need to take appropriate action rather than just display an error message to the user.

    Parameters

    Returns string

  • Set flags and info for keyring. The only fields in info that are used are lock_on_idle and lock_timeout.

    For an asynchronous version of this function see gnome_keyring_set_info().

    Parameters

    • keyring: string

      The name of the keyring, or %NULL for the default keyring.

    • info: GnomeKeyring.Info

      A structure containing flags and info for the keyring.

    Returns GnomeKeyring.Result

  • set_network_password_sync(keyring: string, user: string, domain: string, server: string, object: string, protocol: string, authtype: string, port: number, password: string): [GnomeKeyring.Result, number]
  • Store a network password.

    If an item already exists for with this network info (ie: user, server etc...) then it will be updated.

    The created or updated item id will be returned in item_id.

    Network passwords are items with the item type %GNOME_KEYRING_ITEM_NETWORK_PASSWORD

    Parameters

    • keyring: string

      The keyring to store the password in, or %NULL for the default keyring.

    • user: string

      The user name or %NULL.

    • domain: string

      The domain name or %NULL.

    • server: string

      The server or %NULL.

    • object: string

      The remote object or %NULL.

    • protocol: string

      The network protocol or %NULL.

    • authtype: string

      The authentication type or %NULL.

    • port: number

      The network port or zero.

    • password: string

      The password to store, must not be %NULL.

    Returns [GnomeKeyring.Result, number]

  • string_list_free(strings: string[]): void
  • Unlock a keyring, so that its contents may be accessed. In most cases %NULL will be passed in as the password, which will prompt the user to enter the correct password.

    Most keyring opretaions involving items require that yo ufirst unlock the keyring. One exception is gnome_keyring_find_items_sync() and related functions.

    For an asynchronous version of this function see gnome_keyring_unlock().

    Parameters

    • keyring: string

      The name of the keyring to unlock, or %NULL for the default keyring.

    • password: string

      The password to unlock the keyring with, or %NULL to prompt the user.

    Returns GnomeKeyring.Result

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