00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #include "agentsearchinterface.h"
00021 #include "agentsearchinterface_p.h"
00022 #include "collection.h"
00023 #include "searchadaptor.h"
00024
00025 using namespace Akonadi;
00026
00027 AgentSearchInterfacePrivate::AgentSearchInterfacePrivate( AgentSearchInterface* qq ) :
00028 q( qq )
00029 {
00030 new Akonadi__SearchAdaptor( this );
00031 QDBusConnection::sessionBus().registerObject( QLatin1String( "/Search" ),
00032 this, QDBusConnection::ExportAdaptors );
00033 }
00034
00035 void AgentSearchInterfacePrivate::addSearch( const QString &query, const QString &queryLanguage, quint64 resultCollectionId )
00036 {
00037 q->addSearch( query, queryLanguage, Collection( resultCollectionId ) );
00038 }
00039
00040 void AgentSearchInterfacePrivate::removeSearch( quint64 resultCollectionId )
00041 {
00042 q->removeSearch( Collection( resultCollectionId ) );
00043 }
00044
00045 AgentSearchInterface::AgentSearchInterface() :
00046 d( new AgentSearchInterfacePrivate( this ) )
00047 {
00048 }
00049
00050 AgentSearchInterface::~AgentSearchInterface()
00051 {
00052 delete d;
00053 }
00054
00055 #include "agentsearchinterface_p.moc"