/src/Fast-DDS/src/cpp/rtps/DataSharing/IDataSharingNotifier.hpp
Line | Count | Source |
1 | | // Copyright 2020 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 | | |
15 | | /** |
16 | | * @file IDataSharingNotifier.hpp |
17 | | */ |
18 | | |
19 | | #ifndef RTPS_DATASHARING_IDATASHARINGNOTIFIER_HPP |
20 | | #define RTPS_DATASHARING_IDATASHARINGNOTIFIER_HPP |
21 | | |
22 | | |
23 | | namespace eprosima { |
24 | | namespace fastdds { |
25 | | namespace rtps { |
26 | | |
27 | | struct GUID_t; |
28 | | |
29 | | class IDataSharingNotifier |
30 | | { |
31 | | |
32 | | public: |
33 | | |
34 | 0 | IDataSharingNotifier() = default; |
35 | | |
36 | 0 | virtual ~IDataSharingNotifier() = default; |
37 | | |
38 | | /** |
39 | | * Links the notifier to a reader that will be notified |
40 | | * @param reader_guid GUID of the reader to notify |
41 | | */ |
42 | | virtual void enable( |
43 | | const GUID_t& reader_guid) = 0; |
44 | | |
45 | | /** |
46 | | * Unlinks the notifier and its reader |
47 | | */ |
48 | | virtual void disable() = 0; |
49 | | |
50 | | /** |
51 | | * @return whether the notifier is linked to a reader or not |
52 | | */ |
53 | | virtual bool is_enabled() = 0; |
54 | | |
55 | | /** |
56 | | * Notifies to the reader |
57 | | */ |
58 | | virtual void notify() = 0; |
59 | | |
60 | | }; |
61 | | |
62 | | |
63 | | } // namespace rtps |
64 | | } // namespace fastdds |
65 | | } // namespace eprosima |
66 | | |
67 | | #endif // RTPS_DATASHARING_IDATASHARINGNOTIFIER_HPP |