Zen API

- Home
- Topics
- Types
- Files

All Classes Files Functions Variables Typedefs Friends Macros Modules Pages
kStream.h
Go to the documentation of this file.
1
10 #ifndef K_API_STREAM_H
11 #define K_API_STREAM_H
12
13 #include <kApi/kApiDef.h>
14
15 kBeginHeader()
16
17
23 //typedef kObject kStream; --forward-declared in kApiDef.x.h
24
25
34 kFx(kStatus) kStream_Read(kStream stream, void* buffer, kSize size);
35
47 kFx(kStatus) kStream_ReadSome(kStream stream, void* buffer, kSize minCount, kSize maxCount, kSize* bytesRead);
48
58 kFx(kStatus) kStream_Write(kStream stream, const void* buffer, kSize size);
59
69 kFx(kStatus) kStream_Copy(kStream stream, kStream source, kSize size);
70
86 kFx(kStatus) kStream_CopyEx(kStream stream, kStream source, kSize size, kCallbackFx progress, kPointer context);
87
97 kFx(kStatus) kStream_Seek(kStream stream, k64s offset, kSeekOrigin origin);
98
106 kFx(kStatus) kStream_Flush(kStream stream);
107
115 kFx(k64u) kStream_BytesRead(kStream stream);
116
124 kFx(k64u) kStream_BytesWritten(kStream stream);
125
133 kFx(kStatus) kStream_ClearStats(kStream stream);
134
135 #define kStream_BytesRead_(STREAM) kxStream_BytesRead_(STREAM)
136 #define kStream_BytesWritten_(STREAM) kxStream_BytesWritten_(STREAM)
137
138 kEndHeader()
139
140 #include <kApi/Io/kStream.x.h>
141
142 #endif
kStream::kStream_BytesRead
k64u kStream_BytesRead(kStream stream)
Reports the number of bytes read from this stream.
k64u
Represents a 64-bit unsigned integer.
kPointer
Represents a void pointer.
kStream::kStream_Copy
kStatus kStream_Copy(kStream stream, kStream source, kSize size)
Copies the specified number of bytes from one stream to another.
kStream::kStream_Flush
kStatus kStream_Flush(kStream stream)
Flushes buffered writes to the underlying medium.
kSize
Represents an unsigned integer that can store a pointer address.
kStream::kStream_ReadSome
kStatus kStream_ReadSome(kStream stream, void *buffer, kSize minCount, kSize maxCount, kSize *bytesRead)
Reads up to the specified number of bytes from the stream.
kStream::kStream_Seek
kStatus kStream_Seek(kStream stream, k64s offset, kSeekOrigin origin)
Moves the read/write pointer to the specified location, if supported by the underlying stream...
kSeekOrigin
Represents a stream seek origin.
kApiDef.h
Core Zen type declarations.
kStream
Represents an I/O stream.
kCallbackFx
kStatus(kCall * kCallbackFx)(kPointer receiver, kPointer sender, void *args)
Callback signature for a generic event handler.
Definition: kApiDef.h:1480
k64s
Represents a 64-bit signed integer.
kStream::kStream_CopyEx
kStatus kStream_CopyEx(kStream stream, kStream source, kSize size, kCallbackFx progress, kPointer context)
Copies the specified number of bytes from one stream to another, with progress feedback.
kStream::kStream_BytesWritten
k64u kStream_BytesWritten(kStream stream)
Reports the number of bytes written to this stream.
kStatus
Represents an error code.
kStream::kStream_Write
kStatus kStream_Write(kStream stream, const void *buffer, kSize size)
Writes the specified number of bytes to the stream.
kStream::kStream_Read
kStatus kStream_Read(kStream stream, void *buffer, kSize size)
Reads the specified number of bytes from the stream.
kStream::kStream_ClearStats
kStatus kStream_ClearStats(kStream stream)
Clears stream statistics (e.g.