Home · All Classes · All Namespaces · Modules · Functions · Files
Public Slots | Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
Tp::Client::ChannelInterfaceCaptchaAuthenticationInterface Class Reference

#include <TelepathyQt/Channel>

Inheritance diagram for Tp::Client::ChannelInterfaceCaptchaAuthenticationInterface:
Inheritance graph
[legend]

Public Slots

QDBusPendingReply
< Tp::CaptchaInfoList, uint,
QString
GetCaptchas (int timeout=-1)
 
QDBusPendingReply< QByteArrayGetCaptchaData (uint ID, const QString &mimeType, int timeout=-1)
 
QDBusPendingReply AnswerCaptchas (const Tp::CaptchaAnswers &answers, int timeout=-1)
 
QDBusPendingReply CancelCaptcha (uint reason, const QString &debugMessage, int timeout=-1)
 

Public Member Functions

 ChannelInterfaceCaptchaAuthenticationInterface (const QString &busName, const QString &objectPath, QObject *parent=0)
 
 ChannelInterfaceCaptchaAuthenticationInterface (const QDBusConnection &connection, const QString &busName, const QString &objectPath, QObject *parent=0)
 
 ChannelInterfaceCaptchaAuthenticationInterface (Tp::DBusProxy *proxy)
 
 ChannelInterfaceCaptchaAuthenticationInterface (const Tp::Client::ChannelInterface &mainInterface)
 
 ChannelInterfaceCaptchaAuthenticationInterface (const Tp::Client::ChannelInterface &mainInterface, QObject *parent)
 
Tp::PendingVariantrequestPropertyCanRetryCaptcha () const
 
Tp::PendingVariantrequestPropertyCaptchaStatus () const
 
Tp::PendingVariantrequestPropertyCaptchaError () const
 
Tp::PendingVariantrequestPropertyCaptchaErrorDetails () const
 
Tp::PendingVariantMaprequestAllProperties () const
 
- Public Member Functions inherited from Tp::AbstractInterface
virtual ~AbstractInterface ()
 
bool isValid () const
 
QString invalidationReason () const
 
QString invalidationMessage () const
 
void setMonitorProperties (bool monitorProperties)
 
bool isMonitoringProperties () const
 
- Public Member Functions inherited from QDBusAbstractInterface
virtual  ~QDBusAbstractInterface ()
 
bool isValid () const
 
QDBusConnection connection () const
 
QString service () const
 
QString path () const
 
QString interface () const
 
QDBusError lastError () const
 
void setTimeout (int timeout)
 
int timeout () const
 
QDBusMessage call (const QString &method, const QVariant &arg1, const QVariant &arg2, const QVariant &arg3, const QVariant &arg4, const QVariant &arg5, const QVariant &arg6, const QVariant &arg7, const QVariant &arg8)
 
QDBusMessage call (QDBus::CallMode mode, const QString &method, const QVariant &arg1, const QVariant &arg2, const QVariant &arg3, const QVariant &arg4, const QVariant &arg5, const QVariant &arg6, const QVariant &arg7, const QVariant &arg8)
 
QDBusMessage callWithArgumentList (QDBus::CallMode mode, const QString &method, const QList< QVariant > &args)
 
bool callWithCallback (const QString &method, const QList< QVariant > &args, QObject *receiver, const char *returnMethod, const char *errorMethod)
 
bool callWithCallback (const QString &method, const QList< QVariant > &args, QObject *receiver, const char *slot)
 
QDBusPendingCall asyncCall (const QString &method, const QVariant &arg1, const QVariant &arg2, const QVariant &arg3, const QVariant &arg4, const QVariant &arg5, const QVariant &arg6, const QVariant &arg7, const QVariant &arg8)
 
QDBusPendingCall asyncCallWithArgumentList (const QString &method, const QList< QVariant > &args)
 
- Public Member Functions inherited from QObject
 QObject (QObject *parent)
 
virtual  ~QObject ()
 
virtual bool event (QEvent *e)
 
virtual bool eventFilter (QObject *watched, QEvent *event)
 
virtual const QMetaObjectmetaObject () const
 
QString objectName () const
 
void setObjectName (const QString &name)
 
bool isWidgetType () const
 
bool signalsBlocked () const
 
bool blockSignals (bool block)
 
QThreadthread () const
 
void moveToThread (QThread *targetThread)
 
int startTimer (int interval)
 
void killTimer (int id)
 
findChild (const QString &name) const
 
QList< T > findChildren (const QString &name) const
 
QList< T > findChildren (const QRegExp &regExp) const
 
QObjectchild (const char *objName, const char *inheritsClass, bool recursiveSearch) const
 
const QObjectList & children () const
 
void setParent (QObject *parent)
 
void installEventFilter (QObject *filterObj)
 
void removeEventFilter (QObject *obj)
 
bool connect (const QObject *sender, const char *signal, const char *method, Qt::ConnectionType type) const
 
bool disconnect (const char *signal, const QObject *receiver, const char *method)
 
bool disconnect (const QObject *receiver, const char *method)
 
void dumpObjectTree ()
 
void dumpObjectInfo ()
 
bool setProperty (const char *name, const QVariant &value)
 
QVariant property (const char *name) const
 
QList< QByteArraydynamicPropertyNames () const
 
void destroyed (QObject *obj)
 
QObjectparent () const
 
bool inherits (const char *className) const
 
void deleteLater ()
 
 QObject (QObject *parent, const char *name)
 
void insertChild (QObject *object)
 
void removeChild (QObject *object)
 
bool isA (const char *className) const
 
const char * className () const
 
const char * name () const
 
const char * name (const char *defaultName) const
 
void setName (const char *name)
 

Static Public Member Functions

static QLatin1String staticInterfaceName ()
 
- Static Public Member Functions inherited from QObject
QString tr (const char *sourceText, const char *disambiguation, int n)
 
QString trUtf8 (const char *sourceText, const char *disambiguation, int n)
 
bool connect (const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
 
bool connect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method, Qt::ConnectionType type)
 
bool disconnect (const QObject *sender, const char *signal, const QObject *receiver, const char *method)
 
bool disconnect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method)
 

Protected Member Functions

virtual void invalidate (Tp::DBusProxy *, const QString &, const QString &)
 
- Protected Member Functions inherited from Tp::AbstractInterface
 AbstractInterface (DBusProxy *proxy, const QLatin1String &interface)
 
 AbstractInterface (const QString &busName, const QString &path, const QLatin1String &interface, const QDBusConnection &connection, QObject *parent)
 
PendingVariantinternalRequestProperty (const QString &name) const
 
PendingOperationinternalSetProperty (const QString &name, const QVariant &newValue)
 
PendingVariantMapinternalRequestAllProperties () const
 
- Protected Member Functions inherited from QObject
QObjectsender () const
 
int senderSignalIndex () const
 
int receivers (const char *signal) const
 
virtual void timerEvent (QTimerEvent *event)
 
virtual void childEvent (QChildEvent *event)
 
virtual void customEvent (QEvent *event)
 
virtual void connectNotify (const char *signal)
 
virtual void disconnectNotify (const char *signal)
 
bool checkConnectArgs (const char *signal, const QObject *object, const char *method)
 

Additional Inherited Members

- Signals inherited from Tp::AbstractInterface
void propertiesChanged (const QVariantMap &changedProperties, const QStringList &invalidatedProperties)
 
- Protected Slots inherited from Tp::AbstractInterface
- Static Protected Member Functions inherited from QObject
QByteArray normalizeSignalSlot (const char *signalSlot)
 
- Properties inherited from QObject
 objectName
 

Detailed Description

Proxy class providing a 1:1 mapping of the D-Bus interface "org.freedesktop.Telepathy.Channel.Interface.CaptchaAuthentication1".

Constructor & Destructor Documentation

Tp::Client::ChannelInterfaceCaptchaAuthenticationInterface::ChannelInterfaceCaptchaAuthenticationInterface ( const QString busName,
const QString objectPath,
QObject parent = 0 
)

Creates a ChannelInterfaceCaptchaAuthenticationInterface associated with the given object on the session bus.

Parameters
busNameName of the service the object is on.
objectPathPath to the object on the service.
parentPassed to the parent class constructor.
Tp::Client::ChannelInterfaceCaptchaAuthenticationInterface::ChannelInterfaceCaptchaAuthenticationInterface ( const QDBusConnection connection,
const QString busName,
const QString objectPath,
QObject parent = 0 
)

Creates a ChannelInterfaceCaptchaAuthenticationInterface associated with the given object on the given bus.

Parameters
connectionThe bus via which the object can be reached.
busNameName of the service the object is on.
objectPathPath to the object on the service.
parentPassed to the parent class constructor.
Tp::Client::ChannelInterfaceCaptchaAuthenticationInterface::ChannelInterfaceCaptchaAuthenticationInterface ( Tp::DBusProxy proxy)

Creates a ChannelInterfaceCaptchaAuthenticationInterface associated with the same object as the given proxy.

Parameters
proxyThe proxy to use. It will also be the QObject::parent() for this object.
Tp::Client::ChannelInterfaceCaptchaAuthenticationInterface::ChannelInterfaceCaptchaAuthenticationInterface ( const Tp::Client::ChannelInterface mainInterface)
explicit

Creates a ChannelInterfaceCaptchaAuthenticationInterface associated with the same object as the given proxy. Additionally, the created proxy will have the same parent as the given proxy.

Parameters
mainInterfaceThe proxy to use.
Tp::Client::ChannelInterfaceCaptchaAuthenticationInterface::ChannelInterfaceCaptchaAuthenticationInterface ( const Tp::Client::ChannelInterface mainInterface,
QObject parent 
)

Creates a ChannelInterfaceCaptchaAuthenticationInterface associated with the same object as the given proxy. However, a different parent object can be specified.

Parameters
mainInterfaceThe proxy to use.
parentPassed to the parent class constructor.

Member Function Documentation

static QLatin1String Tp::Client::ChannelInterfaceCaptchaAuthenticationInterface::staticInterfaceName ( )
inlinestatic

Returns the name of the interface "org.freedesktop.Telepathy.Channel.Interface.CaptchaAuthentication1", which this class represents.

Returns
The D-Bus interface name.
Tp::PendingVariant* Tp::Client::ChannelInterfaceCaptchaAuthenticationInterface::requestPropertyCanRetryCaptcha ( ) const
inline

Asynchronous getter for the remote object property CanRetryCaptcha of type bool.

If true, GetCaptchas() can be expected to return new captcha information when in the Local_Pending state. If false, GetCaptchas() will return NotAvailable on subsequent calls.

Refreshing the captcha isn't required to work, although some protocols and implementations allow it. This is usually done in case a given captcha is unintelligible.

Returns
A pending variant which will emit finished when the property has been retrieved.
Tp::PendingVariant* Tp::Client::ChannelInterfaceCaptchaAuthenticationInterface::requestPropertyCaptchaStatus ( ) const
inline

Asynchronous getter for the remote object property CaptchaStatus of type uint.

The current status of this channel.

Because only the Handler should call methods on this interface, the Handler MAY reduce round-trips by not fetching the initial value of this property, and instead assume that is initially Local_Pending.

This assumption normally avoids the need to call GetAll(), since the values of CaptchaError and CaptchaErrorDetails are also implied by this assumption, and the only other property is CanRetryCaptcha , which is immutable.

Returns
A pending variant which will emit finished when the property has been retrieved.
Tp::PendingVariant* Tp::Client::ChannelInterfaceCaptchaAuthenticationInterface::requestPropertyCaptchaError ( ) const
inline

Asynchronous getter for the remote object property CaptchaError of type QString.

The reason for the CaptchaStatus , or an empty string if the state is neither Try_Again nor Failed.

Typical values: "", Cancelled, AuthenticationFailed, CaptchaNotSupported

In particular, an ordinary authentication failure (as would be produced for an incorrect answer) SHOULD be represented by AuthenticationFailed, cancellation by the user's request SHOULD be represented by Cancelled, cancellation due to the inability to display the captcha to the user or otherwise answer it SHOULD be represented by CaptchaNotSupported, and cancellation by a local process due to inconsistent or invalid challenges from the server SHOULD be represented by ServiceConfused.

If this interface appears on a ChannelTypeServerAuthenticationInterface channel, and connection to the server fails with an authentication failure, this error code SHOULD be copied into the ConnectionInterface::ConnectionError() signal.

Returns
A pending variant which will emit finished when the property has been retrieved.
Tp::PendingVariant* Tp::Client::ChannelInterfaceCaptchaAuthenticationInterface::requestPropertyCaptchaErrorDetails ( ) const
inline

Asynchronous getter for the remote object property CaptchaErrorDetails of type QVariantMap.

If CaptchaError is non-empty, any additional information about the last disconnection; otherwise, the empty map. The keys and values are the same as for the second argument of ConnectionInterface::ConnectionError() .

If this interface appears on a ChannelTypeServerAuthenticationInterface channel, and connection to the server fails with an authentication failure, these details SHOULD be copied into the ConnectionInterface::ConnectionError() signal.

Returns
A pending variant which will emit finished when the property has been retrieved.
Tp::PendingVariantMap* Tp::Client::ChannelInterfaceCaptchaAuthenticationInterface::requestAllProperties ( ) const
inline

Request all of the DBus properties on the interface.

Returns
A pending variant map which will emit finished when the properties have been retrieved.
QDBusPendingReply<Tp::CaptchaInfoList, uint, QString> Tp::Client::ChannelInterfaceCaptchaAuthenticationInterface::GetCaptchas ( int  timeout = -1)
inlineslot

Begins a call to the D-Bus method GetCaptchas on the remote object.

Gets information regarding each of the captcha methods available and which and how many need to be successfully answered

To call this method successfully, the state must be Local_Pending or Try_Again. If it is Local_Pending, it remains Local_Pending. If called more than once while in Local_Pending state, or if the state is Try_Again, this method fetches a new set of captcha challenges, if possible, and the state returns to Local_Pending.

For instance, you could call GetCaptchas again from Local_Pending state if the user indicates that they can't understand the initially-offered captcha.

This is a method, not a property, so that it can be used to fetch more than one set of captcha challenges, and so that change notification is not required. Only the Handler should call this method and calling GetAll would not reduce round-trips, so the usual reasons to prefer a property do not apply here.

Note that timeout is ignored as of now. It will be used once http://bugreports.qt.nokia.com/browse/QTBUG-11775 is fixed.

Parameters
timeoutThe timeout in milliseconds.
Returns

Information about each of the available captcha methods.

Returns

The number of captcha methods required to be answered in order to successfully complete this captcha challenge (most frequently 1, but XMPP allows servers to demand that more than one captcha is answered).

Returns

The language of each Label in Captcha_Info if available, for instance en_US, or "" if unknown.

QDBusPendingReply<QByteArray> Tp::Client::ChannelInterfaceCaptchaAuthenticationInterface::GetCaptchaData ( uint  ID,
const QString mimeType,
int  timeout = -1 
)
inlineslot

Begins a call to the D-Bus method GetCaptchaData on the remote object.

Fetch and return the captcha data. In protocols where captchas are downloaded out-of-band (for instance via HTTP), the connection manager is expected to do so.

Returns an empty array if the type was "qa"

If audio-based and image-based captchas are both available, we don't want to waste time downloading the audio until/unless the user asks to hear it. The extra D-Bus round-trips are not a problem, since they are expected to be quick compared with the time taken for the user to solve the captcha.

Note that timeout is ignored as of now. It will be used once http://bugreports.qt.nokia.com/browse/QTBUG-11775 is fixed.

Parameters
ID
The ID of the captcha of which to retrieve data.
mimeType
MIME type picked by the Handler, chosen from the list of MIME types 
received in GetCaptchas. XEP-0158 allows the same captcha to be 
made available in multiple formats, for instance the same spoken 
question as audio/x-wav, application/ogg and audio/speex.
timeoutThe timeout in milliseconds.
Returns
Captcha data as requested.
QDBusPendingReply Tp::Client::ChannelInterfaceCaptchaAuthenticationInterface::AnswerCaptchas ( const Tp::CaptchaAnswers answers,
int  timeout = -1 
)
inlineslot

Begins a call to the D-Bus method AnswerCaptchas on the remote object.

Answer as many captchas as desired and/or required.

Callable in state Local_Pending only. State changes to Remote_Pending.

Note that timeout is ignored as of now. It will be used once http://bugreports.qt.nokia.com/browse/QTBUG-11775 is fixed.

Parameters
answers
The mapping of captcha IDs to answer strings.
timeoutThe timeout in milliseconds.
QDBusPendingReply Tp::Client::ChannelInterfaceCaptchaAuthenticationInterface::CancelCaptcha ( uint  reason,
const QString debugMessage,
int  timeout = -1 
)
inlineslot

Begins a call to the D-Bus method CancelCaptcha on the remote object.

Cancel. State changes to Failed with error NotAvailable or Cancelled if it isn't already Failed. All you can do now is to close the channel.

Note that timeout is ignored as of now. It will be used once http://bugreports.qt.nokia.com/browse/QTBUG-11775 is fixed.

Parameters
reason
Reason for cancelling. This MAY be used to choose an error response 
to the remote server, and SHOULD also be reflected in the 
CaptchaError.
debugMessage
A textual description of the reason for cancelling, supplied by the 
Handler. This message SHOULD NOT be sent to the remote server, but 
SHOULD be copied into the &apos;debug-message&apos; field of the 
CaptchaErrorDetails and ConnectionError.
timeoutThe timeout in milliseconds.
void Tp::Client::ChannelInterfaceCaptchaAuthenticationInterface::invalidate ( Tp::DBusProxy proxy,
const QString error,
const QString message 
)
protectedvirtual

Reimplemented from Tp::AbstractInterface.


Copyright © 2008-2011 Collabora Ltd. and Nokia Corporation
Telepathy-Qt 0.9.4