24#include <tdelibs_export.h>
32class KFileSharePrivate :
public TQObject
39 KDirWatch* m_watchFile;
40 static KFileSharePrivate *self();
41 static KFileSharePrivate *_self;
43 void slotFileChange(
const TQString &);
72 enum Authorization { NotInitialized, ErrorNotFound, Authorized, UserNotAllowed };
78 static TQString findExe(
const char* exeName );
87 static bool setShared(
const TQString& path,
bool shared );
92 static bool SuSEsetShared(
const TQString& path,
bool shared,
bool ro );
108 static bool sharingEnabled();
116 static bool isRestricted();
123 static TQString fileShareGroup();
128 static ShareMode shareMode();
133 static bool sambaEnabled();
138 static bool nfsEnabled();
144 static bool sambaActive();
150 static bool nfsActive();
153 static Authorization s_authorization;
155 static TQMap<TQString,TQString>* s_shareMap;
156 static ShareMode s_shareMode;
157 static bool s_sambaEnabled;
158 static bool s_nfsEnabled;
159 static bool s_restricted;
160 static TQString s_fileShareGroup;
161 static bool s_sharingEnabled;
Watch directories and files for changes.
Common functionality for the file sharing (communication with the backend).
static void readShareList()
Reads the list of shared folders.
static Authorization authorization()
Call this to know if the current user is authorized to share directories.
static int isDirectoryShared(const TQString &path)
Call this to know if a directory is currently shared.
static bool setShared(const TQString &path, bool shared)
Uses a suid perl script to share the given path with NFS and Samba.
static void readConfig()
Reads the file share configuration file.
ShareMode
The used share mode.