forked from linuxdeepin/dde-network-core
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwireddevice.h
57 lines (41 loc) · 1.74 KB
/
wireddevice.h
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
// SPDX-FileCopyrightText: 2018 - 2022 UnionTech Software Technology Co., Ltd.
//
// SPDX-License-Identifier: LGPL-3.0-or-later
#ifndef WIREDDEVICE_H
#define WIREDDEVICE_H
#include "networkdevicebase.h"
namespace dde {
namespace network {
class WiredConnection;
class WiredDevice : public NetworkDeviceBase
{
Q_OBJECT
friend class NetworkController;
friend class NetworkInterProcesser;
friend class NetworkManagerProcesser;
private:
WiredDevice(NetworkDeviceRealize *devcieRealize, QObject *parent);
~WiredDevice() override;
Q_SIGNALS:
void connectionAdded(const QList<WiredConnection *>); // 新增连接
void connectionRemoved(const QList<WiredConnection *>); // 删除连接
void connectionPropertyChanged(const QList<WiredConnection *> &); // 连接属性发生变化
public:
bool connectNetwork(WiredConnection *connection); // 连接网络,连接成功抛出deviceStatusChanged信号
bool connectNetwork(const QString &path); // 连接网络重载函数,参数为配置路径
bool isConnected() const override; // 是否连接网络,重写基类的虚函数
DeviceType deviceType() const override; // 返回设备类型,适应基类统一的接口
QList<WiredConnection *> items() const; // 有线网络连接列表
};
class WiredConnection : public ControllItems
{
friend class WiredDevice;
friend class WiredDeviceInterRealize;
friend class DeviceManagerRealize;
protected:
WiredConnection();
~WiredConnection();
};
}
}
#endif // UWIREDDEVICE_H