Warning, file /frameworks/bluez-qt/src/obexobjectpush.cpp was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).

0001 /*
0002  * BluezQt - Asynchronous Bluez wrapper library
0003  *
0004  * SPDX-FileCopyrightText: 2014 David Rosca <nowrep@gmail.com>
0005  *
0006  * SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
0007  */
0008 
0009 #include "obexobjectpush.h"
0010 #include "pendingcall.h"
0011 #include "utils.h"
0012 
0013 #include "obexobjectpush1.h"
0014 
0015 namespace BluezQt
0016 {
0017 typedef org::bluez::obex::ObjectPush1 BluezObjectPush;
0018 
0019 class ObexObjectPushPrivate
0020 {
0021 public:
0022     ObexObjectPush *q;
0023     BluezObjectPush *m_bluezObjectPush;
0024 };
0025 
0026 ObexObjectPush::ObexObjectPush(const QDBusObjectPath &path, QObject *parent)
0027     : QObject(parent)
0028     , d(new ObexObjectPushPrivate)
0029 {
0030     d->m_bluezObjectPush = new BluezObjectPush(Strings::orgBluezObex(), path.path(), DBusConnection::orgBluezObex(), this);
0031 }
0032 
0033 ObexObjectPush::~ObexObjectPush() = default;
0034 
0035 QDBusObjectPath ObexObjectPush::objectPath() const
0036 {
0037     return QDBusObjectPath(d->m_bluezObjectPush->path());
0038 }
0039 
0040 PendingCall *ObexObjectPush::sendFile(const QString &fileName)
0041 {
0042     return new PendingCall(d->m_bluezObjectPush->SendFile(fileName), PendingCall::ReturnTransferWithProperties, this);
0043 }
0044 
0045 PendingCall *ObexObjectPush::pullBusinessCard(const QString &targetFileName)
0046 {
0047     return new PendingCall(d->m_bluezObjectPush->PullBusinessCard(targetFileName), PendingCall::ReturnTransferWithProperties, this);
0048 }
0049 
0050 PendingCall *ObexObjectPush::exchangeBusinessCards(const QString &clientFileName, const QString &targetFileName)
0051 {
0052     return new PendingCall(d->m_bluezObjectPush->ExchangeBusinessCards(clientFileName, targetFileName), PendingCall::ReturnTransferWithProperties, this);
0053 }
0054 
0055 } // namespace BluezQt
0056 
0057 #include "moc_obexobjectpush.cpp"