limal-nfs-server
Public Types | Public Member Functions | Private Attributes | List of all members
limal::nfs_server::Exports Class Reference

#include <NfsExports.hpp>

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

Public Types

enum  CommentType { E_LEADING, E_TRAILING }
 

Public Member Functions

 Exports ()
 
 Exports (const Exports &exports)
 
 Exports (const ExportEntries &entries)
 
 ~Exports ()
 
ExportPaths getPaths () const
 
ExportClients getClients (const BLOCXX_NAMESPACE::String &path) const
 
ExportEntries getEntries (const BLOCXX_NAMESPACE::String &path) const
 
ExportEntries getEntries () const
 
ExportComment getComment (CommentType type) const
 
void setEntries (const ExportEntries &entries)
 
void setComment (const ExportComment &comment, CommentType type)
 
void addEntry (const ExportEntry &entry)
 

Private Attributes

ExportEntries m_entries
 
ExportComment l_comment
 
ExportComment t_comment
 

Member Enumeration Documentation

Enumerator:
E_LEADING 
E_TRAILING 

Constructor & Destructor Documentation

limal::nfs_server::Exports::Exports ( )

Construct a new, empty exports object.

limal::nfs_server::Exports::Exports ( const Exports exports)

Construct a new exports object as a copy of the specified one.

Parameters
exportsThe exports object to copy.
limal::nfs_server::Exports::Exports ( const ExportEntries entries)

Construct a new set exports object as a copy of the specified list of export entries.

Parameters
entriesThe list of export entries to copy.
limal::nfs_server::Exports::~Exports ( )

Destroy the exports object.

Member Function Documentation

void limal::nfs_server::Exports::addEntry ( const ExportEntry entry)

Add the specified entry to the list. making sure to resolve duplicates in m_entries. If the export path is already is used in one of the existing entries we need to add the clients of 'entry' uniquely to that existing entry.

Parameters
entryThe entry to add.
ExportClients limal::nfs_server::Exports::getClients ( const BLOCXX_NAMESPACE::String &  path) const
Returns
All clients from entries with the specified path.
ExportComment limal::nfs_server::Exports::getComment ( CommentType  type) const
Returns
The leading or trailing comment lines.
ExportEntries limal::nfs_server::Exports::getEntries ( const BLOCXX_NAMESPACE::String &  path) const
Returns
All entries with the specified path.
ExportEntries limal::nfs_server::Exports::getEntries ( ) const
Returns
All entries in this Exports object.
ExportPaths limal::nfs_server::Exports::getPaths ( ) const
Returns
A list of uniqe paths.
void limal::nfs_server::Exports::setComment ( const ExportComment comment,
CommentType  type 
)

Sets the leading or trailing comment.

Parameters
commentThe new comment.
commentThe type of the comment.
void limal::nfs_server::Exports::setEntries ( const ExportEntries entries)

Replace the current list of entries with the specified one.

Parameters
entriesThe new list of export entries.

Member Data Documentation

ExportComment limal::nfs_server::Exports::l_comment
private
ExportEntries limal::nfs_server::Exports::m_entries
private
ExportComment limal::nfs_server::Exports::t_comment
private

The documentation for this class was generated from the following file: