Fix generated code build error for extension option 43/323043/3
authorChanggyu Choi <changyu.choi@samsung.com>
Tue, 22 Apr 2025 08:51:18 +0000 (17:51 +0900)
committerChanggyu Choi <changyu.choi@samsung.com>
Tue, 29 Apr 2025 07:22:06 +0000 (16:22 +0900)
Some internal api symbols can be ambiguous.

Change-Id: Iaeb44fbad334029b8528b457290b9dfee654b592
Signed-off-by: Changgyu Choi <changyu.choi@samsung.com>
idlc/gen/c_stub_body_gen_cb.h
idlc/gen/cpp_stub_body_gen_cb.h
idlc/gen/version2/c_body_generator_base_cb.hh
idlc/gen/version2/cpp_generator_base_cb.hh
idlc/gen/version2/cpp_stub_body_generator_cb.hh

index 1a324684a5936d13ae7c7683308ef8658330e2a8..37c9021f35dc6fd40df5a33a6ddbf3e31debdda9 100644 (file)
@@ -1220,7 +1220,6 @@ if (ret != RPC_PORT_ERROR_NONE) {
 
 constexpr const char CB_INTENRAL_HEADER_INCLUSION[] =
 R"__c_cb(
-#include <rpc-port-internal.h>
 )__c_cb";
 
 /**
index 2e7b82204f2a1bdf2e62a7ef941db5a91397ed3d..b4124fdf1c03a5b48e0ab91a1af4e867abd970a2 100644 (file)
@@ -273,7 +273,6 @@ void $$::ServiceBase::Disconnect() {
 
 constexpr const char CB_INTERNAL_HEADER_INCLUSION[] =
 R"__cpp_cb(
-#include <rpc-port-internal.h>
 )__cpp_cb";
 
 /**
index 5d16a96b87008a1c3246b51f93c19f091d87d524..3459ad6877a2eb26321ec087525c6e3f250ae8f3 100644 (file)
@@ -1477,7 +1477,7 @@ typedef int (*rpc_port_parcel_write_fd_t)(rpc_port_parcel_h h, int fd);
 typedef int (*rpc_port_parcel_read_fd_t)(rpc_port_parcel_h h, int* fd);
 typedef int (*rpc_port_parcel_clone_t)(rpc_port_parcel_h* h, rpc_port_parcel_h origin);
 typedef int (*rpc_port_get_peer_info_t)(rpc_port_h h, pid_t* pid, uid_t* uid);
-
+typedef int (*rpc_port_stub_has_pending_request_t)(rpc_port_stub_h, bool *);
 static rpc_port_parcel_reserve_t rpc_port_parcel_reserve;
 static rpc_port_parcel_create_from_parcel_t rpc_port_parcel_create_from_parcel;
 static rpc_port_parcel_set_data_size_t rpc_port_parcel_set_data_size;
@@ -1489,6 +1489,7 @@ static rpc_port_parcel_write_fd_t rpc_port_parcel_write_fd;
 static rpc_port_parcel_read_fd_t rpc_port_parcel_read_fd;
 static rpc_port_parcel_clone_t rpc_port_parcel_clone;
 static rpc_port_get_peer_info_t rpc_port_get_peer_info;
+static rpc_port_stub_has_pending_request_t rpc_port_stub_has_pending_request;
 
 static bool rpc_port_internal_loaded;
 
@@ -1575,6 +1576,13 @@ static void rpc_port_internal_init(void)
       return;
     }
 
+    symbol = "rpc_port_stub_has_pending_request";
+    rpc_port_stub_has_pending_request = dlsym(RTLD_DEFAULT, symbol);
+    if (rpc_port_stub_has_pending_request == nullptr) {
+      _E("Failed to find symbol(%s). Please check rpc-port version", symbol);
+      return;
+    }
+
     rpc_port_internal_loaded = true;
 }
 
index af5239d4dde82d03d0e535be9a80d70446b53d93..02b4f1e72f092fe8e503e296647f870c24acbfcd 100644 (file)
@@ -966,6 +966,7 @@ using rpc_port_parcel_write_fd_t = int (*)(rpc_port_parcel_h h, int fd);
 using rpc_port_parcel_read_fd_t = int (*)(rpc_port_parcel_h h, int* fd);
 using rpc_port_parcel_clone_t = int (*)(rpc_port_parcel_h* h, rpc_port_parcel_h origin);
 using rpc_port_get_peer_info_t = int (*)(rpc_port_h h, pid_t* pid, uid_t* uid);
+using rpc_port_stub_has_pending_request_t = int (*)(rpc_port_stub_h, bool *);
 
 rpc_port_parcel_reserve_t rpc_port_parcel_reserve;
 rpc_port_parcel_create_from_parcel_t rpc_port_parcel_create_from_parcel;
@@ -978,6 +979,7 @@ rpc_port_parcel_write_fd_t rpc_port_parcel_write_fd;
 rpc_port_parcel_read_fd_t rpc_port_parcel_read_fd;
 rpc_port_parcel_clone_t rpc_port_parcel_clone;
 rpc_port_get_peer_info_t rpc_port_get_peer_info;
+rpc_port_stub_has_pending_request_t rpc_port_stub_has_pending_request;
 
 class RpcPortInternals {
  public:
@@ -1071,6 +1073,14 @@ class RpcPortInternals {
       _E("Failed to find symbol(%s). Please check rpc-port version", symbol.c_str());
       return;
     }
+
+    symbol = "rpc_port_stub_has_pending_request";
+    rpc_port_stub_has_pending_request = reinterpret_cast<rpc_port_stub_has_pending_request_t>(
+    dlsym(RTLD_DEFAULT, symbol.c_str()));
+    if (rpc_port_stub_has_pending_request == nullptr) {
+      _E("Failed to find symbol(%s). Please check rpc-port version", symbol.c_str());
+      return;
+    }
   }
 };
 
index 0ed537f09a617315a0fe7ab58f98606fbe0a44e6..eb61eb65ad59e79540d7dd262d61790d62d0e6b6 100644 (file)
@@ -854,7 +854,6 @@ EXPORT_API int rpc_port_stub_<INPUT_FILE>_lem_<CLS_NAME>_send(void* context, rpc
 
 constexpr const char CB_INTERNAL_HEADER_INCLUSION[] =
 R"__cpp_cb(
-#include <rpc-port-internal.h>
 )__cpp_cb";
 
 /**