iaupdate/IAD/engine/controller/inc/iaupdateenginexmlparser.h
changeset 0 ba25891c3a9e
equal deleted inserted replaced
-1:000000000000 0:ba25891c3a9e
       
     1 /*
       
     2 * Copyright (c) 2009 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:   ?Description
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef IA_UPDATE_ENGINE_XML_PARSER_H
       
    21 #define IA_UPDATE_ENGINE_XML_PARSER_H
       
    22 
       
    23 
       
    24 #include "iaupdatexmlparser.h"
       
    25 
       
    26 class CIAUpdateEngineXmlSubParser;
       
    27 class CIAUpdateEngineConfigData;
       
    28 
       
    29 
       
    30 /**
       
    31  * CIAUpdateEngineXmlParser parses the configuration data from
       
    32  * engine config file.
       
    33  *
       
    34  * @since S60 v3.2
       
    35  */
       
    36 class CIAUpdateEngineXmlParser : public CIAUpdateXmlParser
       
    37     {
       
    38 
       
    39 public:
       
    40     
       
    41     /**
       
    42      * @return CIAUpdateEngineXmlParser* Created object.
       
    43      *
       
    44      * @since S60 v3.2
       
    45      */
       
    46     static CIAUpdateEngineXmlParser* NewL();
       
    47 
       
    48     /**
       
    49      * @see CIAUpdateEngineXmlParser::NewL
       
    50      *
       
    51      * @since S60 v3.2
       
    52      */
       
    53     static CIAUpdateEngineXmlParser* NewLC();
       
    54 
       
    55 
       
    56     /**
       
    57      * Destructor
       
    58      *
       
    59      * @since S60 v3.2
       
    60      */
       
    61     virtual ~CIAUpdateEngineXmlParser();
       
    62 
       
    63 
       
    64     /**
       
    65      * Parses the data from the configuration file and inserts the values
       
    66      * into the configuration data object. This done synchronously.
       
    67      *
       
    68      * @since S60 v3.2
       
    69      */
       
    70     virtual void ParseL();
       
    71 
       
    72 
       
    73     /**
       
    74      * @note If parsing has not been done before calling this function,
       
    75      * the returned object contains only default values.
       
    76      *
       
    77      * @return const CIAUpdateEngineConfigData& Config data.
       
    78      *
       
    79      * @since S60 v3.2
       
    80      */
       
    81     const CIAUpdateEngineConfigData& ConfigData() const;
       
    82     
       
    83 
       
    84 protected:
       
    85     
       
    86     /**
       
    87      * Constructor
       
    88      *
       
    89      * @see CIAUpdateEngineXmlParser::NewL
       
    90      *
       
    91      * @param aSubParser Sub parser that will handle the XML elements.
       
    92      * NULL value is NOT accepted here. Ownership is transferred.
       
    93      * @param aConfigData Config data that will contain all the parsed data.
       
    94      * NULL value is NOT accepted here. Ownership is transferred.
       
    95      *
       
    96      * @since S60 v3.2
       
    97      */
       
    98     CIAUpdateEngineXmlParser( CIAUpdateEngineXmlSubParser* aSubParser,
       
    99                               CIAUpdateEngineConfigData* aConfigData );
       
   100     
       
   101     /**
       
   102      * 2nd. phase constructor.
       
   103      *
       
   104      * @since S60 v3.2
       
   105      */
       
   106     virtual void ConstructL();
       
   107 
       
   108 
       
   109 private:
       
   110     
       
   111     // Prevent these if not implemented
       
   112     CIAUpdateEngineXmlParser( const CIAUpdateEngineXmlParser& aObject );
       
   113     CIAUpdateEngineXmlParser& operator =( const CIAUpdateEngineXmlParser& aObject );
       
   114 
       
   115 
       
   116 private: // data
       
   117 
       
   118     CIAUpdateEngineConfigData* iConfigData;
       
   119     
       
   120     };
       
   121 
       
   122 #endif // IA_UPDATE_ENGINE_XML_SUB_PARSER_H