#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <errno.h>
}
static time_t t=0,t1;
FILE* f;
int i,j;
t1=time(NULL);
if(t1-t>2)
t=t1;
else
return;
if(bpp!=4 && bpp!=2) {
return;
}
f=fopen("framebuffer.ppm","wb");
if(!f) {
return;
}
unsigned int v;
if(bpp==4)
v=*(unsigned int*)p;
else if(bpp==2)
v=*(unsigned short*)p;
else
v=*(unsigned char*)p;
}
fclose(f);
}
{
return strdup("testuser@test");
}
{
return strdup("Password");
}
int
main(
int argc,
char **argv)
{
time_t t=time(NULL);
#ifdef LIBVNCSERVER_HAVE_SASL
#endif
if(argc>1 && !strcmp("-print",argv[1])) {
argv[1]=argv[0]; argv++; argc--;
} else
return 1;
while (time(NULL)-t<5) {
static int i=0;
fprintf(stderr,"\r%d",i++);
if(n < 0)
break;
if(n)
break;
}
return 0;
}
rfbClient * rfbGetClient(int bitsPerSample, int samplesPerPixel, int bytesPerPixel)
Allocates and returns a pointer to an rfbClient structure.
int WaitForMessage(rfbClient *client, unsigned int usecs)
Waits for an RFB message to arrive from the server.
rfbClientLogProc rfbClientLog
void rfbClientCleanup(rfbClient *client)
Cleans up the client structure and releases the memory allocated for it.
rfbBool HandleRFBServerMessage(rfbClient *client)
Handles messages from the RFB server.
rfbBool rfbInitClient(rfbClient *client, int *argc, char **argv)
Initializes the client.
rfbClientLogProc rfbClientErr
int main(int argc, char **argv)
char * getpassword(rfbClient *client)
char * getuser(rfbClient *client)
GotFrameBufferUpdateProc GotFrameBufferUpdate
GetPasswordProc GetPassword
the pointer returned by GetPassword will be freed after use!