limal-nfs-server
Public Member Functions | Private Attributes | Friends

limal::nfs_server::ExportEntry Class Reference

Export entry path with a list of client specifications. More...

#include <NfsExports.hpp>

List of all members.

Public Member Functions

 ExportEntry ()
 ExportEntry (const ExportEntry &entry)
 ExportEntry (const BLOCXX_NAMESPACE::String &path, const ExportClients &clients)
 ExportEntry (const BLOCXX_NAMESPACE::String &path, const ExportClients &clients, const ExportComment &comment)
 ~ExportEntry ()
bool empty () const
BLOCXX_NAMESPACE::String toString () const
BLOCXX_NAMESPACE::StringArray toStringArray () const
BLOCXX_NAMESPACE::String getPath () const
ExportClients getClients () const
ExportComment getComment () const
void setPath (const BLOCXX_NAMESPACE::String &path)
void setClients (const ExportClients &clients)
void setComment (const ExportComment &comment)
bool addClient (const ExportClient &client)
bool removeClient (const BLOCXX_NAMESPACE::String &cname)
bool removeClient (const ExportClient &client)
void removeClients ()

Private Attributes

BLOCXX_NAMESPACE::String m_path
ExportClients m_clients
ExportComment m_comment

Friends

bool operator== (const ExportEntry &e1, const ExportEntry &e2)
bool operator< (const ExportEntry &e1, const ExportEntry &e2)

Detailed Description

Export entry path with a list of client specifications.

Exports file in-memory representation.


Constructor & Destructor Documentation

limal::nfs_server::ExportEntry::ExportEntry ( )

Construct a new, empty export entry.

limal::nfs_server::ExportEntry::ExportEntry ( const ExportEntry entry)

Construct a new export entry as copy of the specified one.

Parameters:
clientThe export client to copy.
limal::nfs_server::ExportEntry::ExportEntry ( const BLOCXX_NAMESPACE::String &  path,
const ExportClients clients 
)

Construct a new export entry using the specified path and client list.

Parameters:
pathThe export path.
clientsThe list of export clients.
limal::nfs_server::ExportEntry::ExportEntry ( const BLOCXX_NAMESPACE::String &  path,
const ExportClients clients,
const ExportComment comment 
)

Construct a new export entry using the specified path, client list and comment lines.

Parameters:
pathThe export path.
clientsThe list of export clients.
commentThe list comment lines for this entry.
limal::nfs_server::ExportEntry::~ExportEntry ( )

Destroy the export entry object.


Member Function Documentation

bool limal::nfs_server::ExportEntry::addClient ( const ExportClient client)

Adds the specified export client to the entry, but only if the entry does not contain any client with the same name.

Parameters:
clientThe export client to add.
Returns:
true, if the client was added.
bool limal::nfs_server::ExportEntry::empty ( ) const

Returns true if no path and clients are set.

Returns:
true if no path and clients are set.
ExportClients limal::nfs_server::ExportEntry::getClients ( ) const
Returns:
The list of export clients.
ExportComment limal::nfs_server::ExportEntry::getComment ( ) const
Returns:
The comment lines of this entry.
BLOCXX_NAMESPACE::String limal::nfs_server::ExportEntry::getPath ( ) const
Returns:
The export path.
bool limal::nfs_server::ExportEntry::removeClient ( const BLOCXX_NAMESPACE::String &  cname)

Removes the first export client with the specified client name from the enrty.

Parameters:
cnameThe export client name to search for.
Returns:
true, if a client was removed.
bool limal::nfs_server::ExportEntry::removeClient ( const ExportClient client)

Removes the first export client that is equal to the specified one.

Parameters:
clientThe export client to search for.
Returns:
true, if a client was removed.
void limal::nfs_server::ExportEntry::removeClients ( )

Removes all the clients. just clear the m_clients

void limal::nfs_server::ExportEntry::setClients ( const ExportClients clients)

Sets the entry's client list to the specified one.

Parameters:
clientsThe new export clients list.
void limal::nfs_server::ExportEntry::setComment ( const ExportComment comment)

Sets the comment for this entry.

Parameters:
commentThe new entry comment.
void limal::nfs_server::ExportEntry::setPath ( const BLOCXX_NAMESPACE::String &  path)

Sets the entry's export path to the specified one.

Parameters:
clientsThe new export path.
BLOCXX_NAMESPACE::String limal::nfs_server::ExportEntry::toString ( ) const
Returns:
The export path and a space separated list of clients.
BLOCXX_NAMESPACE::StringArray limal::nfs_server::ExportEntry::toStringArray ( ) const
Returns:
The a string array containing the export path followed by the list of export clients in string format.

Friends And Related Function Documentation

bool operator< ( const ExportEntry e1,
const ExportEntry e2 
) [friend]
bool operator== ( const ExportEntry e1,
const ExportEntry e2 
) [friend]

Member Data Documentation

BLOCXX_NAMESPACE::String limal::nfs_server::ExportEntry::m_path [private]

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