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:
Aaron Neyer
2013-11-04 03:03:25 -05:00
parent e50f668aaf
commit f179010c7e
2 changed files with 134 additions and 65 deletions
+31
View File
@@ -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;
}
}