/* * 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 DBUSADAPTORLAUNCHER_H #define DBUSADAPTORLAUNCHER_H #include "launcher.h" #include "launcheriteminfolist.h" #include #include #include #include #include #include #include #include #include #include /* * Adaptor class for interface org.deepin.dde.daemon.Launcher1 */ class DBusAdaptorLauncher: public QDBusAbstractAdaptor { Q_OBJECT Q_CLASSINFO("D-Bus Interface", "org.deepin.dde.daemon.Launcher1") Q_CLASSINFO("D-Bus Introspection", "" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" "") public: explicit DBusAdaptorLauncher(QObject *parent); virtual ~DBusAdaptorLauncher(); Launcher *parent() const; public: // PROPERTIES Q_PROPERTY(int DisplayMode READ displayMode WRITE setDisplayMode NOTIFY DisplayModeChanged) Q_PROPERTY(bool Fullscreen READ fullscreen WRITE setFullscreen NOTIFY FullscreenChanged) int displayMode() const; void setDisplayMode(int value); bool fullscreen() const; void setFullscreen(bool value); public Q_SLOTS: // METHODS LauncherItemInfoList GetAllItemInfos(); QStringList GetAllNewInstalledApps(); bool GetDisableScaling(const QString &id); LauncherItemInfo GetItemInfo(const QString &id); bool GetUseProxy(const QString &id); bool IsItemOnDesktop(const QString &id); bool RequestRemoveFromDesktop(const QString &id); bool RequestSendToDesktop(const QString &id); void RequestUninstall(const QString &id, bool unused); void SetDisableScaling(const QString &id, bool value); void SetUseProxy(const QString &id, bool value); Q_SIGNALS: // SIGNALS void ItemChanged(const QString &status, const LauncherItemInfo &itemInfo, qlonglong categoryID); void NewAppLaunched(const QString &appID); void UninstallFailed(const QString &appId, const QString &errMsg); void UninstallSuccess(const QString &appID); void DisplayModeChanged(int mode); // 该接口与1050 dbus服务接口签名保持一致 void FullscreenChanged(); void AppSuffixChanged(); }; #endif