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
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
85
7feec50967db 201003_02
hgs
parents:
diff changeset
     1
/*
7feec50967db 201003_02
hgs
parents:
diff changeset
     2
* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
7feec50967db 201003_02
hgs
parents:
diff changeset
     3
* All rights reserved.
7feec50967db 201003_02
hgs
parents:
diff changeset
     4
* This component and the accompanying materials are made available
7feec50967db 201003_02
hgs
parents:
diff changeset
     5
* under the terms of "Eclipse Public License v1.0"
7feec50967db 201003_02
hgs
parents:
diff changeset
     6
* which accompanies this distribution, and is available
7feec50967db 201003_02
hgs
parents:
diff changeset
     7
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
7feec50967db 201003_02
hgs
parents:
diff changeset
     8
*
7feec50967db 201003_02
hgs
parents:
diff changeset
     9
* Initial Contributors:
7feec50967db 201003_02
hgs
parents:
diff changeset
    10
* Nokia Corporation - initial contribution.
7feec50967db 201003_02
hgs
parents:
diff changeset
    11
*
7feec50967db 201003_02
hgs
parents:
diff changeset
    12
* Contributors:
7feec50967db 201003_02
hgs
parents:
diff changeset
    13
*
7feec50967db 201003_02
hgs
parents:
diff changeset
    14
* Description:  HsWidget provider manifest.
7feec50967db 201003_02
hgs
parents:
diff changeset
    15
*
7feec50967db 201003_02
hgs
parents:
diff changeset
    16
*/
7feec50967db 201003_02
hgs
parents:
diff changeset
    17
7feec50967db 201003_02
hgs
parents:
diff changeset
    18
7feec50967db 201003_02
hgs
parents:
diff changeset
    19
#ifndef HSWIDGETPROVIDERMANIFEST_H
7feec50967db 201003_02
hgs
parents:
diff changeset
    20
#define HSWIDGETPROVIDERMANIFEST_H
7feec50967db 201003_02
hgs
parents:
diff changeset
    21
7feec50967db 201003_02
hgs
parents:
diff changeset
    22
#include <QObject>
7feec50967db 201003_02
hgs
parents:
diff changeset
    23
#include <hswidgetmodel_global.h>
7feec50967db 201003_02
hgs
parents:
diff changeset
    24
#include <hsiwidgetprovider.h>
7feec50967db 201003_02
hgs
parents:
diff changeset
    25
7feec50967db 201003_02
hgs
parents:
diff changeset
    26
7feec50967db 201003_02
hgs
parents:
diff changeset
    27
class HsWidgetProviderManifestPrivate;
7feec50967db 201003_02
hgs
parents:
diff changeset
    28
7feec50967db 201003_02
hgs
parents:
diff changeset
    29
7feec50967db 201003_02
hgs
parents:
diff changeset
    30
7feec50967db 201003_02
hgs
parents:
diff changeset
    31
class HSWIDGETMODEL_EXPORT HsWidgetProviderManifest : public QObject
7feec50967db 201003_02
hgs
parents:
diff changeset
    32
{
7feec50967db 201003_02
hgs
parents:
diff changeset
    33
    Q_OBJECT
7feec50967db 201003_02
hgs
parents:
diff changeset
    34
7feec50967db 201003_02
hgs
parents:
diff changeset
    35
public:
7feec50967db 201003_02
hgs
parents:
diff changeset
    36
7feec50967db 201003_02
hgs
parents:
diff changeset
    37
    /**
7feec50967db 201003_02
hgs
parents:
diff changeset
    38
     * Constructor. Loads widgets as widget tokens from the given
7feec50967db 201003_02
hgs
parents:
diff changeset
    39
     * manifest file.
7feec50967db 201003_02
hgs
parents:
diff changeset
    40
     * @since S60 ?S60_version.     
7feec50967db 201003_02
hgs
parents:
diff changeset
    41
     * @param aParent Parent object.
7feec50967db 201003_02
hgs
parents:
diff changeset
    42
     */
7feec50967db 201003_02
hgs
parents:
diff changeset
    43
    HsWidgetProviderManifest(QObject *parent = 0);
7feec50967db 201003_02
hgs
parents:
diff changeset
    44
    
7feec50967db 201003_02
hgs
parents:
diff changeset
    45
    /**
7feec50967db 201003_02
hgs
parents:
diff changeset
    46
     * Destructor.
7feec50967db 201003_02
hgs
parents:
diff changeset
    47
     * @since S60 ?S60_version.
7feec50967db 201003_02
hgs
parents:
diff changeset
    48
     */
7feec50967db 201003_02
hgs
parents:
diff changeset
    49
    virtual ~HsWidgetProviderManifest();
7feec50967db 201003_02
hgs
parents:
diff changeset
    50
7feec50967db 201003_02
hgs
parents:
diff changeset
    51
7feec50967db 201003_02
hgs
parents:
diff changeset
    52
public:
7feec50967db 201003_02
hgs
parents:
diff changeset
    53
7feec50967db 201003_02
hgs
parents:
diff changeset
    54
    /**
7feec50967db 201003_02
hgs
parents:
diff changeset
    55
     * Returns loaded widgets as widget tokens.
7feec50967db 201003_02
hgs
parents:
diff changeset
    56
     * @since S60 ?S60_version.
7feec50967db 201003_02
hgs
parents:
diff changeset
    57
     * @return Loaded widgets as tokens.
7feec50967db 201003_02
hgs
parents:
diff changeset
    58
     */
7feec50967db 201003_02
hgs
parents:
diff changeset
    59
    QList<HsWidgetToken> widgets() const;
7feec50967db 201003_02
hgs
parents:
diff changeset
    60
	
7feec50967db 201003_02
hgs
parents:
diff changeset
    61
    /**
7feec50967db 201003_02
hgs
parents:
diff changeset
    62
     * Tells if the widget tokens must be asked from plugin
7feec50967db 201003_02
hgs
parents:
diff changeset
    63
     * instead of manifest file.
7feec50967db 201003_02
hgs
parents:
diff changeset
    64
     * @since S60 ?S60_version.
7feec50967db 201003_02
hgs
parents:
diff changeset
    65
     * @return True if loading required, false otherwise.
7feec50967db 201003_02
hgs
parents:
diff changeset
    66
     */
7feec50967db 201003_02
hgs
parents:
diff changeset
    67
    bool loadOnQuery() const;
7feec50967db 201003_02
hgs
parents:
diff changeset
    68
7feec50967db 201003_02
hgs
parents:
diff changeset
    69
    /**
7feec50967db 201003_02
hgs
parents:
diff changeset
    70
     * Loads widgets as widget tokens from a manifest file.
7feec50967db 201003_02
hgs
parents:
diff changeset
    71
     * @since S60 ?S60_version.
7feec50967db 201003_02
hgs
parents:
diff changeset
    72
     * @param aFileName Manifest file name.
7feec50967db 201003_02
hgs
parents:
diff changeset
    73
     * @return true if load was succesfull, false otherwise
7feec50967db 201003_02
hgs
parents:
diff changeset
    74
     */
7feec50967db 201003_02
hgs
parents:
diff changeset
    75
	bool loadFromXml(const QString &fileName);
7feec50967db 201003_02
hgs
parents:
diff changeset
    76
7feec50967db 201003_02
hgs
parents:
diff changeset
    77
private:
7feec50967db 201003_02
hgs
parents:
diff changeset
    78
7feec50967db 201003_02
hgs
parents:
diff changeset
    79
	Q_DISABLE_COPY(HsWidgetProviderManifest)
7feec50967db 201003_02
hgs
parents:
diff changeset
    80
7feec50967db 201003_02
hgs
parents:
diff changeset
    81
    HsWidgetProviderManifestPrivate *mD;
7feec50967db 201003_02
hgs
parents:
diff changeset
    82
    friend class HsWidgetProviderManifestPrivate;
7feec50967db 201003_02
hgs
parents:
diff changeset
    83
7feec50967db 201003_02
hgs
parents:
diff changeset
    84
};
7feec50967db 201003_02
hgs
parents:
diff changeset
    85
7feec50967db 201003_02
hgs
parents:
diff changeset
    86
7feec50967db 201003_02
hgs
parents:
diff changeset
    87
7feec50967db 201003_02
hgs
parents:
diff changeset
    88
7feec50967db 201003_02
hgs
parents:
diff changeset
    89
#endif