NHostInfo Class Reference

QUrl : NNet Host Info / Bookmark. More...

#include <nhostinfo.h>


Public Member Functions

 NHostInfo ()
 Default constructor.

 NHostInfo (const QString &url, const QString &name="")
 Creates a NHostInfo from a URI string.

 NHostInfo (const QUrl &url)
 Copy constructor.

 NHostInfo (const NHostInfo &hInfo)
 Copy constructor.

virtual ~NHostInfo ()
 Destructor.

virtual void setName (const QString &newname)
 Set the name of the host profile.

virtual QString name () const
 Returns the name of the host profile.

virtual bool named () const
 Returns if the bookmark has an explicitly set name or not.

virtual QString getSetting (const QString &setName, bool *ok=NULL) const
 Return the host specific setting for setName.

virtual void setSetting (const QString &setName, const QString &setting)
 Set the associated value to setName to setting.

virtual void setSetting (const QString &setName, const int &setting)
 Set the associated value to setName to integer setting.

virtual QString serialize () const
 Serialize the URI and settings to a INI-style format QString.

bool operator== (const NHostInfo &other) const
 Checks equality of this to other.

QString toStringSimple () const
 Returns a simplified URI for the host.


Static Public Member Functions

NHostInfo * unserialize (const QString &settings)
 Unserialize back to an object using the output style of serialize().


Detailed Description

QUrl : NNet Host Info / Bookmark.

Stores host-specific settings in addition to the url.


Constructor & Destructor Documentation

NHostInfo::NHostInfo  ) 
 

Default constructor.

NHostInfo::NHostInfo const QString &  url,
const QString &  name = ""
 

Creates a NHostInfo from a URI string.

NHostInfo::NHostInfo const QUrl &  url  ) 
 

Copy constructor.

NHostInfo::NHostInfo const NHostInfo &  hInfo  ) 
 

Copy constructor.

NHostInfo::~NHostInfo  )  [virtual]
 

Destructor.


Member Function Documentation

QString NHostInfo::getSetting const QString &  setName,
bool *  ok = NULL
const [virtual]
 

Return the host specific setting for setName.

If the host does not contain a value for the setting, ok is set to false and QString::null is returned.

Parameters:
setName Setting to look up.
ok Pointer to a bool to verify if it exists or not.
Returns:
The associated value, or QString::null

QString NHostInfo::name  )  const [virtual]
 

Returns the name of the host profile.

If the profile is unnamed, toString() is returned.

bool NHostInfo::named  )  const [virtual]
 

Returns if the bookmark has an explicitly set name or not.

bool NHostInfo::operator== const NHostInfo &  other  )  const
 

Checks equality of this to other.

Returns:
true if they have the same name and use the same base URI (No path, password).

QString NHostInfo::serialize  )  const [virtual]
 

Serialize the URI and settings to a INI-style format QString.

void NHostInfo::setName const QString &  newname  )  [virtual]
 

Set the name of the host profile.

void NHostInfo::setSetting const QString &  setName,
const int &  setting
[virtual]
 

Set the associated value to setName to integer setting.

void NHostInfo::setSetting const QString &  setName,
const QString &  setting
[virtual]
 

Set the associated value to setName to setting.

QString NHostInfo::toStringSimple  )  const
 

Returns a simplified URI for the host.

Path information and passwords are ommitted.

NHostInfo * NHostInfo::unserialize const QString &  settings  )  [static]
 

Unserialize back to an object using the output style of serialize().

The returned pointer is to an object created with new, so it must be delete by the calling process.

Returns:
New NHostInfo object, or NULL if the format is invalid.


The documentation for this class was generated from the following files:
Generated on Wed Oct 22 20:32:04 2003 for nvemftp by doxygen1.3