vmbx/vmbxengine/inc/vmbxenginefactory.h
author Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Fri, 16 Apr 2010 15:31:58 +0300
changeset 13 e32024264ebb
parent 12 ae8abd0db65c
child 19 e44a8c097b15
permissions -rw-r--r--
Revision: 201011 Kit: 201015

/*
* Copyright (c) 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:  Factory class for different mailbox engines
*  Interface   : Private, CVmbxEngineFactory
*
*/

#ifndef C_VMBXENGINEFACTORY_H
#define C_VMBXENGINEFACTORY_H

// INCLUDES
#include <e32base.h>

// FORWARD DECLARATIONS
class CVmbxEngineBase;


// CLASS DECLARATION

/**
*  CVmbxEngineFactory declaration
*
*  @lib vmbxengine.lib
*  @since S60 v5.2
*/
NONSHARABLE_CLASS( CVmbxEngineFactory ) : public CBase
    {

public:  // Constructors and destructor

    /**
     * Two-phased constructor
     * @since S60 v5.2
     * @param aProvider Reference to MVmbxResourceProvider
     */
    static CVmbxEngineFactory* NewL( MVmbxResourceProvider& aProvider );

    /**
     * Destructor.
     */
    virtual ~CVmbxEngineFactory();

public:  // New functions

    /**
     * Creates instance of the mailbox entry
     *
     * @since S60 v5.2
     * @param aEngine ownership is transferred
     * @param aType mailbox type
     */
    void CreateEngineL( CVmbxEngineBase*& aEngine, TVmbxType aType );

private:

    /**
     * C++ default constructor.
     * @since S60 v5.2
     * @param aProvider Reference to MVmbxResourceProvider
     */
    CVmbxEngineFactory( MVmbxResourceProvider& aProvider );

    /**
     * By default Symbian 2nd phase constructor is private.
     */
    void ConstructL();

private: // data

    /**
     * Reference to MVmbxResourceProvider
     */
    MVmbxResourceProvider& iProvider;
    };

#endif  // C_VMBXENGINEFACTORY_H