2015-03-21 18:18:07 +01:00
|
|
|
package nodomain.freeyourgadget.gadgetbridge;
|
|
|
|
|
|
|
|
public class GBDevice {
|
2015-03-22 00:34:54 +01:00
|
|
|
private boolean isConnected = false;
|
2015-03-21 18:18:07 +01:00
|
|
|
private final String name;
|
|
|
|
private final String address;
|
2015-03-22 00:34:54 +01:00
|
|
|
private String firmwareVersion;
|
2015-03-21 18:18:07 +01:00
|
|
|
|
|
|
|
public GBDevice(String address, String name) {
|
|
|
|
this.address = address;
|
|
|
|
this.name = name;
|
|
|
|
}
|
|
|
|
|
2015-03-22 00:34:54 +01:00
|
|
|
public void setFirmwareVersion(String firmwareVersion) {
|
|
|
|
this.firmwareVersion = firmwareVersion;
|
|
|
|
}
|
|
|
|
|
2015-03-21 18:18:07 +01:00
|
|
|
public String getName() {
|
|
|
|
return name;
|
|
|
|
}
|
|
|
|
|
|
|
|
public String getAddress() {
|
|
|
|
return address;
|
|
|
|
}
|
|
|
|
|
|
|
|
public String getStatus() {
|
2015-03-22 00:34:54 +01:00
|
|
|
if (firmwareVersion != null) {
|
|
|
|
return "Firmware Version: " + firmwareVersion;
|
|
|
|
} else {
|
|
|
|
return null;
|
|
|
|
}
|
2015-03-21 18:18:07 +01:00
|
|
|
}
|
|
|
|
}
|