-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 | |||
@@ -171,20 +171,28 @@ int OPcmciaSocket::number() const | |||
171 | QString OPcmciaSocket::identity() const | 171 | QString OPcmciaSocket::identity() const |
172 | { | 172 | { |
173 | return ( strcmp( name(), "empty" ) == 0 ) ? "<Empty Socket>" : name(); | 173 | return ( strcmp( name(), "empty" ) == 0 ) ? "<Empty Socket>" : name(); |
174 | } | 174 | } |
175 | 175 | ||
176 | 176 | ||
177 | bool OPcmciaSocket::isUnsupported() const | ||
178 | { | ||
179 | return ( strcmp( name(), "unsupported card" ) == 0 ); | ||
180 | } | ||
181 | |||
182 | |||
177 | bool OPcmciaSocket::isEmpty() const | 183 | bool OPcmciaSocket::isEmpty() const |
178 | { | 184 | { |
179 | return ( strcmp( name(), "empty" ) == 0 ); | 185 | return ( strcmp( name(), "empty" ) == 0 ); |
180 | } | 186 | } |
181 | 187 | ||
182 | 188 | ||
183 | bool OPcmciaSocket::isSuspended() const | 189 | bool OPcmciaSocket::isSuspended() const |
184 | { | 190 | { |
191 | //FIXME | ||
192 | return false; | ||
185 | } | 193 | } |
186 | 194 | ||
187 | bool OPcmciaSocket::eject() | 195 | bool OPcmciaSocket::eject() |
188 | { | 196 | { |
189 | return command( "eject" ); | 197 | return command( "eject" ); |
190 | } | 198 | } |
@@ -198,8 +206,13 @@ bool OPcmciaSocket::suspend() | |||
198 | { | 206 | { |
199 | return command( "suspend" ); | 207 | return command( "suspend" ); |
200 | } | 208 | } |
201 | 209 | ||
202 | bool OPcmciaSocket::resume() | 210 | bool OPcmciaSocket::resume() |
203 | { | 211 | { |
204 | return command( "resume "); | 212 | return command( "resume"); |
213 | } | ||
214 | |||
215 | bool OPcmciaSocket::reset() | ||
216 | { | ||
217 | return command( "reset"); | ||
205 | } | 218 | } |
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 | |||
121 | int number() const; | 121 | int number() const; |
122 | /** | 122 | /** |
123 | * @returns the identification string of the card in this socket, or "<Empty Socket>" | 123 | * @returns the identification string of the card in this socket, or "<Empty Socket>" |
124 | */ | 124 | */ |
125 | QString identity() const; | 125 | QString identity() const; |
126 | /** | 126 | /** |
127 | * @returns true, if the card is unsupported by the cardmgr | ||
128 | */ | ||
129 | bool isUnsupported() const; | ||
130 | /** | ||
127 | * @returns true, if the socket is empty | 131 | * @returns true, if the socket is empty |
128 | */ | 132 | */ |
129 | bool isEmpty() const; | 133 | bool isEmpty() const; |
130 | /** | 134 | /** |
131 | * @returns true, if the socket is suspended | 135 | * @returns true, if the socket is suspended |
132 | */ | 136 | */ |
@@ -148,12 +152,17 @@ class OPcmciaSocket : public QObject | |||
148 | bool suspend(); | 152 | bool suspend(); |
149 | /** | 153 | /** |
150 | * Resume card. @returns true, if operation succeeded | 154 | * Resume card. @returns true, if operation succeeded |
151 | * @note: This operation needs root privileges | 155 | * @note: This operation needs root privileges |
152 | */ | 156 | */ |
153 | bool resume(); | 157 | bool resume(); |
158 | /** | ||
159 | * Reset card. @returns true, if operation succeeded | ||
160 | * @note: This operation needs root privileges | ||
161 | */ | ||
162 | bool reset(); | ||
154 | 163 | ||
155 | protected: | 164 | protected: |
156 | 165 | ||
157 | private: | 166 | private: |
158 | void init(); | 167 | void init(); |
159 | bool command( const QString& cmd ); | 168 | bool command( const QString& cmd ); |