summaryrefslogtreecommitdiff
path: root/tests/manual/examples/btscanner/service.h
blob: 1c84f38c6ac3ff841b7ed40341071e44ec0d4ec6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
// Copyright (C) 2021 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause

#ifndef SERVICE_H
#define SERVICE_H

#include <QtWidgets/qdialog.h>

QT_BEGIN_NAMESPACE
class QBluetoothAddress;
class QBluetoothServiceDiscoveryAgent;
class QBluetoothServiceInfo;

namespace Ui {
    class ServiceDiscovery;
}
QT_END_NAMESPACE

class ServiceDiscoveryDialog : public QDialog
{
    Q_OBJECT

public:
    ServiceDiscoveryDialog(const QString &name, const QBluetoothAddress &address,
                           QWidget *parent = nullptr);
    ~ServiceDiscoveryDialog();

public slots:
    void addService(const QBluetoothServiceInfo &info);

private:
    QBluetoothServiceDiscoveryAgent *discoveryAgent;
    Ui::ServiceDiscovery *ui;
};

#endif