blob: 405e9b88a04fe6ef07bc0acd81c050abc2c93fea [file] [log] [blame]
Janis Danisevskis7a1cf382020-11-20 11:22:14 -08001// Copyright 2020, The Android Open Source Project
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7// http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15cc_library {
16 name: "libkeystore2_apc_compat",
17 srcs: [
18 "apc_compat.cpp",
19 ],
20 shared_libs: [
21 "android.hardware.confirmationui@1.0",
22 "libbase",
23 "libhidlbase",
24 "libutils",
25 ],
26}
27
28rust_bindgen {
29 name: "libkeystore2_apc_compat_bindgen",
30 wrapper_src: "apc_compat.hpp",
31 crate_name: "keystore2_apc_compat_bindgen",
32 source_stem: "bindings",
33
34 bindgen_flags: [
35 "--whitelist-function=tryGetUserConfirmationService",
36 "--whitelist-function=promptUserConfirmation",
37 "--whitelist-function=abortUserConfirmation",
38 "--whitelist-function=closeUserConfirmationService",
39 "--whitelist-var=INVALID_SERVICE_HANDLE",
40 "--whitelist-var=APC_COMPAT_.*",
41 ],
42}
43
44rust_library {
45 name: "libkeystore2_apc_compat-rust",
46 crate_name: "keystore2_apc_compat",
47 srcs: [
48 "apc_compat.rs",
49 ],
50 rustlibs: [
51 "libkeystore2_apc_compat_bindgen",
52 ],
53 shared_libs: [
54 "libkeystore2_apc_compat",
55 ],
56}