Skip to content

Commit

Permalink
refactor to remove listener term
Browse files Browse the repository at this point in the history
Signed-off-by: William Woodall <william@osrfoundation.org>
  • Loading branch information
wjwwood committed Apr 5, 2021
1 parent 8b169a1 commit adc68d0
Show file tree
Hide file tree
Showing 16 changed files with 43 additions and 43 deletions.
6 changes: 3 additions & 3 deletions rmw_fastrtps_cpp/src/rmw_client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -377,12 +377,12 @@ rmw_destroy_client(rmw_node_t * node, rmw_client_t * client)
}

rmw_ret_t
rmw_client_set_listener_callback(
rmw_client_set_on_new_response_callback(
rmw_client_t * rmw_client,
rmw_listener_callback_t callback,
rmw_event_callback_t callback,
const void * user_data)
{
return rmw_fastrtps_shared_cpp::__rmw_client_set_listener_callback(
return rmw_fastrtps_shared_cpp::__rmw_client_set_on_new_response_callback(
rmw_client,
callback,
user_data);
Expand Down
6 changes: 3 additions & 3 deletions rmw_fastrtps_cpp/src/rmw_event.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,12 @@ rmw_subscription_event_init(
}

rmw_ret_t
rmw_event_set_listener_callback(
rmw_event_set_callback(
rmw_event_t * rmw_event,
rmw_listener_callback_t callback,
rmw_event_callback_t callback,
const void * user_data)
{
return rmw_fastrtps_shared_cpp::__rmw_event_set_listener_callback(
return rmw_fastrtps_shared_cpp::__rmw_event_set_callback(
rmw_event,
callback,
user_data);
Expand Down
6 changes: 3 additions & 3 deletions rmw_fastrtps_cpp/src/rmw_service.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -383,12 +383,12 @@ rmw_destroy_service(rmw_node_t * node, rmw_service_t * service)
}

rmw_ret_t
rmw_service_set_listener_callback(
rmw_service_set_on_new_request_callback(
rmw_service_t * rmw_service,
rmw_listener_callback_t callback,
rmw_event_callback_t callback,
const void * user_data)
{
return rmw_fastrtps_shared_cpp::__rmw_service_set_listener_callback(
return rmw_fastrtps_shared_cpp::__rmw_service_set_on_new_request_callback(
rmw_service,
callback,
user_data);
Expand Down
6 changes: 3 additions & 3 deletions rmw_fastrtps_cpp/src/rmw_subscription.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -169,12 +169,12 @@ rmw_destroy_subscription(rmw_node_t * node, rmw_subscription_t * subscription)
}

rmw_ret_t
rmw_subscription_set_listener_callback(
rmw_subscription_set_on_new_message_callback(
rmw_subscription_t * rmw_subscription,
rmw_listener_callback_t callback,
rmw_event_callback_t callback,
const void * user_data)
{
return rmw_fastrtps_shared_cpp::__rmw_subscription_set_listener_callback(
return rmw_fastrtps_shared_cpp::__rmw_subscription_set_on_new_message_callback(
rmw_subscription,
callback,
user_data);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@

#include "rcpputils/thread_safety_annotations.hpp"

#include "rmw/listener_callback_type.h"
#include "rmw/event_callback_type.h"

#include "rmw_fastrtps_shared_cpp/TypeSupport.hpp"

Expand Down Expand Up @@ -180,7 +180,7 @@ class ClientListener : public eprosima::fastrtps::SubscriberListener
void
clientSetExecutorCallback(
const void * user_data,
rmw_listener_callback_t callback)
rmw_event_callback_t callback)
{
std::unique_lock<std::mutex> lock_mutex(listener_callback_mutex_);

Expand Down Expand Up @@ -218,7 +218,7 @@ class ClientListener : public eprosima::fastrtps::SubscriberListener
std::condition_variable * conditionVariable_ RCPPUTILS_TSA_GUARDED_BY(internalMutex_);
std::set<eprosima::fastrtps::rtps::GUID_t> publishers_;

rmw_listener_callback_t listener_callback_{nullptr};
rmw_event_callback_t listener_callback_{nullptr};
const void * user_data_{nullptr};
std::mutex listener_callback_mutex_;
uint64_t unread_count_ = 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
#include "fastrtps/publisher/PublisherListener.h"

#include "rmw/event.h"
#include "rmw/listener_callback_type.h"
#include "rmw/event_callback_type.h"

#include "rmw_fastrtps_shared_cpp/TypeSupport.hpp"

Expand Down Expand Up @@ -71,9 +71,9 @@ class EventListenerInterface
// new event from this listener has ocurred
virtual void eventSetExecutorCallback(
const void * user_data,
rmw_listener_callback_t callback) = 0;
rmw_event_callback_t callback) = 0;

rmw_listener_callback_t listener_callback_{nullptr};
rmw_event_callback_t listener_callback_{nullptr};
const void * user_data_{nullptr};
uint64_t unread_events_count_ = 0;
std::mutex listener_callback_mutex_;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ class PubListener : public EventListenerInterface, public eprosima::fastrtps::Pu
RMW_FASTRTPS_SHARED_CPP_PUBLIC
void eventSetExecutorCallback(
const void * user_data,
rmw_listener_callback_t callback) final;
rmw_event_callback_t callback) final;

RMW_FASTRTPS_SHARED_CPP_PUBLIC
bool
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@

#include "rcpputils/thread_safety_annotations.hpp"

#include "rmw/listener_callback_type.h"
#include "rmw/event_callback_type.h"

#include "rmw_fastrtps_shared_cpp/TypeSupport.hpp"
#include "rmw_fastrtps_shared_cpp/guid_utils.hpp"
Expand Down Expand Up @@ -295,7 +295,7 @@ class ServiceListener : public eprosima::fastrtps::SubscriberListener
void
serviceSetExecutorCallback(
const void * user_data,
rmw_listener_callback_t callback)
rmw_event_callback_t callback)
{
std::unique_lock<std::mutex> lock_mutex(listener_callback_mutex_);

Expand All @@ -321,7 +321,7 @@ class ServiceListener : public eprosima::fastrtps::SubscriberListener
std::mutex * conditionMutex_ RCPPUTILS_TSA_GUARDED_BY(internalMutex_);
std::condition_variable * conditionVariable_ RCPPUTILS_TSA_GUARDED_BY(internalMutex_);

rmw_listener_callback_t listener_callback_{nullptr};
rmw_event_callback_t listener_callback_{nullptr};
const void * user_data_{nullptr};
std::mutex listener_callback_mutex_;
uint64_t unread_count_ = 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
#include "rcpputils/thread_safety_annotations.hpp"

#include "rmw/impl/cpp/macros.hpp"
#include "rmw/listener_callback_type.h"
#include "rmw/event_callback_type.h"

#include "rmw_fastrtps_shared_cpp/TypeSupport.hpp"
#include "rmw_fastrtps_shared_cpp/custom_event_info.hpp"
Expand Down Expand Up @@ -115,7 +115,7 @@ class SubListener : public EventListenerInterface, public eprosima::fastrtps::Su
RMW_FASTRTPS_SHARED_CPP_PUBLIC
void eventSetExecutorCallback(
const void * user_data,
rmw_listener_callback_t callback) final;
rmw_event_callback_t callback) final;

RMW_FASTRTPS_SHARED_CPP_PUBLIC
bool
Expand Down Expand Up @@ -171,7 +171,7 @@ class SubListener : public EventListenerInterface, public eprosima::fastrtps::Su
void
subcriptionSetExecutorCallback(
const void * user_data,
rmw_listener_callback_t callback)
rmw_event_callback_t callback)
{
std::unique_lock<std::mutex> lock_mutex(listener_callback_mutex_);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -418,30 +418,30 @@ __rmw_subscription_get_network_flow_endpoints(

RMW_FASTRTPS_SHARED_CPP_PUBLIC
rmw_ret_t
__rmw_subscription_set_listener_callback(
__rmw_subscription_set_on_new_message_callback(
rmw_subscription_t * rmw_subscription,
rmw_listener_callback_t callback,
rmw_event_callback_t callback,
const void * user_data);

RMW_FASTRTPS_SHARED_CPP_PUBLIC
rmw_ret_t
__rmw_service_set_listener_callback(
__rmw_service_set_on_new_request_callback(
rmw_service_t * rmw_service,
rmw_listener_callback_t callback,
rmw_event_callback_t callback,
const void * user_data);

RMW_FASTRTPS_SHARED_CPP_PUBLIC
rmw_ret_t
__rmw_client_set_listener_callback(
__rmw_client_set_on_new_response_callback(
rmw_client_t * rmw_client,
rmw_listener_callback_t callback,
rmw_event_callback_t callback,
const void * user_data);

RMW_FASTRTPS_SHARED_CPP_PUBLIC
rmw_ret_t
__rmw_event_set_listener_callback(
__rmw_event_set_callback(
rmw_event_t * rmw_event,
rmw_listener_callback_t callback,
rmw_event_callback_t callback,
const void * user_data);

} // namespace rmw_fastrtps_shared_cpp
Expand Down
2 changes: 1 addition & 1 deletion rmw_fastrtps_shared_cpp/src/custom_publisher_info.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ bool PubListener::hasEvent(rmw_event_type_t event_type) const

void PubListener::eventSetExecutorCallback(
const void * user_data,
rmw_listener_callback_t callback)
rmw_event_callback_t callback)
{
std::unique_lock<std::mutex> lock_mutex(listener_callback_mutex_);

Expand Down
2 changes: 1 addition & 1 deletion rmw_fastrtps_shared_cpp/src/custom_subscriber_info.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ bool SubListener::hasEvent(rmw_event_type_t event_type) const

void SubListener::eventSetExecutorCallback(
const void * user_data,
rmw_listener_callback_t callback)
rmw_event_callback_t callback)
{
std::unique_lock<std::mutex> lock_mutex(listener_callback_mutex_);

Expand Down
4 changes: 2 additions & 2 deletions rmw_fastrtps_shared_cpp/src/rmw_client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,9 @@ __rmw_destroy_client(
}

rmw_ret_t
__rmw_client_set_listener_callback(
__rmw_client_set_on_new_response_callback(
rmw_client_t * rmw_client,
rmw_listener_callback_t callback,
rmw_event_callback_t callback,
const void * user_data)
{
auto custom_client_info = static_cast<CustomClientInfo *>(rmw_client->data);
Expand Down
4 changes: 2 additions & 2 deletions rmw_fastrtps_shared_cpp/src/rmw_event.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,9 @@ __rmw_init_event(
}

rmw_ret_t
__rmw_event_set_listener_callback(
__rmw_event_set_callback(
rmw_event_t * rmw_event,
rmw_listener_callback_t callback,
rmw_event_callback_t callback,
const void * user_data)
{
auto custom_event_info = static_cast<CustomEventInfo *>(rmw_event->data);
Expand Down
4 changes: 2 additions & 2 deletions rmw_fastrtps_shared_cpp/src/rmw_service.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,9 @@ __rmw_destroy_service(
}

rmw_ret_t
__rmw_service_set_listener_callback(
__rmw_service_set_on_new_request_callback(
rmw_service_t * rmw_service,
rmw_listener_callback_t callback,
rmw_event_callback_t callback,
const void * user_data)
{
auto custom_service_info = static_cast<CustomServiceInfo *>(rmw_service->data);
Expand Down
4 changes: 2 additions & 2 deletions rmw_fastrtps_shared_cpp/src/rmw_subscription.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,9 @@ __rmw_subscription_get_actual_qos(
}

rmw_ret_t
__rmw_subscription_set_listener_callback(
__rmw_subscription_set_on_new_message_callback(
rmw_subscription_t * rmw_subscription,
rmw_listener_callback_t callback,
rmw_event_callback_t callback,
const void * user_data)
{
auto custom_subscriber_info = static_cast<CustomSubscriberInfo *>(rmw_subscription->data);
Expand Down

0 comments on commit adc68d0

Please sign in to comment.