You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

MainClass.h 1.3KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. //
  2. // Created by robin on 8/8/15.
  3. //
  4. #ifndef PDNS_SLAVE_MAINCLASS_H
  5. #define PDNS_SLAVE_MAINCLASS_H
  6. #include <memory>
  7. #include <Business/FreeFareTagBusiness.h>
  8. #include <Business/NfcDeviceBusiness.h>
  9. class MainClass {
  10. public:
  11. MainClass(int argc, char* argv[]);
  12. int main();
  13. std::shared_ptr<NfcDeviceBusiness> getDevice(const std::string& deviceName, std::vector<std::shared_ptr<NfcDeviceBusiness>> devices);
  14. std::shared_ptr<FreeFareTagBusiness> getTag(const std::string& tagUid, std::vector<std::shared_ptr<FreeFareTagBusiness>> tags);
  15. int mapKeys(std::shared_ptr<FreeFareTagBusiness> tag, std::vector<std::string> keys);
  16. int dump(std::shared_ptr<FreeFareTagBusiness> tag, std::vector<std::string> keys);
  17. Result<std::vector<std::string>> readFile(const std::string& filePath);
  18. void printBlockAccessBits(const AccessBitsDbo& accessBits, int block);
  19. void printTrailerAccessBits(const AccessBitsDbo& accessBits);
  20. void printVersion();
  21. std::ostream& cout();
  22. static void printPercent(int done, int total, const std::string& header);
  23. static void printPercentMapKeys(int done, int total);
  24. static void printPercentDump(int done, int total);
  25. private:
  26. int _argc;
  27. char** _argv;
  28. std::shared_ptr<std::ostream> _outputStream;
  29. };
  30. #endif //PDNS_SLAVE_MAINCLASS_H