homescreenapp/hswidgetuninstaller/inc/hswidgetcomponentparser.h
changeset 46 23b5d6a29cce
child 51 4785f57bf3d4
equal deleted inserted replaced
39:4e8ebe173323 46:23b5d6a29cce
       
     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: 
       
    15 *
       
    16 */
       
    17 #ifndef HSWIDGETCOMPONENTPARSER_H
       
    18 #define HSWIDGETCOMPONENTPARSER_H
       
    19 
       
    20 #include <QObject>
       
    21 #include <QXmlStreamReader>
       
    22 #include "hswidgetcomponentdescriptor.h"
       
    23 
       
    24 class HsWidgetComponentParser : public QObject
       
    25 {
       
    26     Q_OBJECT
       
    27     
       
    28 public:
       
    29     HsWidgetComponentParser(const QString &aComponentManifest, QObject *parent=0);
       
    30     ~HsWidgetComponentParser();
       
    31     HsWidgetComponentDescriptor widgetComponentDescriptor();
       
    32     bool error();
       
    33 private:
       
    34     void parseFile(const QString &aComponentManifest);
       
    35     void parseWidgetManifestTag();
       
    36     void parseWidgetProviderTag();
       
    37     
       
    38     void parseVersion1_0();
       
    39 
       
    40     void parseUri();
       
    41     void parseIcon();
       
    42     void parseTitle();
       
    43     void parseDescription();
       
    44     void parseHidden();
       
    45     void parseServiceXml();
       
    46     
       
    47 private:
       
    48     QXmlStreamReader mParser;
       
    49     HsWidgetComponentDescriptor mComponentDescriptor;
       
    50     bool mError;
       
    51 };
       
    52 
       
    53 #endif // HSWIDGETCOMPONENTPARSER_H