Changeset View
Changeset View
Standalone View
Standalone View
src/plugin/kdbusservicestarter.h
Show All 19 Lines | |||||
20 | #define KDBUSSERVICESTARTER_H | 20 | #define KDBUSSERVICESTARTER_H | ||
21 | 21 | | |||
22 | #include <kservice_export.h> | 22 | #include <kservice_export.h> | ||
23 | 23 | | |||
24 | #include <QString> | 24 | #include <QString> | ||
25 | 25 | | |||
26 | class KDBusServiceStarterPrivate; | 26 | class KDBusServiceStarterPrivate; | ||
27 | 27 | | |||
28 | #if KSERVICE_ENABLE_DEPRECATED_SINCE(5, 61) | ||||
28 | /** | 29 | /** | ||
29 | * @class KDBusServiceStarter kdbusservicestarter.h <KDBusServiceStarter> | 30 | * @class KDBusServiceStarter kdbusservicestarter.h <KDBusServiceStarter> | ||
30 | * | 31 | * | ||
31 | * A generic D-Bus service starter, using KServiceTypeTrader. | 32 | * A generic D-Bus service starter, using KServiceTypeTrader. | ||
32 | * The default implementation starts new processes, but this interface can | 33 | * The default implementation starts new processes, but this interface can | ||
33 | * also be reimplemented by specific applications to provide dlopened in-process D-Bus objects. | 34 | * also be reimplemented by specific applications to provide dlopened in-process D-Bus objects. | ||
34 | * This interface is similar to the startService() function found in QDBusConnectionInterface, but | 35 | * This interface is similar to the startService() function found in QDBusConnectionInterface, but | ||
35 | * with the added benefit of using KServiceTypeTrader (and, therefore, additional constraints and the | 36 | * with the added benefit of using KServiceTypeTrader (and, therefore, additional constraints and the | ||
36 | * ability to search the standard KDE dirs). | 37 | * ability to search the standard KDE dirs). | ||
37 | * @author David Faure <faure@kde.org> | 38 | * @author David Faure <faure@kde.org> | ||
38 | * | 39 | * | ||
39 | * @deprecated since 5.61, use D-Bus activation instead | 40 | * @deprecated since 5.61, use D-Bus activation instead | ||
40 | */ | 41 | */ | ||
41 | class KSERVICE_DEPRECATED_EXPORT KDBusServiceStarter //krazy:exclude=dpointer (uses Q_GLOBAL_STATIC) | 42 | class KSERVICE_EXPORT KDBusServiceStarter //krazy:exclude=dpointer (uses Q_GLOBAL_STATIC) | ||
42 | { | 43 | { | ||
43 | public: | 44 | public: | ||
44 | 45 | | |||
46 | KSERVICE_DEPRECATED_VERSION(5, 61, "Use D-Bus activation") | ||||
45 | static KDBusServiceStarter *self(); | 47 | static KDBusServiceStarter *self(); | ||
46 | 48 | | |||
47 | /** | 49 | /** | ||
48 | * Check if a given D-Bus service is available - from the serviceType it's supposed to implement. | 50 | * Check if a given D-Bus service is available - from the serviceType it's supposed to implement. | ||
49 | * | 51 | * | ||
50 | * The trader is queried to find the preferred application for this serviceType, | 52 | * The trader is queried to find the preferred application for this serviceType, | ||
51 | * with the constraint that its X-DBus-ServiceName property must be defined. | 53 | * with the constraint that its X-DBus-ServiceName property must be defined. | ||
52 | * Then the D-Bus server is checked. If the service is not available, | 54 | * Then the D-Bus server is checked. If the service is not available, | ||
▲ Show 20 Lines • Show All 41 Lines • ▼ Show 20 Line(s) | 95 | virtual int startServiceFor(const QString &serviceType, | |||
94 | const QString &constraint = QString(), | 96 | const QString &constraint = QString(), | ||
95 | QString *error = nullptr, QString *dbusService = nullptr, | 97 | QString *error = nullptr, QString *dbusService = nullptr, | ||
96 | int flags = 0); | 98 | int flags = 0); | ||
97 | protected: | 99 | protected: | ||
98 | friend class KDBusServiceStarterPrivate; | 100 | friend class KDBusServiceStarterPrivate; | ||
99 | KDBusServiceStarter(); | 101 | KDBusServiceStarter(); | ||
100 | virtual ~KDBusServiceStarter(); | 102 | virtual ~KDBusServiceStarter(); | ||
101 | }; | 103 | }; | ||
104 | #endif | ||||
102 | 105 | | |||
103 | #endif | 106 | #endif | ||
104 | 107 | |