summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authordscho <dscho>2005-09-28 16:51:50 +0000
committerdscho <dscho>2005-09-28 16:51:50 +0000
commit0a909fde7a283fb22c22bbdbc16bcf4c0fe391ec (patch)
tree9de5c473941fc3c2525a7cbc67fc416cee11efc0 /examples
parent93be927b1c1c74bc4da6f6d5978ba8e6e52f3cc2 (diff)
downloadlibtdevnc-0a909fde7a283fb22c22bbdbc16bcf4c0fe391ec.tar.gz
libtdevnc-0a909fde7a283fb22c22bbdbc16bcf4c0fe391ec.zip
This monster commit contains support for TightVNC's file transfer protocol.
Thank you very much, Rohit!
Diffstat (limited to 'examples')
-rw-r--r--examples/.cvsignore1
-rw-r--r--examples/Makefile.am7
-rw-r--r--examples/filetransfer.c11
3 files changed, 18 insertions, 1 deletions
diff --git a/examples/.cvsignore b/examples/.cvsignore
index b88a4db..7d110e0 100644
--- a/examples/.cvsignore
+++ b/examples/.cvsignore
@@ -13,4 +13,5 @@ simple15
colourmaptest
regiontest
mac
+filetransfer
diff --git a/examples/Makefile.am b/examples/Makefile.am
index 468e223..614c5ff 100644
--- a/examples/Makefile.am
+++ b/examples/Makefile.am
@@ -6,9 +6,14 @@ MAC=mac
mac_LDFLAGS=-framework ApplicationServices -framework Carbon -framework IOKit
endif
+if WITH_TIGHTVNC_FILETRANSFER
+FILETRANSFER=filetransfer
+endif
+
noinst_HEADERS=radon.h
noinst_PROGRAMS=example pnmshow regiontest pnmshow24 fontsel \
- vncev storepasswd colourmaptest simple simple15 $(MAC)
+ vncev storepasswd colourmaptest simple simple15 $(MAC) \
+ $(FILETRANSFER)
diff --git a/examples/filetransfer.c b/examples/filetransfer.c
new file mode 100644
index 0000000..dacf73d
--- /dev/null
+++ b/examples/filetransfer.c
@@ -0,0 +1,11 @@
+#include <rfb/rfb.h>
+
+int main(int argc,char** argv)
+{
+ rfbScreenInfoPtr server=rfbGetScreen(&argc,argv,400,300,8,3,4);
+ server->frameBuffer=(char*)malloc(400*300*4);
+ rfbRegisterTightVNCFileTransferExtension();
+ rfbInitServer(server);
+ rfbRunEventLoop(server,-1,FALSE);
+ return(0);
+}