harvester/contentinfodb/inc/contentinfodbreadprivate.h
changeset 23 d4d56f5e7c55
equal deleted inserted replaced
20:556534771396 23:d4d56f5e7c55
       
     1 /*
       
     2  * Copyright (c) 2009 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:  ContentInfoDbReadPrivate implementation of read api's
       
    15  *
       
    16  */
       
    17 
       
    18 #ifndef CONTENTINFODBREADPRIVATE_H
       
    19 #define CONTENTINFODBREADPRIVATE_H
       
    20 
       
    21 /**
       
    22  * @file
       
    23  * @ingroup contentinfodb read api's
       
    24  * @brief Contains ContentInfoDbReadPrivate used for reading the DB 
       
    25  */
       
    26 
       
    27 #include <qobject.h>
       
    28 #include <qstringlist.h>
       
    29 #include "contentinfodbcommon.h"
       
    30 
       
    31 class ContentInfoDbRead;
       
    32 class ContentInfoDb;
       
    33 
       
    34 CONTENTINFODB_CLASS(ContentinfodbTest)
       
    35 class ContentInfoDbReadPrivate : public QObject
       
    36     {
       
    37 Q_OBJECT
       
    38 public:
       
    39 
       
    40     /**
       
    41      * Constructor.
       
    42      * @since S60 ?S60_version.
       
    43      */
       
    44     ContentInfoDbReadPrivate(QObject*);
       
    45 
       
    46     /**
       
    47      * Destructor.
       
    48      * @since S60 ?S60_version.
       
    49      */
       
    50     ~ContentInfoDbReadPrivate();
       
    51 
       
    52 public:
       
    53     
       
    54     /**
       
    55      * returns primary keys alias category names    
       
    56      */
       
    57     QStringList getPrimaryKeys();
       
    58 
       
    59     /**
       
    60      * return db value for the mentioned key and fieldname     
       
    61      */
       
    62     QString getValues(QString Key, QString columnname);
       
    63     
       
    64     /**
       
    65      * returns the list of activity uris for the mentioned category     
       
    66      */
       
    67     QStringList getActionuri(QString Key);
       
    68 
       
    69     /**
       
    70      * returns primary activityuri     
       
    71      */
       
    72     QString getShortTaburi(QString Key);
       
    73 
       
    74     /**
       
    75      * returns list of uri's mapped for particular field     
       
    76      */
       
    77     QStringList getLongTaburi(QString Key, QString FieldName);
       
    78 
       
    79     /**
       
    80      * returns the logical name/icon for a particular uri     
       
    81      */
       
    82     bool geturiDetails(QString key, QString uri, QString& iconname,
       
    83             QString& displayname);
       
    84     
       
    85     /**
       
    86      * returns total number of categories available in contentinfoDb     
       
    87      */
       
    88     int categoryCount();
       
    89 
       
    90 public slots:
       
    91     /**
       
    92      * slot to get notify when changes happen in Db     
       
    93      */
       
    94     void slotdataChanged();
       
    95 
       
    96 private:
       
    97     /**
       
    98      * handler to emit datachanged signal
       
    99      * Not Own.
       
   100      */
       
   101     ContentInfoDbRead* iReadPtr;
       
   102 
       
   103     /**
       
   104      * handler to manage database operations
       
   105      * Own.
       
   106      */
       
   107     ContentInfoDb* mdb;
       
   108 
       
   109 CONTENTINFODB_FRIEND_CLASS    (ContentinfodbTest)
       
   110     };
       
   111 
       
   112 #endif //ContentInfoDbReadPrivate