blob: d6e321a935887be94e444645874c2f37b811723b [file] [log] [blame]
Sébastien Blin1f915762020-08-03 13:27:42 -04001/*
2 * Copyright (C) 2019-2020 by Savoir-faire Linux
3 * Author: Yang Wang <yang.wang@savoirfairelinux.com>
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 3 of the License, or
8 * (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17 */
18
19#pragma once
20
21#include "accountadapter.h"
22#include "accountlistmodel.h"
23#include "audiocodeclistmodel.h"
24#include "avadapter.h"
25#include "bannedlistmodel.h"
26#include "calladapter.h"
27#include "contactadapter.h"
28#include "conversationsadapter.h"
29#include "deviceitemlistmodel.h"
30#include "pluginitemlistmodel.h"
31#include "preferenceitemlistmodel.h"
32#include "distantrenderer.h"
33#include "globalinstances.h"
34#include "globalsystemtray.h"
35#include "messagesadapter.h"
36#include "namedirectory.h"
37#include "pixbufmanipulator.h"
38#include "previewrenderer.h"
39#include "qrimageprovider.h"
40#include "settingsadaptor.h"
41#include "utils.h"
42#include "version.h"
43#include "videocodeclistmodel.h"
44
45#include <QObject>
46
47class ClientWrapper : public QObject
48{
49 Q_OBJECT
50
51 Q_PROPERTY(UtilsAdapter *utilsAdaptor READ getUtilsAdapter NOTIFY utilsAdaptorChanged)
52 Q_PROPERTY(SettingsAdaptor *settingsAdaptor READ getSettingsAdaptor NOTIFY settingsAdaptorChanged)
53 Q_PROPERTY(NameDirectory *nameDirectory READ getNameDirectory NOTIFY nameDirectoryChanged)
54 Q_PROPERTY(LRCInstance *lrcInstance READ getLRCInstance NOTIFY lrcInstanceChanged)
55 Q_PROPERTY(AccountAdapter *accountAdaptor READ getAccountAdapter NOTIFY accountAdaptorChanged)
56 Q_PROPERTY(RenderManager *renderManager READ getRenderManager NOTIFY renderManagerChanged)
57 Q_PROPERTY(lrc::api::NewAccountModel *accountModel READ getAccountModel NOTIFY accountModelChanged)
58 Q_PROPERTY(lrc::api::AVModel *avmodel READ getAvModel NOTIFY avmodelChanged)
59 Q_PROPERTY(lrc::api::DataTransferModel *dataTransferModel READ getDataTransferModel NOTIFY dataTransferModelChanged)
60 Q_PROPERTY(lrc::api::ContactModel *contactModel READ getContactModel NOTIFY contactModelChanged)
61 Q_PROPERTY(lrc::api::NewDeviceModel *deviceModel READ getDeviceModel NOTIFY deviceModelChanged)
62 Q_PROPERTY(lrc::api::PluginModel *pluginModel READ getPluginModel)
63public:
64 explicit ClientWrapper(QObject *parent = nullptr);
65
66 NameDirectory *getNameDirectory();
67 UtilsAdapter *getUtilsAdapter();
68 SettingsAdaptor *getSettingsAdaptor();
69 LRCInstance *getLRCInstance();
70 AccountAdapter *getAccountAdapter();
71
72 RenderManager *getRenderManager();
73 lrc::api::NewAccountModel *getAccountModel();
74 lrc::api::AVModel *getAvModel();
75 lrc::api::DataTransferModel *getDataTransferModel();
76
77 lrc::api::ContactModel *getContactModel();
78 lrc::api::NewDeviceModel *getDeviceModel();
79 lrc::api::PluginModel *getPluginModel();
80
81signals:
82 void utilsAdaptorChanged();
83 void settingsAdaptorChanged();
84 void nameDirectoryChanged();
85 void lrcInstanceChanged();
86 void accountAdaptorChanged();
87 void renderManagerChanged();
88 void accountModelChanged();
89 void avmodelChanged();
90 void dataTransferModelChanged();
91 void contactModelChanged();
92 void deviceModelChanged();
93};
94#if QT_VERSION >= QT_VERSION_CHECK(5, 8, 0)
95Q_DECLARE_METATYPE(ClientWrapper *)
96#endif