qtinternetradio/irdb/inc/urlinfowrapper.h
changeset 16 5723da102db1
child 17 38bbf2dcd608
equal deleted inserted replaced
15:065198191975 16:5723da102db1
       
     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 * Description: 
       
    13 *
       
    14 */
       
    15 
       
    16 #ifndef _URLINFO_WRAPPER_H_
       
    17 #define _URLINFO_WRAPPER_H_
       
    18 
       
    19 #include "irdbexport.h"
       
    20 #include "irdbwrapper.h"
       
    21 
       
    22 class IRDB_DLL_EXPORT urlInfoWrapper: public IRDBWrapper
       
    23 {
       
    24 public:
       
    25     urlInfoWrapper();
       
    26     ~urlInfoWrapper();
       
    27 
       
    28 public:
       
    29     /*
       
    30     * RowData:   [direction: in] column value for channelUrl and  bitrate;
       
    31     *                            first oprand in QMap is channelUrl,
       
    32     *                            sencod oprand in QMap is bitrate;
       
    33     * channelId: [direction: in] channelid for update row;
       
    34     * return true if operation success; 
       
    35     */     
       
    36     bool resetUrlInfo(const columnUrlInfoInsertMap* const RowData,
       
    37                       const uint& channelId);    
       
    38 
       
    39     QList<QVariant*>* getUrlInfo(const columnMap* const condAND = NULL,  
       
    40                                  const columnMap* const condOR = NULL);
       
    41 
       
    42 private:
       
    43     /*
       
    44     * It is called by IRDB instance;
       
    45     * IRDB instance delivers rows set to IRDBWrapper via this function;
       
    46     * the rows set is storaged in m_IRDataSet;
       
    47     */
       
    48     bool getIRTableCB(QSqlQuery& aIRDataSet,
       
    49                       QList<QVariant*>* pDataSet);
       
    50 
       
    51     /*
       
    52     * create sql insert string according to the input RowData;
       
    53     * RowData:       [direction:in] refer to line 29;
       
    54     * channelId:     [direction:in] it is row channelId;
       
    55     * insSqlStrList: [direction:out] return the sql QStringList;  
       
    56     */    
       
    57     void combineInsertStr(const columnUrlInfoInsertMap* const RowData,
       
    58                           const uint& channelId,	    
       
    59                           QStringList& insSqlStrList);    
       
    60 };
       
    61 
       
    62 #endif
       
    63