StreamError StreamOpen (
GeodeHandle driver,
word buffSize,
GeodeHandle owner,
HeapFlags heapFlags,
StreamToken * stream);
This routine opens a stream. It is passed the following:
driver
GeodeToken
of the stream driver.
buffSize
owner
heapFlags
*stream
If
StreamOpen()
is successful, it returns zero and writes the stream's token to
*stream
. If it is unsuccessful, it returns a member of the
StreamError
enumerated type.
StreamError StreamQuery (
GeodeHandle driver,
StreamToken stream,
StreamRoles role,
word * bytesAvailable);
This routine finds out either how much free space is available in a stream's buffer, or how much data is waiting to be read. It is passed the following arguments:
driver
GeodeToken
of the stream driver.
stream
StreamToken
of the stream.
role
*bytesAvailable
If the routine is successful, it returns zero. If it is unsuccessful, it returns a member of the
StreamError
enumerated type.
StreamError StreamRead (
GeodeHandle driver,
StreamToken stream,
StreamBlocker blocker,
word buffSize,
byte * buffer,
word * numBytesRead);
This routine reads data from a stream. The routine takes the following arguments:
driver
GeodeToken
of the stream driver.
stream
StreamToken
of the stream.
blocker
buffsize
buffer
*numBytesReadRead
StreamRead()
will write to this variable the number of bytes actually read from the stream.
If
StreamRead()
is successful, it returns zero. If it is unsuccessful, or could not read all the data requested from the stream, it returns a member of the
StreamError
enumerated type.
StreamError StreamWriteByte (
GeodeHandle driver,
StreamToken stream,
StreamBlocker blocker,
byte * dataByte);
This routine reads a single byte from a stream. It takes the following arguments:
driver
GeodeToken
of the stream driver.
stream
StreamToken
of the stream.
blocker
*dataByte
If the routine is successful, it returns zero. If it is unsuccessful, it returns a member of the
StreamError
enumerated type.
StreamError StreamSetError(
Handle driver,
StreamToken stream,
StreamRoles roles,
word errorCode);
This routine sets the device-specific error code for a stream; this code can later be recovered by
StreamGetError()
. It takes the following arguments:
driver
GeodeToken
of the stream driver.
stream
StreamToken
of the stream.
role
errorCode
If the routine is successful, it returns zero. If it is unsuccessful, it returns a member of the
StreamError
enumerated type.
GEOS SDK TechDocs
|
|
SpoolModifyPriority() ...
|
StreamWrite() ...