aboutsummaryrefslogtreecommitdiffstats
path: root/src/de/gultsch/chat/entities/Account.java
diff options
context:
space:
mode:
authorDaniel Gultsch <daniel.gultsch@rwth-aachen.de>2014-02-02 16:05:15 +0100
committerDaniel Gultsch <daniel.gultsch@rwth-aachen.de>2014-02-02 16:05:15 +0100
commitd365bbe480bdd26a042b425c45227785ab4fbf51 (patch)
tree4389b79b60d89724fd74eebf5674834888e9b436 /src/de/gultsch/chat/entities/Account.java
parent53d9c9997a508985f0e19aba928bfa25c80ba23e (diff)
fetching roster. fixed sending messages as type chat
Diffstat (limited to '')
-rw-r--r--src/de/gultsch/chat/entities/Account.java15
1 files changed, 12 insertions, 3 deletions
diff --git a/src/de/gultsch/chat/entities/Account.java b/src/de/gultsch/chat/entities/Account.java
index 5f95af63..dcb5516a 100644
--- a/src/de/gultsch/chat/entities/Account.java
+++ b/src/de/gultsch/chat/entities/Account.java
@@ -13,10 +13,14 @@ public class Account extends AbstractEntity{
public static final String USERNAME = "username";
public static final String SERVER = "server";
public static final String PASSWORD = "password";
+ public static final String OPTIONS = "options";
+ public static final String ROSTERVERSION = "rosterversion";
protected String username;
protected String server;
protected String password;
+ protected int options;
+ protected String rosterVersion;
protected boolean online = false;
@@ -25,13 +29,15 @@ public class Account extends AbstractEntity{
}
public Account(String username, String server, String password) {
- this(java.util.UUID.randomUUID().toString(),username,server,password);
+ this(java.util.UUID.randomUUID().toString(),username,server,password,0,null);
}
- public Account(String uuid, String username, String server,String password) {
+ public Account(String uuid, String username, String server,String password, int options, String rosterVersion) {
this.uuid = uuid;
this.username = username;
this.server = server;
this.password = password;
+ this.options = options;
+ this.rosterVersion = rosterVersion;
}
public String getUsername() {
@@ -80,7 +86,10 @@ public class Account extends AbstractEntity{
return new Account(cursor.getString(cursor.getColumnIndex(UUID)),
cursor.getString(cursor.getColumnIndex(USERNAME)),
cursor.getString(cursor.getColumnIndex(SERVER)),
- cursor.getString(cursor.getColumnIndex(PASSWORD)));
+ cursor.getString(cursor.getColumnIndex(PASSWORD)),
+ cursor.getInt(cursor.getColumnIndex(OPTIONS)),
+ cursor.getString(cursor.getColumnIndex(ROSTERVERSION))
+ );
}
}