]> git.sesse.net Git - vlc/blob - modules/control/dummy.c
vlc_plugin: fix non-LGPL plugins meta infos
[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 #define VLC_MODULE_LICENSE VLC_LICENSE_GPL_2_PLUS
33 #include <vlc_common.h>
34 #include <vlc_plugin.h>
35 #include <vlc_interface.h>
36
37 #ifdef _WIN32
38 #define QUIET_TEXT N_("Do not open a DOS command box interface")
39 #define QUIET_LONGTEXT N_( \
40     "By default the dummy interface plugin will start a DOS command box. " \
41     "Enabling the quiet mode will not bring this command box but can also " \
42     "be pretty annoying when you want to stop VLC and no video window is " \
43     "open." )
44 #include "intromsg.h"
45 #endif
46
47 static int Open( vlc_object_t * );
48
49 vlc_module_begin ()
50     set_shortname( N_("Dummy") )
51     set_description( N_("Dummy interface") )
52     set_capability( "interface", 0 )
53     set_callbacks( Open, NULL )
54 #if defined(_WIN32) && !VLC_WINSTORE_APP
55     add_bool( "dummy-quiet", false, QUIET_TEXT, QUIET_LONGTEXT, false )
56 #endif
57 vlc_module_end ()
58
59 /*****************************************************************************
60  * Open: initialize dummy interface
61  *****************************************************************************/
62 static int Open( vlc_object_t *p_this )
63 {
64     intf_thread_t *p_intf = (intf_thread_t*) p_this;
65
66 #if defined(_WIN32) && !VLC_WINSTORE_APP
67     bool b_quiet;
68     b_quiet = var_InheritBool( p_intf, "dummy-quiet" );
69     if( !b_quiet )
70         intf_consoleIntroMsg(p_intf);
71 #endif
72
73     msg_Info( p_intf, "using the dummy interface module..." );
74
75     return VLC_SUCCESS;
76 }