jhws.h 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133
  1. /*
  2. * jhws.h
  3. *
  4. * Created on: 2022年4月22日
  5. * Author: pengzc
  6. */
  7. #ifndef JNI_CORE_JHWS_H_
  8. #define JNI_CORE_JHWS_H_
  9. #define WDKL_VERSION "wdkl_version"
  10. #define JHWS_VERSION_NUMBER "wdkl_version_number"
  11. #include <string>
  12. #include <list>
  13. #include <vector>
  14. #include "core/houseinfo.h"
  15. namespace jhws {
  16. struct Community {
  17. int code;
  18. std::string name;
  19. std::string communityId;
  20. };
  21. typedef std::vector<Community> CommunityList;
  22. struct Area {
  23. int code;
  24. std::string name;
  25. std::string areaId;
  26. };
  27. typedef std::vector<Area> AreaList;
  28. struct Building {
  29. int code;
  30. std::string name;
  31. std::string buildId;
  32. };
  33. typedef std::vector<Building> BuildingList;
  34. struct Unit {
  35. int code;
  36. std::string name;
  37. std::string unitId;
  38. };
  39. typedef std::vector<Unit> UnitList;
  40. struct Floor {
  41. int code;
  42. std::string name;
  43. std::string floorId;
  44. };
  45. typedef std::vector<Floor> FloorList;
  46. struct Room {
  47. int code;
  48. std::string name;
  49. std::string roomId;
  50. };
  51. typedef std::vector<Room> RoomList;
  52. struct Device {
  53. std::string type;
  54. std::string deviceNumber;
  55. int communitycode;
  56. int areacode;
  57. std::string areaname;
  58. int buildcode;
  59. std::string buildname;
  60. int unitcode;
  61. std::string unitname;
  62. };
  63. typedef std::vector<Device> DeviceList;
  64. struct Message {
  65. std::string updateTime;
  66. std::string content;
  67. std::string title;
  68. };
  69. typedef std::vector<Message> MessageList;
  70. struct Update {
  71. std::string notice;
  72. std::string device;
  73. };
  74. typedef std::vector<Update> UpdateList;
  75. //获取token
  76. int GetToken(const std::string& id, const std::string& secret, const std::string& encrypted, j::house_setting* profile);
  77. //获取社区列表
  78. int GetCommunities(CommunityList& list, j::house_setting* profile);
  79. //获取区域列表
  80. int GetAreas(AreaList& list, j::house_setting* profile);
  81. //获取楼栋列表
  82. int GetBuildings(BuildingList& list, j::house_setting* profile);
  83. //获取单元列表
  84. int GetUnits(UnitList& list, j::house_setting* profile);
  85. //获取楼层列表
  86. int GetFloors(FloorList& list, j::house_setting* profile);
  87. //获取房间列表
  88. int GetRooms(RoomList& list, j::house_setting* profile);
  89. //绑定设备
  90. int BindDevice(j::house_setting* profile);
  91. //获取设备列表
  92. int GetDevice(DeviceList& list, j::house_setting* profile);
  93. //获取消息最新时间
  94. int GetUpdate(Update& list);
  95. //获取消息列表
  96. int GetMessage(MessageList& list);
  97. //报警
  98. int Alarm(j::house_setting* profile);
  99. } /* namespace jhws */
  100. #endif /* JNI_CORE_JHWS_H_ */