serviceproviders/sapi_landmarks/landmarksservice/inc/clandmarkdummyao.h
changeset 26 5d0ec8b709be
child 27 02682e02e51f
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/serviceproviders/sapi_landmarks/landmarksservice/inc/clandmarkdummyao.h	Thu Dec 17 09:09:50 2009 +0200
@@ -0,0 +1,99 @@
+/*
+* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  CLandmarkCmdGetLandmarks class
+ *
+*/
+
+#ifndef CLANDMARKDUMMYAO_H_
+#define CLANDMARKDUMMYAO_H_
+
+// INCLUDES
+#include <e32base.h>
+#include <EPos_Landmarks.h>
+/**
+ * CLandmarkDummyAO
+ * This class inherits from CActive. This class is used to emulate 
+ * asynchronous processing.
+ */
+// CLASS DECLARATION
+NONSHARABLE_CLASS(CLandmarkDummyAO) : public CActive
+	{
+public:
+	enum TCommand
+		{
+		EAdd, EUpdate, ERemove,
+		};
+public:
+	// New methods
+
+	/**
+	 * NewL.
+	 * Two-phased constructor.
+	 * Create a CLandmarkDummyAO object.
+	 * @return a pointer to the created instance of CLandmarkDummyAO.
+	 */
+	CLandmarkDummyAO(MLandmarkObserver* aObserver,
+			CLandmarkManageObjects* aManageObjects);
+
+	/**
+	 * ~CLandmarkDummyAO
+	 * Destructor.
+	 */
+	~CLandmarkDummyAO();
+
+public:
+
+	void Start(TInt32 aTransactionId,
+			CLandmarkDummyAO::TCommand aCmd, TPosLmItemId aId,
+			TInt aError);
+
+private:
+	//from CActive
+
+	// RunL.
+	// This functions gets called after completion of async request.
+	void RunL();
+
+	// DoCancel.
+	// This function will cancel ongoing async call.
+	void DoCancel();
+
+private:
+	/**
+	 * iTransactionId
+	 * The tranaction id assigned to aync request.
+	 */
+	TInt32 iTransactionId;
+
+	/**
+	 * iObserver
+	 * The handle to the MLandmarkObserver.
+	 */
+	MLandmarkObserver* iObserver;
+
+	/**
+	 * iManageObjects
+	 * The handle to the garbage collector.
+	 */
+	CLandmarkManageObjects* iManageObjects;
+
+	TCommand iCmd;
+
+	TPosLmItemId iId;
+
+	};
+
+#endif /* CLANDMARKDUMMYAO_H_ */
+
+// End of File