KDELibs4Support

kfileshare.h
1 /* This file is part of the KDE project
2  Copyright (c) 2001 David Faure <[email protected]>
3  Copyright (c) 2001 Laurent Montel <[email protected]>
4 
5  This library is free software; you can redistribute it and/or
6  modify it under the terms of the GNU Library General Public
7  License version 2 as published by the Free Software Foundation.
8 
9  This library is distributed in the hope that it will be useful,
10  but WITHOUT ANY WARRANTY; without even the implied warranty of
11  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12  Library General Public License for more details.
13 
14  You should have received a copy of the GNU Library General Public License
15  along with this library; see the file COPYING.LIB. If not, write to
16  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17  Boston, MA 02110-1301, USA.
18 */
19 
20 #ifndef kfileshare_h
21 #define kfileshare_h
22 
23 #include <kdelibs4support_export.h>
24 class QString;
25 
31 namespace KFileShare
32 {
36 KDELIBS4SUPPORT_DEPRECATED_EXPORT void readConfig();
37 
41 KDELIBS4SUPPORT_DEPRECATED_EXPORT void readShareList();
42 
46 KDELIBS4SUPPORT_DEPRECATED_EXPORT bool isDirectoryShared(const QString &path);
47 
48 enum Authorization { NotInitialized, ErrorNotFound, Authorized, UserNotAllowed };
52 KDELIBS4SUPPORT_DEPRECATED_EXPORT Authorization authorization();
53 
61 KDELIBS4SUPPORT_DEPRECATED_EXPORT bool setShared(const QString &path, bool shared);
62 
70 enum ShareMode { Simple, Advanced };
71 
77 KDELIBS4SUPPORT_DEPRECATED_EXPORT bool sharingEnabled();
78 
85 KDELIBS4SUPPORT_DEPRECATED_EXPORT bool isRestricted();
86 
92 KDELIBS4SUPPORT_DEPRECATED_EXPORT QString fileShareGroup();
93 
97 KDELIBS4SUPPORT_DEPRECATED_EXPORT ShareMode shareMode();
98 
102 KDELIBS4SUPPORT_DEPRECATED_EXPORT bool sambaEnabled();
103 
107 KDELIBS4SUPPORT_DEPRECATED_EXPORT bool nfsEnabled();
108 }
109 
110 #endif
Common functionality for the file sharing (communication with the backend)
Definition: kfileshare.h:31
void readShareList()
Reads the list of shared folders.
Definition: kfileshare.cpp:193
bool sharingEnabled()
Returns whether sharing is enabled If this is false, file sharing is disabled and nobody can share fi...
Definition: kfileshare.cpp:148
bool isDirectoryShared(const QString &path)
Call this to know if a directory is currently shared.
Definition: kfileshare.cpp:225
bool setShared(const QString &path, bool shared)
Uses a suid perl script to share the given path with NFS and Samba.
Definition: kfileshare.cpp:246
ShareMode shareMode()
Returns the configured share mode.
Definition: kfileshare.cpp:139
bool isRestricted()
Returns whether file sharing is restricted.
Definition: kfileshare.cpp:157
QString fileShareGroup()
Returns the group that is used for file sharing.
Definition: kfileshare.cpp:166
bool nfsEnabled()
Returns whether NFS is enabled.
Definition: kfileshare.cpp:184
Authorization authorization()
Call this to know if the current user is authorized to share directories.
Definition: kfileshare.cpp:237
ShareMode
The used share mode.
Definition: kfileshare.h:70
void readConfig()
Reads the file share configuration file.
Definition: kfileshare.cpp:108
bool sambaEnabled()
Returns whether Samba is enabled.
Definition: kfileshare.cpp:175
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Wed Jan 27 2021 22:57:48 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.