wizardproviders/ftuwizardprovider/inc/ftumanifestparser.h
changeset 0 c464cd7e2753
equal deleted inserted replaced
-1:000000000000 0:c464cd7e2753
       
     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:  Wizard provider manifest parser.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef FTU_WIZARPROVIDER_MANIFESTPARSER_H
       
    20 #define FTU_WIZARPROVIDER_MANIFESTPARSER_H
       
    21 
       
    22 #include <QObject>
       
    23 
       
    24 class QDomElement;
       
    25 /**
       
    26  * @ingroup wizardprovider
       
    27  * @brief Loads ftu plugins from an XML manifest file.
       
    28  *
       
    29  * @lib ?library
       
    30  * @since S60 ?S60_version
       
    31  */
       
    32 class FtuManifestParser : public QObject
       
    33 {
       
    34     Q_OBJECT
       
    35 
       
    36 public:
       
    37 
       
    38     /**
       
    39      * Constructor.
       
    40      * @since S60 ?S60_version.
       
    41      * @param aParent Parent object.
       
    42      */
       
    43     FtuManifestParser(QObject* aParent = 0);
       
    44     
       
    45     /**
       
    46      * Destructor.
       
    47      * @since S60 ?S60_version.
       
    48      */
       
    49     virtual ~FtuManifestParser();
       
    50     
       
    51     /**
       
    52      * Parses plugin list from manifest file.
       
    53      * @since S60 ?S60_version.
       
    54      * @param path The path where manifest file is found.
       
    55      * @return Parsed plugin paths.
       
    56      */    
       
    57     QStringList parsePluginList(const QString& path);
       
    58 
       
    59 private:
       
    60 
       
    61     Q_DISABLE_COPY(FtuManifestParser)
       
    62     
       
    63     /**
       
    64      * Parses the plugin paths from a manifest file.
       
    65      * @since S60 ?S60_version.
       
    66      * @param fileName Manifest file name.
       
    67      * @return Parsed path.
       
    68      */
       
    69     QString loadFromXml(const QString& fileName);
       
    70     
       
    71     /**
       
    72      * Parses the attribute.
       
    73      * @since S60 ?S60_version.
       
    74      * @param element The element from which the attribute is parsed.
       
    75      * @param attributeName The name of the attribute to be parsed. 
       
    76      * @return Parsed attribute.
       
    77      */
       
    78     QString parseAttribute(QDomElement& element, const QString& attributeName) const;
       
    79     
       
    80     /**
       
    81      * Reads the configured plugins.
       
    82      * @since S60 ?S60_version.
       
    83      * @return List of configured manifest files.
       
    84      */    
       
    85     QStringList readManifestFilesFromConfig();
       
    86 
       
    87 private:
       
    88     
       
    89 };
       
    90 
       
    91 #endif //FTU_WIZARPROVIDER_MANIFESTPARSER_H
       
    92