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