diff -r 000000000000 -r c53acadfccc6 contextengine/inc/contextsnapshotitem.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/contextengine/inc/contextsnapshotitem.h Mon Jan 18 20:34:07 2010 +0200 @@ -0,0 +1,79 @@ +/* +* Copyright (c) 2007-2009 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: A simple class to store context observers and related +* metadata objects. +* +*/ + + +#ifndef CCONTEXTSNAPSHOTITEM_H +#define CCONTEXTSNAPSHOTITEM_H + +#include + +class CHarvesterData; + +/** +* A simple storage class used to store queued context observers and their objects. +*/ +class CContextSnapshotItem : public CBase + { + public: + + /** NewL for creating new initialized CContextSnapshotItem. */ + static CContextSnapshotItem* NewL( MContextSnapshotObserver* aObserver, + CHarvesterData* aHD ); + + /** NewL for creating new initialized CContextSnapshotItem for multiple items. */ + static CContextSnapshotItem* NewL( MContextSnapshotObserver* aObserver, + RPointerArray* aObjects ); + + /** Destructor */ + virtual ~CContextSnapshotItem(); + + /** Sets observer for this item */ + void SetObserver( MContextSnapshotObserver* aObserver ); + + /** Gets observer from this item */ + MContextSnapshotObserver* GetObserver(); + + /** Sets item pointer for this item */ + void SetItem( CHarvesterData* aHD ); + + /** Gets item pointer for this item */ + CHarvesterData* GetItem(); + + /** Sets item array pointer for this item */ + void SetItemArray( RPointerArray* aObjects ); + + /** Gets item array pointer for this item */ + RPointerArray* GetItemArray(); + + private: + + /** Default constructor */ + CContextSnapshotItem(); + + private: // data + + MContextSnapshotObserver* iObserver; + CHarvesterData* iHD; + RPointerArray* iHDArray; + }; + + +#include "contextsnapshotitem.inl" + + +#endif // CCONTEXTSNAPSHOTITEM_H