/*
 * Copyright 2022 KylinSoft Co., Ltd.
 *
 * This program is free software: you can redistribute it and/or modify it under
 * the terms of the GNU General Public License as published by the Free Software
 * Foundation, either version 3 of the License, or (at your option) any later
 * version.
 *
 * This program is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
 * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License along with
 * this program. If not, see <https://www.gnu.org/licenses/>.
 */

#ifndef DATAPROCESS_H
#define DATAPROCESS_H

#include <QObject>
#include <QDateTime>
#include <QDir>
#include <QDateTime>
#include <QTimeZone>
#include <QJsonObject>
#include <QJsonArray>
#include <QJsonDocument>
#include <QDebug>
#include <QtPlugin>
#include <QPluginLoader>
#include "commondata.h"
#include "unistd.h"

//编译阶段判断是否有此头文件
#if __has_include(<uploadPluginInterface.h>)
#define  hasUploadInterface
#include <uploadPluginInterface.h>
#endif

class DataProcess : public QObject
{
public:
    DataProcess();
    ~DataProcess();

    static DataProcess *getInstance();
    void sendData(const pointDataStruct &data); //触发模块，触发功能单元，内容，动作

private:
    QHash<QString, int> m_functionCount;
    QHash<QString, QStringList> m_applist;

    bool m_initState = false;

#ifdef hasUploadInterface
    UploadPluginInterface *m_sendDataInterface = nullptr;
#endif
};

#endif // DATAPROCESS_H
