Fast RTPS  Version 2.1.0
Fast RTPS
ParticipantListener.h
1 // Copyright 2016 Proyectos y Sistemas de Mantenimiento SL (eProsima).
2 //
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
6 //
7 // http://www.apache.org/licenses/LICENSE-2.0
8 //
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
14 
20 #ifndef __PARTICIPANT_PARTICIPANTLISTENER_H__
21 #define __PARTICIPANT_PARTICIPANTLISTENER_H__
22 
23 #include <fastdds/rtps/participant/ParticipantDiscoveryInfo.h>
24 #include <fastdds/rtps/reader/ReaderDiscoveryInfo.h>
25 #include <fastdds/rtps/writer/WriterDiscoveryInfo.h>
26 
27 namespace eprosima {
28 namespace fastrtps {
29 
30 class Participant;
31 
37 {
38  public:
39 
41 
42  virtual ~ParticipantListener() {}
43 
50  virtual void onParticipantDiscovery(Participant* participant, rtps::ParticipantDiscoveryInfo&& info)
51  {
52  (void)participant, (void)info;
53  }
54 
55 #if HAVE_SECURITY
56  virtual void onParticipantAuthentication(Participant* participant, rtps::ParticipantAuthenticationInfo&& info)
57  {
58  (void)participant, (void)info;
59  }
60 #endif
61 
68  virtual void onSubscriberDiscovery(Participant* participant, rtps::ReaderDiscoveryInfo&& info)
69  {
70  (void)participant, (void)info;
71  }
72 
79  virtual void onPublisherDiscovery(Participant* participant, rtps::WriterDiscoveryInfo&& info)
80  {
81  (void)participant, (void)info;
82  }
83 };
84 
85 } // namespace fastrtps
86 } // namespace eprosima
87 
88 #endif // __PARTICIPANT_PARTICIPANTLISTENER_H__
Class Participant used to group Publishers and Subscribers into a single working unit.
Definition: Participant.h:47
Class ParticipantListener, overrides behaviour towards certain events.
Definition: ParticipantListener.h:37
virtual void onPublisherDiscovery(Participant *participant, rtps::WriterDiscoveryInfo &&info)
This method is called when a new Publisher is discovered, or a previously discovered publisher change...
Definition: ParticipantListener.h:79
ParticipantListener()
Definition: ParticipantListener.h:40
virtual void onParticipantDiscovery(Participant *participant, rtps::ParticipantDiscoveryInfo &&info)
This method is called when a new Participant is discovered, or a previously discovered participant ch...
Definition: ParticipantListener.h:50
virtual void onSubscriberDiscovery(Participant *participant, rtps::ReaderDiscoveryInfo &&info)
This method is called when a new Subscriber is discovered, or a previously discovered subscriber chan...
Definition: ParticipantListener.h:68
virtual ~ParticipantListener()
Definition: ParticipantListener.h:42
eProsima namespace.
Definition: LibrarySettingsAttributes.h:23