summaryrefslogtreecommitdiffstats
path: root/examples/mac.c
diff options
context:
space:
mode:
authordscho <dscho>2005-10-06 19:07:01 +0000
committerdscho <dscho>2005-10-06 19:07:01 +0000
commitd15e35586baac59e5fe585a86d26cb606bd87969 (patch)
tree2a671865dfa9065f7a0ffee7da9d7f659a57163c /examples/mac.c
parent60f1770e1081e81502dc2ba000c27f730f5c1e7c (diff)
downloadlibvncserver-d15e35586baac59e5fe585a86d26cb606bd87969.zip
libvncserver-d15e35586baac59e5fe585a86d26cb606bd87969.tar.gz
kill BackChannel and CustomClientMessage: the new extension technique makes these hooks obsolete
Diffstat (limited to 'examples/mac.c')
-rw-r--r--examples/mac.c60
1 files changed, 0 insertions, 60 deletions
diff --git a/examples/mac.c b/examples/mac.c
index aca7f14..f33780a 100644
--- a/examples/mac.c
+++ b/examples/mac.c
@@ -27,10 +27,6 @@
*
*/
-#ifdef LOCAL_CONTROL
-#include "1instance.c"
-#endif
-
#include <unistd.h>
#include <ApplicationServices/ApplicationServices.h>
#include <Carbon/Carbon.h>
@@ -476,39 +472,11 @@ ScreenInit(int argc, char**argv)
rfbInitServer(rfbScreen);
}
-#ifdef LOCAL_CONTROL
-single_instance_struct single_instance = { "/tmp/OSXvnc_control" };
-#endif
-
static void
refreshCallback(CGRectCount count, const CGRect *rectArray, void *ignore)
{
int i;
-#ifdef LOCAL_CONTROL
- char message[1024];
-
- if(get_next_message(message,1024,&single_instance,50)) {
- if(message[0]=='l' && message[1]==0) {
- rfbClientPtr cl;
- int i;
- for(i=0,cl=rfbScreen->rfbClientHead;cl;cl=cl->next,i++)
- rfbLog("%02d: %s\n",i,cl->host);
- } else if(message[0]=='t') {
- rfbClientPtr cl;
- for(cl=rfbScreen->rfbClientHead;cl;cl=cl->next)
- if(!strcmp(message+1,cl->host)) {
- cl->clientData=(void*)((cl->clientData==0)?-1:0);
- break;
- }
- }
-#ifdef LIBVNCSERVER_BACKCHANNEL
- else if(message[0]=='b')
- rfbSendBackChannel(rfbScreen,message+1,strlen(message+1));
-#endif
- }
-#endif
-
if(startTime>0 && time(0)>startTime+maxSecsToConnect)
rfbShutdown(0);
@@ -541,35 +509,7 @@ int main(int argc,char *argv[])
{
int i;
-#ifdef LOCAL_CONTROL
- char message[1024];
-
- open_control_file(&single_instance);
-#endif
-
for(i=argc-1;i>0;i--)
-#ifdef LOCAL_CONTROL
- if(i<argc-1 && !strcmp(argv[i],"-toggleviewonly")) {
- if(strlen(argv[i+1])>1022)
- argv[i+1][1022]=0;
- sprintf(message,"t%s",argv[i+1]);
- send_message(&single_instance,message);
- exit(0);
- } else if(!strcmp(argv[i],"-listclients")) {
- rfbLog("list clients\n");
- send_message(&single_instance,"l");
- exit(0);
- } else
-#ifdef LIBVNCSERVER_BACKCHANNEL
- if(i<argc-1 && !strcmp(argv[i],"-backchannel")) {
- if(strlen(argv[i+1])>1022)
- argv[i+1][1022]=0;
- sprintf(message,"b%s",argv[i+1]);
- send_message(&single_instance,message);
- exit(0);
- } else
-#endif
-#endif
if(i<argc-1 && strcmp(argv[i],"-wait4client")==0) {
maxSecsToConnect = atoi(argv[i+1])/1000;
startTime = time(0);
OpenPOWER on IntegriCloud