LeechCraft
0.6.70-18808-g3467692359
Modular cross-platform feature rich live environment.
Toggle main menu visibility
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
14
namespace
LC::Util::DBus
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
26
AsyncReply<QVariantMap>
Endpoint::GetAllProperties
()
const
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
}
async.h
LC::Util::DBus
Definition
async.cpp:15
LC::Util::DBus::StartService
AsyncReply StartService(const QDBusConnection &conn, const QString &name)
Definition
async.cpp:36
qtutil.h
LC::Util::DBus::AsyncReply
Definition
dbus.h:108
LC::Util::DBus::Endpoint::Path
QString Path
Definition
async.h:25
LC::Util::DBus::Endpoint::Interface
QString Interface
Definition
async.h:26
LC::Util::DBus::Endpoint::GetAllProperties
UTIL_DBUS_API AsyncReply< QVariantMap > GetAllProperties() const
Definition
async.cpp:26
LC::Util::DBus::Endpoint::GetRawProperty
UTIL_DBUS_API AsyncReply< QVariant > GetRawProperty(const QString &property) const
Definition
async.cpp:16
LC::Util::DBus::Endpoint::Service
QString Service
Definition
async.h:24
LC::Util::DBus::Endpoint::Conn
QDBusConnection Conn
Definition
async.h:27
src
util
dbus
async.cpp
Generated by
1.17.0