InvokeTimerRequest

Since: BlackBerry 10.3.0

#include <bb/system/InvokeTimerRequest>

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

Encapsulates a request to register a timer with the invocation service.

The register timer trigger request message is sent to the invocation service to register a new invocation timer trigger.


Overview

Public Types Index

Public Functions Index

InvokeTimerRequest ()
InvokeTimerRequest (const QString &timerId, const InvokeDateTime &specificTime, const QString &target)
InvokeTimerRequest (const QString &timerId, const InvokeRecurrenceRule &recurrenceRule, const QString &target)
InvokeTimerRequest (const InvokeTimerRequest &other)
virtual ~InvokeTimerRequest ()
boolisValid () const
InvokeTimerRequest &operator= (const InvokeTimerRequest &other)
bb::system::InvokeRecurrenceRulerecurrenceRule () const
voidset (const QString &timerId, const InvokeDateTime &specificTime, const QString &target)
voidset (const QString &timerId, const InvokeRecurrenceRule &recurrenceRule, const QString &target)
bb::system::InvokeDateTimespecificTime () const
QStringtarget () const
QStringtimerId () const
InvokeTimerRequest::Typetype () const

Public Types

Type

The kinds of timer requests.

Since:

BlackBerry 10.0.0

Unknown 0

Unknown type.

SpecificTime 1

Type of type timer request that allows you to specify an InvokeDateTime.

Since:

BlackBerry 10.0.0

RecurrentRule 2

Type of type timer request that allows you to specify an InvokeRecurrenceRule.

Since:

BlackBerry 10.0.0

Public Functions

InvokeTimerRequest ()

Creates a new InvokeTimerRequest object.

The timer request params need to be set by calling the method set

Since:

BlackBerry 10.3.0

InvokeTimerRequest (

Creates a new InvokeTimerRequest object.

Parameters
timerId

The ID for this request. A timer is required to have a timer ID attribute. The timer ID is used to uniquely identify and deregister the timer within an application package.

specificTime

The #InvokeDateTime representing the specific time for the timer. If the specificTime is of type #InvokeDateTime::Anchored, the assigned time zone may or may not be recognized. If the assigned time zone is not recognized the timer registration request will fail.

target

The target to invoke

Since:

BlackBerry 10.3.0

InvokeTimerRequest (

Creates a new InvokeTimerRequest object.

Parameters
timerId

The ID for this request. A timer is required to have a timer ID attribute. The timer ID is used to uniquely identify and deregister the timer within an application package. Recurrence Rules have to be explicitly deregistered unlike single shot Specific Timers which expire on completion. It means that timerId must be saved by developer to be used later for deregistering Recurrence Rule. Otherwise, the timer would stay registered and active forever.

recurrenceRule

A recurrence rule that specifies the interval at which to trigger a headless application

target

The target to invoke

Since:

BlackBerry 10.3.0

InvokeTimerRequest (

Creates a copy of an existing InvokeTimerRequest object.

Parameters
other

The source InvokeTimerRequest object to copy.

Since:

BlackBerry 10.3.0

virtual~InvokeTimerRequest ()

Destructor.

Since:

BlackBerry 10.3.0

bool isValid ()

Returns true if this InvokeTimerRequest object is valid.

The method returns true if both the target and the timerId representing this InvokeTimerRequest object are not empty and the specificTime is valid or recurrenceRule is valid depending on the type of the request

Return:

true if valid, false otherwise

Since:

BlackBerry 10.3.0

InvokeTimerRequest & operator= (

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

Parameters
other

The source InvokeTimerRequest object to copy.

Return:

The InvokeTimerRequest instance.

Since:

BlackBerry 10.3.0

bb::system::InvokeRecurrenceRule recurrenceRule ()

Return the assigned recurrence rule.

Return:

recurrence rule that was previously set

Since:

BlackBerry 10.3.0

void set (

Sets the params for the timer request of #InvokeTimerRequest::SpecificTime type.

Parameters
timerId

The ID for this request. A timer is required to have a timer ID attribute. The timer ID is used to uniquely identify and deregister the timer within an application package.

specificTime

The #InvokeDateTime representing the specific time for the timer. If the specificTime is of type #InvokeDateTime::Anchored, the assigned time zone may or may not be recognized. If the assigned time zone is not recognized the timer registration request will fail.

target

The target to invoke

Since:

BlackBerry 10.3.0

void set (

Sets the params for the timer request of #InvokeTimerRequest::RecurrentRule type.

Parameters
timerId

The ID for this request. A timer is required to have a timer ID attribute. The timer ID is used to uniquely identify and deregister the timer within an application package. Recurrence Rules have to be explicitly deregistered unlike single shot Specific Timers which expire on completion. It means that timerId must be saved by developer to be used later for deregistering Recurrence Rule. Otherwise, the timer would stay registered and active forever.

recurrenceRule

A recurrence rule that specifies the interval at which to trigger a headless application

target

The target to invoke

Since:

BlackBerry 10.3.0

bb::system::InvokeDateTime specificTime ()

Return the assigned specific time.

Return:

specific time that was previously set

Since:

BlackBerry 10.3.0

QString target ()

Return the assigned target.

Return:

target that was previously set or an empty string

Since:

BlackBerry 10.3.0

QString timerId ()

Return the assigned timerId.

Recurrence Rules have to be explicitly deregistered unlike single shot Specific Timers which expire on completion. It means that timerId must be saved by developer to be used later for deregistering Recurrence Rule. Otherwise, the timer would stay registered and active forever.

Return:

timerId that was previously set or an empty string

Since:

BlackBerry 10.3.0

InvokeTimerRequest::Type type ()

Return the timer type.

Return:

timerType One of the timer types defined in #InvokeTimerRequest::Type (Unknown, SpecificTime, RecurrentRule)

Since:

BlackBerry 10.3.0

Last modified: 2014-09-30



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

comments powered by Disqus