]> git.sesse.net Git - vlc/blob - bindings/java-gcj/JVLC.java
Update svn:ignore to ignore vlc aliases (e.g. cvlc, rvlc, etc).
[vlc] / bindings / java-gcj / JVLC.java
1 /*****************************************************************************
2  * JVLC.java: global class for vlc Java Bindings
3  *****************************************************************************
4  * Copyright (C) 1998-2004 the VideoLAN team
5  *
6  * Authors: Filippo Carone <filippo@carone.org>
7  *
8  * This program is free software; you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License as published by
10  * the Free Software Foundation; either version 2 of the License, or
11  * (at your option) any later version.
12  *
13  * This program is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License
19  * along with this program; if not, write to the Free Software
20  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
21  *****************************************************************************/
22
23 public class JVLC {
24
25     private int id;
26
27     public JVLC(String[] args) {
28         String[] properArgs = new String[args.length + 1];
29         properArgs[0] = "jvlc";
30         for (int i = 0; i < args.length; i++)
31             properArgs[i+1] = args[i];
32
33         this.id = create();
34         init(properArgs);
35     }
36
37     private native int create();
38
39     private native int init(String[] args);
40
41     public native int addInterface(String moduleName, boolean blocking, boolean startPlay);
42
43     public int addInterface(boolean blocking, boolean startPlay) {
44         return addInterface(null, blocking, startPlay);
45     }
46
47     public native String getVersion();
48
49     public native String getError(int errorCode);
50
51     public native int die();
52
53     public native int cleanUp();
54     
55     public native int setVariable(JVLCVariable jvlcVariable);
56
57     public native JVLCVariable getVariable(String varName); // XXX in progress
58
59     public native int addTarget(String URI, String[] options, int insertMode, int position);
60
61     public native int play();
62    
63     public native int pause();
64
65     public native int stop();
66
67     public native boolean isPlaying();
68
69     public native float getPosition();
70
71     public native float setPosition(float position);
72
73     public native int getTime();
74
75     public native int setTime(int seconds, boolean relative);
76
77     public native int getLength();
78
79     public native float speedFaster();
80
81     public native float speedSlower();
82
83     public native int getPlaylistIndex();
84
85     public native int getPlaylistItems();
86
87     public native int playlistNext();
88
89     public native int playlistPrev();
90
91     public native int playlistClear();
92
93     public native int getVolume();
94
95     public native int setVolume(int volume);
96
97     public native int muteVolume();
98
99     public native int fullScreen();
100 }