locsrv_pub/location_triggering_api/inc/lbtcommon.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:  Constants and data types used by RLbt client.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef LBTCOMMON_H
       
    20 #define LBTCOMMON_H
       
    21 
       
    22 #include <e32std.h>
       
    23 #include <lbspositioninfo.h>
       
    24 #include <lbtgeoareabase.h>
       
    25 
       
    26 /**
       
    27  *  Trigger identity data type.
       
    28  *
       
    29  *  @since S60 5.1
       
    30  */
       
    31 typedef TUint32 TLbtTriggerId;
       
    32 
       
    33 /**
       
    34  *  Defines the null trigger ID. 
       
    35  * 
       
    36  *  @since S60 5.1 
       
    37  */
       
    38 const TLbtTriggerId KLbtNullTriggerId = 0;
       
    39 
       
    40 /**
       
    41  * Defines maximum length of the trigger name.
       
    42  *
       
    43  * @since S60 5.1
       
    44  */
       
    45 const TInt KLbtMaxNameLength = 256;
       
    46 
       
    47 /**
       
    48  * Error code used when a client application tries 
       
    49  * to create a trigger with trigger area smaller than
       
    50  * the system's minimum size of trigger area.
       
    51  *
       
    52  *  @since S60 5.1
       
    53  */
       
    54 const TInt KErrTriggerAreaTooSmall = -20000;
       
    55 
       
    56 /**
       
    57  * Error code used when a client application tries to create start-up
       
    58  * triggers beyond the limit specified by the system 
       
    59  *
       
    60  * @since S60 5.1
       
    61  */
       
    62 const TInt KLbtErrMaxTriggerLimitExceeded = -20001;
       
    63 
       
    64 /**
       
    65  * Error code used when a client application tries to create triggers beyond
       
    66  * the total number of enabled and valid triggers limit define by the system
       
    67  *
       
    68  * @since S60 5.1
       
    69  */
       
    70 const TInt KLbtErrMaxEnabledValidTriggersLimitExceeded = -20002;
       
    71 
       
    72 /**
       
    73  * Trigger entry attribute fields mask. 
       
    74  *
       
    75  * @see CLbtTriggerEntry::TAttribute
       
    76  * 
       
    77  * @since S60 5.1
       
    78  */
       
    79 typedef TUint32 TLbtTriggerAttributeFieldsMask;
       
    80 
       
    81 /**
       
    82  * Defines all attributes of a trigger entry are specified.
       
    83  *
       
    84  * @since S60 5.1
       
    85  */
       
    86 const TLbtTriggerAttributeFieldsMask KLbtTriggerAttributeFieldsAll = 0xffffffff;
       
    87 
       
    88 /**
       
    89  * Trigger dynamic information fields mask.
       
    90  *
       
    91  * @see TLbtTriggerDynamicInfo::TLbtDynamicInfoAttribute
       
    92  *
       
    93  * @since S60 5.1
       
    94  */
       
    95 typedef TUint32 TLbtTriggerDynamicInfoFieldsMask;
       
    96 
       
    97 /**
       
    98  * Defines all attributes of the trigger's dynamic information are specified.
       
    99  *
       
   100  * @since S60 5.1
       
   101  */
       
   102 const TLbtTriggerDynamicInfoFieldsMask KLbtTriggerDynInfoFieldsAll = 0xffffffff;
       
   103 
       
   104 /**
       
   105  * Defines the default time interval after which the trigger is set effective by the Location Triggering Server. 
       
   106  *
       
   107  * @since S60 5.1
       
   108  */
       
   109 const TInt KLbtDefaultTimeToRearm = 600;
       
   110 
       
   111 /**
       
   112  * Defines the maximum time interval after which the trigger is set effective by the Location Triggering Server. 
       
   113  *
       
   114  * @since S60 5.1
       
   115  */
       
   116 const TInt KLbtMaxTimeToRearm = 2147483647;
       
   117 
       
   118 
       
   119 /**
       
   120  * Defines the minimum time interval after which the trigger is set effective by the Location Triggering Server. 
       
   121  *
       
   122  * @since S60 5.1
       
   123  */
       
   124 const TInt KLbtMinTimeToRearm = 0;
       
   125 
       
   126 
       
   127 /**
       
   128  * Structure defines detailed information of a trigger firing event.
       
   129  *
       
   130  * @since S60 5.1
       
   131  */
       
   132 struct TLbtTriggerFireInfo
       
   133     {
       
   134     /**
       
   135      * Type of trigger fired.
       
   136      */
       
   137     CLbtGeoAreaBase::TGeoAreaType iAreaType;
       
   138     	
       
   139     /**
       
   140      * The identity of the fired trigger.
       
   141      */
       
   142     TLbtTriggerId iTriggerId;
       
   143 
       
   144     /**
       
   145      * Position information of when the trigger was fired. Only
       
   146      * basic position information(class TPositionInfo) is returned by Location 
       
   147      * Triggering Server.
       
   148      */
       
   149     TPositionInfo iFiredPositionInfo;
       
   150     
       
   151     /**
       
   152      * For future use.
       
   153      */
       
   154     TUint8 iUnused[8];
       
   155     };
       
   156 
       
   157 /**
       
   158  * The status of the Location triggering supervision mechanism ( on/off ).
       
   159  *
       
   160  * @since S60 5.1
       
   161  */
       
   162 enum TLbtTriggeringMechanismState
       
   163     {
       
   164     ETriggeringMechanismOn = 1,   ///<Location triggering supervision mechanism is on
       
   165     ETriggeringMechanismOff = 2   ///<Location triggering supervision mechanism is off
       
   166     };
       
   167 
       
   168 /**
       
   169  * The values defined in the  enum determine if a particular trigger would be fired soon 
       
   170  * after an update operation if the terminal is found to be inside the triggering area 
       
   171  * (entry type trigger) or outside a triggering area (exit type trigger). 
       
   172  */
       
   173 enum TLbtFireOnUpdate
       
   174     {
       
   175     ELbtTrue,
       
   176     ELbtFalse,
       
   177     };
       
   178    
       
   179 #endif //LBTCOMMON_H