/src/libtomahawk/infosystem/infoplugins/generic/musicbrainzPlugin.h

http://github.com/tomahawk-player/tomahawk · C Header · 69 lines · 36 code · 16 blank · 17 comment · 0 complexity · ae9a46bdd6794a7e338d0a2836c3b3e0 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 MUSICBRAINZPLUGIN_H
  19. #define MUSICBRAINZPLUGIN_H
  20. #include "infosystem/infosystem.h"
  21. #include "infosystem/infosystemworker.h"
  22. class QNetworkReply;
  23. namespace Tomahawk
  24. {
  25. namespace InfoSystem
  26. {
  27. class MusicBrainzPlugin : public InfoPlugin
  28. {
  29. Q_OBJECT
  30. public:
  31. MusicBrainzPlugin();
  32. virtual ~MusicBrainzPlugin();
  33. protected slots:
  34. virtual void getInfo( Tomahawk::InfoSystem::InfoRequestData requestData );
  35. virtual void notInCacheSlot( InfoStringHash criteria, InfoRequestData requestData );
  36. virtual void pushInfo( QString caller, Tomahawk::InfoSystem::InfoType type, QVariant data )
  37. {
  38. Q_UNUSED( caller );
  39. Q_UNUSED( type );
  40. Q_UNUSED( data );
  41. }
  42. private slots:
  43. void artistSearchSlot();
  44. void albumSearchSlot();
  45. void tracksSearchSlot();
  46. void albumFoundSlot();
  47. void tracksFoundSlot();
  48. private:
  49. bool isValidTrackData( Tomahawk::InfoSystem::InfoRequestData requestData );
  50. };
  51. }
  52. }
  53. #endif // MUSICBRAINZPLUGIN_H