summaryrefslogtreecommitdiffstats
path: root/src/connectivity/bluetooth/ql2capsocket.h
diff options
context:
space:
mode:
authorAaron McCarthy <aaron.mccarthy@nokia.com>2010-06-16 14:44:38 +1000
committerAaron McCarthy <aaron.mccarthy@nokia.com>2010-06-24 15:37:33 +1000
commit61eddba231230c1d3d84bd3f66043a41c7d6e458 (patch)
tree24e3278eca33e7a39c9227270abe78e1fdcc61e5 /src/connectivity/bluetooth/ql2capsocket.h
parent0b9aa1c7a2cdfd80328e6a1c3ed7446f14e761c5 (diff)
Seperate QL2capSocket and QRfcommSockets.
Diffstat (limited to 'src/connectivity/bluetooth/ql2capsocket.h')
-rw-r--r--src/connectivity/bluetooth/ql2capsocket.h78
1 files changed, 78 insertions, 0 deletions
diff --git a/src/connectivity/bluetooth/ql2capsocket.h b/src/connectivity/bluetooth/ql2capsocket.h
new file mode 100644
index 0000000000..951c11486a
--- /dev/null
+++ b/src/connectivity/bluetooth/ql2capsocket.h
@@ -0,0 +1,78 @@
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the Qt Mobility Components.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QL2CAPSOCKET_H
+#define QL2CAPSOCKET_H
+
+#include <qbluetoothsocket.h>
+#include <qbluetoothaddress.h>
+
+#include <QtCore/QObject>
+
+QT_BEGIN_HEADER
+
+QTM_BEGIN_NAMESPACE
+
+class QL2capSocket : public QBluetoothSocket
+{
+ Q_OBJECT
+
+public:
+ explicit QL2capSocket(QObject *parent = 0);
+
+ bool hasPendingDatagrams() const;
+ qint64 pendingDatagramSize() const;
+ qint64 readDatagram(char *data, qint64 maxlen, QBluetoothAddress *host = 0, quint16 *port = 0);
+ qint64 writeDatagram(const char *data, qint64 len, const QBluetoothAddress &host,
+ quint16 port);
+ inline qint64 writeDatagram(const QByteArray &datagram, const QBluetoothAddress &host,
+ quint16 port)
+ { return writeDatagram(datagram.constData(), datagram.size(), host, port); }
+
+private:
+ Q_DISABLE_COPY(QL2capSocket)
+};
+
+QTM_END_NAMESPACE
+
+QT_END_HEADER
+
+#endif // QL2CAPSOCKET_H