/src/libtomahawk/utils/qnr_iodevicestream.h

http://github.com/tomahawk-player/tomahawk · C Header · 54 lines · 23 code · 10 blank · 21 comment · 0 complexity · 09ac2f1c0eb8bd41716095e697523091 MD5 · raw file

  1. /* This file is part of the KDE project
  2. Copyright (C) 2007 Matthias Kretz <kretz@kde.org>
  3. This library is free software; you can redistribute it and/or
  4. modify it under the terms of the GNU Lesser General Public
  5. License as published by the Free Software Foundation; either
  6. version 2.1 of the License, or (at your option) version 3, or any
  7. later version accepted by the membership of KDE e.V. (or its
  8. successor approved by the membership of KDE e.V.), Nokia Corporation
  9. (or its successors, if any) and the KDE Free Qt Foundation, which shall
  10. act as a proxy defined in Section 6 of version 3 of the license.
  11. This library is distributed in the hope that it will be useful,
  12. but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  14. Lesser General Public License for more details.
  15. You should have received a copy of the GNU Lesser General Public
  16. License along with this library. If not, see <http://www.gnu.org/licenses/>.
  17. */
  18. #ifndef QNR_IODEVICESTREAM_H
  19. #define QNR_IODEVICESTREAM_H
  20. #include "DllMacro.h"
  21. #include <phonon/abstractmediastream.h>
  22. class QNetworkReply;
  23. class QIODevice;
  24. namespace Tomahawk
  25. {
  26. class DLLEXPORT QNR_IODeviceStream : public Phonon::AbstractMediaStream
  27. {
  28. Q_OBJECT
  29. public:
  30. explicit QNR_IODeviceStream(QIODevice *ioDevice, QObject *parent = 0);
  31. ~QNR_IODeviceStream();
  32. void reset();
  33. void needData();
  34. void seekStream(qint64);
  35. private:
  36. QIODevice *_ioDevice;
  37. QNetworkReply *_networkReply;
  38. };
  39. } // namespace Tomahawk
  40. #endif // QNR_IODEVICESTREAM_H