homescreensrv_plat/hswidgetmodel_api/hswidgetprovidermanifest.h
author hgs
Fri, 28 May 2010 16:17:03 +0300
changeset 96 5d243a69bdda
parent 85 7feec50967db
permissions -rw-r--r--
201021

/*
* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of "Eclipse Public License v1.0"
* which accompanies this distribution, and is available
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
*
* Initial Contributors:
* Nokia Corporation - initial contribution.
*
* Contributors:
*
* Description:  HsWidget provider manifest.
*
*/


#ifndef HSWIDGETPROVIDERMANIFEST_H
#define HSWIDGETPROVIDERMANIFEST_H

#include <QObject>
#include <hswidgetmodel_global.h>
#include <hsiwidgetprovider.h>


class HsWidgetProviderManifestPrivate;



class HSWIDGETMODEL_EXPORT HsWidgetProviderManifest : public QObject
{
    Q_OBJECT

public:

    /**
     * Constructor. Loads widgets as widget tokens from the given
     * manifest file.
     * @since S60 ?S60_version.     
     * @param aParent Parent object.
     */
    HsWidgetProviderManifest(QObject *parent = 0);
    
    /**
     * Destructor.
     * @since S60 ?S60_version.
     */
    virtual ~HsWidgetProviderManifest();


public:

    /**
     * Returns loaded widgets as widget tokens.
     * @since S60 ?S60_version.
     * @return Loaded widgets as tokens.
     */
    QList<HsWidgetToken> widgets() const;
	
    /**
     * Tells if the widget tokens must be asked from plugin
     * instead of manifest file.
     * @since S60 ?S60_version.
     * @return True if loading required, false otherwise.
     */
    bool loadOnQuery() const;

    /**
     * Loads widgets as widget tokens from a manifest file.
     * @since S60 ?S60_version.
     * @param aFileName Manifest file name.
     * @return true if load was succesfull, false otherwise
     */
	bool loadFromXml(const QString &fileName);

private:

	Q_DISABLE_COPY(HsWidgetProviderManifest)

    HsWidgetProviderManifestPrivate *mD;
    friend class HsWidgetProviderManifestPrivate;

};




#endif