Skip to content

Commit

Permalink
Merge pull request #7743 from garazdawi/lukas/docs/add-module-prefix
Browse files Browse the repository at this point in the history
Add Module: prefix to all callback functions
  • Loading branch information
garazdawi authored Oct 13, 2023
2 parents c0b1363 + 486b18a commit 42596d6
Show file tree
Hide file tree
Showing 11 changed files with 68 additions and 70 deletions.
6 changes: 3 additions & 3 deletions lib/inets/doc/src/httpd_custom_api.xml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
</description>
<funcs>
<func>
<name since="OTP 18.1.1">response_default_headers() -> [Header] </name>
<name since="OTP 18.1.1">Module:response_default_headers() -> [Header] </name>
<fsummary>Provide default headers for the HTTP servers responses.</fsummary>
<type>
<v>Header = {HeaderName :: string(), HeaderValue::string()}</v>
Expand All @@ -48,7 +48,7 @@
</func>

<func>
<name since="OTP 17.5.6">response_header({HeaderName, HeaderValue}) -> {true, Header} | false </name>
<name since="OTP 17.5.6">Module:response_header({HeaderName, HeaderValue}) -> {true, Header} | false </name>
<fsummary>Filter and possible alter HTTP response headers.</fsummary>
<type>
<v>Header = {HeaderName :: string(), HeaderValue::string()}</v>
Expand All @@ -61,7 +61,7 @@
</func>

<func>
<name since="OTP 17.5.6">request_header({HeaderName, HeaderValue}) -> {true, Header} | false </name>
<name since="OTP 17.5.6">Module:request_header({HeaderName, HeaderValue}) -> {true, Header} | false </name>
<fsummary>Filter and possible alter HTTP request headers.</fsummary>
<type>
<v>Header = {HeaderName :: string(), HeaderValue::string()}</v>
Expand Down
42 changes: 21 additions & 21 deletions lib/megaco/doc/src/megaco_user.xml
Original file line number Diff line number Diff line change
Expand Up @@ -164,8 +164,8 @@ protocol_version() = integer() ]]></code>

<funcs>
<func>
<name since="">handle_connect(ConnHandle, ProtocolVersion) -> ok | error | {error,ErrorDescr}</name>
<name since="">handle_connect(ConnHandle, ProtocolVersion, Extra) -> ok | error | {error,ErrorDescr}</name>
<name since="">Module:handle_connect(ConnHandle, ProtocolVersion) -> ok | error | {error,ErrorDescr}</name>
<name since="">Module:handle_connect(ConnHandle, ProtocolVersion, Extra) -> ok | error | {error,ErrorDescr}</name>
<fsummary>Invoked when a new connection is established</fsummary>
<type>
<v>ConnHandle = conn_handle()</v>
Expand Down Expand Up @@ -202,7 +202,7 @@ protocol_version() = integer() ]]></code>
</func>

<func>
<name since="">handle_disconnect(ConnHandle, ProtocolVersion, Reason) -> ok</name>
<name since="">Module:handle_disconnect(ConnHandle, ProtocolVersion, Reason) -> ok</name>
<fsummary>Invoked when a connection is teared down</fsummary>
<type>
<v>ConnHandle = conn_handle()</v>
Expand All @@ -220,8 +220,8 @@ protocol_version() = integer() ]]></code>
</func>

<func>
<name since="">handle_syntax_error(ReceiveHandle, ProtocolVersion, DefaultED) -> reply | {reply, ED} | no_reply | {no_reply, ED} </name>
<name since="">handle_syntax_error(ReceiveHandle, ProtocolVersion, DefaultED, Extra) -> reply | {reply, ED} | no_reply | {no_reply, ED} </name>
<name since="">Module:handle_syntax_error(ReceiveHandle, ProtocolVersion, DefaultED) -> reply | {reply, ED} | no_reply | {no_reply, ED} </name>
<name since="">Module:handle_syntax_error(ReceiveHandle, ProtocolVersion, DefaultED, Extra) -> reply | {reply, ED} | no_reply | {no_reply, ED} </name>
<fsummary>Invoked when a received message had syntax errors</fsummary>
<type>
<v>ReceiveHandle = receive_handle()</v>
Expand Down Expand Up @@ -258,8 +258,8 @@ protocol_version() = integer() ]]></code>
</func>

<func>
<name since="">handle_message_error(ConnHandle, ProtocolVersion, ErrorDescr) -> ok</name>
<name since="">handle_message_error(ConnHandle, ProtocolVersion, ErrorDescr, Extra) -> ok</name>
<name since="">Module:handle_message_error(ConnHandle, ProtocolVersion, ErrorDescr) -> ok</name>
<name since="">Module:handle_message_error(ConnHandle, ProtocolVersion, ErrorDescr, Extra) -> ok</name>
<fsummary>Invoked when a received message just contains an error</fsummary>
<type>
<v>ConnHandle = conn_handle()</v>
Expand Down Expand Up @@ -316,8 +316,8 @@ protocol_version() = integer() ]]></code>
-->

<func>
<name since="">handle_trans_request(ConnHandle, ProtocolVersion, ActionRequests) -> pending() | reply() | ignore_trans_request</name>
<name since="">handle_trans_request(ConnHandle, ProtocolVersion, ActionRequests, Extra) -> pending() | reply() | ignore_trans_request</name>
<name since="">Module:handle_trans_request(ConnHandle, ProtocolVersion, ActionRequests) -> pending() | reply() | ignore_trans_request</name>
<name since="">Module:handle_trans_request(ConnHandle, ProtocolVersion, ActionRequests, Extra) -> pending() | reply() | ignore_trans_request</name>
<fsummary>Invoked for each transaction request</fsummary>
<type>
<v>ConnHandle = conn_handle()</v>
Expand Down Expand Up @@ -420,8 +420,8 @@ protocol_version() = integer() ]]></code>
</func>

<func>
<name since="">handle_trans_long_request(ConnHandle, ProtocolVersion, ReqData) -> reply()</name>
<name since="">handle_trans_long_request(ConnHandle, ProtocolVersion, ReqData, Extra) -> reply()</name>
<name since="">Module:handle_trans_long_request(ConnHandle, ProtocolVersion, ReqData) -> reply()</name>
<name since="">Module:handle_trans_long_request(ConnHandle, ProtocolVersion, ReqData, Extra) -> reply()</name>
<fsummary>Optionally invoked for a time consuming transaction request</fsummary>
<type>
<v>ConnHandle = conn_handle()</v>
Expand Down Expand Up @@ -460,8 +460,8 @@ protocol_version() = integer() ]]></code>
</func>

<func>
<name since="">handle_trans_reply(ConnHandle, ProtocolVersion, UserReply, ReplyData) -> ok</name>
<name since="">handle_trans_reply(ConnHandle, ProtocolVersion, UserReply, ReplyData, Extra) -> ok</name>
<name since="">Module:handle_trans_reply(ConnHandle, ProtocolVersion, UserReply, ReplyData) -> ok</name>
<name since="">Module:handle_trans_reply(ConnHandle, ProtocolVersion, UserReply, ReplyData, Extra) -> ok</name>
<fsummary>Optionally invoked for a transaction reply</fsummary>
<type>
<v>ConnHandle = conn_handle()</v>
Expand Down Expand Up @@ -593,8 +593,8 @@ protocol_version() = integer() ]]></code>
</func>

<func>
<name since="">handle_trans_ack(ConnHandle, ProtocolVersion, AckStatus, AckData) -> ok</name>
<name since="">handle_trans_ack(ConnHandle, ProtocolVersion, AckStatus, AckData, Extra) -> ok</name>
<name since="">Module:handle_trans_ack(ConnHandle, ProtocolVersion, AckStatus, AckData) -> ok</name>
<name since="">Module:handle_trans_ack(ConnHandle, ProtocolVersion, AckStatus, AckData, Extra) -> ok</name>
<fsummary>Optionally invoked for a transaction acknowledgement</fsummary>
<type>
<v>ConnHandle = conn_handle()</v>
Expand Down Expand Up @@ -658,8 +658,8 @@ protocol_version() = integer() ]]></code>
</func>

<func>
<name since="">handle_unexpected_trans(ConnHandle, ProtocolVersion, Trans) -> ok</name>
<name since="">handle_unexpected_trans(ConnHandle, ProtocolVersion, Trans, Extra) -> ok</name>
<name since="">Module:handle_unexpected_trans(ConnHandle, ProtocolVersion, Trans) -> ok</name>
<name since="">Module:handle_unexpected_trans(ConnHandle, ProtocolVersion, Trans, Extra) -> ok</name>
<fsummary>Invoked when an unexpected message is received</fsummary>
<type>
<v>ConnHandle = conn_handle()</v>
Expand All @@ -685,8 +685,8 @@ protocol_version() = integer() ]]></code>
</func>

<func>
<name since="">handle_trans_request_abort(ConnHandle, ProtocolVersion, TransNo, Pid) -> ok</name>
<name since="">handle_trans_request_abort(ConnHandle, ProtocolVersion, TransNo, Pid, Extra) -> ok</name>
<name since="">Module:handle_trans_request_abort(ConnHandle, ProtocolVersion, TransNo, Pid) -> ok</name>
<name since="">Module:handle_trans_request_abort(ConnHandle, ProtocolVersion, TransNo, Pid, Extra) -> ok</name>
<fsummary>Invoked when an transaction request has been aborted</fsummary>
<type>
<v>ConnHandle = conn_handle()</v>
Expand All @@ -710,8 +710,8 @@ protocol_version() = integer() ]]></code>
</func>

<func>
<name since="">handle_segment_reply(ConnHandle, ProtocolVersion, TransNo, SegNo, SegCompl) -> ok</name>
<name since="">handle_segment_reply(ConnHandle, ProtocolVersion, TransNo, SegNo, SegCompl, Extra) -> ok</name>
<name since="">Module:handle_segment_reply(ConnHandle, ProtocolVersion, TransNo, SegNo, SegCompl) -> ok</name>
<name since="">Module:handle_segment_reply(ConnHandle, ProtocolVersion, TransNo, SegNo, SegCompl, Extra) -> ok</name>
<fsummary>Segment Reply Indication</fsummary>
<type>
<v>ConnHandle = conn_handle()</v>
Expand Down
2 changes: 1 addition & 1 deletion lib/snmp/doc/src/snmpa_discovery_handler.xml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@

<funcs>
<func>
<name since="">stage1_finish(TargetName, ManagerEngineID, ExtraInfo) -> ignore | {ok, usm_entry() | [usm_entry()]} | {ok, usm_entry() | [usm_entry()], NewExtraInfo}</name>
<name since="">Module:stage1_finish(TargetName, ManagerEngineID, ExtraInfo) -> ignore | {ok, usm_entry() | [usm_entry()]} | {ok, usm_entry() | [usm_entry()], NewExtraInfo}</name>
<fsummary>Discovery stage 1 finish</fsummary>
<type>
<v>TargetName = string()</v>
Expand Down
4 changes: 2 additions & 2 deletions lib/snmp/doc/src/snmpa_error_report.xml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
</description>
<funcs>
<func>
<name since="">config_err(Format, Args) -> void()</name>
<name since="">Module:config_err(Format, Args) -> void()</name>
<fsummary>Called if a configuration error occurs</fsummary>
<type>
<v>Format = string()</v>
Expand All @@ -68,7 +68,7 @@
</desc>
</func>
<func>
<name since="">user_err(Format, Args) -> void()</name>
<name since="">Module:user_err(Format, Args) -> void()</name>
<fsummary>Called if a user related error occurs</fsummary>
<type>
<v>Format = string()</v>
Expand Down
10 changes: 5 additions & 5 deletions lib/snmp/doc/src/snmpa_network_interface.xml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@

<funcs>
<func>
<name since="">start_link(Prio, NoteStore, MasterAgent, Opts) -> {ok, Pid} | {error, Reason}</name>
<name since="">Module:start_link(Prio, NoteStore, MasterAgent, Opts) -> {ok, Pid} | {error, Reason}</name>
<fsummary>Start-link the network interface process</fsummary>
<type>
<v>Prio = priority()</v>
Expand All @@ -93,7 +93,7 @@
</func>

<func>
<name since="">info(Pid) -> [{Key, Value}]</name>
<name since="">Module:info(Pid) -> [{Key, Value}]</name>
<fsummary>Return information about the running network interface process</fsummary>
<type>
<v>Pid = pid()</v>
Expand All @@ -112,7 +112,7 @@
</func>

<func>
<name since="">verbosity(Pid, Verbosity) -> void()</name>
<name since="">Module:verbosity(Pid, Verbosity) -> void()</name>
<fsummary>Change the verbosity of a running network interface process</fsummary>
<type>
<v>Pid = pid()</v>
Expand All @@ -126,7 +126,7 @@
</func>

<func>
<name since="">get_log_type(Pid) -> {ok, LogType} | {error, Reason}</name>
<name since="">Module:get_log_type(Pid) -> {ok, LogType} | {error, Reason}</name>
<fsummary>Get the Audit Trail Log type</fsummary>
<type>
<v>Pid = pid()</v>
Expand All @@ -147,7 +147,7 @@
</func>

<func>
<name since="">set_log_type(Pid, NewType) -> {ok, OldType} | {error, Reason}</name>
<name since="">Module:set_log_type(Pid, NewType) -> {ok, OldType} | {error, Reason}</name>
<fsummary>Change the Audit Trail Log type</fsummary>
<type>
<v>Pid = pid()</v>
Expand Down
15 changes: 7 additions & 8 deletions lib/snmp/doc/src/snmpa_network_interface_filter.xml
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ pdu_type() = 'get-request' | 'get-next-request' | 'get-response' |
</section>
<funcs>
<func>
<name since="">accept_recv(Domain, Addr) -> boolean()</name>
<name since="">Module:accept_recv(Domain, Addr) -> boolean()</name>
<fsummary>Shall the received message be accepted</fsummary>
<type>
<v>Domain = transportDomain()</v>
Expand All @@ -116,7 +116,7 @@ pdu_type() = 'get-request' | 'get-next-request' | 'get-response' |
</desc>
</func>
<func>
<name since="">accept_send(Domain, Addr) -> boolean()</name>
<name since="">Module:accept_send(Domain, Addr) -> boolean()</name>
<fsummary>Shall the message be sent</fsummary>
<type>
<v>Domain = transportDomain()</v>
Expand All @@ -131,7 +131,7 @@ pdu_type() = 'get-request' | 'get-next-request' | 'get-response' |
</desc>
</func>
<func>
<name since="">accept_recv_pdu(Domain, Addr, PduType) -> boolean()</name>
<name since="">Module:accept_recv_pdu(Domain, Addr, PduType) -> boolean()</name>
<fsummary>Shall the received pdu be accepted</fsummary>
<type>
<v>Domain = transportDomain()</v>
Expand All @@ -148,15 +148,14 @@ pdu_type() = 'get-request' | 'get-next-request' | 'get-response' |
</desc>
</func>
<func>
<name since="">accept_send_pdu(Targets, PduType) -> Reply</name>
<name since="">Module:accept_send_pdu(Targets, PduType) -> Reply</name>
<fsummary>Shall the pdu be sent</fsummary>
<type>
<v>Targets = targets()</v>
<v>targets() = [target()]</v>
<v>target() = {Domain, Addr}</v>
<v>Targets = [Target]</v>
<v>Target = {Domain, Addr}</v>
<v>Domain = transportDomain()</v>
<v>Addr = transportAddressWithPort()</v>
<v>PduType = pdu_type() > 0</v>
<v>PduType = pdu_type()</v>
<v>Reply = boolean() | NewTargets</v>
<v>NewTargets = targets()</v>
</type>
Expand Down
15 changes: 7 additions & 8 deletions lib/snmp/doc/src/snmpa_notification_delivery_info_receiver.xml
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,10 @@
must export the following functions: </p>
<list type="bulleted">
<item>
<p><seemfa marker="#delivery_targets/3">delivery_targets/3</seemfa></p>
<p><seemfa marker="#Module:delivery_targets/3">delivery_targets/3</seemfa></p>
</item>
<item>
<p><seemfa marker="#delivery_info/4">delivery_info/4</seemfa></p>
<p><seemfa marker="#Module:delivery_info/4">delivery_info/4</seemfa></p>
</item>
</list>
<p>The semantics of them and their exact signatures are explained
Expand All @@ -76,12 +76,12 @@

<funcs>
<func>
<name since="">delivery_targets(Tag, Targets, Extra) -> void()</name>
<name since="">Module:delivery_targets(Tag, Targets, Extra) -> void()</name>
<fsummary>Inform about target addresses</fsummary>
<type>
<v>Tag = term()</v>
<v>Targets = [Target]</v>
<v>Target = {transportDomain(), transportAddressWithPort()</v>
<v>Target = {transportDomain(), transportAddressWithPort()}</v>
<v>Extra = term()</v>
</type>
<desc>
Expand All @@ -97,14 +97,13 @@
</func>

<func>
<name since="">delivery_info(Tag, Target, DeliveryResult, Extra) -> void()</name>
<name since="">Module:delivery_info(Tag, Target, DeliveryResult, Extra) -> void()</name>
<fsummary>Inform about delivery result</fsummary>
<type>
<v>Tag = term()</v>
<v>Targets = [Target]</v>
<v>Target = {transportDomain(), transportAddressWithPort()</v>
<v>DeliveryResult = delivery_result()</v>
<v>delivery_result() = no_response | got_response</v>
<v>Target = {transportDomain(), transportAddressWithPort()}</v>
<v>DeliveryResult = no_response | got_response</v>
<v>Extra = term()</v>
</type>
<desc>
Expand Down
2 changes: 1 addition & 1 deletion lib/snmp/doc/src/snmpa_notification_filter.xml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
</description>
<funcs>
<func>
<name since="">handle_notification(Notif, Data) -> Reply</name>
<name since="">Module:handle_notification(Notif, Data) -> Reply</name>
<fsummary>Handle a notification</fsummary>
<type>
<v>Reply = send | {send, NewNotif} | dont_send</v>
Expand Down
Loading

0 comments on commit 42596d6

Please sign in to comment.