## CryptUIKeyset CryptUIKeyset |

## Synopsis

                        CryptUIKeysetPrivate;
    struct              CryptUIKeyset;
    CryptUIKeyset *     cryptui_keyset_new                  (const gchar *keytype,
                                                             gboolean expand_keys);
    gboolean            cryptui_keyset_has_key              (CryptUIKeyset *keyset,
                                                             const gchar *key);
    const gchar *       cryptui_keyset_get_keytype          (CryptUIKeyset *keyset);
    GList *             cryptui_keyset_get_keys             (CryptUIKeyset *keyset);
    guint               cryptui_keyset_get_count            (CryptUIKeyset *keyset);
    void                cryptui_keyset_refresh              (CryptUIKeyset *keyset);
    gpointer            cryptui_keyset_get_closure          (CryptUIKeyset *keyset,
                                                             const gchar *key);
    void                cryptui_keyset_set_closure          (CryptUIKeyset *keyset,
                                                             const gchar *key,
                                                             gpointer closure);
    gboolean            cryptui_keyset_get_expand_keys      (CryptUIKeyset *keyset);
    void                cryptui_keyset_set_expand_keys      (CryptUIKeyset *keyset,
                                                             gboolean expand_keys);
    void                cryptui_keyset_cache_key            (CryptUIKeyset *keyset,
                                                             const gchar *key);
    gchar *             cryptui_keyset_key_get_string       (CryptUIKeyset *keyset,
                                                             const gchar *key,
                                                             const gchar *prop);
    guint               cryptui_keyset_key_get_uint         (CryptUIKeyset *keyset,
                                                             const gchar *key,
                                                             const gchar *prop);
    guint               cryptui_keyset_key_flags            (CryptUIKeyset *keyset,
                                                             const gchar *key);
    gchar *             cryptui_keyset_key_display_name     (CryptUIKeyset *keyset,
                                                             const gchar *key);
    gchar *             cryptui_keyset_key_display_id       (CryptUIKeyset *keyset,
                                                             const gchar *key);
    gchar *             cryptui_keyset_key_raw_keyid        (CryptUIKeyset *keyset,
                                                             const gchar *key);
    gchar **            cryptui_keyset_keys_raw_keyids      (CryptUIKeyset *keyset,
                                                             const gchar **keys);

## Description

## Details

### CryptUIKeysetPrivate

    typedef struct _CryptUIKeysetPrivate CryptUIKeysetPrivate;

### struct CryptUIKeyset

    struct CryptUIKeyset {
    	GObject parent;
    };

### cryptui_keyset_new ()

    CryptUIKeyset *     cryptui_keyset_new                  (const gchar *keytype,
                                                             gboolean expand_keys);

Creates a new keylist

`keytype` : | libcryptui key prefix
`expand_keys` : | whether key's non-primary uids are part of the set
Returns : | the new keyset

### cryptui_keyset_has_key ()

    gboolean            cryptui_keyset_has_key              (CryptUIKeyset *keyset,
                                                             const gchar *key);

Determines whether or not a key is present in the keyset

`keyset` : | a libcryptui keyset
`key` : | a libcryptui key
Returns : | TRUE if the key is present, FALSE otherwise

### cryptui_keyset_get_keytype ()

    const gchar *       cryptui_keyset_get_keytype          (CryptUIKeyset *keyset);

Gets the libcryptui key prefix for the keyset

`keyset` : | a libcryptui keyset
Returns : | a libcryptui key prefix

### cryptui_keyset_get_keys ()

    GList *             cryptui_keyset_get_keys             (CryptUIKeyset *keyset);

Gets a list of keys contained in the key set

`keyset` : | a libcryptui keyset
Returns : | a doubly linked list of keys

### cryptui_keyset_get_count ()

    guint               cryptui_keyset_get_count            (CryptUIKeyset *keyset);

Gets the number of keys stored in the keyset

`keyset` : | a libcryptui keyset
Returns : | the number of keys

### cryptui_keyset_refresh ()

    void                cryptui_keyset_refresh              (CryptUIKeyset *keyset);

Checks the remote keyset to see which keys have been added or removed

`keyset` : | a libcryptui keyset

### cryptui_keyset_get_closure ()

    gpointer            cryptui_keyset_get_closure          (CryptUIKeyset *keyset,
                                                             const gchar *key);

TODO: Find out what closure is and document this function

`keyset` : | a libcryptui keyset
`key` : | a libcryptui key
Returns : | closure associated with key

### cryptui_keyset_set_closure ()

    void                cryptui_keyset_set_closure          (CryptUIKeyset *keyset,
                                                             const gchar *key,
                                                             gpointer closure);

TODO: Find out what closure is and document this function

`keyset` : | a libcryptui keyset
`key` : | a libcryptui key
`closure` : | TODO

### cryptui_keyset_get_expand_keys ()

    gboolean            cryptui_keyset_get_expand_keys      (CryptUIKeyset *keyset);

Gets whether or not non-primary key UIDs are included in the keyset

`keyset` : | a libcryptui keyset
Returns : | TRUE if non-primary key UIDs are included in the keyset

### cryptui_keyset_set_expand_keys ()

    void                cryptui_keyset_set_expand_keys      (CryptUIKeyset *keyset,
                                                             gboolean expand_keys);

Sets whether or not non-primary key UIDs are included in the keyset

`keyset` : | a libcryptui keyset
`expand_keys` : | a gboolean

### cryptui_keyset_cache_key ()

    void                cryptui_keyset_cache_key            (CryptUIKeyset *keyset,
                                                             const gchar *key);

Stores the key's fields returned by the DBus method GetKeyFields in the keyset.

`keyset` : | a libcryptui keyset
`key` : | libcryptui key to cache

### cryptui_keyset_key_get_string ()

    gchar *             cryptui_keyset_key_get_string       (CryptUIKeyset *keyset,
                                                             const gchar *key,
                                                             const gchar *prop);

Gets the given property of the key in the keyset.

`keyset` : | a libcryptui keyset
`key` : | libcryptui key to fetch a property of
`prop` : | string property to get
Returns : | a string containing the property's value

### cryptui_keyset_key_get_uint ()

    guint               cryptui_keyset_key_get_uint         (CryptUIKeyset *keyset,
                                                             const gchar *key,
                                                             const gchar *prop);

Gets the given property of the key in the keyset.

`keyset` : | a libcryptui keyset
`key` : | libcryptui key to fetch a property of
`prop` : | uint property to get
Returns : | a uint containing the property's value

### cryptui_keyset_key_flags ()

    guint               cryptui_keyset_key_flags            (CryptUIKeyset *keyset,
                                                             const gchar *key);

Gets the key's flags

`keyset` : | a libcryptui keyset
`key` : | a libcryptui key
Returns : | a uint containing the flags

### cryptui_keyset_key_display_name ()

    gchar *             cryptui_keyset_key_display_name     (CryptUIKeyset *keyset,
                                                             const gchar *key);

Gets the "display-name" property of the given key

`keyset` : | a libcryptui keyset
`key` : | a libcryptui key
Returns : | the display name of the key

### cryptui_keyset_key_display_id ()

    gchar *             cryptui_keyset_key_display_id       (CryptUIKeyset *keyset,
                                                             const gchar *key);

Gets the "display-id" property of the given key

`keyset` : | a libcryptui keyset
`key` : | a libcryptui key
Returns : | the display id of the key

### cryptui_keyset_key_raw_keyid ()

    gchar *             cryptui_keyset_key_raw_keyid        (CryptUIKeyset *keyset,
                                                             const gchar *key);

Gets the key's raw key id

`keyset` : | a libcryptui keyset
`key` : | a libcryptui key
Returns : | a string with the raw key id

### cryptui_keyset_keys_raw_keyids ()

    gchar **            cryptui_keyset_keys_raw_keyids      (CryptUIKeyset *keyset,
                                                             const gchar **keys);

Gets the keys' raw key ids

`keyset` : | a libcryptui keyset
`keys` : | an array of libcryptui keys
Returns : | an array of raw key ids