dbus: move static const tables in the C file
[vlc.git] / modules / control / dbus / dbus_introspect.h
1 /*****************************************************************************
2  * dbus-introspect.h : dbus control module (mpris v2.1) - introspection data
3  *****************************************************************************
4  * Copyright © 2006-2008 Rafaël Carré
5  * Copyright © 2007-2010 Mirsal Ennaime
6  * Copyright © 2009-2010 The VideoLAN team
7  * $Id$
8  *
9  * Authors:    Mirsal Ennaime <mirsal at mirsal fr>
10  *             Rafaël Carré <funman at videolanorg>
11  *
12  * This program is free software; you can redistribute it and/or modify
13  * it under the terms of the GNU General Public License as published by
14  * the Free Software Foundation; either version 2 of the License, or
15  * (at your option) any later version.
16  *
17  * This program is distributed in the hope that it will be useful,
18  * but WITHOUT ANY WARRANTY; without even the implied warranty of
19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
20  * GNU General Public License for more details.
21  *
22  * You should have received a copy of the GNU General Public License
23  * along with this program; if not, write to the Free Software
24  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
25  *****************************************************************************/
26
27 #ifndef _VLC_DBUS_INTROSPECT_H
28 #define _VLC_DBUS_INTROSPECT_H
29
30 #include "dbus_common.h"
31
32 /* XML data to answer org.freedesktop.DBus.Introspectable.Introspect requests */
33 static const char* psz_introspection_xml =
34 "<!DOCTYPE node PUBLIC \"-//freedesktop//DTD D-BUS Object Introspection 1.0//EN\"\n"
35 "\"http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd\">\n"
36 "<node>\n"
37 "  <interface name=\"org.freedesktop.DBus.Introspectable\">\n"
38 "    <method name=\"Introspect\">\n"
39 "      <arg name=\"data\" direction=\"out\" type=\"s\"/>\n"
40 "    </method>\n"
41 "  </interface>\n"
42 "  <interface name=\"org.freedesktop.DBus.Properties\">\n"
43 "    <method name=\"Get\">\n"
44 "      <arg direction=\"in\" type=\"s\"/>\n"
45 "      <arg direction=\"in\" type=\"s\"/>\n"
46 "      <arg direction=\"out\" type=\"v\"/>\n"
47 "    </method>\n"
48 "    <method name=\"Set\">\n"
49 "      <arg direction=\"in\" type=\"s\"/>\n"
50 "      <arg direction=\"in\" type=\"s\"/>\n"
51 "      <arg direction=\"in\" type=\"v\"/>\n"
52 "    </method>\n"
53 "    <signal name=\"PropertiesChanged\">\n"
54 "      <arg type=\"s\"/>\n"
55 "      <arg type=\"a{sv}\"/>\n"
56 "      <arg type=\"as\"/>\n"
57 "    </signal>\n"
58 "  </interface>\n"
59 "  <interface name=\"org.mpris.MediaPlayer2\">\n"
60 "    <property name=\"Identity\" type=\"s\" access=\"read\" />\n"
61 "    <property name=\"DesktopEntry\" type=\"s\" access=\"read\" />\n"
62 "    <property name=\"SupportedMimeTypes\" type=\"as\" access=\"read\" />\n"
63 "    <property name=\"SupportedUriSchemes\" type=\"as\" access=\"read\" />\n"
64 "    <property name=\"HasTrackList\" type=\"b\" access=\"read\" />\n"
65 "    <property name=\"CanQuit\" type=\"b\" access=\"read\" />\n"
66 "    <property name=\"CanRaise\" type=\"b\" access=\"read\" />\n"
67 "    <method name=\"Quit\" />\n"
68 "  </interface>\n"
69 "  <interface name=\"org.mpris.MediaPlayer2.Player\">\n"
70 "    <property name=\"Metadata\" type=\"a{sv}\" access=\"read\" />\n"
71 "    <property name=\"PlaybackStatus\" type=\"s\" access=\"read\" />\n"
72 "    <property name=\"LoopStatus\" type=\"s\" access=\"readwrite\" />\n"
73 "    <property name=\"Volume\" type=\"d\" access=\"readwrite\" />\n"
74 "    <property name=\"Shuffle\" type=\"d\" access=\"readwrite\" />\n"
75 "    <property name=\"Position\" type=\"i\" access=\"read\" />\n"
76 "    <property name=\"Rate\" type=\"d\" access=\"readwrite\" />\n"
77 "    <property name=\"MinimumRate\" type=\"d\" access=\"readwrite\" />\n"
78 "    <property name=\"MaximumRate\" type=\"d\" access=\"readwrite\" />\n"
79 "    <property name=\"CanControl\" type=\"b\" access=\"read\" />\n"
80 "    <property name=\"CanPlay\" type=\"b\" access=\"read\" />\n"
81 "    <property name=\"CanPause\" type=\"b\" access=\"read\" />\n"
82 "    <property name=\"CanSeek\" type=\"b\" access=\"read\" />\n"
83 "    <method name=\"Previous\" />\n"
84 "    <method name=\"Next\" />\n"
85 "    <method name=\"Stop\" />\n"
86 "    <method name=\"Play\" />\n"
87 "    <method name=\"Pause\" />\n"
88 "    <method name=\"PlayPause\" />\n"
89 "    <method name=\"OpenUri\">\n"
90 "      <arg type=\"s\" direction=\"in\" />\n"
91 "    </method>\n"
92 "    <method name=\"SetPosition\">\n"
93 "      <arg type=\"o\" direction=\"in\" />\n"
94 "      <arg type=\"x\" direction=\"in\" />\n"
95 "    </method>\n"
96 "  </interface>\n"
97 "  <interface name=\"org.mpris.MediaPlayer2.TrackList\">\n"
98 "    <property name=\"Tracks\" type=\"ao\" access=\"read\" />\n"
99 "    <property name=\"CanEditTracks\" type=\"b\" access=\"read\" />\n"
100 "    <method name=\"GetTracksMetadata\">\n"
101 "      <arg type=\"ao\" direction=\"in\" />\n"
102 "      <arg type=\"aa{sv}\" direction=\"out\" />\n"
103 "    </method>\n"
104 "    <method name=\"AddTrack\">\n"
105 "      <arg type=\"s\" direction=\"in\" />\n"
106 "      <arg type=\"o\" direction=\"in\" />\n"
107 "      <arg type=\"b\" direction=\"in\" />\n"
108 "    </method>\n"
109 "    <method name=\"RemoveTrack\">\n"
110 "      <arg type=\"o\" direction=\"in\" />\n"
111 "    </method>\n"
112 "    <method name=\"GoTo\">\n"
113 "      <arg type=\"o\" direction=\"in\" />\n"
114 "    </method>\n"
115 "    <signal name=\"TrackListReplaced\">\n"
116 "      <arg type=\"ao\" />\n"
117 "      <arg type=\"o\" />\n"
118 "    </signal>\n"
119 "    <signal name=\"TrackAdded\">\n"
120 "      <arg type=\"a{sv}\" />\n"
121 "      <arg type=\"o\" />\n"
122 "    </signal>\n"
123 "    <signal name=\"TrackRemoved\">\n"
124 "      <arg type=\"o\" />\n"
125 "    </signal>\n"
126 "    <signal name=\"TrackMetadataChanged\">\n"
127 "      <arg type=\"o\" />\n"
128 "      <arg type=\"a{sv}\" />\n"
129 "    </signal>\n"
130 "  </interface>\n"
131 "</node>\n"
132 ;
133
134 /* Handle incoming dbus messages */
135 DBUS_METHOD( handle_introspect )
136 {
137     VLC_UNUSED(p_this);
138     REPLY_INIT;
139     OUT_ARGUMENTS;
140     ADD_STRING( &psz_introspection_xml );
141     REPLY_SEND;
142 }
143
144 #endif //dbus-introspect.h