]> git.sesse.net Git - vlc/blob - modules/gui/beos/VlcWrapper.h
Some clean-up. Playlist works again.
[vlc] / modules / gui / beos / VlcWrapper.h
1 /*****************************************************************************
2  * intf_vlc_wrapper.h: BeOS plugin for vlc (derived from MacOS X port )
3  *****************************************************************************
4  * Copyright (C) 2001 VideoLAN
5  * $Id: VlcWrapper.h,v 1.3 2002/10/10 23:11:52 titer Exp $
6  *
7  * Authors: Florian G. Pflug <fgp@phlo.org>
8  *          Jon Lech Johansen <jon-vl@nanocrew.net>
9  *          Tony Casltey <tony@castley.net>
10  *          Stephan Aßmus <stippi@yellowbites.com>
11  *
12  * This program is free software; you can redistribute it and/or modify
13  * it under the terms of the GNU General Public License as published by
14  * the Free Software Foundation; either version 2 of the License, or
15  * (at your option) any later version.
16  * 
17  * This program is distributed in the hope that it will be useful,
18  * but WITHOUT ANY WARRANTY; without even the implied warranty of
19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
20  * GNU General Public License for more details.
21  *
22  * You should have received a copy of the GNU General Public License
23  * along with this program; if not, write to the Free Software
24  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
25  *****************************************************************************/
26 class InterfaceWindow;
27 class Intf_VLCWrapper;
28
29 /*****************************************************************************
30  * intf_sys_t: description and status of FB interface
31  *****************************************************************************/
32 struct intf_sys_t
33 {
34     InterfaceWindow * p_window;
35     char              i_key;
36     
37     input_thread_t *  p_input;
38     playlist_t *      p_playlist;
39     aout_instance_t * p_aout;
40     
41     /* DVD mode */
42     vlc_bool_t        b_disabled_menus;
43     vlc_bool_t        b_loop;
44     vlc_bool_t        b_mute;
45     int               i_part;
46     int               i_saved_volume;
47     int               i_channel;
48     
49     Intf_VLCWrapper * p_vlc_wrapper;
50 };
51
52 /* Intf_VLCWrapper is a singleton class
53     (only one instance at any time) */
54 class Intf_VLCWrapper
55 {
56 public:
57     static Intf_VLCWrapper *getVLCWrapper(intf_thread_t *p_if);
58     ~Intf_VLCWrapper();
59     
60     /* static bool manage(); */
61     void quit();
62     int inputGetStatus();
63     
64     /* playlist control */
65     bool playlistPlay();
66     void playlistPause();
67     void playlistStop();
68     void playlistNext();
69     void playlistPrev();
70     /* void playlistJumpTo( int pos );
71     int playlistCurrentPos();
72     int playlistSize();
73         playlistLock();
74         playlistUnlock();*/
75         void playlistSkip(int i);
76     void playlistGoto(int i);
77
78 /*  Playback Modes
79                 PLAYLIST_REPEAT_CURRENT
80                 PLAYLIST_FORWARD       
81                 PLAYLIST_BACKWARD      
82                 PLAYLIST_FORWARD_LOOP  
83                 PLAYLIST_BACKWARD_LOOP 
84                 PLAYLIST_RANDOM        
85                 PLAYLIST_REVERSE_RANDOM
86 */
87
88     void getNavCapabilities( bool* canSkipPrev,
89                                                                 bool* canSkipNext );
90         void    navigatePrev();
91         void    navigateNext();
92
93 //    void channelNext();
94 //    void channelPrev();
95 //    void loop();
96
97     /*  Stream Control */
98     void playSlower();
99     void playFaster();
100     
101     /* playback control */
102     void volume_mute();
103     void volume_restore();
104     void set_volume(int value);
105     void toggle_mute( );
106     bool is_muted();
107     bool is_playing();
108     void maxvolume();
109     bool has_audio();
110 //    void fullscreen();
111     void eject();
112     
113     int getStatus();    
114     void setStatus(int status);
115     void inputSeek();
116
117     /* playback info */
118     BString* getTimeAsString();
119     float  getTimeAsFloat();
120     void   setTimeAsFloat( float i_offset );
121     bool   playlistPlaying();
122     BList* playlistAsArray();
123
124     /* open file/disc/network */
125     void openFiles( BList *o_files, bool replace = true );
126     void openDisc( BString o_type, BString o_device,
127                                           int i_title, int i_chapter );
128     void openNet( BString o_addr, int i_port );
129     void openNetChannel( BString o_addr, int i_port );
130     void openNetHTTP( BString o_addr );
131
132     /* menus management */
133     void toggleProgram( int i_program );
134     void toggleTitle( int i_title );
135     void toggleChapter( int i_chapter );
136     void toggleLanguage( int i_language );
137     void toggleSubtitle( int i_subtitle );
138     void channelNext();
139     void channelPrev();
140     void setupMenus();
141     
142     void playlistJumpTo( int );
143     int  playlistSize();
144     int  playlistCurrentPos();
145     void playlistLock();
146     void playlistUnlock();
147     void loop(); 
148     
149 //private:
150     Intf_VLCWrapper( intf_thread_t *p_intf );
151     es_descriptor_t *  p_audio_es;
152     intf_thread_t *p_intf;
153 };
154