From 9deb294328bb3f9eb6bd2c0e7cd500732e9b5830 Mon Sep 17 00:00:00 2001 From: Badlop Date: Thu, 14 Mar 2013 10:33:02 +0100 Subject: Accumulated patch to binarize and indent code --- src/mod_privacy.hrl | 35 +++++++++++++++++++++-------------- 1 file changed, 21 insertions(+), 14 deletions(-) (limited to 'src/mod_privacy.hrl') diff --git a/src/mod_privacy.hrl b/src/mod_privacy.hrl index 63abc6925..f70982b0f 100644 --- a/src/mod_privacy.hrl +++ b/src/mod_privacy.hrl @@ -19,19 +19,26 @@ %%% %%%---------------------------------------------------------------------- --record(privacy, {us, - default = none, - lists = []}). +-record(privacy, {us = {<<"">>, <<"">>} :: {binary(), binary()}, + default = none :: none | binary(), + lists = [] :: [{binary(), [listitem()]}]}). --record(listitem, {type = none, - value = none, - action, - order, - match_all = false, - match_iq = false, - match_message = false, - match_presence_in = false, - match_presence_out = false - }). +-record(listitem, {type = none :: none | jid | group | subscription, + value = none :: none | both | from | to | ljid() | binary(), + action = allow :: allow | deny, + order = 0 :: integer(), + match_all = false :: boolean(), + match_iq = false :: boolean(), + match_message = false :: boolean(), + match_presence_in = false :: boolean(), + match_presence_out = false :: boolean()}). --record(userlist, {name = none, list = [], needdb = false }). +-type listitem() :: #listitem{}. + +-record(userlist, {name = none :: none | binary(), + list = [] :: [listitem()], + needdb = false :: boolean()}). + +-type userlist() :: #userlist{}. + +-export_type([userlist/0]). -- cgit v1.2.3