homescreensrv_plat/xcfw_api/inc/gecodefaultobjectfactory.h
changeset 0 79c6a41cd166
child 54 666a2952b5b3
child 55 46dffa7ce5cd
equal deleted inserted replaced
-1:000000000000 0:79c6a41cd166
       
     1 /*
       
     2 * Copyright (c) 2002-2005 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:  Base content object factory interface.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef CGECODEFAULTOBJECTFACTORY_H
       
    21 #define CGECODEFAULTOBJECTFACTORY_H
       
    22 
       
    23 //  INCLUDES
       
    24 #include <e32std.h>
       
    25 #include "gecoattributeprovider.h" //MGECOAttributeProvider
       
    26 #include "gecoobjectfactorybase.h"
       
    27 
       
    28 // CLASS DECLARATION
       
    29 
       
    30 /**
       
    31 * Generic content object factory. All object factories derive from this class.
       
    32 *
       
    33 * @lib XCFW.lib
       
    34 * @since Series 60 3.1
       
    35 */
       
    36 class CGECODefaultObjectFactory: public CGECOObjectFactoryBase
       
    37     {
       
    38     public: //constructors and destructor
       
    39         /**
       
    40         /* Two-phased constructor
       
    41         */
       
    42         IMPORT_C static CGECODefaultObjectFactory* NewL();
       
    43 
       
    44         //destructor
       
    45         virtual ~CGECODefaultObjectFactory();
       
    46 
       
    47     public: //new functions
       
    48 
       
    49         /**
       
    50         * Get object parser
       
    51         * @param aTypeIdentifier Object type identifier
       
    52         * @return CGECOObjectBase derived object. Caller takes ownership.
       
    53         */
       
    54         IMPORT_C CGECOObjectBase* GetContentObjectAndSetContextL(
       
    55             const TDesC& aTypeIdentifier );
       
    56 
       
    57         /**
       
    58         * Initializes the current object with attribute provider data
       
    59         * @param aAttributeProvider Attribute provider for data initialization
       
    60         */
       
    61         IMPORT_C void InitializeObjectL(
       
    62             MGECOAttributeProvider& aAttributeProvider );
       
    63 
       
    64         /**
       
    65         * Set context object for initialize and preparesave operations
       
    66         * @param aContext Object to use in InitializeL operations
       
    67         * @return Error code, e.g. when the factory does not know this object.
       
    68         */
       
    69         IMPORT_C TInt SetContext( CGECOObjectBase* aContext );
       
    70         
       
    71 
       
    72     public: //from base classes
       
    73     
       
    74         /**
       
    75         * From MGECOAttributeProvider. Returns number of attributes
       
    76         */
       
    77         IMPORT_C TInt NumAttributes();
       
    78         
       
    79         /**
       
    80         * From MGECOAttributeProvider. Returns name, value and localization status
       
    81         * for attribute in given index.
       
    82         */
       
    83         IMPORT_C void AttributeDetailsL( const TInt aIndex, TPtrC& aAttrName, 
       
    84             TPtrC& aAttrValue, TBool& aIsLocalized);
       
    85                                 
       
    86         /**
       
    87         * From MGECOAttributeProvider. Returns name and value 
       
    88         * for attribute in given index.
       
    89         */
       
    90         IMPORT_C void AttributeDetailsL( const TInt aIndex, TPtrC& aAttrName, 
       
    91             TPtrC& aAttrValue);
       
    92                                 
       
    93         /**
       
    94         * From MGECOAttributeProvider. Returns node / data object text data
       
    95         * and localization status
       
    96         */
       
    97         IMPORT_C void TextDetailsL( TPtrC& aText, TBool& aIsLocalized );
       
    98 
       
    99         /**
       
   100         * From MGECOAttributeProvider. Returns ETrue if object has text data
       
   101         */
       
   102         IMPORT_C TBool HasTextData();
       
   103 
       
   104 
       
   105     protected: //new functions
       
   106 
       
   107         /**
       
   108         * C++ default constructor.
       
   109         */
       
   110         IMPORT_C CGECODefaultObjectFactory();
       
   111             
       
   112     private: //new function
       
   113 
       
   114         /**
       
   115         * 2nd phase constructor
       
   116         */
       
   117         void ConstructL();
       
   118         
       
   119     private: //data
       
   120 
       
   121     };
       
   122     
       
   123 
       
   124 #endif //CGECODEFAULTOBJECTFACTORY_H
       
   125             
       
   126 // End of File