~ubuntu-branches/ubuntu/saucy/libnm-qt/saucy-proposed

« back to all changes in this revision

Viewing changes to device.h

  • Committer: Package Import Robot
  • Author(s): Jonathan Riddell
  • Date: 2013-10-30 15:14:17 UTC
  • mfrom: (4.1.1 trusty-proposed)
  • Revision ID: package-import@ubuntu.com-20131030151417-vfrvbsjgi7wpefr5
Tags: 0.9.0.1-0ubuntu1~saucy1
SRU to saucy LP: #1246367

Show diffs side-by-side

added added

removed removed

Lines of Context:
75
75
     * simplicity, states from several different layers are present -
76
76
     * this is a high level view
77
77
     */
78
 
    enum State { UnknownState = 0, Unmanaged = 10, Unavailable = 20, Disconnected = 30 , Preparing = 40,
79
 
                 ConfiguringHardware = 50 , NeedAuth = 60, ConfiguringIp = 70, CheckingIp = 80, WaitingForSecondaries = 90, Activated = 100, Deactivating = 110, Failed = 120
80
 
               };
 
78
    enum State {
 
79
        UnknownState = 0, /**< The device is in an unknown state */
 
80
        Unmanaged = 10, /**< The device is recognized but not managed by NetworkManager */
 
81
        Unavailable = 20, /**< The device cannot be used (carrier off, rfkill, etc) */
 
82
        Disconnected = 30, /**< The device is not connected */
 
83
        Preparing = 40, /**< The device is preparing to connect */
 
84
        ConfiguringHardware = 50, /**< The device is being configured */
 
85
        NeedAuth = 60, /**< The device is awaiting secrets necessary to continue connection */
 
86
        ConfiguringIp = 70, /**< The IP settings of the device are being requested and configured */
 
87
        CheckingIp = 80, /**< The device's IP connectivity ability is being determined */
 
88
        WaitingForSecondaries = 90, /**< The device is waiting for secondary connections to be activated */
 
89
        Activated = 100, /**< The device is active */
 
90
        Deactivating = 110, /**< The device's network connection is being torn down */
 
91
        Failed = 120 /**< The device is in a failure state following an attempt to activate it */
 
92
    };
81
93
 
82
94
    /**
83
95
     * Enums describing the reason for a connection state change
102
114
                             Reserved = 65536
103
115
                           };
104
116
    /**
105
 
     * Possible Device capabilities
106
 
     * - IsManageable: denotes that the device can be controlled by this API
107
 
     * - SupportsCarrierDetect: the device informs us when it is plugged in to the medium
 
117
     * Possible device capabilities
108
118
     */
109
119
    enum Capability {
110
 
        IsManageable = 0x1,
111
 
        SupportsCarrierDetect = 0x2
 
120
        IsManageable = 0x1, /**< denotes that the device can be controlled by this API */
 
121
        SupportsCarrierDetect = 0x2 /**< the device informs us when it is plugged in to the medium */
112
122
    };
113
123
    Q_DECLARE_FLAGS(Capabilities, Capability)
114
124
 
115
125
    /**
116
 
     * Device medium types
117
 
     * - Ethernet: Ieee8023 wired ethernet
118
 
     * - Wifi:  the Ieee80211 family of wireless networks
119
 
     * - Bluetooth: network bluetooth device (usually a cell phone)
120
 
     * - Modem: POTS, GSM, CDMA or LTE modems
121
 
     * - OlpcMesh: OLPC Mesh networking device
122
 
     * - Wimax: WiMax WWAN technology
 
126
     * Device type
123
127
     */
124
128
    enum Type {
125
 
        UnknownType,
126
 
        Ethernet,
127
 
        Wifi,
128
 
        Unused1,
129
 
        Unused2,
130
 
        Bluetooth,
131
 
        OlpcMesh,
132
 
        Wimax,
133
 
        Modem,
134
 
        InfiniBand,
135
 
        Bond,
136
 
        Vlan,
137
 
        Adsl,
138
 
        Bridge
 
129
        UnknownType, /**< Unknown device type */
 
130
        Ethernet, /**< Ieee8023 wired ethernet */
 
131
        Wifi, /**< the Ieee80211 family of wireless networks */
 
132
        Unused1, /**< Currently unused */
 
133
        Unused2, /**< Currently unused */
 
134
        Bluetooth, /**< network bluetooth device (usually a cell phone) */
 
135
        OlpcMesh, /**< OLPC Mesh networking device */
 
136
        Wimax, /**< WiMax WWAN technology */
 
137
        Modem, /**< POTS, GSM, CDMA or LTE modems */
 
138
        InfiniBand, /**< Infiniband network device */
 
139
        Bond, /**< Bond virtual device */
 
140
        Vlan, /**< Vlan virtual device */
 
141
        Adsl, /**< ADSL modem device */
 
142
        Bridge /**< Bridge virtual device */
139
143
    };
140
144
    Q_DECLARE_FLAGS(Types, Type)
141
145
 
142
146
    /**
143
 
     * Creates a new NetworkInterface object.
 
147
     * Creates a new device object.
144
148
     *
145
149
     * @param path UNI of the device
146
150
     */
147
151
    explicit Device(const QString &path, QObject *parent = 0);
148
152
    Device(DevicePrivate &dd, QObject *parent);
149
153
    /**
150
 
     * Destroys a NetworkInterface object.
 
154
     * Destroys a device object.
151
155
     */
152
156
    virtual ~Device();
153
157
    /**
158
162
     */
159
163
    virtual Type type() const;
160
164
    /**
161
 
     * Retrieves the Unique Network Identifier (UNI) of the NetworkInterface.
 
165
     * Retrieves the Unique Network Identifier (UNI) of the device.
162
166
     * This identifier is unique for each network and network interface in the system.
163
167
     *
164
 
     * @returns the Unique Network Identifier of the current network
 
168
     * @returns the Unique Network Identifier of the current device
165
169
     */
166
170
    QString uni() const;
167
171
    /**
168
 
     * The current active connection for this interface.
 
172
     * The current active connection for this device
169
173
     *
170
174
     * @returns A valid ActiveConnection object or NULL if no active connection was found
171
175
     */
177
181
     */
178
182
    Connection::List availableConnections();
179
183
    /**
180
 
     * The system name for the network interface
 
184
     * The system name for the network device
181
185
     */
182
186
    QString interfaceName() const;
183
187
    /**