Search for usage in LXR

KSambaShareData Class Reference

#include <KSambaShareData>

Public Types

enum  GuestPermission { GuestsNotAllowed, GuestsAllowed }
enum  UserShareError {
  UserShareOk, UserShareExceedMaxShares, UserShareNameOk, UserShareNameInvalid,
  UserShareNameInUse, UserSharePathOk, UserSharePathInvalid, UserSharePathNotExists,
  UserSharePathNotDirectory, UserSharePathNotAbsolute, UserSharePathNotAllowed, UserShareAclOk,
  UserShareAclInvalid, UserShareAclUserNotValid, UserShareCommentOk, UserShareGuestsOk,
  UserShareGuestsInvalid, UserShareGuestsNotAllowed, UserShareSystemError

Public Member Functions

 KSambaShareData (const KSambaShareData &other)
QString acl () const
QString comment () const
KSambaShareData::GuestPermission guestPermission () const
QString name () const
bool operator!= (const KSambaShareData &other) const
KSambaShareDataoperator= (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.

Rodrigo Belem rclbe.nosp@m.lem@.nosp@m.gmail.nosp@m..com

Definition at line 27 of file ksambasharedata.h.

Member Function Documentation

◆ acl()

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 default the acl is Everyone:R.

the share acl.

Definition at line 51 of file ksambasharedata.cpp.

◆ comment()

QString KSambaShareData::comment ( ) const
the share comment.

Definition at line 46 of file ksambasharedata.cpp.

◆ guestPermission()

KSambaShareData::GuestPermission KSambaShareData::guestPermission ( ) const
whether guest access to the share is allowed or not.

Definition at line 56 of file ksambasharedata.cpp.

◆ name()

QString KSambaShareData::name ( ) const
the share name.

Definition at line 36 of file ksambasharedata.cpp.

◆ path()

QString KSambaShareData::path ( ) const
the share path.

Definition at line 41 of file ksambasharedata.cpp.

◆ remove()

KSambaShareData::UserShareError KSambaShareData::remove ( )

Unshare the folder held by the object.

UserShareOk if the share was removed or other errors as applicable. Also see UserShareSystemError.

Definition at line 128 of file ksambasharedata.cpp.

◆ save()

KSambaShareData::UserShareError KSambaShareData::save ( )

Share the folder with the information that has been set.

UserShareOk if the share was added or other errors as applicable. Also see UserShareSystemError.

Definition at line 117 of file ksambasharedata.cpp.

◆ setAcl()

KSambaShareData::UserShareError KSambaShareData::setAcl ( const QString acl)

Sets the acl to the share.

aclthe acl that will be given to the share.
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 97 of file ksambasharedata.cpp.

◆ setComment()

KSambaShareData::UserShareError KSambaShareData::setComment ( const QString comment)

Sets the comment for the share.

commentthe comment that will be given to the share.
UserShareCommentOk always.

Definition at line 90 of file ksambasharedata.cpp.

◆ setGuestPermission()

KSambaShareData::UserShareError KSambaShareData::setGuestPermission ( const GuestPermission &  permission = KSambaShareData::GuestsNotAllowed)

Flags if guest is allowed or not to access the share.

permissionthe permission that will be given to the share.
UserShareGuestsOk if the permission was set.
UserShareGuestsNotAllowed if the system does not allow guest access to the shares.

Definition at line 107 of file ksambasharedata.cpp.

◆ setName()

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().

namethe name that will be given to the share.
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 61 of file ksambasharedata.cpp.

◆ setPath()

KSambaShareData::UserShareError KSambaShareData::setPath ( const QString path)

Set the path for the share.

paththe path that will be given to the share.
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 80 of file ksambasharedata.cpp.

The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Tue Dec 5 2023 03:55:26 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.