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

[20569] Migrate DLL API exporter to fastdds #104

Merged
merged 2 commits into from
Mar 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion fastdds_python/src/swig/fastdds.i
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ bool has_statistics();

// Macro delcarations
// Any macro used on the Fast DDS header files will give an error if it is not redefined here
#define RTPS_DllAPI
#define FASTDDS_EXPORTED_API
#define FASTDDS_DEPRECATED_UNTIL(major, entity_name, msg)
#define FASTDDS_TODO_BEFORE(major, minor, msg)

Expand Down Expand Up @@ -123,6 +123,7 @@ namespace builtin {
%include "fastcdr/xcdr/optional.i"
#endif

%include "fastdds/LibrarySettings.i"
EduPonz marked this conversation as resolved.
Show resolved Hide resolved
%include "fastdds/rtps/common/VendorId_t.i"
%include "fastdds/rtps/common/Types.i"
%include "fastdds/rtps/common/Time_t.i"
Expand Down
19 changes: 19 additions & 0 deletions fastdds_python/src/swig/fastdds/LibrarySettings.i
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
// Copyright 2024 Proyectos y Sistemas de Mantenimiento SL (eProsima).
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

%{
#include "fastdds/LibrarySettings.hpp"
%}

%include "fastdds/LibrarySettings.hpp"
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@
if (nullptr != listener)
{
Swig::Director* director = SWIG_DIRECTOR_CAST(listener);

if (nullptr != director)
{
Py_INCREF(director->swig_get_self());
Expand All @@ -93,7 +93,7 @@
if (nullptr != old_listener)
{
Swig::Director* director = SWIG_DIRECTOR_CAST(old_listener);

if (nullptr != director)
{
Py_DECREF(director->swig_get_self());
Expand Down Expand Up @@ -227,7 +227,7 @@
* @param mask StatusMask that holds statuses the listener responds to (default: all)
* @return Pointer to the created Subscriber.
*/
RTPS_DllAPI Subscriber* create_subscriber_with_profile(
FASTDDS_EXPORTED_API Subscriber* create_subscriber_with_profile(
const std::string& profile_name,
SubscriberListener* listener = nullptr,
const StatusMask& mask = eprosima::fastdds::dds::StatusMask::all())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@
* @param mask StatusMask that holds statuses the listener responds to (default: all).
* @return Pointer to the created DataReader. nullptr if failed.
*/
RTPS_DllAPI DataReader* create_datareader_with_profile(
FASTDDS_EXPORTED_API DataReader* create_datareader_with_profile(
TopicDescription* topic,
const std::string& profile_name,
DataReaderListener* listener = nullptr,
Expand Down
2 changes: 1 addition & 1 deletion fastdds_python/test/types/test_complete.i
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@

// Macro declarations
// Any macro used on the Fast DDS header files will give an error if it is not redefined here
#define RTPS_DllAPI
#define FASTDDS_EXPORTED_API
#define eProsima_user_DllExport

%include "test_included_modules.i"
Expand Down
2 changes: 1 addition & 1 deletion fastdds_python/test/types/test_included_modules.i
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@

// Macro declarations
// Any macro used on the Fast DDS header files will give an error if it is not redefined here
#define RTPS_DllAPI
#define FASTDDS_EXPORTED_API
#define eProsima_user_DllExport


Expand Down
2 changes: 1 addition & 1 deletion fastdds_python/test/types/test_modules.i
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@

// Macro declarations
// Any macro used on the Fast DDS header files will give an error if it is not redefined here
#define RTPS_DllAPI
#define FASTDDS_EXPORTED_API
#define eProsima_user_DllExport


Expand Down
2 changes: 1 addition & 1 deletion fastdds_python_examples/HelloWorldExample/HelloWorld.i
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@

// Macro declarations
// Any macro used on the Fast DDS header files will give an error if it is not redefined here
#define RTPS_DllAPI
#define FASTDDS_EXPORTED_API
#define eProsima_user_DllExport


Expand Down