aboutsummaryrefslogtreecommitdiff
path: root/libnitrokey/device.h
Commit message (Collapse)AuthorAge
* Change std::wstring to std::string in DeviceInfoRobin Krahl2019-01-13
| | | | | | | For easier handling, we should use a std::string instead of std::wstring for the serial number in DeviceInfo. For the conversion, I assume that the serial number is valid UTF-8. As it should be alphanumeric and ASCII only, this should be true.
* Implement operator<< for DeviceModelRobin Krahl2019-01-13
|
* Add Device::create static methodRobin Krahl2019-01-13
| | | | | The method makes it easier to create a std::shared_ptr<Device> from a model enum instance.
* Make Device::enumerate staticRobin Krahl2019-01-13
| | | | | | | | | | | Device::enumerate does not need any instance data, therefore it is made static. Note that this not only changes the public API by making the method static. We also return all connected Nitrokey devices instead of only Storage devices. The NitrokeyManager method list_devices_by_cpuID is changed to check the device type so that they still only return Storage devices. The list_device method now returns both Storage and Pro devices.
* Add product_id_to_model functionRobin Krahl2019-01-13
|
* Extract vendor and product IDs into constantsRobin Krahl2019-01-13
|
* Change Device::enumerate return type to use DeviceInfoRobin Krahl2019-01-13
| | | | | | The return type of Device::enumerate is changed from std::vector<std::string> to std::vector<DeviceInfo> to expose the additional information contained in the DeviceInfo struct.
* Add DeviceInfo struct for enumerationRobin Krahl2019-01-13
| | | | | | This is a preparation for a future patch that will change the enumerate method to return a vector of DeviceInfo instances instead of a vector of strings.
* Make unbundling easierDavid Seifert2018-03-13