contentstorage/caclient/stub/inc/hswidgetregistryservice_p.h
author hgs
Fri, 30 Apr 2010 15:22:08 +0300
changeset 93 82b66994846c
parent 87 9d806967057c
child 99 7aaf39b772ac
permissions -rw-r--r--
201017
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:  The private implementation of the HsWidgetRegistryService.
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 HSWIDGETREGISTRYSERVICE_P_H
7feec50967db 201003_02
hgs
parents:
diff changeset
    20
#define HSWIDGETREGISTRYSERVICE_P_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 <QSharedPointer>
7feec50967db 201003_02
hgs
parents:
diff changeset
    24
#include <QStringList>
7feec50967db 201003_02
hgs
parents:
diff changeset
    25
#include <QMap>
7feec50967db 201003_02
hgs
parents:
diff changeset
    26
#include <QFileSystemWatcher>
7feec50967db 201003_02
hgs
parents:
diff changeset
    27
7feec50967db 201003_02
hgs
parents:
diff changeset
    28
#include "hsiwidgetprovider.h"
7feec50967db 201003_02
hgs
parents:
diff changeset
    29
7feec50967db 201003_02
hgs
parents:
diff changeset
    30
class HsWidgetRegistryService;
7feec50967db 201003_02
hgs
parents:
diff changeset
    31
7feec50967db 201003_02
hgs
parents:
diff changeset
    32
class HsWidgetRegistryServicePrivate : public QObject
7feec50967db 201003_02
hgs
parents:
diff changeset
    33
{
7feec50967db 201003_02
hgs
parents:
diff changeset
    34
    Q_OBJECT
87
hgs
parents: 85
diff changeset
    35
85
7feec50967db 201003_02
hgs
parents:
diff changeset
    36
public:
7feec50967db 201003_02
hgs
parents:
diff changeset
    37
87
hgs
parents: 85
diff changeset
    38
    HsWidgetRegistryServicePrivate(const QString &installationPath,
hgs
parents: 85
diff changeset
    39
                                   HsWidgetRegistryService *ptrToPublic, QObject *parent=0);
85
7feec50967db 201003_02
hgs
parents:
diff changeset
    40
7feec50967db 201003_02
hgs
parents:
diff changeset
    41
    ~HsWidgetRegistryServicePrivate();
7feec50967db 201003_02
hgs
parents:
diff changeset
    42
7feec50967db 201003_02
hgs
parents:
diff changeset
    43
    QList<HsWidgetToken> widgets();
7feec50967db 201003_02
hgs
parents:
diff changeset
    44
7feec50967db 201003_02
hgs
parents:
diff changeset
    45
private:
7feec50967db 201003_02
hgs
parents:
diff changeset
    46
7feec50967db 201003_02
hgs
parents:
diff changeset
    47
    Q_DISABLE_COPY(HsWidgetRegistryServicePrivate)
87
hgs
parents: 85
diff changeset
    48
hgs
parents: 85
diff changeset
    49
    IHsWidgetProvider *loadProviderFromPlugin(const QString &pluginName);
85
7feec50967db 201003_02
hgs
parents:
diff changeset
    50
7feec50967db 201003_02
hgs
parents:
diff changeset
    51
    QStringList readManifestDirectories(const QString &path);
7feec50967db 201003_02
hgs
parents:
diff changeset
    52
7feec50967db 201003_02
hgs
parents:
diff changeset
    53
    void doWidgetRemove(const QString &path, const QStringList &originalList,
87
hgs
parents: 85
diff changeset
    54
                        const QStringList &currentList);
85
7feec50967db 201003_02
hgs
parents:
diff changeset
    55
7feec50967db 201003_02
hgs
parents:
diff changeset
    56
    QList<HsWidgetToken> readManifestFile(const QString &path);
7feec50967db 201003_02
hgs
parents:
diff changeset
    57
7feec50967db 201003_02
hgs
parents:
diff changeset
    58
    void ensureWidgetRegistryPaths();
87
hgs
parents: 85
diff changeset
    59
hgs
parents: 85
diff changeset
    60
public slots:
85
7feec50967db 201003_02
hgs
parents:
diff changeset
    61
7feec50967db 201003_02
hgs
parents:
diff changeset
    62
private slots:
7feec50967db 201003_02
hgs
parents:
diff changeset
    63
7feec50967db 201003_02
hgs
parents:
diff changeset
    64
    void directoryChanged(const QString &path);
7feec50967db 201003_02
hgs
parents:
diff changeset
    65
7feec50967db 201003_02
hgs
parents:
diff changeset
    66
    void installerStateChanged(int newValue);
7feec50967db 201003_02
hgs
parents:
diff changeset
    67
7feec50967db 201003_02
hgs
parents:
diff changeset
    68
private:
87
hgs
parents: 85
diff changeset
    69
hgs
parents: 85
diff changeset
    70
    QString mInstallationPath;
85
7feec50967db 201003_02
hgs
parents:
diff changeset
    71
87
hgs
parents: 85
diff changeset
    72
    QMap<QString,QStringList> mManifestDirectories;
85
7feec50967db 201003_02
hgs
parents:
diff changeset
    73
87
hgs
parents: 85
diff changeset
    74
    HsWidgetRegistryService *mPublic;
85
7feec50967db 201003_02
hgs
parents:
diff changeset
    75
};
7feec50967db 201003_02
hgs
parents:
diff changeset
    76
7feec50967db 201003_02
hgs
parents:
diff changeset
    77
#endif //HSWIDGETREGISTRYSERVICE_P_H