ZeusBase-Library
2.0.4
|
#include <BluetoothSocket.h>
Public Member Functions | |
TBluetoothSocket () | |
TBluetoothSocket (TBTAddress &rAddress) | |
TBluetoothSocket (Int iFD, SOCKADDR_BTH &rSocketAddr) | |
bool | hasAuthentication () const |
bool | hasEncryption () const |
void | setAuthentication (bool bMode) |
void | setEncryption (bool bMode) |
virtual Retval | connect () |
virtual bool MQUALIFIER | available () const |
virtual bool MQUALIFIER | isEndReached () const |
virtual Retval MQUALIFIER | read (char *pBuffer, Int iBufferSize, Int &rValidSize) const |
virtual Int MQUALIFIER | readItem () const |
virtual Int8 MQUALIFIER | readInt8 (bool *pError) const |
virtual Int16 MQUALIFIER | readInt16 (bool *pError) const |
virtual Int32 MQUALIFIER | readInt32 (bool *pError) const |
virtual Int64 MQUALIFIER | readInt64 (bool *pError) const |
virtual Uint8 MQUALIFIER | readUint8 (bool *pError) const |
virtual Uint16 MQUALIFIER | readUint16 (bool *pError) const |
virtual Uint32 MQUALIFIER | readUint32 (bool *pError) const |
virtual Uint64 MQUALIFIER | readUint64 (bool *pError) const |
virtual Float64 MQUALIFIER | readFloat64 (bool *pError) const |
virtual Float32 MQUALIFIER | readFloat32 (bool *pError) const |
virtual bool MQUALIFIER | readBool (bool *pError) const |
virtual Retval MQUALIFIER | readArray (IByteArray &rData) const |
virtual Retval MQUALIFIER | readString (IString &rstrData) const |
virtual void MQUALIFIER | close () |
virtual void MQUALIFIER | reset () |
virtual bool MQUALIFIER | skip (Int iBytes=1) |
virtual Retval MQUALIFIER | write (const char *pBuffer, Int iBufferSize) |
virtual Retval MQUALIFIER | writeInt8 (Int8 cData) |
virtual Retval MQUALIFIER | writeInt16 (Int16 sData) |
virtual Retval MQUALIFIER | writeInt32 (Int32 lData) |
virtual Retval MQUALIFIER | writeInt64 (const Int64 &rldData) |
virtual Retval MQUALIFIER | writeUint8 (Uint8 ucData) |
virtual Retval MQUALIFIER | writeUint16 (Uint16 usData) |
virtual Retval MQUALIFIER | writeUint32 (Uint32 ulData) |
virtual Retval MQUALIFIER | writeUint64 (const Uint64 &ruldData) |
virtual Retval MQUALIFIER | writeFloat32 (Float32 fData) |
virtual Retval MQUALIFIER | writeFloat64 (const Float64 &rdData) |
virtual Retval MQUALIFIER | writeBool (bool bData) |
virtual Retval MQUALIFIER | writeArray (const IByteArray &rData) |
virtual Retval MQUALIFIER | writeString (const IString &rData) |
virtual void MQUALIFIER | flush () |
virtual Retval MQUALIFIER | askForInterface (const InterfaceID &rInterfaceID, IZUnknown *&rpIface) |
virtual void MQUALIFIER | addRef () const |
virtual void MQUALIFIER | release () const |
Public Member Functions inherited from zeus::TAbstractSocket | |
TAbstractSocket (TIPAddress &rAddress) | |
TAbstractSocket (const TString &rstrAddr, Uint uiPort) | |
TAbstractSocket (Int iFD, struct sockaddr_in &rAddress) | |
virtual Retval | disconnect () |
TString | getAddress () const |
TString | getHostName () const |
Uint | getPort () const |
Int | getReceiveBufferSize () const |
Int | getSendBufferSize () const |
Int | getSocketDescripitor () const |
bool | isConnected () const |
bool | isBlockable () const |
bool | isReUsable () const |
bool | isValid () const |
void | setBlockable (bool bMode) |
void | setReceiveBufferSize (Int iSize) |
void | setReUsable (bool bMode) |
void | setSendBufferSize (Int iSize) |
void | setTCPBufferEnable (bool bMode) |
Public Member Functions inherited from zeus::TZObject | |
TZObject () | |
TZObject (const TString &strName) | |
TZObject (const IString &strName) | |
Uint | getHash () const |
TString | toString () const |
virtual TString | getObjName () const |
virtual void | setObjName (const TString &name) |
Protected Member Functions | |
virtual | ~TBluetoothSocket () |
virtual void | openSocket () |
Protected Member Functions inherited from zeus::TAbstractSocket | |
TAbstractSocket () | |
virtual | ~TAbstractSocket () |
Protected Member Functions inherited from zeus::TZObject | |
virtual | ~TZObject () |
TZObject (const TZObject &rObject) | |
TZObject & | operator= (const TZObject &rObject) |
Int | getRefCounter () const |
Additional Inherited Members | |
Static Protected Member Functions inherited from zeus::TAbstractSocket | |
static Retval | getErrorCode (bool bHandleBlockedAsError) |
static bool | getBoolSocketOption (Int iFD, Int iOption, Int iLevel) |
static Int | getIntSocketOption (Int iFD, Int iOption, Int iLevel) |
static void | setBoolSocketOption (Int iFD, Int iOption, Int iLevel, bool bValue) |
static void | setIntSocketOption (Int iFD, Int iOption, Int iLevel, Int iValue) |
Protected Attributes inherited from zeus::TAbstractSocket | |
TIPAddress * | m_pAddress |
Address object. More... | |
bool | m_bConnected |
Connected flag. More... | |
bool | m_bBlockable |
blockable flag More... | |
bool | m_bReUsable |
reusable flag More... | |
Int | m_iSocketFD |
File descriptor for socket. More... | |
TCriticalSection & | m_rSocketLock |
Critical section to protect socket file descriptor. More... | |
Protected Attributes inherited from zeus::TZObject | |
Uint | m_uiID |
Implements the bluetooth socket
zeus::TBluetoothSocket::TBluetoothSocket | ( | ) |
Creates the bluetooth socket
zeus::TBluetoothSocket::TBluetoothSocket | ( | TBTAddress & | rAddress | ) |
Creates the bluetooth socket
zeus::TBluetoothSocket::TBluetoothSocket | ( | Int | iFD, |
SOCKADDR_BTH & | rSocketAddr | ||
) |
Creates a bluetooth socket out of the file descriptor and a socket address. This method is used by the bluetooth socket server, which is listening to bluetooth devices
iFD | : file descriptor of the socket |
rSocketAddr | : Socket address structure |
|
protectedvirtual |
Destroys the bluetooth socket
|
virtual |
This method increases the reference counter of this object. The call is const because it will not change the content of the object, since the reference counter is not an object data. This allows to handle const reference using addRef() and release().
Implements zeus::IZUnknown.
|
virtual |
This method is used to cast to different interface types. This is a secure way asking for other implemented interfaces, since C++ does not reject invalid casts.
rInterfaceID | : ID of the requested interface |
rpIface | : return value of the interface. The pointer contains the address of the requested interface |
RET_NOERROR | : Interface returned |
RET_UNKNOWN_INTERFACE | : Interface is not valid or not implemented |
Implements zeus::IZUnknown.
|
inlinevirtual |
Returns if the input stream is available (valid).
true | : stream is ok |
false | : invalid stream |
Implements zeus::IInputStream.
|
inlinevirtual |
Closes the input stream
Implements zeus::IInputStream.
|
virtual |
Connects the bluetooth socket
Implements zeus::TAbstractSocket.
|
inlinevirtual |
Flush the output stream. This will send the buffer to the destination.
Implements zeus::IOutputStream.
|
inline |
Checks if the authentication is switched on
|
inline |
Checks if the encryption is switched on
|
inlinevirtual |
This method checks if the stream is at the end. If a stream is at the end the methods readDouble(), readLong(), readByte() and readBool() should not called anymore. They will return zero. You must call this method before getting data from the stream.
true | : Stream is at the end |
false | : Stream is not at the end |
Implements zeus::IInputStream.
|
protectedvirtual |
opens the socket
Implements zeus::TAbstractSocket.
|
virtual |
Implements zeus::IInputStream.
|
virtual |
Implements zeus::IInputStream.
|
inlinevirtual |
Implements zeus::IInputStream.
|
virtual |
Implements zeus::IInputStream.
|
virtual |
Implements zeus::IInputStream.
|
virtual |
Implements zeus::IInputStream.
|
virtual |
Implements zeus::IInputStream.
|
virtual |
Implements zeus::IInputStream.
|
virtual |
Implements zeus::IInputStream.
|
virtual |
Implements zeus::IInputStream.
|
virtual |
Implements zeus::IInputStream.
|
inlinevirtual |
Implements zeus::IInputStream.
|
inlinevirtual |
Implements zeus::IInputStream.
|
inlinevirtual |
Implements zeus::IInputStream.
|
inlinevirtual |
Implements zeus::IInputStream.
|
virtual |
This method decreases the reference counter of this object. This call is const as well (like addRef()). The killing of an object is allowed by const method, because the content is not used any more.
Implements zeus::IZUnknown.
|
inlinevirtual |
Sets the stream position back to the beginning
Implements zeus::IInputStream.
|
inline |
Enables or disables the authentication of the bluetooth connection
|
inline |
Enables or disables the encryption of the bluetooth connection
|
virtual |
Implements zeus::IInputStream.
|
virtual |
Implements zeus::IOutputStream.
|
virtual |
Implements zeus::IOutputStream.
|
inlinevirtual |
Implements zeus::IOutputStream.
|
virtual |
Implements zeus::IOutputStream.
|
virtual |
Implements zeus::IOutputStream.
|
virtual |
Implements zeus::IOutputStream.
|
virtual |
Implements zeus::IOutputStream.
|
virtual |
Implements zeus::IOutputStream.
|
virtual |
Implements zeus::IOutputStream.
|
virtual |
Implements zeus::IOutputStream.
|
inlinevirtual |
Implements zeus::IOutputStream.
|
inlinevirtual |
Implements zeus::IOutputStream.
|
inlinevirtual |
Implements zeus::IOutputStream.
|
inlinevirtual |
Implements zeus::IOutputStream.