From db6b46788db3653812f07c3018abc5bfaaa821c3 Mon Sep 17 00:00:00 2001 From: mickeyl Date: Sat, 21 May 2005 20:23:05 +0000 Subject: add more methods to OPcmciaSocket --- (limited to 'libopie2') diff --git a/libopie2/opiecore/linux/opcmciasystem.cpp b/libopie2/opiecore/linux/opcmciasystem.cpp index c4b5316..c310b85 100644 --- a/libopie2/opiecore/linux/opcmciasystem.cpp +++ b/libopie2/opiecore/linux/opcmciasystem.cpp @@ -174,6 +174,12 @@ QString OPcmciaSocket::identity() const } +bool OPcmciaSocket::isUnsupported() const +{ + return ( strcmp( name(), "unsupported card" ) == 0 ); +} + + bool OPcmciaSocket::isEmpty() const { return ( strcmp( name(), "empty" ) == 0 ); @@ -182,6 +188,8 @@ bool OPcmciaSocket::isEmpty() const bool OPcmciaSocket::isSuspended() const { + //FIXME + return false; } bool OPcmciaSocket::eject() @@ -201,5 +209,10 @@ bool OPcmciaSocket::suspend() bool OPcmciaSocket::resume() { - return command( "resume "); + return command( "resume"); +} + +bool OPcmciaSocket::reset() +{ + return command( "reset"); } diff --git a/libopie2/opiecore/linux/opcmciasystem.h b/libopie2/opiecore/linux/opcmciasystem.h index 4b445aa..630a434 100644 --- a/libopie2/opiecore/linux/opcmciasystem.h +++ b/libopie2/opiecore/linux/opcmciasystem.h @@ -124,6 +124,10 @@ class OPcmciaSocket : public QObject */ QString identity() const; /** + * @returns true, if the card is unsupported by the cardmgr + */ + bool isUnsupported() const; + /** * @returns true, if the socket is empty */ bool isEmpty() const; @@ -151,6 +155,11 @@ class OPcmciaSocket : public QObject * @note: This operation needs root privileges */ bool resume(); + /** + * Reset card. @returns true, if operation succeeded + * @note: This operation needs root privileges + */ + bool reset(); protected: -- cgit v0.9.0.2