diff -r aa5a574040a4 -r a93990e5815e harvester/client/inc/harvesternotificationqueue.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/harvester/client/inc/harvesternotificationqueue.h Wed Aug 18 10:12:07 2010 +0300 @@ -0,0 +1,84 @@ +/* +* Copyright (c) 2006-2007 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "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: Processor object for running harvester requests +* +*/ + + +#ifndef HARVESTERNOTIFICATIONQUEUE_H +#define HARVESTERNOTIFICATIONQUEUE_H + +#include + +class CHarvesterClientAO; +class MHarvestObserver; + +/** + * Processor object for running queued tasks. + * + */ +class CHarvesterNotificationQueue: public CBase + { +public: + + /** + * Two-phased constructor. + * + * @return Instance of CHarvesterNotificationQueue. + */ + static CHarvesterNotificationQueue* NewL(); + + /** + * Destructor + * + */ + virtual ~CHarvesterNotificationQueue(); + + /** + * Adds new request to the queue. + * + * @param aRequest Request to be added to the queue. + */ + void AddRequestL( CHarvesterClientAO* aRequest ); + + /** + * Marks request completed. + */ + void Cleanup( TBool aShutdown ); + + void SetObserver( MHarvestObserver* aObserver ); + +private: + + /** + * C++ default constructor + * @return Instance of CHarvesterNotificationQueue. + */ + CHarvesterNotificationQueue(); + + /** + * Symbian 2nd phase constructor can leave. + */ + void ConstructL(); + +private: + + /** + * Array of active objects for each pending harvester request. + */ + RPointerArray iRequests; + +}; + +#endif // HARVESTERNOTIFICATIONQUEUE_H