mmuifw_plat/alf_widgetutils_api/inc/alf/ialffactoryplugin.h
changeset 17 3eca7e70b1b8
parent 3 4526337fb576
equal deleted inserted replaced
3:4526337fb576 17:3eca7e70b1b8
     1 /*
       
     2 * Copyright (c) 2007 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:  factory plugin interface.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef I_ALFFACTORYPLUGIN_H
       
    21 #define I_ALFFACTORYPLUGIN_H
       
    22 
       
    23 
       
    24 #include <alf/ialfinterfacebase.h>
       
    25 #include <alf/alftypes.h>
       
    26 
       
    27 namespace Alf
       
    28     {
       
    29 
       
    30 namespace alffactoryplugin
       
    31     {
       
    32 static const IfId ident=
       
    33     {
       
    34     0,"alffactoryplugin"
       
    35     };
       
    36     }
       
    37 
       
    38 /**
       
    39  *  @class IAlfFactoryPlugin ialffactoryplugin.h "alf/ialffactoryplugin.h"
       
    40  *  Base class for factory plugins.
       
    41  *
       
    42  *  @lib alfwidgetutils.lib
       
    43  *  @since S60 ?S60_version
       
    44  *  @status Draft
       
    45  */
       
    46 class IAlfFactoryPlugin : public IAlfInterfaceBase
       
    47     {
       
    48 public:
       
    49     static const IfId& type()
       
    50         {
       
    51         return alffactoryplugin::ident;
       
    52         }
       
    53 public:
       
    54     /**
       
    55      * Create factory product.
       
    56      * @param aProduct Product to create.
       
    57      * @param aInitData Initialization data for product.
       
    58      * @return Instance or 0.
       
    59      */
       
    60     virtual IAlfInterfaceBase* createProduct( 
       
    61                                    const char* aProduct, void* aInitData ) = 0;
       
    62 
       
    63     /**
       
    64      * Count available products.
       
    65      *
       
    66      * @return Product count.
       
    67      */
       
    68     virtual int productCount() const = 0;
       
    69 
       
    70     /**
       
    71      * Fetch product info by index.
       
    72      *
       
    73      * @param aIndex List index.
       
    74      * @return String describing product.
       
    75      */
       
    76     virtual const char* productInfo( int aIndex ) const = 0;
       
    77 
       
    78     /**
       
    79      * Destructor.
       
    80      */
       
    81     virtual ~IAlfFactoryPlugin() {};
       
    82     };
       
    83     }
       
    84 
       
    85 #endif
       
    86 
       
    87 // End of File