BluezQt 5.109.0
Public Member Functions | List of all members
BluezQt::TPendingCall< T >

Pending method call (template version). More...

#include <BluezQt/TPendingCall>

Public Member Functions

template<int Index>
const Select< Index, T... >::Type valueAt () const
 Returns a return value at given index of the call.
 
- Public Member Functions inherited from BluezQt::PendingCall
 ~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.
 

Additional Inherited Members

- Public Types inherited from BluezQt::PendingCall
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 inherited from BluezQt::PendingCall
int error
 
QString errorText
 
bool isFinished
 
QVariant userData
 
QVariant value
 
QVariantList values
 
- Signals inherited from BluezQt::PendingCall
void finished (PendingCall *call)
 Indicates that the call have finished.
 

Detailed Description

template<class... T>
class BluezQt::TPendingCall< T >

Pending method call (template version).

This class represents a pending method call. It is a convenient wrapper around QDBusPendingReply and QDBusPendingCallWatcher. The TPendingCall is a template class whose parameters are the types that will be used to extract the contents of the reply's data.

Member Function Documentation

◆ valueAt()

template<class... T>
template<int Index>
const Select< Index, T... >::Type BluezQt::TPendingCall< T >::valueAt ( ) const
inline

Returns a return value at given index of the call.

Returns the return value at position Index (which is a template parameter) cast to type Type. This function uses template code to determine the proper Type type, according to the type list used in the construction of this object.

Returns
return value at index