diff options
| author | Evgeniy Khramtsov <ekhramtsov@process-one.net> | 2016-03-09 11:19:15 +0300 |
|---|---|---|
| committer | Evgeniy Khramtsov <ekhramtsov@process-one.net> | 2016-03-09 11:19:15 +0300 |
| commit | e31799a3b195e7f1a1f28b562b16a680396b9c90 (patch) | |
| tree | 72de7188336bed962781a8bfba4608a4d2803f2c | |
| parent | Unregister hooks and iq handlers on terminate (diff) | |
Define mod_opt_type/1 callback
| -rw-r--r-- | src/mod_mix.erl | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/mod_mix.erl b/src/mod_mix.erl index 48dd7724..8224ec78 100644 --- a/src/mod_mix.erl +++ b/src/mod_mix.erl @@ -14,7 +14,7 @@ %% API -export([start_link/2, start/2, stop/1, process_iq/3, disco_items/5, disco_identity/5, disco_info/5, - disco_features/5]). + disco_features/5, mod_opt_type/1]). %% gen_server callbacks -export([init/1, handle_call/3, handle_cast/2, handle_info/2, @@ -341,3 +341,7 @@ is_not_subscribed({error, ErrEl}) -> #xmlel{} -> true; _ -> false end. + +mod_opt_type(iqdisc) -> fun gen_iq_handler:check_type/1; +mod_opt_type(host) -> fun iolist_to_binary/1; +mod_opt_type(_) -> [host, iqdisc]. |
