package printer; # $Id$
use diagnostics;
use strict;
use vars qw(%thedb %thedb_gsdriver %printer_type %printer_type_inv @papersize_type %fields @entries_db_short @entry_db_description %descr_to_help %descr_to_db %db_to_descr %descr_to_ppd);
use common qw(:common :system :file);
use commands;
#-if we are in an DrakX config
my $prefix = "";
#-location of the printer database in an installed system
my $PRINTER_DB_FILE = "/usr/lib/rhs/rhs-printfilters/printerdb";
my $PRINTER_FILTER_DIR = "/usr/lib/rhs/rhs-printfilters";
%printer_type = (
__("Local printer") => "LOCAL",
__("Remote printer") => "REMOTE",
__("Remote CUPS server") => "CUPS",
__("Remote lpd server") => "LPD",
__("Network printer (socket)") => "SOCKET",
__("SMB/Windows 95/98/NT") => "SMB",
__("NetWare") => "NCP",
__("Printer Device URI") => "URI",
);
%printer_type_inv = reverse %printer_type;
%fields = (
STANDARD => [qw(QUEUE SPOOLDIR IF)],
SPEC => [qw(DBENTRY RESOLUTION PAPERSIZE BITSPERPIXEL CRLF)],
LOCAL => [qw(DEVICE)],
REMOTE => [qw(REMOTEHOST REMOTEQUEUE)],
SMB => [qw(SMBHOST SMBHOSTIP SMBSHARE SMBUSER SMBPASSWD SMBWORKGROUP AF)],
NCP => [qw(NCPHOST NCPQUEUE NCPUSER NCPPASSWD)],
);
@papersize_type = qw(letter legal ledger a3 a4);
#------------------------------------------------------------------------------
sub set_prefix($) { $prefix = $_[0]; }
sub default_queue($) { (split '\|', $_[0]{QUEUE})[0] }
|