34 #ifndef AGS_SHARED_API_STREAM_API_H 35 #define AGS_SHARED_API_STREAM_API_H 40 #include "ags/shared/core/types.h" 57 virtual void Close() = 0;
59 virtual bool IsValid()
const = 0;
60 virtual bool EOS()
const = 0;
61 virtual soff_t GetLength()
const = 0;
62 virtual soff_t GetPosition()
const = 0;
63 virtual bool CanRead()
const = 0;
64 virtual bool CanWrite()
const = 0;
65 virtual bool CanSeek()
const = 0;
68 virtual size_t Read(
void *buffer,
size_t size) = 0;
72 virtual int32_t ReadByte() = 0;
74 virtual size_t Write(
const void *buffer,
size_t size) = 0;
78 virtual int32_t WriteByte(uint8_t b) = 0;
81 virtual int8_t ReadInt8() = 0;
82 virtual int16_t ReadInt16() = 0;
83 virtual int32_t ReadInt32() = 0;
84 virtual int64_t ReadInt64() = 0;
85 virtual bool ReadBool() = 0;
86 virtual size_t ReadArray(
void *buffer,
size_t elem_size,
size_t count) = 0;
87 virtual size_t ReadArrayOfInt8(int8_t *buffer,
size_t count) = 0;
88 virtual size_t ReadArrayOfInt16(int16_t *buffer,
size_t count) = 0;
89 virtual size_t ReadArrayOfInt32(int32_t *buffer,
size_t count) = 0;
90 virtual size_t ReadArrayOfInt64(int64_t *buffer,
size_t count) = 0;
93 virtual size_t WriteInt8(int8_t val) = 0;
94 virtual size_t WriteInt16(int16_t val) = 0;
95 virtual size_t WriteInt32(int32_t val) = 0;
96 virtual size_t WriteInt64(int64_t val) = 0;
97 virtual size_t WriteBool(
bool val) = 0;
98 virtual size_t WriteArray(
const void *buffer,
size_t elem_size,
size_t count) = 0;
99 virtual size_t WriteArrayOfInt8(
const int8_t *buffer,
size_t count) = 0;
100 virtual size_t WriteArrayOfInt16(
const int16_t *buffer,
size_t count) = 0;
101 virtual size_t WriteArrayOfInt32(
const int32_t *buffer,
size_t count) = 0;
102 virtual size_t WriteArrayOfInt64(
const int64_t *buffer,
size_t count) = 0;
104 virtual bool Seek(soff_t offset, StreamSeek origin = kSeekCurrent) = 0;
Definition: achievements_tables.h:27
Definition: iags_stream.h:53