JUCE-7.0.12-0-g4f43011b96 JUCE-7.0.12-0-g4f43011b96
JUCE — C++ application framework with suport for VST, VST3, LV2 audio plug-ins

« « « Anklang Documentation
Loading...
Searching...
No Matches
ibstream.h
Go to the documentation of this file.
1 //-----------------------------------------------------------------------------
2// Project : SDK Core
3//
4// Category : SDK Core Interfaces
5// Filename : pluginterfaces/base/ibstream.h
6// Created by : Steinberg, 01/2004
7// Description : Interface for reading/writing streams
8//
9//-----------------------------------------------------------------------------
10// This file is part of a Steinberg SDK. It is subject to the license terms
11// in the LICENSE file found in the top-level directory of this distribution
12// and at www.steinberg.net/sdklicenses.
13// No part of the SDK, including this file, may be copied, modified, propagated,
14// or distributed except according to the terms contained in the LICENSE file.
15//-----------------------------------------------------------------------------
16
17#pragma once
18
19#include "funknown.h"
20
21namespace Steinberg {
22
23//------------------------------------------------------------------------
29class IBStream: public FUnknown
30{
31public:
38
39//------------------------------------------------------------------------
44 virtual tresult PLUGIN_API read (void* buffer, int32 numBytes, int32* numBytesRead = nullptr) = 0;
45
50 virtual tresult PLUGIN_API write (void* buffer, int32 numBytes, int32* numBytesWritten = nullptr) = 0;
51
56 virtual tresult PLUGIN_API seek (int64 pos, int32 mode, int64* result = nullptr) = 0;
57
60 virtual tresult PLUGIN_API tell (int64* pos) = 0;
61//------------------------------------------------------------------------
62 static const FUID iid;
63};
64
65DECLARE_CLASS_IID (IBStream, 0xC3BF6EA2, 0x30994752, 0x9B6BF990, 0x1EE33E9B)
66
67//------------------------------------------------------------------------
73{
74public:
75//------------------------------------------------------------------------
77 virtual tresult PLUGIN_API getStreamSize (int64& size) = 0;
79 virtual tresult PLUGIN_API setStreamSize (int64 size) = 0;
80
81//------------------------------------------------------------------------
82 static const FUID iid;
83};
84DECLARE_CLASS_IID (ISizeableStream, 0x04F9549E, 0xE02F4E6E, 0x87E86A87, 0x47F4E17F)
85
86//------------------------------------------------------------------------
87} // namespace Steinberg
Handling 16 Byte Globally Unique Identifiers.
Definition funknown.h:241
The basic interface of all interfaces.
Definition funknown.h:375
Base class for streams.
Definition ibstream.h:30
virtual tresult PLUGIN_API tell(int64 *pos)=0
Gets current stream read-write position.
virtual tresult PLUGIN_API read(void *buffer, int32 numBytes, int32 *numBytesRead=nullptr)=0
Reads binary data from stream.
virtual tresult PLUGIN_API seek(int64 pos, int32 mode, int64 *result=nullptr)=0
Sets stream read-write position.
virtual tresult PLUGIN_API write(void *buffer, int32 numBytes, int32 *numBytesWritten=nullptr)=0
Writes binary data to stream.
@ kIBSeekCur
set seek position relative to current position
Definition ibstream.h:35
@ kIBSeekEnd
set seek position relative to stream end
Definition ibstream.h:36
@ kIBSeekSet
set absolute seek position
Definition ibstream.h:34
Stream with a size.
Definition ibstream.h:73
virtual tresult PLUGIN_API getStreamSize(int64 &size)=0
Return the stream size.
virtual tresult PLUGIN_API setStreamSize(int64 size)=0
Set the steam size.