summaryrefslogtreecommitdiffstats
path: root/src/imports/bluetooth/qdeclarativebluetoothservice_p.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/imports/bluetooth/qdeclarativebluetoothservice_p.h')
-rw-r--r--src/imports/bluetooth/qdeclarativebluetoothservice_p.h30
1 files changed, 16 insertions, 14 deletions
diff --git a/src/imports/bluetooth/qdeclarativebluetoothservice_p.h b/src/imports/bluetooth/qdeclarativebluetoothservice_p.h
index a4b300a1..e7e861c7 100644
--- a/src/imports/bluetooth/qdeclarativebluetoothservice_p.h
+++ b/src/imports/bluetooth/qdeclarativebluetoothservice_p.h
@@ -61,13 +61,19 @@ class QDeclarativeBluetoothService : public QObject, public QQmlParserStatus
Q_PROPERTY(QString serviceName READ serviceName WRITE setServiceName NOTIFY detailsChanged)
Q_PROPERTY(QString serviceDescription READ serviceDescription WRITE setServiceDescription NOTIFY detailsChanged)
Q_PROPERTY(QString serviceUuid READ serviceUuid WRITE setServiceUuid NOTIFY detailsChanged)
- Q_PROPERTY(QString serviceProtocol READ serviceProtocol WRITE setServiceProtocol NOTIFY detailsChanged)
- Q_PROPERTY(qint32 servicePort READ servicePort WRITE setServicePort NOTIFY detailsChanged)
+ Q_PROPERTY(Protocol serviceProtocol READ serviceProtocol WRITE setServiceProtocol NOTIFY detailsChanged)
Q_PROPERTY(bool registered READ isRegistered WRITE setRegistered NOTIFY registeredChanged)
Q_INTERFACES(QQmlParserStatus)
+ Q_ENUMS(Protocol)
public:
+ enum Protocol {
+ RfcommProtocol = QBluetoothServiceInfo::RfcommProtocol,
+ L2CapProtocol = QBluetoothServiceInfo::L2capProtocol,
+ UnknownProtocol = QBluetoothServiceInfo::UnknownProtocol
+ };
+
explicit QDeclarativeBluetoothService(QObject *parent = 0);
explicit QDeclarativeBluetoothService(const QBluetoothServiceInfo &service,
QObject *parent = 0);
@@ -78,8 +84,7 @@ public:
QString serviceName() const;
QString serviceDescription() const;
QString serviceUuid() const;
- QString serviceProtocol() const;
- qint32 servicePort() const;
+ Protocol serviceProtocol() const;
bool isRegistered() const;
QBluetoothServiceInfo *serviceInfo() const;
@@ -91,21 +96,18 @@ public:
void classBegin() {}
void componentComplete();
+ void setServiceName(const QString &name);
+ void setDeviceAddress(const QString &address);
+ void setServiceDescription(const QString &description);
+ void setServiceUuid(const QString &uuid);
+ void setServiceProtocol(QDeclarativeBluetoothService::Protocol protocol);
+ void setRegistered(bool registered);
+
signals:
void detailsChanged();
void registeredChanged();
void newClient();
-public slots:
- void setServiceName(QString name);
- void setDeviceAddress(QString address);
- void setServiceDescription(QString description);
- void setServiceUuid(QString uuid);
- void setServiceProtocol(QString protocol);
- void setServicePort(qint32 port);
- void setRegistered(bool registered);
-
-
private slots:
void new_connection();