homescreenapp/hsdomainmodel/inc/hscontentservice.h
author Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Mon, 03 May 2010 12:24:59 +0300
changeset 39 4e8ebe173323
parent 36 cdae8c6c3876
child 55 03646e8da489
permissions -rw-r--r--
Revision: 201015 Kit: 201018

/*
* 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:  Content service.
*
*/

#ifndef HSCONTENTSERVICE_H
#define HSCONTENTSERVICE_H

#include <QObject>
#include <QMetaType>
#include <QVariant>

#include "hsdomainmodel_global.h"

class HsWidgetHost;

class HSDOMAINMODEL_EXPORT HsContentService : public QObject
{
    Q_OBJECT

public:
    HsContentService(QObject *parent = 0);
    ~HsContentService();

    bool createWidget(const QVariantHash &params);
    HsWidgetHost *createWidgetForPreview(const QVariantHash &params);

    bool addWidget(const QString &uri, const QVariantHash &preferences);

    static HsContentService *instance();

private:
    static QScopedPointer<HsContentService> mInstance;

    Q_DISABLE_COPY(HsContentService)
};

Q_DECLARE_METATYPE(HsContentService*)

#endif