Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[20817] Remove unnecessary header and make private SecurityException and Exception #4701

Merged
merged 10 commits into from
May 30, 2024
11 changes: 10 additions & 1 deletion examples/cpp/rtps/AsSocket/TestReaderSocket.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,16 @@
#define TESTREADERSOCKET_H_

#include <fastdds/rtps/reader/ReaderListener.h>
#include <fastdds/rtps/rtps_fwd.h>

namespace eprosima {
namespace fastrtps {
namespace rtps {
class RTPSParticipant;
class ReaderHistory;
class RTPSReader;
} // namespace rtps
} // namespace fastrtps
} // namespace eprosima

class TestReaderSocket
{
Expand Down
10 changes: 9 additions & 1 deletion examples/cpp/rtps/AsSocket/TestWriterSocket.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,15 @@
#include <cstdio>
#include <string>

#include <fastdds/rtps/rtps_fwd.h>
namespace eprosima {
namespace fastrtps {
namespace rtps {
class RTPSParticipant;
class WriterHistory;
class RTPSWriter;
} // namespace rtps
} // namespace fastrtps
} // namespace eprosima

class TestWriterSocket
{
Expand Down
11 changes: 10 additions & 1 deletion examples/cpp/rtps/Persistent/TestReaderPersistent.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,16 @@
#define TESTREADERPERSISTENT_H_

#include <fastdds/rtps/reader/ReaderListener.h>
#include <fastdds/rtps/rtps_fwd.h>

namespace eprosima {
namespace fastrtps {
namespace rtps {
class RTPSParticipant;
class ReaderHistory;
class RTPSReader;
} // namespace rtps
} // namespace fastrtps
} // namespace eprosima

class TestReaderPersistent
{
Expand Down
11 changes: 10 additions & 1 deletion examples/cpp/rtps/Persistent/TestWriterPersistent.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,18 @@
#ifndef TESTWRITERPERSISTENT_H_
#define TESTWRITERPERSISTENT_H_

#include <fastdds/rtps/rtps_fwd.h>
#include <fastdds/rtps/writer/WriterListener.h>

namespace eprosima {
namespace fastrtps {
namespace rtps {
class RTPSParticipant;
class WriterHistory;
class RTPSWriter;
} // namespace rtps
} // namespace fastrtps
} // namespace eprosima

class TestWriterPersistent
{
public:
Expand Down
12 changes: 11 additions & 1 deletion examples/cpp/rtps/Registered/TestReaderRegistered.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,17 @@
#define TESTREADERREGISTERED_H_

#include <fastdds/rtps/reader/ReaderListener.h>
#include <fastdds/rtps/rtps_fwd.h>


namespace eprosima {
namespace fastrtps {
namespace rtps {
class RTPSParticipant;
class ReaderHistory;
class RTPSReader;
} // namespace rtps
} // namespace fastrtps
} // namespace eprosima

class TestReaderRegistered
{
Expand Down
10 changes: 9 additions & 1 deletion examples/cpp/rtps/Registered/TestWriterRegistered.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,17 @@
#ifndef TESTWRITERREGISTERED_H_
#define TESTWRITERREGISTERED_H_

#include <fastdds/rtps/rtps_fwd.h>
#include <fastdds/rtps/writer/WriterListener.h>

namespace eprosima {
namespace fastrtps {
namespace rtps {
class RTPSParticipant;
class WriterHistory;
} // namespace rtps
} // namespace fastrtps
} // namespace eprosima

class TestWriterRegistered
{
public:
Expand Down
7 changes: 6 additions & 1 deletion include/fastdds/dds/core/policy/ParameterTypes.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,17 @@

#ifndef DOXYGEN_SHOULD_SKIP_THIS_PUBLIC

#include <atomic>
#include <string>
#include <vector>

#include <fastcdr/cdr/fixed_size_string.hpp>

#include <fastdds/rtps/common/all_common.h>
#include <fastdds/rtps/common/InstanceHandle.h>
#include <fastdds/rtps/common/Locator.h>
#include <fastdds/rtps/common/SampleIdentity.h>
#include <fastdds/rtps/common/SerializedPayload.h>
#include <fastdds/rtps/common/Time_t.h>
#include <fastdds/rtps/common/Token.h>

#if HAVE_SECURITY
Expand Down
9 changes: 0 additions & 9 deletions include/fastdds/dds/domain/DomainParticipant.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -833,15 +833,6 @@ class DomainParticipant : public Entity
uint16_t userId,
fastrtps::rtps::EndpointKind_t kind);

/**
* @brief Getter for the resource event
*
* @pre The DomainParticipant is enabled.
*
* @return A reference to the resource event
*/
FASTDDS_EXPORTED_API fastrtps::rtps::ResourceEvent& get_resource_event() const;

/**
* Register a custom content filter factory, which can be used to create a ContentFilteredTopic.
*
Expand Down
2 changes: 0 additions & 2 deletions include/fastdds/rtps/common/Property.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@
#include <string>
#include <vector>

#include <fastdds/rtps/exceptions/Exception.h>

namespace eprosima {
namespace fastrtps {
namespace rtps {
Expand Down
35 changes: 0 additions & 35 deletions include/fastdds/rtps/common/all_common.h

This file was deleted.

20 changes: 0 additions & 20 deletions include/fastdds/rtps/network/SenderResource.h

This file was deleted.

40 changes: 0 additions & 40 deletions include/fastdds/rtps/rtps_fwd.h

This file was deleted.

2 changes: 1 addition & 1 deletion include/fastrtps/qos/ParameterTypes.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
#include <fastcdr/cdr/fixed_size_string.hpp>

#include <fastdds/dds/core/policy/ParameterTypes.hpp>
#include <fastdds/rtps/common/all_common.h>
#include <fastdds/rtps/common/CacheChange.h>
#include <fastdds/rtps/common/Token.h>

#if HAVE_SECURITY
Expand Down
1 change: 1 addition & 0 deletions src/cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,7 @@ set(${PROJECT_NAME}_security_source_files
rtps/security/exceptions/SecurityException.cpp
rtps/security/common/SharedSecretHandle.cpp
rtps/security/logging/Logging.cpp
rtps/security/logging/LoggingLevel.cpp
rtps/security/SecurityManager.cpp
rtps/security/SecurityPluginFactory.cpp
rtps/builtin/discovery/participant/DS/PDPSecurityInitiatorListener.cpp
Expand Down
5 changes: 0 additions & 5 deletions src/cpp/fastdds/domain/DomainParticipant.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -492,11 +492,6 @@ bool DomainParticipant::new_remote_endpoint_discovered(
return impl_->new_remote_endpoint_discovered(partguid, userId, kind);
}

fastrtps::rtps::ResourceEvent& DomainParticipant::get_resource_event() const
{
return impl_->get_resource_event();
}

bool DomainParticipant::has_active_entities()
{
return impl_->has_active_entities();
Expand Down
4 changes: 2 additions & 2 deletions src/cpp/fastdds/publisher/DataWriterImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -398,14 +398,14 @@ ReturnCode_t DataWriterImpl::enable()
// In case it has been loaded from the persistence DB, rebuild instances on history
history_.rebuild_instances();

deadline_timer_ = new TimedEvent(publisher_->get_participant()->get_resource_event(),
deadline_timer_ = new TimedEvent(publisher_->rtps_participant()->get_resource_event(),
[&]() -> bool
{
return deadline_missed();
},
qos_.deadline().period.to_ns() * 1e-6);

lifespan_timer_ = new TimedEvent(publisher_->get_participant()->get_resource_event(),
lifespan_timer_ = new TimedEvent(publisher_->rtps_participant()->get_resource_event(),
[&]() -> bool
{
return lifespan_expired();
Expand Down
4 changes: 2 additions & 2 deletions src/cpp/fastdds/subscriber/DataReaderImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -258,14 +258,14 @@ ReturnCode_t DataReaderImpl::enable()

reader_ = reader;

deadline_timer_ = new TimedEvent(subscriber_->get_participant()->get_resource_event(),
deadline_timer_ = new TimedEvent(subscriber_->rtps_participant()->get_resource_event(),
[&]() -> bool
{
return deadline_missed();
},
qos_.deadline().period.to_ns() * 1e-6);

lifespan_timer_ = new TimedEvent(subscriber_->get_participant()->get_resource_event(),
lifespan_timer_ = new TimedEvent(subscriber_->rtps_participant()->get_resource_event(),
[&]() -> bool
{
return lifespan_expired();
Expand Down
32 changes: 24 additions & 8 deletions src/cpp/rtps/exceptions/Exception.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,34 +12,49 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#include <fastdds/rtps/exceptions/Exception.h>
#include "Exception.h"

using namespace eprosima::fastrtps::rtps;

Exception::Exception(const char* const& message) : message_(message), minor_(0)
Exception::Exception(
const char* const& message)
: message_(message)
, minor_(0)
{
}

Exception::Exception(const Exception &ex) : message_(ex.message_), minor_(ex.minor_)
Exception::Exception(
const Exception& ex)
: message_(ex.message_)
, minor_(ex.minor_)
{
}

Exception::Exception(Exception&& ex) : message_(std::move(ex.message_)), minor_(ex.minor_)
Exception::Exception(
Exception&& ex)
: message_(std::move(ex.message_))
, minor_(ex.minor_)
{
}

Exception::Exception(const char* const& message, const int32_t minor) : message_(message), minor_(minor)
Exception::Exception(
const char* const& message,
const int32_t minor)
: message_(message)
, minor_(minor)
{
}

Exception& Exception::operator=(const Exception &ex)
Exception& Exception::operator =(
const Exception& ex)
{
message_ = ex.message_;
minor_ = ex.minor_;
return *this;
}

Exception& Exception::operator=(Exception&& ex)
Exception& Exception::operator =(
Exception&& ex)
{
message_ = std::move(ex.message_);
minor_ = ex.minor_;
Expand All @@ -55,7 +70,8 @@ const int32_t& Exception::minor() const
return minor_;
}

void Exception::minor(const int32_t &minor)
void Exception::minor(
const int32_t& minor)
{
minor_ = minor;
}
Expand Down
7 changes: 6 additions & 1 deletion src/cpp/rtps/messages/MessageReceiver.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,12 @@
#include <functional>
#include <unordered_map>

#include <fastdds/rtps/common/all_common.h>
#include <fastdds/rtps/common/CDRMessage_t.h>
#include <fastdds/rtps/common/Guid.h>
#include <fastdds/rtps/common/Locator.h>
#include <fastdds/rtps/common/CacheChange.h>
#include <fastdds/rtps/common/MatchingInfo.h>
#include <fastdds/rtps/common/Time_t.h>
#include <fastdds/rtps/common/VendorId_t.hpp>

#include <utils/shared_mutex.hpp>
Expand Down
Loading
Loading