next step for dbus notifications
authorVlad <vlad@gas.by>
Tue, 18 May 2010 11:03:56 +0000 (14:03 +0300)
committerVlad <vlad@gas.by>
Tue, 18 May 2010 11:03:56 +0000 (14:03 +0300)
applet/src/livewp-common.h
applet/src/livewp-dbus.c
applet/src/livewp-dbus.h

index a8bfddc..9ed2505 100644 (file)
@@ -103,4 +103,8 @@ struct _AWallpaperPluginClass
 #define LIVEWP_SIGNAL_RELOAD_CONFIG_PATH "/org/maemo/livewp/reload_config"
 #define LIVEWP_RELOAD_CONFIG "reload_config"
 #define LIVEWP_RELOAD_PLUGIN "reload_plugin"
+/* For DBUS */
+#define CALLNOTIF_SIGNAL_INTERFACE "org.freedesktop.Notifications"
+#define CALLNOTIF_SIGNAL_PATH "/org/freedesktop/Notifications"
+#define CALLNOTIF_MEMBER "NotificationClosed"
 #endif
index ea4c06f..0520674 100644 (file)
@@ -108,6 +108,7 @@ get_livewp_signal_cb(DBusConnection *conn, DBusMessage *msg, Animation_Wallpaper
     START_FUNCTION;
 #endif
 
+fprintf (stderr, "PATH11111111111111111111 %s %s %s\n",   dbus_message_get_path(msg),   dbus_message_get_interface (msg), dbus_message_get_member (msg));
     if (dbus_message_is_signal(msg, LIVEWP_SIGNAL_INTERFACE, LIVEWP_RELOAD_CONFIG)){
         if(read_config(priv)){
                 fprintf(stderr, "\nCan not read config file.\n");
@@ -118,7 +119,9 @@ get_livewp_signal_cb(DBusConnection *conn, DBusMessage *msg, Animation_Wallpaper
 #endif
         }
     }
+    if (dbus_message_is_signal(msg, CALLNOTIF_SIGNAL_INTERFACE, CALLNOTIF_MEMBER)){
+        fprintf(stderr," <aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\n");    
+    }
     return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
 }
-/*******************************************************************************/
 
index de99e7d..e1ccd05 100644 (file)
@@ -33,6 +33,7 @@ void livewp_initialize_dbus(Animation_WallpaperPrivate *priv);
 void livewp_deinitialize_dbus(Animation_WallpaperPrivate *priv);
 DBusHandlerResult
 get_livewp_signal_cb(DBusConnection *conn, DBusMessage *msg, Animation_WallpaperPrivate *priv);
+
 void send_dbus_signal (Animation_WallpaperPrivate *priv, const gchar *interface, const gchar *path, const gchar *member);
 gint read_config(Animation_WallpaperPrivate *priv);
 void reload_scene(AWallpaperPlugin *desktop_plugin);