MatchingInfo.h 1.9 KB

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