Diffstat (limited to 'libopie2/opiecore/linux/opcmciasystem.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | libopie2/opiecore/linux/opcmciasystem.h | 39 |
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 | |||
@@ -106,12 +106,30 @@ class OPcmciaSystem : public QObject | |||
106 | * OPcmciaSocket | 106 | * OPcmciaSocket |
107 | *======================================================================================*/ | 107 | *======================================================================================*/ |
108 | 108 | ||
109 | class OPcmciaSocket : public QObject | 109 | class 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 | /** |
115 | * Constructor. Normally you don't create @ref OPcmciaSocket objects yourself, | 133 | * Constructor. Normally you don't create @ref OPcmciaSocket objects yourself, |
116 | * but access them via @ref OPcmciaSystem::socket(). | 134 | * but access them via @ref OPcmciaSystem::socket(). |
117 | */ | 135 | */ |
@@ -122,16 +140,20 @@ class OPcmciaSocket : public QObject | |||
122 | virtual ~OPcmciaSocket(); | 140 | virtual ~OPcmciaSocket(); |
123 | /** | 141 | /** |
124 | * @returns the corresponding socket number | 142 | * @returns the corresponding socket number |
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; |
135 | /** | 157 | /** |
136 | * @returns true, if the socket is empty | 158 | * @returns true, if the socket is empty |
137 | */ | 159 | */ |
@@ -165,33 +187,32 @@ class OPcmciaSocket : public QObject | |||
165 | * @note: This operation needs root privileges | 187 | * @note: This operation needs root privileges |
166 | */ | 188 | */ |
167 | bool reset(); | 189 | bool reset(); |
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; |
195 | Private *d; | 216 | Private *d; |
196 | }; | 217 | }; |
197 | 218 | ||