1/*
2 * BluezQt - Asynchronous Bluez wrapper library
3 *
4 * SPDX-FileCopyrightText: 2014 David Rosca <nowrep@gmail.com>
5 *
6 * SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
7 */
8
9#include "obexobjectpush.h"
10#include "pendingcall.h"
11#include "utils.h"
12
13#include "obexobjectpush1.h"
14
15namespace BluezQt
16{
17typedef org::bluez::obex::ObjectPush1 BluezObjectPush;
18
19class ObexObjectPushPrivate
20{
21public:
22 ObexObjectPush *q;
23 BluezObjectPush *m_bluezObjectPush;
24};
25
26ObexObjectPush::ObexObjectPush(const QDBusObjectPath &path, QObject *parent)
27 : QObject(parent)
28 , d(new ObexObjectPushPrivate)
29{
30 d->m_bluezObjectPush = new BluezObjectPush(Strings::orgBluezObex(), path.path(), DBusConnection::orgBluezObex(), this);
31}
32
33ObexObjectPush::~ObexObjectPush() = default;
34
35QDBusObjectPath ObexObjectPush::objectPath() const
36{
37 return QDBusObjectPath(d->m_bluezObjectPush->path());
38}
39
40PendingCall *ObexObjectPush::sendFile(const QString &fileName)
41{
42 return new PendingCall(d->m_bluezObjectPush->SendFile(sourcefile: fileName), PendingCall::ReturnTransferWithProperties, this);
43}
44
45PendingCall *ObexObjectPush::pullBusinessCard(const QString &targetFileName)
46{
47 return new PendingCall(d->m_bluezObjectPush->PullBusinessCard(targetfile: targetFileName), PendingCall::ReturnTransferWithProperties, this);
48}
49
50PendingCall *ObexObjectPush::exchangeBusinessCards(const QString &clientFileName, const QString &targetFileName)
51{
52 return new PendingCall(d->m_bluezObjectPush->ExchangeBusinessCards(clientfile: clientFileName, targetfile: targetFileName), PendingCall::ReturnTransferWithProperties, this);
53}
54
55} // namespace BluezQt
56
57#include "moc_obexobjectpush.cpp"
58

source code of bluez-qt/src/obexobjectpush.cpp