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

tdeprint

  • tdeprint
  • cups
kmcupsmanager.h
1/*
2 * This file is part of the KDE libraries
3 * Copyright (c) 2001 Michael Goffioul <tdeprint@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
25class IppRequest;
26class KLibrary;
27class KExtendedSocket;
28
29namespace KNetwork {
30 class KStreamSocket;
31}
32
33class KMCupsManager : public KMManager
34{
35 friend class KMWIppPrinter;
36 friend class KMCupsJobManager;
37
38 TQ_OBJECT
39public:
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(TDEActionCollection*);
67 void validatePluginActions(TDEActionCollection*, KMPrinter*);
68 TQString stateInformation();
69
70public slots:
71 void exportDriver();
72 void printerIppReport();
73
74protected slots:
75 void slotConnectionFailed( int );
76 void slotConnectionSuccess();
77 void slotAsyncConnect();
78
79 void hostPingSlot();
80 void hostPingFailedSlot();
81
82protected:
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
98private:
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

tdeprint

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

tdeprint

Skip menu "tdeprint"
  • arts
  • dcop
  • dnssd
  • interfaces
  •   kspeech
  •     interface
  •     library
  •   tdetexteditor
  • kate
  • kded
  • kdoctools
  • kimgio
  • kjs
  • libtdemid
  • libtdescreensaver
  • tdeabc
  • tdecmshell
  • tdecore
  • tdefx
  • tdehtml
  • tdeinit
  • tdeio
  •   bookmarks
  •   httpfilter
  •   kpasswdserver
  •   kssl
  •   tdefile
  •   tdeio
  •   tdeioexec
  • tdeioslave
  •   http
  • tdemdi
  •   tdemdi
  • tdenewstuff
  • tdeparts
  • tdeprint
  • tderandr
  • tderesources
  • tdespell2
  • tdesu
  • tdeui
  • tdeunittest
  • tdeutils
  • tdewallet
Generated for tdeprint by doxygen 1.9.4
This website is maintained by Timothy Pearson.