MateVFSContext

MateVFSContext — contexts allows modules to track thread usage and cancellation properly

Synopsis

MateVFSContext *   mate_vfs_context_new               (void);
void                mate_vfs_context_free              (MateVFSContext *ctx);
MateVFSCancellation * mate_vfs_context_get_cancellation
                                                        (const MateVFSContext *ctx);
#define             mate_vfs_context_check_cancellation(x)
const MateVFSContext * mate_vfs_context_peek_current  (void);
gboolean            mate_vfs_context_check_cancellation_current
                                                        (void);

Description

Details

mate_vfs_context_new ()

MateVFSContext *   mate_vfs_context_new               (void);

Creates a new context and cancellation object. Must be called from the main glib event loop.

Returns :

a newly allocated MateVFSContext.

mate_vfs_context_free ()

void                mate_vfs_context_free              (MateVFSContext *ctx);

Free ctx and destroy the associated MateVFSCancellation.

ctx :

context to be freed.

mate_vfs_context_get_cancellation ()

MateVFSCancellation * mate_vfs_context_get_cancellation
                                                        (const MateVFSContext *ctx);

Retrieve the MateVFSCancellation associated with ctx.

ctx :

context to get the MateVFSCancellation from.

Returns :

ctx 's MateVFSCancellation.

mate_vfs_context_check_cancellation()

#define             mate_vfs_context_check_cancellation(x)

x :


mate_vfs_context_peek_current ()

const MateVFSContext * mate_vfs_context_peek_current  (void);

Get the currently active context. It shouldn't be manipulated but can be compared to contexts module holds to determine whether they are active.

Returns :

the currently active MateVFSContext.

mate_vfs_context_check_cancellation_current ()

gboolean            mate_vfs_context_check_cancellation_current
                                                        (void);

Check to see if the currently active context has been cancelled.

Returns :

TRUE if the currently active context has been cancelled, otherwise FALSE.