OLD | NEW |
---|---|
(Empty) | |
1 // Copyright 2017 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef CHROMEOS_DBUS_BIOD_FAKE_BIOD_CLIENT_H_ | |
6 #define CHROMEOS_DBUS_BIOD_FAKE_BIOD_CLIENT_H_ | |
7 | |
8 #include "base/macros.h" | |
9 #include "base/observer_list.h" | |
10 #include "chromeos/chromeos_export.h" | |
11 #include "chromeos/dbus/biod/biod_client.h" | |
12 | |
13 namespace dbus { | |
14 class Bus; | |
15 class ObjectPath; | |
16 } // namespace dbus | |
17 | |
18 namespace chromeos { | |
19 | |
20 // A fake implementation of BiodClient. | |
21 class CHROMEOS_EXPORT FakeBiodClient : public BiodClient { | |
22 public: | |
23 FakeBiodClient(); | |
24 ~FakeBiodClient() override; | |
25 | |
26 void NotifyEnrollScanDoneReceived(biod::ScanResult type_result, | |
Daniel Erat
2017/04/04 05:53:34
nit: add a comment above these like:
// Notifies
sammiequon
2017/04/04 16:07:22
Done.
| |
27 bool is_complete); | |
28 void NotifyAuthScanDoneReceived(biod::ScanResult type_result, | |
29 const AuthScanMatches& matches); | |
30 void NotifySessionFailedReceived(); | |
31 | |
32 // BiodClient: | |
33 void Init(dbus::Bus* bus) override; | |
34 void AddObserver(Observer* observer) override; | |
35 void RemoveObserver(Observer* observer) override; | |
36 bool HasObserver(const Observer* observer) const override; | |
37 void StartEnrollSession(const std::string& user_id, | |
38 const std::string& label, | |
39 const ObjectPathCallback& callback) override; | |
40 void GetRecordsForUser(const std::string& user_id, | |
41 const UserRecordsCallback& callback) override; | |
42 void DestroyAllRecords() override; | |
43 void StartAuthSession(const ObjectPathCallback& callback) override; | |
44 void RequestType(const BiometricTypeCallback& callback) override; | |
45 void CancelEnrollSession( | |
46 const dbus::ObjectPath& enroll_session_path) override; | |
47 void EndAuthSession(const dbus::ObjectPath& auth_session_path) override; | |
48 void SetRecordLabel(const dbus::ObjectPath& record_path, | |
49 const std::string& label) override; | |
50 void RemoveRecord(const dbus::ObjectPath& record_path) override; | |
51 void RequestRecordLabel(const dbus::ObjectPath& record_path, | |
52 const LabelCallback& callback) override; | |
53 | |
54 private: | |
55 base::ObserverList<Observer> observers_; | |
56 | |
57 DISALLOW_COPY_AND_ASSIGN(FakeBiodClient); | |
58 }; | |
59 | |
60 } // namespace chromeos | |
61 | |
62 #endif // CHROMEOS_DBUS_BIOD_FAKE_BIOD_CLIENT_H_ | |
OLD | NEW |