1 /* MManager - a Desktop wide manager for multimedia applications.
3 * Copyright (C) 2008 Cosimo Cecchi <cosimoc@gnome.org>
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public
7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version.
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Lesser General Public License for more details.
15 * You should have received a copy of the GNU Lesser General Public
16 * License along with this library; if not, write to the
17 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18 * Boston, MA 02111-1307, USA.
21 #ifndef __MM_DBUS_MANAGER_H__
22 #define __MM_DBUS_MANAGER_H__
24 /* TODO: the dbus interface should work like this:
25 * - the applications install a .desktop file in a known place, containing the
26 * path of the executable and the path of the interface on the session bus.
27 * - the dbus manager spawns the executable, so that the methods are available
28 * - the objects are created by the dbus code in the library, with the information
29 * provided by the remote objects.
30 * - the executables should expose the following interface
31 * GetApplication () which returns the supported types and the desktop id.
32 * GetCategories () which returns the icon name and the name.
33 * GetHitCollection () which takes as arguments the name of the category and
34 * a serialized version of the Filter, and returns a serialized version of the
36 * - the serialized version of the filter should be like
39 * <attribute>$id</attribute>
47 * - the serialized version of the HitCollection should be like
51 * <attribute>$id</attribute>
61 * - the library should provide easy methods like _to_xml () and _from_xml ()
62 * for the HitCollection and the Filter, so that the programmer doesn't have
63 * to use libxml himself.
66 #include <glib-object.h>
68 #include <dbus/dbus-glib.h>
70 #define MM_TYPE_DBUS_MANAGER mm_dbus_manager_get_type()
71 #define MM_DBUS_MANAGER(obj) \
72 (G_TYPE_CHECK_INSTANCE_CAST ((obj), MM_TYPE_DBUS_MANAGER, MMDBusManager))
73 #define MM_DBUS_MANAGER_CLASS(klass) \
74 (G_TYPE_CHECK_CLASS_CAST ((klass), MM_TYPE_DBUS_MANAGER, MMDBusManagerClass))
75 #define MM_IS_DBUS_MANAGER(obj) \
76 (G_TYPE_CHECK_INSTANCE_TYPE ((obj), MM_TYPE_DBUS_MANAGER))
77 #define MM_IS_DBUS_MANAGER_CLASS(klass) \
78 (G_TYPE_CHECK_CLASS_TYPE ((klass), MM_TYPE_DBUS_MANAGER))
79 #define MM_DBUS_MANAGER_GET_CLASS(obj) \
80 (G_TYPE_INSTANCE_GET_CLASS ((obj), MM_TYPE_DBUS_MANAGER, MMDBusManagerClass))
82 typedef struct _MMDBusManager MMDBusManager
;
83 typedef struct _MMDBusManagerClass MMDBusManagerClass
;
84 typedef struct _MMDBusManagerDetails MMDBusManagerDetails
;
87 #define MM_DBUS_PATH "/org/gnome/MediaManager"
88 #define MM_DBUS_MANAGER_PATH MM_DBUS_PATH "/Manager"
91 #define MM_DBUS_ERROR_QUARK g_quark_from_static_string ("MMDBusManager")
95 MM_DBUS_ERROR_NULL_PATH
98 struct _MMDBusManager
{
100 MMDBusManagerDetails
*details
;
103 struct _MMDBusManagerClass
{
104 GObjectClass parent_class
;
109 GType
mm_dbus_manager_get_type (void);
111 #endif /* __MM_DBUS_MANAGER_H__ */