[vlc-commits] dbus: move static const tables in the C file
Rafaël Carré
git at videolan.org
Mon Aug 8 02:08:43 CEST 2011
vlc | branch: master | Rafaël Carré <rafael.carre at gmail.com> | Sun Aug 7 20:05:27 2011 -0400| [0870d7c0540c29a7526bce4a28338e71acb78d63] | committer: Rafaël Carré
dbus: move static const tables in the C file
remove useless prototype
inline vlc identity in the only use case
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=0870d7c0540c29a7526bce4a28338e71acb78d63
---
modules/control/dbus/dbus_root.c | 33 ++++++++++++++++++++++++++++++++-
modules/control/dbus/dbus_root.h | 35 -----------------------------------
2 files changed, 32 insertions(+), 36 deletions(-)
diff --git a/modules/control/dbus/dbus_root.c b/modules/control/dbus/dbus_root.c
index 579d556..268a212 100644
--- a/modules/control/dbus/dbus_root.c
+++ b/modules/control/dbus/dbus_root.c
@@ -37,13 +37,44 @@
#include "dbus_root.h"
#include "dbus_common.h"
+static const char* ppsz_supported_uri_schemes[] = {
+ "file", "http", "https", "rtsp", "realrtsp", "pnm", "ftp", "mtp", "smb",
+ "mms", "mmsu", "mmst", "mmsh", "unsv", "itpc", "icyx", "rtmp", "rtp",
+ "dccp", "dvd", "vcd", "vcdx"
+};
+
+static const char* ppsz_supported_mime_types[] = {
+ "audio/mpeg", "audio/x-mpeg",
+ "video/mpeg", "video/x-mpeg",
+ "video/mpeg-system", "video/x-mpeg-system",
+ "video/mp4",
+ "audio/mp4",
+ "video/x-msvideo",
+ "video/quicktime",
+ "application/ogg", "application/x-ogg",
+ "video/x-ms-asf", "video/x-ms-asf-plugin",
+ "application/x-mplayer2",
+ "video/x-ms-wmv",
+ "video/x-google-vlc-plugin",
+ "audio/wav", "audio/x-wav",
+ "audio/3gpp",
+ "video/3gpp",
+ "audio/3gpp2",
+ "video/3gpp2",
+ "video/divx",
+ "video/flv", "video/x-flv",
+ "video/x-matroska",
+ "audio/x-matroska",
+ "application/xspf+xml"
+};
+
DBUS_METHOD( Identity )
{
VLC_UNUSED(p_this);
REPLY_INIT;
OUT_ARGUMENTS;
- char *psz_identity = VLC_IDENTITY;
+ const char *psz_identity = _("VLC media player");
DBusMessageIter v;
dbus_message_iter_open_container( &args, DBUS_TYPE_VARIANT, "s", &v );
diff --git a/modules/control/dbus/dbus_root.h b/modules/control/dbus/dbus_root.h
index c23772f..c076b3e 100644
--- a/modules/control/dbus/dbus_root.h
+++ b/modules/control/dbus/dbus_root.h
@@ -29,8 +29,6 @@
#include "dbus_common.h"
-#define VLC_IDENTITY _("VLC media player")
-
/* DBUS IDENTIFIERS */
#define DBUS_MPRIS_ROOT_INTERFACE "org.mpris.MediaPlayer2"
@@ -39,37 +37,4 @@ DBusHandlerResult handle_root ( DBusConnection *p_conn,
DBusMessage *p_from,
void *p_this );
-static const char* ppsz_supported_uri_schemes[] = {
- "file", "http", "https", "rtsp", "realrtsp", "pnm", "ftp", "mtp", "smb",
- "mms", "mmsu", "mmst", "mmsh", "unsv", "itpc", "icyx", "rtmp", "rtp",
- "dccp", "dvd", "vcd", "vcdx"
-};
-
-static const char* ppsz_supported_mime_types[] = {
- "audio/mpeg", "audio/x-mpeg",
- "video/mpeg", "video/x-mpeg",
- "video/mpeg-system", "video/x-mpeg-system",
- "video/mp4",
- "audio/mp4",
- "video/x-msvideo",
- "video/quicktime",
- "application/ogg", "application/x-ogg",
- "video/x-ms-asf", "video/x-ms-asf-plugin",
- "application/x-mplayer2",
- "video/x-ms-wmv",
- "video/x-google-vlc-plugin",
- "audio/wav", "audio/x-wav",
- "audio/3gpp",
- "video/3gpp",
- "audio/3gpp2",
- "video/3gpp2",
- "video/divx",
- "video/flv", "video/x-flv",
- "video/x-matroska",
- "audio/x-matroska",
- "application/xspf+xml"
-};
-
-void UpdateRootCaps( intf_thread_t *p_intf );
-
#endif //dbus-root.h
More information about the vlc-commits
mailing list