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

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

/**

 A generic DCOP service starter, using TDETrader.
 The default implementation starts new processes, but this interface can
 also be reimplemented by specific applications to provide dlopened in-process DCOP objects.
		@author David Faure <faure@kde.org>

		@short    A generic DCOP service starter, using TDETrader.

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

	/**
		 Check if a given DCOP interface is available - from the serviceType it's supposed to implement.
			 The trader is queried to find the preferred application for this serviceType,
		 with the constraint that its X-DCOP-ServiceName property must be defined.
		 Then the DCOP server is checked. If the service is not available,
		 this method will call startServiceFor to start it.
			@param serviceType the type of service we're looking for
			@param constraint see TDETrader
			@param preferences see TDETrader
			@param error On failure, <code>error</code> contains a description of the error
		         that occurred. If the pointer is 0, the argument will be
		         ignored
			@param dcopService On success, <code>dcopService</code> contains the DCOP name
		         under which this service is available. If the pointer is 0 the argument
		         will be ignored
			@param flags for future extensions (currently unused)
				@return an error code indicating success (== 0) or failure (> 0).

		@short    Check if a given DCOP interface is available - from the serviceType it's supposed to implement.
	*/
	public native int findServiceFor(String serviceType, String constraint, String preferences, StringBuffer error, StringBuffer dcopService, int flags);
	public native int findServiceFor(String serviceType, String constraint, String preferences, StringBuffer error, StringBuffer dcopService);
	public native int findServiceFor(String serviceType, String constraint, String preferences, StringBuffer error);
	public native int findServiceFor(String serviceType, String constraint, String preferences);
	public native int findServiceFor(String serviceType, String constraint);
	public native int findServiceFor(String serviceType);
	/**
		 Find an implementation of the given <code>serviceType</code>,
		 and start it, to use its DCOP interface.
		 The default implementation uses TDETrader to find the preferred Application,
		 and then starts it using tdeApp.startService...
			 However applications (like kontact) can reimplement this method, to provide
		 an in-process way of loading the implementation for this service type.
			@param serviceType the type of service we're looking for
			@param constraint see TDETrader
			@param preferences see TDETrader
			@param error On failure, <code>error</code> contains a description of the error
		         that occurred. If the pointer is 0, the argument will be
		         ignored
			@param dcopService On success, <code>dcopService</code> contains the DCOP name
		         under which this service is available. If the pointer is 0 the argument
		         will be ignored
			@param flags for future extensions (currently unused)
				@return an error code indicating success (== 0) or failure (> 0).

		@short    Find an implementation of the given <code>serviceType</code>,  and start it, to use its DCOP interface.
	*/
	public native int startServiceFor(String serviceType, String constraint, String preferences, StringBuffer error, StringBuffer dcopService, int flags);
	public native int startServiceFor(String serviceType, String constraint, String preferences, StringBuffer error, StringBuffer dcopService);
	public native int startServiceFor(String serviceType, String constraint, String preferences, StringBuffer error);
	public native int startServiceFor(String serviceType, String constraint, String preferences);
	public native int startServiceFor(String serviceType, String constraint);
	public native int startServiceFor(String serviceType);
	public static native KDCOPServiceStarter self();
	public KDCOPServiceStarter() {
		newKDCOPServiceStarter();
	}
	private native void newKDCOPServiceStarter();
}
