9#ifndef BLUEZQT_PENDINGCALL_H
10#define BLUEZQT_PENDINGCALL_H
16#include "bluezqt_export.h"
19class QDBusPendingCall;
20class QDBusPendingCallWatcher;
36 Q_PROPERTY(QVariant value READ value)
37 Q_PROPERTY(QVariantList values READ values)
38 Q_PROPERTY(
int error READ error)
39 Q_PROPERTY(QString errorText READ errorText)
40 Q_PROPERTY(
bool isFinished READ isFinished)
41 Q_PROPERTY(QVariant userData READ userData WRITE setUserData)
69 AlreadyConnected = 10,
79 AuthenticationCanceled = 15,
81 AuthenticationFailed = 16,
83 AuthenticationRejected = 17,
85 AuthenticationTimeout = 18,
87 ConnectionAttemptFailed = 19,
176 ReturnFileTransferList,
177 ReturnTransferWithProperties,
181 BLUEZQT_NO_EXPORT
explicit PendingCall(Error error,
const QString &errorText, QObject *parent =
nullptr);
182 BLUEZQT_NO_EXPORT
explicit PendingCall(
const QDBusPendingCall &call, ReturnType type, QObject *parent =
nullptr);
185 using ErrorProcessor = std::function<void(
const QDBusError &error)>;
186 using ExternalProcessor = std::function<void(QDBusPendingCallWatcher *watcher, ErrorProcessor errorProcessor, QVariantList *values)>;
187 explicit PendingCall(
const QDBusPendingCall &call, ExternalProcessor externalProcessor, QObject *parent =
nullptr);
189 class PendingCallPrivate *
const d;
191 friend class PendingCallPrivate;
194 friend class GattServiceRemote;
Bluetooth adapter.
Definition adapter.h:33
Bluetooth device.
Definition device.h:32
Bluetooth LE GATT characteristic.
Definition gattcharacteristicremote.h:32
Bluetooth LE GATT descriptor.
Definition gattdescriptorremote.h:32
Bluetooth GattManager.
Definition gattmanager.h:45
Bluetooth LE advertising manager.
Definition leadvertisingmanager.h:33
Bluetooth manager.
Definition manager.h:78
OBEX file transfer.
Definition obexfiletransfer.h:31
OBEX manager.
Definition obexmanager.h:38
OBEX object push.
Definition obexobjectpush.h:30
OBEX session.
Definition obexsession.h:31
Pending method call.
Definition pendingcall.h:33
QVariant value() const
Returns a first return value of the call.
int error() const
Returns an error code.
~PendingCall() override
Destroys a PendingCall object.
QVariant userData() const
Returns the user data of the call.
bool isFinished() const
Returns whether the call is finished.
QVariantList values() const
Returns all values of the call.
void finished(PendingCall *call)
Indicates that the call have finished.
QString errorText() const
Returns an error text.
Error
Known error types.
Definition pendingcall.h:47
void setUserData(const QVariant &userData)
Sets the user data of the call.
void waitForFinished()
Waits for the call to finish.
Pending method call (template version).
Definition tpendingcall.h:34