33 lines
967 B
C++
33 lines
967 B
C++
#pragma once
|
||
// 与 softbus_daemon 同源布局;边缘侧去掉 Registry / Egress / Pipeline,仅保留串口 + IIngressPort。
|
||
|
||
#include <functional>
|
||
#include <memory>
|
||
|
||
#include <QHash>
|
||
#include <QJsonObject>
|
||
#include <QSharedPointer>
|
||
#include <QString>
|
||
|
||
#include "core/memory/MemoryPool.h"
|
||
#include "devices/physical/SerialDevice.h"
|
||
#include "message_bus/ingress/IIngressPort.h"
|
||
|
||
class DeviceTreeModel;
|
||
|
||
namespace softbus::device_bus::manager
|
||
{
|
||
|
||
struct SerialInitDeps
|
||
{
|
||
DeviceTreeModel* treeModel{nullptr};
|
||
std::function<void()> dirtyCb;
|
||
softbus::message_bus::ingress::IIngressPort* ingressPort{nullptr};
|
||
std::shared_ptr<softbus::core::memory::MemoryPool> memoryPool;
|
||
QHash<QString, QSharedPointer<softbus::devices::physical::SerialDevice>>* serialDevicesByEndpoint{nullptr};
|
||
};
|
||
|
||
bool initializeSerialDeviceWithDeps(const QString& endpoint, const QJsonObject& params, const SerialInitDeps& deps);
|
||
|
||
} // namespace softbus::device_bus::manager
|