Result

Since: BlackBerry 10.0.0

#include <bb/pim/account/Result>

To link against this class, add the following line to your .pro file: LIBS += -lbbpim

This class is used to return the outcome of an operation requested from AccountService.


Overview

Public Static Attributes Index

Public Functions Index

Result (bool success, const QString &message="")
Result (bool success, const QString &message, int errorCode)
Result (bool success, const QString &message, int errorCode, const QString &errorChallengeUrl)
Result (const Result &other)
~Result ()
QStringerrorChallengeUrl () const
interrorCode () const
boolisSuccess () const
QStringmessage () const
Result &operator= (const Result &other)

Public Static Attributes

const int InternalError ()

Represents the internal error.

Since:

BlackBerry 10.2.0

const int InvalidAccountData ()

Represents the "Invalid Account Data" error.

This error code is used when an invalid account data was provided.

Since:

BlackBerry 10.2.0

const int InvalidProvider ()

Represents the "Invalid Provider" error.

This error code is used when an operation was performed for an invalid provider.

Since:

BlackBerry 10.2.0

const int NoError ()

Represents the successful result.

This error code is used when an operation was successful.

Since:

BlackBerry 10.2.0

const int UnsupportedApiCall ()

Represents the "Unsupported API call" error.

This error code is used when an unsupported API call was made.

Since:

BlackBerry 10.2.0

Public Functions

Result (
  • boolsuccess,
  • const QString &message )

Creates a Result object.

Parameters
success

The outcome of the requested operation.

message

A detailed error message when success is false, and an empty string when success is true.

Since:

BlackBerry 10.0.0

Result (
  • boolsuccess,
  • const QString &message,
  • interrorCode )

Creates a Result object.

Parameters
success

The outcome of the requested operation.

message

A detailed error message when success is false, and an empty string when success is true.

errorCode

The code of an error occurred during the operation. If there was no error then errorCode is 0.

Since:

BlackBerry 10.2.0

Result (
  • boolsuccess,
  • const QString &message,
  • interrorCode,
  • const QString &errorChallengeUrl )

Creates a Result object.

Parameters
success

The outcome of the requested operation.

message

A detailed error message when success is false, and an empty string when success is true.

errorCode

The code of an error occurred during the operation. If there was no error then errorCode is 0.

errorChallengeUrl

Contains a string of the errorChallengeUrl.

Since:

BlackBerry 10.2.0

Result (

Creates a copy of an existing Result object.

Return:

other The Result object to be copied.

Since:

BlackBerry 10.0.0

~Result ()

Destructor.

Since:

BlackBerry 10.0.0

QString errorChallengeUrl ()

Provides access to the Result object's errorChallengeUrl.

This will be set in the event that an authentication attempt has been challenged.

Return:

Returns the value of the Result object's errorChallengeUrl property.

Since:

BlackBerry 10.2.0

int errorCode ()

Provides access to the Result object's errorCode property.

Return:

Returns the value of the Result object's errorCode property.

Since:

BlackBerry 10.2.0

bool isSuccess ()

Provides access to the Result object's success property.

Return:

Returns true when the operation is successful, and false otherwise.

Since:

BlackBerry 10.0.0

QString message ()

Provides access to the Result object's message property.

Return:

Returns the value of the Result object's message property.

Since:

BlackBerry 10.0.0

Result & operator= (

Copies the data of an existing Result object to this object.

Parameters
other

The Result object to be copied.

Return:

Returns the Result instance.

Since:

BlackBerry 10.0.0

Last modified: 2014-09-30



Got questions about leaving a comment? Get answers from our Disqus FAQ.

comments powered by Disqus