]> git.sesse.net Git - vlc/commitdiff
Move intf_EJect() out of core
authorRémi Denis-Courmont <remi@remlab.net>
Fri, 25 Nov 2011 14:41:22 +0000 (16:41 +0200)
committerRémi Denis-Courmont <remi@remlab.net>
Fri, 25 Nov 2011 15:21:19 +0000 (17:21 +0200)
include/vlc_interface.h
modules/gui/Modules.am
modules/gui/eject.c [moved from src/interface/intf_eject.c with 93% similarity]
modules/gui/ncurses.c
modules/gui/qt4/components/open_panels.cpp
po/POTFILES.in
src/Makefile.am
src/libvlccore.sym

index 2e02f6baa604a903f50ffda753df8ba00758c1bb..da3c5bd11af470cc86e5321ad6dd24212b19925d 100644 (file)
@@ -102,9 +102,6 @@ struct intf_dialog_args_t
 VLC_API int intf_Create( vlc_object_t *, const char * );
 #define intf_Create(a,b) intf_Create(VLC_OBJECT(a),b)
 
-VLC_API int intf_Eject( vlc_object_t *, const char * );
-#define intf_Eject(a,b) intf_Eject(VLC_OBJECT(a),b)
-
 VLC_API void libvlc_Quit( libvlc_int_t * );
 
 /*@}*/
index 5711e1a2b1b7aa07d60d16bc3850b3757bdb32ae..94b680552ba0ab8be7af8b2dcf4288fdc7a01011 100644 (file)
@@ -16,3 +16,4 @@ endif
 
 SOURCES_ncurses = ncurses.c
 SOURCES_fbosd = fbosd.c
+EXTRA_DIST += eject.c
similarity index 93%
rename from src/interface/intf_eject.c
rename to modules/gui/eject.c
index 3afd0e881990e28d556bb2612f5f5d33e1112499..8e9ffb9ab3f30f4c240a35e6d910fda5a5d15680 100644 (file)
@@ -1,8 +1,7 @@
 /*****************************************************************************
- * intf_eject.c: CD/DVD-ROM ejection handling functions
+ * eject.c: CD/DVD-ROM ejection handling functions
  *****************************************************************************
- * Copyright (C) 2001-2004 the VideoLAN team
- * $Id$
+ * Copyright (C) 2001-2011 the VideoLAN team
  *
  * Authors: Julien Blache <jb@technologeek.org> for the Linux part
  *                with code taken from the Linux "eject" command
  *  This file contain functions to eject CD and DVD drives
  */
 
-#ifdef HAVE_CONFIG_H
+/*#ifdef HAVE_CONFIG_H
 # include "config.h"
-#endif
+#endif*/
 
 #include <vlc_common.h>
 #include <vlc_fs.h>
-#include <vlc_interface.h>
 
 #if defined( WIN32 ) && !defined( UNDER_CE )
 #   include <mmsystem.h>
@@ -115,13 +113,12 @@ static int EjectSCSI( int i_fd )
 
 #undef intf_Eject
 /**
- * \brief Ejects the CD /DVD
- * \ingroup vlc_interface
+ * Ejects the optical disc in a device
  * \param p_this the calling vlc_object_t
  * \param psz_device the CD/DVD to eject
- * \return 0 on success, 1 on failure, -1 if not implemented
+ * \return VLC_SUCCESS or VLC_EGENERIC
  */
-int intf_Eject( vlc_object_t *p_this, const char *psz_device )
+static int intf_Eject( vlc_object_t *p_this, const char *psz_device )
 {
     VLC_UNUSED(p_this);
 
@@ -179,3 +176,5 @@ int intf_Eject( vlc_object_t *p_this, const char *psz_device )
     return VLC_EGENERIC;
 #endif
 }
+
+#define intf_Eject(o, p) intf_Eject(VLC_OBJECT(o), p)
index 7a844aa053884661166d253fc57c12f26c0f7bae..f2802fe7a11099020340d3798e5507b9275b0e17 100644 (file)
@@ -85,6 +85,8 @@ vlc_module_begin ()
     add_directory("browse-dir", NULL, BROWSE_TEXT, BROWSE_LONGTEXT, false)
 vlc_module_end ()
 
+#include "eject.c"
+
 /*****************************************************************************
  * intf_sys_t: description and status of ncurses interface
  *****************************************************************************/
index 5866a05b79c18f125cc6f8061c57c2e00a1f6958..8ac5b755c128b3a673e076568e11835324c33a01 100644 (file)
@@ -57,6 +57,8 @@
     I_DIR_OR_FOLDER( N_("Select a device or a VIDEO_TS directory"), \
                      N_("Select a device or a VIDEO_TS folder") )
 
+#include "../../eject.c"
+
 /* Populate a combobox with the devices matching a pattern.
    Combobox will automatically do autocompletion on the edit zone */
 #define POPULATE_WITH_DEVS(ppsz_devlist, targetCombo) \
index c82ac26cc230bf69a923b2271b02b2dacffd18da..8e869820d7fcb973c3a5fa188ce9c969875f77fb 100644 (file)
@@ -105,7 +105,6 @@ src/input/vlm.c
 src/input/vlm_internal.h
 src/input/vlmshell.c
 src/interface/interface.c
-src/interface/intf_eject.c
 src/libvlc.c
 src/libvlc.h
 src/libvlc-module.c
index e93961db7dc18ae02af2473031d645ce468246ca..84ed6764c0ed9c04fe5492aa40ce3e4d7f9708cc 100644 (file)
@@ -304,7 +304,6 @@ SOURCES_libvlc_common = \
        version.c \
        interface/dialog.c \
        interface/interface.c \
-       interface/intf_eject.c \
        playlist/playlist_internal.h \
        playlist/art.c \
        playlist/art.h \
index 2bcdfbaca1db3aa6870d9f312c78ec581e52f445..7538bf26bbb081e4274339f954da22a9690b00e3 100644 (file)
@@ -230,7 +230,6 @@ input_Stop
 input_vaControl
 input_Close
 intf_Create
-intf_Eject
 IsUTF8
 libvlc_InternalAddIntf
 libvlc_InternalCleanup