author | mickeyl <mickeyl> | 2005-06-25 15:29:59 (UTC) |
---|---|---|
committer | mickeyl <mickeyl> | 2005-06-25 15:29:59 (UTC) |
commit | 790aeb8898d635468c2b9e24fd16a70aab64b1dd (patch) (unidiff) | |
tree | 72139f02106b88325efbb39fc11f5ccd79ce29fb | |
parent | 3d434ac35915afe7f7035468ca18656264a91c52 (diff) | |
download | opie-790aeb8898d635468c2b9e24fd16a70aab64b1dd.zip opie-790aeb8898d635468c2b9e24fd16a70aab64b1dd.tar.gz opie-790aeb8898d635468c2b9e24fd16a70aab64b1dd.tar.bz2 |
- fix logic in isEmpty() and isSuspended()
- add convenience API productIdentityVendor()
-rw-r--r-- | libopie2/opiecore/linux/opcmciasystem.cpp | 13 | ||||
-rw-r--r-- | libopie2/opiecore/linux/opcmciasystem.h | 8 |
2 files changed, 16 insertions, 5 deletions
diff --git a/libopie2/opiecore/linux/opcmciasystem.cpp b/libopie2/opiecore/linux/opcmciasystem.cpp index a5725f1..21c5a84 100644 --- a/libopie2/opiecore/linux/opcmciasystem.cpp +++ b/libopie2/opiecore/linux/opcmciasystem.cpp | |||
@@ -279,2 +279,3 @@ const OPcmciaSocket::OPcmciaSocketCardStatus OPcmciaSocket::status() const | |||
279 | qWarning( "OPcmciaSocket::status() - DS_GET_STATUS failed (%s)", strerror( errno ) ); | 279 | qWarning( "OPcmciaSocket::status() - DS_GET_STATUS failed (%s)", strerror( errno ) ); |
280 | // return ( errno == -ENODEV ) ? Empty : Unknown; | ||
280 | return Unknown; | 281 | return Unknown; |
@@ -298,3 +299,3 @@ bool OPcmciaSocket::isEmpty() const | |||
298 | { | 299 | { |
299 | return ! status() && ( Occupied || OccupiedCardBus ); | 300 | return !(status() & ( Occupied | OccupiedCardBus )); |
300 | } | 301 | } |
@@ -304,3 +305,3 @@ bool OPcmciaSocket::isSuspended() const | |||
304 | { | 305 | { |
305 | return status() && Suspended; | 306 | return status() & Suspended; |
306 | } | 307 | } |
@@ -338,3 +339,3 @@ bool OPcmciaSocket::reset() | |||
338 | 339 | ||
339 | QStringList OPcmciaSocket::productIdentity() const | 340 | QStringList OPcmciaSocket::productIdentityVector() const |
340 | { | 341 | { |
@@ -360,2 +361,8 @@ QStringList OPcmciaSocket::productIdentity() const | |||
360 | 361 | ||
362 | QString OPcmciaSocket::productIdentity() const | ||
363 | { | ||
364 | return productIdentityVector().join( " " ).stripWhiteSpace(); | ||
365 | } | ||
366 | |||
367 | |||
361 | QString OPcmciaSocket::manufacturerIdentity() const | 368 | QString OPcmciaSocket::manufacturerIdentity() const |
diff --git a/libopie2/opiecore/linux/opcmciasystem.h b/libopie2/opiecore/linux/opcmciasystem.h index 0fd43cf..23d8c41 100644 --- a/libopie2/opiecore/linux/opcmciasystem.h +++ b/libopie2/opiecore/linux/opcmciasystem.h | |||
@@ -190,5 +190,9 @@ class OPcmciaSocket : public QObject | |||
190 | /** | 190 | /** |
191 | * @returns a list of product IDs | 191 | * @returns the product ID vector |
192 | */ | ||
193 | QStringList productIdentityVector() const; | ||
194 | /** | ||
195 | * @returns the product ID string | ||
192 | */ | 196 | */ |
193 | QStringList productIdentity() const; | 197 | QString productIdentity() const; |
194 | /** | 198 | /** |