emailservices/emailclientapi/inc/emailinterfacefactoryimpl.h
changeset 47 f83bd4ae1fe3
equal deleted inserted replaced
45:780f926bc26c 47:f83bd4ae1fe3
       
     1 /*
       
     2 * Copyright (c) 2010 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: Interface factory implementation class definition
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef EMAILINTERFACEFACTORY_H
       
    19 #define EMAILINTERFACEFACTORY_H
       
    20 
       
    21 #include <emailinterfacefactory.h>
       
    22 
       
    23 using namespace EmailInterface;
       
    24 
       
    25 /**
       
    26 * Implements CEmailInterfaceFactory ECom interface
       
    27 *
       
    28 */
       
    29 NONSHARABLE_CLASS( CEmailInterfaceFactoryImpl ) : public CEmailInterfaceFactory
       
    30 {
       
    31 public: 
       
    32 
       
    33     /**
       
    34     * Creates interface factory
       
    35     * @return interface factory
       
    36     */
       
    37     static CEmailInterfaceFactoryImpl* NewL();
       
    38     
       
    39     // destructor
       
    40     ~CEmailInterfaceFactoryImpl();
       
    41     
       
    42     /** @see CEmailInterfaceFactory::InterfaceL */
       
    43     MEmailInterface* InterfaceL( const TInt aInterfaceId );
       
    44     
       
    45 private:
       
    46     enum TEmailUidAppendRemoveMode
       
    47         {
       
    48         EEmailUidModeAppend,
       
    49         EEmailUidModeRemove,
       
    50         };
       
    51     
       
    52     /**
       
    53     * Registers/removes application UID to/from P&S so that the application
       
    54     * can be shutdown during Email IAD update. Update may fail if any
       
    55     * application is using some Email services during the update.
       
    56     * Application UID is removed from the list in destructor.
       
    57     * @param aMode Is the current process UID added or removed from the list
       
    58     */
       
    59     void AppendOrRemoveUidL( const TEmailUidAppendRemoveMode aMode );
       
    60 
       
    61 private:    
       
    62     // c++ constructor and 2nd phase constructor
       
    63     CEmailInterfaceFactoryImpl();
       
    64     void ConstructL();
       
    65 };
       
    66 
       
    67 #endif // EMAILINTERFACEFACTORY_H
       
    68 
       
    69 // End of file