/***************************************************************************
                            QNetworkProtocol.java -  description
                             -------------------
    begin                : Wed Nov 21 17:05:56 2001
    copyright            : (C) 2000-2001 Lost Highway Ltd. All rights reserved.
    email                : Lost_Highway@tipitina.demon.co.uk
    generated by         : duke@tipitina on Wed Nov 21 17:05:56 2001, 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.qt;

import java.util.*;
import java.lang.Error;

/**
 See {@link QNetworkProtocolSignals} for signals emitted by QNetworkProtocol.

 See {@link QNetworkProtocolEventHandling} for event handlers to override in subclasses of QNetworkProtocol.

*/
public class QNetworkProtocol extends QObject  {
	protected QNetworkProtocol(Class dummy){super((Class) null);}

	private native void newQNetworkProtocol();
	public QNetworkProtocol() {
		super((Class) null);
		newQNetworkProtocol();
	}
	protected native void finalize() throws InternalError;
	public native void setUrl( QUrlOperator u);
	public native void setAutoDelete( boolean b, int i);
	public native void setAutoDelete( boolean b);
	public native boolean autoDelete();
	public native int supportedOperations();
	public native void addOperation( QNetworkOperation op);
	public native QUrlOperator url();
	public native QNetworkOperation operationInProgress();
	public native void clearOperationQueue();
	public native void stop();
//	public static native void registerNetworkProtocol( String protocol, QNetworkProtocolFactoryBase protocolFactory);
	public static native QNetworkProtocol getNetworkProtocol( String protocol);
	public static native boolean hasOnlyLocalFileSystem();
	protected native void processOperation( QNetworkOperation op);
	protected native void operationListChildren( QNetworkOperation op);
	protected native void operationMkDir( QNetworkOperation op);
	protected native void operationRemove( QNetworkOperation op);
	protected native void operationRename( QNetworkOperation op);
	protected native void operationGet( QNetworkOperation op);
	protected native void operationPut( QNetworkOperation op);
	protected native void operationPutChunk( QNetworkOperation op);
	protected native boolean checkConnection( QNetworkOperation op);
	public static final int StWaiting = 0;
	public static final int StInProgress = 0;
	public static final int StDone = 1;
	public static final int StFailed = 2;
	public static final int StStopped = 3;
	public static final int OpListChildren = 1;
	public static final int OpMkDir = 2;
	public static final int OpMkdir = OpMkDir;
	public static final int OpRemove = 4;
	public static final int OpRename = 8;
	public static final int OpGet = 32;
	public static final int OpPut = 64;
	public static final int ConHostFound = 0;
	public static final int ConConnected = 1;
	public static final int ConClosed = 2;
	public static final int NoError = 0;
	public static final int ErrValid = 0;
	public static final int ErrUnknownProtocol = 1;
	public static final int ErrUnsupported = 2;
	public static final int ErrParse = 3;
	public static final int ErrLoginIncorrect = 4;
	public static final int ErrHostNotFound = 5;
	public static final int ErrListChildren = 6;
	public static final int ErrListChlidren = ErrListChildren;
	public static final int ErrMkDir = 7;
	public static final int ErrMkdir = ErrMkDir;
	public static final int ErrRemove = 8;
	public static final int ErrRename = 9;
	public static final int ErrGet = 10;
	public static final int ErrPut = 11;
	public static final int ErrFileNotExisting = 12;
	public static final int ErrPermissionDenied = 13;
}
