Akonadi::ServerManager

Search for usage in LXR

Akonadi::ServerManager Class Reference

#include <servermanager.h>

Inheritance diagram for Akonadi::ServerManager:

Public Types

enum  OpenMode { ReadOnly , ReadWrite }
 
enum  ServiceAgentType { Agent , Resource , Preprocessor }
 
enum  ServiceType { Server , Control , ControlLock , UpgradeIndicator }
 
enum  State {
  NotRunning , Starting , Running , Stopping ,
  Broken , Upgrading
}
 
- Public Types inherited from QObject
typedef  QObjectList
 

Signals

void started ()
 
void stateChanged (Akonadi::ServerManager::State state)
 
void stopped ()
 

Static Public Member Functions

static QString addNamespace (const QString &string)
 
static QString agentConfigFilePath (const QString &identifier)
 
static QString agentServiceName (ServiceAgentType agentType, const QString &identifier)
 
static QString brokenReason ()
 
static uint generation ()
 
static bool hasInstanceIdentifier ()
 
static QString instanceIdentifier ()
 
static bool isRunning ()
 
static ServerManagerself ()
 
static QString serverConfigFilePath (OpenMode openMode)
 
static QString serviceName (ServiceType serviceType)
 
static void showSelfTestDialog (QWidget *parent)
 
static bool start ()
 
static State state ()
 
static bool stop ()
 
- Static Public Member Functions inherited from QObject
QMetaObject::Connection connect (const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
 
QMetaObject::Connection connect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method, Qt::ConnectionType type)
 
QMetaObject::Connection connect (const QObject *sender, PointerToMemberFunction signal, const QObject *context, Functor functor, Qt::ConnectionType type)
 
QMetaObject::Connection connect (const QObject *sender, PointerToMemberFunction signal, const QObject *receiver, PointerToMemberFunction method, Qt::ConnectionType type)
 
QMetaObject::Connection connect (const QObject *sender, PointerToMemberFunction signal, Functor functor)
 
bool disconnect (const QMetaObject::Connection &connection)
 
bool disconnect (const QObject *sender, const char *signal, const QObject *receiver, const char *method)
 
bool disconnect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method)
 
bool disconnect (const QObject *sender, PointerToMemberFunction signal, const QObject *receiver, PointerToMemberFunction method)
 
QString tr (const char *sourceText, const char *disambiguation, int n)
 

Additional Inherited Members

- Properties inherited from QObject
 objectName
 
- Public Member Functions inherited from QObject
 QObject (QObject *parent)
 
QBindable< QStringbindableObjectName ()
 
bool blockSignals (bool block)
 
const QObjectListchildren () const const
 
QMetaObject::Connection connect (const QObject *sender, const char *signal, const char *method, Qt::ConnectionType type) const const
 
void deleteLater ()
 
void destroyed (QObject *obj)
 
bool disconnect (const char *signal, const QObject *receiver, const char *method) const const
 
bool disconnect (const QObject *receiver, const char *method) const const
 
void dumpObjectInfo () const const
 
void dumpObjectTree () const const
 
QList< QByteArraydynamicPropertyNames () const const
 
virtual bool event (QEvent *e)
 
virtual bool eventFilter (QObject *watched, QEvent *event)
 
findChild (const QString &name, Qt::FindChildOptions options) const const
 
QList< T > findChildren (const QRegularExpression &re, Qt::FindChildOptions options) const const
 
QList< T > findChildren (const QString &name, Qt::FindChildOptions options) const const
 
QList< T > findChildren (Qt::FindChildOptions options) const const
 
bool inherits (const char *className) const const
 
void installEventFilter (QObject *filterObj)
 
bool isQuickItemType () const const
 
bool isWidgetType () const const
 
bool isWindowType () const const
 
void killTimer (int id)
 
virtual const QMetaObjectmetaObject () const const
 
void moveToThread (QThread *targetThread)
 
QString objectName () const const
 
void objectNameChanged (const QString &objectName)
 
QObjectparent () const const
 
QVariant property (const char *name) const const
 
 Q_CLASSINFO (Name, Value)
 
 Q_EMIT Q_EMIT
 
 Q_ENUM (...)
 
 Q_ENUM_NS (...)
 
 Q_ENUMS (...)
 
 Q_FLAG (...)
 
 Q_FLAG_NS (...)
 
 Q_FLAGS (...)
 
 Q_GADGET Q_GADGET
 
 Q_GADGET_EXPORT (EXPORT_MACRO)
 
 Q_INTERFACES (...)
 
 Q_INVOKABLE Q_INVOKABLE
 
 Q_MOC_INCLUDE Q_MOC_INCLUDE
 
 Q_NAMESPACE Q_NAMESPACE
 
 Q_NAMESPACE_EXPORT (EXPORT_MACRO)
 
 Q_OBJECT Q_OBJECT
 
 Q_PROPERTY (...)
 
 Q_REVISION Q_REVISION
 
 Q_SET_OBJECT_NAME (Object)
 
 Q_SIGNAL Q_SIGNAL
 
 Q_SIGNALS Q_SIGNALS
 
 Q_SLOT Q_SLOT
 
 Q_SLOTS Q_SLOTS
 
qobject_cast (const QObject *object)
 
qobject_cast (QObject *object)
 
 QT_NO_NARROWING_CONVERSIONS_IN_CONNECT QT_NO_NARROWING_CONVERSIONS_IN_CONNECT
 
void removeEventFilter (QObject *obj)
 
void setObjectName (const QString &name)
 
void setObjectName (QAnyStringView name)
 
void setParent (QObject *parent)
 
bool setProperty (const char *name, const QVariant &value)
 
bool setProperty (const char *name, QVariant &&value)
 
bool signalsBlocked () const const
 
int startTimer (int interval, Qt::TimerType timerType)
 
int startTimer (std::chrono::milliseconds interval, Qt::TimerType timerType)
 
QThreadthread () const const
 
- Protected Member Functions inherited from QObject
virtual void childEvent (QChildEvent *event)
 
virtual void connectNotify (const QMetaMethod &signal)
 
virtual void customEvent (QEvent *event)
 
virtual void disconnectNotify (const QMetaMethod &signal)
 
bool isSignalConnected (const QMetaMethod &signal) const const
 
int receivers (const char *signal) const const
 
QObjectsender () const const
 
int senderSignalIndex () const const
 
virtual void timerEvent (QTimerEvent *event)
 

Detailed Description

Provides methods to control the Akonadi server process.

Asynchronous, low-level control of the Akonadi server. Akonadi::Control provides a synchronous interface to some of the methods in here.

Author
Volker Krause vkrau.nosp@m.se@k.nosp@m.de.or.nosp@m.g
See also
Akonadi::Control
Since
4.2

Definition at line 28 of file servermanager.h.

Member Enumeration Documentation

◆ OpenMode

enum Akonadi::ServerManager::OpenMode

Definition at line 161 of file servermanager.h.

◆ ServiceAgentType

Known agent types.

Since
4.10

Definition at line 132 of file servermanager.h.

◆ ServiceType

Types of known D-Bus services.

Since
4.10

Definition at line 112 of file servermanager.h.

◆ State

Enum for the various states the server can be in.

Since
4.5
Enumerator
NotRunning 

Server is not running, could be no one started it yet or it failed to start.

Starting 

Server was started but is not yet running.

Running 

Server is running and operational.

Stopping 

Server is shutting down.

Broken 

Server is not operational and an error has been detected.

Upgrading 

Server is performing a database upgrade as part of a new startup.

Definition at line 36 of file servermanager.h.

Member Function Documentation

◆ addNamespace()

QString ServerManager::addNamespace ( const QString & string)
staticnodiscard

Adds the multi-instance namespace to string if required (with '_' as separator).

Use whenever a multi-instance safe name is required (configfiles, identifiers, ...).

Parameters
stringthe string to adapt
Since
4.10

Definition at line 367 of file servermanager.cpp.

◆ agentConfigFilePath()

QString ServerManager::agentConfigFilePath ( const QString & identifier)
staticnodiscard

Returns absolute path to configuration file of an agent identified by given identifier.

Definition at line 362 of file servermanager.cpp.

◆ agentServiceName()

QString ServerManager::agentServiceName ( ServiceAgentType agentType,
const QString & identifier )
staticnodiscard

Returns the namespaced D-Bus service name for an agent of type agentType with agent identifier identifier.

Parameters
agentTypethe agent type to use for D-Bus base name
identifierthe agent identifier to include in the D-Bus name
Since
4.10

Definition at line 343 of file servermanager.cpp.

◆ brokenReason()

QString ServerManager::brokenReason ( )
staticnodiscard

Returns the reason why the Server is broken, if known.

If state() is Broken, then you can use this method to obtain a more detailed description of the problem and present it to users. Note that the message can be empty if the reason is not known.

Since
5.6

Definition at line 309 of file servermanager.cpp.

◆ generation()

uint ServerManager::generation ( )
staticnodiscard

Returns current Akonadi database generation identifier.

Generation is guaranteed to never change unless as long as the database backend is not removed and re-created. In such case it is guaranteed that the new generation number will be higher than the previous one.

Generation can be used by applications to detect when Akonadi database has been recreated and thus some of the configuration (for example collection IDs stored in a config file) must be invalidated.

Note
Note that the generation number is only available if the server is running. If this function is called before the server starts it will return 0.
Since
5.4

Definition at line 375 of file servermanager.cpp.

◆ hasInstanceIdentifier()

bool ServerManager::hasInstanceIdentifier ( )
staticnodiscard

Returns true if we are connected to a non-default Akonadi server instance.

Since
4.10

Definition at line 322 of file servermanager.cpp.

◆ instanceIdentifier()

QString ServerManager::instanceIdentifier ( )
staticnodiscard

Returns the identifier of the Akonadi instance we are connected to.

This is usually an empty string (representing the default instance), unless you have explicitly set the AKONADI_INSTANCE environment variable to connect to a different one.

Since
4.10

Definition at line 317 of file servermanager.cpp.

◆ isRunning()

bool ServerManager::isRunning ( )
staticnodiscard

Checks if the server is available currently.

For more detailed status information see state().

See also
state()

Definition at line 238 of file servermanager.cpp.

◆ self()

ServerManager * ServerManager::self ( )
static

Returns the singleton instance of this class, for connecting to its signals.

Definition at line 178 of file servermanager.cpp.

◆ serverConfigFilePath()

QString ServerManager::serverConfigFilePath ( OpenMode openMode)
staticnodiscard

Returns absolute path to akonadiserverrc file with Akonadi server configuration.

Definition at line 357 of file servermanager.cpp.

◆ serviceName()

QString ServerManager::serviceName ( ServerManager::ServiceType serviceType)
static

Returns the namespaced D-Bus service name for serviceType.

Use this rather the raw service name strings in order to support usage of a non-default instance of the Akonadi server.

Parameters
serviceTypethe service type for which to return the D-Bus name
Since
4.10

Definition at line 327 of file servermanager.cpp.

◆ showSelfTestDialog()

void ServerManager::showSelfTestDialog ( QWidget * parent)
static

Shows the Akonadi self test dialog, which tests Akonadi for various problems and reports these to the user if.

Parameters
parentthe parent widget for the dialog

Definition at line 229 of file servermanager.cpp.

◆ start()

bool ServerManager::start ( )
static

Starts the server.

This method returns immediately and does not wait until the server is actually up and running.

Returns
true if the start was possible (which not necessarily means the server is really running though) and false if an immediate error occurred.
See also
Akonadi::Control::start()

Definition at line 183 of file servermanager.cpp.

◆ started

void Akonadi::ServerManager::started ( )
signal

Emitted whenever the server becomes fully operational.

◆ state()

ServerManager::State ServerManager::state ( )
staticnodiscard

Returns the state of the server.

Since
4.5

Definition at line 243 of file servermanager.cpp.

◆ stateChanged

void Akonadi::ServerManager::stateChanged ( Akonadi::ServerManager::State state)
signal

Emitted whenever the server state changes.

Parameters
statethe new server state
Since
4.5

◆ stop()

bool ServerManager::stop ( )
static

Stops the server.

This methods returns immediately after the shutdown command has been send and does not wait until the server is actually shut down.

Returns
true if the shutdown command was sent successfully, false otherwise

Definition at line 216 of file servermanager.cpp.

◆ stopped

void Akonadi::ServerManager::stopped ( )
signal

Emitted whenever the server becomes unavailable.


The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Oct 11 2024 12:11:40 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.