/***************************************************************************
                            QUrlOperator.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 QUrlOperatorSignals} for signals emitted by QUrlOperator.

 See {@link QUrlOperatorEventHandling} for event handlers to override in subclasses of QUrlOperator.

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

	private native void newQUrlOperator();
	public QUrlOperator() {
		super((Class) null);
		newQUrlOperator();
	}
	private native void newQUrlOperator( String urL);
	public QUrlOperator( String urL) {
		super((Class) null);
		newQUrlOperator( urL);
	}
	private native void newQUrlOperator( QUrlOperator url);
	public QUrlOperator( QUrlOperator url) {
		super((Class) null);
		newQUrlOperator( url);
	}
	private native void newQUrlOperator( QUrlOperator url, String relUrl, boolean checkSlash);
	public QUrlOperator( QUrlOperator url, String relUrl, boolean checkSlash) {
		super((Class) null);
		newQUrlOperator( url, relUrl, checkSlash);
	}
	private native void newQUrlOperator( QUrlOperator url, String relUrl);
	public QUrlOperator( QUrlOperator url, String relUrl) {
		super((Class) null);
		newQUrlOperator( url, relUrl);
	}
	protected native void finalize() throws InternalError;
	public native void setPath( String path);
	public native boolean cdUp();
	public native QNetworkOperation listChildren();
	public native QNetworkOperation mkdir( String dirname);
	public native QNetworkOperation remove( String filename);
	public native QNetworkOperation rename( String oldname, String newname);
	public native QNetworkOperation get( String location);
	public native QNetworkOperation get();
	public native QNetworkOperation put( byte[] data, String location);
	public native QNetworkOperation put( byte[] data);
	public native void copy( String[] files, String dest, boolean move);
	public native void copy( String[] files, String dest);
	public native boolean isDir( int[] ok);
	public native boolean isDir();
	public native void setNameFilter( String nameFilter);
	public native String nameFilter();
	public native QUrlInfo info( String entry);
	public native void stop();
	protected native void reset();
	protected native boolean parse( String url);
	protected native boolean checkValid();
	protected native void clearEntries();
	protected native void getNetworkProtocol();
	protected native void deleteNetworkProtocol();

        //
        // From QUrlInterface
        //
        public native String protocol();
        public native void setProtocol( String protocol);
        public native String user();
        public native void setUser( String user);
        public native boolean hasUser();
        public native String password();
        public native void setPassword( String pass);
        public native boolean hasPassword();
        public native String host();
        public native void setHost( String user);
        public native boolean hasHost();
        public native int port();
        public native void setPort( int port);
//        public native boolean hasPort();
        public native String path( boolean correct);
        public native boolean hasPath();
        public native void setEncodedPathAndQuery( String enc);
        public native String encodedPathAndQuery();
        public native void setQuery( String txt);
        public native String query();
        public native String ref();
        public native void setRef( String txt);
        public native boolean hasRef();
        public native boolean isValid();
        public native boolean isLocalFile();
        public native void addPath( String path);
        public native void setFileName( String txt);
        public native String fileName();
        public native String dirPath();
        public native String toString( boolean encodedPath, boolean forcePrependProtocol);
        public static native void decode( String url);
        public static native void encode( String url);
        public static native boolean isRelativeUrl( String url);

}
