./ct_report/coverage/mod_mam_params.COVER.html

1 %%==============================================================================
2 %% Copyright 2018 Erlang Solutions Ltd.
3 %%
4 %% Licensed under the Apache License, Version 2.0 (the "License");
5 %% you may not use this file except in compliance with the License.
6 %% You may obtain a copy of the License at
7 %%
8 %% http://www.apache.org/licenses/LICENSE-2.0
9 %%
10 %% Unless required by applicable law or agreed to in writing, software
11 %% distributed under the License is distributed on an "AS IS" BASIS,
12 %% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 %% See the License for the specific language governing permissions and
14 %% limitations under the License.
15 %%==============================================================================
16
17 -module(mod_mam_params).
18
19 -type mam_module() :: mod_mam | mod_mam_muc.
20
21 -export([extra_params_module/2, max_result_limit/2, default_result_limit/2,
22 has_full_text_search/2, is_archivable_message_module/2, send_message_mod/2,
23 archive_chat_markers/2, add_stanzaid_element/2, extra_fin_element_module/2]).
24
25 %%--------------------------------------------------------------------
26 %% API
27 %%--------------------------------------------------------------------
28
29 -spec extra_params_module(mam_module(), mongooseim:host_type()) -> module() | undefined.
30 extra_params_module(Module, HostType) ->
31 1149 gen_mod:get_module_opt(HostType, Module, extra_lookup_params, undefined).
32
33 -spec max_result_limit(mam_module(), mongooseim:host_type()) -> pos_integer().
34 max_result_limit(Module, HostType) ->
35 1149 gen_mod:get_module_opt(HostType, Module, max_result_limit).
36
37 -spec default_result_limit(mam_module(), mongooseim:host_type()) -> pos_integer().
38 default_result_limit(Module, HostType) ->
39 1149 gen_mod:get_module_opt(HostType, Module, default_result_limit).
40
41
42 -spec has_full_text_search(Module :: mod_mam | mod_mam_muc, mongooseim:host_type()) -> boolean().
43 has_full_text_search(Module, HostType) ->
44 49 gen_mod:get_module_opt(HostType, Module, full_text_search).
45
46 -spec is_archivable_message_module(mam_module(), mongooseim:host_type()) -> module().
47 is_archivable_message_module(Module, HostType) ->
48 13550 gen_mod:get_module_opt(HostType, Module, is_archivable_message).
49
50 -spec send_message_mod(mam_module(), mongooseim:host_type()) -> module().
51 send_message_mod(Module, HostType) ->
52 1079 gen_mod:get_module_opt(HostType, Module, send_message).
53
54 -spec archive_chat_markers(mam_module(), mongooseim:host_type()) -> boolean().
55 archive_chat_markers(Module, HostType) ->
56 13550 gen_mod:get_module_opt(HostType, Module, archive_chat_markers).
57
58 -spec add_stanzaid_element(mam_module(), mongooseim:host_type()) -> boolean().
59 add_stanzaid_element(Module, HostType) ->
60 1603 not gen_mod:get_module_opt(HostType, Module, no_stanzaid_element).
61
62 -spec extra_fin_element_module(mam_module(), mongooseim:host_type()) -> module() | undefined.
63 extra_fin_element_module(Module, HostType) ->
64 1079 gen_mod:get_module_opt(HostType, Module, extra_fin_element, undefined).
Line Hits Source