/src/Fast-DDS/include/fastdds/rtps/common/MatchingInfo.h
Line | Count | Source (jump to first uncovered line) |
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 | | |
15 | | /** |
16 | | * @file MatchingInfo.h |
17 | | * |
18 | | */ |
19 | | |
20 | | #ifndef _FASTDDS_RTPS_MATCHINGINFO_H_ |
21 | | #define _FASTDDS_RTPS_MATCHINGINFO_H_ |
22 | | |
23 | | #include <fastdds/rtps/common/Guid.h> |
24 | | |
25 | | namespace eprosima{ |
26 | | namespace fastrtps{ |
27 | | namespace rtps{ |
28 | | |
29 | | /** |
30 | | * @enum MatchingStatus, indicates whether the matched publication/subscription method of the PublisherListener or SubscriberListener has |
31 | | * been called for a matching or a removal of a remote endpoint. |
32 | | * @ingroup COMMON_MODULE |
33 | | */ |
34 | | #if defined(_WIN32) |
35 | | enum RTPS_DllAPI MatchingStatus{ |
36 | | #else |
37 | | enum MatchingStatus{ |
38 | | #endif |
39 | | MATCHED_MATCHING,//!< MATCHED_MATCHING, new publisher/subscriber found |
40 | | REMOVED_MATCHING //!< REMOVED_MATCHING, publisher/subscriber removed |
41 | | |
42 | | }; |
43 | | |
44 | | /** |
45 | | * Class MatchingInfo contains information about the matching between two endpoints. |
46 | | * @ingroup COMMON_MODULE |
47 | | */ |
48 | | class RTPS_DllAPI MatchingInfo |
49 | | { |
50 | | public: |
51 | | //!Default constructor |
52 | 0 | MatchingInfo():status(MATCHED_MATCHING){}; |
53 | | /** |
54 | | * @param stat Status |
55 | | * @param guid GUID |
56 | | */ |
57 | 0 | MatchingInfo(MatchingStatus stat,const GUID_t&guid):status(stat),remoteEndpointGuid(guid){}; |
58 | 0 | ~MatchingInfo(){}; |
59 | | //!Status |
60 | | MatchingStatus status; |
61 | | //!Remote endpoint GUID |
62 | | GUID_t remoteEndpointGuid; |
63 | | }; |
64 | | } |
65 | | } |
66 | | } |
67 | | |
68 | | #endif /* _FASTDDS_RTPS_MATCHINGINFO_H_ */ |