aboutsummaryrefslogtreecommitdiff
path: root/src/application-service-appstore.c
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2010-07-09 16:06:37 -0500
committerTed Gould <ted@gould.cx>2010-07-09 16:06:37 -0500
commita281700349fbbcf9cc5df505c9d75b922da662a2 (patch)
treeb17a2ea36cbce5e96075d8381aa20d3eae1afc0c /src/application-service-appstore.c
parent4f7e748e6fc9a5b190b527b3089aa7bcffad092b (diff)
downloadlibayatana-appindicator-a281700349fbbcf9cc5df505c9d75b922da662a2.tar.gz
libayatana-appindicator-a281700349fbbcf9cc5df505c9d75b922da662a2.tar.bz2
libayatana-appindicator-a281700349fbbcf9cc5df505c9d75b922da662a2.zip
Building the approver structure and putting it in the list.
Diffstat (limited to 'src/application-service-appstore.c')
-rw-r--r--src/application-service-appstore.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/application-service-appstore.c b/src/application-service-appstore.c
index 4b5004c..e4c2d4c 100644
--- a/src/application-service-appstore.c
+++ b/src/application-service-appstore.c
@@ -779,6 +779,27 @@ approver_free (gpointer papprover, gpointer user_data)
void
application_service_appstore_approver_add (ApplicationServiceAppstore * appstore, const gchar * dbus_name, const gchar * dbus_object)
{
+ g_return_if_fail(IS_APPLICATION_SERVICE_APPSTORE(appstore));
+ g_return_if_fail(dbus_name != NULL);
+ g_return_if_fail(dbus_object != NULL);
+ ApplicationServiceAppstorePrivate * priv = APPLICATION_SERVICE_APPSTORE_GET_PRIVATE (appstore);
+
+ Approver * approver = g_new0(Approver, 1);
+
+ GError * error = NULL;
+ approver->proxy = dbus_g_proxy_new_for_name_owner(priv->bus,
+ dbus_name,
+ dbus_object,
+ NOTIFICATION_APPROVER_DBUS_IFACE,
+ &error);
+ if (error != NULL) {
+ g_warning("Unable to get approver interface on '%s:%s' : %s", dbus_name, dbus_object, error->message);
+ g_error_free(error);
+ g_free(approver);
+ return;
+ }
+
+ priv->approvers = g_list_prepend(priv->approvers, approver);
return;
}