serviceproviders/sapi_landmarks/landmarksservice/inc/clandmarkmanageobjects.h
changeset 19 989d2f495d90
child 37 5d0ec8b709be
equal deleted inserted replaced
14:a36b1e19a461 19:989d2f495d90
       
     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:  CLandmarkManageObjects class
       
    15  *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef __CLANDMARKMANAGEOBJECTS_H__
       
    20 #define __CLANDMARKMANAGEOBJECTS_H__
       
    21 
       
    22 // INCLUDES
       
    23 #include <e32base.h>
       
    24 
       
    25 //FORWARD DECLARATION
       
    26 class CLandmarkCmdBase;
       
    27 
       
    28 /**
       
    29  * CLandmarkManageObjects
       
    30  * This class inherits from CActive. This acts as a garbage collector for inactive 
       
    31  * active objects.
       
    32  */
       
    33 // CLASS DECLARATION
       
    34 NONSHARABLE_CLASS(CLandmarkManageObjects) : public CActive
       
    35 	{
       
    36 public: // New methods
       
    37 
       
    38 	/**
       
    39 	 * NewL.
       
    40 	 * Two-phased constructor.
       
    41 	 * Create a CLandmarkManageObjects object.
       
    42 	 * @return a pointer to the created instance of CLandmarkManageObjects.
       
    43 	 */
       
    44 	static CLandmarkManageObjects* NewL();
       
    45 
       
    46 	/**
       
    47 	 * ~CLandmarkManageObjects
       
    48 	 * Destructor.
       
    49 	 */
       
    50 	~CLandmarkManageObjects();
       
    51 
       
    52 public:
       
    53 
       
    54 	/**
       
    55 	 * Start
       
    56 	 * This functions proceeds with the search for inactive active objects.
       
    57 	 */
       
    58 	void Start();
       
    59 
       
    60 	/**
       
    61 	 * AppendL
       
    62 	 * This functions appends a newly created active object to its internal array.
       
    63 	 * @param aObject The pointer to the newly created active object.
       
    64 	 */
       
    65 	void AppendL( CLandmarkCmdBase* aObject );
       
    66 
       
    67 	/**
       
    68 	 * CancelObject
       
    69 	 * This functions cancels an ongoing asynchronous request.
       
    70 	 * @param aTransactionId The transaction id of the asynchronous request to be cancelled.
       
    71 	 */
       
    72 	void CancelObject( TInt32 aTransactionId );
       
    73 
       
    74 private://from CActive
       
    75 
       
    76 	// RunL.
       
    77 	// This functions gets called after completion of async request.
       
    78 	void RunL();
       
    79 
       
    80 	// DoCancel.
       
    81 	// This function will cancel ongoing async call.
       
    82 	void DoCancel();
       
    83 
       
    84 private: // Constructors
       
    85 
       
    86 	/**
       
    87 	 * CLandmarkManageObjects.
       
    88 	 * C++ default constructor.
       
    89 	 */
       
    90 	CLandmarkManageObjects();
       
    91 
       
    92 private://Data
       
    93 
       
    94 	/**
       
    95 	 * iObjects
       
    96 	 * Array of active object pointers.
       
    97 	 */
       
    98 	RPointerArray<CLandmarkCmdBase> iObjects;
       
    99 	};
       
   100 
       
   101 #endif // __CLANDMARKMANAGEOBJECTS_H__
       
   102 
       
   103 // End of File