PageRenderTime 120ms CodeModel.GetById 50ms app.highlight 2ms RepoModel.GetById 38ms app.codeStats 0ms

/thirdparty/liblastfm2/src/types/Xspf.h

http://github.com/tomahawk-player/tomahawk
C++ Header | 52 lines | 24 code | 8 blank | 20 comment | 0 complexity | b857bb7c201a10ab3d706627f5dd5f29 MD5 | raw file
 1/*
 2   Copyright 2009 Last.fm Ltd. 
 3      - Primarily authored by Max Howell, Jono Cole and Doug Mansell
 4
 5   This file is part of liblastfm.
 6
 7   liblastfm is free software: you can redistribute it and/or modify
 8   it under the terms of the GNU General Public License as published by
 9   the Free Software Foundation, either version 3 of the License, or
10   (at your option) any later version.
11
12   liblastfm is distributed in the hope that it will be useful,
13   but WITHOUT ANY WARRANTY; without even the implied warranty of
14   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15   GNU General Public License for more details.
16
17   You should have received a copy of the GNU General Public License
18   along with liblastfm.  If not, see <http://www.gnu.org/licenses/>.
19*/
20#ifndef LASTFM_XSPF_H
21#define LASTFM_XSPF_H
22
23#include <lastfm/Track>
24#include <QList>
25
26namespace lastfm
27{
28    class LASTFM_DLLEXPORT Xspf : public QObject
29    {
30        Q_OBJECT
31    public:
32        /** pass in the playlist node! */
33        Xspf( const class QDomElement& playlist_node, QObject* parent );
34
35        QString title() const{ return m_title; }
36
37        bool isEmpty() const { return m_tracks.isEmpty(); }
38        Track takeFirst() { return m_tracks.takeFirst(); }
39
40    signals:
41        void expired();
42
43    private slots:
44        void onExpired();
45
46    private:
47        QList<Track> m_tracks;
48        QString m_title;
49    };
50}
51
52#endif