diff options
author | Daniel Gultsch <daniel@gultsch.de> | 2015-10-29 13:41:08 +0100 |
---|---|---|
committer | Daniel Gultsch <daniel@gultsch.de> | 2015-10-29 13:41:08 +0100 |
commit | c7ff196f58b5576ca1aeb5fd6d51bbe500754f06 (patch) | |
tree | 281e1c922d70d6a85a098f403448965a861f8ab1 /src/main/java/eu/siacs/conversations/entities/Account.java | |
parent | 7410e2023adb2c4535e3301637fa0ecc61e7187c (diff) |
push CN into nick pep node when uploading certificate. subscribe to nick node
Diffstat (limited to '')
-rw-r--r-- | src/main/java/eu/siacs/conversations/entities/Account.java | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/src/main/java/eu/siacs/conversations/entities/Account.java b/src/main/java/eu/siacs/conversations/entities/Account.java index ebfd9805..c5791625 100644 --- a/src/main/java/eu/siacs/conversations/entities/Account.java +++ b/src/main/java/eu/siacs/conversations/entities/Account.java @@ -37,6 +37,7 @@ public class Account extends AbstractEntity { public static final String ROSTERVERSION = "rosterversion"; public static final String KEYS = "keys"; public static final String AVATAR = "avatar"; + public static final String DISPLAY_NAME = "display_name"; public static final String PINNED_MECHANISM_KEY = "pinned_mechanism"; @@ -49,6 +50,14 @@ public class Account extends AbstractEntity { return xmppConnection != null && xmppConnection.getFeatures().httpUpload(); } + public void setDisplayName(String displayName) { + this.displayName = displayName; + } + + public String getDisplayName() { + return displayName; + } + public static enum State { DISABLED, OFFLINE, @@ -124,6 +133,7 @@ public class Account extends AbstractEntity { protected State status = State.OFFLINE; protected JSONObject keys = new JSONObject(); protected String avatar; + protected String displayName = null; protected boolean online = false; private OtrService mOtrService = null; private AxolotlService axolotlService = null; @@ -140,12 +150,12 @@ public class Account extends AbstractEntity { public Account(final Jid jid, final String password) { this(java.util.UUID.randomUUID().toString(), jid, - password, 0, null, "", null); + password, 0, null, "", null, null); } public Account(final String uuid, final Jid jid, final String password, final int options, final String rosterVersion, final String keys, - final String avatar) { + final String avatar, String displayName) { this.uuid = uuid; this.jid = jid; if (jid.isBareJid()) { @@ -160,6 +170,7 @@ public class Account extends AbstractEntity { this.keys = new JSONObject(); } this.avatar = avatar; + this.displayName = displayName; } public static Account fromCursor(final Cursor cursor) { @@ -175,7 +186,8 @@ public class Account extends AbstractEntity { cursor.getInt(cursor.getColumnIndex(OPTIONS)), cursor.getString(cursor.getColumnIndex(ROSTERVERSION)), cursor.getString(cursor.getColumnIndex(KEYS)), - cursor.getString(cursor.getColumnIndex(AVATAR))); + cursor.getString(cursor.getColumnIndex(AVATAR)), + cursor.getString(cursor.getColumnIndex(DISPLAY_NAME))); } public boolean isOptionSet(final int option) { @@ -287,6 +299,7 @@ public class Account extends AbstractEntity { values.put(KEYS, this.keys.toString()); values.put(ROSTERVERSION, rosterVersion); values.put(AVATAR, avatar); + values.put(DISPLAY_NAME, displayName); return values; } |