E2kOperation

## E2kOperation E2kOperation — Cancellable operation support |

## Synopsis

    struct              E2kOperation;
    void                e2k_operation_init                  (E2kOperation *op);
    void                e2k_operation_cancel                (E2kOperation *op);
    gboolean            e2k_operation_is_cancelled          (E2kOperation *op);
    void                e2k_operation_free                  (E2kOperation *op);

## Description

E2kOperation represents a handle which can be used to cancel a pending operation (where the operation may be composed of several cancellable steps).

## Details

### struct E2kOperation

    struct E2kOperation {
    };

### e2k_operation_init ()

    void                e2k_operation_init                  (E2kOperation *op);

This initializes the E2kOperation pointed to by `op`. This should be called before passing `op` to a cancellable function.

`op` : | an E2kOperation

### e2k_operation_cancel ()

    void                e2k_operation_cancel                (E2kOperation *op);

This cancels `op`, invoking its cancellation callback. If `op` is not an active operation, or has already been cancelled, this has no effect.

`op` : | an E2kOperation

### e2k_operation_is_cancelled ()

    gboolean            e2k_operation_is_cancelled          (E2kOperation *op);

Checks if `op` has been cancelled. Should only be called while `op` is active.

`op` : | an E2kOperation (or `NULL`)
Returns : | whether or not `op` has been cancelled.

### e2k_operation_free ()

    void                e2k_operation_free                  (E2kOperation *op);

This frees `op` and removes it from the list of active operations. It should be called after the function it was passed to returns.

`op` : | an E2kOperation

## See Also

E2kContext, E2kGlobalCatalog