summaryrefslogtreecommitdiff
authorzecke <zecke>2003-06-11 09:46:50 (UTC)
committer zecke <zecke>2003-06-11 09:46:50 (UTC)
commit4d05b57498f6b2f135ecd55e5fde5e6ebc21c160 (patch) (unidiff)
treea5b52535c5e24da86acaf5b753dfa886d808cab0
parent22be97432c25bad67b4fb241977670657facb3af (diff)
downloadopie-4d05b57498f6b2f135ecd55e5fde5e6ebc21c160.zip
opie-4d05b57498f6b2f135ecd55e5fde5e6ebc21c160.tar.gz
opie-4d05b57498f6b2f135ecd55e5fde5e6ebc21c160.tar.bz2
add the virtual hook in HEAD as well
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--libopie/odevice.cpp4
-rw-r--r--libopie/odevice.h2
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
@@ -776,25 +776,25 @@ int ODevice::lightSensorResolution ( ) const
776 776
777/** 777/**
778 * @return a list with CPU frequencies supported by the hardware 778 * @return a list with CPU frequencies supported by the hardware
779 */ 779 */
780const QStrList &ODevice::allowedCpuFrequencies ( ) const 780const QStrList &ODevice::allowedCpuFrequencies ( ) const
781{ 781{
782 return *d->m_cpu_frequencies; 782 return *d->m_cpu_frequencies;
783} 783}
784 784
785 785
786/** 786/**
787 * Set desired CPU frequency 787 * Set desired CPU frequency
788 * 788 *
789 * @param index index into d->m_cpu_frequencies of the frequency to be set 789 * @param index index into d->m_cpu_frequencies of the frequency to be set
790 */ 790 */
791bool ODevice::setCurrentCpuFrequency(uint index) 791bool ODevice::setCurrentCpuFrequency(uint index)
792{ 792{
793 if (index >= d->m_cpu_frequencies->count()) 793 if (index >= d->m_cpu_frequencies->count())
794 return false; 794 return false;
795 795
796 char *freq = d->m_cpu_frequencies->at(index); 796 char *freq = d->m_cpu_frequencies->at(index);
797 qWarning("set freq to %s", freq); 797 qWarning("set freq to %s", freq);
798 798
799 int fd; 799 int fd;
800 800
@@ -911,25 +911,27 @@ void ODevice::remapHeldAction ( int button, const OQCopMessage &action )
911 ODeviceButton &b = ( *d-> m_buttons ) [button]; 911 ODeviceButton &b = ( *d-> m_buttons ) [button];
912 b. setHeldAction ( action ); 912 b. setHeldAction ( action );
913 913
914 Config buttonFile ( "ButtonSettings" ); 914 Config buttonFile ( "ButtonSettings" );
915 buttonFile. setGroup ( "Button" + QString::number ( button )); 915 buttonFile. setGroup ( "Button" + QString::number ( button ));
916 buttonFile. writeEntry ( "HeldActionChannel", (const char *) b. heldAction ( ). channel ( )); 916 buttonFile. writeEntry ( "HeldActionChannel", (const char *) b. heldAction ( ). channel ( ));
917 buttonFile. writeEntry ( "HeldActionMessage", (const char *) b. heldAction ( ). message ( )); 917 buttonFile. writeEntry ( "HeldActionMessage", (const char *) b. heldAction ( ). message ( ));
918 918
919 //buttonFile. writeEntry ( "HeldActionArgs", decodeBase64 ( b. heldAction ( ). data ( ))); 919 //buttonFile. writeEntry ( "HeldActionArgs", decodeBase64 ( b. heldAction ( ). data ( )));
920 920
921 QCopEnvelope ( "QPE/System", "deviceButtonMappingChanged()" ); 921 QCopEnvelope ( "QPE/System", "deviceButtonMappingChanged()" );
922} 922}
923void ODevice::virtual_hook( int id, void* data ) {
923 924
925}
924 926
925 927
926 928
927/************************************************** 929/**************************************************
928 * 930 *
929 * iPAQ 931 * iPAQ
930 * 932 *
931 **************************************************/ 933 **************************************************/
932 934
933void iPAQ::init ( ) 935void iPAQ::init ( )
934{ 936{
935 d-> m_vendorstr = "HP"; 937 d-> m_vendorstr = "HP";
diff --git a/libopie/odevice.h b/libopie/odevice.h
index f2f6467..a232d69 100644
--- a/libopie/odevice.h
+++ b/libopie/odevice.h
@@ -231,18 +231,20 @@ public:
231 * How long (in ms) you have to press a button for a "hold" action 231 * How long (in ms) you have to press a button for a "hold" action
232 */ 232 */
233 uint buttonHoldTime ( ) const; 233 uint buttonHoldTime ( ) const;
234 234
235signals: 235signals:
236 void buttonMappingChanged ( ); 236 void buttonMappingChanged ( );
237 237
238private slots: 238private slots:
239 void systemMessage ( const QCString &, const QByteArray & ); 239 void systemMessage ( const QCString &, const QByteArray & );
240 240
241protected: 241protected:
242 void reloadButtonMapping ( ); 242 void reloadButtonMapping ( );
243 /* ugly virtual hook */
244 virtual void virtual_hook( int id, void* data );
243}; 245};
244 246
245} 247}
246 248
247#endif 249#endif
248 250