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 timer request that allows you to specify an InvokeDateTime.

Since:

BlackBerry 10.0.0

RecurrentRule 2

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

Since:

BlackBerry 10.0.0

Public Functions

InvokeTimerRequest ()

Creates an InvokeTimerRequest object.

The timer request parameters need to be set by calling set().

Since:

BlackBerry 10.3.0

InvokeTimerRequest (

Creates an InvokeTimerRequest object.

Parameters
timerId

The ID for this request. A timer must 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 an InvokeTimerRequest object.

Parameters
timerId

The ID for this request. A timer must 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 specific timers (that is, timers with type InvokeTimerRequest::SpecificTime), which expire on completion. You must save the timerId to be used later for deregistering the recurrence rule. Otherwise, the timer stays 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 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 ()

Returns the assigned recurrence rule.

Return:

The recurrence rule that was previously set.

Since:

BlackBerry 10.3.0

void set (

Sets the parameters for the timer request of InvokeTimerRequest::SpecificTime type.

Parameters
timerId

The ID for this request. A timer must 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 parameters for the timer request of InvokeTimerRequest::RecurrentRule type.

Parameters
timerId

The ID for this request. A timer must 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 specific timers (that is, timers with type InvokeTimerRequest::SpecificTime), which expire on completion. You must save the timerId to be used later for deregistering the 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 ()

Returns the assigned specific time.

Return:

The specific time that was previously set.

Since:

BlackBerry 10.3.0

QString target ()

Returns the assigned target.

Return:

The target that was previously set or an empty string.

Since:

BlackBerry 10.3.0

QString timerId ()

Returns the assigned timer ID.

Recurrence rules have to be explicitly deregistered unlike specific timers, which expire on completion. You must save the timerId to be used later for deregistering the recurrence rule. Otherwise, the timer would stay registered and active forever.

Return:

The timer ID that was previously set or an empty string.

Since:

BlackBerry 10.3.0

InvokeTimerRequest::Type type ()

Returns the timer type.

Return:

One of the timer types defined in InvokeTimerRequest::Type.

Since:

BlackBerry 10.3.0

Last modified: 2015-01-22



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

comments powered by Disqus