You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
77 lines
2.4 KiB
77 lines
2.4 KiB
15 years ago
|
/*
|
||
|
* This file is part of the KDE libraries
|
||
13 years ago
|
* Copyright (c) 2001 Michael Goffioul <tdeprint@swing.be>
|
||
15 years ago
|
*
|
||
|
* This library is free software; you can redistribute it and/or
|
||
|
* modify it under the terms of the GNU Library General Public
|
||
|
* License version 2 as published by the Free Software Foundation.
|
||
|
*
|
||
|
* This library is distributed in the hope that it will be useful,
|
||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||
|
* Library General Public License for more details.
|
||
|
*
|
||
|
* You should have received a copy of the GNU Library General Public License
|
||
|
* along with this library; see the file COPYING.LIB. If not, write to
|
||
|
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||
|
* Boston, MA 02110-1301, USA.
|
||
|
**/
|
||
|
|
||
|
#ifndef KMLPDMANAGER_H
|
||
|
#define KMLPDMANAGER_H
|
||
|
|
||
|
#include "kmmanager.h"
|
||
14 years ago
|
#include <tqdict.h>
|
||
15 years ago
|
|
||
|
class PrintcapEntry;
|
||
|
class PrinttoolEntry;
|
||
|
class GsChecker;
|
||
|
|
||
|
class KMLpdManager : public KMManager
|
||
|
{
|
||
|
public:
|
||
14 years ago
|
KMLpdManager(TQObject *parent = 0, const char *name = 0);
|
||
15 years ago
|
~KMLpdManager();
|
||
|
|
||
|
bool completePrinterShort(KMPrinter*);
|
||
|
bool completePrinter(KMPrinter*);
|
||
|
bool createPrinter(KMPrinter*);
|
||
|
bool removePrinter(KMPrinter*);
|
||
|
bool enablePrinter(KMPrinter*);
|
||
|
bool disablePrinter(KMPrinter*);
|
||
|
|
||
|
// Driver DB functions
|
||
14 years ago
|
TQString driverDbCreationProgram();
|
||
|
TQString driverDirectory();
|
||
15 years ago
|
|
||
|
// Driver loading functions
|
||
|
DrMain* loadDbDriver(KMDBEntry*);
|
||
|
DrMain* loadPrinterDriver(KMPrinter *p, bool config = false);
|
||
|
bool savePrinterDriver(KMPrinter*, DrMain*);
|
||
|
bool validateDbDriver(KMDBEntry*);
|
||
|
|
||
|
protected:
|
||
|
void listPrinters();
|
||
|
bool writePrinters();
|
||
14 years ago
|
void loadPrintcapFile(const TQString& filename);
|
||
|
bool writePrintcapFile(const TQString& filename);
|
||
|
void loadPrinttoolDb(const TQString& filename);
|
||
|
TQMap<TQString,TQString> loadPrinttoolCfgFile(const TQString& filename);
|
||
|
bool savePrinttoolCfgFile(const TQString& templatefile, const TQString& dirname, const TQMap<TQString,TQString>& options);
|
||
|
bool checkGsDriver(const TQString& gsdriver);
|
||
15 years ago
|
bool createSpooldir(PrintcapEntry*);
|
||
|
bool createPrinttoolEntry(KMPrinter*, PrintcapEntry*);
|
||
14 years ago
|
PrintcapEntry* findPrintcapEntry(const TQString& name);
|
||
|
PrinttoolEntry* findPrinttoolEntry(const TQString& name);
|
||
14 years ago
|
TQString programName(int);
|
||
14 years ago
|
void checkStatus();
|
||
15 years ago
|
bool enablePrinter(KMPrinter*, bool);
|
||
|
|
||
|
private:
|
||
14 years ago
|
TQDict<PrintcapEntry> m_entries;
|
||
|
TQDict<PrinttoolEntry> m_ptentries;
|
||
15 years ago
|
GsChecker *m_gschecker;
|
||
|
};
|
||
|
|
||
|
#endif
|