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

import org.trinitydesktop.qt.TQt;
import org.trinitydesktop.qt.TQMetaObject;
import org.trinitydesktop.qt.QtSupport;
import org.trinitydesktop.qt.TQObject;
import org.trinitydesktop.qt.TQValidator;

/**

 This validator allows you to validate mimetype names
 (e.g. text/plain, image/jpeg). Note that the validation is only
 syntactically. It will e.g. not reject "foo/bar", although that
 particular mime type isn't yet registered. It suffices for the name
 to adhere to the production
 <pre>
 mime-type := token "/" token ; 'token' is defined in rfc2045
 </pre>
 The fixup will simply remove all non-token characters.
		@author Marc Mutz <mutz@kde.org>

		@short A TQValidator for mime types.

*/
public class KMimeTypeValidator extends TQValidator  {
	protected KMimeTypeValidator(Class dummy){super((Class) null);}
	public native TQMetaObject metaObject();
	public native String className();
	public KMimeTypeValidator(TQObject parent, String name) {
		super((Class) null);
		newKMimeTypeValidator(parent,name);
	}
	private native void newKMimeTypeValidator(TQObject parent, String name);
	public KMimeTypeValidator(TQObject parent) {
		super((Class) null);
		newKMimeTypeValidator(parent);
	}
	private native void newKMimeTypeValidator(TQObject parent);
	/**
		 Checks for well-formed mimetype. Returns

			<li>
			Acceptable iff input ~= /^[:allowed chars:]+\/[:allowed chars:]+$/
			</li>

			<li>
			Intermediate iff input ~= /^[:allowed chars:]\/?[:allowed chars:]$/
			</li>

			<li>
			Invalid else

			</li>		@short    Checks for well-formed mimetype.
	*/
	public native int validate(StringBuffer input, int[] pos);
	/**
		 Removes all characters that are forbidden in mimetypes.
		   		@short    Removes all characters that are forbidden in mimetypes.
	*/
	public native void fixup(StringBuffer input);
	/** 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();
}
