aboutsummaryrefslogtreecommitdiffstats
path: root/src/de/gultsch/chat/entities/Account.java
diff options
context:
space:
mode:
authorDaniel Gultsch <daniel.gultsch@rwth-aachen.de>2014-02-04 15:09:50 +0100
committerDaniel Gultsch <daniel.gultsch@rwth-aachen.de>2014-02-04 15:09:50 +0100
commit0d80d88736926d06e97f22f9ecc63d4fb696751c (patch)
treed61669953ae47a0c96dcc5dc814bc0f49527c547 /src/de/gultsch/chat/entities/Account.java
parent14a171b088363d8e39b547eecc181570c4289428 (diff)
reworked account managment. now status display actually works
Diffstat (limited to 'src/de/gultsch/chat/entities/Account.java')
-rw-r--r--src/de/gultsch/chat/entities/Account.java21
1 files changed, 19 insertions, 2 deletions
diff --git a/src/de/gultsch/chat/entities/Account.java b/src/de/gultsch/chat/entities/Account.java
index 79712b15..3dfb298a 100644
--- a/src/de/gultsch/chat/entities/Account.java
+++ b/src/de/gultsch/chat/entities/Account.java
@@ -18,11 +18,20 @@ public class Account extends AbstractEntity{
public static final int OPTION_USETLS = 0;
+ public static final int STATUS_OFFLINE = 0;
+ public static final int STATUS_ONLINE = 1;
+ public static final int STATUS_UNAUTHORIZED = 2;
+ public static final int STATUS_NOINTERNET = 3;
+ public static final int STATUS_TLS_ERROR = 4;
+ public static final int STATUS_SERVER_NOT_FOUND = 5;
+
protected String username;
protected String server;
protected String password;
protected int options;
protected String rosterVersion;
+ protected String resource;
+ protected int status = 0;
protected boolean online = false;
@@ -70,8 +79,16 @@ public class Account extends AbstractEntity{
this.password = password;
}
- public boolean isOnline() {
- return online;
+ public void setStatus(int status) {
+ this.status = status;
+ }
+
+ public int getStatus() {
+ return this.status;
+ }
+
+ public void setResource(String resource) {
+ this.resource = resource;
}
public String getJid() {