Commit 23b4d352 authored by Kevin Krammer's avatar Kevin Krammer
Browse files

Since Akonadi is not a KDE-only service, replace the org.kde namespacing with...

Since Akonadi is not a KDE-only service, replace the org.kde namespacing with appropriate org.freedesktop
Lets hope I didn't miss any occurencies

svn path=/trunk/kdesupport/akonadi/; revision=804301
parent 13760892
SET(DBUS_INTERFACE_XMLS
org.kde.Akonadi.AgentManager.xml
org.kde.Akonadi.NotificationManager.xml
org.kde.Akonadi.Tracer.xml
org.kde.Akonadi.Agent.Control.xml
org.kde.Akonadi.Agent.Status.xml
org.kde.Akonadi.Resource.xml
org.freedesktop.Akonadi.AgentManager.xml
org.freedesktop.Akonadi.NotificationManager.xml
org.freedesktop.Akonadi.Tracer.xml
org.freedesktop.Akonadi.Agent.Control.xml
org.freedesktop.Akonadi.Agent.Status.xml
org.freedesktop.Akonadi.Resource.xml
)
install( FILES ${DBUS_INTERFACE_XMLS}
......
<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN" "http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
<node>
<interface name="org.kde.Akonadi.Agent.Status">
<interface name="org.freedesktop.Akonadi.Agent.Status">
<signal name="status">
<arg name="status" type="i" direction="out"/>
<arg name="message" type="s" direction="out"/>
......
<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN" "http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
<node>
<interface name="org.kde.Akonadi.AgentManager">
<interface name="org.freedesktop.Akonadi.AgentManager">
<signal name="agentTypeAdded">
<arg name="agentType" type="s" direction="out"/>
</signal>
......
<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN" "http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
<node>
<interface name="org.kde.Akonadi.ControlManager">
<interface name="org.freedesktop.Akonadi.ControlManager">
<method name="shutdown"/>
</interface>
</node>
<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN" "http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
<node>
<interface name="org.kde.Akonadi.NotificationManager">
<interface name="org.freedesktop.Akonadi.NotificationManager">
<signal name="notify">
<arg name="message" type="a(ayiixsayxxsas)" direction="out"/>
<annotation name="com.trolltech.QtDBus.QtTypeName.Out0" value="const Akonadi::NotificationMessage::List &amp;"/>
......
<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN" "http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
<node>
<interface name="org.kde.Akonadi.Resource">
<interface name="org.freedesktop.Akonadi.Resource">
<signal name="nameChanged">
<arg name="name" type="s" direction="out"/>
</signal>
......
<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN" "http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
<node>
<interface name="org.kde.Akonadi.Search">
<interface name="org.freedesktop.Akonadi.Search">
<method name="createQuery">
<arg name="query" type="s" direction="in" />
<arg name="queryObject" type="s" direction="out" />
......
<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN" "http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
<node>
<interface name="org.kde.Akonadi.SearchQuery">
<interface name="org.freedesktop.Akonadi.SearchQuery">
<method name="start" />
<method name="stop" />
......
<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN"
"http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
"http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
<node>
<interface name="org.kde.Akonadi.SearchQueryIterator">
<interface name="org.freedesktop.Akonadi.SearchQueryIterator">
<method name="next">
<arg name="reply" type="b" direction="out" />
</method>
......
<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN" "http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
<node>
<interface name="org.kde.Akonadi.Server">
<interface name="org.freedesktop.Akonadi.Server">
<method name="quit"/>
</interface>
</node>
<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN" "http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
<node>
<interface name="org.kde.Akonadi.Tracer">
<interface name="org.freedesktop.Akonadi.Tracer">
<method name="beginConnection">
<arg name="identifier" type="s" direction="in"/>
<arg name="msg" type="s" direction="in"/>
......
<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN" "http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
<node>
<interface name="org.kde.Akonadi.TracerNotification">
<interface name="org.freedesktop.Akonadi.TracerNotification">
<signal name="connectionStarted">
<arg name="identifier" type="s" direction="out"/>
<arg name="msg" type="s" direction="out"/>
......
<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN" "http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
<node>
<interface name="org.kde.Akonadi.Agent.Control">
<method name="quit">
</method>
<method name="cleanup">
</method>
<method name="configure">
<arg name="windowId" type="x" direction="in"/>
<annotation name="org.freedesktop.DBus.Method.NoReply" value="true"/>
</method>
</interface>
</node>
......@@ -29,8 +29,8 @@
*/
// D-Bus service names
#define AKONADI_DBUS_SERVER_SERVICE "org.kde.Akonadi"
#define AKONADI_DBUS_CONTROL_SERVICE "org.kde.Akonadi.Control"
#define AKONADI_DBUS_SERVER_SERVICE "org.freedesktop.Akonadi"
#define AKONADI_DBUS_CONTROL_SERVICE "org.freedesktop.Akonadi.Control"
// Commands
#define AKONADI_CMD_ITEMFETCH "FETCH"
......
......@@ -100,17 +100,17 @@ set(libakonadiprivate_SRCS
automoc4(akonadiprivate libakonadiprivate_SRCS)
qt4_add_dbus_adaptor( libakonadiprivate_SRCS interfaces/org.kde.Akonadi.TracerNotification.xml dbustracer.h Akonadi::DBusTracer )
qt4_add_dbus_adaptor( libakonadiprivate_SRCS ${CMAKE_CURRENT_SOURCE_DIR}/../interfaces/org.kde.Akonadi.Tracer.xml tracer.h Akonadi::Tracer
qt4_add_dbus_adaptor( libakonadiprivate_SRCS interfaces/org.freedesktop.Akonadi.TracerNotification.xml dbustracer.h Akonadi::DBusTracer )
qt4_add_dbus_adaptor( libakonadiprivate_SRCS ${CMAKE_CURRENT_SOURCE_DIR}/../interfaces/org.freedesktop.Akonadi.Tracer.xml tracer.h Akonadi::Tracer
)
qt4_add_dbus_adaptor( libakonadiprivate_SRCS ${CMAKE_CURRENT_SOURCE_DIR}/../interfaces/org.kde.Akonadi.NotificationManager.xml notificationmanager.h Akonadi::NotificationManager )
qt4_add_dbus_adaptor( libakonadiprivate_SRCS ${CMAKE_CURRENT_SOURCE_DIR}/../interfaces/org.freedesktop.Akonadi.NotificationManager.xml notificationmanager.h Akonadi::NotificationManager )
qt4_add_dbus_adaptor( libakonadiprivate_SRCS interfaces/org.kde.Akonadi.Server.xml akonadi.h Akonadi::AkonadiServer )
qt4_add_dbus_adaptor( libakonadiprivate_SRCS interfaces/org.freedesktop.Akonadi.Server.xml akonadi.h Akonadi::AkonadiServer )
qt4_add_dbus_interfaces( libakonadiprivate_SRCS ${CMAKE_CURRENT_SOURCE_DIR}/../interfaces/org.kde.Akonadi.AgentManager.xml ${CMAKE_CURRENT_SOURCE_DIR}/../interfaces/org.kde.Akonadi.Resource.xml )
qt4_add_dbus_interface( libakonadiprivate_SRCS interfaces/org.kde.Akonadi.Search.xml searchinterface )
qt4_add_dbus_interface( libakonadiprivate_SRCS interfaces/org.kde.Akonadi.SearchQuery.xml searchqueryinterface )
qt4_add_dbus_interface( libakonadiprivate_SRCS interfaces/org.kde.Akonadi.SearchQueryIterator.xml searchqueryiteratorinterface )
qt4_add_dbus_interfaces( libakonadiprivate_SRCS ${CMAKE_CURRENT_SOURCE_DIR}/../interfaces/org.freedesktop.Akonadi.AgentManager.xml ${CMAKE_CURRENT_SOURCE_DIR}/../interfaces/org.freedesktop.Akonadi.Resource.xml )
qt4_add_dbus_interface( libakonadiprivate_SRCS interfaces/org.freedesktop.Akonadi.Search.xml searchinterface )
qt4_add_dbus_interface( libakonadiprivate_SRCS interfaces/org.freedesktop.Akonadi.SearchQuery.xml searchqueryinterface )
qt4_add_dbus_interface( libakonadiprivate_SRCS interfaces/org.freedesktop.Akonadi.SearchQueryIterator.xml searchqueryiteratorinterface )
set(xesam_xml interfaces/org.freedesktop.xesam.Search.xml)
......@@ -151,11 +151,11 @@ install( FILES src/storage/mysql-global.conf DESTINATION ${CONFIG_INSTALL_DIR}/a
## DBus XML files
install( FILES
interfaces/org.kde.Akonadi.Search.xml
interfaces/org.kde.Akonadi.ControlManager.xml
interfaces/org.kde.Akonadi.Server.xml
interfaces/org.kde.Akonadi.SearchQueryIterator.xml
interfaces/org.kde.Akonadi.TracerNotification.xml
interfaces/org.kde.Akonadi.SearchQuery.xml
interfaces/org.freedesktop.Akonadi.Search.xml
interfaces/org.freedesktop.Akonadi.ControlManager.xml
interfaces/org.freedesktop.Akonadi.Server.xml
interfaces/org.freedesktop.Akonadi.SearchQueryIterator.xml
interfaces/org.freedesktop.Akonadi.TracerNotification.xml
interfaces/org.freedesktop.Akonadi.SearchQuery.xml
DESTINATION ${DBUS_INTERFACES_INSTALL_DIR} )
......@@ -15,7 +15,7 @@ set( akonadictl_SRCS
automoc4(akonadictl akonadictl_SRCS)
qt4_add_dbus_interfaces( akonadictl_SRCS
${CMAKE_CURRENT_SOURCE_DIR}/../interfaces/org.kde.Akonadi.ControlManager.xml
${CMAKE_CURRENT_SOURCE_DIR}/../interfaces/org.freedesktop.Akonadi.ControlManager.xml
)
add_executable(akonadictl ${akonadictl_SRCS})
......
......@@ -52,7 +52,7 @@ static bool startServer()
static bool stopServer()
{
org::kde::Akonadi::ControlManager iface( AKONADI_DBUS_CONTROL_SERVICE, "/ControlManager", QDBusConnection::sessionBus(), 0 );
org::freedesktop::Akonadi::ControlManager iface( AKONADI_DBUS_CONTROL_SERVICE, "/ControlManager", QDBusConnection::sessionBus(), 0 );
iface.shutdown();
return true;
......
......@@ -27,14 +27,14 @@ set( control_SRCS
automoc4(akonadi_control control_SRCS)
qt4_add_dbus_adaptor( control_SRCS ${CMAKE_CURRENT_SOURCE_DIR}/../../interfaces/org.kde.Akonadi.AgentManager.xml agentmanager.h AgentManager )
qt4_add_dbus_adaptor( control_SRCS ${CMAKE_CURRENT_SOURCE_DIR}/../interfaces/org.kde.Akonadi.ControlManager.xml controlmanager.h ControlManager )
qt4_add_dbus_adaptor( control_SRCS ${CMAKE_CURRENT_SOURCE_DIR}/../../interfaces/org.freedesktop.Akonadi.AgentManager.xml agentmanager.h AgentManager )
qt4_add_dbus_adaptor( control_SRCS ${CMAKE_CURRENT_SOURCE_DIR}/../interfaces/org.freedesktop.Akonadi.ControlManager.xml controlmanager.h ControlManager )
qt4_add_dbus_interfaces( control_SRCS
${CMAKE_CURRENT_SOURCE_DIR}/../../interfaces/org.kde.Akonadi.Tracer.xml
${CMAKE_CURRENT_SOURCE_DIR}/../../interfaces/org.kde.Akonadi.Agent.Control.xml
${CMAKE_CURRENT_SOURCE_DIR}/../../interfaces/org.kde.Akonadi.Agent.Status.xml
${CMAKE_CURRENT_SOURCE_DIR}/../../interfaces/org.kde.Akonadi.Resource.xml
${CMAKE_CURRENT_SOURCE_DIR}/../interfaces/org.kde.Akonadi.Server.xml
${CMAKE_CURRENT_SOURCE_DIR}/../../interfaces/org.freedesktop.Akonadi.Tracer.xml
${CMAKE_CURRENT_SOURCE_DIR}/../../interfaces/org.freedesktop.Akonadi.Agent.Control.xml
${CMAKE_CURRENT_SOURCE_DIR}/../../interfaces/org.freedesktop.Akonadi.Agent.Status.xml
${CMAKE_CURRENT_SOURCE_DIR}/../../interfaces/org.freedesktop.Akonadi.Resource.xml
${CMAKE_CURRENT_SOURCE_DIR}/../interfaces/org.freedesktop.Akonadi.Server.xml
)
......@@ -45,5 +45,5 @@ target_link_libraries(akonadi_control ${QT_QTCORE_LIBRARY} ${QT_QTDBUS_LIBRARY}
install(TARGETS akonadi_control DESTINATION ${BIN_INSTALL_DIR})
configure_file(org.kde.Akonadi.Control.service.cmake ${CMAKE_CURRENT_BINARY_DIR}/org.kde.Akonadi.Control.service)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/org.kde.Akonadi.Control.service DESTINATION ${CMAKE_INSTALL_PREFIX}/share/dbus-1/services)
configure_file(org.freedesktop.Akonadi.Control.service.cmake ${CMAKE_CURRENT_BINARY_DIR}/org.freedesktop.Akonadi.Control.service)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/org.freedesktop.Akonadi.Control.service DESTINATION ${CMAKE_INSTALL_PREFIX}/share/dbus-1/services)
......@@ -66,9 +66,9 @@ class AgentInstanceInfo
QString identifier;
QString agentType;
Akonadi::ProcessControl *controller;
org::kde::Akonadi::Agent::Control *agentControlInterface;
org::kde::Akonadi::Agent::Status *agentStatusInterface;
org::kde::Akonadi::Resource *resourceInterface;
org::freedesktop::Akonadi::Agent::Control *agentControlInterface;
org::freedesktop::Akonadi::Agent::Status *agentStatusInterface;
org::freedesktop::Akonadi::Resource *resourceInterface;
};
......
......@@ -41,12 +41,12 @@ AgentManager::AgentManager( QObject *parent )
new AgentManagerAdaptor( this );
QDBusConnection::sessionBus().registerObject( "/AgentManager", this );
mTracer = new org::kde::Akonadi::Tracer( "org.kde.Akonadi", "/tracing", QDBusConnection::sessionBus(), this );
mTracer = new org::freedesktop::Akonadi::Tracer( "org.freedesktop.Akonadi", "/tracing", QDBusConnection::sessionBus(), this );
connect( QDBusConnection::sessionBus().interface(), SIGNAL( serviceOwnerChanged( const QString&, const QString&, const QString& ) ),
this, SLOT( serviceOwnerChanged( const QString&, const QString&, const QString& ) ) );
if ( QDBusConnection::sessionBus().interface()->isServiceRegistered( "org.kde.Akonadi" ) )
if ( QDBusConnection::sessionBus().interface()->isServiceRegistered( "org.freedesktop.Akonadi" ) )
qFatal( "akonadiserver already running!" );
mStorageController = new Akonadi::ProcessControl;
......@@ -94,8 +94,9 @@ void AgentManager::cleanup()
mAgentInstances.clear();
mStorageController->setCrashPolicy( ProcessControl::StopOnCrash );
org::kde::Akonadi::Server *serverIface = new org::kde::Akonadi::Server( "org.kde.Akonadi", "/Server",
QDBusConnection::sessionBus(), this );
org::freedesktop::Akonadi::Server *serverIface =
new org::freedesktop::Akonadi::Server( "org.freedesktop.Akonadi", "/Server",
QDBusConnection::sessionBus(), this );
serverIface->quit();
delete mStorageController;
......@@ -434,16 +435,16 @@ void AgentManager::save()
void AgentManager::serviceOwnerChanged( const QString &name, const QString&, const QString &newOwner )
{
if ( name == "org.kde.Akonadi" && !newOwner.isEmpty() ) {
if ( name == "org.freedesktop.Akonadi" && !newOwner.isEmpty() ) {
// server is operational, start agents
continueStartup();
}
if ( name.startsWith( "org.kde.Akonadi.Agent." ) ) {
if ( name.startsWith( "org.freedesktop.Akonadi.Agent." ) ) {
if ( newOwner.isEmpty() )
return;
const QString identifier = name.mid( 22 );
const QString identifier = name.mid( 30 );
if ( !mAgentInstances.contains( identifier ) )
return;
......@@ -453,8 +454,9 @@ void AgentManager::serviceOwnerChanged( const QString &name, const QString&, con
mAgentInstances[ identifier ].agentControlInterface = 0;
mAgentInstances[ identifier ].agentStatusInterface = 0;
org::kde::Akonadi::Agent::Control *agentControlIface = new org::kde::Akonadi::Agent::Control( "org.kde.Akonadi.Agent." + identifier,
"/", QDBusConnection::sessionBus(), this );
org::freedesktop::Akonadi::Agent::Control *agentControlIface =
new org::freedesktop::Akonadi::Agent::Control( "org.freedesktop.Akonadi.Agent." + identifier,
"/", QDBusConnection::sessionBus(), this );
if ( !agentControlIface || !agentControlIface->isValid() ) {
mTracer->error( QLatin1String( "AgentManager::resourceRegistered" ),
QString( "Cannot connect to agent instance with identifier '%1', error message: '%2'" )
......@@ -466,8 +468,9 @@ void AgentManager::serviceOwnerChanged( const QString &name, const QString&, con
mAgentInstances[ identifier ].agentControlInterface = agentControlIface;
org::kde::Akonadi::Agent::Status *agentStatusIface = new org::kde::Akonadi::Agent::Status( "org.kde.Akonadi.Agent." + identifier,
"/", QDBusConnection::sessionBus(), this );
org::freedesktop::Akonadi::Agent::Status *agentStatusIface =
new org::freedesktop::Akonadi::Agent::Status( "org.freedesktop.Akonadi.Agent." + identifier,
"/", QDBusConnection::sessionBus(), this );
if ( !agentStatusIface || !agentStatusIface->isValid() ) {
mTracer->error( QLatin1String( "AgentManager::resourceRegistered" ),
QString( "Cannot connect to agent instance with identifier '%1', error message: '%2'" )
......@@ -491,18 +494,20 @@ void AgentManager::serviceOwnerChanged( const QString &name, const QString&, con
emit agentInstanceAdded( identifier );
}
else if ( name.startsWith( "org.kde.Akonadi.Resource." ) ) {
else if ( name.startsWith( "org.freedesktop.Akonadi.Resource." ) ) {
if ( newOwner.isEmpty() )
return;
const QString identifier = name.mid( 25 );
const QString identifier = name.mid( 33 );
if ( !mAgentInstances.contains( identifier ) )
return;
delete mAgentInstances[ identifier ].resourceInterface;
mAgentInstances[ identifier ].resourceInterface = 0;
org::kde::Akonadi::Resource *resInterface = new org::kde::Akonadi::Resource( "org.kde.Akonadi.Resource." + identifier, "/", QDBusConnection::sessionBus(), this );
org::freedesktop::Akonadi::Resource *resInterface =
new org::freedesktop::Akonadi::Resource( "org.freedesktop.Akonadi.Resource." + identifier,
"/", QDBusConnection::sessionBus(), this );
if ( !resInterface || !resInterface->isValid() ) {
mTracer->error( QLatin1String( "AgentManager::resourceRegistered" ),
......@@ -520,7 +525,7 @@ void AgentManager::serviceOwnerChanged( const QString &name, const QString&, con
void AgentManager::status( int status, const QString &message )
{
org::kde::Akonadi::Agent::Status *interface = static_cast<org::kde::Akonadi::Agent::Status*>( sender() );
org::freedesktop::Akonadi::Agent::Status *interface = static_cast<org::freedesktop::Akonadi::Agent::Status*>( sender() );
if ( !interface ) {
mTracer->error( QLatin1String( "AgentManager::status" ),
QLatin1String( "Got signal from unknown sender" ) );
......@@ -539,7 +544,7 @@ void AgentManager::status( int status, const QString &message )
void AgentManager::percent( int progress )
{
org::kde::Akonadi::Agent::Status *interface = static_cast<org::kde::Akonadi::Agent::Status*>( sender() );
org::freedesktop::Akonadi::Agent::Status *interface = static_cast<org::freedesktop::Akonadi::Agent::Status*>( sender() );
if ( !interface ) {
mTracer->error( QLatin1String( "AgentManager::percent" ),
QLatin1String( "Got signal from unknown sender" ) );
......@@ -558,7 +563,7 @@ void AgentManager::percent( int progress )
void AgentManager::warning( const QString &message )
{
org::kde::Akonadi::Agent::Status *interface = static_cast<org::kde::Akonadi::Agent::Status*>( sender() );
org::freedesktop::Akonadi::Agent::Status *interface = static_cast<org::freedesktop::Akonadi::Agent::Status*>( sender() );
if ( !interface ) {
mTracer->error( QLatin1String( "AgentManager::warning" ),
QLatin1String( "Got signal from unknown sender" ) );
......@@ -577,7 +582,7 @@ void AgentManager::warning( const QString &message )
void AgentManager::error( const QString &message )
{
org::kde::Akonadi::Agent::Status *interface = static_cast<org::kde::Akonadi::Agent::Status*>( sender() );
org::freedesktop::Akonadi::Agent::Status *interface = static_cast<org::freedesktop::Akonadi::Agent::Status*>( sender() );
if ( !interface ) {
mTracer->error( QLatin1String( "AgentManager::error" ),
QLatin1String( "Got signal from unknown sender" ) );
......@@ -596,7 +601,7 @@ void AgentManager::error( const QString &message )
void AgentManager::resourceNameChanged( const QString &data )
{
org::kde::Akonadi::Resource *resource = static_cast<org::kde::Akonadi::Resource*>( sender() );
org::freedesktop::Akonadi::Resource *resource = static_cast<org::freedesktop::Akonadi::Resource*>( sender() );
if ( !resource ) {
mTracer->error( QLatin1String( "AgentManager::resourceNameChanged" ),
QLatin1String( "Got signal from unknown sender" ) );
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment