/* * Copyright (C) 2021 ~ 2022 Deepin Technology Co., Ltd. * * Author: weizhixiang * * Maintainer: weizhixiang * * 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 * 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 . */ #ifndef SYNCONFIG_H #define SYNCONFIG_H #include "synmodulebase.h" #include #include class SynConfig final : public QObject { Q_OBJECT Q_CLASSINFO("D-Bus Interface", "org.deepin.sync.Config1") public: // 实例 static SynConfig *instance(QObject *parent = nullptr); // 记录模块对应类信息 static bool registe(QString moduleName, SynModuleBase *module); public slots: // 获取配置信息 QByteArray GetSyncConfig(QString moduleName); // 设置配置信息 void SetSynConfig(QString moduleName, QByteArray ba); private: explicit SynConfig(QObject *parent = nullptr); ~SynConfig(); // 将本服务注册到com.deepin.sync.Daemon void registerOnSyncDaemon(); static QMap synModulesMap; // 记录模块对应类 }; #endif // SYNCONFIG_H