PrevNextUpHome SophiaFramework UNIVERSE 5.3
SFBPeek
Wrapper Class for the IPeek interface.
#include <SFBPeek.h.hpp>
class SFBPeek : public SFBSource;
SFMTYPEDEFWRAPPER(SFBPeek)

Inheritance diagram

 Inheritance diagram of SFBPeekClass

Version

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

Reference

BREW API IPeek

Member

Public Functions
Void Advance( SInt32 advance )
Advance or Retreat the peek pointer in the buffer.
VoidPtr Peek( SInt32 wanted , SInt32Ptr available , SInt32Ptr code )
Return a pointer to the buffered data, and optionally tries to read more data into the buffer.
Void Peekable( SFXCallbackPtr callback )
Call a callback when more unbuffered data is available.
static
Bool
Exhausted( SInt32 code ) (inherits from SFBSource)
Determine if a SFBSource, a SFBPeek, or a SFBGetLine is out of data.
SFCError QueryInterface( AEECLSID clsid , VoidHandle handle ) (inherits from SFBQuery)
Ask an object for another API contract from the object in question.
SFCError QueryInterface( AEECLSID clsid , SFBBaseSmpPtr handle ) (inherits from SFBQuery)
Ask an object for another API contract from the object in question.
SFBBaseSmp QueryInterface( AEECLSID clsid ) (inherits from SFBQuery)
Ask an object for another API contract from the object in question.
SInt32 Read( VoidPtr buf , SInt32 size ) (inherits from SFBSource)
Copy bytes from the source stream to the specified buffer.
SInt32 Read( SFXBufferPtr buf ) (inherits from SFBSource)
Copy bytes from the source stream to the specified buffer.
Void Readable( SFXCallbackPtr callback ) (inherits from SFBSource)
Schedule a callback to be called when SFBSource::Read() is able to return something other than ISOURCE_WAIT.
Void Self( AEECLSID clsidReq , SFBQuerySmpPtr clone , AEECLSID clsidImp ) (inherits from SFBQuery)
Helper macro for those implementing an object with a single interface.
SFBQuerySmp Self( AEECLSID clsidReq , AEECLSID clsidImp ) (inherits from SFBQuery)
Helper macro for those implementing an object with a single interface.
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.

SFBPeek::Advance
Advance or Retreat the peek pointer in the buffer.
[ public ]
Void Advance(
    SInt32 advance   // number of bytes to advance (or retreat, when negative)
);

Reference

BREW API IPEEK_Advance


SFBPeek::Peek
Return a pointer to the buffered data, and optionally tries to read more data into the buffer.
[ public ]
VoidPtr Peek(
    SInt32 wanted         // number of bytes specified. 
                          // if this many bytes are already available in the buffer, 
                          // peek() does no extra work; otherwise it tries to copy more data from the network 
                          // (or whatever original source). Pass 0 (zero) to quickly query the current buffer status. 
                          // IPEEK_PEEKMAX is defined to represent "return as much as possible"
    SInt32Ptr available   // size of the buffered data
    SInt32Ptr code        // describes the availability of data beyond what was returned: 
                          // IPEEK_END, No more data (END was encountered in the stream). 
                          // IPEEK_ERROR, No more data (ERROR was encountered in the stream). 
                          // IPEEK_FULL, Data limited by buffer size; must advance over buffered data in order to obtain new data. 
                          // IPEEK_WAIT, Wait on IPEEK_Peekable() before calling again; data source was polled and None is available now.
                          // IPEEK_UNK, Amount requested was less than amount buffered; call again with larger cbWanted; data source was not polled
);

Reference

BREW API IPEEK_Peek


SFBPeek::Peekable
Call a callback when more unbuffered data is available.
[ public ]
Void Peekable(
    SFXCallbackPtr callback   // pointer to where to call when the ISource may be readable
);

Reference

BREW API IPEEK_Peekable