class CLbtTriggerEntry : public CBase |
Abstract base class for location triggering entries.
It provides methods to determine the trigger type and to define basic trigger attributes. The following attributes are defined in location triggering entries.
Id Defines the identity of a trigger. The Id is allocated by Location Triggering Server and it's unique among all triggers currently exist in the system. If a trigger is removed from the system, its Id may be reused by another trigger. This attribute can not be modified after the trigger is created.
Name The name attribute defines a human-readable name for the trigger. The purpose of the name attribute is mainly for the end user to be able to identify the trigger in the UI. The maximum length of the name is KLbtMaxNameLength characters. This attribute can be modified after the trigger is created.
State This attribute specifies if the trigger is enabled or disabled. A disabled trigger is not supervised by the Location Triggering Server and thus will never be fired. This attribute can be modified after the trigger is created.
Requestors The requestors attribute consists of a requestor stack with contacts and/or services using the location service. Requestor information is used for privacy queries when trigger is created and fired. Requestor information is not allowed to be changed once the trigger has been created.
Manager UI . Manager UI is the UI application that can view, edit and delete the trigger. Manager UI application shall be provided by the user of this API. If it's possible, client application must specify the manager UI application when the trigger is created. Note, Manager UI may be different from the trigger's owner. Trigger's owner is the process that created the trigger. Triggers can be directly accessed by the Manager UI application. Although this attribute is not mandatory when creating a trigger. it's highly recommended that it is specified. It cannot be modified after the trigger is created.
Trigger condition . Trigger condition specifies in what situation a trigger shall be fired. Current system supports only basic trigger condition. Basic trigger condition is defined by a trigger area and direction of terminal's movement. Only circular area can be used as trigger area in current system. This attribute can be modified after the trigger is created.
Public Member Functions | |
---|---|
~CLbtTriggerEntry () | |
IMPORT_C void | ExternalizeL ( RWriteStream &) |
IMPORT_C CLbtTriggerConditionBase * | GetCondition () |
IMPORT_C const CLbtTriggerConditionBase * | GetCondition () |
IMPORT_C void | GetRequestorsL ( RRequestorStack &) |
IMPORT_C const TLbtTriggerId & | Id () |
IMPORT_C void | InternalizeL ( RReadStream &) |
IMPORT_C TUid | ManagerUi () |
IMPORT_C const TDesC & | Name () |
IMPORT_C void | SetCondition ( CLbtTriggerConditionBase *) |
IMPORT_C void | SetId ( TLbtTriggerId ) |
IMPORT_C void | SetManagerUi ( TUid ) |
IMPORT_C void | SetNameL (const TDesC &) |
IMPORT_C void | SetRequestorL ( CRequestor::TRequestorType , CRequestor::TRequestorFormat , const TDesC &) |
IMPORT_C void | SetRequestorsL (const RRequestorStack &) |
IMPORT_C void | SetState ( TLbtTriggerState ) |
IMPORT_C void | SetTimeToRearm ( TInt ) |
IMPORT_C TLbtTriggerState | State () |
IMPORT_C TInt | TimeToRearm () |
IMPORT_C TType | Type () |
Protected Member Functions | |
---|---|
CLbtTriggerEntry () | |
void | DoExternalizeL ( RWriteStream &) |
void | DoInternalizeL ( RReadStream &) |
Private Member Functions | |
---|---|
CLbtTriggerEntry (const CLbtTriggerEntry &) | |
CLbtTriggerEntry & | operator= (const CLbtTriggerEntry &) |
Public Member Enumerations | |
---|---|
enum |
TAttribute
{
EAttributeId = 0x0001, EAttributeName = 0x0002, EAttributeState = 0x0004, EAttributeRequestor = 0x0008, EAttributeManagerUi = 0x0010, EAttributeRearmTime = 0x0020, EAttributeCondition = 0x0080, EAttributeStartUpProcessId = 0x0100, EAttributeStartUpCommandLine = 0x0200 } |
enum | TLbtTriggerState { EStateEnabled = 1, EStateDisabled = 2 } |
enum | TType { ETypeSession = 1, ETypeStartup = 2 } |
Private Attributes | |
---|---|
TLbtTriggerId | iId |
TUid | iManagerUi |
HBufC * | iName |
TInt | iRearmTime |
RRequestorStack | iRequestor |
TAny * | iReserved |
TAny * | iSchedule |
TLbtTriggerState | iState |
CLbtTriggerConditionBase * | iTriggerCondition |
CLbtTriggerEntry | ( | const CLbtTriggerEntry & | ) | [private] |
By default, prohibit copy constructor
const CLbtTriggerEntry & |
void | DoExternalizeL | ( | RWriteStream & | aStream | ) | const [protected, pure virtual] |
Externalize method that subclass must implement.
RWriteStream & aStream | Stream to which the object should be externalized. |
void | DoInternalizeL | ( | RReadStream & | aStream | ) | [protected, pure virtual] |
Internalize method that subclass must implement.
RReadStream & aStream | Stream from which the object should be internalized. |
IMPORT_C void | ExternalizeL | ( | RWriteStream & | aStream | ) | const |
Externalizes the trigger object's details and attributes to stream.
The presence of this function means that the standard template operator<<() ( defined in s32strm.h ) is available to externalize objects of this class.
RWriteStream & aStream | Stream to which the object should be externalized. |
IMPORT_C CLbtTriggerConditionBase * | GetCondition | ( | ) |
Gets the trigger condition.
The ownership of the returned trigger condition object is not transferred to the client. The pointer can be used to modify the trigger condition.
IMPORT_C const CLbtTriggerConditionBase * | GetCondition | ( | ) | const |
Gets the trigger condition.
The ownership of the returned trigger condition object is not transferred to the client. The pointer can be used to modify the trigger condition.
IMPORT_C void | GetRequestorsL | ( | RRequestorStack & | aRequestors | ) | const |
Gets requestors of the trigger entry.
Requestor information is used by the Location Triggering Server to verify that the user allows location information to be sent to the specified requestors when a trigger fires.
Requestors attribute is a mandatory trigger attribute. If the requestors attribute is not set when the trigger is created in the server, the trigger creation will fail.
If requestors have not been set before, this function returns an empty requestor stack.
Refer to Location Acquisition API for detailed information on requestors.
RRequestorStack & aRequestors | The requestors of the trigger entry. |
IMPORT_C const TLbtTriggerId & | Id | ( | ) | const |
Gets the trigger ID.
The ID is allocated and set by the Location Triggering Server when a trigger is successfully created. Trigger ID is unique in the system. This function returns KLbtNullTriggerId if the ID is not set before.
IMPORT_C void | InternalizeL | ( | RReadStream & | aStream | ) |
Internalizes the trigger object's details and attributes from stream.
The presence of this function means that the standard template operator>>() ( defined in s32strm.h ) is available to internalize objects of this class.
RReadStream & aStream | Stream from which the object should be internalized. |
IMPORT_C TUid | ManagerUi | ( | ) | const |
Gets UID of the manager UI. The UID means the UID3 value, which identifies the particular application. If the UID of the manager UI is not set, this function returns KNullUid.
IMPORT_C const TDesC & | Name | ( | ) | const |
Gets the name of the trigger entry.
If the name is not set, an empty string is returned. Maximum length of the name is KLbtMaxNameLength .
IMPORT_C void | SetCondition | ( | CLbtTriggerConditionBase * | aCondition | ) |
Sets trigger condition.
This object takes the ownership of the trigger condition object.
CLbtTriggerConditionBase * aCondition | Pointer to the new trigger condition object. This object takes the ownership of aCondition. NULL can be used to remove previous setting. |
IMPORT_C void | SetId | ( | TLbtTriggerId | aId | ) |
Sets trigger entry id. SetId is not used during trigger creation as it is auto generated by the LBT server. This information is only used during deletion / modification of triggers. This information when specified during trigger creation, will be ignored by LBT server.
TLbtTriggerId aId | The ID of the trigger entry, or KLbtNullTriggerId. |
IMPORT_C void | SetManagerUi | ( | TUid | aUid | ) |
Sets UID of the manager UI.
TUid aUid | The SID value if available. Else the UID3 value, which is the idenfifier of the particaular application. KNullUid can be used to remove previous setting. |
IMPORT_C void | SetNameL | ( | const TDesC & | aName | ) |
Sets the name of the trigger entry.
const TDesC & aName | The name of the trigger entry. |
IMPORT_C void | SetRequestorL | ( | CRequestor::TRequestorType | aType, |
CRequestor::TRequestorFormat | aFormat, | |||
const TDesC & | aData | |||
) |
Sets requestor of trigger entry.
Requestor information is used by the Location Triggering Server to verify that the user allows information to be sent to the specified requestors when a trigger fires.
Requestors attribute is a mandatory trigger attribute. If the requestors attribute is not set when the trigger is created in the server, the trigger creation will fail.
CRequestor::TRequestorType aType | identifies the type of requestor, a service or a contact. |
CRequestor::TRequestorFormat aFormat | determines the type of data held in aData |
const TDesC & aData | is requestor data. Can be a telephone number, a URL etc. |
IMPORT_C void | SetRequestorsL | ( | const RRequestorStack & | aRequestors | ) |
Sets requestors of trigger entry.
Requestor information is used by the Location Triggering Server to verify that the user allows location information to be sent to the specified requestors when a trigger fires.
Requestors attribute is a mandatory trigger attribute. If the requestors attribute is not set when the trigger is created in the server, the trigger creation will fail.
Refer to Location Acquisition API for detailed information on requestors.
const RRequestorStack & aRequestors | The requestors of trigger entry. |
IMPORT_C void | SetState | ( | TLbtTriggerState | aState | ) |
Sets the trigger entry state.
TLbtTriggerState aState | The trigger entry state. |
IMPORT_C void | SetTimeToRearm | ( | TInt | aSeconds | ) |
Sets the time interval to reactivate the trigger after the trigger is fired.
TInt aSeconds | The time interval after which the trigger is set effective by the Location Triggering Server. Client applications can set 0 to indicate no delay, in which case the trigger will remain effective through out its life span. Range is 0 (KLbtMinTimeToRearm) to +2147483647 (KLbtMaxTimeToRearm) which is +24855 days (approximately 68 years) |
IMPORT_C TLbtTriggerState | State | ( | ) | const |
Gets trigger entry state.
If no state has been set for the trigger, this function returns ELbtTriggerEnabled .
IMPORT_C TInt | TimeToRearm | ( | ) | const |
Gets the rearm time interval.
If no interval is specified for the trigger, this function returns KLbtDefaultTimeToRearm which is 600s or 10 minutes.
CLbtTriggerEntry & | operator= | ( | const CLbtTriggerEntry & | ) | [private] |
Prohibit assigment operator
const CLbtTriggerEntry & |
Trigger attributes identifications.
These ids can be combined and used to form an attribute mask when retrieving partial attributes from Location Triggering Server.
EAttributeId = 0x0001 |
Trigger Id |
EAttributeName = 0x0002 |
Trigger name |
EAttributeState = 0x0004 |
Trigger state |
EAttributeRequestor = 0x0008 |
Trigger requestor |
EAttributeManagerUi = 0x0010 |
Trigger manager UI |
EAttributeRearmTime = 0x0020 |
Trigger rearm time |
EAttributeCondition = 0x0080 |
Trigger condition |
EAttributeStartUpProcessId = 0x0100 |
Process ID of start-up trigger. It includes process executable name and process UID type. |
EAttributeStartUpCommandLine = 0x0200 |
Command-line argument string for start-up trigger |
Specifies the state of a trigger.
EStateEnabled = 1 |
The trigger is enabled |
EStateDisabled = 2 |
The trigger is disabled |
Trigger type definition. It defines the type of the trigger entry.
ETypeSession = 1 |
Session trigger |
ETypeStartup = 2 |
Start-up trigger |
CLbtTriggerConditionBase * | iTriggerCondition | [private] |
Trigger condition
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.