homescreensrv_plat/contentstorage_api/inc/casoftwareregistry.h
changeset 125 26079c1bb561
equal deleted inserted replaced
123:d1dadafc5584 125:26079c1bb561
       
     1 /*
       
     2  * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
       
     3  * All rights reserved.
       
     4  * This component and the accompanying materials are made available
       
     5  * under the terms of "Eclipse Public License v1.0"
       
     6  * which accompanies this distribution, and is available
       
     7  * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8  *
       
     9  * Initial Contributors:
       
    10  * Nokia Corporation - initial contribution.
       
    11  *
       
    12  * Contributors:
       
    13  *
       
    14  * Description:  ?Description
       
    15  *
       
    16  */
       
    17 
       
    18 #ifndef CA_SOFTWARE_REGISTRY_H
       
    19 #define CA_SOFTWARE_REGISTRY_H
       
    20 
       
    21 #include <QHash>
       
    22 #include <QObject>
       
    23 #include <QSharedPointer>
       
    24 #include <QString>
       
    25 
       
    26 #include "caclient_global.h"
       
    27 
       
    28 //FORWARD DECLARATIONS
       
    29 class QStringList;
       
    30 class CaSoftwareRegistryPrivate;
       
    31 class CaUninstallNotifier;
       
    32 
       
    33 /**
       
    34  * Class provides Usif specific services
       
    35  */
       
    36 class CACLIENT_EXPORT CaSoftwareRegistry: public QObject
       
    37 {
       
    38 
       
    39 Q_OBJECT
       
    40 
       
    41     explicit CaSoftwareRegistry(QObject *parent = 0);
       
    42 
       
    43     ~CaSoftwareRegistry();
       
    44 
       
    45 public:
       
    46 
       
    47     static QSharedPointer<CaSoftwareRegistry> create();
       
    48 
       
    49     typedef QHash<QString, QString> DetailMap;
       
    50 
       
    51     bool getUninstallDetails(int componentId,
       
    52         QString &componentName,
       
    53         QStringList &applicationsUids,
       
    54         QString &confirmationMessage);
       
    55 
       
    56     bool getApplicationsUids(int componentId, QStringList &applicationsUids);
       
    57 
       
    58     DetailMap entryDetails(int componentId) const;
       
    59 
       
    60     QList<DetailMap> retrieveLogEntries() const;
       
    61     
       
    62     CaUninstallNotifier *createUninstallNotifier() const;
       
    63 
       
    64     static QString componentNameKey();
       
    65     static QString componentVersionKey();
       
    66     static QString componentVendorKey();
       
    67     static QString componentDriveInfoKey();
       
    68     static QString componentProtectionDomainKey();
       
    69     static QString componentSizeKey();
       
    70     static QString componentTypeKey();
       
    71     static QString componentDescriptionKey();
       
    72     static QString componentTimeKey();
       
    73     static QString componentOperationTypeKey();
       
    74     static QString componentInstallValue();
       
    75     static QString componentUninstallValue();
       
    76     static QString componentUpgradeValue();
       
    77     static QString componentHiddenValue();
       
    78 
       
    79 private:
       
    80     /**
       
    81      * Pointer to a private implementation.
       
    82      */
       
    83     CaSoftwareRegistryPrivate *const m_d;
       
    84 
       
    85     /**
       
    86      * The static pointer to the instance of CaSoftwareRegistry.
       
    87      */
       
    88     static QWeakPointer<CaSoftwareRegistry> m_instance;
       
    89 
       
    90     friend class CaSoftwareRegistryPrivate;
       
    91     friend class QtSharedPointer::ExternalRefCount<CaSoftwareRegistry>;
       
    92 
       
    93     Q_DISABLE_COPY(CaSoftwareRegistry)
       
    94 
       
    95 };
       
    96 
       
    97 #endif // CA_SOFTWARE_REGISTRY_H