From 01befc8f41d98a660f66ca00565f56db9f69137d Mon Sep 17 00:00:00 2001 From: Inseob Kim Date: Tue, 31 Aug 2021 20:28:50 +0900 Subject: Export rpc_unstable header It'll be used by microdroid payload. Test: build Change-Id: I6eaccb55f291a7426ee047bbf6f1f2d211b5b94d --- libs/binder/Android.bp | 6 +++++ .../include_rpc_unstable/binder_rpc_unstable.hpp | 26 ++++++++++++++++++++++ libs/binder/rust/Android.bp | 2 +- libs/binder/rust/src/binder_rpc_unstable.hpp | 26 ---------------------- 4 files changed, 33 insertions(+), 27 deletions(-) create mode 100644 libs/binder/include_rpc_unstable/binder_rpc_unstable.hpp delete mode 100644 libs/binder/rust/src/binder_rpc_unstable.hpp diff --git a/libs/binder/Android.bp b/libs/binder/Android.bp index 572d948509..fccc9fa68a 100644 --- a/libs/binder/Android.bp +++ b/libs/binder/Android.bp @@ -329,6 +329,7 @@ cc_library { "libbinder_ndk", "libutils", ], + export_include_dirs: ["include_rpc_unstable"], // enumerate stable entry points, for apex use stubs: { @@ -342,6 +343,11 @@ cc_library { ], } +filegroup { + name: "libbinder_rpc_unstable_header", + srcs: ["include_rpc_unstable/binder_rpc_unstable.hpp"], +} + // libbinder historically contained additional interfaces that provided specific // functionality in the platform but have nothing to do with binder itself. These // are moved out of libbinder in order to avoid the overhead of their vtables. diff --git a/libs/binder/include_rpc_unstable/binder_rpc_unstable.hpp b/libs/binder/include_rpc_unstable/binder_rpc_unstable.hpp new file mode 100644 index 0000000000..7932d0f29c --- /dev/null +++ b/libs/binder/include_rpc_unstable/binder_rpc_unstable.hpp @@ -0,0 +1,26 @@ +/* + * Copyright (C) 2021 The Android Open Source Project + * + * 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. + */ + +#pragma once + +extern "C" { + +struct AIBinder; + +bool RunRpcServer(AIBinder* service, unsigned int port); +AIBinder* RpcClient(unsigned int cid, unsigned int port); + +} diff --git a/libs/binder/rust/Android.bp b/libs/binder/rust/Android.bp index fe2da18b0d..d9d7cafa7c 100644 --- a/libs/binder/rust/Android.bp +++ b/libs/binder/rust/Android.bp @@ -109,7 +109,7 @@ rust_bindgen { // TODO(b/184872979): remove once the Rust API is created. rust_bindgen { name: "libbinder_rpc_unstable_bindgen", - wrapper_src: "src/binder_rpc_unstable.hpp", + wrapper_src: ":libbinder_rpc_unstable_header", crate_name: "binder_rpc_unstable_bindgen", source_stem: "bindings", shared_libs: [ diff --git a/libs/binder/rust/src/binder_rpc_unstable.hpp b/libs/binder/rust/src/binder_rpc_unstable.hpp deleted file mode 100644 index 7932d0f29c..0000000000 --- a/libs/binder/rust/src/binder_rpc_unstable.hpp +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright (C) 2021 The Android Open Source Project - * - * 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. - */ - -#pragma once - -extern "C" { - -struct AIBinder; - -bool RunRpcServer(AIBinder* service, unsigned int port); -AIBinder* RpcClient(unsigned int cid, unsigned int port); - -} -- cgit v1.2.3-59-g8ed1b