homescreensrv_plat/contentstorage_api/casoftwareregistry.h
changeset 80 397d00875918
child 98 d2f833ab7940
equal deleted inserted replaced
73:4bc7b118b3df 80:397d00875918
       
     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 CaSoftwareRegistryPrivate;
       
    30 
       
    31 /**
       
    32  * Class provides Usif specific services
       
    33  */
       
    34 class CACLIENT_EXPORT CaSoftwareRegistry: public QObject
       
    35 {
       
    36     
       
    37 Q_OBJECT    
       
    38 
       
    39     explicit CaSoftwareRegistry(QObject *parent = 0);
       
    40 
       
    41     ~CaSoftwareRegistry();
       
    42     
       
    43 public:
       
    44     
       
    45     static QSharedPointer<CaSoftwareRegistry> create();
       
    46     
       
    47     typedef QHash<QString, QString> DetailMap;
       
    48     
       
    49     DetailMap entryDetails(int componentId) const;
       
    50     
       
    51     static QString componentNameKey();
       
    52     static QString componentVersionKey();
       
    53     static QString componentVendorKey();
       
    54     static QString componentDriveInfoKey();
       
    55     static QString componentSizeKey();
       
    56     static QString componentTypeKey();
       
    57 private:
       
    58     /**
       
    59      * Pointer to a private implementation.
       
    60      */
       
    61     CaSoftwareRegistryPrivate *const m_d;
       
    62 
       
    63     /**
       
    64      * The static pointer to the instance of CaSoftwareRegistry.
       
    65      */
       
    66     static QWeakPointer<CaSoftwareRegistry> m_instance;
       
    67 
       
    68     friend class CaSoftwareRegistryPrivate;
       
    69     friend class QtSharedPointer::ExternalRefCount<CaSoftwareRegistry>;
       
    70 
       
    71     Q_DISABLE_COPY(CaSoftwareRegistry)
       
    72     
       
    73 };
       
    74 
       
    75 #endif // CA_SOFTWARE_REGISTRY_H