[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: branches/KDE/4.3/kdebase/workspace
From: Will Stephenson <wstephenson () kde ! org>
Date: 2009-07-15 22:29:25
Message-ID: 1247696965.033535.3377.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 997524 by wstephens:
Backport r997163, r997177 and r997238 - BIC API change to libsolidcontrol to adapt to \
new API in NetworkManager, as there is no BC guarantee here and only Network \
Management is using
M +1 -0 libs/solid/control/backends/fakenet/fakenetworkinterface.h
M +12 -0 libs/solid/control/ifaces/networkinterface.h
M +3 -4 libs/solid/control/networkinterface.cpp
M +30 -0 libs/solid/control/networkinterface.h
M +5 -5 libs/solid/control/wirelessaccesspoint.h
M +1 -0 solid/networkmanager-0.6/NetworkManager-networkinterface.h
M +1 -0 solid/networkmanager-0.7/CMakeLists.txt
M +1 -1 solid/networkmanager-0.7/networkinterface.cpp
M +2 -1 solid/networkmanager-0.7/networkinterface.h
M +5 -5 solid/networkmanager-0.7/wirelessnetworkinterface.cpp
M +1 -0 solid/wicd/networkinterface.h
M +2 -1 solid/wicd/wirednetworkinterface.cpp
--- branches/KDE/4.3/kdebase/workspace/libs/solid/control/backends/fakenet/fakenetworkinterface.h \
#997523:997524 @@ -54,6 +54,7 @@
void activeChanged(bool);
void linkUpChanged(bool);
void connectionStateChanged(int /*NetworkStatus::ConnectionState */);
+ void connectionStateChanged(int,int,int);
protected:
/* These methods are operations that are carried out by the manager
--- branches/KDE/4.3/kdebase/workspace/libs/solid/control/ifaces/networkinterface.h \
#997523:997524 @@ -113,6 +113,18 @@
* @see Solid::Control::NetworkInterface::ConnectionState
*/
virtual void connectionStateChanged(int state) = 0;
+
+ /**
+ * This signal is emitted when the device's link status changed.
+ *
+ * @param new_state the new state of the connection
+ * @param old_state the previous state of the connection
+ * @param reason the reason for the state change, if any. ReasonNone where \
the backend + * provides no reason.
+ * @see Solid::Control::NetworkInterface::ConnectionState
+ */
+ virtual void connectionStateChanged(int new_state, int old_state, int reason \
) = 0; +
};
} //Ifaces
} //Control
--- branches/KDE/4.3/kdebase/workspace/libs/solid/control/networkinterface.cpp \
#997523:997524 @@ -27,10 +27,7 @@
Solid::Control::NetworkInterface::NetworkInterface(QObject *backendObject)
: QObject(), d_ptr(new NetworkInterfacePrivate(this))
{
- Q_D(NetworkInterface);
- d->setBackendObject(backendObject);
-}
-
+ Q_D(NetworkInterface); d->setBackendObject(backendObject); }
Solid::Control::NetworkInterface::NetworkInterface(const NetworkInterface &other)
: QObject(), d_ptr(new NetworkInterfacePrivate(this))
{
@@ -115,6 +112,8 @@
if (object) {
QObject::connect(object, SIGNAL(connectionStateChanged(int)),
parent(), SIGNAL(connectionStateChanged(int)));
+ QObject::connect(object, SIGNAL(connectionStateChanged(int,int,int)),
+ parent(), SIGNAL(connectionStateChanged(int,int,int)));
}
}
--- branches/KDE/4.3/kdebase/workspace/libs/solid/control/networkinterface.h \
#997523:997524 @@ -57,6 +57,24 @@
enum ConnectionState{ UnknownState, Unmanaged, Unavailable, Disconnected, \
Preparing,
Configuring, NeedAuth, IPConfig, Activated, Failed };
/**
+ * Enums describing the reason for a connection state change
+ */
+ enum ConnectionStateChangeReason{ NoReason=1, NowManagedReason, \
NowUnmanagedReason, + ConfigFailedReason, \
ConfigUnavailableReason, + ConfigExpiredReason, \
NoSecretsReason, AuthSupplicantDisconnectReason, + \
AuthSupplicantConfigFailedReason, AuthSupplicantFailedReason, + \
AuthSupplicantTimeoutReason, PppStartFailedReason, PppDisconnectReason, + \
PppFailedReason, DhcpStartFailedReason, DhcpErrorReason, DhcpFailedReason, + \
SharedStartFailedReason, SharedFailedReason, + \
AutoIpStartFailedReason, AutoIpErrorReason, AutoIpFailedReason, + \
ModemBusyReason, ModemNoDialToneReason, ModemNoCarrierReason, ModemDialTimeoutReason, \
+ ModemDialFailedReason, ModemInitFailedReason, + \
GsmApnSelectFailedReason, GsmNotSearchingReason, GsmRegistrationDeniedReason, + \
GsmRegistrationTimeoutReason, GsmRegistrationFailedReason, + \
GsmPinCheckFailedReason, FirmwareMissingReason, DeviceRemovedReason, + \
SleepingReason, ConnectionRemovedReason, UserRequestedReason, CarrierReason, + \
Reserved = 65536 }; + /**
* Possible Device capabilities
* - IsManageable: denotes that the device can be controlled by this API
* - SupportsCarrierDetect: the device informs us when it is plugged in to \
the medium @@ -178,6 +196,17 @@
*/
void connectionStateChanged(int state);
+ /**
+ * This signal is emitted when the device's link status changed.
+ *
+ * @param new_state the new state of the connection
+ * @param old_state the previous state of the connection
+ * @param reason the reason for the state change, if any. ReasonNone where \
the backend + * provides no reason.
+ * @see Solid::Control::NetworkInterface::ConnectionState
+ */
+ void connectionStateChanged(int new_state, int old_state, int reason );
+
protected:
/**
* @internal
@@ -201,6 +230,7 @@
} //Solid
Q_DECLARE_OPERATORS_FOR_FLAGS(Solid::Control::NetworkInterface::Capabilities)
+Q_DECLARE_OPERATORS_FOR_FLAGS(Solid::Control::NetworkInterface::Types)
#endif //SOLID_CONTROL_NETWORKINTERFACE_H
--- branches/KDE/4.3/kdebase/workspace/libs/solid/control/wirelessaccesspoint.h \
#997523:997524 @@ -116,7 +116,7 @@
Solid::Control::WirelessNetworkInterface::OperationMode mode() const;
/**
- * Retrieves the current signal strength of this wifi network.
+ * Retrieves the current signal strength of this access point
*
* @return the signal strength as a percentage
*/
@@ -124,16 +124,16 @@
Q_SIGNALS:
/**
- * This signal is emitted when the signal strength of this network has \
changed. + * This signal is emitted when the signal strength of this access \
point has changed.
*
- * @param strength the new signal strength value for this network
+ * @param strength the new signal strength value for this access point.
*/
void signalStrengthChanged(int strength);
/**
- * This signal is emitted when the bitrate of this network has changed.
+ * This signal is emitted when the bitrate of this access point has changed.
*
- * @param bitrate the new bitrate value for this network
+ * @param bitrate the new bitrate value for this access point
*/
void bitRateChanged(int bitrate);
--- branches/KDE/4.3/kdebase/workspace/solid/networkmanager-0.6/NetworkManager-networkinterface.h \
#997523:997524 @@ -85,6 +85,7 @@
Q_SIGNALS:
void ipDetailsChanged();
void connectionStateChanged(int state);
+ void connectionStateChanged(int new_state, int old_state, int reason);
protected:
NMNetworkInterface(NMNetworkInterfacePrivate &dd);
NMNetworkInterfacePrivate * d_ptr;
--- branches/KDE/4.3/kdebase/workspace/solid/networkmanager-0.7/CMakeLists.txt \
#997523:997524 @@ -7,6 +7,7 @@
)
#add_subdirectory(dbus)
+#add_subdirectory(fakemanager)
#add_subdirectory(tests)
--- branches/KDE/4.3/kdebase/workspace/solid/networkmanager-0.7/networkinterface.cpp \
#997523:997524 @@ -243,7 +243,7 @@
{
Q_D(NMNetworkInterface);
d->connectionState = convertState(new_state);
- emit connectionStateChanged(d->connectionState);
+ emit connectionStateChanged(d->connectionState, convertState(old_state), \
reason); }
#include "networkinterface.moc"
--- branches/KDE/4.3/kdebase/workspace/solid/networkmanager-0.7/networkinterface.h \
#997523:997524 @@ -72,7 +72,8 @@
Q_SIGNALS:
void ipDetailsChanged();
//void linkUpChanged(bool linkActivated);
- void connectionStateChanged(int state);
+ void connectionStateChanged(int newstate);
+ void connectionStateChanged(int newstate, int oldstate, int reason);
protected Q_SLOTS:
void stateChanged(uint,uint,uint);
private:
--- branches/KDE/4.3/kdebase/workspace/solid/networkmanager-0.7/wirelessnetworkinterface.cpp \
#997523:997524 @@ -65,12 +65,12 @@
QDBusReply< QList <QDBusObjectPath> > apPathList = \
d->wirelessIface.GetAccessPoints(); if (apPathList.isValid())
{
- kDebug(1441) << "Got device list";
+ //kDebug(1441) << "Got device list";
QList <QDBusObjectPath> aps = apPathList.value();
foreach (const QDBusObjectPath &op, aps)
{
d->accessPoints.append(op.path());
- kDebug(1441) << " " << op.path();
+ //kDebug(1441) << " " << op.path();
}
}
else
@@ -125,7 +125,7 @@
void NMWirelessNetworkInterface::wirelessPropertiesChanged(const QVariantMap & \
changedProperties) {
- kDebug(1441) << changedProperties.keys();
+ //kDebug(1441) << changedProperties.keys();
QStringList propKeys = changedProperties.keys();
Q_D(NMWirelessNetworkInterface);
QLatin1String activeApKey("ActiveAccessPoint"),
@@ -168,7 +168,7 @@
void NMWirelessNetworkInterface::accessPointAdded(const QDBusObjectPath &apPath)
{
- kDebug(1441) << apPath.path();
+ //kDebug(1441) << apPath.path();
Q_D(NMWirelessNetworkInterface);
if (!d->accessPoints.contains(apPath.path())) {
d->accessPoints.append(apPath.path());
@@ -178,7 +178,7 @@
void NMWirelessNetworkInterface::accessPointRemoved(const QDBusObjectPath &apPath)
{
- kDebug(1441) << apPath.path();
+ //kDebug(1441) << apPath.path();
Q_D(NMWirelessNetworkInterface);
if (!d->accessPoints.contains(apPath.path())) {
kDebug(1441) << "Access point list lookup failed for " << apPath.path();
--- branches/KDE/4.3/kdebase/workspace/solid/wicd/networkinterface.h #997523:997524
@@ -51,6 +51,7 @@
Q_SIGNALS:
void ipDetailsChanged();
void connectionStateChanged(int state);
+ void connectionStateChanged(int old_state, int new_state, int reason);
private:
WicdNetworkInterfacePrivate *d;
};
--- branches/KDE/4.3/kdebase/workspace/solid/wicd/wirednetworkinterface.cpp \
#997523:997524 @@ -91,8 +91,9 @@
}
if (connection_state != d->connection_state) {
+ int old_state = d->connection_state;
connection_state = d->connection_state;
- emit connectionStateChanged(d->connection_state);
+ emit connectionStateChanged(d->connection_state, old_state, \
Solid::Control::NetworkInterface::NoReason); }
} else {
if (d->carrier != false) {
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic