mirror of
https://github.com/processone/ejabberd.git
synced 2024-11-24 16:23:40 +01:00
ejabberd_commands: Update -type and remove obsolete @type
This commit is contained in:
parent
97568195d6
commit
1326a7764a
@ -67,42 +67,24 @@
|
|||||||
args_example = none :: none | [any()] | '_',
|
args_example = none :: none | [any()] | '_',
|
||||||
result_example = none :: any()}).
|
result_example = none :: any()}).
|
||||||
|
|
||||||
%% TODO Fix me: Type is not up to date
|
-type ejabberd_commands() :: #ejabberd_commands{name :: atom(),
|
||||||
-type ejabberd_commands() :: #ejabberd_commands{name :: atom(),
|
tags :: [atom()],
|
||||||
tags :: [atom()],
|
desc :: string(),
|
||||||
desc :: string(),
|
longdesc :: string(),
|
||||||
longdesc :: string(),
|
version :: integer(),
|
||||||
version :: integer(),
|
note :: string(),
|
||||||
module :: atom(),
|
weight :: integer(),
|
||||||
function :: atom(),
|
module :: atom(),
|
||||||
args :: [aterm()],
|
function :: atom(),
|
||||||
policy :: open | restricted | admin | user,
|
args :: [aterm()],
|
||||||
access :: [{atom(),atom(),atom()}|atom()],
|
policy :: open | restricted | admin | user,
|
||||||
result :: rterm()}.
|
access :: [{atom(),atom(),atom()}|atom()],
|
||||||
|
definer :: atom(),
|
||||||
|
result :: rterm(),
|
||||||
|
args_rename :: [{atom(),atom()}],
|
||||||
|
args_desc :: none | [string()] | '_',
|
||||||
|
result_desc :: none | string() | '_',
|
||||||
|
args_example :: none | [any()] | '_',
|
||||||
|
result_example :: any()
|
||||||
|
}.
|
||||||
|
|
||||||
%% @type ejabberd_commands() = #ejabberd_commands{
|
|
||||||
%% name = atom(),
|
|
||||||
%% tags = [atom()],
|
|
||||||
%% desc = string(),
|
|
||||||
%% longdesc = string(),
|
|
||||||
%% module = atom(),
|
|
||||||
%% function = atom(),
|
|
||||||
%% args = [aterm()],
|
|
||||||
%% result = rterm()
|
|
||||||
%% }.
|
|
||||||
%% desc: Description of the command
|
|
||||||
%% args: Describe the accepted arguments.
|
|
||||||
%% This way the function that calls the command can format the
|
|
||||||
%% arguments before calling.
|
|
||||||
|
|
||||||
%% @type atype() = integer | string | {tuple, [aterm()]} | {list, aterm()}.
|
|
||||||
%% Allowed types for arguments are integer, string, tuple and list.
|
|
||||||
|
|
||||||
%% @type rtype() = integer | string | atom | {tuple, [rterm()]} | {list, rterm()} | rescode | restuple.
|
|
||||||
%% A rtype is either an atom or a tuple with two elements.
|
|
||||||
|
|
||||||
%% @type aterm() = {Name::atom(), Type::atype()}.
|
|
||||||
%% An argument term is a tuple with the term name and the term type.
|
|
||||||
|
|
||||||
%% @type rterm() = {Name::atom(), Type::rtype()}.
|
|
||||||
%% A result term is a tuple with the term name and the term type.
|
|
||||||
|
Loading…
Reference in New Issue
Block a user