homescreensrv_plat/contentstorage_api/casoftwareregistry.h
author Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Wed, 23 Jun 2010 18:33:40 +0300
changeset 103 b99b84bcd2d1
parent 80 397d00875918
child 102 8b8b34fa9751
child 109 e0aa398e6810
permissions -rw-r--r--
Revision: 201023 Kit: 2010125

/*
 * Copyright (c) 2010 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:  ?Description
 *
 */

#ifndef CA_SOFTWARE_REGISTRY_H
#define CA_SOFTWARE_REGISTRY_H

#include <QHash>
#include <QObject>
#include <QSharedPointer>
#include <QString>

#include "caclient_global.h"

//FORWARD DECLARATIONS
class QStringList;
class CaSoftwareRegistryPrivate;

/**
 * Class provides Usif specific services
 */
class CACLIENT_EXPORT CaSoftwareRegistry: public QObject
{
    
Q_OBJECT    

    explicit CaSoftwareRegistry(QObject *parent = 0);

    ~CaSoftwareRegistry();
    
public:
    
    static QSharedPointer<CaSoftwareRegistry> create();
    
    typedef QHash<QString, QString> DetailMap;
    
    bool getUninstallDetails(int componentId,
        QString &componentName,
        QStringList &applicationsUids,
        QString &confirmationMessage);
    
    bool getApplicationsUids(int componentId, QStringList &applicationsUids);
    
    DetailMap entryDetails(int componentId) const;
    
    static QString componentNameKey();
    static QString componentVersionKey();
    static QString componentVendorKey();
    static QString componentDriveInfoKey();
    static QString componentSizeKey();
    static QString componentTypeKey();
private:
    /**
     * Pointer to a private implementation.
     */
    CaSoftwareRegistryPrivate *const m_d;

    /**
     * The static pointer to the instance of CaSoftwareRegistry.
     */
    static QWeakPointer<CaSoftwareRegistry> m_instance;

    friend class CaSoftwareRegistryPrivate;
    friend class QtSharedPointer::ExternalRefCount<CaSoftwareRegistry>;

    Q_DISABLE_COPY(CaSoftwareRegistry)
    
};

#endif // CA_SOFTWARE_REGISTRY_H