Chromium Code Reviews| 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_RECORD_CLIENT_H_ | |
| 6 #define CHROMEOS_DBUS_BIOD_RECORD_CLIENT_H_ | |
| 7 | |
| 8 #include <stdint.h> | |
| 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 #include "chromeos/dbus/dbus_method_call_status.h" | |
| 16 | |
| 17 namespace chromeos { | |
| 18 | |
| 19 // BiodRecordClient is used to communicate with a biod record via dbus | |
| 20 // interface. | |
| 21 class CHROMEOS_EXPORT BiodRecordClient : public DBusClient { | |
| 22 public: | |
| 23 ~BiodRecordClient() override; | |
| 24 | |
| 25 // LabelCallback is for the RequestLabel method. It receives one argument | |
| 26 // which is the label of the record. | |
| 27 using LabelCallback = base::Callback<void(const std::string&)>; | |
| 28 | |
| 29 // Changes the label of the record at |record_path| to |label|. | |
| 30 virtual void SetRecordLabel(const dbus::ObjectPath& record_path, | |
|
rkc
2017/03/25 00:41:38
SetLabel here and Remove below should suffice.
sammiequon
2017/04/03 17:52:27
Done.
| |
| 31 const std::string& label) = 0; | |
| 32 | |
| 33 // Removes the record at |record_path|. This record will no longer be able to | |
| 34 // used for authentication. | |
| 35 virtual void RemoveRecord(const dbus::ObjectPath& record_path) = 0; | |
| 36 | |
| 37 // Requests the label of the record at |record_path|. |callback| is called | |
| 38 // with the label of the record. | |
| 39 virtual void RequestRecordLabel(const dbus::ObjectPath& record_path, | |
|
rkc
2017/03/25 00:41:38
This doesn't seem to exist in the D-Bus API at htt
sammiequon
2017/04/03 17:52:27
It's the property at [1].
[1] https://cs.chromium.
| |
| 40 const LabelCallback& callback) = 0; | |
| 41 | |
| 42 // Creates the instance. | |
| 43 static BiodRecordClient* Create(DBusClientImplementationType type); | |
| 44 | |
| 45 protected: | |
| 46 // Create() should be used instead. | |
| 47 BiodRecordClient(); | |
| 48 | |
| 49 private: | |
| 50 DISALLOW_COPY_AND_ASSIGN(BiodRecordClient); | |
| 51 }; | |
| 52 | |
| 53 } // namespace chromeos | |
| 54 | |
| 55 #endif // CHROMEOS_DBUS_BIOD_RECORD_CLIENT_H_ | |
| OLD | NEW |