• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdelibs API Reference
  • KDE Home
  • Contact Us
 

KIO

Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
KDBusServiceStarter Class Reference

#include <kdbusservicestarter.h>

Public Member Functions

int findServiceFor (const QString &serviceType, const QString &constraint=QString(), QString *error=0, QString *dbusService=0, int flags=0)
 
virtual int startServiceFor (const QString &serviceType, const QString &constraint=QString(), QString *error=0, QString *dbusService=0, int flags=0)
 

Static Public Member Functions

static KDBusServiceStarter * self ()
 

Protected Member Functions

 KDBusServiceStarter ()
 
virtual ~KDBusServiceStarter ()
 

Detailed Description

A generic DBUS service starter, using KServiceTypeTrader.

The default implementation starts new processes, but this interface can also be reimplemented by specific applications to provide dlopened in-process DBus objects. This interface is similar to the startServiceByName() function found in QDBusBusService, but with the added benefit of using KTrader (and, therefore, additional constraints and the ability to search the standard KDE dirs).

Author
David Faure faure.nosp@m.@kde.nosp@m..org

Definition at line 37 of file kdbusservicestarter.h.

Constructor & Destructor Documentation

KDBusServiceStarter::KDBusServiceStarter ( )
protected

Definition at line 49 of file kdbusservicestarter.cpp.

KDBusServiceStarter::~KDBusServiceStarter ( )
protectedvirtual

Definition at line 57 of file kdbusservicestarter.cpp.

Member Function Documentation

int KDBusServiceStarter::findServiceFor ( const QString &  serviceType,
const QString &  constraint = QString(),
QString *  error = 0,
QString *  dbusService = 0,
int  flags = 0 
)

Check if a given DBus service 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-DBus-ServiceName property must be defined. Then the DBus server is checked. If the service is not available, this method will call startServiceFor to start it.

Parameters
serviceTypethe type of service we're looking for
constraintsee KServiceTypeTrader
errorOn failure, error contains a description of the error that occurred. If the pointer is 0, the argument will be ignored
dbusServiceOn success, dbusService contains the DBus service name under which this service is available. If the pointer is 0 the argument will be ignored
flagsfor future extensions (currently unused)
Returns
an error code indicating success (== 0) or failure (> 0).

Definition at line 61 of file kdbusservicestarter.cpp.

KDBusServiceStarter * KDBusServiceStarter::self ( )
static

Definition at line 40 of file kdbusservicestarter.cpp.

int KDBusServiceStarter::startServiceFor ( const QString &  serviceType,
const QString &  constraint = QString(),
QString *  error = 0,
QString *  dbusService = 0,
int  flags = 0 
)
virtual

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

The default implementation uses KServiceTypeTrader to find the preferred Application, and then starts it using KToolInvocation::startService...

However applications (like kontact) can reimplement this method, to provide an in-process way of loading the implementation for this service type.

Parameters
serviceTypethe type of service we're looking for
constraintsee KServiceTypeTrader
errorOn failure, error contains a description of the error that occurred. If the pointer is 0, the argument will be ignored
dbusServiceOn success, dbusService contains the DBus service name under which this service is available. If the pointer is 0 the argument will be ignored
flagsfor future extensions (currently unused)
Returns
an error code indicating success (== 0) or failure (> 0).

Definition at line 99 of file kdbusservicestarter.cpp.


The documentation for this class was generated from the following files:
  • kdbusservicestarter.h
  • kdbusservicestarter.cpp
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:50:04 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KIO

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

kdelibs API Reference

Skip menu "kdelibs API Reference"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  • kjsembed
  •   WTF
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Nepomuk-Core
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal