class CLbtContainer : public CBase |
This class provides the inteface to access the functionality of the Location Triggering Container.
The CLbtContainer is a singleton class. The same instance is shared by all the components in the subsystem.
Create a Session or Startup trigger
Modify the static or dynamic information of a trigger
Delete one or more triggers based on filters.
Retrieve information on one or more triggers based on filters.
Private Member Functions | |
---|---|
CLbtContainer () | |
CLbtContainer (const CLbtContainer &) | |
~CLbtContainer () | |
void | ConstructL () |
TInt | GenerateRandomOpCode () |
CLbtContainer & | operator= (const CLbtContainer &) |
Public Member Enumerations | |
---|---|
enum |
TLbtTriggerChangeEvent
{
ELbtConTriggerCreated = 0x0001, ELbtConTriggerDeleted = 0x0002, ELbtConTriggerNameFieldChanged = 0x0004, ELbtConTriggerStateFieldChanged = 0x0008, ELbtConTriggerRequestorFieldChanged = 0x0010, ELbtConTriggerManagerUiFieldChanged = 0x0020, ELbtConTriggerConditionFieldChanged = 0x0040, ELbtConTriggerStartupFieldChanged = 0x0080, ELbtConTriggerHysteresisFieldChanged = 0x0100, ELbtConTriggerRectAreaFieldChanged = 0x0200, ELbtConTriggerFiredFieldChanged = 0x0400, ELbtConTriggerStrategyDataFieldChanged = 0x0800, ELbtConTriggerValidityFieldChanged = 0x1000, ELbtConTriggerFireOnCreationFieldChanged = 0x2000, ELbtConTriggerEnabledAndValidCreated = 0x4000 } |
CLbtContainer | ( | const CLbtContainer & | aContainer | ) | [private] |
C++ Copy Constructor The private copy constructor prevents the usage of copy constructors with this class.
const CLbtContainer & aContainer |
IMPORT_C void | CancelAsyncOperation | ( | TInt | aOpId | ) |
Cancel Async Operation operation in the container
TInt aOpId |
IMPORT_C void | CreateTrigger | ( | CLbtContainerTriggerEntry & | aEntry, |
TInt & | aOpId, | |||
TRequestStatus & | aStatus, | |||
TLbtSecurityPolicy | aSecurityPolicy = KLbtNullSecurity | |||
) |
Create a trigger in the Container. Both session and startup triggers are created using this method. This is an synchronous method call.
CLbtContainerTriggerEntry & aEntry | This parameter contains trigger information. |
TInt & aOpId | |
TRequestStatus & aStatus | Contains the error code once the operation is completed. The value can be,any Symbian error code.KErrNoMemory if the trigger was not created because of low memoryKErrDiskFull if the startup trigger was not created because of low disk space. |
TLbtSecurityPolicy aSecurityPolicy = KLbtNullSecurity |
IMPORT_C void | DeleteTriggers | ( | CLbtContainerUpdateFilter * | aFilter, |
TInt & | aOpId, | |||
TRequestStatus & | aStatus, | |||
TLbtSecurityPolicy | aSecurityPolicy = KLbtNullSecurity | |||
) |
Asynchronous delete triggers in the Container based on a filter. Both session and startup triggers can be deleted using this method.
The Filter can specify a list of trigger Ids. Hence using this method it is possible to delete a list of triggers.
CLbtContainerUpdateFilter * aFilter | This parameter specifies the triggers which need to be deleted. The Container will take ownership of the filter paramter. |
TInt & aOpId | |
TRequestStatus & aStatus | Contains the error code once the operation is completed.The value can be,KErrNotFound if the filter does not match any triggerany other Symbian error code. |
TLbtSecurityPolicy aSecurityPolicy = KLbtNullSecurity |
IMPORT_C void | Destroy | ( | ) | [static] |
Destroy the Container Instance. Since this class is a singleton class, this does not necessarily destroy the Container instance.
TInt | GenerateRandomOpCode | ( | ) | [private] |
Generates op code to identify requests
IMPORT_C void | GetTriggers | ( | const RArray < TLbtTriggerId > & | aTriggerIds, |
RPointerArray < CLbtContainerTriggerEntry > & | aTriggers, | |||
TInt & | aOpId, | |||
TRequestStatus & | aStatus, | |||
TLbtSecurityPolicy | aSecurityPolicy = KLbtNullSecurity | |||
) |
Retreives the specified triggers from the database. Both session and startup triggers are retreived by this API. The triggers are retreived asynchronously
const RArray < TLbtTriggerId > & aTriggerIds | the trigger ids which have to be retreived |
RPointerArray < CLbtContainerTriggerEntry > & aTriggers | |
TInt & aOpId | the operation identifier |
TRequestStatus & aStatus | Contains the error code once the operation is completed. |
TLbtSecurityPolicy aSecurityPolicy = KLbtNullSecurity |
IMPORT_C void | ListTriggers | ( | CLbtContainerListOptions * | aListOptions, |
RPointerArray < CLbtContainerTriggerEntry > & | aTriggers, | |||
TInt & | aOpId, | |||
TRequestStatus & | aStatus, | |||
TLbtSecurityPolicy | aSecurityPolicy = KLbtNullSecurity | |||
) |
List triggers in the Container. The session and startup triggers can be deleted using this method.
The Filter can specify a list of trigger Ids. Hence using this method it is possible to delete a list of triggers.
CLbtContainerListOptions * aListOptions | Specifies the options used for listing triggers. Default value is NULL, which will retrieve all triggers owned by the client application. The Container will take ownership of the list options paramter. |
RPointerArray < CLbtContainerTriggerEntry > & aTriggers | An Array of trigger entry objects. It contains the triggers that match the specified criteria. The ownership of the trigger entry objects in the array is transferred to the client. |
TInt & aOpId | |
TRequestStatus & aStatus | Contains the error code once the operation is completed.The value can be,KErrNotFound if the filter does not match any triggerany other Symbian error code. |
TLbtSecurityPolicy aSecurityPolicy = KLbtNullSecurity |
IMPORT_C CLbtContainer * | NewL | ( | ) | [static] |
The Symbian 2 phase constructor. This method does not create new instances of the container. It creates an instance the first time and then returns the same instance.
IMPORT_C void | RemoveObserver | ( | MLbtContainerChangeEventObserver * | aObserver | ) |
De-register request for container trigger store change notification.
The observer will be not notified when a change occurs in the Container in future.
MLbtContainerChangeEventObserver * aObserver | This parameter specifies the observer that has to be de-registered. The Container doesn't take onwership of this parameter. |
IMPORT_C void | SetChangeObserver | ( | MLbtContainerChangeEventObserver * | aObserver, |
TLbtTriggerEventMask | aEventMask | |||
) |
Register for notifications when the container trigger store changes. The parameters specify the events for which the observer can choose to get notification.
the client should implement the observer methods to obtain the events.
MLbtContainerChangeEventObserver * aObserver | This parameter specifies the observer for the events. The observer will be notified when ever a change occurs in the Container. The container does not take ownership of this parameter. |
TLbtTriggerEventMask aEventMask | This parameter specifies the specific events for which the client wants to obtain notifications |
IMPORT_C void | SetTimeTillCompaction | ( | TTime | aTime | ) |
Used to set the time till when compaction is preferred. Over the time specified compaction should not happed in ideal cases. As and when compaction happens this time is check to see that compaction does not over shoot this time interval
TTime aTime | the time untill which compaction can proceed without effecting the system |
IMPORT_C void | UpdateTriggerFiredState | ( | RArray < TLbtTriggerId > & | aTriggerIds, |
TInt & | aOpId, | |||
TBool | aFireBool, | |||
TRequestStatus & | aStatus | |||
) |
Modify the trigger fire state.The fires state of both session and startup triggers can be modified using this method.
RArray < TLbtTriggerId > & aTriggerIds | an array containing the trigger ids whose fired state needs to be updated |
TInt & aOpId | the operation identifier |
TBool aFireBool | the state to which the fires state has to be updated |
TRequestStatus & aStatus | the request status of the client |
IMPORT_C void | UpdateTriggerL | ( | CLbtContainerTriggerEntry & | aEntry, |
TLbtTriggerDataMask | aDataMask, | |||
TLbtTriggerAttributeFieldsMask | aAttrMask, | |||
TInt & | aOpId, | |||
TRequestStatus & | aStatus, | |||
TLbtSecurityPolicy | aSecurityPolicy = KLbtNullSecurity | |||
) |
Modifies the fields of a particular trigger in container. The fields of both session and startup triggers can be changed using this method.
The Update Trigger potentially allows modification for any trigger attribute except the trigger ID. The Container does not perform any checks regarding non modifiable attributes.
CLbtContainerTriggerEntry & aEntry | refrence to the trigger entry whose fields have to be changed |
TLbtTriggerDataMask aDataMask | the mask of the data fields that have to be changed |
TLbtTriggerAttributeFieldsMask aAttrMask | the mask of the attribute fields that have to be changed |
TInt & aOpId | the operation identifier |
TRequestStatus & aStatus | the request status of the client |
TLbtSecurityPolicy aSecurityPolicy = KLbtNullSecurity |
IMPORT_C void | UpdateTriggersState | ( | CLbtTriggerEntry::TLbtTriggerState | aState, |
CLbtContainerUpdateFilter * | aFilter, | |||
TInt & | aOpId, | |||
TLbtFireOnUpdate | aFireOnUpdate, | |||
TRequestStatus & | aStatus, | |||
TLbtSecurityPolicy | aSecurityPolicy = KLbtNullSecurity | |||
) |
Modify the state of triggers in the Container. The state of both session and startup triggers can be modified using this method.
The Update Trigger potentially allows modification for any trigger attribute except the trigger ID. The Container does not perform any checks regarding non modifiable attributes.
The Filter can specify a list of trigger Ids. Hence using this method it is possible to enable or disable a list of triggers.
CLbtTriggerEntry::TLbtTriggerState aState | This parameter specifies the state to which the trigger should be set to. |
CLbtContainerUpdateFilter * aFilter | This parameter specifies the triggers for which the state has to be changed. The Container will take ownership of the filter paramter. |
TInt & aOpId | |
TLbtFireOnUpdate aFireOnUpdate | |
TRequestStatus & aStatus | Contains the error code once the operation is completed. The value can be any Symbian error code. |
TLbtSecurityPolicy aSecurityPolicy = KLbtNullSecurity |
IMPORT_C void | UpdateTriggersValidity | ( | TLbtTriggerDynamicInfo::TLbtTriggerValidity | aValidity, |
RArray < TLbtTriggerId > & | aTriggerIds, | |||
TInt & | aOpId, | |||
TRequestStatus & | aStatus, | |||
TLbtSecurityPolicy | aSecurityPolicy = KLbtNullSecurity | |||
) |
Modify the validity of triggers in the Container. The validity attribute of both session and startup triggers can be modified using this method.
The Update Trigger potentially allows modification for any trigger attribute except the trigger ID. The Container does not perform any checks regarding non modifiable attributes.
The Filter can specify a list of trigger Ids. Hence using this method it is possible to set a list of triggers to valid or invalid.
TLbtTriggerDynamicInfo::TLbtTriggerValidity aValidity | This parameter specifies the validity to which the trigger should be set to. |
RArray < TLbtTriggerId > & aTriggerIds | |
TInt & aOpId | |
TRequestStatus & aStatus | Contains the error code once the operation is completed.The value can be any Symbian error code. |
TLbtSecurityPolicy aSecurityPolicy = KLbtNullSecurity |
CLbtContainer & | operator= | ( | const CLbtContainer & | aContainer | ) | [private] |
Overload equality operator The private overload of the equality operator prevents the usage of equality operator with this class.
const CLbtContainer & aContainer |
enumerator to specify the different trigger store events .
ELbtConTriggerCreated = 0x0001 | |
ELbtConTriggerDeleted = 0x0002 | |
ELbtConTriggerNameFieldChanged = 0x0004 | |
ELbtConTriggerStateFieldChanged = 0x0008 | |
ELbtConTriggerRequestorFieldChanged = 0x0010 | |
ELbtConTriggerManagerUiFieldChanged = 0x0020 | |
ELbtConTriggerConditionFieldChanged = 0x0040 | |
ELbtConTriggerStartupFieldChanged = 0x0080 | |
ELbtConTriggerHysteresisFieldChanged = 0x0100 | |
ELbtConTriggerRectAreaFieldChanged = 0x0200 | |
ELbtConTriggerFiredFieldChanged = 0x0400 | |
ELbtConTriggerStrategyDataFieldChanged = 0x0800 | |
ELbtConTriggerValidityFieldChanged = 0x1000 | |
ELbtConTriggerFireOnCreationFieldChanged = 0x2000 | |
ELbtConTriggerEnabledAndValidCreated = 0x4000 |
CLbtContainer * | iContainerInstance | [private, static] |
Pointer to an instance of this class. Owns
RArray < TLbtTriggerStoreChangeObserver > | iObservers | [private] |
Array of Trigger Store Change Observers. Owns
TInt | iRefCount | [private, static] |
variable to maintain usage reference count for the shared instance of this class.
RPointerArray < MLbtTriggerStore > | iTriggerStores | [private] |
Array of Pointers to Trigger Store Managers. Owns
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.