summaryrefslogtreecommitdiff
path: root/libopie2
authormickeyl <mickeyl>2005-05-21 20:23:05 (UTC)
committer mickeyl <mickeyl>2005-05-21 20:23:05 (UTC)
commitdb6b46788db3653812f07c3018abc5bfaaa821c3 (patch) (side-by-side diff)
treee159683e96eed09bbc9a886c39c6fd7776fe5f42 /libopie2
parentafb929e7fd04ecdfec2799a5cf9cf298d1af77c6 (diff)
downloadopie-db6b46788db3653812f07c3018abc5bfaaa821c3.zip
opie-db6b46788db3653812f07c3018abc5bfaaa821c3.tar.gz
opie-db6b46788db3653812f07c3018abc5bfaaa821c3.tar.bz2
add more methods to OPcmciaSocket
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
@@ -175,4 +175,10 @@ QString OPcmciaSocket::identity() const
+bool OPcmciaSocket::isUnsupported() const
+{
+ return ( strcmp( name(), "unsupported card" ) == 0 );
+}
+
+
bool OPcmciaSocket::isEmpty() const
{
@@ -183,4 +189,6 @@ bool OPcmciaSocket::isEmpty() const
bool OPcmciaSocket::isSuspended() const
{
+ //FIXME
+ return false;
}
@@ -202,4 +210,9 @@ 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
@@ -125,4 +125,8 @@ 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
*/
@@ -152,4 +156,9 @@ class OPcmciaSocket : public QObject
*/
bool resume();
+ /**
+ * Reset card. @returns true, if operation succeeded
+ * @note: This operation needs root privileges
+ */
+ bool reset();
protected: