Some internal api symbols can be ambiguous.
Change-Id: Iaeb44fbad334029b8528b457290b9dfee654b592
Signed-off-by: Changgyu Choi <changyu.choi@samsung.com>
constexpr const char CB_INTENRAL_HEADER_INCLUSION[] =
R"__c_cb(
-#include <rpc-port-internal.h>
)__c_cb";
/**
constexpr const char CB_INTERNAL_HEADER_INCLUSION[] =
R"__cpp_cb(
-#include <rpc-port-internal.h>
)__cpp_cb";
/**
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;
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;
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;
}
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;
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:
_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;
+ }
}
};
constexpr const char CB_INTERNAL_HEADER_INCLUSION[] =
R"__cpp_cb(
-#include <rpc-port-internal.h>
)__cpp_cb";
/**