1package im.conversations.android.xmpp.model.axolotl;
2
3import im.conversations.android.annotation.XmlElement;
4import im.conversations.android.xmpp.model.ByteContent;
5import im.conversations.android.xmpp.model.Extension;
6
7@XmlElement
8public class Key extends Extension implements ByteContent {
9
10 public Key() {
11 super(Key.class);
12 }
13
14 public void setIsPreKey(boolean isPreKey) {
15 this.setAttribute("prekey", isPreKey);
16 }
17
18 public boolean isPreKey() {
19 return this.getAttributeAsBoolean("prekey");
20 }
21
22 public void setRemoteDeviceId(final int remoteDeviceId) {
23 this.setAttribute("rid", remoteDeviceId);
24 }
25
26 public Integer getRemoteDeviceId() {
27 return getOptionalIntAttribute("rid").orNull();
28 }
29}