AdarpDomain

Since: BlackBerry 10.3.1

#include <bb/platform/AdarpDomain>

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

A class that provides status and command control for AdarpDomain.

Adarp, or Advanced Data At Rest Protection, is a feature that locks an enterprise work space when a device has been idle for a specified time period. The AdarpDomain class provides functions to monitor status and request triggering DataLock. All AdarpDomain objects provide access to a single instance of the underlying interface. This means that any AdarpDomain object requesting DataLock would trigger DataLock for all other AdarpDomain objects if any, as an example.


Overview

Public Functions Index

Public Slots Index

intextendDataLockTime (QString requestId, unsigned int interval)
intrequestDataLock (QString requestId)

Signals Index

voiddataLockStateChanged (bb::platform::DataLockState::Type oldState, bb::platform::DataLockState::Type newState)
voidnextDataLockTimeChanged (QDateTime newDataLockTime)
voidresponseReceived (QString requestId, int requestStatus)

Properties

bb::platform::DataLockState::Type dataLockState[read-only]

The current DataLock state.

See also:

DataLockState

Since:

BlackBerry 10.3.1

QDateTime nextDataLockTime[read-only]

The next DataLock time.

The nextDataLockTime is the timestamp when the DataLock state will switch from LockPending to DataLocked. If the DataLock state is not LockPending, this will be a null (invalid) timestamp. nextDataLockTime is only valid during LockPending state, but the reverse is not necessarily true. It is possible that the DataLockState may change to LockPending before the nextDataLockTime is available. To ensure that nextDataLockTime is valid, applications should wait for the nextDataLockTimeChanged signal while in state.

See also:

DataLockState

Since:

BlackBerry 10.3.1

Public Functions

AdarpDomain (

Constructs an AdarpDomain object.

Information about the AdarpDomain status may be retrieved from the AdarpDomain object.

Parameters
parent

The supplied parent is responsible for deleting this instance.

Since:

BlackBerry 10.3.1

virtual~AdarpDomain ()

Destructor.

Since:

BlackBerry 10.3.1

bb::platform::DataLockState::Type dataLockState ()

Gets the current DataLock state.

If DataLock is not enabled, this function returns NotLocked.

Return:

DataLock state.

See also:

DataLockState

Since:

BlackBerry 10.3.1

QDateTime nextDataLockTime ()

Gets the timestamp for when the DataLock state will switch from LockPending to DataLocked.

If DataLock state is not LockPending, function returns a null (invalid) timestamp.

Return:

DataLock timestamp.

Since:

BlackBerry 10.3.1

Public Slots

int extendDataLockTime (
  • QStringrequestId,
  • unsigned intinterval )

Sends a request to extend the DataLock time.

This function is called to request to extend the time before dataLockState will switch to LockPending state and then subsequently to DataLocked state (that is, delay the triggering to DataLocked state).

The caller must have the _sys_allow_extend_data_lock permission to extend the DataLock time.

Parameters
requestId

A unique identifier for each extendDataLockTime request

interval

Time by which to delay DataLock time, in seconds, relative to time of request

Return:

0 if the request was sent successfully, -1 otherwise.

Since:

BlackBerry 10.3.1

int requestDataLock (

Sends a request to set DataLock.

This function is called to set the DataLock state to DataLocked.

The caller must have the allow_request_lock permission to set DataLock.

Parameters
requestId

A unique identifier for each requestDataLock request

Return:

0 if the request was sent successfully, -1 otherwise.

Since:

BlackBerry 10.3.1

Signals

void dataLockStateChanged (

Emitted when the DataLock state has changed.

Parameters
oldState

Previous DataLock state

newState

New DataLock state

Since:

BlackBerry 10.3.1

void nextDataLockTimeChanged (

Emitted when nextDataLockTime has changed.

Parameters
newDataLockTime

The value of nextDataLockTime, or a null (invalid) timestamp if DataLock state has switched out of LockPending

Since:

BlackBerry 10.3.1

void responseReceived (
  • QStringrequestId,
  • intrequestStatus )

Emitted when a status response to a request has been received.

The requestId is a unique identifier to be used to match this response to a previous request.

Parameters
requestId

Unique identifier corresponding to a specific request

requestStatus

Resultant status of request identified by requestId

See errno.h
Since:

BlackBerry 10.3.1

Last modified: 2015-07-24



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

comments powered by Disqus