Tp::Captcha Class Reference

| Home · All Classes · All Namespaces · Modules · Functions · Files

Public Member Functions | List of all members
Tp::Captcha Class Reference

The Captcha class represents a Captcha ready to be answered. More...

`#include <TelepathyQt/Captcha>`

## Public Member Functions
| Captcha ()
| Captcha (const Captcha &other)
| ~Captcha ()
bool | isValid () const
Captcha & | operator= (const Captcha &rhs)
QString | mimeType () const
QString | label () const
QByteArray | data () const
CaptchaAuthentication::ChallengeType | type () const
uint | id () const

## Detailed Description

The Captcha class represents a Captcha ready to be answered.

It exposes all the parameters needed for a handler to present the user with a captcha.

Please note this class is meant to be read-only. It is usually created by PendingCaptchas once a Captcha request operation succeeds.

Please note that this class is implicitly shared.

## Constructor & Destructor Documentation

Tp::Captcha::Captcha | ( |  | ) |

Default constructor.

Tp::Captcha::Captcha | ( | const Captcha & | other | ) |

Copy constructor.

Tp::Captcha::~Captcha | ( |  | ) |

Class destructor.

## Member Function Documentation

bool Tp::Captcha::isValid | ( |  | ) | const
| inline

Captcha & Tp::Captcha::operator= | ( | const Captcha & | rhs | ) |

QString Tp::Captcha::mimeType | ( |  | ) | const

Return the mimetype of the captcha.

Returns
  The captcha's mimetype.

See Also
  data()

QString Tp::Captcha::label | ( |  | ) | const

Return the label of the captcha. For some captcha types, such as CaptchaAuthentication::TextQuestionChallenge, the label is also the challenge the user has to answer

Returns
  The captcha's label.

See Also
  data() type()

QByteArray Tp::Captcha::data | ( |  | ) | const

Return the raw data of the captcha. The handler can check its type and metatype to know how to parse the blob.

Returns
  The captcha's data.

See Also
  mimeType(), type()

CaptchaAuthentication::ChallengeType Tp::Captcha::type | ( |  | ) | const

Return the type of the captcha.

Returns
  The captcha's type.

See Also
  data()

uint Tp::Captcha::id | ( |  | ) | const

Return the id of the captcha. This parameter should be used to identify the captcha when answering its challenge.

Returns
  The captcha's id.

See Also
  CaptchaAuthentication::answer()