[maemo-commits] [maemo-commits] r11645 - in projects/haf/trunk/libosso: debian src

From: subversion at stage.maemo.org subversion at stage.maemo.org
Date: Tue May 15 12:53:46 EEST 2007
Author: kihamala
Date: 2007-05-15 12:53:45 +0300 (Tue, 15 May 2007)
New Revision: 11645

Modified:
   projects/haf/trunk/libosso/debian/changelog
   projects/haf/trunk/libosso/src/osso-system-note.c
Log:
moved to org.freedesktop.Notifications API


Modified: projects/haf/trunk/libosso/debian/changelog
===================================================================
--- projects/haf/trunk/libosso/debian/changelog	2007-05-15 09:42:13 UTC (rev 11644)
+++ projects/haf/trunk/libosso/debian/changelog	2007-05-15 09:53:45 UTC (rev 11645)
@@ -1,3 +1,10 @@
+libosso (2.8-1) unstable; urgency=low
+
+  * UNRELEASED
+  * Moved to the new org.freedesktop.Notifications API.
+
+ -- Kimmo Hämäläinen <kimmo.hamalainen at nokia.com>  Tue, 15 May 2007 12:33:06 +0300
+
 libosso (2.7-1) unstable; urgency=low
 
   * Undid the change for NB#54026: seems to break stuff (at least

Modified: projects/haf/trunk/libosso/src/osso-system-note.c
===================================================================
--- projects/haf/trunk/libosso/src/osso-system-note.c	2007-05-15 09:42:13 UTC (rev 11644)
+++ projects/haf/trunk/libosso/src/osso-system-note.c	2007-05-15 09:53:45 UTC (rev 11645)
@@ -1,11 +1,11 @@
 /**
  * @file osso-system-note.c
  * This file implements D-Bus requests for system notification
- * dialogs and infoprints (on statusbar)
+ * dialogs and infoprints
  * 
- * This file is part of libosso
+ * This file is part of Libosso
  *
- * Copyright (C) 2005 Nokia Corporation. All rights reserved.
+ * Copyright (C) 2005-2007 Nokia Corporation. All rights reserved.
  *
  * Contact: Kimmo Hämäläinen <kimmo.hamalainen at nokia.com>
  *
@@ -27,6 +27,10 @@
 #include <osso-log.h>
 #include "osso-internal.h"
 
+#define FDO_SERVICE "org.freedesktop.Notifications"
+#define FDO_OBJECT_PATH "/org/freedesktop/Notifications"
+#define FDO_INTERFACE "org.freedesktop.Notifications"
+
 osso_return_t osso_system_note_dialog(osso_context_t *osso,
 				      const gchar *message,
 				      osso_system_note_type_t type,
@@ -34,7 +38,7 @@
 {
   gint rpc_retval = OSSO_OK;
 
-  if ( (osso == NULL) || (message == NULL) ) {
+  if (osso == NULL || message == NULL) {
     ULOG_ERR_F("Invalid osso context or message");
     return OSSO_INVALID;
   }
@@ -43,13 +47,15 @@
     ULOG_ERR_F("Invalid message type");
     return OSSO_INVALID;
   }
-  rpc_retval = osso_rpc_run_with_defaults(osso, OSSO_BUS_STATUSBAR,
-					  OSSO_BUS_SYSNOTE,
-					  retval, DBUS_TYPE_STRING,
-					  message, DBUS_TYPE_INT32, type,
-					  DBUS_TYPE_INVALID);
+  rpc_retval = osso_rpc_run(osso, FDO_SERVICE, FDO_OBJECT_PATH,
+                            FDO_INTERFACE, "SystemNoteDialog",
+                            retval, DBUS_TYPE_STRING, message,
+                            DBUS_TYPE_INT32, type,
+                            DBUS_TYPE_STRING, "",
+                            DBUS_TYPE_INVALID);
+
   if (rpc_retval != OSSO_OK) {
-    ULOG_ERR_F("RPC call for system note dialog failed");
+    ULOG_ERR_F("osso_rpc_run failed");
     return OSSO_ERROR;
   }
   return OSSO_OK;
@@ -61,18 +67,18 @@
 {
   gint rpc_retval = 0;
   
-  if ( (osso == NULL) || (text == NULL) ) {
+  if (osso == NULL || text == NULL) {
     ULOG_ERR_F("Invalid osso context or message text");
     return OSSO_INVALID;
   }
     
-  rpc_retval = osso_rpc_run_with_defaults(osso, OSSO_BUS_STATUSBAR,
-					  OSSO_BUS_INFOPRINT,
-					  retval, DBUS_TYPE_STRING, text,
-					  DBUS_TYPE_INVALID);
+  rpc_retval = osso_rpc_run(osso, FDO_SERVICE, FDO_OBJECT_PATH,
+                            FDO_INTERFACE, "SystemNoteInfoprint",
+                            retval, DBUS_TYPE_STRING, text,
+                            DBUS_TYPE_INVALID);
 
   if (rpc_retval != OSSO_OK) {
-    ULOG_ERR_F("RPC call for statusbar infoprint failed");
+    ULOG_ERR_F("osso_rpc_run failed");
     return OSSO_ERROR;
   }
   return OSSO_OK;


More information about the maemo-commits mailing list