diff options
author | Christophe Romain <christophe.romain@process-one.net> | 2012-09-11 15:45:59 +0200 |
---|---|---|
committer | Christophe Romain <christophe.romain@process-one.net> | 2012-09-11 15:45:59 +0200 |
commit | 011535f0de1a14d6f5f411035bff9eeafec1c612 (patch) | |
tree | e60951904fbdc14dc126450c4d7515f51188d4b7 /src/mod_roster.hrl | |
parent | Merge branch '2.1.x' into 2.2.x (diff) |
binary refactoring
Diffstat (limited to 'src/mod_roster.hrl')
-rw-r--r-- | src/mod_roster.hrl | 31 |
1 files changed, 20 insertions, 11 deletions
diff --git a/src/mod_roster.hrl b/src/mod_roster.hrl index 7e1acaafb..7c4e582f2 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. |