/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. This file is part of liblastfm.
  5. liblastfm is free software: you can redistribute it and/or modify
  6. it under the terms of the GNU General Public License as published by
  7. the Free Software Foundation, either version 3 of the License, or
  8. (at your option) any later version.
  9. liblastfm is distributed in the hope that it will be useful,
  10. but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. GNU General Public License for more details.
  13. You should have received a copy of the GNU General Public License
  14. along with liblastfm. If not, see <http://www.gnu.org/licenses/>.
  15. */
  16. #ifndef LASTFM_PLAYLIST_H
  17. #define LASTFM_PLAYLIST_H
  18. #include <lastfm/global.h>
  19. #include <lastfm/Xspf>
  20. #include <QString>
  21. #include <QUrl>
  22. namespace lastfm
  23. {
  24. class LASTFM_DLLEXPORT Playlist
  25. {
  26. int m_id;
  27. Playlist() : m_id( -1 )
  28. {}
  29. public:
  30. Playlist( int id ) : m_id( id )
  31. {}
  32. int id() const { return m_id; }
  33. QNetworkReply* addTrack( const Track& ) const;
  34. QNetworkReply* fetch() const;
  35. static QNetworkReply* create( const QString& title, const QString& description = "" );
  36. static QNetworkReply* fetch( const QUrl& url );
  37. };
  38. }
  39. #endif