contextengine/inc/contextsnapshotitem.h
changeset 0 c53acadfccc6
equal deleted inserted replaced
-1:000000000000 0:c53acadfccc6
       
     1 /*
       
     2 * Copyright (c) 2007-2009 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 "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:  A simple class to store context observers and related
       
    15 *                metadata objects.
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 #ifndef CCONTEXTSNAPSHOTITEM_H
       
    21 #define CCONTEXTSNAPSHOTITEM_H
       
    22 
       
    23 #include <e32base.h>
       
    24 
       
    25 class CHarvesterData;
       
    26 
       
    27 /**
       
    28 * A simple storage class used to store queued context observers and their objects.
       
    29 */
       
    30 class CContextSnapshotItem : public CBase
       
    31     {
       
    32     public:
       
    33 
       
    34         /** NewL for creating new initialized CContextSnapshotItem. */
       
    35         static CContextSnapshotItem* NewL( MContextSnapshotObserver* aObserver,
       
    36             CHarvesterData* aHD );
       
    37 
       
    38         /** NewL for creating new initialized CContextSnapshotItem for multiple items. */
       
    39         static CContextSnapshotItem* NewL( MContextSnapshotObserver* aObserver,
       
    40             RPointerArray<CHarvesterData>* aObjects );
       
    41 
       
    42         /** Destructor */
       
    43         virtual ~CContextSnapshotItem();
       
    44 
       
    45         /** Sets observer for this item */
       
    46         void SetObserver( MContextSnapshotObserver* aObserver );
       
    47 
       
    48         /** Gets observer from this item */
       
    49         MContextSnapshotObserver* GetObserver();
       
    50 
       
    51         /** Sets item pointer for this item */
       
    52         void SetItem( CHarvesterData* aHD );
       
    53 
       
    54         /** Gets item pointer for this item */
       
    55         CHarvesterData* GetItem();
       
    56 
       
    57         /** Sets item array pointer for this item */
       
    58         void SetItemArray( RPointerArray<CHarvesterData>* aObjects );
       
    59 
       
    60         /** Gets item array pointer for this item */
       
    61         RPointerArray<CHarvesterData>* GetItemArray();
       
    62 
       
    63     private:
       
    64 
       
    65         /** Default constructor */
       
    66         CContextSnapshotItem();
       
    67 
       
    68     private: // data
       
    69 
       
    70         MContextSnapshotObserver* iObserver;
       
    71         CHarvesterData* iHD;
       
    72         RPointerArray<CHarvesterData>* iHDArray;
       
    73     };
       
    74 
       
    75 
       
    76 #include "contextsnapshotitem.inl"
       
    77 
       
    78 
       
    79 #endif // CCONTEXTSNAPSHOTITEM_H