summaryrefslogtreecommitdiff
path: root/libopie2
Side-by-side diff
Diffstat (limited to 'libopie2') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie2/opiecore/linux/opcmciasystem.cpp15
-rw-r--r--libopie2/opiecore/linux/opcmciasystem.h9
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
@@ -171,20 +171,28 @@ 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" );
}
@@ -198,8 +206,13 @@ 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
@@ -121,12 +121,16 @@ class OPcmciaSocket : public QObject
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
*/
@@ -148,12 +152,17 @@ class OPcmciaSocket : public QObject
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 );