Better XML parsing in NvHTTP
Cleans up some unnecessary code in `NvHTTP` and DRY's it up a bit. Adds in a `getAppList` function which returns a list of `NvApp`, a class used to represent applications. This is then used by `getSteamAppId` so it actually opens up Steam instead of whatever the first app is.
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
package com.limelight.nvstream;
|
||||
|
||||
public class NvApp {
|
||||
private String appName;
|
||||
private int appId;
|
||||
private boolean isRunning;
|
||||
|
||||
public void setAppName(String appName) {
|
||||
this.appName = appName;
|
||||
}
|
||||
|
||||
public void setAppId(String appId) {
|
||||
this.appId = Integer.parseInt(appId);
|
||||
}
|
||||
|
||||
public void setIsRunning(String isRunning) {
|
||||
this.isRunning = isRunning.equals("1");
|
||||
}
|
||||
|
||||
public String getAppName() {
|
||||
return this.appName;
|
||||
}
|
||||
|
||||
public int getAppId() {
|
||||
return this.appId;
|
||||
}
|
||||
|
||||
public boolean getIsRunning() {
|
||||
return this.isRunning;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user