GcrImportInteraction

## GcrImportInteraction GcrImportInteraction — User interaction during importing |

## Synopsis

                        GcrImportInteraction;
    struct              GcrImportInteractionIface;
    void                gcr_import_interaction_supplement_prep
                                                            (GcrImportInteraction *interaction,
                                                             GckBuilder *builder);
    GTlsInteractionResult gcr_import_interaction_supplement (GcrImportInteraction *interaction,
                                                             GckBuilder *builder,
                                                             GCancellable *cancellable,
                                                             GError **error);
    void                gcr_import_interaction_supplement_async
                                                            (GcrImportInteraction *interaction,
                                                             GckBuilder *builder,
                                                             GCancellable *cancellable,
                                                             GAsyncReadyCallback callback,
                                                             gpointer user_data);
    GTlsInteractionResult gcr_import_interaction_supplement_finish
                                                            (GcrImportInteraction *interaction,
                                                             GAsyncResult *result,
                                                             GError **error);

## Description

This is an interface implemented by a caller performing an import. It allows the importer to ask the caller for further information about the import.

It must be implemented on a derived class of GTlsInteraction

## Details

### GcrImportInteraction

    typedef struct _GcrImportInteraction GcrImportInteraction;

Interface implemented by the caller performing an import.

### struct GcrImportInteractionIface

    struct GcrImportInteractionIface {
    	GTypeInterface parent;

    	void                    (*supplement_prep)   (GcrImportInteraction *interaction,
    	                                              GckBuilder *builder);

    	GTlsInteractionResult   (*supplement)        (GcrImportInteraction *interaction,
    	                                              GckBuilder *builder,
    	                                              GCancellable *cancellable,
    	                                              GError **error);

    	void                    (*supplement_async)  (GcrImportInteraction *interaction,
    	                                              GckBuilder *builder,
    	                                              GCancellable *cancellable,
    	                                              GAsyncReadyCallback callback,
    	                                              gpointer user_data);

    	GTlsInteractionResult   (*supplement_finish) (GcrImportInteraction *interaction,
    	                                              GAsyncResult *result,
    	                                              GError **error);
    };

Interface implemented by implementations of GcrImportInteraction.

GTypeInterface `parent`; | parent interface
`supplement_prep` () | method which prepares for supplementing the given attributes before import
`supplement` () | method which synchronously supplements attributes before import
`supplement_async` () | method which asynchronously supplements attributes before import
`supplement_finish` () | method which completes `supplement_async`

### gcr_import_interaction_supplement_prep ()

    void                gcr_import_interaction_supplement_prep
                                                            (GcrImportInteraction *interaction,
                                                             GckBuilder *builder);

Prepare for supplementing the given attributes before import. This means prompting the user for things like labels and the like. The attributes will contain attributes for values that the importer needs, either empty or prefilled with suggested values.

This method does not prompt the user, but rather just prepares the interaction that these are the attributes that are needed.

`interaction` : | the interaction
`builder` : | attributes to supplement

### gcr_import_interaction_supplement ()

    GTlsInteractionResult gcr_import_interaction_supplement (GcrImportInteraction *interaction,
                                                             GckBuilder *builder,
                                                             GCancellable *cancellable,
                                                             GError **error);

Supplement attributes before import. This means prompting the user for things like labels and the like. The needed attributes will have been passed to `gcr_import_interaction_supplement_prep()`.

This method prompts the user and fills in the attributes. If the user or cancellable cancels the operation the error should be set with `G_IO_ERROR_CANCELLED`.

`interaction` : | the interaction
`builder` : | supplemented attributes
`cancellable` : | optional cancellable object
`error` : | location to store error on failure
Returns : | `G_TLS_INTERACTION_HANDLED` if successful or `G_TLS_INTERACTION_FAILED`

### gcr_import_interaction_supplement_async ()

    void                gcr_import_interaction_supplement_async
                                                            (GcrImportInteraction *interaction,
                                                             GckBuilder *builder,
                                                             GCancellable *cancellable,
                                                             GAsyncReadyCallback callback,
                                                             gpointer user_data);

Asynchronously supplement attributes before import. This means prompting the user for things like labels and the like. The needed attributes will have been passed to `gcr_import_interaction_supplement_prep()`.

This method prompts the user and fills in the attributes.

`interaction` : | the interaction
`builder` : | supplemented attributes
`cancellable` : | optional cancellable object
`callback` : | called when the operation completes
`user_data` : | data to be passed to the callback

### gcr_import_interaction_supplement_finish ()

    GTlsInteractionResult gcr_import_interaction_supplement_finish
                                                            (GcrImportInteraction *interaction,
                                                             GAsyncResult *result,
                                                             GError **error);

Complete operation to asynchronously supplement attributes before import.

If the user or cancellable cancels the operation the error should be set with `G_IO_ERROR_CANCELLED`.

`interaction` : | the interaction
`result` : | the asynchronous result
`error` : | location to place an error on failure
Returns : | `G_TLS_INTERACTION_HANDLED` if successful or `G_TLS_INTERACTION_FAILED`