]> git.sesse.net Git - vlc/blob - modules/gui/skins2/commands/cmd_dvd.cpp
Merge branch 'master' of git@git.videolan.org:vlc
[vlc] / modules / gui / skins2 / commands / cmd_dvd.cpp
1 /*****************************************************************************
2  * cmd_dvd.cpp
3  *****************************************************************************
4  * Copyright (C) 2003 the VideoLAN team
5  * $Id$
6  *
7  * Authors: Olivier Teulière <ipkiss@via.ecp.fr>
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 #include "cmd_dvd.hpp"
25 #include <vlc_input.h>
26
27 void CmdDvdNextTitle::execute()
28 {
29     input_thread_t *p_input =
30         (input_thread_t *)vlc_object_find( getIntf(), VLC_OBJECT_INPUT,
31                                            FIND_ANYWHERE );
32     if( p_input )
33     {
34         vlc_value_t val;
35         val.b_bool = true;
36         var_Set( p_input, "next-title", val );
37         vlc_object_release( p_input );
38     }
39 }
40
41
42 void CmdDvdPreviousTitle::execute()
43 {
44     input_thread_t *p_input =
45         (input_thread_t *)vlc_object_find( getIntf(), VLC_OBJECT_INPUT,
46                                            FIND_ANYWHERE );
47     if( p_input )
48     {
49         vlc_value_t val;
50         val.b_bool = true;
51         var_Set( p_input, "prev-title", val );
52         vlc_object_release( p_input );
53     }
54 }
55
56
57 void CmdDvdNextChapter::execute()
58 {
59     input_thread_t *p_input =
60         (input_thread_t *)vlc_object_find( getIntf(), VLC_OBJECT_INPUT,
61                                            FIND_ANYWHERE );
62     if( p_input )
63     {
64         vlc_value_t val;
65         val.b_bool = true;
66         var_Set( p_input, "next-chapter", val );
67         vlc_object_release( p_input );
68     }
69 }
70
71
72 void CmdDvdPreviousChapter::execute()
73 {
74     input_thread_t *p_input =
75         (input_thread_t *)vlc_object_find( getIntf(), VLC_OBJECT_INPUT,
76                                            FIND_ANYWHERE );
77     if( p_input )
78     {
79         vlc_value_t val;
80         val.b_bool = true;
81         var_Set( p_input, "prev-chapter", val );
82         vlc_object_release( p_input );
83     }
84 }
85
86
87 void CmdDvdRootMenu::execute()
88 {
89     input_thread_t *p_input =
90         (input_thread_t *)vlc_object_find( getIntf(), VLC_OBJECT_INPUT,
91                                            FIND_ANYWHERE );
92     if( p_input )
93     {
94         vlc_value_t val;
95         val.i_int = 2;
96
97         var_Set( p_input, "title  0", val);
98         vlc_object_release( p_input );
99     }
100 }
101