25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-11-26 16:26:24 +01:00

exmpp in pubsub doc and retrocompatibility comments (thanks to Karim Gemayel)

SVN Revision: 2934
This commit is contained in:
Badlop 2010-01-27 18:53:56 +00:00
parent e4a6d20328
commit 887a65aa18
5 changed files with 34 additions and 11 deletions

View File

@ -120,6 +120,7 @@ process_iq_reply(From, To, #iq{id = ID} = IQ) ->
nothing
end.
%% #xmlelement{} used for retro-compatibility
route(FromOld, ToOld, #xmlelement{} = PacketOld) ->
catch throw(for_stacktrace), % To have a stacktrace.
io:format("~nLOCAL: old #xmlelement:~n~p~n~p~n~n",
@ -232,6 +233,8 @@ handle_cast(_Msg, State) ->
%% {stop, Reason, State}
%% Description: Handling all non call/cast messages
%%--------------------------------------------------------------------
%% #xmlelement{} used for retro-compatibility
handle_info({route, FromOld, ToOld, #xmlelement{} = PacketOld}, State) ->
catch throw(for_stacktrace), % To have a stacktrace.
io:format("~nLOCAL: old #xmlelement:~n~p~n~p~n~n",

View File

@ -63,7 +63,7 @@
start_link() ->
gen_server:start_link({local, ?MODULE}, ?MODULE, [], []).
%% #xmlelement{} used for retro-compatibility
route(FromOld, ToOld, #xmlelement{} = PacketOld) ->
catch throw(for_stacktrace), % To have a stacktrace.
io:format("~nROUTER: old #xmlelement:~n~p~n~p~n~n",
@ -255,6 +255,7 @@ handle_cast(_Msg, State) ->
%% {stop, Reason, State}
%% Description: Handling all non call/cast messages
%%--------------------------------------------------------------------
%% #xmlelement{} used for retro-compatibility
handle_info({route, FromOld, ToOld, #xmlelement{} = PacketOld}, State) ->
catch throw(for_stacktrace), % To have a stacktrace.
io:format("~nROUTER: old #xmlelement:~n~p~n~p~n~n",

View File

@ -77,6 +77,7 @@
start_link() ->
gen_server:start_link({local, ?MODULE}, ?MODULE, [], []).
%% #xmlelement{} used for retro-compatibility
route(FromOld, ToOld, #xmlelement{} = PacketOld) ->
catch throw(for_stacktrace), % To have a stacktrace.
io:format("~nS2S: old #xmlelement:~n~p~n~p~n~n",
@ -219,6 +220,7 @@ handle_cast(_Msg, State) ->
handle_info({mnesia_system_event, {mnesia_down, Node}}, State) ->
clean_table_from_bad_node(Node),
{noreply, State};
%% #xmlelement{} used for retro-compatibility
handle_info({route, FromOld, ToOld, #xmlelement{} = PacketOld}, State) ->
catch throw(for_stacktrace), % To have a stacktrace.
io:format("~nS2S: old #xmlelement:~n~p~n~p~n~n",

View File

@ -91,7 +91,7 @@
%%--------------------------------------------------------------------
start_link() ->
gen_server:start_link({local, ?MODULE}, ?MODULE, [], []).
%% #xmlelement{} used for retro-compatibility
route(FromOld, ToOld, #xmlelement{} = PacketOld) ->
catch throw(for_stacktrace), % To have a stacktrace.
io:format("~nSM: old #xmlelement:~n~p~n~p~n~n",
@ -343,6 +343,7 @@ handle_cast(_Msg, State) ->
%% {stop, Reason, State}
%% Description: Handling all non call/cast messages
%%--------------------------------------------------------------------
%% #xmlelement{} used for retro-compatibility
handle_info({route, FromOld, ToOld, #xmlelement{} = PacketOld}, State) ->
catch throw(for_stacktrace), % To have a stacktrace.
io:format("~nSM: old #xmlelement:~n~p~n~p~n~n",

View File

@ -44,18 +44,34 @@
%%% of the current node. For example:
%%% ```["home", "localhost", "cromain", "node1"]'''</p>
%%% @type stanzaError() = #xmlelement{}.
%%% @type stanzaError() = #xmlel{}.
%%% Example:
%%% ```{xmlelement, "error",
%%% [{"code", Code}, {"type", Type}],
%%% [{xmlelement, Condition, [{"xmlns", ?NS_STANZAS}], []}]}'''
%%% ```#xmlel{name = 'error'
%%% ns = ?NS_STANZAS,
%%% attrs = [
%%% #xmlattr{
%%% name = 'code',
%%% ns = ?NS_STANZAS,
%%% value = Code
%%% },
%%% attrs = [
%%% #xmlattr{
%%% name = 'type',
%%% ns = ?NS_STANZAS,
%%% value = Type
%%% }
%%% ]}'''
%%% @type pubsubIQResponse() = #xmlelement{}.
%%% @type pubsubIQResponse() = #xmlel{}.
%%% Example:
%%% ```{xmlelement, "pubsub",
%%% [{"xmlns", ?NS_PUBSUB_EVENT}],
%%% [{xmlelement, "affiliations", [],
%%% []}]}'''
%%% ```#xmlel{name = 'pubsub',
%%% ns = ?NS_PUBSUB,
%%% children = [
%%% #xmlel{name = 'affiliations'
%%% ns = ?NS_PUBSUB
%%% }
%%% ]
%%% }'''
%%% @type nodeOption() = {Option::atom(), Value::term()}.
%%% Example: