serviceproviders/sapi_landmarks/landmarksservice/inc/clandmarkcmdgetlandmarks.h
changeset 19 989d2f495d90
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/serviceproviders/sapi_landmarks/landmarksservice/inc/clandmarkcmdgetlandmarks.h	Fri Jul 03 15:51:24 2009 +0100
@@ -0,0 +1,108 @@
+/*
+* 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 __CLANDMARKCMDGETLANDMARKS_H__
+#define __CLANDMARKCMDGETLANDMARKS_H__
+
+// INCLUDES
+#include "clandmarkcmdbase.h"
+
+/**
+ * CLandmarkCmdGetLandmarks
+ * This class processes the async request for retrieval of landmarks from the landmark
+ * database. It implements the StartL ( CLandmarkHandler* aHandle, TInt32 aTransactionId, CLandmarkFilter* aFilter )
+ * of CLandmarkCmdBase. After completion of the aynchronous request the MLandmarkObserver instance is notified
+ * and the garbage collector is set active.
+ */
+// CLASS DECLARATION
+NONSHARABLE_CLASS(CLandmarkCmdGetLandmarks) : public CLandmarkCmdBase
+	{
+public: // New methods
+
+	/**
+	 * NewL.
+	 * Two-phased constructor.
+	 * Create a CLandmarkCmdGetLandmarks object.
+	 * @param aObserver The pointer to the observer for this object.
+	 * @param aManageObjects The pointer to the garbage collector.
+	 * @return A pointer to the created instance of CLandmarkCmdGetLandmarks.
+	 */
+	static CLandmarkCmdGetLandmarks* NewL( MLandmarkObserver* aObserver,
+			CLandmarkManageObjects* aManageObjects );
+
+	/**
+	 * NewLC.
+	 * Two-phased constructor.
+	 * Create a CLandmarkCmdGetLandmarks object.
+	 * @param aObserver The pointer to the observer for this object.
+	 * @param aManageObjects The pointer to the garbage collector.
+	 * @return A pointer to the created instance of CLandmarkCmdGetLandmarks.
+	 */
+	static CLandmarkCmdGetLandmarks* NewLC( MLandmarkObserver* aObserver ,
+			CLandmarkManageObjects* aManageObjects);
+
+	/**
+	 * ~CLandmarkCmdGetLandmarks
+	 * Destructor.
+	 */
+	~CLandmarkCmdGetLandmarks();
+
+public: // From CLandmarkCmdBase
+
+	// StartL
+	// This functions proceeds with the incremental search.
+	void StartL ( CLandmarkHandler* aHandle,
+			TInt32 aTransactionId, CLandmarkFilter& aFilter );
+
+private:
+
+	/**
+	 * NextStep
+	 * This functions proceeds with the incremental search.
+	 */
+	void NextStep ();
+
+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();
+
+	// RunError.
+	// This functions handles a leave occurring in the request completion event handler
+	TInt RunError(TInt aError);
+
+private: // Constructors
+
+	/**
+	 * CLandmarkCmdGetLandmarks.
+	 * C++ default constructor.
+	 * @param aObserver The pointer to the observer for this object.
+	 * @param aManageObjects The pointer to the garbage collector.
+	 */
+	CLandmarkCmdGetLandmarks ( MLandmarkObserver* aObserver,
+			CLandmarkManageObjects* aManageObjects );
+	};
+
+#endif // __CLANDMARKCMDGETLANDMARKS_H__
+
+// End of File