home *** CD-ROM | disk | FTP | other *** search
/ Chip 1998 February / CHIP_2_98.iso / misc / src / install / printercfg.h < prev    next >
C/C++ Source or Header  |  1997-09-17  |  4KB  |  85 lines

  1. /* Text based printer configuration for the RHS install program */
  2. /* Michael Fulbright - 1997                                     */
  3. /*                                                              */
  4.  
  5. /* Most of this should be hidden in printercfg.c rather then exported
  6.    to the world, but... -ewt */
  7.  
  8. #ifndef _RHS_PRINTERCFG_H
  9.  
  10. #define _RHS_PRINTERCFG_H
  11.  
  12.  
  13. /* An entry in the 'printerdb' file, which describes each type of */
  14. /* supported printer                                              */
  15.  
  16. struct prnDBEntry {
  17.   char  *Entry;          /* Human-readable name of the entry       */
  18.   char  *GSDriver;       /* gs driver used by this printer         */
  19.   char  *Descr;          /* Single line description of printer     */
  20.   char  *About;          /* Lengthy description of printer         */
  21.   char **Resolution;     /* List of resolutions supported          */
  22.   char **ResDescr;       /* Description of each resolution         */
  23.   int    NumRes;         /* Length of list of resolutions          */
  24.   char **BitsPerPixel;   /* List of color depths supported         */
  25.   char **BppDescr;       /* Description of each color depth        */
  26.   int    NumBpp;         /* Length of list of color depths         */
  27. };
  28. typedef struct prnDBEntry DBEntry;
  29.  
  30. /* A printcap entry */
  31. /* Only represents a subset of possible options available */
  32. /* Sufficient for the simple configuration we are interested in */
  33. struct prnPCEntry {
  34.     char *Queue;           /* Queue name, can have multi separated by '|' */
  35.     char *SpoolDir;        /* Spool directory                             */
  36.     char *Device;          /* Print device                                */
  37.     char *IF;              /* input filter                                */
  38.     char *AF;              /* accounting filter (needed for smbprint)     */
  39.     
  40.     char *Type;            /* Entry type - "LOCAL" "REMOTE" "SMB"         */
  41.     
  42.     /* these apply to all types and are not represented by printcap entry */
  43.  
  44.     /* following 4 are OBSOLETE */
  45. #if 0
  46.     char *PrinterDescr;    /* Engligh description of gsdriver             */
  47.     char *PrinterType;     /* Database entry for this queue               */
  48.     char *PrinterAbout;    /* Lengthy description                         */
  49.     char *GSDriver;        /* ghostscript driver to use                   */
  50. #endif
  51.     /* replaced by */
  52.     DBEntry *db;    /* entry in printer database for this printer  */
  53.     char *Resolution;      /* ghostscript resolution to use               */
  54.     char *PaperSize;       /* Papersize                                   */
  55.     char *AutoEOF;         /* Indicates if EOF needed at EOJ, not used?   */
  56.     char *BitsPerPixel;    /* ghostscript color option                    */
  57.     char *CRLF;            /* Whether or not to do CR/LF xlation          */
  58.     char *RevPages;        /* Reverse order of pages on output?           */
  59.     
  60.     /* REMOTE (lpd) printers only */
  61.     char *RemoteHost;      /* Remote host (not used for all entries)      */
  62.     char *RemoteQueue;     /* Queue on the remote machine                 */
  63.     
  64.     /* SMB (LAN Manager) only */
  65.     char *SMBHost;         /* Server name (NMB name, can have spaces)      */
  66.     char *SMBHostIP;       /* Can optional specify and IP address for host */
  67.     char *SMBShare;        /* Name of share on the SMB server              */
  68.     char *SMBUser;         /* User to log in as on SMB server              */
  69.     char *SMBPasswd;       /* Corresponding password                       */
  70. };
  71. typedef struct prnPCEntry PCEntry;
  72.  
  73. /* location of the printer database in an installed system*/
  74. #define PRINTER_DB_FILE "/usr/lib/rhs/rhs-printfilters/printerdb"
  75. #define PRINTER_FILTER_DIR "/usr/lib/rhs/rhs-printfilters/"
  76.  
  77. /* different connx type */
  78. #define LOCAL_CONNX      1
  79. #define REMOTE_LPD_CONNX 2
  80. #define SMB_CONNX        3
  81.  
  82. int doConfigurePrinters (char *theroot);
  83.  
  84. #endif
  85.