diff options
author | Jef <jef@targetspot.com> | 2024-09-24 08:54:57 -0400 |
---|---|---|
committer | Jef <jef@targetspot.com> | 2024-09-24 08:54:57 -0400 |
commit | 20d28e80a5c861a9d5f449ea911ab75b4f37ad0d (patch) | |
tree | 12f17f78986871dd2cfb0a56e5e93b545c1ae0d0 /Src/replicant/icy/ifc_icy_reader.h | |
parent | 537bcbc86291b32fc04ae4133ce4d7cac8ebe9a7 (diff) | |
download | winamp-20d28e80a5c861a9d5f449ea911ab75b4f37ad0d.tar.gz |
Initial community commit
Diffstat (limited to 'Src/replicant/icy/ifc_icy_reader.h')
-rw-r--r-- | Src/replicant/icy/ifc_icy_reader.h | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/Src/replicant/icy/ifc_icy_reader.h b/Src/replicant/icy/ifc_icy_reader.h new file mode 100644 index 00000000..74e2d928 --- /dev/null +++ b/Src/replicant/icy/ifc_icy_reader.h @@ -0,0 +1,37 @@ +/* + * ifc_icy_reader.h + * shoutcast_player + * + * Created by Ben Allison on 2/1/08. + * Copyright 2008 Nullsoft, Inc. All rights reserved. + * + */ + #pragma once +#include "foundation/dispatch.h" +#include "foundation/types.h" +#include "foundation/error.h" + +class ifc_icy_reader : public Wasabi2::Dispatchable +{ +protected: + ifc_icy_reader() : Dispatchable(DISPATCHABLE_VERSION) {} + ~ifc_icy_reader() {} +public: + size_t BytesBuffered() { return ICYReader_BytesBuffered(); } + int Read(void *buffer, size_t length, size_t *readLength) { return ICYReader_Read(buffer, length, readLength); } + int Peek(void *buffer, size_t length, size_t *readLength) { return ICYReader_Peek(buffer, length, readLength); } + int IsClosed() { return ICYReader_IsClosed(); } + int Run() { return ICYReader_Run(); } + + enum + { + DISPATCHABLE_VERSION, + }; +protected: + virtual size_t WASABICALL ICYReader_BytesBuffered()=0; + virtual int WASABICALL ICYReader_Read(void *buffer, size_t length, size_t *readLength)=0; + virtual int WASABICALL ICYReader_Peek(void *buffer, size_t length, size_t *readLength)=0; + virtual int WASABICALL ICYReader_IsClosed()=0; + virtual int WASABICALL ICYReader_Run()=0; + +}; |