homescreenpluginsrv/hspsdefinitionengine/hspsdefinitionengine/inc/hspsdefinitionengine.h
changeset 0 79c6a41cd166
equal deleted inserted replaced
-1:000000000000 0:79c6a41cd166
       
     1 /*
       
     2 * Copyright (c) 2008 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:  Main class for this component
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef C_hspsDEFINITIONENGINE_H
       
    21 #define C_hspsDEFINITIONENGINE_H
       
    22 
       
    23 //  INCLUDES
       
    24 #include <e32base.h>
       
    25 #include "hspsdefinitionengineinterface.h"
       
    26 
       
    27 
       
    28 // CONSTANTS
       
    29 const TInt KErrXmlParsing       = -32270;
       
    30 const TInt KErrRefBuilding      = -32272;
       
    31 
       
    32 // FORWARD DECLARATIONS
       
    33 class RFs;
       
    34 class ChspsXMLHandler;
       
    35 class ChspsODT;
       
    36 
       
    37 /**
       
    38 *  Main class for this component
       
    39 *  @ingroup group_hspsdefinitionengine
       
    40 *  @lib hspsdefinitionengine.lib
       
    41 *  @since Series 60 5.0
       
    42 */
       
    43 class ChspsDefinitionEngine : public ChspsDefinitionEngineInterface
       
    44     {
       
    45     public:  // Constructors and destructor
       
    46         
       
    47         /**
       
    48         * Two-phased constructor.
       
    49         */
       
    50         static ChspsDefinitionEngine* NewL();
       
    51         
       
    52         /**
       
    53         * Destructor.
       
    54         */
       
    55         ~ChspsDefinitionEngine();
       
    56 
       
    57     public: // New functions
       
    58         
       
    59         /**
       
    60         * Parses the given XML file. Inserts all nodes to DOM tree,
       
    61         * assignes all properties to the nodes
       
    62         * @since Series 60 3.1
       
    63         * @param aFsSession: file server session
       
    64         * @param aXMLFileName: XML file to parse
       
    65         * @param ahspsOdt: ODT structure, which contains the DomDocument
       
    66         * @return: Error code 
       
    67         */
       
    68         virtual ChspsDefinitionEngineInterface::TError CreateDOM( 
       
    69             RFs& aFsSession,
       
    70             const TDesC& aXMLFileName,
       
    71             ChspsODT& ahspsOdt );
       
    72                                     
       
    73         /**
       
    74         * Parses the given DTD file. Replaces all entity referencies 
       
    75         * in the skeleton DOM tree. Returns Localized DOM if it was successfull 
       
    76         * @since Series 60 3.1
       
    77         * @param aFsSession: file server session
       
    78         * @param aDTDFileName: Input DTD file for a certain language
       
    79         * @param ahspsOdt: Input/Output ODT structure, which contains the DomDocument.
       
    80         */
       
    81         virtual void ApplyLanguageL(
       
    82             RFs& aFsSession,
       
    83             const TDesC& aDTDFileName,
       
    84             ChspsODT& ahspsOdt );
       
    85                                     
       
    86     private:
       
    87 
       
    88         /**
       
    89         * C++ default constructor.
       
    90         */
       
    91         ChspsDefinitionEngine();
       
    92 
       
    93         /**
       
    94         * By default Symbian 2nd phase constructor is private.
       
    95         */
       
    96         void ConstructL();
       
    97 
       
    98     private:    // Data
       
    99          
       
   100         // Owned
       
   101         ChspsXMLHandler*      ihspsXMLHandler;
       
   102         
       
   103     };
       
   104 
       
   105 #endif      // C_hspsDEFINITIONENGINE_H   
       
   106             
       
   107 // End of File