[maemo-commits] [maemo-commits] r10193 - in projects/haf/trunk/hildon-desktop: . libhildondesktop src
From: subversion at stage.maemo.org subversion at stage.maemo.orgDate: Fri Feb 23 17:05:54 EET 2007
- Previous message: [maemo-commits] r10192 - projects/haf/trunk/python-runtime/debian
- Next message: [maemo-commits] r10194 - in projects/haf/trunk/hildon-desktop: . src
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Author: moimart
Date: 2007-02-23 17:05:53 +0200 (Fri, 23 Feb 2007)
New Revision: 10193
Added:
projects/haf/trunk/hildon-desktop/libhildondesktop/hildon-desktop-notification-manager.c
projects/haf/trunk/hildon-desktop/libhildondesktop/hildon-desktop-notification-manager.h
projects/haf/trunk/hildon-desktop/libhildondesktop/notification-manager.xml
Removed:
projects/haf/trunk/hildon-desktop/src/hd-notification-manager.c
projects/haf/trunk/hildon-desktop/src/hd-notification-manager.h
projects/haf/trunk/hildon-desktop/src/notification-manager.xml
Modified:
projects/haf/trunk/hildon-desktop/ChangeLog
projects/haf/trunk/hildon-desktop/libhildondesktop/Makefile.am
projects/haf/trunk/hildon-desktop/src/Makefile.am
Log:
* libhildondesktop/notification-manager.xml:
* libhildondesktop/hildon-desktop-notification-manager.[ch]:
* libhildondesktop/Makefile.am:
- Moved from src to libhildondesktop
- Now inherits from GtkListStore.
* ChangeLog updated.
Modified: projects/haf/trunk/hildon-desktop/ChangeLog
===================================================================
--- projects/haf/trunk/hildon-desktop/ChangeLog 2007-02-23 13:22:34 UTC (rev 10192)
+++ projects/haf/trunk/hildon-desktop/ChangeLog 2007-02-23 15:05:53 UTC (rev 10193)
@@ -1,3 +1,11 @@
+2007-02-23 Moises Martinez <moises.martinez at nokia.com>
+
+ * libhildondesktop/notification-manager.xml:
+ * libhildondesktop/hildon-desktop-notification-manager.[ch]:
+ * libhildondesktop/Makefile.am:
+ - Moved from src to libhildondesktop
+ - Now inherits from GtkListStore.
+
2007-02-23 Lucas Rocha <lucas.rocha at nokia.com>
* libhildondesktop/libhildondesktop.pc.in: remove dependency on
Modified: projects/haf/trunk/hildon-desktop/libhildondesktop/Makefile.am
===================================================================
--- projects/haf/trunk/hildon-desktop/libhildondesktop/Makefile.am 2007-02-23 13:22:34 UTC (rev 10192)
+++ projects/haf/trunk/hildon-desktop/libhildondesktop/Makefile.am 2007-02-23 15:05:53 UTC (rev 10193)
@@ -16,6 +16,7 @@
hildon-desktop-panel.h \
hildon-desktop-multiscreen.h \
hildon-desktop-panel-expandable.h \
+ hildon-desktop-notification-manager.h \
statusbar-item.h \
statusbar-item-socket.h \
tasknavigator-item.h \
@@ -60,8 +61,12 @@
BUILT_SOURCES = \
hildon-desktop-marshalers.c \
- hildon-desktop-marshalers.h
+ hildon-desktop-marshalers.h \
+ hildon-desktop-notification-service.h
+hildon-desktop-notification-service.h: notification-manager.xml
+ dbus-binding-tool --prefix=hildon_desktop_notification_service --mode=glib-server --output=hildon-desktop-notification-service.h $<
+
libhildondesktop_la_SOURCES = \
$(HILDON_HOME_SOURCES) \
$(BUILT_SOURCES) \
@@ -87,6 +92,8 @@
hildon-desktop-panel-expandable.c \
hildon-desktop-multiscreen.h \
hildon-desktop-multiscreen.c \
+ hildon-desktop-notification-manager.h \
+ hildon-desktop-notification-manager.c \
statusbar-item.h \
statusbar-item.c \
statusbar-item-socket.h \
Added: projects/haf/trunk/hildon-desktop/libhildondesktop/hildon-desktop-notification-manager.c
===================================================================
--- projects/haf/trunk/hildon-desktop/libhildondesktop/hildon-desktop-notification-manager.c 2007-02-23 13:22:34 UTC (rev 10192)
+++ projects/haf/trunk/hildon-desktop/libhildondesktop/hildon-desktop-notification-manager.c 2007-02-23 15:05:53 UTC (rev 10193)
@@ -0,0 +1,214 @@
+/*
+ * This file is part of hildon-desktop
+ *
+ * Copyright (C) 2006 Nokia Corporation.
+ *
+ * Author: Lucas Rocha <lucas.rocha at nokia.com>
+ * Moises Martinez <moises.martinez at nokia.com>
+ * Contact: Karoliina Salminen <karoliina.t.salminen at nokia.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA
+ *
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include "hildon-desktop-notification-manager.h"
+#include "hildon-desktop-notification-service.h"
+
+#include <gdk-pixbuf/gdk-pixbuf.h>
+
+#define HILDON_DESKTOP_NOTIFICATION_MANAGER_GET_PRIVATE(object) \
+ (G_TYPE_INSTANCE_GET_PRIVATE ((object), HILDON_DESKTOP_TYPE_NOTIFICATION_MANAGER, HildonDesktopNotificationManagerPrivate))
+
+G_DEFINE_TYPE (HildonDesktopNotificationManager, hildon_desktop_notification_manager, GTK_TYPE_LIST_STORE);
+
+#define HILDON_DESKTOP_NOTIFICATION_MANAGER_DBUS_NAME "org.freedesktop.Notifications"
+#define HILDON_DESKTOP_NOTIFICATION_MANAGER_DBUS_PATH "/org/freedesktop/Notifications"
+
+#define HILDON_DESKTOP_NOTIFICATION_MANAGER_ICON_SIZE 48
+
+enum
+{
+ COL_APPNAME,
+ COL_ID,
+ COL_ICON_NAME,
+ COL_ICON,
+ COL_SUMMARY,
+ COL_BODY,
+ COL_ACTIONS,
+ COL_HINTS,
+ COL_TIMEOUT
+};
+
+
+static void
+hildon_desktop_notification_manager_init (HildonDesktopNotificationManager *nm)
+{
+ DBusGConnection *connection;
+ DBusGProxy *bus_proxy;
+ GError *error = NULL;
+ guint request_name_result;
+ GType _types[9] =
+ {
+ G_TYPE_STRING,
+ G_TYPE_INT,
+ G_TYPE_STRING,
+ GDK_TYPE_PIXBUF,
+ G_TYPE_STRING,
+ G_TYPE_STRING,
+ G_TYPE_POINTER,
+ G_TYPE_POINTER,
+ G_TYPE_INT
+ };
+
+ gtk_list_store_set_column_types (GTK_LIST_STORE (nm),
+ 9,
+ _types);
+
+
+ connection = dbus_g_bus_get (DBUS_BUS_SESSION, &error);
+
+ if (error != NULL)
+ {
+ g_warning ("Failed to open connection to bus: %s\n",
+ error->message);
+
+ g_error_free (error);
+
+ return;
+ }
+
+ bus_proxy = dbus_g_proxy_new_for_name (connection,
+ DBUS_SERVICE_DBUS,
+ DBUS_PATH_DBUS,
+ DBUS_INTERFACE_DBUS);
+
+ if (!org_freedesktop_DBus_request_name (bus_proxy,
+ HILDON_DESKTOP_NOTIFICATION_MANAGER_DBUS_NAME,
+ DBUS_NAME_FLAG_DO_NOT_QUEUE,
+ &request_name_result,
+ &error))
+ {
+ g_warning ("Could not register name: %s", error->message);
+
+ g_error_free (error);
+
+ return;
+ }
+
+ g_object_unref (bus_proxy);
+
+ if (request_name_result == DBUS_REQUEST_NAME_REPLY_EXISTS) return;
+
+ dbus_g_object_type_install_info (HILDON_DESKTOP_TYPE_NOTIFICATION_MANAGER,
+ &dbus_glib_hildon_desktop_notification_service_object_info);
+
+ dbus_g_connection_register_g_object (connection,
+ HILDON_DESKTOP_NOTIFICATION_MANAGER_DBUS_PATH,
+ G_OBJECT (nm));
+}
+
+static void
+hildon_desktop_notification_manager_class_init (HildonDesktopNotificationManagerClass *class)
+{
+}
+
+GtkWidget *
+hildon_desktop_notification_manager_get_singleton (void)
+{
+ static GObject *nm = NULL;
+
+ if (nm == NULL)
+ nm = g_object_new (HILDON_DESKTOP_TYPE_NOTIFICATION_MANAGER, NULL);
+
+ return GTK_WIDGET (nm);
+}
+
+gboolean
+hildon_desktop_notification_manager_notify_handler (HildonDesktopNotificationManager *nm,
+ const gchar *app_name,
+ guint id,
+ const gchar *icon,
+ const gchar *summary,
+ const gchar *body,
+ gchar **actions,
+ GHashTable *hints,
+ gint timeout,
+ DBusGMethodInvocation *context)
+{
+ GtkTreeIter iter;
+
+
+ gtk_list_store_append (GTK_LIST_STORE (nm),
+ &iter);
+
+ gtk_list_store_set (GTK_LIST_STORE (nm),
+ &iter,
+ COL_APPNAME, app_name,
+ COL_ID, id,
+ COL_ICON_NAME, icon,
+ COL_ICON, NULL,
+ COL_SUMMARY, summary,
+ COL_BODY, body,
+ COL_ACTIONS, actions,
+ COL_HINTS, hints,
+ COL_TIMEOUT, timeout,
+ -1);
+
+ dbus_g_method_return (context, id);
+
+ return TRUE;
+}
+
+gboolean
+hildon_desktop_notification_manager_get_capabilities (HildonDesktopNotificationManager *nm, gchar ***caps)
+{
+ *caps = g_new0(gchar *, 4);
+
+ (*caps)[0] = g_strdup ("body");
+ (*caps)[1] = g_strdup ("body-markup");
+ (*caps)[2] = g_strdup ("icon-static");
+ (*caps)[3] = NULL;
+
+ return TRUE;
+}
+
+gboolean
+hildon_desktop_notification_manager_get_server_info (HildonDesktopNotificationManager *nm,
+ gchar **out_name,
+ gchar **out_vendor,
+ gchar **out_version,
+ gchar **out_spec_ver)
+{
+ *out_name = g_strdup ("Hildon Desktop Notification Manager");
+ *out_vendor = g_strdup ("Nokia");
+ *out_version = g_strdup (VERSION);
+ *out_spec_ver = g_strdup ("0.9");
+
+ return TRUE;
+}
+
+gboolean
+hildon_desktop_notification_manager_close_notification_handler (HildonDesktopNotificationManager *nm,
+ guint id,
+ GError **error)
+{
+ g_debug ("CALLING CLOSE NOTIFICATION");
+
+ return TRUE;
+}
Added: projects/haf/trunk/hildon-desktop/libhildondesktop/hildon-desktop-notification-manager.h
===================================================================
--- projects/haf/trunk/hildon-desktop/libhildondesktop/hildon-desktop-notification-manager.h 2007-02-23 13:22:34 UTC (rev 10192)
+++ projects/haf/trunk/hildon-desktop/libhildondesktop/hildon-desktop-notification-manager.h 2007-02-23 15:05:53 UTC (rev 10193)
@@ -0,0 +1,89 @@
+/*
+ * This file is part of hildon-desktop
+ *
+ * Copyright (C) 2006 Nokia Corporation.
+ *
+ * Author: Lucas Rocha <lucas.rocha at nokia.com>
+ * Moises Martinez <moises.martinez at nokia.com>
+ * Contact: Karoliina Salminen <karoliina.t.salminen at nokia.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA
+ *
+ */
+
+#ifndef __HILDON_DESKTOP_NOTIFICATION_MANAGER_H__
+#define __HILDON_DESKTOP_NOTIFICATION_MANAGER_H__
+
+#include <gtk/gtk.h>
+#include <gtk/gtkliststore.h>
+#include <glib.h>
+#include <glib-object.h>
+#include <dbus/dbus-glib-bindings.h>
+
+G_BEGIN_DECLS
+
+typedef struct _HildonDesktopNotificationManager HildonDesktopNotificationManager;
+typedef struct _HildonDesktopNotificationManagerClass HildonDesktopNotificationManagerClass;
+typedef struct _HildonDesktopNotificationManagerPrivate HildonDesktopNotificationManagerPrivate;
+
+#define HILDON_DESKTOP_TYPE_NOTIFICATION_MANAGER (hildon_desktop_notification_manager_get_type ())
+#define HILDON_DESKTOP_NOTIFICATION_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), HILDON_DESKTOP_TYPE_NOTIFICATION_MANAGER, HildonDesktopNotificationManager))
+#define HILDON_DESKTOP_NOTIFICATION_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), HILDON_DESKTOP_TYPE_NOTIFICATION_MANAGER, HildonDesktopNotificationManagerClass))
+#define HILDON_DESKTOP_IS_NOTIFICATION_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), HILDON_DESKTOP_TYPE_NOTIFICATION_MANAGER))
+#define HILDON_DESKTOP_IS_NOTIFICATION_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), HILDON_DESKTOP_TYPE_NOTIFICATION_MANAGER))
+#define HILDON_DESKTOP_NOTIFICATION_MANAGER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), HILDON_DESKTOP_TYPE_NOTIFICATION_MANAGER, HildonDesktopNotificationManagerClass))
+
+struct _HildonDesktopNotificationManager
+{
+ GtkListStore liststore;
+
+ HildonDesktopNotificationManagerPrivate *priv;
+};
+
+struct _HildonDesktopNotificationManagerClass
+{
+ GtkListStore parent_class;
+};
+
+GType hildon_desktop_notification_manager_get_type (void);
+
+GtkWidget *hildon_desktop_notification_manager_get_singleton (void);
+
+gboolean hildon_desktop_notification_manager_notify_handler (HildonDesktopNotificationManager *nm,
+ const gchar *app_name,
+ guint id,
+ const gchar *icon,
+ const gchar *summary,
+ const gchar *body,
+ gchar **actions,
+ GHashTable *hints,
+ gint timeout,
+ DBusGMethodInvocation *context);
+
+gboolean hildon_desktop_notification_manager_get_capabilities (HildonDesktopNotificationManager *nm,
+ gchar ***caps);
+
+gboolean hildon_desktop_notification_manager_get_server_info (HildonDesktopNotificationManager *nm,
+ gchar **out_name,
+ gchar **out_vendor,
+ gchar **out_version,
+ gchar **out_spec_ver);
+
+gboolean hildon_desktop_notification_manager_close_notification_handler (HildonDesktopNotificationManager *nm,
+ guint id, GError **error);
+
+G_END_DECLS
+
+#endif /* __HILDON_DESKTOP_NOTIFICATION_MANAGER_H__ */
Added: projects/haf/trunk/hildon-desktop/libhildondesktop/notification-manager.xml
===================================================================
--- projects/haf/trunk/hildon-desktop/libhildondesktop/notification-manager.xml 2007-02-23 13:22:34 UTC (rev 10192)
+++ projects/haf/trunk/hildon-desktop/libhildondesktop/notification-manager.xml 2007-02-23 15:05:53 UTC (rev 10193)
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+
+<node name="/org/freedesktop/Notifications">
+
+ <interface name="org.freedesktop.Notifications">
+
+ <annotation name="org.freedesktop.DBus.GLib.CSymbol" value="HDNotificationManager"/>
+
+ <method name="Notify">
+ <annotation name="org.freedesktop.DBus.GLib.CSymbol" value="hildon_desktop_notification_manager_notify_handler"/>
+
+ <annotation name="org.freedesktop.DBus.GLib.Async" value=""/>
+
+ <arg type="s" name="app_name" direction="in" />
+ <arg type="u" name="id" direction="in" />
+ <arg type="s" name="icon" direction="in" />
+ <arg type="s" name="summary" direction="in" />
+ <arg type="s" name="body" direction="in" />
+ <arg type="as" name="actions" direction="in" />
+ <arg type="a{sv}" name="hints" direction="in" />
+ <arg type="i" name="timeout" direction="in" />
+ <arg type="u" name="return_id" direction="out" />
+ </method>
+
+ <method name="CloseNotification">
+ <annotation name="org.freedesktop.DBus.GLib.CSymbol" value="hildon_desktop_notification_manager_close_notification_handler"/>
+
+ <arg type="u" name="id" direction="in" />
+ </method>
+
+ <method name="GetCapabilities">
+ <annotation name="org.freedesktop.DBus.GLib.CSymbol" value="hildon_desktop_notification_manager_get_capabilities"/>
+
+ <arg type="as" name="return_caps" direction="out"/>
+ </method>
+
+ <method name="GetServerInformation">
+
+ <annotation name="org.freedesktop.DBus.GLib.CSymbol" value="hildon_desktop_notification_manager_get_server_info"/>
+
+ <arg type="s" name="return_name" direction="out"/>
+ <arg type="s" name="return_vendor" direction="out"/>
+ <arg type="s" name="return_version" direction="out"/>
+ <arg type="s" name="return_spec_version" direction="out"/>
+ </method>
+
+ </interface>
+
+</node>
Modified: projects/haf/trunk/hildon-desktop/src/Makefile.am
===================================================================
--- projects/haf/trunk/hildon-desktop/src/Makefile.am 2007-02-23 13:22:34 UTC (rev 10192)
+++ projects/haf/trunk/hildon-desktop/src/Makefile.am 2007-02-23 15:05:53 UTC (rev 10193)
@@ -80,11 +80,7 @@
hn-others-button.c \
hn-others-button.h
-BUILT_SOURCES = hd-notification-service.h
-hd-notification-service.h: notification-manager.xml
- dbus-binding-tool --prefix=hd_notification_service --mode=glib-server --output=hd-notification-service.h $<
-
hildon_desktop_SOURCES = \
$(BUILT_SOURCES) \
$(PLUGIN_MANAGER_SOURCES) \
@@ -99,8 +95,6 @@
hd-panel-window.h \
hd-panel-window-dialog.c \
hd-panel-window-dialog.h \
- hd-notification-manager.c \
- hd-notification-manager.h \
hd-config.h \
main.c
Deleted: projects/haf/trunk/hildon-desktop/src/hd-notification-manager.c
===================================================================
--- projects/haf/trunk/hildon-desktop/src/hd-notification-manager.c 2007-02-23 13:22:34 UTC (rev 10192)
+++ projects/haf/trunk/hildon-desktop/src/hd-notification-manager.c 2007-02-23 15:05:53 UTC (rev 10193)
@@ -1,189 +0,0 @@
-/*
- * This file is part of hildon-desktop
- *
- * Copyright (C) 2006 Nokia Corporation.
- *
- * Author: Lucas Rocha <lucas.rocha at nokia.com>
- * Contact: Karoliina Salminen <karoliina.t.salminen at nokia.com>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public License
- * version 2.1 as published by the Free Software Foundation.
- *
- * This library is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA
- *
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <gtk/gtk.h>
-#include <glib.h>
-#include <glib-object.h>
-#include <dbus/dbus-glib-bindings.h>
-
-#ifdef HAVE_LIBHILDON
-#include <hildon/hildon-banner.h>
-#else
-#include <hildon-widgets/hildon-banner.h>
-#endif
-
-#include "hd-notification-manager.h"
-#include "hd-notification-service.h"
-
-#define HD_NOTIFICATION_MANAGER_GET_PRIVATE(object) \
- (G_TYPE_INSTANCE_GET_PRIVATE ((object), HD_TYPE_NOTIFICATION_MANAGER, HDNotificationManagerPrivate))
-
-G_DEFINE_TYPE (HDNotificationManager, hd_notification_manager, G_TYPE_OBJECT);
-
-#define HD_NOTIFICATION_MANAGER_DBUS_NAME "org.freedesktop.Notifications"
-#define HD_NOTIFICATION_MANAGER_DBUS_PATH "/org/freedesktop/Notifications"
-
-#define HD_NOTIFICATION_MANAGER_ICON_SIZE 48
-
-static void
-hd_notification_manager_init (HDNotificationManager *nm)
-{
- DBusGConnection *connection;
- DBusGProxy *bus_proxy;
- GError *error = NULL;
- guint request_name_result;
-
- connection = dbus_g_bus_get (DBUS_BUS_SESSION, &error);
-
- if (error != NULL)
- {
- g_warning ("Failed to open connection to bus: %s\n",
- error->message);
-
- g_error_free (error);
-
- return;
- }
-
- bus_proxy = dbus_g_proxy_new_for_name (connection,
- DBUS_SERVICE_DBUS,
- DBUS_PATH_DBUS,
- DBUS_INTERFACE_DBUS);
-
- if (!org_freedesktop_DBus_request_name (bus_proxy,
- HD_NOTIFICATION_MANAGER_DBUS_NAME,
- DBUS_NAME_FLAG_DO_NOT_QUEUE,
- &request_name_result,
- &error))
- {
- g_warning ("Could not register name: %s", error->message);
-
- g_error_free (error);
-
- return;
- }
-
- g_object_unref (bus_proxy);
-
- if (request_name_result == DBUS_REQUEST_NAME_REPLY_EXISTS) return;
-
- dbus_g_object_type_install_info (HD_TYPE_NOTIFICATION_MANAGER,
- &dbus_glib_hd_notification_service_object_info);
-
- dbus_g_connection_register_g_object (connection,
- HD_NOTIFICATION_MANAGER_DBUS_PATH,
- G_OBJECT (nm));
-}
-
-static void
-hd_notification_manager_class_init (HDNotificationManagerClass *class)
-{
-}
-
-GObject *
-hd_notification_manager_new (void)
-{
- GObject *nm = g_object_new (HD_TYPE_NOTIFICATION_MANAGER, NULL);
-
- return nm;
-}
-
-gboolean
-hd_notification_manager_notify_handler (HDNotificationManager *nm,
- const gchar *app_name,
- guint id,
- const gchar *icon,
- const gchar *summary,
- const gchar *body,
- gchar **actions,
- GHashTable *hints,
- gint timeout,
- DBusGMethodInvocation *context)
-{
- gchar *message = NULL;
-
- g_return_val_if_fail (summary != NULL, FALSE);
- g_return_val_if_fail (body != NULL, FALSE);
-
- if (summary != NULL && body != NULL)
- {
- message = g_strdup_printf ("<b>%s</b>\n%s", summary, body);
- }
- else if (summary != NULL)
- {
- message = g_strdup (summary);
- }
- else
- {
- message = g_strdup (body);
- }
-
- hildon_banner_show_information_with_markup (NULL, icon, message);
-
- g_free (message);
-
- return TRUE;
-}
-
-gboolean
-hd_notification_manager_get_capabilities (HDNotificationManager *nm, gchar ***caps)
-{
- *caps = g_new0(gchar *, 4);
-
- (*caps)[0] = g_strdup ("body");
- (*caps)[1] = g_strdup ("body-markup");
- (*caps)[2] = g_strdup ("icon-static");
- (*caps)[3] = NULL;
-
- return TRUE;
-}
-
-gboolean
-hd_notification_manager_get_server_info (HDNotificationManager *nm,
- gchar **out_name,
- gchar **out_vendor,
- gchar **out_version,
- gchar **out_spec_ver)
-{
- *out_name = g_strdup ("Hildon Desktop Notification Manager");
- *out_vendor = g_strdup ("Nokia");
- *out_version = g_strdup (VERSION);
- *out_spec_ver = g_strdup ("0.9");
-
- return TRUE;
-}
-
-gboolean
-hd_notification_manager_close_notification_handler (HDNotificationManager *nm,
- guint id,
- GError **error)
-{
- g_debug ("CALLING CLOSE NOTIFICATION");
-
- return TRUE;
-}
Deleted: projects/haf/trunk/hildon-desktop/src/hd-notification-manager.h
===================================================================
--- projects/haf/trunk/hildon-desktop/src/hd-notification-manager.h 2007-02-23 13:22:34 UTC (rev 10192)
+++ projects/haf/trunk/hildon-desktop/src/hd-notification-manager.h 2007-02-23 15:05:53 UTC (rev 10193)
@@ -1,87 +0,0 @@
-/*
- * This file is part of hildon-desktop
- *
- * Copyright (C) 2006 Nokia Corporation.
- *
- * Author: Lucas Rocha <lucas.rocha at nokia.com>
- * Contact: Karoliina Salminen <karoliina.t.salminen at nokia.com>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public License
- * version 2.1 as published by the Free Software Foundation.
- *
- * This library is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA
- *
- */
-
-#ifndef __HD_NOTIFICATION_MANAGER_H__
-#define __HD_NOTIFICATION_MANAGER_H__
-
-#include <gtk/gtk.h>
-#include <glib.h>
-#include <glib-object.h>
-#include <dbus/dbus-glib-bindings.h>
-
-G_BEGIN_DECLS
-
-typedef struct _HDNotificationManager HDNotificationManager;
-typedef struct _HDNotificationManagerClass HDNotificationManagerClass;
-typedef struct _HDNotificationManagerPrivate HDNotificationManagerPrivate;
-
-#define HD_TYPE_NOTIFICATION_MANAGER (hd_notification_manager_get_type ())
-#define HD_NOTIFICATION_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), HD_TYPE_NOTIFICATION_MANAGER, HDNotificationManager))
-#define HD_NOTIFICATION_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), HD_TYPE_NOTIFICATION_MANAGER, HDNotificationManagerClass))
-#define HD_IS_NOTIFICATION_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), HD_TYPE_NOTIFICATION_MANAGER))
-#define HD_IS_NOTIFICATION_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), HD_TYPE_NOTIFICATION_MANAGER))
-#define HD_NOTIFICATION_MANAGER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), HD_TYPE_NOTIFICATION_MANAGER, HDNotificationManagerClass))
-
-struct _HDNotificationManager
-{
- GObject gobject;
-
- HDNotificationManagerPrivate *priv;
-};
-
-struct _HDNotificationManagerClass
-{
- GObjectClass parent_class;
-};
-
-GType hd_notification_manager_get_type (void);
-
-GObject *hd_notification_manager_new (void);
-
-gboolean hd_notification_manager_notify_handler (HDNotificationManager *nm,
- const gchar *app_name,
- guint id,
- const gchar *icon,
- const gchar *summary,
- const gchar *body,
- gchar **actions,
- GHashTable *hints,
- gint timeout,
- DBusGMethodInvocation *context);
-
-gboolean hd_notification_manager_get_capabilities (HDNotificationManager *nm,
- gchar ***caps);
-
-gboolean hd_notification_manager_get_server_info (HDNotificationManager *nm,
- gchar **out_name,
- gchar **out_vendor,
- gchar **out_version,
- gchar **out_spec_ver);
-
-gboolean hd_notification_manager_close_notification_handler (HDNotificationManager *nm,
- guint id, GError **error);
-
-G_END_DECLS
-
-#endif /* __HD_NOTIFICATION_MANAGER_H__ */
Deleted: projects/haf/trunk/hildon-desktop/src/notification-manager.xml
===================================================================
--- projects/haf/trunk/hildon-desktop/src/notification-manager.xml 2007-02-23 13:22:34 UTC (rev 10192)
+++ projects/haf/trunk/hildon-desktop/src/notification-manager.xml 2007-02-23 15:05:53 UTC (rev 10193)
@@ -1,49 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-
-<node name="/org/freedesktop/Notifications">
-
- <interface name="org.freedesktop.Notifications">
-
- <annotation name="org.freedesktop.DBus.GLib.CSymbol" value="HDNotificationManager"/>
-
- <method name="Notify">
- <annotation name="org.freedesktop.DBus.GLib.CSymbol" value="hd_notification_manager_notify_handler"/>
-
- <annotation name="org.freedesktop.DBus.GLib.Async" value=""/>
-
- <arg type="s" name="app_name" direction="in" />
- <arg type="u" name="id" direction="in" />
- <arg type="s" name="icon" direction="in" />
- <arg type="s" name="summary" direction="in" />
- <arg type="s" name="body" direction="in" />
- <arg type="as" name="actions" direction="in" />
- <arg type="a{sv}" name="hints" direction="in" />
- <arg type="i" name="timeout" direction="in" />
- <arg type="u" name="return_id" direction="out" />
- </method>
-
- <method name="CloseNotification">
- <annotation name="org.freedesktop.DBus.GLib.CSymbol" value="hd_notification_manager_close_notification_handler"/>
-
- <arg type="u" name="id" direction="in" />
- </method>
-
- <method name="GetCapabilities">
- <annotation name="org.freedesktop.DBus.GLib.CSymbol" value="hd_notification_manager_get_capabilities"/>
-
- <arg type="as" name="return_caps" direction="out"/>
- </method>
-
- <method name="GetServerInformation">
-
- <annotation name="org.freedesktop.DBus.GLib.CSymbol" value="hd_notification_manager_get_server_info"/>
-
- <arg type="s" name="return_name" direction="out"/>
- <arg type="s" name="return_vendor" direction="out"/>
- <arg type="s" name="return_version" direction="out"/>
- <arg type="s" name="return_spec_version" direction="out"/>
- </method>
-
- </interface>
-
-</node>
- Previous message: [maemo-commits] r10192 - projects/haf/trunk/python-runtime/debian
- Next message: [maemo-commits] r10194 - in projects/haf/trunk/hildon-desktop: . src
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
