From 08fef8dc585407e88d27da07a7c6fd726303a0dd Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Tue, 19 Jan 2010 17:20:21 -0600 Subject: Adding a _new function for the appstore and using it. It now takes the lru file. --- src/application-service-appstore.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src/application-service-appstore.c') diff --git a/src/application-service-appstore.c b/src/application-service-appstore.c index d0b5570..2121a0d 100644 --- a/src/application-service-appstore.c +++ b/src/application-service-appstore.c @@ -52,6 +52,7 @@ typedef struct _ApplicationServiceAppstorePrivate ApplicationServiceAppstorePriv struct _ApplicationServiceAppstorePrivate { DBusGConnection * bus; GList * applications; + AppLruFile * lrufile; }; #define APP_STATUS_PASSIVE_STR "passive" @@ -148,6 +149,7 @@ application_service_appstore_init (ApplicationServiceAppstore *self) ApplicationServiceAppstorePrivate * priv = APPLICATION_SERVICE_APPSTORE_GET_PRIVATE(self); priv->applications = NULL; + priv->lrufile = NULL; GError * error = NULL; priv->bus = dbus_g_bus_get(DBUS_BUS_STARTER, &error); @@ -645,6 +647,17 @@ application_service_appstore_application_remove (ApplicationServiceAppstore * ap return; } +/* Creates a basic appstore object and attaches the + LRU file object to it. */ +ApplicationServiceAppstore * +application_service_appstore_new (AppLruFile * lrufile) +{ + ApplicationServiceAppstore * appstore = APPLICATION_SERVICE_APPSTORE(g_object_new(APPLICATION_SERVICE_APPSTORE_TYPE, NULL)); + ApplicationServiceAppstorePrivate * priv = APPLICATION_SERVICE_APPSTORE_GET_PRIVATE(appstore); + priv->lrufile = lrufile; + return appstore; +} + /* DBus Interface */ static gboolean _application_service_server_get_applications (ApplicationServiceAppstore * appstore, GArray ** apps) -- cgit v1.2.3