| 1 |
/**************************************************************************************** |
| 2 |
* Copyright (c) 2013 Konrad Zemek <[email protected]> * |
| 3 |
* * |
| 4 |
* This program is free software; you can redistribute it and/or modify it under * |
| 5 |
* the terms of the GNU General Public License as published by the Free Software * |
| 6 |
* Foundation; either version 2 of the License, or (at your option) any later * |
| 7 |
* version. * |
| 8 |
* * |
| 9 |
* This program is distributed in the hope that it will be useful, but WITHOUT ANY * |
| 10 |
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A * |
| 11 |
* PARTICULAR PURPOSE. See the GNU General Public License for more details. * |
| 12 |
* * |
| 13 |
* You should have received a copy of the GNU General Public License along with * |
| 14 |
* this program. If not, see <http://www.gnu.org/licenses/>. * |
| 15 |
****************************************************************************************/ |
| 16 |
|
| 17 |
#ifndef STATSYNCING_BANSHEE_TRACK_H |
| 18 |
#define STATSYNCING_BANSHEE_TRACK_H |
| 19 |
|
| 20 |
#include "statsyncing/SimpleWritableTrack.h" |
| 21 |
|
| 22 |
#include <QSharedPointer> |
| 23 |
|
| 24 |
namespace StatSyncing |
| 25 |
{ |
| 26 |
|
| 27 |
class ImporterSqlConnection; |
| 28 |
typedef QSharedPointer<ImporterSqlConnection> ImporterSqlConnectionPtr; |
| 29 |
|
| 30 |
class BansheeTrack : public SimpleWritableTrack |
| 31 |
{ |
| 32 |
public: |
| 33 |
BansheeTrack( const qint64 trackId, const ImporterSqlConnectionPtr &connection, |
| 34 |
const Meta::FieldHash &metadata ); |
| 35 |
~BansheeTrack() override; |
| 36 |
|
| 37 |
int rating() const override; |
| 38 |
void setRating( int rating ) override; |
| 39 |
|
| 40 |
protected: |
| 41 |
void doCommit( const qint64 fields ) override; |
| 42 |
|
| 43 |
private: |
| 44 |
const ImporterSqlConnectionPtr m_connection; |
| 45 |
const qint64 m_trackId; |
| 46 |
}; |
| 47 |
|
| 48 |
} // namespace StatSyncing |
| 49 |
|
| 50 |
#endif // STATSYNCING_BANSHEE_TRACK_H |