• Skip to content
  • Skip to link menu
KDE 3.5 API Reference
  • KDE API Reference
  • API Reference
  • Sitemap
  • Contact Us
 

kio

KFileShare Class Reference

Common functionality for the file sharing (communication with the backend). More...

#include <kfileshare.h>

List of all members.


Public Types

enum  Authorization { NotInitialized, ErrorNotFound, Authorized, UserNotAllowed }
enum  ShareMode { Simple, Advanced }

Static Public Member Functions

static Authorization authorization ()
static QString fileShareGroup ()
static QString findExe (const char *exeName)
static bool isDirectoryShared (const QString &path)
static bool isRestricted ()
static bool nfsEnabled ()
static void readConfig ()
static void readShareList ()
static bool sambaEnabled ()
static bool setShared (const QString &path, bool shared)
static ShareMode shareMode ()
static bool sharingEnabled ()

Detailed Description

Common functionality for the file sharing (communication with the backend).

Since:
3.1

Definition at line 51 of file kfileshare.h.


Member Enumeration Documentation

enum KFileShare::Authorization

Enumerator:
NotInitialized 
ErrorNotFound 
Authorized 
UserNotAllowed 

Definition at line 72 of file kfileshare.h.

enum KFileShare::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.

Enumerator:
Simple 
Advanced 

Definition at line 96 of file kfileshare.h.


Member Function Documentation

KFileShare::Authorization KFileShare::authorization (  )  [static]

Call this to know if the current user is authorized to share directories.

Definition at line 214 of file kfileshare.cpp.

QString KFileShare::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 142 of file kfileshare.cpp.

QString KFileShare::findExe ( const char *  exeName  )  [static]

Definition at line 222 of file kfileshare.cpp.

bool KFileShare::isDirectoryShared ( const QString &  path  )  [static]

Call this to know if a directory is currently shared.

Definition at line 203 of file kfileshare.cpp.

bool KFileShare::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 135 of file kfileshare.cpp.

bool KFileShare::nfsEnabled (  )  [static]

Returns whether NFS is enabled.

Definition at line 157 of file kfileshare.cpp.

void KFileShare::readConfig (  )  [static]

Reads the file share configuration file.

Definition at line 86 of file kfileshare.cpp.

void KFileShare::readShareList (  )  [static]

Reads the list of shared folders.

Definition at line 165 of file kfileshare.cpp.

bool KFileShare::sambaEnabled (  )  [static]

Returns whether Samba is enabled.

Definition at line 150 of file kfileshare.cpp.

bool KFileShare::setShared ( const QString &  path,
bool  shared 
) [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 232 of file kfileshare.cpp.

KFileShare::ShareMode KFileShare::shareMode (  )  [static]

Returns the configured share mode.

Definition at line 121 of file kfileshare.cpp.

bool KFileShare::sharingEnabled (  )  [static]

Returns whether sharing is enabled If this is false, file sharing is disabled and nobody can share files.

Definition at line 128 of file kfileshare.cpp.


The documentation for this class was generated from the following files:
  • kfileshare.h
  • kfileshare.cpp

kio

Skip menu "kio"
  • Main Page
  • Modules
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

API Reference

Skip menu "API Reference"
  • dcop
  • DNSSD
  • interfaces
  • Kate
  • kconf_update
  • KDECore
  • KDED
  • kdefx
  • KDEsu
  • kdeui
  • KDocTools
  • KHTML
  • KImgIO
  • KInit
  • kio
  • kioslave
  • KJS
  • KNewStuff
  • KParts
  • KUtils
Generated for API Reference by doxygen 1.5.9
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal