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

Richard Hughes hughsient at kemper.freedesktop.org
Tue Oct 9 10:34:04 PDT 2007


 TODO                                      |    8 +++-----
 backends/conary/helpers/conaryCallback.py |   29 ++++++++++++++++++-----------
 libpackagekit/Makefile.am                 |    5 +++++
 libpackagekit/pk-network.c                |    1 -
 src/Makefile.am                           |    6 ------
 src/pk-backend.c                          |    2 +-
 6 files changed, 27 insertions(+), 24 deletions(-)

New commits:
diff-tree 0e332d143c1547d4c29d81c0f0debc40378c2767 (from 4ffe68a73e12efa2de73bc7d8aacd72a46264004)
Author: Richard Hughes <richard at hughsie.com>
Date:   Tue Oct 9 18:32:52 2007 +0100

    update TODO

diff --git a/TODO b/TODO
index 9e3b906..067ec70 100644
--- a/TODO
+++ b/TODO
@@ -4,6 +4,10 @@ Order of no particular importance:
 Do automatic updates at login time when system has gone idle
 NOTE: RELEASE BLOCKER
 
+*** pk-application (client) ***
+Don't hardcode the group list in PkApplication
+NOTE: RELEASE BLOCKER
+
 *** pk-update-icon (client) ***
 * Don't re-run get-updates when selecting "Show updates" from the update icon, just populate it with the previous results.
 NOTE: RELEASE BLOCKER
diff-tree 4ffe68a73e12efa2de73bc7d8aacd72a46264004 (from fd091b6c8aa1aaedb28cf59747c67db8317e0540)
Author: Richard Hughes <richard at hughsie.com>
Date:   Tue Oct 9 18:30:46 2007 +0100

    update TODO

diff --git a/TODO b/TODO
index 6123622..9e3b906 100644
--- a/TODO
+++ b/TODO
@@ -2,11 +2,6 @@ Order of no particular importance:
 
 *** pk-notify-icon (client) ***
 Do automatic updates at login time when system has gone idle
- * needs gnome-screensaver integration
-NOTE: RELEASE BLOCKER
-
-*** PkNetwork ***
-Use PkNetwork in client code, rather than using PkConnection (WRONG!!)
 NOTE: RELEASE BLOCKER
 
 *** pk-update-icon (client) ***
@@ -15,10 +10,6 @@ NOTE: RELEASE BLOCKER
 
 *** Add new callback for status ***
 TimeRemaining()
- 
-*** get the depends and requires in the tabbed UI ***
-We really don't want to remove glibc...
-NOTE: RELEASE BLOCKER
 
 *** the backends will have repo controls ***
 a(s=rid,s=description)=GetRepoList()
diff-tree fd091b6c8aa1aaedb28cf59747c67db8317e0540 (from fa44e3196798ae3abd53f5ca7bd3be74a9f96d36)
Author: Richard Hughes <richard at hughsie.com>
Date:   Tue Oct 9 18:27:40 2007 +0100

    remove an unused priv variable

diff --git a/libpackagekit/pk-network.c b/libpackagekit/pk-network.c
index 80d843e..f0da71d 100644
--- a/libpackagekit/pk-network.c
+++ b/libpackagekit/pk-network.c
@@ -51,7 +51,6 @@ static void     pk_network_finalize	(GOb
 
 struct PkNetworkPrivate
 {
-	GString			*stdout_buf;
 	libnm_glib_ctx		*ctx;
 	guint			 callbackid;
 };
diff-tree fa44e3196798ae3abd53f5ca7bd3be74a9f96d36 (from 6dba4a03467778f2494ea49352c2ec8cf88783df)
Author: Richard Hughes <richard at hughsie.com>
Date:   Tue Oct 9 18:21:41 2007 +0100

    Need to move src/pk-network.* into libpackagekit so vendors can plug in
    other network detection frameworks other than NetworkManager.

diff --git a/TODO b/TODO
index 8a237fa..6123622 100644
--- a/TODO
+++ b/TODO
@@ -6,11 +6,7 @@ Do automatic updates at login time when 
 NOTE: RELEASE BLOCKER
 
 *** PkNetwork ***
-Need to move src/pk-network.* into libpackagekit so vendors can plug in
-other network detection frameworks other than NetworkManager.
-pk-network.c -> pk-network-nm.c and a common pk-network.h - select abstraction
-in the configure script. Create pk-network-none.c that is always on.
-Plus, clients can re-use this code, rather than using PkConnection (WRONG!!)
+Use PkNetwork in client code, rather than using PkConnection (WRONG!!)
 NOTE: RELEASE BLOCKER
 
 *** pk-update-icon (client) ***
diff --git a/libpackagekit/Makefile.am b/libpackagekit/Makefile.am
index 77bcfee..e2bae47 100644
--- a/libpackagekit/Makefile.am
+++ b/libpackagekit/Makefile.am
@@ -4,6 +4,7 @@ NULL =
 INCLUDES = \
 	$(GLIB_CFLAGS)						\
 	$(DBUS_CFLAGS)						\
+	$(LIBNM_CFLAGS)						\
 	-I$(top_srcdir)/libpackagekit				\
 	-I$(top_srcdir)/libgbus					\
 	-I$(top_srcdir)/libselftest				\
@@ -27,6 +28,7 @@ libpackagekit_includedir = $(includedir)
 libpackagekit_include_HEADERS =					\
 	pk-debug.h						\
 	pk-connection.h						\
+	pk-network.h						\
 	pk-package-id.h						\
 	pk-package-list.h					\
 	pk-enum-list.h						\
@@ -45,6 +47,8 @@ libpackagekit_la_SOURCES =					\
 	pk-marshal.h						\
 	pk-connection.c						\
 	pk-connection.h						\
+	pk-network.c						\
+	pk-network.h						\
 	pk-package-id.c						\
 	pk-package-id.h						\
 	pk-package-list.c					\
@@ -69,6 +73,7 @@ libpackagekit_la_LIBADD =					\
 	$(GLIB_LIBS)						\
 	$(DBUS_LIBS)						\
 	$(GBUS_LIBS)						\
+	$(LIBNM_LIBS)						\
 	$(NULL)
 
 libpackagekit_la_LDFLAGS =					\
diff --git a/libpackagekit/pk-network.c b/libpackagekit/pk-network.c
new file mode 100644
index 0000000..80d843e
--- /dev/null
+++ b/libpackagekit/pk-network.c
@@ -0,0 +1,164 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
+ *
+ * Copyright (C) 2007 Richard Hughes <richard at hughsie.com>
+ *
+ * Licensed under the GNU General Public License Version 2
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#include "config.h"
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <time.h>
+#include <errno.h>
+
+#include <string.h>
+#include <sys/time.h>
+#include <sys/types.h>
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif /* HAVE_UNISTD_H */
+
+#include <sys/wait.h>
+#include <fcntl.h>
+
+#include <glib/gi18n.h>
+#include <libnm_glib.h>
+
+#include "pk-debug.h"
+#include "pk-network.h"
+#include "pk-marshal.h"
+
+static void     pk_network_class_init	(PkNetworkClass *klass);
+static void     pk_network_init		(PkNetwork      *network);
+static void     pk_network_finalize	(GObject        *object);
+
+#define PK_NETWORK_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), PK_TYPE_NETWORK, PkNetworkPrivate))
+
+struct PkNetworkPrivate
+{
+	GString			*stdout_buf;
+	libnm_glib_ctx		*ctx;
+	guint			 callbackid;
+};
+
+enum {
+	PK_NETWORK_ONLINE,
+	PK_NETWORK_LAST_SIGNAL
+};
+
+static guint	     signals [PK_NETWORK_LAST_SIGNAL] = { 0, };
+
+G_DEFINE_TYPE (PkNetwork, pk_network, G_TYPE_OBJECT)
+
+/**
+ * pk_network_is_online:
+ **/
+gboolean
+pk_network_is_online (PkNetwork *network)
+{
+	libnm_glib_state state;
+	gboolean ret;
+	state = libnm_glib_get_network_state (network->priv->ctx);
+	switch (state) {
+	case LIBNM_NO_NETWORK_CONNECTION:
+		ret = FALSE;
+		break;
+	default:
+		ret = TRUE;
+	}
+	return ret;
+}
+
+/**
+ * pk_network_nm_changed_cb:
+ **/
+static void
+pk_network_nm_changed_cb (libnm_glib_ctx *libnm_ctx, gpointer data)
+{
+	gboolean ret;
+	PkNetwork *network = (PkNetwork *) data;
+	ret = pk_network_is_online (network);
+	g_signal_emit (network, signals [PK_NETWORK_ONLINE], 0, ret);
+}
+
+/**
+ * pk_network_class_init:
+ * @klass: The PkNetworkClass
+ **/
+static void
+pk_network_class_init (PkNetworkClass *klass)
+{
+	GObjectClass *object_class = G_OBJECT_CLASS (klass);
+	object_class->finalize = pk_network_finalize;
+	signals [PK_NETWORK_ONLINE] =
+		g_signal_new ("online",
+			      G_TYPE_FROM_CLASS (object_class), G_SIGNAL_RUN_LAST,
+			      0, NULL, NULL, g_cclosure_marshal_VOID__BOOLEAN,
+			      G_TYPE_NONE, 1, G_TYPE_BOOLEAN);
+	g_type_class_add_private (klass, sizeof (PkNetworkPrivate));
+}
+
+/**
+ * pk_network_init:
+ * @network: This class instance
+ **/
+static void
+pk_network_init (PkNetwork *network)
+{
+	GMainContext *context;
+
+	network->priv = PK_NETWORK_GET_PRIVATE (network);
+	context = g_main_context_default ();
+	network->priv->ctx = libnm_glib_init ();
+	network->priv->callbackid =
+		libnm_glib_register_callback (network->priv->ctx,
+					      pk_network_nm_changed_cb,
+					      network, context);
+}
+
+/**
+ * pk_network_finalize:
+ * @object: The object to finalize
+ **/
+static void
+pk_network_finalize (GObject *object)
+{
+	PkNetwork *network;
+	g_return_if_fail (object != NULL);
+	g_return_if_fail (PK_IS_NETWORK (object));
+	network = PK_NETWORK (object);
+
+	g_return_if_fail (network->priv != NULL);
+	libnm_glib_unregister_callback (network->priv->ctx, network->priv->callbackid);
+//	libnm_glib_shutdown (network->priv->ctx);
+
+	G_OBJECT_CLASS (pk_network_parent_class)->finalize (object);
+}
+
+/**
+ * pk_network_new:
+ *
+ * Return value: a new PkNetwork object.
+ **/
+PkNetwork *
+pk_network_new (void)
+{
+	PkNetwork *network;
+	network = g_object_new (PK_TYPE_NETWORK, NULL);
+	return PK_NETWORK (network);
+}
diff --git a/libpackagekit/pk-network.h b/libpackagekit/pk-network.h
new file mode 100644
index 0000000..f05f202
--- /dev/null
+++ b/libpackagekit/pk-network.h
@@ -0,0 +1,57 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
+ *
+ * Copyright (C) 2007 Richard Hughes <richard at hughsie.com>
+ *
+ * Licensed under the GNU General Public License Version 2
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#ifndef __PK_NETWORK_H
+#define __PK_NETWORK_H
+
+#include <glib-object.h>
+
+G_BEGIN_DECLS
+
+#define PK_TYPE_NETWORK		(pk_network_get_type ())
+#define PK_NETWORK(o)		(G_TYPE_CHECK_INSTANCE_CAST ((o), PK_TYPE_NETWORK, PkNetwork))
+#define PK_NETWORK_CLASS(k)	(G_TYPE_CHECK_CLASS_CAST((k), PK_TYPE_NETWORK, PkNetworkClass))
+#define PK_IS_NETWORK(o)	(G_TYPE_CHECK_INSTANCE_TYPE ((o), PK_TYPE_NETWORK))
+#define PK_IS_NETWORK_CLASS(k)	(G_TYPE_CHECK_CLASS_TYPE ((k), PK_TYPE_NETWORK))
+#define PK_NETWORK_GET_CLASS(o)	(G_TYPE_INSTANCE_GET_CLASS ((o), PK_TYPE_NETWORK, PkNetworkClass))
+#define PK_NETWORK_ERROR	(pk_network_error_quark ())
+#define PK_NETWORK_TYPE_ERROR	(pk_network_error_get_type ()) 
+
+typedef struct PkNetworkPrivate PkNetworkPrivate;
+
+typedef struct
+{
+	 GObject		 parent;
+	 PkNetworkPrivate	*priv;
+} PkNetwork;
+
+typedef struct
+{
+	GObjectClass	parent_class;
+} PkNetworkClass;
+
+GType		 pk_network_get_type		  	(void);
+PkNetwork	*pk_network_new				(void);
+gboolean	 pk_network_is_online			(PkNetwork	*network);
+
+G_END_DECLS
+
+#endif /* __PK_NETWORK_H */
diff --git a/src/Makefile.am b/src/Makefile.am
index 6b0f3fe..c0191fd 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -16,7 +16,6 @@ INCLUDES =						\
 	$(DBUS_CFLAGS)					\
 	$(SQLITE_CFLAGS)				\
 	$(POLKIT_CFLAGS)				\
-	$(LIBNM_CFLAGS)					\
 	-DBINDIR=\"$(bindir)\"			 	\
 	-DDATADIR=\"$(datadir)\"			\
 	-DPREFIX=\""$(prefix)"\" 			\
@@ -52,8 +51,6 @@ packagekitd_SOURCES =					\
 	pk-spawn.h					\
 	pk-engine.h					\
 	pk-engine.c					\
-	pk-network.h					\
-	pk-network.c					\
 	pk-thread-list.h				\
 	pk-thread-list.c				\
 	pk-transaction-db.h				\
@@ -70,7 +67,6 @@ packagekitd_LDADD =					\
 	$(DBUS_LIBS)					\
 	$(SQLITE_LIBS)					\
 	$(PK_LIBS)					\
-	$(LIBNM_LIBS)					\
 	$(POLKIT_LIBS)					\
 	$(NULL)
 
@@ -116,8 +112,6 @@ pk_self_test_SOURCES =					\
 	pk-backend.c					\
 	pk-spawn.h					\
 	pk-spawn.c					\
-	pk-network.h					\
-	pk-network.c					\
 	pk-thread-list.h				\
 	pk-thread-list.c				\
 	pk-transaction-id.h				\
diff --git a/src/pk-backend.c b/src/pk-backend.c
index 80f5479..fa43869 100644
--- a/src/pk-backend.c
+++ b/src/pk-backend.c
@@ -39,13 +39,13 @@
 #include <gmodule.h>
 #include <pk-package-id.h>
 #include <pk-enum.h>
+#include <pk-network.h>
 
 #include "pk-debug.h"
 #include "pk-backend-internal.h"
 #include "pk-marshal.h"
 #include "pk-enum.h"
 #include "pk-spawn.h"
-#include "pk-network.h"
 #include "pk-thread-list.h"
 
 #define PK_BACKEND_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), PK_TYPE_BACKEND, PkBackendPrivate))
diff --git a/src/pk-network.c b/src/pk-network.c
deleted file mode 100644
index 80d843e..0000000
--- a/src/pk-network.c
+++ /dev/null
@@ -1,164 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
- *
- * Copyright (C) 2007 Richard Hughes <richard at hughsie.com>
- *
- * Licensed under the GNU General Public License Version 2
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-#include "config.h"
-
-#include <stdlib.h>
-#include <stdio.h>
-#include <time.h>
-#include <errno.h>
-
-#include <string.h>
-#include <sys/time.h>
-#include <sys/types.h>
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif /* HAVE_UNISTD_H */
-
-#include <sys/wait.h>
-#include <fcntl.h>
-
-#include <glib/gi18n.h>
-#include <libnm_glib.h>
-
-#include "pk-debug.h"
-#include "pk-network.h"
-#include "pk-marshal.h"
-
-static void     pk_network_class_init	(PkNetworkClass *klass);
-static void     pk_network_init		(PkNetwork      *network);
-static void     pk_network_finalize	(GObject        *object);
-
-#define PK_NETWORK_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), PK_TYPE_NETWORK, PkNetworkPrivate))
-
-struct PkNetworkPrivate
-{
-	GString			*stdout_buf;
-	libnm_glib_ctx		*ctx;
-	guint			 callbackid;
-};
-
-enum {
-	PK_NETWORK_ONLINE,
-	PK_NETWORK_LAST_SIGNAL
-};
-
-static guint	     signals [PK_NETWORK_LAST_SIGNAL] = { 0, };
-
-G_DEFINE_TYPE (PkNetwork, pk_network, G_TYPE_OBJECT)
-
-/**
- * pk_network_is_online:
- **/
-gboolean
-pk_network_is_online (PkNetwork *network)
-{
-	libnm_glib_state state;
-	gboolean ret;
-	state = libnm_glib_get_network_state (network->priv->ctx);
-	switch (state) {
-	case LIBNM_NO_NETWORK_CONNECTION:
-		ret = FALSE;
-		break;
-	default:
-		ret = TRUE;
-	}
-	return ret;
-}
-
-/**
- * pk_network_nm_changed_cb:
- **/
-static void
-pk_network_nm_changed_cb (libnm_glib_ctx *libnm_ctx, gpointer data)
-{
-	gboolean ret;
-	PkNetwork *network = (PkNetwork *) data;
-	ret = pk_network_is_online (network);
-	g_signal_emit (network, signals [PK_NETWORK_ONLINE], 0, ret);
-}
-
-/**
- * pk_network_class_init:
- * @klass: The PkNetworkClass
- **/
-static void
-pk_network_class_init (PkNetworkClass *klass)
-{
-	GObjectClass *object_class = G_OBJECT_CLASS (klass);
-	object_class->finalize = pk_network_finalize;
-	signals [PK_NETWORK_ONLINE] =
-		g_signal_new ("online",
-			      G_TYPE_FROM_CLASS (object_class), G_SIGNAL_RUN_LAST,
-			      0, NULL, NULL, g_cclosure_marshal_VOID__BOOLEAN,
-			      G_TYPE_NONE, 1, G_TYPE_BOOLEAN);
-	g_type_class_add_private (klass, sizeof (PkNetworkPrivate));
-}
-
-/**
- * pk_network_init:
- * @network: This class instance
- **/
-static void
-pk_network_init (PkNetwork *network)
-{
-	GMainContext *context;
-
-	network->priv = PK_NETWORK_GET_PRIVATE (network);
-	context = g_main_context_default ();
-	network->priv->ctx = libnm_glib_init ();
-	network->priv->callbackid =
-		libnm_glib_register_callback (network->priv->ctx,
-					      pk_network_nm_changed_cb,
-					      network, context);
-}
-
-/**
- * pk_network_finalize:
- * @object: The object to finalize
- **/
-static void
-pk_network_finalize (GObject *object)
-{
-	PkNetwork *network;
-	g_return_if_fail (object != NULL);
-	g_return_if_fail (PK_IS_NETWORK (object));
-	network = PK_NETWORK (object);
-
-	g_return_if_fail (network->priv != NULL);
-	libnm_glib_unregister_callback (network->priv->ctx, network->priv->callbackid);
-//	libnm_glib_shutdown (network->priv->ctx);
-
-	G_OBJECT_CLASS (pk_network_parent_class)->finalize (object);
-}
-
-/**
- * pk_network_new:
- *
- * Return value: a new PkNetwork object.
- **/
-PkNetwork *
-pk_network_new (void)
-{
-	PkNetwork *network;
-	network = g_object_new (PK_TYPE_NETWORK, NULL);
-	return PK_NETWORK (network);
-}
diff --git a/src/pk-network.h b/src/pk-network.h
deleted file mode 100644
index f05f202..0000000
--- a/src/pk-network.h
+++ /dev/null
@@ -1,57 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
- *
- * Copyright (C) 2007 Richard Hughes <richard at hughsie.com>
- *
- * Licensed under the GNU General Public License Version 2
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-#ifndef __PK_NETWORK_H
-#define __PK_NETWORK_H
-
-#include <glib-object.h>
-
-G_BEGIN_DECLS
-
-#define PK_TYPE_NETWORK		(pk_network_get_type ())
-#define PK_NETWORK(o)		(G_TYPE_CHECK_INSTANCE_CAST ((o), PK_TYPE_NETWORK, PkNetwork))
-#define PK_NETWORK_CLASS(k)	(G_TYPE_CHECK_CLASS_CAST((k), PK_TYPE_NETWORK, PkNetworkClass))
-#define PK_IS_NETWORK(o)	(G_TYPE_CHECK_INSTANCE_TYPE ((o), PK_TYPE_NETWORK))
-#define PK_IS_NETWORK_CLASS(k)	(G_TYPE_CHECK_CLASS_TYPE ((k), PK_TYPE_NETWORK))
-#define PK_NETWORK_GET_CLASS(o)	(G_TYPE_INSTANCE_GET_CLASS ((o), PK_TYPE_NETWORK, PkNetworkClass))
-#define PK_NETWORK_ERROR	(pk_network_error_quark ())
-#define PK_NETWORK_TYPE_ERROR	(pk_network_error_get_type ()) 
-
-typedef struct PkNetworkPrivate PkNetworkPrivate;
-
-typedef struct
-{
-	 GObject		 parent;
-	 PkNetworkPrivate	*priv;
-} PkNetwork;
-
-typedef struct
-{
-	GObjectClass	parent_class;
-} PkNetworkClass;
-
-GType		 pk_network_get_type		  	(void);
-PkNetwork	*pk_network_new				(void);
-gboolean	 pk_network_is_online			(PkNetwork	*network);
-
-G_END_DECLS
-
-#endif /* __PK_NETWORK_H */
diff-tree 6dba4a03467778f2494ea49352c2ec8cf88783df (from 7d8c89e1bb2f53935b2296f38b20bc114a8375e5)
Author: Elliot Peele <elliot at bentlogic.net>
Date:   Mon Oct 8 22:13:32 2007 -0400

    switch callback to standard status strings

diff --git a/backends/conary/helpers/conaryCallback.py b/backends/conary/helpers/conaryCallback.py
index 4aece7b..9c7884b 100644
--- a/backends/conary/helpers/conaryCallback.py
+++ b/backends/conary/helpers/conaryCallback.py
@@ -14,28 +14,35 @@ from packagekit import *
 
 class UpdateCallback(callbacks.UpdateCallback):
     def resolvingDependencies(self):
-        self.backend.status('Resolving Dependencies')
+        #self.backend.status('Resolving Dependencies')
+        pass
 
     def creatingRollback(self):
-        self.backend.status('Creating Rollback')
+        #self.backend.status('Creating Rollback')
+        pass
 
     def committingTransaction(self):
-        self.backend.status('Committing Transaction')
+        #self.backend.status('Committing Transaction')
+        pass
 
     def downloadingFileContents(self, got, need):
-        self.backend.status('Downloading files for changeset')
+        #self.backend.status('Downloading files for changeset')
+        self.backend.status(INFO_DOWNLOADING)
 
     def downloadingChangeSet(self, got, need):
-        self.backend.status('Downloading')
+        self.backend.status(INFO_DOWNLOADING)
 
     def requestingFileContents(self):
-        self.backend.status('Requesting File Contents')
+        #self.backend.status('Requesting File Contents')
+        pass
 
     def requestingChangeSet(self):
-        self.backend.status('Requesting Changeset')
+        #self.backend.status('Requesting Changeset')
+        pass
 
     def done(self):
-        self.backend.status('Done')
+        #self.backend.status('Done')
+        pass
 
     def preparingUpdate(self, troveNum, troveCount, add=0):
         if troveNum > 0 and troveCount > 0:
@@ -54,13 +61,13 @@ class UpdateCallback(callbacks.UpdateCal
         newVersion, newFlavor = job[2]
 
         if oldVersion and newVersion:
-            self.backend.status('Update')
+            self.backend.status(INFO_UPDATING)
             id = self.backend.get_package_id(name, newVersion, newFlavor)
         elif oldVersion and not newVersion:
-            self.backend.status('Erase')
+            self.backend.status(INFO_REMOVING)
             id = self.backend.get_package_id(name, oldVersion, oldFlavor)
         elif not oldVersion and newVersion:
-            self.backend.status('Install')
+            self.backend.status(INFO_INSTALLING)
             id = self.backend.get_package_id(name, newVersion, newFlavor)
 
         self.backend.package(id, 1, '')
diff-tree 7d8c89e1bb2f53935b2296f38b20bc114a8375e5 (from 0c73380c6e29248bc03d223570d69235d46b3734)
Author: Richard Hughes <richard at hughsie.com>
Date:   Mon Oct 8 23:21:28 2007 +0100

    update TODO

diff --git a/TODO b/TODO
index be4605c..8a237fa 100644
--- a/TODO
+++ b/TODO
@@ -8,6 +8,8 @@ NOTE: RELEASE BLOCKER
 *** PkNetwork ***
 Need to move src/pk-network.* into libpackagekit so vendors can plug in
 other network detection frameworks other than NetworkManager.
+pk-network.c -> pk-network-nm.c and a common pk-network.h - select abstraction
+in the configure script. Create pk-network-none.c that is always on.
 Plus, clients can re-use this code, rather than using PkConnection (WRONG!!)
 NOTE: RELEASE BLOCKER
 
diff-tree 0c73380c6e29248bc03d223570d69235d46b3734 (from 1bfb3cf95bbbcae7976d1f15f86af7e36403c517)
Author: Richard Hughes <richard at hughsie.com>
Date:   Mon Oct 8 23:18:37 2007 +0100

    update TODO

diff --git a/TODO b/TODO
index c47e48e..be4605c 100644
--- a/TODO
+++ b/TODO
@@ -5,6 +5,11 @@ Do automatic updates at login time when 
  * needs gnome-screensaver integration
 NOTE: RELEASE BLOCKER
 
+*** PkNetwork ***
+Need to move src/pk-network.* into libpackagekit so vendors can plug in
+other network detection frameworks other than NetworkManager.
+Plus, clients can re-use this code, rather than using PkConnection (WRONG!!)
+NOTE: RELEASE BLOCKER
 
 *** pk-update-icon (client) ***
 * Don't re-run get-updates when selecting "Show updates" from the update icon, just populate it with the previous results.



More information about the PackageKit mailing list