• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • tdecore
 

tdecore

  • tdecore
  • networkbackends
  • network-manager
network-manager.h
1 /* This file is part of the TDE libraries
2  Copyright (C) 2012 Timothy Pearson <kb9vqf@pearsoncomputing.net>
3 
4  This library is free software; you can redistribute it and/or
5  modify it under the terms of the GNU Library General Public
6  License version 2 as published by the Free Software Foundation.
7 
8  This library is distributed in the hope that it will be useful,
9  but WITHOUT ANY WARRANTY; without even the implied warranty of
10  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11  Library General Public License for more details.
12 
13  You should have received a copy of the GNU Library General Public License
14  along with this library; see the file COPYING.LIB. If not, write to
15  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
16  Boston, MA 02110-1301, USA.
17 */
18 #ifndef _TDENETWORKBACKEND_NETWORKMANAGER_H
19 #define _TDENETWORKBACKEND_NETWORKMANAGER_H
20 
21 #include "tdenetworkconnections.h"
22 
23 //====================================================================================================
24 // General NetworkManager DBUS service paths
25 //====================================================================================================
26 #define NM_DBUS_PATH "/org/freedesktop/NetworkManager"
27 #define NM_DBUS_PATH_SETTINGS "/org/freedesktop/NetworkManager/Settings"
28 #define NM_DBUS_PATH_SETTINGS_CONNECTION "/org/freedesktop/NetworkManager/Settings/Connection"
29 #define NM_VPN_DBUS_PLUGIN_PATH "/org/freedesktop/NetworkManager/VPN/Plugin"
30 
31 #define NM_DBUS_SERVICE "org.freedesktop.NetworkManager"
32 #define NM_DBUS_ACTIVE_CONNECTION_SERVICE "org.freedesktop.NetworkManager.Connection.Active"
33 #define NM_DBUS_DEVICE_SERVICE "org.freedesktop.NetworkManager.Device"
34 #define NM_DBUS_WIRED_DEVICE_SERVICE "org.freedesktop.NetworkManager.Device.Wired"
35 #define NM_DBUS_WIRELESS_DEVICE_SERVICE "org.freedesktop.NetworkManager.Device.Wireless"
36 #define NM_DBUS_SETTINGS_SERVICE "org.freedesktop.NetworkManager.Settings"
37 #define NM_DBUS_SETTINGS_CONNECTION_SERVICE "org.freedesktop.NetworkManager.Settings.Connection"
38 #define NM_VPN_DBUS_PLUGIN_SERVICE "org.freedesktop.NetworkManager.VPN.Plugin"
39 #define NM_VPN_DBUS_CONNECTION_SERVICE "org.freedesktop.NetworkManager.VPN.Connection"
40 //====================================================================================================
41 
42 //====================================================================================================
43 // These defines MUST be kept in sync with their respective introspection XML files
44 //====================================================================================================
45 #define NM_DEVICE_TYPE_UNKNOWN 0
46 #define NM_DEVICE_TYPE_ETHERNET 1
47 #define NM_DEVICE_TYPE_WIFI 2
48 #define NM_DEVICE_TYPE_UNUSED1 3
49 #define NM_DEVICE_TYPE_UNUSED2 4
50 #define NM_DEVICE_TYPE_BT 5
51 #define NM_DEVICE_TYPE_OLPC_MESH 6
52 #define NM_DEVICE_TYPE_WIMAX 7
53 #define NM_DEVICE_TYPE_MODEM 8
54 #define NM_DEVICE_TYPE_INFINIBAND 9
55 #define NM_DEVICE_TYPE_BOND 10
56 #define NM_DEVICE_TYPE_VLAN 11
57 #define NM_DEVICE_TYPE_ADSL 12
58 //====================================================================================================
59 #define NM_STATE_UNKNOWN 0
60 #define NM_STATE_ASLEEP 10
61 #define NM_STATE_DISCONNECTED 20
62 #define NM_STATE_DISCONNECTING 30
63 #define NM_STATE_CONNECTING 40
64 #define NM_STATE_CONNECTED_LOCAL 50
65 #define NM_STATE_CONNECTED_SITE 60
66 #define NM_STATE_CONNECTED_GLOBAL 70
67 //====================================================================================================
68 #define NM_DEVICE_STATE_UNKNOWN 0
69 #define NM_DEVICE_STATE_UNMANAGED 10
70 #define NM_DEVICE_STATE_UNAVAILABLE 20
71 #define NM_DEVICE_STATE_DISCONNECTED 30
72 #define NM_DEVICE_STATE_PREPARE 40
73 #define NM_DEVICE_STATE_CONFIG 50
74 #define NM_DEVICE_STATE_NEED_AUTH 60
75 #define NM_DEVICE_STATE_IP_CONFIG 70
76 #define NM_DEVICE_STATE_IP_CHECK 80
77 #define NM_DEVICE_STATE_SECONDARIES 90
78 #define NM_DEVICE_STATE_ACTIVATED 100
79 #define NM_DEVICE_STATE_DEACTIVATING 110
80 #define NM_DEVICE_STATE_FAILED 120
81 //====================================================================================================
82 #define NM_VPN_STATE_UNKNOWN 0
83 #define NM_VPN_STATE_PREPARE 1
84 #define NM_VPN_STATE_NEED_AUTH 2
85 #define NM_VPN_STATE_CONNECT 3
86 #define NM_VPN_STATE_IP_CONFIG_GET 4
87 #define NM_VPN_STATE_ACTIVATED 5
88 #define NM_VPN_STATE_FAILED 6
89 #define NM_VPN_STATE_DISCONNECTED 7
90 //====================================================================================================
91 #define NM_DEVICE_CAP_NONE 0
92 #define NM_DEVICE_CAP_NM_SUPPORTED 1
93 #define NM_DEVICE_CAP_CARRIER_DETECT 2
94 //====================================================================================================
95 #define NM_EAP_FAST_PROVISIONING_DISABLED 0
96 #define NM_EAP_FAST_PROVISIONING_UNAUTHONLY 1
97 #define NM_EAP_FAST_PROVISIONING_AUTHONLY 2
98 #define NM_EAP_FAST_PROVISIONING_BOTH 3
99 //====================================================================================================
100 #define NM_PASSWORD_SECRET_NONE 0
101 #define NM_PASSWORD_SECRET_AGENTOWNED 1
102 #define NM_PASSWORD_SECRET_NOTSAVED 2
103 #define NM_PASSWORD_SECRET_NOTREQUIRED 4
104 //====================================================================================================
105 #define NM_ACCESS_POINT_CAP_NONE 0x0
106 #define NM_ACCESS_POINT_CAP_PRIVACY 0x1
107 //====================================================================================================
108 #define NM_ACCESS_POINT_SEC_NONE 0x0
109 #define NM_ACCESS_POINT_SEC_PAIR_WEP40 0x1
110 #define NM_ACCESS_POINT_SEC_PAIR_WEP104 0x2
111 #define NM_ACCESS_POINT_SEC_PAIR_TKIP 0x4
112 #define NM_ACCESS_POINT_SEC_PAIR_CCMP 0x8
113 #define NM_ACCESS_POINT_SEC_GROUP_WEP40 0x10
114 #define NM_ACCESS_POINT_SEC_GROUP_WEP104 0x20
115 #define NM_ACCESS_POINT_SEC_GROUP_TKIP 0x40
116 #define NM_ACCESS_POINT_SEC_GROUP_CCMP 0x80
117 #define NM_ACCESS_POINT_SEC_KEY_MGMT_PSK 0x100
118 #define NM_ACCESS_POINT_SEC_KEY_MGMT_802_1X 0x200
119 //====================================================================================================
120 #define NM_WEP_TYPE_HEXADECIMAL 1
121 #define NM_WEP_TYPE_PASSPHRASE 2
122 //====================================================================================================
123 #define NM_VLAN_REORDER_PACKET_HEADERS 0x01
124 #define NM_VLAN_USE_GVRP 0x02
125 #define NM_VLAN_LOOSE_BINDING 0x04
126 //====================================================================================================
127 #define NM_GSM_3G_ALL -1
128 #define NM_GSM_3G_ONLY 0
129 #define NM_GSM_GPRS_EDGE_ONLY 1
130 #define NM_GSM_PREFER_3G 2
131 #define NM_GSM_PREFER_2G 3
132 //====================================================================================================
133 #define NM_802_11_MODE_UNKNOWN 0
134 #define NM_802_11_MODE_ADHOC 1
135 #define NM_802_11_MODE_INFRASTRUCTURE 2
136 //====================================================================================================
137 #define NM_802_11_DEVICE_CAP_NONE 0x0
138 #define NM_802_11_DEVICE_CAP_CIPHER_WEP40 0x1
139 #define NM_802_11_DEVICE_CAP_CIPHER_WEP104 0x2
140 #define NM_802_11_DEVICE_CAP_CIPHER_TKIP 0x4
141 #define NM_802_11_DEVICE_CAP_CIPHER_CCMP 0x8
142 #define NM_802_11_DEVICE_CAP_WPA 0x10
143 #define NM_802_11_DEVICE_CAP_RSN 0x20
144 //====================================================================================================
145 #define NM_PLUGIN_SERVICE_DIR "/etc/NetworkManager/VPN"
146 //====================================================================================================
147 
148 class TDENetworkConnectionManager_BackendNMPrivate;
149 
150 class TDECORE_EXPORT TDENetworkConnectionManager_BackendNM : public TDENetworkConnectionManager
151 {
152  Q_OBJECT
153 
154  public:
155  TDENetworkConnectionManager_BackendNM(TQString macAddress);
156  ~TDENetworkConnectionManager_BackendNM();
157 
158  virtual TQString backendName();
159  virtual TDENetworkDeviceType::TDENetworkDeviceType deviceType();
160  virtual TDENetworkGlobalManagerFlags::TDENetworkGlobalManagerFlags backendStatus();
161  virtual TDENetworkDeviceInformation deviceInformation();
162  virtual TDENetworkDeviceInformation deviceStatus();
163 
164  virtual void loadConnectionInformation();
165  virtual void loadConnectionAllowedValues(TDENetworkConnection* connection);
166  virtual bool loadConnectionSecrets(TQString uuid);
167  virtual bool saveConnection(TDENetworkConnection* connection);
168  virtual bool deleteConnection(TQString uuid);
169  virtual bool verifyConnectionSettings(TDENetworkConnection* connection, TDENetworkConnectionErrorFlags::TDENetworkConnectionErrorFlags* type=NULL, TDENetworkErrorStringMap* reason=NULL);
170 
171  virtual TDENetworkConnectionStatus::TDENetworkConnectionStatus initiateConnection(TQString uuid);
172  virtual TDENetworkConnectionStatus::TDENetworkConnectionStatus checkConnectionStatus(TQString uuid);
173  virtual TDENetworkConnectionStatus::TDENetworkConnectionStatus deactivateConnection(TQString uuid);
174  virtual TQStringList validSettings();
175 
176  virtual TDENetworkHWNeighborList* siteSurvey();
177  virtual TQStringList connectionPhysicalDeviceUUIDs(TQString uuid);
178  virtual TDENetworkVPNTypeList availableVPNTypes();
179 
180  virtual bool networkingEnabled();
181  virtual bool wiFiHardwareEnabled();
182 
183  virtual bool enableNetworking(bool enable);
184  virtual bool enableWiFi(bool enable);
185  virtual bool wiFiEnabled();
186 
187  virtual TQStringList defaultNetworkDevices();
188 
189  private:
190  TDENetworkDeviceType::TDENetworkDeviceType nmDeviceTypeToTDEDeviceType(TQ_UINT32 nmType);
191  TQString deviceInterfaceString(TQString macAddress);
192  bool loadConnectionSecretsForGroup(TQString uuid, TQString group);
193  TDENetworkWiFiAPInfo* getAccessPointDetails(TQString dbusPath);
194  TDENetworkConnectionType::TDENetworkConnectionType connectionType(TQString dbusPath);
195  TQCString getActiveConnectionPath(TQString uuid);
196 
197  private:
198  TDENetworkConnectionManager_BackendNMPrivate* d;
199  friend class TDENetworkConnectionManager_BackendNMPrivate;
200 };
201 
202 #endif // _TDENETWORKBACKEND_NETWORKMANAGER_H

tdecore

Skip menu "tdecore"
  • Main Page
  • Modules
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

tdecore

Skip menu "tdecore"
  • arts
  • dcop
  • dnssd
  • interfaces
  •   kspeech
  •     interface
  •     library
  •   tdetexteditor
  • kate
  • kded
  • kdoctools
  • kimgio
  • kjs
  • knewstuff
  • libtdemid
  • libtdescreensaver
  • tdeabc
  • tdecmshell
  • tdecore
  • tdefx
  • tdehtml
  • tdeinit
  • tdeio
  •   bookmarks
  •   httpfilter
  •   kpasswdserver
  •   kssl
  •   tdefile
  •   tdeio
  •   tdeioexec
  • tdeioslave
  •   http
  • tdemdi
  •   tdemdi
  • tdeparts
  • tdeprint
  • tderandr
  • tderesources
  • tdespell2
  • tdesu
  • tdeui
  • tdeunittest
  • tdeutils
  • tdewallet
Generated for tdecore by doxygen 1.8.3.1
This website is maintained by Timothy Pearson.