locationtriggering/ltcontextsourceplugin/inc/lbttriggernode.h
changeset 0 667063e416a2
equal deleted inserted replaced
-1:000000000000 0:667063e416a2
       
     1 /*
       
     2 * Copyright (c) 2009 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 used to set & get the trigger attributes
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef TRIGGERNODE_H_
       
    19 #define TRIGGERNODE_H_
       
    20 
       
    21 #include <e32cmn.h>
       
    22 #include <lbttriggerconditionarea.h> 
       
    23 #include <lbttriggerentry.h>
       
    24 
       
    25 
       
    26 #include "lbtcontextsourceplugincommon.h"
       
    27 
       
    28 /*
       
    29  * This class simply holds the trigger specifications.
       
    30  * The input parameters to create a trigger are stored to and 
       
    31  * retrieved from this class.
       
    32  */
       
    33 class TTriggerNode       
       
    34     {
       
    35 public: 
       
    36     
       
    37     /*
       
    38      * Store trigger name
       
    39      */
       
    40      void SetTriggerNameL(const TPtrC& aTriggerName);
       
    41 
       
    42      /*
       
    43       * Store Latitude
       
    44       */
       
    45      void SetLatitudeL(const TPtrC& aLatitude);
       
    46     
       
    47      /*
       
    48       * Store Longitude
       
    49       */
       
    50      void SetLongitudeL(const TPtrC& aLongitude);
       
    51     
       
    52      /*
       
    53       * Store type of monitoring area
       
    54       */
       
    55      void SetRegionL(const TPtrC& aRegion);
       
    56     
       
    57      /*
       
    58       * Store radius of trigger monitoring area
       
    59       */
       
    60      void SetRadiusL(const TPtrC& aRadius);
       
    61     
       
    62      /*
       
    63       * Store trigger fire condition.
       
    64       * This decided whether the trigger is to be fired when
       
    65       * the device enters the triggering are, or whether
       
    66       * the trigger is to be fire when the device leaves the 
       
    67       * monitoring area, or on both conditions.
       
    68       */
       
    69      void SetDirectionL(const TPtrC& aDirection);
       
    70     
       
    71      /*
       
    72       * Store Name of Trigger set
       
    73       */
       
    74      void SetContextSource(const TPtrC& aSetName);
       
    75      
       
    76      /*
       
    77       * Store information as to whether the trigger is
       
    78       * to be actively monitored or not
       
    79       */
       
    80      void SetCurrentStateL(const TPtrC& aCurrentState);
       
    81 
       
    82      /*
       
    83       * Retrieve trigger name
       
    84       */
       
    85       TInt GetTriggerName( TPtrC& aTriggerName );
       
    86     
       
    87      /*
       
    88       * Retrieve Latitude
       
    89       */
       
    90       TInt GetLatitude( TReal& aLatitude );
       
    91 
       
    92      /*
       
    93       * Retrieve Longitude
       
    94       */
       
    95       TInt GetLongitude( TReal& aLongitude );
       
    96     
       
    97      /*
       
    98       * Retrieve type of monitoring area
       
    99       */
       
   100       TInt GetRegion( TPtrC& aRegion );
       
   101     
       
   102      /*
       
   103       * Retrieve radius of trigger monitoring area
       
   104       */
       
   105       TInt GetRadius( TReal& aRadius );
       
   106     
       
   107      /*
       
   108       * Retrieve trigger fire condition.
       
   109       * This decided whether the trigger is to be fired when
       
   110       * the device enters the triggering are, or whether
       
   111       * the trigger is to be fire when the device leaves the 
       
   112       * monitoring area, or on both conditions.
       
   113       */
       
   114      CLbtTriggerConditionArea::TDirection GetDirection();
       
   115     
       
   116      /*
       
   117       * Retrieve Name of Trigger set
       
   118       */
       
   119      TPtrC& GetContextSource();
       
   120 
       
   121      /*
       
   122       * Retrieve information as to whether the trigger is
       
   123       * to be actively monitored or not
       
   124       */
       
   125      CLbtTriggerEntry::TLbtTriggerState GetCurrentState();
       
   126 
       
   127 private:
       
   128     
       
   129     /*
       
   130      * Latitude
       
   131      */
       
   132     TReal64 iLatitude;
       
   133      
       
   134     /*
       
   135      * Longitude
       
   136      */
       
   137     TReal64 iLongitude;
       
   138      
       
   139     /*
       
   140      * Trigger name
       
   141      */
       
   142      TPtrC iTriggerName;
       
   143      
       
   144      /*
       
   145       * Type of triggering area
       
   146       */
       
   147      TPtrC iRegion;
       
   148      
       
   149      /*
       
   150       * Radius of monitoring region
       
   151       */
       
   152      TReal iRadius;
       
   153      
       
   154      /*
       
   155       * Setname to which the trigger belongs
       
   156       */
       
   157      TPtrC iSetName;
       
   158      
       
   159      /*
       
   160       * Direction of monitoring trigger firing event. (OnEntry or OnExit or both)
       
   161       */
       
   162      CLbtTriggerConditionArea::TDirection iDirection;
       
   163      
       
   164      /*
       
   165       * Current state of the trigger
       
   166       */
       
   167      CLbtTriggerEntry::TLbtTriggerState iCurrentState;
       
   168 
       
   169     };
       
   170 
       
   171 #endif /* TRIGGERNODE_H_ */