aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/adhoc.hrl2
-rw-r--r--include/ejabberd.hrl25
-rw-r--r--include/ejabberd_commands.hrl2
-rw-r--r--include/ejabberd_config.hrl2
-rw-r--r--include/ejabberd_ctl.hrl2
-rw-r--r--include/ejabberd_http.hrl14
-rw-r--r--include/ejabberd_web_admin.hrl2
-rw-r--r--include/eldap.hrl2
-rw-r--r--include/http_bind.hrl2
-rw-r--r--include/jlib.hrl2
-rw-r--r--include/logger.hrl2
-rw-r--r--include/mod_muc_room.hrl20
-rw-r--r--include/mod_privacy.hrl2
-rw-r--r--include/mod_proxy65.hrl2
-rw-r--r--include/mod_roster.hrl2
-rw-r--r--include/ns.hrl2
-rw-r--r--include/pubsub.hrl8
17 files changed, 64 insertions, 29 deletions
diff --git a/include/adhoc.hrl b/include/adhoc.hrl
index f16b188ae..f16aedd3b 100644
--- a/include/adhoc.hrl
+++ b/include/adhoc.hrl
@@ -1,6 +1,6 @@
%%%----------------------------------------------------------------------
%%%
-%%% ejabberd, Copyright (C) 2002-2014 ProcessOne
+%%% ejabberd, Copyright (C) 2002-2015 ProcessOne
%%%
%%% This program is free software; you can redistribute it and/or
%%% modify it under the terms of the GNU General Public License as
diff --git a/include/ejabberd.hrl b/include/ejabberd.hrl
index 67ac763a2..0e5ba1b20 100644
--- a/include/ejabberd.hrl
+++ b/include/ejabberd.hrl
@@ -1,6 +1,6 @@
%%%----------------------------------------------------------------------
%%%
-%%% ejabberd, Copyright (C) 2002-2014 ProcessOne
+%%% ejabberd, Copyright (C) 2002-2015 ProcessOne
%%%
%%% This program is free software; you can redistribute it and/or
%%% modify it under the terms of the GNU General Public License as
@@ -18,8 +18,9 @@
%%%
%%%----------------------------------------------------------------------
-%% This macro returns a string of the ejabberd version running, e.g. "2.3.4"
-%% If the ejabberd application description isn't loaded, returns atom: undefined
+-ifndef(EJABBERD_HRL).
+-define(EJABBERD_HRL, true).
+
-define(VERSION, ejabberd_config:get_version()).
-define(MYHOSTS, ejabberd_config:get_myhosts()).
@@ -49,3 +50,21 @@
-type scram() :: #scram{}.
-define(SCRAM_DEFAULT_ITERATION_COUNT, 4096).
+
+-ifdef(ERL_DEPRECATED_TYPES).
+
+-define(TDICT, dict()).
+-define(TGB_TREE, gb_tree()).
+-define(TGB_SET, gb_set()).
+-define(TQUEUE, queue()).
+
+-else.
+
+-define(TDICT, dict:dict()).
+-define(TGB_TREE, gb_trees:tree()).
+-define(TGB_SET, gb_set:set()).
+-define(TQUEUE, queue:queue()).
+
+-endif.
+
+-endif.
diff --git a/include/ejabberd_commands.hrl b/include/ejabberd_commands.hrl
index 5f35ba9ec..3ab15ca31 100644
--- a/include/ejabberd_commands.hrl
+++ b/include/ejabberd_commands.hrl
@@ -1,6 +1,6 @@
%%%----------------------------------------------------------------------
%%%
-%%% ejabberd, Copyright (C) 2002-2014 ProcessOne
+%%% ejabberd, Copyright (C) 2002-2015 ProcessOne
%%%
%%% This program is free software; you can redistribute it and/or
%%% modify it under the terms of the GNU General Public License as
diff --git a/include/ejabberd_config.hrl b/include/ejabberd_config.hrl
index cbc8a5e69..eb4de2609 100644
--- a/include/ejabberd_config.hrl
+++ b/include/ejabberd_config.hrl
@@ -1,6 +1,6 @@
%%%----------------------------------------------------------------------
%%%
-%%% ejabberd, Copyright (C) 2002-2014 ProcessOne
+%%% ejabberd, Copyright (C) 2002-2015 ProcessOne
%%%
%%% This program is free software; you can redistribute it and/or
%%% modify it under the terms of the GNU General Public License as
diff --git a/include/ejabberd_ctl.hrl b/include/ejabberd_ctl.hrl
index e87dd03c2..8b56ad261 100644
--- a/include/ejabberd_ctl.hrl
+++ b/include/ejabberd_ctl.hrl
@@ -1,6 +1,6 @@
%%%----------------------------------------------------------------------
%%%
-%%% ejabberd, Copyright (C) 2002-2014 ProcessOne
+%%% ejabberd, Copyright (C) 2002-2015 ProcessOne
%%%
%%% This program is free software; you can redistribute it and/or
%%% modify it under the terms of the GNU General Public License as
diff --git a/include/ejabberd_http.hrl b/include/ejabberd_http.hrl
index fd956f08e..50c9d4ad7 100644
--- a/include/ejabberd_http.hrl
+++ b/include/ejabberd_http.hrl
@@ -1,6 +1,6 @@
%%%----------------------------------------------------------------------
%%%
-%%% ejabberd, Copyright (C) 2002-2014 ProcessOne
+%%% ejabberd, Copyright (C) 2002-2015 ProcessOne
%%%
%%% This program is free software; you can redistribute it and/or
%%% modify it under the terms of the GNU General Public License as
@@ -34,3 +34,15 @@
opts = [] :: list(),
headers = [] :: [{atom() | binary(), binary()}]}).
+
+-record(ws,
+ {socket :: inet:socket() | p1_tls:tls_socket(),
+ sockmod = gen_tcp :: gen_tcp | p1_tls,
+ ip :: {inet:ip_address(), inet:port_number()},
+ host = <<"">> :: binary(),
+ port = 5280 :: inet:port_number(),
+ path = [] :: [binary()],
+ headers = [] :: [{atom() | binary(), binary()}],
+ local_path = [] :: [binary()],
+ q = [] :: [{binary() | nokey, binary()}],
+ buf :: binary()}).
diff --git a/include/ejabberd_web_admin.hrl b/include/ejabberd_web_admin.hrl
index cd3c3c0ec..852e537b6 100644
--- a/include/ejabberd_web_admin.hrl
+++ b/include/ejabberd_web_admin.hrl
@@ -1,6 +1,6 @@
%%%----------------------------------------------------------------------
%%%
-%%% ejabberd, Copyright (C) 2002-2014 ProcessOne
+%%% ejabberd, Copyright (C) 2002-2015 ProcessOne
%%%
%%% This program is free software; you can redistribute it and/or
%%% modify it under the terms of the GNU General Public License as
diff --git a/include/eldap.hrl b/include/eldap.hrl
index 2b1676d15..6c30f5456 100644
--- a/include/eldap.hrl
+++ b/include/eldap.hrl
@@ -1,6 +1,6 @@
%%%----------------------------------------------------------------------
%%%
-%%% ejabberd, Copyright (C) 2002-2014 ProcessOne
+%%% ejabberd, Copyright (C) 2002-2015 ProcessOne
%%%
%%% This program is free software; you can redistribute it and/or
%%% modify it under the terms of the GNU General Public License as
diff --git a/include/http_bind.hrl b/include/http_bind.hrl
index a318561cf..446e47105 100644
--- a/include/http_bind.hrl
+++ b/include/http_bind.hrl
@@ -1,6 +1,6 @@
%%%----------------------------------------------------------------------
%%%
-%%% ejabberd, Copyright (C) 2002-2014 ProcessOne
+%%% ejabberd, Copyright (C) 2002-2015 ProcessOne
%%%
%%% This program is free software; you can redistribute it and/or
%%% modify it under the terms of the GNU General Public License as
diff --git a/include/jlib.hrl b/include/jlib.hrl
index a263c1ff2..e4c7ca641 100644
--- a/include/jlib.hrl
+++ b/include/jlib.hrl
@@ -1,6 +1,6 @@
%%%----------------------------------------------------------------------
%%%
-%%% ejabberd, Copyright (C) 2002-2014 ProcessOne
+%%% ejabberd, Copyright (C) 2002-2015 ProcessOne
%%%
%%% This program is free software; you can redistribute it and/or
%%% modify it under the terms of the GNU General Public License as
diff --git a/include/logger.hrl b/include/logger.hrl
index 439567d97..b8fdc31f9 100644
--- a/include/logger.hrl
+++ b/include/logger.hrl
@@ -1,6 +1,6 @@
%%%----------------------------------------------------------------------
%%%
-%%% ejabberd, Copyright (C) 2002-2014 ProcessOne
+%%% ejabberd, Copyright (C) 2002-2015 ProcessOne
%%%
%%% This program is free software; you can redistribute it and/or
%%% modify it under the terms of the GNU General Public License as
diff --git a/include/mod_muc_room.hrl b/include/mod_muc_room.hrl
index c32c47a17..6f170269d 100644
--- a/include/mod_muc_room.hrl
+++ b/include/mod_muc_room.hrl
@@ -1,6 +1,6 @@
%%%----------------------------------------------------------------------
%%%
-%%% ejabberd, Copyright (C) 2002-2014 ProcessOne
+%%% ejabberd, Copyright (C) 2002-2015 ProcessOne
%%%
%%% This program is free software; you can redistribute it and/or
%%% modify it under the terms of the GNU General Public License as
@@ -18,6 +18,8 @@
%%%
%%%----------------------------------------------------------------------
+-include("ejabberd.hrl").
+
-define(MAX_USERS_DEFAULT, 200).
-define(SETS, gb_sets).
@@ -26,7 +28,7 @@
-record(lqueue,
{
- queue :: queue(),
+ queue :: ?TQUEUE,
len :: integer(),
max :: integer()
}).
@@ -58,8 +60,8 @@
voice_request_min_interval = 1800 :: non_neg_integer(),
max_users = ?MAX_USERS_DEFAULT :: non_neg_integer() | none,
logging = false :: boolean(),
- vcard = <<"">> :: boolean(),
- captcha_whitelist = (?SETS):empty() :: gb_set()
+ vcard = <<"">> :: binary(),
+ captcha_whitelist = (?SETS):empty() :: ?TGB_SET
}).
-type config() :: #config{}.
@@ -92,18 +94,18 @@
access = {none,none,none,none} :: {atom(), atom(), atom(), atom()},
jid = #jid{} :: jid(),
config = #config{} :: config(),
- users = (?DICT):new() :: dict(),
+ users = (?DICT):new() :: ?TDICT,
last_voice_request_time = treap:empty() :: treap:treap(),
- robots = (?DICT):new() :: dict(),
- nicks = (?DICT):new() :: dict(),
- affiliations = (?DICT):new() :: dict(),
+ robots = (?DICT):new() :: ?TDICT,
+ nicks = (?DICT):new() :: ?TDICT,
+ affiliations = (?DICT):new() :: ?TDICT,
history :: lqueue(),
subject = <<"">> :: binary(),
subject_author = <<"">> :: binary(),
just_created = false :: boolean(),
activity = treap:empty() :: treap:treap(),
room_shaper = none :: shaper:shaper(),
- room_queue = queue:new() :: queue()
+ room_queue = queue:new() :: ?TQUEUE
}).
-record(muc_online_users, {us = {<<>>, <<>>} :: {binary(), binary()},
diff --git a/include/mod_privacy.hrl b/include/mod_privacy.hrl
index 848de8640..b3dfd4e7c 100644
--- a/include/mod_privacy.hrl
+++ b/include/mod_privacy.hrl
@@ -1,6 +1,6 @@
%%%----------------------------------------------------------------------
%%%
-%%% ejabberd, Copyright (C) 2002-2014 ProcessOne
+%%% ejabberd, Copyright (C) 2002-2015 ProcessOne
%%%
%%% This program is free software; you can redistribute it and/or
%%% modify it under the terms of the GNU General Public License as
diff --git a/include/mod_proxy65.hrl b/include/mod_proxy65.hrl
index 72fd70db2..70181bf82 100644
--- a/include/mod_proxy65.hrl
+++ b/include/mod_proxy65.hrl
@@ -2,7 +2,7 @@
%%% RFC 1928 constants.
%%%
%%%
-%%% ejabberd, Copyright (C) 2002-2014 ProcessOne
+%%% ejabberd, Copyright (C) 2002-2015 ProcessOne
%%%
%%% This program is free software; you can redistribute it and/or
%%% modify it under the terms of the GNU General Public License as
diff --git a/include/mod_roster.hrl b/include/mod_roster.hrl
index c14aa0cf8..ea060a5cb 100644
--- a/include/mod_roster.hrl
+++ b/include/mod_roster.hrl
@@ -1,6 +1,6 @@
%%%----------------------------------------------------------------------
%%%
-%%% ejabberd, Copyright (C) 2002-2014 ProcessOne
+%%% ejabberd, Copyright (C) 2002-2015 ProcessOne
%%%
%%% This program is free software; you can redistribute it and/or
%%% modify it under the terms of the GNU General Public License as
diff --git a/include/ns.hrl b/include/ns.hrl
index 3ec19aca8..a96edc7ab 100644
--- a/include/ns.hrl
+++ b/include/ns.hrl
@@ -1,6 +1,6 @@
%%%----------------------------------------------------------------------
%%%
-%%% ejabberd, Copyright (C) 2002-2014 ProcessOne
+%%% ejabberd, Copyright (C) 2002-2015 ProcessOne
%%%
%%% This program is free software; you can redistribute it and/or
%%% modify it under the terms of the GNU General Public License as
diff --git a/include/pubsub.hrl b/include/pubsub.hrl
index 08f8ea0fe..3be41e3fd 100644
--- a/include/pubsub.hrl
+++ b/include/pubsub.hrl
@@ -13,16 +13,18 @@
%%%
%%%
%%% The Initial Developer of the Original Code is ProcessOne.
-%%% Portions created by ProcessOne are Copyright 2006-2014, ProcessOne
+%%% Portions created by ProcessOne are Copyright 2006-2015, ProcessOne
%%% All Rights Reserved.''
-%%% This software is copyright 2006-2014, ProcessOne.
+%%% This software is copyright 2006-2015, ProcessOne.
%%%
%%%
-%%% copyright 2006-2014 ProcessOne
+%%% copyright 2006-2015 ProcessOne
%%%
%%% This file contains pubsub types definition.
%%% ====================================================================
+-include("ejabberd.hrl").
+
%% -------------------------------
%% Pubsub constants
-define(ERR_EXTENDED(E, C),