## CryptUIKeyStore CryptUIKeyStore |

## Functions

gboolean | (*CryptUIKeyStoreFilterFunc) ()
CryptUIKeyStore * | cryptui_key_store_new ()
CryptUIKeyset * | cryptui_key_store_get_keyset ()
void | cryptui_key_store_set_sortable ()
gboolean | cryptui_key_store_get_sortable ()
void | cryptui_key_store_check_toggled ()
gboolean | cryptui_key_store_get_iter_from_key ()
const gchar * | cryptui_key_store_get_key_from_iter ()
const gchar * | cryptui_key_store_get_key_from_path ()
GList * | cryptui_key_store_get_all_keys ()
guint | cryptui_key_store_get_count ()
gboolean | cryptui_key_store_have_selected_keys ()
GList * | cryptui_key_store_get_selected_keys ()
void | cryptui_key_store_set_selected_keys ()
const gchar * | cryptui_key_store_get_selected_key ()
void | cryptui_key_store_set_selected_key ()
void | cryptui_key_store_set_search_mode ()
void | cryptui_key_store_set_search_text ()
void | cryptui_key_store_set_filter ()

## Types and Values

| CryptUIKeyStorePriv
struct | CryptUIKeyStore
enum | CryptUIKeyStoreMode

## Object Hierarchy

## Description

## Functions

### CryptUIKeyStoreFilterFunc ()

    gboolean
    (*CryptUIKeyStoreFilterFunc) (CryptUIKeyset *ckset,
                                  const gchar *key,
                                  gpointer user_data);

#### Returns

### cryptui_key_store_new ()

    CryptUIKeyStore *
    cryptui_key_store_new (CryptUIKeyset *keyset,
                           gboolean use_checks,
                           const gchar *none_option);

Creates a new libcryptui key store setting the keystore, use-checks and none-option properties

#### Parameters

keyset | a libcryptui keyset |
use_checks | a gboolean |
none_option | a const gchar string |

#### Returns

the new libcryptui key store

### cryptui_key_store_get_keyset ()

    CryptUIKeyset *
    cryptui_key_store_get_keyset (CryptUIKeyStore *ckstore);

Gets ckstore's internal keyset

#### Parameters

ckstore | a libcryptui key store |

#### Returns

the internal libcryptui keyset

### cryptui_key_store_set_sortable ()

    void
    cryptui_key_store_set_sortable (CryptUIKeyStore *ckstore,
                                    gboolean sortable);

Sets whether ckstore is sortable or not

#### Parameters

ckstore | a libcryptui key store |
sortable | a gboolean |

### cryptui_key_store_get_sortable ()

    gboolean
    cryptui_key_store_get_sortable (CryptUIKeyStore *ckstore);

Gets whether ckstore is sortable or not

#### Parameters

ckstore | a libcryptui key store |

#### Returns

TRUE if ckstore is sortable, FALSE otherwise

### cryptui_key_store_check_toggled ()

    void
    cryptui_key_store_check_toggled (CryptUIKeyStore *ckstore,
                                     GtkTreeView *view,
                                     GtkTreeIter *iter);

Gets whether the check at iter is toggled

#### Parameters

ckstore | a libcryptui key store |
view | a GtkTreeView |
iter | a GtkTreeIter |

### cryptui_key_store_get_iter_from_key ()

    gboolean
    cryptui_key_store_get_iter_from_key (CryptUIKeyStore *ckstore,
                                         const gchar *key,
                                         GtkTreeIter *iter);

Get the iter that the key is stored at in ckstore

#### Parameters

ckstore | a libcryptui key store |
key | a libcryptui key |
iter | a GtkTreeIter |

#### Returns

TRUE if the key is present in the ckstore and the value of iter has been modified to point to it, FALSE otherwise

### cryptui_key_store_get_key_from_iter ()

    const gchar *
    cryptui_key_store_get_key_from_iter (CryptUIKeyStore *ckstore,
                                         GtkTreeIter *iter);

Gets the key stored at iter in ckstore

#### Parameters

ckstore | a libcryptui key store |
iter | a GtkTreeIter |

#### Returns

a libcryptui key

### cryptui_key_store_get_key_from_path ()

    const gchar *
    cryptui_key_store_get_key_from_path (CryptUIKeyStore *ckstore,
                                         GtkTreePath *path);

Get the key at path in ckstore

#### Parameters

ckstore | a libcryptui key store |
path | a GtkTreePath |

#### Returns

a libcryptui key

### cryptui_key_store_get_all_keys ()

    GList *
    cryptui_key_store_get_all_keys (CryptUIKeyStore *ckstore);

Get a list of all keys in ckstore

#### Parameters

ckstore | a libcryptui key store |

#### Returns

a list of libcryptui keys

### cryptui_key_store_get_count ()

    guint
    cryptui_key_store_get_count (CryptUIKeyStore *ckstore);

Get the number of keys stored in ckstore

#### Parameters

ckstore | a libcryptui key store |

#### Returns

the number of keys

### cryptui_key_store_have_selected_keys ()

    gboolean
    cryptui_key_store_have_selected_keys (CryptUIKeyStore *ckstore,
                                          GtkTreeView *view);

Determines whether keys are selected or not.

#### Parameters

ckstore | a libcryptui key store |
view | a GtkTreeView |

#### Returns

TRUE if keys have been selected, FALSE otherwise

### cryptui_key_store_get_selected_keys ()

    GList *
    cryptui_key_store_get_selected_keys (CryptUIKeyStore *ckstore,
                                         GtkTreeView *view);

Get the currently selected keys

#### Parameters

ckstore | a libcryptui key store |
view | a GtkTreeView |

#### Returns

a list of libcryptui keys

### cryptui_key_store_set_selected_keys ()

    void
    cryptui_key_store_set_selected_keys (CryptUIKeyStore *ckstore,
                                         GtkTreeView *view,
                                         GList *keys);

Set the current selection to be the list of keys

#### Parameters

ckstore | a libcryptui key store |
view | a GtkTreeView |
keys | a list of libcryptui keys |

### cryptui_key_store_get_selected_key ()

    const gchar *
    cryptui_key_store_get_selected_key (CryptUIKeyStore *ckstore,
                                        GtkTreeView *view);

Get the currently selected key

#### Parameters

ckstore | a libcryptui key store |
view | a GtkTreeView |

#### Returns

a libcryptui key

### cryptui_key_store_set_selected_key ()

    void
    cryptui_key_store_set_selected_key (CryptUIKeyStore *ckstore,
                                        GtkTreeView *view,
                                        const gchar *selkey);

Marks the given key as selected

#### Parameters

ckstore | a libcryptui key store |
view | a GtkTreeView |
selkey | a libcryptui key |

### cryptui_key_store_set_search_mode ()

    void
    cryptui_key_store_set_search_mode (CryptUIKeyStore *ckstore,
                                       CryptUIKeyStoreMode mode);

Sets whether the keys returned will be all, just those searched for, or those selected.

#### Parameters

ckstore | a libcryptui key store |
mode | search mode |

### cryptui_key_store_set_search_text ()

    void
    cryptui_key_store_set_search_text (CryptUIKeyStore *ckstore,
                                       const gchar *search_text);

Filters the keys in the store by the text in search_text.

#### Parameters

ckstore | a libcryptui key store |
search_text | a string |

### cryptui_key_store_set_filter ()

    void
    cryptui_key_store_set_filter (CryptUIKeyStore *ckstore,
                                  CryptUIKeyStoreFilterFunc func,
                                  gpointer user_data);

Filters the key store's keys with the given filter function.

#### Parameters

ckstore | a libcryptui key store |
func | a filter function |
user_data | a generic pointer |

## Types and Values

### CryptUIKeyStorePriv

    typedef struct _CryptUIKeyStorePriv CryptUIKeyStorePriv;

### struct CryptUIKeyStore

    struct CryptUIKeyStore {
        GtkTreeModelSort       parent;

        CryptUIKeyset          *ckset;
    };

### enum CryptUIKeyStoreMode

#### Members

CRYPTUI_KEY_STORE_MODE_ALL |  |
CRYPTUI_KEY_STORE_MODE_SELECTED |  |
CRYPTUI_KEY_STORE_MODE_RESULTS |  |