X-Git-Url: http://git.maemo.org/git/?a=blobdiff_plain;ds=sidebyside;f=src%2Ftrack.h;h=8d1d4885d75d6dd92c236c73326ed41b465fca7a;hb=5fa76f57fd5bd74b268196f08d411e69124222fc;hp=2ee621fb644ea4bd157f5989ef641b710e3420ad;hpb=4e6c2c79b2071319631846dd9459234a27f700de;p=someplayer diff --git a/src/track.h b/src/track.h index 2ee621f..8d1d488 100644 --- a/src/track.h +++ b/src/track.h @@ -1,32 +1,61 @@ +/* + * SomePlayer - An alternate music player for Maemo 5 + * Copyright (C) 2010 Nikolay (somebody) Tischenko + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + #ifndef TRACK_H #define TRACK_H #include "someplayer.h" #include "trackmetainformation.h" +#include "tagresolver.h" // represents some track: metainformation + source url namespace SomePlayer { namespace DataObjects { - class Track + class Track : public QObject { + Q_OBJECT + public: Track(); Track(const Track &track); Track(int id, TrackMetadata metadata, QString source); + Track(QString source); + ~Track(); + Track &operator=(const Track &track); TrackMetadata metadata() const; //read-write QString source() const; int id() const; void setSource (QString source); int count() const; //count of plays void setCount(int count); //for restoring from database and counting from player + bool operator == (const Track &track); private: TrackMetadata _metadata; QString _source; int _count; int _id; + TagResolver *_resolver; + private slots: + void decoded(Track); }; };