landmarks/locationlandmarks/tsrc/LandmarkTestModule/inc/FT_CPosTP28.h
branchRCL_3
changeset 44 2b4ea9893b66
equal deleted inserted replaced
42:02ba3f1733c6 44:2b4ea9893b66
       
     1 /*
       
     2 * Copyright (c) 2005 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: 
       
    15 *   ?description_line
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 #ifndef CPosTp28_H
       
    21 #define CPosTp28_H
       
    22 
       
    23 //  INCLUDES
       
    24 
       
    25 #include "FT_CLandmarkTestProcedureBase.h"
       
    26 
       
    27 class CActiveLmEvent;
       
    28 // CLASS DECLARATION
       
    29 
       
    30 /**
       
    31 *  Test procedure 28
       
    32 */
       
    33 class CPosTp28 : public CLandmarkTestProcedureBase
       
    34     {
       
    35     public:  // Constructors and destructor
       
    36         
       
    37         /**
       
    38         * C++ default constructor.
       
    39         */
       
    40         
       
    41         CPosTp28(TInt tpno, CStifLogger* aLog) : CLandmarkTestProcedureBase(tpno, aLog) {};
       
    42         /**
       
    43         * Destructor.
       
    44         */
       
    45         ~CPosTp28() {};
       
    46 
       
    47     public: // Functions from base classes
       
    48 
       
    49        
       
    50        
       
    51         void CloseTest();
       
    52 
       
    53         /**
       
    54         * From CPosTestProcedureBase
       
    55         * Runs the test in the module
       
    56         */
       
    57         void StartL();
       
    58 
       
    59     private:    // New functions
       
    60    
       
    61         /**
       
    62         * Test logging of landmark events
       
    63         */
       
    64         void LandmarkEventTest();
       
    65 
       
    66         void LandmarkEventQueueTest();
       
    67 		
       
    68 
       
    69     private:    // Data
       
    70         
       
    71         CActiveLmEvent*         iActiveLmEvent;
       
    72         CPosLmCategoryManager*  iCategoryManager;
       
    73     };
       
    74 
       
    75 class CActiveLmEvent : public CActive
       
    76     {
       
    77     public:
       
    78         
       
    79         static CActiveLmEvent* NewL(CStifLogger* aLog);
       
    80       
       
    81         /**
       
    82         * Destructor.
       
    83         */
       
    84         ~CActiveLmEvent();
       
    85 
       
    86     public: 
       
    87         
       
    88         void Start();    
       
    89 
       
    90         /**
       
    91         * From CActive
       
    92         * Handles request completion event.
       
    93         */
       
    94         void DoCancel();
       
    95     
       
    96         /**
       
    97         * From CActive.
       
    98         *
       
    99         * Handles request completion event.
       
   100         */
       
   101         void RunL();
       
   102     
       
   103     private:
       
   104 
       
   105          /**
       
   106         * C++ constructor.
       
   107         */
       
   108         CActiveLmEvent(CStifLogger* aLog);
       
   109 
       
   110         void ConstructL();
       
   111 
       
   112         void VerifyEvent();
       
   113 
       
   114         void VerifyMergedEvent();
       
   115 
       
   116         void AssertCorrectEvent(TPosLmEventType  aExpectedEventType,
       
   117 	                            TPosLmEventType  aEventType,
       
   118     	                        TPosLmItemId aExpectedLandMarkItemId,
       
   119 	                            TPosLmItemId aLandMarkItemId);
       
   120 
       
   121     private: // data
       
   122 
       
   123         friend class CPosTp28;
       
   124 
       
   125         CStifLogger*               iLog; 
       
   126         CPosLandmarkDatabase*   iDatabase;
       
   127        
       
   128        
       
   129 
       
   130         TPosLmEvent             iEvent;
       
   131         TInt                    iEventNumber;
       
   132         TInt                    iMergedEventNumber;
       
   133         TInt                    iGlobalErr;
       
   134 
       
   135         TBool                   iQueueTest;
       
   136 
       
   137         TPosLmItemId            iLandmarkId;
       
   138         TPosLmItemId            iLandmarkId2;
       
   139         TPosLmItemId            iLandmarkId3;
       
   140         TPosLmItemId            iLandmarkId4;
       
   141 
       
   142         TPosLmItemId            iCategoryId;
       
   143         TPosLmItemId            iCategoryId2;
       
   144         TPosLmItemId            iNonExistingCategoryId;
       
   145         TPosLmItemId            iDeleteCategoryId;
       
   146     };
       
   147 
       
   148 #endif      // CPosTp28_H
       
   149             
       
   150 // End of File