blob: 7d4d37a8561be73266b5b54be21d6bde52790955 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
|
//
// Copyright (c) 2013 Ford Motor Company
//
package com.smartdevicelink.proxy.rpc;
import java.util.Hashtable;
import com.smartdevicelink.proxy.RPCNotification;
import com.smartdevicelink.proxy.constants.Names;
import com.smartdevicelink.proxy.rpc.enums.AudioStreamingState;
import com.smartdevicelink.proxy.rpc.enums.HMILevel;
import com.smartdevicelink.proxy.rpc.enums.SystemContext;
import com.smartdevicelink.util.DebugTool;
public class OnHMIStatus extends RPCNotification {
private Boolean firstRun;
public OnHMIStatus() {
super("OnHMIStatus");
}
public OnHMIStatus(Hashtable hash) {
super(hash);
}
public HMILevel getHmiLevel() {
Object obj = parameters.get(Names.hmiLevel);
if (obj instanceof HMILevel) {
return (HMILevel) obj;
} else if (obj instanceof String) {
HMILevel theCode = null;
try {
theCode = HMILevel.valueForString((String) obj);
} catch (Exception e) {
DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + Names.hmiLevel, e);
}
return theCode;
}
return null;
}
public void setHmiLevel( HMILevel hmiLevel ) {
if (hmiLevel != null) {
parameters.put(Names.hmiLevel, hmiLevel );
}
}
public AudioStreamingState getAudioStreamingState() {
Object obj = parameters.get(Names.audioStreamingState);
if (obj instanceof AudioStreamingState) {
return (AudioStreamingState) obj;
} else if (obj instanceof String) {
AudioStreamingState theCode = null;
try {
theCode = AudioStreamingState.valueForString((String) obj);
} catch (Exception e) {
DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + Names.audioStreamingState, e);
}
return theCode;
}
return null;
}
public void setAudioStreamingState( AudioStreamingState audioStreamingState ) {
if (audioStreamingState != null) {
parameters.put(Names.audioStreamingState, audioStreamingState );
}
}
public SystemContext getSystemContext() {
Object obj = parameters.get(Names.systemContext);
if (obj instanceof SystemContext) {
return (SystemContext) obj;
} else if (obj instanceof String) {
SystemContext theCode = null;
try {
theCode = SystemContext.valueForString((String) obj);
} catch (Exception e) {
DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + Names.systemContext, e);
}
return theCode;
}
return null;
}
public void setSystemContext( SystemContext systemContext ) {
if (systemContext != null) {
parameters.put(Names.systemContext, systemContext );
}
}
public Boolean getFirstRun() {
return this.firstRun;
}
public void setFirstRun(Boolean firstRun) {
this.firstRun = firstRun;
}
}
|