blob: 69950fb8d3e4fc15f1f2d4a8252b1ebc5ead7cec [file] [log] [blame]
Ilya Matyukhina9a3c852020-08-18 03:09:41 -07001/*
2 * Copyright (C) 2020 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17#pragma once
18
19#include <aidl/android/hardware/biometrics/fingerprint/BnSession.h>
20#include <aidl/android/hardware/biometrics/fingerprint/ISessionCallback.h>
21
22namespace aidl::android::hardware::biometrics::fingerprint {
23
24namespace aidl::android::hardware::keymaster = keymaster;
25
26class Session : public BnSession {
27 public:
28 explicit Session(std::shared_ptr<ISessionCallback> cb);
29
30 ndk::ScopedAStatus enroll(int32_t cookie, const keymaster::HardwareAuthToken& hat,
31 std::shared_ptr<ICancellationSignal>* return_val) override;
32
33 ndk::ScopedAStatus authenticate(int32_t cookie, int64_t keystoreOperationId,
34 std::shared_ptr<ICancellationSignal>* return_val) override;
35
36 ndk::ScopedAStatus detectInteraction(int32_t cookie,
37 std::shared_ptr<ICancellationSignal>* return_val) override;
38
39 ndk::ScopedAStatus enumerateEnrollments(int32_t cookie) override;
40
41 ndk::ScopedAStatus removeEnrollments(int32_t cookie,
42 const std::vector<int32_t>& enrollmentIds) override;
43
44 ndk::ScopedAStatus getAuthenticatorId(int32_t cookie) override;
45
46 ndk::ScopedAStatus resetLockout(int32_t cookie,
47 const keymaster::HardwareAuthToken& hat) override;
48
49 ndk::ScopedAStatus onPointerDown(int32_t pointerId, int32_t x, int32_t y, float minor,
50 float major) override;
51
52 ndk::ScopedAStatus onPointerUp(int32_t pointerId) override;
53
54 ndk::ScopedAStatus onUiReady() override;
55
56 private:
57 std::shared_ptr<ISessionCallback> cb_;
58};
59
60} // namespace aidl::android::hardware::biometrics::fingerprint