PrevNextUpHome SophiaFramework UNIVERSE 5.3
SFBAStream
Wrapper Class for the IAStream interface.
#include <SFBAStream.h.hpp>
class SFBAStream : public SFBBase;
SFMTYPEDEFWRAPPER(SFBAStream)

Inheritance diagram

 Inheritance diagram of SFBAStreamClass

Version

BREW 2.0 BREW 2.1 BREW 3.1 BREW 4.0
O O O O

Reference

BREW API IAStream

Member

Public Functions
Void Cancel( Void )
Cancel a callback that was scheduled with SFBAStream::Readable().
SInt32 Read( VoidPtr buffer , UInt32 count )
Attempt to read data from a stream, and returns the number of bytes read. If no data is available for reading, it returns the value AEE_STREAM_WOULDBLOCK.
SInt32 Read( SFXBufferPtr buffer )
Attempt to read data from a stream, and returns the number of bytes read. If no data is available for reading, it returns the value AEE_STREAM_WOULDBLOCK.
Void Readable( PFNNOTIFY notify , VoidPtr data = null )
Register a callback that checks whether data is available to be read. It is called when the SFBAStream::Read() returns AEE_STREAM_WOULDBLOCK.
Protected Functions
static
SFBBaseSmp
FactoryByCreate( AEECLSID id , SFCErrorPtr exception = null ) (inherits from SFBBase)
Create the instance for the specified ClassID's interface.
static
SFBBaseSmp
FactoryByQuery( SFBQuerySmpConstRef query , AEECLSID id , SFCErrorPtr exception = null ) (inherits from SFBBase)
Create the instance for the specified ClassID's interface using the SFBQuery instance.

SFBAStream::Cancel
Cancel a callback that was scheduled with SFBAStream::Readable().
[ public ]
Void Cancel(Void);

Reference

BREW API IASTREAM_Cancel | PFNNOTIFY | SFBAStream::Read | SFBAStream::Readable


SFBAStream::Read
Attempt to read data from a stream, and returns the number of bytes read. If no data is available for reading, it returns the value AEE_STREAM_WOULDBLOCK.
[ public ]
SInt32 Read(
    VoidPtr buffer   // pointer to the buffer into which the data is read
    UInt32 count     // number of bytes to read
);
[ public ]
SInt32 Read(
    SFXBufferPtr buffer   // pointer to the buffer into which the data is read.
                          // when null, it returns the value AEE_STREAM_WOULDBLOCK
);

Reference

BREW API IASTREAM_Read | SFBAStream::Readable | SFBAStream::Cancel


SFBAStream::Readable
Register a callback that checks whether data is available to be read. It is called when the SFBAStream::Read() returns AEE_STREAM_WOULDBLOCK.
[ public ]
Void Readable(
    PFNNOTIFY notify      // pointer to the callback function
    VoidPtr data = null   // pointer to user-specified data that is passed as a parameter to the callback function
);

Reference

BREW API IASTREAM_Readable | SFBAStream::Read | SFBAStream::Cancel