root/src/consaver/cons.saver.h

/* [previous][next][first][last][top][bottom][index][help]  */

INCLUDED FROM


   1 /** \file cons.saver.h
   2  *  \brief Header: general purpose Linux console screen save/restore server
   3  *
   4  *  This code does _not_ need to be setuid root. However, it needs
   5  *  read/write access to /dev/vcsa* (which is privileged
   6  *  operation). You should create user vcsa, make cons.saver setuid
   7  *  user vcsa, and make all vcsa's owned by user vcsa.
   8  *  Seeing other peoples consoles is bad thing, but believe me, full
   9  *  root is even worse.
  10  */
  11 
  12 #ifndef MC__CONS_SAVER_H
  13 #define MC__CONS_SAVER_H
  14 
  15 /*** typedefs(not structures) and defined constants **********************************************/
  16 
  17 /*** enums ***************************************************************************************/
  18 
  19 typedef enum
  20 {
  21     CONSOLE_INIT = '1',
  22     CONSOLE_DONE,
  23     CONSOLE_SAVE,
  24     CONSOLE_RESTORE,
  25     CONSOLE_CONTENTS
  26 } console_action_t;
  27 
  28 /*** structures declarations (and typedefs of structures)*****************************************/
  29 
  30 /*** global variables defined in .c file *********************************************************/
  31 
  32 #ifndef LINUX_CONS_SAVER_C
  33 /* Used only in mc, not in cons.saver */
  34 extern int cons_saver_pid;
  35 #endif /* !LINUX_CONS_SAVER_C */
  36 
  37 /*** declarations of public functions ************************************************************/
  38 
  39 #ifndef LINUX_CONS_SAVER_C
  40 /* Used only in mc, not in cons.saver */
  41 void show_console_contents (int starty, unsigned char begin_line, unsigned char end_line);
  42 void handle_console (console_action_t action);
  43 #endif /* !LINUX_CONS_SAVER_C */
  44 
  45 /*** inline functions ****************************************************************************/
  46 #endif /* MC__CONS_SAVER_H */

/* [previous][next][first][last][top][bottom][index][help]  */