Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

callback can be NULL to clear in Listener APIs. #332

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 12 additions & 8 deletions rmw/include/rmw/rmw.h
Original file line number Diff line number Diff line change
Expand Up @@ -3082,10 +3082,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 @@ -3116,10 +3117,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 @@ -3150,10 +3152,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 @@ -3188,10 +3191,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