aboutsummaryrefslogtreecommitdiff
path: root/xmpp-vala/src/module/roster/flag.vala
diff options
context:
space:
mode:
authorfiaxh <git@mx.ax.lt>2017-03-19 12:55:36 +0100
committerfiaxh <git@mx.ax.lt>2017-03-20 22:28:27 +0100
commitdb57a973534f099af2b150f1a1307d1948553d9f (patch)
tree238ae1d4e53412a33e3febd07318dfd38b0eb2f8 /xmpp-vala/src/module/roster/flag.vala
parent233f2b35d033cd20d1ac648bf2d723bcb7a918fc (diff)
downloaddino-db57a973534f099af2b150f1a1307d1948553d9f.tar.gz
dino-db57a973534f099af2b150f1a1307d1948553d9f.zip
Add typed identity to manager modules and stream flags
Diffstat (limited to 'xmpp-vala/src/module/roster/flag.vala')
-rw-r--r--xmpp-vala/src/module/roster/flag.vala11
1 files changed, 4 insertions, 7 deletions
diff --git a/xmpp-vala/src/module/roster/flag.vala b/xmpp-vala/src/module/roster/flag.vala
index c3e35158..43d185d9 100644
--- a/xmpp-vala/src/module/roster/flag.vala
+++ b/xmpp-vala/src/module/roster/flag.vala
@@ -6,9 +6,11 @@ namespace Xmpp.Roster {
public class Flag : XmppStreamFlag {
public const string ID = "roster";
+ public static FlagIdentity<Flag> IDENTITY = new FlagIdentity<Flag>(NS_URI, ID);
+
public HashMap<string, Item> roster_items = new HashMap<string, Item>();
- internal string? iq_id;
+ public string? iq_id;
public Collection<Item> get_roster() {
return roster_items.values;
@@ -18,13 +20,8 @@ public class Flag : XmppStreamFlag {
return roster_items[jid];
}
- public static Flag? get_flag(XmppStream stream) { return (Flag?) stream.get_flag(NS_URI, ID); }
-
- public static bool has_flag(XmppStream stream) { return get_flag(stream) != null; }
-
public override string get_ns() { return NS_URI; }
-
- public override string get_id() { return ID; }
+ public override string get_id() { return IDENTITY.id; }
}
} \ No newline at end of file