libbluray | branch: master | hpi1 <[email protected]> | Fri Sep 14 13:00:19 2012 +0300| [f7057f4496a7a973f567eca296ff1840eb48b155] | committer: hpi1
Updated DiscManager (merge from dslibbluray) > http://git.videolan.org/gitweb.cgi/libbluray.git/?a=commit;h=f7057f4496a7a973f567eca296ff1840eb48b155 --- src/libbluray/bdj/java/org/bluray/ti/DiscImpl.java | 31 ++++++++++++++++++++ .../bdj/java/org/bluray/ti/DiscManager.java | 17 +++++++---- 2 files changed, 42 insertions(+), 6 deletions(-) diff --git a/src/libbluray/bdj/java/org/bluray/ti/DiscImpl.java b/src/libbluray/bdj/java/org/bluray/ti/DiscImpl.java new file mode 100644 index 0000000..cf5bf3c --- /dev/null +++ b/src/libbluray/bdj/java/org/bluray/ti/DiscImpl.java @@ -0,0 +1,31 @@ +/* + * This file is part of libbluray + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. If not, see + * <http://www.gnu.org/licenses/>. + */ + +package org.bluray.ti; + +public class DiscImpl implements Disc { + DiscImpl(String id) { + this.id = id; + } + + public String getId() { + return id; + } + + private String id; +} diff --git a/src/libbluray/bdj/java/org/bluray/ti/DiscManager.java b/src/libbluray/bdj/java/org/bluray/ti/DiscManager.java index 21992b2..45e7826 100644 --- a/src/libbluray/bdj/java/org/bluray/ti/DiscManager.java +++ b/src/libbluray/bdj/java/org/bluray/ti/DiscManager.java @@ -21,7 +21,9 @@ package org.bluray.ti; public class DiscManager { public static synchronized DiscManager getDiscManager() { - throw new Error("Not implemented"); + if (instance == null) + instance = new DiscManager(); + return instance; } public void expectNextDisc(String[] discIds) { @@ -29,11 +31,7 @@ public class DiscManager { } public Disc getCurrentDisc() { - throw new Error("Not implemented"); - } - - public static void notifyDiscChange(int num) { - throw new Error("Not implemented"); + return disc; } public void addDiscStatusEventListener(DiscStatusListener listener) { @@ -43,4 +41,11 @@ public class DiscManager { public void removeDiscStatusEventListener(DiscStatusListener listener) { throw new Error("Not implemented"); } + + public void setCurrentDisc(String id) { + disc = new DiscImpl(id); + } + + private static DiscManager instance; + private DiscImpl disc = null; } _______________________________________________ libbluray-devel mailing list [email protected] http://mailman.videolan.org/listinfo/libbluray-devel
