PageRenderTime 142ms CodeModel.GetById 80ms app.highlight 3ms RepoModel.GetById 58ms app.codeStats 0ms

/thirdparty/liblastfm2/src/types/Playlist.h

http://github.com/tomahawk-player/tomahawk
C++ Header | 51 lines | 24 code | 8 blank | 19 comment | 0 complexity | 6583a1d73af25db928db265b8e8e073d 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_PLAYLIST_H
21#define LASTFM_PLAYLIST_H
22
23#include <lastfm/global.h>
24#include <lastfm/Xspf>
25#include <QString>
26#include <QUrl>
27
28namespace lastfm
29{
30    class LASTFM_DLLEXPORT Playlist
31    {
32        int m_id;
33    
34        Playlist() : m_id( -1 )
35        {}
36
37    public:
38        Playlist( int id ) : m_id( id )
39        {}
40    
41        int id() const { return m_id; }
42
43        QNetworkReply* addTrack( const Track& ) const;
44        QNetworkReply* fetch() const;
45
46        static QNetworkReply* create( const QString& title, const QString& description = "" );
47        static QNetworkReply* fetch( const QUrl& url );
48    };
49}
50
51#endif