Permalink
Browse files

Move ejabberd_zlib.erl interface to ejabberd project (EJAB-991)

  • Loading branch information...
1 parent ac56aa1 commit b19d03f9735cafe50e410b5f545f834ffd023544 @badlop badlop committed Sep 2, 2011
Showing with 0 additions and 97 deletions.
  1. +0 −1 doc/Makefile.am
  2. +0 −1 ebin/Makefile.am
  3. +0 −1 ebin/exmpp.app.in
  4. +0 −1 src/Emakefile.in
  5. +0 −1 src/Makefile.am
  6. +0 −92 src/compat/ejabberd_zlib.erl
View
1 doc/Makefile.am
@@ -56,7 +56,6 @@ HTML_FILES = index.html \
exmpp_xml.html \
exmpp_xmlstream.html \
ejabberd_socket.html \
- ejabberd_zlib.html \
stringprep.html \
tls.html \
xml.html \
View
1 ebin/Makefile.am
@@ -50,7 +50,6 @@ BEAM_FILES = exmpp.app \
if BUILD_COMPAT
BEAM_FILES += ejabberd_socket.beam \
- ejabberd_zlib.beam \
stringprep.beam \
tls.beam \
xml.beam \
View
1 ebin/exmpp.app.in
@@ -45,7 +45,6 @@
exmpp_session,
exmpp_socket@COMPAT_MODULES_START@
@COMPAT_MODULES@ejabberd_socket,
- @COMPAT_MODULES@ejabberd_zlib,
@COMPAT_MODULES@stringprep,
@COMPAT_MODULES@tls,
@COMPAT_MODULES@xml,
View
1 src/Emakefile.in
@@ -46,7 +46,6 @@
'@srcdir@/server/exmpp_server_session',
'@srcdir@/server/exmpp_server_tls'@COMPAT_MODULES_START@
@COMPAT_MODULES@'@srcdir@/compat/ejabberd_socket',
- @COMPAT_MODULES@'@srcdir@/compat/ejabberd_zlib',
@COMPAT_MODULES@'@srcdir@/compat/stringprep',
@COMPAT_MODULES@'@srcdir@/compat/tls',
@COMPAT_MODULES@'@srcdir@/compat/xml',
View
1 src/Makefile.am
@@ -47,7 +47,6 @@ EXTRA_DIST = core/exmpp.erl \
server/exmpp_server_session.erl \
server/exmpp_server_tls.erl \
compat/ejabberd_socket.erl \
- compat/ejabberd_zlib.erl \
compat/stringprep.erl \
compat/tls.erl \
compat/xml.erl \
View
92 src/compat/ejabberd_zlib.erl
@@ -1,92 +0,0 @@
-%%%----------------------------------------------------------------------
-%%% File : ejabberd_zlib.erl
-%%% Author : Alexey Shchepin <alexey@process-one.net>
-%%% Purpose : Interface to zlib
-%%% Created : 19 Jan 2006 by Alexey Shchepin <alexey@process-one.net>
-%%%
-%%%
-%%% ejabberd, Copyright (C) 2002-2010 ProcessOne
-%%%
-%%% 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
-%%%
-%%%----------------------------------------------------------------------
-
-%% @doc
-%% This <strong>{@module}</strong> module is for compatibility with ejabberd.
-
--module(ejabberd_zlib).
--author('alexey@process-one.net').
-
--export([start/0, start_link/0,
- enable_zlib/2, disable_zlib/1,
- send/2,
- recv/2, recv/3, recv_data/2,
- setopts/2,
- sockname/1, peername/1,
- controlling_process/2,
- close/1]).
-
--define(DEFLATE, 1).
--define(INFLATE, 2).
-
-start() ->
- exmpp_compress:start().
-
-start_link() ->
- exmpp_compress:start_link().
-
-
-enable_zlib(SockMod, Socket) ->
- try
- ZlibSock = exmpp_compress:enable_compression({SockMod, Socket},
- [{compress_method, zlib}]),
- {ok, ZlibSock}
- catch
- Exception ->
- {error, Exception}
- end.
-
-disable_zlib(ZlibSock) ->
- exmpp_compress:disable_compression(ZlibSock).
-
-recv(Socket, Length) ->
- recv(Socket, Length, infinity).
-recv(ZlibSock, _Length, Timeout) ->
- exmpp_compress:recv(ZlibSock, Timeout).
-
-recv_data(ZlibSock, Packet) ->
- exmpp_compress:recv_data(ZlibSock, Packet).
-
-send(ZlibSock, Packet) ->
- exmpp_compress:send(ZlibSock, Packet).
-
-
-setopts(ZlibSock, Opts) ->
- exmpp_compress:setopts(ZlibSock, Opts).
-
-sockname(ZlibSock) ->
- exmpp_compress:sockname(ZlibSock).
-
-peername(ZlibSock) ->
- exmpp_compress:peername(ZlibSock).
-
-controlling_process(ZlibSock, Pid) ->
- exmpp_compress:controlling_process(ZlibSock, Pid).
-
-close(ZlibSock) ->
- exmpp_compress:close(ZlibSock).
-
-

0 comments on commit b19d03f

Please sign in to comment.