PkTaskList

PkTaskList — A nice way to keep a list of the jobs being processed

Synopsis




                    PkTaskListPrivate;
                    PkTaskList;
PkTaskList*         pk_task_list_new                    (void);
gboolean            pk_task_list_refresh                (PkTaskList *tlist);
gboolean            pk_task_list_print                  (PkTaskList *tlist);
gboolean            pk_task_list_free                   (PkTaskList *tlist);
gboolean            pk_task_list_contains_role          (PkTaskList *tlist,
                                                         PkRoleEnum role);
guint               pk_task_list_get_size               (PkTaskList *tlist);
PkTaskListItem*     pk_task_list_get_item               (PkTaskList *tlist,
                                                         guint item);

Object Hierarchy


  GObject
   +----PkTaskList

Signals


  "changed"                                        : Run Last
  "error-code"                                     : Run Last
  "finished"                                       : Run Last
  "message"                                        : Run Last
  "status-changed"                                 : Run Last

Description

These provide a good way to keep a list of the jobs being processed so we can see what type of jobs and thier status easily.

Details

PkTaskListPrivate

typedef struct _PkTaskListPrivate PkTaskListPrivate;

Private PkTaskList data


PkTaskList

typedef struct _PkTaskList PkTaskList;


pk_task_list_new ()

PkTaskList*         pk_task_list_new                    (void);

Returns:


pk_task_list_refresh ()

gboolean            pk_task_list_refresh                (PkTaskList *tlist);

Not normally required, but force a refresh

tlist:

Returns:


pk_task_list_print ()

gboolean            pk_task_list_print                  (PkTaskList *tlist);

tlist:

Returns:


pk_task_list_free ()

gboolean            pk_task_list_free                   (PkTaskList *tlist);

tlist:

Returns:


pk_task_list_contains_role ()

gboolean            pk_task_list_contains_role          (PkTaskList *tlist,
                                                         PkRoleEnum role);

tlist:

role:

Returns:


pk_task_list_get_size ()

guint               pk_task_list_get_size               (PkTaskList *tlist);

tlist:

Returns:


pk_task_list_get_item ()

PkTaskListItem*     pk_task_list_get_item               (PkTaskList *tlist,
                                                         guint item);

tlist:

item:

Returns:

Signal Details

The "changed" signal

void                user_function                      (PkTaskList *tlist,
                                                        gpointer    user_data)      : Run Last

The ::changed signal is emitted when the transaction list has changed

tlist:

the PkTaskList instance that emitted the signal

user_data:

user data set when the signal handler was connected.

The "error-code" signal

void                user_function                      (PkTaskList *pktasklist,
                                                        gpointer    arg1,
                                                        guint       arg2,
                                                        gchar      *arg3,
                                                        gpointer    user_data)       : Run Last

pktasklist:

the object which received the signal.

arg1:

arg2:

arg3:

user_data:

user data set when the signal handler was connected.

The "finished" signal

void                user_function                      (PkTaskList *tlist,
                                                        gpointer    client,
                                                        guint       exit,
                                                        guint       runtime,
                                                        gpointer    user_data)      : Run Last

The ::finished signal is emitted when the transaction is complete.

tlist:

the PkTaskList instance that emitted the signal

client:

the PkClient instance that caused the signal

exit:

the PkExitEnum status value, e.g. PK_EXIT_ENUM_SUCCESS

runtime:

the time in seconds the transaction has been running

user_data:

user data set when the signal handler was connected.

The "message" signal

void                user_function                      (PkTaskList *tlist,
                                                        gpointer    client,
                                                        guint       message,
                                                        gchar      *details,
                                                        gpointer    user_data)      : Run Last

The ::message signal is emitted when the transaction wants to tell the user something.

tlist:

the PkTaskList instance that emitted the signal

client:

the PkClient instance that caused the signal

message:

the PkMessageEnum type of the message, e.g. PK_MESSAGE_ENUM_WARNING

details:

the non-localised message details

user_data:

user data set when the signal handler was connected.

The "status-changed" signal

void                user_function                      (PkTaskList *tlist,
                                                        gpointer    user_data)      : Run Last

The ::status-changed signal is emitted when one of the status' of the transaction list clients has changed

tlist:

the PkTaskList instance that emitted the signal

user_data:

user data set when the signal handler was connected.