diff --git a/akonadi/CMakeLists.txt b/akonadi/CMakeLists.txt index 5f21331ae..fd15e6338 100644 --- a/akonadi/CMakeLists.txt +++ b/akonadi/CMakeLists.txt @@ -1,261 +1,260 @@ project(akonadi-kde) add_definitions( -DKDE_DEFAULT_DEBUG_AREA=5250 ) set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${KDE4_ENABLE_EXCEPTIONS}" ) if(CMAKE_COMPILE_GCOV) set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fprofile-arcs -ftest-coverage") endif(CMAKE_COMPILE_GCOV) if (KDE4_BUILD_TESTS) # only with this macro the AKONADI_TESTS_EXPORT macro will do something add_definitions(-DCOMPILING_TESTS) add_subdirectory( tests ) endif (KDE4_BUILD_TESTS) add_definitions( -DQT_NO_CAST_FROM_ASCII ) add_definitions( -DQT_NO_CAST_TO_ASCII ) add_subdirectory( kabc ) add_subdirectory( kmime ) include_directories( ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR} ${QT_QTDBUS_INCLUDE_DIR} ${Boost_INCLUDE_DIR} ${KDE4_INCLUDE_DIR} ${AKONADI_INCLUDE_DIR} ${AKONADI_INCLUDE_DIR}/akonadi/private ) # libakonadi-kde set( akonadikde_LIB_SRC entity.cpp # keep it at top to not break enable-final agentbase.cpp agentfilterproxymodel.cpp agentinstance.cpp agentinstancecreatejob.cpp agentinstancemodel.cpp agentinstancewidget.cpp agentmanager.cpp agenttype.cpp agenttypemodel.cpp agenttypewidget.cpp agenttypedialog.cpp attribute.cpp attributefactory.cpp cachepolicy.cpp cachepolicypage.cpp changerecorder.cpp collection.cpp collectioncopyjob.cpp collectioncreatejob.cpp collectiondeletejob.cpp collectiondialog.cpp collectionfilterproxymodel.cpp collectiongeneralpropertiespage.cpp collectionfetchjob.cpp collectionfetchscope.cpp collectionmodel.cpp collectionmodel_p.cpp collectionmodifyjob.cpp collectionmovejob.cpp collectionpathresolver.cpp collectionpropertiesdialog.cpp collectionpropertiespage.cpp collectionrequester.cpp collectionrightsattribute.cpp collectionselectjob.cpp collectionstatistics.cpp collectionstatisticsdelegate.cpp collectionstatisticsjob.cpp collectionstatisticsmodel.cpp collectionsync.cpp collectionview.cpp control.cpp descendantsproxymodel.cpp entitycache.cpp entitydisplayattribute.cpp entityhiddenattribute.cpp entitytreemodel.cpp entitytreemodel_p.cpp entityfilterproxymodel.cpp entitytreeviewstatesaver.cpp erroroverlay.cpp exception.cpp - expungejob.cpp favoritecollectionsmodel.cpp firstrun.cpp flatcollectionproxymodel.cpp item.cpp itemcreatejob.cpp itemcopyjob.cpp itemdeletejob.cpp itemfetchjob.cpp itemfetchscope.cpp itemmodel.cpp itemmonitor.cpp itemmovejob.cpp itemserializer.cpp itemserializerplugin.cpp itemmodifyjob.cpp itemsync.cpp itemview.cpp job.cpp linkjob.cpp mimetypechecker.cpp monitor.cpp monitor_p.cpp pastehelper.cpp preprocessorbase.cpp protocolhelper.cpp resourcebase.cpp resourcescheduler.cpp resourceselectjob.cpp searchcreatejob.cpp selectionproxymodel.cpp selftestdialog.cpp session.cpp servermanager.cpp standardactionmanager.cpp statisticsproxymodel.cpp statisticstooltipproxymodel.cpp subscriptionjob.cpp subscriptionchangeproxymodel.cpp subscriptiondialog.cpp subscriptionmodel.cpp transactionjobs.cpp transactionsequence.cpp unlinkjob.cpp # Temporary until ported to Qt-plugin framework pluginloader.cpp ) # DBus interfaces and adaptors set(akonadi_xml ${AKONADI_DBUS_INTERFACES_DIR}/org.freedesktop.Akonadi.NotificationManager.xml) set_source_files_properties(${akonadi_xml} PROPERTIES INCLUDE "notificationmessage_p.h") qt4_add_dbus_interface( akonadikde_LIB_SRC ${akonadi_xml} notificationmanagerinterface ) qt4_add_dbus_interfaces( akonadikde_LIB_SRC ${AKONADI_DBUS_INTERFACES_DIR}/org.freedesktop.Akonadi.AgentManager.xml ) qt4_add_dbus_interfaces( akonadikde_LIB_SRC ${AKONADI_DBUS_INTERFACES_DIR}/org.freedesktop.Akonadi.Tracer.xml ) qt4_add_dbus_adaptor( akonadikde_LIB_SRC ${AKONADI_DBUS_INTERFACES_DIR}/org.freedesktop.Akonadi.Resource.xml resourcebase.h Akonadi::ResourceBase ) qt4_add_dbus_adaptor( akonadikde_LIB_SRC ${AKONADI_DBUS_INTERFACES_DIR}/org.freedesktop.Akonadi.Preprocessor.xml preprocessorbase.h Akonadi::PreprocessorBase ) qt4_add_dbus_adaptor( akonadikde_LIB_SRC ${AKONADI_DBUS_INTERFACES_DIR}/org.freedesktop.Akonadi.Agent.Status.xml agentbase.h Akonadi::AgentBase ) qt4_add_dbus_adaptor( akonadikde_LIB_SRC ${AKONADI_DBUS_INTERFACES_DIR}/org.freedesktop.Akonadi.Agent.Control.xml agentbase.h Akonadi::AgentBase ) kde4_add_ui_files( akonadikde_LIB_SRC cachepolicypage.ui collectiongeneralpropertiespage.ui subscriptiondialog.ui controlprogressindicator.ui selftestdialog.ui ) kde4_add_library( akonadi-kde SHARED ${akonadikde_LIB_SRC} ) macro_ensure_version( "4.2.0" ${KDE_VERSION} KDE_IS_AT_LEAST_42 ) target_link_libraries( akonadi-kde ${KDE4_SOLID_LIBS} ${QT_QTNETWORK_LIBRARY} ${QT_QTDBUS_LIBRARY} ${QT_QTSQL_LIBRARY} ${KDE4_KDEUI_LIBS} ${KDE4_KIO_LIBS} ${AKONADI_COMMON_LIBRARIES} ) set( AKONADI_KDE_DEPS ${KDE4_KDEUI_LIBS} ${QT_QTDBUS_LIBRARY} ${QT_QTCORE_LIBRARY} ) if(${KDE_IS_AT_LEAST_42}) target_link_libraries( akonadi-kde LINK_INTERFACE_LIBRARIES ${AKONADI_KDE_DEPS}) else(${KDE_IS_AT_LEAST_42}) target_link_libraries( akonadi-kde ${AKONADI_KDE_DEPS}) endif(${KDE_IS_AT_LEAST_42}) set_target_properties( akonadi-kde PROPERTIES VERSION ${GENERIC_LIB_VERSION} SOVERSION ${GENERIC_LIB_SOVERSION} ) install( TARGETS akonadi-kde EXPORT kdepimlibsLibraryTargets ${INSTALL_TARGETS_DEFAULT_ARGS} ) ########### install files ############### install( FILES akonadi_export.h agentbase.h agentfilterproxymodel.h agentinstance.h agentinstancecreatejob.h agentinstancemodel.h agentinstancewidget.h agentmanager.h agenttype.h agenttypemodel.h agenttypewidget.h agenttypedialog.h attribute.h attributefactory.h cachepolicy.h changerecorder.h collection.h collectioncopyjob.h collectioncreatejob.h collectiondeletejob.h collectiondialog.h collectionfilterproxymodel.h collectionfetchjob.h collectionfetchscope.h collectionmodel.h collectionmodifyjob.h collectionpropertiesdialog.h collectionpropertiespage.h collectionrequester.h collectionstatisticsdelegate.h collectionstatisticsmodel.h collectionstatistics.h collectionstatisticsjob.h collectionview.h control.h descendantsproxymodel.h entity.h entitydisplayattribute.h entityhiddenattribute.h entitytreemodel.h entityfilterproxymodel.h entitytreeviewstatesaver.h exception.h favoritecollectionsmodel.h item.h itemcreatejob.h itemcopyjob.h itemdeletejob.h itemfetchjob.h itemfetchscope.h itemmodel.h itemmodifyjob.h itemmonitor.h itemmovejob.h itempayloadinternals_p.h itemserializerplugin.h itemsync.h itemview.h job.h linkjob.h mimetypechecker.h monitor.h qtest_akonadi.h preprocessorbase.h resourcebase.h searchcreatejob.h selectionproxymodel.h session.h servermanager.h standardactionmanager.h statisticsproxymodel.h statisticstooltipproxymodel.h transactionjobs.h transactionsequence.h unlinkjob.h DESTINATION ${INCLUDE_INSTALL_DIR}/akonadi COMPONENT Devel ) install( FILES collectionpathresolver_p.h DESTINATION ${INCLUDE_INSTALL_DIR}/akonadi/private COMPONENT Devel ) install( FILES kcfg2dbus.xsl DESTINATION ${DATA_INSTALL_DIR}/akonadi-kde ) diff --git a/akonadi/Mainpage.dox b/akonadi/Mainpage.dox index 027b46eca..b8394cd15 100644 --- a/akonadi/Mainpage.dox +++ b/akonadi/Mainpage.dox @@ -1,145 +1,144 @@ /** @mainpage Akonadi client library \section libakonadi_intro Introduction libakonadi is the client access library for using the Akonadi PIM data server. All processes accessing Akonadi, including those which communicate with a remote server (\ref akonadi_design_agents "agents"), are considered clients. Functionality provided by libakonadi: - \ref libakonadi_objects - \ref libakonadi_collections - \ref libakonadi_pimitems - \ref libakonadi_jobs - \ref libakonadi_monitor - \ref libakonadi_serializer - \ref libakonadi_resource - \ref libakonadi_integration \section libakonadi_objects Akonadi Objects Akonadi works on two basic object types: collections and items. Collections are comparable to folders in a file system and are represented by the class Akonadi::Collection. Every collection has an associated cache policy represented by the class Akonadi::CachePolicy which defines what part of its content is cached for how long. All available ways to work with collections are listed in the \ref libakonadi_collections "Collections" section. Akonadi items are comparable to files in a file system and are represented by the class Akonadi::Item. Each item represents a single PIM object such as a mail or a contact. The actual object it represents is its so-called payload. All available ways to work with items are listed in the \ref libakonadi_pimitems "Items" section. Both, items and collections, are identified by a persistent unique identifier. Also, they can contain arbitrary attributes (derived from Akonadi::Attribute) to attach general or application specific meta data to them. Functionality common to both is provided by their base class Akonadi::Entity. \section libakonadi_collections Collection retrieval and manipulation See \ref akonadi_concepts_collections "Collection Concept" for more information about the concept of collections. A collection is represented by the Akonadi::Collection class. Classes to retrieve information about collections: - Akonadi::CollectionFetchJob - Akonadi::CollectionSelectJob - Akonadi::CollectionStatisticsJob Classes to manipulate collections: - Akonadi::CollectionCreateJob - Akonadi::CollectionCopyJob - Akonadi::CollectionModifyJob - Akonadi::CollectionDeleteJob There is also Akonadi::CollectionModel, which is a self-updating model class which can be used in combination with Akonadi::CollectionView. Akonadi::CollectionFilterProxyModel can be used to limit a displayed collection tree to collections supporting a certain type of PIM items. Akonadi::CollectionPropertiesDialog provides an extensible properties dialog for collections. Often needed KAction for collection operations are provided by Akonadi::StandardActionManager. \section libakonadi_pimitems PIM item retrieval and manipulation PIM items are represented by classes derived from Akonadi::Item. Items can be retrieved using Akonadi::ItemFetchJob. The following classes are provided to manipulate PIM items: - Akonadi::ItemCreateJob - Akonadi::ItemCopyJob - Akonadi::ItemModifyJob - Akonadi::ItemDeleteJob -- Akonadi::ExpungeJob Akonadi::ItemModel provides a self-updating model class which can be used to display the content of a collection. Akonadi::ItemView is the base-class for a corresponding view. Often needed KAction for item operations are provided by Akonadi::StandardActionManager. \section libakonadi_jobs Low-level access to the Akonadi server Accessing the Akonadi server is done using job-classes derived from Akonadi::Job. The communication channel with the server is provided by Akonadi::Session. To use server-side transactions, the following jobs are provided: - Akonadi::TransactionBeginJob - Akonadi::TransactionCommitJob - Akonadi::TransactionRollbackJob There also is Akonadi::TransactionSequence which can be used to automatically group a set of jobs to a single transaction. \section libakonadi_monitor Change notifications The Akonadi::Monitor class allows you to monitor specific resources, collections and PIM items for changes. Akonadi::ChangeRecorder augments this by providing a way to record and replay change notifications. \section libakonadi_serializer PIM item serializer The class Akonadi::ItemSerializer is responsible for converting between the stored (binary) representation of a PIM item and the objects used to handle these items provided by the corresponding libraries (kabc, kcal, etc.). Serializer plugins allow you to add support for new kinds of PIM items to Akonadi. Akonadi::ItemSerializerPlugin can be used as a base class for such a plugin. \section libakonadi_resource Agents and Resources The class Akonadi::AgentBase is the common base class for all agents. It provides commonly needed functionality such as change monitoring and recording. Resources are a special kind of agents. Akonadi::ResourceBase is the base class for them. It provides the necessary interfaces to the server as well as many convenience functions to make implementing a new resource as easy as possible. \section libakonadi_integration Integration in your application Akonadi::Control provides ways to ensure that the Akonadi server is running, to monitor its availability and provide help on server-side errors. A more low-level interface to the Akonadi server is provided by Akonadi::ServerManager. A set of standard actions is provided by Akonadi::StandardActionManager. These provided consistent look and feel across applications. */ /** \defgroup AkonadiMacros Akonadi Macros */ // DOXYGEN_REFERENCES = kdecore kdeui diff --git a/akonadi/expungejob.cpp b/akonadi/expungejob.cpp deleted file mode 100644 index b5a642ff5..000000000 --- a/akonadi/expungejob.cpp +++ /dev/null @@ -1,49 +0,0 @@ -/* - Copyright (c) 2006 Volker Krause - - This library 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 library 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 Library General Public - License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to the - Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA - 02110-1301, USA. -*/ - -#include "expungejob_p.h" - -#include "job_p.h" - -using namespace Akonadi; - -class Akonadi::ExpungeJobPrivate : public JobPrivate -{ - public: - ExpungeJobPrivate( ExpungeJob * parent ) - : JobPrivate( parent ) - { - } -}; - -ExpungeJob::ExpungeJob(QObject * parent) - : Job( new ExpungeJobPrivate( this ), parent ) -{ -} - -ExpungeJob::~ExpungeJob() -{ -} - -void ExpungeJob::doStart() -{ - d_ptr->writeData( d_ptr->newTag() + " EXPUNGE\n" ); -} - -#include "expungejob_p.moc" diff --git a/akonadi/expungejob_p.h b/akonadi/expungejob_p.h deleted file mode 100644 index 309b5e119..000000000 --- a/akonadi/expungejob_p.h +++ /dev/null @@ -1,59 +0,0 @@ -/* - Copyright (c) 2006 Volker Krause - - This library 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 library 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 Library General Public - License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to the - Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA - 02110-1301, USA. -*/ - -#ifndef AKONADI_EXPUNGEJOB_P_H -#define AKONADI_EXPUNGEJOB_P_H - -#include "job.h" - -namespace Akonadi { - -class ExpungeJobPrivate; - -/** - * @internal - * - * Permanently removes all items marked for deletion. - */ -class ExpungeJob : public Job -{ - Q_OBJECT - - public: - /** - Creates a new ExpungeJob. - @param parent The parent object. - */ - explicit ExpungeJob( QObject *parent = 0 ); - - /** - Destroys this job. - */ - virtual ~ExpungeJob(); - - protected: - virtual void doStart(); - - private: - Q_DECLARE_PRIVATE( ExpungeJob ) -}; - -} - -#endif