1 /*
2  * This file is part of libbluray
3  * Copyright (C) 2010  William Hahne
4  *
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Lesser General Public
7  * License as published by the Free Software Foundation; either
8  * version 2.1 of the License, or (at your option) any later version.
9  *
10  * This library is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13  * Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public
16  * License along with this library. If not, see
17  * <http://www.gnu.org/licenses/>.
18  */
19 
20 package org.dvb.application;
21 
22 import java.util.EventObject;
23 
24 public class AppStateChangeEvent extends EventObject {
AppStateChangeEvent(AppID appid, int fromstate, int tostate, Object source, boolean hasFailed)25     public AppStateChangeEvent(AppID appid, int fromstate, int tostate,
26             Object source, boolean hasFailed) {
27         super(source);
28 
29         this.appid = appid;
30         this.fromstate = fromstate;
31         this.tostate = tostate;
32         this.hasFailed = hasFailed;
33     }
34 
getAppID()35     public AppID getAppID() {
36         return appid;
37     }
38 
getFromState()39     public int getFromState() {
40         return fromstate;
41     }
42 
getToState()43     public int getToState() {
44         return tostate;
45     }
46 
hasFailed()47     public boolean hasFailed() {
48         return hasFailed;
49     }
50 
toString()51     public String toString() {
52         return getClass().getName() + "[source=" + source + ",appid=" + appid + ",fromstate=" + fromstate + ",tostate=" + tostate + ",hasFailed=" + hasFailed + "]";
53     }
54 
55     private final AppID appid;
56     private final int fromstate;
57     private final int tostate;
58     private final boolean hasFailed;
59     private static final long serialVersionUID = -5634352176873439145L;
60 }
61