From 45a0b1cecde0eeecf8b8be75ec24d1ecc3ad884f Mon Sep 17 00:00:00 2001 From: Robin Krahl Date: Wed, 4 Apr 2018 23:56:31 +0200 Subject: Add a NitrokeyManager::connect overload for enum Identifying the model to connect to by the first character of a string is not intuitive. This patch adds an overload for the connect function that accepts a device::DeviceModel enum value, providing a cleaner interface. --- libnitrokey/NitrokeyManager.h | 1 + 1 file changed, 1 insertion(+) (limited to 'libnitrokey') diff --git a/libnitrokey/NitrokeyManager.h b/libnitrokey/NitrokeyManager.h index ca58d24..1f4cec4 100644 --- a/libnitrokey/NitrokeyManager.h +++ b/libnitrokey/NitrokeyManager.h @@ -80,6 +80,7 @@ char * strndup(const char* str, size_t maxlen); bool connect_with_ID(const std::string id); bool connect_with_path (std::string path); bool connect(const char *device_model); + bool connect(device::DeviceModel device_model); bool connect(); bool disconnect(); bool is_connected() throw() ; -- cgit v1.2.1