Skip to content

Commit 59130b7

Browse files
authored
Make private the necessary headers from include/fastrtps (#4545)
* Refs #20567: Include what you use in latency test Signed-off-by: EduPonz <eduardoponz@eprosima.com> * Refs #20567: Remove unnecesary and deprecated headers Signed-off-by: EduPonz <eduardoponz@eprosima.com> * Refs #20567: Migrate allocations test to DDS Signed-off-by: EduPonz <eduardoponz@eprosima.com> * Refs #20567: Make ParticipantAttributes private Signed-off-by: EduPonz <eduardoponz@eprosima.com> * Refs #20567: Make ReplierAttributes & RequesterAttributes private Signed-off-by: EduPonz <eduardoponz@eprosima.com> * Refs #20567: Make PublisherAttributes private Signed-off-by: EduPonz <eduardoponz@eprosima.com> * Refs #20567: Make SubscriberAttributes private Signed-off-by: EduPonz <eduardoponz@eprosima.com> * Refs #20567: Make Discovery private Signed-off-by: EduPonz <eduardoponz@eprosima.com> * Refs #20567: Make ProxyPool private Signed-off-by: EduPonz <eduardoponz@eprosima.com> * Refs #20567: Make Semaphore private Signed-off-by: EduPonz <eduardoponz@eprosima.com> * Refs #20567: Make MessageReceiver private Signed-off-by: EduPonz <eduardoponz@eprosima.com> * Refs #20567: Make BuiltinProtocols private Signed-off-by: EduPonz <eduardoponz@eprosima.com> * Refs #20567: Make Liveliness private Signed-off-by: EduPonz <eduardoponz@eprosima.com> * Refs #20567: Make LivelinessManager private Signed-off-by: EduPonz <eduardoponz@eprosima.com> * Refs #20567: Make LivelinessData private Signed-off-by: EduPonz <eduardoponz@eprosima.com> * Refs #20567: Make shared_mutex private Signed-off-by: EduPonz <eduardoponz@eprosima.com> * Refs #20567: Make StringMatching private Signed-off-by: EduPonz <eduardoponz@eprosima.com> * Refs #20567: Make TimeConversion private Signed-off-by: EduPonz <eduardoponz@eprosima.com> * Refs #20567: Make DBQueue private Signed-off-by: EduPonz <eduardoponz@eprosima.com> * Refs #20567: Add notes to versions.md Signed-off-by: EduPonz <eduardoponz@eprosima.com> * Refs #20567: Apply Eliana's suggestions Signed-off-by: EduPonz <eduardoponz@eprosima.com> * Refs #20567: Correctly export API in Windows for ReplierQos and RequesterQos Signed-off-by: EduPonz <eduardoponz@eprosima.com> --------- Signed-off-by: EduPonz <eduardoponz@eprosima.com>
1 parent 03b567b commit 59130b7

183 files changed

Lines changed: 1893 additions & 3510 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

fuzz/C++/fuzz_processCDRMsg/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,5 @@ message(STATUS "Configuring fuzz_processCDRMsg...")
1919
file(GLOB SOURCES_CXX "fuzz_*.cxx")
2020

2121
add_executable(fuzz_processCDRMsg ${SOURCES_CXX})
22+
target_include_directories(fuzz_processCDRMsg PRIVATE ${CMAKE_SOURCE_DIR}/src/cpp/rtps/messages)
2223
target_link_libraries(fuzz_processCDRMsg fastdds fastcdr foonathan_memory $ENV{LIB_FUZZING_ENGINE})

fuzz/C++/fuzz_processCDRMsg/fuzz_processCDRMsg.cxx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55
#include <string.h>
66

77
#include <fastdds/rtps/attributes/RTPSParticipantAttributes.h>
8-
#include <fastdds/rtps/messages/MessageReceiver.h>
8+
9+
#include <MessageReceiver.h>
910

1011
#define MIN_SIZE RTPSMESSAGE_HEADER_SIZE
1112
#define MAX_SIZE 64000

include/fastdds/dds/domain/DomainParticipant.hpp

Lines changed: 27 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -27,20 +27,21 @@
2727

2828
#include <fastdds/dds/builtin/topic/ParticipantBuiltinTopicData.hpp>
2929
#include <fastdds/dds/builtin/topic/TopicBuiltinTopicData.hpp>
30-
#include <fastdds/dds/core/status/StatusMask.hpp>
3130
#include <fastdds/dds/core/Entity.hpp>
31+
#include <fastdds/dds/core/status/StatusMask.hpp>
3232
#include <fastdds/dds/domain/qos/DomainParticipantQos.hpp>
33+
#include <fastdds/dds/domain/qos/ReplierQos.hpp>
34+
#include <fastdds/dds/domain/qos/RequesterQos.hpp>
3335
#include <fastdds/dds/topic/ContentFilteredTopic.hpp>
3436
#include <fastdds/dds/topic/IContentFilterFactory.hpp>
35-
#include <fastdds/dds/topic/TypeSupport.hpp>
3637
#include <fastdds/dds/topic/Topic.hpp>
3738
#include <fastdds/dds/topic/TopicListener.hpp>
38-
#include <fastdds/rtps/attributes/RTPSParticipantAttributes.h>
39+
#include <fastdds/dds/topic/TypeSupport.hpp>
3940
#include <fastdds/rtps/common/Guid.h>
4041
#include <fastdds/rtps/common/SampleIdentity.h>
4142
#include <fastdds/rtps/common/Time_t.h>
42-
#include <fastrtps/types/TypesBase.h>
4343
#include <fastrtps/types/TypeIdentifier.h>
44+
#include <fastrtps/types/TypesBase.h>
4445

4546
using eprosima::fastrtps::types::ReturnCode_t;
4647

@@ -60,10 +61,6 @@ namespace types {
6061
class TypeInformation;
6162
} // namespace types
6263

63-
class ParticipantAttributes;
64-
class PublisherAttributes;
65-
class SubscriberAttributes;
66-
6764
} //namespace fastrtps
6865

6966
namespace fastdds {
@@ -668,6 +665,28 @@ class DomainParticipant : public Entity
668665
const std::string& profile_name,
669666
TopicQos& qos) const;
670667

668+
/**
669+
* Fills the ReplierQos with the values of the XML profile.
670+
*
671+
* @param profile_name Replier profile name.
672+
* @param qos ReplierQos object where the qos is returned.
673+
* @return RETCODE_OK if the profile exists. RETCODE_BAD_PARAMETER otherwise.
674+
*/
675+
FASTDDS_EXPORTED_API ReturnCode_t get_replier_qos_from_profile(
676+
const std::string& profile_name,
677+
ReplierQos& qos) const;
678+
679+
/**
680+
* Fills the RequesterQos with the values of the XML profile.
681+
*
682+
* @param profile_name Requester profile name.
683+
* @param qos RequesterQos object where the qos is returned.
684+
* @return RETCODE_OK if the profile exists. RETCODE_BAD_PARAMETER otherwise.
685+
*/
686+
FASTDDS_EXPORTED_API ReturnCode_t get_requester_qos_from_profile(
687+
const std::string& profile_name,
688+
RequesterQos& qos) const;
689+
671690
/**
672691
* Retrieves the list of DomainParticipants that have been discovered in the domain and are not "ignored".
673692
*
Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
// Copyright 2024 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 ReplierQos.hpp
17+
*/
18+
19+
#ifndef _FASTDDS_REPLIERQOS_HPP_
20+
#define _FASTDDS_REPLIERQOS_HPP_
21+
22+
#include <string>
23+
24+
#include <fastdds/dds/publisher/qos/DataWriterQos.hpp>
25+
#include <fastdds/dds/subscriber/qos/DataReaderQos.hpp>
26+
#include <fastdds/fastdds_dll.hpp>
27+
28+
namespace eprosima {
29+
namespace fastdds {
30+
namespace dds {
31+
32+
class ReplierQos
33+
{
34+
public:
35+
36+
/**
37+
* @brief Constructor
38+
*/
39+
FASTDDS_EXPORTED_API ReplierQos() = default;
40+
41+
/**
42+
* @brief Equal comparison operator
43+
*/
44+
FASTDDS_EXPORTED_API bool operator ==(
45+
const ReplierQos& b) const
46+
{
47+
return (this->service_name == b.service_name) &&
48+
(this->request_topic_name == b.request_topic_name) &&
49+
(this->reply_topic_name == b.reply_topic_name) &&
50+
(this->writer_qos == b.writer_qos) &&
51+
(this->reader_qos == b.reader_qos);
52+
}
53+
54+
//! Service name
55+
std::string service_name;
56+
57+
//! Request type
58+
std::string request_type;
59+
60+
//! Reply type
61+
std::string reply_type;
62+
63+
//! Request topic name
64+
std::string request_topic_name;
65+
66+
//! Reply topic name
67+
std::string reply_topic_name;
68+
69+
//! DataWriter QoS for the reply writer
70+
DataWriterQos writer_qos;
71+
72+
//! DataReader QoS for the reply reader
73+
DataReaderQos reader_qos;
74+
};
75+
76+
} /* namespace dds */
77+
} /* namespace fastdds */
78+
} /* namespace eprosima */
79+
80+
#endif /* _FASTDDS_REPLIERQOS_HPP_ */
Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
// Copyright 2024 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 RequesterQos.hpp
17+
*/
18+
19+
#ifndef _FASTDDS_REQUESTERQOS_HPP_
20+
#define _FASTDDS_REQUESTERQOS_HPP_
21+
22+
#include <string>
23+
24+
#include <fastdds/dds/publisher/qos/DataWriterQos.hpp>
25+
#include <fastdds/dds/subscriber/qos/DataReaderQos.hpp>
26+
#include <fastdds/fastdds_dll.hpp>
27+
28+
namespace eprosima {
29+
namespace fastdds {
30+
namespace dds {
31+
32+
class RequesterQos
33+
{
34+
public:
35+
36+
/**
37+
* @brief Constructor
38+
*/
39+
FASTDDS_EXPORTED_API RequesterQos() = default;
40+
41+
/**
42+
* @brief Equal comparison operator
43+
*/
44+
FASTDDS_EXPORTED_API bool operator ==(
45+
const RequesterQos& b) const
46+
{
47+
return (this->service_name == b.service_name) &&
48+
(this->request_topic_name == b.request_topic_name) &&
49+
(this->reply_topic_name == b.reply_topic_name) &&
50+
(this->writer_qos == b.writer_qos) &&
51+
(this->reader_qos == b.reader_qos);
52+
}
53+
54+
//! Service name
55+
std::string service_name;
56+
57+
//! Request type
58+
std::string request_type;
59+
60+
//! Reply type
61+
std::string reply_type;
62+
63+
//! Request topic name
64+
std::string request_topic_name;
65+
66+
//! Reply topic name
67+
std::string reply_topic_name;
68+
69+
//! DataWriter QoS for the request writer
70+
DataWriterQos writer_qos;
71+
72+
//! DataReader QoS for the request reader
73+
DataReaderQos reader_qos;
74+
};
75+
76+
} /* namespace dds */
77+
} /* namespace fastdds */
78+
} /* namespace eprosima */
79+
80+
#endif /* _FASTDDS_REQUESTERQOS_HPP_ */

include/fastdds/rtps/rtps_all.h

Lines changed: 0 additions & 41 deletions
This file was deleted.

0 commit comments

Comments
 (0)