1
0

ifc_icy_reader.h 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. /*
  2. * ifc_icy_reader.h
  3. * shoutcast_player
  4. *
  5. * Created by Ben Allison on 2/1/08.
  6. * Copyright 2008 Nullsoft, Inc. All rights reserved.
  7. *
  8. */
  9. #pragma once
  10. #include "foundation/dispatch.h"
  11. #include "foundation/types.h"
  12. #include "foundation/error.h"
  13. class ifc_icy_reader : public Wasabi2::Dispatchable
  14. {
  15. protected:
  16. ifc_icy_reader() : Dispatchable(DISPATCHABLE_VERSION) {}
  17. ~ifc_icy_reader() {}
  18. public:
  19. size_t BytesBuffered() { return ICYReader_BytesBuffered(); }
  20. int Read(void *buffer, size_t length, size_t *readLength) { return ICYReader_Read(buffer, length, readLength); }
  21. int Peek(void *buffer, size_t length, size_t *readLength) { return ICYReader_Peek(buffer, length, readLength); }
  22. int IsClosed() { return ICYReader_IsClosed(); }
  23. int Run() { return ICYReader_Run(); }
  24. enum
  25. {
  26. DISPATCHABLE_VERSION,
  27. };
  28. protected:
  29. virtual size_t WASABICALL ICYReader_BytesBuffered()=0;
  30. virtual int WASABICALL ICYReader_Read(void *buffer, size_t length, size_t *readLength)=0;
  31. virtual int WASABICALL ICYReader_Peek(void *buffer, size_t length, size_t *readLength)=0;
  32. virtual int WASABICALL ICYReader_IsClosed()=0;
  33. virtual int WASABICALL ICYReader_Run()=0;
  34. };