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

Inheritance diagram

 Inheritance diagram of SFBBTSIOPortClass

Version

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

Reference

BREW API IBTSIOPort

Member

Public Functions
SInt32 GetState( Void )
Get the current status of Bluetooth port.
static
SFBBTSIOPortSmp
NewInstance( SFCErrorPtr exception = null )
Create a new SFBBTSIOPort instance.
static
SFBBTSIOPortSmp
NewInstance( AEECLSID id , SFCErrorPtr exception = null )
Create a new SFBBTSIOPort instance.
SFCError Open( AEEBTConnectionInfo* connectInfo )
Open the Serial Port on Bluetooth.
SInt32 Write( VoidPtr buf , SInt32 len )
Add data into sending buffer.
SInt32 Write( SFXBufferPtr buf )
Add data into sending buffer.
Void Writeable( SFXCallbackPtr callback )
When the device is ready for data sending again, register the Writeable Callback.
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.

SFBBTSIOPort::GetState
Get the current status of Bluetooth port.
[ public ]
SInt32 GetState(Void);

Reference

BREW API IBTSIOPORT_GetState


SFBBTSIOPort::NewInstance
Create a new SFBBTSIOPort instance.
[ public, static ]
SFBBTSIOPortSmp NewInstance(
    SFCErrorPtr exception = null   // Error
);
[ public, static ]
SFBBTSIOPortSmp NewInstance(
    AEECLSID id                    // Class ID
    SFCErrorPtr exception = null   // Error
);

SFBBTSIOPort::Open
Open the Serial Port on Bluetooth.
[ public ]
SFCError Open(
    AEEBTConnectionInfo* connectInfo   // connect information of Bluetooth Serial Port
);

Reference

BREW API IBTSIOPORT_Open | SFXCallback


SFBBTSIOPort::Write
Add data into sending buffer.
[ public ]
SInt32 Write(
    VoidPtr buf   // buffer accommodated by calling side
    SInt32 len    // length of input buffer.
                  // this size must not over receive buffer's
);
[ public ]
SInt32 Write(
    SFXBufferPtr buf   // buffer accommodated by calling side.
                       // when null, it returns AEE_BT_ERROR
);

Reference

BREW API IBTSIOPORT_Write | SFBSource::Read


SFBBTSIOPort::Writeable
When the device is ready for data sending again, register the Writeable Callback.
[ public ]
Void Writeable(
    SFXCallbackPtr callback   // if the state in link has been changed, this Callback must be called.
                              // this Callback is only called when the Open is success
);

Reference

BREW API IBTSIOPORT_Writeable