Home · All Classes · All Namespaces · Modules · Functions · Files |
#include <TelepathyQt/Channel>
Inherits Tp::AbstractInterface.
Public Slots | |
QDBusPendingReply< Tp::CaptchaInfoList, uint, QString > | GetCaptchas (int timeout=-1) |
QDBusPendingReply< QByteArray > | GetCaptchaData (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) |
Static Public Member Functions | |
static QLatin1String | staticInterfaceName () |
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) | |
PendingVariant * | internalRequestProperty (const QString &name) const |
PendingOperation * | internalSetProperty (const QString &name, const QVariant &newValue) |
PendingVariantMap * | internalRequestAllProperties () const |
Additional Inherited Members | |
Signals inherited from Tp::AbstractInterface | |
void | propertiesChanged (const QVariantMap &changedProperties, const QStringList &invalidatedProperties) |
Protected Slots inherited from Tp::AbstractInterface |
Proxy class providing a 1:1 mapping of the D-Bus interface "org.freedesktop.Telepathy.Channel.Interface.CaptchaAuthentication1".
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.
busName | Name of the service the object is on. |
objectPath | Path to the object on the service. |
parent | Passed 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.
connection | The bus via which the object can be reached. |
busName | Name of the service the object is on. |
objectPath | Path to the object on the service. |
parent | Passed to the parent class constructor. |
Tp::Client::ChannelInterfaceCaptchaAuthenticationInterface::ChannelInterfaceCaptchaAuthenticationInterface | ( | Tp::DBusProxy * | proxy | ) |
Creates a ChannelInterfaceCaptchaAuthenticationInterface associated with the same object as the given proxy.
proxy | The proxy to use. It will also be the QObject::parent() for this object. |
|
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.
mainInterface | The 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.
mainInterface | The proxy to use. |
parent | Passed to the parent class constructor. |
|
inlinestatic |
Returns the name of the interface "org.freedesktop.Telepathy.Channel.Interface.CaptchaAuthentication1", which this class represents.
|
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.
|
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.
|
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
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.
|
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.
|
inline |
Request all of the DBus properties on the interface.
|
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.
timeout | The timeout in milliseconds. |
Information about each of the available captcha methods.
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).
The language of each Label in Captcha_Info if available, for instance en_US, or "" if unknown.
|
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.
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. |
timeout | The timeout in milliseconds. |
Captcha data as requested.
|
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.
answers | The mapping of captcha IDs to answer strings. |
timeout | The timeout in milliseconds. |
|
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.
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 'debug-message' field of the CaptchaErrorDetails and ConnectionError. |
timeout | The timeout in milliseconds. |
|
protectedvirtual |
Reimplemented from Tp::AbstractInterface.
Copyright © 2008-2011 Collabora Ltd. and Nokia Corporation | Telepathy-Qt 0.9.7 |