mirror of
https://github.com/obgm/libcoap.git
synced 2026-12-02 02:47:09 +03:00
Nits: Fix documentation
Remove a duplicate definition.
This commit is contained in:
1 parent
4c516f8f12
commit
23f8a531b1
3 files changed
+21
-40
No files matched your search
+6
-6
@@ -60,34 +60,34 @@ typedef coap_response_t (*coap_response_handler_t)(coap_session_t *session,
|
||||
* @param session CoAP session.
|
||||
* @param sent The PDU that was transmitted.
|
||||
* @param reason The reason for the NACK.
|
||||
* @param id CoAP message ID.
|
||||
* @param mid CoAP message ID.
|
||||
*/
|
||||
typedef void (*coap_nack_handler_t)(coap_session_t *session,
|
||||
const coap_pdu_t *sent,
|
||||
const coap_nack_reason_t reason,
|
||||
const coap_mid_t id);
|
||||
const coap_mid_t mid);
|
||||
|
||||
/**
|
||||
* Received Ping handler that is used as callback in coap_context_t.
|
||||
*
|
||||
* @param session CoAP session.
|
||||
* @param received The PDU that was received.
|
||||
* @param id CoAP message ID.
|
||||
* @param mid CoAP message ID.
|
||||
*/
|
||||
typedef void (*coap_ping_handler_t)(coap_session_t *session,
|
||||
const coap_pdu_t *received,
|
||||
const coap_mid_t id);
|
||||
const coap_mid_t mid);
|
||||
|
||||
/**
|
||||
* Received Pong handler that is used as callback in coap_context_t.
|
||||
*
|
||||
* @param session CoAP session.
|
||||
* @param received The PDU that was received.
|
||||
* @param id CoAP message ID.
|
||||
* @param mid CoAP message ID.
|
||||
*/
|
||||
typedef void (*coap_pong_handler_t)(coap_session_t *session,
|
||||
const coap_pdu_t *received,
|
||||
const coap_mid_t id);
|
||||
const coap_mid_t mid);
|
||||
|
||||
/**
|
||||
* Registers a new message handler that is called whenever a response is
|
||||
|
||||
@@ -353,18 +353,6 @@ coap_print_status_t coap_print_link(const coap_resource_t *resource,
|
||||
size_t *len,
|
||||
size_t *offset);
|
||||
|
||||
/**
|
||||
* Registers the specified @p handler as message handler for the request type @p
|
||||
* method
|
||||
*
|
||||
* @param resource The resource for which the handler shall be registered.
|
||||
* @param method The CoAP request method to handle.
|
||||
* @param handler The handler to register with @p resource.
|
||||
*/
|
||||
void coap_register_handler(coap_resource_t *resource,
|
||||
coap_request_t method,
|
||||
coap_method_handler_t handler);
|
||||
|
||||
/** @} */
|
||||
|
||||
/**
|
||||
|
||||
+15
-22
@@ -66,12 +66,10 @@ COAP_REQUEST_IPATCH
|
||||
The method handler function prototype is defined as:
|
||||
[source, c]
|
||||
----
|
||||
typedef void (*coap_method_handler_t)(coap_context_t *context,
|
||||
coap_resource_t *resource,
|
||||
typedef void (*coap_method_handler_t)(coap_resource_t *resource,
|
||||
coap_session_t *session,
|
||||
coap_pdu_t *incoming_pdu,
|
||||
coap_string_t *token,
|
||||
coap_string_t *query,
|
||||
const coap_pdu_t *incoming_pdu,
|
||||
const coap_string_t *query,
|
||||
coap_pdu_t *response_pdu);
|
||||
----
|
||||
|
||||
@@ -99,10 +97,9 @@ typedef enum coap_response_t {
|
||||
COAP_RESPONSE_OK /* Response is fine */
|
||||
} coap_response_t;
|
||||
|
||||
typedef coap_response_t (*coap_response_handler_t)(coap_context_t *context,
|
||||
coap_session_t *session,
|
||||
coap_pdu_t *sent,
|
||||
coap_pdu_t *received,
|
||||
typedef coap_response_t (*coap_response_handler_t)(coap_session_t *session,
|
||||
const coap_pdu_t *sent,
|
||||
const coap_pdu_t *received,
|
||||
const coap_mid_t id);
|
||||
----
|
||||
|
||||
@@ -122,10 +119,9 @@ If _handler_ is NULL, then the handler is de-registered.
|
||||
The nack handler function prototype is defined as:
|
||||
[source, c]
|
||||
----
|
||||
typedef void (*coap_nack_handler_t)(coap_context_t *context,
|
||||
coap_session_t *session,
|
||||
coap_pdu_t *sent,
|
||||
coap_nack_reason_t reason,
|
||||
typedef void (*coap_nack_handler_t)(coap_session_t *session,
|
||||
const coap_pdu_t *sent,
|
||||
const coap_nack_reason_t reason,
|
||||
const coap_mid_t mid);
|
||||
----
|
||||
NACKs can be one of the following
|
||||
@@ -144,9 +140,8 @@ NULL, then the handler is de-registered.
|
||||
The ping handler function prototype is defined as:
|
||||
[source, c]
|
||||
----
|
||||
typedef void (*coap_ping_handler_t)(coap_context_t *context,
|
||||
coap_session_t *session,
|
||||
coap_pdu_t *received,
|
||||
typedef void (*coap_ping_handler_t)(coap_session_t *session,
|
||||
const coap_pdu_t *received,
|
||||
const coap_mid_t mid);
|
||||
----
|
||||
|
||||
@@ -157,9 +152,8 @@ If _handler_ is NULL, then the handler is de-registered.
|
||||
The pong handler function prototype is defined as:
|
||||
[source, c]
|
||||
----
|
||||
typedef void (*coap_pong_handler_t)(coap_context_t *context,
|
||||
coap_session_t *session,
|
||||
coap_pdu_t *received,
|
||||
typedef void (*coap_pong_handler_t)(coap_session_t *session,
|
||||
const coap_pdu_t *received,
|
||||
const coap_mid_t mid);
|
||||
----
|
||||
|
||||
@@ -170,9 +164,8 @@ the handler is de-registered.
|
||||
The event handler function prototype is defined as:
|
||||
[source, c]
|
||||
----
|
||||
typedef void (*coap_event_handler_t)(coap_context_t *context,
|
||||
coap_event_t event,
|
||||
coap_session_t *session);
|
||||
typedef void (*coap_event_handler_t)(coap_session_t *session,
|
||||
const coap_event_t event);
|
||||
----
|
||||
Events can be one of the following
|
||||
----
|
||||
|
||||
Reference in new issue
Block a user