/***************************************************************************
                            StatJob.m -  description
                             -------------------
    begin                : Fri Mar  8 13:55:08 2002
    copyright            : (C) 2000-2002 Lost Highway Ltd. All rights reserved.
    email                : Lost_Highway@tipitina.demon.co.uk
    generated by         : duke@tipitina on Fri Mar  8 13:55:08 2002, using kalyptus 0.9.
 ***************************************************************************/

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

#include <qtc/qt_QString.h>
#include <qtc/qt_QCString.h>
#include <kdec/kde_StatJob.h>
#include <kdeobjc/KDESupport.h>
#include <kdeobjc/StatJob.h>
#include <kdeobjc/KURL.h>
#include <qtobjc/QByteArray.h>
#include <kdeobjc/Slave.h>


@implementation  StatJob


- initWithURL: (KURL*)url command: (int)command packedArgs: (QByteArray*)packedArgs showProgressInfo: (BOOL)showProgressInfo
{
	if ([self qt] == 0L) {
		[self setQt: kde_new_StatJob((kde_KURL*) [url qt], (int)command, (qt_QByteArray*) [packedArgs qt], (int)showProgressInfo)];
		[self setAllocatedInObjcWorld: YES];
		[QtSupport setObject: self forQtKey: [self qt]];
	}
	[super init];
	return self;
}

- setSide: (BOOL)source
{
	kde_StatJob_setSide((kde_StatJob *)[self qt], (int)source);
	return self;
}

- setDetails: (short int)details
{
	kde_StatJob_setDetails((kde_StatJob *)[self qt], (short int) details);
	return self;
}

//- (UDSEntry*) statResult
//{
//	return (UDSEntry*) kde_StatJob_statResult((kde_StatJob *)[self qt]);
//}

- start: (Slave*)slave
{
	kde_StatJob_start((kde_StatJob *)[self qt], (kde_Slave*) [slave qt]);
	return self;
}

//- slotStatEntry: (UDSEntry*)entry
//{
//	kde_StatJob_slotStatEntry((kde_StatJob *)[self qt], (kde_UDSEntry*) [entry qt]);
//	return self;
//}

- slotRedirection: (KURL*)url
{
	kde_StatJob_slotRedirection((kde_StatJob *)[self qt], (kde_KURL*) [url qt]);
	return self;
}

- slotFinished
{
	kde_StatJob_slotFinished((kde_StatJob *)[self qt]);
	return self;
}

@end
