You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1596 lines
46 KiB
1596 lines
46 KiB
12 years ago
|
/* This file is part of the TDE libraries
|
||
|
Copyright (C) 2012 Timothy Pearson <kb9vqf@pearsoncomputing.net>
|
||
|
|
||
|
This library is free software; you can redistribute it and/or
|
||
|
modify it under the terms of the GNU Library General Public
|
||
|
License version 2 as published by the Free Software Foundation.
|
||
|
|
||
|
This library is distributed in the hope that it will be useful,
|
||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||
|
Library General Public License for more details.
|
||
|
|
||
|
You should have received a copy of the GNU Library General Public License
|
||
|
along with this library; see the file COPYING.LIB. If not, write to
|
||
|
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||
|
Boston, MA 02110-1301, USA.
|
||
|
*/
|
||
|
#ifndef _TDENETWORKCONNECTIONS_H
|
||
|
#define _TDENETWORKCONNECTIONS_H
|
||
|
|
||
|
// TDE includes
|
||
|
#include <tqobject.h>
|
||
|
#include <tqstring.h>
|
||
|
#include <tqptrlist.h>
|
||
12 years ago
|
#include <tqdatetime.h>
|
||
12 years ago
|
#include <tqstringlist.h>
|
||
12 years ago
|
#include <tqhostaddress.h>
|
||
12 years ago
|
#include "kiconloader.h"
|
||
|
#include "tdelibs_export.h"
|
||
|
|
||
|
#define CREATE_FLAG_BITWISE_MANIPULATION_FUNCTIONS(x) \
|
||
|
inline x operator|(x a, x b) \
|
||
|
{ \
|
||
|
return static_cast<x>(static_cast<int>(a) | static_cast<int>(b)); \
|
||
|
} \
|
||
|
\
|
||
|
inline x operator&(x a, x b) \
|
||
|
{ \
|
||
|
return static_cast<x>(static_cast<int>(a) & static_cast<int>(b)); \
|
||
|
} \
|
||
|
\
|
||
|
inline x operator~(x a) \
|
||
|
{ \
|
||
|
return static_cast<x>(~static_cast<int>(a)); \
|
||
12 years ago
|
} \
|
||
|
\
|
||
|
inline x &operator|=(x& a, const x& b) \
|
||
|
{ \
|
||
|
a = static_cast<x>(static_cast<int>(a) | static_cast<int>(b)); \
|
||
|
return a; \
|
||
|
} \
|
||
|
\
|
||
|
inline x &operator&=(x& a, const x& b) \
|
||
|
{ \
|
||
|
a = static_cast<x>(static_cast<int>(a) & static_cast<int>(b)); \
|
||
|
return a; \
|
||
12 years ago
|
}
|
||
|
|
||
12 years ago
|
class TDENetworkDevice;
|
||
|
|
||
12 years ago
|
typedef TQValueList<TQ_UINT8> TDENetworkByteList;
|
||
|
typedef TQValueList<TQHostAddress> TDENetworkAddressList;
|
||
12 years ago
|
typedef TQMap<TQString, TQString> TDENetworkSettingsMap;
|
||
12 years ago
|
typedef TQMap<TQ_UINT32, TQ_UINT32> TDENetworkPriorityMap;
|
||
12 years ago
|
|
||
|
namespace TDENetworkDeviceType {
|
||
|
enum TDENetworkDeviceType {
|
||
|
BackendOnly,
|
||
|
WiredEthernet,
|
||
|
WiFi,
|
||
|
Bluetooth,
|
||
|
OLPCMesh,
|
||
|
WiMax,
|
||
|
Modem,
|
||
|
Infiniband,
|
||
|
Bond,
|
||
|
VLAN,
|
||
|
ADSL,
|
||
|
Other,
|
||
|
Last = Other
|
||
|
};
|
||
|
};
|
||
12 years ago
|
|
||
12 years ago
|
namespace TDENetworkConnectionType {
|
||
12 years ago
|
enum TDENetworkConnectionType {
|
||
|
WiredEthernet,
|
||
|
WiFi,
|
||
|
Bluetooth,
|
||
|
OLPCMesh,
|
||
|
WiMax,
|
||
|
Modem,
|
||
|
Infiniband,
|
||
|
Bond,
|
||
|
VLAN,
|
||
|
ADSL,
|
||
12 years ago
|
VPN,
|
||
12 years ago
|
Other,
|
||
|
Last = Other
|
||
|
};
|
||
12 years ago
|
};
|
||
12 years ago
|
|
||
12 years ago
|
namespace TDENetworkConnectionErrorFlags {
|
||
|
enum TDENetworkConnectionErrorFlags {
|
||
|
NoError = 0x00000000,
|
||
|
InvalidConnectionSetting = 0x00000001,
|
||
|
InvalidIPv4Setting = 0x00000002,
|
||
|
InvalidIPv6Setting = 0x00000004,
|
||
|
InvalidEAPSetting = 0x00000008,
|
||
|
InvalidEAPKey = 0x00000010,
|
||
|
InvalidWirelessSetting = 0x00000020,
|
||
|
InvalidWirelessKey = 0x00000040
|
||
|
};
|
||
|
|
||
|
CREATE_FLAG_BITWISE_MANIPULATION_FUNCTIONS(TDENetworkConnectionErrorFlags)
|
||
|
};
|
||
|
|
||
|
typedef TQMap<TDENetworkConnectionErrorFlags::TDENetworkConnectionErrorFlags, TQString> TDENetworkErrorStringMap;
|
||
|
|
||
12 years ago
|
namespace TDENetworkInfinibandTransportMode {
|
||
|
enum TDENetworkInfinibandTransportMode {
|
||
|
Datagram,
|
||
|
Connected,
|
||
|
Other,
|
||
|
Last = Other
|
||
|
};
|
||
12 years ago
|
};
|
||
|
|
||
|
namespace TDEWiFiMode {
|
||
12 years ago
|
enum TDEWiFiMode {
|
||
|
AdHoc,
|
||
|
Infrastructure,
|
||
|
Other,
|
||
|
Last = Other
|
||
|
};
|
||
12 years ago
|
};
|
||
12 years ago
|
|
||
|
namespace TDEWiFiFrequencyBand {
|
||
|
enum TDEWiFiFrequencyBand {
|
||
|
None,
|
||
|
Band2_4GHz,
|
||
|
Band5GHz,
|
||
|
Other,
|
||
|
Last = Other
|
||
|
};
|
||
|
};
|
||
|
|
||
12 years ago
|
namespace TDEBluetoothConnectionType {
|
||
|
enum TDEBluetoothConnectionType {
|
||
|
DUN,
|
||
|
PAN,
|
||
|
Other,
|
||
|
Last = Other
|
||
|
};
|
||
|
};
|
||
|
|
||
12 years ago
|
namespace TDEModemConnectionType {
|
||
|
enum TDEModemConnectionType {
|
||
|
CDMA,
|
||
|
GSM,
|
||
|
Other,
|
||
|
Last = Other
|
||
|
};
|
||
|
};
|
||
|
|
||
|
namespace TDEGSMNetworkType {
|
||
|
enum TDEGSMNetworkType {
|
||
|
Any,
|
||
|
Only3G,
|
||
|
GPRSEdge,
|
||
|
Prefer3G,
|
||
|
Prefer2G,
|
||
|
Other,
|
||
|
Last = Other
|
||
|
};
|
||
|
};
|
||
|
|
||
12 years ago
|
namespace TDENetworkParity {
|
||
|
enum TDENetworkParity {
|
||
|
None,
|
||
|
Even,
|
||
|
Odd,
|
||
|
Other,
|
||
|
Last = Other
|
||
|
};
|
||
|
};
|
||
|
|
||
12 years ago
|
namespace TDENetworkSlaveDeviceType {
|
||
|
enum TDENetworkSlaveDeviceType {
|
||
|
None,
|
||
|
Bond,
|
||
|
Other,
|
||
|
Last = Other
|
||
|
};
|
||
12 years ago
|
};
|
||
|
|
||
12 years ago
|
namespace TDENetworkGlobalEventType {
|
||
|
enum TDENetworkGlobalEventType {
|
||
|
ConnectionListChanged,
|
||
|
Other,
|
||
|
Last = Other
|
||
|
};
|
||
|
};
|
||
|
|
||
12 years ago
|
namespace TDENetworkVPNEventType {
|
||
|
enum TDENetworkVPNEventType {
|
||
|
LoginBanner,
|
||
|
Failure,
|
||
|
Other,
|
||
|
Last = Other
|
||
|
};
|
||
|
};
|
||
|
|
||
12 years ago
|
namespace TDENetworkDeviceEventType {
|
||
|
enum TDENetworkDeviceEventType {
|
||
|
BitRateChanged,
|
||
12 years ago
|
Failure,
|
||
12 years ago
|
Other,
|
||
|
Last = Other
|
||
|
};
|
||
|
};
|
||
|
|
||
12 years ago
|
namespace TDENetworkAPEventType {
|
||
|
enum TDENetworkAPEventType {
|
||
|
Discovered,
|
||
|
Lost,
|
||
|
SignalStrengthChanged,
|
||
12 years ago
|
AccessPointChanged,
|
||
12 years ago
|
Other,
|
||
|
Last = Other
|
||
|
};
|
||
|
};
|
||
|
|
||
12 years ago
|
namespace TDENetworkGlobalManagerFlags {
|
||
|
enum TDENetworkGlobalManagerFlags {
|
||
|
Unknown = 0x00000000,
|
||
|
Disconnected = 0x00000001,
|
||
|
Connected = 0x00000002,
|
||
|
EstablishingLink = 0x00000004,
|
||
|
DeactivatingLink = 0x00000008,
|
||
|
LinkLocalAccess = 0x00000010,
|
||
|
SiteLocalAccess = 0x00000020,
|
||
|
GlobalAccess = 0x00000040,
|
||
|
Sleeping = 0x00000080,
|
||
12 years ago
|
BackendUnavailable = 0x00000100,
|
||
|
VPNUnknown = 0x00000200,
|
||
|
VPNEstablishingLink = 0x00000400,
|
||
|
VPNNeedAuthorization = 0x00000800,
|
||
|
VPNConfiguringProtocols = 0x00001000,
|
||
|
VPNVerifyingProtocols = 0x00002000,
|
||
|
VPNConnected = 0x00004000,
|
||
|
VPNFailed = 0x00008000,
|
||
|
VPNDisconnected = 0x00010000,
|
||
|
GlobalMask = 0x000001ff,
|
||
|
VPNMask = 0x0001fe00
|
||
12 years ago
|
};
|
||
|
|
||
|
CREATE_FLAG_BITWISE_MANIPULATION_FUNCTIONS(TDENetworkGlobalManagerFlags)
|
||
|
};
|
||
|
|
||
|
namespace TDENetworkDeviceCapabilityFlags {
|
||
|
enum TDENetworkDeviceCapabilityFlags {
|
||
|
None = 0x00000000,
|
||
|
Supported = 0x00000001,
|
||
|
CanDetectLink = 0x00000002
|
||
|
};
|
||
|
|
||
|
CREATE_FLAG_BITWISE_MANIPULATION_FUNCTIONS(TDENetworkDeviceCapabilityFlags)
|
||
|
};
|
||
|
|
||
12 years ago
|
namespace TDENetworkPPPFlags {
|
||
|
enum TDENetworkPPPFlags {
|
||
|
None = 0x00000000,
|
||
|
DisableEAP = 0x00000001,
|
||
|
DisablePAP = 0x00000002,
|
||
|
DisableCHAP = 0x00000004,
|
||
|
DisableMSCHAP = 0x00000008,
|
||
|
DisableMSCHAPv2 = 0x00000010,
|
||
|
AllowBSDCompression = 0x00000020,
|
||
|
AllowDeflateCompression = 0x00000040,
|
||
|
AllowVJCompression = 0x00000080,
|
||
|
RequireMPPE = 0x00000100,
|
||
|
RequireMPPE128 = 0x00000200,
|
||
|
StatefulMPPE = 0x00000400,
|
||
|
UseHardwareFlowControl = 0x00000800
|
||
|
};
|
||
|
|
||
|
CREATE_FLAG_BITWISE_MANIPULATION_FUNCTIONS(TDENetworkPPPFlags)
|
||
|
};
|
||
|
|
||
12 years ago
|
namespace TDENetworkWiFiAPFlags {
|
||
|
enum TDENetworkWiFiAPFlags {
|
||
|
None = 0x00000000,
|
||
|
PrivacySupport = 0x00000001,
|
||
|
PairWEP40 = 0x00000002,
|
||
|
PairWEP104 = 0x00000004,
|
||
|
PairTKIP = 0x00000008,
|
||
|
PairCCMP = 0x00000010,
|
||
|
GroupWEP40 = 0x00000020,
|
||
|
GroupWEP104 = 0x00000040,
|
||
|
GroupTKIP = 0x00000080,
|
||
|
GroupCCMP = 0x00000100,
|
||
|
KeyManagementPSK = 0x00000200,
|
||
12 years ago
|
KeyManagement80211 = 0x00000400,
|
||
|
GeneralFlagsMask = 0x00000001,
|
||
|
EncryptionFlagsMask = 0xfffffffe
|
||
12 years ago
|
};
|
||
|
|
||
|
CREATE_FLAG_BITWISE_MANIPULATION_FUNCTIONS(TDENetworkWiFiAPFlags)
|
||
|
};
|
||
|
|
||
|
namespace TDENetworkWiFiClientFlags {
|
||
|
enum TDENetworkWiFiClientFlags {
|
||
|
None = 0x00000000,
|
||
|
CipherWEP40 = 0x00000002,
|
||
|
CipherWEP104 = 0x00000004,
|
||
|
CipherTKIP = 0x00000008,
|
||
|
CipherCCMP = 0x00000010,
|
||
|
CipherWPA = 0x00000020,
|
||
|
CipherRSN = 0x00000040
|
||
|
};
|
||
|
|
||
|
CREATE_FLAG_BITWISE_MANIPULATION_FUNCTIONS(TDENetworkWiFiClientFlags)
|
||
|
};
|
||
|
|
||
12 years ago
|
namespace TDENetworkVPNType {
|
||
|
enum TDENetworkVPNType {
|
||
|
OpenVPN,
|
||
|
PPTP,
|
||
|
StrongSwan,
|
||
|
VPNC,
|
||
|
Other,
|
||
|
Last = Other
|
||
|
};
|
||
|
};
|
||
|
|
||
|
typedef TQValueList<TDENetworkVPNType::TDENetworkVPNType> TDENetworkVPNTypeList;
|
||
|
|
||
12 years ago
|
namespace TDENetworkWiFiConnectionCipher {
|
||
|
enum TDENetworkWiFiConnectionCipher {
|
||
|
None,
|
||
|
CipherWEP40,
|
||
|
CipherWEP104,
|
||
|
CipherTKIP,
|
||
|
CipherCCMP,
|
||
|
CipherWPA,
|
||
12 years ago
|
CipherRSN,
|
||
|
Any
|
||
12 years ago
|
};
|
||
|
};
|
||
|
|
||
12 years ago
|
typedef TQValueList<TDENetworkWiFiConnectionCipher::TDENetworkWiFiConnectionCipher> TDENetworkWiFiConnectionCipherList;
|
||
|
|
||
12 years ago
|
namespace TDENetworkWepKeyType {
|
||
|
enum TDENetworkWepKeyType {
|
||
|
Hexadecimal,
|
||
12 years ago
|
Ascii,
|
||
12 years ago
|
Passphrase
|
||
|
};
|
||
|
};
|
||
|
|
||
12 years ago
|
namespace TDENetworkVLANFlags {
|
||
|
enum TDENetworkVLANFlags {
|
||
|
None = 0x00000000,
|
||
|
ReorderPacketHeaders = 0x00000001,
|
||
|
UseGVRP = 0x00000002,
|
||
|
LooseBinding = 0x00000004
|
||
|
};
|
||
|
|
||
|
CREATE_FLAG_BITWISE_MANIPULATION_FUNCTIONS(TDENetworkVLANFlags)
|
||
|
};
|
||
|
|
||
12 years ago
|
namespace TDENetworkWiFiKeyType {
|
||
|
enum TDENetworkWiFiKeyType {
|
||
|
WEP,
|
||
|
DynamicWEP,
|
||
|
WPAAdHoc,
|
||
|
WPAInfrastructure,
|
||
|
WPAEnterprise,
|
||
|
Other,
|
||
|
Last = Other
|
||
|
};
|
||
|
};
|
||
|
|
||
|
namespace TDENetworkWiFiAuthType {
|
||
|
enum TDENetworkWiFiAuthType {
|
||
|
Open,
|
||
|
Shared,
|
||
|
LEAP,
|
||
|
Other,
|
||
|
Last = Other
|
||
|
};
|
||
|
};
|
||
|
|
||
12 years ago
|
namespace TDENetworkIEEE8021xType {
|
||
|
enum TDENetworkIEEE8021xType {
|
||
|
None,
|
||
|
LEAP,
|
||
|
MD5,
|
||
|
PAP,
|
||
|
CHAP,
|
||
|
MSCHAP,
|
||
|
MSCHAPV2,
|
||
|
Fast,
|
||
|
PSK,
|
||
|
PAX,
|
||
|
SAKE,
|
||
|
GPSK,
|
||
|
TLS,
|
||
|
PEAP,
|
||
|
TTLS,
|
||
|
SIM,
|
||
|
GTC,
|
||
|
OTP
|
||
|
};
|
||
|
};
|
||
|
|
||
12 years ago
|
typedef TQValueList<TDENetworkIEEE8021xType::TDENetworkIEEE8021xType> TDENetworkIEEE8021xTypeList;
|
||
|
|
||
12 years ago
|
namespace TDENetworkIEEE8021xFastFlags {
|
||
|
enum TDENetworkIEEE8021xFastFlags {
|
||
|
None = 0x00000000,
|
||
|
AllowUnauthenticated = 0x00000001,
|
||
|
AllowAuthenticated = 0x00000002
|
||
|
};
|
||
|
|
||
|
CREATE_FLAG_BITWISE_MANIPULATION_FUNCTIONS(TDENetworkIEEE8021xFastFlags)
|
||
|
};
|
||
|
|
||
12 years ago
|
namespace TDENetworkWiFiWPAVersionFlags {
|
||
|
enum TDENetworkWiFiWPAVersionFlags {
|
||
|
None = 0x00000000,
|
||
|
WPA = 0x00000001,
|
||
|
RSN = 0x00000002,
|
||
|
Any = 0x00000003
|
||
|
};
|
||
|
|
||
|
CREATE_FLAG_BITWISE_MANIPULATION_FUNCTIONS(TDENetworkWiFiWPAVersionFlags)
|
||
|
};
|
||
|
|
||
12 years ago
|
namespace TDENetworkPasswordHandlingFlags {
|
||
|
enum TDENetworkPasswordHandlingFlags {
|
||
|
None = 0x00000000,
|
||
|
NoSave = 0x00000001,
|
||
|
NoPrompt = 0x00000002,
|
||
|
ExternalStorage = 0x00000004
|
||
|
};
|
||
|
|
||
|
CREATE_FLAG_BITWISE_MANIPULATION_FUNCTIONS(TDENetworkPasswordHandlingFlags)
|
||
|
};
|
||
|
|
||
12 years ago
|
namespace TDENetworkConnectionStatus {
|
||
|
enum TDENetworkConnectionStatus {
|
||
12 years ago
|
None = 0x00000000,
|
||
|
Invalid = 0x00000001,
|
||
|
Disconnected = 0x00000002,
|
||
|
Connected = 0x00000004,
|
||
|
LinkUnavailable = 0x00000008,
|
||
|
EstablishingLink = 0x00000010,
|
||
|
DeactivatingLink = 0x00000020,
|
||
|
ConfiguringProtocols = 0x00000040,
|
||
|
Reconnecting = 0x00000080,
|
||
|
LinkLost = 0x00000100,
|
||
|
LinkLocalAccess = 0x00000200,
|
||
|
SiteLocalAccess = 0x00000400,
|
||
|
GlobalAccess = 0x00000800,
|
||
|
UnManaged = 0x00001000,
|
||
|
NeedAuthorization = 0x00002000,
|
||
|
Failed = 0x00004000,
|
||
|
VerifyingProtocols = 0x00008000,
|
||
|
DependencyWait = 0x00010000
|
||
12 years ago
|
};
|
||
|
|
||
|
CREATE_FLAG_BITWISE_MANIPULATION_FUNCTIONS(TDENetworkConnectionStatus)
|
||
|
};
|
||
|
|
||
|
namespace TDENetworkIPConfigurationFlags {
|
||
|
enum TDENetworkIPConfigurationFlags {
|
||
12 years ago
|
None = 0x00000000,
|
||
|
IPV4DHCPIP = 0x00000001,
|
||
|
IPV4DHCPDNS = 0x00000002,
|
||
|
IPV4DHCPRoutes = 0x00000004,
|
||
|
IPV4LocalOnly = 0x00000008,
|
||
|
IPV4StartConnectionSharingServer = 0x00000010,
|
||
|
IPV4Disabled = 0x00000020,
|
||
|
IPV4MayUseAsDefaultRoute = 0x00000040,
|
||
|
IPV6DHCPIP = 0x00000080,
|
||
|
IPV6DHCPDNS = 0x00000100,
|
||
|
IPV6DHCPRoutes = 0x00000200,
|
||
|
IPV6LocalOnly = 0x00000400,
|
||
|
IPV6StartConnectionSharingServer = 0x00000800,
|
||
|
IPV6Disabled = 0x00001000,
|
||
|
IPV6MayUseAsDefaultRoute = 0x00002000
|
||
12 years ago
|
};
|
||
|
|
||
|
CREATE_FLAG_BITWISE_MANIPULATION_FUNCTIONS(TDENetworkIPConfigurationFlags)
|
||
|
};
|
||
|
|
||
12 years ago
|
class TDECORE_EXPORT TDENetworkSearchDomain
|
||
|
{
|
||
|
public:
|
||
|
TDENetworkSearchDomain();
|
||
|
TDENetworkSearchDomain(TQString domain, bool ipv6=false);
|
||
|
~TDENetworkSearchDomain();
|
||
|
|
||
|
TQString searchDomain();
|
||
|
void setSearchDomain(TQString domain, bool ipv6=false);
|
||
|
|
||
|
bool isIPv4();
|
||
|
bool isIPv6();
|
||
|
|
||
|
private:
|
||
|
TQString m_domain;
|
||
|
bool m_isIPV6;
|
||
|
};
|
||
|
|
||
|
typedef TQValueList<TDENetworkSearchDomain> TDENetworkSearchDomainList;
|
||
|
|
||
|
class TDECORE_EXPORT TDENetMask
|
||
|
{
|
||
|
public:
|
||
|
TDENetMask();
|
||
|
TDENetMask(TQ_UINT32 netmask);
|
||
|
TDENetMask(TQ_UINT8* netmask);
|
||
|
~TDENetMask();
|
||
|
|
||
|
void fromCIDRMask(unsigned char mask, bool ipv6=false);
|
||
|
unsigned char toCIDRMask();
|
||
|
void fromString(TQString mask);
|
||
|
TQString toString();
|
||
|
|
||
|
bool isIPv4();
|
||
|
bool isIPv6();
|
||
|
|
||
|
private:
|
||
|
TQ_UINT32 m_ipv4NetMask;
|
||
|
TQHostAddress m_ipv6NetMask;
|
||
|
bool m_isIPV6;
|
||
|
};
|
||
|
|
||
|
class TDECORE_EXPORT TDEMACAddress
|
||
|
{
|
||
|
public:
|
||
|
TDEMACAddress();
|
||
|
TDEMACAddress(TDENetworkByteList address);
|
||
|
~TDEMACAddress();
|
||
|
|
||
|
TDENetworkByteList address();
|
||
|
void setAddress(TDENetworkByteList address);
|
||
|
TQString toString();
|
||
|
void fromString(TQString address);
|
||
|
bool isValid();
|
||
|
|
||
|
private:
|
||
|
bool m_isValid;
|
||
|
TDENetworkByteList m_macAddress;
|
||
|
|
||
|
friend bool operator==(const TDEMACAddress &a1, const TDEMACAddress &a2);
|
||
12 years ago
|
friend bool operator<(const TDEMACAddress &a1, const TDEMACAddress &a2);
|
||
12 years ago
|
};
|
||
|
|
||
12 years ago
|
TDECORE_EXPORT bool operator==(const TDEMACAddress &a1, const TDEMACAddress &a2);
|
||
12 years ago
|
TDECORE_EXPORT bool operator<(const TDEMACAddress &a1, const TDEMACAddress &a2);
|
||
12 years ago
|
|
||
12 years ago
|
typedef TQValueList<TDEMACAddress> TDEMACAddressList;
|
||
|
|
||
12 years ago
|
class TDECORE_EXPORT TDENetworkSingleIPConfiguration
|
||
|
{
|
||
|
public:
|
||
|
TDENetworkSingleIPConfiguration();
|
||
|
~TDENetworkSingleIPConfiguration();
|
||
|
|
||
|
bool isIPv4();
|
||
|
bool isIPv6();
|
||
|
|
||
|
public:
|
||
|
bool valid;
|
||
|
TQHostAddress ipAddress;
|
||
|
TDENetMask networkMask;
|
||
|
TQHostAddress gateway;
|
||
|
};
|
||
|
|
||
|
typedef TQValueList<TDENetworkSingleIPConfiguration> TDENetworkSingleIPConfigurationList;
|
||
|
|
||
|
class TDECORE_EXPORT TDENetworkSingleRouteConfiguration
|
||
|
{
|
||
|
public:
|
||
|
TDENetworkSingleRouteConfiguration();
|
||
|
~TDENetworkSingleRouteConfiguration();
|
||
|
|
||
|
bool isIPv4();
|
||
|
bool isIPv6();
|
||
|
|
||
|
public:
|
||
|
bool valid;
|
||
|
TQHostAddress ipAddress;
|
||
|
TDENetMask networkMask;
|
||
|
TQHostAddress gateway;
|
||
|
TQ_UINT32 metric;
|
||
|
};
|
||
|
|
||
|
typedef TQValueList<TDENetworkSingleRouteConfiguration> TDENetworkSingleRouteConfigurationList;
|
||
|
|
||
12 years ago
|
class TDECORE_EXPORT TDENetworkIEEE8021xConfiguration
|
||
12 years ago
|
{
|
||
|
public:
|
||
|
TDENetworkIEEE8021xConfiguration();
|
||
|
~TDENetworkIEEE8021xConfiguration();
|
||
|
|
||
|
public:
|
||
|
bool valid;
|
||
12 years ago
|
bool allowedValid;
|
||
12 years ago
|
bool secretsValid;
|
||
|
TDENetworkIEEE8021xType::TDENetworkIEEE8021xType type;
|
||
|
TQString userName;
|
||
|
TQString anonymousUserName;
|
||
|
TQString pacFileName;
|
||
|
TQByteArray caCertificate;
|
||
|
TQString additionalCAFilesPath;
|
||
|
TQString authServerCertSubjectMatch;
|
||
|
TQStringList alternateAuthServerCertSubjectMatch;
|
||
|
TQByteArray clientCertificate;
|
||
|
TQString forcePEAPVersion;
|
||
|
TQString forcePEAPLabel;
|
||
|
TDENetworkIEEE8021xFastFlags::TDENetworkIEEE8021xFastFlags fastProvisioningFlags;
|
||
12 years ago
|
TDENetworkIEEE8021xType::TDENetworkIEEE8021xType phase2NonEAPAuthMethod;
|
||
|
TDENetworkIEEE8021xType::TDENetworkIEEE8021xType phase2EAPAuthMethod;
|
||
|
TDENetworkIEEE8021xTypeList allowedPhase2NonEAPMethods;
|
||
|
TDENetworkIEEE8021xTypeList allowedPhase2EAPMethods;
|
||
12 years ago
|
TQByteArray phase2CaCertificate;
|
||
|
TQString phase2CaFilesPath;
|
||
|
TQString phase2AuthServerCertSubjectMatch;
|
||
|
TQStringList phase2AlternateAuthServerCertSubjectMatch;
|
||
|
TQByteArray phase2ClientCertificate;
|
||
|
TQString password;
|
||
|
TDENetworkPasswordHandlingFlags::TDENetworkPasswordHandlingFlags passwordFlags;
|
||
|
TQByteArray binaryPassword;
|
||
|
TDENetworkPasswordHandlingFlags::TDENetworkPasswordHandlingFlags binaryPasswordFlags;
|
||
|
TQByteArray privateKey;
|
||
|
TQString privateKeyPassword;
|
||
|
TDENetworkPasswordHandlingFlags::TDENetworkPasswordHandlingFlags privateKeyPasswordFlags;
|
||
|
TQByteArray phase2PrivateKey;
|
||
|
TQString phase2PrivateKeyPassword;
|
||
|
TDENetworkPasswordHandlingFlags::TDENetworkPasswordHandlingFlags phase2PrivateKeyPasswordFlags;
|
||
|
bool forceSystemCaCertificates;
|
||
|
};
|
||
|
|
||
12 years ago
|
class TDECORE_EXPORT TDENetworkPPPConfiguration
|
||
|
{
|
||
|
public:
|
||
|
TDENetworkPPPConfiguration();
|
||
|
virtual ~TDENetworkPPPConfiguration();
|
||
|
|
||
|
public:
|
||
|
bool valid;
|
||
|
bool requireServerAuthentication;
|
||
|
TDENetworkPPPFlags::TDENetworkPPPFlags flags;
|
||
|
TQ_UINT32 baudRate;
|
||
|
TQ_UINT32 mru;
|
||
|
TQ_UINT32 mtu;
|
||
|
TQ_UINT32 lcpEchoPingInterval;
|
||
|
TQ_UINT32 lcpEchoFailureThreshold;
|
||
|
};
|
||
|
|
||
|
class TDECORE_EXPORT TDENetworkPPPOEConfiguration
|
||
|
{
|
||
|
public:
|
||
|
TDENetworkPPPOEConfiguration();
|
||
|
virtual ~TDENetworkPPPOEConfiguration();
|
||
|
|
||
|
public:
|
||
|
bool valid;
|
||
|
bool secretsValid;
|
||
|
TQString networkServiceProvider;
|
||
|
TQString username;
|
||
|
TQString password;
|
||
|
TDENetworkPasswordHandlingFlags::TDENetworkPasswordHandlingFlags passwordFlags;
|
||
|
};
|
||
|
|
||
|
class TDECORE_EXPORT TDENetworkSerialConfiguration
|
||
|
{
|
||
|
public:
|
||
|
TDENetworkSerialConfiguration();
|
||
|
virtual ~TDENetworkSerialConfiguration();
|
||
|
|
||
|
public:
|
||
|
bool valid;
|
||
|
TQ_UINT32 baudRate;
|
||
|
TQ_UINT32 byteWidth;
|
||
|
TDENetworkParity::TDENetworkParity parity;
|
||
|
TQ_UINT32 stopBits;
|
||
|
TQ_UINT64 txDelay;
|
||
|
};
|
||
|
|
||
12 years ago
|
class TDECORE_EXPORT TDENetworkCDMAConfiguration
|
||
|
{
|
||
|
public:
|
||
|
TDENetworkCDMAConfiguration();
|
||
|
virtual ~TDENetworkCDMAConfiguration();
|
||
|
|
||
|
public:
|
||
|
bool valid;
|
||
|
bool secretsValid;
|
||
|
TQString providerDataNumber;
|
||
|
TQString username;
|
||
|
TQString password;
|
||
|
TDENetworkPasswordHandlingFlags::TDENetworkPasswordHandlingFlags passwordFlags;
|
||
|
};
|
||
|
|
||
|
class TDECORE_EXPORT TDENetworkGSMConfiguration
|
||
|
{
|
||
|
public:
|
||
|
TDENetworkGSMConfiguration();
|
||
|
virtual ~TDENetworkGSMConfiguration();
|
||
|
|
||
|
public:
|
||
|
bool valid;
|
||
|
bool secretsValid;
|
||
|
TQString providerDataNumber;
|
||
|
TQString username;
|
||
|
TQString password;
|
||
|
TDENetworkPasswordHandlingFlags::TDENetworkPasswordHandlingFlags passwordFlags;
|
||
|
TQString accessPointName;
|
||
|
TQString networkID;
|
||
|
TDEGSMNetworkType::TDEGSMNetworkType networkType;
|
||
|
TQString pin;
|
||
|
TDENetworkPasswordHandlingFlags::TDENetworkPasswordHandlingFlags pinFlags;
|
||
|
TQ_UINT32 allowedFrequencyBands;
|
||
|
bool allowRoaming;
|
||
|
};
|
||
|
|
||
|
|
||
12 years ago
|
class TDENetworkWiFiSecurityConfiguration
|
||
|
{
|
||
|
public:
|
||
|
TDENetworkWiFiSecurityConfiguration();
|
||
|
~TDENetworkWiFiSecurityConfiguration();
|
||
|
|
||
|
public:
|
||
|
bool valid;
|
||
|
bool secretsValid;
|
||
|
TDENetworkWiFiKeyType::TDENetworkWiFiKeyType keyType;
|
||
|
TDENetworkWiFiAuthType::TDENetworkWiFiAuthType authType;
|
||
12 years ago
|
TDENetworkWiFiWPAVersionFlags::TDENetworkWiFiWPAVersionFlags wpaVersion;
|
||
12 years ago
|
TDENetworkWiFiConnectionCipher::TDENetworkWiFiConnectionCipher cipher;
|
||
|
TQString wepKey0;
|
||
|
TQString wepKey1;
|
||
|
TQString wepKey2;
|
||
|
TQString wepKey3;
|
||
|
TDENetworkPasswordHandlingFlags::TDENetworkPasswordHandlingFlags wepKeyFlags;
|
||
|
TQ_UINT32 wepKeyIndex;
|
||
|
TDENetworkWepKeyType::TDENetworkWepKeyType wepKeyType;
|
||
|
TDENetworkWiFiConnectionCipherList allowedPairWiseCiphers;
|
||
|
TDENetworkWiFiConnectionCipherList allowedGroupWiseCiphers;
|
||
|
TQString psk;
|
||
|
TDENetworkPasswordHandlingFlags::TDENetworkPasswordHandlingFlags pskFlags;
|
||
|
TQString leapUsername;
|
||
|
TQString leapPassword;
|
||
|
TDENetworkPasswordHandlingFlags::TDENetworkPasswordHandlingFlags leapPasswordFlags;
|
||
|
};
|
||
|
|
||
12 years ago
|
class TDECORE_EXPORT TDENetworkIPConfiguration
|
||
|
{
|
||
|
public:
|
||
|
TDENetworkIPConfiguration();
|
||
|
~TDENetworkIPConfiguration();
|
||
|
|
||
|
public:
|
||
|
bool valid;
|
||
|
TDENetworkIPConfigurationFlags::TDENetworkIPConfigurationFlags connectionFlags;
|
||
12 years ago
|
TDENetworkSingleIPConfigurationList ipConfigurations;
|
||
|
TDENetworkSingleRouteConfigurationList routeConfigurations;
|
||
|
TQHostAddress broadcast;
|
||
|
TQHostAddress destination;
|
||
|
TDENetworkAddressList resolvers;
|
||
|
TDENetworkSearchDomainList searchDomains;
|
||
|
TQString dhcpClientIdentifier;
|
||
12 years ago
|
};
|
||
|
|
||
|
class TDECORE_EXPORT TDENetworkWiFiDeviceInfo
|
||
|
{
|
||
|
public:
|
||
|
TDENetworkWiFiDeviceInfo();
|
||
|
~TDENetworkWiFiDeviceInfo();
|
||
|
|
||
|
public:
|
||
|
bool valid;
|
||
12 years ago
|
TDEMACAddress hwAddress;
|
||
|
TDEMACAddress permanentHWAddress;
|
||
12 years ago
|
TDEWiFiMode::TDEWiFiMode operatingMode;
|
||
|
unsigned int bitrate;
|
||
12 years ago
|
TDEMACAddress activeAccessPointBSSID;
|
||
12 years ago
|
TDENetworkWiFiClientFlags::TDENetworkWiFiClientFlags wirelessFlags;
|
||
|
};
|
||
|
|
||
|
class TDECORE_EXPORT TDENetworkDeviceInformation
|
||
|
{
|
||
|
public:
|
||
|
TDENetworkDeviceInformation();
|
||
|
~TDENetworkDeviceInformation();
|
||
|
|
||
|
public:
|
||
|
bool valid;
|
||
|
TDENetworkConnectionStatus::TDENetworkConnectionStatus statusFlags;
|
||
|
TQString UUID;
|
||
|
TQString backendDriver;
|
||
|
TQString backendDriverVersion;
|
||
|
TQString firmwareVersion;
|
||
|
TDENetworkDeviceCapabilityFlags::TDENetworkDeviceCapabilityFlags capabilityFlags;
|
||
|
TDENetworkIPConfiguration ipConfiguration;
|
||
|
bool managed;
|
||
|
bool autoConnect;
|
||
|
bool firmwareMissing;
|
||
12 years ago
|
TDENetworkDeviceType::TDENetworkDeviceType deviceType;
|
||
12 years ago
|
TQString activeConnectionUUID;
|
||
12 years ago
|
TDENetworkWiFiDeviceInfo wiFiInfo;
|
||
12 years ago
|
};
|
||
|
|
||
|
class TDECORE_EXPORT TDENetworkHWNeighbor
|
||
|
{
|
||
|
public:
|
||
|
TDENetworkHWNeighbor();
|
||
12 years ago
|
virtual ~TDENetworkHWNeighbor();
|
||
12 years ago
|
|
||
|
public:
|
||
|
bool valid;
|
||
|
};
|
||
|
|
||
|
class TDECORE_EXPORT TDENetworkWiFiAPInfo : public TDENetworkHWNeighbor
|
||
|
{
|
||
|
public:
|
||
|
TDENetworkWiFiAPInfo();
|
||
12 years ago
|
virtual ~TDENetworkWiFiAPInfo();
|
||
12 years ago
|
|
||
12 years ago
|
public:
|
||
12 years ago
|
TQString friendlySSID() const;
|
||
12 years ago
|
|
||
12 years ago
|
public:
|
||
12 years ago
|
TQByteArray SSID;
|
||
|
TDENetworkWiFiAPFlags::TDENetworkWiFiAPFlags wpaFlags;
|
||
|
TDENetworkWiFiAPFlags::TDENetworkWiFiAPFlags rsnFlags;
|
||
12 years ago
|
unsigned int frequency;
|
||
12 years ago
|
TDEMACAddress BSSID;
|
||
12 years ago
|
unsigned int maxBitrate;
|
||
|
double signalQuality;
|
||
|
};
|
||
|
|
||
|
typedef TQPtrList< TDENetworkHWNeighbor > TDENetworkHWNeighborList;
|
||
|
|
||
12 years ago
|
class TDECORE_EXPORT TDENetworkConnection
|
||
12 years ago
|
{
|
||
|
public:
|
||
|
TDENetworkConnection();
|
||
12 years ago
|
virtual ~TDENetworkConnection();
|
||
12 years ago
|
|
||
12 years ago
|
public:
|
||
|
TDENetworkConnectionType::TDENetworkConnectionType type();
|
||
|
|
||
12 years ago
|
public:
|
||
|
TQString UUID;
|
||
|
TQString friendlyName;
|
||
|
TDENetworkIPConfiguration ipConfig;
|
||
12 years ago
|
TDEMACAddress lockedHWAddress;
|
||
|
TDEMACAddress manualHWAddress;
|
||
12 years ago
|
bool readOnly;
|
||
12 years ago
|
bool autoConnect;
|
||
12 years ago
|
bool fullDuplex;
|
||
|
bool requireIPV4;
|
||
|
bool requireIPV6;
|
||
|
TQ_UINT32 mtu;
|
||
|
TDENetworkIEEE8021xConfiguration eapConfig;
|
||
12 years ago
|
TDENetworkPPPConfiguration pppConfig;
|
||
|
TDENetworkPPPOEConfiguration pppoeConfig;
|
||
|
TDENetworkSerialConfiguration serialConfig;
|
||
12 years ago
|
TQStringList authorizedUsers;
|
||
|
TQString masterConnectionUUID;
|
||
|
TDENetworkSlaveDeviceType::TDENetworkSlaveDeviceType slaveType;
|
||
|
TQDateTime lastKnownConnection;
|
||
12 years ago
|
};
|
||
|
|
||
12 years ago
|
class TDECORE_EXPORT TDEWiredEthernetConnection : public TDENetworkConnection
|
||
12 years ago
|
{
|
||
12 years ago
|
public:
|
||
|
TDEWiredEthernetConnection();
|
||
|
virtual ~TDEWiredEthernetConnection();
|
||
|
};
|
||
12 years ago
|
|
||
12 years ago
|
class TDECORE_EXPORT TDEWiFiConnection : public TDENetworkConnection
|
||
|
{
|
||
12 years ago
|
public:
|
||
|
TDEWiFiConnection();
|
||
12 years ago
|
virtual ~TDEWiFiConnection();
|
||
12 years ago
|
|
||
|
public:
|
||
12 years ago
|
TQByteArray SSID;
|
||
12 years ago
|
TDEWiFiMode::TDEWiFiMode operatingMode;
|
||
|
TDEWiFiFrequencyBand::TDEWiFiFrequencyBand bandRestriction;
|
||
|
TQ_INT32 channelRestriction;
|
||
|
TQ_INT32 bitRateRestriction;
|
||
|
TQ_INT32 powerRestriction;
|
||
|
TDEMACAddress accessPointRestriction;
|
||
|
TDEMACAddressList blacklistedBSSIDs;
|
||
|
TDEMACAddressList heardBSSIDs;
|
||
|
bool isHiddenNetwork;
|
||
|
bool securityRequired;
|
||
|
TDENetworkWiFiSecurityConfiguration securitySettings;
|
||
|
};
|
||
|
|
||
|
class TDECORE_EXPORT TDEWiredInfinibandConnection : public TDENetworkConnection
|
||
|
{
|
||
|
public:
|
||
|
TDEWiredInfinibandConnection();
|
||
|
virtual ~TDEWiredInfinibandConnection();
|
||
|
|
||
|
public:
|
||
|
TDENetworkInfinibandTransportMode::TDENetworkInfinibandTransportMode transportMode;
|
||
12 years ago
|
};
|
||
|
|
||
12 years ago
|
class TDECORE_EXPORT TDEVPNConnection : public TDENetworkConnection
|
||
|
{
|
||
|
public:
|
||
|
TDEVPNConnection();
|
||
|
virtual ~TDEVPNConnection();
|
||
|
|
||
|
public:
|
||
|
TQString vpnPluginID;
|
||
|
TQString lockedUserName;
|
||
|
TDENetworkSettingsMap pluginData;
|
||
|
bool secretsValid;
|
||
|
TDENetworkSettingsMap pluginSecrets;
|
||
|
};
|
||
|
|
||
|
class TDECORE_EXPORT TDEWiMaxConnection : public TDENetworkConnection
|
||
|
{
|
||
|
public:
|
||
|
TDEWiMaxConnection();
|
||
|
virtual ~TDEWiMaxConnection();
|
||
|
|
||
|
public:
|
||
|
TQString networkServiceProvider;
|
||
|
};
|
||
|
|
||
12 years ago
|
class TDECORE_EXPORT TDEVLANConnection : public TDENetworkConnection
|
||
|
{
|
||
|
public:
|
||
|
TDEVLANConnection();
|
||
|
virtual ~TDEVLANConnection();
|
||
|
|
||
|
public:
|
||
|
TQString kernelName;
|
||
|
TQString parentConnectionUUID;
|
||
|
TQ_UINT32 vlanID;
|
||
|
TDENetworkVLANFlags::TDENetworkVLANFlags vlanFlags;
|
||
|
TDENetworkPriorityMap ingressPriorityMap;
|
||
|
TDENetworkPriorityMap egressPriorityMap;
|
||
|
};
|
||
|
|
||
12 years ago
|
class TDECORE_EXPORT TDEOLPCMeshConnection : public TDENetworkConnection
|
||
|
{
|
||
|
public:
|
||
|
TDEOLPCMeshConnection();
|
||
|
virtual ~TDEOLPCMeshConnection();
|
||
|
|
||
|
public:
|
||
|
TQByteArray SSID;
|
||
|
TQ_INT32 channel;
|
||
|
TQByteArray anycastDHCPHWAddress;
|
||
|
};
|
||
|
|
||
|
class TDECORE_EXPORT TDEBluetoothConnection : public TDENetworkConnection
|
||
|
{
|
||
|
public:
|
||
|
TDEBluetoothConnection();
|
||
|
virtual ~TDEBluetoothConnection();
|
||
|
|
||
|
public:
|
||
|
TDEBluetoothConnectionType::TDEBluetoothConnectionType type;
|
||
|
};
|
||
|
|
||
12 years ago
|
class TDECORE_EXPORT TDEModemConnection : public TDENetworkConnection
|
||
|
{
|
||
|
public:
|
||
|
TDEModemConnection();
|
||
|
virtual ~TDEModemConnection();
|
||
|
|
||
|
public:
|
||
|
TDEModemConnectionType::TDEModemConnectionType type;
|
||
|
TDENetworkCDMAConfiguration cdmaConfig;
|
||
|
TDENetworkGSMConfiguration gsmConfig;
|
||
|
};
|
||
|
|
||
12 years ago
|
typedef TQPtrList< TDENetworkConnection > TDENetworkConnectionList;
|
||
|
|
||
12 years ago
|
/**
|
||
|
* INTERNAL CLASS
|
||
|
*/
|
||
|
class TDENetworkEventQueueEvent_Private
|
||
|
{
|
||
|
public:
|
||
|
int eventType;
|
||
|
TDENetworkGlobalManagerFlags::TDENetworkGlobalManagerFlags newState;
|
||
|
TDENetworkGlobalManagerFlags::TDENetworkGlobalManagerFlags previousState;
|
||
|
TDENetworkConnectionStatus::TDENetworkConnectionStatus newConnStatus;
|
||
|
TDENetworkConnectionStatus::TDENetworkConnectionStatus previousConnStatus;
|
||
|
TDEMACAddress BSSID;
|
||
|
TQString message;
|
||
|
TQString hwAddress;
|
||
|
TDENetworkAPEventType::TDENetworkAPEventType apevent;
|
||
|
TDENetworkDeviceEventType::TDENetworkDeviceEventType ndevent;
|
||
|
TDENetworkVPNEventType::TDENetworkVPNEventType vpnevent;
|
||
|
TDENetworkGlobalEventType::TDENetworkGlobalEventType globalevent;
|
||
|
};
|
||
|
typedef TQValueList<TDENetworkEventQueueEvent_Private> TDENetworkEventQueueEvent_PrivateList;
|
||
|
|
||
|
class TQTimer;
|
||
|
|
||
12 years ago
|
class TDECORE_EXPORT TDENetworkConnectionManager : public TQObject
|
||
|
{
|
||
|
Q_OBJECT
|
||
|
|
||
|
public:
|
||
|
/**
|
||
|
* Constructor.
|
||
|
* @param macAddress The MAC address of the hardware device
|
||
12 years ago
|
* If an empty MAC address is passed, this object will make global networking backend
|
||
12 years ago
|
* methods available exclusively (TDENetworkDeviceType::BackendOnly).
|
||
12 years ago
|
*/
|
||
|
TDENetworkConnectionManager(TQString macAddress);
|
||
|
|
||
|
/**
|
||
|
* Destructor.
|
||
|
*/
|
||
|
~TDENetworkConnectionManager();
|
||
|
|
||
|
/**
|
||
12 years ago
|
* @return a TQString containing the name of the backend in use
|
||
12 years ago
|
*/
|
||
12 years ago
|
virtual TQString backendName() = 0;
|
||
12 years ago
|
|
||
|
/**
|
||
|
* @return the type of connection supported by this device
|
||
|
*/
|
||
12 years ago
|
virtual TDENetworkDeviceType::TDENetworkDeviceType deviceType() = 0;
|
||
12 years ago
|
|
||
|
/**
|
||
|
* @return A TDENetworkGlobalManagerFlags enum value with the current status of the networking backend.
|
||
|
*/
|
||
|
virtual TDENetworkGlobalManagerFlags::TDENetworkGlobalManagerFlags backendStatus() = 0;
|
||
|
|
||
|
/**
|
||
12 years ago
|
* @return A TDENetworkDeviceInformation object containing the current configuration and status of the network device.
|
||
12 years ago
|
*/
|
||
|
virtual TDENetworkDeviceInformation deviceInformation() = 0;
|
||
|
|
||
12 years ago
|
/**
|
||
|
* @return A TDENetworkDeviceInformation object containing a (limited) current status of the network device.
|
||
|
* Only the following object fields are populated:
|
||
|
* statusFlags
|
||
|
* UUID
|
||
|
* activeConnectionUUID
|
||
|
* valid
|
||
|
*/
|
||
|
virtual TDENetworkDeviceInformation deviceStatus() = 0;
|
||
|
|
||
12 years ago
|
/**
|
||
|
* Loads all connection information from the configuration backend
|
||
12 years ago
|
* Secret information must be loaded separately via a call to
|
||
|
* loadConnectionSecrets(TQString uuid) after this method has been
|
||
|
* executed at least once.
|
||
12 years ago
|
*/
|
||
|
virtual void loadConnectionInformation() = 0;
|
||
|
|
||
12 years ago
|
/**
|
||
|
* @param connection a pointer to a TDENetworkConnection object containing a
|
||
|
* connection in which to load the values allowed by the backend.
|
||
|
* This is normally called as part of loadConnectionInformation(), but should
|
||
|
* manually be called immediately after creation of a new TDENetworkConnection object.
|
||
|
*/
|
||
|
virtual void loadConnectionAllowedValues(TDENetworkConnection* connection) = 0;
|
||
|
|
||
12 years ago
|
/**
|
||
12 years ago
|
* @param uuid a TQString conntaining the UUID of a connection for which to
|
||
|
* load secrets from the configuration backend.
|
||
|
* @return true on success, false on failure.
|
||
|
*/
|
||
|
virtual bool loadConnectionSecrets(TQString uuid) = 0;
|
||
|
|
||
|
/**
|
||
|
* @param connection a pointer to a TDENetworkConnection object containing a
|
||
12 years ago
|
* connection to save to the configuration backend.
|
||
|
* @return true on success, false on failure.
|
||
|
*/
|
||
12 years ago
|
virtual bool saveConnection(TDENetworkConnection* connection) = 0;
|
||
12 years ago
|
|
||
|
/**
|
||
|
* @param uuid a TQString conntaining the UUID of a connection to
|
||
|
* delete from the configuration backend.
|
||
|
* @return true on success, false on failure.
|
||
|
*/
|
||
|
virtual bool deleteConnection(TQString uuid) = 0;
|
||
|
|
||
12 years ago
|
/**
|
||
|
* @param connection a pointer to a TDENetworkConnection object containing a
|
||
|
* connection for which to verify integrity of all settings.
|
||
12 years ago
|
* @param type a pointer to an TDENetworkConnectionErrorFlags::TDENetworkConnectionErrorFlags
|
||
|
* which will be filled with the generic error type code if provided.
|
||
|
* @param reason a pointer to a TDENetworkErrorStringMap which will be filled with translated
|
||
|
* strings containing the reason for the failure if provided.
|
||
12 years ago
|
* @return true on success, false if invalid settings are detected.
|
||
|
*/
|
||
12 years ago
|
virtual bool verifyConnectionSettings(TDENetworkConnection* connection, TDENetworkConnectionErrorFlags::TDENetworkConnectionErrorFlags* type=NULL, TDENetworkErrorStringMap* reason=NULL) = 0;
|
||
12 years ago
|
|
||
12 years ago
|
/**
|
||
|
* Initiates a connection with UUID @param uuid.
|
||
|
* @return A TDENetworkConnectionStatus enum value with the current connection status
|
||
|
* The client application should poll for status updates using checkConnectionStatus()
|
||
12 years ago
|
* Note that if this manager's type is not TDENetworkDeviceType::BackendOnly, the connection
|
||
|
* will be initiated on the internal device specified when this object was created
|
||
12 years ago
|
*/
|
||
|
virtual TDENetworkConnectionStatus::TDENetworkConnectionStatus initiateConnection(TQString uuid) = 0;
|
||
|
|
||
|
/**
|
||
|
* Checks the status of a connection with UUID @param uuid.
|
||
|
* @return A TDENetworkConnectionStatus enum value with the current connection status
|
||
|
*/
|
||
|
virtual TDENetworkConnectionStatus::TDENetworkConnectionStatus checkConnectionStatus(TQString uuid) = 0;
|
||
|
|
||
|
/**
|
||
|
* Disconnects a connection with UUID @param uuid.
|
||
|
* @return A TDENetworkConnectionStatus enum value with the current connection status
|
||
|
* The client application should poll for status updates using checkConnectionStatus()
|
||
|
*/
|
||
|
virtual TDENetworkConnectionStatus::TDENetworkConnectionStatus deactivateConnection(TQString uuid) = 0;
|
||
|
|
||
12 years ago
|
/**
|
||
|
* @return a TQStringList object containing all valid network settings
|
||
|
* Each string has the form "TDENetworkConfigObject::member"
|
||
|
* If a setting is not in this list, it is not supported by the backend in use
|
||
|
*/
|
||
|
virtual TQStringList validSettings() = 0;
|
||
|
|
||
12 years ago
|
/**
|
||
|
* @return a TDENetworkHWNeighborList object containing the result of a site survey;
|
||
|
* i.e. all nearby access points or devices. This function only returns valid information
|
||
|
* if the underlying network device supports site surveys.
|
||
|
*
|
||
|
* Note that the returned list is internally managed and must not be deleted!
|
||
|
* Also note that pointers in the list may become invalid on subsequent calls to
|
||
|
* siteSurvey().
|
||
|
*/
|
||
|
virtual TDENetworkHWNeighborList* siteSurvey() = 0;
|
||
|
|
||
12 years ago
|
/**
|
||
12 years ago
|
* @return a TQStringList containing the UUIDs of all physical devices used by the connection
|
||
|
* with UUID @param uuid.
|
||
12 years ago
|
* This function may return an empty list if the connection is inactive, this behaviour is
|
||
|
* dependend on the specific network backend in use.
|
||
|
*/
|
||
|
virtual TQStringList connectionPhysicalDeviceUUIDs(TQString uuid) = 0;
|
||
|
|
||
12 years ago
|
/**
|
||
|
* @return a TDENetworkVPNTypeList object containing all supported VPN types
|
||
|
* If a type is not in this list, it is not supported by the backend in use
|
||
|
*/
|
||
|
virtual TDENetworkVPNTypeList availableVPNTypes() = 0;
|
||
|
|
||
12 years ago
|
/**
|
||
|
* @return true if networking is enabled, false if not.
|
||
|
*/
|
||
|
virtual bool networkingEnabled() = 0;
|
||
|
|
||
12 years ago
|
/**
|
||
|
* @param enable true to enable networking, false to disable it.
|
||
|
* @return true on success, false on failure.
|
||
|
*/
|
||
|
virtual bool enableNetworking(bool enable) = 0;
|
||
|
|
||
12 years ago
|
/**
|
||
|
* @return true if WiFi hardware is enabled, false if not.
|
||
|
*/
|
||
|
virtual bool wiFiHardwareEnabled() = 0;
|
||
|
|
||
|
/**
|
||
|
* @param enable true to enable WiFi, false to disable it.
|
||
|
* @return true on success, false on failure.
|
||
|
*/
|
||
|
virtual bool enableWiFi(bool enable) = 0;
|
||
|
|
||
|
/**
|
||
|
* @return true if WiFi is enabled, false if not.
|
||
|
*/
|
||
|
virtual bool wiFiEnabled() = 0;
|
||
|
|
||
12 years ago
|
/**
|
||
|
* @return a list of UUIDs of the default network devices, or an empty list if no such devices exist.
|
||
|
* The default network devices are normally the devices holding the highest priority default route.
|
||
|
*/
|
||
|
virtual TQStringList defaultNetworkDevices() = 0;
|
||
|
|
||
12 years ago
|
signals:
|
||
|
/**
|
||
|
* Emitted whenever the state of the system's connection changes
|
||
|
* If previous state data was unavailable, @param previousState will contain TDENetworkConnectionStatus::Invalid
|
||
|
*/
|
||
|
void networkConnectionStateChanged(TDENetworkGlobalManagerFlags::TDENetworkGlobalManagerFlags newState, TDENetworkGlobalManagerFlags::TDENetworkGlobalManagerFlags previousState);
|
||
|
|
||
|
/**
|
||
|
* Emitted whenever the state of a device changes
|
||
|
* If previous state data was unavailable, @param previousState will contain TDENetworkConnectionStatus::Invalid
|
||
|
* If the global connection state has changed, @param hwAddress will be empty, otherwise it will contain the MAC address
|
||
|
* of the networking hardware that has changed state.
|
||
|
*/
|
||
|
void networkDeviceStateChanged(TDENetworkConnectionStatus::TDENetworkConnectionStatus newState, TDENetworkConnectionStatus::TDENetworkConnectionStatus previousState, TQString hwAddress);
|
||
|
|
||
12 years ago
|
/**
|
||
12 years ago
|
* Emitted whenever the status of a wireless access point changes
|
||
|
* The event type that caused the signal is available in @param event
|
||
12 years ago
|
*/
|
||
12 years ago
|
void accessPointStatusChanged(TDEMACAddress BSSID, TDENetworkAPEventType::TDENetworkAPEventType event);
|
||
12 years ago
|
|
||
12 years ago
|
/**
|
||
|
* Emitted whenever a network device event occurs
|
||
|
* The event type that caused the signal is available in @param event
|
||
12 years ago
|
* @param message contains additional information if available
|
||
12 years ago
|
*/
|
||
12 years ago
|
void networkDeviceEvent(TDENetworkDeviceEventType::TDENetworkDeviceEventType event, TQString message);
|
||
12 years ago
|
|
||
12 years ago
|
/**
|
||
|
* Emitted whenever a VPN-related event occurs
|
||
|
* The event type that caused the signal is available in @param event
|
||
|
* @param message contains additional information if available
|
||
|
*/
|
||
|
void vpnEvent(TDENetworkVPNEventType::TDENetworkVPNEventType event, TQString message);
|
||
|
|
||
12 years ago
|
/**
|
||
|
* Emitted whenever a global network management event occurs
|
||
|
* The event type that caused the signal is available in @param event
|
||
|
*/
|
||
|
void networkManagementEvent(TDENetworkGlobalEventType::TDENetworkGlobalEventType event);
|
||
|
|
||
12 years ago
|
public:
|
||
|
/**
|
||
|
* @return a TDENetworkConnectionList object containing a list of all
|
||
|
* possible connections this connection manager is aware of, regardless
|
||
|
* of current state or availability.
|
||
|
*
|
||
|
* loadConnectionInformation() should be called at least once before calling
|
||
|
* this method, in order to update internal connection information from the
|
||
|
* configuration backend.
|
||
|
*
|
||
|
* Note that the returned list is internally managed and must not be deleted!
|
||
|
* Also note that pointers in the list may become invalid on subsequent calls to
|
||
|
* loadConnectionInformation(), saveConnection(), deleteConnection(), or connections().
|
||
|
*/
|
||
|
virtual TDENetworkConnectionList* connections();
|
||
|
|
||
12 years ago
|
/**
|
||
|
* @return the MAC address of this device
|
||
|
*/
|
||
|
TQString deviceMACAddress();
|
||
|
|
||
12 years ago
|
/**
|
||
|
* @return a pointer to a TDENetworkConnection object with the specified @param uuid,
|
||
|
* or a NULL pointer if no such connection exists.
|
||
|
*
|
||
|
* Note that the returned object is internally managed and must not be deleted!
|
||
|
*/
|
||
|
TDENetworkConnection* findConnectionByUUID(TQString uuid);
|
||
|
|
||
12 years ago
|
/**
|
||
|
* @return a pointer to a TDENetworkDevice object with the specified @param uuid,
|
||
12 years ago
|
* or a NULL pointer if no such device exists.
|
||
12 years ago
|
*
|
||
|
* Note that the returned object is internally managed and must not be deleted!
|
||
|
*/
|
||
|
TDENetworkDevice* findDeviceByUUID(TQString uuid);
|
||
|
|
||
12 years ago
|
/**
|
||
|
* @return a pointer to a TDENetworkWiFiAPInfo object with the specified @param bssid,
|
||
|
* or a NULL pointer if no such access point exists.
|
||
|
*
|
||
|
* Note that the returned object is internally managed and must not be deleted!
|
||
|
*/
|
||
|
TDENetworkWiFiAPInfo* findAccessPointByBSSID(TDEMACAddress bssid);
|
||
|
|
||
12 years ago
|
/**
|
||
|
* @return a string containing the friendly name of the connection type @param type given
|
||
|
*/
|
||
|
static TQString friendlyConnectionTypeName(TDENetworkConnectionType::TDENetworkConnectionType type);
|
||
|
|
||
12 years ago
|
/**
|
||
|
* @return true if @param address is valid, false if not
|
||
|
*/
|
||
|
static bool validateIPAddress(TQHostAddress address);
|
||
|
|
||
|
/**
|
||
|
* @return true if @param netmask is valid, false if not
|
||
|
*/
|
||
|
static bool validateIPNeworkMask(TQHostAddress netmask);
|
||
|
|
||
12 years ago
|
protected:
|
||
12 years ago
|
/**
|
||
|
* @internal Safely clears out the master connection list and deletes all member objects
|
||
|
*/
|
||
12 years ago
|
void clearTDENetworkConnectionList();
|
||
12 years ago
|
|
||
|
/**
|
||
|
* @internal Safely clears out the neighboring devices list and deletes all member objects
|
||
|
*/
|
||
12 years ago
|
void clearTDENetworkHWNeighborList();
|
||
12 years ago
|
|
||
|
/**
|
||
|
* @internal This method must be called by the network backend whenever a connection changes state
|
||
|
* It emits the appropriate signals to notify client applications of the state change
|
||
|
*/
|
||
12 years ago
|
void internalNetworkConnectionStateChanged(TDENetworkGlobalManagerFlags::TDENetworkGlobalManagerFlags newState);
|
||
12 years ago
|
|
||
|
/**
|
||
|
* @internal This method must be called by the network backend whenever a device changes state
|
||
|
* It emits the appropriate signals to notify client applications of the state change
|
||
|
*/
|
||
12 years ago
|
void internalNetworkDeviceStateChanged(TDENetworkConnectionStatus::TDENetworkConnectionStatus newState, TQString hwAddress=TQString::null);
|
||
12 years ago
|
|
||
|
/**
|
||
|
* @internal This method must be called by the network backend whenever a wireless access point changes state
|
||
|
* It emits the appropriate signals to notify client applications of the state change
|
||
|
*/
|
||
12 years ago
|
void internalAccessPointStatusChanged(TDEMACAddress BSSID, TDENetworkAPEventType::TDENetworkAPEventType event);
|
||
12 years ago
|
|
||
|
/**
|
||
|
* @internal This method must be called by the network backend whenever a device event occurs
|
||
|
* It emits the appropriate signals to notify client applications of the network device event
|
||
|
*/
|
||
12 years ago
|
void internalNetworkDeviceEvent(TDENetworkDeviceEventType::TDENetworkDeviceEventType event, TQString message);
|
||
12 years ago
|
|
||
12 years ago
|
/**
|
||
|
* @internal This method must be called by the network backend whenever a VPN event occurs
|
||
|
* It emits the appropriate signals to notify client applications of the network device event
|
||
|
*/
|
||
|
void internalVpnEvent(TDENetworkVPNEventType::TDENetworkVPNEventType event, TQString message);
|
||
|
|
||
12 years ago
|
/**
|
||
|
* @internal This method must be called by the network backend whenever it changes state
|
||
|
* It emits the appropriate signals to notify client applications of the state change
|
||
|
*/
|
||
12 years ago
|
void internalNetworkManagementEvent(TDENetworkGlobalEventType::TDENetworkGlobalEventType event);
|
||
12 years ago
|
|
||
12 years ago
|
protected slots:
|
||
|
void emitQueuedSignals();
|
||
|
|
||
12 years ago
|
protected:
|
||
12 years ago
|
TDENetworkConnectionList* m_connectionList;
|
||
12 years ago
|
TDENetworkHWNeighborList* m_hwNeighborList;
|
||
12 years ago
|
TQString m_macAddress;
|
||
12 years ago
|
TDENetworkGlobalManagerFlags::TDENetworkGlobalManagerFlags m_prevConnectionStatus;
|
||
|
TQMap<TQString, TDENetworkConnectionStatus::TDENetworkConnectionStatus> m_prevDeviceStatus;
|
||
12 years ago
|
TQTimer* m_emissionTimer;
|
||
|
TDENetworkEventQueueEvent_PrivateList m_globalEventQueueEventList;
|
||
12 years ago
|
};
|
||
|
|
||
12 years ago
|
class TDECORE_EXPORT TDEGlobalNetworkManager : public TQObject
|
||
|
{
|
||
|
Q_OBJECT
|
||
|
|
||
|
public:
|
||
|
/**
|
||
|
* Constructor.
|
||
|
*/
|
||
|
TDEGlobalNetworkManager();
|
||
|
|
||
|
/**
|
||
|
* Destructor.
|
||
|
*/
|
||
|
~TDEGlobalNetworkManager();
|
||
|
|
||
12 years ago
|
/**
|
||
|
* @return a TQString containing the name of the backend in use
|
||
|
*/
|
||
|
virtual TQString backendName();
|
||
|
|
||
12 years ago
|
/**
|
||
|
* @return A TDENetworkGlobalManagerFlags enum value with the current status of the networking backend.
|
||
|
*/
|
||
|
virtual TDENetworkGlobalManagerFlags::TDENetworkGlobalManagerFlags backendStatus();
|
||
|
|
||
|
/**
|
||
|
* Loads all connection information from the configuration backend
|
||
|
* Secret information must be loaded separately via a call to
|
||
|
* loadConnectionSecrets(TQString uuid) after this method has been
|
||
|
* executed at least once.
|
||
|
*/
|
||
|
virtual void loadConnectionInformation();
|
||
|
|
||
12 years ago
|
/**
|
||
|
* @param connection a pointer to a TDENetworkConnection object containing a
|
||
|
* connection in which to load the values allowed by the backend.
|
||
|
* This is normally called as part of loadConnectionInformation(), but should
|
||
|
* manually be called immediately after creation of a new TDENetworkConnection object.
|
||
|
*/
|
||
|
virtual void loadConnectionAllowedValues(TDENetworkConnection* connection);
|
||
|
|
||
12 years ago
|
/**
|
||
|
* @param uuid a TQString conntaining the UUID of a connection for which to
|
||
|
* load secrets from the configuration backend.
|
||
|
* @return true on success, false on failure.
|
||
|
*/
|
||
|
virtual bool loadConnectionSecrets(TQString uuid);
|
||
|
|
||
|
/**
|
||
|
* @param connection a pointer to a TDENetworkConnection object containing a
|
||
|
* connection to save to the configuration backend.
|
||
|
* @return true on success, false on failure.
|
||
|
*/
|
||
|
virtual bool saveConnection(TDENetworkConnection* connection);
|
||
|
|
||
|
/**
|
||
|
* @param uuid a TQString conntaining the UUID of a connection to
|
||
|
* delete from the configuration backend.
|
||
|
* @return true on success, false on failure.
|
||
|
*/
|
||
|
virtual bool deleteConnection(TQString uuid);
|
||
|
|
||
12 years ago
|
/**
|
||
|
* @param connection a pointer to a TDENetworkConnection object containing a
|
||
|
* connection for which to verify integrity of all settings.
|
||
12 years ago
|
* @param type a pointer to an TDENetworkConnectionErrorFlags::TDENetworkConnectionErrorFlags
|
||
|
* which will be filled with the generic error type code if provided.
|
||
|
* @param reason a pointer to a TDENetworkErrorStringMap which will be filled with translated
|
||
|
* strings containing the reason for the failure if provided.
|
||
12 years ago
|
* @return true on success, false if invalid settings are detected.
|
||
|
*/
|
||
12 years ago
|
virtual bool verifyConnectionSettings(TDENetworkConnection* connection, TDENetworkConnectionErrorFlags::TDENetworkConnectionErrorFlags* type=NULL, TDENetworkErrorStringMap* reason=NULL);
|
||
12 years ago
|
|
||
12 years ago
|
/**
|
||
|
* Initiates a connection with UUID @param uuid.
|
||
|
* @return A TDENetworkConnectionStatus enum value with the current connection status
|
||
|
* The client application should poll for status updates using checkConnectionStatus()
|
||
|
*/
|
||
|
virtual TDENetworkConnectionStatus::TDENetworkConnectionStatus initiateConnection(TQString uuid);
|
||
|
|
||
|
/**
|
||
|
* Checks the status of a connection with UUID @param uuid.
|
||
|
* @return A TDENetworkConnectionStatus enum value with the current connection status
|
||
|
*/
|
||
|
virtual TDENetworkConnectionStatus::TDENetworkConnectionStatus checkConnectionStatus(TQString uuid);
|
||
|
|
||
|
/**
|
||
|
* Disconnects a connection with UUID @param uuid.
|
||
|
* @return A TDENetworkConnectionStatus enum value with the current connection status
|
||
|
* The client application should poll for status updates using checkConnectionStatus()
|
||
|
*/
|
||
|
virtual TDENetworkConnectionStatus::TDENetworkConnectionStatus deactivateConnection(TQString uuid);
|
||
|
|
||
12 years ago
|
/**
|
||
|
* @return a TQStringList object containing all valid network settings
|
||
|
* Each string has the form "TDENetworkConfigObject::member"
|
||
|
* If a setting is not in this list, it is not supported by the backend in use
|
||
|
*/
|
||
|
virtual TQStringList validSettings();
|
||
|
|
||
12 years ago
|
/**
|
||
|
* @return a TDENetworkHWNeighborList object containing the result of a site survey;
|
||
|
* i.e. all nearby access points or devices. This function only returns valid information
|
||
|
* if the underlying network device supports site surveys.
|
||
|
*
|
||
|
* Note that the returned list is internally managed and must not be deleted!
|
||
|
* Also note that pointers in the list may become invalid on subsequent calls to
|
||
|
* siteSurvey().
|
||
|
*/
|
||
|
virtual TDENetworkHWNeighborList* siteSurvey();
|
||
|
|
||
12 years ago
|
/**
|
||
12 years ago
|
* @return a TQStringList containing the UUIDs of all physical devices used by the connection
|
||
|
* with UUID @param uuid.
|
||
12 years ago
|
* This function may return an empty list if the connection is inactive, this behaviour is
|
||
|
* dependend on the specific network backend in use.
|
||
|
*/
|
||
|
virtual TQStringList connectionPhysicalDeviceUUIDs(TQString uuid);
|
||
|
|
||
12 years ago
|
/**
|
||
|
* @return a TDENetworkVPNTypeList object containing all supported VPN types
|
||
|
* If a type is not in this list, it is not supported by the backend in use
|
||
|
*/
|
||
|
virtual TDENetworkVPNTypeList availableVPNTypes();
|
||
|
|
||
12 years ago
|
/**
|
||
|
* @return true if networking is enabled, false if not.
|
||
|
*/
|
||
|
virtual bool networkingEnabled();
|
||
|
|
||
12 years ago
|
/**
|
||
|
* @param enable true to enable networking, false to disable it.
|
||
|
* @return true on success, false on failure.
|
||
|
*/
|
||
|
virtual bool enableNetworking(bool enable);
|
||
|
|
||
12 years ago
|
/**
|
||
|
* @return true if WiFi hardware is enabled, false if not.
|
||
|
*/
|
||
|
virtual bool wiFiHardwareEnabled();
|
||
|
|
||
|
/**
|
||
|
* @param enable true to enable WiFi, false to disable it.
|
||
|
* @return true on success, false on failure.
|
||
|
*/
|
||
|
virtual bool enableWiFi(bool enable);
|
||
|
|
||
|
/**
|
||
|
* @return true if WiFi is enabled, false if not.
|
||
|
*/
|
||
|
virtual bool wiFiEnabled();
|
||
|
|
||
12 years ago
|
/**
|
||
|
* @return a list of UUIDs of the default network devices, or an empty list if no such devices exist.
|
||
|
* The default network devices are normally the devices holding the highest priority default route.
|
||
|
*/
|
||
|
virtual TQStringList defaultNetworkDevices();
|
||
|
|
||
12 years ago
|
signals:
|
||
|
/**
|
||
|
* Emitted whenever the state of the system's connection changes
|
||
|
* If previous state data was unavailable, @param previousState will contain TDENetworkConnectionStatus::Invalid
|
||
|
*/
|
||
|
void networkConnectionStateChanged(TDENetworkGlobalManagerFlags::TDENetworkGlobalManagerFlags newState, TDENetworkGlobalManagerFlags::TDENetworkGlobalManagerFlags previousState);
|
||
|
|
||
|
/**
|
||
|
* Emitted whenever the state of a device changes
|
||
|
* If previous state data was unavailable, @param previousState will contain TDENetworkConnectionStatus::Invalid
|
||
|
* If the global connection state has changed, @param hwAddress will be empty, otherwise it will contain the MAC address
|
||
|
* of the networking hardware that has changed state.
|
||
|
*/
|
||
|
void networkDeviceStateChanged(TDENetworkConnectionStatus::TDENetworkConnectionStatus newState, TDENetworkConnectionStatus::TDENetworkConnectionStatus previousState, TQString hwAddress);
|
||
|
|
||
12 years ago
|
/**
|
||
12 years ago
|
* Emitted whenever the status of a wireless access point changes
|
||
|
* The event type that caused the signal is available in @param event
|
||
12 years ago
|
*/
|
||
12 years ago
|
void accessPointStatusChanged(TDEMACAddress BSSID, TDENetworkAPEventType::TDENetworkAPEventType event);
|
||
12 years ago
|
|
||
12 years ago
|
/**
|
||
|
* Emitted whenever a VPN-related event occurs
|
||
|
* The event type that caused the signal is available in @param event
|
||
|
* @param message contains additional information if available
|
||
|
*/
|
||
|
void vpnEvent(TDENetworkVPNEventType::TDENetworkVPNEventType event, TQString message);
|
||
|
|
||
12 years ago
|
/**
|
||
|
* Emitted whenever a global network management event occurs
|
||
|
* The event type that caused the signal is available in @param event
|
||
|
*/
|
||
|
void networkManagementEvent(TDENetworkGlobalEventType::TDENetworkGlobalEventType event);
|
||
|
|
||
12 years ago
|
public:
|
||
|
/**
|
||
|
* @return a TDENetworkConnectionList object containing a list of all
|
||
|
* possible connections this connection manager is aware of, regardless
|
||
|
* of current state or availability.
|
||
|
*
|
||
|
* loadConnectionInformation() should be called at least once before calling
|
||
|
* this method, in order to update internal connection information from the
|
||
|
* configuration backend.
|
||
|
*
|
||
|
* Note that the returned list is internally managed and must not be deleted!
|
||
|
* Also note that pointers in the list may become invalid on subsequent calls to
|
||
|
* loadConnectionInformation(), saveConnection(), deleteConnection(), or connections().
|
||
|
*/
|
||
|
virtual TDENetworkConnectionList* connections();
|
||
|
|
||
|
/**
|
||
|
* @return a pointer to a TDENetworkConnection object with the specified @param uuid,
|
||
|
* or a NULL pointer if no such connection exists.
|
||
|
*
|
||
|
* Note that the returned object is internally managed and must not be deleted!
|
||
|
*/
|
||
|
TDENetworkConnection* findConnectionByUUID(TQString uuid);
|
||
|
|
||
12 years ago
|
/**
|
||
|
* @return a pointer to a TDENetworkDevice object with the specified @param uuid,
|
||
12 years ago
|
* or a NULL pointer if no such device exists.
|
||
12 years ago
|
*
|
||
|
* Note that the returned object is internally managed and must not be deleted!
|
||
|
*/
|
||
|
TDENetworkDevice* findDeviceByUUID(TQString uuid);
|
||
|
|
||
12 years ago
|
/**
|
||
|
* @return a pointer to a TDENetworkWiFiAPInfo object with the specified @param bssid,
|
||
|
* or a NULL pointer if no such access point exists.
|
||
|
*
|
||
|
* Note that the returned object is internally managed and must not be deleted!
|
||
|
*/
|
||
|
TDENetworkWiFiAPInfo* findAccessPointByBSSID(TDEMACAddress bssid);
|
||
|
|
||
12 years ago
|
private:
|
||
|
TDENetworkConnectionManager* m_internalConnectionManager;
|
||
|
};
|
||
|
|
||
12 years ago
|
#endif // _TDENETWORKCONNECTIONS_H
|