/include/nhostinfo.h

00001 /* $Id: nhostinfo.h,v 1.10 2003/10/13 20:29:32 ndiin Exp $
00002  *
00003  * nhostinfo.h QUrl subclass for bookmark/host information.
00004  *
00005  *    Written by Eric Andresen
00006  *
00007  * Copyright 2002-2003 Eric Andresen
00008  * See COPYING for license information
00009  */
00010 
00011 #ifndef NHOSTINFO_H
00012 #define NHOSTINFO_H
00013 
00014 #include <qurl.h>
00015 
00016 #ifdef QT_DEBUG
00017 #  define HOSTINFO_PARSE
00018 #endif
00019 
00021 struct NHostInfoPriv;
00022 
00027 class NHostInfo : public QUrl
00028 {
00029 public:
00031    NHostInfo();
00033    NHostInfo(const QString &url, const QString &name = "");
00035    NHostInfo(const QUrl &url);
00037    NHostInfo(const NHostInfo &hInfo);
00039    virtual ~NHostInfo();
00040 
00042    virtual void setName(const QString &newname);
00043 
00048    virtual QString name() const;
00049 
00051    virtual bool named() const;
00052    
00061    virtual QString getSetting(const QString &setName, bool *ok = NULL) const;
00062 
00064    virtual void setSetting(const QString &setName, const QString &setting);
00065    
00067    virtual void setSetting(const QString &setName, const int &setting);
00068    
00070    virtual QString serialize() const;
00071 
00076    bool operator== (const NHostInfo &other) const;
00077 
00081    QString toStringSimple() const;
00082 
00089    static NHostInfo* unserialize(const QString &settings);
00090 
00091 #ifdef HOSTINFO_PARSE
00092 
00097    static NHostInfo* parseTextDump(const QString &textDump);
00098 #endif
00099 
00100 private:
00102    NHostInfoPriv *d;
00103 };
00104 
00105 #endif // NHOSTINFO_H
00106 

Generated on Wed Oct 22 20:32:04 2003 for nvemftp by doxygen1.3