1// Copyright (C) 2017 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
4#ifndef QCANBUSFACTORY_H
5#define QCANBUSFACTORY_H
6
7#include <QtCore/qstringlist.h>
8#include <QtSerialBus/qtserialbusglobal.h>
9#include <QtSerialBus/qcanbusdevice.h>
10#include <QtSerialBus/qcanbusdeviceinfo.h>
11
12QT_BEGIN_NAMESPACE
13
14class Q_SERIALBUS_EXPORT QCanBusFactory
15{
16public:
17 virtual QCanBusDevice *createDevice(const QString &interfaceName,
18 QString *errorMessage) const = 0;
19 virtual QList<QCanBusDeviceInfo> availableDevices(QString *errorMessage) const = 0;
20
21protected:
22 virtual ~QCanBusFactory();
23};
24
25Q_DECLARE_INTERFACE(QCanBusFactory, "org.qt-project.Qt.QCanBusFactory")
26
27QT_END_NAMESPACE
28
29#endif // QCANBUSFACTORY_H
30
31

source code of qtserialbus/src/serialbus/qcanbusfactory.h