| libseahorse Reference Manual | ||||
|---|---|---|---|---|
| Top | Description | ||||
SeahorseOperation;
SeahorseOperation* seahorse_operation_new_complete (GError *err);
SeahorseOperation* seahorse_operation_new_cancelled ();
void seahorse_operation_cancel (SeahorseOperation *operation);
#define seahorse_operation_is_running (operation)
#define seahorse_operation_is_cancelled (operation)
#define seahorse_operation_is_successful (operation)
void seahorse_operation_copy_error (SeahorseOperation *operation,
GError **err);
const GError* seahorse_operation_get_error (SeahorseOperation *operation);
void seahorse_operation_display_error (SeahorseOperation *operation,
const gchar *title,
GtkWidget *parent);
void seahorse_operation_wait (SeahorseOperation *operation);
void (*SeahorseDoneFunc) (SeahorseOperation *op,
gpointer userdata);
void (*SeahorseProgressFunc) (SeahorseOperation *op,
const gchar *status,
gdouble progress,
gpointer userdata);
void seahorse_operation_watch (SeahorseOperation *operation,
SeahorseDoneFunc done_callback,
gpointer donedata,
SeahorseProgressFunc progress_callback,
gpointer progdata);
#define seahorse_operation_get_progress (op)
#define seahorse_operation_get_message (operation)
gpointer seahorse_operation_get_result (SeahorseOperation *operation);
GSList* seahorse_operation_list_add (GSList *list,
SeahorseOperation *operation);
GSList* seahorse_operation_list_remove (GSList *list,
SeahorseOperation *operation);
void seahorse_operation_list_cancel (GSList *list);
GSList* seahorse_operation_list_purge (GSList *list);
GSList* seahorse_operation_list_free (GSList *list);
#define SEAHORSE_TYPE_MULTI_OPERATION
#define SEAHORSE_MULTI_OPERATION (obj)
#define SEAHORSE_MULTI_OPERATION_CLASS (klass)
#define SEAHORSE_IS_MULTI_OPERATION (obj)
#define SEAHORSE_IS_MULTI_OPERATION_CLASS (klass)
#define SEAHORSE_MULTI_OPERATION_GET_CLASS (obj)
SeahorseMultiOperation;
GType seahorse_multi_operation_get_type ();
SeahorseMultiOperation* seahorse_multi_operation_new ();
void seahorse_multi_operation_take (SeahorseMultiOperation *mop,
SeahorseOperation *op);
#define DECLARE_OPERATION (Opx, opx)
#define SEAHORSE_CALC_PROGRESS (cur, tot)
void seahorse_operation_mark_start (SeahorseOperation *operation);
void seahorse_operation_mark_done (SeahorseOperation *operation,
gboolean cancelled,
GError *error);
void seahorse_operation_mark_progress (SeahorseOperation *operation,
const gchar *message,
gdouble progress);
void seahorse_operation_mark_progress_full
(SeahorseOperation *operation,
const gchar *message,
gdouble current,
gdouble total);
void seahorse_operation_mark_result (SeahorseOperation *operation,
gpointer result,
GDestroyNotify notify_func);
typedef struct {
GObject parent;
gchar *message; /* Progress status details ie: "foobar.jpg" */
gdouble progress; /* The current progress position, -1 for indeterminate */
guint is_running : 1; /* If the operation is running or not */
guint is_done : 1; /* Operation is done or not */
guint is_cancelled : 1; /* Operation is cancelled or not */;
GError *error;
} SeahorseOperation;
An operation taking place over time.
- Generally this class is derived and a base class actually hooks in and performs the operation, keeps the properties updated etc... - Used all over to represent things like key loading operations, search - SeahorseMultiOperation allows you to combine multiple operations into a single one. Used when searching multiple key servers for example. - Can be tied to a progress bar (see seahorse-progress.h) - Holds a reference to itself while the operation is in progress. - The seahorse_operation_mark_* are used by derived classes to update properties of the operation as things progress.
Signals: done: The operation is complete. progress: The operation has progressed, or changed state somehow.
Properties: result: The 'result' of the operation (if applicable). This depends on the derived operation class. progress: A fraction between 0.0 and 1.0 inclusive representing how far along this operation is. 0.0 = indeterminate, and 1.0 is done. message: A progress message to display to the user.
GObject |
The parent GObject |
gchar * |
Progress status details ie: "foobar.jpg" |
gdouble |
The current progress position, -1 for indeterminate |
guint |
If the operation is running or not |
guint |
Operation is done or not |
guint |
Operation is cancelled or not |
GError * |
GError for the operation |
SeahorseOperation* seahorse_operation_new_complete (GError *err);
|
|
Returns : |
SeahorseOperation* seahorse_operation_new_cancelled ();
Returns : |
void seahorse_operation_cancel (SeahorseOperation *operation);
|
void seahorse_operation_copy_error (SeahorseOperation *operation, GError **err);
|
|
|
const GError* seahorse_operation_get_error (SeahorseOperation *operation);
|
|
Returns : |
void seahorse_operation_display_error (SeahorseOperation *operation, const gchar *title, GtkWidget *parent);
|
|
|
|
|
void (*SeahorseDoneFunc) (SeahorseOperation *op, gpointer userdata);
|
|
|
void (*SeahorseProgressFunc) (SeahorseOperation *op, const gchar *status, gdouble progress, gpointer userdata);
|
|
|
|
|
|
|
void seahorse_operation_watch (SeahorseOperation *operation, SeahorseDoneFunc done_callback, gpointer donedata, SeahorseProgressFunc progress_callback, gpointer progdata);
|
|
|
|
|
|
|
|
|
gpointer seahorse_operation_get_result (SeahorseOperation *operation);
|
|
Returns : |
GSList* seahorse_operation_list_add (GSList *list, SeahorseOperation *operation);
|
|
|
|
Returns : |
GSList* seahorse_operation_list_remove (GSList *list, SeahorseOperation *operation);
|
|
|
|
Returns : |
GSList* seahorse_operation_list_purge (GSList *list);
|
|
Returns : |
GSList* seahorse_operation_list_free (GSList *list);
|
|
Returns : |
#define SEAHORSE_TYPE_MULTI_OPERATION (seahorse_multi_operation_get_type ())
#define SEAHORSE_MULTI_OPERATION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SEAHORSE_TYPE_MULTI_OPERATION, SeahorseMultiOperation))
|
#define SEAHORSE_MULTI_OPERATION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SEAHORSE_TYPE_MULTI_OPERATION, SeahorseMultiOperationClass))
|
#define SEAHORSE_IS_MULTI_OPERATION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SEAHORSE_TYPE_MULTI_OPERATION))
|
#define SEAHORSE_IS_MULTI_OPERATION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SEAHORSE_TYPE_MULTI_OPERATION))
|
#define SEAHORSE_MULTI_OPERATION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SEAHORSE_TYPE_MULTI_OPERATION, SeahorseMultiOperationClass))
|
typedef struct {
SeahorseOperation parent;
GSList *operations;
} SeahorseMultiOperation;
void seahorse_multi_operation_take (SeahorseMultiOperation *mop, SeahorseOperation *op);
|
|
|
void seahorse_operation_mark_start (SeahorseOperation *operation);
|
void seahorse_operation_mark_done (SeahorseOperation *operation, gboolean cancelled, GError *error);
|
|
|
|
|
void seahorse_operation_mark_progress (SeahorseOperation *operation, const gchar *message, gdouble progress);
|
|
|
|
|
void seahorse_operation_mark_progress_full
(SeahorseOperation *operation,
const gchar *message,
gdouble current,
gdouble total);
|
|
|
|
|
|
|
void seahorse_operation_mark_result (SeahorseOperation *operation, gpointer result, GDestroyNotify notify_func);
|
|
|
|
|