## CryptUIKeyChooser

CryptUIKeyChooser

## Functions

CryptUIKeyChooser * | cryptui_key_chooser_new ()
gboolean | cryptui_key_chooser_get_enforce_prefs ()
void | cryptui_key_chooser_set_enforce_prefs ()
gboolean | cryptui_key_chooser_have_recipients ()
GList * | cryptui_key_chooser_get_recipients ()
void | cryptui_key_chooser_set_recipients ()
const gchar * | cryptui_key_chooser_get_signer ()
void | cryptui_key_chooser_set_signer ()

## Types and Values

enum | CryptUIKeyChooserMode
| CryptUIKeyChooserPriv
struct | CryptUIKeyChooser

## Description

## Functions

### cryptui_key_chooser_new ()

    CryptUIKeyChooser *
    cryptui_key_chooser_new (CryptUIKeyset *ckset,
                             CryptUIKeyChooserMode mode);

Creates a key chooser widget from a key set.

#### Parameters

ckset | key set to choose keys from |
mode | how to display the signer portion of the widget |

#### Returns

a key shooser widget

### cryptui_key_chooser_get_enforce_prefs ()

    gboolean
    cryptui_key_chooser_get_enforce_prefs (CryptUIKeyChooser *chooser);

Gets whether or not the preference to encrypt to self will be enforced. If TRUE, the default signing key will be added to the recipient list. If FALSE, the selected recipients will be returned without adding the default signing key.

#### Parameters

chooser | the key chooser widget |

#### Returns

whether or not the default signing key will be included in the recipients even if not selected

### cryptui_key_chooser_set_enforce_prefs ()

    void
    cryptui_key_chooser_set_enforce_prefs (CryptUIKeyChooser *chooser,
                                           gboolean enforce_prefs);

Sets whether or not the preference to encrypt to self will be enforced. If TRUE, the default signing key will be added to the recipient list. If FALSE, the selected recipients will be returned without adding the default signing key.

#### Parameters

chooser | the chooser widget |
enforce_prefs | whether or not the default signing key will be included in the recipients even if not selected |

### cryptui_key_chooser_have_recipients ()

    gboolean
    cryptui_key_chooser_have_recipients (CryptUIKeyChooser *chooser);

Determines if recipient keys have been selected.

#### Parameters

chooser | the chooser to check |

#### Returns

TRUE if recipients have been selected.

### cryptui_key_chooser_get_recipients ()

    GList *
    cryptui_key_chooser_get_recipients (CryptUIKeyChooser *chooser);

This function returns a list of recipients selected in the chooser widget.

#### Parameters

chooser | the chooser to get selected recipients from |

#### Returns

the list of recipients

### cryptui_key_chooser_set_recipients ()

    void
    cryptui_key_chooser_set_recipients (CryptUIKeyChooser *chooser,
                                        GList *keys);

Marks the listed keys as selected in the chooser widget.

#### Parameters

chooser | the chooser to set recipients on |
keys | the list of recipients to mark selected |

### cryptui_key_chooser_get_signer ()

    const gchar *
    cryptui_key_chooser_get_signer (CryptUIKeyChooser *chooser);

Gets the key of the selected signer from the chooser widget.

#### Parameters

chooser | the chooser widget to get the signer from |

#### Returns

the selected signer's key

### cryptui_key_chooser_set_signer ()

    void
    cryptui_key_chooser_set_signer (CryptUIKeyChooser *chooser,
                                    const gchar *key);

Sets the signer in the chooser to the provided key.

#### Parameters

chooser | the chooser to set the signer on |
key | the signer key to set |

## Types and Values

### enum CryptUIKeyChooserMode

#### Members

CRYPTUI_KEY_CHOOSER_RECIPIENTS |  |
CRYPTUI_KEY_CHOOSER_SIGNER |  |
CRYPTUI_KEY_CHOOSER_SUPPORT_SYMMETRIC |  |
CRYPTUI_KEY_CHOOSER_MUSTSIGN |  |

### CryptUIKeyChooserPriv

    typedef struct _CryptUIKeyChooserPriv CryptUIKeyChooserPriv;

### struct CryptUIKeyChooser

    struct CryptUIKeyChooser {
        GtkVBox               parent;
    };