ConfigJSON.h 479 B

1234567891011121314151617181920212223242526
  1. #ifndef CONFIGJSON_H
  2. #define CONFIGJSON_H
  3. #include <memory>
  4. #include <iostream>
  5. #include "FileHelper.h"
  6. #include "ProtoHelper.h"
  7. class ConfigJSON
  8. {
  9. private:
  10. std::shared_ptr<FileHelper> _file;
  11. std::string _jsonFileName;
  12. public:
  13. ConfigJSON(std::string jsonFileName, std::shared_ptr<FileHelper> file);
  14. bool load();
  15. bool save();
  16. uint16_t volume;
  17. std::string deviceName;
  18. AudioFormat format;
  19. };
  20. extern std::shared_ptr<ConfigJSON> configMan;
  21. #endif