| # kdeprint Library API Documentation
Overview | Class Hierarchy | Classes | Classes (annotated) | Members | Namespaces | Source Files

# kmcupsmanager.h

    00001 /*
    00002  *  This file is part of the KDE libraries
    00003  *  Copyright (c) 2001 Michael Goffioul <kdeprint@swing.be>
    00004  *
    00005  *  This library is free software; you can redistribute it and/or
    00006  *  modify it under the terms of the GNU Library General Public
    00007  *  License version 2 as published by the Free Software Foundation.
    00008  *
    00009  *  This library is distributed in the hope that it will be useful,
    00010  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    00011  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    00012  *  Library General Public License for more details.
    00013  *
    00014  *  You should have received a copy of the GNU Library General Public License
    00015  *  along with this library; see the file COPYING.LIB.  If not, write to
    00016  *  the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    00017  *  Boston, MA 02111-1307, USA.
    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 & /*args*/);
    00038     virtual ~KMCupsManager();
    00039
    00040     // printer management functions
    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     // printer listing functions
    00051     // driver DB functions
    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     // the real printer listing job is done here
    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.4.1.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Sat Jun 11 20:31:02 2005 by doxygen 1.4.1 written by Dimitri van Heesch, © 1997-2003