contentstorage/caclient/stub/inc/hswidgetcomponentparser.h
changeset 73 4bc7b118b3df
child 80 397d00875918
equal deleted inserted replaced
66:32469d7d46ff 73:4bc7b118b3df
       
     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    
       
    48     bool isWidgetTagValid();
       
    49 private:
       
    50     QXmlStreamReader mParser;
       
    51     HsWidgetComponentDescriptor mComponentDescriptor;
       
    52     bool mError;
       
    53 };
       
    54 
       
    55 #endif // HSWIDGETCOMPONENTPARSER_H