cmdmanager.h 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. #ifndef CMDMANAGER_H
  2. #define CMDMANAGER_H
  3. #include "qmlhandler.h"
  4. #include <json/json.h>
  5. #include <map>
  6. #include <string>
  7. #include <vector>
  8. struct fileEntry {
  9. bool dirty;
  10. std::string type;
  11. std::string method;
  12. int progress;
  13. float speed;
  14. };
  15. namespace CmdManager {
  16. void init();
  17. void setQmlHandler(QMLHandler *q);
  18. void updateInternalFile(std::string name, std::string type, std::string method, int progress, float speed);
  19. void emitFileList();
  20. void cleanInternalList();
  21. void executeCmd(std::string cmd, Json::Value root);
  22. void setCachedIP(QString ip);
  23. void setCachedPort(QString port);
  24. void handleError(Json::Value root);
  25. void handleStatus(Json::Value root);
  26. void handleClose(Json::Value root);
  27. void handleList(Json::Value root);
  28. void handleExtendedList(Json::Value root);
  29. void handleConnect(Json::Value root);
  30. void handleVersion(Json::Value root);
  31. void handleLogin(Json::Value root);
  32. void handleSignup(Json::Value root);
  33. void handlePut(Json::Value root);
  34. void handlePutData(Json::Value root);
  35. void handleGet(Json::Value root);
  36. void handleGetData(Json::Value root);
  37. void handleDeleteMe(Json::Value root);
  38. void handleDeleteFile(Json::Value root);
  39. void handleNotifications(Json::Value root);
  40. void handleQueue(Json::Value root);
  41. void handleDequeue(Json::Value root);
  42. void handleExtendedStatus(Json::Value root);
  43. void handleKeyfile(Json::Value root);
  44. void handleClosekey(Json::Value root);
  45. } // namespace CmdManager
  46. #endif // CMDMANAGER_H