## grl-operation

grl-operation

## Functions

void | grl_operation_cancel ()
gpointer | grl_operation_get_data ()
void | grl_operation_set_data ()
void | grl_operation_set_data_full ()

## Includes

    #include <grilo.h>

## Description

## Functions

### grl_operation_cancel ()

    void
    grl_operation_cancel (guint operation_id);

Cancel an operation.

#### Parameters

operation_id | the identifier of a running operation |

### grl_operation_get_data ()

    gpointer
    grl_operation_get_data (guint operation_id);

Obtains the previously attached data

#### Parameters

operation_id | the identifier of a running operation |

#### Returns

The previously attached data.

[transfer none]

### grl_operation_set_data ()

    void
    grl_operation_set_data (guint operation_id,
                            gpointer user_data);

Attach a pointer to the specific operation.

#### Parameters

operation_id | the identifier of a running operation |
user_data | the data to attach |

### grl_operation_set_data_full ()

    void
    grl_operation_set_data_full (guint operation_id,
                                 gpointer user_data,
                                 GDestroyNotify destroy_func);

Attach a pointer to the specific operation.

Note that the `destroy_func` callback is not called if `user_data` is `NULL`.

#### Parameters

operation_id | the identifier of a running operation |
user_data | the data to attach. | [allow-none]
destroy_func | function to release `user_data` when the operation terminates. | [allow-none]

Since: 0.2.7