radioapp/radiouiengine/inc/radiohistoryitem_p.h
author Pat Downey <patd@symbian.org>
Fri, 04 Jun 2010 10:24:08 +0100
changeset 25 4177d7e75bb1
parent 24 6df133bd92e1
child 32 189d20c34778
permissions -rw-r--r--
Re-merge docml changes.

/*
* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of "Eclipse Public License v1.0"
* which accompanies this distribution, and is available
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
*
* Initial Contributors:
* Nokia Corporation - initial contribution.
*
* Contributors:
*
* Description:
*
*/

#ifndef RADIOHISTORYITEM_P_H
#define RADIOHISTORYITEM_H

// System includes
#include <QString>
#include <QDateTime>

// User includes

// Forward declarations
class QSqlRecord;

// Constants
namespace RadioHistoryValue
{
    enum Name
    {
        Id,
        Artist,
        Title,
        Station,
        Frequency,
        Tagged,
        FromRds,
        Time
    };
}

class RadioHistoryItemPrivate
{
public:

    RadioHistoryItemPrivate();
    RadioHistoryItemPrivate( const QString& artist, const QString& title );

    void init( const QString& artist, const QString& title );

    void initFromRecord( const QSqlRecord& record );

public: // data

    /**
     * Reference count used for implicit sharing.
     * Has to be named "ref" instead having the 'm' prefix like all other member variables in Radio
     * This is because convenience functions like qAtomicAssign() expect it to be named "ref"
     */
    QAtomicInt      ref;

    int             mId;

    QString         mArtist;

    QString         mTitle;

    QString         mStation;

    QDateTime       mTime;

    uint            mFrequency;

    bool            mTagged;

    bool            mFromRds;

};

#endif // RADIOHISTORYITEM_H