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

import org.trinitydesktop.qt.TQt;
import org.trinitydesktop.qt.QtSupport;

/**

 KDE PKCS#7 Certificate
 This class represents a PKCS#7 certificate
		@author George Staikos <staikos@kde.org>

		@short KDE PKCS#7 Certificate.
		@see KSSL

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

	/**
		  The name of this certificate.  This can be used to refer to the
		  certificate instead of passing the object itself.
				@return the name of the certificate

		@short     The name of this certificate.
	*/
	public native String name();
	/**
		  Convert to a Base64 string.
				@return the PKCS#7 object in base64 form

		@short     Convert to a Base64 string.
	*/
	public native String toString();
	/**
		  Raw set the PKCS7 object.
			@param c the PKCS7 object
				 		@short     Raw set the PKCS7 object.
	*/
	// void setCert(PKCS7* arg1); >>>> NOT CONVERTED
	/**
		  Get the bottom level X.509 certificate.
				@return the certificate, or NULL on failure

		@short     Get the bottom level X.
		@see KSSLCertificate
	*/
	public native KSSLCertificate getCertificate();
	/**
		  Get the certificate chain.
				@return the certificate chain

		@short     Get the certificate chain.
		@see KSSLCertChain
	*/
	public native KSSLCertChain getChain();
	/**
		  Write the PKCS#7 to a file in raw mode.
			@param filename the filename to write
				@return true on success

		@short     Write the PKCS#7 to a file in raw mode.
	*/
	public native boolean toFile(String filename);
	/**
		  Return true if the chain is valid.
			 		@short     Return true if the chain is valid.
	*/
	public native boolean isValid();
	/**
		  Create a KSSLPKCS7 object from a Base64 in a String.
			@param base64 the base64 representation of the certificate
				@return a PKCS#7 object, or NULL on failure

		@short     Create a KSSLPKCS7 object from a Base64 in a String.
	*/
	public static native KSSLPKCS7 fromString(String base64);
	/**
		  Create a KSSLPKCS7 object by reading a PKCS#7 file.
			@param filename the filename to read the certificate from
				@return a PKCS#7 object, or NULL on failure

		@short     Create a KSSLPKCS7 object by reading a PKCS#7 file.
	*/
	public static native KSSLPKCS7 loadCertFile(String filename);
	public KSSLPKCS7() {
		newKSSLPKCS7();
	}
	private native void newKSSLPKCS7();
	/** 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();
}
