Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(482)

Side by Side Diff: chromeos/dbus/biod/biod_record_client.h

Issue 2581403002: cros: Remaining interfaces for DBUS biometrics client. (Closed)
Patch Set: Rebased. Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(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_BIOD_RECORD_CLIENT_H_
6 #define CHROMEOS_DBUS_BIOD_BIOD_RECORD_CLIENT_H_
7
8 #include <string>
9
10 #include "base/callback.h"
11 #include "base/macros.h"
12 #include "chromeos/chromeos_export.h"
13 #include "chromeos/dbus/dbus_client.h"
14 #include "chromeos/dbus/dbus_client_implementation_type.h"
15
16 namespace dbus {
17 class ObjectPath;
18 }
19
20 namespace chromeos {
21
22 // BiodRecordClient is used to communicate with a biod record via dbus
23 // interface.
24 class CHROMEOS_EXPORT BiodRecordClient : public DBusClient {
25 public:
26 ~BiodRecordClient() override;
27
28 // LabelCallback is for the RequestLabel method. It receives one argument
29 // which is the label of the record.
30 using LabelCallback = base::Callback<void(const std::string&)>;
31
32 // Changes the label of the record at |record_path| to |label|.
33 virtual void SetLabel(const dbus::ObjectPath& record_path,
34 const std::string& label) = 0;
35
36 // Removes the record at |record_path|. This record will no longer be able to
37 // used for authentication.
38 virtual void Remove(const dbus::ObjectPath& record_path) = 0;
39
40 // Requests the label of the record at |record_path|. |callback| is called
41 // with the label of the record.
42 virtual void RequestLabel(const dbus::ObjectPath& record_path,
43 const LabelCallback& callback) = 0;
44
45 // Creates the instance.
46 static BiodRecordClient* Create(DBusClientImplementationType type);
47
48 protected:
49 // Create() should be used instead.
50 BiodRecordClient();
51
52 private:
53 DISALLOW_COPY_AND_ASSIGN(BiodRecordClient);
54 };
55
56 } // namespace chromeos
57
58 #endif // CHROMEOS_DBUS_BIOD_BIOD_RECORD_CLIENT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698