/***************************************************************************
                            KSSL.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;

public class  KSSL implements QtSupport {
	private long _qt;
	private boolean _allocatedInJavaWorld = true;

	protected KSSL(Class dummy){}

	private native void newKSSL( boolean init);
	public KSSL( boolean init) {
		newKSSL( init);
	}
	private native void newKSSL();
	public KSSL() {
		newKSSL();
	}
	protected native void finalize() throws InternalError;
	public native void dispose();
	public native boolean isDisposed();
	public native boolean initialize();

/** 
 This is used for apps which do STARTTLS or something similar.
 It creates a TLS method regardless of the user's settings.
   
*/
	public native boolean TLSInit();
	public native void close();
	public native boolean reInitialize();
	public native boolean reconfig();
	public native void setAutoReconfig( boolean ar);

/** 
 This will reseed the PRNG with the EGD if the EGD is configured and
 enabled.  You don't need to call this yourself normally.
   
*/
	public native int seedWithEGD();

/** 
 Set a new KSSLSettings instance as the settings.
 This deletes the current instance of KSSLSettings.
   
*/
	public native boolean setSettings( KSSLSettings settings);

/** 

*/
	public native KSSLSettings settings();

/** 

*/
//	public native boolean setClientCertificate( KSSLPKCS12 pkcs);

/** 
 Set the status of the connection with respect to proxies.
 realIP is the IP address of the host you're connecting to
 realPort is the port of the host you're connecting to
 proxy is the IP or hostname of the proxy server
   
*/
	public native void setProxyUse( boolean active, String realIP, int realPort, String proxy);
	public native void setProxyUse( boolean active);
	public native void setPeerHost( String realHost);
	public native void setPeerHost();
	public native int connect( int sock);
	public native int read( int buf, int len);
	public native int peek( int buf, int len);
	public native int write( int buf, int len);
	public native int pending();
	public native KSSLConnectionInfo connectionInfo();
	public native KSSLPeerInfo peerInfo();
	public static native boolean doesSSLWork();
}
