Main Page · Namespace List · Alphabetical List · Class List · File List · Namespace Members · Class Members · File Members · Related Pages

printersetupdb.h

Go to the documentation of this file.
00001 /***************************************************************************
00002  *   Copyright (C) 2005-2006 by Konrad Wilhelm Kleine
00003  *   konrad@plothe-kleine.de
00004  *
00005  *   This file contains the class definition for the LinuxPrinterSetup
00006  *   Database (lpsdb). The database is a subclassed Qt QDomDocument with
00007  *   extended functionality to get information about manufacturers models
00008  *   and drivers.
00009  *   As the LinuxPrinterSetup project is splitted up into three different
00010  *   subprojects (PrinterDriverToXML, PrinterAutoSetup, PrinterManualSetup)
00011  *   but only one of it (PrinterDriverToXML) really writes to the Database,
00012  *   this library only contains methods to query the database read-only.
00013  *
00014  *   PLEASE NOTICE: If not stated otherwise, whenever we speak of 'printer
00015  *                  drivers' or simply 'drivers', we mean the PPD files
00016  *                  and not the actual drivers.
00017  *
00018  *   STATUS: File has been reviewed and commented
00019  *
00020  *   $Id: printersetupdb.h,v 1.5 2006/04/23 16:06:22 hbci Exp $
00021  *
00022  *   This program is free software; you can redistribute it and/or modify
00023  *   it under the terms of the GNU General Public License as published by
00024  *   the Free Software Foundation; either version 2 of the License, or
00025  *   (at your option) any later version.
00026  *
00027  *   This program is distributed in the hope that it will be useful,
00028  *   but WITHOUT ANY WARRANTY; without even the implied warranty of
00029  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00030  *   GNU General Public License for more details.
00031  *
00032  *   You should have received a copy of the GNU General Public License
00033  *   along with this program; if not, write to the Free Software Foundation,
00034  *   Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
00035  ***************************************************************************/
00036 
00037 #ifndef PRINTERSETUPDB_H
00038 #define PRINTERSETUPDB_H
00039 
00040 // Qt includes
00041 #include <qdom.h>
00042 
00052 class PrinterSetupDb : public QDomDocument
00053 {
00054 public:
00055 
00056 
00062   PrinterSetupDb( const QString & name );
00063 
00064 
00068   ~PrinterSetupDb();
00069 
00070 
00074   QDomNodeList getManufacturers() const;
00075 
00076 
00082   QDomNodeList getModels( const QString & manufacturer ) const;
00083 
00084 
00091   QDomNodeList getDriversByModel( const QString & manufacturer,
00092                                   const QString & model
00093                                 ) const;
00094 
00095 
00102   QDomNodeList getDriversByProduct( const QString & manufacturer,
00103                                     const QString & product
00104                                   ) const;
00105 
00106 
00116   QDomElement getDriverByModel( const QString & manufacturer,
00117                                 const QString & model,
00118                                 const QString & driver
00119                               ) const;
00120 
00121 
00135   QDomElement getDriverByProduct( const QString & manufacturer,
00136                                   const QString & product,
00137                                   const QString & driver
00138                                 ) const;
00139 
00140 
00146   bool manufacturerExists( const QString & manufacturer ) const;
00147 
00148 
00154   QDomElement getManufacturer( const QString & manufacturer ) const;
00155 
00156 
00164   QDomElement getModel( const QString & manufacturer,
00165                         const QString & model       ="",
00166                         const QString & product     =""
00167                       ) const;
00168 
00169 
00175   QDomNodeList getDrivers( const QString & name ) const;
00176 
00177 
00178 private:
00179 
00180 
00191   QDomElement getDriver( const QDomNodeList & driverNodes,
00192                          const QString & driver
00193                        ) const;
00194 };
00195 
00196 #endif


To get more information, please visit our project site hosted at SourceForge.net Logo
To support this project, please click on this image: Support This Project

Copyright © 2005-2006 Linux Printer Setup Documentation generated by Doxygen 1.4.4 LPS 1.0 (Disclaimer)