kdeprint Library API Documentation

cupsinfos.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 CUPSINFOS_H
00021 #define CUPSINFOS_H
00022 
00023 #include <qstring.h>
00024 #include "kpreloadobject.h"
00025 
00026 class CupsInfos : public KPReloadObject
00027 {
00028 public:
00029     static CupsInfos* self();
00030 
00031     CupsInfos();
00032     ~CupsInfos();
00033 
00034     const QString& host() const;
00035     int port() const;
00036     const QString& login() const;
00037     const QString& password() const;
00038     const QString& realLogin() const;
00039     bool savePassword() const;
00040 
00041     void setHost(const QString& s);
00042     void setPort(int p);
00043     void setLogin(const QString& s);
00044     void setPassword(const QString& s);
00045     void setSavePassword( bool on );
00046 
00047     const char* getPasswordCB();
00048 
00049     void load();
00050     void save();
00051 
00052 protected:
00053     void reload();
00054     void configChanged();
00055 
00056 private:
00057     static CupsInfos    *unique_;
00058 
00059     QString host_;
00060     int port_;
00061     QString login_;
00062     QString password_;
00063     QString reallogin_;
00064     bool savepwd_;
00065 
00066     int count_;
00067 };
00068 
00069 inline const QString& CupsInfos::host() const
00070 { return host_; }
00071 
00072 inline int CupsInfos::port() const
00073 { return port_; }
00074 
00075 inline const QString& CupsInfos::login() const
00076 { return login_; }
00077 
00078 inline const QString& CupsInfos::password() const
00079 { return password_; }
00080 
00081 inline const QString& CupsInfos::realLogin() const
00082 { return reallogin_; }
00083 
00084 inline bool CupsInfos::savePassword() const
00085 { return savepwd_; }
00086 
00087 #endif
KDE Logo
This file is part of the documentation for kdeprint Library Version 3.3.2.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Fri Jul 22 10:18:01 2005 by doxygen 1.3.6 written by Dimitri van Heesch, © 1997-2003