PageRenderTime 16ms CodeModel.GetById 12ms RepoModel.GetById 0ms app.codeStats 0ms

/src/libtomahawk/database/DatabaseCommand_LoadFiles.h

http://github.com/tomahawk-player/tomahawk
C Header | 62 lines | 29 code | 11 blank | 22 comment | 0 complexity | 7c860e0112a8bc7e1a0443d098c52e19 MD5 | raw file
Possible License(s): LGPL-2.1, BSD-3-Clause, GPL-3.0, GPL-2.0
  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_LOADFILES_H
  19. #define DATABASECOMMAND_LOADFILES_H
  20. #include <QObject>
  21. #include <QVariantMap>
  22. #include <QStringList>
  23. #include <QMap>
  24. #include "DatabaseCommand.h"
  25. #include "Result.h"
  26. #include "DllMacro.h"
  27. namespace Tomahawk
  28. {
  29. /**
  30. Loads a result_ptr from the database from a track dbid.
  31. If use use the QStringList constructor, isten to results() instead of result()
  32. */
  33. class DLLEXPORT DatabaseCommand_LoadFiles : public DatabaseCommand
  34. {
  35. Q_OBJECT
  36. public:
  37. explicit DatabaseCommand_LoadFiles( unsigned int id, QObject* parent = 0 );
  38. explicit DatabaseCommand_LoadFiles( const QList<unsigned int>& ids, QObject* parent = 0 );
  39. virtual void exec( DatabaseImpl* );
  40. virtual bool doesMutates() const { return false; }
  41. virtual QString commandname() const { return "loadfiles"; }
  42. signals:
  43. void result( const Tomahawk::result_ptr& result );
  44. void results( const QList<Tomahawk::result_ptr>& results );
  45. private:
  46. bool m_single;
  47. QList<unsigned int> m_ids;
  48. };
  49. }
  50. #endif // DATABASECOMMAND_LOADFILE_H