| Reference Manual of the tinymail framework | ||||
|---|---|---|---|---|
TnyStatus;
#define TNY_TYPE_STATUS_DOMAIN
#define TNY_TYPE_STATUS_CODE
GType tny_status_domain_get_type (void);
GType tny_status_code_get_type (void);
TnyStatus* tny_status_new (GQuark domain,
gint code,
guint position,
guint of_total,
const gchar *format,
...);
TnyStatus* tny_status_new_literal (GQuark domain,
gint code,
guint position,
guint of_total,
const gchar *message);
void tny_status_free (TnyStatus *status);
TnyStatus* tny_status_copy (const TnyStatus *status);
gboolean tny_status_matches (const TnyStatus *status,
GQuark domain,
gint code);
void tny_set_status (TnyStatus **status,
GQuark domain,
gint code,
guint position,
guint of_total,
gchar *format,
...);
void tny_clear_status (TnyStatus **status);
void tny_status_set_fraction (TnyStatus *status,
gdouble fraction);
gdouble tny_status_get_fraction (TnyStatus *status);
typedef struct {
GQuark domain;
gint code;
gchar *message;
guint position;
guint of_total;
} TnyStatus;
A progress status
free-function: tny_status_free
GType tny_status_domain_get_type (void);
GType system helper function
Returns : |
a GType |
GType tny_status_code_get_type (void);
GType system helper function
Returns : |
a GType |
TnyStatus* tny_status_new (GQuark domain, gint code, guint position, guint of_total, const gchar *format, ...);
Creates a new TnyStatus with the given domain and code,
and a message formatted with format.
|
status domain |
|
status code |
|
the position |
|
the total amount of events to happen |
|
printf()-style format for status message
|
|
parameters for message format |
Returns : |
(caller-owns): a new TnyStatus |
TnyStatus* tny_status_new_literal (GQuark domain, gint code, guint position, guint of_total, const gchar *message);
Creates a new TnyStatus; unlike tny_status_new(), message is not
a printf()-style format string. Use this
function if message contains text you don't have control over,
that could include printf() escape sequences.
|
status domain |
|
status code |
|
the position |
|
the total amount of events to happen |
|
status message |
Returns : |
(caller-owns): a new TnyStatus |
void tny_status_free (TnyStatus *status);
Destroys a TnyStatus and associated resources.
|
a TnyStatus |
Since 1.0 audience: application-developer
TnyStatus* tny_status_copy (const TnyStatus *status);
Makes a full copy of status (not just a shallow copy).
Since 1.0 audience: application-developer
gboolean tny_status_matches (const TnyStatus *status, GQuark domain, gint code);
Returns TRUE if status matches domain and code, FALSE
otherwise.
|
a TnyStatus |
|
a status domain |
|
a status code |
Returns : |
TRUE if status has domain and code, else FALSE
|
Since 1.0 audience: application-developer
void tny_set_status (TnyStatus **status, GQuark domain, gint code, guint position, guint of_total, gchar *format, ...);
Does nothing if status is NULL; if status is non-NULL, then *status must
be NULL. A new TnyStatus is created and assigned to *status.
|
a return location for a TnyStatus, or NULL
|
|
status domain |
|
status code |
|
the position |
|
the total amount of events to happen |
|
printf()-style format
|
|
args for format
|
Since 1.0 audience: application-developer
void tny_clear_status (TnyStatus **status);
If status is NULL, does nothing. If status is non-NULL,
calls tny_status_free() on *status and sets *status to NULL.
|
a TnyStatus return location |
Since 1.0 audience: application-developer
void tny_status_set_fraction (TnyStatus *status, gdouble fraction);
Set the fraction of status. The of_total member of status will be set to 100
by this method.
|
a TnyStatus |
|
the fraction to set |
Since 1.0 audience: application-developer