1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/epoc32/include/mw/lbtcommon.h Tue Mar 16 16:12:26 2010 +0000
1.3 @@ -0,0 +1,179 @@
1.4 +/*
1.5 +* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
1.6 +* All rights reserved.
1.7 +* This component and the accompanying materials are made available
1.8 +* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
1.9 +* which accompanies this distribution, and is available
1.10 +* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
1.11 +*
1.12 +* Initial Contributors:
1.13 +* Nokia Corporation - initial contribution.
1.14 +*
1.15 +* Contributors:
1.16 +*
1.17 +* Description: Constants and data types used by RLbt client.
1.18 +*
1.19 +*/
1.20 +
1.21 +
1.22 +#ifndef LBTCOMMON_H
1.23 +#define LBTCOMMON_H
1.24 +
1.25 +#include <e32std.h>
1.26 +#include <lbspositioninfo.h>
1.27 +#include <lbtgeoareabase.h>
1.28 +
1.29 +/**
1.30 + * Trigger identity data type.
1.31 + *
1.32 + * @since S60 5.1
1.33 + */
1.34 +typedef TUint32 TLbtTriggerId;
1.35 +
1.36 +/**
1.37 + * Defines the null trigger ID.
1.38 + *
1.39 + * @since S60 5.1
1.40 + */
1.41 +const TLbtTriggerId KLbtNullTriggerId = 0;
1.42 +
1.43 +/**
1.44 + * Defines maximum length of the trigger name.
1.45 + *
1.46 + * @since S60 5.1
1.47 + */
1.48 +const TInt KLbtMaxNameLength = 256;
1.49 +
1.50 +/**
1.51 + * Error code used when a client application tries
1.52 + * to create a trigger with trigger area smaller than
1.53 + * the system's minimum size of trigger area.
1.54 + *
1.55 + * @since S60 5.1
1.56 + */
1.57 +const TInt KErrTriggerAreaTooSmall = -20000;
1.58 +
1.59 +/**
1.60 + * Error code used when a client application tries to create start-up
1.61 + * triggers beyond the limit specified by the system
1.62 + *
1.63 + * @since S60 5.1
1.64 + */
1.65 +const TInt KLbtErrMaxTriggerLimitExceeded = -20001;
1.66 +
1.67 +/**
1.68 + * Error code used when a client application tries to create triggers beyond
1.69 + * the total number of enabled and valid triggers limit define by the system
1.70 + *
1.71 + * @since S60 5.1
1.72 + */
1.73 +const TInt KLbtErrMaxEnabledValidTriggersLimitExceeded = -20002;
1.74 +
1.75 +/**
1.76 + * Trigger entry attribute fields mask.
1.77 + *
1.78 + * @see CLbtTriggerEntry::TAttribute
1.79 + *
1.80 + * @since S60 5.1
1.81 + */
1.82 +typedef TUint32 TLbtTriggerAttributeFieldsMask;
1.83 +
1.84 +/**
1.85 + * Defines all attributes of a trigger entry are specified.
1.86 + *
1.87 + * @since S60 5.1
1.88 + */
1.89 +const TLbtTriggerAttributeFieldsMask KLbtTriggerAttributeFieldsAll = 0xffffffff;
1.90 +
1.91 +/**
1.92 + * Trigger dynamic information fields mask.
1.93 + *
1.94 + * @see TLbtTriggerDynamicInfo::TLbtDynamicInfoAttribute
1.95 + *
1.96 + * @since S60 5.1
1.97 + */
1.98 +typedef TUint32 TLbtTriggerDynamicInfoFieldsMask;
1.99 +
1.100 +/**
1.101 + * Defines all attributes of the trigger's dynamic information are specified.
1.102 + *
1.103 + * @since S60 5.1
1.104 + */
1.105 +const TLbtTriggerDynamicInfoFieldsMask KLbtTriggerDynInfoFieldsAll = 0xffffffff;
1.106 +
1.107 +/**
1.108 + * Defines the default time interval after which the trigger is set effective by the Location Triggering Server.
1.109 + *
1.110 + * @since S60 5.1
1.111 + */
1.112 +const TInt KLbtDefaultTimeToRearm = 600;
1.113 +
1.114 +/**
1.115 + * Defines the maximum time interval after which the trigger is set effective by the Location Triggering Server.
1.116 + *
1.117 + * @since S60 5.1
1.118 + */
1.119 +const TInt KLbtMaxTimeToRearm = 2147483647;
1.120 +
1.121 +
1.122 +/**
1.123 + * Defines the minimum time interval after which the trigger is set effective by the Location Triggering Server.
1.124 + *
1.125 + * @since S60 5.1
1.126 + */
1.127 +const TInt KLbtMinTimeToRearm = 0;
1.128 +
1.129 +
1.130 +/**
1.131 + * Structure defines detailed information of a trigger firing event.
1.132 + *
1.133 + * @since S60 5.1
1.134 + */
1.135 +struct TLbtTriggerFireInfo
1.136 + {
1.137 + /**
1.138 + * Type of trigger fired.
1.139 + */
1.140 + CLbtGeoAreaBase::TGeoAreaType iAreaType;
1.141 +
1.142 + /**
1.143 + * The identity of the fired trigger.
1.144 + */
1.145 + TLbtTriggerId iTriggerId;
1.146 +
1.147 + /**
1.148 + * Position information of when the trigger was fired. Only
1.149 + * basic position information(class TPositionInfo) is returned by Location
1.150 + * Triggering Server.
1.151 + */
1.152 + TPositionInfo iFiredPositionInfo;
1.153 +
1.154 + /**
1.155 + * For future use.
1.156 + */
1.157 + TUint8 iUnused[8];
1.158 + };
1.159 +
1.160 +/**
1.161 + * The status of the Location triggering supervision mechanism ( on/off ).
1.162 + *
1.163 + * @since S60 5.1
1.164 + */
1.165 +enum TLbtTriggeringMechanismState
1.166 + {
1.167 + ETriggeringMechanismOn = 1, ///<Location triggering supervision mechanism is on
1.168 + ETriggeringMechanismOff = 2 ///<Location triggering supervision mechanism is off
1.169 + };
1.170 +
1.171 +/**
1.172 + * The values defined in the enum determine if a particular trigger would be fired soon
1.173 + * after an update operation if the terminal is found to be inside the triggering area
1.174 + * (entry type trigger) or outside a triggering area (exit type trigger).
1.175 + */
1.176 +enum TLbtFireOnUpdate
1.177 + {
1.178 + ELbtTrue,
1.179 + ELbtFalse,
1.180 + };
1.181 +
1.182 +#endif //LBTCOMMON_H