NotificationGlobalSettings

Since: BlackBerry 10.2.0

#include <bb/platform/NotificationGlobalSettings>

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

Provides access to persistent global notification settings.

The NotificationGlobalSettings class provides methods to access and modify persistent global notification settings. Mutator methods in this class are protected by access permissions because they allow modification of global settings. Be sure to check the descriptions of individual methods, and ensure that the required permissions have been granted before using them.

The global notification settings are represented by a set of policies. These policies determine which effects may be triggered by the Notification system. Ultimately the Notification system will decide which effects actually get presented to the user based on a combination of an application's notification settings and the global notification settings (see bb::platform::NotificationApplicationSettings for more details).

Permissions:

This class requires that the application be granted the access_notify_settings_control capability if it wants to modify global settings.


Overview

Public Functions Index

NotificationGlobalSettings (QObject *parent=0)
virtual ~NotificationGlobalSettings ()
bb::platform::NotificationPolicy::Typeled () const
bb::platform::NotificationMode::Typemode () const
bb::platform::NotificationPolicy::Typepreview () const
Q_INVOKABLE bb::platform::NotificationSettingsError::TypesetLed (bb::platform::NotificationPolicy::Type policy)
Q_INVOKABLE bb::platform::NotificationSettingsError::TypesetMode (bb::platform::NotificationMode::Type mode)
Q_INVOKABLE bb::platform::NotificationSettingsError::TypesetPreview (bb::platform::NotificationPolicy::Type policy)
Q_INVOKABLE bb::platform::NotificationSettingsError::TypesetSound (bb::platform::NotificationPolicy::Type policy)
Q_INVOKABLE bb::platform::NotificationSettingsError::TypesetVibrate (bb::platform::NotificationPolicy::Type policy)
Q_INVOKABLE bb::platform::NotificationSettingsError::TypesetVolume (int volume)
bb::platform::NotificationPolicy::Typesound () const
bb::platform::NotificationPolicy::Typevibrate () const
intvolume () const

Signals Index

voidledChanged (bb::platform::NotificationPolicy::Type policy)
voidmodeChanged (bb::platform::NotificationMode::Type mode)
voidpreviewChanged (bb::platform::NotificationPolicy::Type policy)
voidsoundChanged (bb::platform::NotificationPolicy::Type policy)
voidvibrateChanged (bb::platform::NotificationPolicy::Type policy)
voidvolumeChanged (int volume)

Properties

bb::platform::NotificationPolicy::Type led

Defines the global policy for LED effects.

Since:

BlackBerry 10.2.0

bb::platform::NotificationMode::Type mode

Defines the notification mode.

See also:

bb::platform::NotificationMode for a list of possible modes.

Since:

BlackBerry 10.2.0

bb::platform::NotificationPolicy::Type preview

Defines the global policy for Instant Preview effects.

The preview setting determines if the Notification system may display an Instant Preview when notifying the user.

Since:

BlackBerry 10.2.0

bb::platform::NotificationPolicy::Type sound

Defines the global policy for sound effects.

The sound setting determines if the Notification system may play a sound when notifying the user.

Since:

BlackBerry 10.2.0

bb::platform::NotificationPolicy::Type vibrate

Defines the global policy for vibration effects.

The vibrate setting determines if the Notification system may vibrate the device when notifying the user.

Since:

BlackBerry 10.2.0

int volume

Defines the volume for sound effects.

The volume is represented by an integer in the range [0,100].

Since:

BlackBerry 10.2.0

Public Functions

NotificationGlobalSettings (

Constructs a new NotificationGlobalSettings instance.

Parameters
parent

If not 0, the supplied parent will be responsible for deleting this instance.

Since:

BlackBerry 10.2.0

virtual~NotificationGlobalSettings ()

Destructor.

Since:

BlackBerry 10.2.0

bb::platform::NotificationPolicy::Type led ()

Returns the global policy for LED effects.

Return:
The policy for LED effects. The possible policies are:
Since:

BlackBerry 10.2.0

bb::platform::NotificationMode::Type mode ()

Returns the notification mode.

See also:

bb::platform::NotificationMode for a list of possible modes

Return:

Returns the notification mode.

Since:

BlackBerry 10.2.0

bb::platform::NotificationPolicy::Type preview ()

Returns the global policy for Instant Preview effects.

Return:
The policy Instant Preview effects. The possible policies are:
Since:

BlackBerry 10.2.0

Q_INVOKABLE bb::platform::NotificationSettingsError::Type setLed (

Sets the global policy for LED effects.

This method will only update the policy if the current notification mode allows it.

Parameters
policy
The new policy for LED effects. Valid policies are:
Return:

bb::platform::NotitficationSettingsError::None, if the request was successful, or an error code otherwise. See bb::platform::NotificationSettingsError for the list of values.

Permissions:

This function requires that the application be granted the access_notify_settings_control capability.

Since:

BlackBerry 10.2.0

Q_INVOKABLE bb::platform::NotificationSettingsError::Type setMode (

Sets the notification mode.

See also:

bb::platform::NotificationMode for a list of possible modes

Return:

bb::platform::NotitficationSettingsError::None, if the request was successful, or an error code otherwise. See bb::platform::NotificationSettingsError for the list of values.

Permissions:

This function requires that the application be granted the access_notify_settings_control capability.

Since:

BlackBerry 10.2.0

Q_INVOKABLE bb::platform::NotificationSettingsError::Type setPreview (

Sets the global policy for Instant Preview effects.

This method will only update the policy if the current notification mode allows it.

Parameters
policy
The new global policy for Instant Preview effects. Valid policies are:
Return:

bb::platform::NotitficationSettingsError::None, if the request was successful, or an error code otherwise. See bb::platform::NotificationSettingsError for the list of values.

Permissions:

This function requires that the application be granted the access_notify_settings_control capability.

Since:

BlackBerry 10.2.0

Q_INVOKABLE bb::platform::NotificationSettingsError::Type setSound (

Sets the global policy for sound effects.

This method will only update the policy if the current notification mode allows it.

Parameters
policy
The new policy for sound effects. Valid policies are:
Return:

bb::platform::NotitficationSettingsError::None, if the request was successful, or an error code otherwise. See bb::platform::NotificationSettingsError for the list of values.

Permissions:

This function requires that the application be granted the access_notify_settings_control capability.

Since:

BlackBerry 10.2.0

Q_INVOKABLE bb::platform::NotificationSettingsError::Type setVibrate (

Sets the global policy for vibration effects.

This method will only update the policy if the current notification mode allows it.

Parameters
policy
The new policy for vibration effects. Valid policies are:
Return:

bb::platform::NotitficationSettingsError::None, if the request was successful, or an error code otherwise. See bb::platform::NotificationSettingsError for the list of values.

Permissions:

This function requires that the application be granted the access_notify_settings_control capability.

Since:

BlackBerry 10.2.0

Q_INVOKABLE bb::platform::NotificationSettingsError::Type setVolume (
  • intvolume)

Sets the volume for sound effects.

The volume is an integer in the range [0,100].

Parameters
volume

An integer in the range [0,100]. If the value is outside the valid range, it will be clamped to [0,100].

Return:

bb::platform::NotitficationSettingsError::None, if the request was successful, or an error code otherwise. See bb::platform::NotificationSettingsError for the list of values.

Permissions:

This function requires that the application be granted the access_notify_settings_control capability.

Since:

BlackBerry 10.2.0

bb::platform::NotificationPolicy::Type sound ()

Returns the global policy for sound effects.

Return:
The policy for sound effects. The possible policies are:
Since:

BlackBerry 10.2.0

bb::platform::NotificationPolicy::Type vibrate ()

Returns the global policy for vibration effects.

Return:
The policy for vibration effects. The possible policies are:
Since:

BlackBerry 10.2.0

int volume ()

Returns the volume for sound effects.

The volume is an integer in the range [0,100].

Return:

An integer in the range [0,100] or -1 if the volume could not be determined.

Since:

BlackBerry 10.2.0

Signals

void ledChanged (

Emitted when the policy for the NotificationGlobalSettings::led property changes.

Parameters
policy

The new policy for the NotificationGlobalSettings::led property.

Since:

BlackBerry 10.2.0

void modeChanged (

Emitted when the NotificationGlobalSettings::mode changes.

Parameters
mode

The new mode for the NotificationGlobalSettings::mode property.

Since:

BlackBerry 10.2.0

void previewChanged (

Emitted when the policy for the NotificationGlobalSettings::preview property changes.

Parameters
policy

The new policy for the NotificationGlobalSettings::preview property.

Since:

BlackBerry 10.2.0

void soundChanged (

Emitted when the policy for the NotificationGlobalSettings::sound property changes.

Parameters
policy

The new policy for the NotificationGlobalSettings::sound property.

Since:

BlackBerry 10.2.0

void vibrateChanged (

Emitted when the policy for the NotificationGlobalSettings::vibrate property changes.

Parameters
policy

The new policy for the NotificationGlobalSettings::vibrate property.

Since:

BlackBerry 10.2.0

void volumeChanged (
  • intvolume)

Emitted when the value of NotificationGlobalSettings::volume changes.

Parameters
volume

The new volume for the NotificationGlobalSettings::volume property.

Since:

BlackBerry 10.2.0

Last modified: 2014-09-30



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

comments powered by Disqus