From 4fae9eb71c4ad322e5d9496c78b1d0cb4c9d0db2 Mon Sep 17 00:00:00 2001 From: jusung Date: Fri, 23 Sep 2022 16:28:43 +0900 Subject: [PATCH] Fix build break issue - One Definition Rule [-Werror=odr] Change-Id: I6094e0f334b80be596503b23f9e5a097fefbae39 Signed-off-by: jusung --- idlc/gen_aitt_plugin/aitt_plugin_c_transportable.cc | 2 +- idlc/gen_aitt_plugin/aitt_plugin_cpp_transportable.cc | 8 ++++---- idlc/gen_aitt_plugin/aitt_plugin_internal_header_gen_cb.h | 12 ++++++------ 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/idlc/gen_aitt_plugin/aitt_plugin_c_transportable.cc b/idlc/gen_aitt_plugin/aitt_plugin_c_transportable.cc index bb70f2b..80d8a5c 100644 --- a/idlc/gen_aitt_plugin/aitt_plugin_c_transportable.cc +++ b/idlc/gen_aitt_plugin/aitt_plugin_c_transportable.cc @@ -1035,7 +1035,7 @@ std::string AittPluginCTransportable::GenGroupType() const { std::string AittPluginCTransportable::GenPayloadTransferStatusType(bool internal_type) const { if (internal_type) - return "transfer_status_e"; + return "_transfer_status_e"; else return "_payload_transfer_status_e"; } diff --git a/idlc/gen_aitt_plugin/aitt_plugin_cpp_transportable.cc b/idlc/gen_aitt_plugin/aitt_plugin_cpp_transportable.cc index 80753d3..b0f1316 100644 --- a/idlc/gen_aitt_plugin/aitt_plugin_cpp_transportable.cc +++ b/idlc/gen_aitt_plugin/aitt_plugin_cpp_transportable.cc @@ -90,7 +90,7 @@ R"__cpp_cb( server; ret = _server_add_payload_received_cb(server, [](const char *service_name, const _peer_info_h peer_info, - const _payload_h payload, transfer_status_e status, void *user_data) { + const _payload_h payload, _transfer_status_e status, void *user_data) { ## *sr = static_cast<##*>(user_data); sr->OnPayloadReceivedCB(service_name, peer_info, payload, static_cast<_payload_transfer_status_e>(status), user_data); @@ -323,7 +323,7 @@ R"__c_cb( client = nullptr; ret = _client_add_payload_received_cb(client, [](const char *service_name, const _peer_info_h peer_info, - const _payload_h payload, transfer_status_e status, void *user_data) { + const _payload_h payload, _transfer_status_e status, void *user_data) { $$ *sr = static_cast<$$*>(user_data); sr->OnPayloadReceivedCB(service_name, peer_info, payload, static_cast<_payload_transfer_status_e>(status), user_data); @@ -465,7 +465,7 @@ R"__c_cb( /** * @brief Enumeration for _payload transfer status types. */ -typedef enum _payload_transfer_status_e { +typedef enum __payload_transfer_status_e { AITT_PLUGIN_PAYLOAD_TRANSFER_STATUS_SUCCESS, /**< Transfer is success **/ AITT_PLUGIN_PAYLOAD_TRANSFER_STATUS_FAILURE, /**< Transfer is failed **/ AITT_PLUGIN_PAYLOAD_TRANSFER_STATUS_IN_PROGRESS, /**< Transfer is in progress **/ @@ -997,7 +997,7 @@ std::string AittPluginCppTransportable::GenGroupType() const { std::string AittPluginCppTransportable::GenPayloadTransferStatusType(bool internal_type) const { if (internal_type) - return "transfer_status_e"; + return "_transfer_status_e"; else return "_payload_transfer_status_e"; } diff --git a/idlc/gen_aitt_plugin/aitt_plugin_internal_header_gen_cb.h b/idlc/gen_aitt_plugin/aitt_plugin_internal_header_gen_cb.h index 3b75382..e5749b1 100644 --- a/idlc/gen_aitt_plugin/aitt_plugin_internal_header_gen_cb.h +++ b/idlc/gen_aitt_plugin/aitt_plugin_internal_header_gen_cb.h @@ -31,18 +31,18 @@ R"__c_cb( extern "C" { #endif -typedef enum _transfer_status_e { +typedef enum __transfer_status_e { SUCCESS, /**< Transfer is success **/ FAILURE, /**< Transfer is failed **/ IN_PROGRESS, /**< Transfer is in progress **/ -} transfer_status_e; +} _transfer_status_e; -typedef enum _payload_type_e { +typedef enum __payload_type_e { AITT_PLUGIN_PAYLOAD_TYPE_DATA, /**< Data type payload **/ AITT_PLUGIN_PAYLOAD_TYPE_FILE, /**< File type payload **/ } _payload_type_e; -typedef enum _connection_status_e { +typedef enum __connection_status_e { CONNECTION_STATUS_OK, /**< Connection is ok **/ CONNECTION_STATUS_REJECTED, /**< Connection is rejected **/ CONNECTION_STATUS_ERROR, /**< Connection error occurs **/ @@ -66,7 +66,7 @@ typedef void (*_server_connection_result_cb)( const _connection_result_h result, void *user_data); typedef void (*_server_payload_received_cb)(const char *service_name, const _peer_info_h peer_info, const _payload_h payload, - transfer_status_e status, void *user_data); + _transfer_status_e status, void *user_data); typedef void (*_server_connection_request_cb)(const char *service_name, const _peer_info_h peer_info, void *user_data); typedef void (*_server_disconnected_cb)(const char *service_name, @@ -108,7 +108,7 @@ typedef void (*_client_payload_async_result_cb)( const _payload_async_result_h result, void *user_data); typedef void (*_client_payload_received_cb)(const char *service_name, const _peer_info_h peer_info, const _payload_h payload, - transfer_status_e status, void *user_data); + _transfer_status_e status, void *user_data); typedef void (*_client_disconnected_cb)(const char *service_name, const _peer_info_h peer_info, void *user_data); )__c_cb"; -- 2.7.4