-
Notifications
You must be signed in to change notification settings - Fork 428
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Kamil Waz
committed
Nov 8, 2022
1 parent
7c74198
commit 3351768
Showing
23 changed files
with
1,002 additions
and
799 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,40 @@ | ||
-module(ejabberd_gen_mam_archive). | ||
|
||
-ignore_xref([behaviour_info/1]). | ||
|
||
-callback archive_size(Size :: integer(), Host :: jid:server(), | ||
ArchiveID :: mod_mam:archive_id(), ArchiveJID :: jid:jid()) | ||
-> integer(). | ||
|
||
-callback archive_message(Result :: any(), Host :: jid:server(), | ||
Params :: mod_mam:archive_message_params()) -> ok | {error, timeout}. | ||
|
||
-callback lookup_messages(Result :: any(), Host :: jid:server(), | ||
Params :: map()) -> Result when | ||
Result :: {ok, mod_mam:lookup_result()} | {error, 'policy-violation'}. | ||
|
||
-callback get_mam_pm_gdpr_data(mam_pm_gdpr_data(), mongooseim:host_type(), jid:jid()) -> mam_pm_gdpr_data(). | ||
|
||
-callback get_mam_muc_gdpr_data(mam_muc_gdpr_data(), mongooseim:host_type(), jid:jid()) -> mam_muc_gdpr_data(). | ||
-callback archive_size(Acc, Params, Extra) -> {ok | stop, Acc} when | ||
Acc :: integer(), | ||
Params :: map(), | ||
Extra :: map(). | ||
|
||
-callback archive_message(Acc, Params, Extra) -> {ok | stop, Acc} when | ||
Acc :: ok | {error, term()}, | ||
Params :: map(), | ||
Extra :: map(). | ||
|
||
-callback lookup_messages(Acc, Params, Extra) -> {ok | stop, Acc} when | ||
Acc :: {ok, mod_mam:lookup_result()} | {error, term()}, | ||
Params :: map(), | ||
Extra :: map(). | ||
|
||
-callback get_mam_pm_gdpr_data(Acc, Params, Extra) -> {ok | stop, Acc} when | ||
Acc :: mam_pm_gdpr_data(), | ||
Params :: map(), | ||
Extra :: map(). | ||
|
||
-callback get_mam_muc_gdpr_data(Acc, Params, Extra) -> {ok | stop, Acc} when | ||
Acc :: mam_muc_gdpr_data(), | ||
Params :: map(), | ||
Extra :: map(). | ||
|
||
-optional_callbacks([get_mam_pm_gdpr_data/3, | ||
get_mam_muc_gdpr_data/3, | ||
archive_size/4, | ||
archive_size/3, | ||
lookup_messages/3]). | ||
|
||
-type mam_pm_gdpr_data() :: [{MessageID :: bitstring(), FromJID :: bitstring(), Message :: bitstring()}]. | ||
-type mam_pm_gdpr_data() :: [{MessageID :: bitstring(), | ||
FromJID :: bitstring(), | ||
Message :: bitstring()}]. | ||
|
||
-type mam_muc_gdpr_data() :: [{MessageID :: bitstring(), Message :: bitstring()}]. | ||
-type mam_muc_gdpr_data() :: [{MessageID :: bitstring(), | ||
Message :: bitstring()}]. | ||
|
||
-export_type([mam_pm_gdpr_data/0, mam_muc_gdpr_data/0]). | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,16 @@ | ||
-module(ejabberd_gen_mam_prefs). | ||
|
||
-ignore_xref([behaviour_info/1]). | ||
-callback get_behaviour(Acc, Params, Extra) -> {ok | stop, Acc} when | ||
Acc :: mod_mam:archive_behaviour(), | ||
Params :: map(), | ||
Extra :: map(). | ||
|
||
-callback get_behaviour(Default :: mod_mam:archive_behaviour(), | ||
Host :: jid:server(), ArcID :: mod_mam:archive_id(), | ||
LocJID :: jid:jid(), RemJID :: jid:jid()) -> any(). | ||
|
||
-callback set_prefs(Result :: any(), Host :: jid:server(), | ||
ArcID :: mod_mam:archive_id(), ArcJID :: jid:jid(), | ||
DefaultMode :: mod_mam:archive_behaviour(), | ||
AlwaysJIDs :: [jid:literal_jid()], | ||
NeverJIDs :: [jid:literal_jid()]) -> any(). | ||
|
||
-callback get_prefs(mod_mam:preference(), _Host :: jid:server(), | ||
ArcId :: mod_mam:archive_id(), ArcJID :: jid:jid()) | ||
-> mod_mam:preference(). | ||
-callback set_prefs(Acc, Params, Extra) -> {ok, Acc} when | ||
Acc :: term(), | ||
Params :: map(), | ||
Extra :: map(). | ||
|
||
-callback get_prefs(Acc, Params, Extra) -> {ok, Acc} when | ||
Acc :: mod_mam:preference() | {error, Reason :: term()}, | ||
Params :: map(), | ||
Extra :: map(). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.