locationtriggering/ltcontainer/inc/lbtcontainertriggerfilter.h
changeset 0 667063e416a2
equal deleted inserted replaced
-1:000000000000 0:667063e416a2
       
     1 /*
       
     2 * Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:  Class for filter based on the attributes value of a trigger. 
       
    15  *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef LBTCONTAINERTRIGGERFILTER_H
       
    20 #define LBTCONTAINERTRIGGERFILTER_H
       
    21 
       
    22 
       
    23 #include <lbttriggerentry.h>
       
    24 #include <lbttriggerdynamicinfo.h>
       
    25 #include <lbttriggerfilterbase.h>
       
    26 
       
    27 #include "lbtcontainertriggerentry.h"
       
    28 #include "lbtcontainerextendedtriggerinfo.h"
       
    29 
       
    30 /**
       
    31  * Class representing filter based on the additiona attributes  of a trigger. 
       
    32  *
       
    33  * Following trigger entry's attribute can be used in the filter when
       
    34  * listing triggers from Location Triggering Server.
       
    35  *
       
    36  * -  Hysteresis area. It specifies the hysteresis radius of the trigger.
       
    37  *
       
    38  * -  Rectangular Trigger Area. It specifies the trigger area in a rectangular form.
       
    39  * -  Trigger Fired Information. It specifies whether the trigger has fired or not.
       
    40  *
       
    41  * @lib lbt.lib
       
    42  * @since S60 4.0
       
    43  */
       
    44 
       
    45 
       
    46 NONSHARABLE_CLASS( CLbtContainerFilter ) : public CBase
       
    47     {
       
    48 
       
    49 public:
       
    50     
       
    51     /**
       
    52      * Constructs a new instance of CLbtContainerFilter. 
       
    53      * In the returned object, trigger type, trigger state and
       
    54      * trigger validity status is set to unused. 
       
    55      *
       
    56      * @return New instance of CLbtContainerFilter.
       
    57      */
       
    58     IMPORT_C static CLbtContainerFilter* NewL();    
       
    59     
       
    60     /**
       
    61      * Constructs a new instance of CLbtContainerFilter. 
       
    62      * In the returned object, trigger type, trigger state and
       
    63      * trigger validity status is set to unused. 
       
    64      *
       
    65      * @return New instance of CLbtContainerFilter.
       
    66      */
       
    67     static CLbtContainerFilter* NewL(CLbtContainerFilter* aFilter);
       
    68 
       
    69     /**
       
    70      * Destructor.
       
    71      */
       
    72     IMPORT_C virtual ~CLbtContainerFilter();
       
    73         
       
    74     /**
       
    75      * Resets the filter. The trigger type, trigger state
       
    76      * and trigger validity are set to unused.
       
    77      */
       
    78     IMPORT_C void ResetFilter();
       
    79         
       
    80     /**
       
    81      * Adds a hysteresis radius to the filter.
       
    82      *
       
    83      * @param[in] aRadius The type of the trigger to be retrieved.
       
    84      */
       
    85     IMPORT_C void AddHysteresisRadiusInFilter( 
       
    86         TReal aRadius ); 
       
    87             
       
    88     /**
       
    89      * Tests if the specified hysteresis radius is used in the filter.
       
    90      * 
       
    91      * @param[in] aRadius The trigger type used in the filter.
       
    92      * @return ETrue if the the trigger type is used in filter.
       
    93      * Otherwise, EFalse is returned.
       
    94      */
       
    95     IMPORT_C TBool IsHysteresisRadiusInFilter( 
       
    96         TReal aRadius ) const;
       
    97             
       
    98             
       
    99     /**
       
   100      * Adds a trigger area to the filter.
       
   101      *
       
   102      * @param[in] aState The trigger state used in the filter.
       
   103      */
       
   104     IMPORT_C void AddRectTrigAreaInFilterL( 
       
   105         CLbtExtendedTriggerInfo::TLbtTriggerRectArea aArea );
       
   106             
       
   107         
       
   108     /**
       
   109      * Tests if the specified rectangular area is in the filter.
       
   110      *
       
   111      * @param[in] aArea The trigger rectangular area.
       
   112      * @return ETrue if the the trigger state is used in filter.
       
   113      * Otherwise, EFalse is returned.
       
   114      */
       
   115     IMPORT_C TBool IsRectTriggerAreaInFilter( 
       
   116         CLbtExtendedTriggerInfo::TLbtTriggerRectArea aArea ) const;
       
   117             
       
   118         
       
   119     /**
       
   120      * Adds a trigger  firing information to the filter
       
   121      *
       
   122      * @param[in] aValidity The validity status value used in the filter.
       
   123      */
       
   124     IMPORT_C void AddFiredInfoInFilterL( 
       
   125         TBool aFired );
       
   126             
       
   127     /**
       
   128      * Tests if the trigger  firing information is in the filter.
       
   129      *
       
   130      * @param[in] aFired The validity status value used in the filter.
       
   131      *
       
   132      * @return ETrue if the the trigger firing information is used in filter.
       
   133      * Otherwise, EFalse is returned.
       
   134      */
       
   135     IMPORT_C TBool IsTriggerFiredInfoInFilter( 
       
   136         TBool aFired ) const;
       
   137             
       
   138     /**
       
   139      * Adds a secure Id information to the filter
       
   140      *
       
   141      * @param[in] aSid The Secure Id value that needs to be used in the filter.
       
   142      */
       
   143     IMPORT_C void AddOwnerSidInFilterL( 
       
   144         TSecureId aSid );
       
   145             
       
   146     /**
       
   147      * Tests if a secure Id information is present in the filter.
       
   148      *
       
   149      * @param[in] aSid The Secure Id value that needs to be chcked in the filter.
       
   150      *
       
   151      * @return ETrue if the specified Secure Id is used in filter.
       
   152      * Otherwise, EFalse is returned.
       
   153      */
       
   154     IMPORT_C TBool IsOwnerSidInFilter( 
       
   155         TSecureId aSid ) const;
       
   156     
       
   157      /**
       
   158      * Adds a trigger fire on creation flag to the filter
       
   159      *
       
   160      * @param[in] aFireOnCreation The boolean flag for trigger fire on creation.
       
   161      */
       
   162     IMPORT_C void AddTriggerFireOnCreationInFilterL( 
       
   163         TBool aFireOnCreation );
       
   164             
       
   165     /**
       
   166      * Tests if the trigger fire on creation flag is in the filter.
       
   167      *
       
   168      * @param[in] aFireOnCreation The boolean flag for trigger fire on creation.
       
   169      *
       
   170      * @return ETrue if the the trigger fire on creation flag is in filter.
       
   171      * Otherwise, EFalse is returned.
       
   172      */
       
   173     IMPORT_C TBool IsTriggerFireOnCreationInFilter( 
       
   174         TBool aFireOnCreation ) const;
       
   175         
       
   176     /**
       
   177      * To add startup process in filter
       
   178      */ 
       
   179     IMPORT_C void AddStartupProcessInFilterL( TFileName& aFileName );
       
   180     
       
   181     /**
       
   182      * Checks if startup process is in filter
       
   183      */ 
       
   184     IMPORT_C TBool IsStartupProcessInFilter( TFileName& aFileName );
       
   185     
       
   186     
       
   187     
       
   188     IMPORT_C void GetHystRadiusArrayL(RArray < TReal >* aHystRadiusArray);
       
   189 
       
   190     
       
   191     IMPORT_C void GetRectAreaArrayL (RArray < CLbtExtendedTriggerInfo::TLbtTriggerRectArea >* aTriggerRectAreaArray);
       
   192     
       
   193     
       
   194     IMPORT_C void GetTriggerFiredArrayL (RArray < TBool >* aTriggerFiredArray);
       
   195 
       
   196     IMPORT_C void GetSidArrayL(RArray< TSecureId >* aSidArray);
       
   197     
       
   198     IMPORT_C void GetTriggerFireOnCreationArrayL(RArray< TBool >* aTriggerFireOnCreationArray);
       
   199     
       
   200     IMPORT_C void GetStartupProcessArrayL(RArray<TFileName>* aStartupProcessArray);
       
   201         
       
   202 private:
       
   203         
       
   204     /**
       
   205      * Constructor
       
   206      */
       
   207     CLbtContainerFilter();
       
   208                 
       
   209     /**
       
   210      * Symbian 2nd Phase Constructor
       
   211      */
       
   212     void ConstructL();
       
   213     
       
   214     /**
       
   215      * Symbian 2nd Phase Constructor
       
   216      * Copy constructor
       
   217      */
       
   218     void ConstructL(CLbtContainerFilter* aFilter);
       
   219 
       
   220 private:
       
   221     /**
       
   222      * The type of the trigger to be listed
       
   223      */
       
   224     RArray<TReal> iHystRadiusArray;
       
   225 
       
   226     /**
       
   227      * Trigger state
       
   228      */
       
   229     RArray<CLbtExtendedTriggerInfo::TLbtTriggerRectArea> iTriggerRectAreaArray;
       
   230 
       
   231     /**
       
   232      * Trigger validity
       
   233      */
       
   234     RArray<TBool> iTriggerFiredArray;
       
   235 
       
   236     /**
       
   237      * Trigger SID value
       
   238      */
       
   239     RArray<TSecureId> iSidArray;
       
   240     
       
   241     /**
       
   242      * Trigger Fire on creation flag
       
   243      */
       
   244     RArray<TBool> iTriggerFireOnCreationArray;
       
   245     
       
   246     
       
   247     /**
       
   248      * Startup process array
       
   249      */
       
   250     RArray<TFileName> iStartupProcessArray;
       
   251          
       
   252     //Reserved
       
   253     TUint iReserved[8];
       
   254 
       
   255     };
       
   256 
       
   257 #endif // LBTTRIGGERFILTER_H