summaryrefslogtreecommitdiff
path: root/libopie2/opiecore/linux/opcmciasystem.h
Unidiff
Diffstat (limited to 'libopie2/opiecore/linux/opcmciasystem.h') (more/less context) (show whitespace changes)
-rw-r--r--libopie2/opiecore/linux/opcmciasystem.h39
1 files changed, 30 insertions, 9 deletions
diff --git a/libopie2/opiecore/linux/opcmciasystem.h b/libopie2/opiecore/linux/opcmciasystem.h
index ef34964..ac6c1de 100644
--- a/libopie2/opiecore/linux/opcmciasystem.h
+++ b/libopie2/opiecore/linux/opcmciasystem.h
@@ -109,6 +109,24 @@ class OPcmciaSystem : public QObject
109class OPcmciaSocket : public QObject 109class OPcmciaSocket : public QObject
110{ 110{
111 Q_OBJECT 111 Q_OBJECT
112 public:
113
114 enum OPcmciaSocketCardStatus
115 {
116 Unknown = 0,
117 Occupied = CS_EVENT_CARD_DETECT,
118 OccupiedCardBus = CS_EVENT_CB_DETECT,
119 WriteProtected = CS_EVENT_WRITE_PROTECT,
120 BatteryLow = CS_EVENT_BATTERY_LOW,
121 BatteryDead = CS_EVENT_BATTERY_DEAD,
122 Ready = CS_EVENT_READY_CHANGE,
123 Suspended = CS_EVENT_PM_SUSPEND,
124 Attention = CS_EVENT_REQUEST_ATTENTION,
125 InsertionInProgress = CS_EVENT_CARD_INSERTION,
126 RemovalInProgress = CS_EVENT_CARD_REMOVAL,
127 ThreeVolts = CS_EVENT_3VCARD,
128 SupportsVoltage = CS_EVENT_XVCARD,
129 };
112 130
113 public: 131 public:
114 /** 132 /**
@@ -125,10 +143,14 @@ class OPcmciaSocket : public QObject
125 */ 143 */
126 int number() const; 144 int number() const;
127 /** 145 /**
128 * @returns the identification string of the card in this socket, or "<Empty Socket>" 146 * @returns the card managers idea of the cards' identy, or "<Empty Socket>"
129 */ 147 */
130 QString identity() const; 148 QString identity() const;
131 /** 149 /**
150 * @returns the socket status
151 */
152 const OPcmciaSocketCardStatus status() const;
153 /**
132 * @returns true, if the card is unsupported by the cardmgr 154 * @returns true, if the card is unsupported by the cardmgr
133 */ 155 */
134 bool isUnsupported() const; 156 bool isUnsupported() const;
@@ -168,27 +190,26 @@ class OPcmciaSocket : public QObject
168 /** 190 /**
169 * @returns a list of product IDs 191 * @returns a list of product IDs
170 */ 192 */
171 const QStringList& productIdentity() const; 193 QStringList productIdentity() const;
172 /** 194 /**
173 * @returns the manufacturer ID pair 195 * @returns the manufacturer ID pair
174 */ 196 */
175#if 0 197#if 0
176 const QPair& manufacturerIdentity() const; 198 const QPair& manufacturerIdentity() const;
177#endif 199#endif
178 200 /**
179 private: 201 * @returns the function string
180 QStringList _productId; 202 */
203 QString function() const;
181 204
182 private: 205 private:
183 void init(); 206 void init();
184 void buildInformation();
185 void cleanup(); 207 void cleanup();
186 bool command( const QString& cmd ); 208 bool getTuple( cisdata_t tuple ) const;
187 bool getTuple( cisdata_t tuple );
188 int _major; 209 int _major;
189 int _socket; 210 int _socket;
190 int _fd; 211 int _fd;
191 ds_ioctl_arg_t _ioctlarg; 212 mutable ds_ioctl_arg_t _ioctlarg;
192 213
193 private: 214 private:
194 class Private; 215 class Private;