serviceproviders/sapi_landmarks/landmarksservice/inc/clandmarkdummyao.h
changeset 26 5d0ec8b709be
child 27 02682e02e51f
equal deleted inserted replaced
23:50974a8b132e 26:5d0ec8b709be
       
     1 /*
       
     2 * Copyright (c) 2005-2006 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:  CLandmarkCmdGetLandmarks class
       
    15  *
       
    16 */
       
    17 
       
    18 #ifndef CLANDMARKDUMMYAO_H_
       
    19 #define CLANDMARKDUMMYAO_H_
       
    20 
       
    21 // INCLUDES
       
    22 #include <e32base.h>
       
    23 #include <EPos_Landmarks.h>
       
    24 /**
       
    25  * CLandmarkDummyAO
       
    26  * This class inherits from CActive. This class is used to emulate 
       
    27  * asynchronous processing.
       
    28  */
       
    29 // CLASS DECLARATION
       
    30 NONSHARABLE_CLASS(CLandmarkDummyAO) : public CActive
       
    31 	{
       
    32 public:
       
    33 	enum TCommand
       
    34 		{
       
    35 		EAdd, EUpdate, ERemove,
       
    36 		};
       
    37 public:
       
    38 	// New methods
       
    39 
       
    40 	/**
       
    41 	 * NewL.
       
    42 	 * Two-phased constructor.
       
    43 	 * Create a CLandmarkDummyAO object.
       
    44 	 * @return a pointer to the created instance of CLandmarkDummyAO.
       
    45 	 */
       
    46 	CLandmarkDummyAO(MLandmarkObserver* aObserver,
       
    47 			CLandmarkManageObjects* aManageObjects);
       
    48 
       
    49 	/**
       
    50 	 * ~CLandmarkDummyAO
       
    51 	 * Destructor.
       
    52 	 */
       
    53 	~CLandmarkDummyAO();
       
    54 
       
    55 public:
       
    56 
       
    57 	void Start(TInt32 aTransactionId,
       
    58 			CLandmarkDummyAO::TCommand aCmd, TPosLmItemId aId,
       
    59 			TInt aError);
       
    60 
       
    61 private:
       
    62 	//from CActive
       
    63 
       
    64 	// RunL.
       
    65 	// This functions gets called after completion of async request.
       
    66 	void RunL();
       
    67 
       
    68 	// DoCancel.
       
    69 	// This function will cancel ongoing async call.
       
    70 	void DoCancel();
       
    71 
       
    72 private:
       
    73 	/**
       
    74 	 * iTransactionId
       
    75 	 * The tranaction id assigned to aync request.
       
    76 	 */
       
    77 	TInt32 iTransactionId;
       
    78 
       
    79 	/**
       
    80 	 * iObserver
       
    81 	 * The handle to the MLandmarkObserver.
       
    82 	 */
       
    83 	MLandmarkObserver* iObserver;
       
    84 
       
    85 	/**
       
    86 	 * iManageObjects
       
    87 	 * The handle to the garbage collector.
       
    88 	 */
       
    89 	CLandmarkManageObjects* iManageObjects;
       
    90 
       
    91 	TCommand iCmd;
       
    92 
       
    93 	TPosLmItemId iId;
       
    94 
       
    95 	};
       
    96 
       
    97 #endif /* CLANDMARKDUMMYAO_H_ */
       
    98 
       
    99 // End of File