landmarks/locationlandmarks/tsrc/LandmarkTestModule/inc/FT_CPosTp47.h
branchRCL_3
changeset 44 2b4ea9893b66
equal deleted inserted replaced
42:02ba3f1733c6 44:2b4ea9893b66
       
     1 /*
       
     2 * Copyright (c) 2004 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 CPOSTp47_H
       
    21 #define CPOSTp47_H
       
    22 
       
    23 //  INCLUDES
       
    24 #include "FT_CLandmarkTestProcedureBase.h"
       
    25 
       
    26 // CLASS DECLARATION
       
    27 class CPosLandmarkParser;
       
    28 class CPosLandmarkEncoder;
       
    29 /**
       
    30 *  Test procedure 47
       
    31 */
       
    32 class CPosTp47 :public CLandmarkTestProcedureBase
       
    33     {
       
    34     public:  // Constructors and destructor
       
    35         
       
    36         /**
       
    37         * C++ default constructor.
       
    38         */
       
    39        
       
    40         CPosTp47(TInt tpno, CStifLogger* aLog) : CLandmarkTestProcedureBase(tpno, aLog) {};
       
    41         /**
       
    42         * Destructor.
       
    43         */
       
    44         ~CPosTp47() {};
       
    45 
       
    46     public: // Functions from base classes
       
    47 
       
    48         void CloseTest();
       
    49 
       
    50         /**
       
    51         * From CLandmarkTestProcedureBase
       
    52         * Runs the test in the module
       
    53         */
       
    54         void StartL();
       
    55 
       
    56     private:
       
    57 
       
    58         /**
       
    59         * Create XML data files used in this test
       
    60         * The files then need to be manually changed
       
    61         * aUseFile if data should be written to XML file
       
    62         * if EFalse data is written to buffer (and then to a buffer file)
       
    63         */
       
    64         void CreateXMLData(TBool aUseFile);
       
    65 
       
    66         /**
       
    67         * Check XML data created in CreateXMLData
       
    68         */
       
    69         void CheckXMLData(TBool aUseFile);
       
    70 
       
    71         /**
       
    72         * 
       
    73         * @aFile the file name
       
    74         */
       
    75         void PrintParsedDataFromEncoderL(
       
    76             const TDesC& aFile, 
       
    77             const TDesC8&  aBuffer, 
       
    78             TInt aExpectedStatusCode,
       
    79             const TDesC8& aMimeType);
       
    80 
       
    81         void PrintLandmarkFieldsL(const CPosLandmark& aLandmark, TBool aTraceFlag=EFalse);
       
    82         void PrintLandmarkFieldsWithDescriptionL(const CPosLandmark& aLandmark, TBool aTraceFlag=EFalse);
       
    83 
       
    84         /**
       
    85         * Check that the parser does not support 
       
    86         * building index for parsed landmarks
       
    87         */
       
    88         void CheckIndexNotSupportedL();
       
    89 
       
    90         /**
       
    91         * Check that cancel of parse is correct
       
    92         */
       
    93         void DoCancelTestL();
       
    94 
       
    95 
       
    96         /**
       
    97         * Trace to trace file
       
    98         */
       
    99         void TraceL(const TDesC& msg);
       
   100         
       
   101          // Added for BC testing 
       
   102         void MakeEmptyLmDatabaseL( CPosLandmarkDatabase& aLdb,
       
   103                                    CPosLmCategoryManager& aCatMgr ); 
       
   104 
       
   105     private:
       
   106         CPosLandmarkParser* iLandmarkParser;
       
   107 
       
   108         CPosLandmarkEncoder* iLandmarkEncoder;
       
   109 
       
   110         RPointerArray<CPosLandmark> iLandmarks;
       
   111 
       
   112         TInt iErrorsFound;
       
   113 
       
   114         CBufBase* iEncoderBuffer;
       
   115         
       
   116         CPosLmCategoryManager*                 iCategoryManager;
       
   117 
       
   118     };
       
   119 
       
   120 #endif      // CPOSTp47_H
       
   121             
       
   122 // End of File