20 #include "tdenetworkdevice.h"
23 #include "tdenetworkconnections.h"
27 #ifdef WITH_NETWORK_MANAGER_BACKEND
28 #include "network-manager.h"
32 TDENetworkDevice::TDENetworkDevice(TDEGenericDeviceType::TDEGenericDeviceType dt, TQString dn) : TDEGenericDevice(dt, dn) {
37 m_connectionManager = NULL;
40 TDENetworkDevice::~TDENetworkDevice() {
41 if (m_connectionManager) {
42 delete m_connectionManager;
46 TQString TDENetworkDevice::macAddress() {
50 void TDENetworkDevice::internalSetMacAddress(TQString ma) {
54 TQString TDENetworkDevice::state() {
58 void TDENetworkDevice::internalSetState(TQString st) {
62 bool TDENetworkDevice::carrierPresent() {
66 void TDENetworkDevice::internalSetCarrierPresent(
bool cp) {
70 bool TDENetworkDevice::dormant() {
74 void TDENetworkDevice::internalSetDormant(
bool dm) {
78 TQString TDENetworkDevice::ipV4Address() {
82 void TDENetworkDevice::internalSetIpV4Address(TQString ad) {
86 TQString TDENetworkDevice::ipV6Address() {
90 void TDENetworkDevice::internalSetIpV6Address(TQString ad) {
94 TQString TDENetworkDevice::ipV4Netmask() {
98 void TDENetworkDevice::internalSetIpV4Netmask(TQString nm) {
102 TQString TDENetworkDevice::ipV6Netmask() {
103 return m_ipV6Netmask;
106 void TDENetworkDevice::internalSetIpV6Netmask(TQString nm) {
110 TQString TDENetworkDevice::ipV4Broadcast() {
111 return m_ipV4Broadcast;
114 void TDENetworkDevice::internalSetIpV4Broadcast(TQString br) {
115 m_ipV4Broadcast = br;
118 TQString TDENetworkDevice::ipV6Broadcast() {
119 return m_ipV6Broadcast;
122 void TDENetworkDevice::internalSetIpV6Broadcast(TQString br) {
123 m_ipV6Broadcast = br;
126 TQString TDENetworkDevice::ipV4Destination() {
127 return m_ipV4Destination;
130 void TDENetworkDevice::internalSetIpV4Destination(TQString ds) {
131 m_ipV4Destination = ds;
134 TQString TDENetworkDevice::ipV6Destination() {
135 return m_ipV6Destination;
138 void TDENetworkDevice::internalSetIpV6Destination(TQString ds) {
139 m_ipV6Destination = ds;
142 double TDENetworkDevice::rxBytes() {
146 void TDENetworkDevice::internalSetRxBytes(
double rx) {
150 double TDENetworkDevice::txBytes() {
154 void TDENetworkDevice::internalSetTxBytes(
double tx) {
158 double TDENetworkDevice::rxPackets() {
162 void TDENetworkDevice::internalSetRxPackets(
double rx) {
166 double TDENetworkDevice::txPackets() {
170 void TDENetworkDevice::internalSetTxPackets(
double tx) {
174 TDENetworkConnectionManager* TDENetworkDevice::connectionManager() {
175 #ifdef WITH_NETWORK_MANAGER_BACKEND
176 if (!m_connectionManager) {
177 m_connectionManager =
new TDENetworkConnectionManager_BackendNM(
this);
181 return m_connectionManager;
184 void TDENetworkDevice::internalSetConnectionManager(TDENetworkConnectionManager* mgr) {
185 m_connectionManager = mgr;
188 #include "tdenetworkdevice.moc"