kmlpdmanager.h
00001 
00002 
00003 
00004 
00005 
00006 
00007 
00008 
00009 
00010 
00011 
00012 
00013 
00014 
00015 
00016 
00017 
00018 
00019 
00020 #ifndef KMLPDMANAGER_H
00021 #define KMLPDMANAGER_H
00022 
00023 #include "kmmanager.h"
00024 #include <qdict.h>
00025 
00026 class PrintcapEntry;
00027 class PrinttoolEntry;
00028 class GsChecker;
00029 
00030 class KMLpdManager : public KMManager
00031 {
00032 public:
00033     KMLpdManager(QObject *parent = 0, const char *name = 0);
00034     ~KMLpdManager();
00035 
00036     bool completePrinterShort(KMPrinter*);
00037     bool completePrinter(KMPrinter*);
00038     bool createPrinter(KMPrinter*);
00039     bool removePrinter(KMPrinter*);
00040     bool enablePrinter(KMPrinter*);
00041     bool disablePrinter(KMPrinter*);
00042 
00043     
00044     QString driverDbCreationProgram();
00045     QString driverDirectory();
00046 
00047     
00048     DrMain* loadDbDriver(KMDBEntry*);
00049     DrMain* loadPrinterDriver(KMPrinter *p, bool config = false);
00050     bool savePrinterDriver(KMPrinter*, DrMain*);
00051     bool validateDbDriver(KMDBEntry*);
00052 
00053 protected:
00054     void listPrinters();
00055     bool writePrinters();
00056     void loadPrintcapFile(const QString& filename);
00057     bool writePrintcapFile(const QString& filename);
00058     void loadPrinttoolDb(const QString& filename);
00059     QMap<QString,QString> loadPrinttoolCfgFile(const QString& filename);
00060     bool savePrinttoolCfgFile(const QString& templatefile, const QString& dirname, const QMap<QString,QString>& options);
00061     bool checkGsDriver(const QString& gsdriver);
00062     bool createSpooldir(PrintcapEntry*);
00063     bool createPrinttoolEntry(KMPrinter*, PrintcapEntry*);
00064     PrintcapEntry* findPrintcapEntry(const QString& name);
00065     PrinttoolEntry* findPrinttoolEntry(const QString& name);
00066     QString programName(int);
00067     void checkStatus();
00068     bool enablePrinter(KMPrinter*, bool);
00069 
00070 private:
00071     QDict<PrintcapEntry>    m_entries;
00072     QDict<PrinttoolEntry>   m_ptentries;
00073     GsChecker       *m_gschecker;
00074 };
00075 
00076 #endif
 
This file is part of the documentation for kdeprint Library Version 3.2.0.