radioapp/radiouiengine/inc/radiohistoryitem_p.h
changeset 24 6df133bd92e1
child 32 189d20c34778
equal deleted inserted replaced
23:a2b50a479edf 24:6df133bd92e1
       
     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:
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef RADIOHISTORYITEM_P_H
       
    19 #define RADIOHISTORYITEM_H
       
    20 
       
    21 // System includes
       
    22 #include <QString>
       
    23 #include <QDateTime>
       
    24 
       
    25 // User includes
       
    26 
       
    27 // Forward declarations
       
    28 class QSqlRecord;
       
    29 
       
    30 // Constants
       
    31 namespace RadioHistoryValue
       
    32 {
       
    33     enum Name
       
    34     {
       
    35         Id,
       
    36         Artist,
       
    37         Title,
       
    38         Station,
       
    39         Frequency,
       
    40         Tagged,
       
    41         FromRds,
       
    42         Time
       
    43     };
       
    44 }
       
    45 
       
    46 class RadioHistoryItemPrivate
       
    47 {
       
    48 public:
       
    49 
       
    50     RadioHistoryItemPrivate();
       
    51     RadioHistoryItemPrivate( const QString& artist, const QString& title );
       
    52 
       
    53     void init( const QString& artist, const QString& title );
       
    54 
       
    55     void initFromRecord( const QSqlRecord& record );
       
    56 
       
    57 public: // data
       
    58 
       
    59     /**
       
    60      * Reference count used for implicit sharing.
       
    61      * Has to be named "ref" instead having the 'm' prefix like all other member variables in Radio
       
    62      * This is because convenience functions like qAtomicAssign() expect it to be named "ref"
       
    63      */
       
    64     QAtomicInt      ref;
       
    65 
       
    66     int             mId;
       
    67 
       
    68     QString         mArtist;
       
    69 
       
    70     QString         mTitle;
       
    71 
       
    72     QString         mStation;
       
    73 
       
    74     QDateTime       mTime;
       
    75 
       
    76     uint            mFrequency;
       
    77 
       
    78     bool            mTagged;
       
    79 
       
    80     bool            mFromRds;
       
    81 
       
    82 };
       
    83 
       
    84 #endif // RADIOHISTORYITEM_H