summaryrefslogtreecommitdiffstats
path: root/src/bluetooth/qbluetoothserver_qnx.cpp
diff options
context:
space:
mode:
authorFabian Bumberger <fbumberger@rim.com>2013-09-18 17:23:16 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-09-20 10:09:12 +0200
commitec837633231d0e9c0e70ca3c3d4ad7e1fa548623 (patch)
treea33aa929e47e94fd6d91db9d047285818ee993a5 /src/bluetooth/qbluetoothserver_qnx.cpp
parent4a8fe389db0212eb6f85a49612ceddd56dd1aaf4 (diff)
Unify QBluetoothSoket, QBluetoothServer and QBluetoothServiceInfo protocol enum
Change-Id: I6e66196a599e2cceabc7d93d728ba97361d8999f Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
Diffstat (limited to 'src/bluetooth/qbluetoothserver_qnx.cpp')
-rw-r--r--src/bluetooth/qbluetoothserver_qnx.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/bluetooth/qbluetoothserver_qnx.cpp b/src/bluetooth/qbluetoothserver_qnx.cpp
index 7a222959..bc222b85 100644
--- a/src/bluetooth/qbluetoothserver_qnx.cpp
+++ b/src/bluetooth/qbluetoothserver_qnx.cpp
@@ -53,7 +53,7 @@ QT_BEGIN_NAMESPACE
extern QHash<QBluetoothServerPrivate*, int> __fakeServerPorts;
-QBluetoothServerPrivate::QBluetoothServerPrivate(QBluetoothServer::ServerType sType)
+QBluetoothServerPrivate::QBluetoothServerPrivate(QBluetoothServiceInfo::Protocol sType)
: socket(0),maxPendingConnections(1),securityFlags(QBluetooth::NoSecurity), serverType(sType)
{
ppsRegisterControl();
@@ -84,11 +84,11 @@ void QBluetoothServerPrivate::controlReply(ppsResult result)
if (!socket)
return;
- socket->setSocketDescriptor(socketFD, QBluetoothSocket::RfcommSocket,
+ socket->setSocketDescriptor(socketFD, QBluetoothServiceInfo::RfcommProtocol,
QBluetoothSocket::ConnectedState);
socket->connectToService(QBluetoothAddress(nextClientAddress), m_uuid);
activeSockets.append(socket);
- socket = new QBluetoothSocket(QBluetoothSocket::RfcommSocket, this);
+ socket = new QBluetoothSocket(QBluetoothServiceInfo::RfcommProtocol, this);
socket->setSocketState(QBluetoothSocket::ListeningState);
emit q->newConnection();
}
@@ -137,7 +137,7 @@ void QBluetoothServer::close()
bool QBluetoothServer::listen(const QBluetoothAddress &address, quint16 port)
{
Q_UNUSED(address)
- if (serverType() == L2capServer)
+ if (serverType() != QBluetoothServiceInfo::RfcommProtocol)
return false;
Q_D(QBluetoothServer);
@@ -145,7 +145,7 @@ bool QBluetoothServer::listen(const QBluetoothAddress &address, quint16 port)
if (d->socket && d->socket->state() == QBluetoothSocket::ListeningState)
return true;
- d->socket = new QBluetoothSocket(QBluetoothSocket::RfcommSocket);
+ d->socket = new QBluetoothSocket(QBluetoothServiceInfo::RfcommProtocol);
//We can not register an actual Rfcomm port, because the platform does not allow it
//but we need a way to associate a server with a service