locsrv_pub/landmarks_search_api/tsrc/inc/testposlmksearch.h
changeset 0 667063e416a2
equal deleted inserted replaced
-1:000000000000 0:667063e416a2
       
     1 /*
       
     2 * Copyright (c) 2007 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:  Declaration of CTestPosLmkSearch  class
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef C_TESTPOSLMKSEARCH_H
       
    21 #define C_TESTPOSLMKSEARCH_H
       
    22 
       
    23 
       
    24 #include <e32base.h>
       
    25 #include <EPos_CPosLandmarkSearch.h>
       
    26 #include <EPos_CPosLandmark.h>
       
    27 #include <EPos_CPosLandmarkDatabase.h>
       
    28 /**
       
    29  *  This class will test methods of CPosLandmarkSearch class
       
    30  *  @p CTestPosLmkSearch clss contians functions to test methods of
       
    31  *  CPosLandmarkSearch class
       
    32  *
       
    33  *  @lib testlmksearchapi.lib
       
    34  *  @since S60 v3.2
       
    35  */
       
    36 class CTestPosLmkSearch :public CBase
       
    37     {
       
    38 
       
    39 public:
       
    40 
       
    41     /**
       
    42      * Two-phased constructor.
       
    43      */
       
    44     
       
    45      static CTestPosLmkSearch* NewLC();
       
    46     
       
    47 
       
    48     /**
       
    49     * Destructor.
       
    50     */
       
    51     
       
    52     virtual ~CTestPosLmkSearch();
       
    53 
       
    54     /**
       
    55      * This function is used to check NewL function of CPosLandmarkSearch class
       
    56      *
       
    57      */
       
    58     void TestNewL();
       
    59     
       
    60     /**
       
    61      * This function is used to check MaxNumOfMatches function of CPosLandmarkSearch class.
       
    62      *
       
    63      */
       
    64     void TestMaxNumOfMatchesL();
       
    65     
       
    66     /**
       
    67      * This function is used to check SetMaxNumOfMatches function of CPosLandmarkSearch class
       
    68      * with default value
       
    69      * @param aNumOfMatches Number of matches
       
    70      */
       
    71     void TestSetMaxNumOfMatchesL(TInt aNumOfMatches=-1);
       
    72 	
       
    73 	/**
       
    74      * This function is used to check StartLandmarkSearchL function of CPosLandmarkSearch class
       
    75      * with default value
       
    76      * @param aBool If this is true,landmark is searched in the last search result else
       
    77      * from the database 
       
    78      */
       
    79      
       
    80 	void TestStartLandmarkSearchL(TBool aBool=EFalse);
       
    81 	
       
    82 	/**
       
    83      * This function is used to check StartLandmarkSearchL function of CPosLandmarkSearch class
       
    84      * with default value and with sorting option.
       
    85      */
       
    86 
       
    87 	void TestStartLandmarkSearchL1L();
       
    88 	
       
    89 	/**
       
    90      * This function is used to check StartLandmarkSearchL function of CPosLandmarkSearch class
       
    91      * with default value.With sorting option and category of sort is specified.
       
    92      */
       
    93 
       
    94 	void TestStartLandmarkSearchL2L();
       
    95 	
       
    96 	/**
       
    97      * This function is used to check NumOfMatches function of CPosLandmarkSearch class.
       
    98      */
       
    99 	
       
   100 	void TestNumOfMatchesL();
       
   101 	
       
   102 	/**
       
   103      * This function is used to check MatchIteratorL function of CPosLandmarkSearch class.
       
   104      */
       
   105 	void TestMatchIteratorL();
       
   106 
       
   107  	/**
       
   108      * This function is used to check SetDisplayData function of CPosLandmarkSearch class.
       
   109      */
       
   110 	void TestSetDisplayDataL(); 
       
   111 	
       
   112 	/**
       
   113      * This function is used to check UnsetDisplayData function of CPosLandmarkSearch class.
       
   114      */
       
   115 	void TestUnsetDisplayDataL(); 
       
   116 	
       
   117 private:
       
   118 
       
   119 	/**
       
   120     * Constructor.
       
   121     */
       
   122     CTestPosLmkSearch();
       
   123     
       
   124     /**
       
   125     * Landmarks used for testing are created here.
       
   126     */
       
   127 
       
   128     void CreateLandmarkL();
       
   129 	
       
   130 	/**
       
   131     * All landmarks are deleted when this function is called.
       
   132     */
       
   133 
       
   134 	void DeleteAllLandMarksL();
       
   135 	
       
   136 	    /**
       
   137     * Second phase construction.
       
   138     */
       
   139     void ConstructL();
       
   140    
       
   141 private: // data
       
   142 
       
   143     /**
       
   144      * Pointer to landmark object
       
   145      * Own
       
   146      */
       
   147      CPosLandmark* iLandmark;
       
   148 
       
   149     /**
       
   150      * Pointer to landmark database object
       
   151      * Own.  
       
   152      */
       
   153      CPosLandmarkDatabase* iLandmarkDatabase;
       
   154 
       
   155     /**
       
   156      * Landmark id object
       
   157      */
       
   158      TPosLmItemId iLandmarkId;
       
   159 
       
   160     };
       
   161 
       
   162 
       
   163 
       
   164 
       
   165 #endif // C_TESTPOSLMKSEARCH_H