Sophie

Sophie

distrib > Mandriva > current > i586 > media > main-updates > by-pkgid > b77dda48f87d4eda8cc559e40c49a652 > files > 1076

python-kde4-doc-4.4.5-0.2mdv2010.2.i586.rpm

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">

<head>
  <title>Plasma.Service</title>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  <meta http-equiv="Content-Style-Type" content="text/css" />
  <link rel="stylesheet" type="text/css" href="../common/doxygen.css" />
  <link rel="stylesheet" media="screen" type="text/css" title="KDE Colors" href="../common/kde.css" />
</head>
<body>
<div id="container">
<div id="header">
  <div id="header_top">
    <div>
      <div>
        <img alt ="" src="../common/top-kde.jpg"/>
        KDE 4.4 PyKDE API Reference
      </div>
    </div>
  </div>
  <div id="header_bottom">
    <div id="location">
      <ul>
        <li>KDE's Python API</li>
      </ul>
    </div>

    <div id="menu">
      <ul>
        <li><a href="../modules.html">Overview</a></li>
<li><a href="http://techbase.kde.org/Development/Languages/Python">PyKDE Home</a></li>
<li><a href="http://kde.org/family/">Sitemap</a></li>
<li><a href="http://kde.org/contact/">Contact Us</a></li>
</ul>
    </div>
  </div>
</div>

<div id="body_wrapper">
<div id="body">
<div id="right">
<div class="content">
<div id="main">
<div class="clearer">&nbsp;</div>

<h1>Service Class Reference</h1>
<code>from PyKDE4.plasma import *</code>
<p>
Inherits: <a href="http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qobject.html">QObject</a><br />

Namespace: Plasma.Service<br />
<h2>Detailed Description</h2>

<p>Service plasma/service.h &lt;Plasma/Service&gt;
</p>
<p>
This class provides a generic API for write access to settings or services.
</p>
<p>
Plasma.Service allows interaction with a "destination", the definition of which
depends on the Service itself. For a network settings Service this might be a
profile name ("Home", "Office", "Road Warrior") while a web based Service this
might be a username ("aseigo", "stranger65").
</p>
<p>
A Service provides one or more operations, each of which provides some sort
of interaction with the destination. Operations are described using config
XML which is used to create a KConfig object with one group per operation.
The group names are used as the operation names, and the defined items in
the group are the parameters available to be set when using that operation.
</p>
<p>
A service is started with a KConfigGroup (representing a ready to be serviced
operation) and automatically deletes itself after completion and signaling
success or failure. See KJob for more information on this part of the process.
</p>
<p>
Services may either be loaded "stand alone" from plugins, or from a DataEngine
by passing in a source name to be used as the destination.
</p>
<p>
Sample use might look like:
</p>
<p>
<pre class="fragment">
 Plasma.DataEngine *twitter = dataEngine("twitter");
 Plasma.Service *service = twitter.serviceForSource("aseigo");
 KConfigGroup op = service-&gt;operationDescription("update");
 op.writeEntry("tweet", "Hacking on plasma!");
 Plasma.ServiceJob *job = service-&gt;startOperationCall(op);
 connect(job, SIGNAL(finished(KJob*)), this, SLOT(jobCompeted()));
</pre>
</p>
<table border="0" cellpadding="0" cellspacing="0"><tr><td colspan="2"><br><h2>Signals</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="#finished">finished</a> (, <a href="../plasma/Plasma.ServiceJob.html">Plasma.ServiceJob</a> job)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="#operationsChanged">operationsChanged</a> ()</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="#serviceReady">serviceReady</a> (, <a href="../plasma/Plasma.Service.html">Plasma.Service</a> service)</td></tr>
<tr><td colspan="2"><br><h2>Methods</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="#Service">__init__</a> (self, <a href="http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qobject.html">QObject</a> parent=0)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="#Service">__init__</a> (self, <a href="http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qobject.html">QObject</a> parent, <a href="http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qvariantlist.html">QVariantList</a> args)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a href="../plasma/Plasma.Service.html">Plasma.Service</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="#access">access</a> (self, <a href="../kdecore/KUrl.html">KUrl</a> url, <a href="http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qobject.html">QObject</a> parent=0)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="#associateWidget">associateWidget</a> (self, <a href="http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qwidget.html">QWidget</a> widget, <a href="http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qstring.html">QString</a> operation)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="#associateWidget">associateWidget</a> (self, <a href="http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qgraphicswidget.html">QGraphicsWidget</a> widget, <a href="http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qstring.html">QString</a> operation)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a href="../plasma/Plasma.ServiceJob.html">Plasma.ServiceJob</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="#createJob">createJob</a> (self, <a href="http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qstring.html">QString</a> operation, QMap<QString,QVariant> parameters)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a href="http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qstring.html">QString</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="#destination">destination</a> (self)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="#disassociateWidget">disassociateWidget</a> (self, <a href="http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qwidget.html">QWidget</a> widget)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="#disassociateWidget">disassociateWidget</a> (self, <a href="http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qgraphicswidget.html">QGraphicsWidget</a> widget)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="#finished">finished</a> (self, <a href="../plasma/Plasma.ServiceJob.html">Plasma.ServiceJob</a> job)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="#isOperationEnabled">isOperationEnabled</a> (self, <a href="http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qstring.html">QString</a> operation)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a href="../plasma/Plasma.Service.html">Plasma.Service</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="#load">load</a> (self, <a href="http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qstring.html">QString</a> name, <a href="http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qobject.html">QObject</a> parent=0)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a href="http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qstring.html">QString</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="#name">name</a> (self)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a href="../kdecore/KConfigGroup.html">KConfigGroup</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="#operationDescription">operationDescription</a> (self, <a href="http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qstring.html">QString</a> operationName)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a href="http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qstringlist.html">QStringList</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="#operationNames">operationNames</a> (self)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="#operationsChanged">operationsChanged</a> (self)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">QMap<QString,QVariant>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="#parametersFromDescription">parametersFromDescription</a> (self, <a href="../kdecore/KConfigGroup.html">KConfigGroup</a> description)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="#registerOperationsScheme">registerOperationsScheme</a> (self)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="#serviceReady">serviceReady</a> (self, <a href="../plasma/Plasma.Service.html">Plasma.Service</a> service)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="#setDestination">setDestination</a> (self, <a href="http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qstring.html">QString</a> destination)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="#setName">setName</a> (self, <a href="http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qstring.html">QString</a> name)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="#setOperationEnabled">setOperationEnabled</a> (self, <a href="http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qstring.html">QString</a> operation, bool enable)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="#setOperationsScheme">setOperationsScheme</a> (self, <a href="http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qiodevice.html">QIODevice</a> xml)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a href="../plasma/Plasma.ServiceJob.html">Plasma.ServiceJob</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="#startOperationCall">startOperationCall</a> (self, <a href="../kdecore/KConfigGroup.html">KConfigGroup</a> description, <a href="http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qobject.html">QObject</a> parent=0)</td></tr>
</table>
<hr><h2>Method Documentation</h2><a class="anchor" name="Service"></a>
<div class="memitem">
<div class="memproto">
<table class="memname"><tr>
<td class="memname">__init__</td>
<td>(</td>
<td class="paramtype">&nbsp;<em>self</em>, </td>
<td class="paramname"></td>
</tr><tr>
<td class="memname"></td>
<td></td>
<td class="paramtype"><a href="http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qobject.html">QObject</a>&nbsp;</td>
<td class="paramname"><em>parent=0</em></td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td>
<td></td>
<td width="100%"> </td>
</tr></table>
</div>
<div class="memdoc"><p>Default constructor
</p>
<p>
@arg parent the parent object for this service
</p></div></div><a class="anchor" name="Service"></a>
<div class="memitem">
<div class="memproto">
<table class="memname"><tr>
<td class="memname">__init__</td>
<td>(</td>
<td class="paramtype">&nbsp;<em>self</em>, </td>
<td class="paramname"></td>
</tr><tr>
<td class="memname"></td>
<td></td>
<td class="paramtype"><a href="http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qobject.html">QObject</a>&nbsp;</td>
<td class="paramname"><em>parent</em>, </td>
</tr>
<tr>
<td class="memname"></td>
<td></td>
<td class="paramtype"><a href="http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qvariantlist.html">QVariantList</a>&nbsp;</td>
<td class="paramname"><em>args</em></td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td>
<td></td>
<td width="100%"> </td>
</tr></table>
</div>
<div class="memdoc"><p>Constructor for plugin loading
</p></div></div><a class="anchor" name="access"></a>
<div class="memitem">
<div class="memproto">
<table class="memname"><tr>
<td class="memname"><a href="../plasma/Plasma.Service.html">Plasma.Service</a> access</td>
<td>(</td>
<td class="paramtype">&nbsp;<em>self</em>, </td>
<td class="paramname"></td>
</tr><tr>
<td class="memname"></td>
<td></td>
<td class="paramtype"><a href="../kdecore/KUrl.html">KUrl</a>&nbsp;</td>
<td class="paramname"><em>url</em>, </td>
</tr>
<tr>
<td class="memname"></td>
<td></td>
<td class="paramtype"><a href="http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qobject.html">QObject</a>&nbsp;</td>
<td class="paramname"><em>parent=0</em></td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td>
<td></td>
<td width="100%"> </td>
</tr></table>
</div>
<div class="memdoc"><p>Used to access a service from an url. Always check for the signal serviceReady() that fires
when this service is actually ready for use.
</p></div></div><a class="anchor" name="associateWidget"></a>
<div class="memitem">
<div class="memproto">
<table class="memname"><tr>
<td class="memname"> associateWidget</td>
<td>(</td>
<td class="paramtype">&nbsp;<em>self</em>, </td>
<td class="paramname"></td>
</tr><tr>
<td class="memname"></td>
<td></td>
<td class="paramtype"><a href="http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qwidget.html">QWidget</a>&nbsp;</td>
<td class="paramname"><em>widget</em>, </td>
</tr>
<tr>
<td class="memname"></td>
<td></td>
<td class="paramtype"><a href="http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qstring.html">QString</a>&nbsp;</td>
<td class="paramname"><em>operation</em></td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td>
<td></td>
<td width="100%"> </td>
</tr></table>
</div>
<div class="memdoc"><p>Assoicates a widget with an operation, which allows the service to
automatically manage, for example, the enabled state of a widget.
</p>
<p>
This will remove any previous associations the widget had with
operations on this engine.
</p>
<p>
</p><dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td></td><td valign="top"><em>widget</em>&nbsp;</td><td> the QGraphicsItem to associate with the service

<tr><td></td><td valign="top"><em>operation</em>&nbsp;</td><td> the operation to associate the widget with
</td></tr>
</table></dl>
<p>
</p></div></div><a class="anchor" name="associateWidget"></a>
<div class="memitem">
<div class="memproto">
<table class="memname"><tr>
<td class="memname"> associateWidget</td>
<td>(</td>
<td class="paramtype">&nbsp;<em>self</em>, </td>
<td class="paramname"></td>
</tr><tr>
<td class="memname"></td>
<td></td>
<td class="paramtype"><a href="http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qgraphicswidget.html">QGraphicsWidget</a>&nbsp;</td>
<td class="paramname"><em>widget</em>, </td>
</tr>
<tr>
<td class="memname"></td>
<td></td>
<td class="paramtype"><a href="http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qstring.html">QString</a>&nbsp;</td>
<td class="paramname"><em>operation</em></td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td>
<td></td>
<td width="100%"> </td>
</tr></table>
</div>
<div class="memdoc"><p>Assoicates a widget with an operation, which allows the service to
automatically manage, for example, the enabled state of a widget.
</p>
<p>
This will remove any previous associations the widget had with
operations on this engine.
</p>
<p>
</p><dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td></td><td valign="top"><em>widget</em>&nbsp;</td><td> the QGraphicsItem to associate with the service

<tr><td></td><td valign="top"><em>operation</em>&nbsp;</td><td> the operation to associate the widget with
</td></tr>
</table></dl>
<p>
</p></div></div><a class="anchor" name="createJob"></a>
<div class="memitem">
<div class="memproto">
<table class="memname"><tr>
<td class="memname"><a href="../plasma/Plasma.ServiceJob.html">Plasma.ServiceJob</a> createJob</td>
<td>(</td>
<td class="paramtype">&nbsp;<em>self</em>, </td>
<td class="paramname"></td>
</tr><tr>
<td class="memname"></td>
<td></td>
<td class="paramtype"><a href="http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qstring.html">QString</a>&nbsp;</td>
<td class="paramname"><em>operation</em>, </td>
</tr>
<tr>
<td class="memname"></td>
<td></td>
<td class="paramtype">QMap<QString,QVariant>&nbsp;</td>
<td class="paramname"><em>parameters</em></td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td>
<td></td>
<td width="100%"> </td>
</tr></table>
</div>
<div class="memdoc"><dl compact><dt><b>Abstract method:</b></dt><dd>This method is abstract and can be overridden but not called directly.</dd></dl><p>Called when a job should be created by the Service.
</p>
<p>
</p><dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td></td><td valign="top"><em>operation</em>&nbsp;</td><td> which operation to work on

<tr><td></td><td valign="top"><em>parameters</em>&nbsp;</td><td> the parameters set by the user for the operation
</td></tr> </table></dl>
<p> <dl class="return" compact><dt><b>Returns:</b></dt><dd> a ServiceJob that can be started and monitored by the consumer
</dd></dl>
</p></div></div><a class="anchor" name="destination"></a>
<div class="memitem">
<div class="memproto">
<table class="memname"><tr>
<td class="memname"><a href="http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qstring.html">QString</a> destination</td>
<td>(</td>
<td class="paramtype">&nbsp;</td>
<td class="paramname"><em>self</em>&nbsp;)</td>
<td width="100%"> </td>
</tr>
</table>
</div>
<div class="memdoc"><p><dl class="return" compact><dt><b>Returns:</b></dt><dd> the target destination, if any, that this service is associated with
</dd></dl>
</p></div></div><a class="anchor" name="disassociateWidget"></a>
<div class="memitem">
<div class="memproto">
<table class="memname"><tr>
<td class="memname"> disassociateWidget</td>
<td>(</td>
<td class="paramtype">&nbsp;<em>self</em>, </td>
<td class="paramname"></td>
</tr><tr>
<td class="memname"></td>
<td></td>
<td class="paramtype"><a href="http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qwidget.html">QWidget</a>&nbsp;</td>
<td class="paramname"><em>widget</em></td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td>
<td></td>
<td width="100%"> </td>
</tr></table>
</div>
<div class="memdoc"><p>Disassociates a widget if it has been associated with an operation
on this service.
</p>
<p>
This will not change the enabled state of the widget.
</p>
<p>
</p><dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td></td><td valign="top"><em>widget</em>&nbsp;</td><td> the QGraphicsWidget to disassociate.
</td></tr>
</table></dl>
<p>
</p></div></div><a class="anchor" name="disassociateWidget"></a>
<div class="memitem">
<div class="memproto">
<table class="memname"><tr>
<td class="memname"> disassociateWidget</td>
<td>(</td>
<td class="paramtype">&nbsp;<em>self</em>, </td>
<td class="paramname"></td>
</tr><tr>
<td class="memname"></td>
<td></td>
<td class="paramtype"><a href="http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qgraphicswidget.html">QGraphicsWidget</a>&nbsp;</td>
<td class="paramname"><em>widget</em></td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td>
<td></td>
<td width="100%"> </td>
</tr></table>
</div>
<div class="memdoc"><p>Disassociates a widget if it has been associated with an operation
on this service.
</p>
<p>
This will not change the enabled state of the widget.
</p>
<p>
</p><dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td></td><td valign="top"><em>widget</em>&nbsp;</td><td> the QGraphicsWidget to disassociate.
</td></tr>
</table></dl>
<p>
</p></div></div><a class="anchor" name="finished"></a>
<div class="memitem">
<div class="memproto">
<table class="memname"><tr>
<td class="memname"> finished</td>
<td>(</td>
<td class="paramtype">&nbsp;<em>self</em>, </td>
<td class="paramname"></td>
</tr><tr>
<td class="memname"></td>
<td></td>
<td class="paramtype"><a href="../plasma/Plasma.ServiceJob.html">Plasma.ServiceJob</a>&nbsp;</td>
<td class="paramname"><em>job</em></td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td>
<td></td>
<td width="100%"> </td>
</tr></table>
</div>
<div class="memdoc"><p>Emitted when a job associated with this Service completes its task
</p><dl compact><dt><b>Signal syntax:</b></dt><dd><code>QObject.connect(source, SIGNAL("finished(Plasma::ServiceJob*)"), target_slot)</code></dd></dl></div></div><a class="anchor" name="isOperationEnabled"></a>
<div class="memitem">
<div class="memproto">
<table class="memname"><tr>
<td class="memname">bool isOperationEnabled</td>
<td>(</td>
<td class="paramtype">&nbsp;<em>self</em>, </td>
<td class="paramname"></td>
</tr><tr>
<td class="memname"></td>
<td></td>
<td class="paramtype"><a href="http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qstring.html">QString</a>&nbsp;</td>
<td class="paramname"><em>operation</em></td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td>
<td></td>
<td width="100%"> </td>
</tr></table>
</div>
<div class="memdoc"><p>Query to find if an operation is enabled or not.
</p>
<p>
</p><dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td></td><td valign="top"><em>operation</em>&nbsp;</td><td> the name of the operation to check
</td></tr> </table></dl>
<p> <dl class="return" compact><dt><b>Returns:</b></dt><dd> true if the operation is enabled, false otherwise
</dd></dl>
</p></div></div><a class="anchor" name="load"></a>
<div class="memitem">
<div class="memproto">
<table class="memname"><tr>
<td class="memname"><a href="../plasma/Plasma.Service.html">Plasma.Service</a> load</td>
<td>(</td>
<td class="paramtype">&nbsp;<em>self</em>, </td>
<td class="paramname"></td>
</tr><tr>
<td class="memname"></td>
<td></td>
<td class="paramtype"><a href="http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qstring.html">QString</a>&nbsp;</td>
<td class="paramname"><em>name</em>, </td>
</tr>
<tr>
<td class="memname"></td>
<td></td>
<td class="paramtype"><a href="http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qobject.html">QObject</a>&nbsp;</td>
<td class="paramname"><em>parent=0</em></td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td>
<td></td>
<td width="100%"> </td>
</tr></table>
</div>
<div class="memdoc"><p>Used to load a given service from a plugin.
</p>
<p>
</p><dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td></td><td valign="top"><em>name</em>&nbsp;</td><td> the plugin name of the service to load

<tr><td></td><td valign="top"><em>parent</em>&nbsp;</td><td> the parent object, if any, for the service
</td></tr>
</table></dl>
<p> <dl class="return" compact><dt><b>Returns:</b></dt><dd> a Service object, guaranteed to be not null.
</dd></dl>
</p></div></div><a class="anchor" name="name"></a>
<div class="memitem">
<div class="memproto">
<table class="memname"><tr>
<td class="memname"><a href="http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qstring.html">QString</a> name</td>
<td>(</td>
<td class="paramtype">&nbsp;</td>
<td class="paramname"><em>self</em>&nbsp;)</td>
<td width="100%"> </td>
</tr>
</table>
</div>
<div class="memdoc"><p>The name of this service
</p></div></div><a class="anchor" name="operationDescription"></a>
<div class="memitem">
<div class="memproto">
<table class="memname"><tr>
<td class="memname"><a href="../kdecore/KConfigGroup.html">KConfigGroup</a> operationDescription</td>
<td>(</td>
<td class="paramtype">&nbsp;<em>self</em>, </td>
<td class="paramname"></td>
</tr><tr>
<td class="memname"></td>
<td></td>
<td class="paramtype"><a href="http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qstring.html">QString</a>&nbsp;</td>
<td class="paramname"><em>operationName</em></td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td>
<td></td>
<td width="100%"> </td>
</tr></table>
</div>
<div class="memdoc"><p>Retrieves the parameters for a given operation
</p>
<p>
</p><dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td></td><td valign="top"><em>operationName</em>&nbsp;</td><td> the operation to retrieve parameters for
</td></tr> </table></dl>
<p> <dl class="return" compact><dt><b>Returns:</b></dt><dd> KConfigGroup containing the parameters
</dd></dl>
</p></div></div><a class="anchor" name="operationNames"></a>
<div class="memitem">
<div class="memproto">
<table class="memname"><tr>
<td class="memname"><a href="http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qstringlist.html">QStringList</a> operationNames</td>
<td>(</td>
<td class="paramtype">&nbsp;</td>
<td class="paramname"><em>self</em>&nbsp;)</td>
<td width="100%"> </td>
</tr>
</table>
</div>
<div class="memdoc"><p><dl class="return" compact><dt><b>Returns:</b></dt><dd> the possible operations for this profile
</dd></dl>
</p></div></div><a class="anchor" name="operationsChanged"></a>
<div class="memitem">
<div class="memproto">
<table class="memname"><tr>
<td class="memname"> operationsChanged</td>
<td>(</td>
<td class="paramtype">&nbsp;</td>
<td class="paramname"><em>self</em>&nbsp;)</td>
<td width="100%"> </td>
</tr>
</table>
</div>
<div class="memdoc"><p>Emitted when the Service's operations change. For example, a
media player service may change what operations are available
in response to the state of the player.
</p><dl compact><dt><b>Signal syntax:</b></dt><dd><code>QObject.connect(source, SIGNAL("operationsChanged()"), target_slot)</code></dd></dl></div></div><a class="anchor" name="parametersFromDescription"></a>
<div class="memitem">
<div class="memproto">
<table class="memname"><tr>
<td class="memname">QMap<QString,QVariant> parametersFromDescription</td>
<td>(</td>
<td class="paramtype">&nbsp;<em>self</em>, </td>
<td class="paramname"></td>
</tr><tr>
<td class="memname"></td>
<td></td>
<td class="paramtype"><a href="../kdecore/KConfigGroup.html">KConfigGroup</a>&nbsp;</td>
<td class="paramname"><em>description</em></td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td>
<td></td>
<td width="100%"> </td>
</tr></table>
</div>
<div class="memdoc"><p><dl class="return" compact><dt><b>Returns:</b></dt><dd> a parameter map for the given description
</dd></dl> @arg description the configuration values to turn into the parameter map
<dl class="since" compact><dt><b>Since:</b></dt><dd> 4.4
</dd></dl>
</p></div></div><a class="anchor" name="registerOperationsScheme"></a>
<div class="memitem">
<div class="memproto">
<table class="memname"><tr>
<td class="memname"> registerOperationsScheme</td>
<td>(</td>
<td class="paramtype">&nbsp;</td>
<td class="paramname"><em>self</em>&nbsp;)</td>
<td width="100%"> </td>
</tr>
</table>
</div>
<div class="memdoc"><p>By default this is based on the file in plasma/services/name.operations, but can be
reimplented to use a different mechanism.
</p>
<p>
It should result in a call to setOperationsScheme(QIODevice *);
</p></div></div><a class="anchor" name="serviceReady"></a>
<div class="memitem">
<div class="memproto">
<table class="memname"><tr>
<td class="memname"> serviceReady</td>
<td>(</td>
<td class="paramtype">&nbsp;<em>self</em>, </td>
<td class="paramname"></td>
</tr><tr>
<td class="memname"></td>
<td></td>
<td class="paramtype"><a href="../plasma/Plasma.Service.html">Plasma.Service</a>&nbsp;</td>
<td class="paramname"><em>service</em></td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td>
<td></td>
<td width="100%"> </td>
</tr></table>
</div>
<div class="memdoc"><p>Emitted when this service is ready for use
</p><dl compact><dt><b>Signal syntax:</b></dt><dd><code>QObject.connect(source, SIGNAL("serviceReady(Plasma::Service*)"), target_slot)</code></dd></dl></div></div><a class="anchor" name="setDestination"></a>
<div class="memitem">
<div class="memproto">
<table class="memname"><tr>
<td class="memname"> setDestination</td>
<td>(</td>
<td class="paramtype">&nbsp;<em>self</em>, </td>
<td class="paramname"></td>
</tr><tr>
<td class="memname"></td>
<td></td>
<td class="paramtype"><a href="http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qstring.html">QString</a>&nbsp;</td>
<td class="paramname"><em>destination</em></td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td>
<td></td>
<td width="100%"> </td>
</tr></table>
</div>
<div class="memdoc"><p>Sets the destination for this Service to operate on
</p>
<p>
@arg destination specific to each Service, this sets which
target or address for ServiceJobs to operate on
</p></div></div><a class="anchor" name="setName"></a>
<div class="memitem">
<div class="memproto">
<table class="memname"><tr>
<td class="memname"> setName</td>
<td>(</td>
<td class="paramtype">&nbsp;<em>self</em>, </td>
<td class="paramname"></td>
</tr><tr>
<td class="memname"></td>
<td></td>
<td class="paramtype"><a href="http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qstring.html">QString</a>&nbsp;</td>
<td class="paramname"><em>name</em></td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td>
<td></td>
<td width="100%"> </td>
</tr></table>
</div>
<div class="memdoc"><p>Sets the name of the Service; useful for Services not loaded from plugins,
which use the plugin name for this.
</p>
<p>
@arg name the name to use for this service
</p></div></div><a class="anchor" name="setOperationEnabled"></a>
<div class="memitem">
<div class="memproto">
<table class="memname"><tr>
<td class="memname"> setOperationEnabled</td>
<td>(</td>
<td class="paramtype">&nbsp;<em>self</em>, </td>
<td class="paramname"></td>
</tr><tr>
<td class="memname"></td>
<td></td>
<td class="paramtype"><a href="http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qstring.html">QString</a>&nbsp;</td>
<td class="paramname"><em>operation</em>, </td>
</tr>
<tr>
<td class="memname"></td>
<td></td>
<td class="paramtype">bool&nbsp;</td>
<td class="paramname"><em>enable</em></td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td>
<td></td>
<td width="100%"> </td>
</tr></table>
</div>
<div class="memdoc"><p>Enables a given service by name
</p>
<p>
</p><dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td></td><td valign="top"><em>operation</em>&nbsp;</td><td> the name of the operation to enable or disable

<tr><td></td><td valign="top"><em>enable</em>&nbsp;</td><td> true if the operation should be enabld, false if disabled
</td></tr>
</table></dl>
<p>
</p></div></div><a class="anchor" name="setOperationsScheme"></a>
<div class="memitem">
<div class="memproto">
<table class="memname"><tr>
<td class="memname"> setOperationsScheme</td>
<td>(</td>
<td class="paramtype">&nbsp;<em>self</em>, </td>
<td class="paramname"></td>
</tr><tr>
<td class="memname"></td>
<td></td>
<td class="paramtype"><a href="http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qiodevice.html">QIODevice</a>&nbsp;</td>
<td class="paramname"><em>xml</em></td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td>
<td></td>
<td width="100%"> </td>
</tr></table>
</div>
<div class="memdoc"><p>Sets the XML used to define the operation schema for
this Service.
</p></div></div><a class="anchor" name="startOperationCall"></a>
<div class="memitem">
<div class="memproto">
<table class="memname"><tr>
<td class="memname"><a href="../plasma/Plasma.ServiceJob.html">Plasma.ServiceJob</a> startOperationCall</td>
<td>(</td>
<td class="paramtype">&nbsp;<em>self</em>, </td>
<td class="paramname"></td>
</tr><tr>
<td class="memname"></td>
<td></td>
<td class="paramtype"><a href="../kdecore/KConfigGroup.html">KConfigGroup</a>&nbsp;</td>
<td class="paramname"><em>description</em>, </td>
</tr>
<tr>
<td class="memname"></td>
<td></td>
<td class="paramtype"><a href="http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qobject.html">QObject</a>&nbsp;</td>
<td class="paramname"><em>parent=0</em></td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td>
<td></td>
<td width="100%"> </td>
</tr></table>
</div>
<div class="memdoc"><p>Called to create a ServiceJob which is associated with a given
operation and parameter set.
</p>
<p>
<dl class="return" compact><dt><b>Returns:</b></dt><dd> a started ServiceJob; the consumer may connect to relevant
signals before returning to the event loop
</dd></dl>
</p></div></div>
</div>
</div>
</div>

<div id="left">

<div class="menu_box">
<div class="nav_list">
<ul>
<li><a href="../allclasses.html">Full Index</a></li>
</ul>
</div>

<a name="cp-menu" /><div class="menutitle"><div>
  <h2 id="cp-menu-project">Modules</h2>
</div></div>
<div class="nav_list">
<ul><li><a href="../akonadi/index.html">akonadi</a></li>
<li><a href="../dnssd/index.html">dnssd</a></li>
<li><a href="../kdecore/index.html">kdecore</a></li>
<li><a href="../kdeui/index.html">kdeui</a></li>
<li><a href="../khtml/index.html">khtml</a></li>
<li><a href="../kio/index.html">kio</a></li>
<li><a href="../knewstuff/index.html">knewstuff</a></li>
<li><a href="../kparts/index.html">kparts</a></li>
<li><a href="../kutils/index.html">kutils</a></li>
<li><a href="../nepomuk/index.html">nepomuk</a></li>
<li><a href="../phonon/index.html">phonon</a></li>
<li><a href="../plasma/index.html">plasma</a></li>
<li><a href="../polkitqt/index.html">polkitqt</a></li>
<li><a href="../solid/index.html">solid</a></li>
<li><a href="../soprano/index.html">soprano</a></li>
</ul></div></div>

</div>

</div>
  <div class="clearer"/>
</div>

<div id="end_body"></div>
</div>
<div id="footer"><div id="footer_text">
This documentation is maintained by <a href="&#109;&#97;&#105;&#108;&#116;&#111;&#58;simon&#64;simonzone&#46;com">Simon Edwards</a>.<br />
        KDE<sup>&#174;</sup> and <a href="../images/kde_gear_black.png">the K Desktop Environment<sup>&#174;</sup> logo</a> are registered trademarks of <a href="http://ev.kde.org/" title="Homepage of the KDE non-profit Organization">KDE e.V.</a> |
        <a href="http://www.kde.org/contact/impressum.php">Legal</a>
    </div></div>
</body>
</html>