• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • kdeprint
 

kdeprint

  • kdeprint
  • cups
kmcupsmanager.h
1 /*
2  * This file is part of the KDE libraries
3  * Copyright (c) 2001 Michael Goffioul <kdeprint@swing.be>
4  *
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Library General Public
7  * License version 2 as published by the Free Software Foundation.
8  *
9  * This library is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12  * Library General Public License for more details.
13  *
14  * You should have received a copy of the GNU Library General Public License
15  * along with this library; see the file COPYING.LIB. If not, write to
16  * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17  * Boston, MA 02110-1301, USA.
18  **/
19 
20 #ifndef KMCUPSMANAGER_H
21 #define KMCUPSMANAGER_H
22 
23 #include "kmmanager.h"
24 
25 class IppRequest;
26 class KLibrary;
27 class KExtendedSocket;
28 
29 namespace KNetwork {
30  class KStreamSocket;
31 }
32 
33 class KMCupsManager : public KMManager
34 {
35  friend class KMWIppPrinter;
36  friend class KMCupsJobManager;
37 
38  Q_OBJECT
39 public:
40  KMCupsManager(TQObject *parent, const char *name, const TQStringList & /*args*/);
41  virtual ~KMCupsManager();
42 
43  // printer management functions
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);
52 
53  // printer listing functions
54  // driver DB functions
55  TQString driverDbCreationProgram();
56  TQString driverDirectory();
57 
58  DrMain* loadPrinterDriver(KMPrinter *p, bool config = false);
59  DrMain* loadFileDriver(const TQString& filename);
60  bool savePrinterDriver(KMPrinter *p, DrMain *d);
61 
62  bool restartServer();
63  bool configureServer(TQWidget *parent = 0);
64  TQStringList detectLocalPrinters();
65 
66  void createPluginActions(KActionCollection*);
67  void validatePluginActions(KActionCollection*, KMPrinter*);
68  TQString stateInformation();
69 
70 public slots:
71  void exportDriver();
72  void printerIppReport();
73 
74 protected slots:
75  void slotConnectionFailed( int );
76  void slotConnectionSuccess();
77  void slotAsyncConnect();
78 
79  void hostPingSlot();
80  void hostPingFailedSlot();
81 
82 protected:
83  // the real printer listing job is done here
84  void listPrinters();
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();
97 
98 private:
99  KLibrary *m_cupsdconf;
100  KMPrinter *m_currentprinter;
101  KNetwork::KStreamSocket *m_socket;
102  bool m_hostSuccess;
103  bool m_lookupDone;
104 };
105 
106 #endif
KNetwork
Definition: kmcupsmanager.h:29

kdeprint

Skip menu "kdeprint"
  • Main Page
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Class Members
  • Related Pages

kdeprint

Skip menu "kdeprint"
  • arts
  • dcop
  • dnssd
  • interfaces
  •     interface
  •     library
  •   kspeech
  •   ktexteditor
  • kabc
  • kate
  • kcmshell
  • kdecore
  • kded
  • kdefx
  • kdeprint
  • kdesu
  • kdeui
  • kdoctools
  • khtml
  • kimgio
  • kinit
  • kio
  •   bookmarks
  •   httpfilter
  •   kfile
  •   kio
  •   kioexec
  •   kpasswdserver
  •   kssl
  • kioslave
  •   http
  • kjs
  • kmdi
  •   kmdi
  • knewstuff
  • kparts
  • krandr
  • kresources
  • kspell2
  • kunittest
  • kutils
  • kwallet
  • libkmid
  • libkscreensaver
Generated for kdeprint by doxygen 1.8.13
This website is maintained by Timothy Pearson.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. |