meetingrequest/mrgui/inc/cesmrviewerfieldstorage.h
author Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Thu, 17 Dec 2009 08:39:21 +0200
changeset 0 8466d47a6819
child 12 4ce476e64c59
permissions -rw-r--r--
Revision: 200949 Kit: 200951

/*
* 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:  ESMR field storage for viewer fields in CESMRListComponent
*
*/

#ifndef CESMRVIEWERFIELDSTORAGE_H
#define CESMRVIEWERFIELDSTORAGE_H

#include "cesmrfieldstorage.h"
#include "tesmrentryfield.h"

class CESMRPolicy;
class CESMRTimeWrapper;
class MESMRCalEntry;
class MESMRResponseObserver;

/**
 * This class storages the fields needed in viewer mode.
 */
NONSHARABLE_CLASS( CESMRViewerFieldStorage ) : public CESMRFieldStorage
    {

public:
    /**
     * Constructor for the viewer field storage.
     *
     * @param aPolicy - pointer to policy information
     * @param aResponseObserver - Observer to be called when response 
     *                            action is needed
     * @param aResponseReady - Currently not in use
     * @return New viewer field storage object
     */
    static CESMRViewerFieldStorage* NewL( 
    		CESMRPolicy* aPolicy,
    		MESMRResponseObserver* aResponseObserver,
    		TBool aResponseReady,
    		MESMRFieldEventObserver& aEventObserver,
    		TInt aReqAttendee = 0,
    		TInt aOptAttendee = 0);

    // Destructor
    ~CESMRViewerFieldStorage();

public:
    // overwritten because the time wrapper needs to be
    // externalized also.
    void ExternalizeL( MESMRCalEntry& aEntry );

private: // Implementation
    CESMRViewerFieldStorage(
            MESMRFieldEventObserver& aEventObserver );

    void ConstructL( CESMRPolicy* aPolicy,
                     MESMRResponseObserver* aResponseObserver,
                     TBool aResponseReady,
                     const TInt &aReqAttendee ,
                     const TInt &aOptAttendee );

    void CreatePolicyFieldsL(CESMRPolicy* aPolicy,
                MESMRResponseObserver* aResponseObserver,
                TBool aResponseReady);

    void CreateTrackingFieldsL(CESMRPolicy* aPolicy,
                MESMRResponseObserver* aResponseObserver,
                TBool aResponseReady,
                const TInt &aReqAttendeee, const TInt &aOptAttendee);
    };

#endif //CESMRVIEWERFIELDSTORAGE_H