akonadi
20 #include "agentinstance.h"
21 #include "agentinstance_p.h"
23 #include "agentmanager.h"
24 #include "agentmanager_p.h"
28 using namespace Akonadi;
46 return !d->mIdentifier.isEmpty();
57 return d->mIdentifier;
72 switch ( d->mStatus ) {
87 return d->mStatusMessage;
122 if (
this != &other )
130 return (d->mIdentifier == other.d->mIdentifier);
135 QDBusInterface iface( QString::fromLatin1(
"org.freedesktop.Akonadi.Agent.%1" ).arg(
identifier() ),
136 QString::fromLatin1(
"/" ),
137 QString::fromLatin1(
"org.freedesktop.Akonadi.Agent.Control" ) );
138 if ( iface.isValid() ) {
139 QDBusReply<void> reply = iface.call( QString::fromLatin1(
"abort" ) );
140 if ( !reply.isValid() ) {
141 kWarning() <<
"Failed to place D-Bus call.";
144 kWarning() <<
"Unable to obtain agent interface";
150 QDBusInterface iface( QString::fromLatin1(
"org.freedesktop.Akonadi.Agent.%1" ).arg(
identifier() ),
151 QString::fromLatin1(
"/" ),
152 QString::fromLatin1(
"org.freedesktop.Akonadi.Agent.Control" ) );
153 if ( iface.isValid() ) {
154 QDBusReply<void> reply = iface.call( QString::fromLatin1(
"reconfigure" ) );
155 if ( !reply.isValid() ) {
156 kWarning() <<
"Failed to place D-Bus call.";
159 kWarning() <<
"Unable to obtain agent interface";
165 QDBusInterface iface( QString::fromLatin1(
"org.freedesktop.Akonadi.Control" ),
166 QString::fromLatin1(
"/AgentManager" ),
167 QString::fromLatin1(
"org.freedesktop.Akonadi.AgentManager" ) );
168 if ( iface.isValid() ) {
169 QDBusReply<void> reply = iface.call( QString::fromLatin1(
"restartAgentInstance" ), identifier() );
170 if ( !reply.isValid() ) {
171 kWarning() <<
"Failed to place D-Bus call.";
174 kWarning() <<
"Unable to obtain control interface" << iface.lastError().message();
This file is part of the KDE documentation.
Documentation copyright © 1996-2012 The KDE developers.
Generated on Mon Nov 26 2012 16:48:18 by
doxygen 1.8.1.2 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.