diff options
author | Szczepan Zalega <szczepan@nitrokey.com> | 2017-02-17 09:27:38 +0100 |
---|---|---|
committer | Szczepan Zalega <szczepan@nitrokey.com> | 2017-03-11 15:41:47 +0100 |
commit | 8617a13371d087b1eb67bd066926038d289ab331 (patch) | |
tree | 1efc49c7f9c40e1661b0a7875e68587b13156135 /NitrokeyManager.cc | |
parent | bf63972b2f9c90180d491f5ad314702fa7b8051f (diff) | |
download | libnitrokey-8617a13371d087b1eb67bd066926038d289ab331.tar.gz libnitrokey-8617a13371d087b1eb67bd066926038d289ab331.tar.bz2 |
Handle SD card related functions
Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
Diffstat (limited to 'NitrokeyManager.cc')
-rw-r--r-- | NitrokeyManager.cc | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/NitrokeyManager.cc b/NitrokeyManager.cc index 57ef878..176f516 100644 --- a/NitrokeyManager.cc +++ b/NitrokeyManager.cc @@ -745,6 +745,11 @@ namespace nitrokey{ return strdup(p.data().dissect().c_str()); } + std::pair<uint8_t,uint8_t> NitrokeyManager::get_SD_usage_data(){ + auto p = stick20::GetSDCardOccupancy::CommandTransaction::run(device); + return std::make_pair(p.data().WriteLevelMin, p.data().WriteLevelMax); + } + int NitrokeyManager::get_progress_bar_value(){ try{ stick20::GetDeviceStatus::CommandTransaction::run(device); @@ -782,4 +787,9 @@ namespace nitrokey{ misc::execute_password_command<stick20::DisableHiddenEncryptedPartition>(device, ""); } + int NitrokeyManager::get_SD_card_size() { + auto data = stick20::ProductionTest::CommandTransaction::run(device); + return data.data().SD_Card_Size_u8; + } + } |