Commit 7e9c6ad8 authored by Till Adam's avatar Till Adam
Browse files

Add the server here.

svn path=/trunk/KDE/kdepim/akonadi/server/; revision=559057
parent 45216dfc
include_directories( ${CMAKE_CURRENT_SOURCE_DIR}/include )
include_directories( ${CMAKE_CURRENT_SOURCE_DIR}/src/searchproviders )
include_directories( ${CMAKE_CURRENT_SOURCE_DIR}/src )
include_directories( ${CMAKE_CURRENT_SOURCE_DIR}/src/handler )
include_directories( ${CMAKE_CURRENT_SOURCE_DIR}/tests )
include_directories( ${QT_QTDBUS_INCLUDE_DIR} )
add_subdirectory( control )
add_subdirectory( debugger )
add_subdirectory( src )
add_subdirectory( tests )
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fexceptions" )
########### next target ###############
set(libakonadiprivate_SRCS
src/akonadi.cpp
src/akonadiconnection.cpp
src/handler.cpp
src/handlerhelper.cpp
src/response.cpp
src/handler/append.cpp
src/handler/create.cpp
src/handler/capability.cpp
src/handler/expunge.cpp
src/handler/fetch.cpp
src/handler/fetchquery.cpp
src/handler/list.cpp
src/handler/login.cpp
src/handler/logout.cpp
src/handler/noop.cpp
src/handler/search.cpp
src/handler/searchhelper.cpp
src/handler/searchpersistent.cpp
src/handler/select.cpp
src/handler/status.cpp
src/handler/store.cpp
src/handler/storequery.cpp
src/handler/uid.cpp
src/persistentsearch.cpp
src/persistentsearchmanager.cpp
src/searchprovider.cpp
src/searchprovidermanager.cpp
src/searchproviders/emailsearchprovider.cpp
src/storage/entity.cpp
src/storage/datastore.cpp
src/storage/debug.cpp
src/collection.cpp
src/tracer.cpp
src/dbustracer.cpp
src/filetracer.cpp
src/notificationmanager.cpp
)
qt4_add_dbus_adaptor( libakonadiprivate_SRCS
interfaces/org.kde.Akonadi.NotificationManager.xml notificationmanager.h Akonadi::NotificationManager
)
qt4_add_dbus_adaptor( libakonadiprivate_SRCS
interfaces/org.kde.Akonadi.TracerNotification.xml dbustracer.h Akonadi::DBusTracer
)
qt4_add_dbus_adaptor( libakonadiprivate_SRCS
interfaces/org.kde.Akonadi.Tracer.xml tracer.h Akonadi::Tracer
)
qt4_add_dbus_interfaces( libakonadiprivate_SRCS interfaces/org.kde.Akonadi.AgentManager.xml )
kde4_add_library( akonadiprivate SHARED ${libakonadiprivate_SRCS} )
target_link_libraries( akonadiprivate ${QT_QTCORE_LIBRARY} ${QT_QTNETWORK_LIBRARIES}
${QT_QTSQL_LIBRARIES} ${QT_QTDBUS_LIBRARIES} )
install( TARGETS akonadiprivate DESTINATION ${LIB_INSTALL_DIR} )
set( akonadiserver_bin_SRCS src/main.cpp )
kde4_automoc( ${libakonadiprivate_SRCS} ${akonadiserver_bin_SRCS} )
kde4_add_executable( akonadiserver_bin ${akonadiserver_bin_SRCS} )
set_target_properties( akonadiserver_bin PROPERTIES OUTPUT_NAME akonadiserver )
target_link_libraries( akonadiserver_bin akonadiprivate )
install(TARGETS akonadiserver_bin DESTINATION ${BIN_INSTALL_DIR} )
# Doxyfile 1.4.1-KDevelop
#---------------------------------------------------------------------------
# Project related configuration options
#---------------------------------------------------------------------------
PROJECT_NAME = akonadi.kdevelop
PROJECT_NUMBER = 0.1
OUTPUT_DIRECTORY =
CREATE_SUBDIRS = NO
OUTPUT_LANGUAGE = English
USE_WINDOWS_ENCODING = NO
BRIEF_MEMBER_DESC = YES
REPEAT_BRIEF = YES
ABBREVIATE_BRIEF = "The $name class" \
"The $name widget" \
"The $name file" \
is \
provides \
specifies \
contains \
represents \
a \
an \
the
ALWAYS_DETAILED_SEC = NO
INLINE_INHERITED_MEMB = NO
FULL_PATH_NAMES = YES
STRIP_FROM_PATH = /home/till/Code/KDAB/cvs/kdchart/
STRIP_FROM_INC_PATH =
SHORT_NAMES = NO
JAVADOC_AUTOBRIEF = NO
MULTILINE_CPP_IS_BRIEF = NO
DETAILS_AT_TOP = NO
INHERIT_DOCS = YES
DISTRIBUTE_GROUP_DOC = NO
TAB_SIZE = 8
ALIASES =
OPTIMIZE_OUTPUT_FOR_C = NO
OPTIMIZE_OUTPUT_JAVA = NO
SUBGROUPING = YES
#---------------------------------------------------------------------------
# Build related configuration options
#---------------------------------------------------------------------------
EXTRACT_ALL = NO
EXTRACT_PRIVATE = NO
EXTRACT_STATIC = NO
EXTRACT_LOCAL_CLASSES = YES
EXTRACT_LOCAL_METHODS = NO
HIDE_UNDOC_MEMBERS = NO
HIDE_UNDOC_CLASSES = NO
HIDE_FRIEND_COMPOUNDS = NO
HIDE_IN_BODY_DOCS = NO
INTERNAL_DOCS = NO
CASE_SENSE_NAMES = YES
HIDE_SCOPE_NAMES = NO
SHOW_INCLUDE_FILES = YES
INLINE_INFO = YES
SORT_MEMBER_DOCS = YES
SORT_BRIEF_DOCS = NO
SORT_BY_SCOPE_NAME = NO
GENERATE_TODOLIST = YES
GENERATE_TESTLIST = YES
GENERATE_BUGLIST = YES
GENERATE_DEPRECATEDLIST= YES
ENABLED_SECTIONS =
MAX_INITIALIZER_LINES = 30
SHOW_USED_FILES = YES
SHOW_DIRECTORIES = YES
FILE_VERSION_FILTER =
#---------------------------------------------------------------------------
# configuration options related to warning and progress messages
#---------------------------------------------------------------------------
QUIET = NO
WARNINGS = YES
WARN_IF_UNDOCUMENTED = YES
WARN_IF_DOC_ERROR = YES
WARN_NO_PARAMDOC = NO
WARN_FORMAT = "$file:$line: $text"
WARN_LOGFILE =
#---------------------------------------------------------------------------
# configuration options related to the input files
#---------------------------------------------------------------------------
INPUT = /home/till/Code/kde/svn/trunk/KDE/kdepim/akonadiserver/akonadi
FILE_PATTERNS = *.c \
*.cc \
*.cxx \
*.cpp \
*.c++ \
*.java \
*.ii \
*.ixx \
*.ipp \
*.i++ \
*.inl \
*.h \
*.hh \
*.hxx \
*.hpp \
*.h++ \
*.idl \
*.odl \
*.cs \
*.php \
*.php3 \
*.inc \
*.m \
*.mm \
*.dox \
*.C \
*.CC \
*.C++ \
*.II \
*.I++ \
*.H \
*.HH \
*.H++ \
*.CS \
*.PHP \
*.PHP3 \
*.M \
*.MM \
*.C \
*.H \
*.tlh \
*.diff \
*.patch \
*.moc \
*.xpm \
*.dox
RECURSIVE = yes
EXCLUDE =
EXCLUDE_SYMLINKS = NO
EXCLUDE_PATTERNS =
EXAMPLE_PATH =
EXAMPLE_PATTERNS = *
EXAMPLE_RECURSIVE = NO
IMAGE_PATH =
INPUT_FILTER =
FILTER_PATTERNS =
FILTER_SOURCE_FILES = NO
#---------------------------------------------------------------------------
# configuration options related to source browsing
#---------------------------------------------------------------------------
SOURCE_BROWSER = NO
INLINE_SOURCES = NO
STRIP_CODE_COMMENTS = YES
REFERENCED_BY_RELATION = YES
REFERENCES_RELATION = YES
VERBATIM_HEADERS = YES
#---------------------------------------------------------------------------
# configuration options related to the alphabetical class index
#---------------------------------------------------------------------------
ALPHABETICAL_INDEX = NO
COLS_IN_ALPHA_INDEX = 5
IGNORE_PREFIX =
#---------------------------------------------------------------------------
# configuration options related to the HTML output
#---------------------------------------------------------------------------
GENERATE_HTML = YES
HTML_OUTPUT = html
HTML_FILE_EXTENSION = .html
HTML_HEADER =
HTML_FOOTER =
HTML_STYLESHEET =
HTML_ALIGN_MEMBERS = YES
GENERATE_HTMLHELP = NO
CHM_FILE =
HHC_LOCATION =
GENERATE_CHI = NO
BINARY_TOC = NO
TOC_EXPAND = NO
DISABLE_INDEX = NO
ENUM_VALUES_PER_LINE = 4
GENERATE_TREEVIEW = NO
TREEVIEW_WIDTH = 250
#---------------------------------------------------------------------------
# configuration options related to the LaTeX output
#---------------------------------------------------------------------------
GENERATE_LATEX = YES
LATEX_OUTPUT = latex
LATEX_CMD_NAME = latex
MAKEINDEX_CMD_NAME = makeindex
COMPACT_LATEX = NO
PAPER_TYPE = a4wide
EXTRA_PACKAGES =
LATEX_HEADER =
PDF_HYPERLINKS = NO
USE_PDFLATEX = NO
LATEX_BATCHMODE = NO
LATEX_HIDE_INDICES = NO
#---------------------------------------------------------------------------
# configuration options related to the RTF output
#---------------------------------------------------------------------------
GENERATE_RTF = NO
RTF_OUTPUT = rtf
COMPACT_RTF = NO
RTF_HYPERLINKS = NO
RTF_STYLESHEET_FILE =
RTF_EXTENSIONS_FILE =
#---------------------------------------------------------------------------
# configuration options related to the man page output
#---------------------------------------------------------------------------
GENERATE_MAN = NO
MAN_OUTPUT = man
MAN_EXTENSION = .3
MAN_LINKS = NO
#---------------------------------------------------------------------------
# configuration options related to the XML output
#---------------------------------------------------------------------------
GENERATE_XML = yes
XML_OUTPUT = xml
XML_SCHEMA =
XML_DTD =
XML_PROGRAMLISTING = YES
#---------------------------------------------------------------------------
# configuration options for the AutoGen Definitions output
#---------------------------------------------------------------------------
GENERATE_AUTOGEN_DEF = NO
#---------------------------------------------------------------------------
# configuration options related to the Perl module output
#---------------------------------------------------------------------------
GENERATE_PERLMOD = NO
PERLMOD_LATEX = NO
PERLMOD_PRETTY = YES
PERLMOD_MAKEVAR_PREFIX =
#---------------------------------------------------------------------------
# Configuration options related to the preprocessor
#---------------------------------------------------------------------------
ENABLE_PREPROCESSING = YES
MACRO_EXPANSION = NO
EXPAND_ONLY_PREDEF = NO
SEARCH_INCLUDES = YES
INCLUDE_PATH =
INCLUDE_FILE_PATTERNS =
PREDEFINED =
EXPAND_AS_DEFINED =
SKIP_FUNCTION_MACROS = YES
#---------------------------------------------------------------------------
# Configuration::additions related to external references
#---------------------------------------------------------------------------
TAGFILES =
GENERATE_TAGFILE = akonadi.tag
ALLEXTERNALS = NO
EXTERNAL_GROUPS = YES
PERL_PATH = /usr/bin/perl
#---------------------------------------------------------------------------
# Configuration options related to the dot tool
#---------------------------------------------------------------------------
CLASS_DIAGRAMS = YES
HIDE_UNDOC_RELATIONS = YES
HAVE_DOT = NO
CLASS_GRAPH = YES
COLLABORATION_GRAPH = YES
GROUP_GRAPHS = YES
UML_LOOK = NO
TEMPLATE_RELATIONS = NO
INCLUDE_GRAPH = YES
INCLUDED_BY_GRAPH = YES
CALL_GRAPH = NO
GRAPHICAL_HIERARCHY = YES
DIRECTORY_GRAPH = YES
DOT_IMAGE_FORMAT = png
DOT_PATH =
DOTFILE_DIRS =
MAX_DOT_GRAPH_WIDTH = 1024
MAX_DOT_GRAPH_HEIGHT = 1024
MAX_DOT_GRAPH_DEPTH = 1000
DOT_TRANSPARENT = NO
DOT_MULTI_TARGETS = NO
GENERATE_LEGEND = YES
DOT_CLEANUP = YES
#---------------------------------------------------------------------------
# Configuration::additions related to the search engine
#---------------------------------------------------------------------------
SEARCHENGINE = NO
# File generated by kdevelop's qmake manager.
# -------------------------------------------
# Subdir relative project main directory: .
# Target is a subdirs project
SUBDIRS += src qtest
TEMPLATE = subdirs
test.target=test
test.commands= cd qtest && make test
test.depends = all $(TARGET)
QMAKE_EXTRA_TARGETS += test
include_directories( ${QT_QTDBUS_INCLUDE_DIR} )
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fexceptions" )
configure_file(config-prefix.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-prefix.h )
########### next target ###############
set( control_SRCS
agentmanager.cpp
main.cpp
pluginmanager.cpp
processcontrol.cpp
profilemanager.cpp
)
qt4_add_dbus_adaptor( control_SRCS ../interfaces/org.kde.Akonadi.AgentManager.xml agentmanager.h AgentManager )
qt4_add_dbus_interfaces( control_SRCS ../interfaces/org.kde.Akonadi.Tracer.xml )
kde4_automoc( ${control_SRCS} )
kde4_add_executable(akonadi_control ${control_SRCS})
set_target_properties(akonadi_control PROPERTIES OUTPUT_NAME akonadi_control)
target_link_libraries(akonadi_control ${QT_QTCORE_LIBRARIES} ${QT_QTDBUS_LIBRARIES})
install(TARGETS akonadi_control DESTINATION ${BIN_INSTALL_DIR})
/***************************************************************************
* Copyright (C) 2006 by Tobias Koenig <tokoe@kde.org> *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU Library General Public License as *
* published by the Free Software Foundation; either version 2 of the *
* License, or (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU Library General Public *
* License along with this program; if not, write to the *
* Free Software Foundation, Inc., *
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
***************************************************************************/
#include "agentmanager.h"
#include "agentmanageradaptor.h"
AgentManager::AgentManager( QObject *parent )
: QObject( parent )
{
new AgentManagerAdaptor( this );
QDBus::sessionBus().registerObject( "/", this );
}
AgentManager::~AgentManager()
{
}
QStringList AgentManager::agentTypes() const
{
return mPluginManager.agentTypes();
}
QString AgentManager::agentName( const QString &identifier ) const
{
return mPluginManager.agentName( identifier );
}
QString AgentManager::agentComment( const QString &identifier ) const
{
return mPluginManager.agentComment( identifier );
}
QString AgentManager::agentIcon( const QString &identifier ) const
{
return mPluginManager.agentIcon( identifier );
}
QStringList AgentManager::agentMimeTypes( const QString &identifier ) const
{
return mPluginManager.agentMimeTypes( identifier );
}
QStringList AgentManager::agentCapabilities( const QString &identifier ) const
{
return mPluginManager.agentCapabilities( identifier );
}
QString AgentManager::createAgentInstance( const QString &identifier )
{
return QString();
}
void AgentManager::removeAgentInstance( const QString &identifier )
{
}
QStringList AgentManager::profiles() const
{
return mProfileManager.profiles();
}
bool AgentManager::createProfile( const QString &identifier )
{
return mProfileManager.createProfile( identifier );
}
void AgentManager::removeProfile( const QString &identifier )
{
mProfileManager.removeProfile( identifier );
}
bool AgentManager::profileAddAgent( const QString &profileIdentifier, const QString &agentIdentifier )
{
return mProfileManager.profileAddAgent( profileIdentifier, agentIdentifier );
}
bool AgentManager::profileRemoveAgent( const QString &profileIdentifier, const QString &agentIdentifier )
{
return mProfileManager.profileRemoveAgent( profileIdentifier, agentIdentifier );
}
QStringList AgentManager::profileAgents( const QString &identifier ) const
{
return mProfileManager.profileAgents( identifier );
}
#include "agentmanager.moc"
/***************************************************************************
* Copyright (C) 2006 by Tobias Koenig <tokoe@kde.org> *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU Library General Public License as *
* published by the Free Software Foundation; either version 2 of the *
* License, or (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU Library General Public *
* License along with this program; if not, write to the *
* Free Software Foundation, Inc., *
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
***************************************************************************/
#ifndef AGENTMANAGER_H
#define AGENTMANAGER_H
#include <QtCore/QStringList>
#include "pluginmanager.h"
#include "profilemanager.h"
/**
* Interface for handling profiles and agents in
* the Akonadi server.
*/
class AgentManager : public QObject
{
Q_OBJECT
public:
/**
* Creates a new agent manager.
*
* @param parent The parent object.
*/
AgentManager( QObject *parent = 0 );
/**
* Destroys the agent manager.
*/
~AgentManager();
public Q_SLOTS:
/**
* Agent types specific methods
*/
/**
* Returns the list of identifiers of all available
* agent types.
*/
QStringList agentTypes() const;
/**
* Returns the i18n'ed name of the agent type for
* the given @p identifier.
*/
QString agentName( const QString &identifier ) const;
/**
* Returns the i18n'ed comment of the agent type for
* the given @p identifier.
*/
QString agentComment( const QString &identifier ) const;
/**
* Returns the icon name of the agent type for the
* given @p identifier.
*/
QString agentIcon( const QString &identifier ) const;
/**
* Returns a list of supported mimetypes of the agent type
* for the given @p identifier.
*/
QStringList agentMimeTypes( const QString &identifier ) const;
/**
* Returns a list of supported capabilities of the agent type
* for the given @p identifier.
*/
QStringList agentCapabilities( const QString &identifier ) const;
/**
* Agent specific methods
*/
/**
* Creates a new agent of the given agent type @p identifier.
*
* @return The identifier of the new agent if created successfully,
* an empty string otherwise.
*/
QString createAgentInstance( const QString &identifier );
/**
* Removes the agent with the given @p identifier.
*/
void removeAgentInstance( const QString &identifier );
/**
* Profile specific methods
*/
/**
* Returns the list of identifiers of available profiles.
*/
QStringList profiles() const;
/**
* Creates a new profile with the given @p identifier.
*
* @return true if created successfull, false a profile with the
* same @p identifier already exists.
*/
bool createProfile( const QString &identifier );
/**
* Removes the profile with the given @p identifier.
*/
void removeProfile( const QString &identifier );
/**
* Adds the agent with the given identifier to the profile with
* the given identifier.
*