1 /*
2  * Nautilus-Actions
3  * A Nautilus extension which offers configurable context menu actions.
4  *
5  * Copyright (C) 2005 The GNOME Foundation
6  * Copyright (C) 2006-2008 Frederic Ruaudel and others (see AUTHORS)
7  * Copyright (C) 2009-2014 Pierre Wieser and others (see AUTHORS)
8  *
9  * Nautilus-Actions is free software; you can redistribute it and/or
10  * modify it under the terms of the GNU General Public License as
11  * published by the Free Software Foundation; either version 2 of
12  * the License, or (at your option) any later version.
13  *
14  * Nautilus-Actions is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17  * General Public License for more details.
18  *
19  * You should have received a copy of the GNU General Public License
20  * along with Nautilus-Actions; see the file COPYING. If not, see
21  * <http://www.gnu.org/licenses/>.
22  *
23  * Authors:
24  *   Frederic Ruaudel <grumz@grumz.net>
25  *   Rodrigo Moya <rodrigo@gnome-db.org>
26  *   Pierre Wieser <pwieser@trychlos.org>
27  *   ... and many others (see AUTHORS)
28  */
29 
30 #ifndef __NAUTILUS_ACTIONS_API_NA_DBUS_H__
31 #define __NAUTILUS_ACTIONS_API_NA_DBUS_H__
32 
33 /**
34  * SECTION: dbus
35  * @title: D-Bus
36  * @short_description: The D-Bus Services
37  * @include: nautilus-actions/na-dbus.h
38  *
39  * &prodname;, through its <emphasis>tracker</emphasis> plugin, exposes
40  * several D-Bus interfaces. These interfaces may be queried in order to get
41  * informations about current selection, &prodname; status, and so on.
42  *
43  * <note>
44  *   <para>
45  *    To be really clear, &prodname; relies on &nautilus; in order
46  *    to be able to register its own D-Bus services via the
47  *    <emphasis>tracker</emphasis> plugin.
48  *   </para>
49  *   <para>
50  *    If &nautilus; does not run, or the <emphasis>tracker</emphasis>
51  *    plugin is not loaded at &nautilus; startup, then these D-Bus
52  *    services will not be available.
53  *   </para>
54  * </note>
55  */
56 
57 #include <glib.h>
58 
59 G_BEGIN_DECLS
60 
61 /**
62  * NAUTILUS_ACTIONS_DBUS_SERVICE:
63  *
64  * This is the &laquo;&nbsp;well-known&nbsp;&raquo; name that
65  * &prodname; reserves on D-Bus session bus.
66  */
67 #define NAUTILUS_ACTIONS_DBUS_SERVICE            "org.nautilus-actions.DBus"
68 
69 /**
70  * NAUTILUS_ACTIONS_DBUS_TRACKER_PATH:
71  *
72  * The D-Bus path of the <emphasis>tracker</emphasis> object.
73  *
74  * When requested through the <methodname>Introspect</methodname> of the
75  * <interfacename>Introspectable</interfacename> D-Bus interface, the
76  * <emphasis>tracker</emphasis> object returns following informations:
77  *
78  * <programlisting>
79  *   <command>
80  *     dbus-send \
81  *       --session \
82  *       --type=method_call \
83  *       --print-reply \
84  *       --dest=org.nautilus-actions.DBus \
85  *         /org/nautilus_actions/DBus/Tracker \
86  *           org.freedesktop.DBus.Introspectable.Introspect
87  *   </command>
88  *   <computeroutput>
89  *    <![CDATA[
90  *     method return sender=:1.29 -> dest=:1.145 reply_serial=2
91  *       string "<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN"
92  *     "http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
93  *     <node>
94  *       <interface name="org.freedesktop.DBus.Introspectable">
95  *         <method name="Introspect">
96  *           <arg name="data" direction="out" type="s"/>
97  *         </method>
98  *       </interface>
99  *       <interface name="org.freedesktop.DBus.Properties">
100  *         <method name="Get">
101  *           <arg name="interface" direction="in" type="s"/>
102  *           <arg name="propname" direction="in" type="s"/>
103  *           <arg name="value" direction="out" type="v"/>
104  *         </method>
105  *         <method name="Set">
106  *           <arg name="interface" direction="in" type="s"/>
107  *           <arg name="propname" direction="in" type="s"/>
108  *           <arg name="value" direction="in" type="v"/>
109  *         </method>
110  *         <method name="GetAll">
111  *           <arg name="interface" direction="in" type="s"/>
112  *           <arg name="props" direction="out" type="a{sv}"/>
113  *         </method>
114  *       </interface>
115  *       <interface name="org.nautilus_actions.DBus.Tracker.Status">
116  *         <method name="GetSelectedPaths">
117  *           <arg name="paths" type="as" direction="out"/>
118  *         </method>
119  *       </interface>
120  *     </node>
121  *    ]]>
122  *   </computeroutput>
123  * </programlisting>
124  */
125 #define NAUTILUS_ACTIONS_DBUS_TRACKER_PATH       "/org/nautilus_actions/DBus/Tracker"
126 
127 /**
128  * NAUTILUS_ACTIONS_DBUS_TRACKER_IFACE:
129  *
130  * An interface defined on the <emphasis>tracker</emphasis> object,
131  * identified by its %NAUTILUS_ACTIONS_DBUS_TRACKER_PATH D-Bus path.
132  */
133 #define NAUTILUS_ACTIONS_DBUS_TRACKER_IFACE  	"org.nautilus_actions.DBus.Tracker.Properties1"
134 
135 G_END_DECLS
136 
137 #endif /* __NAUTILUS_ACTIONS_API_NA_DBUS_H__ */
138