diff --git a/rosidl_typesupport_cpp/CMakeLists.txt b/rosidl_typesupport_cpp/CMakeLists.txt index 90fdac88..bddea9eb 100644 --- a/rosidl_typesupport_cpp/CMakeLists.txt +++ b/rosidl_typesupport_cpp/CMakeLists.txt @@ -14,6 +14,7 @@ endif() find_package(ament_cmake_ros REQUIRED) find_package(rcpputils REQUIRED) find_package(rosidl_runtime_c REQUIRED) +find_package(rosidl_typesupport_c REQUIRED) ament_export_dependencies(rcpputils) ament_export_dependencies(rosidl_runtime_c) @@ -41,6 +42,7 @@ target_include_directories(${PROJECT_NAME} PUBLIC ament_target_dependencies(${PROJECT_NAME} "rcpputils" "rosidl_runtime_c" + "rosidl_typesupport_c" ) ament_export_libraries(${PROJECT_NAME}) ament_export_targets(${PROJECT_NAME}) diff --git a/rosidl_typesupport_cpp/include/rosidl_typesupport_cpp/type_support_map.h b/rosidl_typesupport_cpp/include/rosidl_typesupport_cpp/type_support_map.h index f34bd49d..74e37e0a 100644 --- a/rosidl_typesupport_cpp/include/rosidl_typesupport_cpp/type_support_map.h +++ b/rosidl_typesupport_cpp/include/rosidl_typesupport_cpp/type_support_map.h @@ -15,38 +15,9 @@ #ifndef ROSIDL_TYPESUPPORT_CPP__TYPE_SUPPORT_MAP_H_ #define ROSIDL_TYPESUPPORT_CPP__TYPE_SUPPORT_MAP_H_ -#include +// Keep this file not to break API. It was no more than +// a copy of rosidl_typesupport_c/type_support_map.h -#ifdef __cplusplus -extern "C" -{ -#endif - -/// Contains all available C++ typesupport handles to choose from. -typedef struct type_support_map_t -{ - // TODO(dirk-thomas) const should not be defined for the fields - // but should be set for the struct when it is being used - // same for rosidl_message_type_support_t et al - - /// Length of the `typesupport_identidentifier`, `symbol_name` and `data` arrays. - const size_t size; - - /// The ROS 2 package this is generated from. - const char * package_name; - - /// Array of identifiers for the type_supports. - const char * const * typesupport_identifier; - - /// Array of symbol names to get the typesupports. - const char * const * symbol_name; - - /// Array of pointers to type support handle functions that were successfully found. - void ** data; -} type_support_map_t; - -#ifdef __cplusplus -} -#endif +#include "rosidl_typesupport_c/type_support_map.h" #endif // ROSIDL_TYPESUPPORT_CPP__TYPE_SUPPORT_MAP_H_ diff --git a/rosidl_typesupport_cpp/package.xml b/rosidl_typesupport_cpp/package.xml index b51a1995..f3db7e81 100644 --- a/rosidl_typesupport_cpp/package.xml +++ b/rosidl_typesupport_cpp/package.xml @@ -11,6 +11,7 @@ rcpputils rosidl_runtime_c + rosidl_typesupport_c