| GIO Reference Manual | ||||
|---|---|---|---|---|
GCancellable;
GCancellable* g_cancellable_new (void);
gboolean g_cancellable_is_cancelled (GCancellable *cancellable);
gboolean g_cancellable_set_error_if_cancelled
(GCancellable *cancellable,
GError **error);
int g_cancellable_get_fd (GCancellable *cancellable);
GCancellable* g_cancellable_get_current (void);
void g_push_current_cancellable (GCancellable *cancellable);
void g_pop_current_cancellable (GCancellable *cancellable);
void g_cancellable_reset (GCancellable *cancellable);
void g_cancellable_cancel (GCancellable *cancellable);
gboolean g_cancellable_is_cancelled (GCancellable *cancellable);
|
a GCancellable or NULL. |
Returns : |
TRUE if cancellable is is cancelled,
FALSE if called with NULL or if item is not cancelled.
|
gboolean g_cancellable_set_error_if_cancelled
(GCancellable *cancellable,
GError **error);
Sets the current error to notify that the operation was cancelled.
|
a GCancellable object. |
|
GError to append error state to. |
Returns : |
TRUE if cancellable was cancelled, FALSE if it was not.
|
int g_cancellable_get_fd (GCancellable *cancellable);
|
a GCancellable. |
Returns : |
A valid file descriptor. -1 if the file descriptor is not supported, or on errors. |
GCancellable* g_cancellable_get_current (void);
Returns : |
a GCancellable from the top of the stack, or NULL
if the stack is empty.
|
void g_push_current_cancellable (GCancellable *cancellable);
Pushes cancellable onto the cancellable stack.
|
optional GCancellable object, NULL to ignore.
|
void g_pop_current_cancellable (GCancellable *cancellable);
Pops cancellable off the cancellable stack if cancellable
is on the top of the stack.
|
optional GCancellable object, NULL to ignore.
|
void g_cancellable_reset (GCancellable *cancellable);
Resets cancellable to its uncancelled state.
|
a GCancellable object. |
void g_cancellable_cancel (GCancellable *cancellable);
Will set cancellable to cancelled, and will emit the CANCELLED
signal. This function is thread-safe.
|
a GCancellable object. |
"cancelled" signalvoid user_function (GCancellable *gcancellable, gpointer user_data) : Run Last
|
the object which received the signal. |
|
user data set when the signal handler was connected. |