author | mickeyl <mickeyl> | 2005-05-21 20:23:05 (UTC) |
---|---|---|
committer | mickeyl <mickeyl> | 2005-05-21 20:23:05 (UTC) |
commit | db6b46788db3653812f07c3018abc5bfaaa821c3 (patch) (side-by-side diff) | |
tree | e159683e96eed09bbc9a886c39c6fd7776fe5f42 | |
parent | afb929e7fd04ecdfec2799a5cf9cf298d1af77c6 (diff) | |
download | opie-db6b46788db3653812f07c3018abc5bfaaa821c3.zip opie-db6b46788db3653812f07c3018abc5bfaaa821c3.tar.gz opie-db6b46788db3653812f07c3018abc5bfaaa821c3.tar.bz2 |
add more methods to OPcmciaSocket
-rw-r--r-- | libopie2/opiecore/linux/opcmciasystem.cpp | 15 | ||||
-rw-r--r-- | libopie2/opiecore/linux/opcmciasystem.h | 9 |
2 files changed, 23 insertions, 1 deletions
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 @@ -169,24 +169,32 @@ int OPcmciaSocket::number() const QString OPcmciaSocket::identity() const { return ( strcmp( name(), "empty" ) == 0 ) ? "<Empty Socket>" : name(); } +bool OPcmciaSocket::isUnsupported() const +{ + return ( strcmp( name(), "unsupported card" ) == 0 ); +} + + bool OPcmciaSocket::isEmpty() const { return ( strcmp( name(), "empty" ) == 0 ); } bool OPcmciaSocket::isSuspended() const { + //FIXME + return false; } bool OPcmciaSocket::eject() { return command( "eject" ); } bool OPcmciaSocket::insert() @@ -196,10 +204,15 @@ bool OPcmciaSocket::insert() bool OPcmciaSocket::suspend() { return command( "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 @@ -119,16 +119,20 @@ class OPcmciaSocket : public QObject * @returns the corresponding socket number */ int number() const; /** * @returns the identification string of the card in this socket, or "<Empty Socket>" */ 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; /** * @returns true, if the socket is suspended */ bool isSuspended() const; /** @@ -146,16 +150,21 @@ class OPcmciaSocket : public QObject * @note: This operation needs root privileges */ bool suspend(); /** * Resume card. @returns true, if operation succeeded * @note: This operation needs root privileges */ bool resume(); + /** + * Reset card. @returns true, if operation succeeded + * @note: This operation needs root privileges + */ + bool reset(); protected: private: void init(); bool command( const QString& cmd ); int _socket; |