BluezQt 5.109.0
Public Types | Properties | Signals | Public Member Functions | List of all members
BluezQt::PendingCall

Pending method call. More...

#include <BluezQt/PendingCall>

Public Types

enum  Error {
  NoError = 0 , NotReady = 1 , Failed = 2 , Rejected = 3 ,
  Canceled = 4 , InvalidArguments = 5 , AlreadyExists = 6 , DoesNotExist = 7 ,
  InProgress = 8 , NotInProgress = 9 , AlreadyConnected = 10 , ConnectFailed = 11 ,
  NotConnected = 12 , NotSupported = 13 , NotAuthorized = 14 , AuthenticationCanceled = 15 ,
  AuthenticationFailed = 16 , AuthenticationRejected = 17 , AuthenticationTimeout = 18 , ConnectionAttemptFailed = 19 ,
  InvalidLength = 20 , NotPermitted = 21 , DBusError = 98 , InternalError = 99 ,
  UnknownError = 100
}
 Known error types. More...
 

Properties

int error
 
QString errorText
 
bool isFinished
 
QVariant userData
 
QVariant value
 
QVariantList values
 

Signals

void finished (PendingCall *call)
 Indicates that the call have finished.
 

Public Member Functions

 ~PendingCall () override
 Destroys a PendingCall object.
 
int error () const
 Returns an error code.
 
QString errorText () const
 Returns an error text.
 
bool isFinished () const
 Returns whether the call is finished.
 
void setUserData (const QVariant &userData)
 Sets the user data of the call.
 
QVariant userData () const
 Returns the user data of the call.
 
QVariant value () const
 Returns a first return value of the call.
 
QVariantList values () const
 Returns all values of the call.
 
void waitForFinished ()
 Waits for the call to finish.
 

Detailed Description

Pending method call.

This class represents a pending method call. It is a convenient wrapper around QDBusPendingReply and QDBusPendingCallWatcher.

Member Enumeration Documentation

◆ Error

Known error types.

Enumerator
NoError 

Indicates there is no error.

NotReady 

Indicates that the device is not ready.

Failed 

Indicates that the action have failed.

Rejected 

Indicates that the action was rejected.

Canceled 

Indicates that the action was canceled.

InvalidArguments 

Indicates that invalid arguments were passed.

AlreadyExists 

Indicates that an agent or pairing record already exists.

DoesNotExist 

Indicates that an agent, service or pairing operation does not exists.

InProgress 

Indicates that the action is already in progress.

NotInProgress 

Indicates that the action is not in progress.

AlreadyConnected 

Indicates that the device is already connected.

ConnectFailed 

Indicates that the connection to the device have failed.

NotConnected 

Indicates that the device is not connected.

NotSupported 

Indicates that the action is not supported.

NotAuthorized 

Indicates that the caller is not authorized to do the action.

AuthenticationCanceled 

Indicates that the authentication was canceled.

AuthenticationFailed 

Indicates that the authentication have failed.

AuthenticationRejected 

Indicates that the authentication was rejected.

AuthenticationTimeout 

Indicates that the authentication timed out.

ConnectionAttemptFailed 

Indicates that the connection attempt have failed.

InvalidLength 

Indicates that the data provided generates a data packet which is too long.

NotPermitted 

Indicates that the action is not permitted (e.g.

maximum reached or socket locked).

DBusError 

Indicates an error with D-Bus.

InternalError 

Indicates an internal error.

UnknownError 

Indicates an unknown error.

Constructor & Destructor Documentation

◆ ~PendingCall()

BluezQt::PendingCall::~PendingCall ( )
override

Destroys a PendingCall object.

Member Function Documentation

◆ error()

int BluezQt::PendingCall::error ( ) const

Returns an error code.

Returns
error code
See also
Error

◆ errorText()

QString BluezQt::PendingCall::errorText ( ) const

Returns an error text.

Returns
error text

◆ finished

void BluezQt::PendingCall::finished ( PendingCall call)
signal

Indicates that the call have finished.

◆ isFinished()

bool BluezQt::PendingCall::isFinished ( ) const

Returns whether the call is finished.

Returns
true if call is finished

◆ setUserData()

void BluezQt::PendingCall::setUserData ( const QVariant &  userData)

Sets the user data of the call.

Parameters
userDatauser data

◆ userData()

QVariant BluezQt::PendingCall::userData ( ) const

Returns the user data of the call.

Returns
user data of call

◆ value()

QVariant BluezQt::PendingCall::value ( ) const

Returns a first return value of the call.

Returns
first return value

◆ values()

QVariantList BluezQt::PendingCall::values ( ) const

Returns all values of the call.

Returns
all return values

◆ waitForFinished()

void BluezQt::PendingCall::waitForFinished ( )

Waits for the call to finish.

Warning
This method blocks until the call finishes!