Skip to content

Commit

Permalink
callback can be NULL to clear in Listener APIs. (#332)
Browse files Browse the repository at this point in the history
Signed-off-by: Tomoya Fujita <Tomoya.Fujita@sony.com>
  • Loading branch information
fujitatomoya authored Sep 29, 2022
1 parent 67b0f0a commit b635eec
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions rmw/include/rmw/rmw.h
Original file line number Diff line number Diff line change
Expand Up @@ -3118,10 +3118,11 @@ rmw_set_log_severity(rmw_log_severity_t severity);
* at any time.
*
* \param[in] subscription The subscription on which to set the callback
* \param[in] callback The callback to be called when new messages arrive
* \param[in] callback The callback to be called when new messages arrive,
* can be NULL to clear the registered callback
* \param[in] user_data Given to the callback when called later, may be NULL
* \return `RMW_RET_OK` if successful, or
* \return `RMW_RET_INVALID_ARGUMENT` if `subscription` or `callback` is NULL, or
* \return `RMW_RET_INVALID_ARGUMENT` if `subscription` is NULL, or
* \return `RMW_RET_UNSUPPORTED` if the API is not implemented in the dds implementation
*/
RMW_PUBLIC
Expand Down Expand Up @@ -3152,10 +3153,11 @@ rmw_subscription_set_on_new_message_callback(
* at any time.
*
* \param[in] service The service on which to set the callback
* \param[in] callback The callback to be called when new requests arrive
* \param[in] callback The callback to be called when new requests arrive,
* can be NULL to clear the registered callback
* \param[in] user_data Given to the callback when called later, may be NULL
* \return `RMW_RET_OK` if callback was set to the listener, or
* \return `RMW_RET_INVALID_ARGUMENT` if `service` or `callback` is NULL, or
* \return `RMW_RET_INVALID_ARGUMENT` if `service` is NULL, or
* \return `RMW_RET_UNSUPPORTED` if the API is not implemented in the dds implementation
*/
RMW_PUBLIC
Expand Down Expand Up @@ -3186,10 +3188,11 @@ rmw_service_set_on_new_request_callback(
* at any time.
*
* \param[in] client The client on which to set the callback
* \param[in] callback The callback to be called when new responses arrive
* \param[in] callback The callback to be called when new responses arrive,
* can be NULL to clear the registered callback
* \param[in] user_data Given to the callback when called later, may be NULL
* \return `RMW_RET_OK` if callback was set to the listener, or
* \return `RMW_RET_INVALID_ARGUMENT` if `client` or `callback` is NULL, or
* \return `RMW_RET_INVALID_ARGUMENT` if `client` is NULL, or
* \return `RMW_RET_UNSUPPORTED` if the API is not implemented in the dds implementation
*/
RMW_PUBLIC
Expand Down Expand Up @@ -3224,10 +3227,11 @@ rmw_client_set_on_new_response_callback(
* at any time.
*
* \param[in] event The event on which to set the callback
* \param[in] callback The callback to be called when new events occur
* \param[in] callback The callback to be called when new events occur,
* can be NULL to clear the registered callback
* \param[in] user_data Given to the callback when called later, may be NULL
* \return `RMW_RET_OK` if callback was set to the listener, or
* \return `RMW_RET_INVALID_ARGUMENT` if `event` or `callback` is NULL, or
* \return `RMW_RET_INVALID_ARGUMENT` if `event` is NULL, or
* \return `RMW_RET_UNSUPPORTED` if the API is not implemented in the dds implementation
*/
RMW_PUBLIC
Expand Down

0 comments on commit b635eec

Please sign in to comment.