fbvncserver.h

Go to the documentation of this file.
00001 #ifndef _FBVNCSERVER_H
00002 #define _FBVNCSERVER_H
00003 
00004 /* *******************************************************
00005  This file is part of fbvncserver.
00006 
00007  fbvncserver is free software; you can redistribute it
00008  and/or modify it under the terms of the
00009  GNU General Public License as published by
00010  the Free Software Foundation; either version 2 of the
00011  License, or (at your option) any later version.
00012 
00013  fbvncserver is distributed in the hope that it will be
00014  useful, but WITHOUT ANY WARRANTY; without even the
00015  implied warranty of MERCHANTABILITY or FITNESS FOR A
00016  PARTICULAR PURPOSE.  See the GNU General Public License
00017  for more details.
00018 
00019  You should have received a copy of the GNU General Public
00020  License along with fbvncserver; if not, write to the
00021  Free Software Foundation, Inc., 51 Franklin St,
00022  Fifth Floor, Boston, MA  02110-1301  USA
00023  ********************************************************/
00024 
00031 /*
00032  * Standard ANSI C
00033  * Documentation @ http://www.cplusplus.com/ref/
00034  */
00035 #include <stdlib.h>   /* general purpose (memory allocation, process control, conversion ...) */
00036 #include <stdio.h>    /* library for Input/Output with streams                                */
00037 #include <unistd.h>   /* standard symbolic constants and types                                */
00038 #include <string.h>   /* library to manipulate C strings                                      */
00039 #include <math.h>     /* library for mathematic operations (linker: -lm)                      */
00040 
00041 #include <sys/mman.h> /* memory management declarations */
00042 #include <sys/wait.h> /* Wait for Process Termination   */
00043 
00044 /*
00045  * LibVNCServer
00046  * URL: http://sourceforge.net/projects/libvncserver/
00047  */
00048 #include "rfb/rfb.h"
00049 #include "rfb/keysym.h"
00050 
00051 /* Project */
00052 #include "config.h"      
00053 #include "rotate.h"      /* utility functions to rotate framebuffer */
00054 #include "dev_uinput.h"  /* uinput kernel interface                 */
00055 
00056 /* define constants */
00057 #define DESKTOP_NAME "PDA" 
00058 #ifndef TRUE
00059 #define TRUE  1
00060 #endif
00061 #ifndef FALSE
00062 #define FALSE 0
00063 #endif
00064 
00065 #define UINPUT_KBD_NAME "fbvnc key-injector"  
00066 #define UINPUT_TS_NAME "fbvnc mouse-injector" 
00067 #define UINPUT_INPUTAPI_NAME "fbvnc TS"       
00069 #define CONFIGBASEDIR "/usr/share/vnc/"       
00070 #define DEFAULT_KBD_LAYOUT "en-us"            
00072 /* define MACROS */
00073 #ifdef DEBUG
00074 #define TRACE(STR) if (debug) {rfbLog(STR); }
00075 #define TRACE1(STR,ARG1) if (debug) {rfbLog(STR, ARG1); }
00076 #define TRACE2(STR,ARG1,ARG2) if (debug) {rfbLog(STR, ARG1, ARG2); }
00077 #define TRACE3(STR,ARG1,ARG2,ARG3) if (debug) {rfbLog(STR, ARG1, ARG2, ARG3); }
00078 #define TRACE4(STR,ARG1,ARG2,ARG3,ARG4) if (debug) {rfbLog(STR, ARG1, ARG2, ARG3,ARG4); }
00079 #define TRACE5(STR,ARG1,ARG2,ARG3,ARG4, ARG5) if (debug) {rfbLog(STR, ARG1, ARG2, ARG3,ARG4, ARG5); }
00080 #else
00081 #define TRACE(STR)
00082 #define TRACE1(STR,ARG1)
00083 #define TRACE2(STR,ARG1,ARG2)
00084 #define TRACE3(STR,ARG1,ARG2, ARG3)
00085 #define TRACE4(STR,ARG1,ARG2, ARG3, ARG4)
00086 #define TRACE5(STR,ARG1,ARG2, ARG3, ARG4, ARG5)
00087 #endif
00088 
00089  static unsigned short int rotate = 0; 
00090  static unsigned short int debug  = 0; 
00091  static unsigned short int uinput = 1; 
00093  static int uinput_fd_kbd   = -1; 
00094  static int uinput_fd_mouse = -1; 
00180 #endif