[maemo-commits] [maemo-commits] r13938 - in projects/haf/tags/libosso/2.13-1fix: debian src

From: subversion at stage.maemo.org subversion at stage.maemo.org
Date: Thu Sep 20 15:31:10 EEST 2007
Author: kihamala
Date: 2007-09-20 15:31:08 +0300 (Thu, 20 Sep 2007)
New Revision: 13938

Modified:
   projects/haf/tags/libosso/2.13-1fix/debian/changelog
   projects/haf/tags/libosso/2.13-1fix/src/osso-rpc.c
Log:
bring back banner notifications


Modified: projects/haf/tags/libosso/2.13-1fix/debian/changelog
===================================================================
--- projects/haf/tags/libosso/2.13-1fix/debian/changelog	2007-09-20 12:25:39 UTC (rev 13937)
+++ projects/haf/tags/libosso/2.13-1fix/debian/changelog	2007-09-20 12:31:08 UTC (rev 13938)
@@ -1,3 +1,10 @@
+libosso (2.13-1fix) unstable; urgency=low
+
+  * Return calling of startup notification. Patch from Johan Bilien.
+    Fixes: NB#55837
+
+ -- Kimmo Hämäläinen <kimmo.hamalainen at nokia.com>  Thu, 20 Sep 2007 15:27:31 +0300
+
 libosso (2.13-1) unstable; urgency=low
 
   * Fix some warnings in osso-state.c when using -pedantic

Modified: projects/haf/tags/libosso/2.13-1fix/src/osso-rpc.c
===================================================================
--- projects/haf/tags/libosso/2.13-1fix/src/osso-rpc.c	2007-09-20 12:25:39 UTC (rev 13937)
+++ projects/haf/tags/libosso/2.13-1fix/src/osso-rpc.c	2007-09-20 12:31:08 UTC (rev 13938)
@@ -27,6 +27,12 @@
 #include <assert.h>
 #include <stdlib.h>
 
+#define HILDON_DESKTOP_SERVICE "com.nokia.hildon-desktop"
+#define HDWM_STARTUP_NOTIFICATION_IFACE "com.nokia.hildon.hdwm.startupnotification"
+#define HDWM_OBJECT_PATH                "/com/nokia/hildon/hdwm"
+#define HDWM_STARTUP_NOTIFICATION_STARTING  "starting"
+
+
 static void _rpc_handler (osso_context_t * osso,
                           DBusMessage * msg,
                           _osso_callback_data_t *data,
@@ -67,6 +73,35 @@
 } fill_from_va_list_data;
 
 static void
+startup_notify (osso_context_t *osso, const gchar *service)
+{
+    DBusMessage *msg;
+    dbus_bool_t succ;
+
+    msg = dbus_message_new_method_call(HILDON_DESKTOP_SERVICE,
+                                       HDWM_OBJECT_PATH,
+				       HDWM_STARTUP_NOTIFICATION_IFACE,
+                                       HDWM_STARTUP_NOTIFICATION_STARTING);
+    if (msg == NULL) {
+        ULOG_ERR_F("dbus_message_new_method_call failed");
+        return;
+    }
+
+    dbus_message_append_args(msg, DBUS_TYPE_STRING, &service, DBUS_TYPE_INVALID);
+    dbus_message_set_no_reply(msg, TRUE);
+
+    succ = dbus_connection_send(osso->conn, msg, NULL);
+
+    if (!succ) {
+        ULOG_ERR_F("dbus_connection_send failed");
+        return;
+    }
+
+    dbus_message_unref(msg);
+
+}
+
+static void
 fill_from_va_list (DBusMessage *msg, void *raw)
 {
   fill_from_va_list_data *data = (fill_from_va_list_data *)raw;
@@ -202,6 +237,7 @@
 	b = dbus_connection_send(conn, msg, NULL);
         dbus_message_unref(msg);
         if (b) {
+            startup_notify(osso, service);
             return OSSO_OK;
         }
         else {
@@ -217,6 +253,7 @@
 							osso->rpc_timeout,
 							&err);
         dbus_message_unref(msg);
+        startup_notify(osso, service);
 
         if (reply == NULL) {
             ULOG_ERR_F("dbus_connection_send_with_reply_and_block error: %s",
@@ -378,6 +415,8 @@
             rpc = NULL;
         }
 	dbus_message_unref(msg);
+        startup_notify(osso, service);
+
 	return OSSO_OK;
     }
     else {


More information about the maemo-commits mailing list