homescreensrv_plat/hswidgetmodel_api/hswidgetprovidermanifest.h
changeset 60 f62f87b200ec
equal deleted inserted replaced
4:1a2a00e78665 60:f62f87b200ec
       
     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:  HsWidget provider manifest.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef HSWIDGETPROVIDERMANIFEST_H
       
    20 #define HSWIDGETPROVIDERMANIFEST_H
       
    21 
       
    22 #include <QObject>
       
    23 #include <hswidgetmodel_global.h>
       
    24 #include <hsiwidgetprovider.h>
       
    25 
       
    26 
       
    27 class HsWidgetProviderManifestPrivate;
       
    28 
       
    29 
       
    30 
       
    31 class HSWIDGETMODEL_EXPORT HsWidgetProviderManifest : public QObject
       
    32 {
       
    33     Q_OBJECT
       
    34 
       
    35 public:
       
    36 
       
    37     /**
       
    38      * Constructor. Loads widgets as widget tokens from the given
       
    39      * manifest file.
       
    40      * @since S60 ?S60_version.     
       
    41      * @param aParent Parent object.
       
    42      */
       
    43     HsWidgetProviderManifest(QObject *parent = 0);
       
    44     
       
    45     /**
       
    46      * Destructor.
       
    47      * @since S60 ?S60_version.
       
    48      */
       
    49     virtual ~HsWidgetProviderManifest();
       
    50 
       
    51 
       
    52 public:
       
    53 
       
    54     /**
       
    55      * Returns loaded widgets as widget tokens.
       
    56      * @since S60 ?S60_version.
       
    57      * @return Loaded widgets as tokens.
       
    58      */
       
    59     QList<HsWidgetToken> widgets() const;
       
    60 	
       
    61     /**
       
    62      * Tells if the widget tokens must be asked from plugin
       
    63      * instead of manifest file.
       
    64      * @since S60 ?S60_version.
       
    65      * @return True if loading required, false otherwise.
       
    66      */
       
    67     bool loadOnQuery() const;
       
    68 
       
    69     /**
       
    70      * Loads widgets as widget tokens from a manifest file.
       
    71      * @since S60 ?S60_version.
       
    72      * @param aFileName Manifest file name.
       
    73      * @return true if load was succesfull, false otherwise
       
    74      */
       
    75 	bool loadFromXml(const QString &fileName);
       
    76 
       
    77 private:
       
    78 
       
    79 	Q_DISABLE_COPY(HsWidgetProviderManifest)
       
    80 
       
    81     HsWidgetProviderManifestPrivate *mD;
       
    82     friend class HsWidgetProviderManifestPrivate;
       
    83 
       
    84 };
       
    85 
       
    86 
       
    87 
       
    88 
       
    89 #endif