summaryrefslogtreecommitdiffstats
path: root/src/bluetooth/qbluetoothserver.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.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.cpp')
-rw-r--r--src/bluetooth/qbluetoothserver.cpp21
1 files changed, 6 insertions, 15 deletions
diff --git a/src/bluetooth/qbluetoothserver.cpp b/src/bluetooth/qbluetoothserver.cpp
index 9cbec283..3cf99bc9 100644
--- a/src/bluetooth/qbluetoothserver.cpp
+++ b/src/bluetooth/qbluetoothserver.cpp
@@ -63,21 +63,12 @@ QT_BEGIN_NAMESPACE
applicable attributes for your service and register it using QBluetoothServiceInfo::registerService().
Call serverPort() to get the channel number that is being used.
- If the \l QBluetoothServer::ServerType is not supported by a platform, \l listen() will return \c false.
+ If the \l QBluetoothServiceInfo::Protocol is not supported by a platform, \l listen() will return \c false.
\sa QBluetoothServiceInfo, QBluetoothSocket
*/
/*!
- \enum QBluetoothServer::ServerType
-
- This enum describes the Bluetooth server type.
-
- \value L2capServer L2CAP server (Not supported on BlackBerry).
- \value RfcommServer RFCOMM server.
-*/
-
-/*!
\fn void QBluetoothServer::newConnection()
This signal is emitted when a new connection is available.
@@ -140,7 +131,7 @@ QT_BEGIN_NAMESPACE
/*!
Constructs a bluetooth server with \a parent and \a serverType.
*/
-QBluetoothServer::QBluetoothServer(ServerType serverType, QObject *parent)
+QBluetoothServer::QBluetoothServer(QBluetoothServiceInfo::Protocol serverType, QObject *parent)
: QObject(parent), d_ptr(new QBluetoothServerPrivate(serverType))
{
d_ptr->q_ptr = this;
@@ -197,7 +188,7 @@ QBluetoothServiceInfo QBluetoothServer::listen(const QBluetoothUuid &uuid, const
protocolDescriptorList.append(QVariant::fromValue(protocol));
protocol.clear();
//! [listen]
- if (d->serverType == RfcommServer) {
+ if (d->serverType == QBluetoothServiceInfo::RfcommProtocol) {
//! [listen2]
protocol << QVariant::fromValue(QBluetoothUuid(QBluetoothUuid::Rfcomm))
<< QVariant::fromValue(quint8(serverPort()));
@@ -253,10 +244,10 @@ int QBluetoothServer::maxPendingConnections() const
*/
/*!
- \fn QBluetooth::ServerType QBluetoothServer::serverType() const
- Returns the server type of the QBluetoothServer.
+ \fn QBluetoothSocket::ServerType QBluetoothServer::serverType() const
+ Returns the type of the QBluetoothServer.
*/
-QBluetoothServer::ServerType QBluetoothServer::serverType() const
+QBluetoothServiceInfo::Protocol QBluetoothServer::serverType() const
{
Q_D(const QBluetoothServer);
return d->serverType;