iaupdate/IAD/engine/controller/inc/iaupdatenodeembeddedxmlparser.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_NODE_EMBEDDED_XML_PARSER_H
       
    21 #define IA_UPDATE_NODE_EMBEDDED_XML_PARSER_H
       
    22 
       
    23 
       
    24 #include <e32cmn.h>
       
    25 
       
    26 #include "iaupdatexmlsubparser.h"
       
    27 
       
    28 class CIAUpdateNodeDependency;
       
    29 
       
    30 
       
    31 /**
       
    32  * CIAUpdateNodeEmbeddedXmlParser handles the dependency XML elements for
       
    33  * node.
       
    34  *
       
    35  * @since S60 v3.2
       
    36  */
       
    37 class CIAUpdateNodeEmbeddedXmlParser : public CIAUpdateXmlSubParser
       
    38     {
       
    39 
       
    40 public:
       
    41     
       
    42     /**
       
    43      * Because there may be multiple dependencies, the dependency sub parser that uses
       
    44      * this sub parser may change the dependency. So, that is why reference to
       
    45      * the pointer is used. This way this parser always uses the correct dependency.
       
    46      *
       
    47      * @param aDependency Reference to the dependency pointer that points to the
       
    48      * current dependency. The embedded information that is parsed from the XML 
       
    49      * data is inserted into this object.
       
    50      * @return CIAUpdateNodeEmbeddedXmlParser* Created object.
       
    51      *
       
    52      * @since S60 v3.2
       
    53      */
       
    54     static CIAUpdateNodeEmbeddedXmlParser* NewL( CIAUpdateNodeDependency*& aDependency );
       
    55 
       
    56     /**
       
    57      * @see CIAUpdateNodeEmbeddedXmlParser::NewL
       
    58      *
       
    59      * @since S60 v3.2
       
    60      */
       
    61     static CIAUpdateNodeEmbeddedXmlParser* NewLC( CIAUpdateNodeDependency*& aDependency );
       
    62 
       
    63 
       
    64     /**
       
    65      * Destructor
       
    66      *
       
    67      * @since S60 v3.2
       
    68      */
       
    69     virtual ~CIAUpdateNodeEmbeddedXmlParser();
       
    70 
       
    71 
       
    72 public: // CIAUpdateXmlSubParser
       
    73 
       
    74     /**
       
    75      * @see CIAUpdateXmlSubParser::OnContentL
       
    76      * 
       
    77      * Sets the UID information for the dependency.
       
    78      *
       
    79      * @since S60 v3.2
       
    80      */                                
       
    81     virtual void OnContentL( const TDesC8& aBytes, 
       
    82                              TInt aErrorCode );    
       
    83     
       
    84 
       
    85 protected:
       
    86     
       
    87     /**
       
    88      * Constructor
       
    89      *
       
    90      * @see CIAUpdateNodeEmbeddedXmlParser::NewL
       
    91      *
       
    92      * @since S60 v3.2
       
    93      */
       
    94     CIAUpdateNodeEmbeddedXmlParser( CIAUpdateNodeDependency*& aDependency );
       
    95     
       
    96     /**
       
    97      * 2nd. phase constructor.
       
    98      * Adds the node dependency sub parsers to the parent class sub parser list. 
       
    99      *
       
   100      * @since S60 v3.2
       
   101      */
       
   102     virtual void ConstructL();
       
   103 
       
   104 
       
   105     /**
       
   106      * @return CIAUpdateNodeDependency& The platform dependency information that is
       
   107      * parsed from the XML data is inserted into this object.
       
   108      * @exception Leaves with KErrNotFound if dependency is not found. Else system
       
   109      * wide error code.
       
   110      *
       
   111      * @since S60 v3.2
       
   112      */
       
   113     CIAUpdateNodeDependency& DependencyL();
       
   114     
       
   115 
       
   116 private:
       
   117     
       
   118     // Prevent these if not implemented
       
   119     CIAUpdateNodeEmbeddedXmlParser( const CIAUpdateNodeEmbeddedXmlParser& aObject );
       
   120     CIAUpdateNodeEmbeddedXmlParser& operator =( const CIAUpdateNodeEmbeddedXmlParser& aObject );
       
   121 
       
   122 
       
   123 private: // data
       
   124 
       
   125     CIAUpdateNodeDependency*& iDependency;
       
   126 
       
   127     };
       
   128 
       
   129 #endif // IA_UPDATE_NODE_EMBEDDED_XML_PARSER_H