]> granicus.if.org Git - ejabberd/commitdiff
Fix EDoc errors.
authorBadlop <badlop@process-one.net>
Mon, 17 Aug 2009 17:16:43 +0000 (17:16 +0000)
committerBadlop <badlop@process-one.net>
Mon, 17 Aug 2009 17:16:43 +0000 (17:16 +0000)
SVN Revision: 2494

14 files changed:
src/ejabberd_auth.erl
src/ejabberd_commands.erl
src/ejabberd_ctl.erl
src/ejabberd_piefxis.erl
src/mod_pubsub/mod_pubsub.erl
src/mod_pubsub/mod_pubsub_odbc.erl
src/mod_pubsub/node_hometree.erl
src/mod_pubsub/node_hometree_odbc.erl
src/mod_pubsub/nodetree_tree.erl
src/mod_pubsub/nodetree_tree_odbc.erl
src/mod_pubsub/nodetree_virtual.erl
src/mod_pubsub/pubsub.hrl
src/mod_pubsub/pubsub_subscription_odbc.erl
src/web/mod_http_fileserver.erl

index 90bb34d1766c4d5658efe31f5fbf951f18c02897..041fe1cc44828d07fc296206f536639e413bf4b1 100644 (file)
@@ -84,7 +84,7 @@ check_password(User, Server, Password) ->
     end.
 
 %% @doc Check if the user and password can login in server.
-%% @spec (User::string(), Server::string(), Password::string()
+%% @spec (User::string(), Server::string(), Password::string(),
 %%        Digest::string(), DigestGen::function()) ->
 %%     true | false
 check_password(User, Server, Password, Digest, DigestGen) ->
index adfd125525ee38b8dded8d7d8df07aabce0079e8..f0e212277bbf94eadb43abab4e522847953a6176 100644 (file)
@@ -290,12 +290,12 @@ get_command_definition(Name) ->
 execute_command(Name, Arguments) ->
     execute_command([], noauth, Name, Arguments).
 
-%% @spec (AccessCommands, AuthList, Name::atom(), Arguments) -> ResultTerm | {error, Error}
+%% @spec (AccessCommands, Auth, Name::atom(), Arguments) -> ResultTerm | {error, Error}
 %% where 
 %%       AccessCommands = [{Access, CommandNames, Arguments}]
-%%       Auth = {user, string()}, {server, string()}, {password, string()} | noauth
+%%       Auth = {User::string(), Server::string(), Password::string()} | noauth
 %%       Method = atom()
-%%       Arguments = [...]
+%%       Arguments = [any()]
 %%       Error = command_unknown | account_unprivileged | invalid_account_data | no_auth_provided
 execute_command(AccessCommands, Auth, Name, Arguments) ->
     case ets:lookup(ejabberd_commands, Name) of
@@ -346,14 +346,15 @@ get_tags_commands() ->
 %% Access verification
 %% -----------------------------
 
-%% At least one AccessCommand must be satisfied
 %% @spec (AccessCommands, Auth, Method, Command, Arguments) -> ok
 %% where 
 %%       AccessCommands =  [ {Access, CommandNames, Arguments} ]
-%%       Auth = {User::string(), Server::string(), Password::string()}
+%%       Auth = {User::string(), Server::string(), Password::string()} | noauth
 %%       Method = atom()
-%%       Arguments = [...]
-%% It may throw {error, Error} where
+%%       Arguments = [any()]
+%% @doc Check access is allowed to that command.
+%% At least one AccessCommand must be satisfied.
+%% It may throw {error, Error} where:
 %% Error = account_unprivileged | invalid_account_data | no_auth_provided
 check_access_commands([], _Auth, _Method, _Command, _Arguments) ->
     ok;
index 264bbaa53dd10754040c5515c92968f1ec1c2afa..7919986aea66b3a91a00129bc8ed7e5c9cf1e197 100644 (file)
@@ -275,7 +275,7 @@ try_call_command(Args, Auth, AccessCommands) ->
            {io_lib:format("Problem '~p ~p' occurred executing the command.~nStacktrace: ~p", [A, Why, Stack]), ?STATUS_ERROR}
     end.
 
-%% @spec (Args::[string()], Auth) -> string() | integer() | {string(), integer()} | {error, ErrorType}
+%% @spec (Args::[string()], Auth, AccessCommands) -> string() | integer() | {string(), integer()} | {error, ErrorType}
 call_command([CmdString | Args], Auth, AccessCommands) ->
     {ok, CmdStringU, _} = regexp:gsub(CmdString, "-", "_"),
     Command = list_to_atom(CmdStringU),
index 1c085383c4a69c6b910361667086412746dd629b..85b1f258366895cc230eed7ddda4ab20e8377eda 100644 (file)
@@ -201,11 +201,8 @@ add_user(El, Domain) ->
     Password = exmpp_xml:get_attribute(El,password,none),
     add_user(El, Domain, ?BTL(User), ?BTL(Password)).
 
-%% @spec El = XML element
-%%       Domain = String with a domain name
-%%       User = String with an user name
-%%       Password = String with an user password
-%% @ret ok | {atomic, exists} | {error, not_allowed}
+%% @spec (El::xmlel(), Domain::string(), User::string(), Password::string())
+%%       -> ok | {atomic, exists} | {error, not_allowed}
 %% @doc Add a new user to the database.
 %% If user already exists, it will be only updated.
 add_user(El, Domain, User, Password) ->
@@ -230,10 +227,8 @@ add_user(El, Domain, User, Password) ->
            ?ERROR_MSG("Error adding user ~s@~s: ~p~n", [User, Domain, Other])
     end.
 
-%% @spec User = String with User name
-%%       Password = String with a Password value
-%%       Domain = Stirng with a Domain name
-%% @ret  ok | {atomic, exists} | {error, not_allowed}
+%% @spec (User::string(), Password::string(), Domain::string())
+%%       -> ok | {atomic, exists} | {error, not_allowed}
 %% @doc  Create a new user
 create_user(User,Password,Domain) ->
     case ejabberd_auth:try_register(User,Domain,Password) of
@@ -246,14 +241,13 @@ create_user(User,Password,Domain) ->
 %%%==================================
 %%%% Populate user
 
-%% @spec User = String
-%%       Domain = String
-%%       El = XML element
-%% @ret  ok | {error, not_found}
+%% @spec (User::string(), Domain::string(), El::xml())
+%%      -> ok | {error, not_found}
 %%
 %% @doc  Add a new user from a XML file with a roster list.
 %%
 %% Example of a file:
+%% ```
 %% <?xml version='1.0' encoding='UTF-8'?>
 %% <server-data xmlns='http://www.xmpp.org/extensions/xep-0227.html#ns'>
 %%   <host jid='localhost'>
@@ -268,6 +262,7 @@ create_user(User,Password,Domain) ->
 %%     </user>
 %%   </host>
 %%  </server-data>
+%% '''
 
 populate_user(User,Domain,El=#xmlel{name='query', ns='jabber:iq:roster'}) ->
     io:format("Trying to add/update roster list...",[]),
@@ -297,6 +292,7 @@ populate_user(User,Domain,El=#xmlel{name='query', ns='jabber:iq:roster'}) ->
 %% @doc  Read vcards from the XML and send it to the server
 %%
 %% Example:
+%% ```
 %% <?xml version='1.0' encoding='UTF-8'?>
 %% <server-data xmlns='http://www.xmpp.org/extensions/xep-0227.html#ns'>
 %%   <host jid='localhost'>
@@ -307,6 +303,7 @@ populate_user(User,Domain,El=#xmlel{name='query', ns='jabber:iq:roster'}) ->
 %%     </user>
 %%   </host>
 %% </server-data>
+%% '''
 
 populate_user(User,Domain,El=#xmlel{name='vCard', ns='vcard-temp'}) ->
     io:format("Trying to add/update vCards...",[]),
@@ -515,7 +512,7 @@ make_xinclude(Fn) ->
 %%%% Export user
 
 %% @spec (Fd, Username::string(), Host::string()) -> ok
-%% extraer su informacion e imprimirla
+%% @doc Extract user information and print it.
 export_user(Fd, Username, Host) ->
     UserString = extract_user(Username, Host),
     print(Fd, UserString).
@@ -663,9 +660,8 @@ make_main_basefilename(Dir, FnT) ->
     filename:join([Dir, Filename2]).
 
 %% @spec (FnT::string(), Host::string()) -> FnH::string()
-%% FnH = FnT + _ + Host2 + Extension
-%% Host2 = Host with any . replaced by _
-%% Example: ("20080804-231550", "jabber.example.org") -> "20080804-231550_jabber_example_org.xml"
+%% @doc Make the filename for the host.
+%% Example: ``("20080804-231550", "jabber.example.org") -> "20080804-231550_jabber_example_org.xml"''
 make_host_filename(FnT, Host) ->
     Host2 = string:join(string:tokens(Host, "."), "_"),
     filename:flatten([FnT, "_", Host2, ".xml"]).
index 119f5e45d0e5e4782861293c7a66a3cb5fdfba9d..2f606d4df9ec5a75ae4dc6a37e231b47d881cb2b 100644 (file)
@@ -35,7 +35,7 @@
 %%% Functions concerning configuration should be rewritten.
 %%%
 %%% Support for subscription-options and multi-subscribe features was
-%%% added by Brian Cully <bjc@kublai.com>. Subscriptions and options are
+%%% added by Brian Cully (bjc AT kublai.com). Subscriptions and options are
 %%% stored in the pubsub_subscription table, with a link to them provided
 %%% by the subscriptions field of pubsub_state. For information on
 %%% subscription-options and mulit-subscribe see XEP-0060 sections 6.1.6,
@@ -1350,7 +1350,7 @@ adhoc_request(_Host, _ServerHost, _Owner, Other, _Access, _Plugins) ->
     ?DEBUG("Couldn't process ad hoc command:~n~p", [Other]),
     {error, ?ERR_ITEM_NOT_FOUND}.
 
-%% @spec (Host, Owner) -> iqRes()
+%% @spec (Host, Owner, Lang, Plugins) -> iqRes()
 %% @doc <p>Sends the process pending subscriptions XForm for Host to
 %% Owner.</p>
 send_pending_node_form(Host, Owner, _Lang, Plugins) ->
@@ -1795,7 +1795,7 @@ delete_node(Host, Node, Owner) ->
            Error
     end.
 
-%% @spec (Host, Node, From, JID) ->
+%% @spec (Host, Node, From, JID, Configuration) ->
 %%               {error, Reason::stanzaError()} |
 %%               {result, []}
 %%      Host = host()
@@ -2245,7 +2245,7 @@ get_item(Host, Node, ItemId) ->
        Error -> Error
     end.
 
-%% @spec (Host, Node, NodeId, Type LJID, Number) -> any()
+%% @spec (Host, Node, NodeId, Type, LJID, Number) -> any()
 %%      Host = pubsubHost()
 %%      Node = pubsubNode()
 %%      NodeId = pubsubNodeId()
@@ -2759,7 +2759,7 @@ service_jid(Host) ->
     _ -> {jid, "", Host, "", "", Host, ""}
     end.
 
-%% @spec (LJID, PresenceDelivery) -> boolean()
+%% @spec (LJID, NotifyType, Depth, NodeOptions, SubOptions) -> boolean()
 %%     LJID = jid()
 %%     NotifyType = items | nodes
 %%     Depth = integer()
@@ -3154,7 +3154,7 @@ node_options(Type) ->
            Result
     end.
 
-%% @spec (Options) -> MaxItems
+%% @spec (Host, Options) -> MaxItems
 %%      Host = host()
 %%      Options = [Option]
 %%      Option = {Key::atom(), Value::term()}
index c3e539e1f02ed48c6cda94b4c0cabfe3da424f1e..bab0e3734f14a7ee8473f3c4bb83f06b54e03609 100644 (file)
@@ -35,7 +35,7 @@
 %%% Functions concerning configuration should be rewritten.
 %%%
 %%% Support for subscription-options and multi-subscribe features was
-%%% added by Brian Cully <bjc@kublai.com>. Subscriptions and options are
+%%% added by Brian Cully (bjc AT kublai.com). Subscriptions and options are
 %%% stored in the pubsub_subscription table, with a link to them provided
 %%% by the subscriptions field of pubsub_state. For information on
 %%% subscription-options and mulit-subscribe see XEP-0060 sections 6.1.6,
@@ -1354,7 +1354,7 @@ adhoc_request(_Host, _ServerHost, _Owner, Other, _Access, _Plugins) ->
     ?DEBUG("Couldn't process ad hoc command:~n~p", [Other]),
     {error, ?ERR_ITEM_NOT_FOUND}.
 
-%% @spec (Host, Owner) -> iqRes()
+%% @spec (Host, Owner, Lang, Plugins) -> iqRes()
 %% @doc <p>Sends the process pending subscriptions XForm for Host to
 %% Owner.</p>
 send_pending_node_form(Host, Owner, _Lang, Plugins) ->
@@ -1800,7 +1800,7 @@ delete_node(Host, Node, Owner) ->
            Error
     end.
 
-%% @spec (Host, Node, From, JID) ->
+%% @spec (Host, Node, From, JID, Configuration) ->
 %%               {error, Reason::stanzaError()} |
 %%               {result, []}
 %%      Host = host()
@@ -2255,7 +2255,7 @@ get_item(Host, Node, ItemId) ->
        Error -> Error
     end.
 
-%% @spec (Host, Node, NodeId, Type LJID, Number) -> any()
+%% @spec (Host, Node, NodeId, Type, LJID, Number) -> any()
 %%      Host = pubsubHost()
 %%      Node = pubsubNode()
 %%      NodeId = pubsubNodeId()
@@ -2759,7 +2759,7 @@ service_jid(Host) ->
     _ -> {jid, "", Host, "", "", Host, ""}
     end.
 
-%% @spec (LJID, PresenceDelivery) -> boolean()
+%% @spec (LJID, NotifyType, Depth, NodeOptions, SubOptions) -> boolean()
 %%     LJID = jid()
 %%     NotifyType = items | nodes
 %%     Depth = integer()
@@ -3154,7 +3154,7 @@ node_options(Type) ->
            Result
     end.
 
-%% @spec (NodeId) -> [ljid()]
+%% @spec (Host, Type, NodeId) -> [ljid()]
 %%    NodeId = pubsubNodeId()
 %% @doc <p>Return list of node owners.</p>
 node_owners(Host, Type, NodeId) ->
@@ -3178,7 +3178,7 @@ node_owners_call(Type, NodeId) ->
            []
     end.
 
-%% @spec (Options) -> MaxItems
+%% @spec (Host, Options) -> MaxItems
 %%      Host = host()
 %%      Options = [Option]
 %%      Option = {Key::atom(), Value::term()}
index 595796aa8303d228d97689ae47ea832ced90ccd0..011ea428a7efc5e31c887b6564e92a0c589c3701 100644 (file)
@@ -243,7 +243,7 @@ delete_node(Removed) ->
        end, Removed),
     {result, {default, broadcast, Reply}}.
 
-%% @spec (NodeId, Sender, Subscriber, AccessModel, SendLast, PresenceSubscription, RosterGroup) ->
+%% @spec (NodeId, Sender, Subscriber, AccessModel, SendLast, PresenceSubscription, RosterGroup, Options) ->
 %%              {error, Reason} | {result, Result}
 %% @doc <p>Accepts or rejects subcription requests on a PubSub node.</p>
 %% <p>The mechanism works as follow:
@@ -825,8 +825,9 @@ set_state(State) when is_record(State, pubsub_state) ->
 set_state(_) ->
     {error, ?ERR_INTERNAL_SERVER_ERROR}.
 
-%% @spec (StateId) -> ok | {error, Reason::stanzaError()}
-%%      StateId = mod_pubsub:pubsubStateId()
+%% @spec (NodeId, JID) -> ok | {error, Reason::stanzaError()}
+%%      NodeId = mod_pubsub:pubsubNodeId()
+%%      JID = mod_pubsub:jid()
 %% @doc <p>Delete a state from database.</p>
 del_state(NodeId, JID) ->
     mnesia:delete({pubsub_state, {JID, NodeId}}).
index 01a21d5b8f7d9095ab0ba56d92d4a5da01967cc2..d4ffeca92934839389dc0fa2c7944ec7e1d20687 100644 (file)
@@ -256,7 +256,7 @@ delete_node(Removed) ->
        end, Removed),
     {result, {default, broadcast, Reply}}.
 
-%% @spec (NodeId, Sender, Subscriber, AccessModel, SendLast, PresenceSubscription, RosterGroup) ->
+%% @spec (NodeId, Sender, Subscriber, AccessModel, SendLast, PresenceSubscription, RosterGroup, Options) ->
 %%              {error, Reason} | {result, Result}
 %% @doc <p>Accepts or rejects subcription requests on a PubSub node.</p>
 %% <p>The mechanism works as follow:
@@ -905,8 +905,9 @@ set_state(NodeId, State) ->
     end,
     {result, []}.
 
-%% @spec (StateId) -> ok | {error, Reason::stanzaError()}
-%%      StateId = mod_pubsub:pubsubStateId()
+%% @spec (NodeId, JID) -> ok | {error, Reason::stanzaError()}
+%%      NodeId = mod_pubsub:pubsubNodeId()
+%%      JID = mod_pubsub:jid()
 %% @doc <p>Delete a state from database.</p>
 del_state(NodeId, JID) ->
     J = encode_jid(JID),
@@ -916,11 +917,9 @@ del_state(NodeId, JID) ->
         "and nodeid='", NodeId, "';"]),
     ok.
 
-%% @spec (NodeId, From, Rsm) -> {[Items],RsmOut} | []
+%% @spec (NodeId, From) -> {[Items],RsmOut} | []
 %%      NodeId = mod_pubsub:pubsubNodeId()
 %%      Items = mod_pubsub:pubsubItems()
-%%      Rsm = jlib:rsm_in() | none
-%%      RsmOut=jlib:rsm_out() | none
 %% @doc Returns the list of stored items for a given node.
 %% <p>For the default PubSub module, items are stored in Mnesia database.</p>
 %% <p>We can consider that the pubsub_item table have been created by the main
index 3bd7bba4b0045fef55161eeea097eaad1fc54110..39724db46424ed155a9a78cb7531dc2ed32883b0 100644 (file)
@@ -103,11 +103,12 @@ set_node(Record) when is_record(Record, pubsub_node) ->
 set_node(_) ->
     {error, ?ERR_INTERNAL_SERVER_ERROR}.
 
+get_node(Host, Node, _From) ->
+    get_node(Host, Node).
+
 %% @spec (Host, Node) -> pubsubNode() | {error, Reason}
 %%     Host = mod_pubsub:host()
 %%     Node = mod_pubsub:pubsubNode()
-get_node(Host, Node, _From) ->
-    get_node(Host, Node).
 get_node(Host, Node) ->
     case catch mnesia:read({pubsub_node, {Host, Node}}) of
        [Record] when is_record(Record, pubsub_node) -> Record;
@@ -121,10 +122,11 @@ get_node(NodeId) ->
        Error -> Error
     end.
 
-%% @spec (Host) -> [pubsubNode()] | {error, Reason}
-%%     Host = mod_pubsub:host() | mod_pubsub:jid()
 get_nodes(Host, _From) ->
     get_nodes(Host).
+
+%% @spec (Host) -> [pubsubNode()] | {error, Reason}
+%%     Host = mod_pubsub:host() | mod_pubsub:jid()
 get_nodes(Host) ->
     mnesia:match_object(#pubsub_node{nodeid = {Host, '_'}, _ = '_'}).
 
@@ -165,12 +167,13 @@ get_subnodes(Host, Node) ->
                       lists:member(Node, Parents)]),
     qlc:e(Q).
 
+get_subnodes_tree(Host, Node, _From) ->
+    get_subnodes_tree(Host, Node).
+
 %% @spec (Host, Index) -> [pubsubNodeIdx()] | {error, Reason}
 %%     Host = mod_pubsub:host()
 %%     Node = mod_pubsub:pubsubNode()
 %%     From = mod_pubsub:jid()
-get_subnodes_tree(Host, Node, _From) ->
-    get_subnodes_tree(Host, Node).
 get_subnodes_tree(Host, Node) ->
     mnesia:foldl(fun(#pubsub_node{nodeid = {H, N}} = R, Acc) ->
                         case lists:prefix(Node, N) and (H == Host) of
index 97833f649c0fc0218ce38f2e6992913388a899c6..95f9b34ef3d3ff621f2c404cfab446d60e0026c9 100644 (file)
@@ -89,11 +89,12 @@ options() ->
      {odbc, true}].
 
 
+get_node(Host, Node, _From) ->
+    get_node(Host, Node).
+
 %% @spec (Host, Node) -> pubsubNode() | {error, Reason}
 %%     Host = mod_pubsub:host()
 %%     Node = mod_pubsub:pubsubNode()
-get_node(Host, Node, _From) ->
-    get_node(Host, Node).
 get_node(Host, Node) ->
     H = ?PUBSUB:escape(Host),
     N = ?PUBSUB:escape(?PUBSUB:node_to_string(Node)),
@@ -123,10 +124,10 @@ get_node(NodeId) ->
            {error, ?ERR_ITEM_NOT_FOUND}
     end.
 
-%% @spec (Host) -> [pubsubNode()] | {error, Reason}
-%%      Host = mod_pubsub:host() | mod_pubsub:jid()
 get_nodes(Host, _From) ->
     get_nodes(Host).
+%% @spec (Host) -> [pubsubNode()] | {error, Reason}
+%%      Host = mod_pubsub:host() | mod_pubsub:jid()
 get_nodes(Host) ->
     H = ?PUBSUB:escape(Host),
     case catch ejabberd_odbc:sql_query_t(
@@ -164,11 +165,12 @@ get_parentnodes_tree(Host, Node, From) ->
        Error -> Error
     end.
 
+get_subnodes(Host, Node, _From) ->
+    get_subnodes(Host, Node).
+
 %% @spec (Host, Index) -> [pubsubNode()] | {error, Reason}
 %%      Host = mod_pubsub:host()
 %%      Node = mod_pubsub:pubsubNode()
-get_subnodes(Host, Node, _From) ->
-    get_subnodes(Host, Node).
 get_subnodes(Host, Node) ->
     H = ?PUBSUB:escape(Host),
     N = ?PUBSUB:escape(?PUBSUB:node_to_string(Node)),
@@ -183,11 +185,12 @@ get_subnodes(Host, Node) ->
            []
     end.
 
+get_subnodes_tree(Host, Node, _From) ->
+    get_subnodes_tree(Host, Node).
+
 %% @spec (Host, Index) -> [pubsubNode()] | {error, Reason}
 %%      Host = mod_pubsub:host()
 %%      Node = mod_pubsub:pubsubNode()
-get_subnodes_tree(Host, Node, _From) ->
-    get_subnodes_tree(Host, Node).
 get_subnodes_tree(Host, Node) ->
     H = ?PUBSUB:escape(Host),
     N = ?PUBSUB:escape(?PUBSUB:node_to_string(Node)),
index 51b686cecf77ce85c4fc37859ab4cc37ce95ee37..24330e5066d99926a05945dee71ee735a8144974 100644 (file)
@@ -26,7 +26,7 @@
 %%% @doc The module <strong>{@module}</strong> is the PubSub node tree plugin that
 %%% allow virtual nodes handling.
 %%% <p>PubSub node tree plugins are using the {@link gen_nodetree} behaviour.</p>
-%%% This plugin development is still a work in progress. Due to optimizations in
+%%% <p>This plugin development is still a work in progress. Due to optimizations in
 %%% mod_pubsub, this plugin can not work anymore without altering functioning.
 %%% Please, send us comments, feedback and improvements.</p>
 
@@ -85,9 +85,10 @@ options() ->
 set_node(_NodeRecord) ->
     ok.
 
-%% @spec (Host, Node) -> pubsubNode()
+%% @spec (Host, Node, From) -> pubsubNode()
 %%     Host = mod_pubsub:host()
 %%     Node = mod_pubsub:pubsubNode()
+%%     From = mod_pubsub:jid()
 %% @doc <p>Virtual node tree does not handle a node database. Any node is considered
 %% as existing. Node record contains default values.</p>
 get_node(Host, Node, _From) ->
@@ -101,8 +102,9 @@ get_node({Host, _} = NodeId) ->
     Owners = [{"", Host, ""}],
     Record#pubsub_node{owners = Owners, options = Options}.
 
-%% @spec (Host) -> [pubsubNode()]
+%% @spec (Host, From) -> [pubsubNode()]
 %%     Host = mod_pubsub:host() | mod_pubsub:jid()
+%%     From = mod_pubsub:jid()
 %% @doc <p>Virtual node tree does not handle a node database. Any node is considered
 %% as existing. Nodes list can not be determined.</p>
 get_nodes(Host, _From) ->
@@ -136,9 +138,10 @@ get_subnodes(Host, Node, _From) ->
 get_subnodes(_Host, _Node) ->
     [].
 
-%% @spec (Host, Index) -> [pubsubNode()]
+%% @spec (Host, Node, From) -> [pubsubNode()]
 %%     Host = mod_pubsub:host()
 %%     Node = mod_pubsub:pubsubNode()
+%%     From = mod_pubsub:jid()
 %% @doc <p>Virtual node tree does not handle parent/child. Child list is empty.</p>
 get_subnodes_tree(Host, Node, _From) ->
     get_subnodes_tree(Host, Node).
index f406a05c31a6ce99b4bd0812bdd1cbf4536bd0db..c92587e22a99d61387a627a3fc494652c9da4889 100644 (file)
 %%% @type pubsubNode() = #pubsub_node{
 %%%    nodeid = {Host::host(), Node::pubsubNode()},
 %%%    parentid = Node::pubsubNode(),
-%%%    nodeidx = int(). % can be anything you want
+%%%    nodeidx = int(),
 %%%    type = nodeType(),
-%%%    options = [nodeOption()]}
+%%%    options = [nodeOption()]}.
 %%% <p>This is the format of the <tt>nodes</tt> table. The type of the table
 %%% is: <tt>set</tt>,<tt>ram/disc</tt>.</p>
 %%% <p>The <tt>parentid</tt> and <tt>type</tt> fields are indexed.</p>
+%%% nodeidx can be anything you want.
 -record(pubsub_node, {nodeid,
                      id,
                      parents = [],
@@ -98,7 +99,7 @@
                     }).
 
 %%% @type pubsubState() = #pubsub_state{
-%%%    stateid = {ljid(), nodeidx()}},
+%%%    stateid = {ljid(), nodeidx()},
 %%%    items = [ItemId::string()],
 %%%    affiliation = affiliation(),
 %%%    subscriptions = [subscription()]}.
 }).
 
 %%% @type pubsubItem() = #pubsub_item{
-%%%    itemid = {ItemId::string(), nodeidx()}},
+%%%    itemid = {ItemId::string(), nodeidx()},
 %%%    creation = {now(), ljid()},
 %%%    modification = {now(), ljid()},
 %%%    payload = XMLContent::string()}.
index 9ea535a18bea65bd2cf9fd464279768ba5b1d05d..56ddf6d4bf95c58bd52d648e466036ffc2d31718 100644 (file)
@@ -15,8 +15,8 @@
 %%% All Rights Reserved.''
 %%% This software is copyright 2006-2009, ProcessOne.
 %%%
-%%% @author Pablo Polvorin <pablo.polvorin@process-one.net>, based on 
-%%          pubsub_subscription.erl by Brian Cully <bjc@kublai.com>
+%%% @author Pablo Polvorin <pablo.polvorin@process-one.net>
+%%% @author based on pubsub_subscription.erl by Brian Cully <bjc@kublai.com>
 %%% @version {@vsn}, {@date} {@time}
 %%% @end
 %%% ====================================================================
index 21dd6fddfce4cb2d4198870fc8baea465b67bec9..36679bc2edecda896be64a3b766fd0b01a5743c3 100644 (file)
@@ -173,7 +173,8 @@ initialize(Host, Opts) ->
 %% @spec (AdminCTs::[CT], Default::[CT]) -> [CT]
 %% where CT = {Extension::string(), Value}
 %%       Value = string() | undefined
-%% Returns a unified list without duplicates where elements of AdminCTs have more priority.
+%% @doc Return a unified list without duplicates.
+%% Elements of AdminCTs have more priority.
 %% If a CT is declared as 'undefined', then it is not included in the result.
 build_list_content_types(AdminCTsUnsorted, DefaultCTsUnsorted) ->
     AdminCTs = lists:ukeysort(1, AdminCTsUnsorted),