32 #ifndef BluetoothSocketH 33 #define BluetoothSocketH 35 #ifndef DISABLE_BLUETOOTH 57 bool hasAuthentication()
const;
58 bool hasEncryption()
const;
59 void setAuthentication(
bool bMode);
60 void setEncryption(
bool bMode);
63 virtual Retval connect();
68 virtual Retval
MQUALIFIER read(
char* pBuffer, Int iBufferSize, Int& rValidSize)
const;
88 virtual Retval
MQUALIFIER write(
const char* pBuffer, Int iBufferSize);
99 virtual Retval
MQUALIFIER writeBool(
bool bData);
109 virtual void openSocket();
119 inline bool TBluetoothSocket::hasAuthentication()
const 121 #if defined(ENABLE_WIN32_BLUETOOTH) 123 #elif defined(ENABLE_BLUEZ_BLUETOOTH) 124 return TAbstractSocket::getBoolSocketOption(m_iSocketFD, RFCOMM_LM_AUTH,
SOL_RFCOMM);
134 inline bool TBluetoothSocket::hasEncryption()
const 136 #if defined(ENABLE_WIN32_BLUETOOTH) 138 #elif defined(ENABLE_BLUEZ_BLUETOOTH) 139 return TAbstractSocket::getBoolSocketOption(m_iSocketFD, RFCOMM_LM_ENCRYPT,
SOL_RFCOMM);
149 inline void TBluetoothSocket::setAuthentication(
bool bMode)
151 #if defined(ENABLE_WIN32_BLUETOOTH) 153 #elif defined(ENABLE_BLUEZ_BLUETOOTH) 154 TAbstractSocket::setBoolSocketOption(m_iSocketFD, RFCOMM_LM_AUTH,
SOL_RFCOMM, bMode);
164 inline void TBluetoothSocket::setEncryption(
bool bMode)
166 #if defined(ENABLE_WIN32_BLUETOOTH) 168 #elif defined(ENABLE_BLUEZ_BLUETOOTH) 169 TAbstractSocket::setBoolSocketOption(m_iSocketFD, RFCOMM_LM_ENCRYPT,
SOL_RFCOMM, bMode);
181 return static_cast<Uint8>(readInt8(pError));
190 return static_cast<Uint16>(readInt16(pError));
199 return static_cast<Uint32>(readInt32(pError));
208 return static_cast<Uint64>(readInt64(pError));
215 inline bool MQUALIFIER TBluetoothSocket::readBool(
bool* pError)
const 217 return (readInt8(pError) != 0 );
226 return writeInt8(static_cast<Int8>(ucData));
235 return writeInt16(static_cast<Int16>(usData));
244 return writeInt32(static_cast<Int32>(ulData));
253 return writeInt64(static_cast<Int64>(ruldData));
260 inline Retval
MQUALIFIER TBluetoothSocket::writeBool(
bool bData)
262 return writeInt8(static_cast<Int8>(bData));
268 #endif // #ifndef DISABLE_BLUETOOTH
#define SO_BTH_AUTHENTICATE
Definition: bcb6/ws2bth.h:73
#define SO_BTH_ENCRYPT
Definition: bcb6/ws2bth.h:74
virtual bool MQUALIFIER isEndReached() const
Definition: BluetoothSocket.h:67
#define SOL_RFCOMM
Definition: bcb6/ws2bth.h:66
Definition: IOutputStream.hpp:50
Definition: BluetoothSocket.h:50
Definition: BTDefines.hpp:88
short Int16
Definition: PlatformDefines.hpp:215
unsigned short Uint16
Definition: PlatformDefines.hpp:219
unsigned long long Uint64
Definition: PlatformDefines.hpp:252
long Int32
Definition: PlatformDefines.hpp:237
virtual bool MQUALIFIER available() const
Definition: BluetoothSocket.h:66
#define BOOL_ERRORRETVAL(c)
Definition: RetvalDefines.hpp:111
long long Int64
Definition: PlatformDefines.hpp:251
unsigned long Uint32
Definition: PlatformDefines.hpp:241
unsigned char Uint8
Definition: PlatformDefines.hpp:212
virtual void MQUALIFIER close()
Definition: BluetoothSocket.h:83
char Int8
Definition: PlatformDefines.hpp:208
float Float32
Definition: PlatformDefines.hpp:270
Definition: BTAddress.h:48
virtual void MQUALIFIER flush()
Definition: BluetoothSocket.h:102
Definition: AbstractSocket.h:74
double Float64
Definition: PlatformDefines.hpp:274
virtual void MQUALIFIER reset()
Definition: BluetoothSocket.h:84
#define MEMORY_MANAGER_DECL
Definition: IZUnknownImplHelper.hpp:44
Definition: IString.hpp:48