org.kde.koala

Class KDCOPServiceStarter

public class KDCOPServiceStarter extends Object implements QtSupport

A generic DCOP service starter, using KTrader. 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

UNKNOWN: A generic DCOP service starter, using KTrader.

Constructor Summary
protected KDCOPServiceStarter(Class dummy)
KDCOPServiceStarter()
Method Summary
intfindServiceFor(String serviceType, String constraint, String preferences, StringBuffer error, StringBuffer dcopService, int flags)
Check if a given DCOP interface is available - from the serviceType it's supposed to implement.
intfindServiceFor(String serviceType, String constraint, String preferences, StringBuffer error, StringBuffer dcopService)
intfindServiceFor(String serviceType, String constraint, String preferences, StringBuffer error)
intfindServiceFor(String serviceType, String constraint, String preferences)
intfindServiceFor(String serviceType, String constraint)
intfindServiceFor(String serviceType)
static KDCOPServiceStarterself()
intstartServiceFor(String serviceType, String constraint, String preferences, StringBuffer error, StringBuffer dcopService, int flags)
Find an implementation of the given serviceType, and start it, to use its DCOP interface.
intstartServiceFor(String serviceType, String constraint, String preferences, StringBuffer error, StringBuffer dcopService)
intstartServiceFor(String serviceType, String constraint, String preferences, StringBuffer error)
intstartServiceFor(String serviceType, String constraint, String preferences)
intstartServiceFor(String serviceType, String constraint)
intstartServiceFor(String serviceType)

Constructor Detail

KDCOPServiceStarter

protected KDCOPServiceStarter(Class dummy)

KDCOPServiceStarter

public KDCOPServiceStarter()

Method Detail

findServiceFor

public int findServiceFor(String serviceType, String constraint, String preferences, StringBuffer error, StringBuffer dcopService, int flags)
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.

Parameters: serviceType the type of service we're looking for constraint see KTrader preferences see KTrader error On failure, error contains a description of the error that occurred. If the pointer is 0, the argument will be ignored dcopService On success, dcopService contains the DCOP name under which this service is available. If the pointer is 0 the argument will be ignored flags for future extensions (currently unused)

Returns: an error code indicating success (== 0) or failure (> 0).

UNKNOWN: Check if a given DCOP interface is available - from the serviceType it's supposed to implement.

findServiceFor

public int findServiceFor(String serviceType, String constraint, String preferences, StringBuffer error, StringBuffer dcopService)

findServiceFor

public int findServiceFor(String serviceType, String constraint, String preferences, StringBuffer error)

findServiceFor

public int findServiceFor(String serviceType, String constraint, String preferences)

findServiceFor

public int findServiceFor(String serviceType, String constraint)

findServiceFor

public int findServiceFor(String serviceType)

self

public static KDCOPServiceStarter self()

startServiceFor

public int startServiceFor(String serviceType, String constraint, String preferences, StringBuffer error, StringBuffer dcopService, int flags)
Find an implementation of the given serviceType, and start it, to use its DCOP interface. The default implementation uses KTrader to find the preferred Application, and then starts it using kapp.startService... However applications (like kontact) can reimplement this method, to provide an in-process way of loading the implementation for this service type.

Parameters: serviceType the type of service we're looking for constraint see KTrader preferences see KTrader error On failure, error contains a description of the error that occurred. If the pointer is 0, the argument will be ignored dcopService On success, dcopService contains the DCOP name under which this service is available. If the pointer is 0 the argument will be ignored flags for future extensions (currently unused)

Returns: an error code indicating success (== 0) or failure (> 0).

UNKNOWN: Find an implementation of the given serviceType, and start it, to use its DCOP interface.

startServiceFor

public int startServiceFor(String serviceType, String constraint, String preferences, StringBuffer error, StringBuffer dcopService)

startServiceFor

public int startServiceFor(String serviceType, String constraint, String preferences, StringBuffer error)

startServiceFor

public int startServiceFor(String serviceType, String constraint, String preferences)

startServiceFor

public int startServiceFor(String serviceType, String constraint)

startServiceFor

public int startServiceFor(String serviceType)