00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef CUPSINFOS_H
00021 #define CUPSINFOS_H
00022
00023 #include <tqstring.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 TQString& host() const;
00035 TQString hostaddr() const;
00036 int port() const;
00037 const TQString& login() const;
00038 const TQString& password() const;
00039 const TQString& realLogin() const;
00040 bool savePassword() const;
00041
00042 void setHost(const TQString& s);
00043 void setPort(int p);
00044 void setLogin(const TQString& s);
00045 void setPassword(const TQString& s);
00046 void setSavePassword( bool on );
00047
00048 const char* getPasswordCB();
00049
00050 void load();
00051 void save();
00052
00053 protected:
00054 void reload();
00055 void configChanged();
00056
00057 private:
00058 static CupsInfos *unique_;
00059
00060 TQString host_;
00061 int port_;
00062 TQString login_;
00063 TQString password_;
00064 TQString reallogin_;
00065 bool savepwd_;
00066
00067 int count_;
00068 };
00069
00070 inline const TQString& CupsInfos::host() const
00071 { return host_; }
00072
00073 inline int CupsInfos::port() const
00074 { return port_; }
00075
00076 inline const TQString& CupsInfos::login() const
00077 { return login_; }
00078
00079 inline const TQString& CupsInfos::password() const
00080 { return password_; }
00081
00082 inline const TQString& CupsInfos::realLogin() const
00083 { return reallogin_; }
00084
00085 inline bool CupsInfos::savePassword() const
00086 { return savepwd_; }
00087
00088 #endif