kmcupsmanager.h
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef KMCUPSMANAGER_H
00021 #define KMCUPSMANAGER_H
00022
00023 #include "kmmanager.h"
00024
00025 class IppRequest;
00026 class KLibrary;
00027 class KExtendedSocket;
00028 class QSocket;
00029
00030 class KMCupsManager : public KMManager
00031 {
00032 friend class KMWIppPrinter;
00033 friend class KMCupsJobManager;
00034
00035 Q_OBJECT
00036 public:
00037 KMCupsManager(QObject *parent, const char *name, const QStringList & );
00038 virtual ~KMCupsManager();
00039
00040
00041 bool createPrinter(KMPrinter *p);
00042 bool removePrinter(KMPrinter *p);
00043 bool enablePrinter(KMPrinter *p, bool state);
00044 bool startPrinter(KMPrinter *p, bool state);
00045 bool completePrinter(KMPrinter *p);
00046 bool completePrinterShort(KMPrinter *p);
00047 bool setDefaultPrinter(KMPrinter *p);
00048 bool testPrinter(KMPrinter *p);
00049
00050
00051
00052 QString driverDbCreationProgram();
00053 QString driverDirectory();
00054
00055 DrMain* loadPrinterDriver(KMPrinter *p, bool config = false);
00056 DrMain* loadFileDriver(const QString& filename);
00057 bool savePrinterDriver(KMPrinter *p, DrMain *d);
00058
00059 bool restartServer();
00060 bool configureServer(QWidget *parent = 0);
00061 QStringList detectLocalPrinters();
00062
00063 void createPluginActions(KActionCollection*);
00064 void validatePluginActions(KActionCollection*, KMPrinter*);
00065 QString stateInformation();
00066
00067 public slots:
00068 void exportDriver();
00069 void printerIppReport();
00070
00071 protected slots:
00072 void slotConnectionFailed( int );
00073 void slotConnectionSuccess();
00074 void slotAsyncConnect();
00075
00076 void hostPingSlot();
00077 void hostPingFailedSlot();
00078
00079 protected:
00080
00081 void listPrinters();
00082 void loadServerPrinters();
00083 void processRequest(IppRequest*);
00084 bool setPrinterState(KMPrinter *p, int st);
00085 DrMain* loadDriverFile(const QString& filename);
00086 DrMain* loadMaticDriver(const QString& drname);
00087 void saveDriverFile(DrMain *driver, const QString& filename);
00088 void reportIppError(IppRequest*);
00089 void* loadCupsdConfFunction(const char*);
00090 void unloadCupsdConf();
00091 QString cupsInstallDir();
00092 void ippReport(IppRequest&, int, const QString&);
00093 void checkUpdatePossibleInternal();
00094
00095 private:
00096 KLibrary *m_cupsdconf;
00097 KMPrinter *m_currentprinter;
00098 QSocket *m_socket;
00099 bool m_hostSuccess;
00100 bool m_lookupDone;
00101 };
00102
00103 #endif
This file is part of the documentation for kdeprint Library Version 3.2.0.