NetworkManagerQt

dcbsetting.h
1/*
2 SPDX-FileCopyrightText: 2018 Pranav Gade <pranavgade20@gmail.com>
3
4 SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
5*/
6
7#ifndef NETWORKMANAGERQT_DCBSETTING_H
8#define NETWORKMANAGERQT_DCBSETTING_H
9
10#include "setting.h"
11#include <networkmanagerqt/networkmanagerqt_export.h>
12
13#include <QString>
14
15namespace NetworkManager
16{
17class DcbSettingPrivate;
18
19/**
20 * Represents Dcb setting
21 */
22class NETWORKMANAGERQT_EXPORT DcbSetting : public Setting
23{
24public:
26 typedef QList<Ptr> List;
27
28 enum DcbFlagType {
29 None = 0,
30 Enable = 0x01,
31 Advertise = 0x02,
32 Willing = 0x04,
33 };
34 Q_DECLARE_FLAGS(DcbFlags, DcbFlagType)
35
36 DcbSetting();
37 explicit DcbSetting(const Ptr &other);
38 ~DcbSetting() override;
39
40 QString name() const override;
41
42 void setAppFcoeMode(const QString &mode);
43 QString appFcoeMode() const;
44
45 void setAppFcoePriority(qint32 priority);
46 qint32 appFcoePriority() const;
47
48 void setAppFipPriority(qint32 priority);
49 qint32 appFipPriority() const;
50
51 void setAppIscsiPriority(qint32 priority);
52 qint32 appIscsiPriority() const;
53
54 void setAppFcoeFlags(DcbFlags flags);
55 DcbFlags appFcoeFlags() const;
56
57 void setAppFipFlags(DcbFlags flags);
58 DcbFlags appFipFlags() const;
59
60 void setAppIscsiFlags(DcbFlags flags);
61 DcbFlags appIscsiFlags() const;
62
63 void setPriorityGroupFlags(DcbFlags flags);
64 DcbFlags priorityGroupFlags() const;
65
66 void setPriorityFlowControlFlags(DcbFlags flags);
67 DcbFlags priorityFlowControlFlags() const;
68
69 void setPriorityFlowControl(quint32 userPriority, bool enabled);
70 bool priorityFlowControl(quint32 userPriority) const;
71 void setPriorityFlowControl(const UIntList &list);
72 UIntList priorityFlowControl() const;
73
74 void setPriorityBandwidth(quint32 userPriority, quint32 bandwidthPercent);
75 quint32 priorityBandwidth(quint32 userPriority) const;
76 void setPriorityBandwidth(const UIntList &list);
77 UIntList priorityBandwidth() const;
78
79 void setPriorityGroupBandwidth(quint32 groupId, quint32 bandwidthPercent);
80 quint32 priorityGroupBandwidth(quint32 groupId) const;
81 void setPriorityGroupBandwidth(const UIntList &list);
82 UIntList priorityGroupBandwidth() const;
83
84 void setPriorityGroupId(quint32 userPriority, quint32 groupId);
85 quint32 priorityGroupId(quint32 userPriority) const;
86 void setPriorityGroupId(const UIntList &list);
87 UIntList priorityGroupId() const;
88
89 void setPriorityStrictBandwidth(quint32 userPriority, bool strict);
90 bool priorityStrictBandwidth(quint32 userPriority) const;
91 void setPriorityStrictBandwidth(const UIntList &list);
92 UIntList priorityStrictBandwidth() const;
93
94 void setPriorityTrafficClass(quint32 userPriority, quint32 trafficClass);
95 quint32 priorityTrafficClass(quint32 userPriority) const;
96 void setPriorityTrafficClass(const UIntList &list);
97 UIntList priorityTrafficClass() const;
98
99 void fromMap(const QVariantMap &setting) override;
100
101 QVariantMap toMap() const override;
102
103protected:
104 DcbSettingPrivate *d_ptr;
105
106private:
107 Q_DECLARE_PRIVATE(DcbSetting)
108};
109Q_DECLARE_OPERATORS_FOR_FLAGS(DcbSetting::DcbFlags)
110
111NETWORKMANAGERQT_EXPORT QDebug operator<<(QDebug dbg, const DcbSetting &setting);
112
113}
114
115#endif // NETWORKMANAGERQT_DCBSETTING_H
Represents Dcb setting.
Definition dcbsetting.h:23
Base class for all kinds of setting.
Definition setting.h:30
This class allows querying the underlying system to discover the available network interfaces and rea...
Definition accesspoint.h:21
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:08:13 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.