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

#include <TelepathyQt/Channel>

Inherits Tp::AbstractInterface.

List of all members.

Public Slots

Public Member Functions

Static Public Member Functions

Protected Member Functions


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.

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.

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.

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

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

Returns:
The D-Bus interface name.

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.

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.

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.

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.

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) [inline, slot]

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 
) [inline, slot]

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:
IDThe ID of the captcha of which to retrieve data.
mimeTypeMIME 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 
) [inline, slot]

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:
answersThe mapping of captcha IDs to answer strings.
timeoutThe timeout in milliseconds.
QDBusPendingReply Tp::Client::ChannelInterfaceCaptchaAuthenticationInterface::CancelCaptcha ( uint  reason,
const QString &  debugMessage,
int  timeout = -1 
) [inline, slot]

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:
reasonReason for cancelling. This MAY be used to choose an error response to the remote server, and SHOULD also be reflected in the CaptchaError.
debugMessageA 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 'debug-message' field of the CaptchaErrorDetails and ConnectionError.
timeoutThe timeout in milliseconds.
void Tp::Client::ChannelInterfaceCaptchaAuthenticationInterface::invalidate ( Tp::DBusProxy proxy,
const QString &  error,
const QString &  message 
) [protected, virtual]

Reimplemented from Tp::AbstractInterface.


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