aboutsummaryrefslogtreecommitdiff
path: root/src/mod_roster.hrl
diff options
context:
space:
mode:
Diffstat (limited to 'src/mod_roster.hrl')
-rw-r--r--src/mod_roster.hrl31
1 files changed, 20 insertions, 11 deletions
diff --git a/src/mod_roster.hrl b/src/mod_roster.hrl
index 2fc2c76c0..4751eec38 100644
--- a/src/mod_roster.hrl
+++ b/src/mod_roster.hrl
@@ -19,15 +19,24 @@
%%%
%%%----------------------------------------------------------------------
--record(roster, {usj,
- us,
- jid,
- name = "",
- subscription = none,
- ask = none,
- groups = [],
- askmessage = [],
- xs = []}).
+-record(roster,
+{
+ usj = {<<>>, <<>>, {<<>>, <<>>, <<>>}} :: {binary(), binary(), ljid()} | '_',
+ us = {<<>>, <<>>} :: {binary(), binary()} | '_',
+ jid = {<<>>, <<>>, <<>>} :: ljid(),
+ name = <<>> :: binary() | '_',
+ subscription = none :: subscription() | '_',
+ ask = none :: ask() | '_',
+ groups = [] :: [binary()] | '_',
+ askmessage = <<"">> :: binary() | '_',
+ xs = [] :: [xmlel()] | '_'
+}).
--record(roster_version, {us,
- version}).
+-record(roster_version,
+{
+ us = {<<>>, <<>>} :: {binary(), binary()},
+ version = <<>> :: binary()
+}).
+
+-type ask() :: none | in | out | both | subscribe | unsubscribe.
+-type subscription() :: none | both | from | to | remove.