Example Application Guide

- Main Page
- Classes
- Files

# geoprofilesengine.h

    00001 /*
    00002 * Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
    00003 * All rights reserved.
    00004 * This component and the accompanying materials are made available
    00005 * under the terms of the License "Eclipse Public License v1.0"
    00006 * which accompanies this distribution, and is available
    00007 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
    00008 *
    00009 * Initial Contributors:
    00010 * Nokia Corporation - initial contribution.
    00011 *
    00012 * Contributors:
    00013 *
    00014 * Description:  Engine for Geoprofiles application
    00015 *
    00016 */
    00017
    00018
    00019 #ifndef C_GEOPROFILESENGINE_H
    00020 #define C_GEOPROFILESENGINE_H
    00021
    00022 // SYSTEM INCLUDES
    00023 #include <e32base.h>
    00024 #include <lbtcommon.h>
    00025 #include <lbtserver.h>
    00026 #include <lbt.h>
    00027 #include <lbttriggerchangeeventobserver.h>
    00028 #include <lbttriggerchangeeventnotifier.h>
    00029
    00030 // FORWARD DECLARATIONS
    00031 class CGeoProfile;
    00032 class CLbtStartupTrigger;
    00033 class CAknWaitDialog;
    00034
    00035 /**
    00036  * Observer class for CGeoProilesEngine
    00037  */
    00038 class MGeoProfilesEngineObserver
    00039     {
    00040 public:
    00041     virtual void ProfileStatusChangedL() = 0;
    00042     };
    00043
    00044 /**
    00045  * Geo Profile Engine
    00046  */
    00047 class CGeoProfilesEngine : public CActive,
    00048                            public MLbtTriggerChangeEventObserver
    00049     {
    00050 public:
    00051     enum TGeoProfileEngState
    00052         {
    00053         ENoAction,
    00054         ECreateProfile,
    00055         EUpdateProfile,
    00056         EDeleteProfile
    00057         };
    00058 public:
    00059     /**
    00060      * Constructs a new instance of CGeoProfilesEngine
    00061      */
    00062     static CGeoProfilesEngine* NewL( MGeoProfilesEngineObserver&        aObserver );
    00063
    00064     /**
    00065      * C++ Destructor.
    00066      * Frees all the resources
    00067      */
    00068     virtual ~CGeoProfilesEngine();
    00069
    00070     /**
    00071      * Add a new profile
    00072      */
    00073     void AddProfileL( CGeoProfile&      aProfile );
    00074
    00075     /**
    00076      * Updates a profile
    00077      */
    00078     void UpdateProfileL( CGeoProfile&      aProfile );
    00079
    00080     /**
    00081      * Delete an existing profile
    00082      */
    00083     void RemoveProfileL( CGeoProfile&      aProfile );
    00084
    00085     /**
    00086      * List profiles
    00087      */
    00088     void ListProfilesL( RPointerArray< CGeoProfile>&   aGeoProfiles );
    00089
    00090     /**
    00091      * Inherited from MLbtTriggerChangeEventObserver
    00092      */
    00093     void TriggerChangedL( const TLbtTriggerChangeEvent& aEvent );
    00094
    00095 private:
    00096     /**
    00097      * C++ Constructor
    00098      */
    00099     CGeoProfilesEngine( MGeoProfilesEngineObserver&        aObserver );
    00100
    00101     /**
    00102      * Second phase of two phase construction
    00103      */
    00104     void ConstructL();
    00105
    00106     /**
    00107      * Inherited from CActive
    00108      */
    00109     void RunL();
    00110
    00111     /**
    00112      * Inherited from CActive
    00113      */
    00114     void DoCancel();
    00115
    00116     void LaunchWaitDialogL( TInt aResource );
    00117
    00118     void DismissWaitDialogL();
    00119
    00120     void DoUpdateProfileL( CGeoProfile&      aProfile );
    00121
    00122 private: // Member Variables
    00123     MGeoProfilesEngineObserver&         iObserver;
    00124
    00125     RLbt                                iLbt;
    00126
    00127     RLbt                                iLbtNotifier;
    00128
    00129     RLbtServer                          iLbtServer;
    00130
    00131     CLbtTriggerChangeEventNotifier*     iNotifier;
    00132
    00133     CLbtStartupTrigger*                 iStartupTrigger;
    00134
    00135     TUint32                             iTriggerId;
    00136
    00137     CGeoProfile*                        iProfile;
    00138
    00139     TGeoProfileEngState                 iEngineState;
    00140
    00141     CAknWaitDialog*                     iWaitDialog;
    00142     };
    00143
    00144 #endif // C_GEOPROFILESENGINE_H

© Nokia 2009 |