• Skip to content
  • Skip to link menu
KDE 3.5 API Reference
  • KDE API Reference
  • API Reference
  • Sitemap
  • Contact Us
 

kio

KDCOPServiceStarter Class Reference

A generic DCOP service starter, using KTrader. More...

#include <kdcopservicestarter.h>

List of all members.


Public Member Functions

int findServiceFor (const QString &serviceType, const QString &constraint=QString::null, const QString &preferences=QString::null, QString *error=0, QCString *dcopService=0, int flags=0)
virtual int startServiceFor (const QString &serviceType, const QString &constraint=QString::null, const QString &preferences=QString::null, QString *error=0, QCString *dcopService=0, int flags=0)

Static Public Member Functions

static KDCOPServiceStarter * self ()

Protected Member Functions

 KDCOPServiceStarter ()
virtual ~KDCOPServiceStarter ()

Detailed Description

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 <faure@kde.org>

Definition at line 34 of file kdcopservicestarter.h.


Constructor & Destructor Documentation

KDCOPServiceStarter::KDCOPServiceStarter (  )  [protected]

Definition at line 38 of file kdcopservicestarter.cpp.

KDCOPServiceStarter::~KDCOPServiceStarter (  )  [protected, virtual]

Definition at line 45 of file kdcopservicestarter.cpp.


Member Function Documentation

int KDCOPServiceStarter::findServiceFor ( const QString &  serviceType,
const QString &  constraint = QString::null,
const QString &  preferences = QString::null,
QString *  error = 0,
QCString *  dcopService = 0,
int  flags = 0 
)

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).

Definition at line 49 of file kdcopservicestarter.cpp.

KDCOPServiceStarter * KDCOPServiceStarter::self (  )  [static]

Definition at line 31 of file kdcopservicestarter.cpp.

int KDCOPServiceStarter::startServiceFor ( const QString &  serviceType,
const QString &  constraint = QString::null,
const QString &  preferences = QString::null,
QString *  error = 0,
QCString *  dcopService = 0,
int  flags = 0 
) [virtual]

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).

Definition at line 86 of file kdcopservicestarter.cpp.


The documentation for this class was generated from the following files:
  • kdcopservicestarter.h
  • kdcopservicestarter.cpp

kio

Skip menu "kio"
  • Main Page
  • Modules
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

API Reference

Skip menu "API Reference"
  • dcop
  • DNSSD
  • interfaces
  • Kate
  • kconf_update
  • KDECore
  • KDED
  • kdefx
  • KDEsu
  • kdeui
  • KDocTools
  • KHTML
  • KImgIO
  • KInit
  • kio
  • kioslave
  • KJS
  • KNewStuff
  • KParts
  • KUtils
Generated for API Reference by doxygen 1.5.9
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal