Browse Source

updated cli callbacks

develop
Robin Thoni 7 years ago
parent
commit
c5a35d55b7
2 changed files with 10 additions and 10 deletions
  1. 7
    7
      cli/cli/MainClass.cpp
  2. 3
    3
      cli/cli/MainClass.h

+ 7
- 7
cli/cli/MainClass.cpp View File

364
     }
364
     }
365
 }
365
 }
366
 
366
 
367
-void MainClass::printPercentMapKeys(int done, int total)
367
+void MainClass::printPercentMapKeys(LibNfc::FreeFare::FreeFareTagClassicMappingProgress status)
368
 {
368
 {
369
-    printPercent(done, total, "Mapping keys");
369
+    printPercent(status.done, status.total, "Mapping keys");
370
 }
370
 }
371
 
371
 
372
-void MainClass::printPercentDump(int done, int total)
372
+void MainClass::printPercentDump(LibNfc::FreeFare::FreeFareTagClassicReadProgress status)
373
 {
373
 {
374
-    printPercent(done, total, "Dumping");
374
+    printPercent(status.done, status.total, "Dumping");
375
 }
375
 }
376
 
376
 
377
-void MainClass::printPercentWrite(int done, int total)
377
+void MainClass::printPercentWrite(LibNfc::FreeFare::FreeFareTagClassicWriteProgress status)
378
 {
378
 {
379
-    printPercent(done, total, "Writing");
379
+    printPercent(status.done, status.total, "Writing");
380
 }
380
 }
381
 
381
 
382
 void MainClass::printVersion()
382
 void MainClass::printVersion()
383
 {
383
 {
384
     cout() << "LibNfc version: " << LibNfc::Core::LibNfcContext::getLibNfcVersion() << std::endl;
384
     cout() << "LibNfc version: " << LibNfc::Core::LibNfcContext::getLibNfcVersion() << std::endl;
385
-    cout() << "Mifare-tools version: " << LibNfc::Core::LibNfcContext::getLibNfcCppToolsVersion() << std::endl;
385
+    cout() << "LibNfc_cppTools version: " << LibNfc::Core::LibNfcContext::getLibNfcCppToolsVersion() << std::endl;
386
 }
386
 }
387
 
387
 
388
 std::shared_ptr<LibNfc::Core::NfcDevice> MainClass::getDevice(const std::string &deviceName, std::vector<std::shared_ptr<LibNfc::Core::NfcDevice>> devices)
388
 std::shared_ptr<LibNfc::Core::NfcDevice> MainClass::getDevice(const std::string &deviceName, std::vector<std::shared_ptr<LibNfc::Core::NfcDevice>> devices)

+ 3
- 3
cli/cli/MainClass.h View File

52
 
52
 
53
     static void printPercent(int done, int total, const std::string& header);
53
     static void printPercent(int done, int total, const std::string& header);
54
 
54
 
55
-    static void printPercentMapKeys(int done, int total);
55
+    static void printPercentMapKeys(LibNfc::FreeFare::FreeFareTagClassicMappingProgress status);
56
 
56
 
57
-    static void printPercentDump(int done, int total);
57
+    static void printPercentDump(LibNfc::FreeFare::FreeFareTagClassicReadProgress status);
58
 
58
 
59
-    static void printPercentWrite(int done, int total);
59
+    static void printPercentWrite(LibNfc::FreeFare::FreeFareTagClassicWriteProgress status);
60
 
60
 
61
 private:
61
 private:
62
     int _argc;
62
     int _argc;

Loading…
Cancel
Save