[libbluray-devel] javax.tv.service.selection: add toString() to events

hpi1 git at videolan.org
Wed Apr 13 11:14:27 CEST 2016


libbluray | branch: master | hpi1 <hpi1 at anonymous.org> | Wed Apr 13 11:59:36 2016 +0300| [78f1901c2868905955f7eefd01e4f14024249133] | committer: hpi1

javax.tv.service.selection: add toString() to events

> http://git.videolan.org/gitweb.cgi/libbluray.git/?a=commit;h=78f1901c2868905955f7eefd01e4f14024249133
---

 .../javax/tv/service/selection/PresentationTerminatedEvent.java |    6 +++++-
 .../java/javax/tv/service/selection/SelectionFailedEvent.java   |    7 ++++++-
 2 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/src/libbluray/bdj/java/javax/tv/service/selection/PresentationTerminatedEvent.java b/src/libbluray/bdj/java/javax/tv/service/selection/PresentationTerminatedEvent.java
index 726698c..87ff8dc 100644
--- a/src/libbluray/bdj/java/javax/tv/service/selection/PresentationTerminatedEvent.java
+++ b/src/libbluray/bdj/java/javax/tv/service/selection/PresentationTerminatedEvent.java
@@ -29,6 +29,11 @@ public class PresentationTerminatedEvent extends ServiceContextEvent {
     public int getReason() {
         return reason;
     }
+    public String toString() {
+        return getClass().getName() + "[source=" + source + ",reason=" + reason + "]";
+    }
+
+    private final int reason;
 
     public static final int SERVICE_VANISHED = 1;
     public static final int TUNED_AWAY = 2;
@@ -37,6 +42,5 @@ public class PresentationTerminatedEvent extends ServiceContextEvent {
     public static final int USER_STOP = 5;
     public static final int OTHER = 255;
 
-    private int reason;
     private static final long serialVersionUID = 4787886890628229164L;
 }
diff --git a/src/libbluray/bdj/java/javax/tv/service/selection/SelectionFailedEvent.java b/src/libbluray/bdj/java/javax/tv/service/selection/SelectionFailedEvent.java
index f277903..998e36f 100644
--- a/src/libbluray/bdj/java/javax/tv/service/selection/SelectionFailedEvent.java
+++ b/src/libbluray/bdj/java/javax/tv/service/selection/SelectionFailedEvent.java
@@ -30,6 +30,12 @@ public class SelectionFailedEvent extends ServiceContextEvent {
         return reason;
     }
 
+    public String toString() {
+        return getClass().getName() + "[source=" + source + ",reason=" + reason + "]";
+    }
+
+    private final int reason;
+
     public static final int INTERRUPTED = 1;
     public static final int CA_REFUSAL = 2;
     public static final int CONTENT_NOT_FOUND = 3;
@@ -38,6 +44,5 @@ public class SelectionFailedEvent extends ServiceContextEvent {
     public static final int INSUFFICIENT_RESOURCES = 6;
     public static final int OTHER = 255;
 
-    private int reason;
     private static final long serialVersionUID = 3991728273494160910L;
 }



More information about the libbluray-devel mailing list