//Auto-generated by kalyptus. DO NOT EDIT.
package org.kde.koala;

import org.kde.qt.Qt;
import org.kde.qt.QtSupport;
import java.util.ArrayList;

/**

 KDE SSL Signer Database
 This class is used to manipulate the KDE SSL signer database.  It
 communicates to the KDE SSL daemon via dcop for backend integration.
		@author George Staikos <staikos@kde.org>

		@short KDE SSL Signer Database.
		@see KSSL
		@see KSSLCertificate

*/
public class KSSLSigners implements QtSupport {
	private long _qt;
	private boolean _allocatedInJavaWorld = true;
	protected KSSLSigners(Class dummy){}

	/**	
		  Construct a KSSLSigner object.
			 		@short     Construct a KSSLSigner object.
	*/
	public KSSLSigners() {
		newKSSLSigners();
	}
	private native void newKSSLSigners();
	/**	
		  Add a signer to the database.
			@param cert the signer's certificate
			@param ssl allow it to sign for SSL
			@param email allow it to sign for S/MIME
			@param code allow it to sign for code signing
				@return true on success
	 
		@short     Add a signer to the database.
	*/
	public native boolean addCA(KSSLCertificate cert, boolean ssl, boolean email, boolean code);
	/**	
		  Add a signer to the database.
			@param cert the signer's certificate in base64 form
			@param ssl allow it to sign for SSL
			@param email allow it to sign for S/MIME
			@param code allow it to sign for code signing
				@return true on success
	 
		@short     Add a signer to the database.
	*/
	public native boolean addCA(String cert, boolean ssl, boolean email, boolean code);
	/**	
		  Regenerate the signer-root file from the user's settings.
				@return true on success
	 
		@short     Regenerate the signer-root file from the user's settings.
	*/
	public native boolean regenerate();
	/**	
		  Determine if a certificate can be used for SSL certificate signing
			@param cert the certificate
				@return true if it can be used for SSL
	 
		@short     Determine if a certificate can be used for SSL certificate signing
	*/
	public native boolean useForSSL(KSSLCertificate cert);
	/**	
		  Determine if a certificate can be used for SSL certificate signing
			@param subject the certificate subject
				@return true if it can be used for SSL
	 
		@short     Determine if a certificate can be used for SSL certificate signing
	*/
	public native boolean useForSSL(String subject);
	/**	
		  Determine if a certificate can be used for S/MIME certificate signing
			@param cert the certificate
				@return true if it can be used for S/MIME
	 
		@short     Determine if a certificate can be used for S/MIME certificate signing
	*/
	public native boolean useForEmail(KSSLCertificate cert);
	/**	
		  Determine if a certificate can be used for S/MIME certificate signing
			@param subject the certificate subject
				@return true if it can be used for S/MIME
	 
		@short     Determine if a certificate can be used for S/MIME certificate signing
	*/
	public native boolean useForEmail(String subject);
	/**	
		  Determine if a certificate can be used for code certificate signing
			@param cert the certificate
				@return true if it can be used for code
	 
		@short     Determine if a certificate can be used for code certificate signing
	*/
	public native boolean useForCode(KSSLCertificate cert);
	/**	
		  Determine if a certificate can be used for code certificate signing
			@param subject the certificate subject
				@return true if it can be used for code
	 
		@short     Determine if a certificate can be used for code certificate signing
	*/
	public native boolean useForCode(String subject);
	/**	
		  Remove a certificate signer from the database
			@param cert the certificate to remove
				@return true on success
	 
		@short     Remove a certificate signer from the database
	*/
	public native boolean remove(KSSLCertificate cert);
	/**	
		  Remove a certificate signer from the database
			@param subject the subject of the certificate to remove
				@return true on success
	 
		@short     Remove a certificate signer from the database
	*/
	public native boolean remove(String subject);
	/**	
		  List the signers in the database.
				@return the list of subjects in the database

		@short     List the signers in the database.
		@see #getCert
	*/
	public native ArrayList list();
	/**	
		  Get a signer certificate from the database.
			@param subject the subject of the certificate desired
				@return the base64 encoded certificate
	 
		@short     Get a signer certificate from the database.
	*/
	public native String getCert(String subject);
	/**	
		  Set the use of a particular entry in the certificate signer database.
			@param subject the subject of the certificate in question
			@param ssl allow this for SSL certificate signing
			@param email allow this for S/MIME certificate signing
			@param code allow this for code certificate signing
				@return true on success
	 
		@short     Set the use of a particular entry in the certificate signer database.
	*/
	public native boolean setUse(String subject, boolean ssl, boolean email, boolean code);
	/** Deletes the wrapped C++ instance */
	protected native void finalize() throws InternalError;
	/** Delete the wrapped C++ instance ahead of finalize() */
	public native void dispose();
	/** Has the wrapped C++ instance been deleted? */
	public native boolean isDisposed();
}
