[packagekit] packagekit: Branch 'master'

Richard Hughes hughsient at kemper.freedesktop.org
Mon Sep 10 13:52:05 PDT 2007


 TODO                                |    6 +-
 backends/alpm/pk-backend-alpm.c     |    1 
 backends/apt/pk-backend-apt.cpp     |    1 
 backends/box/pk-backend-box.c       |    1 
 backends/conary/pk-backend-conary.c |    1 
 backends/dummy/pk-backend-dummy.c   |   15 +++++++
 backends/test/pk-backend-test.c     |   11 +++++
 backends/yum/helpers/packagekit.py  |    7 +++
 backends/yum/pk-backend-yum.c       |    1 
 client/pk-console.c                 |   11 +++++
 docs/backends.xml                   |   11 ++++-
 docs/introduction.xml               |   74 ++++++++++++++++++++++++++++++++++++
 libpackagekit/pk-task-client.c      |   43 ++++++++++++++++++++
 libpackagekit/pk-task-client.h      |    2 
 src/pk-backend-internal.h           |    2 
 src/pk-backend.c                    |   32 +++++++++++++++
 src/pk-backend.h                    |   10 ++++
 src/pk-engine.c                     |   51 ++++++++++++++++++++++++
 src/pk-engine.h                     |    4 +
 src/pk-interface.xml                |   15 ++++++-
 src/pk-marshal.list                 |    1 
 21 files changed, 295 insertions(+), 5 deletions(-)

New commits:
diff-tree 63363a3fff231c37ed20823ff81cbc21581592b8 (from 96e23e778e31752611d5cc99d6e5c957f12b737e)
Author: Richard Hughes <richard at hughsie.com>
Date:   Mon Sep 10 21:18:29 2007 +0100

    Add the GetUpdateDetail method and UpdateDetail signal

diff --git a/TODO b/TODO
index 65e8470..d5179b5 100644
--- a/TODO
+++ b/TODO
@@ -34,12 +34,14 @@ Is this useful?
 We would need to store package_id,installed_by,when_installed in a sqlite database
 
 *** Add GetUpdateDetail
+update_detail
 GetUpdateDetail(s=package_id)
 UpdateDetail(
-string url
-string restart_enum
+string package_id
 string updates
 string obsoletes
+string url
+string restart_enum
 string update_text
 }
 NOTE: RELEASE BLOCKER
diff --git a/backends/alpm/pk-backend-alpm.c b/backends/alpm/pk-backend-alpm.c
index 044db56..9f4c5c1 100644
--- a/backends/alpm/pk-backend-alpm.c
+++ b/backends/alpm/pk-backend-alpm.c
@@ -542,6 +542,7 @@ PK_BACKEND_OPTIONS (
  	backend_get_depends,				/* get_depends */
 	backend_get_description,			/* get_description */
 	backend_get_requires,				/* get_requires */
+	NULL,						/* get_update_detail */
 	backend_get_updates,				/* get_updates */
 	backend_install_package,			/* install_package */
 	backend_refresh_cache,				/* refresh_cache */
diff --git a/backends/apt/pk-backend-apt.cpp b/backends/apt/pk-backend-apt.cpp
index 21b0bba..05697d4 100644
--- a/backends/apt/pk-backend-apt.cpp
+++ b/backends/apt/pk-backend-apt.cpp
@@ -701,6 +701,7 @@ extern "C" PK_BACKEND_OPTIONS (
 	NULL,					/* get_depends */
 	backend_get_description,		/* get_description */
 	NULL,					/* get_requires */
+	NULL,					/* get_update_detail */
 	NULL,					/* get_updates */
 	NULL,					/* install_package */
 	backend_refresh_cache,			/* refresh_cache */
diff --git a/backends/box/pk-backend-box.c b/backends/box/pk-backend-box.c
index 6602378..8567acf 100644
--- a/backends/box/pk-backend-box.c
+++ b/backends/box/pk-backend-box.c
@@ -446,6 +446,7 @@ PK_BACKEND_OPTIONS (
 	NULL,					/* get_depends */
 	backend_get_description,		/* get_description */
 	NULL,					/* get_requires */
+	NULL,					/* get_update_detail */
 	backend_get_updates,			/* get_updates */
 	NULL,					/* install_package */
 	backend_refresh_cache,			/* refresh_cache */
diff --git a/backends/conary/pk-backend-conary.c b/backends/conary/pk-backend-conary.c
index 3b4070a..b71dc36 100644
--- a/backends/conary/pk-backend-conary.c
+++ b/backends/conary/pk-backend-conary.c
@@ -157,6 +157,7 @@ PK_BACKEND_OPTIONS (
 	NULL,					/* get_depends */
 	backend_get_description,		/* get_description */
 	NULL,					/* get_requires */
+	NULL,					/* get_update_detail */
 	backend_get_updates,			/* get_updates */
 	backend_install_package,		/* install_package */
 	backend_refresh_cache,			/* refresh_cache */
diff --git a/backends/dummy/pk-backend-dummy.c b/backends/dummy/pk-backend-dummy.c
index c580532..37a3307 100644
--- a/backends/dummy/pk-backend-dummy.c
+++ b/backends/dummy/pk-backend-dummy.c
@@ -130,6 +130,20 @@ backend_get_requires (PkBackend *backend
 }
 
 /**
+ * backend_get_update_detail:
+ */
+static void
+backend_get_update_detail (PkBackend *backend, const gchar *package_id)
+{
+	g_return_if_fail (backend != NULL);
+	pk_backend_update_detail (backend, "glib2;2.14.0;i386;fedora",
+				  "glib2;2.12.0;i386;fedora", "",
+				  "http://nvd.nist.gov/nvd.cfm?cvename=CVE-2007-3381",
+				  "system", "Update to newest upstream source");
+	pk_backend_finished (backend, PK_EXIT_ENUM_SUCCESS);
+}
+
+/**
  * backend_get_updates:
  */
 static void
@@ -308,6 +322,7 @@ PK_BACKEND_OPTIONS (
 	backend_get_depends,			/* get_depends */
 	backend_get_description,		/* get_description */
 	backend_get_requires,			/* get_requires */
+	backend_get_update_detail,		/* get_update_detail */
 	backend_get_updates,			/* get_updates */
 	backend_install_package,		/* install_package */
 	backend_refresh_cache,			/* refresh_cache */
diff --git a/backends/test/pk-backend-test.c b/backends/test/pk-backend-test.c
index 6f0b833..9d70cc8 100644
--- a/backends/test/pk-backend-test.c
+++ b/backends/test/pk-backend-test.c
@@ -111,6 +111,16 @@ backend_get_requires (PkBackend *backend
 }
 
 /**
+ * backend_get_update_detail:
+ */
+static void
+backend_get_update_detail (PkBackend *backend, const gchar *package_id)
+{
+	g_return_if_fail (backend != NULL);
+	pk_backend_finished (backend, PK_EXIT_ENUM_FAILED);
+}
+
+/**
  * backend_get_updates:
  */
 static void
@@ -222,6 +232,7 @@ PK_BACKEND_OPTIONS (
 	backend_get_depends,			/* get_depends */
 	backend_get_description,		/* get_description */
 	backend_get_requires,			/* get_requires */
+	backend_get_update_detail,		/* get_update_detail */
 	backend_get_updates,			/* get_updates */
 	backend_install_package,		/* install_package */
 	backend_refresh_cache,			/* refresh_cache */
diff --git a/backends/yum/helpers/packagekit.py b/backends/yum/helpers/packagekit.py
index deab15d..7d3f89a 100644
--- a/backends/yum/helpers/packagekit.py
+++ b/backends/yum/helpers/packagekit.py
@@ -174,6 +174,13 @@ class PackageKitBaseBackend:
         self.error(ERROR_NOT_SUPPORTED,"This function is not implemented in this backend")
 
 
+    def get_update_detail(self,package):
+        '''
+        Implement the {backend}-get-update-detail functionality
+        Needed to be implemented in a sub class
+        '''
+        self.error(ERROR_NOT_SUPPORTED,"This function is not implemented in this backend")
+
     def get_depends(self,package):
         '''
         Implement the {backend}-get-depends functionality
diff --git a/backends/yum/pk-backend-yum.c b/backends/yum/pk-backend-yum.c
index aecad4c..04fd06a 100644
--- a/backends/yum/pk-backend-yum.c
+++ b/backends/yum/pk-backend-yum.c
@@ -226,6 +226,7 @@ PK_BACKEND_OPTIONS (
 	backend_get_depends,			/* get_depends */
 	backend_get_description,		/* get_description */
 	backend_get_requires,			/* get_requires */
+	NULL,					/* get_update_detail */
 	backend_get_updates,			/* get_updates */
 	backend_install_package,		/* install_package */
 	backend_refresh_cache,			/* refresh_cache */
diff --git a/client/pk-console.c b/client/pk-console.c
index f9f5301..1f68931 100644
--- a/client/pk-console.c
+++ b/client/pk-console.c
@@ -125,6 +125,7 @@ pk_console_usage (const gchar *error)
 	g_print ("  pkcon [sync] [verbose] get depends <package_id>\n");
 	g_print ("  pkcon [sync] [verbose] get requires <package_id>\n");
 	g_print ("  pkcon [sync] [verbose] get description <package_id>\n");
+	g_print ("  pkcon [sync] [verbose] get updatedetail <package_id>\n");
 	g_print ("  pkcon [sync] [verbose] get actions\n");
 	g_print ("  pkcon [sync] [verbose] get groups\n");
 	g_print ("  pkcon [sync] [verbose] get filters\n");
@@ -234,6 +235,16 @@ pk_console_parse_multiple_commands (PkTa
 				pk_task_client_get_depends (tclient, details);
 				remove = 3;
 			}
+		} else if (strcmp (value, "updatedetail") == 0) {
+			if (details == NULL) {
+				pk_console_usage ("you need to specify a search term");
+				remove = 2;
+				goto out;
+			} else {
+				pk_task_client_set_sync (tclient, TRUE);
+				pk_task_client_get_update_detail (tclient, details);
+				remove = 3;
+			}
 		} else if (strcmp (value, "requires") == 0) {
 			if (details == NULL) {
 				pk_console_usage ("you need to specify a search term");
diff --git a/docs/backends.xml b/docs/backends.xml
index 78fa968..d83b8ce 100644
--- a/docs/backends.xml
+++ b/docs/backends.xml
@@ -75,6 +75,10 @@
             <entry><literal>get-requires.*</literal></entry>
           </row>
           <row>
+            <entry>Get Update Detail</entry>
+            <entry><literal>get-update-detail.*</literal></entry>
+          </row>
+          <row>
             <entry>Get Description</entry>
             <entry><literal>get-description.*</literal></entry>
           </row>
@@ -149,7 +153,7 @@
           </row>
           <row>
             <entry>Package</entry>
-            <entry><literal>package[tab]status[tab]package_id[tab]summary</literal></entry>
+            <entry><literal>package_id[tab]status[tab]package_id[tab]summary</literal></entry>
             <entry><literal>stdout</literal></entry>
           </row>
           <row>
@@ -157,6 +161,11 @@
             <entry><literal>description[tab]package_id[tab]group[tab]detail[tab]url</literal></entry>
             <entry><literal>stdout</literal></entry>
           </row>
+          <row>
+            <entry>UpdateDetail</entry>
+            <entry><literal>package_id[tab]updates[tab]obsoletes[tab]url[tab]restart[tab]update_text</literal></entry>
+            <entry><literal>stdout</literal></entry>
+          </row>
         </tbody>
       </tgroup>
     </informaltable>
diff --git a/docs/introduction.xml b/docs/introduction.xml
index 70144de..fc4b04c 100644
--- a/docs/introduction.xml
+++ b/docs/introduction.xml
@@ -726,6 +726,37 @@
       </para>
     </sect2>
 
+    <sect2 id="api-get-update-detail">
+      <title>Get Update Detail</title>
+      <para>
+        GetUpdateDetail should return details about the update.
+      </para>
+      <para>
+        The arguments are:
+      </para>
+      <informaltable>
+        <tgroup cols="2">
+          <thead>
+            <row>
+              <entry>Option</entry>
+              <entry>Description</entry>
+            </row>
+          </thead>
+          <tbody>
+            <row>
+              <entry><literal>package_id</literal></entry>
+              <entry>A single, valid, package ID.</entry>
+            </row>
+          </tbody>
+        </tgroup>
+      </informaltable>
+      <para>
+        This method typically emits
+        <literal>UpdateDetail</literal> and
+        <literal>Error</literal>
+      </para>
+    </sect2>
+
     <sect2 id="api-get-requires">
       <title>Get Requires</title>
       <para>
@@ -1124,6 +1155,49 @@
         </tgroup>
       </informaltable>
     </sect2>
+
+    <sect2 id="backends-spawn-update-detail">
+      <title>UpdateDetail</title>
+      <informaltable>
+        <tgroup cols="2">
+          <thead>
+            <row>
+              <entry>Option</entry>
+              <entry>Description</entry>
+            </row>
+          </thead>
+          <tbody>
+            <row>
+              <entry><literal>package_id</literal></entry>
+              <entry>The package ID</entry>
+            </row>
+            <row>
+              <entry><literal>updates</literal></entry>
+              <entry>A list of package_id's that are to be updated</entry>
+            </row>
+            <row>
+              <entry><literal>obsoletes</literal></entry>
+              <entry>A list of package_id's that are to be obsoletes</entry>
+            </row>
+            <row>
+              <entry><literal>url</literal></entry>
+              <entry>A URL with more details on the update, e.g. a security advisory</entry>
+            </row>
+            <row>
+              <entry><literal>restart_enum</literal></entry>
+              <entry>A valid restart type, e.g. "system"</entry>
+            </row>
+            <row>
+              <entry><literal>update_text</literal></entry>
+              <entry>
+                The update text describing the update in a non-localised way.
+                Newlines should be converted to ";"
+              </entry>
+            </row>
+          </tbody>
+        </tgroup>
+      </informaltable>
+    </sect2>
   </sect1>
 
 </chapter>
diff --git a/libpackagekit/pk-task-client.c b/libpackagekit/pk-task-client.c
index a4f6ce2..9e2c2a6 100644
--- a/libpackagekit/pk-task-client.c
+++ b/libpackagekit/pk-task-client.c
@@ -600,6 +600,49 @@ pk_task_client_get_requires (PkTaskClien
 }
 
 /**
+ * pk_task_client_get_update_detail:
+ **/
+gboolean
+pk_task_client_get_update_detail (PkTaskClient *tclient, const gchar *package)
+{
+	gboolean ret;
+	GError *error;
+
+	g_return_val_if_fail (tclient != NULL, FALSE);
+	g_return_val_if_fail (PK_IS_TASK_CLIENT (tclient), FALSE);
+
+	/* check to see if we already have an action */
+	if (tclient->priv->assigned == TRUE) {
+		pk_warning ("Already assigned");
+		return FALSE;
+	}
+
+	error = NULL;
+	ret = dbus_g_proxy_call (tclient->priv->proxy, "GetUpdateDetail", &error,
+				 G_TYPE_STRING, package,
+				 G_TYPE_INVALID,
+				 G_TYPE_UINT, &tclient->priv->job,
+				 G_TYPE_INVALID);
+	if (error) {
+		const gchar *error_name;
+		error_name = pk_task_client_get_error_name (error);
+		pk_debug ("ERROR: %s: %s", error_name, error->message);
+		g_error_free (error);
+	}
+	if (ret == FALSE) {
+		/* abort as the DBUS method failed */
+		pk_warning ("GetUpdateDetail failed!");
+		return FALSE;
+	}
+	/* only assign on success */
+	tclient->priv->assigned = TRUE;
+	pk_task_monitor_set_job (tclient->priv->tmonitor, tclient->priv->job);
+	pk_task_client_wait_if_sync (tclient);
+
+	return TRUE;
+}
+
+/**
  * pk_task_client_get_description:
  **/
 gboolean
diff --git a/libpackagekit/pk-task-client.h b/libpackagekit/pk-task-client.h
index f5269f4..5d0d4a4 100644
--- a/libpackagekit/pk-task-client.h
+++ b/libpackagekit/pk-task-client.h
@@ -85,6 +85,8 @@ gboolean	 pk_task_client_search_file		(P
 							 const gchar	*search);
 gboolean	 pk_task_client_get_depends		(PkTaskClient	*tclient,
 							 const gchar	*package_id);
+gboolean	 pk_task_client_get_update_detail	(PkTaskClient	*tclient,
+							 const gchar	*package_id);
 gboolean	 pk_task_client_get_requires		(PkTaskClient	*tclient,
 							 const gchar	*package_id);
 gboolean	 pk_task_client_get_description		(PkTaskClient	*tclient,
diff --git a/src/pk-backend-internal.h b/src/pk-backend-internal.h
index ad6aaee..76b1e5d 100644
--- a/src/pk-backend-internal.h
+++ b/src/pk-backend-internal.h
@@ -66,6 +66,8 @@ const gchar	*pk_backend_get_name			(PkBa
 gboolean	 pk_backend_cancel_job_try		(PkBackend	*backend);
 gboolean	 pk_backend_get_depends			(PkBackend	*backend,
 							 const gchar	*package_id);
+gboolean	 pk_backend_get_update_detail		(PkBackend	*backend,
+							 const gchar	*package_id);
 gboolean	 pk_backend_get_description		(PkBackend	*backend,
 							 const gchar	*package_id);
 gboolean	 pk_backend_get_requires		(PkBackend	*backend,
diff --git a/src/pk-backend.c b/src/pk-backend.c
index 625fb87..10e709f 100644
--- a/src/pk-backend.c
+++ b/src/pk-backend.c
@@ -530,6 +530,21 @@ pk_backend_package (PkBackend *backend, 
 }
 
 /**
+ * pk_backend_update_detail:
+ **/
+gboolean
+pk_backend_update_detail (PkBackend *backend, const gchar *package_id,
+			  const gchar *updates, const gchar *obsoletes,
+			  const gchar *url, const gchar *restart,
+			  const gchar *update_text)
+{
+	g_return_val_if_fail (backend != NULL, FALSE);
+	g_return_val_if_fail (PK_IS_BACKEND (backend), FALSE);
+	return TRUE;
+}
+
+
+/**
  * pk_backend_get_percentage:
  **/
 gboolean
@@ -761,6 +776,23 @@ pk_backend_get_depends (PkBackend *backe
 }
 
 /**
+ * pk_backend_get_update_detail:
+ */
+gboolean
+pk_backend_get_update_detail (PkBackend *backend, const gchar *package_id)
+{
+	g_return_val_if_fail (backend != NULL, FALSE);
+	if (backend->desc->get_update_detail == NULL) {
+		pk_backend_not_implemented_yet (backend, "GetUpdateDetail");
+		return FALSE;
+	}
+	pk_backend_set_job_role (backend, PK_ROLE_ENUM_QUERY, package_id);
+	backend->desc->get_update_detail (backend, package_id);
+	backend->priv->assigned = TRUE;
+	return TRUE;
+}
+
+/**
  * pk_backend_get_description:
  */
 gboolean
diff --git a/src/pk-backend.h b/src/pk-backend.h
index ef7701f..1e81689 100644
--- a/src/pk-backend.h
+++ b/src/pk-backend.h
@@ -46,6 +46,13 @@ gboolean	 pk_backend_package			(PkBacken
 							 guint		 value,
 							 const gchar	*package_id,
 							 const gchar	*summary);
+gboolean	 pk_backend_update_detail		(PkBackend	*backend,
+							 const gchar	*package_id,
+							 const gchar	*updates,
+							 const gchar	*obsoletes,
+							 const gchar	*url,
+							 const gchar	*restart,
+							 const gchar	*update_text);
 gboolean	 pk_backend_require_restart		(PkBackend	*backend,
 							 PkRestartEnum	 restart,
 							 const gchar	*details);
@@ -79,6 +86,7 @@ struct _PkBackendDesc {
 	void		(*get_depends)		(PkBackend *backend, const gchar *package_id);
 	void		(*get_description)	(PkBackend *backend, const gchar *package_id);
 	void		(*get_requires)		(PkBackend *backend, const gchar *package_id);
+	void		(*get_update_detail)	(PkBackend *backend, const gchar *package_id);
 	void		(*get_updates)		(PkBackend *backend);
 	void		(*install_package)	(PkBackend *backend, const gchar *package_id);
 	void		(*refresh_cache)	(PkBackend *backend, gboolean force);
@@ -95,6 +103,7 @@ struct _PkBackendDesc {
 #define PK_BACKEND_OPTIONS(description, version, author, initialize, destroy, \
 			   get_groups, get_filters, \
 			   cancel_job_try, get_depends, get_description, \
+			   get_update_detail, \
 			   get_requires, get_updates, install_package, \
 			   refresh_cache, remove_package, search_details, \
 			   search_file, search_group, search_name, \
@@ -111,6 +120,7 @@ struct _PkBackendDesc {
 		get_depends, \
 		get_description, \
 		get_requires, \
+		get_update_detail, \
 		get_updates, \
 		install_package, \
 		refresh_cache, \
diff --git a/src/pk-engine.c b/src/pk-engine.c
index b3c77d7..cf1dced 100644
--- a/src/pk-engine.c
+++ b/src/pk-engine.c
@@ -74,6 +74,7 @@ enum {
 	PK_ENGINE_ERROR_CODE,
 	PK_ENGINE_REQUIRE_RESTART,
 	PK_ENGINE_FINISHED,
+	PK_ENGINE_UPDATE_DETAIL,
 	PK_ENGINE_DESCRIPTION,
 	PK_ENGINE_ALLOW_INTERRUPT,
 	PK_ENGINE_LAST_SIGNAL
@@ -829,7 +830,7 @@ pk_engine_search_file (PkEngine *engine,
  **/
 gboolean
 pk_engine_get_depends (PkEngine *engine, const gchar *package_id,
-		    guint *job, GError **error)
+		       guint *job, GError **error)
 {
 	gboolean ret;
 	PkTask *task;
@@ -909,6 +910,48 @@ pk_engine_get_requires (PkEngine *engine
 }
 
 /**
+ * pk_engine_get_update_detail:
+ **/
+gboolean
+pk_engine_get_update_detail (PkEngine *engine, const gchar *package_id,
+		       guint *job, GError **error)
+{
+	gboolean ret;
+	PkTask *task;
+	PkJobListItem *item;
+
+	g_return_val_if_fail (engine != NULL, FALSE);
+	g_return_val_if_fail (PK_IS_ENGINE (engine), FALSE);
+
+	/* check package_id */
+	ret = pk_package_id_check (package_id);
+	if (ret == FALSE) {
+		*error = g_error_new (PK_ENGINE_ERROR, PK_ENGINE_ERROR_PACKAGE_ID_INVALID,
+				      "The package id '%s' is not valid", package_id);
+		return FALSE;
+	}
+
+	/* create a new task and start it */
+	task = pk_engine_new_task (engine);
+	ret = pk_backend_get_update_detail (task, package_id);
+	if (ret == FALSE) {
+		g_set_error (error, PK_ENGINE_ERROR, PK_ENGINE_ERROR_NOT_SUPPORTED,
+			     "Operation not yet supported by backend");
+		g_object_unref (task);
+		return FALSE;
+	}
+	pk_engine_add_task (engine, task);
+	item = pk_job_list_get_item_from_task (engine->priv->job_list, task);
+	if (item == NULL) {
+		pk_warning ("could not find task");
+		return FALSE;
+	}
+	*job = item->job;
+
+	return TRUE;
+}
+
+/**
  * pk_engine_get_description:
  **/
 gboolean
@@ -1463,6 +1506,12 @@ pk_engine_class_init (PkEngineClass *kla
 			      G_TYPE_FROM_CLASS (object_class), G_SIGNAL_RUN_LAST,
 			      0, NULL, NULL, pk_marshal_VOID__UINT_STRING_UINT,
 			      G_TYPE_NONE, 3, G_TYPE_UINT, G_TYPE_STRING, G_TYPE_UINT);
+	signals [PK_ENGINE_UPDATE_DETAIL] =
+		g_signal_new ("update-detail",
+			      G_TYPE_FROM_CLASS (object_class), G_SIGNAL_RUN_LAST,
+			      0, NULL, NULL, pk_marshal_VOID__UINT_STRING_STRING_STRING_STRING_STRING_STRING,
+			      G_TYPE_NONE, 7, G_TYPE_UINT, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING,
+			      G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING);
 	signals [PK_ENGINE_ALLOW_INTERRUPT] =
 		g_signal_new ("allow-interrupt",
 			      G_TYPE_FROM_CLASS (object_class), G_SIGNAL_RUN_LAST,
diff --git a/src/pk-engine.h b/src/pk-engine.h
index 10fb6b9..d22ed44 100644
--- a/src/pk-engine.h
+++ b/src/pk-engine.h
@@ -100,6 +100,10 @@ gboolean	 pk_engine_get_depends			(PkEng
 							 const gchar	*package_id,
 							 guint		*job,
 							 GError		**error);
+gboolean	 pk_engine_get_update_detail		(PkEngine	*engine,
+							 const gchar	*package_id,
+							 guint		*job,
+							 GError		**error);
 gboolean	 pk_engine_get_requires			(PkEngine	*engine,
 							 const gchar	*package_id,
 							 guint		*job,
diff --git a/src/pk-interface.xml b/src/pk-interface.xml
index d025277..c012668 100644
--- a/src/pk-interface.xml
+++ b/src/pk-interface.xml
@@ -42,6 +42,10 @@
       <arg type="s" name="package_id" direction="in"/>
       <arg type="u" name="job" direction="out"/>
     </method>
+    <method name="GetUpdateDetail">
+      <arg type="s" name="package_id" direction="in"/>
+      <arg type="u" name="job" direction="out"/>
+    </method>
     <method name="GetDescription"> <!-- orders Description signals for the package -->
       <arg type="s" name="package_id" direction="in"/>
       <arg type="u" name="job" direction="out"/>
@@ -88,10 +92,19 @@
     <signal name="Description">
       <arg type="u" name="job" direction="out"/>
       <arg type="s" name="package_id" direction="out"/>
-      <arg type="s" name="group" direction="out"/> <!-- enumerated type, see helpers/README -->
+      <arg type="s" name="group" direction="out"/>
       <arg type="s" name="detail" direction="out"/>
       <arg type="s" name="url" direction="out"/>
     </signal>
+    <signal name="UpdateDetail">
+      <arg type="u" name="job" direction="out"/>
+      <arg type="s" name="package_id" direction="out"/>
+      <arg type="s" name="updates" direction="out"/>
+      <arg type="s" name="obsoletes" direction="out"/>
+      <arg type="s" name="url" direction="out"/>
+      <arg type="s" name="restart" direction="out"/>
+      <arg type="s" name="update_text" direction="out"/>
+    </signal>
     <signal name="Finished">
       <arg type="u" name="job" direction="out"/>
       <arg type="s" name="status" direction="out"/> <!-- success,failed,canceled -->
diff --git a/src/pk-marshal.list b/src/pk-marshal.list
index b8ae724..7bfad4d 100644
--- a/src/pk-marshal.list
+++ b/src/pk-marshal.list
@@ -10,4 +10,5 @@ VOID:UINT,STRING
 VOID:UINT,STRING,UINT
 VOID:UINT,STRING,STRING
 VOID:UINT,BOOL
+VOID:UINT,STRING,STRING,STRING,STRING,STRING,STRING
 



More information about the PackageKit mailing list