diff --git a/.reuse/dep5 b/.reuse/dep5 index 69d393310..fae2097e5 100644 --- a/.reuse/dep5 +++ b/.reuse/dep5 @@ -3,7 +3,7 @@ Upstream-Name: dde-session-shell Upstream-Contact: UnionTech Software Technology Co., Ltd. Source: https://github.com/linuxdeepin/dde-session-shell -# README +# README Files: README.md README.zh_CN.md Copyright: None License: CC-BY-4.0 @@ -19,7 +19,7 @@ Copyright: None License: CC0-1.0 # docs -Files: docs/* +Files: docs/* Copyright: UnionTech Software Technology Co., Ltd. License: GPL-3.0-or-later @@ -39,7 +39,7 @@ Copyright: None License: CC0-1.0 # gitignore -Files: .gitignore +Files: .gitignore Copyright: None License: CC0-1.0 diff --git a/.tx/config b/.tx/config index 2139cd023..cc140acec 100644 --- a/.tx/config +++ b/.tx/config @@ -1,9 +1,10 @@ [main] host = https://www.transifex.com +minimum_perc = 80 +mode = developer -[deepin-desktop-environment.dde-session-shell] +[o:linuxdeepin:p:deepin-desktop-environment:r:dde-session-shell] file_filter = translations/dde-session-shell_.ts -minimum_perc = 0 -source_file = translations/dde-session-shell.ts +source_file = translations/dde-session-shell_en.ts source_lang = en type = QT diff --git a/.tx/deepin.conf b/.tx/deepin.conf index 2d7ce1709..45cd054c3 100644 --- a/.tx/deepin.conf +++ b/.tx/deepin.conf @@ -1,2 +1,2 @@ [transifex] -branch = m23 +branch = m20 \ No newline at end of file diff --git a/src/app/lightdm-deepin-greeter.cpp b/src/app/lightdm-deepin-greeter.cpp index ab611e266..3fa3b4f9d 100644 --- a/src/app/lightdm-deepin-greeter.cpp +++ b/src/app/lightdm-deepin-greeter.cpp @@ -97,6 +97,7 @@ int main(int argc, char* argv[]) DLogManager::setLogFormat("%{time}{yyyy-MM-dd, HH:mm:ss.zzz} [%{type:-7}] [ %{function:-35} %{line}] %{message}\n"); DLogManager::registerConsoleAppender(); + DLogManager::registerJournalAppender(); QDBusConnectionInterface *interface = QDBusConnection::systemBus().interface(); if (!interface->isServiceRegistered(DSS_DBUS::accountsService)) { diff --git a/src/global_util/dbus/accounts1interface.cpp b/src/global_util/dbus/accounts1interface.cpp deleted file mode 100644 index 5b04dd7d3..000000000 --- a/src/global_util/dbus/accounts1interface.cpp +++ /dev/null @@ -1,131 +0,0 @@ -/* - * This file was generated by qdbusxml2cpp-fix version 0.8 - * Command line was: qdbusxml2cpp-fix -p /home/zyz/works/work/v25/dde-session-shell-snipe/src/global_util/dbus/accounts1interface /home/zyz/works/work/v25/dde-session-shell-snipe/xml/snipe/org.deepin.dde.Accounts1.xml - * - * qdbusxml2cpp-fix is Copyright (C) 2016 Deepin Technology Co., Ltd. - * - * This is an auto-generated file. - * This file may have been hand-edited. Look for HAND-EDIT comments - * before re-generating it. - */ - -#include "/home/zyz/works/work/v25/dde-session-shell-snipe/src/global_util/dbus/accounts1interface.h" - -DCORE_USE_NAMESPACE -/* - * Implementation of interface class __OrgDeepinDdeAccounts1Interface - */ - -class __OrgDeepinDdeAccounts1InterfacePrivate -{ -public: - __OrgDeepinDdeAccounts1InterfacePrivate() = default; - - // begin member variables - bool AllowGuest; - QString GuestIcon; - QStringList UserList; - -public: - QMap m_processingCalls; - QMap> m_waittingCalls; -}; - -__OrgDeepinDdeAccounts1Interface::__OrgDeepinDdeAccounts1Interface(const QString &service, const QString &path, const QDBusConnection &connection, QObject *parent) - : DDBusExtendedAbstractInterface(service, path, staticInterfaceName(), connection, parent) - , d_ptr(new __OrgDeepinDdeAccounts1InterfacePrivate) -{ - connect(this, &__OrgDeepinDdeAccounts1Interface::propertyChanged, this, &__OrgDeepinDdeAccounts1Interface::onPropertyChanged); - -} - -__OrgDeepinDdeAccounts1Interface::~__OrgDeepinDdeAccounts1Interface() -{ - qDeleteAll(d_ptr->m_processingCalls.values()); - delete d_ptr; -} - -void __OrgDeepinDdeAccounts1Interface::onPropertyChanged(const QString &propName, const QVariant &value) -{ - if (propName == QStringLiteral("AllowGuest")) - { - const bool &AllowGuest = qvariant_cast(value); - if (d_ptr->AllowGuest != AllowGuest) - { - d_ptr->AllowGuest = AllowGuest; - Q_EMIT AllowGuestChanged(d_ptr->AllowGuest); - } - return; - } - - if (propName == QStringLiteral("GuestIcon")) - { - const QString &GuestIcon = qvariant_cast(value); - if (d_ptr->GuestIcon != GuestIcon) - { - d_ptr->GuestIcon = GuestIcon; - Q_EMIT GuestIconChanged(d_ptr->GuestIcon); - } - return; - } - - if (propName == QStringLiteral("UserList")) - { - const QStringList &UserList = qvariant_cast(value); - if (d_ptr->UserList != UserList) - { - d_ptr->UserList = UserList; - Q_EMIT UserListChanged(d_ptr->UserList); - } - return; - } - - qWarning() << "property not handle: " << propName; - return; -} - -bool __OrgDeepinDdeAccounts1Interface::allowGuest() -{ - return qvariant_cast(internalPropGet("AllowGuest", &d_ptr->AllowGuest)); -} - -QString __OrgDeepinDdeAccounts1Interface::guestIcon() -{ - return qvariant_cast(internalPropGet("GuestIcon", &d_ptr->GuestIcon)); -} - -QStringList __OrgDeepinDdeAccounts1Interface::userList() -{ - return qvariant_cast(internalPropGet("UserList", &d_ptr->UserList)); -} - -void __OrgDeepinDdeAccounts1Interface::CallQueued(const QString &callName, const QList &args) -{ - if (d_ptr->m_waittingCalls.contains(callName)) - { - d_ptr->m_waittingCalls[callName] = args; - return; - } - if (d_ptr->m_processingCalls.contains(callName)) - { - d_ptr->m_waittingCalls.insert(callName, args); - } else { - QDBusPendingCallWatcher *watcher = new QDBusPendingCallWatcher(asyncCallWithArgumentList(callName, args)); - connect(watcher, &QDBusPendingCallWatcher::finished, this, &__OrgDeepinDdeAccounts1Interface::onPendingCallFinished); - d_ptr->m_processingCalls.insert(callName, watcher); - } -} - -void __OrgDeepinDdeAccounts1Interface::onPendingCallFinished(QDBusPendingCallWatcher *w) -{ - w->deleteLater(); - const auto callName = d_ptr->m_processingCalls.key(w); - Q_ASSERT(!callName.isEmpty()); - if (callName.isEmpty()) - return; - d_ptr->m_processingCalls.remove(callName); - if (!d_ptr->m_waittingCalls.contains(callName)) - return; - const auto args = d_ptr->m_waittingCalls.take(callName); - CallQueued(callName, args); -} diff --git a/src/global_util/dbus/accounts1interface.h b/src/global_util/dbus/accounts1interface.h deleted file mode 100644 index 58b89f196..000000000 --- a/src/global_util/dbus/accounts1interface.h +++ /dev/null @@ -1,212 +0,0 @@ -/* - * This file was generated by qdbusxml2cpp-fix version 0.8 - * Command line was: qdbusxml2cpp-fix -p /home/zyz/works/work/v25/dde-session-shell-snipe/src/global_util/dbus/accounts1interface /home/zyz/works/work/v25/dde-session-shell-snipe/xml/snipe/org.deepin.dde.Accounts1.xml - * - * qdbusxml2cpp-fix is Copyright (C) 2016 Deepin Technology Co., Ltd. - * - * This is an auto-generated file. - * Do not edit! All changes made to it will be lost. - */ - -#ifndef ACCOUNTS1INTERFACE_H -#define ACCOUNTS1INTERFACE_H - -#include -#include -#include -#include -#include -#include -#include - -#include -#include - - -/* - * Proxy class for interface org.deepin.dde.Accounts1 - */ -class __OrgDeepinDdeAccounts1InterfacePrivate; -class __OrgDeepinDdeAccounts1Interface : public DTK_CORE_NAMESPACE::DDBusExtendedAbstractInterface -{ - Q_OBJECT - -public: - static inline const char *staticInterfaceName() - { return "org.deepin.dde.Accounts1"; } - -public: - explicit __OrgDeepinDdeAccounts1Interface(const QString &service, const QString &path, const QDBusConnection &connection, QObject *parent = 0); - - ~__OrgDeepinDdeAccounts1Interface(); - - Q_PROPERTY(bool AllowGuest READ allowGuest NOTIFY AllowGuestChanged) - bool allowGuest(); - - Q_PROPERTY(QString GuestIcon READ guestIcon NOTIFY GuestIconChanged) - QString guestIcon(); - - Q_PROPERTY(QStringList UserList READ userList NOTIFY UserListChanged) - QStringList userList(); - -public Q_SLOTS: // METHODS - inline QDBusPendingReply<> AllowGuestAccount(bool in0) - { - QList argumentList; - argumentList << QVariant::fromValue(in0); - return asyncCallWithArgumentList(QStringLiteral("AllowGuestAccount"), argumentList); - } - - inline void AllowGuestAccountQueued(bool in0) - { - QList argumentList; - argumentList << QVariant::fromValue(in0); - - CallQueued(QStringLiteral("AllowGuestAccount"), argumentList); - } - - - inline QDBusPendingReply CreateGuestAccount() - { - QList argumentList; - return asyncCallWithArgumentList(QStringLiteral("CreateGuestAccount"), argumentList); - } - - - - inline QDBusPendingReply CreateUser(const QString &in0, const QString &in1, int in2) - { - QList argumentList; - argumentList << QVariant::fromValue(in0) << QVariant::fromValue(in1) << QVariant::fromValue(in2); - return asyncCallWithArgumentList(QStringLiteral("CreateUser"), argumentList); - } - - - - inline QDBusPendingReply<> DeleteUser(const QString &in0, bool in1) - { - QList argumentList; - argumentList << QVariant::fromValue(in0) << QVariant::fromValue(in1); - return asyncCallWithArgumentList(QStringLiteral("DeleteUser"), argumentList); - } - - inline void DeleteUserQueued(const QString &in0, bool in1) - { - QList argumentList; - argumentList << QVariant::fromValue(in0) << QVariant::fromValue(in1); - - CallQueued(QStringLiteral("DeleteUser"), argumentList); - } - - - inline QDBusPendingReply FindUserById(const QString &in0) - { - QList argumentList; - argumentList << QVariant::fromValue(in0); - return asyncCallWithArgumentList(QStringLiteral("FindUserById"), argumentList); - } - - - - inline QDBusPendingReply FindUserByName(const QString &in0) - { - QList argumentList; - argumentList << QVariant::fromValue(in0); - return asyncCallWithArgumentList(QStringLiteral("FindUserByName"), argumentList); - } - - - - inline QDBusPendingReply GetGroups() - { - QList argumentList; - return asyncCallWithArgumentList(QStringLiteral("GetGroups"), argumentList); - } - - - - inline QDBusPendingReply GetPresetGroups(int in0) - { - QList argumentList; - argumentList << QVariant::fromValue(in0); - return asyncCallWithArgumentList(QStringLiteral("GetPresetGroups"), argumentList); - } - - - - inline QDBusPendingReply IsPasswordValid(const QString &in0) - { - QList argumentList; - argumentList << QVariant::fromValue(in0); - return asyncCallWithArgumentList(QStringLiteral("IsPasswordValid"), argumentList); - } - - - inline QDBusReply IsPasswordValid(const QString &in0, QString &out1, int &out2) - { - QList argumentList; - argumentList << QVariant::fromValue(in0); - QDBusMessage reply = callWithArgumentList(QDBus::Block, QStringLiteral("IsPasswordValid"), argumentList); - if (reply.type() == QDBusMessage::ReplyMessage && reply.arguments().count() == 3) { - out1 = qdbus_cast(reply.arguments().at(1)); - out2 = qdbus_cast(reply.arguments().at(2)); - } - return reply; - } - - inline QDBusPendingReply IsUsernameValid(const QString &in0) - { - QList argumentList; - argumentList << QVariant::fromValue(in0); - return asyncCallWithArgumentList(QStringLiteral("IsUsernameValid"), argumentList); - } - - - inline QDBusReply IsUsernameValid(const QString &in0, QString &out1, int &out2) - { - QList argumentList; - argumentList << QVariant::fromValue(in0); - QDBusMessage reply = callWithArgumentList(QDBus::Block, QStringLiteral("IsUsernameValid"), argumentList); - if (reply.type() == QDBusMessage::ReplyMessage && reply.arguments().count() == 3) { - out1 = qdbus_cast(reply.arguments().at(1)); - out2 = qdbus_cast(reply.arguments().at(2)); - } - return reply; - } - - inline QDBusPendingReply RandUserIcon() - { - QList argumentList; - return asyncCallWithArgumentList(QStringLiteral("RandUserIcon"), argumentList); - } - - - - -Q_SIGNALS: // SIGNALS - void UserAdded(const QString &in0); - void UserDeleted(const QString &in0); - // begin property changed signals - void AllowGuestChanged(bool value) const; - void GuestIconChanged(const QString & value) const; - void UserListChanged(const QStringList & value) const; - -public Q_SLOTS: - void CallQueued(const QString &callName, const QList &args); - -private Q_SLOTS: - void onPendingCallFinished(QDBusPendingCallWatcher *w); - void onPropertyChanged(const QString &propName, const QVariant &value); - -private: - __OrgDeepinDdeAccounts1InterfacePrivate *d_ptr; -}; - -namespace org { - namespace deepin { - namespace dde { - typedef ::__OrgDeepinDdeAccounts1Interface Accounts1; - } - } -} -#endif diff --git a/src/global_util/dbus/authenticate1interface.cpp b/src/global_util/dbus/authenticate1interface.cpp deleted file mode 100644 index 834760171..000000000 --- a/src/global_util/dbus/authenticate1interface.cpp +++ /dev/null @@ -1,131 +0,0 @@ -/* - * This file was generated by qdbusxml2cpp-fix version 0.8 - * Command line was: qdbusxml2cpp-fix -p /home/zyz/works/work/v25/dde-session-shell-snipe/src/global_util/dbus/authenticate1interface /home/zyz/works/work/v25/dde-session-shell-snipe/xml/snipe/org.deepin.dde.Authenticate1.xml - * - * qdbusxml2cpp-fix is Copyright (C) 2016 Deepin Technology Co., Ltd. - * - * This is an auto-generated file. - * This file may have been hand-edited. Look for HAND-EDIT comments - * before re-generating it. - */ - -#include "/home/zyz/works/work/v25/dde-session-shell-snipe/src/global_util/dbus/authenticate1interface.h" - -DCORE_USE_NAMESPACE -/* - * Implementation of interface class __OrgDeepinDdeAuthenticate1Interface - */ - -class __OrgDeepinDdeAuthenticate1InterfacePrivate -{ -public: - __OrgDeepinDdeAuthenticate1InterfacePrivate() = default; - - // begin member variables - int FrameworkState; - QString SupportEncrypts; - int SupportedFlags; - -public: - QMap m_processingCalls; - QMap> m_waittingCalls; -}; - -__OrgDeepinDdeAuthenticate1Interface::__OrgDeepinDdeAuthenticate1Interface(const QString &service, const QString &path, const QDBusConnection &connection, QObject *parent) - : DDBusExtendedAbstractInterface(service, path, staticInterfaceName(), connection, parent) - , d_ptr(new __OrgDeepinDdeAuthenticate1InterfacePrivate) -{ - connect(this, &__OrgDeepinDdeAuthenticate1Interface::propertyChanged, this, &__OrgDeepinDdeAuthenticate1Interface::onPropertyChanged); - -} - -__OrgDeepinDdeAuthenticate1Interface::~__OrgDeepinDdeAuthenticate1Interface() -{ - qDeleteAll(d_ptr->m_processingCalls.values()); - delete d_ptr; -} - -void __OrgDeepinDdeAuthenticate1Interface::onPropertyChanged(const QString &propName, const QVariant &value) -{ - if (propName == QStringLiteral("FrameworkState")) - { - const int &FrameworkState = qvariant_cast(value); - if (d_ptr->FrameworkState != FrameworkState) - { - d_ptr->FrameworkState = FrameworkState; - Q_EMIT FrameworkStateChanged(d_ptr->FrameworkState); - } - return; - } - - if (propName == QStringLiteral("SupportEncrypts")) - { - const QString &SupportEncrypts = qvariant_cast(value); - if (d_ptr->SupportEncrypts != SupportEncrypts) - { - d_ptr->SupportEncrypts = SupportEncrypts; - Q_EMIT SupportEncryptsChanged(d_ptr->SupportEncrypts); - } - return; - } - - if (propName == QStringLiteral("SupportedFlags")) - { - const int &SupportedFlags = qvariant_cast(value); - if (d_ptr->SupportedFlags != SupportedFlags) - { - d_ptr->SupportedFlags = SupportedFlags; - Q_EMIT SupportedFlagsChanged(d_ptr->SupportedFlags); - } - return; - } - - qWarning() << "property not handle: " << propName; - return; -} - -int __OrgDeepinDdeAuthenticate1Interface::frameworkState() -{ - return qvariant_cast(internalPropGet("FrameworkState", &d_ptr->FrameworkState)); -} - -QString __OrgDeepinDdeAuthenticate1Interface::supportEncrypts() -{ - return qvariant_cast(internalPropGet("SupportEncrypts", &d_ptr->SupportEncrypts)); -} - -int __OrgDeepinDdeAuthenticate1Interface::supportedFlags() -{ - return qvariant_cast(internalPropGet("SupportedFlags", &d_ptr->SupportedFlags)); -} - -void __OrgDeepinDdeAuthenticate1Interface::CallQueued(const QString &callName, const QList &args) -{ - if (d_ptr->m_waittingCalls.contains(callName)) - { - d_ptr->m_waittingCalls[callName] = args; - return; - } - if (d_ptr->m_processingCalls.contains(callName)) - { - d_ptr->m_waittingCalls.insert(callName, args); - } else { - QDBusPendingCallWatcher *watcher = new QDBusPendingCallWatcher(asyncCallWithArgumentList(callName, args)); - connect(watcher, &QDBusPendingCallWatcher::finished, this, &__OrgDeepinDdeAuthenticate1Interface::onPendingCallFinished); - d_ptr->m_processingCalls.insert(callName, watcher); - } -} - -void __OrgDeepinDdeAuthenticate1Interface::onPendingCallFinished(QDBusPendingCallWatcher *w) -{ - w->deleteLater(); - const auto callName = d_ptr->m_processingCalls.key(w); - Q_ASSERT(!callName.isEmpty()); - if (callName.isEmpty()) - return; - d_ptr->m_processingCalls.remove(callName); - if (!d_ptr->m_waittingCalls.contains(callName)) - return; - const auto args = d_ptr->m_waittingCalls.take(callName); - CallQueued(callName, args); -} diff --git a/src/global_util/dbus/authenticate1interface.h b/src/global_util/dbus/authenticate1interface.h deleted file mode 100644 index 8d23412be..000000000 --- a/src/global_util/dbus/authenticate1interface.h +++ /dev/null @@ -1,106 +0,0 @@ -/* - * This file was generated by qdbusxml2cpp-fix version 0.8 - * Command line was: qdbusxml2cpp-fix -p /home/zyz/works/work/v25/dde-session-shell-snipe/src/global_util/dbus/authenticate1interface /home/zyz/works/work/v25/dde-session-shell-snipe/xml/snipe/org.deepin.dde.Authenticate1.xml - * - * qdbusxml2cpp-fix is Copyright (C) 2016 Deepin Technology Co., Ltd. - * - * This is an auto-generated file. - * Do not edit! All changes made to it will be lost. - */ - -#ifndef AUTHENTICATE1INTERFACE_H -#define AUTHENTICATE1INTERFACE_H - -#include -#include -#include -#include -#include -#include -#include - -#include -#include - - -/* - * Proxy class for interface org.deepin.dde.Authenticate1 - */ -class __OrgDeepinDdeAuthenticate1InterfacePrivate; -class __OrgDeepinDdeAuthenticate1Interface : public DTK_CORE_NAMESPACE::DDBusExtendedAbstractInterface -{ - Q_OBJECT - -public: - static inline const char *staticInterfaceName() - { return "org.deepin.dde.Authenticate1"; } - -public: - explicit __OrgDeepinDdeAuthenticate1Interface(const QString &service, const QString &path, const QDBusConnection &connection, QObject *parent = 0); - - ~__OrgDeepinDdeAuthenticate1Interface(); - - Q_PROPERTY(int FrameworkState READ frameworkState NOTIFY FrameworkStateChanged) - int frameworkState(); - - Q_PROPERTY(QString SupportEncrypts READ supportEncrypts NOTIFY SupportEncryptsChanged) - QString supportEncrypts(); - - Q_PROPERTY(int SupportedFlags READ supportedFlags NOTIFY SupportedFlagsChanged) - int supportedFlags(); - -public Q_SLOTS: // METHODS - inline QDBusPendingReply Authenticate(const QString &username, int authFlags, int appType) - { - QList argumentList; - argumentList << QVariant::fromValue(username) << QVariant::fromValue(authFlags) << QVariant::fromValue(appType); - return asyncCallWithArgumentList(QStringLiteral("Authenticate"), argumentList); - } - - - - inline QDBusPendingReply GetLimits(const QString &username) - { - QList argumentList; - argumentList << QVariant::fromValue(username); - return asyncCallWithArgumentList(QStringLiteral("GetLimits"), argumentList); - } - - - - inline QDBusPendingReply PreOneKeyLogin(int flag) - { - QList argumentList; - argumentList << QVariant::fromValue(flag); - return asyncCallWithArgumentList(QStringLiteral("PreOneKeyLogin"), argumentList); - } - - - - -Q_SIGNALS: // SIGNALS - void LimitUpdated(const QString &in0); - // begin property changed signals - void FrameworkStateChanged(int value) const; - void SupportEncryptsChanged(const QString & value) const; - void SupportedFlagsChanged(int value) const; - -public Q_SLOTS: - void CallQueued(const QString &callName, const QList &args); - -private Q_SLOTS: - void onPendingCallFinished(QDBusPendingCallWatcher *w); - void onPropertyChanged(const QString &propName, const QVariant &value); - -private: - __OrgDeepinDdeAuthenticate1InterfacePrivate *d_ptr; -}; - -namespace org { - namespace deepin { - namespace dde { - typedef ::__OrgDeepinDdeAuthenticate1Interface Authenticate1; - } - } -} -#endif diff --git a/src/global_util/dbus/dbusinterface.cpp b/src/global_util/dbus/dbusinterface.cpp deleted file mode 100644 index d6496f2c6..000000000 --- a/src/global_util/dbus/dbusinterface.cpp +++ /dev/null @@ -1,72 +0,0 @@ -/* - * This file was generated by qdbusxml2cpp-fix version 0.8 - * Command line was: qdbusxml2cpp-fix -p /home/zyz/works/work/v25/dde-session-shell-snipe/src/global_util/dbus/dbusinterface /home/zyz/works/work/v25/dde-session-shell-snipe/xml/snipe/org.freedesktop.DBus.xml - * - * qdbusxml2cpp-fix is Copyright (C) 2016 Deepin Technology Co., Ltd. - * - * This is an auto-generated file. - * This file may have been hand-edited. Look for HAND-EDIT comments - * before re-generating it. - */ - -#include "/home/zyz/works/work/v25/dde-session-shell-snipe/src/global_util/dbus/dbusinterface.h" - -DCORE_USE_NAMESPACE -/* - * Implementation of interface class __OrgFreedesktopDBusInterface - */ - -class __OrgFreedesktopDBusInterfacePrivate -{ -public: - __OrgFreedesktopDBusInterfacePrivate() = default; - - // begin member variables - -public: - QMap m_processingCalls; - QMap> m_waittingCalls; -}; - -__OrgFreedesktopDBusInterface::__OrgFreedesktopDBusInterface(const QString &service, const QString &path, const QDBusConnection &connection, QObject *parent) - : DDBusExtendedAbstractInterface(service, path, staticInterfaceName(), connection, parent) - , d_ptr(new __OrgFreedesktopDBusInterfacePrivate) -{ -} - -__OrgFreedesktopDBusInterface::~__OrgFreedesktopDBusInterface() -{ - qDeleteAll(d_ptr->m_processingCalls.values()); - delete d_ptr; -} - -void __OrgFreedesktopDBusInterface::CallQueued(const QString &callName, const QList &args) -{ - if (d_ptr->m_waittingCalls.contains(callName)) - { - d_ptr->m_waittingCalls[callName] = args; - return; - } - if (d_ptr->m_processingCalls.contains(callName)) - { - d_ptr->m_waittingCalls.insert(callName, args); - } else { - QDBusPendingCallWatcher *watcher = new QDBusPendingCallWatcher(asyncCallWithArgumentList(callName, args)); - connect(watcher, &QDBusPendingCallWatcher::finished, this, &__OrgFreedesktopDBusInterface::onPendingCallFinished); - d_ptr->m_processingCalls.insert(callName, watcher); - } -} - -void __OrgFreedesktopDBusInterface::onPendingCallFinished(QDBusPendingCallWatcher *w) -{ - w->deleteLater(); - const auto callName = d_ptr->m_processingCalls.key(w); - Q_ASSERT(!callName.isEmpty()); - if (callName.isEmpty()) - return; - d_ptr->m_processingCalls.remove(callName); - if (!d_ptr->m_waittingCalls.contains(callName)) - return; - const auto args = d_ptr->m_waittingCalls.take(callName); - CallQueued(callName, args); -} diff --git a/src/global_util/dbus/dbusinterface.h b/src/global_util/dbus/dbusinterface.h deleted file mode 100644 index b53b98a64..000000000 --- a/src/global_util/dbus/dbusinterface.h +++ /dev/null @@ -1,64 +0,0 @@ -/* - * This file was generated by qdbusxml2cpp-fix version 0.8 - * Command line was: qdbusxml2cpp-fix -p /home/zyz/works/work/v25/dde-session-shell-snipe/src/global_util/dbus/dbusinterface /home/zyz/works/work/v25/dde-session-shell-snipe/xml/snipe/org.freedesktop.DBus.xml - * - * qdbusxml2cpp-fix is Copyright (C) 2016 Deepin Technology Co., Ltd. - * - * This is an auto-generated file. - * Do not edit! All changes made to it will be lost. - */ - -#ifndef DBUSINTERFACE_H -#define DBUSINTERFACE_H - -#include -#include -#include -#include -#include -#include -#include - -#include -#include - - -/* - * Proxy class for interface org.freedesktop.DBus - */ -class __OrgFreedesktopDBusInterfacePrivate; -class __OrgFreedesktopDBusInterface : public DTK_CORE_NAMESPACE::DDBusExtendedAbstractInterface -{ - Q_OBJECT - -public: - static inline const char *staticInterfaceName() - { return "org.freedesktop.DBus"; } - -public: - explicit __OrgFreedesktopDBusInterface(const QString &service, const QString &path, const QDBusConnection &connection, QObject *parent = 0); - - ~__OrgFreedesktopDBusInterface(); - -public Q_SLOTS: // METHODS - -Q_SIGNALS: // SIGNALS - void NameOwnerChanged(const QString &name, const QString &oldOwner, const QString &newOwner); - // begin property changed signals - -public Q_SLOTS: - void CallQueued(const QString &callName, const QList &args); - -private Q_SLOTS: - void onPendingCallFinished(QDBusPendingCallWatcher *w); - -private: - __OrgFreedesktopDBusInterfacePrivate *d_ptr; -}; - -namespace org { - namespace freedesktop { - typedef ::__OrgFreedesktopDBusInterface DBus; - } -} -#endif diff --git a/src/global_util/dbus/dbuslockfront.h b/src/global_util/dbus/dbuslockfront.h index 90456c03c..3ce75bab4 100644 --- a/src/global_util/dbus/dbuslockfront.h +++ b/src/global_util/dbus/dbuslockfront.h @@ -40,7 +40,11 @@ class DBusLockFront: public QDBusAbstractInterface } public: static inline const char *staticInterfaceName() - { return DSS_DBUS::lockFrontService.toStdString().c_str(); } +#ifndef ENABLE_DSS_SNIPE + { return "com.deepin.dde.lockFront"; } +#else + { return "org.deepin.dde.LockFront1"; } +#endif public: explicit DBusLockFront(QObject *parent = 0); diff --git a/src/global_util/dbus/dbuslockservice.h b/src/global_util/dbus/dbuslockservice.h index 67a3e6c1a..e25bc3600 100644 --- a/src/global_util/dbus/dbuslockservice.h +++ b/src/global_util/dbus/dbuslockservice.h @@ -30,7 +30,11 @@ class DBusLockService: public QDBusAbstractInterface Q_OBJECT public: static inline const char *staticInterfaceName() - { return DSS_DBUS::lockService.toStdString().c_str(); } +#ifndef ENABLE_DSS_SNIPE + { return "com.deepin.dde.LockService"; } +#else + { return "org.deepin.dde.LockService1"; } +#endif enum EventType { PromptQuestion = 1, diff --git a/src/global_util/dbus/imageeffect1interface.cpp b/src/global_util/dbus/imageeffect1interface.cpp deleted file mode 100644 index 54abf596c..000000000 --- a/src/global_util/dbus/imageeffect1interface.cpp +++ /dev/null @@ -1,72 +0,0 @@ -/* - * This file was generated by qdbusxml2cpp-fix version 0.8 - * Command line was: qdbusxml2cpp-fix -p /home/zyz/works/work/v25/dde-session-shell-snipe/src/global_util/dbus/imageeffect1interface /home/zyz/works/work/v25/dde-session-shell-snipe/xml/snipe/org.deepin.dde.ImageEffect1.xml - * - * qdbusxml2cpp-fix is Copyright (C) 2016 Deepin Technology Co., Ltd. - * - * This is an auto-generated file. - * This file may have been hand-edited. Look for HAND-EDIT comments - * before re-generating it. - */ - -#include "/home/zyz/works/work/v25/dde-session-shell-snipe/src/global_util/dbus/imageeffect1interface.h" - -DCORE_USE_NAMESPACE -/* - * Implementation of interface class __OrgDeepinDdeImageEffect1Interface - */ - -class __OrgDeepinDdeImageEffect1InterfacePrivate -{ -public: - __OrgDeepinDdeImageEffect1InterfacePrivate() = default; - - // begin member variables - -public: - QMap m_processingCalls; - QMap> m_waittingCalls; -}; - -__OrgDeepinDdeImageEffect1Interface::__OrgDeepinDdeImageEffect1Interface(const QString &service, const QString &path, const QDBusConnection &connection, QObject *parent) - : DDBusExtendedAbstractInterface(service, path, staticInterfaceName(), connection, parent) - , d_ptr(new __OrgDeepinDdeImageEffect1InterfacePrivate) -{ -} - -__OrgDeepinDdeImageEffect1Interface::~__OrgDeepinDdeImageEffect1Interface() -{ - qDeleteAll(d_ptr->m_processingCalls.values()); - delete d_ptr; -} - -void __OrgDeepinDdeImageEffect1Interface::CallQueued(const QString &callName, const QList &args) -{ - if (d_ptr->m_waittingCalls.contains(callName)) - { - d_ptr->m_waittingCalls[callName] = args; - return; - } - if (d_ptr->m_processingCalls.contains(callName)) - { - d_ptr->m_waittingCalls.insert(callName, args); - } else { - QDBusPendingCallWatcher *watcher = new QDBusPendingCallWatcher(asyncCallWithArgumentList(callName, args)); - connect(watcher, &QDBusPendingCallWatcher::finished, this, &__OrgDeepinDdeImageEffect1Interface::onPendingCallFinished); - d_ptr->m_processingCalls.insert(callName, watcher); - } -} - -void __OrgDeepinDdeImageEffect1Interface::onPendingCallFinished(QDBusPendingCallWatcher *w) -{ - w->deleteLater(); - const auto callName = d_ptr->m_processingCalls.key(w); - Q_ASSERT(!callName.isEmpty()); - if (callName.isEmpty()) - return; - d_ptr->m_processingCalls.remove(callName); - if (!d_ptr->m_waittingCalls.contains(callName)) - return; - const auto args = d_ptr->m_waittingCalls.take(callName); - CallQueued(callName, args); -} diff --git a/src/global_util/dbus/imageeffect1interface.h b/src/global_util/dbus/imageeffect1interface.h deleted file mode 100644 index b4e87f1ab..000000000 --- a/src/global_util/dbus/imageeffect1interface.h +++ /dev/null @@ -1,90 +0,0 @@ -/* - * This file was generated by qdbusxml2cpp-fix version 0.8 - * Command line was: qdbusxml2cpp-fix -p /home/zyz/works/work/v25/dde-session-shell-snipe/src/global_util/dbus/imageeffect1interface /home/zyz/works/work/v25/dde-session-shell-snipe/xml/snipe/org.deepin.dde.ImageEffect1.xml - * - * qdbusxml2cpp-fix is Copyright (C) 2016 Deepin Technology Co., Ltd. - * - * This is an auto-generated file. - * Do not edit! All changes made to it will be lost. - */ - -#ifndef IMAGEEFFECT1INTERFACE_H -#define IMAGEEFFECT1INTERFACE_H - -#include -#include -#include -#include -#include -#include -#include - -#include -#include - - -/* - * Proxy class for interface org.deepin.dde.ImageEffect1 - */ -class __OrgDeepinDdeImageEffect1InterfacePrivate; -class __OrgDeepinDdeImageEffect1Interface : public DTK_CORE_NAMESPACE::DDBusExtendedAbstractInterface -{ - Q_OBJECT - -public: - static inline const char *staticInterfaceName() - { return "org.deepin.dde.ImageEffect1"; } - -public: - explicit __OrgDeepinDdeImageEffect1Interface(const QString &service, const QString &path, const QDBusConnection &connection, QObject *parent = 0); - - ~__OrgDeepinDdeImageEffect1Interface(); - -public Q_SLOTS: // METHODS - inline QDBusPendingReply<> Delete(const QString &effect, const QString &filename) - { - QList argumentList; - argumentList << QVariant::fromValue(effect) << QVariant::fromValue(filename); - return asyncCallWithArgumentList(QStringLiteral("Delete"), argumentList); - } - - inline void DeleteQueued(const QString &effect, const QString &filename) - { - QList argumentList; - argumentList << QVariant::fromValue(effect) << QVariant::fromValue(filename); - - CallQueued(QStringLiteral("Delete"), argumentList); - } - - - inline QDBusPendingReply Get(const QString &effect, const QString &filename) - { - QList argumentList; - argumentList << QVariant::fromValue(effect) << QVariant::fromValue(filename); - return asyncCallWithArgumentList(QStringLiteral("Get"), argumentList); - } - - - - -Q_SIGNALS: // SIGNALS - // begin property changed signals - -public Q_SLOTS: - void CallQueued(const QString &callName, const QList &args); - -private Q_SLOTS: - void onPendingCallFinished(QDBusPendingCallWatcher *w); - -private: - __OrgDeepinDdeImageEffect1InterfacePrivate *d_ptr; -}; - -namespace org { - namespace deepin { - namespace dde { - typedef ::__OrgDeepinDdeImageEffect1Interface ImageEffect1; - } - } -} -#endif diff --git a/src/global_util/dbus/loginedinterface.cpp b/src/global_util/dbus/loginedinterface.cpp deleted file mode 100644 index 4b49ed754..000000000 --- a/src/global_util/dbus/loginedinterface.cpp +++ /dev/null @@ -1,114 +0,0 @@ -/* - * This file was generated by qdbusxml2cpp-fix version 0.8 - * Command line was: qdbusxml2cpp-fix -p /home/zyz/works/work/v25/dde-session-shell-snipe/src/global_util/dbus/loginedinterface /home/zyz/works/work/v25/dde-session-shell-snipe/xml/snipe/org.deepin.dde.Logined.xml - * - * qdbusxml2cpp-fix is Copyright (C) 2016 Deepin Technology Co., Ltd. - * - * This is an auto-generated file. - * This file may have been hand-edited. Look for HAND-EDIT comments - * before re-generating it. - */ - -#include "/home/zyz/works/work/v25/dde-session-shell-snipe/src/global_util/dbus/loginedinterface.h" - -DCORE_USE_NAMESPACE -/* - * Implementation of interface class __OrgDeepinDdeLoginedInterface - */ - -class __OrgDeepinDdeLoginedInterfacePrivate -{ -public: - __OrgDeepinDdeLoginedInterfacePrivate() = default; - - // begin member variables - uint LastLogoutUser; - QString UserList; - -public: - QMap m_processingCalls; - QMap> m_waittingCalls; -}; - -__OrgDeepinDdeLoginedInterface::__OrgDeepinDdeLoginedInterface(const QString &service, const QString &path, const QDBusConnection &connection, QObject *parent) - : DDBusExtendedAbstractInterface(service, path, staticInterfaceName(), connection, parent) - , d_ptr(new __OrgDeepinDdeLoginedInterfacePrivate) -{ - connect(this, &__OrgDeepinDdeLoginedInterface::propertyChanged, this, &__OrgDeepinDdeLoginedInterface::onPropertyChanged); - -} - -__OrgDeepinDdeLoginedInterface::~__OrgDeepinDdeLoginedInterface() -{ - qDeleteAll(d_ptr->m_processingCalls.values()); - delete d_ptr; -} - -void __OrgDeepinDdeLoginedInterface::onPropertyChanged(const QString &propName, const QVariant &value) -{ - if (propName == QStringLiteral("LastLogoutUser")) - { - const uint &LastLogoutUser = qvariant_cast(value); - if (d_ptr->LastLogoutUser != LastLogoutUser) - { - d_ptr->LastLogoutUser = LastLogoutUser; - Q_EMIT LastLogoutUserChanged(d_ptr->LastLogoutUser); - } - return; - } - - if (propName == QStringLiteral("UserList")) - { - const QString &UserList = qvariant_cast(value); - if (d_ptr->UserList != UserList) - { - d_ptr->UserList = UserList; - Q_EMIT UserListChanged(d_ptr->UserList); - } - return; - } - - qWarning() << "property not handle: " << propName; - return; -} - -uint __OrgDeepinDdeLoginedInterface::lastLogoutUser() -{ - return qvariant_cast(internalPropGet("LastLogoutUser", &d_ptr->LastLogoutUser)); -} - -QString __OrgDeepinDdeLoginedInterface::userList() -{ - return qvariant_cast(internalPropGet("UserList", &d_ptr->UserList)); -} - -void __OrgDeepinDdeLoginedInterface::CallQueued(const QString &callName, const QList &args) -{ - if (d_ptr->m_waittingCalls.contains(callName)) - { - d_ptr->m_waittingCalls[callName] = args; - return; - } - if (d_ptr->m_processingCalls.contains(callName)) - { - d_ptr->m_waittingCalls.insert(callName, args); - } else { - QDBusPendingCallWatcher *watcher = new QDBusPendingCallWatcher(asyncCallWithArgumentList(callName, args)); - connect(watcher, &QDBusPendingCallWatcher::finished, this, &__OrgDeepinDdeLoginedInterface::onPendingCallFinished); - d_ptr->m_processingCalls.insert(callName, watcher); - } -} - -void __OrgDeepinDdeLoginedInterface::onPendingCallFinished(QDBusPendingCallWatcher *w) -{ - w->deleteLater(); - const auto callName = d_ptr->m_processingCalls.key(w); - Q_ASSERT(!callName.isEmpty()); - if (callName.isEmpty()) - return; - d_ptr->m_processingCalls.remove(callName); - if (!d_ptr->m_waittingCalls.contains(callName)) - return; - const auto args = d_ptr->m_waittingCalls.take(callName); - CallQueued(callName, args); -} diff --git a/src/global_util/dbus/loginedinterface.h b/src/global_util/dbus/loginedinterface.h deleted file mode 100644 index 6b37f919a..000000000 --- a/src/global_util/dbus/loginedinterface.h +++ /dev/null @@ -1,74 +0,0 @@ -/* - * This file was generated by qdbusxml2cpp-fix version 0.8 - * Command line was: qdbusxml2cpp-fix -p /home/zyz/works/work/v25/dde-session-shell-snipe/src/global_util/dbus/loginedinterface /home/zyz/works/work/v25/dde-session-shell-snipe/xml/snipe/org.deepin.dde.Logined.xml - * - * qdbusxml2cpp-fix is Copyright (C) 2016 Deepin Technology Co., Ltd. - * - * This is an auto-generated file. - * Do not edit! All changes made to it will be lost. - */ - -#ifndef LOGINEDINTERFACE_H -#define LOGINEDINTERFACE_H - -#include -#include -#include -#include -#include -#include -#include - -#include -#include - - -/* - * Proxy class for interface org.deepin.dde.Logined - */ -class __OrgDeepinDdeLoginedInterfacePrivate; -class __OrgDeepinDdeLoginedInterface : public DTK_CORE_NAMESPACE::DDBusExtendedAbstractInterface -{ - Q_OBJECT - -public: - static inline const char *staticInterfaceName() - { return "org.deepin.dde.Logined"; } - -public: - explicit __OrgDeepinDdeLoginedInterface(const QString &service, const QString &path, const QDBusConnection &connection, QObject *parent = 0); - - ~__OrgDeepinDdeLoginedInterface(); - - Q_PROPERTY(uint LastLogoutUser READ lastLogoutUser NOTIFY LastLogoutUserChanged) - uint lastLogoutUser(); - - Q_PROPERTY(QString UserList READ userList NOTIFY UserListChanged) - QString userList(); - -public Q_SLOTS: // METHODS - -Q_SIGNALS: // SIGNALS - // begin property changed signals - void LastLogoutUserChanged(uint value) const; - void UserListChanged(const QString & value) const; - -public Q_SLOTS: - void CallQueued(const QString &callName, const QList &args); - -private Q_SLOTS: - void onPendingCallFinished(QDBusPendingCallWatcher *w); - void onPropertyChanged(const QString &propName, const QVariant &value); - -private: - __OrgDeepinDdeLoginedInterfacePrivate *d_ptr; -}; - -namespace org { - namespace deepin { - namespace dde { - typedef ::__OrgDeepinDdeLoginedInterface Logined; - } - } -} -#endif diff --git a/src/global_util/dbus/powermanager1interface.cpp b/src/global_util/dbus/powermanager1interface.cpp deleted file mode 100644 index d0dd7dbff..000000000 --- a/src/global_util/dbus/powermanager1interface.cpp +++ /dev/null @@ -1,72 +0,0 @@ -/* - * This file was generated by qdbusxml2cpp-fix version 0.8 - * Command line was: qdbusxml2cpp-fix -p /home/zyz/works/work/v25/dde-session-shell-snipe/src/global_util/dbus/powermanager1interface /home/zyz/works/work/v25/dde-session-shell-snipe/xml/snipe/org.deepin.dde.PowerManager1.xml - * - * qdbusxml2cpp-fix is Copyright (C) 2016 Deepin Technology Co., Ltd. - * - * This is an auto-generated file. - * This file may have been hand-edited. Look for HAND-EDIT comments - * before re-generating it. - */ - -#include "/home/zyz/works/work/v25/dde-session-shell-snipe/src/global_util/dbus/powermanager1interface.h" - -DCORE_USE_NAMESPACE -/* - * Implementation of interface class __OrgDeepinDdePowerManager1Interface - */ - -class __OrgDeepinDdePowerManager1InterfacePrivate -{ -public: - __OrgDeepinDdePowerManager1InterfacePrivate() = default; - - // begin member variables - -public: - QMap m_processingCalls; - QMap> m_waittingCalls; -}; - -__OrgDeepinDdePowerManager1Interface::__OrgDeepinDdePowerManager1Interface(const QString &service, const QString &path, const QDBusConnection &connection, QObject *parent) - : DDBusExtendedAbstractInterface(service, path, staticInterfaceName(), connection, parent) - , d_ptr(new __OrgDeepinDdePowerManager1InterfacePrivate) -{ -} - -__OrgDeepinDdePowerManager1Interface::~__OrgDeepinDdePowerManager1Interface() -{ - qDeleteAll(d_ptr->m_processingCalls.values()); - delete d_ptr; -} - -void __OrgDeepinDdePowerManager1Interface::CallQueued(const QString &callName, const QList &args) -{ - if (d_ptr->m_waittingCalls.contains(callName)) - { - d_ptr->m_waittingCalls[callName] = args; - return; - } - if (d_ptr->m_processingCalls.contains(callName)) - { - d_ptr->m_waittingCalls.insert(callName, args); - } else { - QDBusPendingCallWatcher *watcher = new QDBusPendingCallWatcher(asyncCallWithArgumentList(callName, args)); - connect(watcher, &QDBusPendingCallWatcher::finished, this, &__OrgDeepinDdePowerManager1Interface::onPendingCallFinished); - d_ptr->m_processingCalls.insert(callName, watcher); - } -} - -void __OrgDeepinDdePowerManager1Interface::onPendingCallFinished(QDBusPendingCallWatcher *w) -{ - w->deleteLater(); - const auto callName = d_ptr->m_processingCalls.key(w); - Q_ASSERT(!callName.isEmpty()); - if (callName.isEmpty()) - return; - d_ptr->m_processingCalls.remove(callName); - if (!d_ptr->m_waittingCalls.contains(callName)) - return; - const auto args = d_ptr->m_waittingCalls.take(callName); - CallQueued(callName, args); -} diff --git a/src/global_util/dbus/powermanager1interface.h b/src/global_util/dbus/powermanager1interface.h deleted file mode 100644 index 33025cf36..000000000 --- a/src/global_util/dbus/powermanager1interface.h +++ /dev/null @@ -1,97 +0,0 @@ -/* - * This file was generated by qdbusxml2cpp-fix version 0.8 - * Command line was: qdbusxml2cpp-fix -p /home/zyz/works/work/v25/dde-session-shell-snipe/src/global_util/dbus/powermanager1interface /home/zyz/works/work/v25/dde-session-shell-snipe/xml/snipe/org.deepin.dde.PowerManager1.xml - * - * qdbusxml2cpp-fix is Copyright (C) 2016 Deepin Technology Co., Ltd. - * - * This is an auto-generated file. - * Do not edit! All changes made to it will be lost. - */ - -#ifndef POWERMANAGER1INTERFACE_H -#define POWERMANAGER1INTERFACE_H - -#include -#include -#include -#include -#include -#include -#include - -#include -#include - - -/* - * Proxy class for interface org.deepin.dde.PowerManager1 - */ -class __OrgDeepinDdePowerManager1InterfacePrivate; -class __OrgDeepinDdePowerManager1Interface : public DTK_CORE_NAMESPACE::DDBusExtendedAbstractInterface -{ - Q_OBJECT - -public: - static inline const char *staticInterfaceName() - { return "org.deepin.dde.PowerManager1"; } - -public: - explicit __OrgDeepinDdePowerManager1Interface(const QString &service, const QString &path, const QDBusConnection &connection, QObject *parent = 0); - - ~__OrgDeepinDdePowerManager1Interface(); - -public Q_SLOTS: // METHODS - inline QDBusPendingReply CanHibernate() - { - QList argumentList; - return asyncCallWithArgumentList(QStringLiteral("CanHibernate"), argumentList); - } - - - - inline QDBusPendingReply CanReboot() - { - QList argumentList; - return asyncCallWithArgumentList(QStringLiteral("CanReboot"), argumentList); - } - - - - inline QDBusPendingReply CanShutdown() - { - QList argumentList; - return asyncCallWithArgumentList(QStringLiteral("CanShutdown"), argumentList); - } - - - - inline QDBusPendingReply CanSuspend() - { - QList argumentList; - return asyncCallWithArgumentList(QStringLiteral("CanSuspend"), argumentList); - } - - - - -Q_SIGNALS: // SIGNALS - // begin property changed signals - -public Q_SLOTS: - void CallQueued(const QString &callName, const QList &args); - -private Q_SLOTS: - void onPendingCallFinished(QDBusPendingCallWatcher *w); - -private: - __OrgDeepinDdePowerManager1InterfacePrivate *d_ptr; -}; - -namespace org { - namespace deepin { - namespace dde { - typedef ::__OrgDeepinDdePowerManager1Interface PowerManager1; - } - } -} -#endif diff --git a/src/global_util/dbus/selfinterface.cpp b/src/global_util/dbus/selfinterface.cpp deleted file mode 100644 index 731bab5e0..000000000 --- a/src/global_util/dbus/selfinterface.cpp +++ /dev/null @@ -1,165 +0,0 @@ -/* - * This file was generated by qdbusxml2cpp-fix version 0.8 - * Command line was: qdbusxml2cpp-fix -p /home/zyz/works/work/v25/dde-session-shell-snipe/src/global_util/dbus/selfinterface /home/zyz/works/work/v25/dde-session-shell-snipe/xml/snipe/org.freedesktop.login1.session.self.xml - * - * qdbusxml2cpp-fix is Copyright (C) 2016 Deepin Technology Co., Ltd. - * - * This is an auto-generated file. - * This file may have been hand-edited. Look for HAND-EDIT comments - * before re-generating it. - */ - -#include "/home/zyz/works/work/v25/dde-session-shell-snipe/src/global_util/dbus/selfinterface.h" - -DCORE_USE_NAMESPACE -/* - * Implementation of interface class __OrgFreedesktopLogin1SessionInterface - */ - -class __OrgFreedesktopLogin1SessionInterfacePrivate -{ -public: - __OrgFreedesktopLogin1SessionInterfacePrivate() = default; - - // begin member variables - bool Active; - QString Desktop; - QString Display; - QString Id; - QString Name; - -public: - QMap m_processingCalls; - QMap> m_waittingCalls; -}; - -__OrgFreedesktopLogin1SessionInterface::__OrgFreedesktopLogin1SessionInterface(const QString &service, const QString &path, const QDBusConnection &connection, QObject *parent) - : DDBusExtendedAbstractInterface(service, path, staticInterfaceName(), connection, parent) - , d_ptr(new __OrgFreedesktopLogin1SessionInterfacePrivate) -{ - connect(this, &__OrgFreedesktopLogin1SessionInterface::propertyChanged, this, &__OrgFreedesktopLogin1SessionInterface::onPropertyChanged); - -} - -__OrgFreedesktopLogin1SessionInterface::~__OrgFreedesktopLogin1SessionInterface() -{ - qDeleteAll(d_ptr->m_processingCalls.values()); - delete d_ptr; -} - -void __OrgFreedesktopLogin1SessionInterface::onPropertyChanged(const QString &propName, const QVariant &value) -{ - if (propName == QStringLiteral("Active")) - { - const bool &Active = qvariant_cast(value); - if (d_ptr->Active != Active) - { - d_ptr->Active = Active; - Q_EMIT ActiveChanged(d_ptr->Active); - } - return; - } - - if (propName == QStringLiteral("Desktop")) - { - const QString &Desktop = qvariant_cast(value); - if (d_ptr->Desktop != Desktop) - { - d_ptr->Desktop = Desktop; - Q_EMIT DesktopChanged(d_ptr->Desktop); - } - return; - } - - if (propName == QStringLiteral("Display")) - { - const QString &Display = qvariant_cast(value); - if (d_ptr->Display != Display) - { - d_ptr->Display = Display; - Q_EMIT DisplayChanged(d_ptr->Display); - } - return; - } - - if (propName == QStringLiteral("Id")) - { - const QString &Id = qvariant_cast(value); - if (d_ptr->Id != Id) - { - d_ptr->Id = Id; - Q_EMIT IdChanged(d_ptr->Id); - } - return; - } - - if (propName == QStringLiteral("Name")) - { - const QString &Name = qvariant_cast(value); - if (d_ptr->Name != Name) - { - d_ptr->Name = Name; - Q_EMIT NameChanged(d_ptr->Name); - } - return; - } - - qWarning() << "property not handle: " << propName; - return; -} - -bool __OrgFreedesktopLogin1SessionInterface::active() -{ - return qvariant_cast(internalPropGet("Active", &d_ptr->Active)); -} - -QString __OrgFreedesktopLogin1SessionInterface::desktop() -{ - return qvariant_cast(internalPropGet("Desktop", &d_ptr->Desktop)); -} - -QString __OrgFreedesktopLogin1SessionInterface::display() -{ - return qvariant_cast(internalPropGet("Display", &d_ptr->Display)); -} - -QString __OrgFreedesktopLogin1SessionInterface::id() -{ - return qvariant_cast(internalPropGet("Id", &d_ptr->Id)); -} - -QString __OrgFreedesktopLogin1SessionInterface::name() -{ - return qvariant_cast(internalPropGet("Name", &d_ptr->Name)); -} - -void __OrgFreedesktopLogin1SessionInterface::CallQueued(const QString &callName, const QList &args) -{ - if (d_ptr->m_waittingCalls.contains(callName)) - { - d_ptr->m_waittingCalls[callName] = args; - return; - } - if (d_ptr->m_processingCalls.contains(callName)) - { - d_ptr->m_waittingCalls.insert(callName, args); - } else { - QDBusPendingCallWatcher *watcher = new QDBusPendingCallWatcher(asyncCallWithArgumentList(callName, args)); - connect(watcher, &QDBusPendingCallWatcher::finished, this, &__OrgFreedesktopLogin1SessionInterface::onPendingCallFinished); - d_ptr->m_processingCalls.insert(callName, watcher); - } -} - -void __OrgFreedesktopLogin1SessionInterface::onPendingCallFinished(QDBusPendingCallWatcher *w) -{ - w->deleteLater(); - const auto callName = d_ptr->m_processingCalls.key(w); - Q_ASSERT(!callName.isEmpty()); - if (callName.isEmpty()) - return; - d_ptr->m_processingCalls.remove(callName); - if (!d_ptr->m_waittingCalls.contains(callName)) - return; - const auto args = d_ptr->m_waittingCalls.take(callName); - CallQueued(callName, args); -} diff --git a/src/global_util/dbus/selfinterface.h b/src/global_util/dbus/selfinterface.h deleted file mode 100644 index 766069d3d..000000000 --- a/src/global_util/dbus/selfinterface.h +++ /dev/null @@ -1,142 +0,0 @@ -/* - * This file was generated by qdbusxml2cpp-fix version 0.8 - * Command line was: qdbusxml2cpp-fix -p /home/zyz/works/work/v25/dde-session-shell-snipe/src/global_util/dbus/selfinterface /home/zyz/works/work/v25/dde-session-shell-snipe/xml/snipe/org.freedesktop.login1.session.self.xml - * - * qdbusxml2cpp-fix is Copyright (C) 2016 Deepin Technology Co., Ltd. - * - * This is an auto-generated file. - * Do not edit! All changes made to it will be lost. - */ - -#ifndef SELFINTERFACE_H -#define SELFINTERFACE_H - -#include -#include -#include -#include -#include -#include -#include - -#include -#include - - -/* - * Proxy class for interface org.freedesktop.login1.Session - */ -class __OrgFreedesktopLogin1SessionInterfacePrivate; -class __OrgFreedesktopLogin1SessionInterface : public DTK_CORE_NAMESPACE::DDBusExtendedAbstractInterface -{ - Q_OBJECT - -public: - static inline const char *staticInterfaceName() - { return "org.freedesktop.login1.Session"; } - -public: - explicit __OrgFreedesktopLogin1SessionInterface(const QString &service, const QString &path, const QDBusConnection &connection, QObject *parent = 0); - - ~__OrgFreedesktopLogin1SessionInterface(); - - Q_PROPERTY(bool Active READ active NOTIFY ActiveChanged) - bool active(); - - Q_PROPERTY(QString Desktop READ desktop NOTIFY DesktopChanged) - QString desktop(); - - Q_PROPERTY(QString Display READ display NOTIFY DisplayChanged) - QString display(); - - Q_PROPERTY(QString Id READ id NOTIFY IdChanged) - QString id(); - - Q_PROPERTY(QString Name READ name NOTIFY NameChanged) - QString name(); - -public Q_SLOTS: // METHODS - inline QDBusPendingReply<> Activate() - { - QList argumentList; - return asyncCallWithArgumentList(QStringLiteral("Activate"), argumentList); - } - - inline void ActivateQueued() - { - QList argumentList; - - CallQueued(QStringLiteral("Activate"), argumentList); - } - - - inline QDBusPendingReply<> Lock() - { - QList argumentList; - return asyncCallWithArgumentList(QStringLiteral("Lock"), argumentList); - } - - inline void LockQueued() - { - QList argumentList; - - CallQueued(QStringLiteral("Lock"), argumentList); - } - - - inline QDBusPendingReply<> Terminate() - { - QList argumentList; - return asyncCallWithArgumentList(QStringLiteral("Terminate"), argumentList); - } - - inline void TerminateQueued() - { - QList argumentList; - - CallQueued(QStringLiteral("Terminate"), argumentList); - } - - - inline QDBusPendingReply<> Unlock() - { - QList argumentList; - return asyncCallWithArgumentList(QStringLiteral("Unlock"), argumentList); - } - - inline void UnlockQueued() - { - QList argumentList; - - CallQueued(QStringLiteral("Unlock"), argumentList); - } - - - -Q_SIGNALS: // SIGNALS - // begin property changed signals - void ActiveChanged(bool value) const; - void DesktopChanged(const QString & value) const; - void DisplayChanged(const QString & value) const; - void IdChanged(const QString & value) const; - void NameChanged(const QString & value) const; - -public Q_SLOTS: - void CallQueued(const QString &callName, const QList &args); - -private Q_SLOTS: - void onPendingCallFinished(QDBusPendingCallWatcher *w); - void onPropertyChanged(const QString &propName, const QVariant &value); - -private: - __OrgFreedesktopLogin1SessionInterfacePrivate *d_ptr; -}; - -namespace org { - namespace freedesktop { - namespace login1 { - typedef ::__OrgFreedesktopLogin1SessionInterface Session; - } - } -} -#endif diff --git a/src/global_util/dbus/session2interface.cpp b/src/global_util/dbus/session2interface.cpp deleted file mode 100644 index 9425e7c61..000000000 --- a/src/global_util/dbus/session2interface.cpp +++ /dev/null @@ -1,186 +0,0 @@ -/* - * This file was generated by qdbusxml2cpp-fix version 0.8 - * Command line was: qdbusxml2cpp-fix -p /home/zyz/works/work/v25/dde-session-shell-snipe/src/global_util/dbus/session2interface /home/zyz/works/work/v25/dde-session-shell-snipe/xml/snipe/org.deepin.dde.Authenticate1.Session2.xml - * - * qdbusxml2cpp-fix is Copyright (C) 2016 Deepin Technology Co., Ltd. - * - * This is an auto-generated file. - * This file may have been hand-edited. Look for HAND-EDIT comments - * before re-generating it. - */ - -#include "/home/zyz/works/work/v25/dde-session-shell-snipe/src/global_util/dbus/session2interface.h" - -DCORE_USE_NAMESPACE -/* - * Implementation of interface class __OrgDeepinDdeAuthenticate1SessionInterface - */ - -class __OrgDeepinDdeAuthenticate1SessionInterfacePrivate -{ -public: - __OrgDeepinDdeAuthenticate1SessionInterfacePrivate() = default; - - // begin member variables - MFAInfoList FactorsInfo; - bool IsFuzzyMFA; - bool IsMFA; - int PINLen; - QString Prompt; - QString Username; - -public: - QMap m_processingCalls; - QMap> m_waittingCalls; -}; - -__OrgDeepinDdeAuthenticate1SessionInterface::__OrgDeepinDdeAuthenticate1SessionInterface(const QString &service, const QString &path, const QDBusConnection &connection, QObject *parent) - : DDBusExtendedAbstractInterface(service, path, staticInterfaceName(), connection, parent) - , d_ptr(new __OrgDeepinDdeAuthenticate1SessionInterfacePrivate) -{ - connect(this, &__OrgDeepinDdeAuthenticate1SessionInterface::propertyChanged, this, &__OrgDeepinDdeAuthenticate1SessionInterface::onPropertyChanged); - - if (QMetaType::fromName("MFAInfoList").id() == QMetaType::UnknownType) - registerMFAInfoListMetaType(); - if (QMetaType::fromName("ArrayInt").id() == QMetaType::UnknownType) - registerArrayIntMetaType(); -} - -__OrgDeepinDdeAuthenticate1SessionInterface::~__OrgDeepinDdeAuthenticate1SessionInterface() -{ - qDeleteAll(d_ptr->m_processingCalls.values()); - delete d_ptr; -} - -void __OrgDeepinDdeAuthenticate1SessionInterface::onPropertyChanged(const QString &propName, const QVariant &value) -{ - if (propName == QStringLiteral("FactorsInfo")) - { - const MFAInfoList &FactorsInfo = qvariant_cast(value); - if (d_ptr->FactorsInfo != FactorsInfo) - { - d_ptr->FactorsInfo = FactorsInfo; - Q_EMIT FactorsInfoChanged(d_ptr->FactorsInfo); - } - return; - } - - if (propName == QStringLiteral("IsFuzzyMFA")) - { - const bool &IsFuzzyMFA = qvariant_cast(value); - if (d_ptr->IsFuzzyMFA != IsFuzzyMFA) - { - d_ptr->IsFuzzyMFA = IsFuzzyMFA; - Q_EMIT IsFuzzyMFAChanged(d_ptr->IsFuzzyMFA); - } - return; - } - - if (propName == QStringLiteral("IsMFA")) - { - const bool &IsMFA = qvariant_cast(value); - if (d_ptr->IsMFA != IsMFA) - { - d_ptr->IsMFA = IsMFA; - Q_EMIT IsMFAChanged(d_ptr->IsMFA); - } - return; - } - - if (propName == QStringLiteral("PINLen")) - { - const int &PINLen = qvariant_cast(value); - if (d_ptr->PINLen != PINLen) - { - d_ptr->PINLen = PINLen; - Q_EMIT PINLenChanged(d_ptr->PINLen); - } - return; - } - - if (propName == QStringLiteral("Prompt")) - { - const QString &Prompt = qvariant_cast(value); - if (d_ptr->Prompt != Prompt) - { - d_ptr->Prompt = Prompt; - Q_EMIT PromptChanged(d_ptr->Prompt); - } - return; - } - - if (propName == QStringLiteral("Username")) - { - const QString &Username = qvariant_cast(value); - if (d_ptr->Username != Username) - { - d_ptr->Username = Username; - Q_EMIT UsernameChanged(d_ptr->Username); - } - return; - } - - qWarning() << "property not handle: " << propName; - return; -} - -MFAInfoList __OrgDeepinDdeAuthenticate1SessionInterface::factorsInfo() -{ - return qvariant_cast(internalPropGet("FactorsInfo", &d_ptr->FactorsInfo)); -} - -bool __OrgDeepinDdeAuthenticate1SessionInterface::isFuzzyMFA() -{ - return qvariant_cast(internalPropGet("IsFuzzyMFA", &d_ptr->IsFuzzyMFA)); -} - -bool __OrgDeepinDdeAuthenticate1SessionInterface::isMFA() -{ - return qvariant_cast(internalPropGet("IsMFA", &d_ptr->IsMFA)); -} - -int __OrgDeepinDdeAuthenticate1SessionInterface::pINLen() -{ - return qvariant_cast(internalPropGet("PINLen", &d_ptr->PINLen)); -} - -QString __OrgDeepinDdeAuthenticate1SessionInterface::prompt() -{ - return qvariant_cast(internalPropGet("Prompt", &d_ptr->Prompt)); -} - -QString __OrgDeepinDdeAuthenticate1SessionInterface::username() -{ - return qvariant_cast(internalPropGet("Username", &d_ptr->Username)); -} - -void __OrgDeepinDdeAuthenticate1SessionInterface::CallQueued(const QString &callName, const QList &args) -{ - if (d_ptr->m_waittingCalls.contains(callName)) - { - d_ptr->m_waittingCalls[callName] = args; - return; - } - if (d_ptr->m_processingCalls.contains(callName)) - { - d_ptr->m_waittingCalls.insert(callName, args); - } else { - QDBusPendingCallWatcher *watcher = new QDBusPendingCallWatcher(asyncCallWithArgumentList(callName, args)); - connect(watcher, &QDBusPendingCallWatcher::finished, this, &__OrgDeepinDdeAuthenticate1SessionInterface::onPendingCallFinished); - d_ptr->m_processingCalls.insert(callName, watcher); - } -} - -void __OrgDeepinDdeAuthenticate1SessionInterface::onPendingCallFinished(QDBusPendingCallWatcher *w) -{ - w->deleteLater(); - const auto callName = d_ptr->m_processingCalls.key(w); - Q_ASSERT(!callName.isEmpty()); - if (callName.isEmpty()) - return; - d_ptr->m_processingCalls.remove(callName); - if (!d_ptr->m_waittingCalls.contains(callName)) - return; - const auto args = d_ptr->m_waittingCalls.take(callName); - CallQueued(callName, args); -} diff --git a/src/global_util/dbus/session2interface.h b/src/global_util/dbus/session2interface.h deleted file mode 100644 index 0736cbc0f..000000000 --- a/src/global_util/dbus/session2interface.h +++ /dev/null @@ -1,226 +0,0 @@ -/* - * This file was generated by qdbusxml2cpp-fix version 0.8 - * Command line was: qdbusxml2cpp-fix -p /home/zyz/works/work/v25/dde-session-shell-snipe/src/global_util/dbus/session2interface /home/zyz/works/work/v25/dde-session-shell-snipe/xml/snipe/org.deepin.dde.Authenticate1.Session2.xml - * - * qdbusxml2cpp-fix is Copyright (C) 2016 Deepin Technology Co., Ltd. - * - * This is an auto-generated file. - * Do not edit! All changes made to it will be lost. - */ - -#ifndef SESSION2INTERFACE_H -#define SESSION2INTERFACE_H - -#include -#include -#include -#include -#include -#include -#include - -#include -#include - -#include "types/mfainfolist.h" -#include "types/arrayint.h" - -/* - * Proxy class for interface org.deepin.dde.Authenticate1.Session - */ -class __OrgDeepinDdeAuthenticate1SessionInterfacePrivate; -class __OrgDeepinDdeAuthenticate1SessionInterface : public DTK_CORE_NAMESPACE::DDBusExtendedAbstractInterface -{ - Q_OBJECT - -public: - static inline const char *staticInterfaceName() - { return "org.deepin.dde.Authenticate1.Session"; } - -public: - explicit __OrgDeepinDdeAuthenticate1SessionInterface(const QString &service, const QString &path, const QDBusConnection &connection, QObject *parent = 0); - - ~__OrgDeepinDdeAuthenticate1SessionInterface(); - - Q_PROPERTY(MFAInfoList FactorsInfo READ factorsInfo NOTIFY FactorsInfoChanged) - MFAInfoList factorsInfo(); - - Q_PROPERTY(bool IsFuzzyMFA READ isFuzzyMFA NOTIFY IsFuzzyMFAChanged) - bool isFuzzyMFA(); - - Q_PROPERTY(bool IsMFA READ isMFA NOTIFY IsMFAChanged) - bool isMFA(); - - Q_PROPERTY(int PINLen READ pINLen NOTIFY PINLenChanged) - int pINLen(); - - Q_PROPERTY(QString Prompt READ prompt NOTIFY PromptChanged) - QString prompt(); - - Q_PROPERTY(QString Username READ username NOTIFY UsernameChanged) - QString username(); - -public Q_SLOTS: // METHODS - inline QDBusPendingReply EncryptKey(int encryptType, ArrayInt encryptMethod) - { - QList argumentList; - argumentList << QVariant::fromValue(encryptType) << QVariant::fromValue(encryptMethod); - return asyncCallWithArgumentList(QStringLiteral("EncryptKey"), argumentList); - } - - - inline QDBusReply EncryptKey(int encryptType, ArrayInt encryptMethod, ArrayInt &encryptMethod_, QString &publicKey) - { - QList argumentList; - argumentList << QVariant::fromValue(encryptType) << QVariant::fromValue(encryptMethod); - QDBusMessage reply = callWithArgumentList(QDBus::Block, QStringLiteral("EncryptKey"), argumentList); - if (reply.type() == QDBusMessage::ReplyMessage && reply.arguments().count() == 3) { - encryptMethod_ = qdbus_cast(reply.arguments().at(1)); - publicKey = qdbus_cast(reply.arguments().at(2)); - } - return reply; - } - - inline QDBusPendingReply End(int flag) - { - QList argumentList; - argumentList << QVariant::fromValue(flag); - return asyncCallWithArgumentList(QStringLiteral("End"), argumentList); - } - - - - inline QDBusPendingReply GetResult() - { - QList argumentList; - return asyncCallWithArgumentList(QStringLiteral("GetResult"), argumentList); - } - - - - inline QDBusPendingReply<> PrivilegesDisable() - { - QList argumentList; - return asyncCallWithArgumentList(QStringLiteral("PrivilegesDisable"), argumentList); - } - - inline void PrivilegesDisableQueued() - { - QList argumentList; - - CallQueued(QStringLiteral("PrivilegesDisable"), argumentList); - } - - - inline QDBusPendingReply PrivilegesEnable(const QString &path) - { - QList argumentList; - argumentList << QVariant::fromValue(path); - return asyncCallWithArgumentList(QStringLiteral("PrivilegesEnable"), argumentList); - } - - - - inline QDBusPendingReply<> Quit() - { - QList argumentList; - return asyncCallWithArgumentList(QStringLiteral("Quit"), argumentList); - } - - inline void QuitQueued() - { - QList argumentList; - - CallQueued(QStringLiteral("Quit"), argumentList); - } - - - inline QDBusPendingReply<> SetQuitFlag(int flag) - { - QList argumentList; - argumentList << QVariant::fromValue(flag); - return asyncCallWithArgumentList(QStringLiteral("SetQuitFlag"), argumentList); - } - - inline void SetQuitFlagQueued(int flag) - { - QList argumentList; - argumentList << QVariant::fromValue(flag); - - CallQueued(QStringLiteral("SetQuitFlag"), argumentList); - } - - - inline QDBusPendingReply<> SetSymmetricKey(const QByteArray &key) - { - QList argumentList; - argumentList << QVariant::fromValue(key); - return asyncCallWithArgumentList(QStringLiteral("SetSymmetricKey"), argumentList); - } - - inline void SetSymmetricKeyQueued(const QByteArray &key) - { - QList argumentList; - argumentList << QVariant::fromValue(key); - - CallQueued(QStringLiteral("SetSymmetricKey"), argumentList); - } - - - inline QDBusPendingReply<> SetToken(int flag, const QByteArray &token) - { - QList argumentList; - argumentList << QVariant::fromValue(flag) << QVariant::fromValue(token); - return asyncCallWithArgumentList(QStringLiteral("SetToken"), argumentList); - } - - inline void SetTokenQueued(int flag, const QByteArray &token) - { - QList argumentList; - argumentList << QVariant::fromValue(flag) << QVariant::fromValue(token); - - CallQueued(QStringLiteral("SetToken"), argumentList); - } - - - inline QDBusPendingReply Start(int flag, int timeout) - { - QList argumentList; - argumentList << QVariant::fromValue(flag) << QVariant::fromValue(timeout); - return asyncCallWithArgumentList(QStringLiteral("Start"), argumentList); - } - - - - -Q_SIGNALS: // SIGNALS - void Status(int flag, int status, const QString &msg); - // begin property changed signals - void FactorsInfoChanged(MFAInfoList value) const; - void IsFuzzyMFAChanged(bool value) const; - void IsMFAChanged(bool value) const; - void PINLenChanged(int value) const; - void PromptChanged(const QString & value) const; - void UsernameChanged(const QString & value) const; - -public Q_SLOTS: - void CallQueued(const QString &callName, const QList &args); - -private Q_SLOTS: - void onPendingCallFinished(QDBusPendingCallWatcher *w); - void onPropertyChanged(const QString &propName, const QVariant &value); - -private: - __OrgDeepinDdeAuthenticate1SessionInterfacePrivate *d_ptr; -}; - -namespace org { - namespace deepin { - namespace dde { - namespace authenticate1 { - typedef ::__OrgDeepinDdeAuthenticate1SessionInterface Session; - } - } - } -} -#endif diff --git a/src/global_util/dbus/sessionmanager1interface.cpp b/src/global_util/dbus/sessionmanager1interface.cpp deleted file mode 100644 index e8bf94052..000000000 --- a/src/global_util/dbus/sessionmanager1interface.cpp +++ /dev/null @@ -1,131 +0,0 @@ -/* - * This file was generated by qdbusxml2cpp-fix version 0.8 - * Command line was: qdbusxml2cpp-fix -p /home/zyz/works/work/v25/dde-session-shell-snipe/src/global_util/dbus/sessionmanager1interface /home/zyz/works/work/v25/dde-session-shell-snipe/xml/snipe/org.deepin.dde.SessionManager1.xml - * - * qdbusxml2cpp-fix is Copyright (C) 2016 Deepin Technology Co., Ltd. - * - * This is an auto-generated file. - * This file may have been hand-edited. Look for HAND-EDIT comments - * before re-generating it. - */ - -#include "/home/zyz/works/work/v25/dde-session-shell-snipe/src/global_util/dbus/sessionmanager1interface.h" - -DCORE_USE_NAMESPACE -/* - * Implementation of interface class __OrgDeepinDdeSessionManager1Interface - */ - -class __OrgDeepinDdeSessionManager1InterfacePrivate -{ -public: - __OrgDeepinDdeSessionManager1InterfacePrivate() = default; - - // begin member variables - QString CurrentUid; - bool Locked; - int Stage; - -public: - QMap m_processingCalls; - QMap> m_waittingCalls; -}; - -__OrgDeepinDdeSessionManager1Interface::__OrgDeepinDdeSessionManager1Interface(const QString &service, const QString &path, const QDBusConnection &connection, QObject *parent) - : DDBusExtendedAbstractInterface(service, path, staticInterfaceName(), connection, parent) - , d_ptr(new __OrgDeepinDdeSessionManager1InterfacePrivate) -{ - connect(this, &__OrgDeepinDdeSessionManager1Interface::propertyChanged, this, &__OrgDeepinDdeSessionManager1Interface::onPropertyChanged); - -} - -__OrgDeepinDdeSessionManager1Interface::~__OrgDeepinDdeSessionManager1Interface() -{ - qDeleteAll(d_ptr->m_processingCalls.values()); - delete d_ptr; -} - -void __OrgDeepinDdeSessionManager1Interface::onPropertyChanged(const QString &propName, const QVariant &value) -{ - if (propName == QStringLiteral("CurrentUid")) - { - const QString &CurrentUid = qvariant_cast(value); - if (d_ptr->CurrentUid != CurrentUid) - { - d_ptr->CurrentUid = CurrentUid; - Q_EMIT CurrentUidChanged(d_ptr->CurrentUid); - } - return; - } - - if (propName == QStringLiteral("Locked")) - { - const bool &Locked = qvariant_cast(value); - if (d_ptr->Locked != Locked) - { - d_ptr->Locked = Locked; - Q_EMIT LockedChanged(d_ptr->Locked); - } - return; - } - - if (propName == QStringLiteral("Stage")) - { - const int &Stage = qvariant_cast(value); - if (d_ptr->Stage != Stage) - { - d_ptr->Stage = Stage; - Q_EMIT StageChanged(d_ptr->Stage); - } - return; - } - - qWarning() << "property not handle: " << propName; - return; -} - -QString __OrgDeepinDdeSessionManager1Interface::currentUid() -{ - return qvariant_cast(internalPropGet("CurrentUid", &d_ptr->CurrentUid)); -} - -bool __OrgDeepinDdeSessionManager1Interface::locked() -{ - return qvariant_cast(internalPropGet("Locked", &d_ptr->Locked)); -} - -int __OrgDeepinDdeSessionManager1Interface::stage() -{ - return qvariant_cast(internalPropGet("Stage", &d_ptr->Stage)); -} - -void __OrgDeepinDdeSessionManager1Interface::CallQueued(const QString &callName, const QList &args) -{ - if (d_ptr->m_waittingCalls.contains(callName)) - { - d_ptr->m_waittingCalls[callName] = args; - return; - } - if (d_ptr->m_processingCalls.contains(callName)) - { - d_ptr->m_waittingCalls.insert(callName, args); - } else { - QDBusPendingCallWatcher *watcher = new QDBusPendingCallWatcher(asyncCallWithArgumentList(callName, args)); - connect(watcher, &QDBusPendingCallWatcher::finished, this, &__OrgDeepinDdeSessionManager1Interface::onPendingCallFinished); - d_ptr->m_processingCalls.insert(callName, watcher); - } -} - -void __OrgDeepinDdeSessionManager1Interface::onPendingCallFinished(QDBusPendingCallWatcher *w) -{ - w->deleteLater(); - const auto callName = d_ptr->m_processingCalls.key(w); - Q_ASSERT(!callName.isEmpty()); - if (callName.isEmpty()) - return; - d_ptr->m_processingCalls.remove(callName); - if (!d_ptr->m_waittingCalls.contains(callName)) - return; - const auto args = d_ptr->m_waittingCalls.take(callName); - CallQueued(callName, args); -} diff --git a/src/global_util/dbus/sessionmanager1interface.h b/src/global_util/dbus/sessionmanager1interface.h deleted file mode 100644 index 70bbf3a4f..000000000 --- a/src/global_util/dbus/sessionmanager1interface.h +++ /dev/null @@ -1,348 +0,0 @@ -/* - * This file was generated by qdbusxml2cpp-fix version 0.8 - * Command line was: qdbusxml2cpp-fix -p /home/zyz/works/work/v25/dde-session-shell-snipe/src/global_util/dbus/sessionmanager1interface /home/zyz/works/work/v25/dde-session-shell-snipe/xml/snipe/org.deepin.dde.SessionManager1.xml - * - * qdbusxml2cpp-fix is Copyright (C) 2016 Deepin Technology Co., Ltd. - * - * This is an auto-generated file. - * Do not edit! All changes made to it will be lost. - */ - -#ifndef SESSIONMANAGER1INTERFACE_H -#define SESSIONMANAGER1INTERFACE_H - -#include -#include -#include -#include -#include -#include -#include - -#include -#include - - -/* - * Proxy class for interface org.deepin.dde.SessionManager1 - */ -class __OrgDeepinDdeSessionManager1InterfacePrivate; -class __OrgDeepinDdeSessionManager1Interface : public DTK_CORE_NAMESPACE::DDBusExtendedAbstractInterface -{ - Q_OBJECT - -public: - static inline const char *staticInterfaceName() - { return "org.deepin.dde.SessionManager1"; } - -public: - explicit __OrgDeepinDdeSessionManager1Interface(const QString &service, const QString &path, const QDBusConnection &connection, QObject *parent = 0); - - ~__OrgDeepinDdeSessionManager1Interface(); - - Q_PROPERTY(QString CurrentUid READ currentUid NOTIFY CurrentUidChanged) - QString currentUid(); - - Q_PROPERTY(bool Locked READ locked NOTIFY LockedChanged) - bool locked(); - - Q_PROPERTY(int Stage READ stage NOTIFY StageChanged) - int stage(); - -public Q_SLOTS: // METHODS - inline QDBusPendingReply AllowSessionDaemonRun() - { - QList argumentList; - return asyncCallWithArgumentList(QStringLiteral("AllowSessionDaemonRun"), argumentList); - } - - - - inline QDBusPendingReply CanHibernate() - { - QList argumentList; - return asyncCallWithArgumentList(QStringLiteral("CanHibernate"), argumentList); - } - - - - inline QDBusPendingReply CanLogout() - { - QList argumentList; - return asyncCallWithArgumentList(QStringLiteral("CanLogout"), argumentList); - } - - - - inline QDBusPendingReply CanReboot() - { - QList argumentList; - return asyncCallWithArgumentList(QStringLiteral("CanReboot"), argumentList); - } - - - - inline QDBusPendingReply CanShutdown() - { - QList argumentList; - return asyncCallWithArgumentList(QStringLiteral("CanShutdown"), argumentList); - } - - - - inline QDBusPendingReply CanSuspend() - { - QList argumentList; - return asyncCallWithArgumentList(QStringLiteral("CanSuspend"), argumentList); - } - - - - inline QDBusPendingReply<> ForceLogout() - { - QList argumentList; - return asyncCallWithArgumentList(QStringLiteral("ForceLogout"), argumentList); - } - - inline void ForceLogoutQueued() - { - QList argumentList; - - CallQueued(QStringLiteral("ForceLogout"), argumentList); - } - - - inline QDBusPendingReply<> ForceReboot() - { - QList argumentList; - return asyncCallWithArgumentList(QStringLiteral("ForceReboot"), argumentList); - } - - inline void ForceRebootQueued() - { - QList argumentList; - - CallQueued(QStringLiteral("ForceReboot"), argumentList); - } - - - inline QDBusPendingReply<> ForceShutdown() - { - QList argumentList; - return asyncCallWithArgumentList(QStringLiteral("ForceShutdown"), argumentList); - } - - inline void ForceShutdownQueued() - { - QList argumentList; - - CallQueued(QStringLiteral("ForceShutdown"), argumentList); - } - - - inline QDBusPendingReply<> Logout() - { - QList argumentList; - return asyncCallWithArgumentList(QStringLiteral("Logout"), argumentList); - } - - inline void LogoutQueued() - { - QList argumentList; - - CallQueued(QStringLiteral("Logout"), argumentList); - } - - - inline QDBusPendingReply<> PowerOffChoose() - { - QList argumentList; - return asyncCallWithArgumentList(QStringLiteral("PowerOffChoose"), argumentList); - } - - inline void PowerOffChooseQueued() - { - QList argumentList; - - CallQueued(QStringLiteral("PowerOffChoose"), argumentList); - } - - - inline QDBusPendingReply<> Reboot() - { - QList argumentList; - return asyncCallWithArgumentList(QStringLiteral("Reboot"), argumentList); - } - - inline void RebootQueued() - { - QList argumentList; - - CallQueued(QStringLiteral("Reboot"), argumentList); - } - - - inline QDBusPendingReply Register(const QString &in0) - { - QList argumentList; - argumentList << QVariant::fromValue(in0); - return asyncCallWithArgumentList(QStringLiteral("Register"), argumentList); - } - - - - inline QDBusPendingReply<> RequestHibernate() - { - QList argumentList; - return asyncCallWithArgumentList(QStringLiteral("RequestHibernate"), argumentList); - } - - inline void RequestHibernateQueued() - { - QList argumentList; - - CallQueued(QStringLiteral("RequestHibernate"), argumentList); - } - - - inline QDBusPendingReply<> RequestLock() - { - QList argumentList; - return asyncCallWithArgumentList(QStringLiteral("RequestLock"), argumentList); - } - - inline void RequestLockQueued() - { - QList argumentList; - - CallQueued(QStringLiteral("RequestLock"), argumentList); - } - - - inline QDBusPendingReply<> RequestLogout() - { - QList argumentList; - return asyncCallWithArgumentList(QStringLiteral("RequestLogout"), argumentList); - } - - inline void RequestLogoutQueued() - { - QList argumentList; - - CallQueued(QStringLiteral("RequestLogout"), argumentList); - } - - - inline QDBusPendingReply<> RequestReboot() - { - QList argumentList; - return asyncCallWithArgumentList(QStringLiteral("RequestReboot"), argumentList); - } - - inline void RequestRebootQueued() - { - QList argumentList; - - CallQueued(QStringLiteral("RequestReboot"), argumentList); - } - - - inline QDBusPendingReply<> RequestShutdown() - { - QList argumentList; - return asyncCallWithArgumentList(QStringLiteral("RequestShutdown"), argumentList); - } - - inline void RequestShutdownQueued() - { - QList argumentList; - - CallQueued(QStringLiteral("RequestShutdown"), argumentList); - } - - - inline QDBusPendingReply<> RequestSuspend() - { - QList argumentList; - return asyncCallWithArgumentList(QStringLiteral("RequestSuspend"), argumentList); - } - - inline void RequestSuspendQueued() - { - QList argumentList; - - CallQueued(QStringLiteral("RequestSuspend"), argumentList); - } - - - inline QDBusPendingReply<> SetLocked(bool in0) - { - QList argumentList; - argumentList << QVariant::fromValue(in0); - return asyncCallWithArgumentList(QStringLiteral("SetLocked"), argumentList); - } - - inline void SetLockedQueued(bool in0) - { - QList argumentList; - argumentList << QVariant::fromValue(in0); - - CallQueued(QStringLiteral("SetLocked"), argumentList); - } - - - inline QDBusPendingReply<> Shutdown() - { - QList argumentList; - return asyncCallWithArgumentList(QStringLiteral("Shutdown"), argumentList); - } - - inline void ShutdownQueued() - { - QList argumentList; - - CallQueued(QStringLiteral("Shutdown"), argumentList); - } - - - inline QDBusPendingReply<> ToggleDebug() - { - QList argumentList; - return asyncCallWithArgumentList(QStringLiteral("ToggleDebug"), argumentList); - } - - inline void ToggleDebugQueued() - { - QList argumentList; - - CallQueued(QStringLiteral("ToggleDebug"), argumentList); - } - - - -Q_SIGNALS: // SIGNALS - void Unlock(); - // begin property changed signals - void CurrentUidChanged(const QString & value) const; - void LockedChanged(bool value) const; - void StageChanged(int value) const; - -public Q_SLOTS: - void CallQueued(const QString &callName, const QList &args); - -private Q_SLOTS: - void onPendingCallFinished(QDBusPendingCallWatcher *w); - void onPropertyChanged(const QString &propName, const QVariant &value); - -private: - __OrgDeepinDdeSessionManager1InterfacePrivate *d_ptr; -}; - -namespace org { - namespace deepin { - namespace dde { - typedef ::__OrgDeepinDdeSessionManager1Interface SessionManager1; - } - } -} -#endif diff --git a/src/global_util/dbus/systemdisplay1interface.cpp b/src/global_util/dbus/systemdisplay1interface.cpp deleted file mode 100644 index 3dfcf79c9..000000000 --- a/src/global_util/dbus/systemdisplay1interface.cpp +++ /dev/null @@ -1,72 +0,0 @@ -/* - * This file was generated by qdbusxml2cpp-fix version 0.8 - * Command line was: qdbusxml2cpp-fix -p /home/zyz/works/work/v25/dde-session-shell-snipe/src/global_util/dbus/systemdisplay1interface /home/zyz/works/work/v25/dde-session-shell-snipe/xml/snipe/org.deepin.dde.SystemDisplay1.xml - * - * qdbusxml2cpp-fix is Copyright (C) 2016 Deepin Technology Co., Ltd. - * - * This is an auto-generated file. - * This file may have been hand-edited. Look for HAND-EDIT comments - * before re-generating it. - */ - -#include "/home/zyz/works/work/v25/dde-session-shell-snipe/src/global_util/dbus/systemdisplay1interface.h" - -DCORE_USE_NAMESPACE -/* - * Implementation of interface class __OrgDeepinDdeDisplay1Interface - */ - -class __OrgDeepinDdeDisplay1InterfacePrivate -{ -public: - __OrgDeepinDdeDisplay1InterfacePrivate() = default; - - // begin member variables - -public: - QMap m_processingCalls; - QMap> m_waittingCalls; -}; - -__OrgDeepinDdeDisplay1Interface::__OrgDeepinDdeDisplay1Interface(const QString &service, const QString &path, const QDBusConnection &connection, QObject *parent) - : DDBusExtendedAbstractInterface(service, path, staticInterfaceName(), connection, parent) - , d_ptr(new __OrgDeepinDdeDisplay1InterfacePrivate) -{ -} - -__OrgDeepinDdeDisplay1Interface::~__OrgDeepinDdeDisplay1Interface() -{ - qDeleteAll(d_ptr->m_processingCalls.values()); - delete d_ptr; -} - -void __OrgDeepinDdeDisplay1Interface::CallQueued(const QString &callName, const QList &args) -{ - if (d_ptr->m_waittingCalls.contains(callName)) - { - d_ptr->m_waittingCalls[callName] = args; - return; - } - if (d_ptr->m_processingCalls.contains(callName)) - { - d_ptr->m_waittingCalls.insert(callName, args); - } else { - QDBusPendingCallWatcher *watcher = new QDBusPendingCallWatcher(asyncCallWithArgumentList(callName, args)); - connect(watcher, &QDBusPendingCallWatcher::finished, this, &__OrgDeepinDdeDisplay1Interface::onPendingCallFinished); - d_ptr->m_processingCalls.insert(callName, watcher); - } -} - -void __OrgDeepinDdeDisplay1Interface::onPendingCallFinished(QDBusPendingCallWatcher *w) -{ - w->deleteLater(); - const auto callName = d_ptr->m_processingCalls.key(w); - Q_ASSERT(!callName.isEmpty()); - if (callName.isEmpty()) - return; - d_ptr->m_processingCalls.remove(callName); - if (!d_ptr->m_waittingCalls.contains(callName)) - return; - const auto args = d_ptr->m_waittingCalls.take(callName); - CallQueued(callName, args); -} diff --git a/src/global_util/dbus/systemdisplay1interface.h b/src/global_util/dbus/systemdisplay1interface.h deleted file mode 100644 index fdbe02f56..000000000 --- a/src/global_util/dbus/systemdisplay1interface.h +++ /dev/null @@ -1,90 +0,0 @@ -/* - * This file was generated by qdbusxml2cpp-fix version 0.8 - * Command line was: qdbusxml2cpp-fix -p /home/zyz/works/work/v25/dde-session-shell-snipe/src/global_util/dbus/systemdisplay1interface /home/zyz/works/work/v25/dde-session-shell-snipe/xml/snipe/org.deepin.dde.SystemDisplay1.xml - * - * qdbusxml2cpp-fix is Copyright (C) 2016 Deepin Technology Co., Ltd. - * - * This is an auto-generated file. - * Do not edit! All changes made to it will be lost. - */ - -#ifndef SYSTEMDISPLAY1INTERFACE_H -#define SYSTEMDISPLAY1INTERFACE_H - -#include -#include -#include -#include -#include -#include -#include - -#include -#include - - -/* - * Proxy class for interface org.deepin.dde.Display1 - */ -class __OrgDeepinDdeDisplay1InterfacePrivate; -class __OrgDeepinDdeDisplay1Interface : public DTK_CORE_NAMESPACE::DDBusExtendedAbstractInterface -{ - Q_OBJECT - -public: - static inline const char *staticInterfaceName() - { return "org.deepin.dde.Display1"; } - -public: - explicit __OrgDeepinDdeDisplay1Interface(const QString &service, const QString &path, const QDBusConnection &connection, QObject *parent = 0); - - ~__OrgDeepinDdeDisplay1Interface(); - -public Q_SLOTS: // METHODS - inline QDBusPendingReply GetConfig() - { - QList argumentList; - return asyncCallWithArgumentList(QStringLiteral("GetConfig"), argumentList); - } - - - - inline QDBusPendingReply<> SetConfig(const QString &in0) - { - QList argumentList; - argumentList << QVariant::fromValue(in0); - return asyncCallWithArgumentList(QStringLiteral("SetConfig"), argumentList); - } - - inline void SetConfigQueued(const QString &in0) - { - QList argumentList; - argumentList << QVariant::fromValue(in0); - - CallQueued(QStringLiteral("SetConfig"), argumentList); - } - - - -Q_SIGNALS: // SIGNALS - void ConfigUpdated(const QString &in0); - // begin property changed signals - -public Q_SLOTS: - void CallQueued(const QString &callName, const QList &args); - -private Q_SLOTS: - void onPendingCallFinished(QDBusPendingCallWatcher *w); - -private: - __OrgDeepinDdeDisplay1InterfacePrivate *d_ptr; -}; - -namespace org { - namespace deepin { - namespace dde { - typedef ::__OrgDeepinDdeDisplay1Interface Display1; - } - } -} -#endif diff --git a/src/global_util/dbus/systempower1interface.cpp b/src/global_util/dbus/systempower1interface.cpp deleted file mode 100644 index 6d1ca3651..000000000 --- a/src/global_util/dbus/systempower1interface.cpp +++ /dev/null @@ -1,348 +0,0 @@ -/* - * This file was generated by qdbusxml2cpp-fix version 0.8 - * Command line was: qdbusxml2cpp-fix -p /home/zyz/works/work/v25/dde-session-shell-snipe/src/global_util/dbus/systempower1interface /home/zyz/works/work/v25/dde-session-shell-snipe/xml/snipe/org.deepin.dde.SystemPower1.xml - * - * qdbusxml2cpp-fix is Copyright (C) 2016 Deepin Technology Co., Ltd. - * - * This is an auto-generated file. - * This file may have been hand-edited. Look for HAND-EDIT comments - * before re-generating it. - */ - -#include "/home/zyz/works/work/v25/dde-session-shell-snipe/src/global_util/dbus/systempower1interface.h" - -DCORE_USE_NAMESPACE -/* - * Implementation of interface class __OrgDeepinDdePower1Interface - */ - -class __OrgDeepinDdePower1InterfacePrivate -{ -public: - __OrgDeepinDdePower1InterfacePrivate() = default; - - // begin member variables - double BatteryPercentage; - uint BatteryStatus; - qulonglong BatteryTimeToEmpty; - qulonglong BatteryTimeToFull; - bool HasBattery; - bool HasLidSwitch; - bool IsHighPerformanceSupported; - QString Mode; - bool OnBattery; - bool PowerSavingModeAuto; - bool PowerSavingModeAutoWhenBatteryLow; - uint PowerSavingModeBrightnessDropPercent; - bool PowerSavingModeEnabled; - bool PowerSystemAutoToSleepWhenFree; - -public: - QMap m_processingCalls; - QMap> m_waittingCalls; -}; - -__OrgDeepinDdePower1Interface::__OrgDeepinDdePower1Interface(const QString &service, const QString &path, const QDBusConnection &connection, QObject *parent) - : DDBusExtendedAbstractInterface(service, path, staticInterfaceName(), connection, parent) - , d_ptr(new __OrgDeepinDdePower1InterfacePrivate) -{ - connect(this, &__OrgDeepinDdePower1Interface::propertyChanged, this, &__OrgDeepinDdePower1Interface::onPropertyChanged); - -} - -__OrgDeepinDdePower1Interface::~__OrgDeepinDdePower1Interface() -{ - qDeleteAll(d_ptr->m_processingCalls.values()); - delete d_ptr; -} - -void __OrgDeepinDdePower1Interface::onPropertyChanged(const QString &propName, const QVariant &value) -{ - if (propName == QStringLiteral("BatteryPercentage")) - { - const double &BatteryPercentage = qvariant_cast(value); - if (d_ptr->BatteryPercentage != BatteryPercentage) - { - d_ptr->BatteryPercentage = BatteryPercentage; - Q_EMIT BatteryPercentageChanged(d_ptr->BatteryPercentage); - } - return; - } - - if (propName == QStringLiteral("BatteryStatus")) - { - const uint &BatteryStatus = qvariant_cast(value); - if (d_ptr->BatteryStatus != BatteryStatus) - { - d_ptr->BatteryStatus = BatteryStatus; - Q_EMIT BatteryStatusChanged(d_ptr->BatteryStatus); - } - return; - } - - if (propName == QStringLiteral("BatteryTimeToEmpty")) - { - const qulonglong &BatteryTimeToEmpty = qvariant_cast(value); - if (d_ptr->BatteryTimeToEmpty != BatteryTimeToEmpty) - { - d_ptr->BatteryTimeToEmpty = BatteryTimeToEmpty; - Q_EMIT BatteryTimeToEmptyChanged(d_ptr->BatteryTimeToEmpty); - } - return; - } - - if (propName == QStringLiteral("BatteryTimeToFull")) - { - const qulonglong &BatteryTimeToFull = qvariant_cast(value); - if (d_ptr->BatteryTimeToFull != BatteryTimeToFull) - { - d_ptr->BatteryTimeToFull = BatteryTimeToFull; - Q_EMIT BatteryTimeToFullChanged(d_ptr->BatteryTimeToFull); - } - return; - } - - if (propName == QStringLiteral("HasBattery")) - { - const bool &HasBattery = qvariant_cast(value); - if (d_ptr->HasBattery != HasBattery) - { - d_ptr->HasBattery = HasBattery; - Q_EMIT HasBatteryChanged(d_ptr->HasBattery); - } - return; - } - - if (propName == QStringLiteral("HasLidSwitch")) - { - const bool &HasLidSwitch = qvariant_cast(value); - if (d_ptr->HasLidSwitch != HasLidSwitch) - { - d_ptr->HasLidSwitch = HasLidSwitch; - Q_EMIT HasLidSwitchChanged(d_ptr->HasLidSwitch); - } - return; - } - - if (propName == QStringLiteral("IsHighPerformanceSupported")) - { - const bool &IsHighPerformanceSupported = qvariant_cast(value); - if (d_ptr->IsHighPerformanceSupported != IsHighPerformanceSupported) - { - d_ptr->IsHighPerformanceSupported = IsHighPerformanceSupported; - Q_EMIT IsHighPerformanceSupportedChanged(d_ptr->IsHighPerformanceSupported); - } - return; - } - - if (propName == QStringLiteral("Mode")) - { - const QString &Mode = qvariant_cast(value); - if (d_ptr->Mode != Mode) - { - d_ptr->Mode = Mode; - Q_EMIT ModeChanged(d_ptr->Mode); - } - return; - } - - if (propName == QStringLiteral("OnBattery")) - { - const bool &OnBattery = qvariant_cast(value); - if (d_ptr->OnBattery != OnBattery) - { - d_ptr->OnBattery = OnBattery; - Q_EMIT OnBatteryChanged(d_ptr->OnBattery); - } - return; - } - - if (propName == QStringLiteral("PowerSavingModeAuto")) - { - const bool &PowerSavingModeAuto = qvariant_cast(value); - if (d_ptr->PowerSavingModeAuto != PowerSavingModeAuto) - { - d_ptr->PowerSavingModeAuto = PowerSavingModeAuto; - Q_EMIT PowerSavingModeAutoChanged(d_ptr->PowerSavingModeAuto); - } - return; - } - - if (propName == QStringLiteral("PowerSavingModeAutoWhenBatteryLow")) - { - const bool &PowerSavingModeAutoWhenBatteryLow = qvariant_cast(value); - if (d_ptr->PowerSavingModeAutoWhenBatteryLow != PowerSavingModeAutoWhenBatteryLow) - { - d_ptr->PowerSavingModeAutoWhenBatteryLow = PowerSavingModeAutoWhenBatteryLow; - Q_EMIT PowerSavingModeAutoWhenBatteryLowChanged(d_ptr->PowerSavingModeAutoWhenBatteryLow); - } - return; - } - - if (propName == QStringLiteral("PowerSavingModeBrightnessDropPercent")) - { - const uint &PowerSavingModeBrightnessDropPercent = qvariant_cast(value); - if (d_ptr->PowerSavingModeBrightnessDropPercent != PowerSavingModeBrightnessDropPercent) - { - d_ptr->PowerSavingModeBrightnessDropPercent = PowerSavingModeBrightnessDropPercent; - Q_EMIT PowerSavingModeBrightnessDropPercentChanged(d_ptr->PowerSavingModeBrightnessDropPercent); - } - return; - } - - if (propName == QStringLiteral("PowerSavingModeEnabled")) - { - const bool &PowerSavingModeEnabled = qvariant_cast(value); - if (d_ptr->PowerSavingModeEnabled != PowerSavingModeEnabled) - { - d_ptr->PowerSavingModeEnabled = PowerSavingModeEnabled; - Q_EMIT PowerSavingModeEnabledChanged(d_ptr->PowerSavingModeEnabled); - } - return; - } - - if (propName == QStringLiteral("PowerSystemAutoToSleepWhenFree")) - { - const bool &PowerSystemAutoToSleepWhenFree = qvariant_cast(value); - if (d_ptr->PowerSystemAutoToSleepWhenFree != PowerSystemAutoToSleepWhenFree) - { - d_ptr->PowerSystemAutoToSleepWhenFree = PowerSystemAutoToSleepWhenFree; - Q_EMIT PowerSystemAutoToSleepWhenFreeChanged(d_ptr->PowerSystemAutoToSleepWhenFree); - } - return; - } - - qWarning() << "property not handle: " << propName; - return; -} - -double __OrgDeepinDdePower1Interface::batteryPercentage() -{ - return qvariant_cast(internalPropGet("BatteryPercentage", &d_ptr->BatteryPercentage)); -} - -uint __OrgDeepinDdePower1Interface::batteryStatus() -{ - return qvariant_cast(internalPropGet("BatteryStatus", &d_ptr->BatteryStatus)); -} - -qulonglong __OrgDeepinDdePower1Interface::batteryTimeToEmpty() -{ - return qvariant_cast(internalPropGet("BatteryTimeToEmpty", &d_ptr->BatteryTimeToEmpty)); -} - -qulonglong __OrgDeepinDdePower1Interface::batteryTimeToFull() -{ - return qvariant_cast(internalPropGet("BatteryTimeToFull", &d_ptr->BatteryTimeToFull)); -} - -bool __OrgDeepinDdePower1Interface::hasBattery() -{ - return qvariant_cast(internalPropGet("HasBattery", &d_ptr->HasBattery)); -} - -bool __OrgDeepinDdePower1Interface::hasLidSwitch() -{ - return qvariant_cast(internalPropGet("HasLidSwitch", &d_ptr->HasLidSwitch)); -} - -bool __OrgDeepinDdePower1Interface::isHighPerformanceSupported() -{ - return qvariant_cast(internalPropGet("IsHighPerformanceSupported", &d_ptr->IsHighPerformanceSupported)); -} - -QString __OrgDeepinDdePower1Interface::mode() -{ - return qvariant_cast(internalPropGet("Mode", &d_ptr->Mode)); -} - -bool __OrgDeepinDdePower1Interface::onBattery() -{ - return qvariant_cast(internalPropGet("OnBattery", &d_ptr->OnBattery)); -} - -bool __OrgDeepinDdePower1Interface::powerSavingModeAuto() -{ - return qvariant_cast(internalPropGet("PowerSavingModeAuto", &d_ptr->PowerSavingModeAuto)); -} - -void __OrgDeepinDdePower1Interface::setPowerSavingModeAuto(bool value) -{ - - internalPropSet("PowerSavingModeAuto", QVariant::fromValue(value), &d_ptr->PowerSavingModeAuto); -} - -bool __OrgDeepinDdePower1Interface::powerSavingModeAutoWhenBatteryLow() -{ - return qvariant_cast(internalPropGet("PowerSavingModeAutoWhenBatteryLow", &d_ptr->PowerSavingModeAutoWhenBatteryLow)); -} - -void __OrgDeepinDdePower1Interface::setPowerSavingModeAutoWhenBatteryLow(bool value) -{ - - internalPropSet("PowerSavingModeAutoWhenBatteryLow", QVariant::fromValue(value), &d_ptr->PowerSavingModeAutoWhenBatteryLow); -} - -uint __OrgDeepinDdePower1Interface::powerSavingModeBrightnessDropPercent() -{ - return qvariant_cast(internalPropGet("PowerSavingModeBrightnessDropPercent", &d_ptr->PowerSavingModeBrightnessDropPercent)); -} - -void __OrgDeepinDdePower1Interface::setPowerSavingModeBrightnessDropPercent(uint value) -{ - - internalPropSet("PowerSavingModeBrightnessDropPercent", QVariant::fromValue(value), &d_ptr->PowerSavingModeBrightnessDropPercent); -} - -bool __OrgDeepinDdePower1Interface::powerSavingModeEnabled() -{ - return qvariant_cast(internalPropGet("PowerSavingModeEnabled", &d_ptr->PowerSavingModeEnabled)); -} - -void __OrgDeepinDdePower1Interface::setPowerSavingModeEnabled(bool value) -{ - - internalPropSet("PowerSavingModeEnabled", QVariant::fromValue(value), &d_ptr->PowerSavingModeEnabled); -} - -bool __OrgDeepinDdePower1Interface::powerSystemAutoToSleepWhenFree() -{ - return qvariant_cast(internalPropGet("PowerSystemAutoToSleepWhenFree", &d_ptr->PowerSystemAutoToSleepWhenFree)); -} - -void __OrgDeepinDdePower1Interface::setPowerSystemAutoToSleepWhenFree(bool value) -{ - - internalPropSet("PowerSystemAutoToSleepWhenFree", QVariant::fromValue(value), &d_ptr->PowerSystemAutoToSleepWhenFree); -} - -void __OrgDeepinDdePower1Interface::CallQueued(const QString &callName, const QList &args) -{ - if (d_ptr->m_waittingCalls.contains(callName)) - { - d_ptr->m_waittingCalls[callName] = args; - return; - } - if (d_ptr->m_processingCalls.contains(callName)) - { - d_ptr->m_waittingCalls.insert(callName, args); - } else { - QDBusPendingCallWatcher *watcher = new QDBusPendingCallWatcher(asyncCallWithArgumentList(callName, args)); - connect(watcher, &QDBusPendingCallWatcher::finished, this, &__OrgDeepinDdePower1Interface::onPendingCallFinished); - d_ptr->m_processingCalls.insert(callName, watcher); - } -} - -void __OrgDeepinDdePower1Interface::onPendingCallFinished(QDBusPendingCallWatcher *w) -{ - w->deleteLater(); - const auto callName = d_ptr->m_processingCalls.key(w); - Q_ASSERT(!callName.isEmpty()); - if (callName.isEmpty()) - return; - d_ptr->m_processingCalls.remove(callName); - if (!d_ptr->m_waittingCalls.contains(callName)) - return; - const auto args = d_ptr->m_waittingCalls.take(callName); - CallQueued(callName, args); -} diff --git a/src/global_util/dbus/systempower1interface.h b/src/global_util/dbus/systempower1interface.h deleted file mode 100644 index 019d5d0d9..000000000 --- a/src/global_util/dbus/systempower1interface.h +++ /dev/null @@ -1,198 +0,0 @@ -/* - * This file was generated by qdbusxml2cpp-fix version 0.8 - * Command line was: qdbusxml2cpp-fix -p /home/zyz/works/work/v25/dde-session-shell-snipe/src/global_util/dbus/systempower1interface /home/zyz/works/work/v25/dde-session-shell-snipe/xml/snipe/org.deepin.dde.SystemPower1.xml - * - * qdbusxml2cpp-fix is Copyright (C) 2016 Deepin Technology Co., Ltd. - * - * This is an auto-generated file. - * Do not edit! All changes made to it will be lost. - */ - -#ifndef SYSTEMPOWER1INTERFACE_H -#define SYSTEMPOWER1INTERFACE_H - -#include -#include -#include -#include -#include -#include -#include - -#include -#include - - -/* - * Proxy class for interface org.deepin.dde.Power1 - */ -class __OrgDeepinDdePower1InterfacePrivate; -class __OrgDeepinDdePower1Interface : public DTK_CORE_NAMESPACE::DDBusExtendedAbstractInterface -{ - Q_OBJECT - -public: - static inline const char *staticInterfaceName() - { return "org.deepin.dde.Power1"; } - -public: - explicit __OrgDeepinDdePower1Interface(const QString &service, const QString &path, const QDBusConnection &connection, QObject *parent = 0); - - ~__OrgDeepinDdePower1Interface(); - - Q_PROPERTY(double BatteryPercentage READ batteryPercentage NOTIFY BatteryPercentageChanged) - double batteryPercentage(); - - Q_PROPERTY(uint BatteryStatus READ batteryStatus NOTIFY BatteryStatusChanged) - uint batteryStatus(); - - Q_PROPERTY(qulonglong BatteryTimeToEmpty READ batteryTimeToEmpty NOTIFY BatteryTimeToEmptyChanged) - qulonglong batteryTimeToEmpty(); - - Q_PROPERTY(qulonglong BatteryTimeToFull READ batteryTimeToFull NOTIFY BatteryTimeToFullChanged) - qulonglong batteryTimeToFull(); - - Q_PROPERTY(bool HasBattery READ hasBattery NOTIFY HasBatteryChanged) - bool hasBattery(); - - Q_PROPERTY(bool HasLidSwitch READ hasLidSwitch NOTIFY HasLidSwitchChanged) - bool hasLidSwitch(); - - Q_PROPERTY(bool IsHighPerformanceSupported READ isHighPerformanceSupported NOTIFY IsHighPerformanceSupportedChanged) - bool isHighPerformanceSupported(); - - Q_PROPERTY(QString Mode READ mode NOTIFY ModeChanged) - QString mode(); - - Q_PROPERTY(bool OnBattery READ onBattery NOTIFY OnBatteryChanged) - bool onBattery(); - - Q_PROPERTY(bool PowerSavingModeAuto READ powerSavingModeAuto WRITE setPowerSavingModeAuto NOTIFY PowerSavingModeAutoChanged) - bool powerSavingModeAuto(); - void setPowerSavingModeAuto(bool value); - - Q_PROPERTY(bool PowerSavingModeAutoWhenBatteryLow READ powerSavingModeAutoWhenBatteryLow WRITE setPowerSavingModeAutoWhenBatteryLow NOTIFY PowerSavingModeAutoWhenBatteryLowChanged) - bool powerSavingModeAutoWhenBatteryLow(); - void setPowerSavingModeAutoWhenBatteryLow(bool value); - - Q_PROPERTY(uint PowerSavingModeBrightnessDropPercent READ powerSavingModeBrightnessDropPercent WRITE setPowerSavingModeBrightnessDropPercent NOTIFY PowerSavingModeBrightnessDropPercentChanged) - uint powerSavingModeBrightnessDropPercent(); - void setPowerSavingModeBrightnessDropPercent(uint value); - - Q_PROPERTY(bool PowerSavingModeEnabled READ powerSavingModeEnabled WRITE setPowerSavingModeEnabled NOTIFY PowerSavingModeEnabledChanged) - bool powerSavingModeEnabled(); - void setPowerSavingModeEnabled(bool value); - - Q_PROPERTY(bool PowerSystemAutoToSleepWhenFree READ powerSystemAutoToSleepWhenFree WRITE setPowerSystemAutoToSleepWhenFree NOTIFY PowerSystemAutoToSleepWhenFreeChanged) - bool powerSystemAutoToSleepWhenFree(); - void setPowerSystemAutoToSleepWhenFree(bool value); - -public Q_SLOTS: // METHODS - inline QDBusPendingReply > GetBatteries() - { - QList argumentList; - return asyncCallWithArgumentList(QStringLiteral("GetBatteries"), argumentList); - } - - - - inline QDBusPendingReply<> Refresh() - { - QList argumentList; - return asyncCallWithArgumentList(QStringLiteral("Refresh"), argumentList); - } - - inline void RefreshQueued() - { - QList argumentList; - - CallQueued(QStringLiteral("Refresh"), argumentList); - } - - - inline QDBusPendingReply<> RefreshBatteries() - { - QList argumentList; - return asyncCallWithArgumentList(QStringLiteral("RefreshBatteries"), argumentList); - } - - inline void RefreshBatteriesQueued() - { - QList argumentList; - - CallQueued(QStringLiteral("RefreshBatteries"), argumentList); - } - - - inline QDBusPendingReply<> RefreshMains() - { - QList argumentList; - return asyncCallWithArgumentList(QStringLiteral("RefreshMains"), argumentList); - } - - inline void RefreshMainsQueued() - { - QList argumentList; - - CallQueued(QStringLiteral("RefreshMains"), argumentList); - } - - - inline QDBusPendingReply<> SetMode(const QString &mode) - { - QList argumentList; - argumentList << QVariant::fromValue(mode); - return asyncCallWithArgumentList(QStringLiteral("SetMode"), argumentList); - } - - inline void SetModeQueued(const QString &mode) - { - QList argumentList; - argumentList << QVariant::fromValue(mode); - - CallQueued(QStringLiteral("SetMode"), argumentList); - } - - - -Q_SIGNALS: // SIGNALS - void BatteryAdded(const QDBusObjectPath &objpath); - void BatteryDisplayUpdate(qlonglong timestamp); - void BatteryRemoved(const QDBusObjectPath &objpath); - void LidClosed(); - void LidOpened(); - // begin property changed signals - void BatteryPercentageChanged(double value) const; - void BatteryStatusChanged(uint value) const; - void BatteryTimeToEmptyChanged(qulonglong value) const; - void BatteryTimeToFullChanged(qulonglong value) const; - void HasBatteryChanged(bool value) const; - void HasLidSwitchChanged(bool value) const; - void IsHighPerformanceSupportedChanged(bool value) const; - void ModeChanged(const QString & value) const; - void OnBatteryChanged(bool value) const; - void PowerSavingModeAutoChanged(bool value) const; - void PowerSavingModeAutoWhenBatteryLowChanged(bool value) const; - void PowerSavingModeBrightnessDropPercentChanged(uint value) const; - void PowerSavingModeEnabledChanged(bool value) const; - void PowerSystemAutoToSleepWhenFreeChanged(bool value) const; - -public Q_SLOTS: - void CallQueued(const QString &callName, const QList &args); - -private Q_SLOTS: - void onPendingCallFinished(QDBusPendingCallWatcher *w); - void onPropertyChanged(const QString &propName, const QVariant &value); - -private: - __OrgDeepinDdePower1InterfacePrivate *d_ptr; -}; - -namespace org { - namespace deepin { - namespace dde { - typedef ::__OrgDeepinDdePower1Interface Power1; - } - } -} -#endif diff --git a/src/global_util/dbus/userinterface.cpp b/src/global_util/dbus/userinterface.cpp deleted file mode 100644 index f8bfb2f5f..000000000 --- a/src/global_util/dbus/userinterface.cpp +++ /dev/null @@ -1,641 +0,0 @@ -/* - * This file was generated by qdbusxml2cpp-fix version 0.8 - * Command line was: qdbusxml2cpp-fix -p /home/zyz/works/work/v25/dde-session-shell-snipe/src/global_util/dbus/userinterface /home/zyz/works/work/v25/dde-session-shell-snipe/xml/snipe/org.deepin.dde.Accounts1.User.xml - * - * qdbusxml2cpp-fix is Copyright (C) 2016 Deepin Technology Co., Ltd. - * - * This is an auto-generated file. - * This file may have been hand-edited. Look for HAND-EDIT comments - * before re-generating it. - */ - -#include "/home/zyz/works/work/v25/dde-session-shell-snipe/src/global_util/dbus/userinterface.h" - -DCORE_USE_NAMESPACE -/* - * Implementation of interface class __OrgDeepinDdeAccounts1UserInterface - */ - -class __OrgDeepinDdeAccounts1UserInterfacePrivate -{ -public: - __OrgDeepinDdeAccounts1UserInterfacePrivate() = default; - - // begin member variables - int AccountType; - bool AutomaticLogin; - qulonglong CreatedTime; - QStringList DesktopBackgrounds; - QString FullName; - QString Gid; - QString GreeterBackground; - QStringList Groups; - QStringList HistoryLayout; - QString HomeDir; - QString IconFile; - QStringList IconList; - QString Layout; - QString Locale; - bool Locked; - qulonglong LoginTime; - int LongDateFormat; - int LongTimeFormat; - int MaxPasswordAge; - bool NoPasswdLogin; - QString PasswordHint; - int PasswordLastChange; - QString PasswordStatus; - QString Shell; - int ShortDateFormat; - int ShortTimeFormat; - bool SystemAccount; - QString Uid; - bool Use24HourFormat; - QString UserName; - int WeekBegins; - int WeekdayFormat; - QString XSession; - -public: - QMap m_processingCalls; - QMap> m_waittingCalls; -}; - -__OrgDeepinDdeAccounts1UserInterface::__OrgDeepinDdeAccounts1UserInterface(const QString &service, const QString &path, const QDBusConnection &connection, QObject *parent) - : DDBusExtendedAbstractInterface(service, path, staticInterfaceName(), connection, parent) - , d_ptr(new __OrgDeepinDdeAccounts1UserInterfacePrivate) -{ - connect(this, &__OrgDeepinDdeAccounts1UserInterface::propertyChanged, this, &__OrgDeepinDdeAccounts1UserInterface::onPropertyChanged); - -} - -__OrgDeepinDdeAccounts1UserInterface::~__OrgDeepinDdeAccounts1UserInterface() -{ - qDeleteAll(d_ptr->m_processingCalls.values()); - delete d_ptr; -} - -void __OrgDeepinDdeAccounts1UserInterface::onPropertyChanged(const QString &propName, const QVariant &value) -{ - if (propName == QStringLiteral("AccountType")) - { - const int &AccountType = qvariant_cast(value); - if (d_ptr->AccountType != AccountType) - { - d_ptr->AccountType = AccountType; - Q_EMIT AccountTypeChanged(d_ptr->AccountType); - } - return; - } - - if (propName == QStringLiteral("AutomaticLogin")) - { - const bool &AutomaticLogin = qvariant_cast(value); - if (d_ptr->AutomaticLogin != AutomaticLogin) - { - d_ptr->AutomaticLogin = AutomaticLogin; - Q_EMIT AutomaticLoginChanged(d_ptr->AutomaticLogin); - } - return; - } - - if (propName == QStringLiteral("CreatedTime")) - { - const qulonglong &CreatedTime = qvariant_cast(value); - if (d_ptr->CreatedTime != CreatedTime) - { - d_ptr->CreatedTime = CreatedTime; - Q_EMIT CreatedTimeChanged(d_ptr->CreatedTime); - } - return; - } - - if (propName == QStringLiteral("DesktopBackgrounds")) - { - const QStringList &DesktopBackgrounds = qvariant_cast(value); - if (d_ptr->DesktopBackgrounds != DesktopBackgrounds) - { - d_ptr->DesktopBackgrounds = DesktopBackgrounds; - Q_EMIT DesktopBackgroundsChanged(d_ptr->DesktopBackgrounds); - } - return; - } - - if (propName == QStringLiteral("FullName")) - { - const QString &FullName = qvariant_cast(value); - if (d_ptr->FullName != FullName) - { - d_ptr->FullName = FullName; - Q_EMIT FullNameChanged(d_ptr->FullName); - } - return; - } - - if (propName == QStringLiteral("Gid")) - { - const QString &Gid = qvariant_cast(value); - if (d_ptr->Gid != Gid) - { - d_ptr->Gid = Gid; - Q_EMIT GidChanged(d_ptr->Gid); - } - return; - } - - if (propName == QStringLiteral("GreeterBackground")) - { - const QString &GreeterBackground = qvariant_cast(value); - if (d_ptr->GreeterBackground != GreeterBackground) - { - d_ptr->GreeterBackground = GreeterBackground; - Q_EMIT GreeterBackgroundChanged(d_ptr->GreeterBackground); - } - return; - } - - if (propName == QStringLiteral("Groups")) - { - const QStringList &Groups = qvariant_cast(value); - if (d_ptr->Groups != Groups) - { - d_ptr->Groups = Groups; - Q_EMIT GroupsChanged(d_ptr->Groups); - } - return; - } - - if (propName == QStringLiteral("HistoryLayout")) - { - const QStringList &HistoryLayout = qvariant_cast(value); - if (d_ptr->HistoryLayout != HistoryLayout) - { - d_ptr->HistoryLayout = HistoryLayout; - Q_EMIT HistoryLayoutChanged(d_ptr->HistoryLayout); - } - return; - } - - if (propName == QStringLiteral("HomeDir")) - { - const QString &HomeDir = qvariant_cast(value); - if (d_ptr->HomeDir != HomeDir) - { - d_ptr->HomeDir = HomeDir; - Q_EMIT HomeDirChanged(d_ptr->HomeDir); - } - return; - } - - if (propName == QStringLiteral("IconFile")) - { - const QString &IconFile = qvariant_cast(value); - if (d_ptr->IconFile != IconFile) - { - d_ptr->IconFile = IconFile; - Q_EMIT IconFileChanged(d_ptr->IconFile); - } - return; - } - - if (propName == QStringLiteral("IconList")) - { - const QStringList &IconList = qvariant_cast(value); - if (d_ptr->IconList != IconList) - { - d_ptr->IconList = IconList; - Q_EMIT IconListChanged(d_ptr->IconList); - } - return; - } - - if (propName == QStringLiteral("Layout")) - { - const QString &Layout = qvariant_cast(value); - if (d_ptr->Layout != Layout) - { - d_ptr->Layout = Layout; - Q_EMIT LayoutChanged(d_ptr->Layout); - } - return; - } - - if (propName == QStringLiteral("Locale")) - { - const QString &Locale = qvariant_cast(value); - if (d_ptr->Locale != Locale) - { - d_ptr->Locale = Locale; - Q_EMIT LocaleChanged(d_ptr->Locale); - } - return; - } - - if (propName == QStringLiteral("Locked")) - { - const bool &Locked = qvariant_cast(value); - if (d_ptr->Locked != Locked) - { - d_ptr->Locked = Locked; - Q_EMIT LockedChanged(d_ptr->Locked); - } - return; - } - - if (propName == QStringLiteral("LoginTime")) - { - const qulonglong &LoginTime = qvariant_cast(value); - if (d_ptr->LoginTime != LoginTime) - { - d_ptr->LoginTime = LoginTime; - Q_EMIT LoginTimeChanged(d_ptr->LoginTime); - } - return; - } - - if (propName == QStringLiteral("LongDateFormat")) - { - const int &LongDateFormat = qvariant_cast(value); - if (d_ptr->LongDateFormat != LongDateFormat) - { - d_ptr->LongDateFormat = LongDateFormat; - Q_EMIT LongDateFormatChanged(d_ptr->LongDateFormat); - } - return; - } - - if (propName == QStringLiteral("LongTimeFormat")) - { - const int &LongTimeFormat = qvariant_cast(value); - if (d_ptr->LongTimeFormat != LongTimeFormat) - { - d_ptr->LongTimeFormat = LongTimeFormat; - Q_EMIT LongTimeFormatChanged(d_ptr->LongTimeFormat); - } - return; - } - - if (propName == QStringLiteral("MaxPasswordAge")) - { - const int &MaxPasswordAge = qvariant_cast(value); - if (d_ptr->MaxPasswordAge != MaxPasswordAge) - { - d_ptr->MaxPasswordAge = MaxPasswordAge; - Q_EMIT MaxPasswordAgeChanged(d_ptr->MaxPasswordAge); - } - return; - } - - if (propName == QStringLiteral("NoPasswdLogin")) - { - const bool &NoPasswdLogin = qvariant_cast(value); - if (d_ptr->NoPasswdLogin != NoPasswdLogin) - { - d_ptr->NoPasswdLogin = NoPasswdLogin; - Q_EMIT NoPasswdLoginChanged(d_ptr->NoPasswdLogin); - } - return; - } - - if (propName == QStringLiteral("PasswordHint")) - { - const QString &PasswordHint = qvariant_cast(value); - if (d_ptr->PasswordHint != PasswordHint) - { - d_ptr->PasswordHint = PasswordHint; - Q_EMIT PasswordHintChanged(d_ptr->PasswordHint); - } - return; - } - - if (propName == QStringLiteral("PasswordLastChange")) - { - const int &PasswordLastChange = qvariant_cast(value); - if (d_ptr->PasswordLastChange != PasswordLastChange) - { - d_ptr->PasswordLastChange = PasswordLastChange; - Q_EMIT PasswordLastChangeChanged(d_ptr->PasswordLastChange); - } - return; - } - - if (propName == QStringLiteral("PasswordStatus")) - { - const QString &PasswordStatus = qvariant_cast(value); - if (d_ptr->PasswordStatus != PasswordStatus) - { - d_ptr->PasswordStatus = PasswordStatus; - Q_EMIT PasswordStatusChanged(d_ptr->PasswordStatus); - } - return; - } - - if (propName == QStringLiteral("Shell")) - { - const QString &Shell = qvariant_cast(value); - if (d_ptr->Shell != Shell) - { - d_ptr->Shell = Shell; - Q_EMIT ShellChanged(d_ptr->Shell); - } - return; - } - - if (propName == QStringLiteral("ShortDateFormat")) - { - const int &ShortDateFormat = qvariant_cast(value); - if (d_ptr->ShortDateFormat != ShortDateFormat) - { - d_ptr->ShortDateFormat = ShortDateFormat; - Q_EMIT ShortDateFormatChanged(d_ptr->ShortDateFormat); - } - return; - } - - if (propName == QStringLiteral("ShortTimeFormat")) - { - const int &ShortTimeFormat = qvariant_cast(value); - if (d_ptr->ShortTimeFormat != ShortTimeFormat) - { - d_ptr->ShortTimeFormat = ShortTimeFormat; - Q_EMIT ShortTimeFormatChanged(d_ptr->ShortTimeFormat); - } - return; - } - - if (propName == QStringLiteral("SystemAccount")) - { - const bool &SystemAccount = qvariant_cast(value); - if (d_ptr->SystemAccount != SystemAccount) - { - d_ptr->SystemAccount = SystemAccount; - Q_EMIT SystemAccountChanged(d_ptr->SystemAccount); - } - return; - } - - if (propName == QStringLiteral("Uid")) - { - const QString &Uid = qvariant_cast(value); - if (d_ptr->Uid != Uid) - { - d_ptr->Uid = Uid; - Q_EMIT UidChanged(d_ptr->Uid); - } - return; - } - - if (propName == QStringLiteral("Use24HourFormat")) - { - const bool &Use24HourFormat = qvariant_cast(value); - if (d_ptr->Use24HourFormat != Use24HourFormat) - { - d_ptr->Use24HourFormat = Use24HourFormat; - Q_EMIT Use24HourFormatChanged(d_ptr->Use24HourFormat); - } - return; - } - - if (propName == QStringLiteral("UserName")) - { - const QString &UserName = qvariant_cast(value); - if (d_ptr->UserName != UserName) - { - d_ptr->UserName = UserName; - Q_EMIT UserNameChanged(d_ptr->UserName); - } - return; - } - - if (propName == QStringLiteral("WeekBegins")) - { - const int &WeekBegins = qvariant_cast(value); - if (d_ptr->WeekBegins != WeekBegins) - { - d_ptr->WeekBegins = WeekBegins; - Q_EMIT WeekBeginsChanged(d_ptr->WeekBegins); - } - return; - } - - if (propName == QStringLiteral("WeekdayFormat")) - { - const int &WeekdayFormat = qvariant_cast(value); - if (d_ptr->WeekdayFormat != WeekdayFormat) - { - d_ptr->WeekdayFormat = WeekdayFormat; - Q_EMIT WeekdayFormatChanged(d_ptr->WeekdayFormat); - } - return; - } - - if (propName == QStringLiteral("XSession")) - { - const QString &XSession = qvariant_cast(value); - if (d_ptr->XSession != XSession) - { - d_ptr->XSession = XSession; - Q_EMIT XSessionChanged(d_ptr->XSession); - } - return; - } - - qWarning() << "property not handle: " << propName; - return; -} - -int __OrgDeepinDdeAccounts1UserInterface::accountType() -{ - return qvariant_cast(internalPropGet("AccountType", &d_ptr->AccountType)); -} - -bool __OrgDeepinDdeAccounts1UserInterface::automaticLogin() -{ - return qvariant_cast(internalPropGet("AutomaticLogin", &d_ptr->AutomaticLogin)); -} - -qulonglong __OrgDeepinDdeAccounts1UserInterface::createdTime() -{ - return qvariant_cast(internalPropGet("CreatedTime", &d_ptr->CreatedTime)); -} - -QStringList __OrgDeepinDdeAccounts1UserInterface::desktopBackgrounds() -{ - return qvariant_cast(internalPropGet("DesktopBackgrounds", &d_ptr->DesktopBackgrounds)); -} - -QString __OrgDeepinDdeAccounts1UserInterface::fullName() -{ - return qvariant_cast(internalPropGet("FullName", &d_ptr->FullName)); -} - -QString __OrgDeepinDdeAccounts1UserInterface::gid() -{ - return qvariant_cast(internalPropGet("Gid", &d_ptr->Gid)); -} - -QString __OrgDeepinDdeAccounts1UserInterface::greeterBackground() -{ - return qvariant_cast(internalPropGet("GreeterBackground", &d_ptr->GreeterBackground)); -} - -QStringList __OrgDeepinDdeAccounts1UserInterface::groups() -{ - return qvariant_cast(internalPropGet("Groups", &d_ptr->Groups)); -} - -QStringList __OrgDeepinDdeAccounts1UserInterface::historyLayout() -{ - return qvariant_cast(internalPropGet("HistoryLayout", &d_ptr->HistoryLayout)); -} - -QString __OrgDeepinDdeAccounts1UserInterface::homeDir() -{ - return qvariant_cast(internalPropGet("HomeDir", &d_ptr->HomeDir)); -} - -QString __OrgDeepinDdeAccounts1UserInterface::iconFile() -{ - return qvariant_cast(internalPropGet("IconFile", &d_ptr->IconFile)); -} - -QStringList __OrgDeepinDdeAccounts1UserInterface::iconList() -{ - return qvariant_cast(internalPropGet("IconList", &d_ptr->IconList)); -} - -QString __OrgDeepinDdeAccounts1UserInterface::layout() -{ - return qvariant_cast(internalPropGet("Layout", &d_ptr->Layout)); -} - -QString __OrgDeepinDdeAccounts1UserInterface::locale() -{ - return qvariant_cast(internalPropGet("Locale", &d_ptr->Locale)); -} - -bool __OrgDeepinDdeAccounts1UserInterface::locked() -{ - return qvariant_cast(internalPropGet("Locked", &d_ptr->Locked)); -} - -qulonglong __OrgDeepinDdeAccounts1UserInterface::loginTime() -{ - return qvariant_cast(internalPropGet("LoginTime", &d_ptr->LoginTime)); -} - -int __OrgDeepinDdeAccounts1UserInterface::longDateFormat() -{ - return qvariant_cast(internalPropGet("LongDateFormat", &d_ptr->LongDateFormat)); -} - -int __OrgDeepinDdeAccounts1UserInterface::longTimeFormat() -{ - return qvariant_cast(internalPropGet("LongTimeFormat", &d_ptr->LongTimeFormat)); -} - -int __OrgDeepinDdeAccounts1UserInterface::maxPasswordAge() -{ - return qvariant_cast(internalPropGet("MaxPasswordAge", &d_ptr->MaxPasswordAge)); -} - -bool __OrgDeepinDdeAccounts1UserInterface::noPasswdLogin() -{ - return qvariant_cast(internalPropGet("NoPasswdLogin", &d_ptr->NoPasswdLogin)); -} - -QString __OrgDeepinDdeAccounts1UserInterface::passwordHint() -{ - return qvariant_cast(internalPropGet("PasswordHint", &d_ptr->PasswordHint)); -} - -int __OrgDeepinDdeAccounts1UserInterface::passwordLastChange() -{ - return qvariant_cast(internalPropGet("PasswordLastChange", &d_ptr->PasswordLastChange)); -} - -QString __OrgDeepinDdeAccounts1UserInterface::passwordStatus() -{ - return qvariant_cast(internalPropGet("PasswordStatus", &d_ptr->PasswordStatus)); -} - -QString __OrgDeepinDdeAccounts1UserInterface::shell() -{ - return qvariant_cast(internalPropGet("Shell", &d_ptr->Shell)); -} - -int __OrgDeepinDdeAccounts1UserInterface::shortDateFormat() -{ - return qvariant_cast(internalPropGet("ShortDateFormat", &d_ptr->ShortDateFormat)); -} - -int __OrgDeepinDdeAccounts1UserInterface::shortTimeFormat() -{ - return qvariant_cast(internalPropGet("ShortTimeFormat", &d_ptr->ShortTimeFormat)); -} - -bool __OrgDeepinDdeAccounts1UserInterface::systemAccount() -{ - return qvariant_cast(internalPropGet("SystemAccount", &d_ptr->SystemAccount)); -} - -QString __OrgDeepinDdeAccounts1UserInterface::uid() -{ - return qvariant_cast(internalPropGet("Uid", &d_ptr->Uid)); -} - -bool __OrgDeepinDdeAccounts1UserInterface::use24HourFormat() -{ - return qvariant_cast(internalPropGet("Use24HourFormat", &d_ptr->Use24HourFormat)); -} - -QString __OrgDeepinDdeAccounts1UserInterface::userName() -{ - return qvariant_cast(internalPropGet("UserName", &d_ptr->UserName)); -} - -int __OrgDeepinDdeAccounts1UserInterface::weekBegins() -{ - return qvariant_cast(internalPropGet("WeekBegins", &d_ptr->WeekBegins)); -} - -int __OrgDeepinDdeAccounts1UserInterface::weekdayFormat() -{ - return qvariant_cast(internalPropGet("WeekdayFormat", &d_ptr->WeekdayFormat)); -} - -QString __OrgDeepinDdeAccounts1UserInterface::xSession() -{ - return qvariant_cast(internalPropGet("XSession", &d_ptr->XSession)); -} - -void __OrgDeepinDdeAccounts1UserInterface::CallQueued(const QString &callName, const QList &args) -{ - if (d_ptr->m_waittingCalls.contains(callName)) - { - d_ptr->m_waittingCalls[callName] = args; - return; - } - if (d_ptr->m_processingCalls.contains(callName)) - { - d_ptr->m_waittingCalls.insert(callName, args); - } else { - QDBusPendingCallWatcher *watcher = new QDBusPendingCallWatcher(asyncCallWithArgumentList(callName, args)); - connect(watcher, &QDBusPendingCallWatcher::finished, this, &__OrgDeepinDdeAccounts1UserInterface::onPendingCallFinished); - d_ptr->m_processingCalls.insert(callName, watcher); - } -} - -void __OrgDeepinDdeAccounts1UserInterface::onPendingCallFinished(QDBusPendingCallWatcher *w) -{ - w->deleteLater(); - const auto callName = d_ptr->m_processingCalls.key(w); - Q_ASSERT(!callName.isEmpty()); - if (callName.isEmpty()) - return; - d_ptr->m_processingCalls.remove(callName); - if (!d_ptr->m_waittingCalls.contains(callName)) - return; - const auto args = d_ptr->m_waittingCalls.take(callName); - CallQueued(callName, args); -} diff --git a/src/global_util/dbus/userinterface.h b/src/global_util/dbus/userinterface.h deleted file mode 100644 index 65ce257f2..000000000 --- a/src/global_util/dbus/userinterface.h +++ /dev/null @@ -1,529 +0,0 @@ -/* - * This file was generated by qdbusxml2cpp-fix version 0.8 - * Command line was: qdbusxml2cpp-fix -p /home/zyz/works/work/v25/dde-session-shell-snipe/src/global_util/dbus/userinterface /home/zyz/works/work/v25/dde-session-shell-snipe/xml/snipe/org.deepin.dde.Accounts1.User.xml - * - * qdbusxml2cpp-fix is Copyright (C) 2016 Deepin Technology Co., Ltd. - * - * This is an auto-generated file. - * Do not edit! All changes made to it will be lost. - */ - -#ifndef USERINTERFACE_H -#define USERINTERFACE_H - -#include -#include -#include -#include -#include -#include -#include - -#include -#include - - -/* - * Proxy class for interface org.deepin.dde.Accounts1.User - */ -class __OrgDeepinDdeAccounts1UserInterfacePrivate; -class __OrgDeepinDdeAccounts1UserInterface : public DTK_CORE_NAMESPACE::DDBusExtendedAbstractInterface -{ - Q_OBJECT - -public: - static inline const char *staticInterfaceName() - { return "org.deepin.dde.Accounts1.User"; } - -public: - explicit __OrgDeepinDdeAccounts1UserInterface(const QString &service, const QString &path, const QDBusConnection &connection, QObject *parent = 0); - - ~__OrgDeepinDdeAccounts1UserInterface(); - - Q_PROPERTY(int AccountType READ accountType NOTIFY AccountTypeChanged) - int accountType(); - - Q_PROPERTY(bool AutomaticLogin READ automaticLogin NOTIFY AutomaticLoginChanged) - bool automaticLogin(); - - Q_PROPERTY(qulonglong CreatedTime READ createdTime NOTIFY CreatedTimeChanged) - qulonglong createdTime(); - - Q_PROPERTY(QStringList DesktopBackgrounds READ desktopBackgrounds NOTIFY DesktopBackgroundsChanged) - QStringList desktopBackgrounds(); - - Q_PROPERTY(QString FullName READ fullName NOTIFY FullNameChanged) - QString fullName(); - - Q_PROPERTY(QString Gid READ gid NOTIFY GidChanged) - QString gid(); - - Q_PROPERTY(QString GreeterBackground READ greeterBackground NOTIFY GreeterBackgroundChanged) - QString greeterBackground(); - - Q_PROPERTY(QStringList Groups READ groups NOTIFY GroupsChanged) - QStringList groups(); - - Q_PROPERTY(QStringList HistoryLayout READ historyLayout NOTIFY HistoryLayoutChanged) - QStringList historyLayout(); - - Q_PROPERTY(QString HomeDir READ homeDir NOTIFY HomeDirChanged) - QString homeDir(); - - Q_PROPERTY(QString IconFile READ iconFile NOTIFY IconFileChanged) - QString iconFile(); - - Q_PROPERTY(QStringList IconList READ iconList NOTIFY IconListChanged) - QStringList iconList(); - - Q_PROPERTY(QString Layout READ layout NOTIFY LayoutChanged) - QString layout(); - - Q_PROPERTY(QString Locale READ locale NOTIFY LocaleChanged) - QString locale(); - - Q_PROPERTY(bool Locked READ locked NOTIFY LockedChanged) - bool locked(); - - Q_PROPERTY(qulonglong LoginTime READ loginTime NOTIFY LoginTimeChanged) - qulonglong loginTime(); - - Q_PROPERTY(int LongDateFormat READ longDateFormat NOTIFY LongDateFormatChanged) - int longDateFormat(); - - Q_PROPERTY(int LongTimeFormat READ longTimeFormat NOTIFY LongTimeFormatChanged) - int longTimeFormat(); - - Q_PROPERTY(int MaxPasswordAge READ maxPasswordAge NOTIFY MaxPasswordAgeChanged) - int maxPasswordAge(); - - Q_PROPERTY(bool NoPasswdLogin READ noPasswdLogin NOTIFY NoPasswdLoginChanged) - bool noPasswdLogin(); - - Q_PROPERTY(QString PasswordHint READ passwordHint NOTIFY PasswordHintChanged) - QString passwordHint(); - - Q_PROPERTY(int PasswordLastChange READ passwordLastChange NOTIFY PasswordLastChangeChanged) - int passwordLastChange(); - - Q_PROPERTY(QString PasswordStatus READ passwordStatus NOTIFY PasswordStatusChanged) - QString passwordStatus(); - - Q_PROPERTY(QString Shell READ shell NOTIFY ShellChanged) - QString shell(); - - Q_PROPERTY(int ShortDateFormat READ shortDateFormat NOTIFY ShortDateFormatChanged) - int shortDateFormat(); - - Q_PROPERTY(int ShortTimeFormat READ shortTimeFormat NOTIFY ShortTimeFormatChanged) - int shortTimeFormat(); - - Q_PROPERTY(bool SystemAccount READ systemAccount NOTIFY SystemAccountChanged) - bool systemAccount(); - - Q_PROPERTY(QString Uid READ uid NOTIFY UidChanged) - QString uid(); - - Q_PROPERTY(bool Use24HourFormat READ use24HourFormat NOTIFY Use24HourFormatChanged) - bool use24HourFormat(); - - Q_PROPERTY(QString UserName READ userName NOTIFY UserNameChanged) - QString userName(); - - Q_PROPERTY(int WeekBegins READ weekBegins NOTIFY WeekBeginsChanged) - int weekBegins(); - - Q_PROPERTY(int WeekdayFormat READ weekdayFormat NOTIFY WeekdayFormatChanged) - int weekdayFormat(); - - Q_PROPERTY(QString XSession READ xSession NOTIFY XSessionChanged) - QString xSession(); - -public Q_SLOTS: // METHODS - inline QDBusPendingReply<> AddGroup(const QString &group) - { - QList argumentList; - argumentList << QVariant::fromValue(group); - return asyncCallWithArgumentList(QStringLiteral("AddGroup"), argumentList); - } - - inline void AddGroupQueued(const QString &group) - { - QList argumentList; - argumentList << QVariant::fromValue(group); - - CallQueued(QStringLiteral("AddGroup"), argumentList); - } - - - inline QDBusPendingReply<> DeleteGroup(const QString &group) - { - QList argumentList; - argumentList << QVariant::fromValue(group); - return asyncCallWithArgumentList(QStringLiteral("DeleteGroup"), argumentList); - } - - inline void DeleteGroupQueued(const QString &group) - { - QList argumentList; - argumentList << QVariant::fromValue(group); - - CallQueued(QStringLiteral("DeleteGroup"), argumentList); - } - - - inline QDBusPendingReply<> DeleteIconFile(const QString &iconFile) - { - QList argumentList; - argumentList << QVariant::fromValue(iconFile); - return asyncCallWithArgumentList(QStringLiteral("DeleteIconFile"), argumentList); - } - - inline void DeleteIconFileQueued(const QString &iconFile) - { - QList argumentList; - argumentList << QVariant::fromValue(iconFile); - - CallQueued(QStringLiteral("DeleteIconFile"), argumentList); - } - - - inline QDBusPendingReply<> EnableNoPasswdLogin(bool enabled) - { - QList argumentList; - argumentList << QVariant::fromValue(enabled); - return asyncCallWithArgumentList(QStringLiteral("EnableNoPasswdLogin"), argumentList); - } - - inline void EnableNoPasswdLoginQueued(bool enabled) - { - QList argumentList; - argumentList << QVariant::fromValue(enabled); - - CallQueued(QStringLiteral("EnableNoPasswdLogin"), argumentList); - } - - - inline QDBusPendingReply IsPasswordExpired() - { - QList argumentList; - return asyncCallWithArgumentList(QStringLiteral("IsPasswordExpired"), argumentList); - } - - - - inline QDBusPendingReply PasswordExpiredInfo() - { - QList argumentList; - return asyncCallWithArgumentList(QStringLiteral("PasswordExpiredInfo"), argumentList); - } - - - inline QDBusReply PasswordExpiredInfo(int &dayLeft) - { - QList argumentList; - QDBusMessage reply = callWithArgumentList(QDBus::Block, QStringLiteral("PasswordExpiredInfo"), argumentList); - if (reply.type() == QDBusMessage::ReplyMessage && reply.arguments().count() == 2) { - dayLeft = qdbus_cast(reply.arguments().at(1)); - } - return reply; - } - - inline QDBusPendingReply<> SetAutomaticLogin(bool enabled) - { - QList argumentList; - argumentList << QVariant::fromValue(enabled); - return asyncCallWithArgumentList(QStringLiteral("SetAutomaticLogin"), argumentList); - } - - inline void SetAutomaticLoginQueued(bool enabled) - { - QList argumentList; - argumentList << QVariant::fromValue(enabled); - - CallQueued(QStringLiteral("SetAutomaticLogin"), argumentList); - } - - - inline QDBusPendingReply<> SetDesktopBackgrounds(const QStringList &backgrounds) - { - QList argumentList; - argumentList << QVariant::fromValue(backgrounds); - return asyncCallWithArgumentList(QStringLiteral("SetDesktopBackgrounds"), argumentList); - } - - inline void SetDesktopBackgroundsQueued(const QStringList &backgrounds) - { - QList argumentList; - argumentList << QVariant::fromValue(backgrounds); - - CallQueued(QStringLiteral("SetDesktopBackgrounds"), argumentList); - } - - - inline QDBusPendingReply<> SetFullName(const QString &name) - { - QList argumentList; - argumentList << QVariant::fromValue(name); - return asyncCallWithArgumentList(QStringLiteral("SetFullName"), argumentList); - } - - inline void SetFullNameQueued(const QString &name) - { - QList argumentList; - argumentList << QVariant::fromValue(name); - - CallQueued(QStringLiteral("SetFullName"), argumentList); - } - - - inline QDBusPendingReply<> SetGreeterBackground(const QString &background) - { - QList argumentList; - argumentList << QVariant::fromValue(background); - return asyncCallWithArgumentList(QStringLiteral("SetGreeterBackground"), argumentList); - } - - inline void SetGreeterBackgroundQueued(const QString &background) - { - QList argumentList; - argumentList << QVariant::fromValue(background); - - CallQueued(QStringLiteral("SetGreeterBackground"), argumentList); - } - - - inline QDBusPendingReply<> SetGroups(const QStringList &groups) - { - QList argumentList; - argumentList << QVariant::fromValue(groups); - return asyncCallWithArgumentList(QStringLiteral("SetGroups"), argumentList); - } - - inline void SetGroupsQueued(const QStringList &groups) - { - QList argumentList; - argumentList << QVariant::fromValue(groups); - - CallQueued(QStringLiteral("SetGroups"), argumentList); - } - - - inline QDBusPendingReply<> SetHistoryLayout(const QStringList &layouts) - { - QList argumentList; - argumentList << QVariant::fromValue(layouts); - return asyncCallWithArgumentList(QStringLiteral("SetHistoryLayout"), argumentList); - } - - inline void SetHistoryLayoutQueued(const QStringList &layouts) - { - QList argumentList; - argumentList << QVariant::fromValue(layouts); - - CallQueued(QStringLiteral("SetHistoryLayout"), argumentList); - } - - - inline QDBusPendingReply<> SetHomeDir(const QString &home) - { - QList argumentList; - argumentList << QVariant::fromValue(home); - return asyncCallWithArgumentList(QStringLiteral("SetHomeDir"), argumentList); - } - - inline void SetHomeDirQueued(const QString &home) - { - QList argumentList; - argumentList << QVariant::fromValue(home); - - CallQueued(QStringLiteral("SetHomeDir"), argumentList); - } - - - inline QDBusPendingReply<> SetIconFile(const QString &iconFile) - { - QList argumentList; - argumentList << QVariant::fromValue(iconFile); - return asyncCallWithArgumentList(QStringLiteral("SetIconFile"), argumentList); - } - - inline void SetIconFileQueued(const QString &iconFile) - { - QList argumentList; - argumentList << QVariant::fromValue(iconFile); - - CallQueued(QStringLiteral("SetIconFile"), argumentList); - } - - - inline QDBusPendingReply<> SetLayout(const QString &layout) - { - QList argumentList; - argumentList << QVariant::fromValue(layout); - return asyncCallWithArgumentList(QStringLiteral("SetLayout"), argumentList); - } - - inline void SetLayoutQueued(const QString &layout) - { - QList argumentList; - argumentList << QVariant::fromValue(layout); - - CallQueued(QStringLiteral("SetLayout"), argumentList); - } - - - inline QDBusPendingReply<> SetLocale(const QString &locale) - { - QList argumentList; - argumentList << QVariant::fromValue(locale); - return asyncCallWithArgumentList(QStringLiteral("SetLocale"), argumentList); - } - - inline void SetLocaleQueued(const QString &locale) - { - QList argumentList; - argumentList << QVariant::fromValue(locale); - - CallQueued(QStringLiteral("SetLocale"), argumentList); - } - - - inline QDBusPendingReply<> SetLocked(bool locked) - { - QList argumentList; - argumentList << QVariant::fromValue(locked); - return asyncCallWithArgumentList(QStringLiteral("SetLocked"), argumentList); - } - - inline void SetLockedQueued(bool locked) - { - QList argumentList; - argumentList << QVariant::fromValue(locked); - - CallQueued(QStringLiteral("SetLocked"), argumentList); - } - - - inline QDBusPendingReply<> SetMaxPasswordAge(int nDays) - { - QList argumentList; - argumentList << QVariant::fromValue(nDays); - return asyncCallWithArgumentList(QStringLiteral("SetMaxPasswordAge"), argumentList); - } - - inline void SetMaxPasswordAgeQueued(int nDays) - { - QList argumentList; - argumentList << QVariant::fromValue(nDays); - - CallQueued(QStringLiteral("SetMaxPasswordAge"), argumentList); - } - - - inline QDBusPendingReply<> SetPassword(const QString &password) - { - QList argumentList; - argumentList << QVariant::fromValue(password); - return asyncCallWithArgumentList(QStringLiteral("SetPassword"), argumentList); - } - - inline void SetPasswordQueued(const QString &password) - { - QList argumentList; - argumentList << QVariant::fromValue(password); - - CallQueued(QStringLiteral("SetPassword"), argumentList); - } - - - inline QDBusPendingReply<> SetPasswordHint(const QString &hint) - { - QList argumentList; - argumentList << QVariant::fromValue(hint); - return asyncCallWithArgumentList(QStringLiteral("SetPasswordHint"), argumentList); - } - - inline void SetPasswordHintQueued(const QString &hint) - { - QList argumentList; - argumentList << QVariant::fromValue(hint); - - CallQueued(QStringLiteral("SetPasswordHint"), argumentList); - } - - - inline QDBusPendingReply<> SetShell(const QString &shell) - { - QList argumentList; - argumentList << QVariant::fromValue(shell); - return asyncCallWithArgumentList(QStringLiteral("SetShell"), argumentList); - } - - inline void SetShellQueued(const QString &shell) - { - QList argumentList; - argumentList << QVariant::fromValue(shell); - - CallQueued(QStringLiteral("SetShell"), argumentList); - } - - - -Q_SIGNALS: // SIGNALS - // begin property changed signals - void AccountTypeChanged(int value) const; - void AutomaticLoginChanged(bool value) const; - void CreatedTimeChanged(qulonglong value) const; - void DesktopBackgroundsChanged(const QStringList & value) const; - void FullNameChanged(const QString & value) const; - void GidChanged(const QString & value) const; - void GreeterBackgroundChanged(const QString & value) const; - void GroupsChanged(const QStringList & value) const; - void HistoryLayoutChanged(const QStringList & value) const; - void HomeDirChanged(const QString & value) const; - void IconFileChanged(const QString & value) const; - void IconListChanged(const QStringList & value) const; - void LayoutChanged(const QString & value) const; - void LocaleChanged(const QString & value) const; - void LockedChanged(bool value) const; - void LoginTimeChanged(qulonglong value) const; - void LongDateFormatChanged(int value) const; - void LongTimeFormatChanged(int value) const; - void MaxPasswordAgeChanged(int value) const; - void NoPasswdLoginChanged(bool value) const; - void PasswordHintChanged(const QString & value) const; - void PasswordLastChangeChanged(int value) const; - void PasswordStatusChanged(const QString & value) const; - void ShellChanged(const QString & value) const; - void ShortDateFormatChanged(int value) const; - void ShortTimeFormatChanged(int value) const; - void SystemAccountChanged(bool value) const; - void UidChanged(const QString & value) const; - void Use24HourFormatChanged(bool value) const; - void UserNameChanged(const QString & value) const; - void WeekBeginsChanged(int value) const; - void WeekdayFormatChanged(int value) const; - void XSessionChanged(const QString & value) const; - -public Q_SLOTS: - void CallQueued(const QString &callName, const QList &args); - -private Q_SLOTS: - void onPendingCallFinished(QDBusPendingCallWatcher *w); - void onPropertyChanged(const QString &propName, const QVariant &value); - -private: - __OrgDeepinDdeAccounts1UserInterfacePrivate *d_ptr; -}; - -namespace org { - namespace deepin { - namespace dde { - namespace accounts1 { - typedef ::__OrgDeepinDdeAccounts1UserInterface User; - } - } - } -} -#endif diff --git a/src/global_util/dbus/wminterface.cpp b/src/global_util/dbus/wminterface.cpp deleted file mode 100644 index 871a05039..000000000 --- a/src/global_util/dbus/wminterface.cpp +++ /dev/null @@ -1,210 +0,0 @@ -/* - * This file was generated by qdbusxml2cpp-fix version 0.8 - * Command line was: qdbusxml2cpp-fix -p /home/zyz/works/work/v25/dde-session-shell-snipe/src/global_util/dbus/wminterface /home/zyz/works/work/v25/dde-session-shell-snipe/xml/snipe/com.deepin.wm.xml - * - * qdbusxml2cpp-fix is Copyright (C) 2016 Deepin Technology Co., Ltd. - * - * This is an auto-generated file. - * This file may have been hand-edited. Look for HAND-EDIT comments - * before re-generating it. - */ - -#include "/home/zyz/works/work/v25/dde-session-shell-snipe/src/global_util/dbus/wminterface.h" - -DCORE_USE_NAMESPACE -/* - * Implementation of interface class __ComDeepinWmInterface - */ - -class __ComDeepinWmInterfacePrivate -{ -public: - __ComDeepinWmInterfacePrivate() = default; - - // begin member variables - bool compositingAllowSwitch; - bool compositingEnabled; - bool compositingPossible; - int cursorSize; - QString cursorTheme; - bool zoneEnabled; - -public: - QMap m_processingCalls; - QMap> m_waittingCalls; -}; - -__ComDeepinWmInterface::__ComDeepinWmInterface(const QString &service, const QString &path, const QDBusConnection &connection, QObject *parent) - : DDBusExtendedAbstractInterface(service, path, staticInterfaceName(), connection, parent) - , d_ptr(new __ComDeepinWmInterfacePrivate) -{ - connect(this, &__ComDeepinWmInterface::propertyChanged, this, &__ComDeepinWmInterface::onPropertyChanged); - - if (QMetaType::fromName("QList").id() == QMetaType::UnknownType) { - qRegisterMetaType< QList >("QList"); - qDBusRegisterMetaType< QList >(); - } -} - -__ComDeepinWmInterface::~__ComDeepinWmInterface() -{ - qDeleteAll(d_ptr->m_processingCalls.values()); - delete d_ptr; -} - -void __ComDeepinWmInterface::onPropertyChanged(const QString &propName, const QVariant &value) -{ - if (propName == QStringLiteral("compositingAllowSwitch")) - { - const bool &compositingAllowSwitch = qvariant_cast(value); - if (d_ptr->compositingAllowSwitch != compositingAllowSwitch) - { - d_ptr->compositingAllowSwitch = compositingAllowSwitch; - Q_EMIT CompositingAllowSwitchChanged(d_ptr->compositingAllowSwitch); - } - return; - } - - if (propName == QStringLiteral("compositingEnabled")) - { - const bool &compositingEnabled = qvariant_cast(value); - if (d_ptr->compositingEnabled != compositingEnabled) - { - d_ptr->compositingEnabled = compositingEnabled; - Q_EMIT CompositingEnabledChanged(d_ptr->compositingEnabled); - } - return; - } - - if (propName == QStringLiteral("compositingPossible")) - { - const bool &compositingPossible = qvariant_cast(value); - if (d_ptr->compositingPossible != compositingPossible) - { - d_ptr->compositingPossible = compositingPossible; - Q_EMIT CompositingPossibleChanged(d_ptr->compositingPossible); - } - return; - } - - if (propName == QStringLiteral("cursorSize")) - { - const int &cursorSize = qvariant_cast(value); - if (d_ptr->cursorSize != cursorSize) - { - d_ptr->cursorSize = cursorSize; - Q_EMIT CursorSizeChanged(d_ptr->cursorSize); - } - return; - } - - if (propName == QStringLiteral("cursorTheme")) - { - const QString &cursorTheme = qvariant_cast(value); - if (d_ptr->cursorTheme != cursorTheme) - { - d_ptr->cursorTheme = cursorTheme; - Q_EMIT CursorThemeChanged(d_ptr->cursorTheme); - } - return; - } - - if (propName == QStringLiteral("zoneEnabled")) - { - const bool &zoneEnabled = qvariant_cast(value); - if (d_ptr->zoneEnabled != zoneEnabled) - { - d_ptr->zoneEnabled = zoneEnabled; - Q_EMIT ZoneEnabledChanged(d_ptr->zoneEnabled); - } - return; - } - - qWarning() << "property not handle: " << propName; - return; -} - -bool __ComDeepinWmInterface::compositingAllowSwitch() -{ - return qvariant_cast(internalPropGet("compositingAllowSwitch", &d_ptr->compositingAllowSwitch)); -} - -bool __ComDeepinWmInterface::compositingEnabled() -{ - return qvariant_cast(internalPropGet("compositingEnabled", &d_ptr->compositingEnabled)); -} - -void __ComDeepinWmInterface::setCompositingEnabled(bool value) -{ - - internalPropSet("compositingEnabled", QVariant::fromValue(value), &d_ptr->compositingEnabled); -} - -bool __ComDeepinWmInterface::compositingPossible() -{ - return qvariant_cast(internalPropGet("compositingPossible", &d_ptr->compositingPossible)); -} - -int __ComDeepinWmInterface::cursorSize() -{ - return qvariant_cast(internalPropGet("cursorSize", &d_ptr->cursorSize)); -} - -void __ComDeepinWmInterface::setCursorSize(int value) -{ - - internalPropSet("cursorSize", QVariant::fromValue(value), &d_ptr->cursorSize); -} - -QString __ComDeepinWmInterface::cursorTheme() -{ - return qvariant_cast(internalPropGet("cursorTheme", &d_ptr->cursorTheme)); -} - -void __ComDeepinWmInterface::setCursorTheme(const QString &value) -{ - - internalPropSet("cursorTheme", QVariant::fromValue(value), &d_ptr->cursorTheme); -} - -bool __ComDeepinWmInterface::zoneEnabled() -{ - return qvariant_cast(internalPropGet("zoneEnabled", &d_ptr->zoneEnabled)); -} - -void __ComDeepinWmInterface::setZoneEnabled(bool value) -{ - - internalPropSet("zoneEnabled", QVariant::fromValue(value), &d_ptr->zoneEnabled); -} - -void __ComDeepinWmInterface::CallQueued(const QString &callName, const QList &args) -{ - if (d_ptr->m_waittingCalls.contains(callName)) - { - d_ptr->m_waittingCalls[callName] = args; - return; - } - if (d_ptr->m_processingCalls.contains(callName)) - { - d_ptr->m_waittingCalls.insert(callName, args); - } else { - QDBusPendingCallWatcher *watcher = new QDBusPendingCallWatcher(asyncCallWithArgumentList(callName, args)); - connect(watcher, &QDBusPendingCallWatcher::finished, this, &__ComDeepinWmInterface::onPendingCallFinished); - d_ptr->m_processingCalls.insert(callName, watcher); - } -} - -void __ComDeepinWmInterface::onPendingCallFinished(QDBusPendingCallWatcher *w) -{ - w->deleteLater(); - const auto callName = d_ptr->m_processingCalls.key(w); - Q_ASSERT(!callName.isEmpty()); - if (callName.isEmpty()) - return; - d_ptr->m_processingCalls.remove(callName); - if (!d_ptr->m_waittingCalls.contains(callName)) - return; - const auto args = d_ptr->m_waittingCalls.take(callName); - CallQueued(callName, args); -} diff --git a/src/global_util/dbus/wminterface.h b/src/global_util/dbus/wminterface.h deleted file mode 100644 index b4a660293..000000000 --- a/src/global_util/dbus/wminterface.h +++ /dev/null @@ -1,708 +0,0 @@ -/* - * This file was generated by qdbusxml2cpp-fix version 0.8 - * Command line was: qdbusxml2cpp-fix -p /home/zyz/works/work/v25/dde-session-shell-snipe/src/global_util/dbus/wminterface /home/zyz/works/work/v25/dde-session-shell-snipe/xml/snipe/com.deepin.wm.xml - * - * qdbusxml2cpp-fix is Copyright (C) 2016 Deepin Technology Co., Ltd. - * - * This is an auto-generated file. - * Do not edit! All changes made to it will be lost. - */ - -#ifndef WMINTERFACE_H -#define WMINTERFACE_H - -#include -#include -#include -#include -#include -#include -#include - -#include -#include - - -/* - * Proxy class for interface com.deepin.wm - */ -class __ComDeepinWmInterfacePrivate; -class __ComDeepinWmInterface : public DTK_CORE_NAMESPACE::DDBusExtendedAbstractInterface -{ - Q_OBJECT - -public: - static inline const char *staticInterfaceName() - { return "com.deepin.wm"; } - -public: - explicit __ComDeepinWmInterface(const QString &service, const QString &path, const QDBusConnection &connection, QObject *parent = 0); - - ~__ComDeepinWmInterface(); - - Q_PROPERTY(bool compositingAllowSwitch READ compositingAllowSwitch NOTIFY CompositingAllowSwitchChanged) - bool compositingAllowSwitch(); - - Q_PROPERTY(bool compositingEnabled READ compositingEnabled WRITE setCompositingEnabled NOTIFY CompositingEnabledChanged) - bool compositingEnabled(); - void setCompositingEnabled(bool value); - - Q_PROPERTY(bool compositingPossible READ compositingPossible NOTIFY CompositingPossibleChanged) - bool compositingPossible(); - - Q_PROPERTY(int cursorSize READ cursorSize WRITE setCursorSize NOTIFY CursorSizeChanged) - int cursorSize(); - void setCursorSize(int value); - - Q_PROPERTY(QString cursorTheme READ cursorTheme WRITE setCursorTheme NOTIFY CursorThemeChanged) - QString cursorTheme(); - void setCursorTheme(const QString &value); - - Q_PROPERTY(bool zoneEnabled READ zoneEnabled WRITE setZoneEnabled NOTIFY ZoneEnabledChanged) - bool zoneEnabled(); - void setZoneEnabled(bool value); - -public Q_SLOTS: // METHODS - inline QDBusPendingReply<> BeginToMoveActiveWindow() - { - QList argumentList; - return asyncCallWithArgumentList(QStringLiteral("BeginToMoveActiveWindow"), argumentList); - } - - inline void BeginToMoveActiveWindowQueued() - { - QList argumentList; - - CallQueued(QStringLiteral("BeginToMoveActiveWindow"), argumentList); - } - - - inline QDBusPendingReply<> CancelPreviewWindow() - { - QList argumentList; - return asyncCallWithArgumentList(QStringLiteral("CancelPreviewWindow"), argumentList); - } - - inline void CancelPreviewWindowQueued() - { - QList argumentList; - - CallQueued(QStringLiteral("CancelPreviewWindow"), argumentList); - } - - - inline QDBusPendingReply<> ChangeCurrentWorkspaceBackground(const QString &uri) - { - QList argumentList; - argumentList << QVariant::fromValue(uri); - return asyncCallWithArgumentList(QStringLiteral("ChangeCurrentWorkspaceBackground"), argumentList); - } - - inline void ChangeCurrentWorkspaceBackgroundQueued(const QString &uri) - { - QList argumentList; - argumentList << QVariant::fromValue(uri); - - CallQueued(QStringLiteral("ChangeCurrentWorkspaceBackground"), argumentList); - } - - - inline QDBusPendingReply<> ClearMoveStatus() - { - QList argumentList; - return asyncCallWithArgumentList(QStringLiteral("ClearMoveStatus"), argumentList); - } - - inline void ClearMoveStatusQueued() - { - QList argumentList; - - CallQueued(QStringLiteral("ClearMoveStatus"), argumentList); - } - - - inline QDBusPendingReply<> EnableZoneDetected(bool enabled) - { - QList argumentList; - argumentList << QVariant::fromValue(enabled); - return asyncCallWithArgumentList(QStringLiteral("EnableZoneDetected"), argumentList); - } - - inline void EnableZoneDetectedQueued(bool enabled) - { - QList argumentList; - argumentList << QVariant::fromValue(enabled); - - CallQueued(QStringLiteral("EnableZoneDetected"), argumentList); - } - - - inline QDBusPendingReply GetAccel(const QString &id) - { - QList argumentList; - argumentList << QVariant::fromValue(id); - return asyncCallWithArgumentList(QStringLiteral("GetAccel"), argumentList); - } - - - - inline QDBusPendingReply GetAllAccels() - { - QList argumentList; - return asyncCallWithArgumentList(QStringLiteral("GetAllAccels"), argumentList); - } - - - - inline QDBusPendingReply GetCurrentDesktopStatus() - { - QList argumentList; - return asyncCallWithArgumentList(QStringLiteral("GetCurrentDesktopStatus"), argumentList); - } - - - - inline QDBusPendingReply GetCurrentWorkspace() - { - QList argumentList; - return asyncCallWithArgumentList(QStringLiteral("GetCurrentWorkspace"), argumentList); - } - - - - inline QDBusPendingReply GetCurrentWorkspaceBackground() - { - QList argumentList; - return asyncCallWithArgumentList(QStringLiteral("GetCurrentWorkspaceBackground"), argumentList); - } - - - - inline QDBusPendingReply GetCurrentWorkspaceBackgroundForMonitor(const QString &strMonitorName) - { - QList argumentList; - argumentList << QVariant::fromValue(strMonitorName); - return asyncCallWithArgumentList(QStringLiteral("GetCurrentWorkspaceBackgroundForMonitor"), argumentList); - } - - - - inline QDBusPendingReply GetDefaultAccel(const QString &id) - { - QList argumentList; - argumentList << QVariant::fromValue(id); - return asyncCallWithArgumentList(QStringLiteral("GetDefaultAccel"), argumentList); - } - - - - inline QDBusPendingReply GetIsShowDesktop() - { - QList argumentList; - return asyncCallWithArgumentList(QStringLiteral("GetIsShowDesktop"), argumentList); - } - - - - inline QDBusPendingReply GetMultiTaskingStatus() - { - QList argumentList; - return asyncCallWithArgumentList(QStringLiteral("GetMultiTaskingStatus"), argumentList); - } - - - - inline QDBusPendingReply GetTouchBorderInterval() - { - QList argumentList; - return asyncCallWithArgumentList(QStringLiteral("GetTouchBorderInterval"), argumentList); - } - - - - inline QDBusPendingReply GetWorkspaceBackground(int index) - { - QList argumentList; - argumentList << QVariant::fromValue(index); - return asyncCallWithArgumentList(QStringLiteral("GetWorkspaceBackground"), argumentList); - } - - - - inline QDBusPendingReply GetWorkspaceBackgroundForMonitor(int index, const QString &strMonitorName) - { - QList argumentList; - argumentList << QVariant::fromValue(index) << QVariant::fromValue(strMonitorName); - return asyncCallWithArgumentList(QStringLiteral("GetWorkspaceBackgroundForMonitor"), argumentList); - } - - - - inline QDBusPendingReply<> MinimizeActiveWindow() - { - QList argumentList; - return asyncCallWithArgumentList(QStringLiteral("MinimizeActiveWindow"), argumentList); - } - - inline void MinimizeActiveWindowQueued() - { - QList argumentList; - - CallQueued(QStringLiteral("MinimizeActiveWindow"), argumentList); - } - - - inline QDBusPendingReply<> NextWorkspace() - { - QList argumentList; - return asyncCallWithArgumentList(QStringLiteral("NextWorkspace"), argumentList); - } - - inline void NextWorkspaceQueued() - { - QList argumentList; - - CallQueued(QStringLiteral("NextWorkspace"), argumentList); - } - - - inline QDBusPendingReply<> PerformAction(int type) - { - QList argumentList; - argumentList << QVariant::fromValue(type); - return asyncCallWithArgumentList(QStringLiteral("PerformAction"), argumentList); - } - - inline void PerformActionQueued(int type) - { - QList argumentList; - argumentList << QVariant::fromValue(type); - - CallQueued(QStringLiteral("PerformAction"), argumentList); - } - - - inline QDBusPendingReply<> PresentWindows(const QList &xids) - { - QList argumentList; - argumentList << QVariant::fromValue(xids); - return asyncCallWithArgumentList(QStringLiteral("PresentWindows"), argumentList); - } - - inline void PresentWindowsQueued(const QList &xids) - { - QList argumentList; - argumentList << QVariant::fromValue(xids); - - CallQueued(QStringLiteral("PresentWindows"), argumentList); - } - - - inline QDBusPendingReply<> PreviewWindow(uint xid) - { - QList argumentList; - argumentList << QVariant::fromValue(xid); - return asyncCallWithArgumentList(QStringLiteral("PreviewWindow"), argumentList); - } - - inline void PreviewWindowQueued(uint xid) - { - QList argumentList; - argumentList << QVariant::fromValue(xid); - - CallQueued(QStringLiteral("PreviewWindow"), argumentList); - } - - - inline QDBusPendingReply<> PreviousWorkspace() - { - QList argumentList; - return asyncCallWithArgumentList(QStringLiteral("PreviousWorkspace"), argumentList); - } - - inline void PreviousWorkspaceQueued() - { - QList argumentList; - - CallQueued(QStringLiteral("PreviousWorkspace"), argumentList); - } - - - inline QDBusPendingReply<> RemoveAccel(const QString &id) - { - QList argumentList; - argumentList << QVariant::fromValue(id); - return asyncCallWithArgumentList(QStringLiteral("RemoveAccel"), argumentList); - } - - inline void RemoveAccelQueued(const QString &id) - { - QList argumentList; - argumentList << QVariant::fromValue(id); - - CallQueued(QStringLiteral("RemoveAccel"), argumentList); - } - - - inline QDBusPendingReply SetAccel(const QString &data) - { - QList argumentList; - argumentList << QVariant::fromValue(data); - return asyncCallWithArgumentList(QStringLiteral("SetAccel"), argumentList); - } - - - - inline QDBusPendingReply<> SetCurrentWorkspace(int index) - { - QList argumentList; - argumentList << QVariant::fromValue(index); - return asyncCallWithArgumentList(QStringLiteral("SetCurrentWorkspace"), argumentList); - } - - inline void SetCurrentWorkspaceQueued(int index) - { - QList argumentList; - argumentList << QVariant::fromValue(index); - - CallQueued(QStringLiteral("SetCurrentWorkspace"), argumentList); - } - - - inline QDBusPendingReply<> SetCurrentWorkspaceBackground(const QString &uri) - { - QList argumentList; - argumentList << QVariant::fromValue(uri); - return asyncCallWithArgumentList(QStringLiteral("SetCurrentWorkspaceBackground"), argumentList); - } - - inline void SetCurrentWorkspaceBackgroundQueued(const QString &uri) - { - QList argumentList; - argumentList << QVariant::fromValue(uri); - - CallQueued(QStringLiteral("SetCurrentWorkspaceBackground"), argumentList); - } - - - inline QDBusPendingReply<> SetCurrentWorkspaceBackgroundForMonitor(const QString &uri, const QString &strMonitorName) - { - QList argumentList; - argumentList << QVariant::fromValue(uri) << QVariant::fromValue(strMonitorName); - return asyncCallWithArgumentList(QStringLiteral("SetCurrentWorkspaceBackgroundForMonitor"), argumentList); - } - - inline void SetCurrentWorkspaceBackgroundForMonitorQueued(const QString &uri, const QString &strMonitorName) - { - QList argumentList; - argumentList << QVariant::fromValue(uri) << QVariant::fromValue(strMonitorName); - - CallQueued(QStringLiteral("SetCurrentWorkspaceBackgroundForMonitor"), argumentList); - } - - - inline QDBusPendingReply<> SetDecorationDeepinTheme(const QString &deepinThemeName) - { - QList argumentList; - argumentList << QVariant::fromValue(deepinThemeName); - return asyncCallWithArgumentList(QStringLiteral("SetDecorationDeepinTheme"), argumentList); - } - - inline void SetDecorationDeepinThemeQueued(const QString &deepinThemeName) - { - QList argumentList; - argumentList << QVariant::fromValue(deepinThemeName); - - CallQueued(QStringLiteral("SetDecorationDeepinTheme"), argumentList); - } - - - inline QDBusPendingReply<> SetDecorationTheme(const QString &themeType, const QString &themeName) - { - QList argumentList; - argumentList << QVariant::fromValue(themeType) << QVariant::fromValue(themeName); - return asyncCallWithArgumentList(QStringLiteral("SetDecorationTheme"), argumentList); - } - - inline void SetDecorationThemeQueued(const QString &themeType, const QString &themeName) - { - QList argumentList; - argumentList << QVariant::fromValue(themeType) << QVariant::fromValue(themeName); - - CallQueued(QStringLiteral("SetDecorationTheme"), argumentList); - } - - - inline QDBusPendingReply<> SetMultiTaskingStatus(bool isActive) - { - QList argumentList; - argumentList << QVariant::fromValue(isActive); - return asyncCallWithArgumentList(QStringLiteral("SetMultiTaskingStatus"), argumentList); - } - - inline void SetMultiTaskingStatusQueued(bool isActive) - { - QList argumentList; - argumentList << QVariant::fromValue(isActive); - - CallQueued(QStringLiteral("SetMultiTaskingStatus"), argumentList); - } - - - inline QDBusPendingReply<> SetShowDesktop(bool isShowDesktop) - { - QList argumentList; - argumentList << QVariant::fromValue(isShowDesktop); - return asyncCallWithArgumentList(QStringLiteral("SetShowDesktop"), argumentList); - } - - inline void SetShowDesktopQueued(bool isShowDesktop) - { - QList argumentList; - argumentList << QVariant::fromValue(isShowDesktop); - - CallQueued(QStringLiteral("SetShowDesktop"), argumentList); - } - - - inline QDBusPendingReply<> SetTouchBorderInterval(double interval) - { - QList argumentList; - argumentList << QVariant::fromValue(interval); - return asyncCallWithArgumentList(QStringLiteral("SetTouchBorderInterval"), argumentList); - } - - inline void SetTouchBorderIntervalQueued(double interval) - { - QList argumentList; - argumentList << QVariant::fromValue(interval); - - CallQueued(QStringLiteral("SetTouchBorderInterval"), argumentList); - } - - - inline QDBusPendingReply<> SetTransientBackground(const QString &in0) - { - QList argumentList; - argumentList << QVariant::fromValue(in0); - return asyncCallWithArgumentList(QStringLiteral("SetTransientBackground"), argumentList); - } - - inline void SetTransientBackgroundQueued(const QString &in0) - { - QList argumentList; - argumentList << QVariant::fromValue(in0); - - CallQueued(QStringLiteral("SetTransientBackground"), argumentList); - } - - - inline QDBusPendingReply<> SetTransientBackgroundForMonitor(const QString &uri, const QString &strMonitorName) - { - QList argumentList; - argumentList << QVariant::fromValue(uri) << QVariant::fromValue(strMonitorName); - return asyncCallWithArgumentList(QStringLiteral("SetTransientBackgroundForMonitor"), argumentList); - } - - inline void SetTransientBackgroundForMonitorQueued(const QString &uri, const QString &strMonitorName) - { - QList argumentList; - argumentList << QVariant::fromValue(uri) << QVariant::fromValue(strMonitorName); - - CallQueued(QStringLiteral("SetTransientBackgroundForMonitor"), argumentList); - } - - - inline QDBusPendingReply<> SetWorkspaceBackground(int index, const QString &uri) - { - QList argumentList; - argumentList << QVariant::fromValue(index) << QVariant::fromValue(uri); - return asyncCallWithArgumentList(QStringLiteral("SetWorkspaceBackground"), argumentList); - } - - inline void SetWorkspaceBackgroundQueued(int index, const QString &uri) - { - QList argumentList; - argumentList << QVariant::fromValue(index) << QVariant::fromValue(uri); - - CallQueued(QStringLiteral("SetWorkspaceBackground"), argumentList); - } - - - inline QDBusPendingReply<> SetWorkspaceBackgroundForMonitor(int index, const QString &strMonitorName, const QString &uri) - { - QList argumentList; - argumentList << QVariant::fromValue(index) << QVariant::fromValue(strMonitorName) << QVariant::fromValue(uri); - return asyncCallWithArgumentList(QStringLiteral("SetWorkspaceBackgroundForMonitor"), argumentList); - } - - inline void SetWorkspaceBackgroundForMonitorQueued(int index, const QString &strMonitorName, const QString &uri) - { - QList argumentList; - argumentList << QVariant::fromValue(index) << QVariant::fromValue(strMonitorName) << QVariant::fromValue(uri); - - CallQueued(QStringLiteral("SetWorkspaceBackgroundForMonitor"), argumentList); - } - - - inline QDBusPendingReply<> ShowAllWindow() - { - QList argumentList; - return asyncCallWithArgumentList(QStringLiteral("ShowAllWindow"), argumentList); - } - - inline void ShowAllWindowQueued() - { - QList argumentList; - - CallQueued(QStringLiteral("ShowAllWindow"), argumentList); - } - - - inline QDBusPendingReply<> ShowWindow() - { - QList argumentList; - return asyncCallWithArgumentList(QStringLiteral("ShowWindow"), argumentList); - } - - inline void ShowWindowQueued() - { - QList argumentList; - - CallQueued(QStringLiteral("ShowWindow"), argumentList); - } - - - inline QDBusPendingReply<> ShowWorkspace() - { - QList argumentList; - return asyncCallWithArgumentList(QStringLiteral("ShowWorkspace"), argumentList); - } - - inline void ShowWorkspaceQueued() - { - QList argumentList; - - CallQueued(QStringLiteral("ShowWorkspace"), argumentList); - } - - - inline QDBusPendingReply<> SwitchApplication(bool backward) - { - QList argumentList; - argumentList << QVariant::fromValue(backward); - return asyncCallWithArgumentList(QStringLiteral("SwitchApplication"), argumentList); - } - - inline void SwitchApplicationQueued(bool backward) - { - QList argumentList; - argumentList << QVariant::fromValue(backward); - - CallQueued(QStringLiteral("SwitchApplication"), argumentList); - } - - - inline QDBusPendingReply<> SwitchToWorkspace(bool backward) - { - QList argumentList; - argumentList << QVariant::fromValue(backward); - return asyncCallWithArgumentList(QStringLiteral("SwitchToWorkspace"), argumentList); - } - - inline void SwitchToWorkspaceQueued(bool backward) - { - QList argumentList; - argumentList << QVariant::fromValue(backward); - - CallQueued(QStringLiteral("SwitchToWorkspace"), argumentList); - } - - - inline QDBusPendingReply<> TileActiveWindow(uint side) - { - QList argumentList; - argumentList << QVariant::fromValue(side); - return asyncCallWithArgumentList(QStringLiteral("TileActiveWindow"), argumentList); - } - - inline void TileActiveWindowQueued(uint side) - { - QList argumentList; - argumentList << QVariant::fromValue(side); - - CallQueued(QStringLiteral("TileActiveWindow"), argumentList); - } - - - inline QDBusPendingReply<> ToggleActiveWindowMaximize() - { - QList argumentList; - return asyncCallWithArgumentList(QStringLiteral("ToggleActiveWindowMaximize"), argumentList); - } - - inline void ToggleActiveWindowMaximizeQueued() - { - QList argumentList; - - CallQueued(QStringLiteral("ToggleActiveWindowMaximize"), argumentList); - } - - - inline QDBusPendingReply<> TouchToMove(int x, int y) - { - QList argumentList; - argumentList << QVariant::fromValue(x) << QVariant::fromValue(y); - return asyncCallWithArgumentList(QStringLiteral("TouchToMove"), argumentList); - } - - inline void TouchToMoveQueued(int x, int y) - { - QList argumentList; - argumentList << QVariant::fromValue(x) << QVariant::fromValue(y); - - CallQueued(QStringLiteral("TouchToMove"), argumentList); - } - - - inline QDBusPendingReply WorkspaceCount() - { - QList argumentList; - return asyncCallWithArgumentList(QStringLiteral("WorkspaceCount"), argumentList); - } - - - - -Q_SIGNALS: // SIGNALS - void WorkspaceBackgroundChanged(int index, const QString &newUri); - void WorkspaceBackgroundChangedForMonitor(int index, const QString &strMonitorName, const QString &uri); - void WorkspaceSwitched(int from, int to); - void compositingEnabledChanged(bool enabled); - void wmCompositingEnabledChanged(bool enabled); - void workspaceCountChanged(int count); - // begin property changed signals - void CompositingAllowSwitchChanged(bool value) const; - void CompositingEnabledChanged(bool value) const; - void CompositingPossibleChanged(bool value) const; - void CursorSizeChanged(int value) const; - void CursorThemeChanged(const QString & value) const; - void ZoneEnabledChanged(bool value) const; - -public Q_SLOTS: - void CallQueued(const QString &callName, const QList &args); - -private Q_SLOTS: - void onPendingCallFinished(QDBusPendingCallWatcher *w); - void onPropertyChanged(const QString &propName, const QVariant &value); - -private: - __ComDeepinWmInterfacePrivate *d_ptr; -}; - -namespace com { - namespace deepin { - typedef ::__ComDeepinWmInterface wm; - } -} -#endif