/src/libtomahawk/database/DatabaseCommand_DeletePlaylist.h

http://github.com/tomahawk-player/tomahawk · C Header · 59 lines · 29 code · 13 blank · 17 comment · 0 complexity · 8bf77fdd538adcbe6c2281dae76bd89f MD5 · raw file

  1. /* === This file is part of Tomahawk Player - <http://tomahawk-player.org> ===
  2. *
  3. * Copyright 2010-2011, Christian Muehlhaeuser <muesli@tomahawk-player.org>
  4. *
  5. * Tomahawk 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. *
  10. * Tomahawk is distributed in the hope that it will be useful,
  11. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. * GNU General Public License for more details.
  14. *
  15. * You should have received a copy of the GNU General Public License
  16. * along with Tomahawk. If not, see <http://www.gnu.org/licenses/>.
  17. */
  18. #ifndef DATABASECOMMAND_DELETEPLAYLIST_H
  19. #define DATABASECOMMAND_DELETEPLAYLIST_H
  20. #include "DatabaseImpl.h"
  21. #include "DatabaseCommandLoggable.h"
  22. #include "Source.h"
  23. #include "Typedefs.h"
  24. #include "DllMacro.h"
  25. namespace Tomahawk
  26. {
  27. class DLLEXPORT DatabaseCommand_DeletePlaylist : public DatabaseCommandLoggable
  28. {
  29. Q_OBJECT
  30. Q_PROPERTY( QString playlistguid READ playlistguid WRITE setPlaylistguid )
  31. public:
  32. explicit DatabaseCommand_DeletePlaylist( QObject* parent = 0 )
  33. : DatabaseCommandLoggable( parent )
  34. {}
  35. explicit DatabaseCommand_DeletePlaylist( const Tomahawk::source_ptr& source, const QString& playlistguid );
  36. QString commandname() const { return "deleteplaylist"; }
  37. virtual void exec( DatabaseImpl* lib );
  38. virtual void postCommitHook();
  39. virtual bool doesMutates() const { return true; }
  40. QString playlistguid() const { return m_playlistguid; }
  41. void setPlaylistguid( const QString& s ) { m_playlistguid = s; }
  42. protected:
  43. QString m_playlistguid;
  44. };
  45. }
  46. #endif // DATABASECOMMAND_DELETEPLAYLIST_H