summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--libopie/odevice.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/libopie/odevice.h b/libopie/odevice.h
index a232d69..650a2da 100644
--- a/libopie/odevice.h
+++ b/libopie/odevice.h
@@ -138,96 +138,102 @@ enum ODirection {
138class ODevice : public QObject { 138class ODevice : public QObject {
139 Q_OBJECT 139 Q_OBJECT
140 140
141private: 141private:
142 /* disable copy */ 142 /* disable copy */
143 ODevice ( const ODevice & ); 143 ODevice ( const ODevice & );
144 144
145protected: 145protected:
146 ODevice ( ); 146 ODevice ( );
147 virtual void init ( ); 147 virtual void init ( );
148 virtual void initButtons ( ); 148 virtual void initButtons ( );
149 149
150 ODeviceData *d; 150 ODeviceData *d;
151 151
152public: 152public:
153 // sandman do we want to allow destructions? -zecke? 153 // sandman do we want to allow destructions? -zecke?
154 virtual ~ODevice ( ); 154 virtual ~ODevice ( );
155 155
156 static ODevice *inst ( ); 156 static ODevice *inst ( );
157 157
158 // information 158 // information
159 159
160 QString modelString ( ) const; 160 QString modelString ( ) const;
161 OModel model ( ) const; 161 OModel model ( ) const;
162 inline OModel series ( ) const { return (OModel) ( model ( ) & Model_Series_Mask ); } 162 inline OModel series ( ) const { return (OModel) ( model ( ) & Model_Series_Mask ); }
163 163
164 QString vendorString ( ) const; 164 QString vendorString ( ) const;
165 OVendor vendor ( ) const; 165 OVendor vendor ( ) const;
166 166
167 QString systemString ( ) const; 167 QString systemString ( ) const;
168 OSystem system ( ) const; 168 OSystem system ( ) const;
169 169
170 QString systemVersionString ( ) const; 170 QString systemVersionString ( ) const;
171 171
172 Transformation rotation ( ) const; 172 Transformation rotation ( ) const;
173 ODirection direction ( ) const; 173 ODirection direction ( ) const;
174 174
175// system 175// system
176 176
177 virtual bool setSoftSuspend ( bool on ); 177 virtual bool setSoftSuspend ( bool on );
178 virtual bool suspend ( ); 178 virtual bool suspend ( );
179 179
180 virtual bool setDisplayStatus ( bool on ); 180 virtual bool setDisplayStatus ( bool on );
181 virtual bool setDisplayBrightness ( int brightness ); 181 virtual bool setDisplayBrightness ( int brightness );
182 virtual int displayBrightnessResolution ( ) const; 182 virtual int displayBrightnessResolution ( ) const;
183 virtual bool setDisplayContrast ( int contrast ); 183 virtual bool setDisplayContrast ( int contrast );
184 virtual int displayContrastResolution ( ) const; 184 virtual int displayContrastResolution ( ) const;
185 185
186 // don't add new virtual methods, use this:
187 ///*virtual */ void boo(int i ) { return virtual_hook(1,&i); };
188 // and in your subclass do do overwrite
189 //protected virtual int virtual_hook(int, void *)
190 // which is defined below
191
186// input / output 192// input / output
187 //FIXME playAlarmSound and al might be better -zecke 193 //FIXME playAlarmSound and al might be better -zecke
188 virtual void alarmSound ( ); 194 virtual void alarmSound ( );
189 virtual void keySound ( ); 195 virtual void keySound ( );
190 virtual void touchSound ( ); 196 virtual void touchSound ( );
191 197
192 virtual QValueList <OLed> ledList ( ) const; 198 virtual QValueList <OLed> ledList ( ) const;
193 virtual QValueList <OLedState> ledStateList ( OLed led ) const; 199 virtual QValueList <OLedState> ledStateList ( OLed led ) const;
194 virtual OLedState ledState ( OLed led ) const; 200 virtual OLedState ledState ( OLed led ) const;
195 virtual bool setLedState ( OLed led, OLedState st ); 201 virtual bool setLedState ( OLed led, OLedState st );
196 202
197 virtual bool hasLightSensor ( ) const; 203 virtual bool hasLightSensor ( ) const;
198 virtual int readLightSensor ( ); 204 virtual int readLightSensor ( );
199 virtual int lightSensorResolution ( ) const; 205 virtual int lightSensorResolution ( ) const;
200 206
201 const QStrList &allowedCpuFrequencies() const; 207 const QStrList &allowedCpuFrequencies() const;
202 bool setCurrentCpuFrequency(uint index); 208 bool setCurrentCpuFrequency(uint index);
203 209
204 /** 210 /**
205 * Returns the available buttons on this device. The number and location 211 * Returns the available buttons on this device. The number and location
206 * of buttons will vary depending on the device. Button numbers will be assigned 212 * of buttons will vary depending on the device. Button numbers will be assigned
207 * by the device manufacturer and will be from most preferred button to least preffered 213 * by the device manufacturer and will be from most preferred button to least preffered
208 * button. Note that this list only contains "user mappable" buttons. 214 * button. Note that this list only contains "user mappable" buttons.
209 */ 215 */
210 const QValueList<ODeviceButton> &buttons ( ); 216 const QValueList<ODeviceButton> &buttons ( );
211 217
212 /** 218 /**
213 * Returns the DeviceButton for the \a keyCode. If \a keyCode is not found, it 219 * Returns the DeviceButton for the \a keyCode. If \a keyCode is not found, it
214 * returns 0L 220 * returns 0L
215 */ 221 */
216 const ODeviceButton *buttonForKeycode ( ushort keyCode ); 222 const ODeviceButton *buttonForKeycode ( ushort keyCode );
217 223
218 /** 224 /**
219 * Reassigns the pressed action for \a button. To return to the factory 225 * Reassigns the pressed action for \a button. To return to the factory
220 * default pass an empty string as \a qcopMessage. 226 * default pass an empty string as \a qcopMessage.
221 */ 227 */
222 void remapPressedAction ( int button, const OQCopMessage &qcopMessage ); 228 void remapPressedAction ( int button, const OQCopMessage &qcopMessage );
223 229
224 /** 230 /**
225 * Reassigns the held action for \a button. To return to the factory 231 * Reassigns the held action for \a button. To return to the factory
226 * default pass an empty string as \a qcopMessage. 232 * default pass an empty string as \a qcopMessage.
227 */ 233 */
228 void remapHeldAction ( int button, const OQCopMessage &qcopMessage ); 234 void remapHeldAction ( int button, const OQCopMessage &qcopMessage );
229 235
230 /** 236 /**
231 * How long (in ms) you have to press a button for a "hold" action 237 * How long (in ms) you have to press a button for a "hold" action
232 */ 238 */
233 uint buttonHoldTime ( ) const; 239 uint buttonHoldTime ( ) const;