2
* Copyright (C) 2016 Canonical, Ltd.
4
* This program is free software; you can redistribute it and/or modify
5
* it under the terms of the GNU Lesser General Public License as published by
6
* the Free Software Foundation; version 3.
8
* This program is distributed in the hope that it will be useful,
9
* but WITHOUT ANY WARRANTY; without even the implied warranty of
10
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
* GNU Lesser General Public License for more details.
13
* You should have received a copy of the GNU Lesser General Public License
14
* along with this program. If not, see <http://www.gnu.org/licenses/>.
16
* Authored by: Thomas Voß <thomas.voss@canonical.com>
20
#ifndef BIOMETRY_DEVICE_H_
21
#define BIOMETRY_DEVICE_H_
23
#include <biometry/do_not_copy_or_move.h>
24
#include <biometry/visibility.h>
38
/// @brief Device models a biometric device.
39
class BIOMETRY_DLL_PUBLIC Device : public DoNotCopyOrMove
42
/// @brief Id is the unique name of a device.
43
typedef std::string Id;
45
/// @brief Descriptor bundles details about a device.
46
class Descriptor : public DoNotCopyOrMove
49
// Safe us some typing.
50
typedef std::shared_ptr<Descriptor> Ptr;
52
/// @brief create returns an instance of the device.
53
virtual std::shared_ptr<Device> create() = 0;
54
/// @brief name returns the human-readable name of the device.
55
virtual std::string name() const = 0;
56
/// @brief author returns the name of the author of the device implementation.
57
virtual std::string author() const = 0;
58
/// @brief description returns a one-line summary of the device implementation.
59
virtual std::string description() const = 0;
63
Descriptor() = default;
67
/// @brief enroller returns a device-specific template_store implementation.
68
virtual TemplateStore& template_store() = 0;
69
/// @brief identifier returns a device-specific Identifier implementation.
70
virtual Identifier& identifier() = 0;
71
/// @brief verifier returns a device-specific Verifier implementation.
72
virtual Verifier& verifier() = 0;
81
#endif // BIOMETRY_DEVICE_H_