[packagekit] packagekit: Branch 'master' - 4 commits

Richard Hughes hughsient at kemper.freedesktop.org
Wed Sep 19 15:36:53 PDT 2007


 TODO                      |   15 -
 src/pk-backend-internal.h |    2 
 src/pk-engine.c           |  394 +++++++++++++++++++++++-----------------------
 src/pk-transaction-list.c |   56 +++---
 src/pk-transaction-list.h |   16 -
 5 files changed, 239 insertions(+), 244 deletions(-)

New commits:
diff-tree 5fab68022a89ef9e0d477e30ce11df01edc867d1 (from 8955d94956e050cd3d380544eb49368b2a716d09)
Author: Richard Hughes <richard at hughsie.com>
Date:   Wed Sep 19 23:28:50 2007 +0100

    update TODO

diff --git a/TODO b/TODO
index 8dd918f..9195f28 100644
--- a/TODO
+++ b/TODO
@@ -1,12 +1,9 @@
 Order of no particular importance:
 
 *** API Changes ***
-s/GetJobList/GetActiveTransactions
-s/JobListChanged/ActiveTransactionsChanged
-s/PkTask/PkBackend (and local variables)
-
-*** Put the pk-application taskbar in the status section ***
-It looks wrong where it is...
+s/GetJobList/GetTransactions
+s/JobListChanged/TransactionListChanged
+s/GetOldTransactions/GetTransactionDetails
 
 *** Have to have an UpdatesChanged signal ***
 For the icon to update after we've done a system upgrade
@@ -36,21 +33,18 @@ Need to convert the role to an enum
 Client programs using libpackagekit should know the error, rather than just
 "it failed"
 
-*** Add logging so we can see what was installed/removed and when ***
-Depends on transaction_id and sqlite integration.
+*** Log what was installed/removed and when ***
+Need to monitor the Package's emitted by the task and encoded to a string
 
 *** Add "when installed" and "installed by" data into UI ***
 Is this useful?
-
 We would need to store package_id,installed_by,when_installed in a sqlite database
+
 *** Dummy backend should use subpercent and install deps ***
 It's not a great test case right now...
 
 *** Handle rollbacks for select backends ***
 To do rollbacks sanely in PK we need a few things:
- * convert the job into a transaction_id
- * save the transaction_id's and descriptions to a database
- * add a method to get the transaction_id's in the last x transactions
  * write an application that can see the description of the transactions
  * use an new method to handle the rollbacks and pass it to the backend
 
diff-tree 8955d94956e050cd3d380544eb49368b2a716d09 (from e0dd6bacd5587696cdde3dc1b7644fda1d8dd774)
Author: Richard Hughes <richard at hughsie.com>
Date:   Wed Sep 19 22:56:33 2007 +0100

    remove the PkTask typedef now we have backends

diff --git a/src/pk-backend-internal.h b/src/pk-backend-internal.h
index aaae739..c7398d4 100644
--- a/src/pk-backend-internal.h
+++ b/src/pk-backend-internal.h
@@ -50,8 +50,6 @@ struct _PkBackendClass
 	GObjectClass	parent_class;
 };
 
-typedef PkBackend PkTask;
-
 /* general */
 GType		 pk_backend_get_type			(void);
 PkBackend	*pk_backend_new				(void);
diff --git a/src/pk-engine.c b/src/pk-engine.c
index 063a62c..27d3047 100644
--- a/src/pk-engine.c
+++ b/src/pk-engine.c
@@ -172,7 +172,7 @@ pk_engine_transaction_list_changed_cb (P
  * pk_engine_job_status_changed_cb:
  **/
 static void
-pk_engine_job_status_changed_cb (PkTask *task, PkStatusEnum status, PkEngine *engine)
+pk_engine_job_status_changed_cb (PkBackend *backend, PkStatusEnum status, PkEngine *engine)
 {
 	PkTransactionItem *item;
 	const gchar *status_text;
@@ -180,9 +180,9 @@ pk_engine_job_status_changed_cb (PkTask 
 	g_return_if_fail (engine != NULL);
 	g_return_if_fail (PK_IS_ENGINE (engine));
 
-	item = pk_transaction_list_get_item_from_task (engine->priv->job_list, task);
+	item = pk_transaction_list_get_item_from_backend (engine->priv->job_list, backend);
 	if (item == NULL) {
-		pk_warning ("could not find task");
+		pk_warning ("could not find backend");
 		return;
 	}
 		status_text = pk_status_enum_to_text (status);
@@ -196,16 +196,16 @@ pk_engine_job_status_changed_cb (PkTask 
  * pk_engine_percentage_changed_cb:
  **/
 static void
-pk_engine_percentage_changed_cb (PkTask *task, guint percentage, PkEngine *engine)
+pk_engine_percentage_changed_cb (PkBackend *backend, guint percentage, PkEngine *engine)
 {
 	PkTransactionItem *item;
 
 	g_return_if_fail (engine != NULL);
 	g_return_if_fail (PK_IS_ENGINE (engine));
 
-	item = pk_transaction_list_get_item_from_task (engine->priv->job_list, task);
+	item = pk_transaction_list_get_item_from_backend (engine->priv->job_list, backend);
 	if (item == NULL) {
-		pk_warning ("could not find task");
+		pk_warning ("could not find backend");
 		return;
 	}
 	pk_debug ("emitting percentage-changed tid:%s %i", item->tid, percentage);
@@ -217,16 +217,16 @@ pk_engine_percentage_changed_cb (PkTask 
  * pk_engine_sub_percentage_changed_cb:
  **/
 static void
-pk_engine_sub_percentage_changed_cb (PkTask *task, guint percentage, PkEngine *engine)
+pk_engine_sub_percentage_changed_cb (PkBackend *backend, guint percentage, PkEngine *engine)
 {
 	PkTransactionItem *item;
 
 	g_return_if_fail (engine != NULL);
 	g_return_if_fail (PK_IS_ENGINE (engine));
 
-	item = pk_transaction_list_get_item_from_task (engine->priv->job_list, task);
+	item = pk_transaction_list_get_item_from_backend (engine->priv->job_list, backend);
 	if (item == NULL) {
-		pk_warning ("could not find task");
+		pk_warning ("could not find backend");
 		return;
 	}
 	pk_debug ("emitting sub-percentage-changed tid:%s %i", item->tid, percentage);
@@ -238,16 +238,16 @@ pk_engine_sub_percentage_changed_cb (PkT
  * pk_engine_no_percentage_updates_cb:
  **/
 static void
-pk_engine_no_percentage_updates_cb (PkTask *task, PkEngine *engine)
+pk_engine_no_percentage_updates_cb (PkBackend *backend, PkEngine *engine)
 {
 	PkTransactionItem *item;
 
 	g_return_if_fail (engine != NULL);
 	g_return_if_fail (PK_IS_ENGINE (engine));
 
-	item = pk_transaction_list_get_item_from_task (engine->priv->job_list, task);
+	item = pk_transaction_list_get_item_from_backend (engine->priv->job_list, backend);
 	if (item == NULL) {
-		pk_warning ("could not find task");
+		pk_warning ("could not find backend");
 		return;
 	}
 	pk_debug ("emitting no-percentage-updates tid:%s", item->tid);
@@ -259,16 +259,16 @@ pk_engine_no_percentage_updates_cb (PkTa
  * pk_engine_package_cb:
  **/
 static void
-pk_engine_package_cb (PkTask *task, guint value, const gchar *package_id, const gchar *summary, PkEngine *engine)
+pk_engine_package_cb (PkBackend *backend, guint value, const gchar *package_id, const gchar *summary, PkEngine *engine)
 {
 	PkTransactionItem *item;
 
 	g_return_if_fail (engine != NULL);
 	g_return_if_fail (PK_IS_ENGINE (engine));
 
-	item = pk_transaction_list_get_item_from_task (engine->priv->job_list, task);
+	item = pk_transaction_list_get_item_from_backend (engine->priv->job_list, backend);
 	if (item == NULL) {
-		pk_warning ("could not find task");
+		pk_warning ("could not find backend");
 		return;
 	}
 	pk_debug ("emitting package tid:%s value=%i %s, %s", item->tid, value, package_id, summary);
@@ -280,7 +280,7 @@ pk_engine_package_cb (PkTask *task, guin
  * pk_engine_update_detail_cb:
  **/
 static void
-pk_engine_update_detail_cb (PkTask *task, const gchar *package_id,
+pk_engine_update_detail_cb (PkBackend *backend, const gchar *package_id,
 			    const gchar *updates, const gchar *obsoletes,
 			    const gchar *url, const gchar *restart,
 			    const gchar *update_text, PkEngine *engine)
@@ -290,9 +290,9 @@ pk_engine_update_detail_cb (PkTask *task
 	g_return_if_fail (engine != NULL);
 	g_return_if_fail (PK_IS_ENGINE (engine));
 
-	item = pk_transaction_list_get_item_from_task (engine->priv->job_list, task);
+	item = pk_transaction_list_get_item_from_backend (engine->priv->job_list, backend);
 	if (item == NULL) {
-		pk_warning ("could not find task");
+		pk_warning ("could not find backend");
 		return;
 	}
 	pk_debug ("emitting package tid:%s value=%s, %s, %s, %s, %s, %s", item->tid,
@@ -306,7 +306,7 @@ pk_engine_update_detail_cb (PkTask *task
  * pk_engine_error_code_cb:
  **/
 static void
-pk_engine_error_code_cb (PkTask *task, PkErrorCodeEnum code, const gchar *details, PkEngine *engine)
+pk_engine_error_code_cb (PkBackend *backend, PkErrorCodeEnum code, const gchar *details, PkEngine *engine)
 {
 	PkTransactionItem *item;
 	const gchar *code_text;
@@ -314,9 +314,9 @@ pk_engine_error_code_cb (PkTask *task, P
 	g_return_if_fail (engine != NULL);
 	g_return_if_fail (PK_IS_ENGINE (engine));
 
-	item = pk_transaction_list_get_item_from_task (engine->priv->job_list, task);
+	item = pk_transaction_list_get_item_from_backend (engine->priv->job_list, backend);
 	if (item == NULL) {
-		pk_warning ("could not find task");
+		pk_warning ("could not find backend");
 		return;
 	}
 	code_text = pk_error_enum_to_text (code);
@@ -329,7 +329,7 @@ pk_engine_error_code_cb (PkTask *task, P
  * pk_engine_require_restart_cb:
  **/
 static void
-pk_engine_require_restart_cb (PkTask *task, PkRestartEnum restart, const gchar *details, PkEngine *engine)
+pk_engine_require_restart_cb (PkBackend *backend, PkRestartEnum restart, const gchar *details, PkEngine *engine)
 {
 	PkTransactionItem *item;
 	const gchar *restart_text;
@@ -337,9 +337,9 @@ pk_engine_require_restart_cb (PkTask *ta
 	g_return_if_fail (engine != NULL);
 	g_return_if_fail (PK_IS_ENGINE (engine));
 
-	item = pk_transaction_list_get_item_from_task (engine->priv->job_list, task);
+	item = pk_transaction_list_get_item_from_backend (engine->priv->job_list, backend);
 	if (item == NULL) {
-		pk_warning ("could not find task");
+		pk_warning ("could not find backend");
 		return;
 	}
 	restart_text = pk_restart_enum_to_text (restart);
@@ -352,7 +352,7 @@ pk_engine_require_restart_cb (PkTask *ta
  * pk_engine_description_cb:
  **/
 static void
-pk_engine_description_cb (PkTask *task, const gchar *package_id, const gchar *licence, PkGroupEnum group,
+pk_engine_description_cb (PkBackend *backend, const gchar *package_id, const gchar *licence, PkGroupEnum group,
 			  const gchar *detail, const gchar *url, PkEngine *engine)
 {
 	PkTransactionItem *item;
@@ -361,9 +361,9 @@ pk_engine_description_cb (PkTask *task, 
 	g_return_if_fail (engine != NULL);
 	g_return_if_fail (PK_IS_ENGINE (engine));
 
-	item = pk_transaction_list_get_item_from_task (engine->priv->job_list, task);
+	item = pk_transaction_list_get_item_from_backend (engine->priv->job_list, backend);
 	if (item == NULL) {
-		pk_warning ("could not find task");
+		pk_warning ("could not find backend");
 		return;
 	}
 	group_text = pk_group_enum_to_text (group);
@@ -376,7 +376,7 @@ pk_engine_description_cb (PkTask *task, 
  * pk_engine_finished_cb:
  **/
 static void
-pk_engine_finished_cb (PkTask *task, PkExitEnum exit, PkEngine *engine)
+pk_engine_finished_cb (PkBackend *backend, PkExitEnum exit, PkEngine *engine)
 {
 	PkTransactionItem *item;
 	const gchar *exit_text;
@@ -385,24 +385,24 @@ pk_engine_finished_cb (PkTask *task, PkE
 	g_return_if_fail (engine != NULL);
 	g_return_if_fail (PK_IS_ENGINE (engine));
 
-	item = pk_transaction_list_get_item_from_task (engine->priv->job_list, task);
+	item = pk_transaction_list_get_item_from_backend (engine->priv->job_list, backend);
 	if (item == NULL) {
-		pk_warning ("could not find task");
+		pk_warning ("could not find backend");
 		return;
 	}
 	exit_text = pk_exit_enum_to_text (exit);
 
 	/* find the length of time we have been running */
-	time = pk_backend_get_runtime (task);
+	time = pk_backend_get_runtime (backend);
 
-	pk_debug ("task was running for %f seconds", time);
+	pk_debug ("backend was running for %f seconds", time);
 	pk_transaction_db_set_finished (engine->priv->transaction_db, item->tid, TRUE, time);
 
 	pk_debug ("emitting finished job:%s, '%s', %i", item->tid, exit_text, (guint) time);
 	g_signal_emit (engine, signals [PK_ENGINE_FINISHED], 0, item->tid, exit_text, (guint) time);
 
 	/* unref */
-	g_object_unref (task);
+	g_object_unref (backend);
 	pk_engine_reset_timer (engine);
 }
 
@@ -410,16 +410,16 @@ pk_engine_finished_cb (PkTask *task, PkE
  * pk_engine_allow_interrupt_cb:
  **/
 static void
-pk_engine_allow_interrupt_cb (PkTask *task, gboolean allow_kill, PkEngine *engine)
+pk_engine_allow_interrupt_cb (PkBackend *backend, gboolean allow_kill, PkEngine *engine)
 {
 	PkTransactionItem *item;
 
 	g_return_if_fail (engine != NULL);
 	g_return_if_fail (PK_IS_ENGINE (engine));
 
-	item = pk_transaction_list_get_item_from_task (engine->priv->job_list, task);
+	item = pk_transaction_list_get_item_from_backend (engine->priv->job_list, backend);
 	if (item == NULL) {
-		pk_warning ("could not find task");
+		pk_warning ("could not find backend");
 		return;
 	}
 
@@ -428,64 +428,64 @@ pk_engine_allow_interrupt_cb (PkTask *ta
 }
 
 /**
- * pk_engine_new_task:
+ * pk_engine_new_backend:
  **/
-static PkTask *
-pk_engine_new_task (PkEngine *engine)
+static PkBackend *
+pk_engine_new_backend (PkEngine *engine)
 {
-	PkTask *task;
+	PkBackend *backend;
 	gboolean ret;
 
 	g_return_val_if_fail (engine != NULL, NULL);
 	g_return_val_if_fail (PK_IS_ENGINE (engine), NULL);
 
-	/* allocate a new task */
-	task = pk_backend_new ();
-	ret = pk_backend_load (task, engine->priv->backend);
+	/* allocate a new backend */
+	backend = pk_backend_new ();
+	ret = pk_backend_load (backend, engine->priv->backend);
 	if (ret == FALSE) {
 		pk_error ("Cannot use backend '%s'", engine->priv->backend);
 	}
-	pk_debug ("adding task %p", task);
+	pk_debug ("adding backend %p", backend);
 
 	/* connect up signals */
-	g_signal_connect (task, "job-status-changed",
+	g_signal_connect (backend, "job-status-changed",
 			  G_CALLBACK (pk_engine_job_status_changed_cb), engine);
-	g_signal_connect (task, "percentage-changed",
+	g_signal_connect (backend, "percentage-changed",
 			  G_CALLBACK (pk_engine_percentage_changed_cb), engine);
-	g_signal_connect (task, "sub-percentage-changed",
+	g_signal_connect (backend, "sub-percentage-changed",
 			  G_CALLBACK (pk_engine_sub_percentage_changed_cb), engine);
-	g_signal_connect (task, "no-percentage-updates",
+	g_signal_connect (backend, "no-percentage-updates",
 			  G_CALLBACK (pk_engine_no_percentage_updates_cb), engine);
-	g_signal_connect (task, "package",
+	g_signal_connect (backend, "package",
 			  G_CALLBACK (pk_engine_package_cb), engine);
-	g_signal_connect (task, "update-detail",
+	g_signal_connect (backend, "update-detail",
 			  G_CALLBACK (pk_engine_update_detail_cb), engine);
-	g_signal_connect (task, "error-code",
+	g_signal_connect (backend, "error-code",
 			  G_CALLBACK (pk_engine_error_code_cb), engine);
-	g_signal_connect (task, "require-restart",
+	g_signal_connect (backend, "require-restart",
 			  G_CALLBACK (pk_engine_require_restart_cb), engine);
-	g_signal_connect (task, "finished",
+	g_signal_connect (backend, "finished",
 			  G_CALLBACK (pk_engine_finished_cb), engine);
-	g_signal_connect (task, "description",
+	g_signal_connect (backend, "description",
 			  G_CALLBACK (pk_engine_description_cb), engine);
-	g_signal_connect (task, "allow-interrupt",
+	g_signal_connect (backend, "allow-interrupt",
 			  G_CALLBACK (pk_engine_allow_interrupt_cb), engine);
 
 	/* initialise some stuff */
 	pk_engine_reset_timer (engine);
 
-	pk_transaction_list_add (engine->priv->job_list, task);
+	pk_transaction_list_add (engine->priv->job_list, backend);
 
 	/* we don't add to the array or do the job-list-changed yet
 	 * as this job might fail */
-	return task;
+	return backend;
 }
 
 /**
- * pk_engine_add_task:
+ * pk_engine_add_backend:
  **/
 static gboolean
-pk_engine_add_task (PkEngine *engine, PkTask *task)
+pk_engine_add_backend (PkEngine *engine, PkBackend *backend)
 {
 	PkRoleEnum role;
 	PkTransactionItem *item;
@@ -494,13 +494,13 @@ pk_engine_add_task (PkEngine *engine, Pk
 	g_return_val_if_fail (PK_IS_ENGINE (engine), FALSE);
 
 	/* commit, so it appears in the JobList */
-	pk_transaction_list_commit (engine->priv->job_list, task);
+	pk_transaction_list_commit (engine->priv->job_list, backend);
 
 	/* get all the data we know */
-	item = pk_transaction_list_get_item_from_task (engine->priv->job_list, task);
+	item = pk_transaction_list_get_item_from_backend (engine->priv->job_list, backend);
 
 	/* only save into the database for useful stuff */
-	pk_backend_get_role (task, &role, NULL);
+	pk_backend_get_role (backend, &role, NULL);
 	if (role == PK_ROLE_ENUM_REFRESH_CACHE ||
 	    role == PK_ROLE_ENUM_SYSTEM_UPDATE ||
 	    role == PK_ROLE_ENUM_PACKAGE_REMOVE ||
@@ -516,21 +516,21 @@ pk_engine_add_task (PkEngine *engine, Pk
 }
 
 /**
- * pk_engine_delete_task:
+ * pk_engine_delete_backend:
  *
  * Use this function when a function failed, and we just want to get rid
  * of all references to it.
  **/
 gboolean
-pk_engine_delete_task (PkEngine *engine, PkTask *task)
+pk_engine_delete_backend (PkEngine *engine, PkBackend *backend)
 {
 	g_return_val_if_fail (engine != NULL, FALSE);
 	g_return_val_if_fail (PK_IS_ENGINE (engine), FALSE);
 
-	pk_debug ("removing task %p as it failed", task);
-	pk_transaction_list_remove (engine->priv->job_list, task);
+	pk_debug ("removing backend %p as it failed", backend);
+	pk_transaction_list_remove (engine->priv->job_list, backend);
 
-	/* we don't do g_object_unref (task) here as it is done in the
+	/* we don't do g_object_unref (backend) here as it is done in the
 	   ::finished handler */
 	return TRUE;
 }
@@ -601,25 +601,25 @@ gboolean
 pk_engine_refresh_cache (PkEngine *engine, gboolean force, gchar **tid, GError **error)
 {
 	gboolean ret;
-	PkTask *task;
+	PkBackend *backend;
 	PkTransactionItem *item;
 
 	g_return_val_if_fail (engine != NULL, FALSE);
 	g_return_val_if_fail (PK_IS_ENGINE (engine), FALSE);
 
-	/* create a new task and start it */
-	task = pk_engine_new_task (engine);
-	ret = pk_backend_refresh_cache (task, force);
+	/* create a new backend and start it */
+	backend = pk_engine_new_backend (engine);
+	ret = pk_backend_refresh_cache (backend, force);
 	if (ret == FALSE) {
 		g_set_error (error, PK_ENGINE_ERROR, PK_ENGINE_ERROR_NOT_SUPPORTED,
 			     "Operation not yet supported by backend");
-		pk_engine_delete_task (engine, task);
+		pk_engine_delete_backend (engine, backend);
 		return FALSE;
 	}
-	pk_engine_add_task (engine, task);
-	item = pk_transaction_list_get_item_from_task (engine->priv->job_list, task);
+	pk_engine_add_backend (engine, backend);
+	item = pk_transaction_list_get_item_from_backend (engine->priv->job_list, backend);
 	if (item == NULL) {
-		pk_warning ("could not find task");
+		pk_warning ("could not find backend");
 		return FALSE;
 	}
 	*tid = g_strdup (item->tid);
@@ -634,25 +634,25 @@ gboolean
 pk_engine_get_updates (PkEngine *engine, gchar **tid, GError **error)
 {
 	gboolean ret;
-	PkTask *task;
+	PkBackend *backend;
 	PkTransactionItem *item;
 
 	g_return_val_if_fail (engine != NULL, FALSE);
 	g_return_val_if_fail (PK_IS_ENGINE (engine), FALSE);
 
-	/* create a new task and start it */
-	task = pk_engine_new_task (engine);
-	ret = pk_backend_get_updates (task);
+	/* create a new backend and start it */
+	backend = pk_engine_new_backend (engine);
+	ret = pk_backend_get_updates (backend);
 	if (ret == FALSE) {
 		g_set_error (error, PK_ENGINE_ERROR, PK_ENGINE_ERROR_NOT_SUPPORTED,
 			     "Operation not yet supported by backend");
-		pk_engine_delete_task (engine, task);
+		pk_engine_delete_backend (engine, backend);
 		return FALSE;
 	}
-	pk_engine_add_task (engine, task);
-	item = pk_transaction_list_get_item_from_task (engine->priv->job_list, task);
+	pk_engine_add_backend (engine, backend);
+	item = pk_transaction_list_get_item_from_backend (engine->priv->job_list, backend);
 	if (item == NULL) {
-		pk_warning ("could not find task");
+		pk_warning ("could not find backend");
 		return FALSE;
 	}
 	*tid = g_strdup (item->tid);
@@ -720,7 +720,7 @@ pk_engine_search_name (PkEngine *engine,
 		       gchar **tid, GError **error)
 {
 	gboolean ret;
-	PkTask *task;
+	PkBackend *backend;
 	PkTransactionItem *item;
 
 	g_return_val_if_fail (engine != NULL, FALSE);
@@ -738,19 +738,19 @@ pk_engine_search_name (PkEngine *engine,
 		return FALSE;
 	}
 
-	/* create a new task and start it */
-	task = pk_engine_new_task (engine);
-	ret = pk_backend_search_name (task, filter, search);
+	/* create a new backend and start it */
+	backend = pk_engine_new_backend (engine);
+	ret = pk_backend_search_name (backend, filter, search);
 	if (ret == FALSE) {
 		g_set_error (error, PK_ENGINE_ERROR, PK_ENGINE_ERROR_NOT_SUPPORTED,
 			     "Operation not yet supported by backend");
-		pk_engine_delete_task (engine, task);
+		pk_engine_delete_backend (engine, backend);
 		return FALSE;
 	}
-	pk_engine_add_task (engine, task);
-	item = pk_transaction_list_get_item_from_task (engine->priv->job_list, task);
+	pk_engine_add_backend (engine, backend);
+	item = pk_transaction_list_get_item_from_backend (engine->priv->job_list, backend);
 	if (item == NULL) {
-		pk_warning ("could not find task");
+		pk_warning ("could not find backend");
 		return FALSE;
 	}
 	*tid = g_strdup (item->tid);
@@ -766,7 +766,7 @@ pk_engine_search_details (PkEngine *engi
 			  gchar **tid, GError **error)
 {
 	gboolean ret;
-	PkTask *task;
+	PkBackend *backend;
 	PkTransactionItem *item;
 
 	g_return_val_if_fail (engine != NULL, FALSE);
@@ -784,19 +784,19 @@ pk_engine_search_details (PkEngine *engi
 		return FALSE;
 	}
 
-	/* create a new task and start it */
-	task = pk_engine_new_task (engine);
-	ret = pk_backend_search_details (task, filter, search);
+	/* create a new backend and start it */
+	backend = pk_engine_new_backend (engine);
+	ret = pk_backend_search_details (backend, filter, search);
 	if (ret == FALSE) {
 		g_set_error (error, PK_ENGINE_ERROR, PK_ENGINE_ERROR_NOT_SUPPORTED,
 			     "Operation not yet supported by backend");
-		pk_engine_delete_task (engine, task);
+		pk_engine_delete_backend (engine, backend);
 		return FALSE;
 	}
-	pk_engine_add_task (engine, task);
-	item = pk_transaction_list_get_item_from_task (engine->priv->job_list, task);
+	pk_engine_add_backend (engine, backend);
+	item = pk_transaction_list_get_item_from_backend (engine->priv->job_list, backend);
 	if (item == NULL) {
-		pk_warning ("could not find task");
+		pk_warning ("could not find backend");
 		return FALSE;
 	}
 	*tid = g_strdup (item->tid);
@@ -812,7 +812,7 @@ pk_engine_search_group (PkEngine *engine
 			gchar **tid, GError **error)
 {
 	gboolean ret;
-	PkTask *task;
+	PkBackend *backend;
 	PkTransactionItem *item;
 
 	g_return_val_if_fail (engine != NULL, FALSE);
@@ -830,19 +830,19 @@ pk_engine_search_group (PkEngine *engine
 		return FALSE;
 	}
 
-	/* create a new task and start it */
-	task = pk_engine_new_task (engine);
-	ret = pk_backend_search_group (task, filter, search);
+	/* create a new backend and start it */
+	backend = pk_engine_new_backend (engine);
+	ret = pk_backend_search_group (backend, filter, search);
 	if (ret == FALSE) {
 		g_set_error (error, PK_ENGINE_ERROR, PK_ENGINE_ERROR_NOT_SUPPORTED,
 			     "Operation not yet supported by backend");
-		pk_engine_delete_task (engine, task);
+		pk_engine_delete_backend (engine, backend);
 		return FALSE;
 	}
-	pk_engine_add_task (engine, task);
-	item = pk_transaction_list_get_item_from_task (engine->priv->job_list, task);
+	pk_engine_add_backend (engine, backend);
+	item = pk_transaction_list_get_item_from_backend (engine->priv->job_list, backend);
 	if (item == NULL) {
-		pk_warning ("could not find task");
+		pk_warning ("could not find backend");
 		return FALSE;
 	}
 	*tid = g_strdup (item->tid);
@@ -858,7 +858,7 @@ pk_engine_search_file (PkEngine *engine,
 		       gchar **tid, GError **error)
 {
 	gboolean ret;
-	PkTask *task;
+	PkBackend *backend;
 	PkTransactionItem *item;
 
 	g_return_val_if_fail (engine != NULL, FALSE);
@@ -876,19 +876,19 @@ pk_engine_search_file (PkEngine *engine,
 		return FALSE;
 	}
 
-	/* create a new task and start it */
-	task = pk_engine_new_task (engine);
-	ret = pk_backend_search_file (task, filter, search);
+	/* create a new backend and start it */
+	backend = pk_engine_new_backend (engine);
+	ret = pk_backend_search_file (backend, filter, search);
 	if (ret == FALSE) {
 		g_set_error (error, PK_ENGINE_ERROR, PK_ENGINE_ERROR_NOT_SUPPORTED,
 			     "Operation not yet supported by backend");
-		pk_engine_delete_task (engine, task);
+		pk_engine_delete_backend (engine, backend);
 		return FALSE;
 	}
-	pk_engine_add_task (engine, task);
-	item = pk_transaction_list_get_item_from_task (engine->priv->job_list, task);
+	pk_engine_add_backend (engine, backend);
+	item = pk_transaction_list_get_item_from_backend (engine->priv->job_list, backend);
 	if (item == NULL) {
-		pk_warning ("could not find task");
+		pk_warning ("could not find backend");
 		return FALSE;
 	}
 	*tid = g_strdup (item->tid);
@@ -904,7 +904,7 @@ pk_engine_get_depends (PkEngine *engine,
 		       gchar **tid, GError **error)
 {
 	gboolean ret;
-	PkTask *task;
+	PkBackend *backend;
 	PkTransactionItem *item;
 
 	g_return_val_if_fail (engine != NULL, FALSE);
@@ -918,19 +918,19 @@ pk_engine_get_depends (PkEngine *engine,
 		return FALSE;
 	}
 
-	/* create a new task and start it */
-	task = pk_engine_new_task (engine);
-	ret = pk_backend_get_depends (task, package_id);
+	/* create a new backend and start it */
+	backend = pk_engine_new_backend (engine);
+	ret = pk_backend_get_depends (backend, package_id);
 	if (ret == FALSE) {
 		g_set_error (error, PK_ENGINE_ERROR, PK_ENGINE_ERROR_NOT_SUPPORTED,
 			     "Operation not yet supported by backend");
-		pk_engine_delete_task (engine, task);
+		pk_engine_delete_backend (engine, backend);
 		return FALSE;
 	}
-	pk_engine_add_task (engine, task);
-	item = pk_transaction_list_get_item_from_task (engine->priv->job_list, task);
+	pk_engine_add_backend (engine, backend);
+	item = pk_transaction_list_get_item_from_backend (engine->priv->job_list, backend);
 	if (item == NULL) {
-		pk_warning ("could not find task");
+		pk_warning ("could not find backend");
 		return FALSE;
 	}
 	*tid = g_strdup (item->tid);
@@ -946,7 +946,7 @@ pk_engine_get_requires (PkEngine *engine
 		        gchar **tid, GError **error)
 {
 	gboolean ret;
-	PkTask *task;
+	PkBackend *backend;
 	PkTransactionItem *item;
 
 	g_return_val_if_fail (engine != NULL, FALSE);
@@ -960,19 +960,19 @@ pk_engine_get_requires (PkEngine *engine
 		return FALSE;
 	}
 
-	/* create a new task and start it */
-	task = pk_engine_new_task (engine);
-	ret = pk_backend_get_requires (task, package_id);
+	/* create a new backend and start it */
+	backend = pk_engine_new_backend (engine);
+	ret = pk_backend_get_requires (backend, package_id);
 	if (ret == FALSE) {
 		g_set_error (error, PK_ENGINE_ERROR, PK_ENGINE_ERROR_NOT_SUPPORTED,
 			     "Operation not yet supported by backend");
-		pk_engine_delete_task (engine, task);
+		pk_engine_delete_backend (engine, backend);
 		return FALSE;
 	}
-	pk_engine_add_task (engine, task);
-	item = pk_transaction_list_get_item_from_task (engine->priv->job_list, task);
+	pk_engine_add_backend (engine, backend);
+	item = pk_transaction_list_get_item_from_backend (engine->priv->job_list, backend);
 	if (item == NULL) {
-		pk_warning ("could not find task");
+		pk_warning ("could not find backend");
 		return FALSE;
 	}
 	*tid = g_strdup (item->tid);
@@ -988,7 +988,7 @@ pk_engine_get_update_detail (PkEngine *e
 		             gchar **tid, GError **error)
 {
 	gboolean ret;
-	PkTask *task;
+	PkBackend *backend;
 	PkTransactionItem *item;
 
 	g_return_val_if_fail (engine != NULL, FALSE);
@@ -1002,19 +1002,19 @@ pk_engine_get_update_detail (PkEngine *e
 		return FALSE;
 	}
 
-	/* create a new task and start it */
-	task = pk_engine_new_task (engine);
-	ret = pk_backend_get_update_detail (task, package_id);
+	/* create a new backend and start it */
+	backend = pk_engine_new_backend (engine);
+	ret = pk_backend_get_update_detail (backend, package_id);
 	if (ret == FALSE) {
 		g_set_error (error, PK_ENGINE_ERROR, PK_ENGINE_ERROR_NOT_SUPPORTED,
 			     "Operation not yet supported by backend");
-		pk_engine_delete_task (engine, task);
+		pk_engine_delete_backend (engine, backend);
 		return FALSE;
 	}
-	pk_engine_add_task (engine, task);
-	item = pk_transaction_list_get_item_from_task (engine->priv->job_list, task);
+	pk_engine_add_backend (engine, backend);
+	item = pk_transaction_list_get_item_from_backend (engine->priv->job_list, backend);
 	if (item == NULL) {
-		pk_warning ("could not find task");
+		pk_warning ("could not find backend");
 		return FALSE;
 	}
 	*tid = g_strdup (item->tid);
@@ -1030,25 +1030,25 @@ pk_engine_get_description (PkEngine *eng
 			   gchar **tid, GError **error)
 {
 	gboolean ret;
-	PkTask *task;
+	PkBackend *backend;
 	PkTransactionItem *item;
 
 	g_return_val_if_fail (engine != NULL, FALSE);
 	g_return_val_if_fail (PK_IS_ENGINE (engine), FALSE);
 
-	/* create a new task and start it */
-	task = pk_engine_new_task (engine);
-	ret = pk_backend_get_description (task, package_id);
+	/* create a new backend and start it */
+	backend = pk_engine_new_backend (engine);
+	ret = pk_backend_get_description (backend, package_id);
 	if (ret == FALSE) {
 		g_set_error (error, PK_ENGINE_ERROR, PK_ENGINE_ERROR_NOT_SUPPORTED,
 			     "Operation not yet supported by backend");
-		pk_engine_delete_task (engine, task);
+		pk_engine_delete_backend (engine, backend);
 		return FALSE;
 	}
-	pk_engine_add_task (engine, task);
-	item = pk_transaction_list_get_item_from_task (engine->priv->job_list, task);
+	pk_engine_add_backend (engine, backend);
+	item = pk_transaction_list_get_item_from_backend (engine->priv->job_list, backend);
 	if (item == NULL) {
-		pk_warning ("could not find task");
+		pk_warning ("could not find backend");
 		return FALSE;
 	}
 	*tid = g_strdup (item->tid);
@@ -1065,7 +1065,7 @@ pk_engine_update_system (PkEngine *engin
 {
 	gboolean ret;
 	GError *error;
-	PkTask *task;
+	PkBackend *backend;
 	PkTransactionItem *item;
 
 	g_return_if_fail (engine != NULL);
@@ -1086,21 +1086,21 @@ pk_engine_update_system (PkEngine *engin
 		return;
 	}
 
-	/* create a new task and start it */
-	task = pk_engine_new_task (engine);
-	ret = pk_backend_update_system (task);
+	/* create a new backend and start it */
+	backend = pk_engine_new_backend (engine);
+	ret = pk_backend_update_system (backend);
 	if (ret == FALSE) {
 		error = g_error_new (PK_ENGINE_ERROR, PK_ENGINE_ERROR_NOT_SUPPORTED,
 				     "Operation not yet supported by backend");
-		pk_engine_delete_task (engine, task);
+		pk_engine_delete_backend (engine, backend);
 		dbus_g_method_return_error (context, error);
 		return;
 	}
-	pk_engine_add_task (engine, task);
+	pk_engine_add_backend (engine, backend);
 
-	item = pk_transaction_list_get_item_from_task (engine->priv->job_list, task);
+	item = pk_transaction_list_get_item_from_backend (engine->priv->job_list, backend);
 	if (item == NULL) {
-		pk_warning ("could not find task");
+		pk_warning ("could not find backend");
 		return;
 	}
 	dbus_g_method_return (context, item->tid);
@@ -1115,7 +1115,7 @@ pk_engine_remove_package (PkEngine *engi
 {
 	PkTransactionItem *item;
 	gboolean ret;
-	PkTask *task;
+	PkBackend *backend;
 	GError *error;
 
 	g_return_if_fail (engine != NULL);
@@ -1137,21 +1137,21 @@ pk_engine_remove_package (PkEngine *engi
 		return;
 	}
 
-	/* create a new task and start it */
-	task = pk_engine_new_task (engine);
-	ret = pk_backend_remove_package (task, package_id, allow_deps);
+	/* create a new backend and start it */
+	backend = pk_engine_new_backend (engine);
+	ret = pk_backend_remove_package (backend, package_id, allow_deps);
 	if (ret == FALSE) {
 		error = g_error_new (PK_ENGINE_ERROR, PK_ENGINE_ERROR_NOT_SUPPORTED,
 				     "Operation not yet supported by backend");
-		pk_engine_delete_task (engine, task);
+		pk_engine_delete_backend (engine, backend);
 		dbus_g_method_return_error (context, error);
 		return;
 	}
-	pk_engine_add_task (engine, task);
+	pk_engine_add_backend (engine, backend);
 
-	item = pk_transaction_list_get_item_from_task (engine->priv->job_list, task);
+	item = pk_transaction_list_get_item_from_backend (engine->priv->job_list, backend);
 	if (item == NULL) {
-		pk_warning ("could not find task");
+		pk_warning ("could not find backend");
 		return;
 	}
 	dbus_g_method_return (context, item->tid);
@@ -1168,7 +1168,7 @@ pk_engine_install_package (PkEngine *eng
 {
 	gboolean ret;
 	PkTransactionItem *item;
-	PkTask *task;
+	PkBackend *backend;
 	GError *error;
 
 	g_return_if_fail (engine != NULL);
@@ -1190,21 +1190,21 @@ pk_engine_install_package (PkEngine *eng
 		return;
 	}
 
-	/* create a new task and start it */
-	task = pk_engine_new_task (engine);
-	ret = pk_backend_install_package (task, package_id);
+	/* create a new backend and start it */
+	backend = pk_engine_new_backend (engine);
+	ret = pk_backend_install_package (backend, package_id);
 	if (ret == FALSE) {
 		error = g_error_new (PK_ENGINE_ERROR, PK_ENGINE_ERROR_NOT_SUPPORTED,
 				     "Operation not yet supported by backend");
-		pk_engine_delete_task (engine, task);
+		pk_engine_delete_backend (engine, backend);
 		dbus_g_method_return_error (context, error);
 		return;
 	}
-	pk_engine_add_task (engine, task);
+	pk_engine_add_backend (engine, backend);
 
-	item = pk_transaction_list_get_item_from_task (engine->priv->job_list, task);
+	item = pk_transaction_list_get_item_from_backend (engine->priv->job_list, backend);
 	if (item == NULL) {
-		pk_warning ("could not find task");
+		pk_warning ("could not find backend");
 		return;
 	}
 	dbus_g_method_return (context, item->tid);
@@ -1221,7 +1221,7 @@ pk_engine_update_package (PkEngine *engi
 {
 	gboolean ret;
 	PkTransactionItem *item;
-	PkTask *task;
+	PkBackend *backend;
 	GError *error;
 
 	g_return_if_fail (engine != NULL);
@@ -1243,21 +1243,21 @@ pk_engine_update_package (PkEngine *engi
 		return;
 	}
 
-	/* create a new task and start it */
-	task = pk_engine_new_task (engine);
-	ret = pk_backend_update_package (task, package_id);
+	/* create a new backend and start it */
+	backend = pk_engine_new_backend (engine);
+	ret = pk_backend_update_package (backend, package_id);
 	if (ret == FALSE) {
 		error = g_error_new (PK_ENGINE_ERROR, PK_ENGINE_ERROR_NOT_SUPPORTED,
 				     "Operation not yet supported by backend");
-		pk_engine_delete_task (engine, task);
+		pk_engine_delete_backend (engine, backend);
 		dbus_g_method_return_error (context, error);
 		return;
 	}
-	pk_engine_add_task (engine, task);
+	pk_engine_add_backend (engine, backend);
 
-	item = pk_transaction_list_get_item_from_task (engine->priv->job_list, task);
+	item = pk_transaction_list_get_item_from_backend (engine->priv->job_list, backend);
 	if (item == NULL) {
-		pk_warning ("could not find task");
+		pk_warning ("could not find backend");
 		return;
 	}
 	dbus_g_method_return (context, item->tid);
@@ -1458,18 +1458,18 @@ pk_engine_cancel (PkEngine *engine, cons
 gboolean
 pk_engine_get_actions (PkEngine *engine, gchar **actions, GError **error)
 {
-	PkTask *task;
+	PkBackend *backend;
 	PkEnumList *elist;
 
 	g_return_val_if_fail (engine != NULL, FALSE);
 	g_return_val_if_fail (PK_IS_ENGINE (engine), FALSE);
 
-	/* create a new task and start it */
-	task = pk_engine_new_task (engine);
-	pk_backend_load (task, engine->priv->backend);
-	elist = pk_backend_get_actions (task);
+	/* create a new backend and start it */
+	backend = pk_engine_new_backend (engine);
+	pk_backend_load (backend, engine->priv->backend);
+	elist = pk_backend_get_actions (backend);
 	*actions = pk_enum_list_to_string (elist);
-	g_object_unref (task);
+	g_object_unref (backend);
 	g_object_unref (elist);
 
 	return TRUE;
@@ -1482,18 +1482,18 @@ pk_engine_get_actions (PkEngine *engine,
 gboolean
 pk_engine_get_groups (PkEngine *engine, gchar **groups, GError **error)
 {
-	PkTask *task;
+	PkBackend *backend;
 	PkEnumList *elist;
 
 	g_return_val_if_fail (engine != NULL, FALSE);
 	g_return_val_if_fail (PK_IS_ENGINE (engine), FALSE);
 
-	/* create a new task and start it */
-	task = pk_engine_new_task (engine);
-	pk_backend_load (task, engine->priv->backend);
-	elist = pk_backend_get_groups (task);
+	/* create a new backend and start it */
+	backend = pk_engine_new_backend (engine);
+	pk_backend_load (backend, engine->priv->backend);
+	elist = pk_backend_get_groups (backend);
 	*groups = pk_enum_list_to_string (elist);
-	g_object_unref (task);
+	g_object_unref (backend);
 	g_object_unref (elist);
 
 	return TRUE;
@@ -1506,18 +1506,18 @@ pk_engine_get_groups (PkEngine *engine, 
 gboolean
 pk_engine_get_filters (PkEngine *engine, gchar **filters, GError **error)
 {
-	PkTask *task;
+	PkBackend *backend;
 	PkEnumList *elist;
 
 	g_return_val_if_fail (engine != NULL, FALSE);
 	g_return_val_if_fail (PK_IS_ENGINE (engine), FALSE);
 
-	/* create a new task and start it */
-	task = pk_engine_new_task (engine);
-	pk_backend_load (task, engine->priv->backend);
-	elist = pk_backend_get_filters (task);
+	/* create a new backend and start it */
+	backend = pk_engine_new_backend (engine);
+	pk_backend_load (backend, engine->priv->backend);
+	elist = pk_backend_get_filters (backend);
 	*filters = pk_enum_list_to_string (elist);
-	g_object_unref (task);
+	g_object_unref (backend);
 	g_object_unref (elist);
 
 	return TRUE;
diff --git a/src/pk-transaction-list.c b/src/pk-transaction-list.c
index 3dcd989..f78c868 100644
--- a/src/pk-transaction-list.c
+++ b/src/pk-transaction-list.c
@@ -119,7 +119,7 @@ pk_transaction_list_remove (PkTransactio
 	g_return_val_if_fail (tlist != NULL, FALSE);
 	g_return_val_if_fail (PK_IS_TRANSACTION_LIST (tlist), FALSE);
 
-	item = pk_transaction_list_get_item_from_task (tlist, backend);
+	item = pk_transaction_list_get_item_from_backend (tlist, backend);
 	if (item == NULL) {
 		return FALSE;
 	}
@@ -147,7 +147,7 @@ pk_transaction_list_backend_finished_cb 
 	g_return_if_fail (tlist != NULL);
 	g_return_if_fail (PK_IS_TRANSACTION_LIST (tlist));
 
-	item = pk_transaction_list_get_item_from_task (tlist, backend);
+	item = pk_transaction_list_get_item_from_backend (tlist, backend);
 	if (item == NULL) {
 		pk_error ("moo!");
 	}
@@ -204,7 +204,7 @@ pk_transaction_list_commit (PkTransactio
 	g_return_val_if_fail (tlist != NULL, FALSE);
 	g_return_val_if_fail (PK_IS_TRANSACTION_LIST (tlist), FALSE);
 
-	item = pk_transaction_list_get_item_from_task (tlist, backend);
+	item = pk_transaction_list_get_item_from_backend (tlist, backend);
 	if (item == NULL) {
 		return FALSE;
 	}
@@ -215,7 +215,7 @@ pk_transaction_list_commit (PkTransactio
 	pk_debug ("emmitting ::changed");
 	g_signal_emit (tlist, signals [PK_TRANSACTION_LIST_CHANGED], 0);
 
-	/* connect up finished so we can start the next task */
+	/* connect up finished so we can start the next backend */
 	g_signal_connect (backend, "finished",
 			  G_CALLBACK (pk_transaction_list_backend_finished_cb), tlist);
 
@@ -318,10 +318,10 @@ pk_transaction_list_get_item_from_tid (P
 }
 
 /**
- * pk_transaction_list_get_item_from_task:
+ * pk_transaction_list_get_item_from_backend:
  **/
 PkTransactionItem *
-pk_transaction_list_get_item_from_task (PkTransactionList *tlist, PkBackend *backend)
+pk_transaction_list_get_item_from_backend (PkTransactionList *tlist, PkBackend *backend)
 {
 	guint i;
 	guint length;
diff --git a/src/pk-transaction-list.h b/src/pk-transaction-list.h
index 173a528..75842fe 100644
--- a/src/pk-transaction-list.h
+++ b/src/pk-transaction-list.h
@@ -71,7 +71,7 @@ gchar		**pk_transaction_list_get_array		
 guint		 pk_transaction_list_get_size		(PkTransactionList	*tlist);
 PkTransactionItem *pk_transaction_list_get_item_from_tid(PkTransactionList	*tlist,
 							 const gchar		*tid);
-PkTransactionItem *pk_transaction_list_get_item_from_task(PkTransactionList	*tlist,
+PkTransactionItem *pk_transaction_list_get_item_from_backend(PkTransactionList	*tlist,
 							 PkBackend		*backend);
 
 G_END_DECLS
diff-tree e0dd6bacd5587696cdde3dc1b7644fda1d8dd774 (from 0ddcafaa54641c96ff576f630f372f16e5773d99)
Author: Richard Hughes <richard at hughsie.com>
Date:   Wed Sep 19 22:48:57 2007 +0100

    remove remnats of JOB in PkTransactionList

diff --git a/src/pk-transaction-list.c b/src/pk-transaction-list.c
index 1e0df43..3dcd989 100644
--- a/src/pk-transaction-list.c
+++ b/src/pk-transaction-list.c
@@ -43,7 +43,7 @@ static void     pk_transaction_list_clas
 static void     pk_transaction_list_init	(PkTransactionList      *tlist);
 static void     pk_transaction_list_finalize	(GObject        *object);
 
-#define PK_TRANSACTION_LIST_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), PK_TYPE_JOB_LIST, PkTransactionListPrivate))
+#define PK_TRANSACTION_LIST_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), PK_TYPE_TRANSACTION_LIST, PkTransactionListPrivate))
 
 struct PkTransactionListPrivate
 {
@@ -62,7 +62,7 @@ G_DEFINE_TYPE (PkTransactionList, pk_tra
 /**
  * pk_transaction_list_role_present:
  *
- * if there is a queued job with this role, useful to avoid having
+ * if there is a queued transaction with this role, useful to avoid having
  * multiple system updates queued
  **/
 gboolean
@@ -74,9 +74,9 @@ pk_transaction_list_role_present (PkTran
 	PkTransactionItem *item;
 
 	g_return_val_if_fail (tlist != NULL, FALSE);
-	g_return_val_if_fail (PK_IS_JOB_LIST (tlist), FALSE);
+	g_return_val_if_fail (PK_IS_TRANSACTION_LIST (tlist), FALSE);
 
-	/* check for existing job doing an update */
+	/* check for existing transaction doing an update */
 	length = tlist->priv->array->len;
 	for (i=0; i<length; i++) {
 		item = (PkTransactionItem *) g_ptr_array_index (tlist->priv->array, i);
@@ -97,7 +97,7 @@ pk_transaction_list_add (PkTransactionLi
 	PkTransactionItem *item;
 
 	g_return_val_if_fail (tlist != NULL, NULL);
-	g_return_val_if_fail (PK_IS_JOB_LIST (tlist), NULL);
+	g_return_val_if_fail (PK_IS_TRANSACTION_LIST (tlist), NULL);
 
 	/* add to the array */
 	item = g_new0 (PkTransactionItem, 1);
@@ -117,7 +117,7 @@ pk_transaction_list_remove (PkTransactio
 {
 	PkTransactionItem *item;
 	g_return_val_if_fail (tlist != NULL, FALSE);
-	g_return_val_if_fail (PK_IS_JOB_LIST (tlist), FALSE);
+	g_return_val_if_fail (PK_IS_TRANSACTION_LIST (tlist), FALSE);
 
 	item = pk_transaction_list_get_item_from_task (tlist, backend);
 	if (item == NULL) {
@@ -145,13 +145,13 @@ pk_transaction_list_backend_finished_cb 
 	PkTransactionItem *item;
 
 	g_return_if_fail (tlist != NULL);
-	g_return_if_fail (PK_IS_JOB_LIST (tlist));
+	g_return_if_fail (PK_IS_TRANSACTION_LIST (tlist));
 
 	item = pk_transaction_list_get_item_from_task (tlist, backend);
 	if (item == NULL) {
 		pk_error ("moo!");
 	}
-	pk_debug ("job %s completed, removing", item->tid);
+	pk_debug ("transaction %s completed, removing", item->tid);
 	pk_transaction_list_remove (tlist, backend);
 
 	/* do the next transaction now if we have another queued */
@@ -179,9 +179,9 @@ pk_transaction_list_number_running (PkTr
 	PkTransactionItem *item;
 
 	g_return_val_if_fail (tlist != NULL, 0);
-	g_return_val_if_fail (PK_IS_JOB_LIST (tlist), 0);
+	g_return_val_if_fail (PK_IS_TRANSACTION_LIST (tlist), 0);
 
-	/* find all the jobs in progress */
+	/* find all the transactions in progress */
 	length = tlist->priv->array->len;
 	for (i=0; i<length; i++) {
 		item = (PkTransactionItem *) g_ptr_array_index (tlist->priv->array, i);
@@ -202,13 +202,13 @@ pk_transaction_list_commit (PkTransactio
 	gboolean search_okay = TRUE;
 	PkTransactionItem *item;
 	g_return_val_if_fail (tlist != NULL, FALSE);
-	g_return_val_if_fail (PK_IS_JOB_LIST (tlist), FALSE);
+	g_return_val_if_fail (PK_IS_TRANSACTION_LIST (tlist), FALSE);
 
 	item = pk_transaction_list_get_item_from_task (tlist, backend);
 	if (item == NULL) {
 		return FALSE;
 	}
-	pk_debug ("marking job %s as committed", item->tid);
+	pk_debug ("marking transaction %s as committed", item->tid);
 	item->committed = TRUE;
 
 	/* we will changed what is running */
@@ -262,15 +262,15 @@ pk_transaction_list_get_array (PkTransac
 	PkTransactionItem *item;
 
 	g_return_val_if_fail (tlist != NULL, NULL);
-	g_return_val_if_fail (PK_IS_JOB_LIST (tlist), NULL);
+	g_return_val_if_fail (PK_IS_TRANSACTION_LIST (tlist), NULL);
 
-	/* find all the jobs in progress */
+	/* find all the transactions in progress */
 	length = tlist->priv->array->len;
 
 	/* create new strv list */
 	array = g_new0 (gchar *, length);
 
-	pk_debug ("%i active jobs", length);
+	pk_debug ("%i active transactions", length);
 	for (i=0; i<length; i++) {
 		item = (PkTransactionItem *) g_ptr_array_index (tlist->priv->array, i);
 		/* only return in the list if it worked */
@@ -289,7 +289,7 @@ guint
 pk_transaction_list_get_size (PkTransactionList *tlist)
 {
 	g_return_val_if_fail (tlist != NULL, 0);
-	g_return_val_if_fail (PK_IS_JOB_LIST (tlist), 0);
+	g_return_val_if_fail (PK_IS_TRANSACTION_LIST (tlist), 0);
 	return tlist->priv->array->len;
 }
 
@@ -304,9 +304,9 @@ pk_transaction_list_get_item_from_tid (P
 	PkTransactionItem *item;
 
 	g_return_val_if_fail (tlist != NULL, NULL);
-	g_return_val_if_fail (PK_IS_JOB_LIST (tlist), NULL);
+	g_return_val_if_fail (PK_IS_TRANSACTION_LIST (tlist), NULL);
 
-	/* find the backend with the job ID */
+	/* find the backend with the transaction ID */
 	length = tlist->priv->array->len;
 	for (i=0; i<length; i++) {
 		item = (PkTransactionItem *) g_ptr_array_index (tlist->priv->array, i);
@@ -328,9 +328,9 @@ pk_transaction_list_get_item_from_task (
 	PkTransactionItem *item;
 
 	g_return_val_if_fail (tlist != NULL, NULL);
-	g_return_val_if_fail (PK_IS_JOB_LIST (tlist), NULL);
+	g_return_val_if_fail (PK_IS_TRANSACTION_LIST (tlist), NULL);
 
-	/* find the backend with the job ID */
+	/* find the backend with the transaction ID */
 	length = tlist->priv->array->len;
 	for (i=0; i<length; i++) {
 		item = (PkTransactionItem *) g_ptr_array_index (tlist->priv->array, i);
@@ -382,7 +382,7 @@ pk_transaction_list_finalize (GObject *o
 	PkTransactionList *tlist;
 
 	g_return_if_fail (object != NULL);
-	g_return_if_fail (PK_IS_JOB_LIST (object));
+	g_return_if_fail (PK_IS_TRANSACTION_LIST (object));
 
 	tlist = PK_TRANSACTION_LIST (object);
 
@@ -401,7 +401,7 @@ PkTransactionList *
 pk_transaction_list_new (void)
 {
 	PkTransactionList *tlist;
-	tlist = g_object_new (PK_TYPE_JOB_LIST, NULL);
+	tlist = g_object_new (PK_TYPE_TRANSACTION_LIST, NULL);
 	return PK_TRANSACTION_LIST (tlist);
 }
 
diff --git a/src/pk-transaction-list.h b/src/pk-transaction-list.h
index 93159ca..173a528 100644
--- a/src/pk-transaction-list.h
+++ b/src/pk-transaction-list.h
@@ -27,12 +27,12 @@
 
 G_BEGIN_DECLS
 
-#define PK_TYPE_JOB_LIST		(pk_transaction_list_get_type ())
-#define PK_TRANSACTION_LIST(o)			(G_TYPE_CHECK_INSTANCE_CAST ((o), PK_TYPE_JOB_LIST, PkTransactionList))
-#define PK_TRANSACTION_LIST_CLASS(k)		(G_TYPE_CHECK_CLASS_CAST((k), PK_TYPE_JOB_LIST, PkTransactionListClass))
-#define PK_IS_JOB_LIST(o)	 	(G_TYPE_CHECK_INSTANCE_TYPE ((o), PK_TYPE_JOB_LIST))
-#define PK_IS_JOB_LIST_CLASS(k)		(G_TYPE_CHECK_CLASS_TYPE ((k), PK_TYPE_JOB_LIST))
-#define PK_TRANSACTION_LIST_GET_CLASS(o)	(G_TYPE_INSTANCE_GET_CLASS ((o), PK_TYPE_JOB_LIST, PkTransactionListClass))
+#define PK_TYPE_TRANSACTION_LIST		(pk_transaction_list_get_type ())
+#define PK_TRANSACTION_LIST(o)			(G_TYPE_CHECK_INSTANCE_CAST ((o), PK_TYPE_TRANSACTION_LIST, PkTransactionList))
+#define PK_TRANSACTION_LIST_CLASS(k)		(G_TYPE_CHECK_CLASS_CAST((k), PK_TYPE_TRANSACTION_LIST, PkTransactionListClass))
+#define PK_IS_TRANSACTION_LIST(o)	 	(G_TYPE_CHECK_INSTANCE_TYPE ((o), PK_TYPE_TRANSACTION_LIST))
+#define PK_IS_TRANSACTION_LIST_CLASS(k)		(G_TYPE_CHECK_CLASS_TYPE ((k), PK_TYPE_TRANSACTION_LIST))
+#define PK_TRANSACTION_LIST_GET_CLASS(o)	(G_TYPE_INSTANCE_GET_CLASS ((o), PK_TYPE_TRANSACTION_LIST, PkTransactionListClass))
 #define PK_TRANSACTION_LIST_ERROR		(pk_transaction_list_error_quark ())
 #define PK_TRANSACTION_LIST_TYPE_ERROR		(pk_transaction_list_error_get_type ()) 
 
@@ -40,7 +40,7 @@ typedef struct PkTransactionListPrivate 
 
 typedef struct
 {
-	 GObject		 parent;
+	 GObject			 parent;
 	 PkTransactionListPrivate	*priv;
 } PkTransactionList;
 
diff-tree 0ddcafaa54641c96ff576f630f372f16e5773d99 (from 50d5fa4174f209fcd4b1d161471e68e468dde97a)
Author: Richard Hughes <richard at hughsie.com>
Date:   Wed Sep 19 00:32:12 2007 +0100

    Update TODO

diff --git a/TODO b/TODO
index c2d141f..8dd918f 100644
--- a/TODO
+++ b/TODO
@@ -5,6 +5,9 @@ s/GetJobList/GetActiveTransactions
 s/JobListChanged/ActiveTransactionsChanged
 s/PkTask/PkBackend (and local variables)
 
+*** Put the pk-application taskbar in the status section ***
+It looks wrong where it is...
+
 *** Have to have an UpdatesChanged signal ***
 For the icon to update after we've done a system upgrade
 NOTE: RELEASE BLOCKER



More information about the PackageKit mailing list