chore: V23接口改造适配
V23接口改造适配 Log: V23接口改造适配 Influence: 无 Task: https://pms.uniontech.com/task-view-207483.html Change-Id: I91e7c2807c168e87781e18aedc7aec887702ae13
This commit is contained in:
parent
d1fe32c13e
commit
e4f4a47b87
1
.gitignore
vendored
1
.gitignore
vendored
@ -3,3 +3,4 @@ build/
|
||||
|
||||
# translations files
|
||||
*.qm
|
||||
.vscode/
|
||||
|
@ -1,4 +1,4 @@
|
||||
<interface name='org.desktopspec.ApplicationInstance'>
|
||||
<interface name='org.deepin.dde.Application1.Instance'>
|
||||
<method name='Exit'>
|
||||
</method>
|
||||
<method name='Kill'>
|
@ -1,4 +1,4 @@
|
||||
<interface name='org.desktopspec.ApplicationManager'>
|
||||
<interface name='org.deepin.dde.Application1.Manager'>
|
||||
<method name='AddAutostart'>
|
||||
<arg type='s' name='fileNamae' direction='in' />
|
||||
<arg type='b' name='outArg0' direction='out' />
|
@ -1,4 +1,4 @@
|
||||
<interface name='org.desktopspec.Application'>
|
||||
<interface name='org.deepin.dde.Application1'>
|
||||
<method name='Name'>
|
||||
<arg type='s' name='locale' direction='in' />
|
||||
<arg type='s' name='value' direction='out' />
|
@ -1,4 +1,4 @@
|
||||
<interface name='org.deepin.daemon.Mime'>
|
||||
<interface name='org.deepin.dde.Mime1'>
|
||||
<method name='AddUserApp'>
|
||||
<arg type='as' name='mimeTypes' direction='in'/>
|
||||
<arg type='s' name='desktopId' direction='in'/>
|
@ -1,6 +1,6 @@
|
||||
set(SYSTEMD_FILES
|
||||
org.desktopspec.application.instance@.service
|
||||
org.desktopspec.application.manager.service
|
||||
org.deepin.dde.Application1.Instance@.service
|
||||
org.deepin.dde.Application1.Manager.service
|
||||
)
|
||||
|
||||
install(FILES ${SYSTEMD_FILES} DESTINATION lib/systemd/user/)
|
||||
|
@ -3,6 +3,6 @@ Description=Deepin Application Manager service
|
||||
|
||||
[Service]
|
||||
Type=DBus
|
||||
BusName=org.desktopspec.ApplicationManager
|
||||
BusName=org.deepin.dde.Application1.Manager
|
||||
ExecStart=/usr/bin/deepin-application-manager
|
||||
Slice=services.slice
|
@ -24,7 +24,7 @@
|
||||
|
||||
|
||||
/*
|
||||
* Proxy class for interface com.deepin.daemon.KWayland.Output
|
||||
* Proxy class for interface org.deepin.dde.KWayland1.Output
|
||||
*/
|
||||
class __OutputManagementPrivate;
|
||||
class __OutputManagement : public DBusExtendedAbstractInterface
|
||||
@ -33,7 +33,7 @@ class __OutputManagement : public DBusExtendedAbstractInterface
|
||||
|
||||
public:
|
||||
static inline const char *staticInterfaceName()
|
||||
{ return "com.deepin.daemon.KWayland.Output"; }
|
||||
{ return "org.deepin.dde.KWayland1.Output"; }
|
||||
|
||||
public:
|
||||
explicit __OutputManagement(const QString &service, const QString &path, const QDBusConnection &connection, QObject *parent = 0);
|
||||
@ -109,8 +109,8 @@ private:
|
||||
|
||||
namespace com {
|
||||
namespace deepin {
|
||||
namespace daemon {
|
||||
namespace kwayland {
|
||||
namespace dde {
|
||||
namespace kwayland1 {
|
||||
typedef ::__OutputManagement Output;
|
||||
}
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
/*
|
||||
* This file was generated by qdbusxml2cpp-fix version 0.8
|
||||
* Command line was: qdbusxml2cpp-fix -c kwaylandmanager -p kwaylandmanager com.deepin.daemon.KWayland.WindowManager.xml
|
||||
* Command line was: qdbusxml2cpp-fix -c kwaylandmanager -p kwaylandmanager org.deepin.dde.KWayland1.WindowManager.xml
|
||||
*
|
||||
* qdbusxml2cpp-fix is Copyright (C) 2016 Deepin Technology Co., Ltd.
|
||||
*
|
||||
|
@ -1,6 +1,6 @@
|
||||
/*
|
||||
* This file was generated by qdbusxml2cpp-fix version 0.8
|
||||
* Command line was: qdbusxml2cpp-fix -c kwaylandmanager -p kwaylandmanager com.deepin.daemon.KWayland.WindowManager.xml
|
||||
* Command line was: qdbusxml2cpp-fix -c kwaylandmanager -p kwaylandmanager org.deepin.dde.KWayland1.WindowManager.xml
|
||||
*
|
||||
* qdbusxml2cpp-fix is Copyright (C) 2016 Deepin Technology Co., Ltd.
|
||||
*
|
||||
@ -24,7 +24,7 @@
|
||||
|
||||
|
||||
/*
|
||||
* Proxy class for interface com.deepin.daemon.KWayland.WindowManager
|
||||
* Proxy class for interface org.deepin.dde.KWayland1.WindowManager
|
||||
*/
|
||||
class __kwaylandmanagerPrivate;
|
||||
class __KwaylandManager : public DBusExtendedAbstractInterface
|
||||
@ -33,7 +33,7 @@ class __KwaylandManager : public DBusExtendedAbstractInterface
|
||||
|
||||
public:
|
||||
static inline const char *staticInterfaceName()
|
||||
{ return "com.deepin.daemon.KWayland.WindowManager"; }
|
||||
{ return "org.deepin.dde.KWayland1.WindowManager"; }
|
||||
|
||||
public:
|
||||
explicit __KwaylandManager(const QString &service, const QString &path, const QDBusConnection &connection, QObject *parent = 0);
|
||||
@ -82,10 +82,10 @@ private:
|
||||
__kwaylandmanagerPrivate *d_ptr;
|
||||
};
|
||||
|
||||
namespace com {
|
||||
namespace org {
|
||||
namespace deepin {
|
||||
namespace daemon {
|
||||
namespace kwayland {
|
||||
namespace dde {
|
||||
namespace kwayland1 {
|
||||
typedef ::__KwaylandManager WindowManager;
|
||||
}
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
/*
|
||||
* This file was generated by qdbusxml2cpp-fix version 0.8
|
||||
* Command line was: qdbusxml2cpp-fix -c Launcherd -p generated/com_deepin_dde_daemon_launcherd ../xml/com.deepin.dde.daemon.Launcherd.xml
|
||||
* Command line was: qdbusxml2cpp-fix -c Launcherd -p generated/org_deepin_dde_daemon_launcherd ../xml/org.deepin.dde.daemon.Launcherd.xml
|
||||
*
|
||||
* qdbusxml2cpp-fix is Copyright (C) 2016 Deepin Technology Co., Ltd.
|
||||
*
|
||||
|
@ -1,6 +1,6 @@
|
||||
/*
|
||||
* This file was generated by qdbusxml2cpp-fix version 0.8
|
||||
* Command line was: qdbusxml2cpp-fix -c Launcherd -p generated/com_deepin_dde_daemon_launcherd ../xml/com.deepin.dde.daemon.Launcherd.xml
|
||||
* Command line was: qdbusxml2cpp-fix -c Launcherd -p generated/com_deepin_dde_daemon_launcher1 ../xml/org.deepin.dde.daemon.Launcher1.xml
|
||||
*
|
||||
* qdbusxml2cpp-fix is Copyright (C) 2016 Deepin Technology Co., Ltd.
|
||||
*
|
||||
@ -8,8 +8,8 @@
|
||||
* Do not edit! All changes made to it will be lost.
|
||||
*/
|
||||
|
||||
#ifndef COM_DEEPIN_DDE_DAEMON_LAUNCHERD_H
|
||||
#define COM_DEEPIN_DDE_DAEMON_LAUNCHERD_H
|
||||
#ifndef ORG_DEEPIN_DDE_DAEMON_LAUNCHER1_H
|
||||
#define ORG_DEEPIN_DDE_DAEMON_LAUNCHER1_H
|
||||
|
||||
#include <QtCore/QObject>
|
||||
#include <QtCore/QByteArray>
|
||||
@ -223,7 +223,7 @@ private:
|
||||
__LauncherdPrivate *d_ptr;
|
||||
};
|
||||
|
||||
namespace com {
|
||||
namespace org {
|
||||
namespace deepin {
|
||||
namespace dde {
|
||||
namespace daemon {
|
||||
|
@ -1,6 +1,6 @@
|
||||
/*
|
||||
* This file was generated by qdbusxml2cpp-fix version 0.8
|
||||
* Command line was: qdbusxml2cpp-fix -c Launcher -p generated/com_deepin_dde_launcher ../xml/com.deepin.dde.Launcher.xml
|
||||
* Command line was: qdbusxml2cpp-fix -c Launcher -p generated/org_deepin_dde_launcher1 ../xml/org.deepin.dde.Launcher1.xml
|
||||
*
|
||||
* qdbusxml2cpp-fix is Copyright (C) 2016 Deepin Technology Co., Ltd.
|
||||
*
|
||||
|
@ -1,6 +1,6 @@
|
||||
/*
|
||||
* This file was generated by qdbusxml2cpp-fix version 0.8
|
||||
* Command line was: qdbusxml2cpp-fix -c Launcher -p generated/com_deepin_dde_launcher ../xml/com.deepin.dde.Launcher.xml
|
||||
* Command line was: qdbusxml2cpp-fix -c Launcher -p generated/org_deepin_dde_launcher1 ../xml/org.deepin.dde.Launcher1.xml
|
||||
*
|
||||
* qdbusxml2cpp-fix is Copyright (C) 2016 Deepin Technology Co., Ltd.
|
||||
*
|
||||
@ -8,8 +8,8 @@
|
||||
* Do not edit! All changes made to it will be lost.
|
||||
*/
|
||||
|
||||
#ifndef COM_DEEPIN_DDE_LAUNCHER_H
|
||||
#define COM_DEEPIN_DDE_LAUNCHER_H
|
||||
#ifndef ORG_DEEPIN_DDE_LAUNCHER1_H
|
||||
#define ORG_DEEPIN_DDE_LAUNCHER1_H
|
||||
|
||||
#include <QtCore/QObject>
|
||||
#include <QtCore/QByteArray>
|
||||
@ -159,7 +159,7 @@ private:
|
||||
__LauncherPrivate *d_ptr;
|
||||
};
|
||||
|
||||
namespace com {
|
||||
namespace org {
|
||||
namespace deepin {
|
||||
namespace dde {
|
||||
typedef ::LauncherFront LauncherFront;
|
||||
|
@ -27,7 +27,7 @@ public:
|
||||
QMap<QString, QList<QVariant>> m_waittingCalls;
|
||||
};
|
||||
|
||||
PlasmaWindow::PlasmaWindow(const QString &service, const QString &path, const QDBusConnection &connection, QObject *parent)
|
||||
__PlasmaWindow::__PlasmaWindow(const QString &service, const QString &path, const QDBusConnection &connection, QObject *parent)
|
||||
: DBusExtendedAbstractInterface(service, path, staticInterfaceName(), connection, parent)
|
||||
, d_ptr(new __WindowPrivate)
|
||||
{
|
||||
@ -35,13 +35,13 @@ PlasmaWindow::PlasmaWindow(const QString &service, const QString &path, const QD
|
||||
registerRectMetaType();
|
||||
}
|
||||
|
||||
PlasmaWindow::~PlasmaWindow()
|
||||
__PlasmaWindow::~__PlasmaWindow()
|
||||
{
|
||||
qDeleteAll(d_ptr->m_processingCalls.values());
|
||||
delete d_ptr;
|
||||
}
|
||||
|
||||
void PlasmaWindow::CallQueued(const QString &callName, const QList<QVariant> &args)
|
||||
void __PlasmaWindow::CallQueued(const QString &callName, const QList<QVariant> &args)
|
||||
{
|
||||
if (d_ptr->m_waittingCalls.contains(callName))
|
||||
{
|
||||
@ -53,12 +53,12 @@ void PlasmaWindow::CallQueued(const QString &callName, const QList<QVariant> &ar
|
||||
d_ptr->m_waittingCalls.insert(callName, args);
|
||||
} else {
|
||||
QDBusPendingCallWatcher *watcher = new QDBusPendingCallWatcher(asyncCallWithArgumentList(callName, args));
|
||||
connect(watcher, &QDBusPendingCallWatcher::finished, this, &PlasmaWindow::onPendingCallFinished);
|
||||
connect(watcher, &QDBusPendingCallWatcher::finished, this, &__PlasmaWindow::onPendingCallFinished);
|
||||
d_ptr->m_processingCalls.insert(callName, watcher);
|
||||
}
|
||||
}
|
||||
|
||||
void PlasmaWindow::onPendingCallFinished(QDBusPendingCallWatcher *w)
|
||||
void __PlasmaWindow::onPendingCallFinished(QDBusPendingCallWatcher *w)
|
||||
{
|
||||
w->deleteLater();
|
||||
const auto callName = d_ptr->m_processingCalls.key(w);
|
||||
|
@ -25,21 +25,21 @@
|
||||
#include "types/dockrect.h"
|
||||
|
||||
/*
|
||||
* Proxy class for interface com.deepin.daemon.KWayland.PlasmaWindow
|
||||
* Proxy class for interface org.deepin.dde.KWayland1.PlasmaWindow
|
||||
*/
|
||||
class __WindowPrivate;
|
||||
class PlasmaWindow : public DBusExtendedAbstractInterface
|
||||
class __PlasmaWindow : public DBusExtendedAbstractInterface
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
static inline const char *staticInterfaceName()
|
||||
{ return "com.deepin.daemon.KWayland.PlasmaWindow"; }
|
||||
{ return "org.deepin.dde.KWayland1.PlasmaWindow"; }
|
||||
|
||||
public:
|
||||
explicit PlasmaWindow(const QString &service, const QString &path, const QDBusConnection &connection, QObject *parent = 0);
|
||||
explicit __PlasmaWindow(const QString &service, const QString &path, const QDBusConnection &connection, QObject *parent = 0);
|
||||
|
||||
~PlasmaWindow();
|
||||
~__PlasmaWindow();
|
||||
|
||||
public Q_SLOTS: // METHODS
|
||||
inline QDBusPendingReply<QString> AppId()
|
||||
@ -425,11 +425,11 @@ private:
|
||||
__WindowPrivate *d_ptr;
|
||||
};
|
||||
|
||||
namespace com {
|
||||
namespace org {
|
||||
namespace deepin {
|
||||
namespace daemon {
|
||||
namespace kwayland {
|
||||
typedef ::PlasmaWindow PlasmaWindow;
|
||||
namespace dde {
|
||||
namespace kwayland1 {
|
||||
typedef ::__PlasmaWindow PlasmaWindow;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
/*
|
||||
* This file was generated by qdbusxml2cpp-fix version 0.8
|
||||
* Command line was: qdbusxml2cpp-fix -c WMSwitcher -p generated/com_deepin_wmswitcher ../xml/com.deepin.WMSwitcher.xml
|
||||
* Command line was: qdbusxml2cpp-fix -c WMSwitcher -p generated/org_deepin_dde_wmswitcher1 ../xml/org.deepin.dde.WMSwitcher1.xml
|
||||
*
|
||||
* qdbusxml2cpp-fix is Copyright (C) 2016 Deepin Technology Co., Ltd.
|
||||
*
|
||||
|
@ -1,6 +1,6 @@
|
||||
/*
|
||||
* This file was generated by qdbusxml2cpp-fix version 0.8
|
||||
* Command line was: qdbusxml2cpp-fix -c WMSwitcher -p generated/com_deepin_wmswitcher ../xml/com.deepin.WMSwitcher.xml
|
||||
* Command line was: qdbusxml2cpp-fix -c WMSwitcher -p generated/org_deepin_dde_wmswitcher1 ../xml/org.deepin.dde.WMSwitcher1.xml
|
||||
*
|
||||
* qdbusxml2cpp-fix is Copyright (C) 2016 Deepin Technology Co., Ltd.
|
||||
*
|
||||
@ -8,8 +8,8 @@
|
||||
* Do not edit! All changes made to it will be lost.
|
||||
*/
|
||||
|
||||
#ifndef COM_DEEPIN_WMSWITCHER_H
|
||||
#define COM_DEEPIN_WMSWITCHER_H
|
||||
#ifndef ORG_DEEPIN_WMSWITCHER1_H
|
||||
#define ORG_DEEPIN_WMSWITCHER1_H
|
||||
|
||||
#include <QtCore/QObject>
|
||||
#include <QtCore/QByteArray>
|
||||
@ -24,7 +24,7 @@
|
||||
|
||||
|
||||
/*
|
||||
* Proxy class for interface com.deepin.WMSwitcher
|
||||
* Proxy class for interface org.deepin.dde.WMSwitcher1
|
||||
*/
|
||||
class __WMSwitcherPrivate;
|
||||
class __WMSwitcher : public DBusExtendedAbstractInterface
|
||||
@ -33,7 +33,7 @@ class __WMSwitcher : public DBusExtendedAbstractInterface
|
||||
|
||||
public:
|
||||
static inline const char *staticInterfaceName()
|
||||
{ return "com.deepin.WMSwitcher"; }
|
||||
{ return "org.deepin.dde.WMSwitcher1"; }
|
||||
|
||||
public:
|
||||
explicit __WMSwitcher(const QString &service, const QString &path, const QDBusConnection &connection, QObject *parent = 0);
|
||||
@ -114,9 +114,11 @@ private:
|
||||
__WMSwitcherPrivate *d_ptr;
|
||||
};
|
||||
|
||||
namespace com {
|
||||
namespace org {
|
||||
namespace deepin {
|
||||
typedef ::__WMSwitcher WMSwitcher;
|
||||
namespace dde {
|
||||
typedef ::__WMSwitcher WMSwitcher1;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
@ -12,13 +12,13 @@
|
||||
#include "dbusxeventmonitor.h"
|
||||
|
||||
/*
|
||||
* Implementation of interface class __org_deepin_api_XEventMonitor
|
||||
* Implementation of interface class __org_deepin_dde_XEventMonitor
|
||||
*/
|
||||
|
||||
class __org_deepin_api_XEventMonitorPrivate
|
||||
class __org_deepin_dde_XEventMonitorPrivate
|
||||
{
|
||||
public:
|
||||
__org_deepin_api_XEventMonitorPrivate() = default;
|
||||
__org_deepin_dde_XEventMonitorPrivate() = default;
|
||||
|
||||
// begin member variables
|
||||
|
||||
@ -27,21 +27,21 @@ public:
|
||||
QMap<QString, QList<QVariant>> m_waittingCalls;
|
||||
};
|
||||
|
||||
__org_deepin_api_XEventMonitor::__org_deepin_api_XEventMonitor(const QString &service, const QString &path, const QDBusConnection &connection, QObject *parent)
|
||||
__org_deepin_dde_XEventMonitor::__org_deepin_dde_XEventMonitor(const QString &service, const QString &path, const QDBusConnection &connection, QObject *parent)
|
||||
: DBusExtendedAbstractInterface(service, path, staticInterfaceName(), connection, parent)
|
||||
, d_ptr(new __org_deepin_api_XEventMonitorPrivate)
|
||||
, d_ptr(new __org_deepin_dde_XEventMonitorPrivate)
|
||||
{
|
||||
if (QMetaType::type("AreaList") == QMetaType::UnknownType)
|
||||
registerAreaListMetaType();
|
||||
}
|
||||
|
||||
__org_deepin_api_XEventMonitor::~__org_deepin_api_XEventMonitor()
|
||||
__org_deepin_dde_XEventMonitor::~__org_deepin_dde_XEventMonitor()
|
||||
{
|
||||
qDeleteAll(d_ptr->m_processingCalls.values());
|
||||
delete d_ptr;
|
||||
}
|
||||
|
||||
void __org_deepin_api_XEventMonitor::CallQueued(const QString &callName, const QList<QVariant> &args)
|
||||
void __org_deepin_dde_XEventMonitor::CallQueued(const QString &callName, const QList<QVariant> &args)
|
||||
{
|
||||
if (d_ptr->m_waittingCalls.contains(callName)) {
|
||||
d_ptr->m_waittingCalls[callName] = args;
|
||||
@ -51,12 +51,12 @@ void __org_deepin_api_XEventMonitor::CallQueued(const QString &callName, const Q
|
||||
d_ptr->m_waittingCalls.insert(callName, args);
|
||||
} else {
|
||||
QDBusPendingCallWatcher *watcher = new QDBusPendingCallWatcher(asyncCallWithArgumentList(callName, args));
|
||||
connect(watcher, &QDBusPendingCallWatcher::finished, this, &__org_deepin_api_XEventMonitor::onPendingCallFinished);
|
||||
connect(watcher, &QDBusPendingCallWatcher::finished, this, &__org_deepin_dde_XEventMonitor::onPendingCallFinished);
|
||||
d_ptr->m_processingCalls.insert(callName, watcher);
|
||||
}
|
||||
}
|
||||
|
||||
void __org_deepin_api_XEventMonitor::onPendingCallFinished(QDBusPendingCallWatcher *w)
|
||||
void __org_deepin_dde_XEventMonitor::onPendingCallFinished(QDBusPendingCallWatcher *w)
|
||||
{
|
||||
w->deleteLater();
|
||||
const auto callName = d_ptr->m_processingCalls.key(w);
|
||||
|
@ -25,21 +25,21 @@
|
||||
#include <QtDBus/QtDBus>
|
||||
|
||||
/*
|
||||
* Proxy class for interface org.deepin.api.XEventMonitor1
|
||||
* Proxy class for interface org.deepin.dde.XEventMonitor1
|
||||
*/
|
||||
class __org_deepin_api_XEventMonitorPrivate;
|
||||
class __org_deepin_api_XEventMonitor : public DBusExtendedAbstractInterface
|
||||
class __org_deepin_dde_XEventMonitorPrivate;
|
||||
class __org_deepin_dde_XEventMonitor : public DBusExtendedAbstractInterface
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
static inline const char *staticInterfaceName()
|
||||
{ return "org.deepin.api.XEventMonitor1"; }
|
||||
{ return "org.deepin.dde.XEventMonitor1"; }
|
||||
|
||||
public:
|
||||
explicit __org_deepin_api_XEventMonitor(const QString &service, const QString &path, const QDBusConnection &connection, QObject *parent = 0);
|
||||
explicit __org_deepin_dde_XEventMonitor(const QString &service, const QString &path, const QDBusConnection &connection, QObject *parent = 0);
|
||||
|
||||
~__org_deepin_api_XEventMonitor();
|
||||
~__org_deepin_dde_XEventMonitor();
|
||||
|
||||
public Q_SLOTS: // METHODS
|
||||
inline QDBusPendingReply<QString> RegisterArea(int in0, int in1, int in2, int in3, int in4)
|
||||
@ -87,13 +87,13 @@ private Q_SLOTS:
|
||||
void onPendingCallFinished(QDBusPendingCallWatcher *w);
|
||||
|
||||
private:
|
||||
__org_deepin_api_XEventMonitorPrivate *d_ptr;
|
||||
__org_deepin_dde_XEventMonitorPrivate *d_ptr;
|
||||
};
|
||||
|
||||
namespace org {
|
||||
namespace deepin {
|
||||
namespace api {
|
||||
typedef ::__org_deepin_api_XEventMonitor XEventMonitor1;
|
||||
namespace dde {
|
||||
typedef ::__org_deepin_dde_XEventMonitor XEventMonitor1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -30,7 +30,6 @@ const std::string AppinfoCommon::TypeDirectory = "Directory";
|
||||
|
||||
const std::string AppinfoCommon::EnvDesktopEnv = "XDG_CURRENT_DESKTOP";
|
||||
const std::string AppinfoCommon::DesktopExt = ".desktop";
|
||||
const std::string AppinfoCommon::GsSchemaStartdde = "com.deepin.dde.startdde";
|
||||
const std::string AppinfoCommon::EnableInvoker = "ENABLE_TURBO_INVOKER";
|
||||
const std::string AppinfoCommon::TurboInvokerFailedMsg = "Failed to invoke: Booster:";
|
||||
const std::string AppinfoCommon::TurboInvokerErrMsg = "deepin-turbo-invoker: error";
|
||||
|
@ -35,7 +35,6 @@ public:
|
||||
|
||||
const static std::string EnvDesktopEnv;
|
||||
const static std::string DesktopExt;
|
||||
const static std::string GsSchemaStartdde;
|
||||
const static std::string EnableInvoker;
|
||||
const static std::string TurboInvokerFailedMsg;
|
||||
const static std::string TurboInvokerErrMsg;
|
||||
|
@ -32,7 +32,7 @@ class DFWatcher;
|
||||
class AlRecorder: public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_CLASSINFO("D-Bus Interface", "org.deepin.daemon.AlRecorder1")
|
||||
Q_CLASSINFO("D-Bus Interface", "org.deepin.dde.AlRecorder1")
|
||||
|
||||
public:
|
||||
// 各个应用目录中应用的启动记录
|
||||
|
@ -36,13 +36,13 @@ AppManager::AppManager(QObject *parent)
|
||||
qInfo() << "AppManager";
|
||||
new DBusAdaptorRecorder(recorder);
|
||||
QDBusConnection con = QDBusConnection::sessionBus();
|
||||
if (!con.registerService("org.deepin.daemon.AlRecorder1"))
|
||||
if (!con.registerService("org.deepin.dde.AlRecorder1"))
|
||||
{
|
||||
qWarning() << "register service AlRecorder1 error:" << con.lastError().message();
|
||||
return;
|
||||
}
|
||||
|
||||
if (!con.registerObject("/org/deepin/daemon/AlRecorder1", recorder))
|
||||
if (!con.registerObject("/org/deepin/dde/AlRecorder1", recorder))
|
||||
{
|
||||
qWarning() << "register object AlRecorder1 error:" << con.lastError().message();
|
||||
return;
|
||||
|
@ -18,9 +18,9 @@
|
||||
class DBusAdaptorRecorder: public QDBusAbstractAdaptor
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_CLASSINFO("D-Bus Interface", "org.deepin.daemon.AlRecorder1")
|
||||
Q_CLASSINFO("D-Bus Interface", "org.deepin.dde.AlRecorder1")
|
||||
Q_CLASSINFO("D-Bus Introspection", ""
|
||||
" <interface name=\"org.deepin.daemon.AlRecorder1\">\n"
|
||||
" <interface name=\"org.deepin.dde.AlRecorder1\">\n"
|
||||
" <method name=\"GetNew\">\n"
|
||||
" <arg direction=\"out\" type=\"a{sas}\" name=\"newApps\"/>\n"
|
||||
" <annotation value=\"UnLaunchedAppMap\" name=\"org.qtproject.QtDBus.QtTypeName.Out0\"/>\n"
|
||||
|
@ -34,13 +34,13 @@ const QString configSuffix = ".json";
|
||||
, watcher(new QFileSystemWatcher(this))
|
||||
{
|
||||
QDBusConnection con = QDBusConnection::sessionBus();
|
||||
if (!con.registerService("org.deepin.daemon.DFWatcher1"))
|
||||
if (!con.registerService("org.deepin.dde.DFWatcher1"))
|
||||
{
|
||||
qInfo() << "register service DFWatcher error:" << con.lastError().message();
|
||||
return;
|
||||
}
|
||||
|
||||
if (!con.registerObject("/org/deepin/daemon/DFWatcher1", this, QDBusConnection::ExportAllSlots | QDBusConnection::ExportAllSignals))
|
||||
if (!con.registerObject("/org/deepin/dde/DFWatcher1", this, QDBusConnection::ExportAllSlots | QDBusConnection::ExportAllSignals))
|
||||
{
|
||||
qInfo() << "register object DFWatcher error:" << con.lastError().message();
|
||||
return;
|
||||
@ -52,7 +52,7 @@ const QString configSuffix = ".json";
|
||||
|
||||
DFWatcher::~DFWatcher()
|
||||
{
|
||||
QDBusConnection::sessionBus().unregisterObject("/org/deepin/daemon/DFWatcher1");
|
||||
QDBusConnection::sessionBus().unregisterObject("/org/deepin/dde/DFWatcher1");
|
||||
}
|
||||
|
||||
void DFWatcher::addDir(const QString &path)
|
||||
|
@ -28,7 +28,7 @@
|
||||
|
||||
class DFWatcher: public QObject {
|
||||
Q_OBJECT
|
||||
Q_CLASSINFO("D-Bus Interface", "org.deepin.daemon.DFWatcher1")
|
||||
Q_CLASSINFO("D-Bus Interface", "org.deepin.dde.DFWatcher1")
|
||||
|
||||
public:
|
||||
enum event{
|
||||
|
@ -31,7 +31,7 @@ DBusHandler::DBusHandler(Dock *_dock, QObject *parent)
|
||||
, m_launcherEnd(new LauncherBackEnd("org.deepin.dde.daemon.Launcher1", "/org/deepin/dde/daemon/Launcher1", m_session, this))
|
||||
, m_launcherFront(new LauncherFront("org.deepin.dde.Launcher1", "/org/deepin/dde/Launcher1", m_session, this))
|
||||
, m_wm(new com::deepin::WM("com.deepin.wm", "/com/deepin/wm", m_session, this))
|
||||
, m_wmSwitcher(new com::deepin::WMSwitcher("com.deepin.wmWMSwitcher", "/com/deepin/WMSwitcher", m_session, this))
|
||||
, m_wmSwitcher(new org::deepin::dde::WMSwitcher1("org.deepin.dde.WMSwitcher1", "/org/deepin/dde/WMSwitcher1", m_session, this))
|
||||
, m_kwaylandManager(nullptr)
|
||||
, m_xEventMonitor(nullptr)
|
||||
{
|
||||
@ -44,22 +44,22 @@ DBusHandler::DBusHandler(Dock *_dock, QObject *parent)
|
||||
m_dock->updateHideState(false);
|
||||
});
|
||||
|
||||
// 关联com.deepin.WMSwitcher事件 WMChanged
|
||||
// 关联org.deepin.dde.WMSwitcher1事件 WMChanged
|
||||
connect(m_wmSwitcher, &__WMSwitcher::WMChanged, this, [&](QString name) {m_dock->setWMName(name);});
|
||||
|
||||
if (QString(getenv("XDG_SESSION_TYPE")).contains("wayland")) {
|
||||
m_xEventMonitor = new org::deepin::api::XEventMonitor1("org.deepin.api.XEventMonitor1", "/org/deepin/api/XEventMonitor1", m_session, this);
|
||||
m_xEventMonitor = new org::deepin::dde::XEventMonitor1("org.deepin.dde.XEventMonitor1", "/org/deepin/dde/XEventMonitor1", m_session, this);
|
||||
// 注册XEventMonitor区域为整个屏幕的区域
|
||||
m_activeWindowMonitorKey = m_xEventMonitor->RegisterFullScreen();
|
||||
// 关联XEventMonitor的ButtonRelease事件
|
||||
connect(m_xEventMonitor, &org::deepin::api::XEventMonitor1::ButtonRelease, this, &DBusHandler::onActiveWindowButtonRelease);
|
||||
connect(m_xEventMonitor, &org::deepin::dde::XEventMonitor1::ButtonRelease, this, &DBusHandler::onActiveWindowButtonRelease);
|
||||
}
|
||||
}
|
||||
|
||||
// 关联com.deepin.daemon.KWayland.WindowManager事件
|
||||
// 关联org.deepin.dde.KWayland.WindowManager事件
|
||||
void DBusHandler::listenWaylandWMSignals()
|
||||
{
|
||||
m_kwaylandManager = new com::deepin::daemon::kwayland::WindowManager("com.deepin.daemon.KWayland", "/com/deepin/daemon/KWayland/WindowManager", m_session, this);
|
||||
m_kwaylandManager = new org::deepin::dde::kwayland1::WindowManager("org.deepin.dde.KWayland1", "/org/deepin/dde/KWayland1/WindowManager", m_session, this);
|
||||
|
||||
// ActiveWindowchanged
|
||||
connect(m_kwaylandManager, &__KwaylandManager::ActiveWindowChanged, this, &DBusHandler::handleWlActiveWindowChange);
|
||||
@ -102,22 +102,22 @@ QString DBusHandler::getCurrentWM()
|
||||
return m_wmSwitcher->CurrentWM().value();
|
||||
}
|
||||
|
||||
// TODO 扩展ApplicationManager Launch接口,允许带参数启动应用,暂时调用StartManager接口
|
||||
// TODO 扩展Application Manager Launch接口,允许带参数启动应用,暂时调用StartManager接口
|
||||
void DBusHandler::launchApp(QString desktopFile, uint32_t timestamp, QStringList files)
|
||||
{
|
||||
QDBusInterface interface = QDBusInterface("com.deepin.daemon.Display", "/com/deepin/StartManager", "com.deepin.StartManager");
|
||||
QDBusInterface interface = QDBusInterface("org.deepin.dde.Application1.Manager", "/org/deepin/dde/Application1/Manager", "org.deepin.dde.Application1.Manager");
|
||||
interface.call("LaunchApp", desktopFile, timestamp, files);
|
||||
}
|
||||
|
||||
void DBusHandler::launchAppAction(QString desktopFile, QString action, uint32_t timestamp)
|
||||
{
|
||||
QDBusInterface interface = QDBusInterface("com.deepin.daemon.Display", "/com/deepin/StartManager", "com.deepin.StartManager");
|
||||
QDBusInterface interface = QDBusInterface("org.deepin.dde.Application1.Manager", "/org/deepin/dde/Application1/Manager", "org.deepin.dde.Application1.Manager");
|
||||
interface.call("LaunchAppAction", desktopFile, action, timestamp);
|
||||
}
|
||||
|
||||
void DBusHandler::markAppLaunched(const QString &filePath)
|
||||
{
|
||||
QDBusInterface interface = QDBusInterface("org.deepin.daemon.AlRecorder1", "/org/deepin/daemon/AlRecorder1", "org.deepin.daemon.AlRecorder1");
|
||||
QDBusInterface interface = QDBusInterface("org.deepin.dde.AlRecorder1", "/org/deepin/dde/AlRecorder1", "org.deepin.dde.AlRecorder1");
|
||||
interface.call("MarkLaunched", filePath);
|
||||
}
|
||||
|
||||
@ -225,7 +225,7 @@ void DBusHandler::listenKWindowSignals(WindowInfoK *windowInfo)
|
||||
|
||||
PlasmaWindow *DBusHandler::createPlasmaWindow(QString objPath)
|
||||
{
|
||||
return new PlasmaWindow("com.deepin.daemon.KWayland", objPath, m_session, this);
|
||||
return new PlasmaWindow("org.deepin.dde.KWayland1", objPath, m_session, this);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -86,10 +86,10 @@ private:
|
||||
LauncherBackEnd *m_launcherEnd;
|
||||
LauncherFront *m_launcherFront;
|
||||
com::deepin::WM *m_wm;
|
||||
com::deepin::WMSwitcher *m_wmSwitcher;
|
||||
com::deepin::daemon::kwayland::WindowManager *m_kwaylandManager;
|
||||
org::deepin::dde::WMSwitcher1 *m_wmSwitcher;
|
||||
org::deepin::dde::kwayland1::WindowManager *m_kwaylandManager;
|
||||
|
||||
org::deepin::api::XEventMonitor1 *m_xEventMonitor;
|
||||
org::deepin::dde::XEventMonitor1 *m_xEventMonitor;
|
||||
QString m_activeWindowMonitorKey;
|
||||
};
|
||||
|
||||
|
@ -40,6 +40,8 @@ class WindowInfoK;
|
||||
class WindowInfoX;
|
||||
class ApplicationManager;
|
||||
|
||||
using PlasmaWindow = org::deepin::dde::kwayland1::PlasmaWindow;
|
||||
|
||||
enum class HideState
|
||||
{
|
||||
Unknown,
|
||||
|
@ -27,6 +27,8 @@
|
||||
|
||||
#include <QString>
|
||||
|
||||
using PlasmaWindow = org::deepin::dde::kwayland1::PlasmaWindow;
|
||||
|
||||
class Entry;
|
||||
class ProcessInfo;
|
||||
|
||||
|
@ -47,9 +47,9 @@ DCORE_USE_NAMESPACE
|
||||
|
||||
#define SETTING LauncherSettings::instance()
|
||||
|
||||
const QString LASTORE_SERVICE = "org.deepin.lastore1";
|
||||
const QString LASTORE_PATH = "/org/deepin/lastore1";
|
||||
const QString LASTORE_INTERFACE = "org.deepin.lastore1.Manager";
|
||||
const QString LASTORE_SERVICE = "org.deepin.dde.Lastore1";
|
||||
const QString LASTORE_PATH = "/org/deepin/dde/Lastore1";
|
||||
const QString LASTORE_INTERFACE = "org.deepin.dde.Lastore1.Manager";
|
||||
|
||||
Launcher::Launcher(QObject *parent)
|
||||
: SynModule(parent)
|
||||
@ -143,7 +143,7 @@ QStringList Launcher::getAllNewInstalledApps()
|
||||
{
|
||||
QStringList ret;
|
||||
QMap<QString, QStringList> newApps;
|
||||
QDBusInterface interface = QDBusInterface("org.deepin.daemon.AlRecorder1", "/org/deepin/daemon/AlRecorder1", "org.deepin.daemon.AlRecorder1");
|
||||
QDBusInterface interface = QDBusInterface("org.deepin.dde.AlRecorder1", "/org/deepin/dde/AlRecorder1", "org.deepin.dde.AlRecorder1");
|
||||
QDBusReply<QMap<QString, QStringList>> reply = interface.call("GetNew");
|
||||
if (reply.isValid())
|
||||
newApps = reply;
|
||||
@ -579,16 +579,16 @@ void Launcher::onNewAppLaunched(const QString &filePath)
|
||||
|
||||
void Launcher::initConnection()
|
||||
{
|
||||
QDBusConnection::sessionBus().connect("org.deepin.daemon.DFWatcher1",
|
||||
"/org/deepin/daemon/DFWatcher1",
|
||||
"org.deepin.daemon.DFWatcher1",
|
||||
QDBusConnection::sessionBus().connect("org.deepin.dde.DFWatcher1",
|
||||
"/org/deepin/dde/DFWatcher1",
|
||||
"org.deepin.dde.DFWatcher1",
|
||||
"Event",
|
||||
this,
|
||||
SLOT(onCheckDesktopFile(const QString &, int)));
|
||||
|
||||
QDBusConnection::sessionBus().connect("org.deepin.daemon.AlRecorder1",
|
||||
"/org/deepin/daemon/AlRecorder1",
|
||||
"org.deepin.daemon.AlRecorder1",
|
||||
QDBusConnection::sessionBus().connect("org.deepin.dde.AlRecorder1",
|
||||
"/org/deepin/dde/AlRecorder1",
|
||||
"org.deepin.dde.AlRecorder1",
|
||||
"Launched",
|
||||
this,
|
||||
SLOT(onNewAppLaunched(const QString &)));
|
||||
|
@ -24,7 +24,7 @@
|
||||
|
||||
#include <QString>
|
||||
|
||||
const QString AMServiceName = "/org/desktopspec/ApplicationManager";
|
||||
const QString AMServiceName = "/org/deepin/dde/Application1/Manager";
|
||||
const QString autostartDir = "autostart";
|
||||
const QString proxychainsBinary = "proxychains4";
|
||||
|
||||
|
@ -32,14 +32,14 @@ StartManagerDBusHandler::StartManagerDBusHandler(QObject *parent)
|
||||
|
||||
void StartManagerDBusHandler::markLaunched(QString desktopFile)
|
||||
{
|
||||
QDBusInterface interface = QDBusInterface("org.deepin.daemon.AlRecorder1", "/org/deepin/daemon/AlRecorder1", "org.deepin.daemon.AlRecorder1");
|
||||
QDBusInterface interface = QDBusInterface("org.deepin.dde.AlRecorder1", "/org/deepin/dde/AlRecorder1", "org.deepin.dde.AlRecorder1");
|
||||
interface.call("MarkLaunched", desktopFile);
|
||||
}
|
||||
|
||||
QString StartManagerDBusHandler::getProxyMsg()
|
||||
{
|
||||
QString ret;
|
||||
QDBusInterface interface = QDBusInterface("com.deepin.system.proxy", "/com/deepin/system/proxy", "com.deepin.system.proxy.App");
|
||||
QDBusInterface interface = QDBusInterface("org.deepin.dde.NetworkProxy1", "/org/deepin/dde/NetworkProxy1", "org.deepin.dde.NetworkProxy1.App", QDBusConnection::systemBus());
|
||||
QDBusReply<QString> reply = interface.call("GetProxy");
|
||||
if (reply.isValid())
|
||||
ret = reply.value();
|
||||
@ -49,8 +49,8 @@ QString StartManagerDBusHandler::getProxyMsg()
|
||||
|
||||
void StartManagerDBusHandler::addProxyProc(int32_t pid)
|
||||
{
|
||||
QDBusInterface interface = QDBusInterface("com.deepin.system.proxy", "/com/deepin/system/proxy", "com.deepin.system.proxy.App");
|
||||
interface.call("AddProc");
|
||||
QDBusInterface interface = QDBusInterface("org.deepin.dde.NetworkProxy1", "/org/deepin/dde/NetworkProxy1", "org.deepin.dde.NetworkProxy1.App", QDBusConnection::systemBus());
|
||||
interface.call("AddProc", pid);
|
||||
}
|
||||
|
||||
|
||||
|
@ -12,22 +12,22 @@ pkg_check_modules(GLib REQUIRED IMPORTED_TARGET glib-2.0)
|
||||
pkg_check_modules(QGSettings REQUIRED IMPORTED_TARGET gsettings-qt)
|
||||
|
||||
qt5_add_dbus_adaptor(ADAPTER_SOURCES
|
||||
../../dbus/org.desktopspec.ApplicationManager.xml
|
||||
../../dbus/org.deepin.dde.Application1.Manager.xml
|
||||
impl/application_manager.h
|
||||
ApplicationManager)
|
||||
|
||||
qt5_add_dbus_adaptor(ADAPTER_SOURCES
|
||||
../../dbus/org.desktopspec.Application.xml
|
||||
../../dbus/org.deepin.dde.Application1.xml
|
||||
impl/application.h
|
||||
Application)
|
||||
|
||||
qt5_add_dbus_adaptor(ADAPTER_SOURCES
|
||||
../../dbus/org.desktopspec.ApplicationInstance.xml
|
||||
../../dbus/org.deepin.dde.Application1.Instance.xml
|
||||
impl/application_instance.h
|
||||
ApplicationInstance)
|
||||
|
||||
qt5_add_dbus_adaptor(ADAPTER_SOURCES
|
||||
../../dbus/org.deepin.daemon.Mime.xml
|
||||
../../dbus/org.deepin.dde.Mime1.xml
|
||||
../modules/mimeapp/mime_app.h
|
||||
MimeApp)
|
||||
|
||||
|
@ -124,7 +124,7 @@ QString Application::Name(const QString &locale)
|
||||
|
||||
QDBusObjectPath Application::path() const
|
||||
{
|
||||
return QDBusObjectPath(QString("/org/desktopspec/Application/%1").arg(QString(QCryptographicHash::hash(id().toUtf8(), QCryptographicHash::Md5).toHex())));
|
||||
return QDBusObjectPath(QString("/org/deepin/dde/Application1/%1").arg(QString(QCryptographicHash::hash(id().toUtf8(), QCryptographicHash::Md5).toHex())));
|
||||
}
|
||||
|
||||
Application::Type Application::type() const
|
||||
|
@ -1,7 +1,7 @@
|
||||
#include "application_instance.h"
|
||||
#include "../applicationhelper.h"
|
||||
#include "application.h"
|
||||
#include "applicationinstanceadaptor.h"
|
||||
#include "instanceadaptor.h"
|
||||
|
||||
#include <qdatetime.h>
|
||||
#include <QCryptographicHash>
|
||||
@ -21,7 +21,7 @@ class ApplicationInstancePrivate
|
||||
Q_DECLARE_PUBLIC(ApplicationInstance);
|
||||
|
||||
Application* application;
|
||||
ApplicationInstanceAdaptor* adapter;
|
||||
InstanceAdaptor* adapter;
|
||||
QString m_path;
|
||||
QSharedPointer<modules::ApplicationHelper::Helper> helper;
|
||||
QDateTime startupTime;
|
||||
@ -33,8 +33,8 @@ public:
|
||||
{
|
||||
startupTime = QDateTime::currentDateTime();
|
||||
m_id = QString(QCryptographicHash::hash(QUuid::createUuid().toByteArray(), QCryptographicHash::Md5).toHex());
|
||||
m_path = QString("/org/desktopspec/ApplicationInstance/%1").arg(m_id);
|
||||
adapter = new ApplicationInstanceAdaptor(q_ptr);
|
||||
m_path = QString("/org/deepin/dde/Application1/Instance/%1").arg(m_id);
|
||||
adapter = new InstanceAdaptor(q_ptr);
|
||||
}
|
||||
|
||||
~ApplicationInstancePrivate()
|
||||
@ -70,9 +70,9 @@ public:
|
||||
Q_EMIT q_ptr->taskFinished(p->exitCode());
|
||||
}
|
||||
#else
|
||||
qInfo() << "app manager load service:" << QString("org.desktopspec.application.instance@%1.service").arg(m_id);
|
||||
qInfo() << "app manager load service:" << QString("org.deepin.dde.Application1.Instance@%1.service").arg(m_id);
|
||||
QDBusInterface systemd("org.freedesktop.systemd1", "/org/freedesktop/systemd1", "org.freedesktop.systemd1.Manager");
|
||||
QDBusReply<void> reply = systemd.call("StartUnit", QString("org.desktopspec.application.instance@%1.service").arg(m_id), "replace-irreversibly");
|
||||
QDBusReply<void> reply = systemd.call("StartUnit", QString("org.deepin.dde.Application1.Instance@%1.service").arg(m_id), "replace-irreversibly");
|
||||
if (!reply.isValid()) {
|
||||
qInfo() << reply.error();
|
||||
q_ptr->deleteLater();
|
||||
@ -85,7 +85,7 @@ public:
|
||||
#ifdef LOADER_PATH
|
||||
#else
|
||||
QDBusInterface systemd("org.freedesktop.systemd1", "/org/freedesktop/systemd1", "org.freedesktop.systemd1.Manager");
|
||||
qInfo() << systemd.call("StopUnit", QString("org.desktopspec.application.instance@%1.service").arg(m_id), "replace-irreversibly");
|
||||
qInfo() << systemd.call("StopUnit", QString("org.deepin.dde.Application1.Instance@%1.service").arg(m_id), "replace-irreversibly");
|
||||
#endif
|
||||
}
|
||||
|
||||
@ -112,7 +112,7 @@ ApplicationInstance::ApplicationInstance(Application* parent, QSharedPointer<mod
|
||||
d->helper = helper;
|
||||
|
||||
QTimer::singleShot(0, this, [ = ] {
|
||||
QDBusConnection::sessionBus().registerObject(d->m_path, "org.desktopspec.ApplicationInstance", this);
|
||||
QDBusConnection::sessionBus().registerObject(d->m_path, "org.deepin.dde.Application1.Instance", this);
|
||||
d->run();
|
||||
});
|
||||
}
|
||||
@ -196,6 +196,6 @@ uint32_t ApplicationInstance::getPid()
|
||||
void ApplicationInstance::Success(const QString& data)
|
||||
{
|
||||
Q_D(ApplicationInstance);
|
||||
QDBusConnection::sessionBus().registerObject(d->m_path, "org.desktopspec.ApplicationInstance", this);
|
||||
QDBusConnection::sessionBus().registerObject(d->m_path, "org.deepin.dde.Application1.Instance", this);
|
||||
return d->_success(data);
|
||||
}
|
||||
|
@ -21,7 +21,7 @@
|
||||
#include "../../modules/startmanager/startmanager.h"
|
||||
#include "application.h"
|
||||
#include "application_instance.h"
|
||||
#include "applicationinstanceadaptor.h"
|
||||
#include "instanceadaptor.h"
|
||||
#include "../lib/keyfile.h"
|
||||
|
||||
ApplicationManagerPrivate::ApplicationManagerPrivate(ApplicationManager* parent)
|
||||
|
@ -2,10 +2,10 @@
|
||||
|
||||
#include "impl/application_manager.h"
|
||||
#include "impl/application.h"
|
||||
#include "applicationmanageradaptor.h"
|
||||
#include "applicationadaptor.h"
|
||||
#include "manageradaptor.h"
|
||||
#include "application1adaptor.h"
|
||||
#include "applicationhelper.h"
|
||||
#include "mimeadaptor.h"
|
||||
#include "mime1adaptor.h"
|
||||
#include "../modules/apps/appmanager.h"
|
||||
#include "../modules/launcher/launchermanager.h"
|
||||
#include "../modules/dock/dockmanager.h"
|
||||
@ -18,9 +18,9 @@
|
||||
|
||||
DCORE_USE_NAMESPACE
|
||||
|
||||
#define ApplicationManagerServiceName "org.desktopspec.ApplicationManager"
|
||||
#define ApplicationManagerServicePath "/org/desktopspec/ApplicationManager"
|
||||
#define ApplicationManagerInterface "org.desktopspec.ApplicationManager"
|
||||
#define ApplicationManagerServiceName "org.deepin.dde.Application1.Manager"
|
||||
#define ApplicationManagerServicePath "/org/deepin/dde/Application1/Manager"
|
||||
#define ApplicationManagerInterface "org.deepin.dde.Application1.Manager"
|
||||
|
||||
QFileInfoList scan(const QString &path)
|
||||
{
|
||||
@ -85,10 +85,10 @@ int main(int argc, char *argv[])
|
||||
new AppManager(ApplicationManager::instance());
|
||||
new LauncherManager(ApplicationManager::instance());
|
||||
new DockManager(ApplicationManager::instance());
|
||||
new ApplicationManagerAdaptor(ApplicationManager::instance());
|
||||
new ManagerAdaptor(ApplicationManager::instance());
|
||||
|
||||
QDBusConnection connection = QDBusConnection::sessionBus();
|
||||
if (!connection.registerService("org.desktopspec.Application")) {
|
||||
if (!connection.registerService("org.deepin.dde.Application1")) {
|
||||
qWarning() << "error: " << connection.lastError().message();
|
||||
return -1;
|
||||
}
|
||||
@ -104,11 +104,11 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
|
||||
QList<QSharedPointer<Application>> apps{ scanFiles() };
|
||||
QList<QSharedPointer<ApplicationAdaptor>> appAdapters;
|
||||
QList<QSharedPointer<Application1Adaptor>> appAdapters;
|
||||
for (const QSharedPointer<Application> app : apps) {
|
||||
QSharedPointer<ApplicationAdaptor> adapter = QSharedPointer<ApplicationAdaptor>(new ApplicationAdaptor(app.get()));
|
||||
QSharedPointer<Application1Adaptor> adapter = QSharedPointer<Application1Adaptor>(new Application1Adaptor(app.get()));
|
||||
appAdapters << adapter;
|
||||
if (!connection.registerObject(app->path().path(), "org.desktopspec.Application", app.get())) {
|
||||
if (!connection.registerObject(app->path().path(), "org.deepin.dde.Application1", app.get())) {
|
||||
qWarning() << "error: " << connection.lastError().message();
|
||||
continue;
|
||||
}
|
||||
@ -120,13 +120,13 @@ int main(int argc, char *argv[])
|
||||
|
||||
MimeApp* mimeApp = new MimeApp;
|
||||
|
||||
new MimeAdaptor(mimeApp);
|
||||
if (!connection.registerService("org.deepin.daemon.Mime1")) {
|
||||
new Mime1Adaptor(mimeApp);
|
||||
if (!connection.registerService("org.deepin.dde.Mime1")) {
|
||||
qWarning() << "error: " << connection.lastError().message();
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (!connection.registerObject("/org/deepin/daemon/Mime1", "org.deepin.daemon.Mime1", mimeApp)) {
|
||||
if (!connection.registerObject("/org/deepin/dde/Mime1", "org.deepin.dde.Mime1", mimeApp)) {
|
||||
qWarning() << "error: " << connection.lastError().message();
|
||||
return -1;
|
||||
}
|
||||
|
@ -27,8 +27,8 @@
|
||||
#include <QDBusInterface>
|
||||
#include <QDBusConnectionInterface>
|
||||
|
||||
const QString syncDBusService = "org.deepin.sync.Config1";
|
||||
const QString syncDBusObject = "/org/deepin/sync/Config1";
|
||||
const QString syncDBusService = "org.deepin.dde.Sync1.Config";
|
||||
const QString syncDBusObject = "/org/deepin/dde/Sync1/Config";
|
||||
const QString syncDBusDaemonService = "com.deepin.sync.Daemon";
|
||||
const QString syncDBusDaemonObject = "/com/deepin/sync/Daemon";
|
||||
const QString syncDBusDaemonInterface = syncDBusDaemonService;
|
||||
@ -82,13 +82,13 @@ SynConfig::SynConfig(QObject *parent)
|
||||
QDBusConnection con = QDBusConnection::sessionBus();
|
||||
if (!con.registerService(syncDBusService))
|
||||
{
|
||||
qCritical() << "register service org.deepin.sync.Config1 error:" << con.lastError().message();
|
||||
qCritical() << "register service org.deepin.dde.Sync1.Config error:" << con.lastError().message();
|
||||
return;
|
||||
}
|
||||
|
||||
if (!con.registerObject(syncDBusObject, this, QDBusConnection::ExportAllSlots | QDBusConnection::ExportAllSignals))
|
||||
{
|
||||
qCritical() << "register object /org/deepin/sync/Config1 error:" << con.lastError().message();
|
||||
qCritical() << "register object /org/deepin/dde/Sync1/Config error:" << con.lastError().message();
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -30,7 +30,7 @@
|
||||
class SynConfig final : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_CLASSINFO("D-Bus Interface", "org.deepin.sync.Config1")
|
||||
Q_CLASSINFO("D-Bus Interface", "org.deepin.dde.Sync1.Config")
|
||||
public:
|
||||
// 实例
|
||||
static SynConfig *instance(QObject *parent = nullptr);
|
||||
|
Loading…
Reference in New Issue
Block a user