10#ifndef __UTILS_PROGRESS_INFO_H__
11#define __UTILS_PROGRESS_INFO_H__
19typedef enum ProgressStatus
21 PROGRESS_STATUS_PENDING_START,
22 PROGRESS_STATUS_PENDING_CANCELLATION,
23 PROGRESS_STATUS_RUNNING,
24 PROGRESS_STATUS_COMPLETED,
27typedef enum ProgressCompletionType
29 PROGRESS_COMPLETED_CANCELLED,
30 PROGRESS_COMPLETED_HAS_WARNING,
31 PROGRESS_COMPLETED_HAS_ERROR,
32 PROGRESS_COMPLETED_SUCCESS,
33} ProgressCompletionType;
35typedef struct ProgressInfo ProgressInfo;
38progress_info_new (
void);
41progress_info_get_status (ProgressInfo * self);
44progress_info_get_completion_type (ProgressInfo * self);
58 ProgressCompletionType type,
83progress_info_pending_cancellation (ProgressInfo * self);
86progress_info_free (ProgressInfo * self);
void progress_info_update_progress(ProgressInfo *self, double progress, const char *msg)
To be called by the task itself.
void progress_info_mark_completed(ProgressInfo *self, ProgressCompletionType type, const char *msg)
To be called by the task itself.
char * progress_info_get_message(ProgressInfo *self)
Returns a newly allocated string.
void progress_info_request_cancellation(ProgressInfo *self)
To be called by the task caller.
void progress_info_get_progress(ProgressInfo *self, double *progress, char **str)
To be called by the task caller.