aboutsummaryrefslogtreecommitdiff
path: root/include/dissect.h
diff options
context:
space:
mode:
authorElie Tournier <tournier.elie@gmail.com>2017-04-18 13:32:27 +0100
committerSzczepan Zalega <szczepan@nitrokey.com>2017-05-25 15:14:09 +0200
commit2428f3ad0a5542a996c16ef80fd7bbd2be5bb5c6 (patch)
tree2adb0370cf498acf12770d1e48439aee7055e9b1 /include/dissect.h
parent05ae75697be8df1b2179035d3ef8dc6b2e7fe30f (diff)
downloadlibnitrokey-2428f3ad0a5542a996c16ef80fd7bbd2be5bb5c6.tar.gz
libnitrokey-2428f3ad0a5542a996c16ef80fd7bbd2be5bb5c6.tar.bz2
Rename functions: s/stick10/NKPro and s/stick20/NKStorage
Signed-off-by: Elie Tournier <tournier.elie@gmail.com>
Diffstat (limited to 'include/dissect.h')
-rw-r--r--include/dissect.h34
1 files changed, 17 insertions, 17 deletions
diff --git a/include/dissect.h b/include/dissect.h
index 69a5129..8ff392a 100644
--- a/include/dissect.h
+++ b/include/dissect.h
@@ -45,12 +45,12 @@ template <CommandID id, class HIDPacket>
class ResponseDissector : semantics::non_constructible {
public:
static std::string status_translate_device(int status){
- auto enum_status = static_cast<proto::stick10::device_status>(status);
+ auto enum_status = static_cast<proto::NKPro::device_status>(status);
switch (enum_status){
- case stick10::device_status::ok: return "OK";
- case stick10::device_status::busy: return "BUSY";
- case stick10::device_status::error: return "ERROR";
- case stick10::device_status::received_report: return "RECEIVED_REPORT";
+ case NKPro::device_status::ok: return "OK";
+ case NKPro::device_status::busy: return "BUSY";
+ case NKPro::device_status::error: return "ERROR";
+ case NKPro::device_status::received_report: return "RECEIVED_REPORT";
}
return std::string("UNKNOWN: ") + std::to_string(status);
}
@@ -60,20 +60,20 @@ class ResponseDissector : semantics::non_constructible {
return str;
}
static std::string status_translate_command(int status){
- auto enum_status = static_cast<proto::stick10::command_status >(status);
+ auto enum_status = static_cast<proto::NKPro::command_status >(status);
switch (enum_status) {
#define p(X) case X: return to_upper(std::string(#X));
- p(stick10::command_status::ok)
- p(stick10::command_status::wrong_CRC)
- p(stick10::command_status::wrong_slot)
- p(stick10::command_status::slot_not_programmed)
- p(stick10::command_status::wrong_password)
- p(stick10::command_status::not_authorized)
- p(stick10::command_status::timestamp_warning)
- p(stick10::command_status::no_name_error)
- p(stick10::command_status::not_supported)
- p(stick10::command_status::unknown_command)
- p(stick10::command_status::AES_dec_failed)
+ p(NKPro::command_status::ok)
+ p(NKPro::command_status::wrong_CRC)
+ p(NKPro::command_status::wrong_slot)
+ p(NKPro::command_status::slot_not_programmed)
+ p(NKPro::command_status::wrong_password)
+ p(NKPro::command_status::not_authorized)
+ p(NKPro::command_status::timestamp_warning)
+ p(NKPro::command_status::no_name_error)
+ p(NKPro::command_status::not_supported)
+ p(NKPro::command_status::unknown_command)
+ p(NKPro::command_status::AES_dec_failed)
#undef p
}
return std::string("UNKNOWN: ") + std::to_string(status);