summaryrefslogtreecommitdiff
path: root/noncore/comm/keypebble/krfbdecoder.cpp
Side-by-side diff
Diffstat (limited to 'noncore/comm/keypebble/krfbdecoder.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/comm/keypebble/krfbdecoder.cpp63
1 files changed, 34 insertions, 29 deletions
diff --git a/noncore/comm/keypebble/krfbdecoder.cpp b/noncore/comm/keypebble/krfbdecoder.cpp
index db95154..69457e2 100644
--- a/noncore/comm/keypebble/krfbdecoder.cpp
+++ b/noncore/comm/keypebble/krfbdecoder.cpp
@@ -4,7 +4,12 @@
#include "krfbbuffer.h"
+/* OPIE */
+#include <opie2/odebug.h>
+using namespace Opie::Core;
+/* QT */
#include <qpixmap.h>
+/* STD */
#include <assert.h>
@@ -12,5 +17,5 @@
// Endian stuff
//
-#ifndef KDE_USE_FINAL
+#ifndef OPIE_NO_DEBUG
const int endianTest = 1;
#endif
@@ -136,5 +141,5 @@ void KRFBDecoder::sendClientInit()
// Wait for server init
- qWarning( "Waiting for server init" );
+ owarn << "Waiting for server init" << oendl;
static QString statusMsg = tr( "Waiting for server initialization..." );
@@ -148,5 +153,5 @@ void KRFBDecoder::sendClientInit()
void KRFBDecoder::gotServerInit()
{
- qWarning( "Got server init" );
+ owarn << "Got server init" << oendl;
disconnect( con, SIGNAL( gotEnoughData() ), this, SLOT( gotServerInit() ) );
@@ -182,5 +187,5 @@ void KRFBDecoder::gotServerInit()
info->nameLength = Swap32IfLE( info->nameLength );
- qWarning( "Width = %d, Height = %d", info->width, info->height );
+ owarn << "Width = " << info->width << ", Height = " << info->height << "" << oendl;
qWarning( "Bpp = %d, Depth = %d, Big = %d, True = %d",
info->bpp, info->depth, info->bigEndian, info->trueColor );
@@ -193,5 +198,5 @@ void KRFBDecoder::gotServerInit()
// Wait for desktop name
- qWarning( "Waiting for desktop name" );
+ owarn << "Waiting for desktop name" << oendl;
static QString statusMsg = tr( "Waiting for desktop name..." );
@@ -208,5 +213,5 @@ void KRFBDecoder::gotDesktopName()
assert( currentState == AwaitingDesktopName );
- qWarning( "Got desktop name" );
+ owarn << "Got desktop name" << oendl;
disconnect( con, SIGNAL( gotEnoughData() ),
@@ -220,5 +225,5 @@ void KRFBDecoder::gotDesktopName()
info->name = buf;
- qWarning( "Desktop: %s", info->name.latin1() );
+ owarn << "Desktop: " << info->name.latin1() << "" << oendl;
delete buf;
@@ -372,5 +377,5 @@ void KRFBDecoder::gotUpdateHeader()
assert( currentState == AwaitingUpdate );
- // qWarning( "Got update header" );
+ // owarn << "Got update header" << oendl;
disconnect( con, SIGNAL( gotEnoughData() ),
@@ -407,5 +412,5 @@ void KRFBDecoder::gotUpdateHeader()
noRects = Swap16IfLE( noRects );
- // qWarning( "Expecting %d rects", noRects );
+ // owarn << "Expecting " << noRects << " rects" << oendl;
// Now wait for the data
@@ -419,5 +424,5 @@ void KRFBDecoder::gotRectHeader()
assert( currentState == AwaitingRectHeader );
- // qWarning( "Got rect header" );
+ // owarn << "Got rect header" << oendl;
disconnect( con, SIGNAL( gotEnoughData() ),
@@ -447,21 +452,21 @@ void KRFBDecoder::gotRectHeader()
//
if ( encoding == RawEncoding ) {
- // qWarning( "Raw encoding" );
+ // owarn << "Raw encoding" << oendl;
handleRawRect();
}
else if ( encoding == CopyRectEncoding ) {
-// qWarning( "CopyRect encoding" );
+// owarn << "CopyRect encoding" << oendl;
handleCopyRect();
}
else if ( encoding == RreEncoding ) {
- qWarning( "RRE encoding" );
+ owarn << "RRE encoding" << oendl;
handleRRERect();
}
else if ( encoding == CorreEncoding ) {
- qWarning( "CoRRE encoding" );
+ owarn << "CoRRE encoding" << oendl;
handleCoRRERect();
}
else if ( encoding == HexTileEncoding ) {
- qWarning( "HexTile encoding" );
+ owarn << "HexTile encoding" << oendl;
handleHexTileRect();
}
@@ -471,5 +476,5 @@ void KRFBDecoder::gotRectHeader()
"used by the server %1" ).arg( msg );
currentState = Error;
- qWarning( "Unknown encoding, %d", msg );
+ owarn << "Unknown encoding, " << msg << "" << oendl;
emit error( protocolError );
return;
@@ -487,5 +492,5 @@ void KRFBDecoder::handleRawRect()
// overall size (but has to be in complete lines).
- // qWarning( "Handling a raw rect chunk" );
+ // owarn << "Handling a raw rect chunk" << oendl;
// CARD32 lineCount = w * format->bpp / 8;
@@ -510,5 +515,5 @@ void KRFBDecoder::getRawRectChunk( int lines )
// Wait for server init
- // qWarning( "Waiting for raw rect chunk, %ld", count );
+ // owarn << "Waiting for raw rect chunk, " << count << "" << oendl;
currentState = AwaitingRawRectChunk;
@@ -524,5 +529,5 @@ void KRFBDecoder::gotRawRectChunk()
this, SLOT( gotRawRectChunk() ) );
- // qWarning( "Got raw rect chunk" );
+ // owarn << "Got raw rect chunk" << oendl;
//
@@ -547,5 +552,5 @@ void KRFBDecoder::gotRawRectChunk()
noRects--;
- // qWarning( "There are %d rects left", noRects );
+ // owarn << "There are " << noRects << " rects left" << oendl;
if ( noRects ) {
@@ -591,5 +596,5 @@ void KRFBDecoder::gotCopyRectPos()
noRects--;
- // qWarning( "There are %d rects left", noRects );
+ // owarn << "There are " << noRects << " rects left" << oendl;
if ( noRects ) {
@@ -604,15 +609,15 @@ void KRFBDecoder::gotCopyRectPos()
void KRFBDecoder::handleRRERect()
{
- qWarning( "RRE not implemented" );
+ owarn << "RRE not implemented" << oendl;
}
void KRFBDecoder::handleCoRRERect()
{
- qWarning( "CoRRE not implemented" );
+ owarn << "CoRRE not implemented" << oendl;
}
void KRFBDecoder::handleHexTileRect()
{
- qWarning( "HexTile not implemented" );
+ owarn << "HexTile not implemented" << oendl;
}
@@ -674,5 +679,5 @@ void KRFBDecoder::sendCutEvent( const QString &unicode )
void KRFBDecoder::gotServerCut()
{
- qWarning( "Got server cut" );
+ owarn << "Got server cut" << oendl;
currentState = AwaitingServerCutLength;
@@ -722,5 +727,5 @@ void KRFBDecoder::gotServerCutText()
/* For some reason QApplication::clipboard()->setText() segfaults when called
* from within keypebble's mass of signals and slots
- qWarning( "Server cut: %s", cutbuf );
+ owarn << "Server cut: " << cutbuf << "" << oendl;
QString cutText( cutbuf ); // DANGER!!
@@ -739,5 +744,5 @@ void KRFBDecoder::gotServerCutText()
}
else {
- qWarning( "Async handled in weird state" );
+ owarn << "Async handled in weird state" << oendl;
currentState = oldState;
};
@@ -746,5 +751,5 @@ void KRFBDecoder::gotServerCutText()
void KRFBDecoder::gotBell()
{
- qWarning( "Got server bell" );
+ owarn << "Got server bell" << oendl;
buf->soundBell();
@@ -759,5 +764,5 @@ void KRFBDecoder::gotBell()
}
else {
- qWarning( "Async handled in weird state" );
+ owarn << "Async handled in weird state" << oendl;
currentState = oldState;
};