limal-nfs-server
|
Export client specification inclusive its option list. More...
#include <NfsExports.hpp>
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) |
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)".
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.
client | The 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);
client | The export client name. |
options | The 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");
client | The export client name. |
options | The 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)");
clientAndOpts | The string representation the export client. |
limal::nfs_server::ExportClient::~ExportClient | ( | ) |
Destroy the export client object.
bool limal::nfs_server::ExportClient::empty | ( | ) | const |
Returns true if the export client object doesn't contain any name and options.
BLOCXX_NAMESPACE::String limal::nfs_server::ExportClient::getClient | ( | ) | const |
Returns the export client name.
ExportOptions limal::nfs_server::ExportClient::getOptions | ( | ) | const |
Returns the export options list.
BLOCXX_NAMESPACE::String limal::nfs_server::ExportClient::getOptionsString | ( | ) | const |
Returns the comma-separated export options.
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.
client | The client name string. |
void limal::nfs_server::ExportClient::setOptions | ( | const ExportOptions & | options | ) |
Sets the export option list.
options | The export option list. |
void limal::nfs_server::ExportClient::setOptions | ( | const BLOCXX_NAMESPACE::String & | options | ) |
Sets the export option list.
options | The 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 ().
bool operator< | ( | const ExportClient & | c1, |
const ExportClient & | c2 | ||
) | [friend] |
bool operator== | ( | const ExportClient & | c1, |
const ExportClient & | c2 | ||
) | [friend] |
BLOCXX_NAMESPACE::String limal::nfs_server::ExportClient::m_client [private] |