limal::nfs_server::KNfsExports Class Reference

#include <KNfsExports.hpp>

Inheritance diagram for limal::nfs_server::KNfsExports:
limal::nfs_server::Exports

List of all members.

Public Member Functions

 KNfsExports ()
 KNfsExports (const Exports &exports)
 KNfsExports (const ExportEntries &entries)
 ~KNfsExports ()
bool validExportOptions (const ExportOptions &options) const
bool validExportClient (const ExportClient &client) const
bool validExportEntry (const ExportEntry &entry) const
BLOCXX_NAMESPACE::Array
< BLOCXX_NAMESPACE::String > 
verifyExportOptions (const ExportOptions &options) const
BLOCXX_NAMESPACE::Array
< BLOCXX_NAMESPACE::String > 
verifyExportClient (const ExportClient &client) const
BLOCXX_NAMESPACE::Array
< BLOCXX_NAMESPACE::String > 
verifyExportEntry (const ExportEntry &entry) const
void load (const BLOCXX_NAMESPACE::String &exportsFile)
void save (const BLOCXX_NAMESPACE::String &exportsFile, const BLOCXX_NAMESPACE::String &backupSuffix)

Static Public Member Functions

static Exports parseExportsFile (const BLOCXX_NAMESPACE::String &exportsFile)
static ExportEntry parseExportEntry (const BLOCXX_NAMESPACE::String &exportsLine)
static void writeExportsFile (const Exports &exports, const BLOCXX_NAMESPACE::String &exportsFile, const BLOCXX_NAMESPACE::String &backupSuffix)
static BLOCXX_NAMESPACE::String decodeSubStr (BLOCXX_NAMESPACE::String &str, const BLOCXX_NAMESPACE::String &stopAt)
static BLOCXX_NAMESPACE::String encodeString (const BLOCXX_NAMESPACE::String &str, bool exceptSpaces=false)

Private Attributes

KNfsExportRules * rules
bool dirty

Constructor & Destructor Documentation

limal::nfs_server::KNfsExports::KNfsExports (  ) 
limal::nfs_server::KNfsExports::KNfsExports ( const Exports exports  ) 
limal::nfs_server::KNfsExports::KNfsExports ( const ExportEntries entries  ) 
limal::nfs_server::KNfsExports::~KNfsExports (  ) 

Member Function Documentation

static BLOCXX_NAMESPACE ::String limal::nfs_server::KNfsExports::decodeSubStr ( BLOCXX_NAMESPACE::String &  str,
const BLOCXX_NAMESPACE::String &  stopAt 
) [static]

Decode first chunk of the string.

static BLOCXX_NAMESPACE ::String limal::nfs_server::KNfsExports::encodeString ( const BLOCXX_NAMESPACE::String &  str,
bool  exceptSpaces = false 
) [static]

Encode string to a form that can be written into a exports file. If exceptSpaces is true, the resulting string may be surrounded with quote marks ("") if it contains spaces. If exceptSpaces is false, all spaces are escaped to octal nmbers.

void limal::nfs_server::KNfsExports::load ( const BLOCXX_NAMESPACE::String &  exportsFile  ) 

Loads export entries from the specified exports file TODO: and checks if all clients and options are known to knfs / using correct syntax.

Parameters:
exportsFile The exports file name.
static ExportEntry limal::nfs_server::KNfsExports::parseExportEntry ( const BLOCXX_NAMESPACE::String &  exportsLine  )  [static]

Parse the specified (exports file encoded) line and construct an export entry object.

static Exports limal::nfs_server::KNfsExports::parseExportsFile ( const BLOCXX_NAMESPACE::String &  exportsFile  )  [static]

Parse specified exports file and return export entries found in the file.

void limal::nfs_server::KNfsExports::save ( const BLOCXX_NAMESPACE::String &  exportsFile,
const BLOCXX_NAMESPACE::String &  backupSuffix 
)

Saves current exports to specified exports file name creating a backup first if backupSuffix is not empty and the exports file alteady existed.

Parameters:
exportsFile The exports file name.
backupSuffix The suffix appended to exportsFile while writing a backup file.
bool limal::nfs_server::KNfsExports::validExportClient ( const ExportClient client  )  const
bool limal::nfs_server::KNfsExports::validExportEntry ( const ExportEntry entry  )  const
bool limal::nfs_server::KNfsExports::validExportOptions ( const ExportOptions options  )  const

Set export entries. Add export entry.

BLOCXX_NAMESPACE ::Array< BLOCXX_NAMESPACE ::String> limal::nfs_server::KNfsExports::verifyExportClient ( const ExportClient client  )  const
BLOCXX_NAMESPACE ::Array< BLOCXX_NAMESPACE ::String> limal::nfs_server::KNfsExports::verifyExportEntry ( const ExportEntry entry  )  const
BLOCXX_NAMESPACE ::Array< BLOCXX_NAMESPACE ::String> limal::nfs_server::KNfsExports::verifyExportOptions ( const ExportOptions options  )  const
static void limal::nfs_server::KNfsExports::writeExportsFile ( const Exports exports,
const BLOCXX_NAMESPACE::String &  exportsFile,
const BLOCXX_NAMESPACE::String &  backupSuffix 
) [static]

Saves specified export entries to the exports file name creating a backup first, if backupSuffix is not empty and the exports file already existed. No knfs related checks for export clients and options are done.

Parameters:
entries The export entries.
exportsFile The exports file name.
backupSuffix The suffix appended to exportsFile while writing a backup file.

Member Data Documentation

KNfsExportRules* limal::nfs_server::KNfsExports::rules [private]

The documentation for this class was generated from the following file:
Generated on Sun Aug 1 14:09:38 2010 for limal-nfs-server by  doxygen 1.6.3