]> git.sesse.net Git - vlc/blob - modules/control/dummy.c
e541698c5a4ed4670b67444aabf34f2d67eea26e
[vlc] / modules / control / dummy.c
1 /*****************************************************************************
2  * intf_dummy.c: dummy interface plugin
3  *****************************************************************************
4  * Copyright (C) 2000, 2001 the VideoLAN team
5  * $Id$
6  *
7  * Authors: Samuel Hocevar <sam@zoy.org>
8  *
9  * This program is free software; you can redistribute it and/or modify
10  * it under the terms of the GNU General Public License as published by
11  * the Free Software Foundation; either version 2 of the License, or
12  * (at your option) any later version.
13  *
14  * This program 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
17  * GNU General Public License for more details.
18  *
19  * You should have received a copy of the GNU General Public License
20  * along with this program; if not, write to the Free Software
21  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
22  *****************************************************************************/
23
24 /*****************************************************************************
25  * Preamble
26  *****************************************************************************/
27
28 #ifdef HAVE_CONFIG_H
29 # include "config.h"
30 #endif
31
32 #include <vlc_common.h>
33 #include <vlc_plugin.h>
34 #include <vlc_interface.h>
35
36 #ifdef _WIN32
37 #define QUIET_TEXT N_("Do not open a DOS command box interface")
38 #define QUIET_LONGTEXT N_( \
39     "By default the dummy interface plugin will start a DOS command box. " \
40     "Enabling the quiet mode will not bring this command box but can also " \
41     "be pretty annoying when you want to stop VLC and no video window is " \
42     "open." )
43 #include "intromsg.h"
44 #endif
45
46 static int Open( vlc_object_t * );
47
48 vlc_module_begin ()
49     set_shortname( N_("Dummy") )
50     set_description( N_("Dummy interface") )
51     set_capability( "interface", 0 )
52     set_callbacks( Open, NULL )
53 #if defined(_WIN32) && !VLC_WINSTORE_APP
54     add_bool( "dummy-quiet", false, QUIET_TEXT, QUIET_LONGTEXT, false )
55 #endif
56 vlc_module_end ()
57
58 /*****************************************************************************
59  * Open: initialize dummy interface
60  *****************************************************************************/
61 static int Open( vlc_object_t *p_this )
62 {
63     intf_thread_t *p_intf = (intf_thread_t*) p_this;
64
65 #if defined(_WIN32) && !VLC_WINSTORE_APP
66     bool b_quiet;
67     b_quiet = var_InheritBool( p_intf, "dummy-quiet" );
68     if( !b_quiet )
69         intf_consoleIntroMsg(p_intf);
70 #endif
71
72     msg_Info( p_intf, "using the dummy interface module..." );
73
74     return VLC_SUCCESS;
75 }