KIO
#include <ksambasharedata.h>
Public Member Functions | |
KSambaShareData () | |
KSambaShareData (const KSambaShareData &other) | |
~KSambaShareData () | |
QString | acl () const |
QString | comment () const |
KSambaShareData::GuestPermission | guestPermission () const |
QString | name () const |
bool | operator!= (const KSambaShareData &other) const |
KSambaShareData & | operator= (const KSambaShareData &other) |
bool | operator== (const KSambaShareData &other) const |
QString | path () const |
KSambaShareData::UserShareError | remove () |
KSambaShareData::UserShareError | save () |
KSambaShareData::UserShareError | setAcl (const QString &acl) |
KSambaShareData::UserShareError | setComment (const QString &comment) |
KSambaShareData::UserShareError | setGuestPermission (const GuestPermission &permission=KSambaShareData::GuestsNotAllowed) |
KSambaShareData::UserShareError | setName (const QString &name) |
KSambaShareData::UserShareError | setPath (const QString &path) |
Detailed Description
This class represents a Samba user share.
It is possible to share a directory with one or more different names, update the share details or remove.
- Since
- 4.7
Definition at line 39 of file ksambasharedata.h.
Member Enumeration Documentation
Enumerator | |
---|---|
GuestsNotAllowed | |
GuestsAllowed |
Definition at line 43 of file ksambasharedata.h.
Definition at line 48 of file ksambasharedata.h.
Constructor & Destructor Documentation
KSambaShareData::KSambaShareData | ( | ) |
Definition at line 39 of file ksambasharedata.cpp.
KSambaShareData::KSambaShareData | ( | const KSambaShareData & | other | ) |
Definition at line 44 of file ksambasharedata.cpp.
KSambaShareData::~KSambaShareData | ( | ) |
Definition at line 49 of file ksambasharedata.cpp.
Member Function Documentation
QString KSambaShareData::acl | ( | ) | const |
Returns a containing
a string describing the permission added to the users, such as "[DOMAIN\]username1:X,[DOMAIN\]username2:X,...".
X stands for "F" (full control), "R" (read-only) and "D" (deny). By dafault the acl is Everyone:R.
- Returns
the
share acl.
Definition at line 68 of file ksambasharedata.cpp.
QString KSambaShareData::comment | ( | ) | const |
- Returns
the
share comment.
Definition at line 63 of file ksambasharedata.cpp.
KSambaShareData::GuestPermission KSambaShareData::guestPermission | ( | ) | const |
- Returns
whether
guest access to the share is allowed or not.
Definition at line 73 of file ksambasharedata.cpp.
QString KSambaShareData::name | ( | ) | const |
- Returns
the
share name.
Definition at line 53 of file ksambasharedata.cpp.
bool KSambaShareData::operator!= | ( | const KSambaShareData & | other | ) | const |
Definition at line 169 of file ksambasharedata.cpp.
KSambaShareData & KSambaShareData::operator= | ( | const KSambaShareData & | other | ) |
Definition at line 155 of file ksambasharedata.cpp.
bool KSambaShareData::operator== | ( | const KSambaShareData & | other | ) | const |
Definition at line 164 of file ksambasharedata.cpp.
QString KSambaShareData::path | ( | ) | const |
- Returns
the
share path.
Definition at line 58 of file ksambasharedata.cpp.
KSambaShareData::UserShareError KSambaShareData::remove | ( | ) |
Unshare the folder held by the object.
- Returns
UserShareOk
if the share was removed.
Definition at line 146 of file ksambasharedata.cpp.
KSambaShareData::UserShareError KSambaShareData::save | ( | ) |
Share the folder with the information that has been set.
- Returns
UserShareOk
if the share was added.
Definition at line 135 of file ksambasharedata.cpp.
KSambaShareData::UserShareError KSambaShareData::setAcl | ( | const QString & | acl | ) |
Sets the acl to the share.
- Parameters
-
acl the acl that will be given to the share.
- Returns
UserShareAclOk
if the acl is valid.-
UserShareAclInvalid
if the acl has invalid format. -
UserShareAclUserNotValid
if one of the users in the acl is invalid.
Definition at line 115 of file ksambasharedata.cpp.
KSambaShareData::UserShareError KSambaShareData::setComment | ( | const QString & | comment | ) |
Sets the comment for the share.
- Parameters
-
comment the comment that will be given to the share.
- Returns
UserShareCommentOk
always.
Definition at line 108 of file ksambasharedata.cpp.
KSambaShareData::UserShareError KSambaShareData::setGuestPermission | ( | const GuestPermission & | permission = KSambaShareData::GuestsNotAllowed | ) |
Flags if guest is allowed or not to access the share.
- Parameters
-
permission the permission that will be given to the share.
- Returns
UserShareGuestsOk
if the permission was set.-
UserShareGuestsNotAllowed
if the system does not allow guest access to the shares.
Definition at line 125 of file ksambasharedata.cpp.
KSambaShareData::UserShareError KSambaShareData::setName | ( | const QString & | name | ) |
Sets the share name.
If the share name is changed and valid it will remove the existing share and will create a new share. The share name cannot use a name of a system user or containing the forbidden characters '%, <, >, *, ?, |, /, \, +, =, ;, :, ",,. To check if the name is available or valid use the method KSambaShare::isShareNameAvailable().
- Parameters
-
name the name that will be given to the share.
- Returns
UserShareNameOk
if the name is valid.-
UserShareNameInvalid
if the name contains invalid characters. -
UserShareNameInUse
if the name is already in use by another shared folder or a by a system user.
Definition at line 78 of file ksambasharedata.cpp.
KSambaShareData::UserShareError KSambaShareData::setPath | ( | const QString & | path | ) |
Set the path for the share.
- Parameters
-
path the path that will be given to the share.
- Returns
UserSharePathOk
if valid.-
UserSharePathInvalid
if the path is in invalid format. -
UserSharePathNotExists
if the path does not exists. -
UserSharePathNotDirectory
if the path points to file instead of a directory. -
UserSharePathNotAbsolute
if the path is not is absolute form. -
UserSharePathNotAllowed
if the path is not owner by the user.
Definition at line 98 of file ksambasharedata.cpp.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:50:04 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.