//Auto-generated by kalyptus. DO NOT EDIT.
package org.trinitydesktop.koala;

import org.trinitydesktop.qt.Qt;
import org.trinitydesktop.qt.QtSupport;

/**

 Common functionality for the file sharing
 (communication with the backend)
		@short    Common functionality for the file sharing  (communication with the backend)

*/
public class KFileShare implements QtSupport {
	private long _qt;
	private boolean _allocatedInJavaWorld = true;
	protected KFileShare(Class dummy){}

	public static final int NotInitialized = 0;
	public static final int ErrorNotFound = 1;
	public static final int Authorized = 2;
	public static final int UserNotAllowed = 3;

	/**
		 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.
		     		@short    The used share mode.
	*/
	public static final int Simple = 0;
	public static final int Advanced = 1;

	public KFileShare() {
		newKFileShare();
	}
	private native void newKFileShare();
	/**
		 Reads the file share configuration file
		     		@short    Reads the file share configuration file
	*/
	public static native void readConfig();
	/**
		 Reads the list of shared folders
		     		@short    Reads the list of shared folders
	*/
	public static native void readShareList();
	/**
		 Call this to know if a directory is currently shared
		     		@short    Call this to know if a directory is currently shared
	*/
	public static native boolean isDirectoryShared(String path);
	/**
		 Call this to know if the current user is authorized to share directories
		     		@short    Call this to know if the current user is authorized to share directories
	*/
	public static native int authorization();
	public static native String findExe(String exeName);
	/**
		 Uses a suid perl script to share the given path
		 with NFS and Samba
			@param path the path to share
			@param shared whether the path should be shared or not
				@return whether the perl script was successful

		@short    Uses a suid perl script to share the given path   with NFS and Samba
	*/
	public static native boolean setShared(String path, boolean shared);
	/**
		 Returns whether sharing is enabled
		 If this is false, file sharing is disabled and
		 nobody can share files.
		     		@short    Returns whether sharing is enabled  If this is false, file sharing is disabled and  nobody can share files.
	*/
	public static native boolean sharingEnabled();
	/**
		 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.
		     		@short    Returns whether file sharing is restricted.
	*/
	public static native boolean isRestricted();
	/**
		 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.
		     		@short    Returns the group that is used for file sharing.
	*/
	public static native String fileShareGroup();
	/**
		 Returns the configured share mode
		     		@short    Returns the configured share mode
	*/
	public static native int shareMode();
	/**
		 Returns whether Samba is enabled
		     		@short    Returns whether Samba is enabled
	*/
	public static native boolean sambaEnabled();
	/**
		 Returns whether NFS is enabled
		     		@short     Returns whether NFS is enabled
	*/
	public static native boolean nfsEnabled();
	/** Deletes the wrapped C++ instance */
	protected native void finalize() throws InternalError;
	/** Delete the wrapped C++ instance ahead of finalize() */
	public native void dispose();
	/** Has the wrapped C++ instance been deleted? */
	public native boolean isDisposed();
}
