#ifndef FROMWEBAPI_H #define FROMWEBAPI_H #include "lhhttpapi.h" #include "TransmitterSwitchInfo.h" #include struct OnePlanItemInfo; class FromWebAPI { public: FromWebAPI(); ~FromWebAPI(); /* 初始化WebAPI */ bool initWebApi(const QString& url,const QString& serverID,const QString& serverKey); /* 获取设备信息 */ bool getDeviceInfo(QMap& mapDevice); /* 获取频率信息 */ bool getChannelInfo(QMap& mapFreq); /* 将数据写入EQM数据库 */ bool insertData(int chnID, QList& list); /* 获取tExecPlan表格数据 */ bool getExecPlanData(int chnID, QList& list); bool getExecPlanData(QMap>& mapPlan); /* 删除所有行 */ bool deleteAllRow(); /* 删除一个发射机计划 */ bool deleteOneChnPlan(int chnID); /* 将页面的配置写入数据库 */ bool insertConfigData(QMap& list); /* 删除配置数据 */ bool deleteConfigData(QMap& list); /* 获取配置数据 */ bool getConfigData(QMap& list); /* 单独获取某个关键字的数据 */ bool getConfigData(int key, ConfigData& data); /* 获取EQM数据库中的模版编号 */ bool getEQMTemplateID(QList& listId); /* 保存到模板 */ bool saveTemplate(const QString& templateName, QList& list); /* 获取模板内容 */ bool getOneTemplateData(QString templateName, QList& list); /* 获取多个模板的内容 */ bool getTemplateData(QList& listTemplate, QMap>& mapPlan); /* 获取模板列表 */ bool getTemplateList(QMultiMap& mapTemplate); /* 获取某个频率的模版列表 */ bool getTemplateList(int chnID, QList& listTemplate); /* 删除一个模板 */ bool deleteTemplate(const QString& name); private: lhhttpapi* m_httpApi = nullptr; QString m_userToken; }; #endif /* FROMWEBAPI_H */