20 #ifndef KMCUPSMANAGER_H
21 #define KMCUPSMANAGER_H
23 #include "kmmanager.h"
27 class KExtendedSocket;
33 class KMCupsManager :
public KMManager
35 friend class KMWIppPrinter;
36 friend class KMCupsJobManager;
40 KMCupsManager(TQObject *parent,
const char *name,
const TQStringList & );
41 virtual ~KMCupsManager();
44 bool createPrinter(KMPrinter *p);
45 bool removePrinter(KMPrinter *p);
46 bool enablePrinter(KMPrinter *p,
bool state);
47 bool startPrinter(KMPrinter *p,
bool state);
48 bool completePrinter(KMPrinter *p);
49 bool completePrinterShort(KMPrinter *p);
50 bool setDefaultPrinter(KMPrinter *p);
51 bool testPrinter(KMPrinter *p);
55 TQString driverDbCreationProgram();
56 TQString driverDirectory();
58 DrMain* loadPrinterDriver(KMPrinter *p,
bool config =
false);
59 DrMain* loadFileDriver(
const TQString& filename);
60 bool savePrinterDriver(KMPrinter *p, DrMain *d);
63 bool configureServer(TQWidget *parent = 0);
64 TQStringList detectLocalPrinters();
66 void createPluginActions(TDEActionCollection*);
67 void validatePluginActions(TDEActionCollection*, KMPrinter*);
68 TQString stateInformation();
72 void printerIppReport();
75 void slotConnectionFailed(
int );
76 void slotConnectionSuccess();
77 void slotAsyncConnect();
80 void hostPingFailedSlot();
85 void loadServerPrinters();
86 void processRequest(IppRequest*);
87 bool setPrinterState(KMPrinter *p,
int st);
88 DrMain* loadDriverFile(
const TQString& filename);
89 DrMain* loadMaticDriver(
const TQString& drname);
90 void saveDriverFile(DrMain *driver,
const TQString& filename);
91 void reportIppError(IppRequest*);
92 void* loadCupsdConfFunction(
const char*);
93 void unloadCupsdConf();
94 TQString cupsInstallDir();
95 void ippReport(IppRequest&,
int,
const TQString&);
96 void checkUpdatePossibleInternal();
99 KLibrary *m_cupsdconf;
100 KMPrinter *m_currentprinter;
101 KNetwork::KStreamSocket *m_socket;