ContactOnlineStatus

Since: BlackBerry 10.0.0

#include <bb/pim/contacts/ContactOnlineStatus>

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

The ContactOnlineStatus class represents the online status of a contact.

You can use this class to determine the online status of a Contact, as well as other information about the contact's status. For example, you can retrieve the status message and status time stamp for a contact's status.

See also:

Contact


Overview

Public Functions Index

ContactOnlineStatus ()
ContactOnlineStatus (const ContactOnlineStatus &copy)
~ContactOnlineStatus ()
boolcanComment () const
boolcanDelete () const
boolcanLike () const
intcommentCount () const
intid () const
boolisFavorited () const
boolisRetweeted () const
boolisSyncing () const
boolisWifiOn () const
intlikeCount () const
intonlineStatusCode () const
ContactOnlineStatus &operator= (const ContactOnlineStatus &operand)
AccountIdoriginAccountId () const
ContactIdoriginContactId () const
StatusIdoriginStatusId () const
QVariantMapstatus () const
QStringstatusMessage () const
QDateTimestatusTimeStamp () const
booluserLikes () const

Public Functions

ContactOnlineStatus ()

Constructs a new ContactOnlineStatus.

Since:

BlackBerry 10.0.0

ContactOnlineStatus (

Copy constructor.

This function constructs a ContactOnlineStatus containing exactly the same values as the provided ContactOnlineStatus.

Parameters
copy

The ContactOnlineStatus to be copied.

Since:

BlackBerry 10.0.0

~ContactOnlineStatus ()

Destructor.

Since:

BlackBerry 10.0.0

bool canComment ()

Indicates whether the user is allowed to comment on this ContactOnlineStatus.

Return:

true if the user can comment on this ContactOnlineStatus, false otherwise.

Since:

BlackBerry 10.0.0

bool canDelete ()

Indicates whether the user is allowed to delete this ContactOnlineStatus.

Return:

true if the user is allowed to delete this ContactOnlineStatus, false otherwise.

Since:

BlackBerry 10.0.0

bool canLike ()

Indicates whether the user is allowed to like this ContactOnlineStatus.

Return:

true if the user likes this ContactOnlineStatus, false otherwise.

Since:

BlackBerry 10.0.0

int commentCount ()

Retrieves the number of comments for this ContactOnlineStatus.

Return:

The number of comments for this ContactOnlineStatus.

Since:

BlackBerry 10.0.0

int id ()

Retrieves the internal ID of this ContactOnlineStatus.

Return:

The internal ID of this ContactOnlineStatus.

Since:

BlackBerry 10.0.0

bool isFavorited ()

Indicates whether the user has favorited this ContactOnlineStatus.

Return:

true if the user has favorited this ContactOnlineStatus, false otherwise.

Since:

BlackBerry 10.0.0

bool isRetweeted ()

Indicates whether the user has retweeted this ContactOnlineStatus.

Return:

true if the user has retweeted this ContactOnlineStatus, false otherwise.

Since:

BlackBerry 10.0.0

bool isSyncing ()

Indicates whether the source account that's associated with this ContactOnlineStatus is currently synchronizing.

Return:

true if the source account is currently synchronizing, false otherwise.

Since:

BlackBerry 10.0.0

bool isWifiOn ()

Indicates whether a Wi-Fi connection is currently active.

Return:

true if a Wi-Fi connection is currently active, false otherwise.

Since:

BlackBerry 10.0.0

int likeCount ()

Retrieves the number of likes for this ContactOnlineStatus.

Return:

The number of likes for this ContactOnlineStatus.

Since:

BlackBerry 10.0.0

int onlineStatusCode ()

Retrieves the online status code of this ContactOnlineStatus.

The possible values of this status code and their associated states are as follows:
  • 0: offline

  • 1: online

  • 2: away

  • 3: busy

Return:

The online status code of this ContactOnlineStatus.

Since:

BlackBerry 10.0.0

ContactOnlineStatus & operator= (

Assignment operator.

This operator copies all values from the provided ContactOnlineStatus into this ContactOnlineStatus.

Parameters
operand

The ContactOnlineStatus from which to copy all values.

Return:

A ContactOnlineStatus with all copied data

Since:

BlackBerry 10.0.0

AccountId originAccountId ()

Retrieves the original account ID of the contact that's associated with this ContactOnlineStatus.

Contacts can be merged from multiple accounts to form a single contact. For example, contacts might be merged from a LinkedIn account, Facebook account, and Twitter account. If the same contact exists in all accounts, the contact information is merged into a single contact that includes all of the information from each account. This function returns the account ID of the specific account that this online status applies to.

You can use this value, along with the AccountService class, to determine specific information about the account.

Return:

The original account ID of the contact that's associated with this ContactOnlineStatus.

See also:

AccountService

Since:

BlackBerry 10.0.0

ContactId originContactId ()

Retrieves the original sourced contact ID of the contact that's associated with this ContactOnlineStatus.

Contacts can be merged from multiple accounts to form a single contact. For example, contacts might be merged from a LinkedIn account, Facebook account, and Twitter account. If the same contact exists in all accounts, the contact information is merged into a single contact that includes all of the information from each account. This function returns the contact ID of the specific contact (not the merged contact) that this online status applies to.

You can use this value, along with the originAccountId() function, to retrieve a specific contact using ContactService::contactDetails().

Return:

The original sourced contact ID of the contact that's associated with this ContactOnlineStatus.

See also:

ContactService

Since:

BlackBerry 10.0.0

StatusId originStatusId ()

Retrieves the original sourced status ID of this ContactOnlineStatus.

Return:

The original sourced status ID of this ContactOnlineStatus.

Since:

BlackBerry 10.0.0

QVariantMap status ()

Retrieves the rich status of this ContactOnlineStatus.

This status can include, text, images, links and videos.

Return:

The complete status of this ContactOnlineStatus.

Since:

BlackBerry 10.0.0

QString statusMessage ()

Retrieves the status message of this ContactOnlineStatus.

This message can be any text that the contact has set on their account.

Return:

The status message of this ContactOnlineStatus.

Since:

BlackBerry 10.0.0

QDateTime statusTimeStamp ()

Retrieves the time stamp of this ContactOnlineStatus.

This time stamp represents the last time that the contact's status was updated.

Return:

The time stamp of this ContactOnlineStatus.

Since:

BlackBerry 10.0.0

bool userLikes ()

Indicates whether the user likes this ContactOnlineStatus.

Return:

true if the user likes this ContactOnlineStatus, false otherwise.

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