diff options
author | Ted Gould <ted@canonical.com> | 2009-11-23 13:09:58 -0600 |
---|---|---|
committer | Ted Gould <ted@canonical.com> | 2009-11-23 13:09:58 -0600 |
commit | 5a87d20ea3873748036185ae74da33ed88cf9d63 (patch) | |
tree | a526d14e94985e4a0f9b5ce73e288fedb8370169 /src/custom-service-appstore.c | |
parent | efd63e3ff881a38bdbd466774dcf506b485166c2 (diff) | |
download | libayatana-appindicator-5a87d20ea3873748036185ae74da33ed88cf9d63.tar.gz libayatana-appindicator-5a87d20ea3873748036185ae74da33ed88cf9d63.tar.bz2 libayatana-appindicator-5a87d20ea3873748036185ae74da33ed88cf9d63.zip |
Commenting.
Diffstat (limited to 'src/custom-service-appstore.c')
-rw-r--r-- | src/custom-service-appstore.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/custom-service-appstore.c b/src/custom-service-appstore.c index a69bde6..81910dd 100644 --- a/src/custom-service-appstore.c +++ b/src/custom-service-appstore.c @@ -164,20 +164,27 @@ get_all_properties_cb (DBusGProxy * proxy, GHashTable * properties, GError * err return; } +/* Adding a new NotificationItem object from DBus in to the + appstore. First, we need to get the information on it + though. */ void custom_service_appstore_application_add (CustomServiceAppstore * appstore, const gchar * dbus_name, const gchar * dbus_object) { + /* Make sure we got a sensible request */ g_return_if_fail(IS_CUSTOM_SERVICE_APPSTORE(appstore)); g_return_if_fail(dbus_name != NULL && dbus_name[0] != '\0'); g_return_if_fail(dbus_object != NULL && dbus_object[0] != '\0'); CustomServiceAppstorePrivate * priv = CUSTOM_SERVICE_APPSTORE_GET_PRIVATE(appstore); + /* Build the application entry. This will be carried + along until we're sure we've got everything. */ Application * app = g_new(Application, 1); app->dbus_name = g_strdup(dbus_name); app->dbus_object = g_strdup(dbus_object); app->appstore = appstore; + /* Get the DBus proxy for the NotificationItem interface */ GError * error = NULL; app->dbus_proxy = dbus_g_proxy_new_for_name_owner(priv->bus, app->dbus_name, @@ -192,6 +199,7 @@ custom_service_appstore_application_add (CustomServiceAppstore * appstore, const return; } + /* Grab the property proxy interface */ app->prop_proxy = dbus_g_proxy_new_for_name_owner(priv->bus, app->dbus_name, app->dbus_object, @@ -206,11 +214,14 @@ custom_service_appstore_application_add (CustomServiceAppstore * appstore, const return; } + /* Get all the propertiees */ org_freedesktop_DBus_Properties_get_all_async(app->prop_proxy, NOTIFICATION_ITEM_DBUS_IFACE, get_all_properties_cb, app); + /* We're returning, nothing is yet added until the properties + come back and give us more info. */ return; } |