Progress notification system for asynchronous operations

Progress notification system for asynchronous operations — Values representing progress

Functions

Types and Values

Description

For many asynchronous operations, it's desirable for callers to be able to watch their status as they progress. For example, an user interface calling an asynchronous download operation will want to be able to see the total number of bytes downloaded.

This class provides a mechanism for callees of asynchronous operations to communicate back with callers. It transparently handles thread safety, ensuring that the progress change notification occurs in the thread-default context of the calling operation.

Functions

ostree_async_progress_new ()

OstreeAsyncProgress *
ostree_async_progress_new (void);

Returns

A new progress object.

[transfer full]


ostree_async_progress_new_and_connect ()

OstreeAsyncProgress *
ostree_async_progress_new_and_connect (void (*changed) (OstreeAsyncProgress *self, gpointer user_data),
                                       gpointer user_data);

ostree_async_progress_get_status ()

char *
ostree_async_progress_get_status (OstreeAsyncProgress *self);

ostree_async_progress_get_uint ()

guint
ostree_async_progress_get_uint (OstreeAsyncProgress *self,
                                const char *key);

ostree_async_progress_get_uint64 ()

guint64
ostree_async_progress_get_uint64 (OstreeAsyncProgress *self,
                                  const char *key);

ostree_async_progress_set_status ()

void
ostree_async_progress_set_status (OstreeAsyncProgress *self,
                                  const char *status);

ostree_async_progress_set_uint ()

void
ostree_async_progress_set_uint (OstreeAsyncProgress *self,
                                const char *key,
                                guint value);

ostree_async_progress_set_uint64 ()

void
ostree_async_progress_set_uint64 (OstreeAsyncProgress *self,
                                  const char *key,
                                  guint64 value);

ostree_async_progress_finish ()

void
ostree_async_progress_finish (OstreeAsyncProgress *self);

Process any pending signals, ensuring the main context is cleared of sources used by this object. Also ensures that no further events will be queued.

Parameters

self

Self

 

Types and Values

OstreeAsyncProgress

typedef struct OstreeAsyncProgress   OstreeAsyncProgress;