aboutsummaryrefslogtreecommitdiff
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
parent4f7e748e6fc9a5b190b527b3089aa7bcffad092b (diff)
downloadayatana-indicator-application-a281700349fbbcf9cc5df505c9d75b922da662a2.tar.gz
ayatana-indicator-application-a281700349fbbcf9cc5df505c9d75b922da662a2.tar.bz2
ayatana-indicator-application-a281700349fbbcf9cc5df505c9d75b922da662a2.zip
Building the approver structure and putting it in the list.
-rw-r--r--src/application-service-appstore.c21
-rw-r--r--src/dbus-shared.h2
2 files changed, 23 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;
}
diff --git a/src/dbus-shared.h b/src/dbus-shared.h
index f158b1c..1d8d89c 100644
--- a/src/dbus-shared.h
+++ b/src/dbus-shared.h
@@ -31,3 +31,5 @@ with this program. If not, see <http://www.gnu.org/licenses/>.
#define NOTIFICATION_ITEM_DBUS_IFACE "org.kde.StatusNotifierItem"
#define NOTIFICATION_ITEM_DEFAULT_OBJ "/StatusNotifierItem"
+#define NOTIFICATION_APPROVER_DBUS_IFACE "org.ayatana.StatusNotifierApprover"
+