serviceproviders/sapi_landmarks/tsrc/dev/tlandmarkstest/tlmlandmarktests/inc/clandmarkasynctests.h
changeset 5 989d2f495d90
child 23 50974a8b132e
equal deleted inserted replaced
1:a36b1e19a461 5:989d2f495d90
       
     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 the License "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 *
       
    16 */
       
    17 
       
    18 #ifndef __CLandmarkAsyncTests_H__
       
    19 #define __CLandmarkAsyncTests_H__
       
    20 
       
    21 #include <e32base.h>
       
    22 #include "mlandmarkobserver.h"
       
    23 #include "Clmlandmarkstest.h"
       
    24 
       
    25 class CLandmarkService;
       
    26 class CPosLmItemIterator;
       
    27 class MAiwNotifyCallback;
       
    28 class CPosLandmarkDatabase;
       
    29 
       
    30 class CLandmarkAsyncTests : public CActive, public MLandmarkObserver
       
    31 {
       
    32 public:
       
    33 	enum TESTID
       
    34 	{
       
    35 		ETEST1,
       
    36 		ETEST2,
       
    37 	};
       
    38 
       
    39 	static CLandmarkAsyncTests* NewL(CLandmarkAsyncTests::TESTID aTestID);
       
    40 	~CLandmarkAsyncTests();
       
    41 	void StartL();
       
    42 	TInt Result();
       
    43 	
       
    44 private:
       
    45 
       
    46 	void ConstructL();
       
    47 	CLandmarkAsyncTests(CLandmarkAsyncTests::TESTID );
       
    48 	
       
    49 	virtual void DoCancel();
       
    50 	virtual void RunL();
       
    51 	
       
    52 	
       
    53 	void AsyncTestFunc1L();
       
    54 	void AsyncTestFunc2L();	
       
    55 private:
       
    56 	void CreateLandmarksL();
       
    57 protected:
       
    58 		// MLandmarkObserver callback for Landmarks getlist iterator.
       
    59 		void HandleLandmarkItemsL( CPosLmItemIterator* aIterator,
       
    60             TInt32 aTransactionId, TInt aError, const TDesC& aDatabaseUri);
       
    61 		// MLandmarkObserver callback for catetories getlist iterator.
       
    62 		void HandleCategoryItemsL( CPosLmItemIterator* aIterator,
       
    63             TInt32 aTransactionId, TInt aError, const TDesC& aDatabaseUri);	
       
    64 
       
    65 private:	
       
    66 	CActiveSchedulerWait* 	iWaitSchedular;
       
    67 	CPosLandmarkDatabase* 	iDefaultLmHandle;
       
    68 	CLandmarkService*		iService;
       
    69 	TInt 					iResult;
       
    70 	TESTID					iTestID;	
       
    71 };
       
    72 
       
    73 #endif __CLandmarkAsyncTests_H__