From 59a16f7ac13f8400b3b52c6741ac043d1d429c94 Mon Sep 17 00:00:00 2001 From: Jay Sorg Date: Sun, 27 Jun 2004 19:08:35 +0000 Subject: [PATCH] added new functions and files needed by persistant bitmap caching git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@726 423420c4-83ab-492f-b58f-81f9feb106b5 --- uiports/qtrdesktopbuild.sh | 51 ++++++++++++++++++++++--------------- uiports/qtwin.cpp | 43 +++++++++++++++++++++++++++++++ uiports/xxxrdesktopbuild.sh | 3 ++- uiports/xxxwin.c | 44 ++++++++++++++++++++++++++++++++ 4 files changed, 119 insertions(+), 22 deletions(-) diff --git a/uiports/qtrdesktopbuild.sh b/uiports/qtrdesktopbuild.sh index 7f67795..2d50b82 100755 --- a/uiports/qtrdesktopbuild.sh +++ b/uiports/qtrdesktopbuild.sh @@ -1,28 +1,37 @@ #!/bin/sh -echo deleting +# qtrdesktop build script + rm qtrdesktop rm *.o rm moc_* -echo compiling -# rdesktop files -g++ -DWITH_OPENSSL -DL_ENDIAN -O2 -Wall -c ../tcp.c -o tcp.o -g++ -DWITH_OPENSSL -DL_ENDIAN -O2 -Wall -c ../iso.c -o iso.o -g++ -DWITH_OPENSSL -DL_ENDIAN -O2 -Wall -c ../mcs.c -o mcs.o -g++ -DWITH_OPENSSL -DL_ENDIAN -O2 -Wall -c ../secure.c -o secure.o -g++ -DWITH_OPENSSL -DL_ENDIAN -O2 -Wall -c ../rdp.c -o rdp.o -g++ -DWITH_OPENSSL -DL_ENDIAN -O2 -Wall -c ../rdp5.c -o rdp5.o -g++ -DWITH_OPENSSL -DL_ENDIAN -O2 -Wall -c ../orders.c -o orders.o -g++ -DWITH_OPENSSL -DL_ENDIAN -O2 -Wall -c ../cache.c -o cache.o -g++ -DWITH_OPENSSL -DL_ENDIAN -O2 -Wall -c ../mppc.c -o mppc.o -g++ -DWITH_OPENSSL -DL_ENDIAN -O2 -Wall -c ../licence.c -o licence.o -g++ -DWITH_OPENSSL -DL_ENDIAN -O2 -Wall -c ../bitmap.c -o bitmap.o -g++ -DWITH_OPENSSL -DL_ENDIAN -O2 -Wall -c ../channels.c -o channels.o + +cc="g++" +cflags="-DWITH_OPENSSL -DL_ENDIAN -O2 -Wall" +# uncomment the following line to turn on debug +#cflags=$cflags+" -DWITH_DEBUG" +lflags="-lcrypto" + +# rdesktop core files +$cc $cflags -c ../tcp.c -o tcp.o +$cc $cflags -c ../iso.c -o iso.o +$cc $cflags -c ../mcs.c -o mcs.o +$cc $cflags -c ../secure.c -o secure.o +$cc $cflags -c ../rdp.c -o rdp.o +$cc $cflags -c ../rdp5.c -o rdp5.o +$cc $cflags -c ../orders.c -o orders.o +$cc $cflags -c ../cache.c -o cache.o +$cc $cflags -c ../mppc.c -o mppc.o +$cc $cflags -c ../licence.c -o licence.o +$cc $cflags -c ../bitmap.c -o bitmap.o +$cc $cflags -c ../channels.c -o channels.o +$cc $cflags -c ../pstcache.c -o pstcache.o + # qt files -g++ -DWITH_OPENSSL -DL_ENDIAN -O2 -Wall -I/usr/local/qt/include -c qtwin.cpp -o qtwin.o +$cc $cflags -I/usr/local/qt/include -c qtwin.cpp -o qtwin.o + # moc stuff -echo doing moc /usr/local/qt/bin/moc qtwin.h > moc_qtwin.cpp -g++ -DWITH_OPENSSL -DL_ENDIAN -O2 -Wall -I/usr/local/qt/include -c moc_qtwin.cpp -o moc_qtwin.o -echo linking -g++ -o qtrdesktop moc_qtwin.o qtwin.o tcp.o iso.o mcs.o secure.o rdp.o rdp5.o orders.o cache.o mppc.o licence.o bitmap.o channels.o -lcrypto -L/usr/local/qt/lib -L/usr/X11R6/lib -lqt -lXext -lX11 -lm -echo done + +$cc $cflags -I/usr/local/qt/include -c moc_qtwin.cpp -o moc_qtwin.o + +$cc -o qtrdesktop moc_qtwin.o qtwin.o tcp.o iso.o mcs.o secure.o rdp.o rdp5.o orders.o cache.o mppc.o licence.o bitmap.o channels.o pstcache.o -lcrypto -L/usr/local/qt/lib -L/usr/X11R6/lib -lqt -lXext -lX11 -lm diff --git a/uiports/qtwin.cpp b/uiports/qtwin.cpp index 6783dd2..362aad3 100755 --- a/uiports/qtwin.cpp +++ b/uiports/qtwin.cpp @@ -50,6 +50,8 @@ int g_server_bpp = 8; int g_encryption = 1; int g_desktop_save =1; int g_bitmap_cache = 1; +int g_bitmap_cache_persist_enable = False; +int g_bitmap_cache_precache = True; int g_bitmap_compression = 1; int g_rdp5_performanceflags = 0; int g_console_session = 0; @@ -1272,6 +1274,47 @@ void hexdump(unsigned char *p, unsigned int len) } } +BOOL rd_pstcache_mkdir(void) +{ + return 0; +} + +/*****************************************************************************/ +int rd_open_file(char *filename) +{ + return 0; +} + +/*****************************************************************************/ +void rd_close_file(int fd) +{ + return; +} + +/*****************************************************************************/ +int rd_read_file(int fd, void *ptr, int len) +{ + return 0; +} + +/*****************************************************************************/ +int rd_write_file(int fd, void* ptr, int len) +{ + return 0; +} + +/*****************************************************************************/ +int rd_lseek_file(int fd, int offset) +{ + return 0; +} + +/*****************************************************************************/ +BOOL rd_lock_file(int fd, int start, int len) +{ + return False; +} + /*****************************************************************************/ void get_username_and_hostname(void) { diff --git a/uiports/xxxrdesktopbuild.sh b/uiports/xxxrdesktopbuild.sh index 539c2ff..1f8ba12 100755 --- a/uiports/xxxrdesktopbuild.sh +++ b/uiports/xxxrdesktopbuild.sh @@ -21,8 +21,9 @@ $cc $cflags -c ../mppc.c -o mppc.o $cc $cflags -c ../licence.c -o licence.o $cc $cflags -c ../bitmap.c -o bitmap.o $cc $cflags -c ../channels.c -o channels.o +$cc $cflags -c ../pstcache.c -o pstcache.o # dumby ui file $cc $cflags -c xxxwin.c -o xxxwin.o -$cc $lflags -o xxxrdesktop xxxwin.o tcp.o iso.o mcs.o secure.o rdp.o rdp5.o orders.o cache.o mppc.o licence.o bitmap.o channels.o +$cc $lflags -o xxxrdesktop xxxwin.o tcp.o iso.o mcs.o secure.o rdp.o rdp5.o orders.o cache.o mppc.o licence.o bitmap.o channels.o pstcache.o diff --git a/uiports/xxxwin.c b/uiports/xxxwin.c index 70fdb6b..c35796f 100755 --- a/uiports/xxxwin.c +++ b/uiports/xxxwin.c @@ -11,6 +11,8 @@ int g_server_bpp = 8; int g_encryption = 1; int g_desktop_save =1; int g_bitmap_cache = 1; +int g_bitmap_cache_persist_enable = False; +int g_bitmap_cache_precache = True; int g_bitmap_compression = 1; int g_rdp5_performanceflags = 0; int g_console_session = 0; @@ -239,6 +241,48 @@ void error(char* format, ...) { } +/*****************************************************************************/ +BOOL rd_pstcache_mkdir(void) +{ + return 0; +} + +/*****************************************************************************/ +int rd_open_file(char *filename) +{ + return 0; +} + +/*****************************************************************************/ +void rd_close_file(int fd) +{ + return; +} + +/*****************************************************************************/ +int rd_read_file(int fd, void *ptr, int len) +{ + return 0; +} + +/*****************************************************************************/ +int rd_write_file(int fd, void* ptr, int len) +{ + return 0; +} + +/*****************************************************************************/ +int rd_lseek_file(int fd, int offset) +{ + return 0; +} + +/*****************************************************************************/ +BOOL rd_lock_file(int fd, int start, int len) +{ + return False; +} + /*****************************************************************************/ int main(int c, char** p) {