Files
qt6-migration-pipeline/external/rti_connext_dds-7.7.0/include/rti/cds/detail/CloudDiscoveryServiceImpl.hpp
T
torsten 77c67c12ca Execute the same instructions but now for tools in folders you are getti
Entire-Metadata: .entire/metadata/fb87247f-2a75-407e-b336-cbc8c20ba5a6
Entire-Session: fb87247f-2a75-407e-b336-cbc8c20ba5a6
Entire-Strategy: manual-commit
2026-09-24 16:24:51 +00:00

87 lines
2.3 KiB
C++

/**
* (c) Copyright, Real-Time Innovations, 2020. All rights reserved.
*
* No duplications, whole or partial, manual or electronic, may be made
* without express written permission. Any such copies, or
* revisions thereof, must display this notice unaltered.
* This code contains trade secrets of Real-Time Innovations, Inc.
*/
#ifndef RTI_CDS_CLOUD_DISCOVERY_SERVICE_IMPL_HPP_
#define RTI_CDS_CLOUD_DISCOVERY_SERVICE_IMPL_HPP_
#include <dds/core/refmacros.hpp>
#include <rti/core/detail/SelfReference.hpp>
#include <rti/core/Exception.hpp>
#include "clouddiscoveryservice/clouddiscoveryservice_service.h"
#include <rti/cds/ServiceProperty.hpp>
namespace rti { namespace cds {
class CloudDiscoveryServiceImpl
: public rti::core::detail::RetainableType<CloudDiscoveryServiceImpl>
{
public:
explicit CloudDiscoveryServiceImpl(const ServiceProperty& property)
{
native_ = RTI_CDS_Service_new(&property.native());
rti::core::check_create_entity(native_, "CloudDiscoveryService");
}
CloudDiscoveryServiceImpl(const RTI_CDS_Property& property) : native_(NULL)
{
native_ = RTI_CDS_Service_new(&property);
rti::core::check_create_entity(native_, "CloudDiscoveryService");
}
CloudDiscoveryServiceImpl(RTI_CDS_Service *native) : native_(native)
{
rti::core::check_create_entity(native_, "CloudDiscoveryService");
}
~CloudDiscoveryServiceImpl()
{
RTI_CDS_Service_delete(native_);
}
void start()
{
if (!RTI_CDS_Service_start(native_)) {
throw dds::core::Error("Error starting CloudDiscoveryService");
}
}
void stop()
{
if (!RTI_CDS_Service_stop(native_)) {
throw dds::core::Error("Error stopping CloudDiscoveryService");
}
}
bool is_started()
{
return RTI_CDS_Service_is_started(native_);
}
bool update_rtps_psk_secret_passphrase(
const std::string rtps_psk_secret_passphrase)
{
return RTI_CDS_Service_update_rtps_psk_secret_passphrase(
native_,
rtps_psk_secret_passphrase.c_str());
}
RTI_CDS_Service* native() const
{
return native_;
}
private:
RTI_CDS_Service *native_;
};
}}
#endif // RTI_CDS_CLOUD_DISCOVERY_SERVICE_IMPL_HPP_