]> git.sesse.net Git - vlc/blob - bindings/java/org/videolan/jvlc/Playlist.java
Java classes for Java bindings added
[vlc] / bindings / java / org / videolan / jvlc / Playlist.java
1 /*
2  * Created on 28-feb-2006
3  *
4  * $Id$
5  *
6  * This program is free software; you can redistribute it
7  * and/or modify it under the terms of the GNU General Public License
8  * as published by the Free Software Foundation; either version 2 of the
9  * License, or (at your option) any later version.
10  * 
11  * This program is distributed in the hope that it will be useful, but
12  * WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14  * General Public License for more details.
15  * 
16  * You should have received a copy of the GNU General Public
17  * License along with this program; if not, write to the Free Software
18  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
19  * 
20  */
21 /**
22  * @author Filippo Carone <filippo@carone.org>
23  */
24
25 package org.videolan.jvlc;
26
27 public class Playlist implements PlaylistIntf {
28     
29     
30     private long libvlcInstance;
31
32     public Playlist(long _libvlcInstance) {
33         this.libvlcInstance = _libvlcInstance;
34     }
35     
36     native private int _playlist_add(String uri, String name);
37     native private void _play(int _id, String[] options);
38     native private void _pause();
39     native private void _stop();
40     native private void _next();
41     native private void _prev();
42     native private void _clear();
43     
44     native private int _itemsCount();
45     native private int _isPlaying();
46
47     public void play(int id, String[] options) {
48         _play(id, options);
49     }
50
51
52     public void pause() {
53         _pause();
54     }
55
56     public void stop() {
57         _stop();
58
59     }
60
61     public boolean isPlaying() {
62         return (_isPlaying() == 1)? false : true ;
63     }
64
65     public int itemsCount() {
66         return _itemsCount();
67     }
68
69     public void next() {
70         _next();
71     }
72
73     public void prev() {
74         _prev();
75     }
76
77     public void clear() {
78         _clear();
79     }
80
81     public int add(String uri, String name) {
82         return _playlist_add(uri, name);
83     }
84
85     public void addExtended() {
86         // TODO Auto-generated method stub
87     }
88
89     public long getInstance() {
90         return libvlcInstance;
91     }
92
93     
94     
95 }