summaryrefslogtreecommitdiff
path: root/libopie2/opiecore/device/odevice.cpp
authoralwin <alwin>2004-08-01 19:54:59 (UTC)
committer alwin <alwin>2004-08-01 19:54:59 (UTC)
commit9084969d2d4fa39d4d2c185695f0c88739a0f95c (patch) (side-by-side diff)
tree4c76ee5bf61e9f0a883381d2ac68291075cfd541 /libopie2/opiecore/device/odevice.cpp
parent3d67a6ef781f59f9db936442a5b44329a0d5c70b (diff)
downloadopie-9084969d2d4fa39d4d2c185695f0c88739a0f95c.zip
opie-9084969d2d4fa39d4d2c185695f0c88739a0f95c.tar.gz
opie-9084969d2d4fa39d4d2c185695f0c88739a0f95c.tar.bz2
cleanup - odevice is now and for future the one and only friend class
Diffstat (limited to 'libopie2/opiecore/device/odevice.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie2/opiecore/device/odevice.cpp57
1 files changed, 34 insertions, 23 deletions
diff --git a/libopie2/opiecore/device/odevice.cpp b/libopie2/opiecore/device/odevice.cpp
index 0068d88..cd3a84c 100644
--- a/libopie2/opiecore/device/odevice.cpp
+++ b/libopie2/opiecore/device/odevice.cpp
@@ -1,27 +1,27 @@
/*
-                 This file is part of the Opie Project
-              Copyright (C) The Opie Team <opie-devel@handhelds.org>
+ This file is part of the Opie Project
+ Copyright (C) The Opie Team <opie-devel@handhelds.org>
=.
.=l.
-           .>+-=
- _;:,     .>    :=|. This program is free software; you can
-.> <`_,   >  .   <= redistribute it and/or modify it under
-:`=1 )Y*s>-.--   : the terms of the GNU Library General Public
-.="- .-=="i,     .._ License as published by the Free Software
- - .   .-<_>     .<> Foundation; either version 2 of the License,
-     ._= =}       : or (at your option) any later version.
-    .%`+i>       _;_.
-    .i_,=:_.      -<s. This program is distributed in the hope that
-     +  .  -:.       = it will be useful, but WITHOUT ANY WARRANTY;
-    : ..    .:,     . . . without even the implied warranty of
-    =_        +     =;=|` MERCHANTABILITY or FITNESS FOR A
-  _.=:.       :    :=>`: PARTICULAR PURPOSE. See the GNU
-..}^=.=       =       ; Library General Public License for more
-++=   -.     .`     .: details.
- :     =  ...= . :.=-
- -.   .:....=;==+<; You should have received a copy of the GNU
-  -_. . .   )=.  = Library General Public License along with
-    --        :-=` this library; see the file COPYING.LIB.
+ .>+-=
+_;:, .> :=|. This program is free software; you can
+.> <`_, > . <= redistribute it and/or modify it under
+:`=1 )Y*s>-.-- : the terms of the GNU Library General Public
+.="- .-=="i, .._ License as published by the Free Software
+- . .-<_> .<> Foundation; either version 2 of the License,
+ ._= =} : or (at your option) any later version.
+ .%`+i> _;_.
+ .i_,=:_. -<s. This program is distributed in the hope that
+ + . -:. = it will be useful, but WITHOUT ANY WARRANTY;
+ : .. .:, . . . without even the implied warranty of
+ =_ + =;=|` MERCHANTABILITY or FITNESS FOR A
+ _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU
+..}^=.= = ; Library General Public License for more
+++= -. .` .: details.
+: = ...= . :.=-
+-. .:....=;==+<; You should have received a copy of the GNU
+ -_. . . )=. = Library General Public License along with
+ -- :-=` this library; see the file COPYING.LIB.
If not, write to the Free Software Foundation,
Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.
@@ -45,6 +45,7 @@
#include <qpe/resource.h>
#include <qpe/sound.h>
#include <qpe/qcopenvelope_qws.h>
+#include <opie2/okeyfilter.h>
/* STD */
#include <fcntl.h>
@@ -676,7 +677,7 @@ void ODevice::remapPressedAction ( int button, const OQCopMessage &action )
buttonFile. writeEntry ( "PressedActionChannel", (const char*) mb_chan);
buttonFile. writeEntry ( "PressedActionMessage", (const char*) b. pressedAction(). message());
-// buttonFile. writeEntry ( "PressedActionArgs", encodeBase64 ( b. pressedAction(). data()));
+// buttonFile. writeEntry ( "PressedActionArgs", encodeBase64 ( b. pressedAction(). data()));
QCopEnvelope ( "QPE/System", "deviceButtonMappingChanged()" );
}
@@ -696,7 +697,7 @@ void ODevice::remapHeldAction ( int button, const OQCopMessage &action )
buttonFile. writeEntry ( "HeldActionChannel", (const char *) b. heldAction(). channel());
buttonFile. writeEntry ( "HeldActionMessage", (const char *) b. heldAction(). message());
-// buttonFile. writeEntry ( "HeldActionArgs", decodeBase64 ( b. heldAction(). data()));
+// buttonFile. writeEntry ( "HeldActionArgs", decodeBase64 ( b. heldAction(). data()));
QCopEnvelope ( "QPE/System", "deviceButtonMappingChanged()" );
}
@@ -712,6 +713,16 @@ void ODevice::sendSuspendmsg()
QCopEnvelope ( "QPE/System", "aboutToSuspend()" );
}
+void ODevice::addPreHandler(QWSServer::KeyboardFilter*aFilter)
+{
+ Opie::Core::OKeyFilter::inst()->addPreHandler(aFilter);
+}
+
+void ODevice::remPreHandler(QWSServer::KeyboardFilter*aFilter)
+{
+ Opie::Core::OKeyFilter::inst()->remPreHandler(aFilter);
+}
+
}
}