summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBadlop <badlop@process-one.net>2008-07-13 19:10:01 +0000
committerBadlop <badlop@process-one.net>2008-07-13 19:10:01 +0000
commitf25316c1e757047e5f535bdf7093943d9c45b15b (patch)
treec74e292185b3fcfc5b5efafe008033951dbca167 /src
parentInstall ejabberdctl in /sbin as usual because it is a daemon, not a user prog... (diff)
* src/configure.ac: Update installation permissions (EJAB-402)
* src/configure: Likewise * src/Makefile.in: The mnesia, ebin and priv dirs are now installed in different locations. Install header files and documentation (EJAB-696) * doc/guide.tex: Likewise * doc/guide.html: Likewise * include/*.hrl: Place for all ejabberd header files (EJAB-696) * src/*/*.erl: Update references to header files * src/*/Makefile.in: Include the include/ dir SVN Revision: 1441
Diffstat (limited to 'src')
-rw-r--r--src/Makefile.in149
-rw-r--r--src/adhoc.hrl36
-rwxr-xr-xsrc/configure84
-rw-r--r--src/configure.ac2
-rw-r--r--src/ejabberd.hrl61
-rw-r--r--src/ejabberd_auth_ldap.erl2
-rw-r--r--src/ejabberd_config.hrl28
-rw-r--r--src/ejabberd_ctl.hrl25
-rw-r--r--src/ejabberd_zlib/Makefile.in3
-rw-r--r--src/ejabberdctl.template58
-rw-r--r--src/eldap/Makefile.in3
-rw-r--r--src/eldap/eldap.hrl35
-rw-r--r--src/jlib.hrl308
-rw-r--r--src/mod_irc/Makefile.in4
-rw-r--r--src/mod_muc/Makefile.in4
-rw-r--r--src/mod_offline.erl4
-rw-r--r--src/mod_offline_odbc.erl4
-rw-r--r--src/mod_privacy.hrl37
-rw-r--r--src/mod_proxy65/Makefile.in4
-rw-r--r--src/mod_proxy65/mod_proxy65.hrl61
-rw-r--r--src/mod_proxy65/mod_proxy65_service.erl4
-rw-r--r--src/mod_proxy65/mod_proxy65_stream.erl2
-rw-r--r--src/mod_pubsub/Makefile.in4
-rw-r--r--src/mod_pubsub/pubsub.hrl131
-rw-r--r--src/mod_roster.erl4
-rw-r--r--src/mod_roster.hrl31
-rw-r--r--src/mod_roster_odbc.erl4
-rw-r--r--src/mod_shared_roster.erl4
-rw-r--r--src/mod_vcard_ldap.erl2
-rw-r--r--src/odbc/Makefile.in4
-rw-r--r--src/pam/Makefile.in4
-rw-r--r--src/tls/Makefile.in4
-rw-r--r--src/web/Makefile.in6
-rw-r--r--src/web/ejabberd_http.hrl30
-rw-r--r--src/web/ejabberd_web_admin.hrl52
35 files changed, 254 insertions, 944 deletions
diff --git a/src/Makefile.in b/src/Makefile.in
index 6cb06c92..302294b8 100644
--- a/src/Makefile.in
+++ b/src/Makefile.in
@@ -12,32 +12,34 @@ ERLANG_CFLAGS= @ERLANG_CFLAGS@
EXPAT_LIBS = @EXPAT_LIBS@
ERLANG_LIBS = @ERLANG_LIBS@
-ERLC_FLAGS += @ERLANG_SSL39@
-
ASN_FLAGS = -bber_bin +der +compact_bit_string +optimize +noobj
+
+EFLAGS += @ERLANG_SSL39@
+EFLAGS += -I ../include
+
# make debug=true to compile Erlang module with debug informations.
ifdef debug
- ERLC_FLAGS+=+debug_info
+ EFLAGS+=+debug_info
endif
ifdef ejabberd_debug
- ERLC_FLAGS+=-Dejabberd_debug
+ EFLAGS+=-Dejabberd_debug
endif
ifeq (@hipe@, true)
- ERLC_FLAGS+=+native
+ EFLAGS+=+native
endif
ifeq (@roster_gateway_workaround@, true)
- ERLC_FLAGS+=-DROSTER_GATEWAY_WORKAROUND
+ EFLAGS+=-DROSTER_GATEWAY_WORKAROUND
endif
ifeq (@full_xml@, true)
- ERLC_FLAGS+=-DFULL_XML_SUPPORT
+ EFLAGS+=-DFULL_XML_SUPPORT
endif
ifeq (@transient_supervisors@, false)
- ERLC_FLAGS+=-DNO_TRANSIENT_SUPERVISORS
+ EFLAGS+=-DNO_TRANSIENT_SUPERVISORS
endif
INSTALL_EPAM=
@@ -58,17 +60,46 @@ BEAMS = $(SOURCES:.erl=.beam)
DESTDIR =
-EJABBERDDIR = $(DESTDIR)@localstatedir@/lib/ejabberd
+# /etc/ejabberd/
+ETCDIR = $(DESTDIR)@sysconfdir@/ejabberd
+
+# /sbin/
+SBINDIR = $(DESTDIR)@sbindir@
+
+# /lib/ejabberd/
+EJABBERDDIR = $(DESTDIR)@libdir@/ejabberd
+
+# /share/doc/ejabberd
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+DATAROOTDIR = @datarootdir@
+DOCDIR = @docdir@
+
+# /usr/lib/ejabberd/ebin/
BEAMDIR = $(EJABBERDDIR)/ebin
-SPOOLDIR = $(EJABBERDDIR)/db
+
+# /usr/lib/ejabberd/include/
+INCLUDEDIR = $(EJABBERDDIR)/include
+
+# /usr/lib/ejabberd/priv/
PRIVDIR = $(EJABBERDDIR)/priv
-COOKIEFILE = $(EJABBERDDIR)/.erlang.cookie
-SODIR = $(PRIVDIR)/lib
+
+# /usr/lib/ejabberd/priv/bin
PBINDIR = $(PRIVDIR)/bin
+
+# /usr/lib/ejabberd/priv/lib
+SODIR = $(PRIVDIR)/lib
+
+# /usr/lib/ejabberd/priv/msgs
MSGSDIR = $(PRIVDIR)/msgs
+
+# /var/lib/ejabberd/
+SPOOLDIR = $(DESTDIR)@localstatedir@/lib/ejabberd
+
+# /var/lib/ejabberd/.erlang.cookie
+COOKIEFILE = $(SPOOLDIR)/.erlang.cookie
+
+# /var/log/ejabberd/
LOGDIR = $(DESTDIR)@localstatedir@/log/ejabberd
-ETCDIR = $(DESTDIR)@sysconfdir@/ejabberd
-SBINDIR = $(DESTDIR)@sbindir@
ifeq ($(shell uname),Darwin)
DYNAMIC_LIB_CFLAGS = -fPIC -bundle -flat_namespace -undefined suppress
@@ -86,7 +117,7 @@ $(BEAMS): $(ERLBEHAVBEAMS)
all-recursive: $(ERLBEHAVBEAMS)
%.beam: %.erl
- @ERLC@ -W $(ERLC_FLAGS) $<
+ @ERLC@ -W $(EFLAGS) $<
all-recursive install-recursive uninstall-recursive \
@@ -101,7 +132,7 @@ mostlyclean-recursive maintainer-clean-recursive:
%.hrl: %.asn1
@ERLC@ $(ASN_FLAGS) $<
- @ERLC@ -W $(ERLC_FLAGS) $*.erl
+ @ERLC@ -W $(EFLAGS) $*.erl
$(ERLSHLIBS): %.so: %.c
$(CC) $(CFLAGS) $(LDFLAGS) $(LIBS) \
@@ -114,41 +145,89 @@ $(ERLSHLIBS): %.so: %.c
$(DYNAMIC_LIB_CFLAGS)
install: all
+ #
+ # Configuration files
+ install -d -m 750 -g @INSTALLUSER@ $(ETCDIR)
+ [ -f $(ETCDIR)/ejabberd.cfg ] \
+ && install -b -m 640 -g @INSTALLUSER@ ejabberd.cfg.example $(ETCDIR)/ejabberd.cfg-new \
+ || install -b -m 640 -g @INSTALLUSER@ ejabberd.cfg.example $(ETCDIR)/ejabberd.cfg
+ sed -e "s*@rootdir@*@prefix@*" \
+ -e "s*@installuser@*@INSTALLUSER@*" \
+ -e "s*@LIBDIR@*@libdir@*" \
+ -e "s*@SYSCONFDIR@*@sysconfdir@*" \
+ -e "s*@LOCALSTATEDIR@*@localstatedir@*" \
+ -e "s*@erl@*@ERL@*" ejabberdctl.template \
+ > ejabberdctl.example
+ [ -f $(ETCDIR)/ejabberdctl.cfg ] \
+ && install -b -m 640 -g @INSTALLUSER@ ejabberdctl.cfg.example $(ETCDIR)/ejabberdctl.cfg-new \
+ || install -b -m 640 -g @INSTALLUSER@ ejabberdctl.cfg.example $(ETCDIR)/ejabberdctl.cfg
+ install -b -m 644 -g @INSTALLUSER@ inetrc $(ETCDIR)/inetrc
+ #
+ # Administration script
+ install -m 550 -g @INSTALLUSER@ ejabberdctl.example $(SBINDIR)/ejabberdctl
+ #
+ # Binary Erlang files
install -d $(BEAMDIR)
+ install -m 644 *.app $(BEAMDIR)
install -m 644 *.beam $(BEAMDIR)
rm -f $(BEAMDIR)/configure.beam
- install -m 644 *.app $(BEAMDIR)
- install -d -m 750 -o @INSTALLUSER@ $(SPOOLDIR)
- chown -R @INSTALLUSER@ $(SPOOLDIR)/*
- chmod -R 750 $(SPOOLDIR)/*
- install -d $(SODIR)
+ #
+ # ejabberd header files
+ install -d $(INCLUDEDIR)
+ install -m 644 ../include/*.hrl $(INCLUDEDIR)
+ #
+ # Binary C programs
install -d $(PBINDIR)
- install -m 644 *.so $(SODIR)
$(INSTALL_EPAM)
+ #
+ # Binary system libraries
+ install -d $(SODIR)
+ install -m 644 *.so $(SODIR)
+ #
+ # Translated strings
install -d $(MSGSDIR)
install -m 644 msgs/*.msg $(MSGSDIR)
- install -d -m 750 -o @INSTALLUSER@ $(ETCDIR)
- [ -f $(ETCDIR)/ejabberd.cfg ] && install -b -m 644 ejabberd.cfg.example $(ETCDIR)/ejabberd.cfg-new || install -b -m 644 -o @INSTALLUSER@ ejabberd.cfg.example $(ETCDIR)/ejabberd.cfg
- sed -e "s*@rootdir@*@prefix@*" -e "s*@installuser@*@INSTALLUSER@*" -e "s*@erl@*@ERL@*" ejabberdctl.template > ejabberdctl.example
- [ -f $(ETCDIR)/ejabberdctl.cfg ] && install -b -m 644 ejabberdctl.cfg.example $(ETCDIR)/ejabberdctl.cfg-new || install -b -m 644 -o @INSTALLUSER@ ejabberdctl.cfg.example $(ETCDIR)/ejabberdctl.cfg
- install -b -m 644 inetrc $(ETCDIR)/inetrc
- install -m 550 -o @INSTALLUSER@ ejabberdctl.example $(SBINDIR)/ejabberdctl
+ #
+ # Spool directory
+ install -d -m 750 -o @INSTALLUSER@ $(SPOOLDIR)
+ chown -R @INSTALLUSER@ $(SPOOLDIR)
+ chmod -R 750 $(SPOOLDIR)
+ [ ! -f $(COOKIEFILE) ] || chown -o @INSTALLUSER@ $(COOKIEFILE) ; chmod 400 $(COOKIEFILE)
+ #
+ # Log directory
install -d -m 750 -o @INSTALLUSER@ $(LOGDIR)
- chown @INSTALLUSER@ $(COOKIEFILE)
+ chown -R @INSTALLUSER@ $(LOGDIR)
+ chmod -R 750 $(LOGDIR)
+ #
+ # Documentation
+ install -d $(DOCDIR)
+ install ../doc/guide.html $(DOCDIR)
+ install ../doc/*.png $(DOCDIR)
+ install ../doc/*.txt $(DOCDIR)
uninstall: uninstall-binary
uninstall-binary:
- rm -rf $(BEAMDIR)
- rm -rf $(SODIR)
- rm -rf $(MSGSDIR)
- rm -rf $(PRIVDIR)
- rm -rf $(SBINDIR)/ejabberdctl
+ rm -f $(SBINDIR)/ejabberdctl
+ rm -fr $(DOCDIR)
+ rm -f $(BEAMDIR)/*.beam
+ rm -f $(BEAMDIR)/*.app
+ rm -fr $(BEAMDIR)
+ rm -f $(INCLUDEDIR)/*.hrl
+ rm -fr $(INCLUDEDIR)
+ rm -fr $(PBINDIR)
+ rm -f $(SODIR)/*.so
+ rm -fr $(SODIR)
+ rm -f $(MSGSDIR)/*.msgs
+ rm -fr $(MSGSDIR)
+ rm -fr $(PRIVDIR)
+ rm -fr $(EJABBERDDIR)
uninstall-all: uninstall-binary
rm -rf $(ETCDIR)
- rm -rf $(LOGDIR)
rm -rf $(EJABBERDDIR)
+ rm -rf $(SPOOLDIR)
+ rm -rf $(LOGDIR)
clean: clean-recursive clean-local
diff --git a/src/adhoc.hrl b/src/adhoc.hrl
deleted file mode 100644
index 5dbc515b..00000000
--- a/src/adhoc.hrl
+++ /dev/null
@@ -1,36 +0,0 @@
-%%%----------------------------------------------------------------------
-%%%
-%%% ejabberd, Copyright (C) 2002-2008 Process-one
-%%%
-%%% This program is free software; you can redistribute it and/or
-%%% modify it under the terms of the GNU General Public License as
-%%% published by the Free Software Foundation; either version 2 of the
-%%% License, or (at your option) any later version.
-%%%
-%%% This program is distributed in the hope that it will be useful,
-%%% but WITHOUT ANY WARRANTY; without even the implied warranty of
-%%% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-%%% General Public License for more details.
-%%%
-%%% You should have received a copy of the GNU General Public License
-%%% along with this program; if not, write to the Free Software
-%%% Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-%%% 02111-1307 USA
-%%%
-%%%----------------------------------------------------------------------
-
--record(adhoc_request, {lang,
- node,
- sessionid,
- action,
- xdata,
- others}).
-
--record(adhoc_response, {lang,
- node,
- sessionid,
- status,
- defaultaction = "",
- actions = [],
- notes = [],
- elements = []}).
diff --git a/src/configure b/src/configure
index 5b0fda4e..f77db635 100755
--- a/src/configure
+++ b/src/configure
@@ -1,6 +1,8 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.61.
+# Generated by GNU Autoconf 2.61 for ejabberd.erl version.
+#
+# Report bugs to <ejabberd@process-one.net>.
#
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
# 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
@@ -570,13 +572,12 @@ MAKEFLAGS=
SHELL=${CONFIG_SHELL-/bin/sh}
# Identity of this package.
-PACKAGE_NAME=
-PACKAGE_TARNAME=
-PACKAGE_VERSION=
-PACKAGE_STRING=
-PACKAGE_BUGREPORT=
+PACKAGE_NAME='ejabberd.erl'
+PACKAGE_TARNAME='ejabberd'
+PACKAGE_VERSION='version'
+PACKAGE_STRING='ejabberd.erl version'
+PACKAGE_BUGREPORT='ejabberd@process-one.net'
-ac_unique_file="ejabberd.erl"
# Factoring default headers for most tests.
ac_includes_default="\
#include <stdio.h>
@@ -752,7 +753,7 @@ sharedstatedir='${prefix}/com'
localstatedir='${prefix}/var'
includedir='${prefix}/include'
oldincludedir='/usr/include'
-docdir='${datarootdir}/doc/${PACKAGE}'
+docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
infodir='${datarootdir}/info'
htmldir='${docdir}'
dvidir='${docdir}'
@@ -1216,7 +1217,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures this package to adapt to many kinds of systems.
+\`configure' configures ejabberd.erl version to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1264,7 +1265,7 @@ Fine tuning of the installation directories:
--infodir=DIR info documentation [DATAROOTDIR/info]
--localedir=DIR locale-dependent data [DATAROOTDIR/locale]
--mandir=DIR man documentation [DATAROOTDIR/man]
- --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE]
+ --docdir=DIR documentation root [DATAROOTDIR/doc/ejabberd]
--htmldir=DIR html documentation [DOCDIR]
--dvidir=DIR dvi documentation [DOCDIR]
--pdfdir=DIR pdf documentation [DOCDIR]
@@ -1276,7 +1277,9 @@ _ACEOF
fi
if test -n "$ac_init_help"; then
-
+ case $ac_init_help in
+ short | recursive ) echo "Configuration of ejabberd.erl version:";;
+ esac
cat <<\_ACEOF
Optional Features:
@@ -1331,6 +1334,7 @@ Some influential environment variables:
Use these variables to override the choices made by `configure' or to help
it to find libraries and programs with nonstandard names/locations.
+Report bugs to <ejabberd@process-one.net>.
_ACEOF
ac_status=$?
fi
@@ -1391,7 +1395,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-configure
+ejabberd.erl configure version
generated by GNU Autoconf 2.61
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -1405,7 +1409,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by $as_me, which was
+It was created by ejabberd.erl $as_me version, which was
generated by GNU Autoconf 2.61. Invocation command line was
$ $0 $@
@@ -1743,6 +1747,14 @@ fi
+
+
+
+
+
+
+
+
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
@@ -4132,7 +4144,12 @@ echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\
echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
{ echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
-
+ ( cat <<\_ASBOX
+## --------------------------------------- ##
+## Report this to ejabberd@process-one.net ##
+## --------------------------------------- ##
+_ASBOX
+ ) | sed "s/^/$as_me: WARNING: /" >&2
;;
esac
{ echo "$as_me:$LINENO: checking for $ac_header" >&5
@@ -4377,7 +4394,12 @@ echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\
echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
{ echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
-
+ ( cat <<\_ASBOX
+## --------------------------------------- ##
+## Report this to ejabberd@process-one.net ##
+## --------------------------------------- ##
+_ASBOX
+ ) | sed "s/^/$as_me: WARNING: /" >&2
;;
esac
{ echo "$as_me:$LINENO: checking for $ac_header" >&5
@@ -4621,7 +4643,12 @@ echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\
echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
{ echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
-
+ ( cat <<\_ASBOX
+## --------------------------------------- ##
+## Report this to ejabberd@process-one.net ##
+## --------------------------------------- ##
+_ASBOX
+ ) | sed "s/^/$as_me: WARNING: /" >&2
;;
esac
{ echo "$as_me:$LINENO: checking for $ac_header" >&5
@@ -4889,7 +4916,12 @@ echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\
echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
{ echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
-
+ ( cat <<\_ASBOX
+## --------------------------------------- ##
+## Report this to ejabberd@process-one.net ##
+## --------------------------------------- ##
+_ASBOX
+ ) | sed "s/^/$as_me: WARNING: /" >&2
;;
esac
{ echo "$as_me:$LINENO: checking for $ac_header" >&5
@@ -5677,7 +5709,12 @@ echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\
echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
{ echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
-
+ ( cat <<\_ASBOX
+## --------------------------------------- ##
+## Report this to ejabberd@process-one.net ##
+## --------------------------------------- ##
+_ASBOX
+ ) | sed "s/^/$as_me: WARNING: /" >&2
;;
esac
{ echo "$as_me:$LINENO: checking for $ac_header" >&5
@@ -5850,7 +5887,12 @@ echo "$as_me: WARNING: krb5.h: section \"Present But Cannot Be Compiled\"" >
echo "$as_me: WARNING: krb5.h: proceeding with the preprocessor's result" >&2;}
{ echo "$as_me:$LINENO: WARNING: krb5.h: in the future, the compiler will take precedence" >&5
echo "$as_me: WARNING: krb5.h: in the future, the compiler will take precedence" >&2;}
-
+ ( cat <<\_ASBOX
+## --------------------------------------- ##
+## Report this to ejabberd@process-one.net ##
+## --------------------------------------- ##
+_ASBOX
+ ) | sed "s/^/$as_me: WARNING: /" >&2
;;
esac
{ echo "$as_me:$LINENO: checking for krb5.h" >&5
@@ -6306,7 +6348,7 @@ exec 6>&1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by $as_me, which was
+This file was extended by ejabberd.erl $as_me version, which was
generated by GNU Autoconf 2.61. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -6349,7 +6391,7 @@ Report bugs to <bug-autoconf@gnu.org>."
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF
ac_cs_version="\\
-config.status
+ejabberd.erl config.status version
configured by $0, generated by GNU Autoconf 2.61,
with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
diff --git a/src/configure.ac b/src/configure.ac
index f474bfdb..ee19d9c5 100644
--- a/src/configure.ac
+++ b/src/configure.ac
@@ -2,7 +2,7 @@
# Process this file with autoconf to produce a configure script.
AC_PREREQ(2.53)
-AC_INIT(ejabberd.erl,, ejabberd@process-one.net)
+AC_INIT(ejabberd.erl, version, [ejabberd@process-one.net], [ejabberd])
# Checks for programs.
AC_PROG_CC
diff --git a/src/ejabberd.hrl b/src/ejabberd.hrl
deleted file mode 100644
index d7b16f1e..00000000
--- a/src/ejabberd.hrl
+++ /dev/null
@@ -1,61 +0,0 @@
-%%%----------------------------------------------------------------------
-%%%
-%%% ejabberd, Copyright (C) 2002-2008 Process-one
-%%%
-%%% This program is free software; you can redistribute it and/or
-%%% modify it under the terms of the GNU General Public License as
-%%% published by the Free Software Foundation; either version 2 of the
-%%% License, or (at your option) any later version.
-%%%
-%%% This program is distributed in the hope that it will be useful,
-%%% but WITHOUT ANY WARRANTY; without even the implied warranty of
-%%% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-%%% General Public License for more details.
-%%%
-%%% You should have received a copy of the GNU General Public License
-%%% along with this program; if not, write to the Free Software
-%%% Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-%%% 02111-1307 USA
-%%%
-%%%----------------------------------------------------------------------
-
-%% 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
--define(VERSION, element(2, application:get_key(ejabberd,vsn))).
-
--define(MYHOSTS, ejabberd_config:get_global_option(hosts)).
--define(MYNAME, hd(ejabberd_config:get_global_option(hosts))).
--define(MYLANG, ejabberd_config:get_global_option(language)).
-
--define(MSGS_DIR, "msgs").
--define(CONFIG_PATH, "ejabberd.cfg").
--define(LOG_PATH, "ejabberd.log").
-
--define(EJABBERD_URI, "http://www.process-one.net/en/ejabberd/").
-
--define(S2STIMEOUT, 600000).
-
-%%-define(DBGFSM, true).
-
-%% ---------------------------------
-%% Logging mechanism
-
-%% Print in standard output
--define(PRINT(Format, Args),
- io:format(Format, Args)).
-
--define(DEBUG(Format, Args),
- ejabberd_logger:debug_msg(?MODULE,?LINE,Format, Args)).
-
--define(INFO_MSG(Format, Args),
- ejabberd_logger:info_msg(?MODULE,?LINE,Format, Args)).
-
--define(WARNING_MSG(Format, Args),
- ejabberd_logger:warning_msg(?MODULE,?LINE,Format, Args)).
-
--define(ERROR_MSG(Format, Args),
- ejabberd_logger:error_msg(?MODULE,?LINE,Format, Args)).
-
--define(CRITICAL_MSG(Format, Args),
- ejabberd_logger:critical_msg(?MODULE,?LINE,Format, Args)).
-
diff --git a/src/ejabberd_auth_ldap.erl b/src/ejabberd_auth_ldap.erl
index e22be1bc..8cea87a8 100644
--- a/src/ejabberd_auth_ldap.erl
+++ b/src/ejabberd_auth_ldap.erl
@@ -58,7 +58,7 @@
]).
-include("ejabberd.hrl").
--include("eldap/eldap.hrl").
+-include("eldap.hrl").
-record(state, {host,
eldap_id,
diff --git a/src/ejabberd_config.hrl b/src/ejabberd_config.hrl
deleted file mode 100644
index aa783ea5..00000000
--- a/src/ejabberd_config.hrl
+++ /dev/null
@@ -1,28 +0,0 @@
-%%%----------------------------------------------------------------------
-%%%
-%%% ejabberd, Copyright (C) 2002-2008 Process-one
-%%%
-%%% This program is free software; you can redistribute it and/or
-%%% modify it under the terms of the GNU General Public License as
-%%% published by the Free Software Foundation; either version 2 of the
-%%% License, or (at your option) any later version.
-%%%
-%%% This program is distributed in the hope that it will be useful,
-%%% but WITHOUT ANY WARRANTY; without even the implied warranty of
-%%% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-%%% General Public License for more details.
-%%%
-%%% You should have received a copy of the GNU General Public License
-%%% along with this program; if not, write to the Free Software
-%%% Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-%%% 02111-1307 USA
-%%%
-%%%----------------------------------------------------------------------
-
--record(config, {key, value}).
--record(local_config, {key, value}).
--record(state, {opts = [],
- hosts = [],
- override_local = false,
- override_global = false,
- override_acls = false}).
diff --git a/src/ejabberd_ctl.hrl b/src/ejabberd_ctl.hrl
deleted file mode 100644
index e8daef90..00000000
--- a/src/ejabberd_ctl.hrl
+++ /dev/null
@@ -1,25 +0,0 @@
-%%%----------------------------------------------------------------------
-%%%
-%%% ejabberd, Copyright (C) 2002-2008 Process-one
-%%%
-%%% This program is free software; you can redistribute it and/or
-%%% modify it under the terms of the GNU General Public License as
-%%% published by the Free Software Foundation; either version 2 of the
-%%% License, or (at your option) any later version.
-%%%
-%%% This program is distributed in the hope that it will be useful,
-%%% but WITHOUT ANY WARRANTY; without even the implied warranty of
-%%% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-%%% General Public License for more details.
-%%%
-%%% You should have received a copy of the GNU General Public License
-%%% along with this program; if not, write to the Free Software
-%%% Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-%%% 02111-1307 USA
-%%%
-%%%----------------------------------------------------------------------
-
--define(STATUS_SUCCESS, 0).
--define(STATUS_ERROR, 1).
--define(STATUS_USAGE, 2).
--define(STATUS_BADRPC, 3).
diff --git a/src/ejabberd_zlib/Makefile.in b/src/ejabberd_zlib/Makefile.in
index f24addbc..3a70186b 100644
--- a/src/ejabberd_zlib/Makefile.in
+++ b/src/ejabberd_zlib/Makefile.in
@@ -19,7 +19,8 @@ else
DYNAMIC_LIB_CFLAGS = -fpic -shared
endif
-EFLAGS = -I .. -pz ..
+EFLAGS += -I ../../include
+EFLAGS += -pz ..
# make debug=true to compile Erlang module with debug informations.
ifdef debug
EFLAGS+=+debug_info
diff --git a/src/ejabberdctl.template b/src/ejabberdctl.template
index 4b8e505f..fcf0a80c 100644
--- a/src/ejabberdctl.template
+++ b/src/ejabberdctl.template
@@ -13,13 +13,13 @@ HOST=localhost
ERLANG_NODE=$NODE@$HOST
ERL=@erl@
INSTALLUSER=@installuser@
-ROOTDIR=@rootdir@
-EJABBERD_CONFIG_PATH=$ROOTDIR/etc/ejabberd/ejabberd.cfg
-LOGS_DIR=$ROOTDIR/var/log/ejabberd/
-EJABBERD_DB=$ROOTDIR/var/lib/ejabberd/db/$NODE
+ETCDIR=@SYSCONFDIR@/ejabberd
+EJABBERD_CONFIG_PATH=$ETCDIR/ejabberd.cfg
+LOGDIR=@LOCALSTATEDIR@/log/ejabberd
+SPOOLDIR=@LOCALSTATEDIR@/lib/ejabberd
# read custom configuration
-CONFIG=$ROOTDIR/etc/ejabberd/ejabberdctl.cfg
+CONFIG=$ETCDIR/ejabberdctl.cfg
[ -f "$CONFIG" ] && . "$CONFIG"
# parse command line parameters
@@ -32,8 +32,8 @@ while [ $# -ne 0 ] ; do
--node) ERLANG_NODE=$1; shift ;;
--config) EJABBERD_CONFIG_PATH=$1 ; shift ;;
--ctl-config) CONFIG=$1 ; shift ;;
- --logs) LOGS_DIR=$1 ; shift ;;
- --spool) EJABBERD_DB=$1 ; shift ;;
+ --logs) LOGDIR=$1 ; shift ;;
+ --spool) SPOOLDIR=$1 ; shift ;;
*) ARGS="$ARGS $PARAM" ;;
esac
done
@@ -65,23 +65,29 @@ fi
ERLANG_OPTS="+K $POLL -smp $SMP +P $ERL_PROCESSES $KERNEL_OPTS"
# define additional environment variables
-EJABBERD_EBIN=$ROOTDIR/var/lib/ejabberd/ebin
-EJABBERD_MSGS_PATH=$ROOTDIR/var/lib/ejabberd/priv/msgs
-EJABBERD_SO_PATH=$ROOTDIR/var/lib/ejabberd/priv/lib
-EJABBERD_BIN_PATH=$ROOTDIR/var/lib/ejabberd/priv/bin
-EJABBERD_LOG_PATH=$LOGS_DIR/ejabberd.log
-SASL_LOG_PATH=$LOGS_DIR/sasl.log
+EJABBERDDIR=@LIBDIR@/ejabberd
+BEAMDIR=$EJABBERDDIR/ebin
+PRIVDIR=$EJABBERDDIR/priv
+PBINDIR=$PRIVDIR/bin
+SODIR=$PRIVDIR/lib
+MSGSDIR=$PRIVDIR/msgs
+
+EJABBERD_LOG_PATH=$LOGDIR/ejabberd.log
+SASL_LOG_PATH=$LOGDIR/sasl.log
DATETIME=`date "+%Y%m%d-%H%M%S"`
-ERL_CRASH_DUMP=$LOGS_DIR/erl_crash_$DATETIME.dump
-ERL_INETRC=$ROOTDIR/etc/ejabberd/inetrc
-HOME=$ROOTDIR/var/lib/ejabberd
+ERL_CRASH_DUMP=$LOGDIR/erl_crash_$DATETIME.dump
+ERL_INETRC=$ETCDIR/inetrc
+HOME=$SPOOLDIR
+
+# create the home dir with the proper user if doesn't exist, because it stores cookie file
+[ -d $HOME ] || $EXEC_CMD "mkdir -p $HOME"
# export global variables
export EJABBERD_CONFIG_PATH
-export EJABBERD_MSGS_PATH
+export MSGSDIR
export EJABBERD_LOG_PATH
-export EJABBERD_SO_PATH
-export EJABBERD_BIN_PATH
+export SODIR
+export PBINDIR
export ERL_CRASH_DUMP
export ERL_INETRC
export ERL_MAX_PORTS
@@ -99,8 +105,8 @@ start ()
$EXEC_CMD "$ERL \
$NAME $ERLANG_NODE \
-noinput -detached \
- -pa $EJABBERD_EBIN \
- -mnesia dir \"\\\"$EJABBERD_DB\\\"\" \
+ -pa $BEAMDIR \
+ -mnesia dir \"\\\"$SPOOLDIR\\\"\" \
-s ejabberd \
-sasl sasl_error_logger \\{file,\\\"$SASL_LOG_PATH\\\"\\} \
$ERLANG_OPTS $ARGS \"$@\""
@@ -151,8 +157,8 @@ live ()
echo ""
$EXEC_CMD "$ERL \
$NAME $ERLANG_NODE \
- -pa $EJABBERD_EBIN \
- -mnesia dir \"\\\"$EJABBERD_DB\\\"\" \
+ -pa $BEAMDIR \
+ -mnesia dir \"\\\"$SPOOLDIR\\\"\" \
-s ejabberd \
$ERLANG_OPTS $ARGS \"$@\""
}
@@ -163,7 +169,7 @@ ctl ()
$EXEC_CMD "$ERL \
$NAME ejabberdctl \
-noinput \
- -pa $EJABBERD_EBIN \
+ -pa $BEAMDIR \
-s ejabberd_ctl -extra $ERLANG_NODE $@"
result=$?
case $result in
@@ -178,8 +184,8 @@ ctl ()
echo "Optional parameters when starting an ejabberd node:"
echo " --config file Config file of ejabberd: $EJABBERD_CONFIG_PATH"
echo " --ctl-config file Config file of ejabberdctl: $CONFIG"
- echo " --logs dir Directory for logs: $LOGS_DIR"
- echo " --spool dir Database spool dir: $EJABBERD_DB"
+ echo " --logs dir Directory for logs: $LOGDIR"
+ echo " --spool dir Database spool dir: $SPOOLDIR"
echo " --node nodename ejabberd node name: $ERLANG_NODE"
echo "";;
esac
diff --git a/src/eldap/Makefile.in b/src/eldap/Makefile.in
index 1c9b7ca2..4c9c33c2 100644
--- a/src/eldap/Makefile.in
+++ b/src/eldap/Makefile.in
@@ -9,7 +9,8 @@ LIBS = @LIBS@
ERLANG_CFLAGS = @ERLANG_CFLAGS@
ERLANG_LIBS = @ERLANG_LIBS@
-EFLAGS = -I .. -pz ..
+EFLAGS += -I ../../include
+EFLAGS += -pz ..
# make debug=true to compile Erlang module with debug informations.
ifdef debug
EFLAGS+=+debug_info
diff --git a/src/eldap/eldap.hrl b/src/eldap/eldap.hrl
deleted file mode 100644
index 75f6f76e..00000000
--- a/src/eldap/eldap.hrl
+++ /dev/null
@@ -1,35 +0,0 @@
-%%%----------------------------------------------------------------------
-%%%
-%%% ejabberd, Copyright (C) 2002-2008 Process-one
-%%%
-%%% This program is free software; you can redistribute it and/or
-%%% modify it under the terms of the GNU General Public License as
-%%% published by the Free Software Foundation; either version 2 of the
-%%% License, or (at your option) any later version.
-%%%
-%%% This program is distributed in the hope that it will be useful,
-%%% but WITHOUT ANY WARRANTY; without even the implied warranty of
-%%% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-%%% General Public License for more details.
-%%%
-%%% You should have received a copy of the GNU General Public License
-%%% along with this program; if not, write to the Free Software
-%%% Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-%%% 02111-1307 USA
-%%%
-%%%----------------------------------------------------------------------
-
--record(eldap_search, {scope = wholeSubtree,
- base = [],
- filter,
- limit = 0,
- attributes = [],
- types_only = false,
- timeout = 0}).
-
-
--record(eldap_search_result, {entries,
- referrals}).
-
--record(eldap_entry, {object_name,
- attributes}).
diff --git a/src/jlib.hrl b/src/jlib.hrl
deleted file mode 100644
index 3ea10b15..00000000
--- a/src/jlib.hrl
+++ /dev/null
@@ -1,308 +0,0 @@
-%%%----------------------------------------------------------------------
-%%%
-%%% ejabberd, Copyright (C) 2002-2008 Process-one
-%%%
-%%% This program is free software; you can redistribute it and/or
-%%% modify it under the terms of the GNU General Public License as
-%%% published by the Free Software Foundation; either version 2 of the
-%%% License, or (at your option) any later version.
-%%%
-%%% This program is distributed in the hope that it will be useful,
-%%% but WITHOUT ANY WARRANTY; without even the implied warranty of
-%%% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-%%% General Public License for more details.
-%%%
-%%% You should have received a copy of the GNU General Public License
-%%% along with this program; if not, write to the Free Software
-%%% Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-%%% 02111-1307 USA
-%%%
-%%%----------------------------------------------------------------------
-
--define(NS_DISCO_ITEMS, "http://jabber.org/protocol/disco#items").
--define(NS_DISCO_INFO, "http://jabber.org/protocol/disco#info").
--define(NS_VCARD, "vcard-temp").
--define(NS_AUTH, "jabber:iq:auth").
--define(NS_AUTH_ERROR, "jabber:iq:auth:error").
--define(NS_REGISTER, "jabber:iq:register").
--define(NS_SEARCH, "jabber:iq:search").
--define(NS_ROSTER, "jabber:iq:roster").
--define(NS_PRIVACY, "jabber:iq:privacy").
--define(NS_PRIVATE, "jabber:iq:private").
--define(NS_VERSION, "jabber:iq:version").
--define(NS_TIME, "jabber:iq:time").
--define(NS_LAST, "jabber:iq:last").
--define(NS_XDATA, "jabber:x:data").
--define(NS_IQDATA, "jabber:iq:data").
--define(NS_DELAY, "jabber:x:delay").
--define(NS_EXPIRE, "jabber:x:expire").
--define(NS_EVENT, "jabber:x:event").
--define(NS_XCONFERENCE, "jabber:x:conference").
--define(NS_STATS, "http://jabber.org/protocol/stats").
--define(NS_MUC, "http://jabber.org/protocol/muc").
--define(NS_MUC_USER, "http://jabber.org/protocol/muc#user").
--define(NS_MUC_ADMIN, "http://jabber.org/protocol/muc#admin").
--define(NS_MUC_OWNER, "http://jabber.org/protocol/muc#owner").
--define(NS_PUBSUB, "http://jabber.org/protocol/pubsub").
--define(NS_PUBSUB_EVENT, "http://jabber.org/protocol/pubsub#event").
--define(NS_PUBSUB_OWNER, "http://jabber.org/protocol/pubsub#owner").
--define(NS_PUBSUB_NMI, "http://jabber.org/protocol/pubsub#node-meta-info").
--define(NS_PUBSUB_ERRORS,"http://jabber.org/protocol/pubsub#errors").
--define(NS_PUBSUB_NODE_CONFIG, "http://jabber.org/protocol/pubsub#node_config").
--define(NS_PUBSUB_SUB_AUTH, "http://jabber.org/protocol/pubsub#subscribe_authorization").
--define(NS_COMMANDS, "http://jabber.org/protocol/commands").
--define(NS_BYTESTREAMS, "http://jabber.org/protocol/bytestreams").
--define(NS_ADMIN, "http://jabber.org/protocol/admin").
-
--define(NS_EJABBERD_CONFIG, "ejabberd:config").
-
--define(NS_STREAM, "http://etherx.jabber.org/streams").
-
--define(NS_STANZAS, "urn:ietf:params:xml:ns:xmpp-stanzas").
--define(NS_STREAMS, "urn:ietf:params:xml:ns:xmpp-streams").
-
--define(NS_TLS, "urn:ietf:params:xml:ns:xmpp-tls").
--define(NS_SASL, "urn:ietf:params:xml:ns:xmpp-sasl").
--define(NS_SESSION, "urn:ietf:params:xml:ns:xmpp-session").
--define(NS_BIND, "urn:ietf:params:xml:ns:xmpp-bind").
-
--define(NS_FEATURE_IQAUTH, "http://jabber.org/features/iq-auth").
--define(NS_FEATURE_IQREGISTER, "http://jabber.org/features/iq-register").
--define(NS_FEATURE_COMPRESS, "http://jabber.org/features/compress").
-
--define(NS_COMPRESS, "http://jabber.org/protocol/compress").
-
--define(NS_CAPS, "http://jabber.org/protocol/caps").
-
-% TODO: remove "code" attribute (currently it used for backward-compatibility)
--define(STANZA_ERROR(Code, Type, Condition),
- {xmlelement, "error",
- [{"code", Code}, {"type", Type}],
- [{xmlelement, Condition, [{"xmlns", ?NS_STANZAS}], []}]}).
-
--define(ERR_BAD_REQUEST,
- ?STANZA_ERROR("400", "modify", "bad-request")).
--define(ERR_CONFLICT,
- ?STANZA_ERROR("409", "cancel", "conflict")).
--define(ERR_FEATURE_NOT_IMPLEMENTED,
- ?STANZA_ERROR("501", "cancel", "feature-not-implemented")).
--define(ERR_FORBIDDEN,
- ?STANZA_ERROR("403", "auth", "forbidden")).
--define(ERR_GONE,
- ?STANZA_ERROR("302", "modify", "gone")).
--define(ERR_INTERNAL_SERVER_ERROR,
- ?STANZA_ERROR("500", "wait", "internal-server-error")).
--define(ERR_ITEM_NOT_FOUND,
- ?STANZA_ERROR("404", "cancel", "item-not-found")).
--define(ERR_JID_MALFORMED,
- ?STANZA_ERROR("400", "modify", "jid-malformed")).
--define(ERR_NOT_ACCEPTABLE,
- ?STANZA_ERROR("406", "modify", "not-acceptable")).
--define(ERR_NOT_ALLOWED,
- ?STANZA_ERROR("405", "cancel", "not-allowed")).
--define(ERR_NOT_AUTHORIZED,
- ?STANZA_ERROR("401", "auth", "not-authorized")).
--define(ERR_PAYMENT_REQUIRED,
- ?STANZA_ERROR("402", "auth", "payment-required")).
--define(ERR_RECIPIENT_UNAVAILABLE,
- ?STANZA_ERROR("404", "wait", "recipient-unavailable")).
--define(ERR_REDIRECT,
- ?STANZA_ERROR("302", "modify", "redirect")).
--define(ERR_REGISTRATION_REQUIRED,
- ?STANZA_ERROR("407", "auth", "registration-required")).
--define(ERR_REMOTE_SERVER_NOT_FOUND,
- ?STANZA_ERROR("404", "cancel", "remote-server-not-found")).
--define(ERR_REMOTE_SERVER_TIMEOUT,
- ?STANZA_ERROR("504", "wait", "remote-server-timeout")).
--define(ERR_RESOURCE_CONSTRAINT,
- ?STANZA_ERROR("500", "wait", "resource-constraint")).
--define(ERR_SERVICE_UNAVAILABLE,
- ?STANZA_ERROR("503", "cancel", "service-unavailable")).
--define(ERR_SUBSCRIPTION_REQUIRED,
- ?STANZA_ERROR("407", "auth", "subscription-required")).
--define(ERR_UNEXPECTED_REQUEST,
- ?STANZA_ERROR("400", "wait", "unexpected-request")).
-%-define(ERR_,
-% ?STANZA_ERROR("", "", "")).
-
--define(STANZA_ERRORT(Code, Type, Condition, Lang, Text),
- {xmlelement, "error",
- [{"code", Code}, {"type", Type}],
- [{xmlelement, Condition, [{"xmlns", ?NS_STANZAS}], []},
- {xmlelement, "text", [{"xmlns", ?NS_STANZAS}],
- [{xmlcdata, translate:translate(Lang, Text)}]}]}).
-
--define(ERRT_BAD_REQUEST(Lang, Text),
- ?STANZA_ERRORT("400", "modify", "bad-request", Lang, Text)).
--define(ERRT_CONFLICT(Lang, Text),
- ?STANZA_ERRORT("409", "cancel", "conflict", Lang, Text)).
--define(ERRT_FEATURE_NOT_IMPLEMENTED(Lang, Text),
- ?STANZA_ERRORT("501", "cancel", "feature-not-implemented", Lang, Text)).
--define(ERRT_FORBIDDEN(Lang, Text),
- ?STANZA_ERRORT("403", "auth", "forbidden", Lang, Text)).
--define(ERRT_GONE(Lang, Text),
- ?STANZA_ERRORT("302", "modify", "gone", Lang, Text)).
--define(ERRT_INTERNAL_SERVER_ERROR(Lang, Text),
- ?STANZA_ERRORT("500", "wait", "internal-server-error", Lang, Text)).
--define(ERRT_ITEM_NOT_FOUND(Lang, Text),
- ?STANZA_ERRORT("404", "cancel", "item-not-found", Lang, Text)).
--define(ERRT_JID_MALFORMED(Lang, Text),
- ?STANZA_ERRORT("400", "modify", "jid-malformed", Lang, Text)).
--define(ERRT_NOT_ACCEPTABLE(Lang, Text),
- ?STANZA_ERRORT("406", "modify", "not-acceptable", Lang, Text)).
--define(ERRT_NOT_ALLOWED(Lang, Text),
- ?STANZA_ERRORT("405", "cancel", "not-allowed", Lang, Text)).
--define(ERRT_NOT_AUTHORIZED(Lang, Text),
- ?STANZA_ERRORT("401", "auth", "not-authorized", Lang, Text)).
--define(ERRT_PAYMENT_REQUIRED(Lang, Text),
- ?STANZA_ERRORT("402", "auth", "payment-required", Lang, Text)).
--define(ERRT_RECIPIENT_UNAVAILABLE(Lang, Text),
- ?STANZA_ERRORT("404", "wait", "recipient-unavailable", Lang, Text)).
--define(ERRT_REDIRECT(Lang, Text),
- ?STANZA_ERRORT("302", "modify", "redirect", Lang, Text)).
--define(ERRT_REGISTRATION_REQUIRED(Lang, Text),
- ?STANZA_ERRORT("407", "auth", "registration-required", Lang, Text)).
--define(ERRT_REMOTE_SERVER_NOT_FOUND(Lang, Text),
- ?STANZA_ERRORT("404", "cancel", "remote-server-not-found", Lang, Text)).
--define(ERRT_REMOTE_SERVER_TIMEOUT(Lang, Text),
- ?STANZA_ERRORT("504", "wait", "remote-server-timeout", Lang, Text)).
--define(ERRT_RESOURCE_CONSTRAINT(Lang, Text),
- ?STANZA_ERRORT("500", "wait", "resource-constraint", Lang, Text)).
--define(ERRT_SERVICE_UNAVAILABLE(Lang, Text),
- ?STANZA_ERRORT("503", "cancel", "service-unavailable", Lang, Text)).
--define(ERRT_SUBSCRIPTION_REQUIRED(Lang, Text),
- ?STANZA_ERRORT("407", "auth", "subscription-required", Lang, Text)).
--define(ERRT_UNEXPECTED_REQUEST(Lang, Text),
- ?STANZA_ERRORT("400", "wait", "unexpected-request", Lang, Text)).
-
-% Auth stanza errors
--define(ERR_AUTH_NO_RESOURCE_PROVIDED(Lang),
- ?ERRT_NOT_ACCEPTABLE(Lang, "No resource provided")).
--define(ERR_AUTH_BAD_RESOURCE_FORMAT(Lang),
- ?ERRT_NOT_ACCEPTABLE(Lang, "Illegal resource format")).
--define(ERR_AUTH_RESOURCE_CONFLICT(Lang),
- ?ERRT_CONFLICT(Lang, "Resource conflict")).
-
-
--define(STREAM_ERROR(Condition),
- {xmlelement, "stream:error",
- [],
- [{xmlelement, Condition, [{"xmlns", ?NS_STREAMS}], []}]}).
-
--define(SERR_BAD_FORMAT,
- ?STREAM_ERROR("bad-format")).
--define(SERR_BAD_NAMESPACE_PREFIX,
- ?STREAM_ERROR("bad-namespace-prefix")).
--define(SERR_CONFLICT,
- ?STREAM_ERROR("conflict")).
--define(SERR_CONNECTION_TIMEOUT,
- ?STREAM_ERROR("connection-timeout")).
--define(SERR_HOST_GONE,
- ?STREAM_ERROR("host-gone")).
--define(SERR_HOST_UNKNOWN,
- ?STREAM_ERROR("host-unknown")).
--define(SERR_IMPROPER_ADDRESSING,
- ?STREAM_ERROR("improper-addressing")).
--define(SERR_INTERNAL_SERVER_ERROR,
- ?STREAM_ERROR("internal-server-error")).
--define(SERR_INVALID_FROM,
- ?STREAM_ERROR("invalid-from")).
--define(SERR_INVALID_ID,
- ?STREAM_ERROR("invalid-id")).
--define(SERR_INVALID_NAMESPACE,
- ?STREAM_ERROR("invalid-namespace")).
--define(SERR_INVALID_XML,
- ?STREAM_ERROR("invalid-xml")).
--define(SERR_NOT_AUTHORIZED,
- ?STREAM_ERROR("not-authorized")).
--define(SERR_POLICY_VIOLATION,
- ?STREAM_ERROR("policy-violation")).
--define(SERR_REMOTE_CONNECTION_FAILED,
- ?STREAM_ERROR("remote-connection-failed")).
--define(SERR_RESOURSE_CONSTRAINT,
- ?STREAM_ERROR("resource-constraint")).
--define(SERR_RESTRICTED_XML,
- ?STREAM_ERROR("restricted-xml")).
-% TODO: include hostname or IP
--define(SERR_SEE_OTHER_HOST,
- ?STREAM_ERROR("see-other-host")).
--define(SERR_SYSTEM_SHUTDOWN,
- ?STREAM_ERROR("system-shutdown")).
--define(SERR_UNSUPPORTED_ENCODING,
- ?STREAM_ERROR("unsupported-encoding")).
--define(SERR_UNSUPPORTED_STANZA_TYPE,
- ?STREAM_ERROR("unsupported-stanza-type")).
--define(SERR_UNSUPPORTED_VERSION,
- ?STREAM_ERROR("unsupported-version")).
--define(SERR_XML_NOT_WELL_FORMED,
- ?STREAM_ERROR("xml-not-well-formed")).
-%-define(SERR_,
-% ?STREAM_ERROR("")).
-
--define(STREAM_ERRORT(Condition, Lang, Text),
- {xmlelement, "stream:error",
- [],
- [{xmlelement, Condition, [{"xmlns", ?NS_STREAMS}], []},
- {xmlelement, "text", [{"xml:lang", Lang}, {"xmlns", ?NS_STREAMS}],
- [{xmlcdata, translate:translate(Lang, Text)}]}]}).
-
--define(SERRT_BAD_FORMAT(Lang, Text),
- ?STREAM_ERRORT("bad-format", Lang, Text)).
--define(SERRT_BAD_NAMESPACE_PREFIX(Lang, Text),
- ?STREAM_ERRORT("bad-namespace-prefix", Lang, Text)).
--define(SERRT_CONFLICT(Lang, Text),
- ?STREAM_ERRORT("conflict", Lang, Text)).
--define(SERRT_CONNECTION_TIMEOUT(Lang, Text),
- ?STREAM_ERRORT("connection-timeout", Lang, Text)).
--define(SERRT_HOST_GONE(Lang, Text),
- ?STREAM_ERRORT("host-gone", Lang, Text)).
--define(SERRT_HOST_UNKNOWN(Lang, Text),
- ?STREAM_ERRORT("host-unknown", Lang, Text)).
--define(SERRT_IMPROPER_ADDRESSING(Lang, Text),
- ?STREAM_ERRORT("improper-addressing", Lang, Text)).
--define(SERRT_INTERNAL_SERVER_ERROR(Lang, Text),
- ?STREAM_ERRORT("internal-server-error", Lang, Text)).
--define(SERRT_INVALID_FROM(Lang, Text),
- ?STREAM_ERRORT("invalid-from", Lang, Text)).
--define(SERRT_INVALID_ID(Lang, Text),
- ?STREAM_ERRORT("invalid-id", Lang, Text)).
--define(SERRT_INVALID_NAMESPACE(Lang, Text),
- ?STREAM_ERRORT("invalid-namespace", Lang, Text)).
--define(SERRT_INVALID_XML(Lang, Text),
- ?STREAM_ERRORT("invalid-xml", Lang, Text)).
--define(SERRT_NOT_AUTHORIZED(Lang, Text),
- ?STREAM_ERRORT("not-authorized", Lang, Text)).
--define(SERRT_POLICY_VIOLATION(Lang, Text),
- ?STREAM_ERRORT("policy-violation", Lang, Text)).
--define(SERRT_REMOTE_CONNECTION_FAILED(Lang, Text),
- ?STREAM_ERRORT("remote-connection-failed", Lang, Text)).
--define(SERRT_RESOURSE_CONSTRAINT(Lang, Text),
- ?STREAM_ERRORT("resource-constraint", Lang, Text)).
--define(SERRT_RESTRICTED_XML(Lang, Text),
- ?STREAM_ERRORT("restricted-xml", Lang, Text)).
-% TODO: include hostname or IP
--define(SERRT_SEE_OTHER_HOST(Lang, Text),
- ?STREAM_ERRORT("see-other-host", Lang, Text)).
--define(SERRT_SYSTEM_SHUTDOWN(Lang, Text),
- ?STREAM_ERRORT("system-shutdown", Lang, Text)).
--define(SERRT_UNSUPPORTED_ENCODING(Lang, Text),
- ?STREAM_ERRORT("unsupported-encoding", Lang, Text)).
--define(SERRT_UNSUPPORTED_STANZA_TYPE(Lang, Text),
- ?STREAM_ERRORT("unsupported-stanza-type", Lang, Text)).
--define(SERRT_UNSUPPORTED_VERSION(Lang, Text),
- ?STREAM_ERRORT("unsupported-version", Lang, Text)).
--define(SERRT_XML_NOT_WELL_FORMED(Lang, Text),
- ?STREAM_ERRORT("xml-not-well-formed", Lang, Text)).
-%-define(SERRT_(Lang, Text),
-% ?STREAM_ERRORT("", Lang, Text)).
-
-
--record(jid, {user, server, resource,
- luser, lserver, lresource}).
-
--record(iq, {id = "",
- type,
- xmlns = "",
- lang = "",
- sub_el}).
-
diff --git a/src/mod_irc/Makefile.in b/src/mod_irc/Makefile.in
index 5000721a..86212e45 100644
--- a/src/mod_irc/Makefile.in
+++ b/src/mod_irc/Makefile.in
@@ -16,7 +16,9 @@ else
DYNAMIC_LIB_CFLAGS = -fpic -shared
endif
-EFLAGS = -I .. -pz ..
+EFLAGS += -I ../../include
+EFLAGS += -pz ..
+
# make debug=true to compile Erlang module with debug informations.
ifdef debug
EFLAGS+=+debug_info
diff --git a/src/mod_muc/Makefile.in b/src/mod_muc/Makefile.in
index 8aa3bf5e..80725d33 100644
--- a/src/mod_muc/Makefile.in
+++ b/src/mod_muc/Makefile.in
@@ -9,7 +9,9 @@ LIBS = @LIBS@
ERLANG_CFLAGS = @ERLANG_CFLAGS@
ERLANG_LIBS = @ERLANG_LIBS@
-EFLAGS = -I .. -pz ..
+EFLAGS += -I ../../include
+EFLAGS += -pz ..
+
# make debug=true to compile Erlang module with debug informations.
ifdef debug
EFLAGS+=+debug_info
diff --git a/src/mod_offline.erl b/src/mod_offline.erl
index 3a751c32..3db29844 100644
--- a/src/mod_offline.erl
+++ b/src/mod_offline.erl
@@ -43,8 +43,8 @@
-include("ejabberd.hrl").
-include("jlib.hrl").
--include("web/ejabberd_http.hrl").
--include("web/ejabberd_web_admin.hrl").
+-include("ejabberd_http.hrl").
+-include("ejabberd_web_admin.hrl").
-record(offline_msg, {us, timestamp, expire, from, to, packet}).
diff --git a/src/mod_offline_odbc.erl b/src/mod_offline_odbc.erl
index c3d0513d..79d7c51a 100644
--- a/src/mod_offline_odbc.erl
+++ b/src/mod_offline_odbc.erl
@@ -42,8 +42,8 @@
-include("ejabberd.hrl").
-include("jlib.hrl").
--include("web/ejabberd_http.hrl").
--include("web/ejabberd_web_admin.hrl").
+-include("ejabberd_http.hrl").
+-include("ejabberd_web_admin.hrl").
-record(offline_msg, {user, timestamp, expire, from, to, packet}).
diff --git a/src/mod_privacy.hrl b/src/mod_privacy.hrl
deleted file mode 100644
index 21ad1c96..00000000
--- a/src/mod_privacy.hrl
+++ /dev/null
@@ -1,37 +0,0 @@
-%%%----------------------------------------------------------------------
-%%%
-%%% ejabberd, Copyright (C) 2002-2008 Process-one
-%%%
-%%% This program is free software; you can redistribute it and/or
-%%% modify it under the terms of the GNU General Public License as
-%%% published by the Free Software Foundation; either version 2 of the
-%%% License, or (at your option) any later version.
-%%%
-%%% This program is distributed in the hope that it will be useful,
-%%% but WITHOUT ANY WARRANTY; without even the implied warranty of
-%%% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-%%% General Public License for more details.
-%%%
-%%% You should have received a copy of the GNU General Public License
-%%% along with this program; if not, write to the Free Software
-%%% Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-%%% 02111-1307 USA
-%%%
-%%%----------------------------------------------------------------------
-
--record(privacy, {us,
- default = none,
- lists = []}).
-
--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(userlist, {name = none, list = []}).
diff --git a/src/mod_proxy65/Makefile.in b/src/mod_proxy65/Makefile.in
index b9eba426..62ae77c9 100644
--- a/src/mod_proxy65/Makefile.in
+++ b/src/mod_proxy65/Makefile.in
@@ -9,7 +9,9 @@ LIBS = @LIBS@
ERLANG_CFLAGS = @ERLANG_CFLAGS@
ERLANG_LIBS = @ERLANG_LIBS@
-EFLAGS = -I .. -pz ..
+EFLAGS += -I ../../include
+EFLAGS += -pz ..
+
# make debug=true to compile Erlang module with debug informations.
ifdef debug
EFLAGS+=+debug_info
diff --git a/src/mod_proxy65/mod_proxy65.hrl b/src/mod_proxy65/mod_proxy65.hrl
deleted file mode 100644
index 66cb86f4..00000000
--- a/src/mod_proxy65/mod_proxy65.hrl
+++ /dev/null
@@ -1,61 +0,0 @@
-%%%----------------------------------------------------------------------
-%%% RFC 1928 constants.
-%%%
-%%%
-%%% ejabberd, Copyright (C) 2002-2008 Process-one
-%%%
-%%% This program is free software; you can redistribute it and/or
-%%% modify it under the terms of the GNU General Public License as
-%%% published by the Free Software Foundation; either version 2 of the
-%%% License, or (at your option) any later version.
-%%%
-%%% This program is distributed in the hope that it will be useful,
-%%% but WITHOUT ANY WARRANTY; without even the implied warranty of
-%%% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-%%% General Public License for more details.
-%%%
-%%% You should have received a copy of the GNU General Public License
-%%% along with this program; if not, write to the Free Software
-%%% Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-%%% 02111-1307 USA
-%%%
-%%%----------------------------------------------------------------------
-
-%% Version
--define(VERSION_5, 5).
-
-%% Authentication methods
--define(AUTH_ANONYMOUS, 0).
--define(AUTH_GSSAPI, 1).
--define(AUTH_PLAIN, 2).
--define(AUTH_NO_METHODS, 16#FF).
-
-%% Address Type
--define(ATYP_IPV4, 1).
--define(ATYP_DOMAINNAME, 3).
--define(ATYP_IPV6, 4).
-
-%% Commands
--define(CMD_CONNECT, 1).
--define(CMD_BIND, 2).
--define(CMD_UDP, 3).
-
-%% RFC 1928 replies
--define(SUCCESS, 0).
--define(ERR_GENERAL_FAILURE, 1).
--define(ERR_NOT_ALLOWED, 2).
--define(ERR_NETWORK_UNREACHABLE, 3).
--define(ERR_HOST_UNREACHABLE, 4).
--define(ERR_CONNECTION_REFUSED, 5).
--define(ERR_TTL_EXPIRED, 6).
--define(ERR_COMMAND_NOT_SUPPORTED, 7).
--define(ERR_ADDRESS_TYPE_NOT_SUPPORTED, 8).
-
-%% RFC 1928 defined timeout.
--define(SOCKS5_REPLY_TIMEOUT, 10000).
-
--record(s5_request, {
- rsv = 0,
- cmd,
- sha1
- }).
diff --git a/src/mod_proxy65/mod_proxy65_service.erl b/src/mod_proxy65/mod_proxy65_service.erl
index 41c3af7d..4ee3ec61 100644
--- a/src/mod_proxy65/mod_proxy65_service.erl
+++ b/src/mod_proxy65/mod_proxy65_service.erl
@@ -41,8 +41,8 @@
%% API.
-export([start_link/2]).
--include("../ejabberd.hrl").
--include("../jlib.hrl").
+-include("ejabberd.hrl").
+-include("jlib.hrl").
-define(PROCNAME, ejabberd_mod_proxy65_service).
diff --git a/src/mod_proxy65/mod_proxy65_stream.erl b/src/mod_proxy65/mod_proxy65_stream.erl
index ccc060af..046ac8e7 100644
--- a/src/mod_proxy65/mod_proxy65_stream.erl
+++ b/src/mod_proxy65/mod_proxy65_stream.erl
@@ -58,7 +58,7 @@
]).
-include("mod_proxy65.hrl").
--include("../ejabberd.hrl").
+-include("ejabberd.hrl").
-define(WAIT_TIMEOUT, 60000). %% 1 minute (is it enough?)
diff --git a/src/mod_pubsub/Makefile.in b/src/mod_pubsub/Makefile.in
index 39f6a16e..25dbf57a 100644
--- a/src/mod_pubsub/Makefile.in
+++ b/src/mod_pubsub/Makefile.in
@@ -9,7 +9,9 @@ LIBS = @LIBS@
ERLANG_CFLAGS = @ERLANG_CFLAGS@
ERLANG_LIBS = @ERLANG_LIBS@
-EFLAGS = -I .. -pz ..
+EFLAGS += -I ../../include
+EFLAGS += -pz ..
+
# make debug=true to compile Erlang module with debug informations.
ifdef debug
EFLAGS+=+debug_info
diff --git a/src/mod_pubsub/pubsub.hrl b/src/mod_pubsub/pubsub.hrl
deleted file mode 100644
index 25f60c36..00000000
--- a/src/mod_pubsub/pubsub.hrl
+++ /dev/null
@@ -1,131 +0,0 @@
-%%% ====================================================================
-%%% ``The contents of this file are subject to the Erlang Public License,
-%%% Version 1.1, (the "License"); you may not use this file except in
-%%% compliance with the License. You should have received a copy of the
-%%% Erlang Public License along with this software. If not, it can be
-%%% retrieved via the world wide web at http://www.erlang.org/.
-%%%
-%%% Software distributed under the License is distributed on an "AS IS"
-%%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
-%%% the License for the specific language governing rights and limitations
-%%% under the License.
-%%%
-%%% The Initial Developer of the Original Code is Process-one.
-%%% Portions created by Process-one are Copyright 2006-2008, Process-one
-%%% All Rights Reserved.''
-%%% This software is copyright 2006-2008, Process-one.
-%%%
-%%%
-%%% copyright 2006-2008 Process-one
-%%%
-%%% This file contains pubsub types definition.
-%%% ====================================================================
-
-%% -------------------------------
-%% Pubsub constants
--define(ERR_EXTENDED(E,C), mod_pubsub:extended_error(E,C)).
-
-%% this is currently a hard limit.
-%% Would be nice to have it configurable.
--define(MAXITEMS, 20).
--define(MAX_PAYLOAD_SIZE, 60000).
-
-%% -------------------------------
-%% Pubsub types
-
-%%% @type host() = string().
-%%% <p><tt>host</tt> is the name of the PubSub service. For example, it can be
-%%% <tt>"pubsub.localhost"</tt>.</p>
-
-%%% @type pubsubNode() = [string()].
-%%% <p>A node is defined by a list of its ancestors. The last element is the name
-%%% of the current node. For example:
-%%% ```["home", "localhost", "cromain", "node1"]'''</p>
-
-%%% @type stanzaError() = #xmlelement{}.
-%%% Example:
-%%% ```{xmlelement, "error",
-%%% [{"code", Code}, {"type", Type}],
-%%% [{xmlelement, Condition, [{"xmlns", ?NS_STANZAS}], []}]}'''
-
-%%% @type pubsubIQResponse() = #xmlelement{}.
-%%% Example:
-%%% ```{xmlelement, "pubsub",
-%%% [{"xmlns", ?NS_PUBSUB_EVENT}],
-%%% [{xmlelement, "affiliations", [],
-%%% []}]}'''
-
-%%% @type nodeOption() = {Option::atom(), Value::term()}.
-%%% Example:
-%%% ```{deliver_payloads, true}'''
-
-%%% @type nodeType() = string().
-%%% <p>The <tt>nodeType</tt> is a string containing the name of the PubSub
-%%% plugin to use to manage a given node. For example, it can be
-%%% <tt>"default"</tt>, <tt>"collection"</tt> or <tt>"blog"</tt>.</p>
-
-%%% @type jid() = #jid{
-%%% user = string(),
-%%% server = string(),
-%%% resource = string(),
-%%% luser = string(),
-%%% lserver = string(),
-%%% lresource = string()}.
-
-%%% @type usr() = {User::string(), Server::string(), Resource::string()}.
-
-%%% @type affiliation() = none | owner | publisher | outcast.
-%%% @type subscription() = none | pending | unconfigured | subscribed.
-
-%%% @type pubsubNode() = #pubsub_node{
-%%% nodeid = {Host::host(), Node::pubsubNode()},
-%%% parentid = {Host::host(), Node::pubsubNode()},
-%%% type = nodeType(),
-%%% owners = [usr()],
-%%% options = [nodeOption()]}.
-%%% <p>This is the format of the <tt>nodes</tt> table. The type of the table
-%%% is: <tt>set</tt>,<tt>ram/disc</tt>.</p>
-%%% <p>The <tt>parentid</tt> and <tt>type</tt> fields are indexed.</p>
--record(pubsub_node, {nodeid,
- parentid = {},
- type = "",
- owners = [],
- options = []
- }).
-
-%%% @type pubsubState() = #pubsub_state{
-%%% stateid = {jid(), {Host::host(), Node::pubsubNode()}},
-%%% items = [ItemId::string()],
-%%% affiliation = affiliation(),
-%%% subscription = subscription()}.
-%%% <p>This is the format of the <tt>affiliations</tt> table. The type of the
-%%% table is: <tt>set</tt>,<tt>ram/disc</tt>.</p>
--record(pubsub_state, {stateid,
- items = [],
- affiliation = none,
- subscription = none
-}).
-
-%% @type pubsubItem() = #pubsub_item{
-%% itemid = {ItemId::string(), {Host::host(),Node::pubsubNode()}},
-%% creation = {JID::jid(), now()},
-%% modification = {JID::jid(), now()},
-%% payload = XMLContent::string()}.
-%%% <p>This is the format of the <tt>published items</tt> table. The type of the
-%%% table is: <tt>set</tt>,<tt>disc</tt>,<tt>fragmented</tt>.</p>
--record(pubsub_item, {itemid,
- creation = {unknown,unknown},
- modification = {unknown,unknown},
- payload = []
- }).
-
-
-%% @type pubsubPresence() = #pubsub_presence{
-%% key = {Host::host(), User::string(), Server::string()},
-%% presence = list()}.
-%%% <p>This is the format of the <tt>published presence</tt> table. The type of the
-%%% table is: <tt>set</tt>,<tt>ram</tt>.</p>
--record(pubsub_presence, {key,
- resource
- }).
-
diff --git a/src/mod_roster.erl b/src/mod_roster.erl
index 038de586..c1569bb6 100644
--- a/src/mod_roster.erl
+++ b/src/mod_roster.erl
@@ -47,8 +47,8 @@
-include("ejabberd.hrl").
-include("jlib.hrl").
-include("mod_roster.hrl").
--include("web/ejabberd_http.hrl").
--include("web/ejabberd_web_admin.hrl").
+-include("ejabberd_http.hrl").
+-include("ejabberd_web_admin.hrl").
start(Host, Opts) ->
diff --git a/src/mod_roster.hrl b/src/mod_roster.hrl
deleted file mode 100644
index 2a2e8bc7..00000000
--- a/src/mod_roster.hrl
+++ /dev/null
@@ -1,31 +0,0 @@
-%%%----------------------------------------------------------------------
-%%%
-%%% ejabberd, Copyright (C) 2002-2008 Process-one
-%%%
-%%% This program is free software; you can redistribute it and/or
-%%% modify it under the terms of the GNU General Public License as
-%%% published by the Free Software Foundation; either version 2 of the
-%%% License, or (at your option) any later version.
-%%%
-%%% This program is distributed in the hope that it will be useful,
-%%% but WITHOUT ANY WARRANTY; without even the implied warranty of
-%%% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-%%% General Public License for more details.
-%%%
-%%% You should have received a copy of the GNU General Public License
-%%% along with this program; if not, write to the Free Software
-%%% Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-%%% 02111-1307 USA
-%%%
-%%%----------------------------------------------------------------------
-
--record(roster, {usj,
- us,
- jid,
- name = "",
- subscription = none,
- ask = none,
- groups = [],
- askmessage = [],
- xs = []}).
-
diff --git a/src/mod_roster_odbc.erl b/src/mod_roster_odbc.erl
index d3812156..dfb76dcb 100644
--- a/src/mod_roster_odbc.erl
+++ b/src/mod_roster_odbc.erl
@@ -46,8 +46,8 @@
-include("ejabberd.hrl").
-include("jlib.hrl").
-include("mod_roster.hrl").
--include("web/ejabberd_http.hrl").
--include("web/ejabberd_web_admin.hrl").
+-include("ejabberd_http.hrl").
+-include("ejabberd_web_admin.hrl").
start(Host, Opts) ->
diff --git a/src/mod_shared_roster.erl b/src/mod_shared_roster.erl
index ff378010..f363bd22 100644
--- a/src/mod_shared_roster.erl
+++ b/src/mod_shared_roster.erl
@@ -52,8 +52,8 @@
-include("ejabberd.hrl").
-include("jlib.hrl").
-include("mod_roster.hrl").
--include("web/ejabberd_http.hrl").
--include("web/ejabberd_web_admin.hrl").
+-include("ejabberd_http.hrl").
+-include("ejabberd_web_admin.hrl").
-record(sr_group, {group_host, opts}).
-record(sr_user, {us, group_host}).
diff --git a/src/mod_vcard_ldap.erl b/src/mod_vcard_ldap.erl
index 2b5e7faa..2225f7c8 100644
--- a/src/mod_vcard_ldap.erl
+++ b/src/mod_vcard_ldap.erl
@@ -50,7 +50,7 @@
]).
-include("ejabberd.hrl").
--include("eldap/eldap.hrl").
+-include("eldap.hrl").
-include("jlib.hrl").
-define(PROCNAME, ejabberd_mod_vcard_ldap).
diff --git a/src/odbc/Makefile.in b/src/odbc/Makefile.in
index 974517c5..5bd130b6 100644
--- a/src/odbc/Makefile.in
+++ b/src/odbc/Makefile.in
@@ -9,7 +9,9 @@ LIBS = @LIBS@
ERLANG_CFLAGS = @ERLANG_CFLAGS@
ERLANG_LIBS = @ERLANG_LIBS@
-EFLAGS = -I .. -pz ..
+EFLAGS += -I ../../include
+EFLAGS += -pz ..
+
# make debug=true to compile Erlang module with debug informations.
ifdef debug
EFLAGS+=+debug_info
diff --git a/src/pam/Makefile.in b/src/pam/Makefile.in
index d86b119b..57c1ab78 100644
--- a/src/pam/Makefile.in
+++ b/src/pam/Makefile.in
@@ -9,7 +9,9 @@ LIBS = @LIBS@ @PAM_LIBS@
ERLANG_CFLAGS = @ERLANG_CFLAGS@
ERLANG_LIBS = @ERLANG_LIBS@
-EFLAGS = -I .. -pz ..
+EFLAGS += -I ../../include
+EFLAGS += -pz ..
+
# make debug=true to compile Erlang module with debug informations.
ifdef debug
EFLAGS+=+debug_info
diff --git a/src/tls/Makefile.in b/src/tls/Makefile.in
index dfb8c87d..db4a874e 100644
--- a/src/tls/Makefile.in
+++ b/src/tls/Makefile.in
@@ -19,7 +19,9 @@ else
DYNAMIC_LIB_CFLAGS = -fpic -shared
endif
-EFLAGS = -I .. -pz ..
+EFLAGS += -I ../../include
+EFLAGS += -pz ..
+
# make debug=true to compile Erlang module with debug informations.
ifdef debug
EFLAGS+=+debug_info
diff --git a/src/web/Makefile.in b/src/web/Makefile.in
index 7c4732da..3a75f7e1 100644
--- a/src/web/Makefile.in
+++ b/src/web/Makefile.in
@@ -9,7 +9,9 @@ LIBS = @LIBS@
ERLANG_CFLAGS = @ERLANG_CFLAGS@
ERLANG_LIBS = @ERLANG_LIBS@
-EFLAGS = -I .. -pz ..
+EFLAGS += -I ../../include
+EFLAGS += -pz ..
+
# make debug=true to compile Erlang module with debug informations.
ifdef debug
EFLAGS+=+debug_info
@@ -21,7 +23,7 @@ BEAMS = $(addprefix $(OUTDIR)/,$(SOURCES:.erl=.beam))
all: $(BEAMS)
-$(OUTDIR)/%.beam: %.erl ejabberd_http.hrl
+$(OUTDIR)/%.beam: %.erl
@ERLC@ -W $(EFLAGS) -o $(OUTDIR) $<
clean:
diff --git a/src/web/ejabberd_http.hrl b/src/web/ejabberd_http.hrl
deleted file mode 100644
index 4bcf047e..00000000
--- a/src/web/ejabberd_http.hrl
+++ /dev/null
@@ -1,30 +0,0 @@
-%%%----------------------------------------------------------------------
-%%%
-%%% ejabberd, Copyright (C) 2002-2008 Process-one
-%%%
-%%% This program is free software; you can redistribute it and/or
-%%% modify it under the terms of the GNU General Public License as
-%%% published by the Free Software Foundation; either version 2 of the
-%%% License, or (at your option) any later version.
-%%%
-%%% This program is distributed in the hope that it will be useful,
-%%% but WITHOUT ANY WARRANTY; without even the implied warranty of
-%%% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-%%% General Public License for more details.
-%%%
-%%% You should have received a copy of the GNU General Public License
-%%% along with this program; if not, write to the Free Software
-%%% Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-%%% 02111-1307 USA
-%%%
-%%%----------------------------------------------------------------------
-
--record(request, {method,
- path,
- q = [],
- us,
- auth,
- lang = "",
- data = "",
- ip
- }).
diff --git a/src/web/ejabberd_web_admin.hrl b/src/web/ejabberd_web_admin.hrl
deleted file mode 100644
index 7c37d076..00000000
--- a/src/web/ejabberd_web_admin.hrl
+++ /dev/null
@@ -1,52 +0,0 @@
-%%%----------------------------------------------------------------------
-%%%
-%%% ejabberd, Copyright (C) 2002-2008 Process-one
-%%%
-%%% This program is free software; you can redistribute it and/or
-%%% modify it under the terms of the GNU General Public License as
-%%% published by the Free Software Foundation; either version 2 of the
-%%% License, or (at your option) any later version.
-%%%
-%%% This program is distributed in the hope that it will be useful,
-%%% but WITHOUT ANY WARRANTY; without even the implied warranty of
-%%% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-%%% General Public License for more details.
-%%%
-%%% You should have received a copy of the GNU General Public License
-%%% along with this program; if not, write to the Free Software
-%%% Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-%%% 02111-1307 USA
-%%%
-%%%----------------------------------------------------------------------
-
--define(X(Name), {xmlelement, Name, [], []}).
--define(XA(Name, Attrs), {xmlelement, Name, Attrs, []}).
--define(XE(Name, Els), {xmlelement, Name, [], Els}).
--define(XAE(Name, Attrs, Els), {xmlelement, Name, Attrs, Els}).
--define(C(Text), {xmlcdata, Text}).
--define(XC(Name, Text), ?XE(Name, [?C(Text)])).
--define(XAC(Name, Attrs, Text), ?XAE(Name, Attrs, [?C(Text)])).
-
--define(T(Text), translate:translate(Lang, Text)).
--define(CT(Text), ?C(?T(Text))).
--define(XCT(Name, Text), ?XC(Name, ?T(Text))).
--define(XACT(Name, Attrs, Text), ?XAC(Name, Attrs, ?T(Text))).
-
--define(LI(Els), ?XE("li", Els)).
--define(A(URL, Els), ?XAE("a", [{"href", URL}], Els)).
--define(AC(URL, Text), ?A(URL, [?C(Text)])).
--define(ACT(URL, Text), ?AC(URL, ?T(Text))).
--define(P, ?X("p")).
--define(BR, ?X("br")).
--define(INPUT(Type, Name, Value),
- ?XA("input", [{"type", Type},
- {"name", Name},
- {"value", Value}])).
--define(INPUTT(Type, Name, Value), ?INPUT(Type, Name, ?T(Value))).
--define(INPUTS(Type, Name, Value, Size),
- ?XA("input", [{"type", Type},
- {"name", Name},
- {"value", Value},
- {"size", Size}])).
--define(INPUTST(Type, Name, Value, Size), ?INPUT(Type, Name, ?T(Value), Size)).
--define(ACLINPUT(Text), ?XE("td", [?INPUT("text", "value" ++ ID, Text)])).