aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/application-service-appstore.c29
1 files changed, 29 insertions, 0 deletions
diff --git a/src/application-service-appstore.c b/src/application-service-appstore.c
index 340548f..335cd63 100644
--- a/src/application-service-appstore.c
+++ b/src/application-service-appstore.c
@@ -53,9 +53,15 @@ static gboolean _application_service_server_get_applications (ApplicationService
struct _ApplicationServiceAppstorePrivate {
DBusGConnection * bus;
GList * applications;
+ GList * approvers;
AppLruFile * lrufile;
};
+typedef struct _Approver Approver;
+struct _Approver {
+ DBusGProxy * proxy;
+};
+
typedef struct _Application Application;
struct _Application {
gchar * id;
@@ -94,6 +100,7 @@ static void application_service_appstore_dispose (GObject *object);
static void application_service_appstore_finalize (GObject *object);
static AppIndicatorStatus string_to_status(const gchar * status_string);
static void apply_status (Application * app, AppIndicatorStatus status);
+void approver_free (gpointer papprover, gpointer user_data);
G_DEFINE_TYPE (ApplicationServiceAppstore, application_service_appstore, G_TYPE_OBJECT);
@@ -142,6 +149,7 @@ application_service_appstore_init (ApplicationServiceAppstore *self)
ApplicationServiceAppstorePrivate * priv = APPLICATION_SERVICE_APPSTORE_GET_PRIVATE (self);
priv->applications = NULL;
+ priv->approvers = NULL;
priv->lrufile = NULL;
GError * error = NULL;
@@ -172,6 +180,12 @@ application_service_appstore_dispose (GObject *object)
((Application *)priv->applications->data)->dbus_object);
}
+ if (priv->approvers != NULL) {
+ g_list_foreach(priv->approvers, approver_free, NULL);
+ g_list_free(priv->approvers);
+ priv->approvers = NULL;
+ }
+
G_OBJECT_CLASS (application_service_appstore_parent_class)->dispose (object);
return;
}
@@ -746,6 +760,21 @@ _application_service_server_get_applications (ApplicationServiceAppstore * appst
}
void
+approver_free (gpointer papprover, gpointer user_data)
+{
+ Approver * approver = (Approver *)papprover;
+ g_return_if_fail(approver != NULL);
+
+ if (approver->proxy != NULL) {
+ g_object_unref(approver->proxy);
+ approver->proxy = NULL;
+ }
+
+ g_free(approver);
+ return;
+}
+
+void
application_service_appstore_approver_add (ApplicationServiceAppstore * appstore, const gchar * dbus_name, const gchar * dbus_object)
{