BluezQt

obexobjectpush.cpp
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
27 : QObject(parent)
28 , d(new ObexObjectPushPrivate)
29{
30 d->m_bluezObjectPush = new BluezObjectPush(Strings::orgBluezObex(), path.path(), DBusConnection::orgBluezObex(), this);
31}
32
34
36{
37 return QDBusObjectPath(d->m_bluezObjectPush->path());
38}
39
41{
42 return new PendingCall(d->m_bluezObjectPush->SendFile(fileName), PendingCall::ReturnTransferWithProperties, this);
43}
44
46{
47 return new PendingCall(d->m_bluezObjectPush->PullBusinessCard(targetFileName), PendingCall::ReturnTransferWithProperties, this);
48}
49
50PendingCall *ObexObjectPush::exchangeBusinessCards(const QString &clientFileName, const QString &targetFileName)
51{
52 return new PendingCall(d->m_bluezObjectPush->ExchangeBusinessCards(clientFileName, targetFileName), PendingCall::ReturnTransferWithProperties, this);
53}
54
55} // namespace BluezQt
56
57#include "moc_obexobjectpush.cpp"
ObexObjectPush(const QDBusObjectPath &path, QObject *parent=nullptr)
Creates a new ObexObjectPush object.
PendingCall * sendFile(const QString &fileName)
Sends one local file to the remote device.
PendingCall * pullBusinessCard(const QString &targetFileName)
Pulls the business card from a remote device.
PendingCall * exchangeBusinessCards(const QString &clientFileName, const QString &targetFileName)
Exchanges the business cards on the remote device.
~ObexObjectPush() override
Destroys an ObexObjectPush object.
QDBusObjectPath objectPath() const
D-Bus object path of the object push session.
Pending method call.
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:08:46 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.