#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 |
Protected Member Functions | |
| virtual | ~TBluetoothSocket () |
| virtual void | openSocket () |
Implements the bluetooth socket
| TBluetoothSocket::TBluetoothSocket | ( | ) |
Creates the bluetooth socket
| TBluetoothSocket::TBluetoothSocket | ( | TBTAddress & | rAddress ) |
Creates the bluetooth socket
| 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 |
| TBluetoothSocket::~TBluetoothSocket | ( | ) | [protected, virtual] |
Destroys the bluetooth socket
| virtual void MQUALIFIER zeus::TBluetoothSocket::addRef | ( | ) | const [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 Retval MQUALIFIER zeus::TBluetoothSocket::askForInterface | ( | const InterfaceID & | rInterfaceID, |
| IZUnknown *& | rpIface | ||
| ) | [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.
| virtual bool MQUALIFIER zeus::TBluetoothSocket::available | ( | ) | const [inline, virtual] |
Returns if the input stream is available (valid).
| true | : stream is ok |
| false | : invalid stream |
Implements zeus::IInputStream.
| virtual void MQUALIFIER zeus::TBluetoothSocket::close | ( | ) | [inline, virtual] |
Closes the input stream
Implements zeus::IInputStream.
| Retval TBluetoothSocket::connect | ( | ) | [virtual] |
Connects the bluetooth socket
Implements zeus::TAbstractSocket.
| virtual void MQUALIFIER zeus::TBluetoothSocket::flush | ( | ) | [inline, virtual] |
Flush the output stream. This will send the buffer to the destination.
Implements zeus::IOutputStream.
| bool zeus::TBluetoothSocket::hasAuthentication | ( | ) | const [inline] |
Checks if the authentication is switched on
| bool zeus::TBluetoothSocket::hasEncryption | ( | ) | const [inline] |
Checks if the encryption is switched on
| virtual bool MQUALIFIER zeus::TBluetoothSocket::isEndReached | ( | ) | const [inline, virtual] |
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.
| void TBluetoothSocket::openSocket | ( | ) | [protected, virtual] |
opens the socket
Implements zeus::TAbstractSocket.
| Retval MQUALIFIER TBluetoothSocket::read | ( | char * | pBuffer, |
| Int | iBufferSize, | ||
| Int & | rValidSize | ||
| ) | const [virtual] |
Implements zeus::IInputStream.
| Retval MQUALIFIER TBluetoothSocket::readArray | ( | IByteArray & | rData ) | const [virtual] |
Implements zeus::IInputStream.
| bool MQUALIFIER zeus::TBluetoothSocket::readBool | ( | bool * | pError ) | const [inline, virtual] |
Implements zeus::IInputStream.
| Float32 MQUALIFIER TBluetoothSocket::readFloat32 | ( | bool * | pError ) | const [virtual] |
Implements zeus::IInputStream.
| Float64 MQUALIFIER TBluetoothSocket::readFloat64 | ( | bool * | pError ) | const [virtual] |
Implements zeus::IInputStream.
| Int16 MQUALIFIER TBluetoothSocket::readInt16 | ( | bool * | pError ) | const [virtual] |
Implements zeus::IInputStream.
| Int32 MQUALIFIER TBluetoothSocket::readInt32 | ( | bool * | pError ) | const [virtual] |
Implements zeus::IInputStream.
| Int64 MQUALIFIER TBluetoothSocket::readInt64 | ( | bool * | pError ) | const [virtual] |
Implements zeus::IInputStream.
| Int8 MQUALIFIER TBluetoothSocket::readInt8 | ( | bool * | pError ) | const [virtual] |
Implements zeus::IInputStream.
| Int MQUALIFIER TBluetoothSocket::readItem | ( | ) | const [virtual] |
Implements zeus::IInputStream.
| Retval MQUALIFIER TBluetoothSocket::readString | ( | IString & | rstrData ) | const [virtual] |
Implements zeus::IInputStream.
| Uint16 MQUALIFIER zeus::TBluetoothSocket::readUint16 | ( | bool * | pError ) | const [inline, virtual] |
Implements zeus::IInputStream.
| Uint32 MQUALIFIER zeus::TBluetoothSocket::readUint32 | ( | bool * | pError ) | const [inline, virtual] |
Implements zeus::IInputStream.
| Uint64 MQUALIFIER zeus::TBluetoothSocket::readUint64 | ( | bool * | pError ) | const [inline, virtual] |
Implements zeus::IInputStream.
| Uint8 MQUALIFIER zeus::TBluetoothSocket::readUint8 | ( | bool * | pError ) | const [inline, virtual] |
Implements zeus::IInputStream.
| virtual void MQUALIFIER zeus::TBluetoothSocket::release | ( | ) | const [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.
| virtual void MQUALIFIER zeus::TBluetoothSocket::reset | ( | ) | [inline, virtual] |
Sets the stream position back to the beginning
Implements zeus::IInputStream.
| void zeus::TBluetoothSocket::setAuthentication | ( | bool | bMode ) | [inline] |
Enables or disables the authentication of the bluetooth connection
| void zeus::TBluetoothSocket::setEncryption | ( | bool | bMode ) | [inline] |
Enables or disables the encryption of the bluetooth connection
| bool MQUALIFIER TBluetoothSocket::skip | ( | Int | iBytes = 1 ) |
[virtual] |
Implements zeus::IInputStream.
| Retval MQUALIFIER TBluetoothSocket::write | ( | const char * | pBuffer, |
| Int | iBufferSize | ||
| ) | [virtual] |
Implements zeus::IOutputStream.
| Retval MQUALIFIER TBluetoothSocket::writeArray | ( | const IByteArray & | rData ) | [virtual] |
Implements zeus::IOutputStream.
| Retval MQUALIFIER zeus::TBluetoothSocket::writeBool | ( | bool | bData ) | [inline, virtual] |
Implements zeus::IOutputStream.
| Retval MQUALIFIER TBluetoothSocket::writeFloat32 | ( | Float32 | fData ) | [virtual] |
Implements zeus::IOutputStream.
| Retval MQUALIFIER TBluetoothSocket::writeFloat64 | ( | const Float64 & | rdData ) | [virtual] |
Implements zeus::IOutputStream.
| Retval MQUALIFIER TBluetoothSocket::writeInt16 | ( | Int16 | sData ) | [virtual] |
Implements zeus::IOutputStream.
| Retval MQUALIFIER TBluetoothSocket::writeInt32 | ( | Int32 | lData ) | [virtual] |
Implements zeus::IOutputStream.
| Retval MQUALIFIER TBluetoothSocket::writeInt64 | ( | const Int64 & | rldData ) | [virtual] |
Implements zeus::IOutputStream.
| Retval MQUALIFIER TBluetoothSocket::writeInt8 | ( | Int8 | cData ) | [virtual] |
Implements zeus::IOutputStream.
| Retval MQUALIFIER TBluetoothSocket::writeString | ( | const IString & | rData ) | [virtual] |
Implements zeus::IOutputStream.
| Retval MQUALIFIER zeus::TBluetoothSocket::writeUint16 | ( | Uint16 | usData ) | [inline, virtual] |
Implements zeus::IOutputStream.
| Retval MQUALIFIER zeus::TBluetoothSocket::writeUint32 | ( | Uint32 | ulData ) | [inline, virtual] |
Implements zeus::IOutputStream.
| Retval MQUALIFIER zeus::TBluetoothSocket::writeUint64 | ( | const Uint64 & | ruldData ) | [inline, virtual] |
Implements zeus::IOutputStream.
| Retval MQUALIFIER zeus::TBluetoothSocket::writeUint8 | ( | Uint8 | ucData ) | [inline, virtual] |
Implements zeus::IOutputStream.