7#include "ksambasharedata.h"
8#include "ksambasharedata_p.h"
10#include "ksambashare.h"
11#include "ksambashare_p.h"
22KSambaShareData::KSambaShareData()
23 : dd(new KSambaShareDataPrivate)
32KSambaShareData::~KSambaShareData()
58 return (dd->guestPermission ==
QLatin1Char(
'n')) ? GuestsNotAllowed : GuestsAllowed;
64 return UserShareNameInvalid;
68 return UserShareNameInUse;
71 if (!dd->name.isEmpty()) {
77 return UserShareNameOk;
83 if (result == UserSharePathOk) {
94 return UserShareCommentOk;
100 if (result == UserShareAclOk) {
110 if (result == UserShareGuestsOk) {
111 dd->guestPermission = (permission == GuestsNotAllowed) ? QStringLiteral(
"n") : QStringLiteral(
"y");
119 if (dd->name.isEmpty()) {
120 return UserShareNameInvalid;
121 }
else if (dd->path.isEmpty()) {
122 return UserSharePathInvalid;
130 if (dd->name.isEmpty()) {
131 return UserShareNameInvalid;
139 if (&other !=
this) {
148 return other.dd == dd;
153 return !(&other ==
this);
This class represents a Samba user share.
QString acl() const
Returns a containing a string describing the permission added to the users, such as "[DOMAIN\]usernam...
KSambaShareData::UserShareError setPath(const QString &path)
Set the path for the share.
KSambaShareData::UserShareError setAcl(const QString &acl)
Sets the acl to the share.
KSambaShareData::UserShareError setGuestPermission(const GuestPermission &permission=KSambaShareData::GuestsNotAllowed)
Flags if guest is allowed or not to access the share.
KSambaShareData::GuestPermission guestPermission() const
KSambaShareData::UserShareError remove()
Unshare the folder held by the object.
KSambaShareData::UserShareError setComment(const QString &comment)
Sets the comment for the share.
KSambaShareData::UserShareError save()
Share the folder with the information that has been set.
KSambaShareData::UserShareError setName(const QString &name)
Sets the share name.
static KSambaShare * instance()