email/mail/UtilsSrc/CMailViewFactory.h
changeset 0 72b543305e3a
equal deleted inserted replaced
-1:000000000000 0:72b543305e3a
       
     1 /*
       
     2 * Copyright (c) 2004 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:  CMailViewFactory can be used to create mail view plugins.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef CMAILVIEWFACTORY_H
       
    20 #define CMAILVIEWFACTORY_H
       
    21 
       
    22 // INCLUDES
       
    23 #include <e32base.h>
       
    24 #include <CMailMessageView.h>
       
    25 
       
    26 // FORWARD DECLARATIONS
       
    27 class CImplementationInformation;
       
    28 
       
    29 //  CLASS DEFINITION
       
    30 
       
    31 /**
       
    32 *  Factory class for mail view plugins.
       
    33 *
       
    34 *  @lib 
       
    35 *  @since 3.0
       
    36 */
       
    37 class MailViewFactory 
       
    38     {
       
    39     public:
       
    40         /**
       
    41         * Creates all adapters and stores them in an array.
       
    42         * @return Array of adapters. Ownership is transferred.
       
    43         */
       
    44         IMPORT_C static CArrayPtr<CMailMessageView>* CreateViewPluginsL();
       
    45 
       
    46     private:
       
    47 
       
    48         /**
       
    49         * ResetAndDestroy() cleanup for an RImplInfoPtrArray.
       
    50         * @param aAny Array
       
    51         */
       
    52         static void CleanupImplArray( TAny* aAny );
       
    53 
       
    54         /**
       
    55         * ResetAndDestroy() cleanup for a CArrayPtr<CWPAdapter>.
       
    56         * @param aAny Array
       
    57         */
       
    58         static void CleanupAdapterArray( TAny* aAny );
       
    59 
       
    60         /** 
       
    61         * Comparator for two implementation information entries.
       
    62         * Compares the opaque data as a string.
       
    63         * @param aImpl1 First implementation to compare
       
    64         * @param aImpl2 Second implementation to compare
       
    65         */
       
    66         static TInt Compare( 
       
    67             const CImplementationInformation& aImpl1, 
       
    68             const CImplementationInformation& aImpl2 );
       
    69     };
       
    70 
       
    71 #endif /* CMAILVIEWFACTORY_H */
       
    72 
       
    73 // End of File