author | zecke <zecke> | 2003-06-11 09:46:50 (UTC) |
---|---|---|
committer | zecke <zecke> | 2003-06-11 09:46:50 (UTC) |
commit | 4d05b57498f6b2f135ecd55e5fde5e6ebc21c160 (patch) (side-by-side diff) | |
tree | a5b52535c5e24da86acaf5b753dfa886d808cab0 | |
parent | 22be97432c25bad67b4fb241977670657facb3af (diff) | |
download | opie-4d05b57498f6b2f135ecd55e5fde5e6ebc21c160.zip opie-4d05b57498f6b2f135ecd55e5fde5e6ebc21c160.tar.gz opie-4d05b57498f6b2f135ecd55e5fde5e6ebc21c160.tar.bz2 |
add the virtual hook in HEAD as well
-rw-r--r-- | libopie/odevice.cpp | 4 | ||||
-rw-r--r-- | libopie/odevice.h | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/libopie/odevice.cpp b/libopie/odevice.cpp index d6e6892..993aedf 100644 --- a/libopie/odevice.cpp +++ b/libopie/odevice.cpp @@ -764,49 +764,49 @@ bool ODevice::hasLightSensor ( ) const int ODevice::readLightSensor ( ) { return -1; } /** * @return the light sensor resolution whatever that is ;) */ int ODevice::lightSensorResolution ( ) const { return 0; } /** * @return a list with CPU frequencies supported by the hardware */ const QStrList &ODevice::allowedCpuFrequencies ( ) const { return *d->m_cpu_frequencies; } /** * Set desired CPU frequency - * + * * @param index index into d->m_cpu_frequencies of the frequency to be set */ bool ODevice::setCurrentCpuFrequency(uint index) { if (index >= d->m_cpu_frequencies->count()) return false; char *freq = d->m_cpu_frequencies->at(index); qWarning("set freq to %s", freq); int fd; if ((fd = ::open("/proc/sys/cpu/0/speed", O_WRONLY)) >= 0) { char writeCommand[50]; const int count = sprintf(writeCommand, "%s\n", freq); int res = (::write(fd, writeCommand, count) != -1); ::close(fd); return res; } return false; } @@ -899,49 +899,51 @@ void ODevice::remapPressedAction ( int button, const OQCopMessage &action ) // buttonFile. writeEntry ( "PressedActionArgs", encodeBase64 ( b. pressedAction ( ). data ( ))); QCopEnvelope ( "QPE/System", "deviceButtonMappingChanged()" ); } void ODevice::remapHeldAction ( int button, const OQCopMessage &action ) { initButtons ( ); if ( button >= (int) d-> m_buttons-> count ( )) return; ODeviceButton &b = ( *d-> m_buttons ) [button]; b. setHeldAction ( action ); Config buttonFile ( "ButtonSettings" ); buttonFile. setGroup ( "Button" + QString::number ( button )); buttonFile. writeEntry ( "HeldActionChannel", (const char *) b. heldAction ( ). channel ( )); buttonFile. writeEntry ( "HeldActionMessage", (const char *) b. heldAction ( ). message ( )); // buttonFile. writeEntry ( "HeldActionArgs", decodeBase64 ( b. heldAction ( ). data ( ))); QCopEnvelope ( "QPE/System", "deviceButtonMappingChanged()" ); } +void ODevice::virtual_hook( int id, void* data ) { +} /************************************************** * * iPAQ * **************************************************/ void iPAQ::init ( ) { d-> m_vendorstr = "HP"; d-> m_vendor = Vendor_HP; QFile f ( "/proc/hal/model" ); if ( f. open ( IO_ReadOnly )) { QTextStream ts ( &f ); d-> m_modelstr = "H" + ts. readLine ( ); if ( d-> m_modelstr == "H3100" ) d-> m_model = Model_iPAQ_H31xx; else if ( d-> m_modelstr == "H3600" ) diff --git a/libopie/odevice.h b/libopie/odevice.h index f2f6467..a232d69 100644 --- a/libopie/odevice.h +++ b/libopie/odevice.h @@ -219,30 +219,32 @@ public: * Reassigns the pressed action for \a button. To return to the factory * default pass an empty string as \a qcopMessage. */ void remapPressedAction ( int button, const OQCopMessage &qcopMessage ); /** * Reassigns the held action for \a button. To return to the factory * default pass an empty string as \a qcopMessage. */ void remapHeldAction ( int button, const OQCopMessage &qcopMessage ); /** * How long (in ms) you have to press a button for a "hold" action */ uint buttonHoldTime ( ) const; signals: void buttonMappingChanged ( ); private slots: void systemMessage ( const QCString &, const QByteArray & ); protected: void reloadButtonMapping ( ); + /* ugly virtual hook */ + virtual void virtual_hook( int id, void* data ); }; } #endif |