Diffstat (limited to 'libopie2/opiecore/linux/opcmciasystem.h') (more/less context) (show whitespace changes)
-rw-r--r-- | libopie2/opiecore/linux/opcmciasystem.h | 28 |
1 files changed, 25 insertions, 3 deletions
diff --git a/libopie2/opiecore/linux/opcmciasystem.h b/libopie2/opiecore/linux/opcmciasystem.h index 630a434..ef34964 100644 --- a/libopie2/opiecore/linux/opcmciasystem.h +++ b/libopie2/opiecore/linux/opcmciasystem.h | |||
@@ -21,24 +21,26 @@ | |||
21 | -. .:....=;==+<; You should have received a copy of the GNU | 21 | -. .:....=;==+<; You should have received a copy of the GNU |
22 | -_. . . )=. = Library General Public License along with | 22 | -_. . . )=. = Library General Public License along with |
23 | -- :-=` this library; see the file COPYING.LIB. | 23 | -- :-=` this library; see the file COPYING.LIB. |
24 | If not, write to the Free Software Foundation, | 24 | If not, write to the Free Software Foundation, |
25 | Inc., 59 Temple Place - Suite 330, | 25 | Inc., 59 Temple Place - Suite 330, |
26 | Boston, MA 02111-1307, USA. | 26 | Boston, MA 02111-1307, USA. |
27 | 27 | ||
28 | */ | 28 | */ |
29 | 29 | ||
30 | #ifndef OPCMCIASYSTEM_H | 30 | #ifndef OPCMCIASYSTEM_H |
31 | #define OPCMCIASYSTEM_H | 31 | #define OPCMCIASYSTEM_H |
32 | 32 | ||
33 | #include "linux_pcmcia.h" | ||
34 | |||
33 | #include <qobject.h> | 35 | #include <qobject.h> |
34 | #include <qlist.h> | 36 | #include <qlist.h> |
35 | 37 | ||
36 | namespace Opie { | 38 | namespace Opie { |
37 | namespace Core { | 39 | namespace Core { |
38 | 40 | ||
39 | class OPcmciaSocket; | 41 | class OPcmciaSocket; |
40 | 42 | ||
41 | /*====================================================================================== | 43 | /*====================================================================================== |
42 | * OPcmciaSystem | 44 | * OPcmciaSystem |
43 | *======================================================================================*/ | 45 | *======================================================================================*/ |
44 | 46 | ||
@@ -83,43 +85,46 @@ class OPcmciaSystem : public QObject | |||
83 | * @internal Rebuild the internal database | 85 | * @internal Rebuild the internal database |
84 | * @note Sometimes it might be useful to call this from client code, | 86 | * @note Sometimes it might be useful to call this from client code, |
85 | * e.g. after issuing a cardctl insert | 87 | * e.g. after issuing a cardctl insert |
86 | */ | 88 | */ |
87 | void synchronize(); | 89 | void synchronize(); |
88 | 90 | ||
89 | protected: | 91 | protected: |
90 | OPcmciaSystem(); | 92 | OPcmciaSystem(); |
91 | 93 | ||
92 | private: | 94 | private: |
93 | static OPcmciaSystem* _instance; | 95 | static OPcmciaSystem* _instance; |
94 | CardList _interfaces; | 96 | CardList _interfaces; |
97 | int _major; | ||
98 | |||
99 | private: | ||
95 | class Private; | 100 | class Private; |
96 | Private *d; | 101 | Private *d; |
97 | }; | 102 | }; |
98 | 103 | ||
99 | 104 | ||
100 | /*====================================================================================== | 105 | /*====================================================================================== |
101 | * OPcmciaSocket | 106 | * OPcmciaSocket |
102 | *======================================================================================*/ | 107 | *======================================================================================*/ |
103 | 108 | ||
104 | class OPcmciaSocket : public QObject | 109 | class OPcmciaSocket : public QObject |
105 | { | 110 | { |
106 | Q_OBJECT | 111 | Q_OBJECT |
107 | 112 | ||
108 | public: | 113 | public: |
109 | /** | 114 | /** |
110 | * Constructor. Normally you don't create @ref OPcmciaSocket objects yourself, | 115 | * Constructor. Normally you don't create @ref OPcmciaSocket objects yourself, |
111 | * but access them via @ref OPcmciaSystem::card(). | 116 | * but access them via @ref OPcmciaSystem::socket(). |
112 | */ | 117 | */ |
113 | OPcmciaSocket( int socket, QObject* parent, const char* name ); | 118 | OPcmciaSocket( int major, int socket, QObject* parent, const char* name ); |
114 | /** | 119 | /** |
115 | * Destructor. | 120 | * Destructor. |
116 | */ | 121 | */ |
117 | virtual ~OPcmciaSocket(); | 122 | virtual ~OPcmciaSocket(); |
118 | /** | 123 | /** |
119 | * @returns the corresponding socket number | 124 | * @returns the corresponding socket number |
120 | */ | 125 | */ |
121 | int number() const; | 126 | int number() const; |
122 | /** | 127 | /** |
123 | * @returns the identification string of the card in this socket, or "<Empty Socket>" | 128 | * @returns the identification string of the card in this socket, or "<Empty Socket>" |
124 | */ | 129 | */ |
125 | QString identity() const; | 130 | QString identity() const; |
@@ -151,30 +156,47 @@ class OPcmciaSocket : public QObject | |||
151 | */ | 156 | */ |
152 | bool suspend(); | 157 | bool suspend(); |
153 | /** | 158 | /** |
154 | * Resume card. @returns true, if operation succeeded | 159 | * Resume card. @returns true, if operation succeeded |
155 | * @note: This operation needs root privileges | 160 | * @note: This operation needs root privileges |
156 | */ | 161 | */ |
157 | bool resume(); | 162 | bool resume(); |
158 | /** | 163 | /** |
159 | * Reset card. @returns true, if operation succeeded | 164 | * Reset card. @returns true, if operation succeeded |
160 | * @note: This operation needs root privileges | 165 | * @note: This operation needs root privileges |
161 | */ | 166 | */ |
162 | bool reset(); | 167 | bool reset(); |
168 | /** | ||
169 | * @returns a list of product IDs | ||
170 | */ | ||
171 | const QStringList& productIdentity() const; | ||
172 | /** | ||
173 | * @returns the manufacturer ID pair | ||
174 | */ | ||
175 | #if 0 | ||
176 | const QPair& manufacturerIdentity() const; | ||
177 | #endif | ||
163 | 178 | ||
164 | protected: | 179 | private: |
180 | QStringList _productId; | ||
165 | 181 | ||
166 | private: | 182 | private: |
167 | void init(); | 183 | void init(); |
184 | void buildInformation(); | ||
185 | void cleanup(); | ||
168 | bool command( const QString& cmd ); | 186 | bool command( const QString& cmd ); |
187 | bool getTuple( cisdata_t tuple ); | ||
188 | int _major; | ||
169 | int _socket; | 189 | int _socket; |
190 | int _fd; | ||
191 | ds_ioctl_arg_t _ioctlarg; | ||
170 | 192 | ||
171 | private: | 193 | private: |
172 | class Private; | 194 | class Private; |
173 | Private *d; | 195 | Private *d; |
174 | }; | 196 | }; |
175 | 197 | ||
176 | 198 | ||
177 | } | 199 | } |
178 | } | 200 | } |
179 | 201 | ||
180 | #endif // OPCMCIASYSTEM_H | 202 | #endif // OPCMCIASYSTEM_H |