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

import org.kde.qt.Qt;
import org.kde.qt.QMetaObject;
import org.kde.qt.QtSupport;
import org.kde.qt.QObject;
import org.kde.qt.QObject;

/**

 This class provides one-shot-and-forget audio playing. You will never
 know if what you wanted to play really got played.
 It doesn't require linking any special libraries, as it operates over
 DCOP. In the current implementation, it only indirectly communicates
 with the aRts soundserver, using knotify as DCOP . MCOP bridge.
 Due to that fact, if you need "fast" response times, more control or
 feedback, use the MCOP interfaces rather than this.
 An example of using this class is:
 <pre>
   KAudioPlayer.play("/var/share/foo.wav");
 </pre>
 If you want to use signals & slots, you can do something like:
 <pre>
   KAudioPlayer player("/var/share/foo.wav");
   connect(&button, SIGNAL("clicked()"), &player, SLOT("play()"));
 </pre>
 		@short    This class provides one-shot-and-forget audio playing.

*/
public class KAudioPlayer extends QObject  {
	protected KAudioPlayer(Class dummy){super((Class) null);}
	public native QMetaObject metaObject();
	public native String className();
	/**	
		 Constructor.
			@param filename Absolute path to the filename of the sound file to play
			@param parent A parent QObject for this KAudioPlayer
			@param name An internal name for this KAudioPlayer
			 		@short    Constructor.
	*/
	public KAudioPlayer(String filename, QObject parent, String name) {
		super((Class) null);
		newKAudioPlayer(filename,parent,name);
	}
	private native void newKAudioPlayer(String filename, QObject parent, String name);
	public KAudioPlayer(String filename, QObject parent) {
		super((Class) null);
		newKAudioPlayer(filename,parent);
	}
	private native void newKAudioPlayer(String filename, QObject parent);
	public KAudioPlayer(String filename) {
		super((Class) null);
		newKAudioPlayer(filename);
	}
	private native void newKAudioPlayer(String filename);
	/**	
		 Play function as slot.
			 Plays the soundfile given to the constructor.
			 		@short    Play function as slot.
	*/
	public native void play();
	/**	
		 Static play function.
			@param filename Absolute path to the filename of the sound file to play.
		                if not absolute, goes off KDEDIR/share/sounds/ (preferred)
			 		@short    Static play function.
	*/
	public static native void play(String filename);
	/** 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();
}
