#include <tdefileshare.h>
Public Types | |
enum | Authorization { NotInitialized , ErrorNotFound , Authorized , UserNotAllowed } |
enum | ShareMode { Simple , Advanced } |
Static Public Member Functions | |
static void | readConfig () |
static void | readShareList () |
static int | isDirectoryShared (const TQString &path) |
static Authorization | authorization () |
static TQString | findExe (const char *exeName) |
static bool | setShared (const TQString &path, bool shared) |
static bool | SuSEsetShared (const TQString &path, bool shared, bool ro) |
static bool | sharingEnabled () |
static bool | isRestricted () |
static TQString | fileShareGroup () |
static ShareMode | shareMode () |
static bool | sambaEnabled () |
static bool | nfsEnabled () |
static bool | sambaActive () |
static bool | nfsActive () |
Detailed Description
Common functionality for the file sharing (communication with the backend)
- Since
- 3.1
Definition at line 51 of file tdefileshare.h.
Member Enumeration Documentation
◆ ShareMode
The used share mode.
Simple means that the simple sharing dialog is used and users can share only folders from there HOME folder. Advanced means that the advanced sharing dialog is used and users can share any folder.
Definition at line 101 of file tdefileshare.h.
Member Function Documentation
◆ authorization()
|
static |
Call this to know if the current user is authorized to share directories.
Definition at line 233 of file tdefileshare.cpp.
◆ fileShareGroup()
|
static |
Returns the group that is used for file sharing.
That is, all users in that group are allowed to share files if file sharing is restricted.
Definition at line 145 of file tdefileshare.cpp.
◆ isDirectoryShared()
|
static |
Call this to know if a directory is currently shared.
Definition at line 213 of file tdefileshare.cpp.
◆ isRestricted()
|
static |
Returns whether file sharing is restricted.
If it is not restricted every user can shar files. If it is restricted only users in the configured file share group can share files.
Definition at line 138 of file tdefileshare.cpp.
◆ nfsActive()
|
static |
Returns whether NFS is active (service is running)
Definition at line 333 of file tdefileshare.cpp.
◆ nfsEnabled()
|
static |
Returns whether NFS is enabled.
Definition at line 160 of file tdefileshare.cpp.
◆ readConfig()
|
static |
Reads the file share configuration file.
Definition at line 89 of file tdefileshare.cpp.
◆ readShareList()
|
static |
Reads the list of shared folders.
Definition at line 168 of file tdefileshare.cpp.
◆ sambaActive()
|
static |
Returns whether Samba is active (service is running)
Definition at line 326 of file tdefileshare.cpp.
◆ sambaEnabled()
|
static |
Returns whether Samba is enabled.
Definition at line 153 of file tdefileshare.cpp.
◆ setShared()
|
static |
Uses a suid perl script to share the given path with NFS and Samba.
- Parameters
-
path the path to share shared whether the path should be shared or not
- Returns
- whether the perl script was successful
Definition at line 251 of file tdefileshare.cpp.
◆ shareMode()
|
static |
Returns the configured share mode.
Definition at line 124 of file tdefileshare.cpp.
◆ sharingEnabled()
|
static |
Returns whether sharing is enabled If this is false, file sharing is disabled and nobody can share files.
Definition at line 131 of file tdefileshare.cpp.
The documentation for this class was generated from the following files: