/***************************************************************************
                            StatJob.java -  description
                             -------------------
    begin                : Sun Jan 27 16:22:17 2002
    copyright            : (C) 2000-2001 Lost Highway Ltd.
    email                : Richard_Dale@tipitina.demon.co.uk
    generated by         : duke@tipitina on Sun Jan 27 16:22:17 2002, using kalyptus 0.9.
 ***************************************************************************/

/***************************************************************************
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *
***************************************************************************/

package org.kde.koala;

import org.kde.qt.*;
import java.util.*;
import java.lang.Error;

/**
 See {@link StatJobSignals} for signals emitted by StatJob.

 See {@link StatJobEventHandling} for event handlers to override in subclasses of StatJob.

*/
public class StatJob extends SimpleJob  {
	protected StatJob(Class dummy){super((Class) null);}

	private native void newStatJob( KURL url, int command, byte[] packedArgs, boolean showProgressInfo);
	public StatJob( KURL url, int command, byte[] packedArgs, boolean showProgressInfo) {
		super((Class) null);
		newStatJob( url, command, packedArgs, showProgressInfo);
	}

/**  A stat() can have two meanings. Either we want to read from this URL,
 or to check if we can write to it. First case is "source", second is "dest".
 It is necessary to know what the StatJob is for, to tune the kioslave's behaviour
 (e.g. with FTP)
         
*/
	public native void setSide( boolean source);

/** 
 Selects the level of details we want.
 By default this is 2 (all details wanted, including modification time, size, etc.),
 setDetails(1) is used when deleting: we don't need all the information if it takes
 too much time, no need to follow symlinks etc.
 setDetails(0) is used for very simple probing: we'll only get the answer
 "it's a file or a directory, or it doesn't exist". This is used by KRun.
         
*/
	public native void setDetails( short details);

/** 
 Call this in the slot connected to {@link result},
 and only after making sure no error happened.
         
*/
//	public native UDSEntry statResult();

/** 
 Called by the scheduler when a slave gets to
 work on this job.
         
*/
	public native void start( Slave slave);
//	protected native void slotStatEntry( UDSEntry entry);
	protected native void slotRedirection( KURL url);
	protected native void slotFinished();
}
