/***************************************************************************
                            kde_NetAccess.cpp -  description
                             -------------------
    begin                : Wed Feb  6 15:12:26 2002
    copyright            : (C) 2000-2001 Lost Highway Ltd. All rights reserved.
    email                : Lost_Highway@tipitina.demon.co.uk
    generated by         : duke@tipitina on Wed Feb  6 15:12:26 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.                       *
 *                                                                         *
 ***************************************************************************/

extern "C" {
#include "kde_NetAccess.h"
}

#include <kio/netaccess.h>

int kde_NetAccess_download( kde_KURL* src, qt_QString * target){
	return (int) KIO::NetAccess::download((KURL&)* (KURL*)src, (QString&)* (QString*)target);
}
void kde_NetAccess_removeTempFile( qt_QString * name){
	KIO::NetAccess::removeTempFile((QString&)* (QString*)name);
	return;
}
int kde_NetAccess_upload( qt_QString * src, kde_KURL* target){
	return (int) KIO::NetAccess::upload((QString&)* (QString*)src, (KURL&)* (KURL*)target);
}
int kde_NetAccess_copy( kde_KURL* src, kde_KURL* target){
	return (int) KIO::NetAccess::copy((KURL&)* (KURL*)src, (KURL&)* (KURL*)target);
}
int kde_NetAccess_dircopy( kde_KURL* src, kde_KURL* target){
	return (int) KIO::NetAccess::dircopy((KURL&)* (KURL*)src, (KURL&)* (KURL*)target);
}
int kde_NetAccess_exists( kde_KURL* url){
	return (int) KIO::NetAccess::exists((KURL&)* (KURL*)url);
}
//int kde_NetAccess_stat( kde_KURL* url, kde_UDSEntry* entry){
//	return (int) KIO::NetAccess::stat((KURL&)* (KURL*)url, (KIO::UDSEntry&)* (KIO::UDSEntry*)entry);
//}
int kde_NetAccess_del( kde_KURL* url){
	return (int) KIO::NetAccess::del((KURL&)* (KURL*)url);
}
int kde_NetAccess_mkdir( kde_KURL* url, int permissions){
	return (int) KIO::NetAccess::mkdir((KURL&)* (KURL*)url, (int)permissions);
}
//qt_QString * kde_NetAccess_mimetype( kde_KURL* url){
//	return (qt_QString *)new QString(KIO::NetAccess::mimetype((KURL&)* (KURL*)url));
//}
qt_QString * kde_NetAccess_lastErrorString( ){
	return (qt_QString *)new QString(KIO::NetAccess::lastErrorString());
}
