| Index: chromeos/dbus/biod/biod_record_client.h
|
| diff --git a/chromeos/dbus/biod/biod_record_client.h b/chromeos/dbus/biod/biod_record_client.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..c86a46703f6bf9e13ee1a36a0f500c6bda81dc8c
|
| --- /dev/null
|
| +++ b/chromeos/dbus/biod/biod_record_client.h
|
| @@ -0,0 +1,58 @@
|
| +// Copyright 2017 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#ifndef CHROMEOS_DBUS_BIOD_BIOD_RECORD_CLIENT_H_
|
| +#define CHROMEOS_DBUS_BIOD_BIOD_RECORD_CLIENT_H_
|
| +
|
| +#include <string>
|
| +
|
| +#include "base/callback.h"
|
| +#include "base/macros.h"
|
| +#include "chromeos/chromeos_export.h"
|
| +#include "chromeos/dbus/dbus_client.h"
|
| +#include "chromeos/dbus/dbus_client_implementation_type.h"
|
| +
|
| +namespace dbus {
|
| +class ObjectPath;
|
| +}
|
| +
|
| +namespace chromeos {
|
| +
|
| +// BiodRecordClient is used to communicate with a biod record via dbus
|
| +// interface.
|
| +class CHROMEOS_EXPORT BiodRecordClient : public DBusClient {
|
| + public:
|
| + ~BiodRecordClient() override;
|
| +
|
| + // LabelCallback is for the RequestLabel method. It receives one argument
|
| + // which is the label of the record.
|
| + using LabelCallback = base::Callback<void(const std::string&)>;
|
| +
|
| + // Changes the label of the record at |record_path| to |label|.
|
| + virtual void SetLabel(const dbus::ObjectPath& record_path,
|
| + const std::string& label) = 0;
|
| +
|
| + // Removes the record at |record_path|. This record will no longer be able to
|
| + // used for authentication.
|
| + virtual void Remove(const dbus::ObjectPath& record_path) = 0;
|
| +
|
| + // Requests the label of the record at |record_path|. |callback| is called
|
| + // with the label of the record.
|
| + virtual void RequestLabel(const dbus::ObjectPath& record_path,
|
| + const LabelCallback& callback) = 0;
|
| +
|
| + // Creates the instance.
|
| + static BiodRecordClient* Create(DBusClientImplementationType type);
|
| +
|
| + protected:
|
| + // Create() should be used instead.
|
| + BiodRecordClient();
|
| +
|
| + private:
|
| + DISALLOW_COPY_AND_ASSIGN(BiodRecordClient);
|
| +};
|
| +
|
| +} // namespace chromeos
|
| +
|
| +#endif // CHROMEOS_DBUS_BIOD_BIOD_RECORD_CLIENT_H_
|
|
|