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

limal::nfs_server::ExportClient Class Reference

Export client specification inclusive its option list. More...

#include <NfsExports.hpp>

List of all members.

Public Member Functions

 ExportClient ()
 ExportClient (const ExportClient &client)
 ExportClient (const BLOCXX_NAMESPACE::String &client, const ExportOptions &options)
 ExportClient (const BLOCXX_NAMESPACE::String &client, const BLOCXX_NAMESPACE::String &options)
 ExportClient (const BLOCXX_NAMESPACE::String &clientAndOpts)
 ~ExportClient ()
bool empty () const
BLOCXX_NAMESPACE::String toString () const
BLOCXX_NAMESPACE::String getClient () const
ExportOptions getOptions () const
BLOCXX_NAMESPACE::String getOptionsString () const
void setClient (const BLOCXX_NAMESPACE::String &client)
void setOptions (const ExportOptions &options)
void setOptions (const BLOCXX_NAMESPACE::String &options)

Static Public Member Functions

static ExportOptions parseOptions (const BLOCXX_NAMESPACE::String &options)

Private Attributes

BLOCXX_NAMESPACE::String m_client
ExportOptions m_options

Friends

bool operator== (const ExportClient &c1, const ExportClient &c2)
bool operator< (const ExportClient &c1, const ExportClient &c2)

Detailed Description

Export client specification inclusive its option list.

A ExportClient consists of its specification (e.g. hostname) followed by a comma-separated export option list enlosed in (), e.g. "dhcp*.local.domain(ro,sync,root_squash)".


Constructor & Destructor Documentation

limal::nfs_server::ExportClient::ExportClient ( )

Construct a new, empty export client object

limal::nfs_server::ExportClient::ExportClient ( const ExportClient client)

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

Parameters:
clientThe export client to copy.
limal::nfs_server::ExportClient::ExportClient ( const BLOCXX_NAMESPACE::String &  client,
const ExportOptions options 
)

Construct a new export client using the specified name and list of export options.

        ExportOptions opts;
      opts.push_back(ExportOption("ro"));
      opts.push_back(ExportOption("mountpoint=/some/path"));

        ExportClient("127.0.0.1", opts);
Parameters:
clientThe export client name.
optionsThe export option list.
limal::nfs_server::ExportClient::ExportClient ( const BLOCXX_NAMESPACE::String &  client,
const BLOCXX_NAMESPACE::String &  options 
)

Construct a new export client using the specified name and string with comma-separated export options.

        ExportClient("127.0.0.1", "ro,sync,mountpoint=/some/path");
Parameters:
clientThe export client name.
optionsThe string with export options.
limal::nfs_server::ExportClient::ExportClient ( const BLOCXX_NAMESPACE::String &  clientAndOpts)

Construct a new export client using the specified string representation of a export client, that is containing the client name followed by a string of comma-separated export options enclosed in ().

        ExportClient("127.0.0.1(ro,sync,mountpoint=/some/path)");
Parameters:
clientAndOptsThe string representation the export client.
limal::nfs_server::ExportClient::~ExportClient ( )

Destroy the export client object.


Member Function Documentation

bool limal::nfs_server::ExportClient::empty ( ) const

Returns true if the export client object doesn't contain any name and options.

Returns:
true if the export client is empty.
BLOCXX_NAMESPACE::String limal::nfs_server::ExportClient::getClient ( ) const

Returns the export client name.

Returns:
The export client name.
ExportOptions limal::nfs_server::ExportClient::getOptions ( ) const

Returns the export options list.

Returns:
The export options list.
BLOCXX_NAMESPACE::String limal::nfs_server::ExportClient::getOptionsString ( ) const

Returns the comma-separated export options.

Returns:
The export options string.
static ExportOptions limal::nfs_server::ExportClient::parseOptions ( const BLOCXX_NAMESPACE::String &  options) [static]

Parses the specified string as a list of comma-separated export options.

void limal::nfs_server::ExportClient::setClient ( const BLOCXX_NAMESPACE::String &  client)

Sets the export client name to the specified string.

Parameters:
clientThe client name string.
void limal::nfs_server::ExportClient::setOptions ( const ExportOptions options)

Sets the export option list.

Parameters:
optionsThe export option list.
void limal::nfs_server::ExportClient::setOptions ( const BLOCXX_NAMESPACE::String &  options)

Sets the export option list.

Parameters:
optionsThe export option list as string.
BLOCXX_NAMESPACE::String limal::nfs_server::ExportClient::toString ( ) const

Returns the client name, followed by a comma-separated list of export options enclosed in ().

Returns:
The string representation the export client.

Friends And Related Function Documentation

bool operator< ( const ExportClient c1,
const ExportClient c2 
) [friend]
bool operator== ( const ExportClient c1,
const ExportClient c2 
) [friend]

Member Data Documentation

BLOCXX_NAMESPACE::String limal::nfs_server::ExportClient::m_client [private]

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