summaryrefslogtreecommitdiff
path: root/noncore/settings/networksettings2/usb/usbrun.cpp
Unidiff
Diffstat (limited to 'noncore/settings/networksettings2/usb/usbrun.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/networksettings2/usb/usbrun.cpp15
1 files changed, 5 insertions, 10 deletions
diff --git a/noncore/settings/networksettings2/usb/usbrun.cpp b/noncore/settings/networksettings2/usb/usbrun.cpp
index 0a46642..eb439c1 100644
--- a/noncore/settings/networksettings2/usb/usbrun.cpp
+++ b/noncore/settings/networksettings2/usb/usbrun.cpp
@@ -6,7 +6,9 @@
6 6
7State_t USBRun::detectState( void ) { 7State_t USBRun::detectState( void ) {
8
8 // unavailable : no card found 9 // unavailable : no card found
9 // available : card found and assigned to us or free 10 // available : card found and assigned to us or free
10 // up : card found and assigned to us and up 11 // up : card found and assigned to us and up
12
11 NodeCollection * NC = nodeCollection(); 13 NodeCollection * NC = nodeCollection();
12 QString S = QString( "/tmp/profile-%1.up" ).arg(NC->number()); 14 QString S = QString( "/tmp/profile-%1.up" ).arg(NC->number());
@@ -65,5 +67,7 @@ State_t USBRun::detectState( void ) {
65 ) { 67 ) {
66 // proper type, and Not UP -> free 68 // proper type, and Not UP -> free
67 return Off; 69 // usb cables are currently always available when requested
70 // until we can detect if we are plugged in
71 return Available;
68 } 72 }
69 } 73 }
@@ -76,13 +80,4 @@ QString USBRun::setMyState( NodeCollection * NC, Action_t A, bool ) {
76 // nothing needs to be done to 'activate' or 'deactivate' 80 // nothing needs to be done to 'activate' or 'deactivate'
77 // a cable 81 // a cable
78
79 // perhaps (later) we can figure out if the device is IN the
80 // cradle
81 if( A == Activate ) {
82 NC->setCurrentState( Available );
83 } else if ( A == Deactivate ) {
84 NC->setCurrentState( Unavailable );
85 }
86
87 return QString(); 82 return QString();
88} 83}