diff options
author | Ted Gould <ted@gould.cx> | 2010-01-19 17:20:21 -0600 |
---|---|---|
committer | Ted Gould <ted@gould.cx> | 2010-01-19 17:20:21 -0600 |
commit | 08fef8dc585407e88d27da07a7c6fd726303a0dd (patch) | |
tree | 1283cd17274c69ea24bf2a7e8a66aa879d95d4f0 /src/application-service-appstore.c | |
parent | 85394de1aa25fea66bbe30e3ceeafc754f2e8ff7 (diff) | |
download | libayatana-appindicator-08fef8dc585407e88d27da07a7c6fd726303a0dd.tar.gz libayatana-appindicator-08fef8dc585407e88d27da07a7c6fd726303a0dd.tar.bz2 libayatana-appindicator-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.c | 13 |
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) |