aboutsummaryrefslogtreecommitdiff
path: root/src/application-service-appstore.c
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2010-01-19 17:20:21 -0600
committerTed Gould <ted@gould.cx>2010-01-19 17:20:21 -0600
commit08fef8dc585407e88d27da07a7c6fd726303a0dd (patch)
tree1283cd17274c69ea24bf2a7e8a66aa879d95d4f0 /src/application-service-appstore.c
parent85394de1aa25fea66bbe30e3ceeafc754f2e8ff7 (diff)
downloadayatana-indicator-application-08fef8dc585407e88d27da07a7c6fd726303a0dd.tar.gz
ayatana-indicator-application-08fef8dc585407e88d27da07a7c6fd726303a0dd.tar.bz2
ayatana-indicator-application-08fef8dc585407e88d27da07a7c6fd726303a0dd.zip
Adding a _new function for the appstore and using it. It now takes the lru file.
Diffstat (limited to 'src/application-service-appstore.c')
-rw-r--r--src/application-service-appstore.c13
1 files changed, 13 insertions, 0 deletions
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)