HostProfileManager Class Reference

Host Profile Manager for the nvemFTP "bookmark" system. More...

#include <hostprofiles.h>


Public Member Functions

int loadHostProfiles ()
 Load host profiles from disk.

int saveHostProfiles ()
 Save all known host profiles to disk.

const QStringList getHostProfileNames () const
 Returns a list of all available host profile names.

int insertProfile (const NHostInfo &info)
 Inserts a new host profile.

bool exists (const QString &name) const
 Checks to see if a profile exists.

const NHostInfo findProfile (const QString &name) const
 Locate the host profile corresponding to name.


Static Public Member Functions

HostProfileManager & instance ()
 Returns a reference to the host profile manager object.

const HostProfileManager & const_instance ()
 Returns a const reference to the host profile manager object.


Protected Member Functions

 HostProfileManager ()
 Initialize the host profile manager.

 ~HostProfileManager ()
 Destructor.


Friends

class std::auto_ptr< HostProfileManager >
 Gives auto_ptr<nvemSettings> access to our destructor.


Detailed Description

Host Profile Manager for the nvemFTP "bookmark" system.

Handles the loading/saving of the lists, and keeps the list in memory for quick access. In the future, it may only parse for available profiles and load on demand.


Constructor & Destructor Documentation

HostProfileManager::HostProfileManager  )  [protected]
 

Initialize the host profile manager.

HostProfileManager::~HostProfileManager  )  [protected]
 

Destructor.


Member Function Documentation

const HostProfileManager& HostProfileManager::const_instance  )  [inline, static]
 

Returns a const reference to the host profile manager object.

bool HostProfileManager::exists const QString &  name  )  const
 

Checks to see if a profile exists.

name must be non-empty/null.

Parameters:
name Name of profile to check for.
Returns:
true if it exists, false otherwise.

const NHostInfo HostProfileManager::findProfile const QString &  name  )  const
 

Locate the host profile corresponding to name.

Parameters:
name Name of the Host Profile to look up.
Returns:
NHostInfo matching the name.

const QStringList HostProfileManager::getHostProfileNames  )  const
 

Returns a list of all available host profile names.

Returns:
QStringList containing all profile names.

int HostProfileManager::insertProfile const NHostInfo info  ) 
 

Inserts a new host profile.

Checks if the profile exists() first, and inserts it if it does not.

Parameters:
info New host profile to insert.
Returns:
0 on success, -1 if exists(name) returns true.

HostProfileManager& HostProfileManager::instance  )  [inline, static]
 

Returns a reference to the host profile manager object.

int HostProfileManager::loadHostProfiles  ) 
 

Load host profiles from disk.

In the future, this may accept a parameter for an alternate file.

Returns:
0 for success, >0 for warnings, <0 for errors.

int HostProfileManager::saveHostProfiles  ) 
 

Save all known host profiles to disk.

In the future, this may accept a parameter for an alternate file.

Returns:
0 for success, >0 for warnings, <0 for errors.


Friends And Related Function Documentation

friend class std::auto_ptr< HostProfileManager > [friend]
 

Gives auto_ptr<nvemSettings> access to our destructor.


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