## PkProgress

PkProgress — Transaction progress information

## Synopsis

    #define             PK_PROGRESS_TYPE_ERROR
                        PkProgressPrivate;
                        PkProgress;
                        PkProgressClass;
    PkProgress *        pk_progress_new                     (void);
    void                pk_progress_test                    (gpointer user_data);
    enum                PkProgressType;
    void                (*PkProgressCallback)               (PkProgress *progress,
                                                             PkProgressType type,
                                                             gpointer user_data);
    gboolean            pk_progress_set_package_id          (PkProgress *progress,
                                                             const gchar *package_id);
    gboolean            pk_progress_set_transaction_id      (PkProgress *progress,
                                                             const gchar *package_id);
    gboolean            pk_progress_set_percentage          (PkProgress *progress,
                                                             gint percentage);
    gboolean            pk_progress_set_subpercentage       (PkProgress *progress,
                                                             gint subpercentage);
    gboolean            pk_progress_set_status              (PkProgress *progress,
                                                             PkStatusEnum status);
    gboolean            pk_progress_set_role                (PkProgress *progress,
                                                             PkRoleEnum role);
    gboolean            pk_progress_set_allow_cancel        (PkProgress *progress,
                                                             gboolean allow_cancel);
    gboolean            pk_progress_set_caller_active       (PkProgress *progress,
                                                             gboolean caller_active);
    gboolean            pk_progress_set_elapsed_time        (PkProgress *progress,
                                                             guint elapsed_time);
    gboolean            pk_progress_set_remaining_time      (PkProgress *progress,
                                                             guint remaining_time);
    gboolean            pk_progress_set_speed               (PkProgress *progress,
                                                             guint speed);
    gboolean            pk_progress_set_uid                 (PkProgress *progress,
                                                             guint uid);
    gboolean            pk_progress_set_package             (PkProgress *progress,
                                                             PkPackage *package);

## Object Hierarchy

      GObject
       +----PkProgress

## Properties

      "allow-cancel"             gboolean              : Read / Write
      "caller-active"            gboolean              : Read / Write
      "elapsed-time"             guint                 : Read / Write
      "package"                  PkPackage*            : Read / Write
      "package-id"               gchar*                : Read / Write
      "percentage"               gint                  : Read / Write
      "remaining-time"           guint                 : Read / Write
      "role"                     guint                 : Read / Write
      "speed"                    guint                 : Read / Write
      "status"                   guint                 : Read / Write
      "subpercentage"            gint                  : Read / Write
      "transaction-id"           gchar*                : Read / Write
      "uid"                      guint                 : Read / Write

## Description

This GObject is available to clients to be able to query details about the transaction. All of the details on this object are stored as properties.

## Details

### PK_PROGRESS_TYPE_ERROR

    #define PK_PROGRESS_TYPE_ERROR		(pk_progress_error_get_type ())

### PkProgressPrivate

    typedef struct _PkProgressPrivate PkProgressPrivate;

Private PkProgress data

### PkProgress

    typedef struct _PkProgress PkProgress;

### PkProgressClass

    typedef struct {
    	GObjectClass parent_class;
    	/* padding for future expansion */
    	void (*_pk_reserved1) (void);
    	void (*_pk_reserved2) (void);
    	void (*_pk_reserved3) (void);
    	void (*_pk_reserved4) (void);
    	void (*_pk_reserved5) (void);
    } PkProgressClass;

### pk_progress_new ()

    PkProgress *        pk_progress_new                     (void);

PkProgress is a nice GObject wrapper for PackageKit and makes writing frontends easy.

Returns : | A new `PkProgress` instance

Since 0.5.2

### pk_progress_test ()

    void                pk_progress_test                    (gpointer user_data);

`user_data` : |

### enum PkProgressType

    typedef enum {
    	PK_PROGRESS_TYPE_PACKAGE_ID,
    	PK_PROGRESS_TYPE_TRANSACTION_ID,
    	PK_PROGRESS_TYPE_PERCENTAGE,
    	PK_PROGRESS_TYPE_SUBPERCENTAGE,
    	PK_PROGRESS_TYPE_ALLOW_CANCEL,
    	PK_PROGRESS_TYPE_STATUS,
    	PK_PROGRESS_TYPE_ROLE,
    	PK_PROGRESS_TYPE_CALLER_ACTIVE,
    	PK_PROGRESS_TYPE_ELAPSED_TIME,
    	PK_PROGRESS_TYPE_REMAINING_TIME,
    	PK_PROGRESS_TYPE_SPEED,
    	PK_PROGRESS_TYPE_UID,
    	PK_PROGRESS_TYPE_PACKAGE,
    	PK_PROGRESS_TYPE_INVALID
    } PkProgressType;

### PkProgressCallback ()

    void                (*PkProgressCallback)               (PkProgress *progress,
                                                             PkProgressType type,
                                                             gpointer user_data);

`progress` : |
`type` : |
`user_data` : |

### pk_progress_set_package_id ()

    gboolean            pk_progress_set_package_id          (PkProgress *progress,
                                                             const gchar *package_id);

`progress` : | a valid PkProgress instance
`package_id` : |
Returns : |

Since 0.5.2

### pk_progress_set_transaction_id ()

    gboolean            pk_progress_set_transaction_id      (PkProgress *progress,
                                                             const gchar *package_id);

`progress` : | a valid PkProgress instance
`package_id` : |
Returns : |

Since 0.5.3

### pk_progress_set_percentage ()

    gboolean            pk_progress_set_percentage          (PkProgress *progress,
                                                             gint percentage);

`progress` : |
`percentage` : |
Returns : |

Since 0.5.2

### pk_progress_set_subpercentage ()

    gboolean            pk_progress_set_subpercentage       (PkProgress *progress,
                                                             gint subpercentage);

`progress` : |
`subpercentage` : |
Returns : |

Since 0.5.2

### pk_progress_set_status ()

    gboolean            pk_progress_set_status              (PkProgress *progress,
                                                             PkStatusEnum status);

`progress` : |
`status` : |
Returns : |

Since 0.5.2

### pk_progress_set_role ()

    gboolean            pk_progress_set_role                (PkProgress *progress,
                                                             PkRoleEnum role);

`progress` : |
`role` : |
Returns : |

Since 0.5.2

### pk_progress_set_allow_cancel ()

    gboolean            pk_progress_set_allow_cancel        (PkProgress *progress,
                                                             gboolean allow_cancel);

`progress` : |
`allow_cancel` : |
Returns : |

Since 0.5.2

### pk_progress_set_caller_active ()

    gboolean            pk_progress_set_caller_active       (PkProgress *progress,
                                                             gboolean caller_active);

`progress` : |
`caller_active` : |
Returns : |

Since 0.5.2

### pk_progress_set_elapsed_time ()

    gboolean            pk_progress_set_elapsed_time        (PkProgress *progress,
                                                             guint elapsed_time);

`progress` : |
`elapsed_time` : |
Returns : |

Since 0.5.2

### pk_progress_set_remaining_time ()

    gboolean            pk_progress_set_remaining_time      (PkProgress *progress,
                                                             guint remaining_time);

`progress` : |
`remaining_time` : |
Returns : |

Since 0.5.2

### pk_progress_set_speed ()

    gboolean            pk_progress_set_speed               (PkProgress *progress,
                                                             guint speed);

`progress` : |
`speed` : |
Returns : |

Since 0.5.2

### pk_progress_set_uid ()

    gboolean            pk_progress_set_uid                 (PkProgress *progress,
                                                             guint uid);

`progress` : |
`uid` : |
Returns : |

Since 0.5.2

### pk_progress_set_package ()

    gboolean            pk_progress_set_package             (PkProgress *progress,
                                                             PkPackage *package);

`progress` : |
`package` : |
Returns : |

Since 0.5.2

## Property Details

### The `"allow-cancel"` property

      "allow-cancel"             gboolean              : Read / Write

Default value: FALSE

### The `"caller-active"` property

      "caller-active"            gboolean              : Read / Write

Default value: FALSE

### The `"elapsed-time"` property

      "elapsed-time"             guint                 : Read / Write

Default value: 0

Since 0.5.2

### The `"package"` property

      "package"                  PkPackage*            : Read / Write

Since 0.5.3

### The `"package-id"` property

      "package-id"               gchar*                : Read / Write

The full package_id, e.g. 'gnome-power-manager;0.1.2;i386;fedora'.

Default value: NULL

### The `"percentage"` property

      "percentage"               gint                  : Read / Write

Allowed values: >= -1

Default value: -1

Since 0.5.2

### The `"remaining-time"` property

      "remaining-time"           guint                 : Read / Write

Default value: 0

Since 0.5.2

### The `"role"` property

      "role"                     guint                 : Read / Write

Allowed values: <= 36

Default value: 0

Since 0.5.2

### The `"speed"` property

      "speed"                    guint                 : Read / Write

Default value: 0

Since 0.5.2

### The `"status"` property

      "status"                   guint                 : Read / Write

Allowed values: <= 37

Default value: 0

Since 0.5.2

### The `"subpercentage"` property

      "subpercentage"            gint                  : Read / Write

Allowed values: >= -1

Default value: -1

Since 0.5.2

### The `"transaction-id"` property

      "transaction-id"           gchar*                : Read / Write

The transaction_id, e.g. '/892_deabbbdb_data'.

Default value: NULL

### The `"uid"` property

      "uid"                      guint                 : Read / Write

Default value: 0

Since 0.5.2