Since: BlackBerry 10.0.0
To link against this class, add the following line to your .pro file: LIBS += -lbbplatformbbm
Represents a class that provides access to your app's profile box in the user's BBM profile.
The user profile box is an area for your app that appears in the current user's BlackBerry Messenger profile. Each box contains a list of items, each composed of text and an optional icon. A profile box can contain a maximum of 3 items. As new items are added, older items are removed automatically.
The user can control whether your app's profile box appears in their profile through the global settings for the app. The app is only allowed to make changes if the user enables this option. You can check this setting by calling permissionValue(Permission::ProfileUpdatesAllowed).
This box can be viewed by the current user and their contacts. It can be modified by the current user and the app that owns it, but the current user can remove items only.
The user can invoke the app from its profile box in their BBM profile or a contact's BBM profile. The app will be brought to the foreground, or launched if it's not already running. Contacts who do not have the app installed will be brought to the app's page in BlackBerry World if that version of the app is available on BlackBerry World.
The functionality of this class is only available if the app has access to the BBM Social Platform and has received permission, Permission::ProfileUpdatesAllowed.
Public Functions Index
|ProfileBox (Context *context, QObject *parent=0)|
|ProfileBoxItem||item (const QString &itemId) const|
|int||itemCount () const|
|QList< ProfileBoxItem >||items () const|
|bool||requestAddItem (const QString &text, int iconId, const QString &cookie=QString())|
|bool||requestAddItem (const QString &text, const QString &cookie=QString())|
|bool||requestRegisterIcon (int iconId, bb::platform::bbm::ImageType::Type iconType, const QByteArray &iconData)|
|bool||requestRemoveItem (const QString &itemId)|
|bool||requestRetrieveIcon (int iconId) const|
Creates a new ProfileBox object with context as the basis.
Retrieves the ProfileBoxItem with the specified itemId.
Returns the total number of items in the profile box.
The count of items in the profile box. If the application does not have Permission::ProfileUpdatesAllowed, returns 0.
Returns all profile box items.
A QList<ProfileBoxItem> with all the profile box items. If the application does not have Permission::ProfileUpdatesAllowed, returns an empty QList<ProfileBoxItem>.
Requests registration of an icon with the specified iconId, iconType and iconData.
The signal iconRegistered() is emitted as an asynchronous response.
The unique, non-negative ID of the icon to register.
The MIME type of the icon. If an invalid MIME type is specified, the behavior of this method is undefined.
The icon data. iconData must not be empty.
true if sending the request succeeds, false otherwise. If the application does not have Permission::ProfileUpdatesAllowed, returns false.
Requests removal of all items in the ProfileBox.
Requests removal of the ProfileBoxItem with the specified itemId.
Requests retrieval of the icon with the given iconId.
Emitted when the icon specified by the iconId is registered.
The ID of the registered icon.
Emitted in response to an icon retrieval request.
The ID of the icon that was retrieved.
The MIME type of the icon that was retrieved. If an invalid type was specified during icon registration, the behavior of this method is undefined.
The icon data.
The ID of the item added to the ProfileBox.