LeechCraft 0.6.70-18808-g3467692359
Modular cross-platform feature rich live environment.
Loading...
Searching...
No Matches
async.cpp
Go to the documentation of this file.
1/**********************************************************************
2 * LeechCraft - modular cross-platform feature rich internet client.
3 * Copyright (C) 2006-2014 Georg Rudoy
4 *
5 * Distributed under the Boost Software License, Version 1.0.
6 * (See accompanying file LICENSE or copy at https://www.boost.org/LICENSE_1_0.txt)
7 **********************************************************************/
8
9#include "async.h"
10#include <QDBusMessage>
11#include <QDBusPendingCall>
12#include <util/sll/qtutil.h>
13
15{
16 AsyncReply<QVariant> Endpoint::GetRawProperty (const QString& property) const
17 {
18 auto msg = QDBusMessage::createMethodCall (Service,
19 Path,
20 "org.freedesktop.DBus.Properties"_qs,
21 "Get"_qs);
22 msg << Interface << property;
23 return { Conn.asyncCall (msg) };
24 }
25
27 {
28 auto msg = QDBusMessage::createMethodCall (Service,
29 Path,
30 "org.freedesktop.DBus.Properties"_qs,
31 "GetAll"_qs);
32 msg << Interface;
33 return { Conn.asyncCall (msg) };
34 }
35
36 AsyncReply<> StartService (const QDBusConnection& conn, const QString& name)
37 {
38 auto msg = QDBusMessage::createMethodCall ("org.freedesktop.DBus"_qs,
39 "/org/freedesktop/DBus"_qs,
40 "org.freedesktop.DBus"_qs,
41 "StartServiceByName"_qs);
42 msg << name << 0u;
43 return { conn.asyncCall (msg) };
44 }
45}
AsyncReply StartService(const QDBusConnection &conn, const QString &name)
Definition async.cpp:36
UTIL_DBUS_API AsyncReply< QVariantMap > GetAllProperties() const
Definition async.cpp:26
UTIL_DBUS_API AsyncReply< QVariant > GetRawProperty(const QString &property) const
Definition async.cpp:16
QDBusConnection Conn
Definition async.h:27