mirror of
https://github.com/processone/ejabberd.git
synced 2024-11-20 16:15:59 +01:00
Move copyright definition to ejabberd.hrl
This commit is contained in:
parent
6f2f1e87c9
commit
5d434c1aea
@ -39,6 +39,8 @@
|
|||||||
|
|
||||||
-define(EJABBERD_URI, <<"http://www.process-one.net/en/ejabberd/">>).
|
-define(EJABBERD_URI, <<"http://www.process-one.net/en/ejabberd/">>).
|
||||||
|
|
||||||
|
-define(COPYRIGHT, "Copyright (c) 2002-2016 ProcessOne").
|
||||||
|
|
||||||
-define(S2STIMEOUT, timer:minutes(10)).
|
-define(S2STIMEOUT, timer:minutes(10)).
|
||||||
|
|
||||||
%%-define(DBGFSM, true).
|
%%-define(DBGFSM, true).
|
||||||
|
@ -420,10 +420,9 @@ iq_disco(ServerHost, Node, Lang) ->
|
|||||||
|
|
||||||
iq_get_vcard(Lang) ->
|
iq_get_vcard(Lang) ->
|
||||||
Desc = translate:translate(Lang, <<"ejabberd IRC module">>),
|
Desc = translate:translate(Lang, <<"ejabberd IRC module">>),
|
||||||
Copyright = <<"Copyright (c) 2003-2016 ProcessOne">>,
|
|
||||||
#vcard_temp{fn = <<"ejabberd/mod_irc">>,
|
#vcard_temp{fn = <<"ejabberd/mod_irc">>,
|
||||||
url = ?EJABBERD_URI,
|
url = ?EJABBERD_URI,
|
||||||
desc = <<Desc/binary, $\n, Copyright/binary>>}.
|
desc = <<Desc/binary, $\n, ?COPYRIGHT>>}.
|
||||||
|
|
||||||
command_items(ServerHost, Host, Lang) ->
|
command_items(ServerHost, Host, Lang) ->
|
||||||
lists:map(fun({Node, Name, _Function}) ->
|
lists:map(fun({Node, Name, _Function}) ->
|
||||||
|
@ -429,11 +429,10 @@ do_route1(Host, ServerHost, Access, HistorySize, RoomShaper,
|
|||||||
-spec process_vcard(iq()) -> iq().
|
-spec process_vcard(iq()) -> iq().
|
||||||
process_vcard(#iq{type = get, lang = Lang, sub_els = [#vcard_temp{}]} = IQ) ->
|
process_vcard(#iq{type = get, lang = Lang, sub_els = [#vcard_temp{}]} = IQ) ->
|
||||||
Desc = translate:translate(Lang, <<"ejabberd MUC module">>),
|
Desc = translate:translate(Lang, <<"ejabberd MUC module">>),
|
||||||
Copyright = <<"Copyright (c) 2003-2016 ProcessOne">>,
|
|
||||||
xmpp:make_iq_result(
|
xmpp:make_iq_result(
|
||||||
IQ, #vcard_temp{fn = <<"ejabberd/mod_muc">>,
|
IQ, #vcard_temp{fn = <<"ejabberd/mod_muc">>,
|
||||||
url = ?EJABBERD_URI,
|
url = ?EJABBERD_URI,
|
||||||
desc = <<Desc/binary, $\n, Copyright/binary>>});
|
desc = <<Desc/binary, $\n, ?COPYRIGHT>>});
|
||||||
process_vcard(#iq{type = set, lang = Lang} = IQ) ->
|
process_vcard(#iq{type = set, lang = Lang} = IQ) ->
|
||||||
Txt = <<"Value 'set' of 'type' attribute is not allowed">>,
|
Txt = <<"Value 'set' of 'type' attribute is not allowed">>,
|
||||||
xmpp:make_error(IQ, xmpp:err_not_allowed(Txt, Lang));
|
xmpp:make_error(IQ, xmpp:err_not_allowed(Txt, Lang));
|
||||||
|
@ -268,10 +268,9 @@ iq_disco_info(From, Lang, State) ->
|
|||||||
|
|
||||||
iq_vcard(Lang) ->
|
iq_vcard(Lang) ->
|
||||||
Desc = translate:translate(Lang, <<"ejabberd Multicast service">>),
|
Desc = translate:translate(Lang, <<"ejabberd Multicast service">>),
|
||||||
Copyright = <<"Copyright (c) 2002-2016 ProcessOne">>,
|
|
||||||
#vcard_temp{fn = <<"ejabberd/mod_multicast">>,
|
#vcard_temp{fn = <<"ejabberd/mod_multicast">>,
|
||||||
url = ?EJABBERD_URI,
|
url = ?EJABBERD_URI,
|
||||||
desc = <<Desc/binary, $\n, Copyright/binary>>}.
|
desc = <<Desc/binary, $\n, ?COPYRIGHT>>}.
|
||||||
|
|
||||||
%%%-------------------------
|
%%%-------------------------
|
||||||
%%% Route
|
%%% Route
|
||||||
|
@ -136,11 +136,10 @@ process_vcard(#iq{type = set, lang = Lang} = IQ) ->
|
|||||||
xmpp:make_error(IQ, xmpp:err_not_allowed(Txt, Lang));
|
xmpp:make_error(IQ, xmpp:err_not_allowed(Txt, Lang));
|
||||||
process_vcard(#iq{type = get, lang = Lang} = IQ) ->
|
process_vcard(#iq{type = get, lang = Lang} = IQ) ->
|
||||||
Desc = translate:translate(Lang, <<"ejabberd SOCKS5 Bytestreams module">>),
|
Desc = translate:translate(Lang, <<"ejabberd SOCKS5 Bytestreams module">>),
|
||||||
Copyright = <<"Copyright (c) 2003-2016 ProcessOne">>,
|
|
||||||
xmpp:make_iq_result(
|
xmpp:make_iq_result(
|
||||||
IQ, #vcard_temp{fn = <<"ejabberd/mod_proxy65">>,
|
IQ, #vcard_temp{fn = <<"ejabberd/mod_proxy65">>,
|
||||||
url = ?EJABBERD_URI,
|
url = ?EJABBERD_URI,
|
||||||
desc = <<Desc/binary, $\n, Copyright/binary>>}).
|
desc = <<Desc/binary, $\n, ?COPYRIGHT>>}).
|
||||||
|
|
||||||
-spec process_bytestreams(iq()) -> iq().
|
-spec process_bytestreams(iq()) -> iq().
|
||||||
process_bytestreams(#iq{type = get, from = JID, to = To, lang = Lang} = IQ) ->
|
process_bytestreams(#iq{type = get, from = JID, to = To, lang = Lang} = IQ) ->
|
||||||
|
@ -1186,10 +1186,9 @@ iq_sm(#iq{to = To, sub_els = [SubEl]} = IQ) ->
|
|||||||
-spec iq_get_vcard(binary()) -> vcard_temp().
|
-spec iq_get_vcard(binary()) -> vcard_temp().
|
||||||
iq_get_vcard(Lang) ->
|
iq_get_vcard(Lang) ->
|
||||||
Desc = translate:translate(Lang, <<"ejabberd Publish-Subscribe module">>),
|
Desc = translate:translate(Lang, <<"ejabberd Publish-Subscribe module">>),
|
||||||
Copyright = <<"Copyright (c) 2004-2016 ProcessOne">>,
|
|
||||||
#vcard_temp{fn = <<"ejabberd/mod_pubsub">>,
|
#vcard_temp{fn = <<"ejabberd/mod_pubsub">>,
|
||||||
url = ?EJABBERD_URI,
|
url = ?EJABBERD_URI,
|
||||||
desc = <<Desc/binary, $\n, Copyright/binary>>}.
|
desc = <<Desc/binary, $\n, ?COPYRIGHT>>}.
|
||||||
|
|
||||||
-spec iq_pubsub(binary() | ljid(), atom(), iq()) ->
|
-spec iq_pubsub(binary() | ljid(), atom(), iq()) ->
|
||||||
{result, pubsub()} | {error, stanza_error()}.
|
{result, pubsub()} | {error, stanza_error()}.
|
||||||
|
@ -191,11 +191,10 @@ process_local_iq(#iq{type = set, lang = Lang} = IQ) ->
|
|||||||
xmpp:make_error(IQ, xmpp:err_not_allowed(Txt, Lang));
|
xmpp:make_error(IQ, xmpp:err_not_allowed(Txt, Lang));
|
||||||
process_local_iq(#iq{type = get, lang = Lang} = IQ) ->
|
process_local_iq(#iq{type = get, lang = Lang} = IQ) ->
|
||||||
Desc = translate:translate(Lang, <<"Erlang Jabber Server">>),
|
Desc = translate:translate(Lang, <<"Erlang Jabber Server">>),
|
||||||
Copyright = <<"Copyright (c) 2002-2016 ProcessOne">>,
|
|
||||||
xmpp:make_iq_result(
|
xmpp:make_iq_result(
|
||||||
IQ, #vcard_temp{fn = <<"ejabberd">>,
|
IQ, #vcard_temp{fn = <<"ejabberd">>,
|
||||||
url = ?EJABBERD_URI,
|
url = ?EJABBERD_URI,
|
||||||
desc = <<Desc/binary, $\n, Copyright/binary>>,
|
desc = <<Desc/binary, $\n, ?COPYRIGHT>>,
|
||||||
bday = <<"2002-11-16">>}).
|
bday = <<"2002-11-16">>}).
|
||||||
|
|
||||||
-spec process_sm_iq(iq()) -> iq().
|
-spec process_sm_iq(iq()) -> iq().
|
||||||
@ -228,11 +227,10 @@ process_vcard(#iq{type = set, lang = Lang} = IQ) ->
|
|||||||
xmpp:make_error(IQ, xmpp:err_not_allowed(Txt, Lang));
|
xmpp:make_error(IQ, xmpp:err_not_allowed(Txt, Lang));
|
||||||
process_vcard(#iq{type = get, lang = Lang} = IQ) ->
|
process_vcard(#iq{type = get, lang = Lang} = IQ) ->
|
||||||
Desc = translate:translate(Lang, <<"ejabberd vCard module">>),
|
Desc = translate:translate(Lang, <<"ejabberd vCard module">>),
|
||||||
Copyright = <<"Copyright (c) 2003-2016 ProcessOne">>,
|
|
||||||
xmpp:make_iq_result(
|
xmpp:make_iq_result(
|
||||||
IQ, #vcard_temp{fn = <<"ejabberd/mod_vcard">>,
|
IQ, #vcard_temp{fn = <<"ejabberd/mod_vcard">>,
|
||||||
url = ?EJABBERD_URI,
|
url = ?EJABBERD_URI,
|
||||||
desc = <<Desc/binary, $\n, Copyright/binary>>}).
|
desc = <<Desc/binary, $\n, ?COPYRIGHT>>}).
|
||||||
|
|
||||||
-spec process_search(iq()) -> iq().
|
-spec process_search(iq()) -> iq().
|
||||||
process_search(#iq{type = get, to = To, lang = Lang} = IQ) ->
|
process_search(#iq{type = get, to = To, lang = Lang} = IQ) ->
|
||||||
|
@ -24,12 +24,20 @@
|
|||||||
%%%===================================================================
|
%%%===================================================================
|
||||||
single_cases() ->
|
single_cases() ->
|
||||||
{proxy65_single, [sequence],
|
{proxy65_single, [sequence],
|
||||||
[single_test(feature_enabled)]}.
|
[single_test(feature_enabled),
|
||||||
|
single_test(service_vcard)]}.
|
||||||
|
|
||||||
feature_enabled(Config) ->
|
feature_enabled(Config) ->
|
||||||
true = is_feature_advertised(Config, ?NS_BYTESTREAMS, proxy_jid(Config)),
|
true = is_feature_advertised(Config, ?NS_BYTESTREAMS, proxy_jid(Config)),
|
||||||
disconnect(Config).
|
disconnect(Config).
|
||||||
|
|
||||||
|
service_vcard(Config) ->
|
||||||
|
JID = proxy_jid(Config),
|
||||||
|
ct:comment("Retreiving vCard from ~s", [jid:to_string(JID)]),
|
||||||
|
#iq{type = result, sub_els = [#vcard_temp{}]} =
|
||||||
|
send_recv(Config, #iq{type = get, to = JID, sub_els = [#vcard_temp{}]}),
|
||||||
|
disconnect(Config).
|
||||||
|
|
||||||
%%%===================================================================
|
%%%===================================================================
|
||||||
%%% Master-slave tests
|
%%% Master-slave tests
|
||||||
%%%===================================================================
|
%%%===================================================================
|
||||||
|
@ -25,6 +25,7 @@
|
|||||||
single_cases() ->
|
single_cases() ->
|
||||||
{pubsub_single, [sequence],
|
{pubsub_single, [sequence],
|
||||||
[single_test(test_features),
|
[single_test(test_features),
|
||||||
|
single_test(test_vcard),
|
||||||
single_test(test_create),
|
single_test(test_create),
|
||||||
single_test(test_configure),
|
single_test(test_configure),
|
||||||
single_test(test_delete),
|
single_test(test_delete),
|
||||||
@ -67,6 +68,13 @@ test_features(Config) ->
|
|||||||
true = sets:is_subset(NeededFeatures, AllFeatures),
|
true = sets:is_subset(NeededFeatures, AllFeatures),
|
||||||
disconnect(Config).
|
disconnect(Config).
|
||||||
|
|
||||||
|
test_vcard(Config) ->
|
||||||
|
JID = pubsub_jid(Config),
|
||||||
|
ct:comment("Retreiving vCard from ~s", [jid:to_string(JID)]),
|
||||||
|
#iq{type = result, sub_els = [#vcard_temp{}]} =
|
||||||
|
send_recv(Config, #iq{type = get, to = JID, sub_els = [#vcard_temp{}]}),
|
||||||
|
disconnect(Config).
|
||||||
|
|
||||||
test_create(Config) ->
|
test_create(Config) ->
|
||||||
Node = ?config(pubsub_node, Config),
|
Node = ?config(pubsub_node, Config),
|
||||||
Node = create_node(Config, Node),
|
Node = create_node(Config, Node),
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
%% API
|
%% API
|
||||||
-compile(export_all).
|
-compile(export_all).
|
||||||
-import(suite, [send_recv/2, disconnect/1, is_feature_advertised/2,
|
-import(suite, [send_recv/2, disconnect/1, is_feature_advertised/2,
|
||||||
is_feature_advertised/3,
|
is_feature_advertised/3, server_jid/1,
|
||||||
my_jid/1, wait_for_slave/1, wait_for_master/1,
|
my_jid/1, wait_for_slave/1, wait_for_master/1,
|
||||||
recv_presence/1, recv/1]).
|
recv_presence/1, recv/1]).
|
||||||
|
|
||||||
@ -26,7 +26,8 @@
|
|||||||
single_cases() ->
|
single_cases() ->
|
||||||
{vcard_single, [sequence],
|
{vcard_single, [sequence],
|
||||||
[single_test(feature_enabled),
|
[single_test(feature_enabled),
|
||||||
single_test(get_set)]}.
|
single_test(get_set),
|
||||||
|
single_test(service_vcard)]}.
|
||||||
|
|
||||||
feature_enabled(Config) ->
|
feature_enabled(Config) ->
|
||||||
BareMyJID = jid:remove_resource(my_jid(Config)),
|
BareMyJID = jid:remove_resource(my_jid(Config)),
|
||||||
@ -72,6 +73,13 @@ get_set(Config) ->
|
|||||||
send_recv(Config, #iq{type = get, sub_els = [#vcard_temp{}]}),
|
send_recv(Config, #iq{type = get, sub_els = [#vcard_temp{}]}),
|
||||||
disconnect(Config).
|
disconnect(Config).
|
||||||
|
|
||||||
|
service_vcard(Config) ->
|
||||||
|
JID = server_jid(Config),
|
||||||
|
ct:comment("Retreiving vCard from ~s", [jid:to_string(JID)]),
|
||||||
|
#iq{type = result, sub_els = [#vcard_temp{}]} =
|
||||||
|
send_recv(Config, #iq{type = get, to = JID, sub_els = [#vcard_temp{}]}),
|
||||||
|
disconnect(Config).
|
||||||
|
|
||||||
%%%===================================================================
|
%%%===================================================================
|
||||||
%%% Master-slave tests
|
%%% Master-slave tests
|
||||||
%%%===================================================================
|
%%%===================================================================
|
||||||
|
Loading…
Reference in New Issue
Block a user