diff -Nru kdepim-runtime-4.12.3/accountwizard/accountwizard.desktop kdepim-runtime-4.12.90/accountwizard/accountwizard.desktop --- kdepim-runtime-4.12.3/accountwizard/accountwizard.desktop 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/accountwizard/accountwizard.desktop 2014-03-13 08:12:29.000000000 +0000 @@ -52,7 +52,7 @@ NoDisplay=true Comment=Launch the account wizard to configure PIM accounts. Comment[bs]=Pokreni čarobnjaka za naloge za konfigurisanje PIM naloga. -Comment[ca]=Llança l'assistent de comptes per configurar comptes de PIM. +Comment[ca]=Llança l'assistent de comptes per a configurar comptes de PIM. Comment[ca@valencia]=Llança l'assistent de comptes per configurar comptes de PIM. Comment[cs]=Spustit průvodce nastavením PIM účtů. Comment[da]=Start kontoguiden for at konfigurere PIM-konti. diff -Nru kdepim-runtime-4.12.3/accountwizard/CMakeLists.txt kdepim-runtime-4.12.90/accountwizard/CMakeLists.txt --- kdepim-runtime-4.12.3/accountwizard/CMakeLists.txt 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/accountwizard/CMakeLists.txt 2014-03-13 08:12:29.000000000 +0000 @@ -56,22 +56,14 @@ kde4_add_executable(accountwizard ${accountwizard_srcs} main.cpp) target_link_libraries(accountwizard ${accountwizard_libs}) -if(NOT WINCE) kde4_add_plugin(accountwizard_plugin ${accountwizard_srcs} inprocess-main.cpp) target_link_libraries(accountwizard_plugin ${accountwizard_libs}) -endif() - -if (WINCE) - target_link_libraries(accountwizard ${KDE4_KROSSQTSPLUGIN_LIBS} ${KDE4_KROSSQTS_LIBS}) -endif() if ( NOT ACCOUNTWIZARD_NO_GHNS ) install(FILES accountwizard.knsrc DESTINATION ${CONFIG_INSTALL_DIR}) endif () install(TARGETS accountwizard ${INSTALL_TARGETS_DEFAULT_ARGS}) -if(NOT WINCE) install(TARGETS accountwizard_plugin DESTINATION ${PLUGIN_INSTALL_DIR}) -endif() install(PROGRAMS accountwizard.desktop DESTINATION ${XDG_APPS_INSTALL_DIR}) install(FILES accountwizard-mime.xml DESTINATION ${XDG_MIME_INSTALL_DIR}) update_xdg_mimetypes(${XDG_MIME_INSTALL_DIR}) diff -Nru kdepim-runtime-4.12.3/accountwizard/configfile.cpp kdepim-runtime-4.12.90/accountwizard/configfile.cpp --- kdepim-runtime-4.12.3/accountwizard/configfile.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/accountwizard/configfile.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -21,7 +21,7 @@ #include #include -#include +#include #include ConfigFile::ConfigFile( const QString & configName, QObject *parent ) @@ -89,4 +89,3 @@ } -#include "configfile.moc" diff -Nru kdepim-runtime-4.12.3/accountwizard/configfile.h kdepim-runtime-4.12.90/accountwizard/configfile.h --- kdepim-runtime-4.12.3/accountwizard/configfile.h 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/accountwizard/configfile.h 2014-03-13 08:12:29.000000000 +0000 @@ -21,8 +21,6 @@ #define CONFIGFILE_H #include "setupobject.h" -#include -#include class KConfig; diff -Nru kdepim-runtime-4.12.3/accountwizard/dialog.cpp kdepim-runtime-4.12.90/accountwizard/dialog.cpp --- kdepim-runtime-4.12.3/accountwizard/dialog.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/accountwizard/dialog.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -40,12 +40,10 @@ #include -#include - Dialog::Dialog(QWidget* parent, Qt::WindowFlags flags ) : KAssistantDialog( parent, flags ) { -#if defined (Q_WS_MAEMO_5) || defined (Q_OS_WINCE) || defined (MEEGO_EDITION_HARMATTAN) +#if defined (Q_WS_MAEMO_5) || defined (MEEGO_EDITION_HARMATTAN) setWindowState( Qt::WindowFullScreen ); #endif @@ -101,11 +99,6 @@ page->enterPageNext(); emit page->pageEnteredNext(); enableButton( KDialog::Help, false ); - - // attach network access helper to this instance, - // establish connection for the lifetime of this dialog - KPIMUtils::NetworkAccessHelper* networkHelper = new KPIMUtils::NetworkAccessHelper( this ); - networkHelper->establishConnection(); } KPageWidgetItem* Dialog::addPage(Page* page, const QString &title) @@ -211,4 +204,3 @@ } -#include "dialog.moc" diff -Nru kdepim-runtime-4.12.3/accountwizard/identity.cpp kdepim-runtime-4.12.90/accountwizard/identity.cpp --- kdepim-runtime-4.12.3/accountwizard/identity.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/accountwizard/identity.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -23,7 +23,7 @@ #include #include -#include +#include Identity::Identity( QObject *parent ) : SetupObject( parent ), @@ -150,4 +150,3 @@ m_xface = xface; } -#include "identity.moc" diff -Nru kdepim-runtime-4.12.3/accountwizard/ispdb/ispdb.cpp kdepim-runtime-4.12.90/accountwizard/ispdb/ispdb.cpp --- kdepim-runtime-4.12.3/accountwizard/ispdb/ispdb.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/accountwizard/ispdb/ispdb.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -21,7 +21,7 @@ #include #include #include -#include +#include #include #include @@ -275,4 +275,3 @@ return mSmtpServers; } -#include "ispdb.moc" diff -Nru kdepim-runtime-4.12.3/accountwizard/ispdb/main.cpp kdepim-runtime-4.12.90/accountwizard/ispdb/main.cpp --- kdepim-runtime-4.12.3/accountwizard/ispdb/main.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/accountwizard/ispdb/main.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -27,7 +27,7 @@ int main( int argc, char **argv ) { KAboutData aboutData( "ispdb", 0, - ki18n( "Ispdb Assistant" ), + ki18n( "ISPDB Assistant" ), "0.1", ki18n( "Helps setting up PIM accounts" ), KAboutData::License_LGPL, diff -Nru kdepim-runtime-4.12.3/accountwizard/ldap.cpp kdepim-runtime-4.12.90/accountwizard/ldap.cpp --- kdepim-runtime-4.12.3/accountwizard/ldap.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/accountwizard/ldap.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -21,7 +21,7 @@ #include #include -#include +#include Ldap::Ldap( QObject *parent ) @@ -115,4 +115,3 @@ m_password = password; } -#include "ldap.moc" diff -Nru kdepim-runtime-4.12.3/accountwizard/loadpage.cpp kdepim-runtime-4.12.90/accountwizard/loadpage.cpp --- kdepim-runtime-4.12.3/accountwizard/loadpage.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/accountwizard/loadpage.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -86,4 +86,3 @@ } -#include "loadpage.moc" diff -Nru kdepim-runtime-4.12.3/accountwizard/main.cpp kdepim-runtime-4.12.90/accountwizard/main.cpp --- kdepim-runtime-4.12.3/accountwizard/main.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/accountwizard/main.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -31,14 +31,6 @@ #include -#ifdef Q_OS_WINCE -#include - -#include - -Q_IMPORT_PLUGIN(krossqtsplugin) -#endif - int main( int argc, char **argv ) { KAboutData aboutData( "accountwizard", 0, diff -Nru kdepim-runtime-4.12.3/accountwizard/page.cpp kdepim-runtime-4.12.90/accountwizard/page.cpp --- kdepim-runtime-4.12.3/accountwizard/page.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/accountwizard/page.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -58,4 +58,3 @@ void Page::leavePageBackRequested() { emit leavePageBackOk(); } void Page::leavePageNextRequested() { emit leavePageNextOk(); } -#include "page.moc" diff -Nru kdepim-runtime-4.12.3/accountwizard/personaldatapage.cpp kdepim-runtime-4.12.90/accountwizard/personaldatapage.cpp --- kdepim-runtime-4.12.3/accountwizard/personaldatapage.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/accountwizard/personaldatapage.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -35,7 +35,6 @@ #include -#include QString accountName(Ispdb *ispdb, QString username) { @@ -47,22 +46,7 @@ PersonalDataPage::PersonalDataPage(Dialog* parent) : Page( parent ), mIspdb( 0 ), mSetupManager( parent->setupManager() ) { -#ifdef _WIN32_WCE - // for mobile ui we put the page into a scroll area in case it's too big - QVBoxLayout *layout = new QVBoxLayout; - layout->setMargin( 0 ); - setLayout( layout ); - - QScrollArea *scrollArea = new QScrollArea( this ); - scrollArea->setFrameShape( QFrame::NoFrame ); - scrollArea->setWidgetResizable( true ); - layout->addWidget( scrollArea ); - - QWidget *pageParent = new QWidget; - scrollArea->setWidget( pageParent ); -#else QWidget *pageParent = this; -#endif ui.setupUi( pageParent ); @@ -291,5 +275,4 @@ } -#include "personaldatapage.moc" diff -Nru kdepim-runtime-4.12.3/accountwizard/providerpage.cpp kdepim-runtime-4.12.90/accountwizard/providerpage.cpp --- kdepim-runtime-4.12.3/accountwizard/providerpage.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/accountwizard/providerpage.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -173,4 +173,3 @@ } } -#include "providerpage.moc" diff -Nru kdepim-runtime-4.12.3/accountwizard/resource.cpp kdepim-runtime-4.12.90/accountwizard/resource.cpp --- kdepim-runtime-4.12.3/accountwizard/resource.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/accountwizard/resource.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -24,7 +24,7 @@ #include #include -#include +#include #include #include @@ -163,4 +163,3 @@ } -#include "resource.moc" diff -Nru kdepim-runtime-4.12.3/accountwizard/servertest.cpp kdepim-runtime-4.12.90/accountwizard/servertest.cpp --- kdepim-runtime-4.12.3/accountwizard/servertest.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/accountwizard/servertest.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -62,4 +62,3 @@ } } -#include "servertest.moc" diff -Nru kdepim-runtime-4.12.3/accountwizard/setupmanager.cpp kdepim-runtime-4.12.90/accountwizard/setupmanager.cpp --- kdepim-runtime-4.12.3/accountwizard/setupmanager.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/accountwizard/setupmanager.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -243,4 +243,3 @@ } -#include "setupmanager.moc" diff -Nru kdepim-runtime-4.12.3/accountwizard/setupobject.cpp kdepim-runtime-4.12.90/accountwizard/setupobject.cpp --- kdepim-runtime-4.12.3/accountwizard/setupobject.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/accountwizard/setupobject.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -33,4 +33,3 @@ m_dependsOn = obj; } -#include "setupobject.moc" diff -Nru kdepim-runtime-4.12.3/accountwizard/setuppage.cpp kdepim-runtime-4.12.90/accountwizard/setuppage.cpp --- kdepim-runtime-4.12.3/accountwizard/setuppage.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/accountwizard/setuppage.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -69,4 +69,3 @@ ui.progressBar->setValue( percent ); } -#include "setuppage.moc" diff -Nru kdepim-runtime-4.12.3/accountwizard/TODO kdepim-runtime-4.12.90/accountwizard/TODO --- kdepim-runtime-4.12.3/accountwizard/TODO 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/accountwizard/TODO 2014-03-13 08:12:29.000000000 +0000 @@ -1,4 +1,4 @@ -- figure out i18n for the actual wizards (DONE) - still marked as todo mentioned in the imapwizard +- figure out i18n for the actual wizards (DONE) - imap+pop3wizard has no encryption as default i.c.w. plain auth method. Not a good default! - remember which set up resources/transports/ldap accounts/identities belong together so we can offer to remove them in one go again - add more wizards (In progress) diff -Nru kdepim-runtime-4.12.3/accountwizard/transport.cpp kdepim-runtime-4.12.90/accountwizard/transport.cpp --- kdepim-runtime-4.12.3/accountwizard/transport.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/accountwizard/transport.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -22,7 +22,7 @@ #include #include -#include +#include #define TABLE_SIZE x @@ -154,4 +154,3 @@ return m_transportId; } -#include "transport.moc" diff -Nru kdepim-runtime-4.12.3/accountwizard/typepage.cpp kdepim-runtime-4.12.90/accountwizard/typepage.cpp --- kdepim-runtime-4.12.3/accountwizard/typepage.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/accountwizard/typepage.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -115,4 +115,3 @@ return ui.listView; } -#include "typepage.moc" diff -Nru kdepim-runtime-4.12.3/accountwizard/wizards/tine20/tine20wizard.desktop kdepim-runtime-4.12.90/accountwizard/wizards/tine20/tine20wizard.desktop --- kdepim-runtime-4.12.3/accountwizard/wizards/tine20/tine20wizard.desktop 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/accountwizard/wizards/tine20/tine20wizard.desktop 2014-03-13 08:12:29.000000000 +0000 @@ -21,6 +21,7 @@ Name[ko]=Tine 2.0 그룹웨어 서버 Name[lv]=Tine 2.0 grupprogrammatūras serveris Name[nb]=Tine 2.0 gruppevare-tjener +Name[nds]=Tine 2.0-Arbeitkoppel-Server Name[nl]=Tine 2.0 groupwareserver Name[pl]=Serwer Groupware Tine 2.0 Name[pt]=Servidor de Groupware Tine 2.0 @@ -61,6 +62,7 @@ Comment[ko]=Tine 2.0 그룹웨어 서버 Comment[lv]=Tine 2.0 grupprogrammatūras serveris Comment[nb]=Tine 2.0 gruppevare-tjener +Comment[nds]=Tine 2.0-Arbeitkoppel-Server Comment[nl]=Tine 2.0 groupwareserver Comment[pl]=Serwer Groupware Tine 2.0 Comment[pt]=Servidor de 'Groupware' Tine 2.0 diff -Nru kdepim-runtime-4.12.3/agents/calendarsearch/calendarsearchagent.cpp kdepim-runtime-4.12.90/agents/calendarsearch/calendarsearchagent.cpp --- kdepim-runtime-4.12.3/agents/calendarsearch/calendarsearchagent.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/agents/calendarsearch/calendarsearchagent.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,82 +0,0 @@ -/* - Copyright 2009 KDAB; Author: Frank Osterfeld - - 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 "calendarsearchagent.h" -#include "calendarsearchagentadaptor.h" - -#include -#include - -using namespace Akonadi; - -class CalendarSearchAgent::Private -{ - public: - explicit Private( CalendarSearchAgent* qq ) - : q( qq ) - { - } - - ~Private() - { - } - - private: - CalendarSearchAgent* const q; -}; - - -CalendarSearchAgent::CalendarSearchAgent( const QString &id ) - : AgentBase( id ), - d( new Private( this ) ) -{ - new CalendarSearchAgentAdaptor( this ); - if ( !QDBusConnection::sessionBus().registerObject( QLatin1String( "/CalendarSearchAgent" ), - this, QDBusConnection::ExportAdaptors ) ) { - kWarning() << "Couldn't register a D-Bus service"; - kWarning() << QDBusConnection::sessionBus().lastError().message(); - } -} - -CalendarSearchAgent::~CalendarSearchAgent() -{ - delete d; -} - -QVariantMap CalendarSearchAgent::createSearch( const QString& startDateStr, const QString& endDateStr ) -{ - const KDateTime startDate = KDateTime::fromString( startDateStr ); - const KDateTime endDate = KDateTime::fromString( endDateStr ); - //setDelayedReply( true ); - //TODO start job - return QVariantMap(); -} - -void CalendarSearchAgent::doSetOnline( bool ) -{ -} - -void CalendarSearchAgent::configure( WId ) -{ -} - -AKONADI_AGENT_MAIN( CalendarSearchAgent ) - - -#include "calendarsearchagent.moc" diff -Nru kdepim-runtime-4.12.3/agents/calendarsearch/calendarsearchagent.desktop kdepim-runtime-4.12.90/agents/calendarsearch/calendarsearchagent.desktop --- kdepim-runtime-4.12.3/agents/calendarsearch/calendarsearchagent.desktop 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/agents/calendarsearch/calendarsearchagent.desktop 1970-01-01 00:00:00.000000000 +0000 @@ -1,90 +0,0 @@ -[Desktop Entry] -Name=Calendar Search Agent -Name[bs]=Agent za pretragu kalendara. -Name[ca]=Agent de cerca del calendari -Name[ca@valencia]=Agent de cerca del calendari -Name[cs]=Agent vyhledávání v kalendáři -Name[da]=Agent til kalendersøgning -Name[de]=Agent zur Kalender-Suche -Name[el]=Πράκτορας αναζήτησης ημερολογίου -Name[en_GB]=Calendar Search Agent -Name[es]=Agente de búsqueda de calendario -Name[et]=Kalendriotsingu agent -Name[fi]=Kalenterihakuagentti -Name[fr]=Agent de recherche d'agenda -Name[gl]=Axente de Procura do Calendario -Name[hu]=Naptárkereső ügynök -Name[ia]=Agente de cercar in calendario -Name[it]=Agente per la ricerca nel calendario -Name[ja]=カレンダー検索コンポーネント -Name[kk]=Күнтізбеде іздеу агенті -Name[km]=ភ្នាក់ងារ​ស្វែងរក​ប្រតិទិន -Name[ko]=달력 검색 에이전트 -Name[lt]=Kalendoriaus paieškos agentas -Name[lv]=Kalendāra meklēšanas aģents -Name[nb]=Kalendersøk-agent -Name[nds]=Kalenner-Söökhülp -Name[nl]=Agendazoekagent -Name[nn]=Agent for kalendersøk -Name[pa]=ਕੈਲੰਡਰ ਖੋਜ ਏਜੰਟ -Name[pl]=Agent wyszukiwania kalendarza -Name[pt]=Agente de Pesquisa do Calendário -Name[pt_BR]=Agente de pesquisa de calendário -Name[ro]=Agent de căutare a calendarelor -Name[ru]=Календарный поисковый агент -Name[sk]=Agent hľadania v kalendári -Name[sl]=Posrednik za koledarsko iskanje -Name[sr]=Агент претраге календара -Name[sr@ijekavian]=Агент претраге календара -Name[sr@ijekavianlatin]=Agent pretrage kalendara -Name[sr@latin]=Agent pretrage kalendara -Name[sv]=Modul för kalendersökning -Name[tr]=Takvim Arama Programı -Name[uk]=Агент пошуку у календарі -Name[x-test]=xxCalendar Search Agentxx -Name[zh_CN]=日历搜索代理 -Name[zh_TW]=行事曆搜尋代理程式 -Comment=Agent for calendar searching -Comment[bs]=Agent za traženje kalendara -Comment[ca]=Agent per cerques al calendari -Comment[ca@valencia]=Agent per cerques al calendari -Comment[cs]=Agent vyhledávání v kalendáři -Comment[da]=Agent til kalendersøgning -Comment[de]=Agent zur Suche in Kalendern -Comment[el]=Πράκτορας για αναζήτηση ημερολογίου -Comment[es]=Agente para búsqueda de calendario -Comment[et]=Kalendriotsingu agent -Comment[fi]=Kalenterihakuagentti -Comment[fr]=Agent de recherche dans les agendas -Comment[gl]=Axente para a busca en calendarios -Comment[hu]=Ügynök a naptárkereséshez -Comment[ia]=Agente per cerca de calendario -Comment[it]=Agente per la ricerca nel calendario -Comment[kk]=Күнтізбеде іздеу агенті -Comment[ko]=달력 검색을 위한 에이전트 -Comment[nb]=Agent for kalendersøking -Comment[nl]=Agent voor zoeken in agenda -Comment[pl]=Agent do znajdywania w kalendarzu -Comment[pt]=Agente de pesquisa no calendário -Comment[pt_BR]=Agente para pesquisa no calendário -Comment[ro]=Agent pentru căutarea calendarelor -Comment[ru]=Поисковый календарный агент -Comment[sk]=Agent pre hľadanie v kalendári -Comment[sl]=Agent za iskanje v koledarjih -Comment[sr]=Агент за претрагу календара -Comment[sr@ijekavian]=Агент за претрагу календара -Comment[sr@ijekavianlatin]=Agent za pretragu kalendara -Comment[sr@latin]=Agent za pretragu kalendara -Comment[sv]=Modul för kalendersökning -Comment[tr]=Takvim araması için yardımcı -Comment[uk]=Агент для пошуку у календарях -Comment[x-test]=xxAgent for calendar searchingxx -Comment[zh_CN]=日历搜索代理 -Comment[zh_TW]=行事曆搜尋代理程式 -Type=AkonadiAgent -Exec=akonadi_calendarsearch_agent -Icon=text-calendar - -X-Akonadi-MimeTypes=text/calendar -X-Akonadi-Capabilities=Unique,NoConfig -X-Akonadi-Identifier=akonadi_calendarsearch_agent diff -Nru kdepim-runtime-4.12.3/agents/calendarsearch/calendarsearchagent.h kdepim-runtime-4.12.90/agents/calendarsearch/calendarsearchagent.h --- kdepim-runtime-4.12.3/agents/calendarsearch/calendarsearchagent.h 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/agents/calendarsearch/calendarsearchagent.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,50 +0,0 @@ -/* - Copyright 2009 KDAB; Author: Frank Osterfeld - - 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 CALENDARSEARCHAGENT_H -#define CALENDARSEARCHAGENT_H - -#include - -#include - -class CalendarSearchAgent : public Akonadi::AgentBase -{ - Q_OBJECT - - public: - explicit CalendarSearchAgent( const QString &id ); - ~CalendarSearchAgent(); - - QVariantMap createSearch( const QString& startDate, const QString& endDate ); - - public Q_SLOTS: - /* reimp */ - void configure( WId windowId ); - - protected: - /* reimp */ - void doSetOnline( bool online ); - - private: - class Private; - Private* const d; -}; - -#endif // CALENDARSEARCHAGENT_H diff -Nru kdepim-runtime-4.12.3/agents/calendarsearch/CMakeLists.txt kdepim-runtime-4.12.90/agents/calendarsearch/CMakeLists.txt --- kdepim-runtime-4.12.3/agents/calendarsearch/CMakeLists.txt 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/agents/calendarsearch/CMakeLists.txt 1970-01-01 00:00:00.000000000 +0000 @@ -1,18 +0,0 @@ -include_directories( - ${kdepim-runtime_SOURCE_DIR} - ${Boost_INCLUDE_DIR} -) - -set( CALENDARSEARCHAGENT_SRCS calendarsearchagent.cpp ) -qt4_add_dbus_adaptor(CALENDARSEARCHAGENT_SRCS org.freedesktop.Akonadi.CalendarSearchAgent.xml calendarsearchagent.h CalendarSearchAgent ) - -set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${KDE4_ENABLE_EXCEPTIONS}" ) - -kde4_add_executable(akonadi_calendarsearch_agent ${CALENDARSEARCHAGENT_SRCS}) - -target_link_libraries(akonadi_calendarsearch_agent - ${KDEPIMLIBS_AKONADI_LIBS} -) - -install(TARGETS akonadi_calendarsearch_agent ${INSTALL_TARGETS_DEFAULT_ARGS}) -install(FILES calendarsearchagent.desktop DESTINATION "${CMAKE_INSTALL_PREFIX}/share/akonadi/agents") diff -Nru kdepim-runtime-4.12.3/agents/calendarsearch/org.freedesktop.Akonadi.CalendarSearchAgent.xml kdepim-runtime-4.12.90/agents/calendarsearch/org.freedesktop.Akonadi.CalendarSearchAgent.xml --- kdepim-runtime-4.12.3/agents/calendarsearch/org.freedesktop.Akonadi.CalendarSearchAgent.xml 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/agents/calendarsearch/org.freedesktop.Akonadi.CalendarSearchAgent.xml 1970-01-01 00:00:00.000000000 +0000 @@ -1,12 +0,0 @@ - - - - - - - - - - - - diff -Nru kdepim-runtime-4.12.3/agents/CMakeLists.txt kdepim-runtime-4.12.90/agents/CMakeLists.txt --- kdepim-runtime-4.12.3/agents/CMakeLists.txt 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/agents/CMakeLists.txt 2014-03-13 08:12:29.000000000 +0000 @@ -15,20 +15,4 @@ add_subdirectory( maildispatcher ) add_subdirectory( newmailnotifier ) add_subdirectory( migration ) - -if( STRIGI_FOUND AND AKONADI_USE_STRIGI_SEARCH ) -add_subdirectory( strigifeeder ) -endif() - -if(NOT WINCE) add_subdirectory( invitations ) -#add_subdirectory( calendarsearch ) - -if( NOT KDEPIM_NO_NEPOMUK ) - include_directories( ${CMAKE_CURRENT_BINARY_DIR}/ontologies ontologies ${SOPRANO_INCLUDE_DIR} ) - - add_subdirectory( nepomukfeeder ) - add_subdirectory( ontologies ) - -endif() -endif() diff -Nru kdepim-runtime-4.12.3/agents/invitations/invitationsagent.cpp kdepim-runtime-4.12.90/agents/invitations/invitationsagent.cpp --- kdepim-runtime-4.12.3/agents/invitations/invitationsagent.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/agents/invitations/invitationsagent.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -46,7 +46,7 @@ #include #include #include -#include +#include #include #include #include @@ -558,4 +558,3 @@ AKONADI_AGENT_MAIN( InvitationsAgent ) -#include "invitationsagent.moc" diff -Nru kdepim-runtime-4.12.3/agents/invitations/invitationsagent.desktop kdepim-runtime-4.12.90/agents/invitations/invitationsagent.desktop --- kdepim-runtime-4.12.3/agents/invitations/invitationsagent.desktop 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/agents/invitations/invitationsagent.desktop 2014-03-13 08:12:29.000000000 +0000 @@ -60,6 +60,7 @@ Comment[kk]=Күнтізбеңіздегі шақыруларды үлестіру Comment[ko]=달력에서 초대장을 가져옴 Comment[nb]=Sender ut invitasjoner fra din kalender +Comment[nds]=Verdeelt Inladen ut Dien Kalenner Comment[nl]=Brengt uitnodigingen uit uw agenda naar elders Comment[pl]=Rozsyła zaproszenia z twojego kalendarza Comment[pt]=Trata dos convites do seu calendário diff -Nru kdepim-runtime-4.12.3/agents/invitations/invitationsagent.h kdepim-runtime-4.12.90/agents/invitations/invitationsagent.h --- kdepim-runtime-4.12.3/agents/invitations/invitationsagent.h 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/agents/invitations/invitationsagent.h 2014-03-13 08:12:29.000000000 +0000 @@ -31,10 +31,6 @@ class KJob; -namespace KCalCore { - class ScheduleMessage; -} - class InvitationsAgent; class InvitationsCollection; diff -Nru kdepim-runtime-4.12.3/agents/maildispatcher/akonadi_maildispatcher_agent.notifyrc kdepim-runtime-4.12.90/agents/maildispatcher/akonadi_maildispatcher_agent.notifyrc --- kdepim-runtime-4.12.3/agents/maildispatcher/akonadi_maildispatcher_agent.notifyrc 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/agents/maildispatcher/akonadi_maildispatcher_agent.notifyrc 2014-03-13 08:12:29.000000000 +0000 @@ -3,7 +3,7 @@ Comment=KDE e-mail client Comment[bg]=Пощенски клиент за KDE Comment[bs]=KDE klijent elektronske pošte -Comment[ca]=Client de correu electrònic del KDE +Comment[ca]=Client de correu electrònic pel KDE Comment[ca@valencia]=Client de correu electrònic del KDE Comment[cs]=Klient KDE pro čtení elektronické pošty Comment[da]=KDE e-mail-klient diff -Nru kdepim-runtime-4.12.3/agents/maildispatcher/CMakeLists.txt kdepim-runtime-4.12.90/agents/maildispatcher/CMakeLists.txt --- kdepim-runtime-4.12.3/agents/maildispatcher/CMakeLists.txt 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/agents/maildispatcher/CMakeLists.txt 2014-03-13 08:12:29.000000000 +0000 @@ -35,7 +35,7 @@ set_target_properties(akonadi_maildispatcher_agent PROPERTIES MACOSX_BUNDLE_BUNDLE_NAME "KDE Akonadi Maildispatcher") endif () -target_link_libraries(akonadi_maildispatcher_agent ${KDEPIMLIBS_AKONADI_LIBS} ${KDEPIMLIBS_AKONADI_KMIME_LIBS} ${QT_QTCORE_LIBRARY} ${QT_QTDBUS_LIBRARY} ${KDE4_KDECORE_LIBS} ${KDE4_KIO_LIBS} ${KDEPIMLIBS_KMIME_LIBS} ${KDEPIMLIBS_MAILTRANSPORT_LIBS} ${KDEPIMLIBS_KPIMUTILS_LIBS} ${KDE4_KNOTIFYCONFIG_LIBS}) +target_link_libraries(akonadi_maildispatcher_agent ${KDEPIMLIBS_AKONADI_LIBS} ${KDEPIMLIBS_AKONADI_KMIME_LIBS} ${QT_QTCORE_LIBRARY} ${QT_QTDBUS_LIBRARY} ${KDE4_KDECORE_LIBS} ${KDE4_KIO_LIBS} ${KDEPIMLIBS_KMIME_LIBS} ${KDEPIMLIBS_MAILTRANSPORT_LIBS} ${KDE4_KNOTIFYCONFIG_LIBS}) install( FILES maildispatcheragent.desktop DESTINATION "${CMAKE_INSTALL_PREFIX}/share/akonadi/agents" ) install( FILES akonadi_maildispatcher_agent.notifyrc DESTINATION "${DATA_INSTALL_DIR}/akonadi_maildispatcher_agent" ) diff -Nru kdepim-runtime-4.12.3/agents/maildispatcher/configdialog.cpp kdepim-runtime-4.12.90/agents/maildispatcher/configdialog.cpp --- kdepim-runtime-4.12.3/agents/maildispatcher/configdialog.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/agents/maildispatcher/configdialog.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -78,4 +78,3 @@ Settings::self()->writeConfig(); } -#include "configdialog.moc" diff -Nru kdepim-runtime-4.12.3/agents/maildispatcher/maildispatcheragent.cpp kdepim-runtime-4.12.90/agents/maildispatcher/maildispatcheragent.cpp --- kdepim-runtime-4.12.3/agents/maildispatcher/maildispatcheragent.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/agents/maildispatcher/maildispatcheragent.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -28,7 +28,6 @@ #include "settings.h" #include "settingsadaptor.h" -#include #include #include #include @@ -38,11 +37,12 @@ #include #include #include -#include +#include #include #include #include #include +#include #include #include @@ -71,8 +71,7 @@ sentAnything( false ), errorOccurred( false ), sentItemsSize( 0 ), - sentActionHandler( 0 ), - networkAccessHelper( new KPIMUtils::NetworkAccessHelper( parent ) ) + sentActionHandler( 0 ) { } @@ -91,7 +90,6 @@ bool errorOccurred; qulonglong sentItemsSize; SentActionHandler *sentActionHandler; - KPIMUtils::NetworkAccessHelper *networkAccessHelper; // slots: void abort(); @@ -132,7 +130,6 @@ void MailDispatcherAgent::Private::dispatch() { Q_ASSERT( queue ); - networkAccessHelper->establishConnection(); if ( !q->isOnline() || sendingInProgress ) { kDebug() << "Offline or busy. See you later."; @@ -191,10 +188,6 @@ { kDebug() << "maildispatcheragent: At your service, sir!"; -#ifdef _WIN32_WCE - QThread::currentThread()->setPriority( QThread::NormalPriority ); -#endif - #ifdef KDEPIM_STATIC_LIBS ___MailTransport____INIT(); #endif @@ -377,4 +370,4 @@ AKONADI_AGENT_MAIN( MailDispatcherAgent ) #endif -#include "maildispatcheragent.moc" +#include "moc_maildispatcheragent.cpp" diff -Nru kdepim-runtime-4.12.3/agents/maildispatcher/maildispatcheragent.desktop kdepim-runtime-4.12.90/agents/maildispatcher/maildispatcheragent.desktop --- kdepim-runtime-4.12.3/agents/maildispatcher/maildispatcheragent.desktop 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/agents/maildispatcher/maildispatcheragent.desktop 2014-03-13 08:12:29.000000000 +0000 @@ -63,6 +63,7 @@ Comment[kk]=Пошта хаттарын үлестіру Comment[ko]=이메일 메시지를 가져옴 Comment[nb]=Sender ut e-postmeldinger +Comment[nds]=Verdeelt Nettpost Comment[nl]=Verstuurt e-mailberichten Comment[pl]=Rozsyła wiadomości e-mail Comment[pt]=Trata das mensagens de e-mail diff -Nru kdepim-runtime-4.12.3/agents/maildispatcher/outboxqueue.cpp kdepim-runtime-4.12.90/agents/maildispatcher/outboxqueue.cpp --- kdepim-runtime-4.12.3/agents/maildispatcher/outboxqueue.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/agents/maildispatcher/outboxqueue.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -456,4 +456,4 @@ connect( job, SIGNAL(result(KJob*)), this, SLOT(itemFetched(KJob*)) ); } -#include "outboxqueue.moc" +#include "moc_outboxqueue.cpp" diff -Nru kdepim-runtime-4.12.3/agents/maildispatcher/sendjob.cpp kdepim-runtime-4.12.90/agents/maildispatcher/sendjob.cpp --- kdepim-runtime-4.12.3/agents/maildispatcher/sendjob.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/agents/maildispatcher/sendjob.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -374,13 +374,13 @@ { Q_ASSERT( currentJob == job ); currentJob = 0; + const SentBehaviourAttribute *attribute = item.attribute(); + Q_ASSERT( attribute ); + if ( job->error() ) { kDebug() << "Error deleting or moving to sent-mail."; - const SentBehaviourAttribute *attribute = item.attribute(); - Q_ASSERT( attribute ); - QString errorString; switch( attribute->sentBehaviour() ) { case SentBehaviourAttribute::Delete: @@ -399,7 +399,10 @@ kDebug() << "Success deleting or moving to sent-mail."; if ( !filterItem( 2 ) ) //Outbound return; - storeResult( true ); + if ( attribute->sentBehaviour() == SentBehaviourAttribute::Delete ) + q->emitResult(); + else + storeResult( true ); } } @@ -478,4 +481,4 @@ } } -#include "sendjob.moc" +#include "moc_sendjob.cpp" diff -Nru kdepim-runtime-4.12.3/agents/maildispatcher/sentactionhandler.cpp kdepim-runtime-4.12.90/agents/maildispatcher/sentactionhandler.cpp --- kdepim-runtime-4.12.3/agents/maildispatcher/sentactionhandler.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/agents/maildispatcher/sentactionhandler.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -68,4 +68,3 @@ modifyJob->setIgnorePayload( true ); } -#include "sentactionhandler.moc" diff -Nru kdepim-runtime-4.12.3/agents/maildispatcher/storeresultjob.cpp kdepim-runtime-4.12.90/agents/maildispatcher/storeresultjob.cpp --- kdepim-runtime-4.12.3/agents/maildispatcher/storeresultjob.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/agents/maildispatcher/storeresultjob.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -137,4 +137,4 @@ return d->message; } -#include "storeresultjob.moc" +#include "moc_storeresultjob.cpp" diff -Nru kdepim-runtime-4.12.3/agents/maildispatcher/tests/aborttest.cpp kdepim-runtime-4.12.90/agents/maildispatcher/tests/aborttest.cpp --- kdepim-runtime-4.12.3/agents/maildispatcher/tests/aborttest.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/agents/maildispatcher/tests/aborttest.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -235,4 +235,3 @@ QTEST_AKONADIMAIN( AbortTest, NoGUI ) -#include "aborttest.moc" diff -Nru kdepim-runtime-4.12.3/agents/maildispatcher/tests/dupetest.cpp kdepim-runtime-4.12.90/agents/maildispatcher/tests/dupetest.cpp --- kdepim-runtime-4.12.3/agents/maildispatcher/tests/dupetest.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/agents/maildispatcher/tests/dupetest.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -219,4 +219,3 @@ QTEST_AKONADIMAIN( DupeTest, NoGUI ) -#include "dupetest.moc" diff -Nru kdepim-runtime-4.12.3/agents/migration/migrationagent.cpp kdepim-runtime-4.12.90/agents/migration/migrationagent.cpp --- kdepim-runtime-4.12.3/agents/migration/migrationagent.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/agents/migration/migrationagent.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -61,4 +61,3 @@ AKONADI_AGENT_MAIN(Akonadi::MigrationAgent) -#include "migrationagent.moc" diff -Nru kdepim-runtime-4.12.3/agents/migration/migrationagent.desktop kdepim-runtime-4.12.90/agents/migration/migrationagent.desktop --- kdepim-runtime-4.12.3/agents/migration/migrationagent.desktop 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/agents/migration/migrationagent.desktop 2014-03-13 08:12:29.000000000 +0000 @@ -1,6 +1,6 @@ [Desktop Entry] Name=Migration Agent -Name[bs]=Agent za migraciju +Name[bs]=Migracijski agent Name[ca]=Agent de migració Name[ca@valencia]=Agent de migració Name[da]=Migreringsagent @@ -13,7 +13,9 @@ Name[ia]=Agente de migration Name[it]=Agente di migrazione Name[kk]=Көшіп ауысу агенті +Name[ko]=이전 마법사 Name[nb]=Migreringsagent +Name[nds]=Ümwannelhölper Name[nl]=Migratie-agent Name[pl]=Agent migracji Name[pt]=Agente de Migração diff -Nru kdepim-runtime-4.12.3/agents/migration/migrationexecutor.cpp kdepim-runtime-4.12.90/agents/migration/migrationexecutor.cpp --- kdepim-runtime-4.12.3/agents/migration/migrationexecutor.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/agents/migration/migrationexecutor.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -34,7 +34,7 @@ void MigrationExecutor::start() { setPercent(0); - emit description(this, i18nc("User visible name of ongoing akonadi migration jobs", "PIM-Maintenance")); + emit description(this, i18nc("User visible name of ongoing Akonadi migration jobs", "PIM Maintenance")); } void MigrationExecutor::add(const QSharedPointer &migrator) @@ -60,8 +60,8 @@ migrator->start(); } else { // Reset the notification status, otherwise we get notification "In progress...[finished]" - // without any description that it's related to PIM-Maintanence - emit infoMessage(this, i18n("PIM-Maintanence")); + // without any description that it's related to PIM-Maintenance + emit infoMessage(this, i18n("PIM Maintenance")); emitResult(); } } @@ -106,4 +106,3 @@ return true; } -#include "migrationexecutor.moc" diff -Nru kdepim-runtime-4.12.3/agents/migration/migrationscheduler.cpp kdepim-runtime-4.12.90/agents/migration/migrationscheduler.cpp --- kdepim-runtime-4.12.3/agents/migration/migrationscheduler.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/agents/migration/migrationscheduler.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -297,4 +297,3 @@ } } -#include "migrationscheduler.moc" diff -Nru kdepim-runtime-4.12.3/agents/migration/migrationstatuswidget.cpp kdepim-runtime-4.12.90/agents/migration/migrationstatuswidget.cpp --- kdepim-runtime-4.12.3/agents/migration/migrationstatuswidget.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/agents/migration/migrationstatuswidget.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -123,4 +123,3 @@ } -#include "migrationstatuswidget.moc" diff -Nru kdepim-runtime-4.12.3/agents/migration/tests/dummymigrator.cpp kdepim-runtime-4.12.90/agents/migration/tests/dummymigrator.cpp --- kdepim-runtime-4.12.3/agents/migration/tests/dummymigrator.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/agents/migration/tests/dummymigrator.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -66,4 +66,3 @@ MigratorBase::abort(); } -#include "dummymigrator.moc" diff -Nru kdepim-runtime-4.12.3/agents/nepomukfeeder/akonadinepomukfeederagent.desktop kdepim-runtime-4.12.90/agents/nepomukfeeder/akonadinepomukfeederagent.desktop --- kdepim-runtime-4.12.3/agents/nepomukfeeder/akonadinepomukfeederagent.desktop 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/agents/nepomukfeeder/akonadinepomukfeederagent.desktop 1970-01-01 00:00:00.000000000 +0000 @@ -1,50 +0,0 @@ -[Desktop Entry] -Name=Akonadi Nepomuk Feeder -Name[bs]=Akonadi Nepomuk napajač -Name[ca]=Alimentador Nepomuk per l'Akonadi -Name[ca@valencia]=Alimentador Nepomuk per l'Akonadi -Name[cs]=Akonadi podavač Nepomuku -Name[da]=Akonadi Nepomuk-feeder -Name[de]=Nepomuk-Modul für Akonadi -Name[el]=Τροφοδότης Nepomuk του Akonadi -Name[es]=Proveedor Akonadi de Nepomuk -Name[et]=Akonadi Nepomuki söötur -Name[fi]=Akonadi Nepomuk Feeder -Name[fr]=Connecteur Nepomuk pour Akonadi -Name[ga]=Fothaire Nepomuk Akonadi -Name[gl]=Alimentador de Nepomuk para Akonadi -Name[hu]=Akonadi Nepomuk feltöltő -Name[ia]=Syndication de Akonadi Nepomuk -Name[it]=Fornitore Akonadi per Nepomuk -Name[kk]=Nepomuk эл.пошта бергіші -Name[km]=កម្មវិធី​មតិ​ព័ត៌មាន Akonadi Nepomuk -Name[ko]=Akonadi Nepomuk 공급자 -Name[lt]=Akonadi Nepomuk šaltinis -Name[lv]=Akonadi Nepomuk barotājs -Name[nb]=Akonadi innmating til Nepomuk -Name[nds]=Nepomuk-Ingaav för Akonadi -Name[nl]=Akonadi Nepumuk-feeder -Name[pl]=Podajnik Akonadi Nepomuk -Name[pt]=Fontes do Nepomuk para o Akonadi -Name[pt_BR]=Alimentador do Nepomuk para o Akonadi -Name[ru]=Akonadi Nepomuk Feeder -Name[sk]=Podávač Akonadi Nepomuk -Name[sl]=Podajalnik za Nepomuk -Name[sr]=Непомуков уводник Аконадија -Name[sr@ijekavian]=Непомуков уводник Аконадија -Name[sr@ijekavianlatin]=Nepomukov uvodnik Akonadija -Name[sr@latin]=Nepomukov uvodnik Akonadija -Name[sv]=Akonadi-inmatning till Nepomuk -Name[tr]=Akonadi Nepomuk Besleyici -Name[uk]=Передавач даних Akonadi Nepomuk -Name[x-test]=xxAkonadi Nepomuk Feederxx -Name[zh_CN]=Akonadi Nepomuk 邮件采集器 -Name[zh_TW]=Akonadi Nepomuk Feeder - -Type=AkonadiAgent -Exec=akonadi_nepomuk_feeder -Icon=nepomuk - -X-Akonadi-MimeTypes=text/directory -X-Akonadi-Capabilities=Unique,Autostart -X-Akonadi-Identifier=akonadi_nepomuk_feeder diff -Nru kdepim-runtime-4.12.3/agents/nepomukfeeder/akonadinepomukfeeder.desktop kdepim-runtime-4.12.90/agents/nepomukfeeder/akonadinepomukfeeder.desktop --- kdepim-runtime-4.12.3/agents/nepomukfeeder/akonadinepomukfeeder.desktop 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/agents/nepomukfeeder/akonadinepomukfeeder.desktop 1970-01-01 00:00:00.000000000 +0000 @@ -1,44 +0,0 @@ -[Desktop Entry] -Type=ServiceType -X-KDE-ServiceType=AkonadiNepomukFeeder -Name=Akonadi NepomukFeeder Plugin -Name[bs]=Akonadi Nepomuk napajač plugin -Name[ca]=Connector de l'alimentador Nepomuk per l'Akonadi -Name[ca@valencia]=Connector de l'alimentador Nepomuk per l'Akonadi -Name[cs]=Modul Akonadi NepomukFeeder -Name[da]=Akonadi NepomukFeeder-plugin -Name[de]=Nepomuk-Zusatzmodul für Akonadi -Name[el]=Πρόσθετο τροφοδότη Nepomuk του Akonadi -Name[es]=Complemento de proveedor Akonadi de Nepomuk -Name[et]=Akonadi Nepomuki sööturi plugin -Name[fi]=Akonadin NepomukFeeder-liitännäinen -Name[fr]=Module externe Nepomuk pour Akonadi -Name[ga]=Breiseán NepomukFeeder Akonadi -Name[gl]=Complemento de alimentación de Nepomuk para Akonadi -Name[hu]=Akonadi Nepomuk feltöltő bővítmény -Name[ia]=Plug-in de syndication de Akonadi Nepomuk -Name[it]=Estensione fornitore Akonadi per Nepomuk -Name[kk]=Akonadi Nepomuk бергіш плагині -Name[km]=កម្មវិធី​ជំនួយ​របស់ Akonadi NepomukFeeder -Name[ko]=Akonadi NepomukFeeder 플러그인 -Name[lt]=Akonadi NepomukFeeder įskiepis -Name[lv]=Akonadi NepomukFeeder spraudnis -Name[nb]=Akonadi programtillegg NepomukFeeder -Name[nds]=Nepomuk-Ingaavmoduul för Akonadi -Name[nl]=Akonadi NepomukFeeder-plug-in -Name[pl]=Wtyczka Podajnik Akonadi Nepomuk -Name[pt]='Plugin' de Fontes do Nepomuk para o Akonadi -Name[pt_BR]=Plugin do alimentador do Nepomuk para o Akonadi -Name[ru]=Модуль NepomukFeeder -Name[sk]=Plugin podávača Akonadi Nepomuk -Name[sl]=Vstavek NepomukFeeder za Akonadi -Name[sr]=Аконадијев прикључак Непомуковог уводника -Name[sr@ijekavian]=Аконадијев прикључак Непомуковог уводника -Name[sr@ijekavianlatin]=Akonadijev priključak Nepomukovog uvodnika -Name[sr@latin]=Akonadijev priključak Nepomukovog uvodnika -Name[sv]=Akonadi insticksprogram för inmatning till Nepomuk -Name[tr]=Akonadi NepomukFeeder Eklentisi -Name[uk]=Додаток передавання даних Akonadi Nepomuk -Name[x-test]=xxAkonadi NepomukFeeder Pluginxx -Name[zh_CN]=Akonadi Nepomuk 采集器插件 -Name[zh_TW]=Akonadi NepomukFeeder 外掛程式 diff -Nru kdepim-runtime-4.12.3/agents/nepomukfeeder/CMakeLists.txt kdepim-runtime-4.12.90/agents/nepomukfeeder/CMakeLists.txt --- kdepim-runtime-4.12.3/agents/nepomukfeeder/CMakeLists.txt 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/agents/nepomukfeeder/CMakeLists.txt 1970-01-01 00:00:00.000000000 +0000 @@ -1,74 +0,0 @@ -include_directories( - ${Boost_INCLUDE_DIR} - ${NEPOMUK_CORE_INCLUDE_DIR} - ${CMAKE_CURRENT_SOURCE_DIR}/plugin - ${CMAKE_CURRENT_BINARY_DIR} - ) - -include( SopranoAddOntology ) - -INCLUDE (CheckIncludeFiles) -CHECK_INCLUDE_FILES(malloc.h HAVE_MALLOC_H) -INCLUDE (CheckFunctionExists) -CHECK_FUNCTION_EXISTS(malloc_trim HAVE_MALLOC_TRIM) - -set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${KDE4_ENABLE_EXCEPTIONS} -fPIC" ) - -set(CMAKE_NEPOMUK_FEEDER_INDEX_COMPAT_LEVEL 3) -configure_file(nepomukfeeder-config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/nepomukfeeder-config.h) - -set(akonadi_nepomuk_feeder_SRCS - nepomukfeederagent.cpp - pluginloader.cpp - indexscheduler.cpp - itemqueue.cpp - nepomukhelpers.cpp - propertycache.cpp - findunindexeditemsjob.cpp - nepomukfeederagentdialog.cpp - indexerconfig.cpp - eventmonitor.cpp -) - -qt4_add_dbus_adaptor(akonadi_nepomuk_feeder_SRCS org.freedesktop.Akonadi.NepomukFeeder.xml nepomukfeederagent.h Akonadi::NepomukFeederAgent) - -kde4_add_executable(akonadi_nepomuk_feeder ${akonadi_nepomuk_feeder_SRCS}) - - -set( NEPOMUKFEEDER_SHARED_LIBS - niefast - ${SOPRANO_LIBRARIES} - ${KDE4_KDEUI_LIBRARY} - ${KDE4_KDECORE_LIBS} - ${KDEPIMLIBS_AKONADI_LIBS} - ${QT_QTCORE_LIBRARY} - ${QT_QTDBUS_LIBRARY} - ${NEPOMUK_CORE_LIBRARY} - ${KDE4_KIDLETIME_LIBRARY} - ${KDE4_SOLID_LIBS} -) - -if (Q_WS_MAC) - set_target_properties(akonadi_nepomuk_feeder PROPERTIES MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/../Info.plist.template) - set_target_properties(akonadi_nepomuk_feeder PROPERTIES MACOSX_BUNDLE_GUI_IDENTIFIER "org.kde.Akonadi.nepomukfeeder") - set_target_properties(akonadi_nepomuk_feeder PROPERTIES MACOSX_BUNDLE_BUNDLE_NAME "KDE Akonadi Nepomukfeeder") -endif () - - -target_link_libraries(akonadi_nepomuk_feeder - ${NEPOMUKFEEDER_SHARED_LIBS} - nepomukfeederpluginlib -) - - - -install(TARGETS akonadi_nepomuk_feeder ${INSTALL_TARGETS_DEFAULT_ARGS}) -install(FILES akonadinepomukfeederagent.desktop DESTINATION "${CMAKE_INSTALL_PREFIX}/share/akonadi/agents") -install( - FILES akonadinepomukfeeder.desktop - DESTINATION ${SERVICETYPES_INSTALL_DIR}) - -add_subdirectory( plugin ) -add_subdirectory( plugins ) -add_subdirectory( test ) -add_subdirectory( util ) diff -Nru kdepim-runtime-4.12.3/agents/nepomukfeeder/eventmonitor.cpp kdepim-runtime-4.12.90/agents/nepomukfeeder/eventmonitor.cpp --- kdepim-runtime-4.12.3/agents/nepomukfeeder/eventmonitor.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/agents/nepomukfeeder/eventmonitor.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,109 +0,0 @@ -/* This file is part of the KDE Project - Copyright (c) 2008 Sebastian Trueg - Copyright (c) 2010-13 Vishesh Handa - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License version 2 as published by the Free Software Foundation. - - 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 "eventmonitor.h" -#include "indexscheduler.h" - -#include -#include -#include -#include -#include -#include - -#include - -// TODO: Make idle timeout configurable? -static int s_idleTimeout = 1000 * 60 * 2; // 2 min - -Nepomuk2::EventMonitor::EventMonitor( QObject* parent ) - : QObject( parent ) -{ - // monitor the powermanagement to not drain the battery - connect( Solid::PowerManagement::notifier(), SIGNAL(appShouldConserveResourcesChanged(bool)), - this, SLOT(slotPowerManagementStatusChanged(bool)) ); - - // setup idle time - KIdleTime* idleTime = KIdleTime::instance(); - connect( idleTime, SIGNAL(timeoutReached(int)), this, SLOT(slotIdleTimeoutReached()) ); - connect( idleTime, SIGNAL(resumingFromIdle()), this, SLOT(slotResumeFromIdle()) ); - - m_isOnBattery = Solid::PowerManagement::appShouldConserveResources(); - m_isIdle = false; - m_enabled = false; - - enable(); - - /* - KConfigGroup cfgGrp( componentData().config(), identifier() ); - KIdleTime::instance()->addIdleTimeout( 1000 * cfgGrp.readEntry( "IdleTimeout", 120 ) ); - disableIdleDetection( cfgGrp.readEntry( "DisableIdleDetection", true ) ); - */ -} - - -Nepomuk2::EventMonitor::~EventMonitor() -{ -} - - -void Nepomuk2::EventMonitor::slotPowerManagementStatusChanged( bool conserveResources ) -{ - m_isOnBattery = conserveResources; - if( m_enabled ) { - emit powerManagementStatusChanged( conserveResources ); - } -} - - -void Nepomuk2::EventMonitor::enable() -{ - /* avoid add multiple idle timeout */ - if (!m_enabled) { - m_enabled = true; - KIdleTime::instance()->addIdleTimeout( s_idleTimeout ); - } -} - -void Nepomuk2::EventMonitor::disable() -{ - if (m_enabled) { - m_enabled = false; - KIdleTime::instance()->removeAllIdleTimeouts(); - } -} - -void Nepomuk2::EventMonitor::slotIdleTimeoutReached() -{ - if( m_enabled ) { - m_isIdle = true; - emit idleStatusChanged( true ); - } - KIdleTime::instance()->catchNextResumeEvent(); -} - -void Nepomuk2::EventMonitor::slotResumeFromIdle() -{ - m_isIdle = false; - if( m_enabled ) { - emit idleStatusChanged( false ); - } -} - -#include "eventmonitor.moc" diff -Nru kdepim-runtime-4.12.3/agents/nepomukfeeder/eventmonitor.h kdepim-runtime-4.12.90/agents/nepomukfeeder/eventmonitor.h --- kdepim-runtime-4.12.3/agents/nepomukfeeder/eventmonitor.h 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/agents/nepomukfeeder/eventmonitor.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,70 +0,0 @@ -/* This file is part of the KDE Project - Copyright (c) 2008 Sebastian Trueg - Copyright (c) 2012 Vishesh Handa - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License version 2 as published by the Free Software Foundation. - - 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 _NEPOMUK_FILEINDEXER_EVENT_MONITOR_H_ -#define _NEPOMUK_FILEINDEXER_EVENT_MONITOR_H_ - -#include -#include -#include -#include - -namespace Nepomuk2 { - - class EventMonitor : public QObject - { - Q_OBJECT - - public: - EventMonitor( QObject* parent = 0 ); - ~EventMonitor(); - - bool isIdle() const { return m_isIdle; } - bool isOnBattery() const { return m_isOnBattery; } - - signals: - /** - * Emitted when the power management status changes. - * - * \param conserveResources true if you should conserve resources - */ - void powerManagementStatusChanged( bool conserveResources ); - - /** - * Emitted when the system becomes idle - */ - void idleStatusChanged( bool isIdle ); - - public slots: - void enable(); - void disable(); - - private Q_SLOTS: - void slotIdleTimeoutReached(); - void slotResumeFromIdle(); - void slotPowerManagementStatusChanged( bool conserveResources ); - - private: - bool m_enabled; - bool m_isIdle; - bool m_isOnBattery; - }; -} - -#endif diff -Nru kdepim-runtime-4.12.3/agents/nepomukfeeder/findunindexeditemsjob.cpp kdepim-runtime-4.12.90/agents/nepomukfeeder/findunindexeditemsjob.cpp --- kdepim-runtime-4.12.3/agents/nepomukfeeder/findunindexeditemsjob.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/agents/nepomukfeeder/findunindexeditemsjob.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,233 +0,0 @@ -/* - * Copyright (C) 2012 Christian Mollekopf - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 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 General Public License - * along with this program. If not, see . - */ - -#include "findunindexeditemsjob.h" -#include "nepomukfeeder-config.h" -#include "pluginloader.h" -#include "nepomukhelpers.h" - -#include - -#include -#include -#include -#include - -#include -#include - -#include -#include - -#include -#include - -#ifdef HAVE_MALLOC_H - #include -#endif - - -FindUnindexedItemsJob::FindUnindexedItemsJob(int compatLevel, QObject* parent) -: KJob(parent), - mCompatLevel(compatLevel), - mTotalNumberOfItems(0), - m_killed(false) -{ - -} - -FindUnindexedItemsJob::~FindUnindexedItemsJob() -{ - //Free the memory we used - mAkonadiItems.clear(); - mStaleUris.clear(); -#ifdef HAVE_MALLOC_TRIM - malloc_trim(0); -#endif -} - -void FindUnindexedItemsJob::setIndexedCollections(const Akonadi::Collection::List &collections) -{ - mIndexedCollections = collections; -} - -void FindUnindexedItemsJob::start() -{ - Akonadi::CollectionFetchJob* collectionFetchJob = new Akonadi::CollectionFetchJob(Akonadi::Collection::root(), - Akonadi::CollectionFetchJob::Recursive, - this); - connect(collectionFetchJob, SIGNAL(finished(KJob*)), this, SLOT(slotCollectionListReceived(KJob*))); - collectionFetchJob->start(); -} - -void FindUnindexedItemsJob::slotCollectionListReceived(KJob* job) -{ - if (job->error()) { - kWarning() << "Failed to fetch collections"; - return; - } - - Akonadi::CollectionFetchJob* collectionFetchJob = static_cast(job); - Akonadi::Collection::List allCollections = collectionFetchJob->collections(); - - Akonadi::Collection::List indexedCollections; - foreach (const Akonadi::Collection &col, allCollections) { - if (!indexingDisabled(col)) { - indexedCollections << col; - } - } - setIndexedCollections( indexedCollections ); - - mTime.start(); - fetchItemsFromCollection(); -} - -void FindUnindexedItemsJob::fetchItemsFromCollection() -{ - if( m_killed ) - return; - - if (mIndexedCollections.isEmpty()) { - kDebug() << "Akonadi Query took(ms): " << mTime.elapsed(); - QMetaObject::invokeMethod(this, "retrieveIndexedNepomukResources", Qt::QueuedConnection); - return; - } - const Akonadi::Collection col = mIndexedCollections.takeLast(); - Akonadi::ItemFetchJob *fetchJob = new Akonadi::ItemFetchJob(col, this); - fetchJob->fetchScope().fetchAllAttributes(false); - fetchJob->fetchScope().fetchFullPayload(false); - fetchJob->fetchScope().setFetchModificationTime(true); - fetchJob->fetchScope().setCacheOnly(true); - connect(fetchJob, SIGNAL(itemsReceived(Akonadi::Item::List)), this, SLOT(itemsReceived(Akonadi::Item::List))); - connect(fetchJob, SIGNAL(result(KJob*)), this, SLOT(jobDone(KJob*))); -} - -void FindUnindexedItemsJob::itemsReceived(const Akonadi::Item::List &items) -{ - if( m_killed ) - return; - - mTotalNumberOfItems += items.size(); - foreach (const Akonadi::Item &item, items) { - mAkonadiItems.insert(item.id(), qMakePair(item.modificationTime(), item.mimeType())); - } -} - -void FindUnindexedItemsJob::jobDone(KJob *job) -{ - if (job->error()) { - mAkonadiItems.clear(); - setError(KJob::UserDefinedError); - setErrorText(i18n("Retrieving items failed")); - emitResult(); - return; - } - - fetchItemsFromCollection(); -} - -void FindUnindexedItemsJob::retrieveIndexedNepomukResources() -{ - if( m_killed ) - return; - -#ifdef HAVE_MALLOC_TRIM - malloc_trim(0); -#endif - - kDebug(); - mTime.start(); - Q_ASSERT(Nepomuk2::ResourceManager::instance()->initialized()); - - QString query = QString::fromLatin1("SELECT ?r ?id ?lastMod WHERE { ?r %1 ?id. ?r %2 ?lastMod }") - .arg( Soprano::Node::resourceToN3(Vocabulary::ANEO::akonadiItemId()), - Soprano::Node::resourceToN3(Nepomuk2::Vocabulary::NIE::lastModified()) ); - - Soprano::Model* model = Nepomuk2::ResourceManager::instance()->mainModel(); - - Soprano::Util::AsyncQuery* mQuery = Soprano::Util::AsyncQuery::executeQuery(model, - query, Soprano::Query::QueryLanguageSparql ); - - connect(mQuery, SIGNAL(nextReady(Soprano::Util::AsyncQuery*)), - this, SLOT(processResult(Soprano::Util::AsyncQuery*))); - connect(mQuery, SIGNAL(finished(Soprano::Util::AsyncQuery*)), - this, SLOT(queryFinished(Soprano::Util::AsyncQuery*))); -} - -void FindUnindexedItemsJob::processResult(Soprano::Util::AsyncQuery *query) -{ - if( m_killed ) { - query->close(); - return; - } - - const Akonadi::Item::Id &id = query->binding(QLatin1String("id")).literal().toInt64(); - ItemHash::iterator it = mAkonadiItems.find(id); - if (it == mAkonadiItems.end()) { //Not found in akonadi, stale - mStaleUris << query->binding(QLatin1String("r")).uri(); - } else if (query->binding(QLatin1String("lastMod")).literal().toDateTime() == it->first) { //Found and up-to-date - mAkonadiItems.erase(it); - } - query->next(); -} - -void FindUnindexedItemsJob::queryFinished(Soprano::Util::AsyncQuery *query) -{ - if (query->lastError()) { - mAkonadiItems.clear(); - mStaleUris.clear(); - kWarning() << query->lastError(); - setError(KJob::UserDefinedError); - setErrorText(i18n("Nepomuk query failed")); - emitResult(); - return; - } - kDebug() << "Nepomuk Query took(ms): " << mTime.elapsed(); - kDebug() << "Found " << getUnindexed().size() << " unindexed items."; - kDebug() << "Found " << mStaleUris.size() << " items which can be removed from nepomuk."; - kDebug() << "out of " << mTotalNumberOfItems << " items."; - emitResult(); -} - -const FindUnindexedItemsJob::ItemHash &FindUnindexedItemsJob::getUnindexed() const -{ - return mAkonadiItems; -} - -const QList &FindUnindexedItemsJob::staleUris() const -{ - return mStaleUris; -} - -int FindUnindexedItemsJob::indexedCount() const -{ - return (mTotalNumberOfItems - getUnindexed().size()); -} - -int FindUnindexedItemsJob::totalCount() const -{ - return mTotalNumberOfItems; -} - -bool FindUnindexedItemsJob::doKill() -{ - m_killed = true; - return true; -} - - -#include "findunindexeditemsjob.moc" diff -Nru kdepim-runtime-4.12.3/agents/nepomukfeeder/findunindexeditemsjob.h kdepim-runtime-4.12.90/agents/nepomukfeeder/findunindexeditemsjob.h --- kdepim-runtime-4.12.3/agents/nepomukfeeder/findunindexeditemsjob.h 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/agents/nepomukfeeder/findunindexeditemsjob.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,80 +0,0 @@ -/* - * Copyright (C) 2012 Christian Mollekopf - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 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 General Public License - * along with this program. If not, see . - */ - -#ifndef FINDUNINDEXEDITEMSJOB_H -#define FINDUNINDEXEDITEMSJOB_H -#include -#include -#include -#include - -namespace Soprano { - namespace Util { - class AsyncQuery; - } -} - -class FindUnindexedItemsJob: public KJob -{ - Q_OBJECT -public: - typedef QHash< Akonadi::Item::Id, QPair< QDateTime, QString > > ItemHash; - - explicit FindUnindexedItemsJob(int compatLevel, QObject* parent = 0); - ~FindUnindexedItemsJob(); - - virtual void start(); - - /// Returns all items which were found in akonadi but not in nepomuk (meaning they should be indexed) - const ItemHash &getUnindexed() const; - - /** - * Returns a list of Nepomuk URIs which are Akonadi DataObjects - * but are no longer present in Akonadi i.e they can now be removed - */ - const QList &staleUris() const; - - /// Filter the searched items by indexed collections - void setIndexedCollections(const Akonadi::Collection::List &); - int indexedCount() const; - int totalCount() const; -protected: - virtual bool doKill(); - -private slots: - void slotCollectionListReceived(KJob* job); - void jobDone(KJob*); - void retrieveIndexedNepomukResources(); - void queryFinished(Soprano::Util::AsyncQuery *); - void processResult(Soprano::Util::AsyncQuery *); - void itemsReceived(const Akonadi::Item::List &); - -private: - void fetchItemsFromCollection(); - ItemHash mAkonadiItems; - - /// Contain a list of Nepomuk Uri which are now invalid - QList mStaleUris; - QTime mTime; - const int mCompatLevel; - Akonadi::Collection::List mIndexedCollections; - int mTotalNumberOfItems; - - bool m_killed; -}; - -#endif // FINDUNINDEXEDITEMSJOB_H diff -Nru kdepim-runtime-4.12.3/agents/nepomukfeeder/indexerconfig.cpp kdepim-runtime-4.12.90/agents/nepomukfeeder/indexerconfig.cpp --- kdepim-runtime-4.12.3/agents/nepomukfeeder/indexerconfig.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/agents/nepomukfeeder/indexerconfig.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,63 +0,0 @@ -/* - * - * Copyright 2013 Vishesh Handa - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of - * the License or (at your option) version 3 or any later version - * accepted by the membership of KDE e.V. (or its successor approved - * by the membership of KDE e.V.), which shall act as a proxy - * defined in Section 14 of version 3 of the license. - * - * 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 General Public License - * along with this program. If not, see . - * - */ - -#include "indexerconfig.h" - -#include - -#include -#include -#include - -IndexerConfig::IndexerConfig(QObject* parent) - : QObject(parent) - , m_config(QLatin1String("akonadi_nepomuk_feederrc")) - , m_isEnabled( true ) -{ - KDirWatch* dirWatch = KDirWatch::self(); - connect( dirWatch, SIGNAL(dirty(QString)), - this, SLOT(slotConfigDirty()) ); - connect( dirWatch, SIGNAL(created(QString)), - this, SLOT(slotConfigDirty()) ); - dirWatch->addFile( KStandardDirs::locateLocal( "config", m_config.name() ) ); - - KConfigGroup cfgGrp( &m_config, "akonadi_nepomuk_email_feeder" ); - m_isEnabled = cfgGrp.readEntry( "Enabled", true ); -} - -bool IndexerConfig::isEnabled() -{ - return m_isEnabled; -} - -void IndexerConfig::slotConfigDirty() -{ - m_config.reparseConfiguration(); - - KConfigGroup cfgGrp( &m_config, "akonadi_nepomuk_email_feeder" ); - bool enabled = cfgGrp.readEntry( "Enabled", true ); - if( m_isEnabled != enabled ) { - m_isEnabled = enabled; - emit configChanged(); - } -} - diff -Nru kdepim-runtime-4.12.3/agents/nepomukfeeder/indexerconfig.h kdepim-runtime-4.12.90/agents/nepomukfeeder/indexerconfig.h --- kdepim-runtime-4.12.3/agents/nepomukfeeder/indexerconfig.h 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/agents/nepomukfeeder/indexerconfig.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,49 +0,0 @@ -/* - * - * Copyright 2013 Vishesh Handa - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of - * the License or (at your option) version 3 or any later version - * accepted by the membership of KDE e.V. (or its successor approved - * by the membership of KDE e.V.), which shall act as a proxy - * defined in Section 14 of version 3 of the license. - * - * 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 General Public License - * along with this program. If not, see . - * - */ - -#ifndef INDEXERCONFIG_H -#define INDEXERCONFIG_H - -#include -#include - -class IndexerConfig : public QObject -{ - Q_OBJECT -public: - explicit IndexerConfig(QObject* parent); - - bool isEnabled(); - -signals: - void configChanged(); - -private slots: - void slotConfigDirty(); - -private: - KConfig m_config; - - bool m_isEnabled; -}; - -#endif // INDEXERCONFIG_H diff -Nru kdepim-runtime-4.12.3/agents/nepomukfeeder/indexscheduler.cpp kdepim-runtime-4.12.90/agents/nepomukfeeder/indexscheduler.cpp --- kdepim-runtime-4.12.3/agents/nepomukfeeder/indexscheduler.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/agents/nepomukfeeder/indexscheduler.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,362 +0,0 @@ -/* - Copyright (C) 2011 Christian Mollekopf - Copyright (C) 2013 Vishesh Handa - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 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 General Public License - along with this program. If not, see . -*/ - - -#include "indexscheduler.h" - -#include - -#include -#include -#include - -#include -#include -#include -#include - -#include -#include - -#include "nepomukhelpers.h" -#include "nepomukfeeder-config.h" - -#include - -using namespace Akonadi; - -IndexScheduler::IndexScheduler( QObject* parent ) -: QObject( parent ), - mTotalAmount( 0 ), - mTotalClearAmount( 0 ), - mReIndex( false ), - mOnline( true ), - lowPrioQueue(1, 100, this), - highPrioQueue(1, 100, this), - emailItemQueue(1, 100, this) -{ - mProcessItemQueueTimer.setInterval( 0 ); - mProcessItemQueueTimer.setSingleShot( true ); - connect( &mProcessItemQueueTimer, SIGNAL(timeout()), SLOT(processItemQueue()) ); - - connect( &lowPrioQueue, SIGNAL(finished()), SLOT(prioQueueFinished())); - connect( &highPrioQueue, SIGNAL(finished()), SLOT(prioQueueFinished())); - connect( &emailItemQueue, SIGNAL(finished()), SLOT(prioQueueFinished())); - connect( &lowPrioQueue, SIGNAL(batchFinished()), SLOT(batchFinished())); - connect( &highPrioQueue, SIGNAL(batchFinished()), SLOT(batchFinished())); - connect( &emailItemQueue, SIGNAL(batchFinished()), SLOT(batchFinished())); - - mEventMonitor = new Nepomuk2::EventMonitor( this ); - connect( mEventMonitor, SIGNAL(idleStatusChanged(bool)), this, SLOT(slotIdleStatusChanged(bool)) ); - connect( mEventMonitor, SIGNAL(powerManagementStatusChanged(bool)), this, SLOT(slotPowerManagementChanged(bool)) ); -} - -IndexScheduler::~IndexScheduler() -{ - -} - -void IndexScheduler::setReindexing( bool reindex ) -{ - // FIXME: This doesn't seem like it will do anything? - // Shouldn't it call some kind of signal? - mReIndex = reindex; -} - -void IndexScheduler::setOnline( bool online ) -{ - //kDebug() << online; - if ( online && !mEventMonitor->isOnBattery() ) { - mOnline = online; - slotIdleStatusChanged( mEventMonitor->isIdle() ); - continueIndexing(); - } - else { - mOnline = false; - } -} - -void IndexScheduler::slotIdleStatusChanged(bool isIdle) -{ - if ( mOnline ) { - setIndexingSpeed( isIdle ? FullSpeed : ReducedSpeed ); - } -} - -void IndexScheduler::slotPowerManagementChanged(bool onBattery) -{ - setOnline( !onBattery ); - // FIXME: Need some kind of better status message! -} - - -void IndexScheduler::setIndexingSpeed(IndexScheduler::IndexingSpeed speed) -{ - const int s_reducedSpeedDelay = 500; // ms - const int s_snailPaceDelay = 3000; // ms - - kDebug() << speed; - - // - // The low prio queue is always throttled a little more than the high prio one - // - if ( speed == FullSpeed ) { - lowPrioQueue.setProcessingDelay( 0 ); - highPrioQueue.setProcessingDelay( 0 ); - emailItemQueue.setProcessingDelay( 0 ); - } else { - lowPrioQueue.setProcessingDelay( s_snailPaceDelay ); - highPrioQueue.setProcessingDelay( s_reducedSpeedDelay ); - emailItemQueue.setProcessingDelay( s_snailPaceDelay ); - } -} - -void IndexScheduler::addCollection( const Akonadi::Collection &collection ) -{ - //kDebug() << collection.id(); - - // If the collection contains mail, append it, otherwise prepend. - // This ensures the smaller, fewer collections with things like - // contacts or events in them are processed first. They tend to - // be more important than the full text index of mail. - // Bit of a hack, yes, would probably be better to have priorties - // in the plugins and then keep a priority queue properly. - if(mCollectionQueue.contains(collection)) { - return; - } - if ( collection.contentMimeTypes().contains( QLatin1String( "message/rfc822" ) ) ) - mCollectionQueue.append( collection ); - else - mCollectionQueue.prepend( collection ); -} - -static inline QString emailMimetype() -{ - return QLatin1String("message/rfc822"); -} - -void IndexScheduler::addItem( const Akonadi::Item &item ) -{ - kDebug() << item.id(); - if (item.mimeType() == emailMimetype()) { - emailItemQueue.addItem( item ); - } - else { - highPrioQueue.addItem( item ); - } - mTotalAmount++; - mProcessItemQueueTimer.start(); -} - -void IndexScheduler::addLowPrioItem( const Akonadi::Item &item ) -{ -// kDebug() << item.id(); - if (item.mimeType() == emailMimetype()) { - emailItemQueue.addItem( item ); - } else { - lowPrioQueue.addItem( item ); - } - mTotalAmount++; - mProcessItemQueueTimer.start(); -} - -void IndexScheduler::removeCollection(const Collection& collection) -{ - mCollectionsToRemove.append( collection ); - mTotalClearAmount++; -} - -void IndexScheduler::removeItem(const Item& item) -{ - mItemsToRemove.append( item ); - mTotalClearAmount++; -} - -void IndexScheduler::removeNepomukUris(const QList< QUrl > uriList) -{ - mUrisToRemove.append( uriList ); - mTotalClearAmount += uriList.size(); -} - - -bool IndexScheduler::isEmpty() -{ - return highPrioQueue.isEmpty() && lowPrioQueue.isEmpty() && - emailItemQueue.isEmpty() && mCollectionQueue.isEmpty() && - mCollectionsToRemove.isEmpty() && - mItemsToRemove.isEmpty() && mUrisToRemove.isEmpty(); -} - -void IndexScheduler::continueIndexing() -{ - kDebug(); - mProcessItemQueueTimer.start(); -} - -void IndexScheduler::indexingComplete() -{ - //kDebug() << "fully indexed"; - mReIndex = false; - emit progress( 100 ); - emit idle( i18n( "Indexing completed." ) ); -} - -void IndexScheduler::processItemQueue() -{ - if ( mTotalAmount ) { - int percent = ( mTotalAmount - size() ) * 100.0 / mTotalAmount; - kDebug() << "Progress:" << percent << "%" << size() << mTotalAmount; - emit progress( percent ); - } - else if (mTotalClearAmount) { - int size = mCollectionsToRemove.size() + mItemsToRemove.size() + mUrisToRemove.size(); - int percent = ( mTotalClearAmount - size ) * 100.0 / mTotalClearAmount; - kDebug() << "Progress:" << percent << "%" << size << mTotalClearAmount; - emit progress( percent ); - } - - if ( !mOnline ) { - kDebug() << "not Online, stopping processing"; - return; - } - - if ( !mCollectionQueue.isEmpty() ) { - Akonadi::Collection collection = mCollectionQueue.takeFirst(); - - KJob *job = NepomukHelpers::addCollectionToNepomuk( collection ); - connect( job, SIGNAL(result(KJob*)), this, SLOT(collectionSaveJobResult(KJob*))); - - emit running( i18n( "Indexing collection '%1'", collection.name() ) ); - return; - } - else if ( !highPrioQueue.isEmpty() ) { - kDebug() << "high"; - if ( highPrioQueue.processBatch() ) { - emit running( i18n( "Indexing" ) ); - return; - } - } - else if ( !lowPrioQueue.isEmpty() ) { - kDebug() << "low"; - if ( lowPrioQueue.processBatch() ) { - emit running( i18n( "Indexing" ) ); - return; - } - } - else if ( !emailItemQueue.isEmpty() ) { - kDebug() << "email"; - if ( emailItemQueue.processBatch() ) { - emit running( i18n( "Indexing Email" ) ); - return; - } - } - - // Cleaning - else if( !mCollectionsToRemove.isEmpty() ) { - kDebug() << "Clear collection"; - // FIXME: We should probably be clearing the contents of the collection as well - - // Clear 10 collections at a time - for( int i=0; i<10 && mCollectionsToRemove.count(); i++ ) - mNieUrlsToRemove << mCollectionsToRemove.takeFirst().url(); - - QTimer::singleShot(lowPrioQueue.processingDelay(), this, SLOT(slotSendUrlsForClearing())); - emit running( i18n("Clearing unused Emails") ); - return; - } - - else if( !mItemsToRemove.isEmpty() ) { - // Clear 10 items at a time - for( int i=0; i<10 && mItemsToRemove.count(); i++ ) - mNieUrlsToRemove << mItemsToRemove.takeFirst().url(); - - QTimer::singleShot(lowPrioQueue.processingDelay(), this, SLOT(slotSendUrlsForClearing())); - emit running( i18n("Clearing unused Emails") ); - return; - } - - else if( !mUrisToRemove.isEmpty() ) { - // Clear 10 at a time - for( int i=0; i<10 && mUrisToRemove.count(); i++ ) - mNieUrlsToRemove << mUrisToRemove.takeFirst(); - - QTimer::singleShot(lowPrioQueue.processingDelay(), this, SLOT(slotSendUrlsForClearing())); - emit running( i18n("Clearing unused Emails") ); - return; - } - - kDebug() << "idle"; - emit idle( i18n( "Ready to index data." ) ); -} - -void IndexScheduler::slotSendUrlsForClearing() -{ - KJob *removeJob = Nepomuk2::removeResources( mNieUrlsToRemove, Nepomuk2::RemoveSubResoures ); - connect( removeJob, SIGNAL(finished(KJob*)), this, SLOT(batchFinished()) ); - - mNieUrlsToRemove.clear(); -} - -void IndexScheduler::prioQueueFinished() -{ - if (highPrioQueue.isEmpty() && lowPrioQueue.isEmpty() && emailItemQueue.isEmpty() && mCollectionQueue.isEmpty()) { - indexingComplete(); - mTotalAmount = 0; - } -} - -void IndexScheduler::batchFinished() -{ - if (!isEmpty()) { - // go to eventloop before processing the next one, otherwise we miss the idle status change - mProcessItemQueueTimer.start(); - } - else if (mCollectionsToRemove.isEmpty() && mItemsToRemove.isEmpty() && mUrisToRemove.isEmpty()) { - mTotalClearAmount = 0; - indexingComplete(); - } -} - -void IndexScheduler::collectionSaveJobResult(KJob* job) -{ - if ( job->error() ) - kWarning() << job->errorString(); - - batchFinished(); -} - -int IndexScheduler::size() -{ - return lowPrioQueue.size() + highPrioQueue.size() + emailItemQueue.size(); -} - -void IndexScheduler::clear() -{ - mCollectionQueue.clear(); - - lowPrioQueue.clear(); - highPrioQueue.clear(); - emailItemQueue.clear(); - - mItemsToRemove.clear(); - mCollectionsToRemove.clear(); - mUrisToRemove.clear(); -} - - -#include "indexscheduler.moc" diff -Nru kdepim-runtime-4.12.3/agents/nepomukfeeder/indexscheduler.h kdepim-runtime-4.12.90/agents/nepomukfeeder/indexscheduler.h --- kdepim-runtime-4.12.3/agents/nepomukfeeder/indexscheduler.h 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/agents/nepomukfeeder/indexscheduler.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,164 +0,0 @@ -/* - Copyright (C) 2011 Christian Mollekopf - Copyright (C) 2013 Vishesh Handa - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 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 General Public License - along with this program. If not, see . -*/ - - -#ifndef INDEXSCHEDULER_H -#define INDEXSCHEDULER_H - -#include -#include -#include -#include -#include "itemqueue.h" -#include "eventmonitor.h" - -class FeederPluginloader; -class KJob; - -/** - * The scheduler takes collections and items and indexes them - * - * There is basically: - * -CollectionQueue: list of collections to index (initial indexing), items end up in the ItemQueue - * -ItemQueue: Queue for the actual indexing - * - * - * The queue has two ItemQueues for indexing the items: - * -highPrioQueue for items with high prioritiy for indexing (a note which just changed) - * -lowPrioQueue for items with low priority (i.e. initial indexing of emails) - * - * The idea is that items which have been changed by the user have higher priority than - * the initial indexing of i.e. emails. - * - * EntryPoints are: - * -addCollection: for initial indexing (low priority) - * -addItem: to index a single item (high priority) - * - */ -class IndexScheduler: public QObject -{ - Q_OBJECT -public: - explicit IndexScheduler( QObject* parent = 0 ); - virtual ~IndexScheduler(); - - ///add the collection to the queue, all items of it will be fetched and indexed - void addCollection(const Akonadi::Collection &); - ///adds the item to the highPrioQueue or emailQueue - void addItem(const Akonadi::Item &); - void addLowPrioItem(const Akonadi::Item &); - - /** - * Remove the collection \p collection from the Nepomuk index - */ - void removeCollection(const Akonadi::Collection& collection); - - /** - * Remove the item \p item from the Nepomuk index. - */ - void removeItem(const Akonadi::Item& item); - - void removeNepomukUris(const QList uriList); - - /** - * If enabled all items will be reindexed - * The flag will be reset once all collections/items have been indexed - */ - void setReindexing(bool); - - bool isEmpty(); - - /** start/stop indexing */ - void setOnline(bool); - - int size(); - - enum IndexingSpeed { - /** - * Index at full speed, i.e. do not use any artificial - * delays. - * - * This is the mode used if the user is "away". - */ - FullSpeed = 0, - - /** - * Reduce the indexing speed mildly. This is the normal - * mode used while the user works. The indexer uses small - * delay between indexing two batches in order to keep the - * load on CPU and IO down. - */ - ReducedSpeed - }; - - void setIndexingSpeed( IndexingSpeed speed ); - - /** - * Clears all the Items in the internal queues which - * are supposed to be indexed - */ - void clear(); - -signals: - void progress(int); - void idle(QString); - void running(QString); - -private slots: - void processItemQueue(); - void prioQueueFinished(); - void batchFinished(); - void collectionSaveJobResult( KJob* job ); - - void slotIdleStatusChanged(bool isIdle); - void slotPowerManagementChanged(bool onBattery); - - void slotSendUrlsForClearing(); - -private: - void continueIndexing(); //start the indexing if work is to be done - void indexingComplete(); - - int mTotalAmount; // The number of items than need to be indexe - int mTotalClearAmount; // The number of items that need to be cleared - - bool mReIndex; - bool mOnline; - QTimer mProcessItemQueueTimer; - - ItemQueue lowPrioQueue; - ItemQueue highPrioQueue; - ItemQueue emailItemQueue; - Akonadi::Collection::List mCollectionQueue; - - // To Clear - Akonadi::Item::List mItemsToRemove; - Akonadi::Collection::List mCollectionsToRemove; - QList mUrisToRemove; - - // This variable is temporarily used to store the urls that will be passed to nepomuk - // for deletion. - QList mNieUrlsToRemove; - - Nepomuk2::EventMonitor* mEventMonitor; -}; - - - - -#endif // INDEXSCHEDULER_H diff -Nru kdepim-runtime-4.12.3/agents/nepomukfeeder/itemqueue.cpp kdepim-runtime-4.12.90/agents/nepomukfeeder/itemqueue.cpp --- kdepim-runtime-4.12.3/agents/nepomukfeeder/itemqueue.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/agents/nepomukfeeder/itemqueue.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,365 +0,0 @@ -/* - Copyright (C) 2011 Christian Mollekopf - Copyright (C) 2013 Vishesh Handa - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 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 General Public License - along with this program. If not, see . -*/ - -#include "itemqueue.h" -#include "nepomukhelpers.h" -#include -#include -#include -#include -#include - -#include -#include -#include - -#include -#include - -#include -#include -#include -#include - -using namespace Nepomuk2::Vocabulary; -using namespace Soprano::Vocabulary; - -Q_DECLARE_METATYPE(Nepomuk2::SimpleResourceGraph) - -ItemQueue::ItemQueue(int batchSize, int fetchSize, QObject* parent) -: QObject(parent), - mBatchSize( batchSize ), - mFetchSize( fetchSize ), - mDelay( 0 ), - mAverageIndexingTime(0), - mNumberOfIndexedItems(0) -{ - mPropertyCache.setCachedTypes(QList() - << NCO::EmailAddress() - << NCO::Contact() - << NAO::FreeDesktopIcon() - << NMO::MessageHeader() - ); - if ( fetchSize < batchSize ) { - kWarning() << "fetchSize must be >= batchsize"; - fetchSize = batchSize; - } -} - -ItemQueue::~ItemQueue() -{ - -} - -void ItemQueue::setProcessingDelay(int delay) -{ - mDelay = delay; -} - -int ItemQueue::processingDelay() -{ - return mDelay; -} - - -void ItemQueue::addItem(const Akonadi::Item &item) -{ - QDateTime modificationTime = item.modificationTime(); - if (modificationTime.isNull()) { - // If the DateTime is not provided, it means highest priority - modificationTime = QDateTime::currentDateTime(); - } - - mItemPipeline.insert(modificationTime, item.id()); -} - -void ItemQueue::addItems(const Akonadi::Item::List &list) -{ - foreach (const Akonadi::Item &item, list) { - addItem( item ); - } -} - -Akonadi::Item::List ItemQueue::fetchHighestPriorityItems(int numItems) -{ - Akonadi::Item::List list; - list.reserve(numItems); - - int i = 0; - QMutableMapIterator iter(mItemPipeline); - iter.toBack(); - - while (iter.hasPrevious() && i < numItems) { - iter.previous(); - i++; - - list << Akonadi::Item(iter.value()); - iter.remove(); - } - - return list; -} - -bool ItemQueue::processBatch() -{ - kDebug() << "pipeline size: " << mItemPipeline.size() << mFetchedItemList.size(); - if ( runningJobCount() > 0 ) {//wait until the old graph has been saved - kDebug() << "blocked: " << runningJobCount(); - return false; - } - Q_ASSERT( runningJobCount() == 0 ); - - if ( mItemPipeline.isEmpty() && mFetchedItemList.isEmpty() ) { - return false; - } - - if ( mFetchedItemList.size() <= mBatchSize && !mItemPipeline.isEmpty() ) { - // Get the list of items to fetch - Akonadi::Item::List itemFetchList = fetchHighestPriorityItems( mFetchSize ); - kDebug() << "Fetching" << itemFetchList.size() << "items"; - - Akonadi::ItemFetchJob *job = new Akonadi::ItemFetchJob( itemFetchList, this ); - job->fetchScope().fetchFullPayload(); - job->fetchScope().setAncestorRetrieval( Akonadi::ItemFetchScope::Parent ); - job->fetchScope().setCacheOnly( true ); - job->fetchScope().setIgnoreRetrievalErrors( true ); - job->setProperty( "numberOfItems", itemFetchList.size() ); - - connect( job, SIGNAL(result(KJob*)), SLOT(fetchJobResult(KJob*)) ); - addJob( job ); - return true; - } - - return indexBatch(); -} - -void ItemQueue::fetchJobResult(KJob* job) -{ - removeJob( job ); - if ( job->error() ) { - kWarning() << job->errorString(); - emit batchFinished(); - } - Akonadi::ItemFetchJob *fetchJob = qobject_cast( job ); - Q_ASSERT( fetchJob ); - - mFetchedItemList.append( fetchJob->items() ); - int numberOfItems = fetchJob->property( "numberOfItems" ).toInt(); - if ( fetchJob->items().size() != numberOfItems ) { - kWarning() << "Not all items were fetched: " << fetchJob->items().size() << numberOfItems; - } - - if ( !indexBatch() ) { //Can happen if only items without payload were fetched - QTimer::singleShot( mDelay, this, SLOT(slotEmitFinished()) ); - } -} - -bool ItemQueue::indexBatch() -{ - Nepomuk2::SimpleResourceGraph resourceGraph; - QList batch; - - while ( batch.size() < mBatchSize && !mFetchedItemList.isEmpty() ) { - const Akonadi::Item &item = mFetchedItemList.takeFirst(); - kDebug() << "Indexing" << item.id() << item.modificationTime(); - - if ( !item.hasPayload() ) { //can happen due to deserialization error or with items that actually don't have a local payload - kWarning() << "failed to fetch item or item without payload: " << item.id(); - continue; - } - Q_ASSERT( item.hasPayload() ); - - NepomukHelpers::addItemToGraph( item, resourceGraph ); - batch.append( item.id() ); - } - - if ( batch.size() ) { - //kDebug() << "process batch of " << batch.size() << " left: " << mFetchedItemList.size(); - mTimer.start(); - - QList akondiUrls; - foreach (Akonadi::Item::Id id, batch) { - akondiUrls << Akonadi::Item(id).url(); - } - - KJob *job = Nepomuk2::removeDataByApplication( akondiUrls, Nepomuk2::RemoveSubResoures, KGlobal::mainComponent() ); - job->setProperty("graph", QVariant::fromValue(resourceGraph)); - connect( job, SIGNAL(finished(KJob*)), this, SLOT(removeDataResult(KJob*)) ); - addJob( job ); - return true; - } - - return false; -} - -void ItemQueue::removeDataResult(KJob* job) -{ - removeJob( job ); - if ( job->error() ) - kWarning() << job->errorString(); - - //All old items have been removed, so we can now store the new items - const Nepomuk2::SimpleResourceGraph graph = job->property("graph").value(); - Nepomuk2::SimpleResourceGraph identifiedGraph = mPropertyCache.applyCache( graph ); - - foreach(const QUrl& uri, identifiedGraph.allResourceUris()) { - Nepomuk2::SimpleResource res = identifiedGraph[uri]; - if( res.contains(NMO::plainTextMessageContent()) ) { - mPlainTextContent.insert( uri, res.property(NMO::plainTextMessageContent()).first().toString() ); - identifiedGraph[uri].remove(NMO::plainTextMessageContent()); - } - } - - KJob *addGraphJob = NepomukHelpers::addGraphToNepomuk( mPropertyCache.applyCache( graph ) ); - addGraphJob->setProperty("graph", QVariant::fromValue( graph )); - connect( addGraphJob, SIGNAL(result(KJob*)), SLOT(batchJobResult(KJob*)) ); - addJob( addGraphJob ); -} - -namespace { - void setNmoPlainTextContent(const QUrl& uri, const QString& plainText_) { - if( uri.isEmpty() || plainText_.isEmpty() ) - return; - - QString plainText( plainText_ ); - // This number has been experimentally chosen. Virtuoso cannot handle more than this - static const int maxSize = 2490000; - if( plainText.size() > maxSize ) { - kWarning() << "Trimming plain text content from " << plainText.size() << " to " << maxSize; - plainText.resize( maxSize ); - } - - QString uriN3 = Soprano::Node::resourceToN3( uri ); - - QString query = QString::fromLatin1("select ?g where { graph ?g { %1 a aneo:AkonadiDataObject . } }") - .arg ( uriN3 ); - Soprano::Model* model = Nepomuk2::ResourceManager::instance()->mainModel(); - Soprano::QueryResultIterator it = model->executeQuery( query, Soprano::Query::QueryLanguageSparqlNoInference ); - - QUrl graph; - if( it.next() ) { - graph = it[0].uri(); - it.close(); - } - - if( !graph.isEmpty() ) { - QString graphN3 = Soprano::Node::resourceToN3( graph ); - QString insertCommand = QString::fromLatin1("sparql insert { graph %1 { %2 nmo:plainTextMessageContent %3 . } }") - .arg( graphN3, uriN3, Soprano::Node::literalToN3(plainText) ); - - model->executeQuery( insertCommand, Soprano::Query::QueryLanguageUser, QLatin1String("sql") ); - } - } - -} -void ItemQueue::batchJobResult(KJob* job) -{ - removeJob( job ); - // FIXME: Only compute all of this if DEBUG messages have been enabled - kDebug() << "------------------------------------------"; - kDebug() << "pipeline size: " << mItemPipeline.size(); - kDebug() << "fetchedItemList : " << mFetchedItemList.size(); - - kDebug() << "Indexing took(ms): " << mTimer.elapsed(); - mNumberOfIndexedItems++; - mAverageIndexingTime += ((double)mTimer.elapsed()-mAverageIndexingTime)/(double)mNumberOfIndexedItems; - kDebug() << "Average (ms): " << mAverageIndexingTime; - const Nepomuk2::SimpleResourceGraph graph = job->property("graph").value(); - //FIXME: Better error handling - Store this in some error file? - if ( job->error() ) { - kWarning() << "Error while storing graph: " << job->errorString(); - foreach( const Nepomuk2::SimpleResource &res, graph.toList() ) { - kDebug() << res; - } - } else { - Nepomuk2::StoreResourcesJob *storeResourcesJob = static_cast(job); - Q_ASSERT(storeResourcesJob); - mPropertyCache.fillCache(graph, storeResourcesJob->mappings()); - - // Store the plain text - const QHash mappings = storeResourcesJob->mappings(); - QList keys = mappings.uniqueKeys(); - foreach(const QUrl& key, keys) { - const QUrl uri = mappings.value(key); - setNmoPlainTextContent( uri, mPlainTextContent.value(key) ); - } - mPlainTextContent.clear(); - } - - QTimer::singleShot( mDelay, this, SLOT(slotEmitFinished()) ); -} - -bool ItemQueue::isEmpty() const -{ - return mItemPipeline.isEmpty() && mFetchedItemList.isEmpty(); -} - -int ItemQueue::size() const -{ - return mItemPipeline.size() + mFetchedItemList.size(); -} - -void ItemQueue::slotEmitFinished() -{ - emit batchFinished(); - if ( isEmpty() ) - emit finished(); -} - -void ItemQueue::clear() -{ - if ( runningJobCount() > 0 ) { - kWarning() << "called with " << runningJobCount() << " jobs outstanding!"; - killAllJobs(); - } - mItemPipeline.clear(); - mFetchedItemList.clear(); -} - -int ItemQueue::runningJobCount() const -{ - return mJobs.count(); -} - -void ItemQueue::addJob(KJob *job) -{ - if ( mJobs.contains(job) ) - kWarning() << "Job Already exists!"; - else - mJobs.insert(job); -} - -void ItemQueue::removeJob(KJob *job) -{ - if ( !mJobs.contains(job) ) - kWarning() << "Job does not exist!"; - else - mJobs.remove(job); -} - -void ItemQueue::killAllJobs() -{ - QSetIterator i(mJobs); - while (i.hasNext()) { - KJob *job = i.next(); - job->kill(KJob::Quietly); - } - mJobs.clear(); -} - -#include "itemqueue.moc" diff -Nru kdepim-runtime-4.12.3/agents/nepomukfeeder/itemqueue.h kdepim-runtime-4.12.90/agents/nepomukfeeder/itemqueue.h --- kdepim-runtime-4.12.3/agents/nepomukfeeder/itemqueue.h 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/agents/nepomukfeeder/itemqueue.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,142 +0,0 @@ -/* - * Copyright (C) 2012 Christian Mollekopf - * Copyright (C) 2013 Vishesh Handa - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation, either version 3 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 Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program. If not, see . - */ - -#ifndef ITEMQUEUE_H -#define ITEMQUEUE_H - -#include -#include -#include -#include -#include -#include -#include "propertycache.h" - -class KJob; - -/** - * The ItemQueue contains a list of Aknoadi items to be indexed - * - * This class internally consists of 2 queues - one contains a list - * of akonadi items to fetch and the other contain the fetched akonadi items. - * - * During each iteration it will fill up the fetched item queue if required - * and send one batch for indexing. - */ -class ItemQueue : public QObject { - Q_OBJECT -public: - /** - * Create an ItemQueue - * - * \param batchSize describes the number of items that will be pushed - * into Nepomuk in one go - * \param fetchSize describes the number of items that will be fetched - * from akonadi for pushing - */ - explicit ItemQueue(int batchSize, int fetchSize, QObject* parent = 0); - ~ItemQueue(); - - /** add item to queue */ - void addItem(const Akonadi::Item &); - void addItems(const Akonadi::Item::List &); - - /** - * Index one batch of items. - * - * This sends one batch of items from its internal list to Nepomuk for indexing. - * - * If it does not contain the required number of item, it will fetch them - * one fetchSize at a time. This entire operation is asynchronous and this - * function returns almost instantly. - * - * \return \c true if succeeded in sending one batch for processing - * \return \c false if the previous operation is still executing or there is - * nothing to process - * \sa batchFinished - */ - bool processBatch(); - - /** queue is empty */ - bool isEmpty() const; - - /** - * Returns the total number of Akonadi Items in the queue - */ - int size() const; - - /** - * Sets the articifical delay that is introduced when processing one batch - */ - void setProcessingDelay(int delay); - int processingDelay(); - - void clear(); -signals: - /** all items processed */ - void finished(); - /** current batch has been processed and new Items can be added */ - void batchFinished(); - -private slots: - void batchJobResult( KJob* job ); - void fetchJobResult( KJob* job ); - void removeDataResult( KJob* job ); - void slotEmitFinished(); - -private: - /** - * Index one batch of items - * - * \return \c false if nothing left to process - * \return \c true sent one batch for processing - */ - bool indexBatch(); - - /** - * Fetches the most recent \p numItems form mItemPipeline based - * on when they were added. - */ - Akonadi::Item::List fetchHighestPriorityItems(int numItems); - - QMultiMap mItemPipeline; - Akonadi::Item::List mFetchedItemList; - - int mBatchSize; //Size of Nepomuk batch, number of items stored together in nepomuk - int mFetchSize; //Maximum number of items fetched with full payload (defines ram usage of feeder), must be >= mBatchSize, ideally a multiple of it - int mDelay; - - PropertyCache mPropertyCache; - - QTime mTimer; - double mAverageIndexingTime; - qint64 mNumberOfIndexedItems; - - /* - * Track running jobs - */ - QSet mJobs; - - int runningJobCount() const; - void addJob(KJob *job); - void removeJob(KJob *job); - void killAllJobs(); - - QHash mPlainTextContent; -}; -#endif // ITEMQUEUE_H diff -Nru kdepim-runtime-4.12.3/agents/nepomukfeeder/Messages.sh kdepim-runtime-4.12.90/agents/nepomukfeeder/Messages.sh --- kdepim-runtime-4.12.3/agents/nepomukfeeder/Messages.sh 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/agents/nepomukfeeder/Messages.sh 1970-01-01 00:00:00.000000000 +0000 @@ -1,3 +0,0 @@ -#! /bin/sh - -$XGETTEXT `find . -name '*.cpp' | grep -v '/test/' | grep -v '/util' ` -o $podir/akonadi_nepomuk_feeder.pot diff -Nru kdepim-runtime-4.12.3/agents/nepomukfeeder/nepomukfeederagent.cpp kdepim-runtime-4.12.90/agents/nepomukfeeder/nepomukfeederagent.cpp --- kdepim-runtime-4.12.3/agents/nepomukfeeder/nepomukfeederagent.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/agents/nepomukfeeder/nepomukfeederagent.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,386 +0,0 @@ -/* - Copyright (c) 2007 Tobias Koenig - 2008 Sebastian Trueg - 2009 Volker Krause - 2011 Christian Mollekopf - 2013 Vishesh Handa - - 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 "nepomukfeederagent.h" -#include "nepomukfeederagentdialog.h" -#include "nepomukhelpers.h" -#include "findunindexeditemsjob.h" -#include "nepomukfeeder-config.h" -#include "nepomukfeederadaptor.h" - -#include - -#include -#include -#include -#include -#include -#include -#include -#include - -#include - -#include -#include -#include -#include -#include -#include - -#include -#include - -typedef QSharedPointer< QMultiHash< Akonadi::Collection::Id, Akonadi::Item::Id> > MultiHashPointer; -Q_DECLARE_METATYPE(MultiHashPointer) - -namespace Akonadi { - -static inline QString emailMimetype() -{ - return QLatin1String("message/rfc822"); -} - -NepomukFeederAgent::NepomukFeederAgent(const QString& id) : - AgentBase(id), - mInitialUpdateDone( false ), - mInitialIndexingDisabled( false ), - mTotalItems(0), - mIndexedItems(0), - m_findUnindexedItemsJob(0) -{ - - new NepomukFeederAdaptor( this ); - - connect( Nepomuk2::ResourceManager::instance(), SIGNAL(nepomukSystemStarted()), SLOT(selfTest()) ); - connect( Nepomuk2::ResourceManager::instance(), SIGNAL(nepomukSystemStopped()), SLOT(selfTest()) ); - connect( this, SIGNAL(reloadConfiguration()), SLOT(selfTest()) ); - - //mInitialIndexingDisabled = cfgGrp.readEntry( "DisableInitialIndexing", false ); - - m_indexerConfig = new IndexerConfig( this ); - connect( m_indexerConfig, SIGNAL(configChanged()), this, SLOT(selfTest()) ); - - setOnline( false ); - QTimer::singleShot( 0, this, SLOT(selfTest()) ); - QTimer::singleShot( 1000, this, SLOT(checkMigration()) ); - - //mScheduler.setIndexingSpeed( mIdleDetectionDisabled ? IndexScheduler::FullSpeed : IndexScheduler::ReducedSpeed ); - - connect(&mScheduler, SIGNAL(progress(int)), SIGNAL(percent(int))); - connect(&mScheduler, SIGNAL(idle(QString)), this, SLOT(emitIdle(QString))); - connect(&mScheduler, SIGNAL(running(QString)), this, SLOT(emitRunning(QString))); - - changeRecorder()->fetchCollection( true ); - changeRecorder()->itemFetchScope().setAncestorRetrieval( ItemFetchScope::Parent ); - changeRecorder()->setAllMonitored( true ); - changeRecorder()->itemFetchScope().setCacheOnly( true ); - changeRecorder()->setChangeRecordingEnabled( false ); -} - -NepomukFeederAgent::~NepomukFeederAgent() -{ - -} - -void NepomukFeederAgent::configure( WId windowId ) -{ - Q_UNUSED( windowId ); - NepomukFeederAgentDialog dlg; - if(windowId) { -#ifndef Q_WS_WIN - KWindowSystem::setMainWindow( &dlg, windowId ); -#else - KWindowSystem::setMainWindow( &dlg, (HWND)windowId ); -#endif - } - dlg.exec(); -} - -void NepomukFeederAgent::forceReindexCollection(const qlonglong id) -{ - CollectionFetchJob *job = new CollectionFetchJob( Collection(id), Akonadi::CollectionFetchJob::Base, this ); - connect( job, SIGNAL(collectionsReceived(Akonadi::Collection::List)), SLOT(collectionsReceived(Akonadi::Collection::List))); -} - -void NepomukFeederAgent::forceReindexItem(const qlonglong id) -{ - mScheduler.addItem( Akonadi::Item(id) ); -} - -void NepomukFeederAgent::processNextNotification() -{ - //check if still running otherwise stop - if ( isOnline() ) { - changeProcessed(); - } -} - -void NepomukFeederAgent::itemAdded(const Akonadi::Item& item, const Akonadi::Collection& collection) -{ - if( !isOnline() ) - return; - - kDebug() << item.id(); - if ( indexingDisabled( collection ) ) - return processNextNotification(); - - Q_ASSERT( item.parentCollection() == collection ); - mScheduler.addItem( item ); - processNextNotification(); -} - -void NepomukFeederAgent::itemChanged(const Akonadi::Item& item, const QSet< QByteArray >& partIdentifiers) -{ - if( !isOnline() ) - return; - - QSet parts = partIdentifiers; - // Remove parts that we don't use in nepomuk, to avoid unnecessary re-indexing - // We care for FLAGS, and PLD (headers, body), possibly for modification time - QMutableSetIterator it( parts ); - while ( it.hasNext() ) { - const QByteArray part = it.next(); - if ( part == "REMOTEID" || part.startsWith( "ATR:" ) ) { - it.remove(); - } - } - // Nothing to re-index if only the flags have changed, or only the remote ID - if ( parts.isEmpty() ) - return processNextNotification(); - if ( indexingDisabled( item.parentCollection() ) ) - return processNextNotification(); - - //kDebug() << item.id() << partIdentifiers; - mScheduler.addItem( item ); - processNextNotification(); -} - -void NepomukFeederAgent::itemRemoved(const Akonadi::Item& item) -{ - if( !isOnline() ) - return; - - //kDebug() << item.url(); - mScheduler.removeItem( item ); - processNextNotification(); -} - -void NepomukFeederAgent::collectionAdded(const Akonadi::Collection& collection, const Akonadi::Collection& parent) -{ - if( !isOnline() ) - return; - Q_UNUSED( parent ); - if ( indexingDisabled( collection ) ) - return processNextNotification(); - - mScheduler.addCollection( collection ); - processNextNotification(); -} - -void NepomukFeederAgent::collectionChanged(const Akonadi::Collection& collection, const QSet< QByteArray >& partIdentifiers) -{ - if( !isOnline() ) - return; - - QSet parts = partIdentifiers; - QMutableSetIterator it( parts ); - while ( it.hasNext() ) { - const QByteArray part = it.next(); - if ( part == "REMOTEID" ) { - it.remove(); - } - } - if ( parts.isEmpty() ) - return processNextNotification(); - if ( indexingDisabled( collection ) ) - return processNextNotification(); - NepomukHelpers::addCollectionToNepomuk( collection ); - processNextNotification(); -} - -void NepomukFeederAgent::collectionRemoved(const Akonadi::Collection& collection) -{ - if( !isOnline() ) - return; - - mScheduler.removeCollection( collection ); - processNextNotification(); -} - -void NepomukFeederAgent::findUnindexed() -{ - if ( !Nepomuk2::ResourceManager::instance()->initialized() ) { - kWarning() << "Nepomuk is not ready, we can't find unindexed items"; - return; - } - - if (m_findUnindexedItemsJob) { - return; - } - - m_findUnindexedItemsJob = new FindUnindexedItemsJob(NEPOMUK_FEEDER_INDEX_COMPAT_LEVEL, this); - - connect(m_findUnindexedItemsJob, SIGNAL(result(KJob*)), this, SLOT(foundUnindexedItems(KJob*))); - m_findUnindexedItemsJob->start(); - - emit status( Running, i18n( "Calculating Emails to index" ) ); -} - -void NepomukFeederAgent::foundUnindexedItems(KJob* job) -{ - if (job->error()) { - kWarning() << "FindUnindexedItemsJob failed"; - m_findUnindexedItemsJob = 0; - return; - } - FindUnindexedItemsJob *findJob = static_cast(job); - Q_ASSERT( findJob == m_findUnindexedItemsJob ); - - mTotalItems = m_findUnindexedItemsJob->totalCount(); - mIndexedItems = findJob->indexedCount(); - const FindUnindexedItemsJob::ItemHash items = findJob->getUnindexed(); - m_findUnindexedItemsJob = 0; - - FindUnindexedItemsJob::ItemHash::const_iterator it = items.constBegin(); - for (;it != items.constEnd(); ++it) { - Akonadi::Item item( it.key() ); - item.setMimeType( it.value().second ); - mScheduler.addLowPrioItem( item ); - } - - mScheduler.removeNepomukUris( findJob->staleUris() ); -} - -void NepomukFeederAgent::updateAll() -{ - findUnindexed(); -} - -void NepomukFeederAgent::collectionsReceived(const Akonadi::Collection::List& collections) -{ - foreach ( const Collection &collection, collections ) { - mScheduler.addCollection( collection ); - } -} - -void NepomukFeederAgent::checkMigration() -{ - kDebug(); - - // Cleanup agentsrc after migration to 4.9 - AgentManager* agentManager = AgentManager::self(); - const AgentInstance::List allAgents = agentManager->instances(); - const QStringList oldFeeders = QStringList() << QLatin1String("akonadi_nepomuk_email_feeder") << QLatin1String("akonadi_nepomuk_contact_feeder") << QLatin1String("akonadi_nepomuk_calendar_feeder"); - // Cannot use agentManager->instance(oldInstanceName) here, it wouldn't find broken instances. - Q_FOREACH( const AgentInstance& inst, allAgents ) { - if ( oldFeeders.contains( inst.identifier() ) ) { - kDebug() << "Removing old nepomuk feeder" << inst.identifier(); - agentManager->removeInstance( inst ); - } - } -} - -void NepomukFeederAgent::selfTest() -{ - if( !m_indexerConfig->isEnabled() ) { - setOnline( false ); - emit status( Broken, i18n( "Email Indexing has been disabled" ) ); - return; - } - - if( !Nepomuk2::ResourceManager::instance()->initialized() ) { - setOnline( false ); - emit status( Broken, i18n( "Waiting for the Nepomuk to start" ) ); - } - else { - setOnline( true ); - emit status( Idle, i18n( "Ready to index data." ) ); - - if ( !mInitialUpdateDone ) { - mInitialUpdateDone = true; - //TODO postpone this until the computer is idle? - if ( !mInitialIndexingDisabled ) { - QTimer::singleShot( 0, this, SLOT(updateAll()) ); - } else { - kDebug() << "Initial indexing was disabled in the configuration."; - } - } - } -} - -void NepomukFeederAgent::doSetOnline(bool online) -{ - mScheduler.setOnline( online ); - - if ( online ) { - findUnindexed(); - } - else { - if( m_findUnindexedItemsJob ) { - m_findUnindexedItemsJob->kill(); - m_findUnindexedItemsJob = 0; - } - - mScheduler.clear(); - } - - Akonadi::AgentBase::doSetOnline( online ); -} - -void NepomukFeederAgent::emitIdle(const QString &string) -{ - emit status( AgentBase::Idle, string ); -} - -void NepomukFeederAgent::emitRunning(const QString &string) -{ - emit status( AgentBase::Running, string ); -} - -bool NepomukFeederAgent::queueIsEmpty() -{ - return mScheduler.isEmpty(); -} - -qlonglong NepomukFeederAgent::totalitems() const -{ - return mTotalItems; -} - -qlonglong NepomukFeederAgent::indexeditems() const -{ - return mIndexedItems; -} - -bool NepomukFeederAgent::isIndexing() const -{ - return (status() != Idle); -} - -} - -AKONADI_AGENT_MAIN( Akonadi::NepomukFeederAgent ) - - -#include "nepomukfeederagent.moc" diff -Nru kdepim-runtime-4.12.3/agents/nepomukfeeder/nepomukfeederagentdialog.cpp kdepim-runtime-4.12.90/agents/nepomukfeeder/nepomukfeederagentdialog.cpp --- kdepim-runtime-4.12.3/agents/nepomukfeeder/nepomukfeederagentdialog.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/agents/nepomukfeeder/nepomukfeederagentdialog.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,92 +0,0 @@ -/* - Copyright (c) 2012 Montel Laurent - Copyright (c) 2012 Allen Winter - - This program is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License, version 2, as - published by the Free Software Foundation. - - 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 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 "nepomukfeederagentdialog.h" - -#include -#include -#include -#include -#include -#include -#include -#include - -NepomukFeederAgentDialog::NepomukFeederAgentDialog(QWidget *parent) - :KDialog(parent) -{ - setCaption( i18n( "Configure Nepomuk Feeder Agent" ) ); - setButtons( Ok|Cancel ); - setDefaultButton( Ok ); - setModal( true ); - QWidget *mainWidget = new QWidget( this ); - QVBoxLayout *mainLayout = new QVBoxLayout( mainWidget ); - mainLayout->setSpacing( KDialog::spacingHint() ); - mainLayout->setMargin( KDialog::marginHint() ); - - mDisableIdleTimeOut = new QCheckBox(i18n("Disable Idle Timeout")); - mDisableIdleTimeOut->setEnabled( true ); - mDisableIdleTimeOut->setChecked( true ); - mainLayout->addWidget(mDisableIdleTimeOut); - - QHBoxLayout *lay = new QHBoxLayout; - QLabel *lab = new QLabel(i18n("Idle Timeout")); - lay->addWidget(lab); - - mTimeOut = new KIntNumInput; - mTimeOut->setMinimum(120); - mTimeOut->setSuffix(i18nc("define timeout in seconds", " s")); - mTimeOut->setEnabled( false ); - lay->addWidget(mTimeOut); - - mainLayout->addLayout(lay); - - setMainWidget( mainWidget ); - connect( mDisableIdleTimeOut, SIGNAL(toggled(bool)), SLOT(slotTimeoutToggle()) ); - connect( this, SIGNAL(okClicked()), SLOT(slotSave()) ); - readConfig(); -} - -NepomukFeederAgentDialog::~NepomukFeederAgentDialog() -{ - -} - -void NepomukFeederAgentDialog::slotSave() -{ - KConfigGroup grp( KGlobal::config(), QLatin1String("akonadi_nepomuk_feeder") ); - grp.writeEntry( "IdleTimeout", mTimeOut->value() ); - grp.writeEntry( "DisableIdleDetection", mDisableIdleTimeOut->isChecked() ); - grp.sync(); -} - -void NepomukFeederAgentDialog::readConfig() -{ - KConfigGroup grp( KGlobal::config(), QLatin1String("akonadi_nepomuk_feeder") ); - mDisableIdleTimeOut->setChecked(grp.readEntry( "DisableIdleDetection", true )); - mTimeOut->setValue(grp.readEntry( "IdleTimeout", 120 )); - mTimeOut->setEnabled( !mDisableIdleTimeOut->isChecked() ); -} - -void NepomukFeederAgentDialog::slotTimeoutToggle() -{ - mTimeOut->setEnabled( !mDisableIdleTimeOut->isChecked() ); - -} - -#include "nepomukfeederagentdialog.moc" diff -Nru kdepim-runtime-4.12.3/agents/nepomukfeeder/nepomukfeederagentdialog.h kdepim-runtime-4.12.90/agents/nepomukfeeder/nepomukfeederagentdialog.h --- kdepim-runtime-4.12.3/agents/nepomukfeeder/nepomukfeederagentdialog.h 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/agents/nepomukfeeder/nepomukfeederagentdialog.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,43 +0,0 @@ -/* - Copyright (c) 2012 Montel Laurent - - This program is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License, version 2, as - published by the Free Software Foundation. - - 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 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 NEPOMUKFEEDERAGENTDIALOG_H -#define NEPOMUKFEEDERAGENTDIALOG_H - -#include - -class QCheckBox; -class KIntNumInput; - -class NepomukFeederAgentDialog : public KDialog -{ - Q_OBJECT -public: - explicit NepomukFeederAgentDialog(QWidget *parent = 0); - ~NepomukFeederAgentDialog(); - -public Q_SLOTS: - void slotSave(); - void slotTimeoutToggle(); - -private: - void readConfig(); - QCheckBox *mDisableIdleTimeOut; - KIntNumInput *mTimeOut; -}; - -#endif // NEPOMUKFEEDERAGENTDIALOG_H diff -Nru kdepim-runtime-4.12.3/agents/nepomukfeeder/nepomukfeederagent.h kdepim-runtime-4.12.90/agents/nepomukfeeder/nepomukfeederagent.h --- kdepim-runtime-4.12.3/agents/nepomukfeeder/nepomukfeederagent.h 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/agents/nepomukfeeder/nepomukfeederagent.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,116 +0,0 @@ -/* - Copyright (c) 2007 Tobias Koenig - 2008 Sebastian Trueg - 2009 Volker Krause - 2011 Christian Mollekopf - - 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 NEPOMUKFEEDERAGENT_H -#define NEPOMUKFEEDERAGENT_H - -#include -#include -#include - -#include -#include "indexscheduler.h" -#include "indexerconfig.h" - -class FeederPluginloader; -class FindUnindexedItemsJob; -class KJob; - -namespace Akonadi -{ - class Item; - class ItemFetchScope; - - -/** - * The main feeder class which listens for changes and sends them - * to the scheduler. - * - * Reindexing: - * Increasing the mIndexCompatLevel, issues a reindexing. - */ -class NepomukFeederAgent : public Akonadi::AgentBase, public Akonadi::AgentBase::ObserverV2 -{ - Q_OBJECT - - public: - explicit NepomukFeederAgent(const QString& id); - ~NepomukFeederAgent(); - - void forceReindexCollection(const qlonglong id); - - void forceReindexItem(const qlonglong id); - - bool queueIsEmpty(); - - qlonglong totalitems() const; - qlonglong indexeditems() const; - bool isIndexing() const; - public slots: - /** Trigger a complete update of all items. */ - void updateAll(); - - signals: - void fullyIndexed(); - - protected: - void itemAdded( const Akonadi::Item &item, const Akonadi::Collection &collection ); - void itemChanged( const Akonadi::Item &item, const QSet &partIdentifiers ); - void itemRemoved(const Akonadi::Item &item); - - void collectionAdded(const Akonadi::Collection& collection, const Akonadi::Collection& parent); - void collectionChanged(const Akonadi::Collection& collection, const QSet< QByteArray >& partIdentifiers); - using AgentBase::ObserverV2::collectionChanged; - void collectionRemoved(const Akonadi::Collection& collection); - - void doSetOnline(bool online); - - private: - void processNextNotification(); - void findUnindexed(); - - private slots: - void selfTest(); - void checkMigration(); - void collectionsReceived( const Akonadi::Collection::List &collections ); - void configure( WId windowId ); - void foundUnindexedItems(KJob *job); - - void emitIdle(const QString&); - void emitRunning(const QString&); - private: - bool mInitialUpdateDone; - bool mInitialIndexingDisabled; - - IndexScheduler mScheduler; - - qlonglong mTotalItems; - qlonglong mIndexedItems; - - IndexerConfig* m_indexerConfig; - - FindUnindexedItemsJob* m_findUnindexedItemsJob; -}; - -} - -#endif diff -Nru kdepim-runtime-4.12.3/agents/nepomukfeeder/nepomukfeeder-config.h.cmake kdepim-runtime-4.12.90/agents/nepomukfeeder/nepomukfeeder-config.h.cmake --- kdepim-runtime-4.12.3/agents/nepomukfeeder/nepomukfeeder-config.h.cmake 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/agents/nepomukfeeder/nepomukfeeder-config.h.cmake 1970-01-01 00:00:00.000000000 +0000 @@ -1,33 +0,0 @@ -/* - This file is part of the Nepomuk KDE project. - Copyright (C) 2012 Sebastian Trueg - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) version 3, or any - later version accepted by the membership of KDE e.V. (or its - successor approved by the membership of KDE e.V.), which shall - act as a proxy defined in Section 6 of version 3 of the license. - - 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 - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library. If not, see . -*/ - -#ifndef NEPOMUK_FEEDER_CONFIG_H -#define NEPOMUK_FEEDER_CONFIG_H - -#define NEPOMUK_FEEDER_INDEX_COMPAT_LEVEL ${CMAKE_NEPOMUK_FEEDER_INDEX_COMPAT_LEVEL} - -/* Define to 1 if you have malloc.h */ -#cmakedefine HAVE_MALLOC_H 1 - -/* malloc_trim presence */ -#cmakedefine HAVE_MALLOC_TRIM 1 - -#endif diff -Nru kdepim-runtime-4.12.3/agents/nepomukfeeder/nepomukhelpers.cpp kdepim-runtime-4.12.90/agents/nepomukfeeder/nepomukhelpers.cpp --- kdepim-runtime-4.12.3/agents/nepomukfeeder/nepomukhelpers.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/agents/nepomukfeeder/nepomukhelpers.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,196 +0,0 @@ -/* - Copyright (C) 2011 Christian Mollekopf - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 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 General Public License - along with this program. If not, see . -*/ - -#include "nepomukhelpers.h" - -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include - -#include - -#include - -#include -#include - -#include "pluginloader.h" -#include "nepomukfeeder-config.h" - -using namespace Nepomuk2::Vocabulary; -using namespace Vocabulary; - -namespace NepomukHelpers { - -/** Set the parent collection of the entity @param entity */ -void setParentCollection( const Akonadi::Entity &entity, Nepomuk2::SimpleResource& res, Nepomuk2::SimpleResourceGraph& graph ) -{ - if ( entity.parentCollection().isValid() && entity.parentCollection() != Akonadi::Collection::root() ) { - Nepomuk2::SimpleResource parentResource( entity.parentCollection().url() ); - parentResource.setTypes( QList () << Vocabulary::ANEO::AkonadiDataObject() << NIE::InformationElement() ); - graph << parentResource; //To use the nie::isPartOf relation both parent and child must be in the graph - res.setProperty( NIE::isPartOf(), parentResource ); - } -} - - -KJob *addCollectionToNepomuk( const Akonadi::Collection &collection) -{ - //kDebug() << collection.url(); - Nepomuk2::SimpleResourceGraph graph; - Nepomuk2::SimpleResource res; - res.setTypes( QList () << Vocabulary::ANEO::AkonadiDataObject() << NIE::InformationElement() ); - res.setProperty( NIE::url(), collection.url() ); - res.setProperty( ANEO::akonadiIndexCompatLevel(), NEPOMUK_FEEDER_INDEX_COMPAT_LEVEL ); - setParentCollection( collection, res, graph ); - - const Akonadi::EntityDisplayAttribute *attr = collection.attribute(); - - res.setProperty( Soprano::Vocabulary::NAO::prefLabel(), collection.displayName() ); - - if ( attr && !attr->iconName().isEmpty() ) - NepomukFeederUtils::setIcon( attr->iconName(), res, graph ); - - foreach ( const QString &type, collection.contentMimeTypes() ) { - //QSharedPointer plugin = FeederPluginloader::instance().feederPluginForMimeType( type ); - foreach ( const QSharedPointer &plugin , FeederPluginloader::instance().feederPluginsForMimeType( type ) ) { - plugin->updateCollection( collection, res, graph ); //FIXME create one resource for each feeder, nepomuk will merge if possible - } - } - - graph.insert( res ); - /*kDebug() << "--------------------------------"; - foreach ( const Nepomuk::SimpleResource &res, graph.toList() ) { - kDebug() << res.property( Soprano::Vocabulary::RDF::type() ); - } - kDebug() << "--------------------------------";*/ - QHash additionalMetadata; - additionalMetadata.insert( Soprano::Vocabulary::RDF::type(), Soprano::Vocabulary::NRL::DiscardableInstanceBase() ); - //We overwrite properties, as the resource is not removed on update, and there are not subproperties on collections (if there were, we would remove them first too) - return Nepomuk2::storeResources( graph, Nepomuk2::IdentifyNew, Nepomuk2::OverwriteProperties, additionalMetadata, KGlobal::mainComponent() ); -} - -void addItemToGraph( const Akonadi::Item &item, Nepomuk2::SimpleResourceGraph &graph ) -{ - //kDebug() << item.url(); - Nepomuk2::SimpleResource res; - res.setTypes( QList () << Vocabulary::ANEO::AkonadiDataObject() << NIE::InformationElement() ); - res.setProperty( NIE::url(), QUrl( item.url() ) ); - res.setProperty( NIE::lastModified(), item.modificationTime() ); - res.setProperty( Vocabulary::ANEO::akonadiIndexCompatLevel(), NEPOMUK_FEEDER_INDEX_COMPAT_LEVEL ); - Q_ASSERT( res.property( NIE::url() ).first().toUrl() == QUrl( item.url() ) ); - res.setProperty( Vocabulary::ANEO::akonadiItemId(), QString::number( item.id() ) ); - setParentCollection( item, res, graph ); - foreach ( const QSharedPointer &plugin , FeederPluginloader::instance().feederPluginsForMimeType( item.mimeType() ) ) { - plugin->updateItem( item, res, graph ); - } - graph << res; -} - -/** Saves the graph, and marks the data as discardable. Use this function to store data created by the feeder */ -KJob *addGraphToNepomuk( const Nepomuk2::SimpleResourceGraph &graph ) -{ - /*kDebug() << "--------------------------------"; - foreach ( const Nepomuk2::SimpleResource &res, graph.toList() ) { - if ( res.contains( NIE::url() ) ) { - Q_ASSERT( res.property( NIE::url() ).size() == 1 ); - kDebug() << res.property( NIE::url() ).first().toUrl(); - kDebug() << res.property( Soprano::Vocabulary::NAO::prefLabel() ); - } - } - kDebug() << "--------------------------------";*/ - QHash additionalMetadata; - additionalMetadata.insert( Soprano::Vocabulary::RDF::type(), Soprano::Vocabulary::NRL::DiscardableInstanceBase() ); - return Nepomuk2::storeResources( graph, Nepomuk2::IdentifyNew, Nepomuk2::MergeDuplicateResources, additionalMetadata, KGlobal::mainComponent() ); -} - -bool isIndexed(const Akonadi::Item& item) -{ - // we check if the item already exists with the following values: - // - nie:url needs to be set - // - aneo:akonadiItemId needs to be set - // - nie:lastModified needs to match the item's modification time - // - aneo:akonadiIndexCompatLevel needs to match the indexer's level - return Nepomuk2::ResourceManager::instance()->mainModel()->executeQuery( QString::fromLatin1( "ask where { ?r %1 %2 ; %3 %4 ; %5 %6 ; %7 %8 . }" ) - .arg( Soprano::Node::resourceToN3( NIE::url() ), - Soprano::Node::resourceToN3( item.url() ), - Soprano::Node::resourceToN3( Vocabulary::ANEO::akonadiItemId() ), - Soprano::Node::literalToN3( QString::number( item.id() ) ), - Soprano::Node::resourceToN3( NIE::lastModified() ), - Soprano::Node::literalToN3( item.modificationTime() ), - Soprano::Node::resourceToN3( Vocabulary::ANEO::akonadiIndexCompatLevel() ), - Soprano::Node::literalToN3( NEPOMUK_FEEDER_INDEX_COMPAT_LEVEL ) ), - Soprano::Query::QueryLanguageSparql ).boolValue(); -} - -bool isIndexed(const Akonadi::Collection& collection) -{ - // we check if the collection already has been indexed with the following values - // - nie:url needs to be set - // - aneo:akonadiIndexCompatLevel needs to match the indexer's level - return Nepomuk2::ResourceManager::instance()->mainModel()->executeQuery( QString::fromLatin1( "ask where { ?r %1 %2 ; %3 %4 . }" ) - .arg( Soprano::Node::resourceToN3( NIE::url() ), - Soprano::Node::resourceToN3( collection.url() ), - Soprano::Node::resourceToN3( Vocabulary::ANEO::akonadiIndexCompatLevel() ), - Soprano::Node::literalToN3( NEPOMUK_FEEDER_INDEX_COMPAT_LEVEL ) ), - Soprano::Query::QueryLanguageSparql ).boolValue(); -} - -} - -bool indexingDisabled(const Akonadi::Collection& collection) -{ - if ( collection.hasAttribute() ) - return true; - - Akonadi::IndexPolicyAttribute *indexPolicy = collection.attribute(); - if ( indexPolicy && !indexPolicy->indexingEnabled() ) - return true; - - if ( collection.isVirtual() ) - return true; - - // check if we have a plugin for the stuff in this collection - foreach ( const QString &mimeType, collection.contentMimeTypes() ) { - if ( mimeType == Akonadi::Collection::mimeType() ) - continue; - if ( !FeederPluginloader::instance().feederPluginsForMimeType( mimeType ).isEmpty() ) - return false; - } - - return true; -} - - diff -Nru kdepim-runtime-4.12.3/agents/nepomukfeeder/nepomukhelpers.h kdepim-runtime-4.12.90/agents/nepomukfeeder/nepomukhelpers.h --- kdepim-runtime-4.12.3/agents/nepomukfeeder/nepomukhelpers.h 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/agents/nepomukfeeder/nepomukhelpers.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,50 +0,0 @@ -/* - Copyright (C) 2011 Christian Mollekopf - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 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 General Public License - along with this program. If not, see . -*/ -#ifndef NEPOMUKHELPERS_H -#define NEPOMUKHELPERS_H - -namespace Nepomuk2 { -class SimpleResourceGraph; -class SimpleResource; -} - -namespace Akonadi { -class Collection; -class Item; -class Entity; -} - -class KJob; - -namespace NepomukHelpers { - -/** Set the parent collection of the entity @param entity */ -void setParentCollection( const Akonadi::Entity &entity, Nepomuk2::SimpleResource& res, Nepomuk2::SimpleResourceGraph& graph ); - -KJob *addCollectionToNepomuk( const Akonadi::Collection &collection); -void addItemToGraph( const Akonadi::Item &item, Nepomuk2::SimpleResourceGraph &graph ); - -/** Saves the graph, and marks the data as discardable. Use this function to store data created by the feeder */ -KJob *addGraphToNepomuk( const Nepomuk2::SimpleResourceGraph &graph ); - -bool isIndexed(const Akonadi::Item &item); -bool isIndexed(const Akonadi::Collection &item); -} - -bool indexingDisabled(const Akonadi::Collection &collection); - -#endif diff -Nru kdepim-runtime-4.12.3/agents/nepomukfeeder/org.freedesktop.Akonadi.NepomukFeeder.xml kdepim-runtime-4.12.90/agents/nepomukfeeder/org.freedesktop.Akonadi.NepomukFeeder.xml --- kdepim-runtime-4.12.3/agents/nepomukfeeder/org.freedesktop.Akonadi.NepomukFeeder.xml 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/agents/nepomukfeeder/org.freedesktop.Akonadi.NepomukFeeder.xml 1970-01-01 00:00:00.000000000 +0000 @@ -1,24 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - diff -Nru kdepim-runtime-4.12.3/agents/nepomukfeeder/plugin/CMakeLists.txt kdepim-runtime-4.12.90/agents/nepomukfeeder/plugin/CMakeLists.txt --- kdepim-runtime-4.12.3/agents/nepomukfeeder/plugin/CMakeLists.txt 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/agents/nepomukfeeder/plugin/CMakeLists.txt 1970-01-01 00:00:00.000000000 +0000 @@ -1,16 +0,0 @@ - -set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${KDE4_ENABLE_EXCEPTIONS}" ) - -kde4_add_library(nepomukfeederpluginlib STATIC nepomukfeederplugin.cpp nepomukfeederutils.cpp) -target_link_libraries(nepomukfeederpluginlib - ${KDE4_KDECORE_LIBS} - ${KDEPIMLIBS_AKONADI_LIBS} - ${QT_QTCORE_LIBRARY} - niefast -) - -########### install files ############### - -install(TARGETS nepomukfeederpluginlib - DESTINATION ${LIB_INSTALL_DIR}) - diff -Nru kdepim-runtime-4.12.3/agents/nepomukfeeder/plugin/nepomukfeederplugin.cpp kdepim-runtime-4.12.90/agents/nepomukfeeder/plugin/nepomukfeederplugin.cpp --- kdepim-runtime-4.12.3/agents/nepomukfeeder/plugin/nepomukfeederplugin.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/agents/nepomukfeeder/plugin/nepomukfeederplugin.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,23 +0,0 @@ -/* - Copyright (C) 2011 Christian Mollekopf - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) version 3, or any - later version accepted by the membership of KDE e.V. (or its - successor approved by the membership of KDE e.V.), which shall - act as a proxy defined in Section 6 of version 3 of the license. - - 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 - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library. If not, see . -*/ -#include "nepomukfeederplugin.h" - -#include "nepomukfeederplugin.moc" - diff -Nru kdepim-runtime-4.12.3/agents/nepomukfeeder/plugin/nepomukfeederplugin.h kdepim-runtime-4.12.90/agents/nepomukfeeder/plugin/nepomukfeederplugin.h --- kdepim-runtime-4.12.3/agents/nepomukfeeder/plugin/nepomukfeederplugin.h 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/agents/nepomukfeeder/plugin/nepomukfeederplugin.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,64 +0,0 @@ -/* - Copyright (C) 2011 Christian Mollekopf - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) version 3, or any - later version accepted by the membership of KDE e.V. (or its - successor approved by the membership of KDE e.V.), which shall - act as a proxy defined in Section 6 of version 3 of the license. - - 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 - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library. If not, see . -*/ - -#ifndef AKONADI_NEPOMUKFEEDERPLUGIN_H -#define AKONADI_NEPOMUKFEEDERPLUGIN_H - -#include - -#include -#include - -#include -#include - -namespace Akonadi { - -class NepomukFeederPlugin: public QObject -{ - Q_OBJECT - public: - explicit NepomukFeederPlugin(QObject* parent = 0): QObject(parent){} - virtual ~NepomukFeederPlugin() {} - /** Reimplement to do the actual work. - * - * It is only necessary to add the attributes to @param res, - * the storing of the resource will happen automatically. - * If additional resources are needed, the can be added to @param graph. - * Additionally created resources are only removed on removal of the item if they are subresources of the @param res. - * Properties are not removed on an update, but only overwritten. In case you need to remove properties after an update, - * you have to remove the affected properties yourself during each update. - * - * It is not necessary for the reimplementation to add @param res to @param graph, nor to store @param graph. - */ - virtual void updateItem( const Akonadi::Item &item, Nepomuk2::SimpleResource &res, Nepomuk2::SimpleResourceGraph &graph ) = 0; - /** - * Sets the label and icon from the EntityDisplayAttribute. - * - * Collections are not supposed to have subresources, so they would not be removed on an update. - */ - virtual void updateCollection( const Akonadi::Collection &collection, Nepomuk2::SimpleResource &res, Nepomuk2::SimpleResourceGraph &graph ){ Q_UNUSED( collection ); Q_UNUSED( res ); Q_UNUSED( graph ) } -}; - -} - -Q_DECLARE_INTERFACE( Akonadi::NepomukFeederPlugin, "org.freedesktop.Akonadi.NepomukFeederPlugin/1.0" ) - -#endif diff -Nru kdepim-runtime-4.12.3/agents/nepomukfeeder/plugin/nepomukfeederutils.cpp kdepim-runtime-4.12.90/agents/nepomukfeeder/plugin/nepomukfeederutils.cpp --- kdepim-runtime-4.12.3/agents/nepomukfeeder/plugin/nepomukfeederutils.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/agents/nepomukfeeder/plugin/nepomukfeederutils.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,114 +0,0 @@ -/* - Copyright (C) 2011 Christian Mollekopf - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) version 3, or any - later version accepted by the membership of KDE e.V. (or its - successor approved by the membership of KDE e.V.), which shall - act as a proxy defined in Section 6 of version 3 of the license. - - 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 - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library. If not, see . -*/ - -#include "nepomukfeederutils.h" - -#include -#include - -#include -#include -#include -#include -#include - -#include -#include -#include - -#include - - -namespace NepomukFeederUtils -{ - -void tagsFromCategories(const QStringList& categories, Nepomuk2::SimpleResource& res, Nepomuk2::SimpleResourceGraph& graph) -{ - foreach ( const QString &category, categories ) { - addTag( res, graph, category ); - } -} - -void setIcon(const QString& iconName, Nepomuk2::SimpleResource& res, Nepomuk2::SimpleResourceGraph& graph) -{ - Nepomuk2::SimpleResource iconRes; - Nepomuk2::NAO::FreeDesktopIcon icon( &iconRes ); - icon.setIconNames( QStringList() << iconName ); - graph << iconRes; - res.setProperty( Soprano::Vocabulary::NAO::prefSymbol(), iconRes.uri() ); -} - -Nepomuk2::SimpleResource addTag( Nepomuk2::SimpleResource& res, Nepomuk2::SimpleResourceGraph& graph, const QString& identifier, const QString &prefLabel ) -{ - Nepomuk2::SimpleResource tagResource; - Nepomuk2::NAO::Tag tag( &tagResource ); - tagResource.addProperty( Soprano::Vocabulary::NAO::identifier(), identifier ); - if ( !prefLabel.isEmpty() ) { - tag.setPrefLabel( prefLabel ); - } else { - tag.setPrefLabel( identifier ); - } - graph << tagResource; - res.addProperty( Soprano::Vocabulary::NAO::hasTag(), tagResource.uri() ); - return tagResource; -} - - -Nepomuk2::SimpleResource addContact( const QString &emailAddress, const QString &name, Nepomuk2::SimpleResourceGraph &graph ) -{ - Nepomuk2::SimpleResource contactRes; - Nepomuk2::NCO::Contact contact( &contactRes ); - contactRes.setProperty( Soprano::Vocabulary::NAO::prefLabel(), name.isEmpty() ? emailAddress : name ); - if ( !emailAddress.isEmpty() ) { - Nepomuk2::SimpleResource emailRes; - Nepomuk2::NCO::EmailAddress email( &emailRes ); - email.setEmailAddress( emailAddress.toLower() ); - graph << emailRes; - contact.addHasEmailAddress( emailRes.uri() ); - } - if ( !name.isEmpty() ) - contact.setFullname( name ); - - graph << contactRes; - return contactRes; -} - -void indexData(const KUrl& url, const QByteArray& data, const QDateTime& mtime) -{ - KProcess proc; - proc.setOutputChannelMode( KProcess::ForwardedChannels ); - proc.setProgram( QLatin1String("nepomukindexer") ); - proc << QLatin1String("--uri") << QLatin1String(url.url().toLocal8Bit()); - proc << QLatin1String("--mtime") << QString::number( mtime.toTime_t() ); - proc.start(); - if ( proc.waitForStarted() ) { - proc.write( data ); - proc.waitForBytesWritten(); - proc.closeWriteChannel(); - } else { - kDebug() << "Failed to launch nepomukindexer: " << proc.errorString(); - } - proc.waitForFinished(); - if ( !proc.exitStatus() == QProcess::NormalExit ) { - kDebug() << proc.exitCode() << proc.errorString(); - } -} - -} diff -Nru kdepim-runtime-4.12.3/agents/nepomukfeeder/plugin/nepomukfeederutils.h kdepim-runtime-4.12.90/agents/nepomukfeeder/plugin/nepomukfeederutils.h --- kdepim-runtime-4.12.3/agents/nepomukfeeder/plugin/nepomukfeederutils.h 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/agents/nepomukfeeder/plugin/nepomukfeederutils.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,52 +0,0 @@ -/* - Copyright (C) 2011 Christian Mollekopf - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) version 3, or any - later version accepted by the membership of KDE e.V. (or its - successor approved by the membership of KDE e.V.), which shall - act as a proxy defined in Section 6 of version 3 of the license. - - 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 - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library. If not, see . -*/ - -#ifndef NEPOMUKFEEDERUTILS_H -#define NEPOMUKFEEDERUTILS_H - -#include - -namespace Nepomuk2 -{ - class SimpleResourceGraph; -} -class KUrl; -class QString; -class QStringList; - -/** - * A namespace for various helper functions - */ -namespace NepomukFeederUtils -{ - /** Adds tags to @p resource based on the given string list*/ - void tagsFromCategories(const QStringList& categories, Nepomuk2::SimpleResource& res, Nepomuk2::SimpleResourceGraph& graph); - void setIcon(const QString& iconName, Nepomuk2::SimpleResource& res, Nepomuk2::SimpleResourceGraph& graph); - Nepomuk2::SimpleResource addTag(Nepomuk2::SimpleResource& res, Nepomuk2::SimpleResourceGraph& graph, const QString& identifier, const QString &label = QString() ); - /** Creates a PersonContact object for the given name and address, - * adds it to @param graph and returns it's url. - */ - Nepomuk2::SimpleResource addContact( const QString &email, const QString &name, Nepomuk2::SimpleResourceGraph &graph ); - - /** Indexes the given QByteArray using Strigi. Use for e.g. attachments of types that you can't handle yourself. */ - void indexData( const KUrl &uri, const QByteArray &data, const QDateTime &mtime ); -} - -#endif // NEPOMUKFEEDERUTILS_H diff -Nru kdepim-runtime-4.12.3/agents/nepomukfeeder/pluginloader.cpp kdepim-runtime-4.12.90/agents/nepomukfeeder/pluginloader.cpp --- kdepim-runtime-4.12.3/agents/nepomukfeeder/pluginloader.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/agents/nepomukfeeder/pluginloader.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,55 +0,0 @@ -/* - Copyright (C) 2011 Christian Mollekopf - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 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 General Public License - along with this program. If not, see . -*/ - - -#include "pluginloader.h" -#include "plugins/nepomuknotefeeder.h" - - -QList< QSharedPointer< Akonadi::NepomukFeederPlugin > > FeederPluginloader::feederPluginsForMimeType(const QString& mimetype) -{ - //kDebug() << mimetype; - if ( m_plugins.contains( mimetype ) ) { - //kDebug() << "cached plugin found"; - return m_plugins.values( mimetype ); - } else if ( m_noPluginList.contains( mimetype ) ) { - //kDebug() << "No feeder for type " << mimetype << " found"; - return QList< QSharedPointer< Akonadi::NepomukFeederPlugin > >(); - } - - KService::List lst = KMimeTypeTrader::self()->query( mimetype, QString::fromLatin1( "AkonadiNepomukFeeder" ) ); - if ( lst.isEmpty() ) { - kWarning() << "No feeder for type " << mimetype << " found"; - m_noPluginList.append( mimetype ); - return QList< QSharedPointer< Akonadi::NepomukFeederPlugin > >(); - } - QList< QSharedPointer< Akonadi::NepomukFeederPlugin > > pluginList; - foreach ( KService::Ptr ptr, lst ) {; - QString error; - QSharedPointer plugin( ptr->createInstance( 0, QVariantList(), &error ) ); - if ( plugin.isNull() ) { - kWarning() << "could not create " << error; - continue; - } - m_plugins.insertMulti( mimetype, plugin ); - pluginList << plugin; - kDebug() << "created new plugin"; - } - return pluginList; -} - - diff -Nru kdepim-runtime-4.12.3/agents/nepomukfeeder/pluginloader.h kdepim-runtime-4.12.90/agents/nepomukfeeder/pluginloader.h --- kdepim-runtime-4.12.3/agents/nepomukfeeder/pluginloader.h 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/agents/nepomukfeeder/pluginloader.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,49 +0,0 @@ -/* - Copyright (C) 2011 Christian Mollekopf - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 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 General Public License - along with this program. If not, see . -*/ - - -#ifndef PLUGINLOADER_H -#define PLUGINLOADER_H -#include -#include -#include -#include - -#include - -//Cache/Find plugins -class FeederPluginloader -{ -private: - FeederPluginloader(){}; - explicit FeederPluginloader(FeederPluginloader const&); // Don't Implement - void operator=(FeederPluginloader const&); // Don't implement -public: - static FeederPluginloader &instance() - { - static FeederPluginloader inst; - return inst; - } - - QList < QSharedPointer > feederPluginsForMimeType( const QString &mimetype ); - -private: - QHash > m_plugins; - QStringList m_noPluginList; -}; - -#endif // PLUGINLOADER_H diff -Nru kdepim-runtime-4.12.3/agents/nepomukfeeder/plugins/CMakeLists.txt kdepim-runtime-4.12.90/agents/nepomukfeeder/plugins/CMakeLists.txt --- kdepim-runtime-4.12.3/agents/nepomukfeeder/plugins/CMakeLists.txt 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/agents/nepomukfeeder/plugins/CMakeLists.txt 1970-01-01 00:00:00.000000000 +0000 @@ -1,73 +0,0 @@ - -include_directories( - ../ -) - -set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${KDE4_ENABLE_EXCEPTIONS}" ) - -kde4_add_plugin( akonadi_nepomuk_note_feeder nepomuknotefeeder.cpp ) -target_link_libraries( akonadi_nepomuk_note_feeder - ${NEPOMUKFEEDER_SHARED_LIBS} - ${KDEPIMLIBS_AKONADI_KMIME_LIBS} - nepomukfeederpluginlib - akonadi-notes -) - -install( - FILES nepomuknotefeeder.desktop - DESTINATION ${SERVICES_INSTALL_DIR}) - -install( - TARGETS akonadi_nepomuk_note_feeder - DESTINATION ${PLUGIN_INSTALL_DIR}) - -kde4_add_plugin( akonadi_nepomuk_calendar_feeder nepomukcalendarfeeder.cpp ) -target_link_libraries( akonadi_nepomuk_calendar_feeder - ${NEPOMUKFEEDER_SHARED_LIBS} - nepomukfeederpluginlib - ${KDEPIMLIBS_KCALCORE_LIBS} -) - -install( - FILES nepomukcalendarfeeder.desktop - DESTINATION ${SERVICES_INSTALL_DIR}) - -install( - TARGETS akonadi_nepomuk_calendar_feeder - DESTINATION ${PLUGIN_INSTALL_DIR}) - -kde4_add_plugin( akonadi_nepomuk_contact_feeder nepomukcontactfeeder.cpp ) -target_link_libraries( akonadi_nepomuk_contact_feeder - ${NEPOMUKFEEDER_SHARED_LIBS} - ${KDEPIMLIBS_KABC_LIBS} - nepomukfeederpluginlib -) - -install( - FILES nepomukcontactfeeder.desktop - DESTINATION ${SERVICES_INSTALL_DIR}) - -install( - TARGETS akonadi_nepomuk_contact_feeder - DESTINATION ${PLUGIN_INSTALL_DIR}) - -kde4_add_plugin( akonadi_nepomuk_email_feeder nepomukmailfeeder.cpp ) -target_link_libraries( akonadi_nepomuk_email_feeder - ${NEPOMUKFEEDER_SHARED_LIBS} - ${KDEPIMLIBS_KCALCORE_LIBS} - ${KDEPIMLIBS_AKONADI_LIBS} - ${KDEPIMLIBS_AKONADI_KMIME_LIBS} - ${KDEPIMLIBS_KMIME_LIBS} - nepomukfeederpluginlib -) - -install( - FILES nepomukmailfeeder.desktop - DESTINATION ${SERVICES_INSTALL_DIR}) - -install( - TARGETS akonadi_nepomuk_email_feeder - DESTINATION ${PLUGIN_INSTALL_DIR}) - - - diff -Nru kdepim-runtime-4.12.3/agents/nepomukfeeder/plugins/nepomukcalendarfeeder.cpp kdepim-runtime-4.12.90/agents/nepomukfeeder/plugins/nepomukcalendarfeeder.cpp --- kdepim-runtime-4.12.3/agents/nepomukfeeder/plugins/nepomukcalendarfeeder.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/agents/nepomukfeeder/plugins/nepomukcalendarfeeder.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,173 +0,0 @@ -/* - Copyright (c) 2009 Tobias Koenig - 2011 Christian Mollekopf - - 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 "nepomukcalendarfeeder.h" - -#include - -// ontology includes -#include -#include -#include - -#include - -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include - -using namespace Nepomuk2; - - -namespace Akonadi { - -void NepomukCalendarFeeder::updateItem(const Akonadi::Item& item, Nepomuk2::SimpleResource& res, Nepomuk2::SimpleResourceGraph& graph) -{ - //kDebug() << item.id(); - if ( item.hasPayload() ) { - updateEventItem( item, item.payload(), res, graph ); - } else if ( item.hasPayload() ) { - updateJournalItem( item, item.payload(), res, graph ); - } else if ( item.hasPayload() ) { - updateTodoItem( item, item.payload(), res, graph ); - } else { - kWarning() << "Got item without known payload. Mimetype:" << item.mimeType() - << "Id:" << item.id(); - } -} - -void NepomukCalendarFeeder::updateIncidenceItem( const KCalCore::Incidence::Ptr &calInc, Nepomuk2::SimpleResource &res, Nepomuk2::SimpleResourceGraph &graph ) -{ - res.setProperty( Soprano::Vocabulary::NAO::prefLabel(), calInc->summary() ); - res.setProperty( Vocabulary::NCAL::summary(), calInc->summary() ); - res.setProperty( Vocabulary::NIE::title(), calInc->summary() ); - if ( !calInc->location().isEmpty() ) - res.setProperty( Vocabulary::NCAL::location(), calInc->location() ); - if ( !calInc->description().isEmpty() ) { - res.setProperty( Vocabulary::NCAL::description(), calInc->description() ); - res.setProperty( Vocabulary::NIE::plainTextContent(), calInc->description() ); - } - - res.setProperty( Vocabulary::NCAL::uid(), calInc->uid() ); - - NepomukFeederUtils::tagsFromCategories( calInc->categories(), res, graph ); -} - -void NepomukCalendarFeeder::updateEventItem( const Akonadi::Item &item, const KCalCore::Event::Ptr &calEvent, Nepomuk2::SimpleResource &res, Nepomuk2::SimpleResourceGraph &graph ) -{ - Q_UNUSED( item ); - // create event with the graph reference - Nepomuk2::NCAL::Event event( &res ); - //the wrapper class doesn't set the type if no memberfunction is called - res.addType( Vocabulary::NCAL::Event() ); - //NepomukFeederUtils::setIcon( "view-pim-calendar", res, graph ); //Disable Icon until we know how to properly set them - updateIncidenceItem( calEvent, res, graph ); - - QUrl uri; - switch ( calEvent->status() ) { - case KCalCore::Incidence::StatusCanceled: - uri = Vocabulary::NCAL::cancelledEventStatus(); - break; - case KCalCore::Incidence::StatusConfirmed: - uri = Vocabulary::NCAL::confirmedStatus(); - break; - case KCalCore::Incidence::StatusTentative: - uri = Vocabulary::NCAL::tentativeStatus(); - break; - default: // other states are not available in the ontology - break; - } - - if ( !uri.isEmpty() ) { - event.setEventStatus( uri ); - } - - foreach ( const KCalCore::Attendee::Ptr &calAttendee, calEvent->attendees() ) { - QUrl contactUri = NepomukFeederUtils::addContact( calAttendee->email(), calAttendee->name(), graph ).uri(); - Nepomuk2::SimpleResource attendeeResource; - Nepomuk2::NCAL::Attendee attendee( &attendeeResource ); - attendee.addInvolvedContact( contactUri ); - - uri.clear(); - switch( calAttendee->status() ) { - case KCalCore::Attendee::NeedsAction: - uri = Vocabulary::NCAL::needsActionParticipationStatus(); - break; - case KCalCore::Attendee::Accepted: - uri = Vocabulary::NCAL::acceptedParticipationStatus(); - break; - case KCalCore::Attendee::Declined: - uri = Vocabulary::NCAL::declinedParticipationStatus(); - break; - case KCalCore::Attendee::Tentative: - uri = Vocabulary::NCAL::tentativeParticipationStatus(); - break; - case KCalCore::Attendee::Delegated: - uri = Vocabulary::NCAL::delegatedParticipationStatus(); - break; - default: // other states are not available in the ontology - break; - } - - if ( !uri.isEmpty() ) { - attendee.addPartstat( uri ); - } - graph << attendeeResource; - - event.addAttendee( attendeeResource.uri() ); //FIXME is this correct? - } -} - -void NepomukCalendarFeeder::updateJournalItem( const Akonadi::Item &item, const KCalCore::Journal::Ptr &calJournal, Nepomuk2::SimpleResource &res, Nepomuk2::SimpleResourceGraph &graph ) -{ - Q_UNUSED( item ); - // create journal entry with the graph reference - Nepomuk2::NCAL::Journal journal( &res ); - //the wrapper class doesn't set the type if no memberfunction is called - res.addType( Vocabulary::NCAL::Journal() ); - //NepomukFeederUtils::setIcon( "view-pim-journal", res, graph ); - updateIncidenceItem( calJournal, res, graph ); -} - -void NepomukCalendarFeeder::updateTodoItem( const Akonadi::Item &item, const KCalCore::Todo::Ptr &calTodo, Nepomuk2::SimpleResource &res, Nepomuk2::SimpleResourceGraph &graph ) -{ - Q_UNUSED( item ); - Nepomuk2::NCAL::Todo todo( &res ); - //the wrapper class doesn't set the type if no memberfunction is called - res.addType( Vocabulary::NCAL::Todo() ); - //NepomukFeederUtils::setIcon( "view-pim-task", res, graph ); - updateIncidenceItem( calTodo, res, graph ); -} - -K_PLUGIN_FACTORY(factory, registerPlugin();) -K_EXPORT_PLUGIN(factory("akonadi_nepomuk_calendar_feeder")) - -} - -#include "nepomukcalendarfeeder.moc" diff -Nru kdepim-runtime-4.12.3/agents/nepomukfeeder/plugins/nepomukcalendarfeeder.desktop kdepim-runtime-4.12.90/agents/nepomukfeeder/plugins/nepomukcalendarfeeder.desktop --- kdepim-runtime-4.12.3/agents/nepomukfeeder/plugins/nepomukcalendarfeeder.desktop 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/agents/nepomukfeeder/plugins/nepomukcalendarfeeder.desktop 1970-01-01 00:00:00.000000000 +0000 @@ -1,50 +0,0 @@ -[Desktop Entry] -MimeType=application/x-vnd.akonadi.calendar.event;application/x-vnd.akonadi.calendar.todo;application/x-vnd.akonadi.calendar.journal;application/x-vnd.akonadi.calendar.freebusy; -Type=Service -X-KDE-ServiceTypes=AkonadiNepomukFeeder -X-KDE-Library=akonadi_nepomuk_calendar_feeder -X-KDE-ClassName=Akonadi::NepomukCalendarFeeder -Name=Nepomuk Calendar Feeder -Name[bs]=Nepomuk dovod kalendara -Name[ca]=Alimentador de calendaris del Nepomuk -Name[ca@valencia]=Alimentador de calendaris del Nepomuk -Name[cs]=Nepomuk podavač kalendáře -Name[da]=Nepomuk kalender-feeder -Name[de]=Kalender-Modul für Nepomuk -Name[el]=Τροφοδότης ημερολογίων του Nepomuk -Name[en_GB]=Nepomuk Calendar Feeder -Name[es]=Proveedor de calendarios de Nepomuk -Name[et]=Nepomuki kalendri söötur -Name[fi]=Nepomukin kalenterisyötteistin -Name[fr]=Connecteur Nepomuk pour les agendas -Name[ga]=Fothaire Féilire Nepomuk -Name[gl]=Fornecedor de Calendario do Nepomuk -Name[hu]=Nepomuk naptárfeltöltő -Name[ia]=Syndication de Calendario de Nepomuk -Name[it]=Fornitore di calendario per Nepomuk -Name[ja]=Nepomuk カレンダーフィーダー -Name[kk]=Nepomuk күнтізбе мәлімет бергіші -Name[km]=កម្មវិធី​មតិ​ព័ត​មាន​ប្រតិទិន​របស់ Nepomuk -Name[ko]=Nepomuk 달력 공급자 -Name[lt]=Nepomuk kalendoriaus šaltinis -Name[lv]=Nepomuk kalendāru barotājs -Name[nb]=Kalendersender til Nepomuk -Name[nds]=Nepomuk-Kalenneringaav -Name[nl]=Nepomuk agenda-voeder -Name[pa]=ਨਿਪੋਮੁਕ ਕੈਲੰਡਰ ਫੀਡਰ -Name[pl]=Podajnik Kalendarza Nepomuk -Name[pt]=Alimentação do Calendário para o Nepomuk -Name[pt_BR]=Alimentador de calendário para o Nepomuk -Name[ru]=Добавление календарей в Nepomuk -Name[sk]=Podávač kalendára Nepomuk -Name[sl]=Podajalnik koledarjev za Nepomuk -Name[sr]=Непомуков уводник календара -Name[sr@ijekavian]=Непомуков уводник календара -Name[sr@ijekavianlatin]=Nepomukov uvodnik kalendara -Name[sr@latin]=Nepomukov uvodnik kalendara -Name[sv]=Kontaktinmatning till Nepomuk -Name[tr]=Nepomuk Takvim Besleyici -Name[uk]=Передавач календарів Nepomuk -Name[x-test]=xxNepomuk Calendar Feederxx -Name[zh_CN]=Nepomuk 日历采集器 -Name[zh_TW]=Nepomuk Calendar Feeder diff -Nru kdepim-runtime-4.12.3/agents/nepomukfeeder/plugins/nepomukcalendarfeeder.h kdepim-runtime-4.12.90/agents/nepomukfeeder/plugins/nepomukcalendarfeeder.h --- kdepim-runtime-4.12.3/agents/nepomukfeeder/plugins/nepomukcalendarfeeder.h 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/agents/nepomukfeeder/plugins/nepomukcalendarfeeder.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,49 +0,0 @@ -/* - Copyright (c) 2009 Tobias Koenig - 2011 Christian Mollekopf - - 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 NEPOMUKCALENDARFEEDER_H -#define NEPOMUKCALENDARFEEDER_H - -#include -#include -#include -#include - -namespace Akonadi { - -class NepomukCalendarFeeder: public NepomukFeederPlugin -{ - Q_OBJECT - Q_INTERFACES( Akonadi::NepomukFeederPlugin ) -public: - NepomukCalendarFeeder( QObject *parent, const QVariantList &): NepomukFeederPlugin(parent ){}; - virtual void updateItem( const Akonadi::Item& item, Nepomuk2::SimpleResource& res, Nepomuk2::SimpleResourceGraph& graph ); -private: - void updateEventItem( const Akonadi::Item& item, const KCalCore::Event::Ptr&, Nepomuk2::SimpleResource &res, Nepomuk2::SimpleResourceGraph &graph ); - void updateJournalItem( const Akonadi::Item& item, const KCalCore::Journal::Ptr&, Nepomuk2::SimpleResource &res, Nepomuk2::SimpleResourceGraph &graph ); - void updateTodoItem( const Akonadi::Item& item, const KCalCore::Todo::Ptr&, Nepomuk2::SimpleResource &res, Nepomuk2::SimpleResourceGraph &graph ); - - void updateIncidenceItem( const KCalCore::Incidence::Ptr &calInc, Nepomuk2::SimpleResource &res, Nepomuk2::SimpleResourceGraph &graph ); -}; - -} - -#endif // NEPOMUKNOTEFEEDER_H diff -Nru kdepim-runtime-4.12.3/agents/nepomukfeeder/plugins/nepomukcontactfeeder.cpp kdepim-runtime-4.12.90/agents/nepomukfeeder/plugins/nepomukcontactfeeder.cpp --- kdepim-runtime-4.12.3/agents/nepomukfeeder/plugins/nepomukcontactfeeder.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/agents/nepomukfeeder/plugins/nepomukcontactfeeder.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,403 +0,0 @@ -/* - Copyright (c) 2007 Tobias Koenig - 2008 Sebastian Trueg - 2011 Martin Klapetek - 2011 Christian Mollekopf - - 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 "nepomukcontactfeeder.h" - -#include -#include - -#include - -#include -#include -#include - -// ontology includes -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include - -#include - -#include -#include - -using namespace Nepomuk2; - - -namespace Akonadi { - -namespace { - inline QStringList listFromString( const QString& s ) { - if ( s.isEmpty() ) - return QStringList(); - else - return QStringList( s ); - } -} - -void NepomukContactFeeder::updateItem(const Akonadi::Item& item, Nepomuk2::SimpleResource& res, Nepomuk2::SimpleResourceGraph& graph) -{ - //kDebug() << item.id(); - Q_ASSERT( item.hasPayload() ); - if ( item.hasPayload() ) - updateContactItem( item, res, graph ); - else if ( item.hasPayload() ) - updateGroupItem( item, res, graph ); - else - kWarning() << "Got item without known payload. Mimetype:" << item.mimeType() - << "Id:" << item.id(); -} - -void NepomukContactFeeder::updateContactItem( const Akonadi::Item &item, Nepomuk2::SimpleResource &res, Nepomuk2::SimpleResourceGraph &graph ) -{ - res.addType( Nepomuk2::Vocabulary::NCO::Contact() ); - - //NepomukFeederUtils::setIcon( "view-pim-contacts", res, graph ); - - Nepomuk2::NCO::Contact contact( &res ); - Nepomuk2::NCO::PersonContact person( &res ); - - const KABC::Addressee addressee = item.payload(); - - if ( !addressee.photo().isEmpty() ) { - const KStandardDirs ksd; - const QDir storeDir( QDir::toNativeSeparators( ksd.localxdgdatadir().append( QLatin1String("/nepomuk-contact-images/") ) ) ); - - if ( !storeDir.exists() ) { - storeDir.mkpath( storeDir.absolutePath() ); - } - - const QString filePath = storeDir.absolutePath().append( QLatin1String("/%1.png") ).arg( addressee.uid() ); - bool imageSaved = addressee.photo().data().save( filePath, "PNG" ); - - if ( imageSaved ) { - KUrl fileUrl( filePath ); - fileUrl.setProtocol( QLatin1String("file") ); - - res.addProperty( Nepomuk2::Vocabulary::NCO::photo(), fileUrl.url() ); - } - } - - if ( !addressee.formattedName().isEmpty() ) { - contact.setFullname( addressee.formattedName() ); - res.addProperty( Soprano::Vocabulary::NAO::prefLabel(), addressee.formattedName() ); - } else { - contact.setFullname( addressee.assembledName() ); - res.addProperty( Soprano::Vocabulary::NAO::prefLabel(), addressee.assembledName() ); - } - - if ( !addressee.givenName().isEmpty() ) - person.setNameGiven( addressee.givenName() ); - - if ( !addressee.additionalName().isEmpty() ) - person.setNameAdditionals( listFromString( addressee.additionalName() ) ); - - if ( !addressee.familyName().isEmpty() ) - person.setNameFamily( addressee.familyName() ); - - if ( !addressee.prefix().isEmpty() ) - person.setNameHonorificPrefixs( listFromString( addressee.prefix() ) ); - - if ( !addressee.suffix().isEmpty() ) - person.setNameHonorificSuffixs( listFromString( addressee.suffix() ) ); - - const KABC::Geo geo = addressee.geo(); - if ( geo.isValid() ) { - //FIXME we currently don't have ontologies for Location - // Nepomuk2::SimpleResource locRes; - // QString geoString; - // geoString.sprintf( "%.6f;%.6f", geo.latitude(), geo.longitude() );// make it better - // contact.setHasLocation( locRes.uri() ); - } - - // keys - // sounds - // logos - // photos - if ( !addressee.note().isEmpty() ) - contact.setNotes( listFromString( addressee.note() ) ); - - if ( !addressee.nickName().isEmpty() ) - contact.setNicknames( listFromString( addressee.nickName() ) ); - - contact.setContactUID( addressee.uid() ); // never empty - - if ( !addressee.name().isEmpty() ) - contact.setFullname( addressee.name() ); - - if ( addressee.birthday().date().isValid() ) - contact.setBirthDate( addressee.birthday().date() ); - -//FIXME nco:websiteUrl has a range of rdfs:resource and not xsd:string. Maybe use rdfs:literal? -// if ( addressee.url().isValid() ) { -// KUrl url = addressee.url(); -// -// // Nepomuk doesn't like URLs without a protocol -// if ( url.protocol().isEmpty() ) -// url.setProtocol( "http" ); -// -// contact.addWebsiteUrl( url.url() ); -// } - - Nepomuk2::SimpleResource affiliationRes; - Nepomuk2::NCO::Affiliation affiliation( &affiliationRes ); - - if ( !addressee.organization().isEmpty() ) { - Nepomuk2::SimpleResource organizationRes; - Nepomuk2::NCO::OrganizationContact orgContact( &organizationRes ); - orgContact.setFullname( addressee.organization() ); - - affiliation.setOrg( organizationRes.uri() ); - - graph << organizationRes; - } - if ( !addressee.role().isEmpty() ) { - affiliation.setRoles( listFromString( addressee.role() ) ); - } - if ( !addressee.title().isEmpty() ) { - affiliation.setTitle( addressee.title() ); - } - if ( !addressee.department().isEmpty() ) { - affiliation.setDepartments( listFromString( addressee.department() ) ); - } - - // phone numbers - const KABC::PhoneNumber::List phoneNumbers = addressee.phoneNumbers(); - const int countOfPhoneNumber( phoneNumbers.count() ); - for ( int i = 0; i < countOfPhoneNumber; ++i ) { - Nepomuk2::SimpleResource affiliationPhoneRes; - Nepomuk2::SimpleResource phoneRes; - if ( phoneNumbers[ i ].type() & KABC::PhoneNumber::Bbs ) { - if ( phoneNumbers[ i ].type() & KABC::PhoneNumber::Work ) { - Nepomuk2::NCO::BbsNumber number( &affiliationPhoneRes ); - number.setPhoneNumber( phoneNumbers[ i ].number() ); - } else { - Nepomuk2::NCO::BbsNumber number( &phoneRes ); - number.setPhoneNumber( phoneNumbers[ i ].number() ); - } - } else if ( phoneNumbers[ i ].type() & KABC::PhoneNumber::Car ) { - if ( phoneNumbers[ i ].type() & KABC::PhoneNumber::Work ) { - Nepomuk2::NCO::CarPhoneNumber number( &affiliationPhoneRes ); - number.setPhoneNumber( phoneNumbers[ i ].number() ); - } else { - Nepomuk2::NCO::CarPhoneNumber number( &phoneRes ); - number.setPhoneNumber( phoneNumbers[ i ].number() ); - } - } else if ( phoneNumbers[ i ].type() & KABC::PhoneNumber::Cell ) { - if ( phoneNumbers[ i ].type() & KABC::PhoneNumber::Work ) { - Nepomuk2::NCO::CellPhoneNumber number( &affiliationPhoneRes ); - //FIXME: this could really use some better way, but it depends on autogenerated code from ontologies - // which needs fixing first - number.Nepomuk2::NCO::MessagingNumber::addPhoneNumber( phoneNumbers[ i ].number() ); - } else { - Nepomuk2::NCO::CellPhoneNumber number( &phoneRes ); - //FIXME: this could really use some better way, but it depends on autogenerated code from ontologies - // which needs fixing first - number.Nepomuk2::NCO::MessagingNumber::addPhoneNumber( phoneNumbers[ i ].number() ); - } - } else if ( phoneNumbers[ i ].type() & KABC::PhoneNumber::Fax ) { - if ( phoneNumbers[ i ].type() & KABC::PhoneNumber::Work ) { - Nepomuk2::NCO::FaxNumber number( &affiliationPhoneRes ); - number.setPhoneNumber( phoneNumbers[ i ].number() ); - } else { - Nepomuk2::NCO::FaxNumber number( &phoneRes ); - number.setPhoneNumber( phoneNumbers[ i ].number() ); - } - } else if ( phoneNumbers[ i ].type() & KABC::PhoneNumber::Isdn ) { - if ( phoneNumbers[ i ].type() & KABC::PhoneNumber::Work ) { - Nepomuk2::NCO::IsdnNumber number( &affiliationPhoneRes ); - number.setPhoneNumber( phoneNumbers[ i ].number() ); - } else { - Nepomuk2::NCO::IsdnNumber number( &phoneRes ); - number.setPhoneNumber( phoneNumbers[ i ].number() ); - } - } else if ( phoneNumbers[ i ].type() & KABC::PhoneNumber::Msg ) { - if ( phoneNumbers[ i ].type() & KABC::PhoneNumber::Work ) { - Nepomuk2::NCO::MessagingNumber number( &affiliationPhoneRes ); - number.setPhoneNumber( phoneNumbers[ i ].number() ); - } else { - Nepomuk2::NCO::MessagingNumber number( &phoneRes ); - number.setPhoneNumber( phoneNumbers[ i ].number() ); - } - } else if ( phoneNumbers[ i ].type() & KABC::PhoneNumber::Modem ) { - if ( phoneNumbers[ i ].type() & KABC::PhoneNumber::Work ) { - Nepomuk2::NCO::ModemNumber number( &affiliationPhoneRes ); - number.setPhoneNumber( phoneNumbers[ i ].number() ); - } else { - Nepomuk2::NCO::ModemNumber number( &phoneRes ); - number.setPhoneNumber( phoneNumbers[ i ].number() ); - } - } else if ( phoneNumbers[ i ].type() & KABC::PhoneNumber::Pager ) { - if ( phoneNumbers[ i ].type() & KABC::PhoneNumber::Work ) { - Nepomuk2::NCO::PagerNumber number( &affiliationPhoneRes ); - number.setPhoneNumber( phoneNumbers[ i ].number() ); - } else { - Nepomuk2::NCO::PagerNumber number( &phoneRes ); - number.setPhoneNumber( phoneNumbers[ i ].number() ); - } - } else if ( phoneNumbers[ i ].type() & KABC::PhoneNumber::Pcs ) { - if ( phoneNumbers[ i ].type() & KABC::PhoneNumber::Work ) { - Nepomuk2::NCO::PcsNumber number( &affiliationPhoneRes ); - number.setPhoneNumber( phoneNumbers[ i ].number() ); - } else { - Nepomuk2::NCO::PcsNumber number( &phoneRes ); - number.setPhoneNumber( phoneNumbers[ i ].number() ); - } - } else if ( phoneNumbers[ i ].type() & KABC::PhoneNumber::Video ) { - if ( phoneNumbers[ i ].type() & KABC::PhoneNumber::Work ) { - Nepomuk2::NCO::VideoTelephoneNumber number( &affiliationPhoneRes ); - number.setPhoneNumber( phoneNumbers[ i ].number() ); - } else { - Nepomuk2::NCO::VideoTelephoneNumber number( &phoneRes ); - number.setPhoneNumber( phoneNumbers[ i ].number() ); - } - } else if ( phoneNumbers[ i ].type() & KABC::PhoneNumber::Voice ) { - if ( phoneNumbers[ i ].type() & KABC::PhoneNumber::Work ) { - Nepomuk2::NCO::VoicePhoneNumber number( &affiliationPhoneRes ); - number.setPhoneNumber( phoneNumbers[ i ].number() ); - } else { - Nepomuk2::NCO::VoicePhoneNumber number( &phoneRes ); - number.setPhoneNumber( phoneNumbers[ i ].number() ); - } - } else { // matches Home and Work - if ( phoneNumbers[ i ].type() & KABC::PhoneNumber::Work ) { - Nepomuk2::NCO::PhoneNumber number( &affiliationPhoneRes ); - number.setPhoneNumber( phoneNumbers[ i ].number() ); - } else { - Nepomuk2::NCO::PhoneNumber number( &phoneRes ); - number.setPhoneNumber( phoneNumbers[ i ].number() ); - } - } - - if ( affiliationPhoneRes.isValid() ) { - affiliation.addHasPhoneNumber( affiliationPhoneRes.uri() ); - graph << affiliationPhoneRes; - } - if ( phoneRes.isValid() ) { - contact.addHasPhoneNumber( phoneRes.uri() ); - graph << phoneRes; - } - } - - if ( affiliationRes.isValid() ) { - person.setHasAffiliations( QList() << affiliationRes.uri() ); - graph << affiliationRes; - } - - // im accounts - - // email addresses - const QStringList emails = addressee.emails(); - for ( int i = 0; i < emails.count(); ++i ) { - Nepomuk2::SimpleResource emailRes; - Nepomuk2::NCO::EmailAddress email( &emailRes ); - email.setEmailAddress( emails[ i ].toLower() ); - - contact.addHasEmailAddress( emailRes.uri() ); - graph << emailRes; - } - - // addresses - const KABC::Address::List addresses = addressee.addresses(); - const int numberOfAddresses( addresses.count() ); - for ( int i = 0; i < numberOfAddresses; ++i ) { - Nepomuk2::SimpleResource postalRes; - Nepomuk2::NCO::PostalAddress address( &postalRes ); - address.setStreetAddress( addresses[ i ].street() ); - if ( !addresses[ i ].postalCode().isEmpty() ) - address.setPostalcode( addresses[ i ].postalCode() ); - if ( !addresses[ i ].locality().isEmpty() ) - address.setLocality( addresses[ i ].locality() ); - if ( !addresses[ i ].region().isEmpty() ) - address.setRegion( addresses[ i ].region() ); - if ( !addresses[ i ].postOfficeBox().isEmpty() ) - address.setPobox( addresses[ i ].postOfficeBox() ); - if ( !addresses[ i ].country().isEmpty() ) - address.setCountry( addresses[ i ].country() ); - address.setExtendedAddress( addresses[ i ].extended() ); - - contact.addHasPostalAddress( postalRes.uri() ); - graph << postalRes; - } - - NepomukFeederUtils::tagsFromCategories( addressee.categories(), res, graph ); -} - -void NepomukContactFeeder::updateGroupItem( const Akonadi::Item &item, Nepomuk2::SimpleResource &res, Nepomuk2::SimpleResourceGraph &graph ) -{ - // create the contact group with the graph reference - Nepomuk2::NCO::ContactGroup group( &res ); - - const KABC::ContactGroup contactGroup = item.payload(); - - group.setContactGroupName( contactGroup.name() ); - - res.addProperty( Soprano::Vocabulary::NAO::prefLabel(), contactGroup.name() ); - - for ( uint i = 0; i < contactGroup.contactReferenceCount(); ++i ) { - const Akonadi::Item contactItem( contactGroup.contactReference( i ).uid().toLongLong() ); - - Nepomuk2::SimpleResource personRes; - Nepomuk2::NCO::PersonContact person( &personRes ); - person.addBelongsToGroup( res.uri() ); - - graph << personRes; - } -} - - -K_PLUGIN_FACTORY(factory, registerPlugin();) -K_EXPORT_PLUGIN(factory("akonadi_nepomuk_contact_feeder")) - -} - -#include "nepomukcontactfeeder.moc" diff -Nru kdepim-runtime-4.12.3/agents/nepomukfeeder/plugins/nepomukcontactfeeder.desktop kdepim-runtime-4.12.90/agents/nepomukfeeder/plugins/nepomukcontactfeeder.desktop --- kdepim-runtime-4.12.3/agents/nepomukfeeder/plugins/nepomukcontactfeeder.desktop 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/agents/nepomukfeeder/plugins/nepomukcontactfeeder.desktop 1970-01-01 00:00:00.000000000 +0000 @@ -1,53 +0,0 @@ -[Desktop Entry] -MimeType=text/directory;application/x-vnd.kde.contactgroup; -Type=Service -X-KDE-ServiceTypes=AkonadiNepomukFeeder -X-KDE-Library=akonadi_nepomuk_contact_feeder -X-KDE-ClassName=Akonadi::NepomukContactFeeder -Name=Nepomuk Contact Feeder -Name[ar]=مغذي جهات إتصال نبومك -Name[bs]=Nepomuk napajač kontakata -Name[ca]=Alimentador de contactes del Nepomuk -Name[ca@valencia]=Alimentador de contactes del Nepomuk -Name[cs]=Nepomuk podavač kontaktů -Name[da]=Nepomuk kontakt-feeder -Name[de]=Kontakte-Modul für Nepomuk -Name[el]=Τροφοδότης επαφών στο Nepomuk -Name[en_GB]=Nepomuk Contact Feeder -Name[es]=Proveedor de contactos de Nepomuk -Name[et]=Nepomuki kontaktide söötur -Name[fi]=Nepomukin yhteystietosyötteistin -Name[fr]=Connecteur Nepomuk pour les contacts -Name[ga]=Fothaire Teagmhálacha Nepomuk -Name[gl]=Fornecedor de Contactos do Nepomuk -Name[hu]=Nepomuk névjegyfeltöltő -Name[ia]=Syndication de Contacto de Nepomuk -Name[it]=Fornitore di contatti per Nepomuk -Name[ja]=Nepomuk 連絡先フィーダー -Name[kk]=Nepomuk контакт мәлімет бергіші -Name[km]=មតិ​ព័ត៌មាន​ទំនាក់ទំនង Nepomuk -Name[ko]=Nepomuk 연락처 공급자 -Name[lt]=Nepomuk adresatų šaltinis -Name[lv]=Nepomuk kontaktu barotājs -Name[nb]=Kontaktsender til Nepomuk -Name[nds]=Nepomuk-Kontaktingaav -Name[nl]=Nepomuk Kontact-toevoer -Name[nn]=Kontaktmatar for Nepomuk -Name[pa]=ਨਿਪੋਮੁਕ ਸੰਪਰਕ ਫੀਡਰ -Name[pl]=Podajnik Kontaktów Nepomuk -Name[pt]=Alimentação de Contactos para o Nepomuk -Name[pt_BR]=Alimentador de contatos para o Nepomuk -Name[ro]=Alimentare Nepomuk cu fluxuri -Name[ru]=Добавление контактов в Nepomuk -Name[sk]=Podávač kontaktov Nepomuk -Name[sl]=Podajalnik stikov za Nepomuk -Name[sr]=Непомуков уводник контаката -Name[sr@ijekavian]=Непомуков уводник контаката -Name[sr@ijekavianlatin]=Nepomukov uvodnik kontakata -Name[sr@latin]=Nepomukov uvodnik kontakata -Name[sv]=Kontaktinmatning till Nepomuk -Name[tr]=Nepomuk Kişi Besleyici -Name[uk]=Передавач контактів Nepomuk -Name[x-test]=xxNepomuk Contact Feederxx -Name[zh_CN]=Nepomuk 联系人采集器 -Name[zh_TW]=Nepomuk Contact Feeder diff -Nru kdepim-runtime-4.12.3/agents/nepomukfeeder/plugins/nepomukcontactfeeder.h kdepim-runtime-4.12.90/agents/nepomukfeeder/plugins/nepomukcontactfeeder.h --- kdepim-runtime-4.12.3/agents/nepomukfeeder/plugins/nepomukcontactfeeder.h 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/agents/nepomukfeeder/plugins/nepomukcontactfeeder.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,45 +0,0 @@ -/* - Copyright (c) 2007 Tobias Koenig - 2008 Sebastian Trueg - 2011 Martin Klapetek - 2011 Christian Mollekopf - - 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 NEPOMUKCONTACTFEEDER_H -#define NEPOMUKCONTACTFEEDER_H - -#include - -namespace Akonadi { - -class NepomukContactFeeder: public NepomukFeederPlugin -{ - Q_OBJECT - Q_INTERFACES( Akonadi::NepomukFeederPlugin ) -public: - NepomukContactFeeder( QObject *parent, const QVariantList & ): NepomukFeederPlugin( parent ){}; - virtual void updateItem( const Akonadi::Item& item, Nepomuk2::SimpleResource& res, Nepomuk2::SimpleResourceGraph& graph ); -private: - void updateContactItem( const Akonadi::Item &item, Nepomuk2::SimpleResource &res, Nepomuk2::SimpleResourceGraph &graph ); - void updateGroupItem( const Akonadi::Item &item, Nepomuk2::SimpleResource &res, Nepomuk2::SimpleResourceGraph &graph ); -}; - -} - -#endif // NEPOMUKNOTEFEEDER_H diff -Nru kdepim-runtime-4.12.3/agents/nepomukfeeder/plugins/nepomukmailfeeder.cpp kdepim-runtime-4.12.90/agents/nepomukfeeder/plugins/nepomukmailfeeder.cpp --- kdepim-runtime-4.12.3/agents/nepomukfeeder/plugins/nepomukmailfeeder.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/agents/nepomukfeeder/plugins/nepomukmailfeeder.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,289 +0,0 @@ -/* - Copyright (c) 2006, 2009 Volker Krause - Copyright (c) 2008 Sebastian Trueg - Copyright (c) 2011 Christian Mollekopf - - 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 "nepomukmailfeeder.h" - -#include - -#include -#include -#include - -#include - -// ontology includes -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include - -#include - - -using namespace Nepomuk2; - -namespace Akonadi { - -NepomukMailFeeder::NepomukMailFeeder(QObject *parent, const QVariantList &) -: NepomukFeederPlugin(parent), m_mainBodyPart(0) -{ -} - -void NepomukMailFeeder::updateItem(const Akonadi::Item& item, Nepomuk2::SimpleResource& res, Nepomuk2::SimpleResourceGraph& graph) -{ - //kDebug() << item.id(); - Q_ASSERT( item.hasPayload() ); - - if ( !item.hasPayload() ) { - kWarning() << "Got item without known payload. Mimetype:" << item.mimeType() - << "Id:" << item.id() << item.payloadData(); - return; - } - Akonadi::MessageStatus status; - status.setStatusFromFlags( item.flags() ); - if ( status.isSpam() ) - return; // don't bother with indexing spam - - res.addType( Vocabulary::NMO::Email() ); - NepomukFeederUtils::setIcon( QLatin1String("internet-mail"), res, graph ); - - processFlags( item.flags(), res, graph ); - KMime::Message::Ptr msg = item.payload(); - processHeaders( msg, res, graph ); - - if ( !msg->body().isEmpty() || !msg->contents().isEmpty() ) { - processContent( msg, item, res, graph ); - } - -} - - -void NepomukMailFeeder::processContent(const KMime::Message::Ptr& msg, const Akonadi::Item &item, Nepomuk2::SimpleResource& res, Nepomuk2::SimpleResourceGraph& graph ) -{ - // before we walk the part node tree, let's see if there is a main plain text body, so we don't interpret that as an attachment later on - m_mainBodyPart = msg->mainBodyPart( "text/plain" ); - if ( m_mainBodyPart ) { - const QString text = m_mainBodyPart->decodedText( true, true ); - if ( !text.isEmpty() ) { - //kDebug() << "indexingText"; - Nepomuk2::NMO::Message message( &res ); //The email wrapper doesn't contain the functions from Message - message.setPlainTextMessageContents( QStringList( text ) ); - } - } - processPart( msg.get(), item, res, graph ); -} - -void NepomukMailFeeder::processPart( KMime::Content* content, const Akonadi::Item &item, Nepomuk2::SimpleResource& res, Nepomuk2::SimpleResourceGraph& graph ) -{ - // multipart -> recurse - if ( content->contentType()->isMultipart() ) { - if ( content->contentType()->isSubtype( "encrypted" )/* && !m_indexEncryptedContent */) - return; - // TODO what about multipart/alternative? - foreach ( KMime::Content* child, content->contents() ) { - processPart( child, item, res, graph ); - } - } - - // plain text main body part, we already dealt with that - else if ( content == m_mainBodyPart ) { - return; - } - - // ignore useless stuff such as signatures, certificates, encrypted parts, etc - else if ( content->contentType()->mimeType() == "application/pgp-signature" || - content->contentType()->mimeType() == "application/pkcs7-signature" || - content->contentType()->mimeType() == "application/x-pkcs7-signature" || - content->contentType()->mimeType() == "application/pgp-encrypted" || - content->contentType()->mimeType() == "application/pkcs7-mime" ) - { - return; - } - - // non plain text main body part, let strigi figure out what to do about that - else if ( !m_mainBodyPart ) { - m_mainBodyPart = content; - //TODO defer to post-processing - //NepomukFeederUtils::indexData( res.uri(), content->decodedContent(), item.modificationTime() ); //FIXME index the attachment with strigi but don't force the uri - } - - // attachment -> delegate to strigi - else { - //const KMime::ContentIndex index = content->index(); - //KUrl attachmentUrl = res.uri(); - //attachmentUrl.setHTMLRef( index.toString() ); - //kDebug() << attachmentUrl; - Nepomuk2::SimpleResource attachmentRes; - attachmentRes.addType( Vocabulary::NFO::Attachment() ); - attachmentRes.addType( Vocabulary::NIE::InformationElement() ); //it needs to be an informationElement in order to set nie:description - attachmentRes.addProperty( Vocabulary::NIE::isPartOf(), res.uri() ); - NepomukFeederUtils::setIcon( QLatin1String("mail-attachment"), attachmentRes, graph ); - if ( !content->contentType()->name().isEmpty() ) - attachmentRes.setProperty( Soprano::Vocabulary::NAO::prefLabel(), content->contentType()->name() ); - else if ( content->contentDisposition( false ) && !content->contentDisposition()->filename().isEmpty() ) - attachmentRes.setProperty( Soprano::Vocabulary::NAO::prefLabel(), content->contentDisposition()->filename() ); - if ( content->contentDescription( false ) && !content->contentDescription()->asUnicodeString().isEmpty() ) - attachmentRes.setProperty( Vocabulary::NIE::description(), content->contentDescription()->asUnicodeString() ); - - Nepomuk2::NMO::Email email( &res ); - email.addHasAttachment( attachmentRes.uri() ); - graph << attachmentRes; - //TODO defer to post-processing - //another option would be to let a strigifeeder automatically find unprocessed attachments so we don't have to do anything further here - //NepomukFeederUtils::indexData( attachmentRes.uri(), content->decodedContent(), item.modificationTime() ); //FIXME index the attachment with strigi but don't force the uri - } - -} - -void NepomukMailFeeder::processFlags(const Akonadi::Item::Flags& flags, Nepomuk2::SimpleResource& res, Nepomuk2::SimpleResourceGraph& graph) -{ - Akonadi::MessageStatus status; - status.setStatusFromFlags( flags ); - - Nepomuk2::NMO::Email mail( &res ); - mail.setIsRead( status.isRead() ); - - if ( status.isImportant() ) - addTranslatedTag( "important", i18n( "Important" ), QLatin1String("mail-mark-important") , res, graph ); - if ( status.isToAct() ) - addTranslatedTag( "todo", i18n( "To Do" ), QLatin1String("mail-mark-task"), res, graph ); - if ( status.isWatched() ) - addTranslatedTag( "watched", i18n( "Watched" ), QLatin1String("mail-thread-watch") , res, graph ); - if ( status.isDeleted() ) { - addTranslatedTag( "deleted", i18n( "Deleted" ), QLatin1String("mail-deleted") , res, graph ); - } - if ( status.isSpam() ) { - addTranslatedTag( "spam", i18n( "Spam" ), QLatin1String("mail-mark-junk") , res, graph ); - } - if ( status.isReplied() ) { - addTranslatedTag( "replied", i18n( "Replied" ), QLatin1String("mail-replied") , res, graph ); - } - if ( status.isIgnored() ) { - addTranslatedTag( "ignored", i18n( "Ignored" ), QLatin1String("mail-thread-ignored") , res, graph ); - } - if ( status.isForwarded() ) { - addTranslatedTag( "forwarded", i18n( "Forwarded" ), QLatin1String("mail-forwarded") , res, graph ); - } - if ( status.isSent() ) { - addTranslatedTag( "sent", i18n( "Sent" ), QLatin1String("mail-sent") , res, graph ); - } - if ( status.isQueued() ) { - addTranslatedTag( "queued", i18n( "Queued" ), QLatin1String("mail-queued" ), res, graph ); - } - if ( status.isHam() ) { - addTranslatedTag( "ham", i18n( "Ham" ), QLatin1String("mail-mark-notjunk") , res, graph ); - } -} - - -void NepomukMailFeeder::addTranslatedTag(const char* tagName, const QString& tagLabel, const QString &icon , Nepomuk2::SimpleResource& res, Nepomuk2::SimpleResourceGraph& graph) -{ - Nepomuk2::SimpleResource tagResource = NepomukFeederUtils::addTag( res, graph, QString::fromLatin1( tagName ), tagLabel ); - Nepomuk2::NAO::Tag tag( &tagResource ); - if ( !icon.isEmpty() ) { - NepomukFeederUtils::setIcon( icon, tagResource, graph ); - } - graph << tagResource; -} - -void NepomukMailFeeder::processHeaders(const KMime::Message::Ptr& msg, Nepomuk2::SimpleResource& res, Nepomuk2::SimpleResourceGraph& graph) -{ - Nepomuk2::NMO::Email mail( &res ); - if ( msg->subject( false ) ) { - mail.setMessageSubject( msg->subject()->asUnicodeString() ); - res.setProperty( Soprano::Vocabulary::NAO::prefLabel(), msg->subject()->asUnicodeString() ); - } - - if ( msg->date( false ) ) { - const QDateTime dateTime = msg->date()->dateTime().dateTime(); - if ( dateTime.isValid() ) - mail.setSentDate( dateTime ); - } - - if ( msg->from( false ) ) { - mail.setFroms( extractContactsFromMailboxes( msg->from()->mailboxes(), graph ) ); - } - - if ( msg->sender( false ) ) - mail.setSenders( extractContactsFromMailboxes( msg->sender()->mailboxes(), graph ) ); - - if ( msg->to( false ) ) { - mail.setTos( extractContactsFromMailboxes( msg->to()->mailboxes(), graph ) ); - } - - if ( msg->cc( false ) ) { - mail.setCcs( extractContactsFromMailboxes( msg->cc()->mailboxes(), graph ) ); - } - - if ( msg->bcc( false ) ) { - mail.setBccs( extractContactsFromMailboxes( msg->bcc()->mailboxes(), graph ) ); - } - - if ( msg->messageID( false ) ) { - mail.setMessageIds( QStringList( msg->messageID()->asUnicodeString() ) ); - } - - addSpecificHeader( msg, "List-Id",mail, graph ); - addSpecificHeader( msg, "X-Loop",mail, graph ); - addSpecificHeader( msg, "X-Mailing-List", mail, graph ); - addSpecificHeader( msg, "X-Spam-Flag", mail, graph ); - addSpecificHeader( msg, "Organization", mail, graph ); -} - -void NepomukMailFeeder::addSpecificHeader( const KMime::Message::Ptr& msg, const QByteArray& headerName, Nepomuk2::NMO::Email& mail, Nepomuk2::SimpleResourceGraph& graph ) -{ - if ( msg->headerByType( headerName ) ) { - Nepomuk2::SimpleResource headerRes; - Nepomuk2::NMO::MessageHeader header( &headerRes ); - header.setHeaderName( QLatin1String(headerName) ); - header.setHeaderValue( msg->headerByType( headerName )->asUnicodeString() ); - graph << headerRes; - mail.addMessageHeader( headerRes.uri() ); - } -} - -QList NepomukMailFeeder::extractContactsFromMailboxes(const KMime::Types::Mailbox::List& mbs, Nepomuk2::SimpleResourceGraph &graph ) -{ - QList contacts; - foreach ( const KMime::Types::Mailbox& mbox, mbs ) { - if ( mbox.hasAddress() ) { - contacts << NepomukFeederUtils::addContact( QString::fromLatin1( mbox.address() ), mbox.name(), graph ).uri(); - } - } - return contacts; -} - - K_PLUGIN_FACTORY(factory, registerPlugin();) - K_EXPORT_PLUGIN(factory("akonadi_nepomuk_email_feeder")) - -} - -#include "nepomukmailfeeder.moc" diff -Nru kdepim-runtime-4.12.3/agents/nepomukfeeder/plugins/nepomukmailfeeder.desktop kdepim-runtime-4.12.90/agents/nepomukfeeder/plugins/nepomukmailfeeder.desktop --- kdepim-runtime-4.12.3/agents/nepomukfeeder/plugins/nepomukmailfeeder.desktop 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/agents/nepomukfeeder/plugins/nepomukmailfeeder.desktop 1970-01-01 00:00:00.000000000 +0000 @@ -1,47 +0,0 @@ -[Desktop Entry] -MimeType=message/rfc822;message/news; -Type=Service -X-KDE-ServiceTypes=AkonadiNepomukFeeder -X-KDE-Library=akonadi_nepomuk_email_feeder -X-KDE-ClassName=Akonadi::NepomukMailFeeder -Name=Nepomuk Mail Feeder -Name[bs]=Nepomuk dovod pošte -Name[ca]=Alimentador de correu del Nepomuk -Name[ca@valencia]=Alimentador de correu del Nepomuk -Name[cs]=Nepomuk podavač e-mailů -Name[da]=Nepomuk mail-feeder -Name[de]=E-Mail-Modul für Nepomuk -Name[el]=Τροφοδότης αλληλογραφίας του Nepomuk -Name[es]=Proveedor de correo de Nepomuk -Name[et]=Nepomuki e-kirjade söötur -Name[fi]=Nepomukin postisyötteistin -Name[fr]=Connecteur Nepomuk pour les courriers électroniques -Name[ga]=Fothaire Ríomhphoist Nepomuk -Name[gl]=Alimentador de correo de Nepomuk -Name[hu]=Nepomuk levélfeltöltő -Name[ia]=Syndication de posta de Nepomuk -Name[it]=Fornitore di messaggi di posta per Nepomuk -Name[kk]=Nepomuk пошта бергіші -Name[km]=កម្មវិធី​មតិ​ព័ត​មាន​​សំបុត្រ​របស់ Nepomuk -Name[ko]=Nepomuk 메일 공급자 -Name[lt]=Nepomuk laiškų šaltinis -Name[lv]=Nepomuk pasta barotājs -Name[nb]=E-postsender for Nepomuk -Name[nds]=Nepomuk-Nettpostingaav -Name[nl]=Nepumuk e-mail-feeder -Name[pl]=Podajnik Poczty Nepomuk -Name[pt]=Alimentação do Correio para o Nepomuk -Name[pt_BR]=Alimentador de e-mails para o Nepomuk -Name[ru]=Добавление почты в Nepomuk -Name[sk]=Podávač pošty Nepomuk -Name[sl]=Podajalnik pošte za Nepomuk -Name[sr]=Непомуков уводник е‑поште -Name[sr@ijekavian]=Непомуков уводник е‑поште -Name[sr@ijekavianlatin]=Nepomukov uvodnik e‑pošte -Name[sr@latin]=Nepomukov uvodnik e‑pošte -Name[sv]=E-postinmatning till Nepomuk -Name[tr]=Nepomuk E-posta Besleyici -Name[uk]=Передавач пошти Nepomuk -Name[x-test]=xxNepomuk Mail Feederxx -Name[zh_CN]=Nepomuk 邮件采集器 -Name[zh_TW]=Nepomuk Mail Feeder diff -Nru kdepim-runtime-4.12.3/agents/nepomukfeeder/plugins/nepomukmailfeeder.h kdepim-runtime-4.12.90/agents/nepomukfeeder/plugins/nepomukmailfeeder.h --- kdepim-runtime-4.12.3/agents/nepomukfeeder/plugins/nepomukmailfeeder.h 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/agents/nepomukfeeder/plugins/nepomukmailfeeder.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,55 +0,0 @@ -/* - Copyright (c) 2011 Christian Mollekopf - - 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 NEPOMUKMAILFEEDER_H -#define NEPOMUKMAILFEEDER_H - -#include - -#include -#include -#include - -namespace Akonadi { - -class NepomukMailFeeder: public NepomukFeederPlugin -{ - Q_OBJECT - Q_INTERFACES( Akonadi::NepomukFeederPlugin ) -public: - NepomukMailFeeder(QObject *parent, const QVariantList &); - virtual void updateItem(const Akonadi::Item& item, Nepomuk2::SimpleResource& res, Nepomuk2::SimpleResourceGraph& graph); - -private: - QList extractContactsFromMailboxes( const KMime::Types::Mailbox::List& mbs, Nepomuk2::SimpleResourceGraph& graph ); - void addTranslatedTag( const char* tagName, const QString &tagLabel, const QString &icon , Nepomuk2::SimpleResource& res, Nepomuk2::SimpleResourceGraph& graph); - - void processContent( const KMime::Message::Ptr &msg, const Akonadi::Item &item, Nepomuk2::SimpleResource& res, Nepomuk2::SimpleResourceGraph& graph); - void processFlags( const Akonadi::Item::Flags &flags, Nepomuk2::SimpleResource& res, Nepomuk2::SimpleResourceGraph& graph); - void processHeaders( const KMime::Message::Ptr &msg, Nepomuk2::SimpleResource& res, Nepomuk2::SimpleResourceGraph& graph); - void processPart( KMime::Content *content, const Akonadi::Item &item, Nepomuk2::SimpleResource& res, Nepomuk2::SimpleResourceGraph& graph ); - void addSpecificHeader( const KMime::Message::Ptr& msg, const QByteArray& headerName, Nepomuk2::NMO::Email& mail, Nepomuk2::SimpleResourceGraph& graph ); - - KMime::Content *m_mainBodyPart; -}; - -} - -#endif //NEPOMUKMAILFEEDER_H diff -Nru kdepim-runtime-4.12.3/agents/nepomukfeeder/plugins/nepomuknotefeeder.cpp kdepim-runtime-4.12.90/agents/nepomukfeeder/plugins/nepomuknotefeeder.cpp --- kdepim-runtime-4.12.3/agents/nepomukfeeder/plugins/nepomuknotefeeder.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/agents/nepomukfeeder/plugins/nepomuknotefeeder.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,72 +0,0 @@ -/* - Copyright (c) 2011 Christian Mollekopf - - 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 "nepomuknotefeeder.h" - -// ontology includes -#include -#include -#include - -#include -#include - -#include -#include - -#include -#include - -using namespace Nepomuk2; - - -namespace Akonadi { - -void NepomukNoteFeeder::updateItem(const Akonadi::Item& item, Nepomuk2::SimpleResource& res, Nepomuk2::SimpleResourceGraph& graph) -{ - //kDebug() << item.id(); - Q_ASSERT( item.hasPayload() ); - if ( item.hasPayload() ) { - Akonadi::NoteUtils::NoteMessageWrapper note( item.payload() ); - res.addType( Nepomuk2::Vocabulary::NFO::HtmlDocument() ); - - NepomukFeederUtils::setIcon( Akonadi::NoteUtils::noteIconName(), res, graph ); - - res.setProperty( Vocabulary::NIE::title(), note.title() ); - - if ( !note.text().isEmpty() ) { - res.setProperty( Vocabulary::NIE::description(), note.text() ); - res.setProperty( Vocabulary::NIE::plainTextContent(), note.toPlainText() ); - } - //kDebug() << "updated item " << item.url() << note.title(); - - res.setProperty( Soprano::Vocabulary::NAO::prefLabel(), note.title() ); - - } else { - kWarning() << "Got item without known payload. Mimetype:" << item.mimeType() - << "Id:" << item.id() << item.payloadData(); - } -} - -K_PLUGIN_FACTORY(factory, registerPlugin();) -K_EXPORT_PLUGIN(factory("akonadi_nepomuk_note_feeder")) - -} - -#include "nepomuknotefeeder.moc" diff -Nru kdepim-runtime-4.12.3/agents/nepomukfeeder/plugins/nepomuknotefeeder.desktop kdepim-runtime-4.12.90/agents/nepomukfeeder/plugins/nepomuknotefeeder.desktop --- kdepim-runtime-4.12.3/agents/nepomukfeeder/plugins/nepomuknotefeeder.desktop 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/agents/nepomukfeeder/plugins/nepomuknotefeeder.desktop 1970-01-01 00:00:00.000000000 +0000 @@ -1,47 +0,0 @@ -[Desktop Entry] -MimeType=text/x-vnd.akonadi.note; -Type=Service -X-KDE-ServiceTypes=AkonadiNepomukFeeder -X-KDE-Library=akonadi_nepomuk_note_feeder -X-KDE-ClassName=Akonadi::NepomukNoteFeeder -Name=Nepomuk Note Feeder -Name[bs]=Nepomuk dovod bilješki -Name[ca]=Alimentador de notes del Nepomuk -Name[ca@valencia]=Alimentador de notes del Nepomuk -Name[cs]=Nepomuk podavač poznámek -Name[da]=Nepomuk note-feeder -Name[de]=Notizen-Modul für Nepomuk -Name[el]=Τροφοδότης σημειώσεων Nepomuk -Name[es]=Proveedor de notas de Nepomuk -Name[et]=Nepomuki märkmete söötur -Name[fi]=Nepomukin muistiinpanosyötteistin -Name[fr]=Connecteur Nepomuk pour les notes -Name[ga]=Fothaire Nótaí Nepomuk -Name[gl]=Alimentador de notas de Nepomuk -Name[hu]=Nepomuk jegyzetfeltöltő -Name[ia]=Syndication de Nota de Nepomuk -Name[it]=Fornitore di note per Nepomuk -Name[kk]=Nepomuk жазба бергіші -Name[km]=កម្មវិធី​មតិ​ព័ត៌មាន​ចំណាំ​របស់ Nepomuk -Name[ko]=Nepomuk 메모 공급자 -Name[lt]=Nepomuk užrašų šaltinis -Name[lv]=Nepomuk piezīmju barotājs -Name[nb]=Notatsender til Nepomuk -Name[nds]=Nepomuk-Notizingaav -Name[nl]=Nepomuk Note-feeder -Name[pl]=Podajnik Notatek Nepomuk -Name[pt]=Fontes de Notas do Nepomuk -Name[pt_BR]=Alimentador de notas para o Nepomuk -Name[ru]=Добавление заметок в Nepomuk -Name[sk]=Podávač poznámok Nepomuk -Name[sl]=Podajalnik notic za Nepomuk -Name[sr]=Непомуков уводник бележака -Name[sr@ijekavian]=Непомуков уводник бележака -Name[sr@ijekavianlatin]=Nepomukov uvodnik beležaka -Name[sr@latin]=Nepomukov uvodnik beležaka -Name[sv]=Anteckningsinmatning till Nepomuk -Name[tr]=Nepomuk Not Besleyici -Name[uk]=Передавач нотаток Nepomuk -Name[x-test]=xxNepomuk Note Feederxx -Name[zh_CN]=Nepomuk 便笺采集器 -Name[zh_TW]=Nepomuk Note Feeder diff -Nru kdepim-runtime-4.12.3/agents/nepomukfeeder/plugins/nepomuknotefeeder.h kdepim-runtime-4.12.90/agents/nepomukfeeder/plugins/nepomuknotefeeder.h --- kdepim-runtime-4.12.3/agents/nepomukfeeder/plugins/nepomuknotefeeder.h 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/agents/nepomukfeeder/plugins/nepomuknotefeeder.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,39 +0,0 @@ -/* - Copyright (c) 2011 Christian Mollekopf - - 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 NEPOMUKNOTEFEEDER_H -#define NEPOMUKNOTEFEEDER_H - -#include - -namespace Akonadi { - -class NepomukNoteFeeder: public NepomukFeederPlugin -{ - Q_OBJECT - Q_INTERFACES( Akonadi::NepomukFeederPlugin ) -public: - NepomukNoteFeeder( QObject *parent, const QVariantList & ): NepomukFeederPlugin( parent ){}; - virtual void updateItem( const Akonadi::Item& item, Nepomuk2::SimpleResource& res, Nepomuk2::SimpleResourceGraph& graph ); -}; - -} - -#endif // NEPOMUKNOTEFEEDER_H diff -Nru kdepim-runtime-4.12.3/agents/nepomukfeeder/propertycache.cpp kdepim-runtime-4.12.90/agents/nepomukfeeder/propertycache.cpp --- kdepim-runtime-4.12.3/agents/nepomukfeeder/propertycache.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/agents/nepomukfeeder/propertycache.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,210 +0,0 @@ -/* - * Copyright (C) 2012 Christian Mollekopf - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation, either version 3 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 Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program. If not, see . - */ - -#include "propertycache.h" - -#include -#include -#include -#include -#include -#include - - -PropertyCache::PropertyCache() -// : mTotal(1), -// mHits(1) -{ -} - -void PropertyCache::setCachedTypes(const QList< QUrl > &cachedTypes) -{ - mCachedTypes = cachedTypes; -} - -void PropertyCache::setSize(int size) -{ - mCache.setMaxCost(size); -} - -/* - * This hash function uses XOR to combine the individual hashes of each property. - * Due to this: - * * the order of the hashes is not preseved in the hash (XOR is commutative) - * * XOR of two equal values results in 0, but that shouldn't be a problem in this specific case. - */ -uint PropertyCache::hashProperties(const Nepomuk2::PropertyHash &properties) const -{ - uint hash = 0; - QHashIterator it( properties ); - while( it.hasNext() ) { - it.next(); - hash ^= qHash( it.key() ) ^ qHash( it.value().toString() ); - } - return hash; -} - -uint PropertyCache::getHashOfProperty(const QUrl &url, QList &list) const -{ - QList::iterator it = list.begin(); - QList::iterator end = list.end(); - for (;it != end; ++it) { - if (it->uri() == url) { - return hashResource(*it, list); - } - } - //If we get a full graph, every temporary uri should also be desribed in the same graph - kWarning() << "resource not found " << url; - Q_ASSERT(0); - return 0; -} - -uint PropertyCache::hashResource(Nepomuk2::SimpleResource &res, QList &list) const -{ - const Nepomuk2::SimpleResource copy = res; - Nepomuk2::PropertyHash::const_iterator it = copy.properties().constBegin(); - Nepomuk2::PropertyHash::const_iterator end = copy.properties().constEnd(); - for (;it != end; ++it) { - if (it.value().canConvert() && it.value().toUrl().toString().startsWith(QLatin1String("_:"))) { - const int hash = getHashOfProperty(it.value().toUrl(), list); - res.setProperty(it.key(), QString::number(hash)); - } - } - return hashProperties(res.properties()); -} - -void PropertyCache::applyCache(Nepomuk2::SimpleResource &res, const QHash &tempHashMap) const -{ - const Nepomuk2::SimpleResource copy = res; - Nepomuk2::PropertyHash::const_iterator it = copy.properties().constBegin(); - for (;it != copy.properties().constEnd(); ++it) { - if (it.value().canConvert() && it.value().toUrl().toString().startsWith(QLatin1String("_:"))) { - uint hash = tempHashMap.value(it.value().toUrl()); -// mTotal++; - if (!mCache.contains(hash)) { -// kDebug() << "value not available in cache"; - continue; - } -// mHits++; -// kDebug() << "Hit ratio: " << (double)mHits/(double)mTotal << " Hits: " << mHits << " Total: " << mTotal; - res.setProperty(it.key(), *mCache.object(hash)); - } - } -} - -bool PropertyCache::cachingEnabled(const Nepomuk2::SimpleResource& res) const -{ -// kDebug() << "types: " << res.property(Soprano::Vocabulary::RDF::type()); - const QVariantList types = res.property(Soprano::Vocabulary::RDF::type()); - foreach (const QVariant &variant, types) { - Q_ASSERT(variant.canConvert()); - if (mCachedTypes.contains(variant.toUrl())) { - return true; - } - } - return false; -} - -QHash PropertyCache::findCachedResources(const Nepomuk2::SimpleResourceGraph &graph) const -{ - QHash tempHashMap; - QList list = graph.toList(); - for (QList::iterator it = list.begin(); it != list.end(); ++it) { - if (!cachingEnabled(*it)) { //If the caching wasn't enabled before it likely still isn't (that saves us the hashing) - continue; - } - - uint hash = hashResource(*it, list); - if (mCache.contains(hash)) { - tempHashMap.insert(it->uri(), hash); - } - } - return tempHashMap; -} - -/* - * Go through graph, and replace every temporary uri with the hash of the referenced resource (so the hashing process gives always the same result) - * We cannot hash the temporary uri as it wouldn't be guaranteed to be always the same. - * In the end return a mapping of the temporary uri to the corresponding resources hash. - */ -QMap PropertyCache::hashResources(const Nepomuk2::SimpleResourceGraph& graph) const -{ - QMap waitingForUri; - QList list = graph.toList(); - for (QList::iterator it = list.begin(); it != list.end(); ++it) { - if (!cachingEnabled(*it)) { - continue; - } - uint hash = hashResource(*it, list); - if (!mCache.contains(hash)) { - waitingForUri.insert(hash, it->uri()); //insert into cache after we have the map - } - } - return waitingForUri; -} - -/* - * Fill the cache once we have the definitive mapping from the storeresourcesjob. - * Note that we cannot replace the temporary uris right away, as the whole point of the cache is that we can identify equivalent resources before storage (so the cache results in less data to store). - */ -void PropertyCache::fillCache(const Nepomuk2::SimpleResourceGraph& graph, const QHash< QUrl, QUrl >& mappings) -{ - const QMap waitingForUri = hashResources(graph); - QMap::const_iterator it = waitingForUri.constBegin(); - QMap::const_iterator end = waitingForUri.constEnd(); - for (; it != end; ++it) { - // There are cases where the mappings do not contain a resoucce. This is because we use - // the MergeDuplicateResources flag in StoreResources and the duplicates do not have - // mappings - if (mappings.contains(it.value()) ) { - mCache.insert(it.key(), new QUrl(mappings.value(it.value()))); - } - } -} - - -Nepomuk2::SimpleResourceGraph PropertyCache::applyCache(const Nepomuk2::SimpleResourceGraph &graph) const -{ - //find the resources which we have already cached - QHash tempHashMap = findCachedResources(graph); - - QList result = graph.toList(); - - //Remove what we have already stored - QMutableListIterator it(result); - while (it.hasNext()) { - const Nepomuk2::SimpleResource &res = it.next(); - if (tempHashMap.contains(res.uri()) && mCache.contains(tempHashMap.value(res.uri()))) { -// kDebug() << "removing " << res.uri(); - it.remove(); - } - } - - //Go through all properties and replace any temp uri with it's cache value based on tempHashMap and cache - QList::iterator resIt = result.begin(); - for (;resIt != result.end(); ++resIt) { - applyCache(*resIt, tempHashMap); - } - -// kDebug() << tempHashMap; -// qDebug() << "------------"; -// qDebug() << result; -// qDebug() << "------------"; - - return Nepomuk2::SimpleResourceGraph(result); -} - diff -Nru kdepim-runtime-4.12.3/agents/nepomukfeeder/propertycache.h kdepim-runtime-4.12.90/agents/nepomukfeeder/propertycache.h --- kdepim-runtime-4.12.3/agents/nepomukfeeder/propertycache.h 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/agents/nepomukfeeder/propertycache.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,77 +0,0 @@ -/* - * Copyright (C) 2012 Christian Mollekopf - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation, either version 3 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 Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program. If not, see . - */ - -#ifndef PROPERTYCACHE_H -#define PROPERTYCACHE_H -#include -#include -#include -#include - -/** - * A cache for nepomuk resources which are being stored using a SimpleResourceGraph. - * The basic idea is to avoid repeatedly storing the same subresources of resources, - * such as i.e. the email headers which are part of nearly every email. - * To achieve this, all stored resouces are hashed, and the cache maintains hash-resourceUri pairs. - * If a new graph is passed to the cache, equivalent resources can be identified based the hash, - * which allows to insert the final resourceUri right away and avoids storing the same resource again. - */ -class PropertyCache -{ -public: - PropertyCache(); - - /** - * Fill the cache using the stored graph (which contains temporary uris), and the mapping to the final uris - * which is returned by Nepomuk2::StoreResourceJob. - * This will fill the cache with resource of the cached types. - */ - void fillCache(const Nepomuk2::SimpleResourceGraph &graph, const QHash &mappings); - - /** - * Apply the cache to the graph, and return a graph with all already cached resources removed and the corresponding references - * replaced by a final resource-uri. - */ - Nepomuk2::SimpleResourceGraph applyCache(const Nepomuk2::SimpleResourceGraph &) const; - - /** - * Sets the RDF:Types which should be cached. - * Nothin is cached by default. - */ - void setCachedTypes(const QList &); - - /** - * Sets the maximum cache size. - * The default is 100 items - */ - void setSize(int); - -private: - QMap hashResources(const Nepomuk2::SimpleResourceGraph &graph) const; - QHash findCachedResources(const Nepomuk2::SimpleResourceGraph &graph) const; - void applyCache(Nepomuk2::SimpleResource &res, const QHash &tempHashMap) const; - bool cachingEnabled(const Nepomuk2::SimpleResource &res) const; - uint hashResource(Nepomuk2::SimpleResource &res, QList &list) const; - uint getHashOfProperty(const QUrl &url, QList &list) const; - uint hashProperties(const Nepomuk2::PropertyHash &properties) const; - QCache mCache; - QList mCachedTypes; -// mutable uint mTotal; -// mutable uint mHits; -}; - -#endif // PROPERTYCACHE_H diff -Nru kdepim-runtime-4.12.3/agents/nepomukfeeder/README kdepim-runtime-4.12.90/agents/nepomukfeeder/README --- kdepim-runtime-4.12.3/agents/nepomukfeeder/README 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/agents/nepomukfeeder/README 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -The plugin code actually belongs to kdepimlibs, as soon as the dms-copy mess is sorted out (nepomuk repository on which we can depend in kdepimlibs) \ No newline at end of file diff -Nru kdepim-runtime-4.12.3/agents/nepomukfeeder/test/akonadinepomukfeeder_indexer.cpp kdepim-runtime-4.12.90/agents/nepomukfeeder/test/akonadinepomukfeeder_indexer.cpp --- kdepim-runtime-4.12.3/agents/nepomukfeeder/test/akonadinepomukfeeder_indexer.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/agents/nepomukfeeder/test/akonadinepomukfeeder_indexer.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,97 +0,0 @@ -/* - * Copyright (C) 2012 Christian Mollekopf - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 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 General Public License - * along with this program. If not, see . - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -class Tester: public QObject -{ - Q_OBJECT -public: - Tester(QObject *o): QObject(o){}; - ~Tester(){}; -public Q_SLOTS: - void progress(int p) { - kDebug() << "progress " << p; - } - - void running(const QString &p) { - kDebug() << "running " << p; - } - - void removalComplete(KJob *job) { - kDebug(); - if ( job->error() ) - kDebug() << job->errorString(); - } -}; - -int main(int argc, char *argv[]) -{ - QCoreApplication app( argc, argv ); - if ( app.arguments().size() != 3 ) { - kWarning() << "not enough arguments, check the source"; - } - Tester *tester = new Tester( &app ); - Akonadi::Entity::Id id = app.arguments().at( 2 ).toInt(); - if ( app.arguments().at( 1 ) == QString::fromLatin1( "item" ) ) { - ItemQueue *queue = new ItemQueue( 1, 1, &app ); - kDebug() << "indexing item: " << id; - queue->addItem( Akonadi::Item( id ) ); - queue->processBatch(); - QObject::connect( queue, SIGNAL(finished()), &app, SLOT(quit())); - } else if ( app.arguments().at( 1 ) == QString::fromLatin1( "rm-item" ) ) { - kDebug() << "removing item: " << Akonadi::Item( id ).url().url(); - KJob *job = Nepomuk2::removeDataByApplication( QList() << Akonadi::Item( id ).url().url(), Nepomuk2::RemoveSubResoures, KGlobal::mainComponent() ); - QObject::connect( job, SIGNAL(finished(KJob*)), tester, SLOT(removalComplete(KJob*)) ); - } else if ( app.arguments().at( 1 ) == QString::fromLatin1( "collection" ) ) { - IndexScheduler *feederq = new IndexScheduler( &app ); - kDebug() << "indexing collection: " << id; - feederq->setReindexing( true ); - feederq->setOnline( true ); - feederq->addCollection( Akonadi::Collection( id ) ); - - QObject::connect(feederq, SIGNAL(fullyIndexed()), &app, SLOT(quit())); - QObject::connect(feederq, SIGNAL(progress(int)), tester, SLOT(progress(int))); - QObject::connect(feederq, SIGNAL(running(QString)), tester, SLOT(running(QString))); - } else if ( app.arguments().at( 1 ) == QString::fromLatin1( "check-collection" ) ) { - int indexerLevel = 3; - kDebug() << "Already indexed: " << Nepomuk2::ResourceManager::instance()->mainModel()->executeQuery( QString::fromLatin1( "ask where { ?r %1 %2 ; %3 %4 . }" ) - .arg( Soprano::Node::resourceToN3( Vocabulary::NIE::url() ), - Soprano::Node::resourceToN3( Akonadi::Collection( id ).url() ), - Soprano::Node::resourceToN3( Vocabulary::ANEO::akonadiIndexCompatLevel() ), - Soprano::Node::literalToN3( indexerLevel ) ), - Soprano::Query::QueryLanguageSparql ).boolValue(); - app.quit(); - } - - return app.exec(); -} - -#include "akonadinepomukfeeder_indexer.moc" diff -Nru kdepim-runtime-4.12.3/agents/nepomukfeeder/test/cachetest.cpp kdepim-runtime-4.12.90/agents/nepomukfeeder/test/cachetest.cpp --- kdepim-runtime-4.12.3/agents/nepomukfeeder/test/cachetest.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/agents/nepomukfeeder/test/cachetest.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,128 +0,0 @@ -/* - Copyright (C) 2012 Christian Mollekopf - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 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 General Public License - along with this program. If not, see . -*/ - -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include - -using namespace Nepomuk2::Vocabulary; -using namespace Soprano::Vocabulary; - -class CacheTest: public QObject -{ - Q_OBJECT -private slots: - void testCache() - { - PropertyCache cache; - cache.setCachedTypes(QList() - << NCO::EmailAddress() - << NCO::Contact() - ); - - Nepomuk2::SimpleResource emailAddressRes; - emailAddressRes.addType( NCO::EmailAddress() ); - emailAddressRes.addProperty( NCO::emailAddress(), QLatin1String("test@example.org") ); - - Nepomuk2::SimpleResource contactRes; - contactRes.addType( NCO::Contact() ); - contactRes.addProperty( NCO::hasEmailAddress(), emailAddressRes ); - - Nepomuk2::SimpleResource emailRes; - emailRes.addType( NMO::Email() ); - emailRes.addProperty( NMO::to(), contactRes ); - - Nepomuk2::SimpleResourceGraph graph; - graph << emailAddressRes << contactRes << emailRes; - - QHash mapping; - mapping.insert(emailAddressRes.uri(), QUrl(QLatin1String("nepomuk://a"))); - mapping.insert(contactRes.uri(), QUrl(QLatin1String("nepomuk://b"))); - mapping.insert(emailRes.uri(), QUrl(QLatin1String("nepomuk://c"))); - - cache.fillCache(graph, mapping); -// kDebug() << graph; - - Nepomuk2::SimpleResourceGraph result = cache.applyCache(graph); -// kDebug() << result; - QCOMPARE(result.toList().size(), 1); - - Nepomuk2::SimpleResource res1 = result.toList().at(0); - QCOMPARE(res1.uri(), emailRes.uri()); - QCOMPARE(res1.property(RDF::type()).first().toUrl(), NMO::Email()); - QCOMPARE(res1.property(NMO::to()).first().toUrl(), QUrl(QLatin1String("nepomuk://b"))); - } - - void testCacheLimit() - { - PropertyCache cache; - cache.setCachedTypes(QList() - << QUrl(QLatin1String("http://www.semanticdesktop.org/ontologies/2007/03/22/nco#EmailAddress")) - << QUrl(QLatin1String("http://www.semanticdesktop.org/ontologies/2007/03/22/nco#Contact")) - ); - cache.setSize(1); - - Nepomuk2::SimpleResourceGraph graph; - Nepomuk2::SimpleResource res; - Nepomuk2::NMO::Email mail( &res ); - QList contacts; - Nepomuk2::SimpleResource contactRes; - Nepomuk2::NCO::Contact contact( &contactRes ); - contactRes.setProperty( Soprano::Vocabulary::NAO::prefLabel(), QLatin1String("name") ); - Nepomuk2::SimpleResource emailRes; - Nepomuk2::NCO::EmailAddress email( &emailRes ); - email.setEmailAddress( QLatin1String("test@example.org") ); - graph << emailRes; - contact.addHasEmailAddress( emailRes.uri() ); - graph << contactRes; - contacts << contactRes.uri(); - mail.setTos( contacts ); - graph << res; - - QHash mapping; - mapping.insert(res.uri(), QUrl(QLatin1String("nepomuk://a"))); - mapping.insert(contactRes.uri(), QUrl(QLatin1String("nepomuk://b"))); - mapping.insert(emailRes.uri(), QUrl(QLatin1String("nepomuk://c"))); - cache.fillCache(graph, mapping); -// kDebug() << graph; - - Nepomuk2::SimpleResourceGraph result = cache.applyCache(graph); - kDebug() << result; - QCOMPARE(result.toList().size(), 2); - Nepomuk2::SimpleResource res1 = result.toList().at(0); - QCOMPARE(res1.uri(), res.uri()); - QCOMPARE(res1.property(QUrl(QLatin1String("http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#to"))).first().toUrl(), QUrl(QLatin1String("nepomuk://b"))); - Nepomuk2::SimpleResource res2 = result.toList().at(1); - QCOMPARE(res2.uri(), emailRes.uri()); - QCOMPARE(res2.property(QUrl(QLatin1String("http://www.semanticdesktop.org/ontologies/2007/03/22/nco#emailAddress"))).first().toString(), QLatin1String("test@example.org")); - } - - -}; - -QTEST_AKONADIMAIN( CacheTest, NoGUI ) - -#include "cachetest.moc" - diff -Nru kdepim-runtime-4.12.3/agents/nepomukfeeder/test/CMakeLists.txt kdepim-runtime-4.12.90/agents/nepomukfeeder/test/CMakeLists.txt --- kdepim-runtime-4.12.3/agents/nepomukfeeder/test/CMakeLists.txt 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/agents/nepomukfeeder/test/CMakeLists.txt 1970-01-01 00:00:00.000000000 +0000 @@ -1,39 +0,0 @@ -include_directories( - ${CMAKE_CURRENT_SOURCE_DIR}/.. -) - -add_definitions(-DTEST_DATA_PATH="\\"${CMAKE_CURRENT_SOURCE_DIR}\\"") - -kde4_add_executable(akonadinepomukfeeder_indexer akonadinepomukfeeder_indexer.cpp ../indexscheduler.cpp ../itemqueue.cpp ../propertycache.cpp ../findunindexeditemsjob.cpp ../nepomukhelpers.cpp ../pluginloader.cpp ../eventmonitor.cpp) -target_link_libraries( akonadinepomukfeeder_indexer - ${NEPOMUKFEEDER_SHARED_LIBS} - ${KDEPIMLIBS_AKONADI_KMIME_LIBS} - nepomukfeederpluginlib -) - -kde4_add_executable(performancetest performancetest.cpp ../nepomukhelpers.cpp ../propertycache.cpp ../pluginloader.cpp) -target_link_libraries( performancetest - ${QT_QTTEST_LIBRARY} - ${NEPOMUKFEEDER_SHARED_LIBS} - ${KDEPIMLIBS_AKONADI_KMIME_LIBS} - ${KDEPIMLIBS_KMIME_LIBS} - nepomukfeederpluginlib -) - -kde4_add_executable(querytest querytest.cpp ../nepomukhelpers.cpp ../pluginloader.cpp ../findunindexeditemsjob.cpp) -target_link_libraries( querytest - ${QT_QTTEST_LIBRARY} - ${NEPOMUKFEEDER_SHARED_LIBS} - ${KDEPIMLIBS_AKONADI_KMIME_LIBS} - ${KDEPIMLIBS_KMIME_LIBS} - nepomukfeederpluginlib -) - -kde4_add_executable(cachetest cachetest.cpp ../propertycache.cpp) -target_link_libraries( cachetest - ${QT_QTTEST_LIBRARY} - ${NEPOMUKFEEDER_SHARED_LIBS} - ${KDEPIMLIBS_AKONADI_KMIME_LIBS} - ${KDEPIMLIBS_KMIME_LIBS} - nepomukfeederpluginlib -) diff -Nru kdepim-runtime-4.12.3/agents/nepomukfeeder/test/performancetest.cpp kdepim-runtime-4.12.90/agents/nepomukfeeder/test/performancetest.cpp --- kdepim-runtime-4.12.3/agents/nepomukfeeder/test/performancetest.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/agents/nepomukfeeder/test/performancetest.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,170 +0,0 @@ -/* - Copyright (C) 2012 Christian Mollekopf - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 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 General Public License - along with this program. If not, see . -*/ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "../nepomukhelpers.h" -#include -#define TESTFILEDIR QString::fromLatin1(TEST_DATA_PATH "/testfiles/") - -/** - * This "test" should hopefully give a reproducible base to compare indexing speeds across systems. - * It's not an automated test which can fail, if we have some reliable numbers we could make sure it doesn't get worse than that. - * Note that the code writes directly to the real nepomuk db, but with an akonadi item id which is never going to exist. - */ -class PerformanceTest: public QObject -{ - Q_OBJECT - - static KMime::Message::Ptr readMimeFile( const QString &fileName) - { - // qDebug() << fileName; - QFile file( fileName ); - if (!file.open( QFile::ReadOnly )) { - kWarning() << "failed to open file: " << fileName; - return KMime::Message::Ptr(); - } - const QByteArray data = file.readAll(); - - KMime::Message::Ptr msg = KMime::Message::Ptr(new KMime::Message); - msg->setContent( data ); - msg->parse(); - return msg; - } - -private slots: - - void testMail_data() - { - QTest::addColumn("file"); - QTest::newRow("simpleMail") << TESTFILEDIR.append(QString::fromLatin1("simplemail.mime")); -// QTest::newRow("realworldmail") << TESTFILEDIR.append(QString::fromLatin1("realworldmail.mime")); -// QTest::newRow("mailWithCoupleOfCCs") << TESTFILEDIR.append(QString::fromLatin1("mailWithACoupleOfCCs.mime")); - //FIXME That's to much so far for nepomuk -// QTest::newRow("mailWithLoadsOfCCs") << TESTFILEDIR.append(QString::fromLatin1("mailWithLoadsOfCCs.mime")); - } - - void jobResult(KJob *job) - { - if (job->error()) { - kWarning() << "Error:"; - kWarning() << job->errorString(); - } - } - - void testMail() - { - QTime time; - time.start(); - Akonadi::Item item(std::numeric_limits < Akonadi::Entity::Id >::max()); - item.setModificationTime(QDateTime(QDate(2012, 01, 02))); - QFETCH(QString, file); - KMime::Message::Ptr msg = readMimeFile(file); - QVERIFY(msg); - item.setPayload(msg); - item.setMimeType(KMime::Message::mimeType()); - Nepomuk2::SimpleResourceGraph graph; - NepomukHelpers::addItemToGraph( item, graph ); - KJob *addGraphJob = NepomukHelpers::addGraphToNepomuk( graph ); - connect(addGraphJob, SIGNAL(result(KJob*)), this, SLOT(jobResult(KJob*))); - addGraphJob->exec(); - kDebug() << "Storing the graph took(ms): " << time.elapsed(); - time.start(); - KJob *removeJob = Nepomuk2::removeResources( QList () << item.url(), Nepomuk2::RemoveSubResoures ); - connect(removeJob, SIGNAL(result(KJob*)), this, SLOT(jobResult(KJob*))); - removeJob->exec(); - kDebug() << "Removing the data took(ms): " << time.elapsed(); - } - - void testMailCached_data() - { - QTest::addColumn("file"); - QTest::newRow("simpleMail") << TESTFILEDIR.append(QString::fromLatin1("simplemail.mime")); - } - - - - void testMailCached() - { - QTime time; - time.start(); - Akonadi::Item item(std::numeric_limits < Akonadi::Entity::Id >::max()); - item.setModificationTime(QDateTime(QDate(2012, 01, 02))); - QFETCH(QString, file); - KMime::Message::Ptr msg = readMimeFile(file); - QVERIFY(msg); - item.setPayload(msg); - item.setMimeType(KMime::Message::mimeType()); - - Nepomuk2::SimpleResourceGraph graph; - NepomukHelpers::addItemToGraph( item, graph ); - - KJob *addGraphJob = NepomukHelpers::addGraphToNepomuk( graph ); - connect(addGraphJob, SIGNAL(result(KJob*)), this, SLOT(jobResult(KJob*))); - addGraphJob->exec(); - kDebug() << "Storing the graph took(ms): " << time.elapsed(); - - Nepomuk2::StoreResourcesJob *storeJob = static_cast(addGraphJob); - const QHash mappings = storeJob->mappings(); - qDebug() << mappings; - - PropertyCache propertyCache; - propertyCache.setCachedTypes(QList() - << QUrl(QLatin1String("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#FreeDesktopIcon")) - << QUrl(QLatin1String("http://www.semanticdesktop.org/ontologies/2007/03/22/nco#EmailAddress")) - << QUrl(QLatin1String("http://www.semanticdesktop.org/ontologies/2007/03/22/nco#Contact")) - ); - propertyCache.fillCache(graph, mappings); - - time.start(); - KJob *removeJob = Nepomuk2::removeResources( QList () << item.url(), Nepomuk2::RemoveSubResoures ); - connect(removeJob, SIGNAL(result(KJob*)), this, SLOT(jobResult(KJob*))); - removeJob->exec(); - kDebug() << "Removing the data took(ms): " << time.elapsed(); - - Nepomuk2::SimpleResourceGraph graph2; - NepomukHelpers::addItemToGraph( item, graph2 ); - - const Nepomuk2::SimpleResourceGraph resultGraph = propertyCache.applyCache(graph2); - - addGraphJob = NepomukHelpers::addGraphToNepomuk( resultGraph ); - connect(addGraphJob, SIGNAL(result(KJob*)), this, SLOT(jobResult(KJob*))); - addGraphJob->exec(); - kDebug() << "Storing the graph again took(ms): " << time.elapsed(); - - time.start(); - removeJob = Nepomuk2::removeResources( QList () << item.url(), Nepomuk2::RemoveSubResoures ); - connect(removeJob, SIGNAL(result(KJob*)), this, SLOT(jobResult(KJob*))); - removeJob->exec(); - kDebug() << "Removing the data took(ms): " << time.elapsed(); - } - - -}; - - -QTEST_AKONADIMAIN( PerformanceTest, NoGUI ) - -#include "performancetest.moc" - diff -Nru kdepim-runtime-4.12.3/agents/nepomukfeeder/test/querytest.cpp kdepim-runtime-4.12.90/agents/nepomukfeeder/test/querytest.cpp --- kdepim-runtime-4.12.3/agents/nepomukfeeder/test/querytest.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/agents/nepomukfeeder/test/querytest.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,107 +0,0 @@ -/* - Copyright (C) 2012 Christian Mollekopf - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 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 General Public License - along with this program. If not, see . -*/ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "nepomukfeeder-config.h" - -/** - */ -class QueryTest: public QObject -{ - Q_OBJECT - -private slots: - - void testNepomukQueryByType() - { - QTime time; - time.start(); - Soprano::QueryResultIterator result = Nepomuk2::ResourceManager::instance()->mainModel()->executeQuery(QString::fromLatin1("SELECT ?r WHERE { ?r a %1 }") - .arg(Soprano::Node::resourceToN3(Vocabulary::ANEO::AkonadiDataObject())), - Soprano::Query::QueryLanguageSparql); - kDebug() << "Query took(ms): " << time.elapsed(); - time.start(); - int i = 0; - while (result.next()) { - i++; - } - kDebug() << "total " << i << " results"; - kDebug() << "Query took(ms): " << time.elapsed(); - } - - void testNepomukQueryByTypeAndVersion() - { - QTime time; - time.start(); - Soprano::QueryResultIterator result = Nepomuk2::ResourceManager::instance()->mainModel()->executeQuery(QString::fromLatin1("SELECT ?r WHERE { ?r a %1 . ?r %2 %3 }") - .arg(Soprano::Node::resourceToN3(Vocabulary::ANEO::AkonadiDataObject()), - Soprano::Node::resourceToN3(Vocabulary::ANEO::akonadiIndexCompatLevel()), - Soprano::Node::literalToN3(3) - ), - Soprano::Query::QueryLanguageSparql); - kDebug() << "Query took(ms): " << time.elapsed(); - time.start(); - int i = 0; - while (result.next()) { - i++; - } - kDebug() << "total " << i << " results"; - kDebug() << "Query took(ms): " << time.elapsed(); - } - - void testAkonadiQuery() - { - QTime time; - time.start(); - Akonadi::RecursiveItemFetchJob *itemFetchJob = new Akonadi::RecursiveItemFetchJob(Akonadi::Collection::root(), QStringList(), this); - itemFetchJob->fetchScope().fetchAllAttributes(false); - itemFetchJob->fetchScope().fetchFullPayload(false); - itemFetchJob->exec(); - kDebug() << "Query took(ms): " << time.elapsed(); - kDebug() << "items " << itemFetchJob->items().size(); - } - - void testFindJob() - { - QTime time; - time.start(); - FindUnindexedItemsJob *job = new FindUnindexedItemsJob(NEPOMUK_FEEDER_INDEX_COMPAT_LEVEL, this); - job->exec(); - kDebug() << job->getUnindexed().size(); - kDebug() << "Query took(ms): " << time.elapsed(); - } -}; - - -QTEST_AKONADIMAIN( QueryTest, NoGUI ) - -#include "querytest.moc" - diff -Nru kdepim-runtime-4.12.3/agents/nepomukfeeder/test/testfiles/mailWithACoupleOfCCs.mime kdepim-runtime-4.12.90/agents/nepomukfeeder/test/testfiles/mailWithACoupleOfCCs.mime --- kdepim-runtime-4.12.3/agents/nepomukfeeder/test/testfiles/mailWithACoupleOfCCs.mime 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/agents/nepomukfeeder/test/testfiles/mailWithACoupleOfCCs.mime 1970-01-01 00:00:00.000000000 +0000 @@ -1,15 +0,0 @@ -From: Christian Mollekopf -To: test2@example.org, test3@example.org, test4@example.org, test5@example.org, test6@example.org, test7@example.org, test8@example.org, test9@example.org, test10@example.org, test11@example.org, test12@example.org, test13@example.org, test14@example.org, test15@example.org, test16@example.org, test17@example.org, test18@example.org, test19@example.org, test20@example.org -Cc: test007@example.org -Subject: test -Date: Thu, 18 Oct 2012 17:44:50 +0200 -Message-ID: <64321285.FBxvQ0Zopl@myhost2> -X-KMail-Identity: 70513270 -X-KMail-Transport: 2005596422 -X-KMail-Fcc: 5 -User-Agent: KMail/4.10 pre (Linux/3.5.6-1-ARCH; KDE/4.9.2; x86_64; git-b8f489b; 2012-10-16) -MIME-Version: 1.0 -Content-Transfer-Encoding: 7Bit -Content-Type: text/plain; charset="us-ascii" - -test diff -Nru kdepim-runtime-4.12.3/agents/nepomukfeeder/test/testfiles/mailWithLoadsOfCCs.mime kdepim-runtime-4.12.90/agents/nepomukfeeder/test/testfiles/mailWithLoadsOfCCs.mime --- kdepim-runtime-4.12.3/agents/nepomukfeeder/test/testfiles/mailWithLoadsOfCCs.mime 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/agents/nepomukfeeder/test/testfiles/mailWithLoadsOfCCs.mime 1970-01-01 00:00:00.000000000 +0000 @@ -1,15 +0,0 @@ -From: Christian Mollekopf -To: test2@example.org, test3@example.org, test4@example.org, test5@example.org, test6@example.org, test7@example.org, test8@example.org, test9@example.org, test10@example.org, test11@example.org, test12@example.org, test13@example.org, test14@example.org, test15@example.org, test16@example.org, test17@example.org, test18@example.org, test19@example.org, test20@example.org, test21@example.org, test22@example.org, test23@example.org, test24@example.org, test25@example.org, test26@example.org, test27@example.org, test28@example.org, test29@example.org, test30@example.org, test31@example.org, test32@example.org, test33@example.org, test34@example.org, test35@example.org, test36@example.org, test37@example.org, test38@example.org, test39@example.org, test40@example.org, test41@example.org, test42@example.org, test43@example.org, test44@example.org, test45@example.org, test46@example.org, test47@example.org, test48@example.org, test49@example.org, test50@example.org, test51@example.org, test52@example.org, test53@example.org, test54@example.org, test55@example.org, test56@example.org, test57@example.org, test58@example.org, test59@example.org, test60@example.org, test61@example.org, test62@example.org, test63@example.org, test64@example.org, test65@example.org, test66@example.org, test67@example.org, test68@example.org, test69@example.org, test70@example.org, test71@example.org, test72@example.org, test73@example.org, test74@example.org, test75@example.org, test76@example.org, test77@example.org, test78@example.org, test79@example.org, test80@example.org, test81@example.org, test82@example.org, test83@example.org, test84@example.org, test85@example.org, test86@example.org, test87@example.org, test88@example.org, test89@example.org, test90@example.org, test91@example.org, test92@example.org, test93@example.org, test94@example.org, test95@example.org, test96@example.org, test97@example.org, test98@example.org, test99@example.org, test100@example.org -Cc: test007@example.org -Subject: test -Date: Thu, 18 Oct 2012 17:44:50 +0200 -Message-ID: <64321285.FBxvQ0Zopl@myhost2> -X-KMail-Identity: 70513270 -X-KMail-Transport: 2005596422 -X-KMail-Fcc: 5 -User-Agent: KMail/4.10 pre (Linux/3.5.6-1-ARCH; KDE/4.9.2; x86_64; git-b8f489b; 2012-10-16) -MIME-Version: 1.0 -Content-Transfer-Encoding: 7Bit -Content-Type: text/plain; charset="us-ascii" - -test diff -Nru kdepim-runtime-4.12.3/agents/nepomukfeeder/test/testfiles/realworldmail.mime kdepim-runtime-4.12.90/agents/nepomukfeeder/test/testfiles/realworldmail.mime --- kdepim-runtime-4.12.3/agents/nepomukfeeder/test/testfiles/realworldmail.mime 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/agents/nepomukfeeder/test/testfiles/realworldmail.mime 1970-01-01 00:00:00.000000000 +0000 @@ -1,159 +0,0 @@ -Return-Path: -Received: from compute4.internal (compute4.nyi.mail.srv.osa [10.202.2.44]) - by slots3a1p1 (Cyrus git2.5+0-git-fastmail-8213) with LMTPA; - Fri, 22 Jun 2012 13:08:36 -0400 -X-Sieve: CMU Sieve 2.4 -X-Spam-score: 0.0 -X-Spam-hits: BAYES_00 -1.9, RCVD_IN_DNSWL_MED -2.3, T_RP_MATCHES_RCVD -0.01, - BAYES_USED global, SA_VERSION 3.3.1 -X-Spam-source: IP='46.4.96.248', Host='postbox.kde.org', Country='DE', FromHeader='com', - MailFrom='org' -X-Spam-charsets: plain='us-ascii', plain='us-ascii' -X-Attached: signature.asc -X-Resolved-to: chrigi_1@fastmail.fm -X-Delivered-to: chrigi_1@fastmail.fm -X-Mail-from: kde-pim-bounces@kde.org -Received: from mx2.nyi.mail.srv.osa ([10.202.2.201]) - by compute4.internal (LMTPProxy); Fri, 22 Jun 2012 13:08:36 -0400 -Received: from postbox.kde.org (postbox.kde.org [46.4.96.248]) - by mx2.messagingengine.com (Postfix) with ESMTP id C27017601B4 - for ; Fri, 22 Jun 2012 13:08:35 -0400 (EDT) -Received: from postbox.kde.org (localhost [IPv6:::1]) - by postbox.kde.org (Postfix) with ESMTP id BD852B3732F; - Fri, 22 Jun 2012 17:08:31 +0000 (UTC) -DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=kde.org; s=default; - t=1340384914; bh=6xcrdtmBJZEp/6CFzHndw0bmCAeoNqXWQi79IvuRT9w=; - h=From:To:Date:Message-ID:MIME-Version:Cc:Subject:Reply-To:List-Id: - List-Unsubscribe:List-Post:List-Help:List-Subscribe:Content-Type: - Sender; b=jfAeaggT/1e0vHNduiiXqVSHkDjiUYOFsstXGbAjxKbC08LoWjm1W6Qd - QjtLCW8bQOvu2DusEwZ8yTbSsWCBXJVC6m+66JEQQ6iIWlkkn7EANg32+o3pu4K+kKX - KOicPBp/+0sKDjdzCS34mNsJ9ZjWjQQGMi562BSQ2Xqnxxog= -X-Original-To: kde-pim@kde.org -X-Remote-Delivered-To: kde-pim@localhost.kde.org -Received: from kolab.kolabsys.com (kolab.kolabsys.com [78.46.32.248]) - by postbox.kde.org (Postfix) with ESMTP id 3C7CAB3732F - for ; Fri, 22 Jun 2012 17:08:07 +0000 (UTC) -Received: from localhost (localhost [127.0.0.1]) - by kolab.kolabsys.com (Postfix) with ESMTP id 40EBA2626F83 - for ; Fri, 22 Jun 2012 19:08:06 +0200 (CEST) -X-Virus-Scanned: by amavisd-new at kolabsys.com -Received: from kolab.kolabsys.com ([127.0.0.1]) - by localhost (kolab.kolabsys.com [127.0.0.1]) (amavisd-new, port 10024) - with ESMTP id SGDGZjl4ESbl for ; - Fri, 22 Jun 2012 19:07:23 +0200 (CEST) -Received: from localhost (localhost [127.0.0.1]) - by kolab.kolabsys.com (Postfix) with ESMTP id CD9AF2627A61 - for ; Fri, 22 Jun 2012 19:07:22 +0200 (CEST) -From: Christian Mollekopf -To: kde-pim@kde.org -Date: Fri, 22 Jun 2012 19:07:15 +0200 -Message-ID: <1778093.n7Qmzlrvop@myhost2> -Organization: Kolab Systems AG -User-Agent: KMail/4.9 pre (Linux/3.3.7-1-ARCH; KDE/4.8.3; x86_64; git-3b25a7b; - 2012-03-25) -MIME-Version: 1.0 -X-Scanned-By: MIMEDefang 2.71 on 46.4.96.248 -Cc: vanmeeuwen@kolabsys.com -Subject: [Kde-pim] Kolab usage of kdepimlibs, kdepimlibs split -X-BeenThere: kde-pim@kde.org -X-Mailman-Version: 2.1.14 -Precedence: list -Reply-To: KDE PIM -List-Id: KDE PIM -List-Unsubscribe: , - -List-Post: -List-Help: -List-Subscribe: , - -Content-Type: multipart/mixed; boundary="===============5976582697228578672==" -Errors-To: kde-pim-bounces@kde.org -Sender: kde-pim-bounces@kde.org -X-Truedomain-Domain: kde.org -X-Truedomain-SPF: No Record -X-Truedomain-DKIM: Pass -X-Truedomain-ID: 164A9F2DD35C0579F5F828658254278F -X-Truedomain: Neutral - - ---===============5976582697228578672== -Content-Type: multipart/signed; boundary="nextPart23133746.Pd6aMzRTfK"; micalg="pgp-sha1"; protocol="application/pgp-signature" -Content-Transfer-Encoding: 7Bit - - ---nextPart23133746.Pd6aMzRTfK -Content-Transfer-Encoding: 7Bit -Content-Type: text/plain; charset="us-ascii" - -Hey, - -For Kolab 3.0, we're trying to reuse some of the relevant kdepim -infrastructure also on the server, specifically: -- kcalcore -- kimap -- kmime -- kabc - -We do have the problem though of the huge dependency chain pulled in by -kdepimlibs + kdelibs, as well as the problem of not being able to make new -releases of said (sub-) libraries. - -Especially now in the beginning I have to add some fixes/new functionality, and -we need a way to get that on the server in the end. - -The preferred way forward is pulling those libraries out of kdepimlibs, along -the lines of what is happending for frameworks, with only the dependencies -which are really required. - -That would allow us to package & ship the packages we require for our target -platforms (which is eg Enterprise Linux 6 currently on kde 4.3 and qt 4.6). - -Now I can imagine that this is something which is generally planned to be done -after frameworks is released (as we'd also rather have the strapped down -frameworks dependencies), but I'd be interested to learn how we can speed-up -that process and maybe have an intermediate solution, without it being a -completely separate effort. - -After all we really don't want a fork or alike and want to work as much as -possible upstream. - -So are there already plans, or suggestions in what direction such a task could -be tackled? - -I'm at akademy with Jeroen van Meeuwen, who is our Systems Architect with -Release-Engineering skills, so it would be a good occasion to have a chat on -how to continue in that respect, and what we can do already now. If you're -interested/willing to help, tell me. - -Cheers, -Christian - -PS: I'm the same as chrigi_1@fastmail.fm =) ---nextPart23133746.Pd6aMzRTfK -Content-Type: application/pgp-signature; name="signature.asc" -Content-Description: This is a digitally signed message part. - ------BEGIN PGP SIGNATURE----- -Version: GnuPG v2.0.19 (GNU/Linux) - -iEYEABECAAYFAk/kpkMACgkQF4TVOOpldACuLwCg1p0apYCk5q8aI+ssxQmxK7Y/ -RVAAoJq55GK+e0Xe1/4/Xc8wMcazx7n5 -=v9bJ ------END PGP SIGNATURE----- - ---nextPart23133746.Pd6aMzRTfK-- - - ---===============5976582697228578672== -Content-Type: text/plain; charset="us-ascii" -MIME-Version: 1.0 -Content-Transfer-Encoding: 7bit -Content-Disposition: inline - -_______________________________________________ -KDE PIM mailing list kde-pim@kde.org -https://mail.kde.org/mailman/listinfo/kde-pim -KDE PIM home page at http://pim.kde.org/ ---===============5976582697228578672==-- - - diff -Nru kdepim-runtime-4.12.3/agents/nepomukfeeder/test/testfiles/simplemail.mime kdepim-runtime-4.12.90/agents/nepomukfeeder/test/testfiles/simplemail.mime --- kdepim-runtime-4.12.3/agents/nepomukfeeder/test/testfiles/simplemail.mime 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/agents/nepomukfeeder/test/testfiles/simplemail.mime 1970-01-01 00:00:00.000000000 +0000 @@ -1,14 +0,0 @@ -From: Christian Mollekopf -To: test1@example.org -Subject: test -Date: Thu, 18 Oct 2012 17:44:50 +0200 -Message-ID: <64321285.FBxvQ0Zopl@myhost2> -X-KMail-Identity: 70513270 -X-KMail-Transport: 2005596422 -X-KMail-Fcc: 5 -User-Agent: KMail/4.10 pre (Linux/3.5.6-1-ARCH; KDE/4.9.2; x86_64; git-b8f489b; 2012-10-16) -MIME-Version: 1.0 -Content-Transfer-Encoding: 7Bit -Content-Type: text/plain; charset="us-ascii" - -test diff -Nru kdepim-runtime-4.12.3/agents/nepomukfeeder/util/CMakeLists.txt kdepim-runtime-4.12.90/agents/nepomukfeeder/util/CMakeLists.txt --- kdepim-runtime-4.12.3/agents/nepomukfeeder/util/CMakeLists.txt 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/agents/nepomukfeeder/util/CMakeLists.txt 1970-01-01 00:00:00.000000000 +0000 @@ -1,26 +0,0 @@ -include_directories( - ../ -) - -set(shared_SRCS ../indexscheduler.cpp ../itemqueue.cpp ../nepomukhelpers.cpp ../pluginloader.cpp ../propertycache.cpp - ../eventmonitor.cpp ) - -set(nepomukpimindexerutility_SRCS - nepomukpimindexerutility.cpp - indexhelpermodel.cpp - main.cpp -) -kde4_add_ui_files(nepomukpimindexerutility_SRCS nepomukpimindexerutility.ui) -kde4_add_executable(nepomukpimindexerutility ${nepomukpimindexerutility_SRCS} ${shared_SRCS}) -target_link_libraries( nepomukpimindexerutility - ${NEPOMUKFEEDER_SHARED_LIBS} - ${KDEPIMLIBS_AKONADI_KMIME_LIBS} - akonadi-kde - ${QT_QTGUI_LIBRARY} - nepomukfeederpluginlib - ${NEPOMUK_CORE_LIBRARY} -) - -install(TARGETS nepomukpimindexerutility DESTINATION ${BIN_INSTALL_DIR}) -install(FILES nepomukpimindexerutility.rc - DESTINATION ${DATA_INSTALL_DIR}/nepomukpimindexerutility) diff -Nru kdepim-runtime-4.12.3/agents/nepomukfeeder/util/indexhelpermodel.cpp kdepim-runtime-4.12.90/agents/nepomukfeeder/util/indexhelpermodel.cpp --- kdepim-runtime-4.12.3/agents/nepomukfeeder/util/indexhelpermodel.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/agents/nepomukfeeder/util/indexhelpermodel.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,101 +0,0 @@ -/* - Copyright (C) 2012 Christian Mollekopf - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 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 - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -*/ - - -#include "indexhelpermodel.h" -#include -#include -#include -#include -#include -#include -#include - -IndexHelperModel::IndexHelperModel(Akonadi::ChangeRecorder* monitor, QObject* parent): EntityTreeModel(monitor, parent) -{ -} - -int IndexHelperModel::compatLevel(Akonadi::Entity::Id id, const KUrl &url, int indexerLevel) const -{ - Q_UNUSED( indexerLevel ); - if (!mCompatLevels.contains(id)) { - Soprano::QueryResultIterator result = Nepomuk2::ResourceManager::instance()->mainModel()->executeQuery(QString::fromLatin1("select ?compatLevel where { ?r %1 %2 . ?r %3 ?compatLevel . }") - .arg(Soprano::Node::resourceToN3(Vocabulary::NIE::url()), - Soprano::Node::resourceToN3(url), - Soprano::Node::resourceToN3(Vocabulary::ANEO::akonadiIndexCompatLevel())), - Soprano::Query::QueryLanguageSparql); - Q_ASSERT(result.isValid()); - if (result.next()) { - mCompatLevels.insert(id, result[0].literal().toInt()); - } else { - mCompatLevels.insert(id, -1); - } - } - return mCompatLevels.value(id); -} - -static QString getIndexedLevelString(int compatLevel) -{ - if (compatLevel > 0) { - return QString::fromLatin1(" [IndexingLevel: %1]").arg(compatLevel); - } - if (compatLevel == -1) { - return QLatin1String("[Not Indexed]"); - } - return QLatin1String("[No Info]"); -} - -QVariant IndexHelperModel::entityData(const Akonadi::Item& item, int column, int role) const -{ - switch(role) { - case Qt::DisplayRole: { - switch (column) { - case 0: { - QString s = Akonadi::EntityTreeModel::entityData(item, column, role).toString(); - int compat = compatLevel(item.id(),item.url()); - s.append(getIndexedLevelString(compat)); - return s; - } - } - } - break; - case Qt::ToolTipRole: { - QString d; - d.append(QString::fromLatin1("Akonadi: %1\n").arg(item.url().url())); - d.append(getIndexedLevelString(compatLevel(item.id(),item.url()))); - return d; - } - } - return Akonadi::EntityTreeModel::entityData(item, column, role); -} - -QVariant IndexHelperModel::entityData(const Akonadi::Collection& collection, int column, int role) const -{ - switch(role) { - case Qt::DisplayRole: { - switch (column) { - case 0: - return Akonadi::EntityTreeModel::entityData(collection, column, role).toString().append(getIndexedLevelString(compatLevel(collection.id(), collection.url()))); - } - } - } - return Akonadi::EntityTreeModel::entityData(collection, column, role); -} - - -#include "indexhelpermodel.moc" diff -Nru kdepim-runtime-4.12.3/agents/nepomukfeeder/util/indexhelpermodel.h kdepim-runtime-4.12.90/agents/nepomukfeeder/util/indexhelpermodel.h --- kdepim-runtime-4.12.3/agents/nepomukfeeder/util/indexhelpermodel.h 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/agents/nepomukfeeder/util/indexhelpermodel.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,40 +0,0 @@ -/* - Copyright (C) 2012 Christian Mollekopf - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 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 - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -*/ - - -#ifndef INDEXHELPERMODEL_H -#define INDEXHELPERMODEL_H - -#include -#include - -#include - -class IndexHelperModel: public Akonadi::EntityTreeModel -{ - Q_OBJECT -public: - explicit IndexHelperModel(Akonadi::ChangeRecorder* monitor, QObject* parent = 0); - virtual QVariant entityData(const Akonadi::Item& item, int column, int role = Qt::DisplayRole) const; - virtual QVariant entityData(const Akonadi::Collection& collection, int column, int role = Qt::DisplayRole) const; -private: - int compatLevel(Akonadi::Entity::Id id, const KUrl &url, int indexerLevel = NEPOMUK_FEEDER_INDEX_COMPAT_LEVEL) const; - mutable QMap mCompatLevels; -}; - -#endif // INDEXHELPERMODEL_H diff -Nru kdepim-runtime-4.12.3/agents/nepomukfeeder/util/main.cpp kdepim-runtime-4.12.90/agents/nepomukfeeder/util/main.cpp --- kdepim-runtime-4.12.3/agents/nepomukfeeder/util/main.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/agents/nepomukfeeder/util/main.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,44 +0,0 @@ -/* - Copyright (C) 2012 Christian Mollekopf - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 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 - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -*/ - -#include "nepomukpimindexerutility.h" -#include -#include -#include -#include - -static const char description[] = - I18N_NOOP("A Developer Utility to check which PIM Items have been indexed."); - -static const char version[] = "0.1"; - -int main(int argc, char **argv) -{ - KAboutData about("nepomukpimindexerutility", 0, ki18n("NepomukPIMindexerUtility"), version, ki18n(description), - KAboutData::License_LGPL, ki18n("(C) 2012 Christian Mollekopf"), KLocalizedString(), 0, "chrigi_1@fastmail.fm"); - about.addAuthor( ki18n("Christian Mollekopf"), KLocalizedString(), "chrigi_1@fastmail.fm" ); - KCmdLineArgs::init(argc, argv, &about); - - KApplication app; - - NepomukPIMindexerUtility *mainWindow = new NepomukPIMindexerUtility; - mainWindow->show(); - - return app.exec(); -} - diff -Nru kdepim-runtime-4.12.3/agents/nepomukfeeder/util/Messages.sh kdepim-runtime-4.12.90/agents/nepomukfeeder/util/Messages.sh --- kdepim-runtime-4.12.3/agents/nepomukfeeder/util/Messages.sh 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/agents/nepomukfeeder/util/Messages.sh 1970-01-01 00:00:00.000000000 +0000 @@ -1,3 +0,0 @@ -#! /bin/sh -$EXTRACTRC *.ui >> rc.cpp -$XGETTEXT *.cpp -o $podir/nepomukpimindexerutility.pot diff -Nru kdepim-runtime-4.12.3/agents/nepomukfeeder/util/nepomukpimindexerutility.cpp kdepim-runtime-4.12.90/agents/nepomukfeeder/util/nepomukpimindexerutility.cpp --- kdepim-runtime-4.12.3/agents/nepomukfeeder/util/nepomukpimindexerutility.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/agents/nepomukfeeder/util/nepomukpimindexerutility.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,170 +0,0 @@ -/* - Copyright (C) 2012 Christian Mollekopf - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 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 - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -*/ - -#include "nepomukpimindexerutility.h" -#include "indexhelpermodel.h" -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -NepomukPIMindexerUtility::NepomukPIMindexerUtility() - : KXmlGuiWindow(), - mFeederQueue(new IndexScheduler(this)) -{ - KGlobal::locale()->insertCatalog( QLatin1String("akonadi_nepomuk_feeder") ); - // tell the KXmlGuiWindow that this is indeed the main widget - QWidget* w = new QWidget(this); - setCentralWidget(w); - m_ui.setupUi(w); - Akonadi::ChangeRecorder *monitor = new Akonadi::ChangeRecorder(this); - monitor->itemFetchScope().fetchAttribute(); - monitor->itemFetchScope().fetchFullPayload(false); - IndexHelperModel *model = new IndexHelperModel(monitor, this); - model->setItemPopulationStrategy(Akonadi::EntityTreeModel::LazyPopulation); - - m_ui.treeView->setModel(model); - - m_ui.treeView->setSelectionMode(QAbstractItemView::ExtendedSelection); - - KActionCollection *actionCollection = this->actionCollection(); - KAction *action; - - action = actionCollection->addAction( QLatin1String("index") ); - action->setText( i18n( "Index" ) ); - connect( action, SIGNAL(triggered()), this, SLOT(indexCurrentlySelected()) ); - - action = actionCollection->addAction( QLatin1String("reindex") ); - action->setText( i18n( "Re-Index" ) ); - connect( action, SIGNAL(triggered()), this, SLOT(reindexCurrentlySelected()) ); - - action = actionCollection->addAction( QLatin1String("remove") ); - action->setText( i18n( "Remove Data" ) ); - connect( action, SIGNAL(triggered()), this, SLOT(removeDataOfCurrentlySelected()) ); - - action = actionCollection->addAction( QLatin1String("copy") ); - action->setText( i18n( "Copy Url" ) ); - connect( action, SIGNAL(triggered()), this, SLOT(copyUrlFromDataCurrentlySelected()) ); - - (void) KStandardAction::quit(this, SLOT(close()), actionCollection); - - - mFeederQueue->setIndexingSpeed(IndexScheduler::FullSpeed); - mFeederQueue->setOnline(true); - mFeederQueue->setReindexing(false); - //mFeederQueue->setCheckAllItems(true); - QObject::connect(mFeederQueue, SIGNAL(fullyIndexed()), this, SLOT(fullyIndexed())); - QObject::connect(mFeederQueue, SIGNAL(progress(int)), this, SLOT(progress(int))); - QObject::connect(mFeederQueue, SIGNAL(running(QString)), this, SLOT(running(QString))); - - setupGUI( Keys | StatusBar | Save | Create, QLatin1String("nepomukpimindexerutility.rc")); - - m_ui.treeView->setXmlGuiClient(this); -} - -NepomukPIMindexerUtility::~NepomukPIMindexerUtility() -{ -} - -void NepomukPIMindexerUtility::indexCurrentlySelected() -{ - mTime.start(); - const QModelIndexList &indexList = m_ui.treeView->selectionModel()->selectedRows(0); - foreach (const QModelIndex &index, indexList) { - Akonadi::Item item = index.data(Akonadi::EntityTreeModel::ItemRole).value(); - if (item.isValid()) { - statusBar()->showMessage(i18n("Indexing item: %1", item.url().url())); - mFeederQueue->addItem(item); - } else { - Akonadi::Collection collection = index.data(Akonadi::EntityTreeModel::CollectionRole).value(); - if (collection.isValid() && !collection.isVirtual() ) { - statusBar()->showMessage(i18n("Indexing collection: %1",collection.url().url())); - mFeederQueue->addCollection(collection); - } - } - } -} - -void NepomukPIMindexerUtility::reindexCurrentlySelected() -{ - mFeederQueue->setReindexing(true); - indexCurrentlySelected(); -} - -void NepomukPIMindexerUtility::removeDataOfCurrentlySelected() -{ - mTime.start(); - const QModelIndex &index = m_ui.treeView->currentIndex(); - Akonadi::Item item = index.data(Akonadi::EntityTreeModel::ItemRole).value(); - kDebug() << "removing data of item " << item.url(); - if (item.isValid()) { - KJob *job = Nepomuk2::removeResources(QList() << item.url().url(), Nepomuk2::RemoveSubResoures); - QObject::connect( job, SIGNAL(finished(KJob*)), this, SLOT(removalComplete(KJob*)) ); - } else { - const Akonadi::Collection &collection = index.data(Akonadi::EntityTreeModel::CollectionRole).value(); - if (collection.isValid() && !collection.isVirtual()) { - KJob *job = Nepomuk2::removeResources(QList() << collection.url().url(), Nepomuk2::RemoveSubResoures); - QObject::connect( job, SIGNAL(finished(KJob*)), this, SLOT(removalComplete(KJob*)) ); - } - } -} - -void NepomukPIMindexerUtility::progress(int p) { - kDebug() << "progress " << p; - statusBar()->showMessage(i18n("Progress: %1%", QString::number(p))); -} - -void NepomukPIMindexerUtility::running(const QString &p) { - kDebug() << "running " << p; - statusBar()->showMessage(i18n("Running: %1", p)); -} - -void NepomukPIMindexerUtility::fullyIndexed() -{ - kDebug() << "Time elapsed(ms): " << mTime.elapsed(); - statusBar()->showMessage(i18n("Indexing complete. Time elapsed(ms): %1", QString::number(mTime.elapsed()))); -} - -void NepomukPIMindexerUtility::removalComplete(KJob *job) { - kDebug() << "Time elapsed(ms): " << mTime.elapsed(); - statusBar()->showMessage(i18n("Removal complete. Time elapsed(ms): %1", QString::number(mTime.elapsed()))); -// static_cast(m_ui.treeView->model())->updateItem(mRemovedItem); - if (job->error()) - kDebug() << job->errorString(); -} - -void NepomukPIMindexerUtility::copyUrlFromDataCurrentlySelected() { - const QModelIndex &index = m_ui.treeView->currentIndex(); - Akonadi::Item item = index.data(Akonadi::EntityTreeModel::ItemRole).value(); - kDebug() << "url of item " << item.url(); - QClipboard *clipboard = QApplication::clipboard(); - clipboard->setText(item.url().url()); -} - -#include "nepomukpimindexerutility.moc" diff -Nru kdepim-runtime-4.12.3/agents/nepomukfeeder/util/nepomukpimindexerutility.h kdepim-runtime-4.12.90/agents/nepomukfeeder/util/nepomukpimindexerutility.h --- kdepim-runtime-4.12.3/agents/nepomukfeeder/util/nepomukpimindexerutility.h 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/agents/nepomukfeeder/util/nepomukpimindexerutility.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,71 +0,0 @@ -/* - * Copyright (C) 2012 Christian Mollekopf - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 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 General Public License - * along with this program. If not, see . - */ - -#ifndef NEPOMUKPIMINDEXERUTILITY_H -#define NEPOMUKPIMINDEXERUTILITY_H - - -#include -#include - -#include "ui_nepomukpimindexerutility.h" -#include - - -/** - * This class serves as the main window for NepomukPIMindexerUtility. It handles the - * menus, toolbars and status bars. - * - * @short Main window class - * @author Your Name - * @version 0.1 - */ -class NepomukPIMindexerUtility : public KXmlGuiWindow -{ - Q_OBJECT -public: - /** - * Default Constructor - */ - NepomukPIMindexerUtility(); - - /** - * Default Destructor - */ - virtual ~NepomukPIMindexerUtility(); - -private slots: - void indexCurrentlySelected(); - void reindexCurrentlySelected(); - void removeDataOfCurrentlySelected(); - - void progress(int p); - void running(const QString &p); - void fullyIndexed(); - void removalComplete(KJob *job); - - void copyUrlFromDataCurrentlySelected(); -private: - // this is the name of the root widget inside our Ui file - // you can rename it in designer and then change it here - Ui::mainWidget m_ui; - IndexScheduler *mFeederQueue; - QTime mTime; - Akonadi::Item mRemovedItem; -}; - -#endif // _NEPOMUKPIMINDEXERUTILITY_H_ diff -Nru kdepim-runtime-4.12.3/agents/nepomukfeeder/util/nepomukpimindexerutility.rc kdepim-runtime-4.12.90/agents/nepomukfeeder/util/nepomukpimindexerutility.rc --- kdepim-runtime-4.12.3/agents/nepomukfeeder/util/nepomukpimindexerutility.rc 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/agents/nepomukfeeder/util/nepomukpimindexerutility.rc 1970-01-01 00:00:00.000000000 +0000 @@ -1,24 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - diff -Nru kdepim-runtime-4.12.3/agents/nepomukfeeder/util/nepomukpimindexerutility.ui kdepim-runtime-4.12.90/agents/nepomukfeeder/util/nepomukpimindexerutility.ui --- kdepim-runtime-4.12.3/agents/nepomukfeeder/util/nepomukpimindexerutility.ui 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/agents/nepomukfeeder/util/nepomukpimindexerutility.ui 1970-01-01 00:00:00.000000000 +0000 @@ -1,28 +0,0 @@ - - - mainWidget - - - - 0 - 0 - 866 - 590 - - - - - - - - - - - Akonadi::EntityTreeView - QTreeView -
akonadi/entitytreeview.h
-
-
- - -
diff -Nru kdepim-runtime-4.12.3/agents/newmailnotifier/akonadi_newmailnotifier_agent.notifyrc kdepim-runtime-4.12.90/agents/newmailnotifier/akonadi_newmailnotifier_agent.notifyrc --- kdepim-runtime-4.12.3/agents/newmailnotifier/akonadi_newmailnotifier_agent.notifyrc 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/agents/newmailnotifier/akonadi_newmailnotifier_agent.notifyrc 2014-03-13 08:12:29.000000000 +0000 @@ -23,7 +23,7 @@ Comment[lt]=Naujo pašto pranešimas Comment[lv]=Jauna pasta paziņojums Comment[nb]=Varsling om ny e-post -Comment[nds]=Bi niege Nettpost Bescheed geven +Comment[nds]=Bescheed över nieg Nettpost Comment[nl]=Melding van nieuwe e-mail Comment[pl]=Powiadomienie o nowej poczcie Comment[pt]=Notificação de correio novo @@ -64,7 +64,7 @@ Name[lt]=Naujo pašto pranešimas Name[lv]=Jauna pasta paziņojums Name[nb]=Varsling om ny e-post -Name[nds]=Bi niege Nettpost Bescheed geven +Name[nds]=Nieg-Nettpost-Bescheed Name[nl]=Melding van nieuwe e-mail Name[pl]=Powiadomienie o nowej poczcie Name[pt]=Notificação de correio novo @@ -131,7 +131,7 @@ [Event/text-to-speak-not-found] Name=Jovie Text-to-Speech Service not found -Name[bs]=Jovie usluga za izgovor teksta nije nađena +Name[bs]=Jovie Tservis za prebacivanje teksta u govor nije nađen Name[ca]=No s'ha trobat el servei Jovie de text a veu Name[ca@valencia]=No s'ha trobat el servei Jovie de text a veu Name[da]=Jovie tekst-til-tale-tjeneste ikke fundet @@ -144,7 +144,9 @@ Name[ia]=Il non trovava le servicio de texto-a-Voce Jovie Name[it]=Servizio di sintesi vocale Jovie non trovato Name[kk]=Jovie мәтінді дауыстап оқу қызметі табылған жоқ +Name[ko]=Jovie 텍스트 음성 합성 서비스를 찾을 수 없음 Name[nb]=Fant ikke Jovie tekst-til-tale-tjeneste +Name[nds]=Vörleesdeenst "Jovie" lett sik nich finnen Name[nl]=Tekst-naar-spraak-service van Jovie niet gevonden Name[pl]=NIe znaleziono usługi tekst-do-mowy Jovie Name[pt]=Serviço de Texto-para-Fala Jovie Não Encontrado diff -Nru kdepim-runtime-4.12.3/agents/newmailnotifier/newmailnotifieragent.cpp kdepim-runtime-4.12.90/agents/newmailnotifier/newmailnotifieragent.cpp --- kdepim-runtime-4.12.3/agents/newmailnotifier/newmailnotifieragent.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/agents/newmailnotifier/newmailnotifieragent.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -51,7 +51,7 @@ #include #include #include -#include +#include #include using namespace Akonadi; @@ -184,7 +184,6 @@ bool NewMailNotifierAgent::verboseMailNotification() const { return NewMailNotifierAgentSettings::verboseNotification(); - NewMailNotifierAgentSettings::self()->writeConfig(); } void NewMailNotifierAgent::setBeepOnNewMails(bool beep) @@ -544,4 +543,3 @@ AKONADI_AGENT_MAIN( NewMailNotifierAgent ) -#include "newmailnotifieragent.moc" diff -Nru kdepim-runtime-4.12.3/agents/newmailnotifier/newmailnotifieragent.desktop kdepim-runtime-4.12.90/agents/newmailnotifier/newmailnotifieragent.desktop --- kdepim-runtime-4.12.3/agents/newmailnotifier/newmailnotifieragent.desktop 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/agents/newmailnotifier/newmailnotifieragent.desktop 2014-03-13 08:12:29.000000000 +0000 @@ -23,7 +23,7 @@ Name[lt]=Naujo pašto pranešėjas Name[lv]=Jauna pasta paziņotājs Name[nb]=Varsling om ny e-post -Name[nds]=Nettpost-Bescheden +Name[nds]=Nieg-Nettpost-Bescheedgever Name[nl]=Nieuwe e-mailmelder Name[pa]=ਨਵੀਂ ਈਮੇਲ ਸੂਚਨਾ Name[pl]=Powiadomienie o nowej poczcie diff -Nru kdepim-runtime-4.12.3/agents/newmailnotifier/newmailnotifierattribute.cpp kdepim-runtime-4.12.90/agents/newmailnotifier/newmailnotifierattribute.cpp --- kdepim-runtime-4.12.3/agents/newmailnotifier/newmailnotifierattribute.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/agents/newmailnotifier/newmailnotifierattribute.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -1,5 +1,5 @@ /* - Copyright (c) 2013 Montel Laurent + Copyright (c) 2013, 2014 Montel Laurent This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2, as diff -Nru kdepim-runtime-4.12.3/agents/newmailnotifier/newmailnotifierattribute.h kdepim-runtime-4.12.90/agents/newmailnotifier/newmailnotifierattribute.h --- kdepim-runtime-4.12.3/agents/newmailnotifier/newmailnotifierattribute.h 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/agents/newmailnotifier/newmailnotifierattribute.h 2014-03-13 08:12:29.000000000 +0000 @@ -1,5 +1,5 @@ /* - Copyright (c) 2013 Montel Laurent + Copyright (c) 2013, 2014 Montel Laurent This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2, as diff -Nru kdepim-runtime-4.12.3/agents/newmailnotifier/newmailnotifierselectcollectionwidget.cpp kdepim-runtime-4.12.90/agents/newmailnotifier/newmailnotifierselectcollectionwidget.cpp --- kdepim-runtime-4.12.3/agents/newmailnotifier/newmailnotifierselectcollectionwidget.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/agents/newmailnotifier/newmailnotifierselectcollectionwidget.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -32,7 +32,7 @@ #include -#include +#include #include #include #include @@ -45,7 +45,7 @@ NewMailNotifierSelectCollectionWidget::NewMailNotifierSelectCollectionWidget(QWidget *parent) : QWidget(parent), - mCanUpdateStatus(false) + mNeedUpdate(false) { QVBoxLayout *vbox = new QVBoxLayout; @@ -59,6 +59,7 @@ mModel = new Akonadi::EntityTreeModel( mChangeRecorder, this ); // Set the model to show only collections, not items. mModel->setItemPopulationStrategy( Akonadi::EntityTreeModel::NoItemPopulation ); + connect(mModel, SIGNAL(collectionTreeFetched(Akonadi::Collection::List)), SLOT(slotCollectionTreeFetched())); Akonadi::CollectionFilterProxyModel *mimeTypeProxy = new Akonadi::CollectionFilterProxyModel( this ); mimeTypeProxy->setExcludeVirtualCollections( true ); @@ -71,9 +72,6 @@ mCheckProxy->setSelectionModel( mSelectionModel ); mCheckProxy->setSourceModel( mimeTypeProxy ); - connect(mModel, SIGNAL(rowsInserted(QModelIndex,int,int)), - this, SLOT(slotCollectionsInserted(QModelIndex,int,int))); - mCollectionFilter = new KRecursiveFilterProxyModel(this); mCollectionFilter->setSourceModel(mCheckProxy); @@ -108,7 +106,6 @@ hbox->addWidget(button); hbox->addStretch(1); setLayout(vbox); - QTimer::singleShot(1000, this, SLOT(slotUpdateCollectionStatus())); } NewMailNotifierSelectCollectionWidget::~NewMailNotifierSelectCollectionWidget() @@ -116,6 +113,15 @@ } +void NewMailNotifierSelectCollectionWidget::slotCollectionTreeFetched() +{ + if (!mNeedUpdate) { + mNeedUpdate = true; + QTimer::singleShot(1000, this, SLOT(slotUpdateCollectionStatus())); + } + mFolderView->expandAll(); +} + void NewMailNotifierSelectCollectionWidget::slotSetCollectionFilter(const QString &filter) { mCollectionFilter->setFilterWildcard(filter); @@ -124,7 +130,6 @@ void NewMailNotifierSelectCollectionWidget::slotUpdateCollectionStatus() { - mCanUpdateStatus = true; updateStatus(QModelIndex()); } @@ -140,9 +145,6 @@ void NewMailNotifierSelectCollectionWidget::updateStatus(const QModelIndex &parent) { - if (!mCanUpdateStatus) - return; - const int nbCol = mCheckProxy->rowCount( parent ); for ( int i = 0; i < nbCol; ++i ) { const QModelIndex child = mCheckProxy->index( i, 0, parent ); @@ -156,6 +158,7 @@ } updateStatus( child ); } + mNeedUpdate = false; } void NewMailNotifierSelectCollectionWidget::forceStatus(const QModelIndex &parent, bool status) @@ -168,11 +171,6 @@ } } -void NewMailNotifierSelectCollectionWidget::slotCollectionsInserted(const QModelIndex &, int, int) -{ - mFolderView->expandAll(); -} - void NewMailNotifierSelectCollectionWidget::updateCollectionsRecursive(const QModelIndex &parent) { const int nbCol = mCheckProxy->rowCount( parent ); @@ -220,4 +218,3 @@ } -#include "newmailnotifierselectcollectionwidget.moc" diff -Nru kdepim-runtime-4.12.3/agents/newmailnotifier/newmailnotifierselectcollectionwidget.h kdepim-runtime-4.12.90/agents/newmailnotifier/newmailnotifierselectcollectionwidget.h --- kdepim-runtime-4.12.3/agents/newmailnotifier/newmailnotifierselectcollectionwidget.h 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/agents/newmailnotifier/newmailnotifierselectcollectionwidget.h 2014-03-13 08:12:29.000000000 +0000 @@ -46,11 +46,12 @@ private Q_SLOTS: void slotSelectAllCollections(); void slotUnselectAllCollections(); - void slotCollectionsInserted(const QModelIndex &parent, int start, int end); void slotModifyJobDone(KJob* job); void slotUpdateCollectionStatus(); void slotSetCollectionFilter(const QString&); + void slotCollectionTreeFetched(); + private: void updateStatus(const QModelIndex &parent); void forceStatus(const QModelIndex &parent, bool status); @@ -60,7 +61,7 @@ Akonadi::ChangeRecorder *mChangeRecorder; KCheckableProxyModel *mCheckProxy; KRecursiveFilterProxyModel *mCollectionFilter; - bool mCanUpdateStatus; + bool mNeedUpdate; }; #endif // NEWMAILNOTIFIERSELECTCOLLECTIONWIDGET_H diff -Nru kdepim-runtime-4.12.3/agents/newmailnotifier/newmailnotifiersettingsdialog.cpp kdepim-runtime-4.12.90/agents/newmailnotifier/newmailnotifiersettingsdialog.cpp --- kdepim-runtime-4.12.3/agents/newmailnotifier/newmailnotifiersettingsdialog.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/agents/newmailnotifier/newmailnotifiersettingsdialog.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -22,11 +22,16 @@ #include "newmailnotifierselectcollectionwidget.h" #include "newmailnotifieragentsettings.h" -#include +#include "kdepim-runtime-version.h" + +#include #include #include #include #include +#include +#include +#include #include #include @@ -57,7 +62,7 @@ { setCaption( i18n("New Mail Notifier settings") ); setWindowIcon( KIcon( QLatin1String("kmail") ) ); - setButtons( Ok|Cancel ); + setButtons( Help | Ok|Cancel ); connect(this, SIGNAL(okClicked()), this, SLOT(slotOkClicked())); QWidget *w = new QWidget; @@ -134,12 +139,58 @@ tab->addTab(mSelectCollection, i18n("Folders")); setMainWidget(w); + + mAboutData = new KAboutData( + QByteArray( "newmailnotifieragent" ), + QByteArray(), + ki18n( "New Mail Notifier Agent" ), + QByteArray( KDEPIM_RUNTIME_VERSION ), + ki18n( "Notifies about new mail." ), + KAboutData::License_GPL_V2, + ki18n( "Copyright (C) 2013 Laurent Montel" ) ); + + mAboutData->addAuthor( ki18n( "Laurent Montel" ), + ki18n( "Maintainer" ), "montel@kde.org" ); + + mAboutData->setProgramIconName( QLatin1String("kmail") ); + mAboutData->setTranslator( ki18nc( "NAME OF TRANSLATORS", "Your names" ), + ki18nc( "EMAIL OF TRANSLATORS", "Your emails" ) ); + + + KHelpMenu *helpMenu = new KHelpMenu(this, mAboutData, true); + //Initialize menu + KMenu *menu = helpMenu->menu(); + helpMenu->action(KHelpMenu::menuAboutApp)->setIcon(KIcon(QLatin1String("kmail"))); + setButtonMenu( Help, menu ); + readConfig(); } NewMailNotifierSettingsDialog::~NewMailNotifierSettingsDialog() { + writeConfig(); + delete mAboutData; } +static const char *myConfigGroupName = "NewMailNotifierDialog"; + +void NewMailNotifierSettingsDialog::readConfig() +{ + KConfigGroup group( KGlobal::config(), myConfigGroupName ); + + const QSize size = group.readEntry( "Size", QSize(500, 300) ); + if ( size.isValid() ) { + resize( size ); + } +} + +void NewMailNotifierSettingsDialog::writeConfig() +{ + KConfigGroup group( KGlobal::config(), myConfigGroupName ); + group.writeEntry( "Size", size() ); + group.sync(); +} + + void NewMailNotifierSettingsDialog::slotHelpLinkClicked(const QString &) { const QString help = @@ -166,4 +217,3 @@ -#include "newmailnotifiersettingsdialog.moc" diff -Nru kdepim-runtime-4.12.3/agents/newmailnotifier/newmailnotifiersettingsdialog.h kdepim-runtime-4.12.90/agents/newmailnotifier/newmailnotifiersettingsdialog.h --- kdepim-runtime-4.12.3/agents/newmailnotifier/newmailnotifiersettingsdialog.h 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/agents/newmailnotifier/newmailnotifiersettingsdialog.h 2014-03-13 08:12:29.000000000 +0000 @@ -26,6 +26,7 @@ class KNotifyConfigWidget; class QCheckBox; class KLineEdit; +class KAboutData; class NewMailNotifierSelectCollectionWidget; class NewMailNotifierSettingsDialog : public KDialog { @@ -39,6 +40,8 @@ void slotHelpLinkClicked(const QString &); private: + void writeConfig(); + void readConfig(); QCheckBox *mShowPhoto; QCheckBox *mShowFrom; QCheckBox *mShowSubject; @@ -48,6 +51,7 @@ QCheckBox *mTextToSpeak; KLineEdit *mTextToSpeakSetting; NewMailNotifierSelectCollectionWidget *mSelectCollection; + KAboutData *mAboutData; }; #endif // NEWMAILNOTIFIERSETTINGSDIALOG_H diff -Nru kdepim-runtime-4.12.3/agents/newmailnotifier/specialnotifierjob.cpp kdepim-runtime-4.12.90/agents/newmailnotifier/specialnotifierjob.cpp --- kdepim-runtime-4.12.3/agents/newmailnotifier/specialnotifierjob.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/agents/newmailnotifier/specialnotifierjob.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -1,5 +1,5 @@ /* - Copyright (c) 2013 Montel Laurent + Copyright (c) 2013, 2014 Montel Laurent This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2, as @@ -29,7 +29,7 @@ #include -#include +#include #include #include @@ -156,4 +156,3 @@ emit displayNotification(pixmap, result.join(QLatin1String("\n"))); } -#include "specialnotifierjob.moc" diff -Nru kdepim-runtime-4.12.3/agents/newmailnotifier/specialnotifierjob.h kdepim-runtime-4.12.90/agents/newmailnotifier/specialnotifierjob.h --- kdepim-runtime-4.12.3/agents/newmailnotifier/specialnotifierjob.h 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/agents/newmailnotifier/specialnotifierjob.h 2014-03-13 08:12:29.000000000 +0000 @@ -1,5 +1,5 @@ /* - Copyright (c) 2013 Montel Laurent + Copyright (c) 2013, 2014 Montel Laurent This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2, as diff -Nru kdepim-runtime-4.12.3/agents/newmailnotifier/util.cpp kdepim-runtime-4.12.90/agents/newmailnotifier/util.cpp --- kdepim-runtime-4.12.3/agents/newmailnotifier/util.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/agents/newmailnotifier/util.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -1,5 +1,5 @@ /* - Copyright (c) 2013 Montel Laurent + Copyright (c) 2013, 2014 Montel Laurent This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2, as @@ -18,7 +18,7 @@ #include "util.h" #include -#include +#include #include #include #include diff -Nru kdepim-runtime-4.12.3/agents/newmailnotifier/util.h kdepim-runtime-4.12.90/agents/newmailnotifier/util.h --- kdepim-runtime-4.12.3/agents/newmailnotifier/util.h 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/agents/newmailnotifier/util.h 2014-03-13 08:12:29.000000000 +0000 @@ -1,5 +1,5 @@ /* - Copyright (c) 2013 Montel Laurent + Copyright (c) 2013, 2014 Montel Laurent This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2, as diff -Nru kdepim-runtime-4.12.3/agents/ontologies/aneo.ontology.in kdepim-runtime-4.12.90/agents/ontologies/aneo.ontology.in --- kdepim-runtime-4.12.3/agents/ontologies/aneo.ontology.in 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/agents/ontologies/aneo.ontology.in 1970-01-01 00:00:00.000000000 +0000 @@ -1,8 +0,0 @@ -[Ontology] -Version=1.0 -Name=Akonadi Ontology -Comment=Currently only defines a single attribute -Namespace=http://akonadi-project.org/ontologies/aneo# -Path=${CMAKE_INSTALL_PREFIX}/share/ontology/kde/aneo.trig -MimeType=application/x-trig -Type=Data diff -Nru kdepim-runtime-4.12.3/agents/ontologies/aneo.trig kdepim-runtime-4.12.90/agents/ontologies/aneo.trig --- kdepim-runtime-4.12.3/agents/ontologies/aneo.trig 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/agents/ontologies/aneo.trig 1970-01-01 00:00:00.000000000 +0000 @@ -1,90 +0,0 @@ -# -# Copyright (c) 2011 Christian Mollekopf -# Copyright (c) 2012 Sebastian Trueg -# All rights reserved, licensed under either CC-BY or BSD. -# -# You are free: -# * to Share - to copy, distribute and transmit the work -# * to Remix - to adapt the work -# Under the following conditions: -# * Attribution - You must attribute the work in the manner specified by the author -# or licensor (but not in any way that suggests that they endorse you or your use -# of the work). -# -# Redistribution and use in source and binary forms, with or without modification, -# are permitted provided that the following conditions are met: -# * Redistributions of source code must retain the above copyright notice, this -# list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above copyright notice, this -# list of conditions and the following disclaimer in the documentation and/or -# other materials provided with the distribution. -# * Neither the names of the authors nor the names of contributors may -# be used to endorse or promote products derived from this ontology without -# specific prior written permission. -# -# THIS ONTOLOGY IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -# THIS ONTOLOGY, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# - -@prefix rdfs: . -@prefix nao: . -@prefix nrl: . -@prefix nie: . -@prefix xsd: . -@prefix rdf: . -@prefix nfo: . - -@prefix aneo: . - -aneo: { - - aneo:AkonadiDataObject a rdfs:Class ; - rdfs:subClassOf nie:DataObject ; - rdfs:label "AkonadiDataObject" ; - rdfs:comment "used to identify akonadi entities (items and collections) created by the akonadi-nepomuk feeders" ; - nao:userVisible false . - - aneo:akonadiItemId a rdf:Property ; - rdfs:label "Akonadi Item ID" ; - rdfs:comment "used to identify items created by the akonadi-nepomuk feeders (depreceated usage, use the AkonadiDataObject type instead)" ; - rdfs:range xsd:string ; - rdfs:domain aneo:AkonadiDataObject ; - rdfs:subPropertyOf nao:identifier ; - nrl:maxCardinality 1 ; - nao:userVisible false . - - aneo:akonadiIndexCompatLevel a rdf:Property ; - rdfs:label "Akonadi index compat level" ; - rdfs:comment "Saves the version of the indexer used to write this item." ; - rdfs:range xsd:int ; - rdfs:domain aneo:AkonadiDataObject ; - nrl:cardinality 1 ; - nao:userVisible false . -} - - - { - - aneo: a nrl:Ontology ; - nao:prefLabel "Akonadi Ontology" ; - nao:hasDefaultNamespace "http://akonadi-project.org/ontologies/aneo#" ; - nao:hasDefaultNamespaceAbbreviation "aneo" ; - nao:lastModified "2012-02-15T09:56:43Z" ; - nao:serializationLanguage "TriG" ; - nao:status "Unstable" ; - nrl:updatable "0" ; - nao:version "2" . - - - a nrl:GraphMetadata ; - nrl:coreGraphMetadataFor aneo: . -} - diff -Nru kdepim-runtime-4.12.3/agents/ontologies/CMakeLists.txt kdepim-runtime-4.12.90/agents/ontologies/CMakeLists.txt --- kdepim-runtime-4.12.3/agents/ontologies/CMakeLists.txt 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/agents/ontologies/CMakeLists.txt 1970-01-01 00:00:00.000000000 +0000 @@ -1,19 +0,0 @@ -project(akonadi_ontologies) - -include(NepomukAddOntologyClasses) -include_directories(${SOPRANO_INCLUDE_DIR} ${NEPOMUK_CORE_INCLUDE_DIR}) - -configure_file(aneo.ontology.in ${CMAKE_CURRENT_BINARY_DIR}/aneo.ontology) -install(FILES - aneo.trig - ${CMAKE_CURRENT_BINARY_DIR}/aneo.ontology -DESTINATION ${CMAKE_INSTALL_PREFIX}/share/ontology/kde) -soprano_add_ontology(nie_SRCS ${akonadi_ontologies_SOURCE_DIR}/aneo.trig "ANEO" "Vocabulary" "trig") - -soprano_add_ontology(nie_SRCS ${SHAREDDESKTOPONTOLOGIES_ROOT_DIR}/nie/nie.trig "NIE" "Vocabulary" "trig") -soprano_add_ontology(nie_SRCS ${SHAREDDESKTOPONTOLOGIES_ROOT_DIR}/nie/nco.trig "NCO" "Vocabulary" "trig") -soprano_add_ontology(nie_SRCS ${SHAREDDESKTOPONTOLOGIES_ROOT_DIR}/nie/nmo.trig "NMO" "Vocabulary" "trig") - -kde4_add_library(niefast STATIC ${nie_SRCS}) -target_link_libraries(niefast ${QT_QTCORE_LIBRARY} ${NEPOMUK_LIBRARIES} ${NEPOMUK_CORE_LIBRARY}) - diff -Nru kdepim-runtime-4.12.3/agents/ontologies/nao/agent.h kdepim-runtime-4.12.90/agents/ontologies/nao/agent.h --- kdepim-runtime-4.12.3/agents/ontologies/nao/agent.h 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/agents/ontologies/nao/agent.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,28 +0,0 @@ -#ifndef _NAO_AGENT_H_ -#define _NAO_AGENT_H_ - -#include -#include -#include -#include -#include -#include -#include - -#include - -namespace Nepomuk2 { -namespace NAO { -/** - * An agent is the artificial counterpart to nao:Party. It can - * be a software component or some service. - */ -class Agent -{ -public: - Agent(Nepomuk2::SimpleResource* res) - : m_res(res) - {} - - virtual ~Agent() {} - diff -Nru kdepim-runtime-4.12.3/agents/ontologies/nao/freedesktopicon.h kdepim-runtime-4.12.90/agents/ontologies/nao/freedesktopicon.h --- kdepim-runtime-4.12.3/agents/ontologies/nao/freedesktopicon.h 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/agents/ontologies/nao/freedesktopicon.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,74 +0,0 @@ -#ifndef _NAO_FREEDESKTOPICON_H_ -#define _NAO_FREEDESKTOPICON_H_ - -#include -#include -#include -#include -#include -#include -#include - -#include - -#include "nao/symbol.h" -namespace Nepomuk2 { -namespace NAO { -/** - * Represents a desktop icon as defined in the FreeDesktop Icon - * Naming Standard - */ -class FreeDesktopIcon : public NAO::Symbol -{ -public: - FreeDesktopIcon(Nepomuk2::SimpleResource* res) - : NAO::Symbol(res), m_res(res) - {} - - virtual ~FreeDesktopIcon() {} - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/08/15/nao#iconName. - * Defines a name for a FreeDesktop Icon as defined in the FreeDesktop - * Icon Naming Standard - */ - QStringList iconNames() const { - QStringList value; - foreach(const QVariant& v, m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#iconName", QUrl::StrictMode))) - value << v.value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/08/15/nao#iconName. - * Defines a name for a FreeDesktop Icon as defined in the FreeDesktop - * Icon Naming Standard - */ - void setIconNames(const QStringList& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - foreach(const QString& v, value) - values << v; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#iconName", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/08/15/nao#iconName. - * Defines a name for a FreeDesktop Icon as defined in the FreeDesktop - * Icon Naming Standard - */ - void addIconName(const QString& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#iconName", QUrl::StrictMode), value); - } - -protected: - virtual QUrl resourceType() const { return QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#FreeDesktopIcon", QUrl::StrictMode); } - -private: - Nepomuk2::SimpleResource* m_res; -}; -} -} - -#endif diff -Nru kdepim-runtime-4.12.3/agents/ontologies/nao/party.h kdepim-runtime-4.12.90/agents/ontologies/nao/party.h --- kdepim-runtime-4.12.3/agents/ontologies/nao/party.h 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/agents/ontologies/nao/party.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,878 +0,0 @@ -#ifndef _NAO_PARTY_H_ -#define _NAO_PARTY_H_ - -#include -#include -#include -#include -#include -#include -#include - -#include - -namespace Nepomuk2 { -namespace NAO { -/** - * Represents a single or a group of individuals - */ -class Party -{ -public: - Party(Nepomuk2::SimpleResource* res) - : m_res(res) - {} - - virtual ~Party() {} - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/08/15/nao#prefSymbol. - * A unique preferred symbol representation for a resource - */ - QUrl prefSymbol() const { - QUrl value; - if(m_res->contains(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#prefSymbol", QUrl::StrictMode))) - value = m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#prefSymbol", QUrl::StrictMode)).first().value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/08/15/nao#prefSymbol. - * A unique preferred symbol representation for a resource - */ - void setPrefSymbol(const QUrl& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - values << value; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#prefSymbol", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/08/15/nao#prefSymbol. - * A unique preferred symbol representation for a resource - */ - void addPrefSymbol(const QUrl& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#prefSymbol", QUrl::StrictMode), value); - } - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/08/15/nao#deprecated. - * If this property is assigned, the subject class, property, - * or resource, is deprecated and should not be used in production - * systems any longer. It may be removed without further notice. - */ - QUrl deprecated() const { - QUrl value; - if(m_res->contains(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#deprecated", QUrl::StrictMode))) - value = m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#deprecated", QUrl::StrictMode)).first().value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/08/15/nao#deprecated. - * If this property is assigned, the subject class, property, - * or resource, is deprecated and should not be used in production - * systems any longer. It may be removed without further notice. - */ - void setDeprecated(const QUrl& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - values << value; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#deprecated", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/08/15/nao#deprecated. - * If this property is assigned, the subject class, property, - * or resource, is deprecated and should not be used in production - * systems any longer. It may be removed without further notice. - */ - void addDeprecated(const QUrl& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#deprecated", QUrl::StrictMode), value); - } - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/08/15/nao#scoreParameter. - * A marker property to mark selected properties which are input - * to a mathematical algorithm to generate scores for resources. - * Properties are marked by being defined as subproperties of - * this property - */ - QList scoreParameters() const { - QList value; - foreach(const QVariant& v, m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#scoreParameter", QUrl::StrictMode))) - value << v.value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/08/15/nao#scoreParameter. - * A marker property to mark selected properties which are input - * to a mathematical algorithm to generate scores for resources. - * Properties are marked by being defined as subproperties of - * this property - */ - void setScoreParameters(const QList& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - foreach(const double& v, value) - values << v; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#scoreParameter", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/08/15/nao#scoreParameter. - * A marker property to mark selected properties which are input - * to a mathematical algorithm to generate scores for resources. - * Properties are marked by being defined as subproperties of - * this property - */ - void addScoreParameter(const double& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#scoreParameter", QUrl::StrictMode), value); - } - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/08/15/nao#description. - * A non-technical textual annotation for a resource - */ - QStringList descriptions() const { - QStringList value; - foreach(const QVariant& v, m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#description", QUrl::StrictMode))) - value << v.value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/08/15/nao#description. - * A non-technical textual annotation for a resource - */ - void setDescriptions(const QStringList& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - foreach(const QString& v, value) - values << v; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#description", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/08/15/nao#description. - * A non-technical textual annotation for a resource - */ - void addDescription(const QString& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#description", QUrl::StrictMode), value); - } - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/08/15/nao#altLabel. - * An alternative label alongside the preferred label for a resource - */ - QStringList altLabels() const { - QStringList value; - foreach(const QVariant& v, m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#altLabel", QUrl::StrictMode))) - value << v.value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/08/15/nao#altLabel. - * An alternative label alongside the preferred label for a resource - */ - void setAltLabels(const QStringList& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - foreach(const QString& v, value) - values << v; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#altLabel", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/08/15/nao#altLabel. - * An alternative label alongside the preferred label for a resource - */ - void addAltLabel(const QString& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#altLabel", QUrl::StrictMode), value); - } - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/08/15/nao#hasSymbol. - * Annotation for a resource in the form of a symbol representation - */ - QList hasSymbols() const { - QList value; - foreach(const QVariant& v, m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#hasSymbol", QUrl::StrictMode))) - value << v.value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/08/15/nao#hasSymbol. - * Annotation for a resource in the form of a symbol representation - */ - void setHasSymbols(const QList& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - foreach(const QUrl& v, value) - values << v; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#hasSymbol", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/08/15/nao#hasSymbol. - * Annotation for a resource in the form of a symbol representation - */ - void addHasSymbol(const QUrl& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#hasSymbol", QUrl::StrictMode), value); - } - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/08/15/nao#maintainedBy. - * The agent that maintains this resource, ie. created it and knows - * what to do with it. - */ - QList maintainedBys() const { - QList value; - foreach(const QVariant& v, m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#maintainedBy", QUrl::StrictMode))) - value << v.value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/08/15/nao#maintainedBy. - * The agent that maintains this resource, ie. created it and knows - * what to do with it. - */ - void setMaintainedBys(const QList& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - foreach(const QUrl& v, value) - values << v; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#maintainedBy", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/08/15/nao#maintainedBy. - * The agent that maintains this resource, ie. created it and knows - * what to do with it. - */ - void addMaintainedBy(const QUrl& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#maintainedBy", QUrl::StrictMode), value); - } - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/08/15/nao#hasTag. - * Defines an existing tag for a resource - */ - QList hasTags() const { - QList value; - foreach(const QVariant& v, m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#hasTag", QUrl::StrictMode))) - value << v.value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/08/15/nao#hasTag. - * Defines an existing tag for a resource - */ - void setHasTags(const QList& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - foreach(const QUrl& v, value) - values << v; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#hasTag", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/08/15/nao#hasTag. - * Defines an existing tag for a resource - */ - void addHasTag(const QUrl& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#hasTag", QUrl::StrictMode), value); - } - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/08/15/nao#altSymbol. - * An alternative symbol representation for a resource - */ - QList altSymbols() const { - QList value; - foreach(const QVariant& v, m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#altSymbol", QUrl::StrictMode))) - value << v.value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/08/15/nao#altSymbol. - * An alternative symbol representation for a resource - */ - void setAltSymbols(const QList& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - foreach(const QUrl& v, value) - values << v; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#altSymbol", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/08/15/nao#altSymbol. - * An alternative symbol representation for a resource - */ - void addAltSymbol(const QUrl& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#altSymbol", QUrl::StrictMode), value); - } - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/08/15/nao#hasTopic. - * Defines a relationship between two resources, where the object - * is a topic of the subject - */ - QList hasTopics() const { - QList value; - foreach(const QVariant& v, m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#hasTopic", QUrl::StrictMode))) - value << v.value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/08/15/nao#hasTopic. - * Defines a relationship between two resources, where the object - * is a topic of the subject - */ - void setHasTopics(const QList& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - foreach(const QUrl& v, value) - values << v; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#hasTopic", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/08/15/nao#hasTopic. - * Defines a relationship between two resources, where the object - * is a topic of the subject - */ - void addHasTopic(const QUrl& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#hasTopic", QUrl::StrictMode), value); - } - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/08/15/nao#creator. - * Refers to the single or group of individuals that created the - * resource - */ - QUrl creator() const { - QUrl value; - if(m_res->contains(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#creator", QUrl::StrictMode))) - value = m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#creator", QUrl::StrictMode)).first().value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/08/15/nao#creator. - * Refers to the single or group of individuals that created the - * resource - */ - void setCreator(const QUrl& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - values << value; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#creator", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/08/15/nao#creator. - * Refers to the single or group of individuals that created the - * resource - */ - void addCreator(const QUrl& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#creator", QUrl::StrictMode), value); - } - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/08/15/nao#userVisible. - * Mark a property, class, or even resource as user visible or not. - * Non-user-visible entities should never be presented to the - * user. By default everything is user-visible. - */ - bool userVisible() const { - bool value; - if(m_res->contains(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#userVisible", QUrl::StrictMode))) - value = m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#userVisible", QUrl::StrictMode)).first().value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/08/15/nao#userVisible. - * Mark a property, class, or even resource as user visible or not. - * Non-user-visible entities should never be presented to the - * user. By default everything is user-visible. - */ - void setUserVisible(const bool& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - values << value; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#userVisible", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/08/15/nao#userVisible. - * Mark a property, class, or even resource as user visible or not. - * Non-user-visible entities should never be presented to the - * user. By default everything is user-visible. - */ - void addUserVisible(const bool& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#userVisible", QUrl::StrictMode), value); - } - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/08/15/nao#pluralPrefLabel. - * The plural form of the preferred label for a resource - */ - QString pluralPrefLabel() const { - QString value; - if(m_res->contains(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#pluralPrefLabel", QUrl::StrictMode))) - value = m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#pluralPrefLabel", QUrl::StrictMode)).first().value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/08/15/nao#pluralPrefLabel. - * The plural form of the preferred label for a resource - */ - void setPluralPrefLabel(const QString& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - values << value; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#pluralPrefLabel", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/08/15/nao#pluralPrefLabel. - * The plural form of the preferred label for a resource - */ - void addPluralPrefLabel(const QString& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#pluralPrefLabel", QUrl::StrictMode), value); - } - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/08/15/nao#personalIdentifier. - * Defines a personal string identifier for a resource - */ - QStringList personalIdentifiers() const { - QStringList value; - foreach(const QVariant& v, m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#personalIdentifier", QUrl::StrictMode))) - value << v.value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/08/15/nao#personalIdentifier. - * Defines a personal string identifier for a resource - */ - void setPersonalIdentifiers(const QStringList& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - foreach(const QString& v, value) - values << v; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#personalIdentifier", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/08/15/nao#personalIdentifier. - * Defines a personal string identifier for a resource - */ - void addPersonalIdentifier(const QString& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#personalIdentifier", QUrl::StrictMode), value); - } - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/08/15/nao#score. - * An authoritative score for an item valued between 0 and 1 - */ - double score() const { - double value; - if(m_res->contains(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#score", QUrl::StrictMode))) - value = m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#score", QUrl::StrictMode)).first().value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/08/15/nao#score. - * An authoritative score for an item valued between 0 and 1 - */ - void setScore(const double& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - values << value; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#score", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/08/15/nao#score. - * An authoritative score for an item valued between 0 and 1 - */ - void addScore(const double& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#score", QUrl::StrictMode), value); - } - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/08/15/nao#lastModified. - * States the last modification time for a resource - */ - QDateTime lastModified() const { - QDateTime value; - if(m_res->contains(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#lastModified", QUrl::StrictMode))) - value = m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#lastModified", QUrl::StrictMode)).first().value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/08/15/nao#lastModified. - * States the last modification time for a resource - */ - void setLastModified(const QDateTime& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - values << value; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#lastModified", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/08/15/nao#lastModified. - * States the last modification time for a resource - */ - void addLastModified(const QDateTime& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#lastModified", QUrl::StrictMode), value); - } - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/08/15/nao#created. - * States the creation, or first modification time for a resource - */ - QDateTime created() const { - QDateTime value; - if(m_res->contains(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#created", QUrl::StrictMode))) - value = m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#created", QUrl::StrictMode)).first().value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/08/15/nao#created. - * States the creation, or first modification time for a resource - */ - void setCreated(const QDateTime& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - values << value; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#created", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/08/15/nao#created. - * States the creation, or first modification time for a resource - */ - void addCreated(const QDateTime& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#created", QUrl::StrictMode), value); - } - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/08/15/nao#hasSubResource. - * Defines a relationship between a resource and one or more sub - * resources - */ - QList hasSubResources() const { - QList value; - foreach(const QVariant& v, m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#hasSubResource", QUrl::StrictMode))) - value << v.value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/08/15/nao#hasSubResource. - * Defines a relationship between a resource and one or more sub - * resources - */ - void setHasSubResources(const QList& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - foreach(const QUrl& v, value) - values << v; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#hasSubResource", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/08/15/nao#hasSubResource. - * Defines a relationship between a resource and one or more sub - * resources - */ - void addHasSubResource(const QUrl& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#hasSubResource", QUrl::StrictMode), value); - } - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/08/15/nao#hasSuperResource. - * Defines a relationship between a resource and one or more super - * resources - */ - QList hasSuperResources() const { - QList value; - foreach(const QVariant& v, m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#hasSuperResource", QUrl::StrictMode))) - value << v.value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/08/15/nao#hasSuperResource. - * Defines a relationship between a resource and one or more super - * resources - */ - void setHasSuperResources(const QList& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - foreach(const QUrl& v, value) - values << v; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#hasSuperResource", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/08/15/nao#hasSuperResource. - * Defines a relationship between a resource and one or more super - * resources - */ - void addHasSuperResource(const QUrl& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#hasSuperResource", QUrl::StrictMode), value); - } - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/08/15/nao#contributor. - * Refers to a single or a group of individuals that contributed - * to a resource - */ - QList contributors() const { - QList value; - foreach(const QVariant& v, m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#contributor", QUrl::StrictMode))) - value << v.value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/08/15/nao#contributor. - * Refers to a single or a group of individuals that contributed - * to a resource - */ - void setContributors(const QList& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - foreach(const QUrl& v, value) - values << v; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#contributor", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/08/15/nao#contributor. - * Refers to a single or a group of individuals that contributed - * to a resource - */ - void addContributor(const QUrl& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#contributor", QUrl::StrictMode), value); - } - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/08/15/nao#prefLabel. - * A preferred label for a resource - */ - QString prefLabel() const { - QString value; - if(m_res->contains(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#prefLabel", QUrl::StrictMode))) - value = m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#prefLabel", QUrl::StrictMode)).first().value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/08/15/nao#prefLabel. - * A preferred label for a resource - */ - void setPrefLabel(const QString& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - values << value; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#prefLabel", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/08/15/nao#prefLabel. - * A preferred label for a resource - */ - void addPrefLabel(const QString& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#prefLabel", QUrl::StrictMode), value); - } - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/08/15/nao#isRelated. - * Defines an annotation for a resource in the form of a relationship - * between the subject resource and another resource - */ - QList isRelateds() const { - QList value; - foreach(const QVariant& v, m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#isRelated", QUrl::StrictMode))) - value << v.value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/08/15/nao#isRelated. - * Defines an annotation for a resource in the form of a relationship - * between the subject resource and another resource - */ - void setIsRelateds(const QList& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - foreach(const QUrl& v, value) - values << v; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#isRelated", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/08/15/nao#isRelated. - * Defines an annotation for a resource in the form of a relationship - * between the subject resource and another resource - */ - void addIsRelated(const QUrl& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#isRelated", QUrl::StrictMode), value); - } - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/08/15/nao#numericRating. - * Annotation for a resource in the form of a numeric rating (float - * value), allowed values are between 1 and 10 whereas 0 is interpreted - * as not set - */ - qint64 numericRating() const { - qint64 value; - if(m_res->contains(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#numericRating", QUrl::StrictMode))) - value = m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#numericRating", QUrl::StrictMode)).first().value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/08/15/nao#numericRating. - * Annotation for a resource in the form of a numeric rating (float - * value), allowed values are between 1 and 10 whereas 0 is interpreted - * as not set - */ - void setNumericRating(const qint64& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - values << value; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#numericRating", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/08/15/nao#numericRating. - * Annotation for a resource in the form of a numeric rating (float - * value), allowed values are between 1 and 10 whereas 0 is interpreted - * as not set - */ - void addNumericRating(const qint64& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#numericRating", QUrl::StrictMode), value); - } - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/08/15/nao#isTopicOf. - * Defines a relationship between two resources, where the subject - * is a topic of the object - */ - QList isTopicOfs() const { - QList value; - foreach(const QVariant& v, m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#isTopicOf", QUrl::StrictMode))) - value << v.value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/08/15/nao#isTopicOf. - * Defines a relationship between two resources, where the subject - * is a topic of the object - */ - void setIsTopicOfs(const QList& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - foreach(const QUrl& v, value) - values << v; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#isTopicOf", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/08/15/nao#isTopicOf. - * Defines a relationship between two resources, where the subject - * is a topic of the object - */ - void addIsTopicOf(const QUrl& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#isTopicOf", QUrl::StrictMode), value); - } - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/08/15/nao#modified. - * States the modification time for a resource - */ - QList modifieds() const { - QList value; - foreach(const QVariant& v, m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#modified", QUrl::StrictMode))) - value << v.value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/08/15/nao#modified. - * States the modification time for a resource - */ - void setModifieds(const QList& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - foreach(const QDateTime& v, value) - values << v; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#modified", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/08/15/nao#modified. - * States the modification time for a resource - */ - void addModified(const QDateTime& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#modified", QUrl::StrictMode), value); - } - -protected: - virtual QUrl resourceType() const { return QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#Party", QUrl::StrictMode); } - -private: - Nepomuk2::SimpleResource* m_res; -}; -} -} - -#endif diff -Nru kdepim-runtime-4.12.3/agents/ontologies/nao/symbol.h kdepim-runtime-4.12.90/agents/ontologies/nao/symbol.h --- kdepim-runtime-4.12.3/agents/ontologies/nao/symbol.h 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/agents/ontologies/nao/symbol.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,878 +0,0 @@ -#ifndef _NAO_SYMBOL_H_ -#define _NAO_SYMBOL_H_ - -#include -#include -#include -#include -#include -#include -#include - -#include - -namespace Nepomuk2 { -namespace NAO { -/** - * Represents a symbol - */ -class Symbol -{ -public: - Symbol(Nepomuk2::SimpleResource* res) - : m_res(res) - {} - - virtual ~Symbol() {} - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/08/15/nao#prefSymbol. - * A unique preferred symbol representation for a resource - */ - QUrl prefSymbol() const { - QUrl value; - if(m_res->contains(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#prefSymbol", QUrl::StrictMode))) - value = m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#prefSymbol", QUrl::StrictMode)).first().value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/08/15/nao#prefSymbol. - * A unique preferred symbol representation for a resource - */ - void setPrefSymbol(const QUrl& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - values << value; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#prefSymbol", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/08/15/nao#prefSymbol. - * A unique preferred symbol representation for a resource - */ - void addPrefSymbol(const QUrl& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#prefSymbol", QUrl::StrictMode), value); - } - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/08/15/nao#deprecated. - * If this property is assigned, the subject class, property, - * or resource, is deprecated and should not be used in production - * systems any longer. It may be removed without further notice. - */ - QUrl deprecated() const { - QUrl value; - if(m_res->contains(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#deprecated", QUrl::StrictMode))) - value = m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#deprecated", QUrl::StrictMode)).first().value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/08/15/nao#deprecated. - * If this property is assigned, the subject class, property, - * or resource, is deprecated and should not be used in production - * systems any longer. It may be removed without further notice. - */ - void setDeprecated(const QUrl& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - values << value; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#deprecated", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/08/15/nao#deprecated. - * If this property is assigned, the subject class, property, - * or resource, is deprecated and should not be used in production - * systems any longer. It may be removed without further notice. - */ - void addDeprecated(const QUrl& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#deprecated", QUrl::StrictMode), value); - } - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/08/15/nao#scoreParameter. - * A marker property to mark selected properties which are input - * to a mathematical algorithm to generate scores for resources. - * Properties are marked by being defined as subproperties of - * this property - */ - QList scoreParameters() const { - QList value; - foreach(const QVariant& v, m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#scoreParameter", QUrl::StrictMode))) - value << v.value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/08/15/nao#scoreParameter. - * A marker property to mark selected properties which are input - * to a mathematical algorithm to generate scores for resources. - * Properties are marked by being defined as subproperties of - * this property - */ - void setScoreParameters(const QList& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - foreach(const double& v, value) - values << v; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#scoreParameter", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/08/15/nao#scoreParameter. - * A marker property to mark selected properties which are input - * to a mathematical algorithm to generate scores for resources. - * Properties are marked by being defined as subproperties of - * this property - */ - void addScoreParameter(const double& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#scoreParameter", QUrl::StrictMode), value); - } - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/08/15/nao#description. - * A non-technical textual annotation for a resource - */ - QStringList descriptions() const { - QStringList value; - foreach(const QVariant& v, m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#description", QUrl::StrictMode))) - value << v.value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/08/15/nao#description. - * A non-technical textual annotation for a resource - */ - void setDescriptions(const QStringList& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - foreach(const QString& v, value) - values << v; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#description", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/08/15/nao#description. - * A non-technical textual annotation for a resource - */ - void addDescription(const QString& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#description", QUrl::StrictMode), value); - } - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/08/15/nao#altLabel. - * An alternative label alongside the preferred label for a resource - */ - QStringList altLabels() const { - QStringList value; - foreach(const QVariant& v, m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#altLabel", QUrl::StrictMode))) - value << v.value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/08/15/nao#altLabel. - * An alternative label alongside the preferred label for a resource - */ - void setAltLabels(const QStringList& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - foreach(const QString& v, value) - values << v; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#altLabel", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/08/15/nao#altLabel. - * An alternative label alongside the preferred label for a resource - */ - void addAltLabel(const QString& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#altLabel", QUrl::StrictMode), value); - } - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/08/15/nao#hasSymbol. - * Annotation for a resource in the form of a symbol representation - */ - QList hasSymbols() const { - QList value; - foreach(const QVariant& v, m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#hasSymbol", QUrl::StrictMode))) - value << v.value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/08/15/nao#hasSymbol. - * Annotation for a resource in the form of a symbol representation - */ - void setHasSymbols(const QList& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - foreach(const QUrl& v, value) - values << v; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#hasSymbol", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/08/15/nao#hasSymbol. - * Annotation for a resource in the form of a symbol representation - */ - void addHasSymbol(const QUrl& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#hasSymbol", QUrl::StrictMode), value); - } - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/08/15/nao#maintainedBy. - * The agent that maintains this resource, ie. created it and knows - * what to do with it. - */ - QList maintainedBys() const { - QList value; - foreach(const QVariant& v, m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#maintainedBy", QUrl::StrictMode))) - value << v.value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/08/15/nao#maintainedBy. - * The agent that maintains this resource, ie. created it and knows - * what to do with it. - */ - void setMaintainedBys(const QList& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - foreach(const QUrl& v, value) - values << v; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#maintainedBy", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/08/15/nao#maintainedBy. - * The agent that maintains this resource, ie. created it and knows - * what to do with it. - */ - void addMaintainedBy(const QUrl& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#maintainedBy", QUrl::StrictMode), value); - } - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/08/15/nao#hasTag. - * Defines an existing tag for a resource - */ - QList hasTags() const { - QList value; - foreach(const QVariant& v, m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#hasTag", QUrl::StrictMode))) - value << v.value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/08/15/nao#hasTag. - * Defines an existing tag for a resource - */ - void setHasTags(const QList& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - foreach(const QUrl& v, value) - values << v; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#hasTag", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/08/15/nao#hasTag. - * Defines an existing tag for a resource - */ - void addHasTag(const QUrl& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#hasTag", QUrl::StrictMode), value); - } - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/08/15/nao#altSymbol. - * An alternative symbol representation for a resource - */ - QList altSymbols() const { - QList value; - foreach(const QVariant& v, m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#altSymbol", QUrl::StrictMode))) - value << v.value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/08/15/nao#altSymbol. - * An alternative symbol representation for a resource - */ - void setAltSymbols(const QList& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - foreach(const QUrl& v, value) - values << v; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#altSymbol", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/08/15/nao#altSymbol. - * An alternative symbol representation for a resource - */ - void addAltSymbol(const QUrl& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#altSymbol", QUrl::StrictMode), value); - } - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/08/15/nao#hasTopic. - * Defines a relationship between two resources, where the object - * is a topic of the subject - */ - QList hasTopics() const { - QList value; - foreach(const QVariant& v, m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#hasTopic", QUrl::StrictMode))) - value << v.value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/08/15/nao#hasTopic. - * Defines a relationship between two resources, where the object - * is a topic of the subject - */ - void setHasTopics(const QList& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - foreach(const QUrl& v, value) - values << v; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#hasTopic", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/08/15/nao#hasTopic. - * Defines a relationship between two resources, where the object - * is a topic of the subject - */ - void addHasTopic(const QUrl& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#hasTopic", QUrl::StrictMode), value); - } - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/08/15/nao#creator. - * Refers to the single or group of individuals that created the - * resource - */ - QUrl creator() const { - QUrl value; - if(m_res->contains(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#creator", QUrl::StrictMode))) - value = m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#creator", QUrl::StrictMode)).first().value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/08/15/nao#creator. - * Refers to the single or group of individuals that created the - * resource - */ - void setCreator(const QUrl& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - values << value; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#creator", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/08/15/nao#creator. - * Refers to the single or group of individuals that created the - * resource - */ - void addCreator(const QUrl& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#creator", QUrl::StrictMode), value); - } - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/08/15/nao#userVisible. - * Mark a property, class, or even resource as user visible or not. - * Non-user-visible entities should never be presented to the - * user. By default everything is user-visible. - */ - bool userVisible() const { - bool value; - if(m_res->contains(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#userVisible", QUrl::StrictMode))) - value = m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#userVisible", QUrl::StrictMode)).first().value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/08/15/nao#userVisible. - * Mark a property, class, or even resource as user visible or not. - * Non-user-visible entities should never be presented to the - * user. By default everything is user-visible. - */ - void setUserVisible(const bool& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - values << value; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#userVisible", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/08/15/nao#userVisible. - * Mark a property, class, or even resource as user visible or not. - * Non-user-visible entities should never be presented to the - * user. By default everything is user-visible. - */ - void addUserVisible(const bool& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#userVisible", QUrl::StrictMode), value); - } - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/08/15/nao#pluralPrefLabel. - * The plural form of the preferred label for a resource - */ - QString pluralPrefLabel() const { - QString value; - if(m_res->contains(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#pluralPrefLabel", QUrl::StrictMode))) - value = m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#pluralPrefLabel", QUrl::StrictMode)).first().value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/08/15/nao#pluralPrefLabel. - * The plural form of the preferred label for a resource - */ - void setPluralPrefLabel(const QString& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - values << value; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#pluralPrefLabel", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/08/15/nao#pluralPrefLabel. - * The plural form of the preferred label for a resource - */ - void addPluralPrefLabel(const QString& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#pluralPrefLabel", QUrl::StrictMode), value); - } - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/08/15/nao#personalIdentifier. - * Defines a personal string identifier for a resource - */ - QStringList personalIdentifiers() const { - QStringList value; - foreach(const QVariant& v, m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#personalIdentifier", QUrl::StrictMode))) - value << v.value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/08/15/nao#personalIdentifier. - * Defines a personal string identifier for a resource - */ - void setPersonalIdentifiers(const QStringList& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - foreach(const QString& v, value) - values << v; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#personalIdentifier", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/08/15/nao#personalIdentifier. - * Defines a personal string identifier for a resource - */ - void addPersonalIdentifier(const QString& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#personalIdentifier", QUrl::StrictMode), value); - } - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/08/15/nao#score. - * An authoritative score for an item valued between 0 and 1 - */ - double score() const { - double value; - if(m_res->contains(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#score", QUrl::StrictMode))) - value = m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#score", QUrl::StrictMode)).first().value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/08/15/nao#score. - * An authoritative score for an item valued between 0 and 1 - */ - void setScore(const double& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - values << value; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#score", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/08/15/nao#score. - * An authoritative score for an item valued between 0 and 1 - */ - void addScore(const double& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#score", QUrl::StrictMode), value); - } - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/08/15/nao#lastModified. - * States the last modification time for a resource - */ - QDateTime lastModified() const { - QDateTime value; - if(m_res->contains(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#lastModified", QUrl::StrictMode))) - value = m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#lastModified", QUrl::StrictMode)).first().value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/08/15/nao#lastModified. - * States the last modification time for a resource - */ - void setLastModified(const QDateTime& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - values << value; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#lastModified", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/08/15/nao#lastModified. - * States the last modification time for a resource - */ - void addLastModified(const QDateTime& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#lastModified", QUrl::StrictMode), value); - } - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/08/15/nao#created. - * States the creation, or first modification time for a resource - */ - QDateTime created() const { - QDateTime value; - if(m_res->contains(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#created", QUrl::StrictMode))) - value = m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#created", QUrl::StrictMode)).first().value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/08/15/nao#created. - * States the creation, or first modification time for a resource - */ - void setCreated(const QDateTime& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - values << value; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#created", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/08/15/nao#created. - * States the creation, or first modification time for a resource - */ - void addCreated(const QDateTime& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#created", QUrl::StrictMode), value); - } - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/08/15/nao#hasSubResource. - * Defines a relationship between a resource and one or more sub - * resources - */ - QList hasSubResources() const { - QList value; - foreach(const QVariant& v, m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#hasSubResource", QUrl::StrictMode))) - value << v.value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/08/15/nao#hasSubResource. - * Defines a relationship between a resource and one or more sub - * resources - */ - void setHasSubResources(const QList& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - foreach(const QUrl& v, value) - values << v; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#hasSubResource", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/08/15/nao#hasSubResource. - * Defines a relationship between a resource and one or more sub - * resources - */ - void addHasSubResource(const QUrl& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#hasSubResource", QUrl::StrictMode), value); - } - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/08/15/nao#hasSuperResource. - * Defines a relationship between a resource and one or more super - * resources - */ - QList hasSuperResources() const { - QList value; - foreach(const QVariant& v, m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#hasSuperResource", QUrl::StrictMode))) - value << v.value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/08/15/nao#hasSuperResource. - * Defines a relationship between a resource and one or more super - * resources - */ - void setHasSuperResources(const QList& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - foreach(const QUrl& v, value) - values << v; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#hasSuperResource", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/08/15/nao#hasSuperResource. - * Defines a relationship between a resource and one or more super - * resources - */ - void addHasSuperResource(const QUrl& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#hasSuperResource", QUrl::StrictMode), value); - } - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/08/15/nao#contributor. - * Refers to a single or a group of individuals that contributed - * to a resource - */ - QList contributors() const { - QList value; - foreach(const QVariant& v, m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#contributor", QUrl::StrictMode))) - value << v.value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/08/15/nao#contributor. - * Refers to a single or a group of individuals that contributed - * to a resource - */ - void setContributors(const QList& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - foreach(const QUrl& v, value) - values << v; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#contributor", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/08/15/nao#contributor. - * Refers to a single or a group of individuals that contributed - * to a resource - */ - void addContributor(const QUrl& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#contributor", QUrl::StrictMode), value); - } - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/08/15/nao#prefLabel. - * A preferred label for a resource - */ - QString prefLabel() const { - QString value; - if(m_res->contains(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#prefLabel", QUrl::StrictMode))) - value = m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#prefLabel", QUrl::StrictMode)).first().value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/08/15/nao#prefLabel. - * A preferred label for a resource - */ - void setPrefLabel(const QString& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - values << value; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#prefLabel", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/08/15/nao#prefLabel. - * A preferred label for a resource - */ - void addPrefLabel(const QString& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#prefLabel", QUrl::StrictMode), value); - } - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/08/15/nao#isRelated. - * Defines an annotation for a resource in the form of a relationship - * between the subject resource and another resource - */ - QList isRelateds() const { - QList value; - foreach(const QVariant& v, m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#isRelated", QUrl::StrictMode))) - value << v.value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/08/15/nao#isRelated. - * Defines an annotation for a resource in the form of a relationship - * between the subject resource and another resource - */ - void setIsRelateds(const QList& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - foreach(const QUrl& v, value) - values << v; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#isRelated", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/08/15/nao#isRelated. - * Defines an annotation for a resource in the form of a relationship - * between the subject resource and another resource - */ - void addIsRelated(const QUrl& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#isRelated", QUrl::StrictMode), value); - } - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/08/15/nao#numericRating. - * Annotation for a resource in the form of a numeric rating (float - * value), allowed values are between 1 and 10 whereas 0 is interpreted - * as not set - */ - qint64 numericRating() const { - qint64 value; - if(m_res->contains(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#numericRating", QUrl::StrictMode))) - value = m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#numericRating", QUrl::StrictMode)).first().value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/08/15/nao#numericRating. - * Annotation for a resource in the form of a numeric rating (float - * value), allowed values are between 1 and 10 whereas 0 is interpreted - * as not set - */ - void setNumericRating(const qint64& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - values << value; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#numericRating", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/08/15/nao#numericRating. - * Annotation for a resource in the form of a numeric rating (float - * value), allowed values are between 1 and 10 whereas 0 is interpreted - * as not set - */ - void addNumericRating(const qint64& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#numericRating", QUrl::StrictMode), value); - } - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/08/15/nao#isTopicOf. - * Defines a relationship between two resources, where the subject - * is a topic of the object - */ - QList isTopicOfs() const { - QList value; - foreach(const QVariant& v, m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#isTopicOf", QUrl::StrictMode))) - value << v.value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/08/15/nao#isTopicOf. - * Defines a relationship between two resources, where the subject - * is a topic of the object - */ - void setIsTopicOfs(const QList& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - foreach(const QUrl& v, value) - values << v; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#isTopicOf", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/08/15/nao#isTopicOf. - * Defines a relationship between two resources, where the subject - * is a topic of the object - */ - void addIsTopicOf(const QUrl& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#isTopicOf", QUrl::StrictMode), value); - } - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/08/15/nao#modified. - * States the modification time for a resource - */ - QList modifieds() const { - QList value; - foreach(const QVariant& v, m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#modified", QUrl::StrictMode))) - value << v.value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/08/15/nao#modified. - * States the modification time for a resource - */ - void setModifieds(const QList& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - foreach(const QDateTime& v, value) - values << v; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#modified", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/08/15/nao#modified. - * States the modification time for a resource - */ - void addModified(const QDateTime& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#modified", QUrl::StrictMode), value); - } - -protected: - virtual QUrl resourceType() const { return QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#Symbol", QUrl::StrictMode); } - -private: - Nepomuk2::SimpleResource* m_res; -}; -} -} - -#endif diff -Nru kdepim-runtime-4.12.3/agents/ontologies/nao/tag.h kdepim-runtime-4.12.90/agents/ontologies/nao/tag.h --- kdepim-runtime-4.12.3/agents/ontologies/nao/tag.h 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/agents/ontologies/nao/tag.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,910 +0,0 @@ -#ifndef _NAO_TAG_H_ -#define _NAO_TAG_H_ - -#include -#include -#include -#include -#include -#include -#include - -#include - -namespace Nepomuk2 { -namespace NAO { -/** - * Represents a generic tag - */ -class Tag -{ -public: - Tag(Nepomuk2::SimpleResource* res) - : m_res(res) - {} - - virtual ~Tag() {} - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/08/15/nao#prefSymbol. - * A unique preferred symbol representation for a resource - */ - QUrl prefSymbol() const { - QUrl value; - if(m_res->contains(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#prefSymbol", QUrl::StrictMode))) - value = m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#prefSymbol", QUrl::StrictMode)).first().value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/08/15/nao#prefSymbol. - * A unique preferred symbol representation for a resource - */ - void setPrefSymbol(const QUrl& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - values << value; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#prefSymbol", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/08/15/nao#prefSymbol. - * A unique preferred symbol representation for a resource - */ - void addPrefSymbol(const QUrl& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#prefSymbol", QUrl::StrictMode), value); - } - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/08/15/nao#deprecated. - * If this property is assigned, the subject class, property, - * or resource, is deprecated and should not be used in production - * systems any longer. It may be removed without further notice. - */ - QUrl deprecated() const { - QUrl value; - if(m_res->contains(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#deprecated", QUrl::StrictMode))) - value = m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#deprecated", QUrl::StrictMode)).first().value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/08/15/nao#deprecated. - * If this property is assigned, the subject class, property, - * or resource, is deprecated and should not be used in production - * systems any longer. It may be removed without further notice. - */ - void setDeprecated(const QUrl& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - values << value; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#deprecated", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/08/15/nao#deprecated. - * If this property is assigned, the subject class, property, - * or resource, is deprecated and should not be used in production - * systems any longer. It may be removed without further notice. - */ - void addDeprecated(const QUrl& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#deprecated", QUrl::StrictMode), value); - } - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/08/15/nao#scoreParameter. - * A marker property to mark selected properties which are input - * to a mathematical algorithm to generate scores for resources. - * Properties are marked by being defined as subproperties of - * this property - */ - QList scoreParameters() const { - QList value; - foreach(const QVariant& v, m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#scoreParameter", QUrl::StrictMode))) - value << v.value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/08/15/nao#scoreParameter. - * A marker property to mark selected properties which are input - * to a mathematical algorithm to generate scores for resources. - * Properties are marked by being defined as subproperties of - * this property - */ - void setScoreParameters(const QList& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - foreach(const double& v, value) - values << v; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#scoreParameter", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/08/15/nao#scoreParameter. - * A marker property to mark selected properties which are input - * to a mathematical algorithm to generate scores for resources. - * Properties are marked by being defined as subproperties of - * this property - */ - void addScoreParameter(const double& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#scoreParameter", QUrl::StrictMode), value); - } - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/08/15/nao#description. - * A non-technical textual annotation for a resource - */ - QStringList descriptions() const { - QStringList value; - foreach(const QVariant& v, m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#description", QUrl::StrictMode))) - value << v.value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/08/15/nao#description. - * A non-technical textual annotation for a resource - */ - void setDescriptions(const QStringList& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - foreach(const QString& v, value) - values << v; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#description", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/08/15/nao#description. - * A non-technical textual annotation for a resource - */ - void addDescription(const QString& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#description", QUrl::StrictMode), value); - } - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/08/15/nao#hasSymbol. - * Annotation for a resource in the form of a symbol representation - */ - QList hasSymbols() const { - QList value; - foreach(const QVariant& v, m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#hasSymbol", QUrl::StrictMode))) - value << v.value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/08/15/nao#hasSymbol. - * Annotation for a resource in the form of a symbol representation - */ - void setHasSymbols(const QList& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - foreach(const QUrl& v, value) - values << v; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#hasSymbol", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/08/15/nao#hasSymbol. - * Annotation for a resource in the form of a symbol representation - */ - void addHasSymbol(const QUrl& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#hasSymbol", QUrl::StrictMode), value); - } - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/08/15/nao#altLabel. - * An alternative label alongside the preferred label for a resource - */ - QStringList altLabels() const { - QStringList value; - foreach(const QVariant& v, m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#altLabel", QUrl::StrictMode))) - value << v.value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/08/15/nao#altLabel. - * An alternative label alongside the preferred label for a resource - */ - void setAltLabels(const QStringList& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - foreach(const QString& v, value) - values << v; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#altLabel", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/08/15/nao#altLabel. - * An alternative label alongside the preferred label for a resource - */ - void addAltLabel(const QString& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#altLabel", QUrl::StrictMode), value); - } - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/08/15/nao#hasTopic. - * Defines a relationship between two resources, where the object - * is a topic of the subject - */ - QList hasTopics() const { - QList value; - foreach(const QVariant& v, m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#hasTopic", QUrl::StrictMode))) - value << v.value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/08/15/nao#hasTopic. - * Defines a relationship between two resources, where the object - * is a topic of the subject - */ - void setHasTopics(const QList& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - foreach(const QUrl& v, value) - values << v; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#hasTopic", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/08/15/nao#hasTopic. - * Defines a relationship between two resources, where the object - * is a topic of the subject - */ - void addHasTopic(const QUrl& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#hasTopic", QUrl::StrictMode), value); - } - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/08/15/nao#maintainedBy. - * The agent that maintains this resource, ie. created it and knows - * what to do with it. - */ - QList maintainedBys() const { - QList value; - foreach(const QVariant& v, m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#maintainedBy", QUrl::StrictMode))) - value << v.value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/08/15/nao#maintainedBy. - * The agent that maintains this resource, ie. created it and knows - * what to do with it. - */ - void setMaintainedBys(const QList& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - foreach(const QUrl& v, value) - values << v; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#maintainedBy", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/08/15/nao#maintainedBy. - * The agent that maintains this resource, ie. created it and knows - * what to do with it. - */ - void addMaintainedBy(const QUrl& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#maintainedBy", QUrl::StrictMode), value); - } - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/08/15/nao#hasTag. - * Defines an existing tag for a resource - */ - QList hasTags() const { - QList value; - foreach(const QVariant& v, m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#hasTag", QUrl::StrictMode))) - value << v.value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/08/15/nao#hasTag. - * Defines an existing tag for a resource - */ - void setHasTags(const QList& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - foreach(const QUrl& v, value) - values << v; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#hasTag", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/08/15/nao#hasTag. - * Defines an existing tag for a resource - */ - void addHasTag(const QUrl& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#hasTag", QUrl::StrictMode), value); - } - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/08/15/nao#altSymbol. - * An alternative symbol representation for a resource - */ - QList altSymbols() const { - QList value; - foreach(const QVariant& v, m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#altSymbol", QUrl::StrictMode))) - value << v.value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/08/15/nao#altSymbol. - * An alternative symbol representation for a resource - */ - void setAltSymbols(const QList& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - foreach(const QUrl& v, value) - values << v; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#altSymbol", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/08/15/nao#altSymbol. - * An alternative symbol representation for a resource - */ - void addAltSymbol(const QUrl& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#altSymbol", QUrl::StrictMode), value); - } - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/08/15/nao#personalIdentifier. - * Defines a personal string identifier for a resource - */ - QStringList personalIdentifiers() const { - QStringList value; - foreach(const QVariant& v, m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#personalIdentifier", QUrl::StrictMode))) - value << v.value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/08/15/nao#personalIdentifier. - * Defines a personal string identifier for a resource - */ - void setPersonalIdentifiers(const QStringList& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - foreach(const QString& v, value) - values << v; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#personalIdentifier", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/08/15/nao#personalIdentifier. - * Defines a personal string identifier for a resource - */ - void addPersonalIdentifier(const QString& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#personalIdentifier", QUrl::StrictMode), value); - } - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/08/15/nao#creator. - * Refers to the single or group of individuals that created the - * resource - */ - QUrl creator() const { - QUrl value; - if(m_res->contains(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#creator", QUrl::StrictMode))) - value = m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#creator", QUrl::StrictMode)).first().value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/08/15/nao#creator. - * Refers to the single or group of individuals that created the - * resource - */ - void setCreator(const QUrl& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - values << value; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#creator", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/08/15/nao#creator. - * Refers to the single or group of individuals that created the - * resource - */ - void addCreator(const QUrl& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#creator", QUrl::StrictMode), value); - } - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/08/15/nao#userVisible. - * Mark a property, class, or even resource as user visible or not. - * Non-user-visible entities should never be presented to the - * user. By default everything is user-visible. - */ - bool userVisible() const { - bool value; - if(m_res->contains(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#userVisible", QUrl::StrictMode))) - value = m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#userVisible", QUrl::StrictMode)).first().value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/08/15/nao#userVisible. - * Mark a property, class, or even resource as user visible or not. - * Non-user-visible entities should never be presented to the - * user. By default everything is user-visible. - */ - void setUserVisible(const bool& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - values << value; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#userVisible", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/08/15/nao#userVisible. - * Mark a property, class, or even resource as user visible or not. - * Non-user-visible entities should never be presented to the - * user. By default everything is user-visible. - */ - void addUserVisible(const bool& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#userVisible", QUrl::StrictMode), value); - } - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/08/15/nao#pluralPrefLabel. - * The plural form of the preferred label for a resource - */ - QString pluralPrefLabel() const { - QString value; - if(m_res->contains(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#pluralPrefLabel", QUrl::StrictMode))) - value = m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#pluralPrefLabel", QUrl::StrictMode)).first().value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/08/15/nao#pluralPrefLabel. - * The plural form of the preferred label for a resource - */ - void setPluralPrefLabel(const QString& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - values << value; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#pluralPrefLabel", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/08/15/nao#pluralPrefLabel. - * The plural form of the preferred label for a resource - */ - void addPluralPrefLabel(const QString& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#pluralPrefLabel", QUrl::StrictMode), value); - } - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/08/15/nao#isTagFor. - * States which resources a tag is associated with - */ - QList isTagFors() const { - QList value; - foreach(const QVariant& v, m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#isTagFor", QUrl::StrictMode))) - value << v.value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/08/15/nao#isTagFor. - * States which resources a tag is associated with - */ - void setIsTagFors(const QList& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - foreach(const QUrl& v, value) - values << v; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#isTagFor", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/08/15/nao#isTagFor. - * States which resources a tag is associated with - */ - void addIsTagFor(const QUrl& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#isTagFor", QUrl::StrictMode), value); - } - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/08/15/nao#score. - * An authoritative score for an item valued between 0 and 1 - */ - double score() const { - double value; - if(m_res->contains(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#score", QUrl::StrictMode))) - value = m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#score", QUrl::StrictMode)).first().value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/08/15/nao#score. - * An authoritative score for an item valued between 0 and 1 - */ - void setScore(const double& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - values << value; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#score", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/08/15/nao#score. - * An authoritative score for an item valued between 0 and 1 - */ - void addScore(const double& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#score", QUrl::StrictMode), value); - } - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/08/15/nao#lastModified. - * States the last modification time for a resource - */ - QDateTime lastModified() const { - QDateTime value; - if(m_res->contains(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#lastModified", QUrl::StrictMode))) - value = m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#lastModified", QUrl::StrictMode)).first().value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/08/15/nao#lastModified. - * States the last modification time for a resource - */ - void setLastModified(const QDateTime& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - values << value; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#lastModified", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/08/15/nao#lastModified. - * States the last modification time for a resource - */ - void addLastModified(const QDateTime& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#lastModified", QUrl::StrictMode), value); - } - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/08/15/nao#created. - * States the creation, or first modification time for a resource - */ - QDateTime created() const { - QDateTime value; - if(m_res->contains(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#created", QUrl::StrictMode))) - value = m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#created", QUrl::StrictMode)).first().value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/08/15/nao#created. - * States the creation, or first modification time for a resource - */ - void setCreated(const QDateTime& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - values << value; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#created", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/08/15/nao#created. - * States the creation, or first modification time for a resource - */ - void addCreated(const QDateTime& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#created", QUrl::StrictMode), value); - } - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/08/15/nao#hasSubResource. - * Defines a relationship between a resource and one or more sub - * resources - */ - QList hasSubResources() const { - QList value; - foreach(const QVariant& v, m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#hasSubResource", QUrl::StrictMode))) - value << v.value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/08/15/nao#hasSubResource. - * Defines a relationship between a resource and one or more sub - * resources - */ - void setHasSubResources(const QList& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - foreach(const QUrl& v, value) - values << v; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#hasSubResource", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/08/15/nao#hasSubResource. - * Defines a relationship between a resource and one or more sub - * resources - */ - void addHasSubResource(const QUrl& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#hasSubResource", QUrl::StrictMode), value); - } - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/08/15/nao#hasSuperResource. - * Defines a relationship between a resource and one or more super - * resources - */ - QList hasSuperResources() const { - QList value; - foreach(const QVariant& v, m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#hasSuperResource", QUrl::StrictMode))) - value << v.value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/08/15/nao#hasSuperResource. - * Defines a relationship between a resource and one or more super - * resources - */ - void setHasSuperResources(const QList& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - foreach(const QUrl& v, value) - values << v; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#hasSuperResource", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/08/15/nao#hasSuperResource. - * Defines a relationship between a resource and one or more super - * resources - */ - void addHasSuperResource(const QUrl& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#hasSuperResource", QUrl::StrictMode), value); - } - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/08/15/nao#contributor. - * Refers to a single or a group of individuals that contributed - * to a resource - */ - QList contributors() const { - QList value; - foreach(const QVariant& v, m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#contributor", QUrl::StrictMode))) - value << v.value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/08/15/nao#contributor. - * Refers to a single or a group of individuals that contributed - * to a resource - */ - void setContributors(const QList& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - foreach(const QUrl& v, value) - values << v; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#contributor", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/08/15/nao#contributor. - * Refers to a single or a group of individuals that contributed - * to a resource - */ - void addContributor(const QUrl& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#contributor", QUrl::StrictMode), value); - } - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/08/15/nao#prefLabel. - * A preferred label for a resource - */ - QString prefLabel() const { - QString value; - if(m_res->contains(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#prefLabel", QUrl::StrictMode))) - value = m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#prefLabel", QUrl::StrictMode)).first().value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/08/15/nao#prefLabel. - * A preferred label for a resource - */ - void setPrefLabel(const QString& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - values << value; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#prefLabel", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/08/15/nao#prefLabel. - * A preferred label for a resource - */ - void addPrefLabel(const QString& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#prefLabel", QUrl::StrictMode), value); - } - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/08/15/nao#isRelated. - * Defines an annotation for a resource in the form of a relationship - * between the subject resource and another resource - */ - QList isRelateds() const { - QList value; - foreach(const QVariant& v, m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#isRelated", QUrl::StrictMode))) - value << v.value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/08/15/nao#isRelated. - * Defines an annotation for a resource in the form of a relationship - * between the subject resource and another resource - */ - void setIsRelateds(const QList& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - foreach(const QUrl& v, value) - values << v; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#isRelated", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/08/15/nao#isRelated. - * Defines an annotation for a resource in the form of a relationship - * between the subject resource and another resource - */ - void addIsRelated(const QUrl& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#isRelated", QUrl::StrictMode), value); - } - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/08/15/nao#numericRating. - * Annotation for a resource in the form of a numeric rating (float - * value), allowed values are between 1 and 10 whereas 0 is interpreted - * as not set - */ - qint64 numericRating() const { - qint64 value; - if(m_res->contains(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#numericRating", QUrl::StrictMode))) - value = m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#numericRating", QUrl::StrictMode)).first().value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/08/15/nao#numericRating. - * Annotation for a resource in the form of a numeric rating (float - * value), allowed values are between 1 and 10 whereas 0 is interpreted - * as not set - */ - void setNumericRating(const qint64& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - values << value; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#numericRating", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/08/15/nao#numericRating. - * Annotation for a resource in the form of a numeric rating (float - * value), allowed values are between 1 and 10 whereas 0 is interpreted - * as not set - */ - void addNumericRating(const qint64& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#numericRating", QUrl::StrictMode), value); - } - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/08/15/nao#isTopicOf. - * Defines a relationship between two resources, where the subject - * is a topic of the object - */ - QList isTopicOfs() const { - QList value; - foreach(const QVariant& v, m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#isTopicOf", QUrl::StrictMode))) - value << v.value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/08/15/nao#isTopicOf. - * Defines a relationship between two resources, where the subject - * is a topic of the object - */ - void setIsTopicOfs(const QList& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - foreach(const QUrl& v, value) - values << v; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#isTopicOf", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/08/15/nao#isTopicOf. - * Defines a relationship between two resources, where the subject - * is a topic of the object - */ - void addIsTopicOf(const QUrl& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#isTopicOf", QUrl::StrictMode), value); - } - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/08/15/nao#modified. - * States the modification time for a resource - */ - QList modifieds() const { - QList value; - foreach(const QVariant& v, m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#modified", QUrl::StrictMode))) - value << v.value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/08/15/nao#modified. - * States the modification time for a resource - */ - void setModifieds(const QList& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - foreach(const QDateTime& v, value) - values << v; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#modified", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/08/15/nao#modified. - * States the modification time for a resource - */ - void addModified(const QDateTime& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#modified", QUrl::StrictMode), value); - } - -protected: - virtual QUrl resourceType() const { return QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#Tag", QUrl::StrictMode); } - -private: - Nepomuk2::SimpleResource* m_res; -}; -} -} - -#endif diff -Nru kdepim-runtime-4.12.3/agents/ontologies/ncal/accessclassification.h kdepim-runtime-4.12.90/agents/ontologies/ncal/accessclassification.h --- kdepim-runtime-4.12.3/agents/ontologies/ncal/accessclassification.h 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/agents/ontologies/ncal/accessclassification.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,41 +0,0 @@ -#ifndef _NCAL_ACCESSCLASSIFICATION_H_ -#define _NCAL_ACCESSCLASSIFICATION_H_ - -#include -#include -#include -#include -#include -#include -#include - -#include - -namespace Nepomuk2 { -namespace NCAL { -/** - * Access classification of a calendar component. Introduced - * to express the set of values for the ncal:class property. The - * user may use instances provided with this ontology or create - * his/her own with desired semantics. See the documentation - * of ncal:class for details. - */ -class AccessClassification -{ -public: - AccessClassification(Nepomuk2::SimpleResource* res) - : m_res(res) - {} - - virtual ~AccessClassification() {} - -protected: - virtual QUrl resourceType() const { return QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#AccessClassification", QUrl::StrictMode); } - -private: - Nepomuk2::SimpleResource* m_res; -}; -} -} - -#endif diff -Nru kdepim-runtime-4.12.3/agents/ontologies/ncal/alarmaction.h kdepim-runtime-4.12.90/agents/ontologies/ncal/alarmaction.h --- kdepim-runtime-4.12.3/agents/ontologies/ncal/alarmaction.h 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/agents/ontologies/ncal/alarmaction.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,39 +0,0 @@ -#ifndef _NCAL_ALARMACTION_H_ -#define _NCAL_ALARMACTION_H_ - -#include -#include -#include -#include -#include -#include -#include - -#include - -namespace Nepomuk2 { -namespace NCAL { -/** - * Action to be performed on alarm. This class has been introduced - * to express the limited set of values of the ncal:action property. - * Please refer to the documentation of ncal:action for details. - */ -class AlarmAction -{ -public: - AlarmAction(Nepomuk2::SimpleResource* res) - : m_res(res) - {} - - virtual ~AlarmAction() {} - -protected: - virtual QUrl resourceType() const { return QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#AlarmAction", QUrl::StrictMode); } - -private: - Nepomuk2::SimpleResource* m_res; -}; -} -} - -#endif diff -Nru kdepim-runtime-4.12.3/agents/ontologies/ncal/alarm.h kdepim-runtime-4.12.90/agents/ontologies/ncal/alarm.h --- kdepim-runtime-4.12.3/agents/ontologies/ncal/alarm.h 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/agents/ontologies/ncal/alarm.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,119 +0,0 @@ -#ifndef _NCAL_ALARM_H_ -#define _NCAL_ALARM_H_ - -#include -#include -#include -#include -#include -#include -#include - -#include - -#include "ncal/unionofalarmeventtodo.h" -#include "ncal/unionofalarmeventfreebusytodo.h" -#include "ncal/unionofalarmeventfreebusyjournaltodo.h" -#include "ncal/unionofalarmeventjournaltodo.h" -namespace Nepomuk2 { -namespace NCAL { -/** - * Provide a grouping of component properties that define an alarm. - */ -class Alarm : public NCAL::UnionOfAlarmEventTodo, public NCAL::UnionOfAlarmEventFreebusyTodo, public NCAL::UnionOfAlarmEventFreebusyJournalTodo, public NCAL::UnionOfAlarmEventJournalTodo -{ -public: - Alarm(Nepomuk2::SimpleResource* res) - : NCAL::UnionOfAlarmEventTodo(res), NCAL::UnionOfAlarmEventFreebusyTodo(res), NCAL::UnionOfAlarmEventFreebusyJournalTodo(res), NCAL::UnionOfAlarmEventJournalTodo(res), m_res(res) - {} - - virtual ~Alarm() {} - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#action. - * This property defines the action to be invoked when an alarm - * is triggered. Inspired by RFC 2445 sec 4.8.6.1. Originally - * this property had a limited set of values. They are expressed - * as instances of the AlarmAction class. - */ - QList actions() const { - QList value; - foreach(const QVariant& v, m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#action", QUrl::StrictMode))) - value << v.value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#action. - * This property defines the action to be invoked when an alarm - * is triggered. Inspired by RFC 2445 sec 4.8.6.1. Originally - * this property had a limited set of values. They are expressed - * as instances of the AlarmAction class. - */ - void setActions(const QList& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - foreach(const QUrl& v, value) - values << v; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#action", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#action. - * This property defines the action to be invoked when an alarm - * is triggered. Inspired by RFC 2445 sec 4.8.6.1. Originally - * this property had a limited set of values. They are expressed - * as instances of the AlarmAction class. - */ - void addAction(const QUrl& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#action", QUrl::StrictMode), value); - } - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#repeat. - * This property defines the number of time the alarm should be - * repeated, after the initial trigger. Inspired by RFC 2445 sec. - * 4.8.6.2 - */ - qint64 repeat() const { - qint64 value; - if(m_res->contains(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#repeat", QUrl::StrictMode))) - value = m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#repeat", QUrl::StrictMode)).first().value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#repeat. - * This property defines the number of time the alarm should be - * repeated, after the initial trigger. Inspired by RFC 2445 sec. - * 4.8.6.2 - */ - void setRepeat(const qint64& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - values << value; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#repeat", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#repeat. - * This property defines the number of time the alarm should be - * repeated, after the initial trigger. Inspired by RFC 2445 sec. - * 4.8.6.2 - */ - void addRepeat(const qint64& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#repeat", QUrl::StrictMode), value); - } - -protected: - virtual QUrl resourceType() const { return QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#Alarm", QUrl::StrictMode); } - -private: - Nepomuk2::SimpleResource* m_res; -}; -} -} - -#endif diff -Nru kdepim-runtime-4.12.3/agents/ontologies/ncal/attachmentencoding.h kdepim-runtime-4.12.90/agents/ontologies/ncal/attachmentencoding.h --- kdepim-runtime-4.12.3/agents/ontologies/ncal/attachmentencoding.h 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/agents/ontologies/ncal/attachmentencoding.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,39 +0,0 @@ -#ifndef _NCAL_ATTACHMENTENCODING_H_ -#define _NCAL_ATTACHMENTENCODING_H_ - -#include -#include -#include -#include -#include -#include -#include - -#include - -namespace Nepomuk2 { -namespace NCAL { -/** - * Attachment encoding. This class has been introduced to express - * the limited vocabulary of values for the ncal:encoding property. - * See the documentation of ncal:encoding for details. - */ -class AttachmentEncoding -{ -public: - AttachmentEncoding(Nepomuk2::SimpleResource* res) - : m_res(res) - {} - - virtual ~AttachmentEncoding() {} - -protected: - virtual QUrl resourceType() const { return QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#AttachmentEncoding", QUrl::StrictMode); } - -private: - Nepomuk2::SimpleResource* m_res; -}; -} -} - -#endif diff -Nru kdepim-runtime-4.12.3/agents/ontologies/ncal/attachment.h kdepim-runtime-4.12.90/agents/ontologies/ncal/attachment.h --- kdepim-runtime-4.12.3/agents/ontologies/ncal/attachment.h 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/agents/ontologies/ncal/attachment.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,200 +0,0 @@ -#ifndef _NCAL_ATTACHMENT_H_ -#define _NCAL_ATTACHMENT_H_ - -#include -#include -#include -#include -#include -#include -#include - -#include - -namespace Nepomuk2 { -namespace NCAL { -/** - * An object attached to a calendar entity. This class has been - * introduced to serve as a structured value of the ncal:attach - * property. See the documentation of ncal:attach for details. - */ -class Attachment -{ -public: - Attachment(Nepomuk2::SimpleResource* res) - : m_res(res) - {} - - virtual ~Attachment() {} - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#attachmentUri. - * The uri of the attachment. Created to express the actual value - * of the ATTACH property defined in RFC 2445 sec. 4.8.1.1. This - * property expresses the default URI datatype of that property. - * see ncal:attachmentContents for the BINARY datatype. - */ - QUrl attachmentUri() const { - QUrl value; - if(m_res->contains(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#attachmentUri", QUrl::StrictMode))) - value = m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#attachmentUri", QUrl::StrictMode)).first().value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#attachmentUri. - * The uri of the attachment. Created to express the actual value - * of the ATTACH property defined in RFC 2445 sec. 4.8.1.1. This - * property expresses the default URI datatype of that property. - * see ncal:attachmentContents for the BINARY datatype. - */ - void setAttachmentUri(const QUrl& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - values << value; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#attachmentUri", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#attachmentUri. - * The uri of the attachment. Created to express the actual value - * of the ATTACH property defined in RFC 2445 sec. 4.8.1.1. This - * property expresses the default URI datatype of that property. - * see ncal:attachmentContents for the BINARY datatype. - */ - void addAttachmentUri(const QUrl& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#attachmentUri", QUrl::StrictMode), value); - } - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#fmttype. - * To specify the content type of a referenced object. Inspired - * by RFC 2445 sec. 4.2.8. The value of this property should be an - * IANA-registered content type (e.g. application/binary) - */ - QString fmttype() const { - QString value; - if(m_res->contains(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#fmttype", QUrl::StrictMode))) - value = m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#fmttype", QUrl::StrictMode)).first().value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#fmttype. - * To specify the content type of a referenced object. Inspired - * by RFC 2445 sec. 4.2.8. The value of this property should be an - * IANA-registered content type (e.g. application/binary) - */ - void setFmttype(const QString& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - values << value; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#fmttype", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#fmttype. - * To specify the content type of a referenced object. Inspired - * by RFC 2445 sec. 4.2.8. The value of this property should be an - * IANA-registered content type (e.g. application/binary) - */ - void addFmttype(const QString& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#fmttype", QUrl::StrictMode), value); - } - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#attachmentContent. - * The uri of the attachment. Created to express the actual value - * of the ATTACH property defined in RFC 2445 sec. 4.8.1.1. This - * property expresses the BINARY datatype of that property. see - * ncal:attachmentUri for the URI datatype. - */ - QStringList attachmentContents() const { - QStringList value; - foreach(const QVariant& v, m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#attachmentContent", QUrl::StrictMode))) - value << v.value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#attachmentContent. - * The uri of the attachment. Created to express the actual value - * of the ATTACH property defined in RFC 2445 sec. 4.8.1.1. This - * property expresses the BINARY datatype of that property. see - * ncal:attachmentUri for the URI datatype. - */ - void setAttachmentContents(const QStringList& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - foreach(const QString& v, value) - values << v; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#attachmentContent", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#attachmentContent. - * The uri of the attachment. Created to express the actual value - * of the ATTACH property defined in RFC 2445 sec. 4.8.1.1. This - * property expresses the BINARY datatype of that property. see - * ncal:attachmentUri for the URI datatype. - */ - void addAttachmentContent(const QString& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#attachmentContent", QUrl::StrictMode), value); - } - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#encoding. - * To specify an alternate inline encoding for the property value. - * Inspired by RFC 2445 sec. 4.2.7. Originally this property had - * a limited vocabulary. ('8BIT' and 'BASE64'). The terms of this - * vocabulary have been expressed as instances of the AttachmentEncoding - * class - */ - QUrl encoding() const { - QUrl value; - if(m_res->contains(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#encoding", QUrl::StrictMode))) - value = m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#encoding", QUrl::StrictMode)).first().value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#encoding. - * To specify an alternate inline encoding for the property value. - * Inspired by RFC 2445 sec. 4.2.7. Originally this property had - * a limited vocabulary. ('8BIT' and 'BASE64'). The terms of this - * vocabulary have been expressed as instances of the AttachmentEncoding - * class - */ - void setEncoding(const QUrl& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - values << value; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#encoding", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#encoding. - * To specify an alternate inline encoding for the property value. - * Inspired by RFC 2445 sec. 4.2.7. Originally this property had - * a limited vocabulary. ('8BIT' and 'BASE64'). The terms of this - * vocabulary have been expressed as instances of the AttachmentEncoding - * class - */ - void addEncoding(const QUrl& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#encoding", QUrl::StrictMode), value); - } - -protected: - virtual QUrl resourceType() const { return QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#Attachment", QUrl::StrictMode); } - -private: - Nepomuk2::SimpleResource* m_res; -}; -} -} - -#endif diff -Nru kdepim-runtime-4.12.3/agents/ontologies/ncal/attendee.h kdepim-runtime-4.12.90/agents/ontologies/ncal/attendee.h --- kdepim-runtime-4.12.3/agents/ontologies/ncal/attendee.h 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/agents/ontologies/ncal/attendee.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,356 +0,0 @@ -#ifndef _NCAL_ATTENDEE_H_ -#define _NCAL_ATTENDEE_H_ - -#include -#include -#include -#include -#include -#include -#include - -#include - -#include "ncal/attendeeororganizer.h" -namespace Nepomuk2 { -namespace NCAL { -/** - * An attendee of an event. This class has been introduced to serve - * as the range for ncal:attendee property. See documentation - * of ncal:attendee for details. - */ -class Attendee : public NCAL::AttendeeOrOrganizer -{ -public: - Attendee(Nepomuk2::SimpleResource* res) - : NCAL::AttendeeOrOrganizer(res), m_res(res) - {} - - virtual ~Attendee() {} - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#cutype. - * To specify the type of calendar user specified by the property. - * Inspired by RFC 2445 sec. 4.2.3. This parameter has a limited - * vocabulary. The terms that may serve as values for this property - * have been expressed as instances of CalendarUserType class. - * The user may use instances provided with this ontology or create - * his own. - */ - QList cutypes() const { - QList value; - foreach(const QVariant& v, m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#cutype", QUrl::StrictMode))) - value << v.value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#cutype. - * To specify the type of calendar user specified by the property. - * Inspired by RFC 2445 sec. 4.2.3. This parameter has a limited - * vocabulary. The terms that may serve as values for this property - * have been expressed as instances of CalendarUserType class. - * The user may use instances provided with this ontology or create - * his own. - */ - void setCutypes(const QList& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - foreach(const QUrl& v, value) - values << v; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#cutype", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#cutype. - * To specify the type of calendar user specified by the property. - * Inspired by RFC 2445 sec. 4.2.3. This parameter has a limited - * vocabulary. The terms that may serve as values for this property - * have been expressed as instances of CalendarUserType class. - * The user may use instances provided with this ontology or create - * his own. - */ - void addCutype(const QUrl& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#cutype", QUrl::StrictMode), value); - } - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#role. - * To specify the participation role for the calendar user specified - * by the property. Inspired by the RFC 2445 sec. 4.2.16. Originally - * this property had a limited vocabulary for values. The terms - * of that vocabulary have been expressed as instances of the AttendeeRole - * class. - */ - QList roles() const { - QList value; - foreach(const QVariant& v, m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#role", QUrl::StrictMode))) - value << v.value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#role. - * To specify the participation role for the calendar user specified - * by the property. Inspired by the RFC 2445 sec. 4.2.16. Originally - * this property had a limited vocabulary for values. The terms - * of that vocabulary have been expressed as instances of the AttendeeRole - * class. - */ - void setRoles(const QList& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - foreach(const QUrl& v, value) - values << v; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#role", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#role. - * To specify the participation role for the calendar user specified - * by the property. Inspired by the RFC 2445 sec. 4.2.16. Originally - * this property had a limited vocabulary for values. The terms - * of that vocabulary have been expressed as instances of the AttendeeRole - * class. - */ - void addRole(const QUrl& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#role", QUrl::StrictMode), value); - } - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#rsvp. - * To specify whether there is an expectation of a favor of a reply - * from the calendar user specified by the property value. Inspired - * by RFC 2445 sec. 4.2.17 - */ - bool rsvp() const { - bool value; - if(m_res->contains(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#rsvp", QUrl::StrictMode))) - value = m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#rsvp", QUrl::StrictMode)).first().value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#rsvp. - * To specify whether there is an expectation of a favor of a reply - * from the calendar user specified by the property value. Inspired - * by RFC 2445 sec. 4.2.17 - */ - void setRsvp(const bool& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - values << value; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#rsvp", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#rsvp. - * To specify whether there is an expectation of a favor of a reply - * from the calendar user specified by the property value. Inspired - * by RFC 2445 sec. 4.2.17 - */ - void addRsvp(const bool& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#rsvp", QUrl::StrictMode), value); - } - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#member. - * To specify the group or list membership of the calendar user - * specified by the property. Inspired by RFC 2445 sec. 4.2.11. - * Originally this parameter had a value type of CAL-ADDRESS. - * This has been expressed as nco:Contact to promote integration - * between NCAL and NCO - */ - QList members() const { - QList value; - foreach(const QVariant& v, m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#member", QUrl::StrictMode))) - value << v.value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#member. - * To specify the group or list membership of the calendar user - * specified by the property. Inspired by RFC 2445 sec. 4.2.11. - * Originally this parameter had a value type of CAL-ADDRESS. - * This has been expressed as nco:Contact to promote integration - * between NCAL and NCO - */ - void setMembers(const QList& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - foreach(const QUrl& v, value) - values << v; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#member", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#member. - * To specify the group or list membership of the calendar user - * specified by the property. Inspired by RFC 2445 sec. 4.2.11. - * Originally this parameter had a value type of CAL-ADDRESS. - * This has been expressed as nco:Contact to promote integration - * between NCAL and NCO - */ - void addMember(const QUrl& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#member", QUrl::StrictMode), value); - } - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#partstat. - * To specify the participation status for the calendar user specified - * by the property. Inspired by RFC 2445 sec. 4.2.12. Originally - * this parameter had three sets of allowed values. Which set applied - * to a particular case - depended on the type of calendar entity - * this parameter occurred in. (event, todo, journal entry). This - * would be awkward to model in RDF so a single ParticipationStatus - * class has been introduced. Terms of the values vocabulary are - * expressed as instances of this class. Users are advised to pay - * attention which instances they use. - */ - QList partstats() const { - QList value; - foreach(const QVariant& v, m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#partstat", QUrl::StrictMode))) - value << v.value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#partstat. - * To specify the participation status for the calendar user specified - * by the property. Inspired by RFC 2445 sec. 4.2.12. Originally - * this parameter had three sets of allowed values. Which set applied - * to a particular case - depended on the type of calendar entity - * this parameter occurred in. (event, todo, journal entry). This - * would be awkward to model in RDF so a single ParticipationStatus - * class has been introduced. Terms of the values vocabulary are - * expressed as instances of this class. Users are advised to pay - * attention which instances they use. - */ - void setPartstats(const QList& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - foreach(const QUrl& v, value) - values << v; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#partstat", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#partstat. - * To specify the participation status for the calendar user specified - * by the property. Inspired by RFC 2445 sec. 4.2.12. Originally - * this parameter had three sets of allowed values. Which set applied - * to a particular case - depended on the type of calendar entity - * this parameter occurred in. (event, todo, journal entry). This - * would be awkward to model in RDF so a single ParticipationStatus - * class has been introduced. Terms of the values vocabulary are - * expressed as instances of this class. Users are advised to pay - * attention which instances they use. - */ - void addPartstat(const QUrl& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#partstat", QUrl::StrictMode), value); - } - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#delegatedTo. - * To specify the calendar users to whom the calendar user specified - * by the property has delegated participation. Inspired by RFC - * 2445 sec. 4.2.5. Originally the value type for this parameter - * was CAL-ADDRESS. This has been expressed as nco:Contact to - * promote integration between NCAL and NCO. - */ - QList delegatedTos() const { - QList value; - foreach(const QVariant& v, m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#delegatedTo", QUrl::StrictMode))) - value << v.value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#delegatedTo. - * To specify the calendar users to whom the calendar user specified - * by the property has delegated participation. Inspired by RFC - * 2445 sec. 4.2.5. Originally the value type for this parameter - * was CAL-ADDRESS. This has been expressed as nco:Contact to - * promote integration between NCAL and NCO. - */ - void setDelegatedTos(const QList& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - foreach(const QUrl& v, value) - values << v; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#delegatedTo", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#delegatedTo. - * To specify the calendar users to whom the calendar user specified - * by the property has delegated participation. Inspired by RFC - * 2445 sec. 4.2.5. Originally the value type for this parameter - * was CAL-ADDRESS. This has been expressed as nco:Contact to - * promote integration between NCAL and NCO. - */ - void addDelegatedTo(const QUrl& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#delegatedTo", QUrl::StrictMode), value); - } - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#delegatedFrom. - * To specify the calendar users that have delegated their participation - * to the calendar user specified by the property. Inspired by - * RFC 2445 sec. 4.2.4. Originally the value type for this property - * was CAL-ADDRESS. This has been expressed as nco:Contact to - * promote integration between NCAL and NCO. - */ - QList delegatedFroms() const { - QList value; - foreach(const QVariant& v, m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#delegatedFrom", QUrl::StrictMode))) - value << v.value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#delegatedFrom. - * To specify the calendar users that have delegated their participation - * to the calendar user specified by the property. Inspired by - * RFC 2445 sec. 4.2.4. Originally the value type for this property - * was CAL-ADDRESS. This has been expressed as nco:Contact to - * promote integration between NCAL and NCO. - */ - void setDelegatedFroms(const QList& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - foreach(const QUrl& v, value) - values << v; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#delegatedFrom", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#delegatedFrom. - * To specify the calendar users that have delegated their participation - * to the calendar user specified by the property. Inspired by - * RFC 2445 sec. 4.2.4. Originally the value type for this property - * was CAL-ADDRESS. This has been expressed as nco:Contact to - * promote integration between NCAL and NCO. - */ - void addDelegatedFrom(const QUrl& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#delegatedFrom", QUrl::StrictMode), value); - } - -protected: - virtual QUrl resourceType() const { return QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#Attendee", QUrl::StrictMode); } - -private: - Nepomuk2::SimpleResource* m_res; -}; -} -} - -#endif diff -Nru kdepim-runtime-4.12.3/agents/ontologies/ncal/attendeeororganizer.h kdepim-runtime-4.12.90/agents/ontologies/ncal/attendeeororganizer.h --- kdepim-runtime-4.12.3/agents/ontologies/ncal/attendeeororganizer.h 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/agents/ontologies/ncal/attendeeororganizer.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,172 +0,0 @@ -#ifndef _NCAL_ATTENDEEORORGANIZER_H_ -#define _NCAL_ATTENDEEORORGANIZER_H_ - -#include -#include -#include -#include -#include -#include -#include - -#include - -namespace Nepomuk2 { -namespace NCAL { -/** - * A common superclass for ncal:Attendee and ncal:Organizer. - */ -class AttendeeOrOrganizer -{ -public: - AttendeeOrOrganizer(Nepomuk2::SimpleResource* res) - : m_res(res) - {} - - virtual ~AttendeeOrOrganizer() {} - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#dir. - * Specifies a reference to a directory entry associated with - * the calendar user specified by the property. Inspired by RFC - * 2445 sec. 4.2.6. Originally the data type of the value of this - * parameter was URI (Usually an LDAP URI). This has been expressed - * as rdfs:resource. - */ - QList dirs() const { - QList value; - foreach(const QVariant& v, m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#dir", QUrl::StrictMode))) - value << v.value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#dir. - * Specifies a reference to a directory entry associated with - * the calendar user specified by the property. Inspired by RFC - * 2445 sec. 4.2.6. Originally the data type of the value of this - * parameter was URI (Usually an LDAP URI). This has been expressed - * as rdfs:resource. - */ - void setDirs(const QList& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - foreach(const QUrl& v, value) - values << v; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#dir", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#dir. - * Specifies a reference to a directory entry associated with - * the calendar user specified by the property. Inspired by RFC - * 2445 sec. 4.2.6. Originally the data type of the value of this - * parameter was URI (Usually an LDAP URI). This has been expressed - * as rdfs:resource. - */ - void addDir(const QUrl& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#dir", QUrl::StrictMode), value); - } - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#involvedContact. - * A contact of the Attendee or the organizer involved in an event - * or other calendar entity. This property has been introduced - * to express the actual value of the ATTENDEE and ORGANIZER properties. - * The contact will also represent the CN parameter of those properties. - * See documentation of ncal:attendee or ncal:organizer for - * more details. - */ - QList involvedContacts() const { - QList value; - foreach(const QVariant& v, m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#involvedContact", QUrl::StrictMode))) - value << v.value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#involvedContact. - * A contact of the Attendee or the organizer involved in an event - * or other calendar entity. This property has been introduced - * to express the actual value of the ATTENDEE and ORGANIZER properties. - * The contact will also represent the CN parameter of those properties. - * See documentation of ncal:attendee or ncal:organizer for - * more details. - */ - void setInvolvedContacts(const QList& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - foreach(const QUrl& v, value) - values << v; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#involvedContact", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#involvedContact. - * A contact of the Attendee or the organizer involved in an event - * or other calendar entity. This property has been introduced - * to express the actual value of the ATTENDEE and ORGANIZER properties. - * The contact will also represent the CN parameter of those properties. - * See documentation of ncal:attendee or ncal:organizer for - * more details. - */ - void addInvolvedContact(const QUrl& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#involvedContact", QUrl::StrictMode), value); - } - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#sentBy. - * To specify the calendar user that is acting on behalf of the calendar - * user specified by the property. Inspired by RFC 2445 sec. 4.2.18. - * The original data type of this property was a mailto: URI. This - * has been changed to nco:Contact to promote integration between - * NCO and NCAL. - */ - QList sentBys() const { - QList value; - foreach(const QVariant& v, m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#sentBy", QUrl::StrictMode))) - value << v.value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#sentBy. - * To specify the calendar user that is acting on behalf of the calendar - * user specified by the property. Inspired by RFC 2445 sec. 4.2.18. - * The original data type of this property was a mailto: URI. This - * has been changed to nco:Contact to promote integration between - * NCO and NCAL. - */ - void setSentBys(const QList& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - foreach(const QUrl& v, value) - values << v; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#sentBy", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#sentBy. - * To specify the calendar user that is acting on behalf of the calendar - * user specified by the property. Inspired by RFC 2445 sec. 4.2.18. - * The original data type of this property was a mailto: URI. This - * has been changed to nco:Contact to promote integration between - * NCO and NCAL. - */ - void addSentBy(const QUrl& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#sentBy", QUrl::StrictMode), value); - } - -protected: - virtual QUrl resourceType() const { return QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#AttendeeOrOrganizer", QUrl::StrictMode); } - -private: - Nepomuk2::SimpleResource* m_res; -}; -} -} - -#endif diff -Nru kdepim-runtime-4.12.3/agents/ontologies/ncal/attendeerole.h kdepim-runtime-4.12.90/agents/ontologies/ncal/attendeerole.h --- kdepim-runtime-4.12.3/agents/ontologies/ncal/attendeerole.h 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/agents/ontologies/ncal/attendeerole.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,40 +0,0 @@ -#ifndef _NCAL_ATTENDEEROLE_H_ -#define _NCAL_ATTENDEEROLE_H_ - -#include -#include -#include -#include -#include -#include -#include - -#include - -namespace Nepomuk2 { -namespace NCAL { -/** - * A role the attendee is going to play during an event. This class - * has been introduced to express the limited vocabulary for the - * values of ncal:role property. Please refer to the documentation - * of ncal:role for details. - */ -class AttendeeRole -{ -public: - AttendeeRole(Nepomuk2::SimpleResource* res) - : m_res(res) - {} - - virtual ~AttendeeRole() {} - -protected: - virtual QUrl resourceType() const { return QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#AttendeeRole", QUrl::StrictMode); } - -private: - Nepomuk2::SimpleResource* m_res; -}; -} -} - -#endif diff -Nru kdepim-runtime-4.12.3/agents/ontologies/ncal/bydayrulepart.h kdepim-runtime-4.12.90/agents/ontologies/ncal/bydayrulepart.h --- kdepim-runtime-4.12.3/agents/ontologies/ncal/bydayrulepart.h 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/agents/ontologies/ncal/bydayrulepart.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,129 +0,0 @@ -#ifndef _NCAL_BYDAYRULEPART_H_ -#define _NCAL_BYDAYRULEPART_H_ - -#include -#include -#include -#include -#include -#include -#include - -#include - -namespace Nepomuk2 { -namespace NCAL { -/** - * Expresses the compound value of a byday part of a recurrence - * rule. It stores the weekday and the integer modifier. Inspired - * by RFC 2445 sec. 4.3.10 - */ -class BydayRulePart -{ -public: - BydayRulePart(Nepomuk2::SimpleResource* res) - : m_res(res) - {} - - virtual ~BydayRulePart() {} - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#bydayWeekday. - * Connects a BydayRulePath with a weekday. - */ - QList bydayWeekdays() const { - QList value; - foreach(const QVariant& v, m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#bydayWeekday", QUrl::StrictMode))) - value << v.value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#bydayWeekday. - * Connects a BydayRulePath with a weekday. - */ - void setBydayWeekdays(const QList& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - foreach(const QUrl& v, value) - values << v; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#bydayWeekday", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#bydayWeekday. - * Connects a BydayRulePath with a weekday. - */ - void addBydayWeekday(const QUrl& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#bydayWeekday", QUrl::StrictMode), value); - } - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#bydayModifier. - * An integer modifier for the BYDAY rule part. Each BYDAY value - * can also be preceded by a positive (+n) or negative (-n) integer. - * If present, this indicates the nth occurrence of the specific - * day within the MONTHLY or YEARLY RRULE. For example, within - * a MONTHLY rule, +1MO (or simply 1MO) represents the first Monday - * within the month, whereas -1MO represents the last Monday of - * the month. If an integer modifier is not present, it means all - * days of this type within the specified frequency. For example, - * within a MONTHLY rule, MO represents all Mondays within the - * month. Inspired by RFC 2445 sec. 4.3.10 - */ - qint64 bydayModifier() const { - qint64 value; - if(m_res->contains(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#bydayModifier", QUrl::StrictMode))) - value = m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#bydayModifier", QUrl::StrictMode)).first().value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#bydayModifier. - * An integer modifier for the BYDAY rule part. Each BYDAY value - * can also be preceded by a positive (+n) or negative (-n) integer. - * If present, this indicates the nth occurrence of the specific - * day within the MONTHLY or YEARLY RRULE. For example, within - * a MONTHLY rule, +1MO (or simply 1MO) represents the first Monday - * within the month, whereas -1MO represents the last Monday of - * the month. If an integer modifier is not present, it means all - * days of this type within the specified frequency. For example, - * within a MONTHLY rule, MO represents all Mondays within the - * month. Inspired by RFC 2445 sec. 4.3.10 - */ - void setBydayModifier(const qint64& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - values << value; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#bydayModifier", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#bydayModifier. - * An integer modifier for the BYDAY rule part. Each BYDAY value - * can also be preceded by a positive (+n) or negative (-n) integer. - * If present, this indicates the nth occurrence of the specific - * day within the MONTHLY or YEARLY RRULE. For example, within - * a MONTHLY rule, +1MO (or simply 1MO) represents the first Monday - * within the month, whereas -1MO represents the last Monday of - * the month. If an integer modifier is not present, it means all - * days of this type within the specified frequency. For example, - * within a MONTHLY rule, MO represents all Mondays within the - * month. Inspired by RFC 2445 sec. 4.3.10 - */ - void addBydayModifier(const qint64& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#bydayModifier", QUrl::StrictMode), value); - } - -protected: - virtual QUrl resourceType() const { return QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#BydayRulePart", QUrl::StrictMode); } - -private: - Nepomuk2::SimpleResource* m_res; -}; -} -} - -#endif diff -Nru kdepim-runtime-4.12.3/agents/ontologies/ncal/calendardataobject.h kdepim-runtime-4.12.90/agents/ontologies/ncal/calendardataobject.h --- kdepim-runtime-4.12.3/agents/ontologies/ncal/calendardataobject.h 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/agents/ontologies/ncal/calendardataobject.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,39 +0,0 @@ -#ifndef _NCAL_CALENDARDATAOBJECT_H_ -#define _NCAL_CALENDARDATAOBJECT_H_ - -#include -#include -#include -#include -#include -#include -#include - -#include - -namespace Nepomuk2 { -namespace NCAL { -/** - * A DataObject found in a calendar. It is usually interpreted - * as one of the calendar entity types (e.g. Event, Journal, Todo - * etc.) - */ -class CalendarDataObject -{ -public: - CalendarDataObject(Nepomuk2::SimpleResource* res) - : m_res(res) - {} - - virtual ~CalendarDataObject() {} - -protected: - virtual QUrl resourceType() const { return QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#CalendarDataObject", QUrl::StrictMode); } - -private: - Nepomuk2::SimpleResource* m_res; -}; -} -} - -#endif diff -Nru kdepim-runtime-4.12.3/agents/ontologies/ncal/calendar.h kdepim-runtime-4.12.90/agents/ontologies/ncal/calendar.h --- kdepim-runtime-4.12.3/agents/ontologies/ncal/calendar.h 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/agents/ontologies/ncal/calendar.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,224 +0,0 @@ -#ifndef _NCAL_CALENDAR_H_ -#define _NCAL_CALENDAR_H_ - -#include -#include -#include -#include -#include -#include -#include - -#include - -namespace Nepomuk2 { -namespace NCAL { -/** - * A calendar. Inspirations for this class can be traced to the - * VCALENDAR component defined in RFC 2445 sec. 4.4, but it may - * just as well be used to represent any kind of Calendar. - */ -class Calendar -{ -public: - Calendar(Nepomuk2::SimpleResource* res) - : m_res(res) - {} - - virtual ~Calendar() {} - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#component. - * Links the Vcalendar instance with the calendar components. - * This property has no direct equivalent in the RFC specification. - * It has been introduced to express the containmnent relations. - */ - QList components() const { - QList value; - foreach(const QVariant& v, m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#component", QUrl::StrictMode))) - value << v.value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#component. - * Links the Vcalendar instance with the calendar components. - * This property has no direct equivalent in the RFC specification. - * It has been introduced to express the containmnent relations. - */ - void setComponents(const QList& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - foreach(const QUrl& v, value) - values << v; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#component", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#component. - * Links the Vcalendar instance with the calendar components. - * This property has no direct equivalent in the RFC specification. - * It has been introduced to express the containmnent relations. - */ - void addComponent(const QUrl& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#component", QUrl::StrictMode), value); - } - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#version. - * This property specifies the identifier corresponding to the - * highest version number or the minimum and maximum range of the - * iCalendar specification that is required in order to interpret - * the iCalendar object. Defined in RFC 2445 sec. 4.7.4 - */ - QStringList versions() const { - QStringList value; - foreach(const QVariant& v, m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#version", QUrl::StrictMode))) - value << v.value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#version. - * This property specifies the identifier corresponding to the - * highest version number or the minimum and maximum range of the - * iCalendar specification that is required in order to interpret - * the iCalendar object. Defined in RFC 2445 sec. 4.7.4 - */ - void setVersions(const QStringList& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - foreach(const QString& v, value) - values << v; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#version", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#version. - * This property specifies the identifier corresponding to the - * highest version number or the minimum and maximum range of the - * iCalendar specification that is required in order to interpret - * the iCalendar object. Defined in RFC 2445 sec. 4.7.4 - */ - void addVersion(const QString& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#version", QUrl::StrictMode), value); - } - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#method. - * This property defines the iCalendar object method associated - * with the calendar object. Defined in RFC 2445 sec. 4.7.2 - */ - QString method() const { - QString value; - if(m_res->contains(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#method", QUrl::StrictMode))) - value = m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#method", QUrl::StrictMode)).first().value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#method. - * This property defines the iCalendar object method associated - * with the calendar object. Defined in RFC 2445 sec. 4.7.2 - */ - void setMethod(const QString& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - values << value; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#method", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#method. - * This property defines the iCalendar object method associated - * with the calendar object. Defined in RFC 2445 sec. 4.7.2 - */ - void addMethod(const QString& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#method", QUrl::StrictMode), value); - } - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#calscale. - * This property defines the calendar scale used for the calendar - * information specified in the iCalendar object. Defined in - * RFC 2445 sec. 4.7.1 - */ - QUrl calscale() const { - QUrl value; - if(m_res->contains(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#calscale", QUrl::StrictMode))) - value = m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#calscale", QUrl::StrictMode)).first().value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#calscale. - * This property defines the calendar scale used for the calendar - * information specified in the iCalendar object. Defined in - * RFC 2445 sec. 4.7.1 - */ - void setCalscale(const QUrl& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - values << value; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#calscale", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#calscale. - * This property defines the calendar scale used for the calendar - * information specified in the iCalendar object. Defined in - * RFC 2445 sec. 4.7.1 - */ - void addCalscale(const QUrl& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#calscale", QUrl::StrictMode), value); - } - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#prodid. - * This property specifies the identifier for the product that - * created the iCalendar object. Defined in RFC 2445 sec. 4.7.2 - */ - QStringList prodids() const { - QStringList value; - foreach(const QVariant& v, m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#prodid", QUrl::StrictMode))) - value << v.value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#prodid. - * This property specifies the identifier for the product that - * created the iCalendar object. Defined in RFC 2445 sec. 4.7.2 - */ - void setProdids(const QStringList& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - foreach(const QString& v, value) - values << v; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#prodid", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#prodid. - * This property specifies the identifier for the product that - * created the iCalendar object. Defined in RFC 2445 sec. 4.7.2 - */ - void addProdid(const QString& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#prodid", QUrl::StrictMode), value); - } - -protected: - virtual QUrl resourceType() const { return QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#Calendar", QUrl::StrictMode); } - -private: - Nepomuk2::SimpleResource* m_res; -}; -} -} - -#endif diff -Nru kdepim-runtime-4.12.3/agents/ontologies/ncal/calendarscale.h kdepim-runtime-4.12.90/agents/ontologies/ncal/calendarscale.h --- kdepim-runtime-4.12.3/agents/ontologies/ncal/calendarscale.h 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/agents/ontologies/ncal/calendarscale.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,38 +0,0 @@ -#ifndef _NCAL_CALENDARSCALE_H_ -#define _NCAL_CALENDARSCALE_H_ - -#include -#include -#include -#include -#include -#include -#include - -#include - -namespace Nepomuk2 { -namespace NCAL { -/** - * A calendar scale. This class has been introduced to provide - * the limited vocabulary for the ncal:calscale property. - */ -class CalendarScale -{ -public: - CalendarScale(Nepomuk2::SimpleResource* res) - : m_res(res) - {} - - virtual ~CalendarScale() {} - -protected: - virtual QUrl resourceType() const { return QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#CalendarScale", QUrl::StrictMode); } - -private: - Nepomuk2::SimpleResource* m_res; -}; -} -} - -#endif diff -Nru kdepim-runtime-4.12.3/agents/ontologies/ncal/calendarusertype.h kdepim-runtime-4.12.90/agents/ontologies/ncal/calendarusertype.h --- kdepim-runtime-4.12.3/agents/ontologies/ncal/calendarusertype.h 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/agents/ontologies/ncal/calendarusertype.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,39 +0,0 @@ -#ifndef _NCAL_CALENDARUSERTYPE_H_ -#define _NCAL_CALENDARUSERTYPE_H_ - -#include -#include -#include -#include -#include -#include -#include - -#include - -namespace Nepomuk2 { -namespace NCAL { -/** - * A calendar user type. This class has been introduced to express - * the limited vocabulary for the ncal:cutype property. See documentation - * of ncal:cutype for details. - */ -class CalendarUserType -{ -public: - CalendarUserType(Nepomuk2::SimpleResource* res) - : m_res(res) - {} - - virtual ~CalendarUserType() {} - -protected: - virtual QUrl resourceType() const { return QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#CalendarUserType", QUrl::StrictMode); } - -private: - Nepomuk2::SimpleResource* m_res; -}; -} -} - -#endif diff -Nru kdepim-runtime-4.12.3/agents/ontologies/ncal/event.h kdepim-runtime-4.12.90/agents/ontologies/ncal/event.h --- kdepim-runtime-4.12.3/agents/ontologies/ncal/event.h 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/agents/ontologies/ncal/event.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,124 +0,0 @@ -#ifndef _NCAL_EVENT_H_ -#define _NCAL_EVENT_H_ - -#include -#include -#include -#include -#include -#include -#include - -#include - -#include "ncal/unionofeventjournaltimezonetodo.h" -#include "ncal/unionoftimezoneobservanceeventfreebusytimezonetodo.h" -#include "ncal/unionofalarmeventjournaltodo.h" -#include "ncal/unionoftimezoneobservanceeventjournaltimezonetodo.h" -#include "ncal/unionofalarmeventfreebusyjournaltodo.h" -#include "ncal/unionofeventfreebusyjournaltodo.h" -#include "ncal/unionofalarmeventfreebusytodo.h" -#include "ncal/unionoftimezoneobservanceeventfreebusyjournaltimezonetodo.h" -#include "ncal/unionofeventfreebusy.h" -#include "ncal/unionofeventjournaltodo.h" -#include "ncal/unionofeventtodo.h" -#include "ncal/unionofalarmeventtodo.h" -namespace Nepomuk2 { -namespace NCAL { -/** - * Provide a grouping of component properties that describe an - * event. - */ -class Event : public NCAL::UnionOfEventJournalTimezoneTodo, public NCAL::UnionOfTimezoneObservanceEventFreebusyTimezoneTodo, public NCAL::UnionOfAlarmEventJournalTodo, public NCAL::UnionOfTimezoneObservanceEventJournalTimezoneTodo, public NCAL::UnionOfAlarmEventFreebusyJournalTodo, public NCAL::UnionOfEventFreebusyJournalTodo, public NCAL::UnionOfAlarmEventFreebusyTodo, public NCAL::UnionOfTimezoneObservanceEventFreebusyJournalTimezoneTodo, public NCAL::UnionOfEventFreebusy, public NCAL::UnionOfEventJournalTodo, public NCAL::UnionOfEventTodo, public NCAL::UnionOfAlarmEventTodo -{ -public: - Event(Nepomuk2::SimpleResource* res) - : NCAL::UnionOfEventJournalTimezoneTodo(res), NCAL::UnionOfTimezoneObservanceEventFreebusyTimezoneTodo(res), NCAL::UnionOfAlarmEventJournalTodo(res), NCAL::UnionOfTimezoneObservanceEventJournalTimezoneTodo(res), NCAL::UnionOfAlarmEventFreebusyJournalTodo(res), NCAL::UnionOfEventFreebusyJournalTodo(res), NCAL::UnionOfAlarmEventFreebusyTodo(res), NCAL::UnionOfTimezoneObservanceEventFreebusyJournalTimezoneTodo(res), NCAL::UnionOfEventFreebusy(res), NCAL::UnionOfEventJournalTodo(res), NCAL::UnionOfEventTodo(res), NCAL::UnionOfAlarmEventTodo(res), m_res(res) - {} - - virtual ~Event() {} - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#eventStatus. - * Defines the overall status or confirmation for an Event. Based - * on the STATUS property defined in RFC 2445 sec. 4.8.1.11. - */ - QUrl eventStatus() const { - QUrl value; - if(m_res->contains(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#eventStatus", QUrl::StrictMode))) - value = m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#eventStatus", QUrl::StrictMode)).first().value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#eventStatus. - * Defines the overall status or confirmation for an Event. Based - * on the STATUS property defined in RFC 2445 sec. 4.8.1.11. - */ - void setEventStatus(const QUrl& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - values << value; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#eventStatus", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#eventStatus. - * Defines the overall status or confirmation for an Event. Based - * on the STATUS property defined in RFC 2445 sec. 4.8.1.11. - */ - void addEventStatus(const QUrl& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#eventStatus", QUrl::StrictMode), value); - } - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#transp. - * Defines whether an event is transparent or not to busy time searches. - * Inspired by RFC 2445 sec.4.8.2.7. Values for this property - * can be chosen from a limited vocabulary. To express this a TimeTransparency - * class has been introduced. - */ - QUrl transp() const { - QUrl value; - if(m_res->contains(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#transp", QUrl::StrictMode))) - value = m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#transp", QUrl::StrictMode)).first().value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#transp. - * Defines whether an event is transparent or not to busy time searches. - * Inspired by RFC 2445 sec.4.8.2.7. Values for this property - * can be chosen from a limited vocabulary. To express this a TimeTransparency - * class has been introduced. - */ - void setTransp(const QUrl& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - values << value; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#transp", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#transp. - * Defines whether an event is transparent or not to busy time searches. - * Inspired by RFC 2445 sec.4.8.2.7. Values for this property - * can be chosen from a limited vocabulary. To express this a TimeTransparency - * class has been introduced. - */ - void addTransp(const QUrl& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#transp", QUrl::StrictMode), value); - } - -protected: - virtual QUrl resourceType() const { return QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#Event", QUrl::StrictMode); } - -private: - Nepomuk2::SimpleResource* m_res; -}; -} -} - -#endif diff -Nru kdepim-runtime-4.12.3/agents/ontologies/ncal/eventstatus.h kdepim-runtime-4.12.90/agents/ontologies/ncal/eventstatus.h --- kdepim-runtime-4.12.3/agents/ontologies/ncal/eventstatus.h 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/agents/ontologies/ncal/eventstatus.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,41 +0,0 @@ -#ifndef _NCAL_EVENTSTATUS_H_ -#define _NCAL_EVENTSTATUS_H_ - -#include -#include -#include -#include -#include -#include -#include - -#include - -namespace Nepomuk2 { -namespace NCAL { -/** - * A status of an event. This class has been introduced to express - * the limited set of values for the ncal:status property. The - * user may use the instances provided with this ontology or create - * his/her own. See the documentation for ncal:eventStatus for - * details. - */ -class EventStatus -{ -public: - EventStatus(Nepomuk2::SimpleResource* res) - : m_res(res) - {} - - virtual ~EventStatus() {} - -protected: - virtual QUrl resourceType() const { return QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#EventStatus", QUrl::StrictMode); } - -private: - Nepomuk2::SimpleResource* m_res; -}; -} -} - -#endif diff -Nru kdepim-runtime-4.12.3/agents/ontologies/ncal/freebusy.h kdepim-runtime-4.12.90/agents/ontologies/ncal/freebusy.h --- kdepim-runtime-4.12.3/agents/ontologies/ncal/freebusy.h 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/agents/ontologies/ncal/freebusy.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,89 +0,0 @@ -#ifndef _NCAL_FREEBUSY_H_ -#define _NCAL_FREEBUSY_H_ - -#include -#include -#include -#include -#include -#include -#include - -#include - -#include "ncal/unionofeventfreebusyjournaltodo.h" -#include "ncal/unionoftimezoneobservanceeventfreebusytimezonetodo.h" -#include "ncal/unionofeventfreebusy.h" -#include "ncal/unionofalarmeventfreebusytodo.h" -#include "ncal/unionoftimezoneobservanceeventfreebusyjournaltimezonetodo.h" -#include "ncal/unionofalarmeventfreebusyjournaltodo.h" -namespace Nepomuk2 { -namespace NCAL { -/** - * Provide a grouping of component properties that describe either - * a request for free/busy time, describe a response to a request - * for free/busy time or describe a published set of busy time. - */ -class Freebusy : public NCAL::UnionOfEventFreebusyJournalTodo, public NCAL::UnionOfTimezoneObservanceEventFreebusyTimezoneTodo, public NCAL::UnionOfEventFreebusy, public NCAL::UnionOfAlarmEventFreebusyTodo, public NCAL::UnionOfTimezoneObservanceEventFreebusyJournalTimezoneTodo, public NCAL::UnionOfAlarmEventFreebusyJournalTodo -{ -public: - Freebusy(Nepomuk2::SimpleResource* res) - : NCAL::UnionOfEventFreebusyJournalTodo(res), NCAL::UnionOfTimezoneObservanceEventFreebusyTimezoneTodo(res), NCAL::UnionOfEventFreebusy(res), NCAL::UnionOfAlarmEventFreebusyTodo(res), NCAL::UnionOfTimezoneObservanceEventFreebusyJournalTimezoneTodo(res), NCAL::UnionOfAlarmEventFreebusyJournalTodo(res), m_res(res) - {} - - virtual ~Freebusy() {} - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#freebusy. - * The property defines one or more free or busy time intervals. - * Inspired by RFC 2445 sec. 4.8.2.6. Note that the periods specified - * by this property can only be expressed with UTC times. Originally - * this property could have many comma-separated values. Please - * use a separate triple for each value. - */ - QList freebusys() const { - QList value; - foreach(const QVariant& v, m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#freebusy", QUrl::StrictMode))) - value << v.value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#freebusy. - * The property defines one or more free or busy time intervals. - * Inspired by RFC 2445 sec. 4.8.2.6. Note that the periods specified - * by this property can only be expressed with UTC times. Originally - * this property could have many comma-separated values. Please - * use a separate triple for each value. - */ - void setFreebusys(const QList& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - foreach(const QUrl& v, value) - values << v; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#freebusy", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#freebusy. - * The property defines one or more free or busy time intervals. - * Inspired by RFC 2445 sec. 4.8.2.6. Note that the periods specified - * by this property can only be expressed with UTC times. Originally - * this property could have many comma-separated values. Please - * use a separate triple for each value. - */ - void addFreebusy(const QUrl& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#freebusy", QUrl::StrictMode), value); - } - -protected: - virtual QUrl resourceType() const { return QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#Freebusy", QUrl::StrictMode); } - -private: - Nepomuk2::SimpleResource* m_res; -}; -} -} - -#endif diff -Nru kdepim-runtime-4.12.3/agents/ontologies/ncal/freebusyperiod.h kdepim-runtime-4.12.90/agents/ontologies/ncal/freebusyperiod.h --- kdepim-runtime-4.12.3/agents/ontologies/ncal/freebusyperiod.h 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/agents/ontologies/ncal/freebusyperiod.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,86 +0,0 @@ -#ifndef _NCAL_FREEBUSYPERIOD_H_ -#define _NCAL_FREEBUSYPERIOD_H_ - -#include -#include -#include -#include -#include -#include -#include - -#include - -#include "ncal/ncalperiod.h" -namespace Nepomuk2 { -namespace NCAL { -/** - * An aggregate of a period and a freebusy type. This class has been - * introduced to serve as a range of the ncal:freebusy property. - * See documentation for ncal:freebusy for details. Note that - * the specification of freebusy property states that the period - * is to be expressed using UTC time, so the timezone properties - * should NOT be used for instances of this class. - */ -class FreebusyPeriod : public NCAL::NcalPeriod -{ -public: - FreebusyPeriod(Nepomuk2::SimpleResource* res) - : NCAL::NcalPeriod(res), m_res(res) - {} - - virtual ~FreebusyPeriod() {} - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#fbtype. - * To specify the free or busy time type. Inspired by RFC 2445 sec. - * 4.2.9. The RFC specified a limited vocabulary for the values - * of this property. The terms of this vocabulary have been expressed - * as instances of the FreebusyType class. The user can use instances - * provided with this ontology or create his own. - */ - QUrl fbtype() const { - QUrl value; - if(m_res->contains(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#fbtype", QUrl::StrictMode))) - value = m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#fbtype", QUrl::StrictMode)).first().value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#fbtype. - * To specify the free or busy time type. Inspired by RFC 2445 sec. - * 4.2.9. The RFC specified a limited vocabulary for the values - * of this property. The terms of this vocabulary have been expressed - * as instances of the FreebusyType class. The user can use instances - * provided with this ontology or create his own. - */ - void setFbtype(const QUrl& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - values << value; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#fbtype", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#fbtype. - * To specify the free or busy time type. Inspired by RFC 2445 sec. - * 4.2.9. The RFC specified a limited vocabulary for the values - * of this property. The terms of this vocabulary have been expressed - * as instances of the FreebusyType class. The user can use instances - * provided with this ontology or create his own. - */ - void addFbtype(const QUrl& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#fbtype", QUrl::StrictMode), value); - } - -protected: - virtual QUrl resourceType() const { return QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#FreebusyPeriod", QUrl::StrictMode); } - -private: - Nepomuk2::SimpleResource* m_res; -}; -} -} - -#endif diff -Nru kdepim-runtime-4.12.3/agents/ontologies/ncal/freebusytype.h kdepim-runtime-4.12.90/agents/ontologies/ncal/freebusytype.h --- kdepim-runtime-4.12.3/agents/ontologies/ncal/freebusytype.h 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/agents/ontologies/ncal/freebusytype.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,39 +0,0 @@ -#ifndef _NCAL_FREEBUSYTYPE_H_ -#define _NCAL_FREEBUSYTYPE_H_ - -#include -#include -#include -#include -#include -#include -#include - -#include - -namespace Nepomuk2 { -namespace NCAL { -/** - * Type of a Freebusy indication. This class has been introduced - * to serve as a limited set of values for the ncal:fbtype property. - * See the documentation of ncal:fbtype for details. - */ -class FreebusyType -{ -public: - FreebusyType(Nepomuk2::SimpleResource* res) - : m_res(res) - {} - - virtual ~FreebusyType() {} - -protected: - virtual QUrl resourceType() const { return QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#FreebusyType", QUrl::StrictMode); } - -private: - Nepomuk2::SimpleResource* m_res; -}; -} -} - -#endif diff -Nru kdepim-runtime-4.12.3/agents/ontologies/ncal/journal.h kdepim-runtime-4.12.90/agents/ontologies/ncal/journal.h --- kdepim-runtime-4.12.3/agents/ontologies/ncal/journal.h 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/agents/ontologies/ncal/journal.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,79 +0,0 @@ -#ifndef _NCAL_JOURNAL_H_ -#define _NCAL_JOURNAL_H_ - -#include -#include -#include -#include -#include -#include -#include - -#include - -#include "ncal/unionoftimezoneobservanceeventfreebusyjournaltimezonetodo.h" -#include "ncal/unionoftimezoneobservanceeventjournaltimezonetodo.h" -#include "ncal/unionofalarmeventjournaltodo.h" -#include "ncal/unionofeventjournaltimezonetodo.h" -#include "ncal/unionofeventfreebusyjournaltodo.h" -#include "ncal/unionofalarmeventfreebusyjournaltodo.h" -#include "ncal/unionofeventjournaltodo.h" -namespace Nepomuk2 { -namespace NCAL { -/** - * Provide a grouping of component properties that describe a - * journal entry. - */ -class Journal : public NCAL::UnionOfTimezoneObservanceEventFreebusyJournalTimezoneTodo, public NCAL::UnionOfTimezoneObservanceEventJournalTimezoneTodo, public NCAL::UnionOfAlarmEventJournalTodo, public NCAL::UnionOfEventJournalTimezoneTodo, public NCAL::UnionOfEventFreebusyJournalTodo, public NCAL::UnionOfAlarmEventFreebusyJournalTodo, public NCAL::UnionOfEventJournalTodo -{ -public: - Journal(Nepomuk2::SimpleResource* res) - : NCAL::UnionOfTimezoneObservanceEventFreebusyJournalTimezoneTodo(res), NCAL::UnionOfTimezoneObservanceEventJournalTimezoneTodo(res), NCAL::UnionOfAlarmEventJournalTodo(res), NCAL::UnionOfEventJournalTimezoneTodo(res), NCAL::UnionOfEventFreebusyJournalTodo(res), NCAL::UnionOfAlarmEventFreebusyJournalTodo(res), NCAL::UnionOfEventJournalTodo(res), m_res(res) - {} - - virtual ~Journal() {} - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#journalStatus. - * Defines the overall status or confirmation for a journal entry. - * Based on the STATUS property defined in RFC 2445 sec. 4.8.1.11. - */ - QUrl journalStatus() const { - QUrl value; - if(m_res->contains(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#journalStatus", QUrl::StrictMode))) - value = m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#journalStatus", QUrl::StrictMode)).first().value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#journalStatus. - * Defines the overall status or confirmation for a journal entry. - * Based on the STATUS property defined in RFC 2445 sec. 4.8.1.11. - */ - void setJournalStatus(const QUrl& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - values << value; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#journalStatus", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#journalStatus. - * Defines the overall status or confirmation for a journal entry. - * Based on the STATUS property defined in RFC 2445 sec. 4.8.1.11. - */ - void addJournalStatus(const QUrl& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#journalStatus", QUrl::StrictMode), value); - } - -protected: - virtual QUrl resourceType() const { return QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#Journal", QUrl::StrictMode); } - -private: - Nepomuk2::SimpleResource* m_res; -}; -} -} - -#endif diff -Nru kdepim-runtime-4.12.3/agents/ontologies/ncal/journalstatus.h kdepim-runtime-4.12.90/agents/ontologies/ncal/journalstatus.h --- kdepim-runtime-4.12.3/agents/ontologies/ncal/journalstatus.h 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/agents/ontologies/ncal/journalstatus.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,41 +0,0 @@ -#ifndef _NCAL_JOURNALSTATUS_H_ -#define _NCAL_JOURNALSTATUS_H_ - -#include -#include -#include -#include -#include -#include -#include - -#include - -namespace Nepomuk2 { -namespace NCAL { -/** - * A status of a journal entry. This class has been introduced to - * express the limited set of values for the ncal:status property. - * The user may use the instances provided with this ontology or - * create his/her own. See the documentation for ncal:journalStatus - * for details. - */ -class JournalStatus -{ -public: - JournalStatus(Nepomuk2::SimpleResource* res) - : m_res(res) - {} - - virtual ~JournalStatus() {} - -protected: - virtual QUrl resourceType() const { return QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#JournalStatus", QUrl::StrictMode); } - -private: - Nepomuk2::SimpleResource* m_res; -}; -} -} - -#endif diff -Nru kdepim-runtime-4.12.3/agents/ontologies/ncal/ncaldatetime.h kdepim-runtime-4.12.90/agents/ontologies/ncal/ncaldatetime.h --- kdepim-runtime-4.12.3/agents/ontologies/ncal/ncaldatetime.h 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/agents/ontologies/ncal/ncaldatetime.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,146 +0,0 @@ -#ifndef _NCAL_NCALDATETIME_H_ -#define _NCAL_NCALDATETIME_H_ - -#include -#include -#include -#include -#include -#include -#include - -#include - -#include "ncal/ncaltimeentity.h" -namespace Nepomuk2 { -namespace NCAL { -/** - * - */ -class NcalDateTime : public NCAL::NcalTimeEntity -{ -public: - NcalDateTime(Nepomuk2::SimpleResource* res) - : NCAL::NcalTimeEntity(res), m_res(res) - {} - - virtual ~NcalDateTime() {} - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#date. - * Date an instance of NcalDateTime refers to. It was conceived - * to express values in DATE datatype specified in RFC 2445 4.3.4 - */ - QDate date() const { - QDate value; - if(m_res->contains(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#date", QUrl::StrictMode))) - value = m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#date", QUrl::StrictMode)).first().value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#date. - * Date an instance of NcalDateTime refers to. It was conceived - * to express values in DATE datatype specified in RFC 2445 4.3.4 - */ - void setDate(const QDate& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - values << value; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#date", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#date. - * Date an instance of NcalDateTime refers to. It was conceived - * to express values in DATE datatype specified in RFC 2445 4.3.4 - */ - void addDate(const QDate& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#date", QUrl::StrictMode), value); - } - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#dateTime. - * Representation of a date an instance of NcalDateTime actually - * refers to. It's purpose is to express values in DATE-TIME datatype, - * as defined in RFC 2445 sec. 4.3.5 - */ - QDateTime dateTime() const { - QDateTime value; - if(m_res->contains(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#dateTime", QUrl::StrictMode))) - value = m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#dateTime", QUrl::StrictMode)).first().value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#dateTime. - * Representation of a date an instance of NcalDateTime actually - * refers to. It's purpose is to express values in DATE-TIME datatype, - * as defined in RFC 2445 sec. 4.3.5 - */ - void setDateTime(const QDateTime& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - values << value; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#dateTime", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#dateTime. - * Representation of a date an instance of NcalDateTime actually - * refers to. It's purpose is to express values in DATE-TIME datatype, - * as defined in RFC 2445 sec. 4.3.5 - */ - void addDateTime(const QDateTime& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#dateTime", QUrl::StrictMode), value); - } - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#ncalTimezone. - * The timezone instance that should be used to interpret an NcalDateTime. - * The purpose of this property is similar to the TZID parameter - * specified in RFC 2445 sec. 4.2.19 - */ - QUrl ncalTimezone() const { - QUrl value; - if(m_res->contains(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#ncalTimezone", QUrl::StrictMode))) - value = m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#ncalTimezone", QUrl::StrictMode)).first().value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#ncalTimezone. - * The timezone instance that should be used to interpret an NcalDateTime. - * The purpose of this property is similar to the TZID parameter - * specified in RFC 2445 sec. 4.2.19 - */ - void setNcalTimezone(const QUrl& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - values << value; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#ncalTimezone", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#ncalTimezone. - * The timezone instance that should be used to interpret an NcalDateTime. - * The purpose of this property is similar to the TZID parameter - * specified in RFC 2445 sec. 4.2.19 - */ - void addNcalTimezone(const QUrl& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#ncalTimezone", QUrl::StrictMode), value); - } - -protected: - virtual QUrl resourceType() const { return QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#NcalDateTime", QUrl::StrictMode); } - -private: - Nepomuk2::SimpleResource* m_res; -}; -} -} - -#endif diff -Nru kdepim-runtime-4.12.3/agents/ontologies/ncal/ncalperiod.h kdepim-runtime-4.12.90/agents/ontologies/ncal/ncalperiod.h --- kdepim-runtime-4.12.3/agents/ontologies/ncal/ncalperiod.h 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/agents/ontologies/ncal/ncalperiod.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,156 +0,0 @@ -#ifndef _NCAL_NCALPERIOD_H_ -#define _NCAL_NCALPERIOD_H_ - -#include -#include -#include -#include -#include -#include -#include - -#include - -#include "ncal/ncaltimeentity.h" -namespace Nepomuk2 { -namespace NCAL { -/** - * A period of time. Inspired by the PERIOD datatype specified - * in RFC 2445 sec. 4.3.9 - */ -class NcalPeriod : public NCAL::NcalTimeEntity -{ -public: - NcalPeriod(Nepomuk2::SimpleResource* res) - : NCAL::NcalTimeEntity(res), m_res(res) - {} - - virtual ~NcalPeriod() {} - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#periodBegin. - * Beginng of a period. Inspired by the first part of a structured - * value of the PERIOD datatype specified in RFC 2445 sec. 4.3.9 - */ - QDateTime periodBegin() const { - QDateTime value; - if(m_res->contains(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#periodBegin", QUrl::StrictMode))) - value = m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#periodBegin", QUrl::StrictMode)).first().value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#periodBegin. - * Beginng of a period. Inspired by the first part of a structured - * value of the PERIOD datatype specified in RFC 2445 sec. 4.3.9 - */ - void setPeriodBegin(const QDateTime& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - values << value; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#periodBegin", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#periodBegin. - * Beginng of a period. Inspired by the first part of a structured - * value of the PERIOD datatype specified in RFC 2445 sec. 4.3.9 - */ - void addPeriodBegin(const QDateTime& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#periodBegin", QUrl::StrictMode), value); - } - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#periodEnd. - * End of a period of time. Inspired by the second part of a structured - * value of a PERIOD datatype specified in RFC 2445 sec. 4.3.9. - * Note that a single NcalPeriod instance shouldn't have the periodEnd - * and periodDuration properties specified simultaneously. - */ - QDateTime periodEnd() const { - QDateTime value; - if(m_res->contains(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#periodEnd", QUrl::StrictMode))) - value = m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#periodEnd", QUrl::StrictMode)).first().value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#periodEnd. - * End of a period of time. Inspired by the second part of a structured - * value of a PERIOD datatype specified in RFC 2445 sec. 4.3.9. - * Note that a single NcalPeriod instance shouldn't have the periodEnd - * and periodDuration properties specified simultaneously. - */ - void setPeriodEnd(const QDateTime& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - values << value; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#periodEnd", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#periodEnd. - * End of a period of time. Inspired by the second part of a structured - * value of a PERIOD datatype specified in RFC 2445 sec. 4.3.9. - * Note that a single NcalPeriod instance shouldn't have the periodEnd - * and periodDuration properties specified simultaneously. - */ - void addPeriodEnd(const QDateTime& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#periodEnd", QUrl::StrictMode), value); - } - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#periodDuration. - * Duration of a period of time. Inspired by the second part of a - * structured value of the PERIOD datatype specified in RFC 2445 - * sec. 4.3.9. Note that a single NcalPeriod instance shouldn't - * have the periodEnd and periodDuration properties specified - * simultaneously. - */ - QUrl periodDuration() const { - QUrl value; - if(m_res->contains(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#periodDuration", QUrl::StrictMode))) - value = m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#periodDuration", QUrl::StrictMode)).first().value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#periodDuration. - * Duration of a period of time. Inspired by the second part of a - * structured value of the PERIOD datatype specified in RFC 2445 - * sec. 4.3.9. Note that a single NcalPeriod instance shouldn't - * have the periodEnd and periodDuration properties specified - * simultaneously. - */ - void setPeriodDuration(const QUrl& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - values << value; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#periodDuration", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#periodDuration. - * Duration of a period of time. Inspired by the second part of a - * structured value of the PERIOD datatype specified in RFC 2445 - * sec. 4.3.9. Note that a single NcalPeriod instance shouldn't - * have the periodEnd and periodDuration properties specified - * simultaneously. - */ - void addPeriodDuration(const QUrl& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#periodDuration", QUrl::StrictMode), value); - } - -protected: - virtual QUrl resourceType() const { return QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#NcalPeriod", QUrl::StrictMode); } - -private: - Nepomuk2::SimpleResource* m_res; -}; -} -} - -#endif diff -Nru kdepim-runtime-4.12.3/agents/ontologies/ncal/ncaltimeentity.h kdepim-runtime-4.12.90/agents/ontologies/ncal/ncaltimeentity.h --- kdepim-runtime-4.12.3/agents/ontologies/ncal/ncaltimeentity.h 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/agents/ontologies/ncal/ncaltimeentity.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,42 +0,0 @@ -#ifndef _NCAL_NCALTIMEENTITY_H_ -#define _NCAL_NCALTIMEENTITY_H_ - -#include -#include -#include -#include -#include -#include -#include - -#include - -namespace Nepomuk2 { -namespace NCAL { -/** - * A time entity. Conceived as a common superclass for NcalDateTime - * and NcalPeriod. According to RFC 2445 both DateTime and Period - * can be interpreted in different timezones. The first case is - * explored in many properties. The second case is theoretically - * possible in ncal:rdate property. Therefore the timezone properties - * have been defined at this level. - */ -class NcalTimeEntity -{ -public: - NcalTimeEntity(Nepomuk2::SimpleResource* res) - : m_res(res) - {} - - virtual ~NcalTimeEntity() {} - -protected: - virtual QUrl resourceType() const { return QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#NcalTimeEntity", QUrl::StrictMode); } - -private: - Nepomuk2::SimpleResource* m_res; -}; -} -} - -#endif diff -Nru kdepim-runtime-4.12.3/agents/ontologies/ncal/organizer.h kdepim-runtime-4.12.90/agents/ontologies/ncal/organizer.h --- kdepim-runtime-4.12.3/agents/ontologies/ncal/organizer.h 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/agents/ontologies/ncal/organizer.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,40 +0,0 @@ -#ifndef _NCAL_ORGANIZER_H_ -#define _NCAL_ORGANIZER_H_ - -#include -#include -#include -#include -#include -#include -#include - -#include - -#include "ncal/attendeeororganizer.h" -namespace Nepomuk2 { -namespace NCAL { -/** - * An organizer of an event. This class has been introduced to serve - * as a range of ncal:organizer property. See documentation of - * ncal:organizer for details. - */ -class Organizer : public NCAL::AttendeeOrOrganizer -{ -public: - Organizer(Nepomuk2::SimpleResource* res) - : NCAL::AttendeeOrOrganizer(res), m_res(res) - {} - - virtual ~Organizer() {} - -protected: - virtual QUrl resourceType() const { return QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#Organizer", QUrl::StrictMode); } - -private: - Nepomuk2::SimpleResource* m_res; -}; -} -} - -#endif diff -Nru kdepim-runtime-4.12.3/agents/ontologies/ncal/participationstatus.h kdepim-runtime-4.12.90/agents/ontologies/ncal/participationstatus.h --- kdepim-runtime-4.12.3/agents/ontologies/ncal/participationstatus.h 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/agents/ontologies/ncal/participationstatus.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,39 +0,0 @@ -#ifndef _NCAL_PARTICIPATIONSTATUS_H_ -#define _NCAL_PARTICIPATIONSTATUS_H_ - -#include -#include -#include -#include -#include -#include -#include - -#include - -namespace Nepomuk2 { -namespace NCAL { -/** - * Participation Status. This class has been introduced to express - * the limited vocabulary of values for the ncal:partstat property. - * See the documentation of ncal:partstat for details. - */ -class ParticipationStatus -{ -public: - ParticipationStatus(Nepomuk2::SimpleResource* res) - : m_res(res) - {} - - virtual ~ParticipationStatus() {} - -protected: - virtual QUrl resourceType() const { return QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#ParticipationStatus", QUrl::StrictMode); } - -private: - Nepomuk2::SimpleResource* m_res; -}; -} -} - -#endif diff -Nru kdepim-runtime-4.12.3/agents/ontologies/ncal/recurrencefrequency.h kdepim-runtime-4.12.90/agents/ontologies/ncal/recurrencefrequency.h --- kdepim-runtime-4.12.3/agents/ontologies/ncal/recurrencefrequency.h 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/agents/ontologies/ncal/recurrencefrequency.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,39 +0,0 @@ -#ifndef _NCAL_RECURRENCEFREQUENCY_H_ -#define _NCAL_RECURRENCEFREQUENCY_H_ - -#include -#include -#include -#include -#include -#include -#include - -#include - -namespace Nepomuk2 { -namespace NCAL { -/** - * Frequency of a recurrence rule. This class has been introduced - * to express a limited set of allowed values for the ncal:freq - * property. See the documentation of ncal:freq for details. - */ -class RecurrenceFrequency -{ -public: - RecurrenceFrequency(Nepomuk2::SimpleResource* res) - : m_res(res) - {} - - virtual ~RecurrenceFrequency() {} - -protected: - virtual QUrl resourceType() const { return QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#RecurrenceFrequency", QUrl::StrictMode); } - -private: - Nepomuk2::SimpleResource* m_res; -}; -} -} - -#endif diff -Nru kdepim-runtime-4.12.3/agents/ontologies/ncal/recurrenceidentifier.h kdepim-runtime-4.12.90/agents/ontologies/ncal/recurrenceidentifier.h --- kdepim-runtime-4.12.3/agents/ontologies/ncal/recurrenceidentifier.h 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/agents/ontologies/ncal/recurrenceidentifier.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,122 +0,0 @@ -#ifndef _NCAL_RECURRENCEIDENTIFIER_H_ -#define _NCAL_RECURRENCEIDENTIFIER_H_ - -#include -#include -#include -#include -#include -#include -#include - -#include - -namespace Nepomuk2 { -namespace NCAL { -/** - * Recurrence Identifier. Introduced to provide a structure - * for the value of ncal:recurrenceId property. See the documentation - * of ncal:recurrenceId for details. - */ -class RecurrenceIdentifier -{ -public: - RecurrenceIdentifier(Nepomuk2::SimpleResource* res) - : m_res(res) - {} - - virtual ~RecurrenceIdentifier() {} - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#range. - * To specify the effective range of recurrence instances from - * the instance specified by the recurrence identifier specified - * by the property. It is intended to express the RANGE parameter - * specified in RFC 2445 sec. 4.2.13. The set of possible values - * for this property is limited. See also the documentation for - * ncal:recurrenceId for more details. - */ - QUrl range() const { - QUrl value; - if(m_res->contains(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#range", QUrl::StrictMode))) - value = m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#range", QUrl::StrictMode)).first().value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#range. - * To specify the effective range of recurrence instances from - * the instance specified by the recurrence identifier specified - * by the property. It is intended to express the RANGE parameter - * specified in RFC 2445 sec. 4.2.13. The set of possible values - * for this property is limited. See also the documentation for - * ncal:recurrenceId for more details. - */ - void setRange(const QUrl& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - values << value; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#range", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#range. - * To specify the effective range of recurrence instances from - * the instance specified by the recurrence identifier specified - * by the property. It is intended to express the RANGE parameter - * specified in RFC 2445 sec. 4.2.13. The set of possible values - * for this property is limited. See also the documentation for - * ncal:recurrenceId for more details. - */ - void addRange(const QUrl& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#range", QUrl::StrictMode), value); - } - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#recurrenceIdDateTime. - * The date and time of a recurrence identifier. Provided to express - * the actual value of the ncal:recurrenceId property. See documentation - * for ncal:recurrenceId for details. - */ - QUrl recurrenceIdDateTime() const { - QUrl value; - if(m_res->contains(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#recurrenceIdDateTime", QUrl::StrictMode))) - value = m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#recurrenceIdDateTime", QUrl::StrictMode)).first().value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#recurrenceIdDateTime. - * The date and time of a recurrence identifier. Provided to express - * the actual value of the ncal:recurrenceId property. See documentation - * for ncal:recurrenceId for details. - */ - void setRecurrenceIdDateTime(const QUrl& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - values << value; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#recurrenceIdDateTime", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#recurrenceIdDateTime. - * The date and time of a recurrence identifier. Provided to express - * the actual value of the ncal:recurrenceId property. See documentation - * for ncal:recurrenceId for details. - */ - void addRecurrenceIdDateTime(const QUrl& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#recurrenceIdDateTime", QUrl::StrictMode), value); - } - -protected: - virtual QUrl resourceType() const { return QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#RecurrenceIdentifier", QUrl::StrictMode); } - -private: - Nepomuk2::SimpleResource* m_res; -}; -} -} - -#endif diff -Nru kdepim-runtime-4.12.3/agents/ontologies/ncal/recurrenceidentifierrange.h kdepim-runtime-4.12.90/agents/ontologies/ncal/recurrenceidentifierrange.h --- kdepim-runtime-4.12.3/agents/ontologies/ncal/recurrenceidentifierrange.h 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/agents/ontologies/ncal/recurrenceidentifierrange.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,39 +0,0 @@ -#ifndef _NCAL_RECURRENCEIDENTIFIERRANGE_H_ -#define _NCAL_RECURRENCEIDENTIFIERRANGE_H_ - -#include -#include -#include -#include -#include -#include -#include - -#include - -namespace Nepomuk2 { -namespace NCAL { -/** - * Recurrence Identifier Range. This class has been created to - * provide means to express the limited set of values for the ncal:range - * property. See documentation for ncal:range for details. - */ -class RecurrenceIdentifierRange -{ -public: - RecurrenceIdentifierRange(Nepomuk2::SimpleResource* res) - : m_res(res) - {} - - virtual ~RecurrenceIdentifierRange() {} - -protected: - virtual QUrl resourceType() const { return QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#RecurrenceIdentifierRange", QUrl::StrictMode); } - -private: - Nepomuk2::SimpleResource* m_res; -}; -} -} - -#endif diff -Nru kdepim-runtime-4.12.3/agents/ontologies/ncal/recurrencerule.h kdepim-runtime-4.12.90/agents/ontologies/ncal/recurrencerule.h --- kdepim-runtime-4.12.3/agents/ontologies/ncal/recurrencerule.h 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/agents/ontologies/ncal/recurrencerule.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,565 +0,0 @@ -#ifndef _NCAL_RECURRENCERULE_H_ -#define _NCAL_RECURRENCERULE_H_ - -#include -#include -#include -#include -#include -#include -#include - -#include - -namespace Nepomuk2 { -namespace NCAL { -/** - * - */ -class RecurrenceRule -{ -public: - RecurrenceRule(Nepomuk2::SimpleResource* res) - : m_res(res) - {} - - virtual ~RecurrenceRule() {} - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#byday. - * Weekdays the recurrence should occur. Defined in RFC 2445 sec. - * 4.3.10 - */ - QList bydays() const { - QList value; - foreach(const QVariant& v, m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#byday", QUrl::StrictMode))) - value << v.value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#byday. - * Weekdays the recurrence should occur. Defined in RFC 2445 sec. - * 4.3.10 - */ - void setBydays(const QList& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - foreach(const QUrl& v, value) - values << v; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#byday", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#byday. - * Weekdays the recurrence should occur. Defined in RFC 2445 sec. - * 4.3.10 - */ - void addByday(const QUrl& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#byday", QUrl::StrictMode), value); - } - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#byhour. - * Hour of recurrence. Defined in RFC 2445 sec. 4.3.10 - */ - QList byhours() const { - QList value; - foreach(const QVariant& v, m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#byhour", QUrl::StrictMode))) - value << v.value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#byhour. - * Hour of recurrence. Defined in RFC 2445 sec. 4.3.10 - */ - void setByhours(const QList& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - foreach(const qint64& v, value) - values << v; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#byhour", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#byhour. - * Hour of recurrence. Defined in RFC 2445 sec. 4.3.10 - */ - void addByhour(const qint64& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#byhour", QUrl::StrictMode), value); - } - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#byweekno. - * The number of the week an event should recur. Defined in RFC 2445 - * sec. 4.3.10 - */ - QList byweeknos() const { - QList value; - foreach(const QVariant& v, m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#byweekno", QUrl::StrictMode))) - value << v.value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#byweekno. - * The number of the week an event should recur. Defined in RFC 2445 - * sec. 4.3.10 - */ - void setByweeknos(const QList& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - foreach(const qint64& v, value) - values << v; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#byweekno", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#byweekno. - * The number of the week an event should recur. Defined in RFC 2445 - * sec. 4.3.10 - */ - void addByweekno(const qint64& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#byweekno", QUrl::StrictMode), value); - } - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#byyearday. - * Day of the year the event should occur. Defined in RFC 2445 sec. - * 4.3.10 - */ - QList byyeardays() const { - QList value; - foreach(const QVariant& v, m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#byyearday", QUrl::StrictMode))) - value << v.value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#byyearday. - * Day of the year the event should occur. Defined in RFC 2445 sec. - * 4.3.10 - */ - void setByyeardays(const QList& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - foreach(const qint64& v, value) - values << v; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#byyearday", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#byyearday. - * Day of the year the event should occur. Defined in RFC 2445 sec. - * 4.3.10 - */ - void addByyearday(const qint64& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#byyearday", QUrl::StrictMode), value); - } - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#bysecond. - * Second of a recurrence. Defined in RFC 2445 sec. 4.3.10 - */ - QList byseconds() const { - QList value; - foreach(const QVariant& v, m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#bysecond", QUrl::StrictMode))) - value << v.value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#bysecond. - * Second of a recurrence. Defined in RFC 2445 sec. 4.3.10 - */ - void setByseconds(const QList& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - foreach(const qint64& v, value) - values << v; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#bysecond", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#bysecond. - * Second of a recurrence. Defined in RFC 2445 sec. 4.3.10 - */ - void addBysecond(const qint64& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#bysecond", QUrl::StrictMode), value); - } - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#until. - * The UNTIL rule part defines a date-time value which bounds the - * recurrence rule in an inclusive manner. If the value specified - * by UNTIL is synchronized with the specified recurrence, this - * date or date-time becomes the last instance of the recurrence. - * If specified as a date-time value, then it MUST be specified - * in an UTC time format. If not present, and the COUNT rule part - * is also not present, the RRULE is considered to repeat forever. - */ - QList untils() const { - QList value; - foreach(const QVariant& v, m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#until", QUrl::StrictMode))) - value << v.value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#until. - * The UNTIL rule part defines a date-time value which bounds the - * recurrence rule in an inclusive manner. If the value specified - * by UNTIL is synchronized with the specified recurrence, this - * date or date-time becomes the last instance of the recurrence. - * If specified as a date-time value, then it MUST be specified - * in an UTC time format. If not present, and the COUNT rule part - * is also not present, the RRULE is considered to repeat forever. - */ - void setUntils(const QList& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - foreach(const QDateTime& v, value) - values << v; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#until", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#until. - * The UNTIL rule part defines a date-time value which bounds the - * recurrence rule in an inclusive manner. If the value specified - * by UNTIL is synchronized with the specified recurrence, this - * date or date-time becomes the last instance of the recurrence. - * If specified as a date-time value, then it MUST be specified - * in an UTC time format. If not present, and the COUNT rule part - * is also not present, the RRULE is considered to repeat forever. - */ - void addUntil(const QDateTime& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#until", QUrl::StrictMode), value); - } - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#bysetpos. - * The BYSETPOS rule part specify values which correspond to the - * nth occurrence within the set of events specified by the rule. - * Valid values are 1 to 366 or -366 to -1. It MUST only be used in conjunction - * with another BYxxx rule part. For example "the last work day - * of the month" could be represented as: RRULE: FREQ=MONTHLY; - * BYDAY=MO, TU, WE, TH, FR; BYSETPOS=-1. Each BYSETPOS value - * can include a positive (+n) or negative (-n) integer. If present, - * this indicates the nth occurrence of the specific occurrence - * within the set of events specified by the rule. Defined in RFC - * 2445 sec. 4.3.10 - */ - QList bysetposes() const { - QList value; - foreach(const QVariant& v, m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#bysetpos", QUrl::StrictMode))) - value << v.value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#bysetpos. - * The BYSETPOS rule part specify values which correspond to the - * nth occurrence within the set of events specified by the rule. - * Valid values are 1 to 366 or -366 to -1. It MUST only be used in conjunction - * with another BYxxx rule part. For example "the last work day - * of the month" could be represented as: RRULE: FREQ=MONTHLY; - * BYDAY=MO, TU, WE, TH, FR; BYSETPOS=-1. Each BYSETPOS value - * can include a positive (+n) or negative (-n) integer. If present, - * this indicates the nth occurrence of the specific occurrence - * within the set of events specified by the rule. Defined in RFC - * 2445 sec. 4.3.10 - */ - void setBysetposes(const QList& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - foreach(const qint64& v, value) - values << v; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#bysetpos", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#bysetpos. - * The BYSETPOS rule part specify values which correspond to the - * nth occurrence within the set of events specified by the rule. - * Valid values are 1 to 366 or -366 to -1. It MUST only be used in conjunction - * with another BYxxx rule part. For example "the last work day - * of the month" could be represented as: RRULE: FREQ=MONTHLY; - * BYDAY=MO, TU, WE, TH, FR; BYSETPOS=-1. Each BYSETPOS value - * can include a positive (+n) or negative (-n) integer. If present, - * this indicates the nth occurrence of the specific occurrence - * within the set of events specified by the rule. Defined in RFC - * 2445 sec. 4.3.10 - */ - void addBysetpos(const qint64& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#bysetpos", QUrl::StrictMode), value); - } - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#interval. - * The INTERVAL rule part contains a positive integer representing - * how often the recurrence rule repeats. The default value is - * "1", meaning every second for a SECONDLY rule, or every minute - * for a MINUTELY rule, every hour for an HOURLY rule, every day - * for a DAILY rule, every week for a WEEKLY rule, every month for - * a MONTHLY rule andevery year for a YEARLY rule. Defined in RFC - * 2445 sec. 4.3.10 - */ - qint64 interval() const { - qint64 value; - if(m_res->contains(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#interval", QUrl::StrictMode))) - value = m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#interval", QUrl::StrictMode)).first().value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#interval. - * The INTERVAL rule part contains a positive integer representing - * how often the recurrence rule repeats. The default value is - * "1", meaning every second for a SECONDLY rule, or every minute - * for a MINUTELY rule, every hour for an HOURLY rule, every day - * for a DAILY rule, every week for a WEEKLY rule, every month for - * a MONTHLY rule andevery year for a YEARLY rule. Defined in RFC - * 2445 sec. 4.3.10 - */ - void setInterval(const qint64& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - values << value; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#interval", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#interval. - * The INTERVAL rule part contains a positive integer representing - * how often the recurrence rule repeats. The default value is - * "1", meaning every second for a SECONDLY rule, or every minute - * for a MINUTELY rule, every hour for an HOURLY rule, every day - * for a DAILY rule, every week for a WEEKLY rule, every month for - * a MONTHLY rule andevery year for a YEARLY rule. Defined in RFC - * 2445 sec. 4.3.10 - */ - void addInterval(const qint64& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#interval", QUrl::StrictMode), value); - } - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#freq. - * Frequency of a recurrence rule. Defined in RFC 2445 sec. 4.3.10 - */ - QUrl freq() const { - QUrl value; - if(m_res->contains(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#freq", QUrl::StrictMode))) - value = m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#freq", QUrl::StrictMode)).first().value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#freq. - * Frequency of a recurrence rule. Defined in RFC 2445 sec. 4.3.10 - */ - void setFreq(const QUrl& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - values << value; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#freq", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#freq. - * Frequency of a recurrence rule. Defined in RFC 2445 sec. 4.3.10 - */ - void addFreq(const QUrl& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#freq", QUrl::StrictMode), value); - } - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#wkst. - * The day that's counted as the start of the week. It is used to disambiguate - * the byweekno rule. Defined in RFC 2445 sec. 4.3.10 - */ - QUrl wkst() const { - QUrl value; - if(m_res->contains(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#wkst", QUrl::StrictMode))) - value = m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#wkst", QUrl::StrictMode)).first().value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#wkst. - * The day that's counted as the start of the week. It is used to disambiguate - * the byweekno rule. Defined in RFC 2445 sec. 4.3.10 - */ - void setWkst(const QUrl& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - values << value; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#wkst", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#wkst. - * The day that's counted as the start of the week. It is used to disambiguate - * the byweekno rule. Defined in RFC 2445 sec. 4.3.10 - */ - void addWkst(const QUrl& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#wkst", QUrl::StrictMode), value); - } - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#count. - * How many times should an event be repeated. Defined in RFC 2445 - * sec. 4.3.10 - */ - qint64 count() const { - qint64 value; - if(m_res->contains(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#count", QUrl::StrictMode))) - value = m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#count", QUrl::StrictMode)).first().value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#count. - * How many times should an event be repeated. Defined in RFC 2445 - * sec. 4.3.10 - */ - void setCount(const qint64& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - values << value; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#count", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#count. - * How many times should an event be repeated. Defined in RFC 2445 - * sec. 4.3.10 - */ - void addCount(const qint64& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#count", QUrl::StrictMode), value); - } - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#bymonth. - * Number of the month of the recurrence. Valid values are integers - * from 1 (January) to 12 (December). Defined in RFC 2445 sec. 4.3.10 - */ - QList bymonths() const { - QList value; - foreach(const QVariant& v, m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#bymonth", QUrl::StrictMode))) - value << v.value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#bymonth. - * Number of the month of the recurrence. Valid values are integers - * from 1 (January) to 12 (December). Defined in RFC 2445 sec. 4.3.10 - */ - void setBymonths(const QList& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - foreach(const qint64& v, value) - values << v; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#bymonth", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#bymonth. - * Number of the month of the recurrence. Valid values are integers - * from 1 (January) to 12 (December). Defined in RFC 2445 sec. 4.3.10 - */ - void addBymonth(const qint64& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#bymonth", QUrl::StrictMode), value); - } - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#byminute. - * Minute of recurrence. Defined in RFC 2445 sec. 4.3.10 - */ - QList byminutes() const { - QList value; - foreach(const QVariant& v, m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#byminute", QUrl::StrictMode))) - value << v.value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#byminute. - * Minute of recurrence. Defined in RFC 2445 sec. 4.3.10 - */ - void setByminutes(const QList& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - foreach(const qint64& v, value) - values << v; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#byminute", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#byminute. - * Minute of recurrence. Defined in RFC 2445 sec. 4.3.10 - */ - void addByminute(const qint64& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#byminute", QUrl::StrictMode), value); - } - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#bymonthday. - * Day of the month when the event should recur. Defined in RFC 2445 - * sec. 4.3.10 - */ - QList bymonthdays() const { - QList value; - foreach(const QVariant& v, m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#bymonthday", QUrl::StrictMode))) - value << v.value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#bymonthday. - * Day of the month when the event should recur. Defined in RFC 2445 - * sec. 4.3.10 - */ - void setBymonthdays(const QList& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - foreach(const qint64& v, value) - values << v; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#bymonthday", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#bymonthday. - * Day of the month when the event should recur. Defined in RFC 2445 - * sec. 4.3.10 - */ - void addBymonthday(const qint64& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#bymonthday", QUrl::StrictMode), value); - } - -protected: - virtual QUrl resourceType() const { return QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#RecurrenceRule", QUrl::StrictMode); } - -private: - Nepomuk2::SimpleResource* m_res; -}; -} -} - -#endif diff -Nru kdepim-runtime-4.12.3/agents/ontologies/ncal/requeststatus.h kdepim-runtime-4.12.90/agents/ontologies/ncal/requeststatus.h --- kdepim-runtime-4.12.3/agents/ontologies/ncal/requeststatus.h 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/agents/ontologies/ncal/requeststatus.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,220 +0,0 @@ -#ifndef _NCAL_REQUESTSTATUS_H_ -#define _NCAL_REQUESTSTATUS_H_ - -#include -#include -#include -#include -#include -#include -#include - -#include - -namespace Nepomuk2 { -namespace NCAL { -/** - * Request Status. A class that was introduced to provide a structure - * for the value of ncal:requestStatus property. See documentation - * for ncal:requestStatus for details. - */ -class RequestStatus -{ -public: - RequestStatus(Nepomuk2::SimpleResource* res) - : m_res(res) - {} - - virtual ~RequestStatus() {} - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#requestStatusData. - * Additional data associated with a request status. Inspired - * by the third part of the structured value for the REQUEST-STATUS - * property defined in RFC 2445 sec. 4.8.8.2 ("Textual exception - * data. For example, the offending property name and value or - * complete property line") - */ - QStringList requestStatusDatas() const { - QStringList value; - foreach(const QVariant& v, m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#requestStatusData", QUrl::StrictMode))) - value << v.value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#requestStatusData. - * Additional data associated with a request status. Inspired - * by the third part of the structured value for the REQUEST-STATUS - * property defined in RFC 2445 sec. 4.8.8.2 ("Textual exception - * data. For example, the offending property name and value or - * complete property line") - */ - void setRequestStatusDatas(const QStringList& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - foreach(const QString& v, value) - values << v; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#requestStatusData", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#requestStatusData. - * Additional data associated with a request status. Inspired - * by the third part of the structured value for the REQUEST-STATUS - * property defined in RFC 2445 sec. 4.8.8.2 ("Textual exception - * data. For example, the offending property name and value or - * complete property line") - */ - void addRequestStatusData(const QString& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#requestStatusData", QUrl::StrictMode), value); - } - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#statusDescription. - * Longer return status description. Inspired by the second part - * of the structured value of the REQUEST-STATUS property defined - * in RFC 2445 sec. 4.8.8.2 - */ - QString statusDescription() const { - QString value; - if(m_res->contains(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#statusDescription", QUrl::StrictMode))) - value = m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#statusDescription", QUrl::StrictMode)).first().value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#statusDescription. - * Longer return status description. Inspired by the second part - * of the structured value of the REQUEST-STATUS property defined - * in RFC 2445 sec. 4.8.8.2 - */ - void setStatusDescription(const QString& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - values << value; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#statusDescription", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#statusDescription. - * Longer return status description. Inspired by the second part - * of the structured value of the REQUEST-STATUS property defined - * in RFC 2445 sec. 4.8.8.2 - */ - void addStatusDescription(const QString& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#statusDescription", QUrl::StrictMode), value); - } - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#returnStatus. - * Short return status. Inspired by the first element of the structured - * value of the REQUEST-STATUS property described in RFC 2445 - * sec. 4.8.8.2. The short return status is a PERIOD character - * (US-ASCII decimal 46) separated 3-tuple of integers. For example, - * "3.1.1". The successive levels of integers provide for a successive - * level of status code granularity. The following are initial - * classes for the return status code. Individual iCalendar object - * methods will define specific return status codes for these - * classes. In addition, other classes for the return status code - * may be defined using the registration process defined later - * in this memo. 1.xx - Preliminary success. This class of status - * of status code indicates that the request has request has been - * initially processed but that completion is pending. 2.xx -Successful. - * This class of status code indicates that the request was completed - * successfuly. However, the exact status code can indicate that - * a fallback has been taken. 3.xx - Client Error. This class of - * status code indicates that the request was not successful. - * The error is the result of either a syntax or a semantic error - * in the client formatted request. Request should not be retried - * until the condition in the request is corrected. 4.xx - Scheduling - * Error. This class of status code indicates that the request - * was not successful. Some sort of error occurred within the calendaring - * and scheduling service, not directly related to the request - * itself. - */ - QString returnStatus() const { - QString value; - if(m_res->contains(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#returnStatus", QUrl::StrictMode))) - value = m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#returnStatus", QUrl::StrictMode)).first().value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#returnStatus. - * Short return status. Inspired by the first element of the structured - * value of the REQUEST-STATUS property described in RFC 2445 - * sec. 4.8.8.2. The short return status is a PERIOD character - * (US-ASCII decimal 46) separated 3-tuple of integers. For example, - * "3.1.1". The successive levels of integers provide for a successive - * level of status code granularity. The following are initial - * classes for the return status code. Individual iCalendar object - * methods will define specific return status codes for these - * classes. In addition, other classes for the return status code - * may be defined using the registration process defined later - * in this memo. 1.xx - Preliminary success. This class of status - * of status code indicates that the request has request has been - * initially processed but that completion is pending. 2.xx -Successful. - * This class of status code indicates that the request was completed - * successfuly. However, the exact status code can indicate that - * a fallback has been taken. 3.xx - Client Error. This class of - * status code indicates that the request was not successful. - * The error is the result of either a syntax or a semantic error - * in the client formatted request. Request should not be retried - * until the condition in the request is corrected. 4.xx - Scheduling - * Error. This class of status code indicates that the request - * was not successful. Some sort of error occurred within the calendaring - * and scheduling service, not directly related to the request - * itself. - */ - void setReturnStatus(const QString& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - values << value; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#returnStatus", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#returnStatus. - * Short return status. Inspired by the first element of the structured - * value of the REQUEST-STATUS property described in RFC 2445 - * sec. 4.8.8.2. The short return status is a PERIOD character - * (US-ASCII decimal 46) separated 3-tuple of integers. For example, - * "3.1.1". The successive levels of integers provide for a successive - * level of status code granularity. The following are initial - * classes for the return status code. Individual iCalendar object - * methods will define specific return status codes for these - * classes. In addition, other classes for the return status code - * may be defined using the registration process defined later - * in this memo. 1.xx - Preliminary success. This class of status - * of status code indicates that the request has request has been - * initially processed but that completion is pending. 2.xx -Successful. - * This class of status code indicates that the request was completed - * successfuly. However, the exact status code can indicate that - * a fallback has been taken. 3.xx - Client Error. This class of - * status code indicates that the request was not successful. - * The error is the result of either a syntax or a semantic error - * in the client formatted request. Request should not be retried - * until the condition in the request is corrected. 4.xx - Scheduling - * Error. This class of status code indicates that the request - * was not successful. Some sort of error occurred within the calendaring - * and scheduling service, not directly related to the request - * itself. - */ - void addReturnStatus(const QString& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#returnStatus", QUrl::StrictMode), value); - } - -protected: - virtual QUrl resourceType() const { return QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#RequestStatus", QUrl::StrictMode); } - -private: - Nepomuk2::SimpleResource* m_res; -}; -} -} - -#endif diff -Nru kdepim-runtime-4.12.3/agents/ontologies/ncal/timetransparency.h kdepim-runtime-4.12.90/agents/ontologies/ncal/timetransparency.h --- kdepim-runtime-4.12.3/agents/ontologies/ncal/timetransparency.h 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/agents/ontologies/ncal/timetransparency.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,39 +0,0 @@ -#ifndef _NCAL_TIMETRANSPARENCY_H_ -#define _NCAL_TIMETRANSPARENCY_H_ - -#include -#include -#include -#include -#include -#include -#include - -#include - -namespace Nepomuk2 { -namespace NCAL { -/** - * Time transparency. Introduced to provide a way to express the - * limited vocabulary for the values of ncal:transp property. - * See documentation of ncal:transp for details. - */ -class TimeTransparency -{ -public: - TimeTransparency(Nepomuk2::SimpleResource* res) - : m_res(res) - {} - - virtual ~TimeTransparency() {} - -protected: - virtual QUrl resourceType() const { return QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#TimeTransparency", QUrl::StrictMode); } - -private: - Nepomuk2::SimpleResource* m_res; -}; -} -} - -#endif diff -Nru kdepim-runtime-4.12.3/agents/ontologies/ncal/timezone.h kdepim-runtime-4.12.90/agents/ontologies/ncal/timezone.h --- kdepim-runtime-4.12.3/agents/ontologies/ncal/timezone.h 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/agents/ontologies/ncal/timezone.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,197 +0,0 @@ -#ifndef _NCAL_TIMEZONE_H_ -#define _NCAL_TIMEZONE_H_ - -#include -#include -#include -#include -#include -#include -#include - -#include - -#include "ncal/unionoftimezoneobservanceeventjournaltimezonetodo.h" -#include "ncal/unionofeventjournaltimezonetodo.h" -#include "ncal/unionoftimezoneobservanceeventfreebusyjournaltimezonetodo.h" -#include "ncal/unionoftimezoneobservanceeventfreebusytimezonetodo.h" -namespace Nepomuk2 { -namespace NCAL { -/** - * Provide a grouping of component properties that defines a time - * zone. - */ -class Timezone : public NCAL::UnionOfTimezoneObservanceEventJournalTimezoneTodo, public NCAL::UnionOfEventJournalTimezoneTodo, public NCAL::UnionOfTimezoneObservanceEventFreebusyJournalTimezoneTodo, public NCAL::UnionOfTimezoneObservanceEventFreebusyTimezoneTodo -{ -public: - Timezone(Nepomuk2::SimpleResource* res) - : NCAL::UnionOfTimezoneObservanceEventJournalTimezoneTodo(res), NCAL::UnionOfEventJournalTimezoneTodo(res), NCAL::UnionOfTimezoneObservanceEventFreebusyJournalTimezoneTodo(res), NCAL::UnionOfTimezoneObservanceEventFreebusyTimezoneTodo(res), m_res(res) - {} - - virtual ~Timezone() {} - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#tzurl. - * The TZURL provides a means for a VTIMEZONE component to point - * to a network location that can be used to retrieve an up-to- date - * version of itself. Inspired by RFC 2445 sec. 4.8.3.5. Originally - * the range of this property had been specified as URI. - */ - QList tzurls() const { - QList value; - foreach(const QVariant& v, m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#tzurl", QUrl::StrictMode))) - value << v.value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#tzurl. - * The TZURL provides a means for a VTIMEZONE component to point - * to a network location that can be used to retrieve an up-to- date - * version of itself. Inspired by RFC 2445 sec. 4.8.3.5. Originally - * the range of this property had been specified as URI. - */ - void setTzurls(const QList& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - foreach(const QUrl& v, value) - values << v; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#tzurl", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#tzurl. - * The TZURL provides a means for a VTIMEZONE component to point - * to a network location that can be used to retrieve an up-to- date - * version of itself. Inspired by RFC 2445 sec. 4.8.3.5. Originally - * the range of this property had been specified as URI. - */ - void addTzurl(const QUrl& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#tzurl", QUrl::StrictMode), value); - } - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#daylight. - * Links a timezone with it's daylight observance. This property - * has no direct equivalent in the RFC 2445. It has been inspired - * by the structure of the Vtimezone component defined in sec.4.6.5 - */ - QUrl daylight() const { - QUrl value; - if(m_res->contains(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#daylight", QUrl::StrictMode))) - value = m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#daylight", QUrl::StrictMode)).first().value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#daylight. - * Links a timezone with it's daylight observance. This property - * has no direct equivalent in the RFC 2445. It has been inspired - * by the structure of the Vtimezone component defined in sec.4.6.5 - */ - void setDaylight(const QUrl& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - values << value; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#daylight", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#daylight. - * Links a timezone with it's daylight observance. This property - * has no direct equivalent in the RFC 2445. It has been inspired - * by the structure of the Vtimezone component defined in sec.4.6.5 - */ - void addDaylight(const QUrl& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#daylight", QUrl::StrictMode), value); - } - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#standard. - * Links the timezone with the standard timezone observance. - * This property has no direct equivalent in the RFC 2445. It has - * been inspired by the structure of the Vtimezone component defined - * in sec.4.6.5 - */ - QUrl standard() const { - QUrl value; - if(m_res->contains(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#standard", QUrl::StrictMode))) - value = m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#standard", QUrl::StrictMode)).first().value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#standard. - * Links the timezone with the standard timezone observance. - * This property has no direct equivalent in the RFC 2445. It has - * been inspired by the structure of the Vtimezone component defined - * in sec.4.6.5 - */ - void setStandard(const QUrl& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - values << value; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#standard", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#standard. - * Links the timezone with the standard timezone observance. - * This property has no direct equivalent in the RFC 2445. It has - * been inspired by the structure of the Vtimezone component defined - * in sec.4.6.5 - */ - void addStandard(const QUrl& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#standard", QUrl::StrictMode), value); - } - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#tzid. - * This property specifies the text value that uniquely identifies - * the "VTIMEZONE" calendar component. Inspired by RFC 2445 sec - * 4.8.3.1 - */ - QString tzid() const { - QString value; - if(m_res->contains(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#tzid", QUrl::StrictMode))) - value = m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#tzid", QUrl::StrictMode)).first().value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#tzid. - * This property specifies the text value that uniquely identifies - * the "VTIMEZONE" calendar component. Inspired by RFC 2445 sec - * 4.8.3.1 - */ - void setTzid(const QString& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - values << value; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#tzid", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#tzid. - * This property specifies the text value that uniquely identifies - * the "VTIMEZONE" calendar component. Inspired by RFC 2445 sec - * 4.8.3.1 - */ - void addTzid(const QString& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#tzid", QUrl::StrictMode), value); - } - -protected: - virtual QUrl resourceType() const { return QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#Timezone", QUrl::StrictMode); } - -private: - Nepomuk2::SimpleResource* m_res; -}; -} -} - -#endif diff -Nru kdepim-runtime-4.12.3/agents/ontologies/ncal/timezoneobservance.h kdepim-runtime-4.12.90/agents/ontologies/ncal/timezoneobservance.h --- kdepim-runtime-4.12.3/agents/ontologies/ncal/timezoneobservance.h 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/agents/ontologies/ncal/timezoneobservance.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,188 +0,0 @@ -#ifndef _NCAL_TIMEZONEOBSERVANCE_H_ -#define _NCAL_TIMEZONEOBSERVANCE_H_ - -#include -#include -#include -#include -#include -#include -#include - -#include - -#include "ncal/unionoftimezoneobservanceeventfreebusytimezonetodo.h" -#include "ncal/unionoftimezoneobservanceeventfreebusyjournaltimezonetodo.h" -#include "ncal/unionoftimezoneobservanceeventjournaltimezonetodo.h" -namespace Nepomuk2 { -namespace NCAL { -/** - * - */ -class TimezoneObservance : public NCAL::UnionOfTimezoneObservanceEventFreebusyTimezoneTodo, public NCAL::UnionOfTimezoneObservanceEventFreebusyJournalTimezoneTodo, public NCAL::UnionOfTimezoneObservanceEventJournalTimezoneTodo -{ -public: - TimezoneObservance(Nepomuk2::SimpleResource* res) - : NCAL::UnionOfTimezoneObservanceEventFreebusyTimezoneTodo(res), NCAL::UnionOfTimezoneObservanceEventFreebusyJournalTimezoneTodo(res), NCAL::UnionOfTimezoneObservanceEventJournalTimezoneTodo(res), m_res(res) - {} - - virtual ~TimezoneObservance() {} - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#tzoffsetto. - * This property specifies the offset which is in use in this time - * zone observance. nspired by RFC 2445 sec. 4.8.3.4. The original - * domain was underspecified. It said that this property must - * appear within a Timezone component. In this ontology a TimezoneObservance - * class has been introduced to clarify this specification. The - * original range was UTC-OFFSET. There is no equivalent among - * the XSD datatypes so plain string was chosen. - */ - QString tzoffsetto() const { - QString value; - if(m_res->contains(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#tzoffsetto", QUrl::StrictMode))) - value = m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#tzoffsetto", QUrl::StrictMode)).first().value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#tzoffsetto. - * This property specifies the offset which is in use in this time - * zone observance. nspired by RFC 2445 sec. 4.8.3.4. The original - * domain was underspecified. It said that this property must - * appear within a Timezone component. In this ontology a TimezoneObservance - * class has been introduced to clarify this specification. The - * original range was UTC-OFFSET. There is no equivalent among - * the XSD datatypes so plain string was chosen. - */ - void setTzoffsetto(const QString& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - values << value; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#tzoffsetto", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#tzoffsetto. - * This property specifies the offset which is in use in this time - * zone observance. nspired by RFC 2445 sec. 4.8.3.4. The original - * domain was underspecified. It said that this property must - * appear within a Timezone component. In this ontology a TimezoneObservance - * class has been introduced to clarify this specification. The - * original range was UTC-OFFSET. There is no equivalent among - * the XSD datatypes so plain string was chosen. - */ - void addTzoffsetto(const QString& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#tzoffsetto", QUrl::StrictMode), value); - } - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#tzoffsetfrom. - * This property specifies the offset which is in use prior to this - * time zone observance. Inspired by RFC 2445 sec. 4.8.3.3. The - * original domain was underspecified. It said that this property - * must appear within a Timezone component. In this ontology a - * TimezoneObservance class has been introduced to clarify this - * specification. The original range was UTC-OFFSET. There is - * no equivalent among the XSD datatypes so plain string was chosen. - */ - QString tzoffsetfrom() const { - QString value; - if(m_res->contains(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#tzoffsetfrom", QUrl::StrictMode))) - value = m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#tzoffsetfrom", QUrl::StrictMode)).first().value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#tzoffsetfrom. - * This property specifies the offset which is in use prior to this - * time zone observance. Inspired by RFC 2445 sec. 4.8.3.3. The - * original domain was underspecified. It said that this property - * must appear within a Timezone component. In this ontology a - * TimezoneObservance class has been introduced to clarify this - * specification. The original range was UTC-OFFSET. There is - * no equivalent among the XSD datatypes so plain string was chosen. - */ - void setTzoffsetfrom(const QString& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - values << value; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#tzoffsetfrom", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#tzoffsetfrom. - * This property specifies the offset which is in use prior to this - * time zone observance. Inspired by RFC 2445 sec. 4.8.3.3. The - * original domain was underspecified. It said that this property - * must appear within a Timezone component. In this ontology a - * TimezoneObservance class has been introduced to clarify this - * specification. The original range was UTC-OFFSET. There is - * no equivalent among the XSD datatypes so plain string was chosen. - */ - void addTzoffsetfrom(const QString& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#tzoffsetfrom", QUrl::StrictMode), value); - } - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#tzname. - * Specifies the customary designation for a timezone description. - * Inspired by RFC 2445 sec. 4.8.3.2 The LANGUAGE parameter has - * been discarded. Please xml:lang literals to express languages. - * Original specification for the domain of this property stated - * that it must appear within the timezone component. In this ontology - * the TimezoneObservance class has been itroduced to clarify - * this specification. - */ - QStringList tznames() const { - QStringList value; - foreach(const QVariant& v, m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#tzname", QUrl::StrictMode))) - value << v.value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#tzname. - * Specifies the customary designation for a timezone description. - * Inspired by RFC 2445 sec. 4.8.3.2 The LANGUAGE parameter has - * been discarded. Please xml:lang literals to express languages. - * Original specification for the domain of this property stated - * that it must appear within the timezone component. In this ontology - * the TimezoneObservance class has been itroduced to clarify - * this specification. - */ - void setTznames(const QStringList& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - foreach(const QString& v, value) - values << v; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#tzname", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#tzname. - * Specifies the customary designation for a timezone description. - * Inspired by RFC 2445 sec. 4.8.3.2 The LANGUAGE parameter has - * been discarded. Please xml:lang literals to express languages. - * Original specification for the domain of this property stated - * that it must appear within the timezone component. In this ontology - * the TimezoneObservance class has been itroduced to clarify - * this specification. - */ - void addTzname(const QString& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#tzname", QUrl::StrictMode), value); - } - -protected: - virtual QUrl resourceType() const { return QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#TimezoneObservance", QUrl::StrictMode); } - -private: - Nepomuk2::SimpleResource* m_res; -}; -} -} - -#endif diff -Nru kdepim-runtime-4.12.3/agents/ontologies/ncal/todo.h kdepim-runtime-4.12.90/agents/ontologies/ncal/todo.h --- kdepim-runtime-4.12.3/agents/ontologies/ncal/todo.h 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/agents/ontologies/ncal/todo.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,191 +0,0 @@ -#ifndef _NCAL_TODO_H_ -#define _NCAL_TODO_H_ - -#include -#include -#include -#include -#include -#include -#include - -#include - -#include "ncal/unionofeventjournaltimezonetodo.h" -#include "ncal/unionofalarmeventjournaltodo.h" -#include "ncal/unionofeventfreebusyjournaltodo.h" -#include "ncal/unionoftimezoneobservanceeventfreebusytimezonetodo.h" -#include "ncal/unionoftimezoneobservanceeventfreebusyjournaltimezonetodo.h" -#include "ncal/unionoftimezoneobservanceeventjournaltimezonetodo.h" -#include "ncal/unionofalarmeventtodo.h" -#include "ncal/unionofeventjournaltodo.h" -#include "ncal/unionofeventtodo.h" -#include "ncal/unionofalarmeventfreebusyjournaltodo.h" -#include "ncal/unionofalarmeventfreebusytodo.h" -namespace Nepomuk2 { -namespace NCAL { -/** - * Provide a grouping of calendar properties that describe a to-do. - */ -class Todo : public NCAL::UnionOfEventJournalTimezoneTodo, public NCAL::UnionOfAlarmEventJournalTodo, public NCAL::UnionOfEventFreebusyJournalTodo, public NCAL::UnionOfTimezoneObservanceEventFreebusyTimezoneTodo, public NCAL::UnionOfTimezoneObservanceEventFreebusyJournalTimezoneTodo, public NCAL::UnionOfTimezoneObservanceEventJournalTimezoneTodo, public NCAL::UnionOfAlarmEventTodo, public NCAL::UnionOfEventJournalTodo, public NCAL::UnionOfEventTodo, public NCAL::UnionOfAlarmEventFreebusyJournalTodo, public NCAL::UnionOfAlarmEventFreebusyTodo -{ -public: - Todo(Nepomuk2::SimpleResource* res) - : NCAL::UnionOfEventJournalTimezoneTodo(res), NCAL::UnionOfAlarmEventJournalTodo(res), NCAL::UnionOfEventFreebusyJournalTodo(res), NCAL::UnionOfTimezoneObservanceEventFreebusyTimezoneTodo(res), NCAL::UnionOfTimezoneObservanceEventFreebusyJournalTimezoneTodo(res), NCAL::UnionOfTimezoneObservanceEventJournalTimezoneTodo(res), NCAL::UnionOfAlarmEventTodo(res), NCAL::UnionOfEventJournalTodo(res), NCAL::UnionOfEventTodo(res), NCAL::UnionOfAlarmEventFreebusyJournalTodo(res), NCAL::UnionOfAlarmEventFreebusyTodo(res), m_res(res) - {} - - virtual ~Todo() {} - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#percentComplete. - * This property is used by an assignee or delegatee of a to-do to - * convey the percent completion of a to-do to the Organizer. Inspired - * by RFC 2445 sec. 4.8.1.8 - */ - QList percentCompletes() const { - QList value; - foreach(const QVariant& v, m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#percentComplete", QUrl::StrictMode))) - value << v.value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#percentComplete. - * This property is used by an assignee or delegatee of a to-do to - * convey the percent completion of a to-do to the Organizer. Inspired - * by RFC 2445 sec. 4.8.1.8 - */ - void setPercentCompletes(const QList& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - foreach(const qint64& v, value) - values << v; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#percentComplete", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#percentComplete. - * This property is used by an assignee or delegatee of a to-do to - * convey the percent completion of a to-do to the Organizer. Inspired - * by RFC 2445 sec. 4.8.1.8 - */ - void addPercentComplete(const qint64& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#percentComplete", QUrl::StrictMode), value); - } - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#completed. - * This property defines the date and time that a to-do was actually - * completed. Inspired by RFC 2445 sec. 4.8.2.1. Note that the - * RFC allows ONLY UTC time values for this property. - */ - QDateTime completed() const { - QDateTime value; - if(m_res->contains(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#completed", QUrl::StrictMode))) - value = m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#completed", QUrl::StrictMode)).first().value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#completed. - * This property defines the date and time that a to-do was actually - * completed. Inspired by RFC 2445 sec. 4.8.2.1. Note that the - * RFC allows ONLY UTC time values for this property. - */ - void setCompleted(const QDateTime& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - values << value; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#completed", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#completed. - * This property defines the date and time that a to-do was actually - * completed. Inspired by RFC 2445 sec. 4.8.2.1. Note that the - * RFC allows ONLY UTC time values for this property. - */ - void addCompleted(const QDateTime& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#completed", QUrl::StrictMode), value); - } - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#due. - * This property defines the date and time that a to-do is expected - * to be completed. Inspired by RFC 2445 sec. 4.8.2.3 - */ - QUrl due() const { - QUrl value; - if(m_res->contains(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#due", QUrl::StrictMode))) - value = m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#due", QUrl::StrictMode)).first().value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#due. - * This property defines the date and time that a to-do is expected - * to be completed. Inspired by RFC 2445 sec. 4.8.2.3 - */ - void setDue(const QUrl& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - values << value; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#due", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#due. - * This property defines the date and time that a to-do is expected - * to be completed. Inspired by RFC 2445 sec. 4.8.2.3 - */ - void addDue(const QUrl& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#due", QUrl::StrictMode), value); - } - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#todoStatus. - * Defines the overall status or confirmation for a todo. Based - * on the STATUS property defined in RFC 2445 sec. 4.8.1.11. - */ - QUrl todoStatus() const { - QUrl value; - if(m_res->contains(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#todoStatus", QUrl::StrictMode))) - value = m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#todoStatus", QUrl::StrictMode)).first().value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#todoStatus. - * Defines the overall status or confirmation for a todo. Based - * on the STATUS property defined in RFC 2445 sec. 4.8.1.11. - */ - void setTodoStatus(const QUrl& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - values << value; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#todoStatus", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#todoStatus. - * Defines the overall status or confirmation for a todo. Based - * on the STATUS property defined in RFC 2445 sec. 4.8.1.11. - */ - void addTodoStatus(const QUrl& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#todoStatus", QUrl::StrictMode), value); - } - -protected: - virtual QUrl resourceType() const { return QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#Todo", QUrl::StrictMode); } - -private: - Nepomuk2::SimpleResource* m_res; -}; -} -} - -#endif diff -Nru kdepim-runtime-4.12.3/agents/ontologies/ncal/todostatus.h kdepim-runtime-4.12.90/agents/ontologies/ncal/todostatus.h --- kdepim-runtime-4.12.3/agents/ontologies/ncal/todostatus.h 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/agents/ontologies/ncal/todostatus.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,41 +0,0 @@ -#ifndef _NCAL_TODOSTATUS_H_ -#define _NCAL_TODOSTATUS_H_ - -#include -#include -#include -#include -#include -#include -#include - -#include - -namespace Nepomuk2 { -namespace NCAL { -/** - * A status of a calendar entity. This class has been introduced - * to express the limited set of values for the ncal:status property. - * The user may use the instances provided with this ontology or - * create his/her own. See the documentation for ncal:todoStatus - * for details. - */ -class TodoStatus -{ -public: - TodoStatus(Nepomuk2::SimpleResource* res) - : m_res(res) - {} - - virtual ~TodoStatus() {} - -protected: - virtual QUrl resourceType() const { return QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#TodoStatus", QUrl::StrictMode); } - -private: - Nepomuk2::SimpleResource* m_res; -}; -} -} - -#endif diff -Nru kdepim-runtime-4.12.3/agents/ontologies/ncal/trigger.h kdepim-runtime-4.12.90/agents/ontologies/ncal/trigger.h --- kdepim-runtime-4.12.3/agents/ontologies/ncal/trigger.h 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/agents/ontologies/ncal/trigger.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,160 +0,0 @@ -#ifndef _NCAL_TRIGGER_H_ -#define _NCAL_TRIGGER_H_ - -#include -#include -#include -#include -#include -#include -#include - -#include - -namespace Nepomuk2 { -namespace NCAL { -/** - * An alarm trigger. This class has been created to serve as the - * range of ncal:trigger property. See the documentation for - * ncal:trigger for more details. - */ -class Trigger -{ -public: - Trigger(Nepomuk2::SimpleResource* res) - : m_res(res) - {} - - virtual ~Trigger() {} - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#triggerDuration. - * The duration of a trigger. This property has been created to - * express the VALUE=DURATION parameter of the TRIGGER property. - * See documentation for ncal:trigger for more details. - */ - QUrl triggerDuration() const { - QUrl value; - if(m_res->contains(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#triggerDuration", QUrl::StrictMode))) - value = m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#triggerDuration", QUrl::StrictMode)).first().value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#triggerDuration. - * The duration of a trigger. This property has been created to - * express the VALUE=DURATION parameter of the TRIGGER property. - * See documentation for ncal:trigger for more details. - */ - void setTriggerDuration(const QUrl& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - values << value; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#triggerDuration", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#triggerDuration. - * The duration of a trigger. This property has been created to - * express the VALUE=DURATION parameter of the TRIGGER property. - * See documentation for ncal:trigger for more details. - */ - void addTriggerDuration(const QUrl& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#triggerDuration", QUrl::StrictMode), value); - } - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#triggerDateTime. - * The exact date and time of the trigger. This property has been - * created to express the VALUE=DATE, and VALUE=DATE-TIME parameters - * of the TRIGGER property. See the documentation for ncal:trigger - * for more details - */ - QDateTime triggerDateTime() const { - QDateTime value; - if(m_res->contains(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#triggerDateTime", QUrl::StrictMode))) - value = m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#triggerDateTime", QUrl::StrictMode)).first().value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#triggerDateTime. - * The exact date and time of the trigger. This property has been - * created to express the VALUE=DATE, and VALUE=DATE-TIME parameters - * of the TRIGGER property. See the documentation for ncal:trigger - * for more details - */ - void setTriggerDateTime(const QDateTime& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - values << value; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#triggerDateTime", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#triggerDateTime. - * The exact date and time of the trigger. This property has been - * created to express the VALUE=DATE, and VALUE=DATE-TIME parameters - * of the TRIGGER property. See the documentation for ncal:trigger - * for more details - */ - void addTriggerDateTime(const QDateTime& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#triggerDateTime", QUrl::StrictMode), value); - } - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#related. - * To specify the relationship of the alarm trigger with respect - * to the start or end of the calendar component. Inspired by RFC - * 2445 4.2.14. The RFC has specified two possible values for this - * property ('START' and 'END') they have been expressed as instances - * of the TriggerRelation class. - */ - QList relateds() const { - QList value; - foreach(const QVariant& v, m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#related", QUrl::StrictMode))) - value << v.value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#related. - * To specify the relationship of the alarm trigger with respect - * to the start or end of the calendar component. Inspired by RFC - * 2445 4.2.14. The RFC has specified two possible values for this - * property ('START' and 'END') they have been expressed as instances - * of the TriggerRelation class. - */ - void setRelateds(const QList& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - foreach(const QUrl& v, value) - values << v; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#related", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#related. - * To specify the relationship of the alarm trigger with respect - * to the start or end of the calendar component. Inspired by RFC - * 2445 4.2.14. The RFC has specified two possible values for this - * property ('START' and 'END') they have been expressed as instances - * of the TriggerRelation class. - */ - void addRelated(const QUrl& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#related", QUrl::StrictMode), value); - } - -protected: - virtual QUrl resourceType() const { return QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#Trigger", QUrl::StrictMode); } - -private: - Nepomuk2::SimpleResource* m_res; -}; -} -} - -#endif diff -Nru kdepim-runtime-4.12.3/agents/ontologies/ncal/triggerrelation.h kdepim-runtime-4.12.90/agents/ontologies/ncal/triggerrelation.h --- kdepim-runtime-4.12.3/agents/ontologies/ncal/triggerrelation.h 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/agents/ontologies/ncal/triggerrelation.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,40 +0,0 @@ -#ifndef _NCAL_TRIGGERRELATION_H_ -#define _NCAL_TRIGGERRELATION_H_ - -#include -#include -#include -#include -#include -#include -#include - -#include - -namespace Nepomuk2 { -namespace NCAL { -/** - * The relation between the trigger and its parent calendar component. - * This class has been introduced to express the limited vocabulary - * for the ncal:related property. See the documentation for ncal:related - * for more details. - */ -class TriggerRelation -{ -public: - TriggerRelation(Nepomuk2::SimpleResource* res) - : m_res(res) - {} - - virtual ~TriggerRelation() {} - -protected: - virtual QUrl resourceType() const { return QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#TriggerRelation", QUrl::StrictMode); } - -private: - Nepomuk2::SimpleResource* m_res; -}; -} -} - -#endif diff -Nru kdepim-runtime-4.12.3/agents/ontologies/ncal/unionofalarmeventfreebusyjournaltodo.h kdepim-runtime-4.12.90/agents/ontologies/ncal/unionofalarmeventfreebusyjournaltodo.h --- kdepim-runtime-4.12.3/agents/ontologies/ncal/unionofalarmeventfreebusyjournaltodo.h 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/agents/ontologies/ncal/unionofalarmeventfreebusyjournaltodo.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,100 +0,0 @@ -#ifndef _NCAL_UNIONOFALARMEVENTFREEBUSYJOURNALTODO_H_ -#define _NCAL_UNIONOFALARMEVENTFREEBUSYJOURNALTODO_H_ - -#include -#include -#include -#include -#include -#include -#include - -#include - -#include "ncal/unionparentclass.h" -namespace Nepomuk2 { -namespace NCAL { -/** - * - */ -class UnionOfAlarmEventFreebusyJournalTodo : public NCAL::UnionParentClass -{ -public: - UnionOfAlarmEventFreebusyJournalTodo(Nepomuk2::SimpleResource* res) - : NCAL::UnionParentClass(res), m_res(res) - {} - - virtual ~UnionOfAlarmEventFreebusyJournalTodo() {} - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#attendee. - * The property defines an "Attendee" within a calendar component. - * Inspired by RFC 2445 sec. 4.8.4.1. Originally this property - * accepted many parameters. The Attendee class has been introduced - * to express them all. Note that NCAL is aligned with NCO. The actual - * value (of the CAL-ADDRESS type) is expressed as an instance - * of nco:Contact. Remember that the CN parameter has been removed - * from NCAL. Instead that value should be expressed using nco:fullname - * property of the above mentioned nco:Contact instance. The - * RFC stated that whenever this property is attached to a Valarm - * instance, the Attendee cannot have any parameters apart from - * involvedContact. - */ - QList attendees() const { - QList value; - foreach(const QVariant& v, m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#attendee", QUrl::StrictMode))) - value << v.value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#attendee. - * The property defines an "Attendee" within a calendar component. - * Inspired by RFC 2445 sec. 4.8.4.1. Originally this property - * accepted many parameters. The Attendee class has been introduced - * to express them all. Note that NCAL is aligned with NCO. The actual - * value (of the CAL-ADDRESS type) is expressed as an instance - * of nco:Contact. Remember that the CN parameter has been removed - * from NCAL. Instead that value should be expressed using nco:fullname - * property of the above mentioned nco:Contact instance. The - * RFC stated that whenever this property is attached to a Valarm - * instance, the Attendee cannot have any parameters apart from - * involvedContact. - */ - void setAttendees(const QList& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - foreach(const QUrl& v, value) - values << v; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#attendee", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#attendee. - * The property defines an "Attendee" within a calendar component. - * Inspired by RFC 2445 sec. 4.8.4.1. Originally this property - * accepted many parameters. The Attendee class has been introduced - * to express them all. Note that NCAL is aligned with NCO. The actual - * value (of the CAL-ADDRESS type) is expressed as an instance - * of nco:Contact. Remember that the CN parameter has been removed - * from NCAL. Instead that value should be expressed using nco:fullname - * property of the above mentioned nco:Contact instance. The - * RFC stated that whenever this property is attached to a Valarm - * instance, the Attendee cannot have any parameters apart from - * involvedContact. - */ - void addAttendee(const QUrl& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#attendee", QUrl::StrictMode), value); - } - -protected: - virtual QUrl resourceType() const { return QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#UnionOfAlarmEventFreebusyJournalTodo", QUrl::StrictMode); } - -private: - Nepomuk2::SimpleResource* m_res; -}; -} -} - -#endif diff -Nru kdepim-runtime-4.12.3/agents/ontologies/ncal/unionofalarmeventfreebusytodo.h kdepim-runtime-4.12.90/agents/ontologies/ncal/unionofalarmeventfreebusytodo.h --- kdepim-runtime-4.12.3/agents/ontologies/ncal/unionofalarmeventfreebusytodo.h 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/agents/ontologies/ncal/unionofalarmeventfreebusytodo.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,72 +0,0 @@ -#ifndef _NCAL_UNIONOFALARMEVENTFREEBUSYTODO_H_ -#define _NCAL_UNIONOFALARMEVENTFREEBUSYTODO_H_ - -#include -#include -#include -#include -#include -#include -#include - -#include - -#include "ncal/unionparentclass.h" -namespace Nepomuk2 { -namespace NCAL { -/** - * - */ -class UnionOfAlarmEventFreebusyTodo : public NCAL::UnionParentClass -{ -public: - UnionOfAlarmEventFreebusyTodo(Nepomuk2::SimpleResource* res) - : NCAL::UnionParentClass(res), m_res(res) - {} - - virtual ~UnionOfAlarmEventFreebusyTodo() {} - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#duration. - * The property specifies a positive duration of time. Inspired - * by RFC 2445 sec. 4.8.2.5 - */ - QUrl duration() const { - QUrl value; - if(m_res->contains(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#duration", QUrl::StrictMode))) - value = m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#duration", QUrl::StrictMode)).first().value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#duration. - * The property specifies a positive duration of time. Inspired - * by RFC 2445 sec. 4.8.2.5 - */ - void setDuration(const QUrl& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - values << value; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#duration", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#duration. - * The property specifies a positive duration of time. Inspired - * by RFC 2445 sec. 4.8.2.5 - */ - void addDuration(const QUrl& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#duration", QUrl::StrictMode), value); - } - -protected: - virtual QUrl resourceType() const { return QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#UnionOfAlarmEventFreebusyTodo", QUrl::StrictMode); } - -private: - Nepomuk2::SimpleResource* m_res; -}; -} -} - -#endif diff -Nru kdepim-runtime-4.12.3/agents/ontologies/ncal/unionofalarmeventjournaltodo.h kdepim-runtime-4.12.90/agents/ontologies/ncal/unionofalarmeventjournaltodo.h --- kdepim-runtime-4.12.3/agents/ontologies/ncal/unionofalarmeventjournaltodo.h 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/agents/ontologies/ncal/unionofalarmeventjournaltodo.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,243 +0,0 @@ -#ifndef _NCAL_UNIONOFALARMEVENTJOURNALTODO_H_ -#define _NCAL_UNIONOFALARMEVENTJOURNALTODO_H_ - -#include -#include -#include -#include -#include -#include -#include - -#include - -#include "ncal/unionparentclass.h" -namespace Nepomuk2 { -namespace NCAL { -/** - * - */ -class UnionOfAlarmEventJournalTodo : public NCAL::UnionParentClass -{ -public: - UnionOfAlarmEventJournalTodo(Nepomuk2::SimpleResource* res) - : NCAL::UnionParentClass(res), m_res(res) - {} - - virtual ~UnionOfAlarmEventJournalTodo() {} - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#description. - * A more complete description of the calendar component, than - * that provided by the ncal:summary property.Inspired by RFC - * 2445 sec. 4.8.1.5 with following reservations: the LANGUAGE - * parameter has been discarded. Please use xml:lang literals - * to express language. For the ALTREP parameter use the descriptionAltRep - * property. - */ - QStringList descriptions() const { - QStringList value; - foreach(const QVariant& v, m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#description", QUrl::StrictMode))) - value << v.value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#description. - * A more complete description of the calendar component, than - * that provided by the ncal:summary property.Inspired by RFC - * 2445 sec. 4.8.1.5 with following reservations: the LANGUAGE - * parameter has been discarded. Please use xml:lang literals - * to express language. For the ALTREP parameter use the descriptionAltRep - * property. - */ - void setDescriptions(const QStringList& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - foreach(const QString& v, value) - values << v; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#description", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#description. - * A more complete description of the calendar component, than - * that provided by the ncal:summary property.Inspired by RFC - * 2445 sec. 4.8.1.5 with following reservations: the LANGUAGE - * parameter has been discarded. Please use xml:lang literals - * to express language. For the ALTREP parameter use the descriptionAltRep - * property. - */ - void addDescription(const QString& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#description", QUrl::StrictMode), value); - } - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#summaryAltRep. - * Alternate representation of the comment. Introduced to cover - * the ALTREP parameter of the SUMMARY property. See documentation - * of ncal:summary for details. - */ - QList summaryAltReps() const { - QList value; - foreach(const QVariant& v, m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#summaryAltRep", QUrl::StrictMode))) - value << v.value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#summaryAltRep. - * Alternate representation of the comment. Introduced to cover - * the ALTREP parameter of the SUMMARY property. See documentation - * of ncal:summary for details. - */ - void setSummaryAltReps(const QList& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - foreach(const QUrl& v, value) - values << v; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#summaryAltRep", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#summaryAltRep. - * Alternate representation of the comment. Introduced to cover - * the ALTREP parameter of the SUMMARY property. See documentation - * of ncal:summary for details. - */ - void addSummaryAltRep(const QUrl& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#summaryAltRep", QUrl::StrictMode), value); - } - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#attach. - * The property provides the capability to associate a document - * object with a calendar component. Defined in the RFC 2445 sec. - * 4.8.1.1 - */ - QList attachs() const { - QList value; - foreach(const QVariant& v, m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#attach", QUrl::StrictMode))) - value << v.value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#attach. - * The property provides the capability to associate a document - * object with a calendar component. Defined in the RFC 2445 sec. - * 4.8.1.1 - */ - void setAttachs(const QList& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - foreach(const QUrl& v, value) - values << v; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#attach", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#attach. - * The property provides the capability to associate a document - * object with a calendar component. Defined in the RFC 2445 sec. - * 4.8.1.1 - */ - void addAttach(const QUrl& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#attach", QUrl::StrictMode), value); - } - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#summary. - * Defines a short summary or subject for the calendar component. - * Inspired by RFC 2445 sec 4.8.1.12 with the following reservations: - * the LANGUAGE parameter has been discarded. Please use xml:lang - * literals to express language. For the ALTREP parameter use - * the summaryAltRep property. - */ - QStringList summarys() const { - QStringList value; - foreach(const QVariant& v, m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#summary", QUrl::StrictMode))) - value << v.value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#summary. - * Defines a short summary or subject for the calendar component. - * Inspired by RFC 2445 sec 4.8.1.12 with the following reservations: - * the LANGUAGE parameter has been discarded. Please use xml:lang - * literals to express language. For the ALTREP parameter use - * the summaryAltRep property. - */ - void setSummarys(const QStringList& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - foreach(const QString& v, value) - values << v; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#summary", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#summary. - * Defines a short summary or subject for the calendar component. - * Inspired by RFC 2445 sec 4.8.1.12 with the following reservations: - * the LANGUAGE parameter has been discarded. Please use xml:lang - * literals to express language. For the ALTREP parameter use - * the summaryAltRep property. - */ - void addSummary(const QString& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#summary", QUrl::StrictMode), value); - } - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#descriptionAltRep. - * Alternate representation of the calendar entity description. - * Introduced to cover the ALTREP parameter of the DESCRIPTION - * property. See documentation of ncal:description for details. - */ - QList descriptionAltReps() const { - QList value; - foreach(const QVariant& v, m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#descriptionAltRep", QUrl::StrictMode))) - value << v.value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#descriptionAltRep. - * Alternate representation of the calendar entity description. - * Introduced to cover the ALTREP parameter of the DESCRIPTION - * property. See documentation of ncal:description for details. - */ - void setDescriptionAltReps(const QList& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - foreach(const QUrl& v, value) - values << v; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#descriptionAltRep", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#descriptionAltRep. - * Alternate representation of the calendar entity description. - * Introduced to cover the ALTREP parameter of the DESCRIPTION - * property. See documentation of ncal:description for details. - */ - void addDescriptionAltRep(const QUrl& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#descriptionAltRep", QUrl::StrictMode), value); - } - -protected: - virtual QUrl resourceType() const { return QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#UnionOfAlarmEventJournalTodo", QUrl::StrictMode); } - -private: - Nepomuk2::SimpleResource* m_res; -}; -} -} - -#endif diff -Nru kdepim-runtime-4.12.3/agents/ontologies/ncal/unionofalarmeventtodo.h kdepim-runtime-4.12.90/agents/ontologies/ncal/unionofalarmeventtodo.h --- kdepim-runtime-4.12.3/agents/ontologies/ncal/unionofalarmeventtodo.h 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/agents/ontologies/ncal/unionofalarmeventtodo.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,82 +0,0 @@ -#ifndef _NCAL_UNIONOFALARMEVENTTODO_H_ -#define _NCAL_UNIONOFALARMEVENTTODO_H_ - -#include -#include -#include -#include -#include -#include -#include - -#include - -#include "ncal/unionparentclass.h" -namespace Nepomuk2 { -namespace NCAL { -/** - * - */ -class UnionOfAlarmEventTodo : public NCAL::UnionParentClass -{ -public: - UnionOfAlarmEventTodo(Nepomuk2::SimpleResource* res) - : NCAL::UnionParentClass(res), m_res(res) - {} - - virtual ~UnionOfAlarmEventTodo() {} - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#trigger. - * This property specifies when an alarm will trigger. Inspired - * by RFC 2445 sec. 4.8.6.3 Originally the value of this property - * could accept two types : duration and date-time. To express - * this fact a Trigger class has been introduced. It also has a related - * property to account for the RELATED parameter. - */ - QList triggers() const { - QList value; - foreach(const QVariant& v, m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#trigger", QUrl::StrictMode))) - value << v.value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#trigger. - * This property specifies when an alarm will trigger. Inspired - * by RFC 2445 sec. 4.8.6.3 Originally the value of this property - * could accept two types : duration and date-time. To express - * this fact a Trigger class has been introduced. It also has a related - * property to account for the RELATED parameter. - */ - void setTriggers(const QList& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - foreach(const QUrl& v, value) - values << v; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#trigger", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#trigger. - * This property specifies when an alarm will trigger. Inspired - * by RFC 2445 sec. 4.8.6.3 Originally the value of this property - * could accept two types : duration and date-time. To express - * this fact a Trigger class has been introduced. It also has a related - * property to account for the RELATED parameter. - */ - void addTrigger(const QUrl& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#trigger", QUrl::StrictMode), value); - } - -protected: - virtual QUrl resourceType() const { return QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#UnionOfAlarmEventTodo", QUrl::StrictMode); } - -private: - Nepomuk2::SimpleResource* m_res; -}; -} -} - -#endif diff -Nru kdepim-runtime-4.12.3/agents/ontologies/ncal/unionofeventfreebusy.h kdepim-runtime-4.12.90/agents/ontologies/ncal/unionofeventfreebusy.h --- kdepim-runtime-4.12.3/agents/ontologies/ncal/unionofeventfreebusy.h 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/agents/ontologies/ncal/unionofeventfreebusy.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,72 +0,0 @@ -#ifndef _NCAL_UNIONOFEVENTFREEBUSY_H_ -#define _NCAL_UNIONOFEVENTFREEBUSY_H_ - -#include -#include -#include -#include -#include -#include -#include - -#include - -#include "ncal/unionparentclass.h" -namespace Nepomuk2 { -namespace NCAL { -/** - * - */ -class UnionOfEventFreebusy : public NCAL::UnionParentClass -{ -public: - UnionOfEventFreebusy(Nepomuk2::SimpleResource* res) - : NCAL::UnionParentClass(res), m_res(res) - {} - - virtual ~UnionOfEventFreebusy() {} - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#dtend. - * This property specifies the date and time that a calendar component - * ends. Inspired by RFC 2445 sec. 4.8.2.2 - */ - QUrl dtend() const { - QUrl value; - if(m_res->contains(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#dtend", QUrl::StrictMode))) - value = m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#dtend", QUrl::StrictMode)).first().value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#dtend. - * This property specifies the date and time that a calendar component - * ends. Inspired by RFC 2445 sec. 4.8.2.2 - */ - void setDtend(const QUrl& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - values << value; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#dtend", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#dtend. - * This property specifies the date and time that a calendar component - * ends. Inspired by RFC 2445 sec. 4.8.2.2 - */ - void addDtend(const QUrl& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#dtend", QUrl::StrictMode), value); - } - -protected: - virtual QUrl resourceType() const { return QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#UnionOfEventFreebusy", QUrl::StrictMode); } - -private: - Nepomuk2::SimpleResource* m_res; -}; -} -} - -#endif diff -Nru kdepim-runtime-4.12.3/agents/ontologies/ncal/unionofeventfreebusyjournaltodo.h kdepim-runtime-4.12.90/agents/ontologies/ncal/unionofeventfreebusyjournaltodo.h --- kdepim-runtime-4.12.3/agents/ontologies/ncal/unionofeventfreebusyjournaltodo.h 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/agents/ontologies/ncal/unionofeventfreebusyjournaltodo.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,333 +0,0 @@ -#ifndef _NCAL_UNIONOFEVENTFREEBUSYJOURNALTODO_H_ -#define _NCAL_UNIONOFEVENTFREEBUSYJOURNALTODO_H_ - -#include -#include -#include -#include -#include -#include -#include - -#include - -#include "ncal/unionparentclass.h" -namespace Nepomuk2 { -namespace NCAL { -/** - * - */ -class UnionOfEventFreebusyJournalTodo : public NCAL::UnionParentClass -{ -public: - UnionOfEventFreebusyJournalTodo(Nepomuk2::SimpleResource* res) - : NCAL::UnionParentClass(res), m_res(res) - {} - - virtual ~UnionOfEventFreebusyJournalTodo() {} - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#dtstamp. - * The property indicates the date/time that the instance of the - * iCalendar object was created. Inspired by RFC 2445 sec. 4.8.7.1. - * Note that the RFC allows ONLY UTC values for this property. - */ - QDateTime dtstamp() const { - QDateTime value; - if(m_res->contains(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#dtstamp", QUrl::StrictMode))) - value = m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#dtstamp", QUrl::StrictMode)).first().value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#dtstamp. - * The property indicates the date/time that the instance of the - * iCalendar object was created. Inspired by RFC 2445 sec. 4.8.7.1. - * Note that the RFC allows ONLY UTC values for this property. - */ - void setDtstamp(const QDateTime& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - values << value; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#dtstamp", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#dtstamp. - * The property indicates the date/time that the instance of the - * iCalendar object was created. Inspired by RFC 2445 sec. 4.8.7.1. - * Note that the RFC allows ONLY UTC values for this property. - */ - void addDtstamp(const QDateTime& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#dtstamp", QUrl::StrictMode), value); - } - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#requestStatus. - * This property defines the status code returned for a scheduling - * request. Inspired by RFC 2445 sec. 4.8.8.2. Original value - * of this property was a four-element structure. The RequestStatus - * class has been introduced to express it. In RFC 2445 this property - * could have the LANGUAGE parameter. This has been discarded - * in this ontology. Use xml:lang literals to express it if necessary. - */ - QUrl requestStatus() const { - QUrl value; - if(m_res->contains(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#requestStatus", QUrl::StrictMode))) - value = m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#requestStatus", QUrl::StrictMode)).first().value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#requestStatus. - * This property defines the status code returned for a scheduling - * request. Inspired by RFC 2445 sec. 4.8.8.2. Original value - * of this property was a four-element structure. The RequestStatus - * class has been introduced to express it. In RFC 2445 this property - * could have the LANGUAGE parameter. This has been discarded - * in this ontology. Use xml:lang literals to express it if necessary. - */ - void setRequestStatus(const QUrl& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - values << value; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#requestStatus", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#requestStatus. - * This property defines the status code returned for a scheduling - * request. Inspired by RFC 2445 sec. 4.8.8.2. Original value - * of this property was a four-element structure. The RequestStatus - * class has been introduced to express it. In RFC 2445 this property - * could have the LANGUAGE parameter. This has been discarded - * in this ontology. Use xml:lang literals to express it if necessary. - */ - void addRequestStatus(const QUrl& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#requestStatus", QUrl::StrictMode), value); - } - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#contact. - * The property is used to represent contact information or alternately - * a reference to contact information associated with the calendar - * component. Inspired by RFC 2445 sec. 4.8.4.2 with the following - * reservations: the LANGUAGE parameter has been discarded. - * Please use xml:lang literals to express language. For the ALTREP - * parameter use the contactAltRep property.RFC doesn't define - * any format for the string. - */ - QStringList contacts() const { - QStringList value; - foreach(const QVariant& v, m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#contact", QUrl::StrictMode))) - value << v.value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#contact. - * The property is used to represent contact information or alternately - * a reference to contact information associated with the calendar - * component. Inspired by RFC 2445 sec. 4.8.4.2 with the following - * reservations: the LANGUAGE parameter has been discarded. - * Please use xml:lang literals to express language. For the ALTREP - * parameter use the contactAltRep property.RFC doesn't define - * any format for the string. - */ - void setContacts(const QStringList& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - foreach(const QString& v, value) - values << v; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#contact", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#contact. - * The property is used to represent contact information or alternately - * a reference to contact information associated with the calendar - * component. Inspired by RFC 2445 sec. 4.8.4.2 with the following - * reservations: the LANGUAGE parameter has been discarded. - * Please use xml:lang literals to express language. For the ALTREP - * parameter use the contactAltRep property.RFC doesn't define - * any format for the string. - */ - void addContact(const QString& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#contact", QUrl::StrictMode), value); - } - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#organizer. - * The property defines the organizer for a calendar component. - * Inspired by RFC 2445 sec. 4.8.4.3. Originally this property - * accepted many parameters. The Organizer class has been introduced - * to express them all. Note that NCAL is aligned with NCO. The actual - * value (of the CAL-ADDRESS type) is expressed as an instance - * of nco:Contact. Remember that the CN parameter has been removed - * from NCAL. Instead that value should be expressed using nco:fullname - * property of the above mentioned nco:Contact instance. - */ - QList organizers() const { - QList value; - foreach(const QVariant& v, m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#organizer", QUrl::StrictMode))) - value << v.value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#organizer. - * The property defines the organizer for a calendar component. - * Inspired by RFC 2445 sec. 4.8.4.3. Originally this property - * accepted many parameters. The Organizer class has been introduced - * to express them all. Note that NCAL is aligned with NCO. The actual - * value (of the CAL-ADDRESS type) is expressed as an instance - * of nco:Contact. Remember that the CN parameter has been removed - * from NCAL. Instead that value should be expressed using nco:fullname - * property of the above mentioned nco:Contact instance. - */ - void setOrganizers(const QList& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - foreach(const QUrl& v, value) - values << v; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#organizer", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#organizer. - * The property defines the organizer for a calendar component. - * Inspired by RFC 2445 sec. 4.8.4.3. Originally this property - * accepted many parameters. The Organizer class has been introduced - * to express them all. Note that NCAL is aligned with NCO. The actual - * value (of the CAL-ADDRESS type) is expressed as an instance - * of nco:Contact. Remember that the CN parameter has been removed - * from NCAL. Instead that value should be expressed using nco:fullname - * property of the above mentioned nco:Contact instance. - */ - void addOrganizer(const QUrl& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#organizer", QUrl::StrictMode), value); - } - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#url. - * This property defines a Uniform Resource Locator (URL) associated - * with the iCalendar object. Inspired by the RFC 2445 sec. 4.8.4.6. - * Original range had been specified as URI. - */ - QUrl url() const { - QUrl value; - if(m_res->contains(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#url", QUrl::StrictMode))) - value = m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#url", QUrl::StrictMode)).first().value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#url. - * This property defines a Uniform Resource Locator (URL) associated - * with the iCalendar object. Inspired by the RFC 2445 sec. 4.8.4.6. - * Original range had been specified as URI. - */ - void setUrl(const QUrl& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - values << value; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#url", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#url. - * This property defines a Uniform Resource Locator (URL) associated - * with the iCalendar object. Inspired by the RFC 2445 sec. 4.8.4.6. - * Original range had been specified as URI. - */ - void addUrl(const QUrl& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#url", QUrl::StrictMode), value); - } - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#contactAltRep. - * Alternate representation of the contact property. Introduced - * to cover the ALTREP parameter of the CONTACT property. See documentation - * of ncal:contact for details. - */ - QList contactAltReps() const { - QList value; - foreach(const QVariant& v, m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#contactAltRep", QUrl::StrictMode))) - value << v.value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#contactAltRep. - * Alternate representation of the contact property. Introduced - * to cover the ALTREP parameter of the CONTACT property. See documentation - * of ncal:contact for details. - */ - void setContactAltReps(const QList& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - foreach(const QUrl& v, value) - values << v; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#contactAltRep", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#contactAltRep. - * Alternate representation of the contact property. Introduced - * to cover the ALTREP parameter of the CONTACT property. See documentation - * of ncal:contact for details. - */ - void addContactAltRep(const QUrl& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#contactAltRep", QUrl::StrictMode), value); - } - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#uid. - * This property defines the persistent, globally unique identifier - * for the calendar component. Inspired by the RFC 2445 sec 4.8.4.7 - */ - QString uid() const { - QString value; - if(m_res->contains(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#uid", QUrl::StrictMode))) - value = m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#uid", QUrl::StrictMode)).first().value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#uid. - * This property defines the persistent, globally unique identifier - * for the calendar component. Inspired by the RFC 2445 sec 4.8.4.7 - */ - void setUid(const QString& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - values << value; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#uid", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#uid. - * This property defines the persistent, globally unique identifier - * for the calendar component. Inspired by the RFC 2445 sec 4.8.4.7 - */ - void addUid(const QString& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#uid", QUrl::StrictMode), value); - } - -protected: - virtual QUrl resourceType() const { return QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#UnionOfEventFreebusyJournalTodo", QUrl::StrictMode); } - -private: - Nepomuk2::SimpleResource* m_res; -}; -} -} - -#endif diff -Nru kdepim-runtime-4.12.3/agents/ontologies/ncal/unionofeventjournaltimezonetodo.h kdepim-runtime-4.12.90/agents/ontologies/ncal/unionofeventjournaltimezonetodo.h --- kdepim-runtime-4.12.3/agents/ontologies/ncal/unionofeventjournaltimezonetodo.h 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/agents/ontologies/ncal/unionofeventjournaltimezonetodo.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,162 +0,0 @@ -#ifndef _NCAL_UNIONOFEVENTJOURNALTIMEZONETODO_H_ -#define _NCAL_UNIONOFEVENTJOURNALTIMEZONETODO_H_ - -#include -#include -#include -#include -#include -#include -#include - -#include - -#include "ncal/unionparentclass.h" -namespace Nepomuk2 { -namespace NCAL { -/** - * - */ -class UnionOfEventJournalTimezoneTodo : public NCAL::UnionParentClass -{ -public: - UnionOfEventJournalTimezoneTodo(Nepomuk2::SimpleResource* res) - : NCAL::UnionParentClass(res), m_res(res) - {} - - virtual ~UnionOfEventJournalTimezoneTodo() {} - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#recurrenceId. - * This property is used in conjunction with the "UID" and "SEQUENCE" - * property to identify a specific instance of a recurring "VEVENT", - * "VTODO" or "VJOURNAL" calendar component. The property value - * is the effective value of the "DTSTART" property of the recurrence - * instance. Inspired by the RFC 2445 sec. 4.8.4.4 - */ - QUrl recurrenceId() const { - QUrl value; - if(m_res->contains(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#recurrenceId", QUrl::StrictMode))) - value = m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#recurrenceId", QUrl::StrictMode)).first().value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#recurrenceId. - * This property is used in conjunction with the "UID" and "SEQUENCE" - * property to identify a specific instance of a recurring "VEVENT", - * "VTODO" or "VJOURNAL" calendar component. The property value - * is the effective value of the "DTSTART" property of the recurrence - * instance. Inspired by the RFC 2445 sec. 4.8.4.4 - */ - void setRecurrenceId(const QUrl& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - values << value; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#recurrenceId", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#recurrenceId. - * This property is used in conjunction with the "UID" and "SEQUENCE" - * property to identify a specific instance of a recurring "VEVENT", - * "VTODO" or "VJOURNAL" calendar component. The property value - * is the effective value of the "DTSTART" property of the recurrence - * instance. Inspired by the RFC 2445 sec. 4.8.4.4 - */ - void addRecurrenceId(const QUrl& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#recurrenceId", QUrl::StrictMode), value); - } - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#lastModified. - * The property specifies the date and time that the information - * associated with the calendar component was last revised in - * the calendar store. Note: This is analogous to the modification - * date and time for a file in the file system. Inspired by RFC 2445 - * sec. 4.8.7.3. Note that the RFC allows ONLY UTC time values for - * this property. - */ - QDateTime lastModified() const { - QDateTime value; - if(m_res->contains(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#lastModified", QUrl::StrictMode))) - value = m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#lastModified", QUrl::StrictMode)).first().value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#lastModified. - * The property specifies the date and time that the information - * associated with the calendar component was last revised in - * the calendar store. Note: This is analogous to the modification - * date and time for a file in the file system. Inspired by RFC 2445 - * sec. 4.8.7.3. Note that the RFC allows ONLY UTC time values for - * this property. - */ - void setLastModified(const QDateTime& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - values << value; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#lastModified", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#lastModified. - * The property specifies the date and time that the information - * associated with the calendar component was last revised in - * the calendar store. Note: This is analogous to the modification - * date and time for a file in the file system. Inspired by RFC 2445 - * sec. 4.8.7.3. Note that the RFC allows ONLY UTC time values for - * this property. - */ - void addLastModified(const QDateTime& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#lastModified", QUrl::StrictMode), value); - } - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#exdate. - * This property defines the list of date/time exceptions for - * a recurring calendar component. Inspired by RFC 2445 sec. 4.8.5.1 - */ - QList exdates() const { - QList value; - foreach(const QVariant& v, m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#exdate", QUrl::StrictMode))) - value << v.value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#exdate. - * This property defines the list of date/time exceptions for - * a recurring calendar component. Inspired by RFC 2445 sec. 4.8.5.1 - */ - void setExdates(const QList& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - foreach(const QUrl& v, value) - values << v; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#exdate", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#exdate. - * This property defines the list of date/time exceptions for - * a recurring calendar component. Inspired by RFC 2445 sec. 4.8.5.1 - */ - void addExdate(const QUrl& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#exdate", QUrl::StrictMode), value); - } - -protected: - virtual QUrl resourceType() const { return QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#UnionOfEventJournalTimezoneTodo", QUrl::StrictMode); } - -private: - Nepomuk2::SimpleResource* m_res; -}; -} -} - -#endif diff -Nru kdepim-runtime-4.12.3/agents/ontologies/ncal/unionofeventjournaltodo.h kdepim-runtime-4.12.90/agents/ontologies/ncal/unionofeventjournaltodo.h --- kdepim-runtime-4.12.3/agents/ontologies/ncal/unionofeventjournaltodo.h 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/agents/ontologies/ncal/unionofeventjournaltodo.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,449 +0,0 @@ -#ifndef _NCAL_UNIONOFEVENTJOURNALTODO_H_ -#define _NCAL_UNIONOFEVENTJOURNALTODO_H_ - -#include -#include -#include -#include -#include -#include -#include - -#include - -#include "ncal/unionparentclass.h" -namespace Nepomuk2 { -namespace NCAL { -/** - * - */ -class UnionOfEventJournalTodo : public NCAL::UnionParentClass -{ -public: - UnionOfEventJournalTodo(Nepomuk2::SimpleResource* res) - : NCAL::UnionParentClass(res), m_res(res) - {} - - virtual ~UnionOfEventJournalTodo() {} - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#class. - * Defines the access classification for a calendar component. - * Inspired by RFC 2445 sec. 4.8.1.3 with the following reservations: - * this property has limited vocabulary. Possible values are: - * PUBLIC, PRIVATE and CONFIDENTIAL. The default is PUBLIC. Those - * values are expressed as instances of the AccessClassification - * class. The user may create his/her own if necessary. - */ - /*QUrl class() const { - QUrl value; - if(m_res->contains(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#class", QUrl::StrictMode))) - value = m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#class", QUrl::StrictMode)).first().value(); - return value; - }*/ - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#class. - * Defines the access classification for a calendar component. - * Inspired by RFC 2445 sec. 4.8.1.3 with the following reservations: - * this property has limited vocabulary. Possible values are: - * PUBLIC, PRIVATE and CONFIDENTIAL. The default is PUBLIC. Those - * values are expressed as instances of the AccessClassification - * class. The user may create his/her own if necessary. - */ - void setClass(const QUrl& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - values << value; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#class", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#class. - * Defines the access classification for a calendar component. - * Inspired by RFC 2445 sec. 4.8.1.3 with the following reservations: - * this property has limited vocabulary. Possible values are: - * PUBLIC, PRIVATE and CONFIDENTIAL. The default is PUBLIC. Those - * values are expressed as instances of the AccessClassification - * class. The user may create his/her own if necessary. - */ - void addClass(const QUrl& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#class", QUrl::StrictMode), value); - } - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#exrule. - * This property defines a rule or repeating pattern for an exception - * to a recurrence set. Inspired by RFC 2445 sec. 4.8.5.2. - */ - QList exrules() const { - QList value; - foreach(const QVariant& v, m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#exrule", QUrl::StrictMode))) - value << v.value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#exrule. - * This property defines a rule or repeating pattern for an exception - * to a recurrence set. Inspired by RFC 2445 sec. 4.8.5.2. - */ - void setExrules(const QList& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - foreach(const QUrl& v, value) - values << v; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#exrule", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#exrule. - * This property defines a rule or repeating pattern for an exception - * to a recurrence set. Inspired by RFC 2445 sec. 4.8.5.2. - */ - void addExrule(const QUrl& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#exrule", QUrl::StrictMode), value); - } - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#ncalRelation. - * A common superproperty for all types of ncal relations. It is - * not to be used directly. - */ - QStringList ncalRelations() const { - QStringList value; - foreach(const QVariant& v, m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#ncalRelation", QUrl::StrictMode))) - value << v.value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#ncalRelation. - * A common superproperty for all types of ncal relations. It is - * not to be used directly. - */ - void setNcalRelations(const QStringList& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - foreach(const QString& v, value) - values << v; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#ncalRelation", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#ncalRelation. - * A common superproperty for all types of ncal relations. It is - * not to be used directly. - */ - void addNcalRelation(const QString& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#ncalRelation", QUrl::StrictMode), value); - } - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#categories. - * Categories for a calendar component. Inspired by RFC 2445 sec - * 4.8.1.2 with the following reservations: The LANGUAGE parameter - * has been discarded. Please use xml:lang literals to express - * multiple languages. This property can specify multiple comma-separated - * categories. The order of categories doesn't matter. Please - * use a separate triple for each category. - */ - QStringList categorieses() const { - QStringList value; - foreach(const QVariant& v, m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#categories", QUrl::StrictMode))) - value << v.value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#categories. - * Categories for a calendar component. Inspired by RFC 2445 sec - * 4.8.1.2 with the following reservations: The LANGUAGE parameter - * has been discarded. Please use xml:lang literals to express - * multiple languages. This property can specify multiple comma-separated - * categories. The order of categories doesn't matter. Please - * use a separate triple for each category. - */ - void setCategorieses(const QStringList& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - foreach(const QString& v, value) - values << v; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#categories", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#categories. - * Categories for a calendar component. Inspired by RFC 2445 sec - * 4.8.1.2 with the following reservations: The LANGUAGE parameter - * has been discarded. Please use xml:lang literals to express - * multiple languages. This property can specify multiple comma-separated - * categories. The order of categories doesn't matter. Please - * use a separate triple for each category. - */ - void addCategories(const QString& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#categories", QUrl::StrictMode), value); - } - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#created. - * This property specifies the date and time that the calendar - * information was created by the calendar user agent in the calendar - * store. Note: This is analogous to the creation date and time - * for a file in the file system. Inspired by RFC 2445 sec. 4.8.7.1. - * Note that this property is a subproperty of nie:created. The - * domain of nie:created is nie:DataObject. It is not a superclass - * of UnionOf_Vevent_Vjournal_Vtodo, but since that union is - * conceived as an 'abstract' class, and in real-life all resources - * referenced by this property will also be DataObjects, than - * this shouldn't cause too much of a problem. Note that RFC allows - * ONLY UTC time values for this property. - */ - QDateTime created() const { - QDateTime value; - if(m_res->contains(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#created", QUrl::StrictMode))) - value = m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#created", QUrl::StrictMode)).first().value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#created. - * This property specifies the date and time that the calendar - * information was created by the calendar user agent in the calendar - * store. Note: This is analogous to the creation date and time - * for a file in the file system. Inspired by RFC 2445 sec. 4.8.7.1. - * Note that this property is a subproperty of nie:created. The - * domain of nie:created is nie:DataObject. It is not a superclass - * of UnionOf_Vevent_Vjournal_Vtodo, but since that union is - * conceived as an 'abstract' class, and in real-life all resources - * referenced by this property will also be DataObjects, than - * this shouldn't cause too much of a problem. Note that RFC allows - * ONLY UTC time values for this property. - */ - void setCreated(const QDateTime& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - values << value; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#created", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#created. - * This property specifies the date and time that the calendar - * information was created by the calendar user agent in the calendar - * store. Note: This is analogous to the creation date and time - * for a file in the file system. Inspired by RFC 2445 sec. 4.8.7.1. - * Note that this property is a subproperty of nie:created. The - * domain of nie:created is nie:DataObject. It is not a superclass - * of UnionOf_Vevent_Vjournal_Vtodo, but since that union is - * conceived as an 'abstract' class, and in real-life all resources - * referenced by this property will also be DataObjects, than - * this shouldn't cause too much of a problem. Note that RFC allows - * ONLY UTC time values for this property. - */ - void addCreated(const QDateTime& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#created", QUrl::StrictMode), value); - } - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#sequence. - * This property defines the revision sequence number of the calendar - * component within a sequence of revisions. Inspired by RFC 2445 - * sec. 4.8.7.4 - */ - qint64 sequence() const { - qint64 value; - if(m_res->contains(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#sequence", QUrl::StrictMode))) - value = m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#sequence", QUrl::StrictMode)).first().value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#sequence. - * This property defines the revision sequence number of the calendar - * component within a sequence of revisions. Inspired by RFC 2445 - * sec. 4.8.7.4 - */ - void setSequence(const qint64& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - values << value; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#sequence", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#sequence. - * This property defines the revision sequence number of the calendar - * component within a sequence of revisions. Inspired by RFC 2445 - * sec. 4.8.7.4 - */ - void addSequence(const qint64& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#sequence", QUrl::StrictMode), value); - } - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#relatedToChild. - * The property is used to represent a relationship or reference - * between one calendar component and another. Inspired by RFC - * 2445 sec. 4.8.4.5. Originally this property had a RELTYPE parameter. - * It has been decided to introduce three different properties - * to express the values of that parameter. This property expresses - * the RELATED-TO property with RELTYPE=CHILD parameter. - */ - QStringList relatedToChilds() const { - QStringList value; - foreach(const QVariant& v, m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#relatedToChild", QUrl::StrictMode))) - value << v.value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#relatedToChild. - * The property is used to represent a relationship or reference - * between one calendar component and another. Inspired by RFC - * 2445 sec. 4.8.4.5. Originally this property had a RELTYPE parameter. - * It has been decided to introduce three different properties - * to express the values of that parameter. This property expresses - * the RELATED-TO property with RELTYPE=CHILD parameter. - */ - void setRelatedToChilds(const QStringList& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - foreach(const QString& v, value) - values << v; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#relatedToChild", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#relatedToChild. - * The property is used to represent a relationship or reference - * between one calendar component and another. Inspired by RFC - * 2445 sec. 4.8.4.5. Originally this property had a RELTYPE parameter. - * It has been decided to introduce three different properties - * to express the values of that parameter. This property expresses - * the RELATED-TO property with RELTYPE=CHILD parameter. - */ - void addRelatedToChild(const QString& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#relatedToChild", QUrl::StrictMode), value); - } - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#relatedToSibling. - * The property is used to represent a relationship or reference - * between one calendar component and another. Inspired by RFC - * 2445 sec. 4.8.4.5. Originally this property had a RELTYPE parameter. - * It has been decided that it is more natural to introduce three - * different properties to express the values of that parameter. - * This property expresses the RELATED-TO property with RELTYPE=SIBLING - * parameter. - */ - QStringList relatedToSiblings() const { - QStringList value; - foreach(const QVariant& v, m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#relatedToSibling", QUrl::StrictMode))) - value << v.value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#relatedToSibling. - * The property is used to represent a relationship or reference - * between one calendar component and another. Inspired by RFC - * 2445 sec. 4.8.4.5. Originally this property had a RELTYPE parameter. - * It has been decided that it is more natural to introduce three - * different properties to express the values of that parameter. - * This property expresses the RELATED-TO property with RELTYPE=SIBLING - * parameter. - */ - void setRelatedToSiblings(const QStringList& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - foreach(const QString& v, value) - values << v; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#relatedToSibling", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#relatedToSibling. - * The property is used to represent a relationship or reference - * between one calendar component and another. Inspired by RFC - * 2445 sec. 4.8.4.5. Originally this property had a RELTYPE parameter. - * It has been decided that it is more natural to introduce three - * different properties to express the values of that parameter. - * This property expresses the RELATED-TO property with RELTYPE=SIBLING - * parameter. - */ - void addRelatedToSibling(const QString& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#relatedToSibling", QUrl::StrictMode), value); - } - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#relatedToParent. - * The property is used to represent a relationship or reference - * between one calendar component and another. Inspired by RFC - * 2445 sec. 4.8.4.5. Originally this property had a RELTYPE parameter. - * It has been decided that it is more natural to introduce three - * different properties to express the values of that parameter. - * This property expresses the RELATED-TO property with no RELTYPE - * parameter (the default value is PARENT), or with explicit RELTYPE=PARENT - * parameter. - */ - QStringList relatedToParents() const { - QStringList value; - foreach(const QVariant& v, m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#relatedToParent", QUrl::StrictMode))) - value << v.value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#relatedToParent. - * The property is used to represent a relationship or reference - * between one calendar component and another. Inspired by RFC - * 2445 sec. 4.8.4.5. Originally this property had a RELTYPE parameter. - * It has been decided that it is more natural to introduce three - * different properties to express the values of that parameter. - * This property expresses the RELATED-TO property with no RELTYPE - * parameter (the default value is PARENT), or with explicit RELTYPE=PARENT - * parameter. - */ - void setRelatedToParents(const QStringList& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - foreach(const QString& v, value) - values << v; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#relatedToParent", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#relatedToParent. - * The property is used to represent a relationship or reference - * between one calendar component and another. Inspired by RFC - * 2445 sec. 4.8.4.5. Originally this property had a RELTYPE parameter. - * It has been decided that it is more natural to introduce three - * different properties to express the values of that parameter. - * This property expresses the RELATED-TO property with no RELTYPE - * parameter (the default value is PARENT), or with explicit RELTYPE=PARENT - * parameter. - */ - void addRelatedToParent(const QString& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#relatedToParent", QUrl::StrictMode), value); - } - -protected: - virtual QUrl resourceType() const { return QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#UnionOfEventJournalTodo", QUrl::StrictMode); } - -private: - Nepomuk2::SimpleResource* m_res; -}; -} -} - -#endif diff -Nru kdepim-runtime-4.12.3/agents/ontologies/ncal/unionofeventtodo.h kdepim-runtime-4.12.90/agents/ontologies/ncal/unionofeventtodo.h --- kdepim-runtime-4.12.3/agents/ontologies/ncal/unionofeventtodo.h 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/agents/ontologies/ncal/unionofeventtodo.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,319 +0,0 @@ -#ifndef _NCAL_UNIONOFEVENTTODO_H_ -#define _NCAL_UNIONOFEVENTTODO_H_ - -#include -#include -#include -#include -#include -#include -#include - -#include - -#include "ncal/unionparentclass.h" -namespace Nepomuk2 { -namespace NCAL { -/** - * - */ -class UnionOfEventTodo : public NCAL::UnionParentClass -{ -public: - UnionOfEventTodo(Nepomuk2::SimpleResource* res) - : NCAL::UnionParentClass(res), m_res(res) - {} - - virtual ~UnionOfEventTodo() {} - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#hasAlarm. - * Links an event or a todo with a DataObject that can be interpreted - * as an alarm. This property has no direct equivalent in the RFC - * 2445. It has been provided to express this relation. - */ - QList hasAlarms() const { - QList value; - foreach(const QVariant& v, m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#hasAlarm", QUrl::StrictMode))) - value << v.value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#hasAlarm. - * Links an event or a todo with a DataObject that can be interpreted - * as an alarm. This property has no direct equivalent in the RFC - * 2445. It has been provided to express this relation. - */ - void setHasAlarms(const QList& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - foreach(const QUrl& v, value) - values << v; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#hasAlarm", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#hasAlarm. - * Links an event or a todo with a DataObject that can be interpreted - * as an alarm. This property has no direct equivalent in the RFC - * 2445. It has been provided to express this relation. - */ - void addHasAlarm(const QUrl& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#hasAlarm", QUrl::StrictMode), value); - } - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#priority. - * The property defines the relative priority for a calendar component. - * Inspired by RFC 2445 sec. 4.8.1.9 - */ - qint64 priority() const { - qint64 value; - if(m_res->contains(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#priority", QUrl::StrictMode))) - value = m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#priority", QUrl::StrictMode)).first().value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#priority. - * The property defines the relative priority for a calendar component. - * Inspired by RFC 2445 sec. 4.8.1.9 - */ - void setPriority(const qint64& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - values << value; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#priority", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#priority. - * The property defines the relative priority for a calendar component. - * Inspired by RFC 2445 sec. 4.8.1.9 - */ - void addPriority(const qint64& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#priority", QUrl::StrictMode), value); - } - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#geo. - * This property specifies information related to the global - * position for the activity specified by a calendar component. - * Inspired by RFC 2445 sec. 4.8.1.6 - */ - QUrl geo() const { - QUrl value; - if(m_res->contains(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#geo", QUrl::StrictMode))) - value = m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#geo", QUrl::StrictMode)).first().value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#geo. - * This property specifies information related to the global - * position for the activity specified by a calendar component. - * Inspired by RFC 2445 sec. 4.8.1.6 - */ - void setGeo(const QUrl& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - values << value; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#geo", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#geo. - * This property specifies information related to the global - * position for the activity specified by a calendar component. - * Inspired by RFC 2445 sec. 4.8.1.6 - */ - void addGeo(const QUrl& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#geo", QUrl::StrictMode), value); - } - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#locationAltRep. - * Alternate representation of the event or todo location. Introduced - * to cover the ALTREP parameter of the LOCATION property. See - * documentation of ncal:location for details. - */ - QList locationAltReps() const { - QList value; - foreach(const QVariant& v, m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#locationAltRep", QUrl::StrictMode))) - value << v.value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#locationAltRep. - * Alternate representation of the event or todo location. Introduced - * to cover the ALTREP parameter of the LOCATION property. See - * documentation of ncal:location for details. - */ - void setLocationAltReps(const QList& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - foreach(const QUrl& v, value) - values << v; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#locationAltRep", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#locationAltRep. - * Alternate representation of the event or todo location. Introduced - * to cover the ALTREP parameter of the LOCATION property. See - * documentation of ncal:location for details. - */ - void addLocationAltRep(const QUrl& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#locationAltRep", QUrl::StrictMode), value); - } - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#resourcesAltRep. - * Alternate representation of the resources needed for an event - * or todo. Introduced to cover the ALTREP parameter of the resources - * property. See documentation for ncal:resources for details. - */ - QList resourcesAltReps() const { - QList value; - foreach(const QVariant& v, m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#resourcesAltRep", QUrl::StrictMode))) - value << v.value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#resourcesAltRep. - * Alternate representation of the resources needed for an event - * or todo. Introduced to cover the ALTREP parameter of the resources - * property. See documentation for ncal:resources for details. - */ - void setResourcesAltReps(const QList& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - foreach(const QUrl& v, value) - values << v; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#resourcesAltRep", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#resourcesAltRep. - * Alternate representation of the resources needed for an event - * or todo. Introduced to cover the ALTREP parameter of the resources - * property. See documentation for ncal:resources for details. - */ - void addResourcesAltRep(const QUrl& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#resourcesAltRep", QUrl::StrictMode), value); - } - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#resources. - * Defines the equipment or resources anticipated for an activity - * specified by a calendar entity. Inspired by RFC 2445 sec. 4.8.1.10 - * with the following reservations: the LANGUAGE parameter has - * been discarded. Please use xml:lang literals to express language. - * For the ALTREP parameter use the resourcesAltRep property. - * This property specifies multiple resources. The order is not - * important. it is recommended to introduce a separate triple - * for each resource. - */ - QStringList resourceses() const { - QStringList value; - foreach(const QVariant& v, m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#resources", QUrl::StrictMode))) - value << v.value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#resources. - * Defines the equipment or resources anticipated for an activity - * specified by a calendar entity. Inspired by RFC 2445 sec. 4.8.1.10 - * with the following reservations: the LANGUAGE parameter has - * been discarded. Please use xml:lang literals to express language. - * For the ALTREP parameter use the resourcesAltRep property. - * This property specifies multiple resources. The order is not - * important. it is recommended to introduce a separate triple - * for each resource. - */ - void setResourceses(const QStringList& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - foreach(const QString& v, value) - values << v; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#resources", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#resources. - * Defines the equipment or resources anticipated for an activity - * specified by a calendar entity. Inspired by RFC 2445 sec. 4.8.1.10 - * with the following reservations: the LANGUAGE parameter has - * been discarded. Please use xml:lang literals to express language. - * For the ALTREP parameter use the resourcesAltRep property. - * This property specifies multiple resources. The order is not - * important. it is recommended to introduce a separate triple - * for each resource. - */ - void addResources(const QString& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#resources", QUrl::StrictMode), value); - } - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#location. - * Defines the intended venue for the activity defined by a calendar - * component. Inspired by RFC 2445 sec 4.8.1.7 with the following - * reservations: the LANGUAGE parameter has been discarded. - * Please use xml:lang literals to express language. For the ALTREP - * parameter use the locationAltRep property. - */ - QString location() const { - QString value; - if(m_res->contains(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#location", QUrl::StrictMode))) - value = m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#location", QUrl::StrictMode)).first().value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#location. - * Defines the intended venue for the activity defined by a calendar - * component. Inspired by RFC 2445 sec 4.8.1.7 with the following - * reservations: the LANGUAGE parameter has been discarded. - * Please use xml:lang literals to express language. For the ALTREP - * parameter use the locationAltRep property. - */ - void setLocation(const QString& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - values << value; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#location", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#location. - * Defines the intended venue for the activity defined by a calendar - * component. Inspired by RFC 2445 sec 4.8.1.7 with the following - * reservations: the LANGUAGE parameter has been discarded. - * Please use xml:lang literals to express language. For the ALTREP - * parameter use the locationAltRep property. - */ - void addLocation(const QString& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#location", QUrl::StrictMode), value); - } - -protected: - virtual QUrl resourceType() const { return QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#UnionOfEventTodo", QUrl::StrictMode); } - -private: - Nepomuk2::SimpleResource* m_res; -}; -} -} - -#endif diff -Nru kdepim-runtime-4.12.3/agents/ontologies/ncal/unionoftimezoneobservanceeventfreebusyjournaltimezonetodo.h kdepim-runtime-4.12.90/agents/ontologies/ncal/unionoftimezoneobservanceeventfreebusyjournaltimezonetodo.h --- kdepim-runtime-4.12.3/agents/ontologies/ncal/unionoftimezoneobservanceeventfreebusyjournaltimezonetodo.h 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/agents/ontologies/ncal/unionoftimezoneobservanceeventfreebusyjournaltimezonetodo.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,120 +0,0 @@ -#ifndef _NCAL_UNIONOFTIMEZONEOBSERVANCEEVENTFREEBUSYJOURNALTIMEZONETODO_H_ -#define _NCAL_UNIONOFTIMEZONEOBSERVANCEEVENTFREEBUSYJOURNALTIMEZONETODO_H_ - -#include -#include -#include -#include -#include -#include -#include - -#include - -#include "ncal/unionparentclass.h" -namespace Nepomuk2 { -namespace NCAL { -/** - * - */ -class UnionOfTimezoneObservanceEventFreebusyJournalTimezoneTodo : public NCAL::UnionParentClass -{ -public: - UnionOfTimezoneObservanceEventFreebusyJournalTimezoneTodo(Nepomuk2::SimpleResource* res) - : NCAL::UnionParentClass(res), m_res(res) - {} - - virtual ~UnionOfTimezoneObservanceEventFreebusyJournalTimezoneTodo() {} - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#comment. - * Non-processing information intended to provide a comment - * to the calendar user. Inspired by RFC 2445 sec. 4.8.1.4 with - * the following reservations: the LANGUAGE parameter has been - * discarded. Please use xml:lang literals to express language. - * For the ALTREP parameter use the commentAltRep property. - */ - QStringList comments() const { - QStringList value; - foreach(const QVariant& v, m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#comment", QUrl::StrictMode))) - value << v.value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#comment. - * Non-processing information intended to provide a comment - * to the calendar user. Inspired by RFC 2445 sec. 4.8.1.4 with - * the following reservations: the LANGUAGE parameter has been - * discarded. Please use xml:lang literals to express language. - * For the ALTREP parameter use the commentAltRep property. - */ - void setComments(const QStringList& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - foreach(const QString& v, value) - values << v; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#comment", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#comment. - * Non-processing information intended to provide a comment - * to the calendar user. Inspired by RFC 2445 sec. 4.8.1.4 with - * the following reservations: the LANGUAGE parameter has been - * discarded. Please use xml:lang literals to express language. - * For the ALTREP parameter use the commentAltRep property. - */ - void addComment(const QString& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#comment", QUrl::StrictMode), value); - } - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#commentAltRep. - * Alternate representation of the comment. Introduced to cover - * the ALTREP parameter of the COMMENT property. See documentation - * of ncal:comment for details. - */ - QList commentAltReps() const { - QList value; - foreach(const QVariant& v, m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#commentAltRep", QUrl::StrictMode))) - value << v.value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#commentAltRep. - * Alternate representation of the comment. Introduced to cover - * the ALTREP parameter of the COMMENT property. See documentation - * of ncal:comment for details. - */ - void setCommentAltReps(const QList& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - foreach(const QUrl& v, value) - values << v; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#commentAltRep", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#commentAltRep. - * Alternate representation of the comment. Introduced to cover - * the ALTREP parameter of the COMMENT property. See documentation - * of ncal:comment for details. - */ - void addCommentAltRep(const QUrl& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#commentAltRep", QUrl::StrictMode), value); - } - -protected: - virtual QUrl resourceType() const { return QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#UnionOfTimezoneObservanceEventFreebusyJournalTimezoneTodo", QUrl::StrictMode); } - -private: - Nepomuk2::SimpleResource* m_res; -}; -} -} - -#endif diff -Nru kdepim-runtime-4.12.3/agents/ontologies/ncal/unionoftimezoneobservanceeventfreebusytimezonetodo.h kdepim-runtime-4.12.90/agents/ontologies/ncal/unionoftimezoneobservanceeventfreebusytimezonetodo.h --- kdepim-runtime-4.12.3/agents/ontologies/ncal/unionoftimezoneobservanceeventfreebusytimezonetodo.h 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/agents/ontologies/ncal/unionoftimezoneobservanceeventfreebusytimezonetodo.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,72 +0,0 @@ -#ifndef _NCAL_UNIONOFTIMEZONEOBSERVANCEEVENTFREEBUSYTIMEZONETODO_H_ -#define _NCAL_UNIONOFTIMEZONEOBSERVANCEEVENTFREEBUSYTIMEZONETODO_H_ - -#include -#include -#include -#include -#include -#include -#include - -#include - -#include "ncal/unionparentclass.h" -namespace Nepomuk2 { -namespace NCAL { -/** - * - */ -class UnionOfTimezoneObservanceEventFreebusyTimezoneTodo : public NCAL::UnionParentClass -{ -public: - UnionOfTimezoneObservanceEventFreebusyTimezoneTodo(Nepomuk2::SimpleResource* res) - : NCAL::UnionParentClass(res), m_res(res) - {} - - virtual ~UnionOfTimezoneObservanceEventFreebusyTimezoneTodo() {} - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#dtstart. - * This property specifies when the calendar component begins. - * Inspired by RFC 2445 sec. 4.8.2.4 - */ - QUrl dtstart() const { - QUrl value; - if(m_res->contains(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#dtstart", QUrl::StrictMode))) - value = m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#dtstart", QUrl::StrictMode)).first().value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#dtstart. - * This property specifies when the calendar component begins. - * Inspired by RFC 2445 sec. 4.8.2.4 - */ - void setDtstart(const QUrl& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - values << value; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#dtstart", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#dtstart. - * This property specifies when the calendar component begins. - * Inspired by RFC 2445 sec. 4.8.2.4 - */ - void addDtstart(const QUrl& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#dtstart", QUrl::StrictMode), value); - } - -protected: - virtual QUrl resourceType() const { return QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#UnionOfTimezoneObservanceEventFreebusyTimezoneTodo", QUrl::StrictMode); } - -private: - Nepomuk2::SimpleResource* m_res; -}; -} -} - -#endif diff -Nru kdepim-runtime-4.12.3/agents/ontologies/ncal/unionoftimezoneobservanceeventjournaltimezonetodo.h kdepim-runtime-4.12.90/agents/ontologies/ncal/unionoftimezoneobservanceeventjournaltimezonetodo.h --- kdepim-runtime-4.12.3/agents/ontologies/ncal/unionoftimezoneobservanceeventjournaltimezonetodo.h 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/agents/ontologies/ncal/unionoftimezoneobservanceeventjournaltimezonetodo.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,114 +0,0 @@ -#ifndef _NCAL_UNIONOFTIMEZONEOBSERVANCEEVENTJOURNALTIMEZONETODO_H_ -#define _NCAL_UNIONOFTIMEZONEOBSERVANCEEVENTJOURNALTIMEZONETODO_H_ - -#include -#include -#include -#include -#include -#include -#include - -#include - -#include "ncal/unionparentclass.h" -namespace Nepomuk2 { -namespace NCAL { -/** - * - */ -class UnionOfTimezoneObservanceEventJournalTimezoneTodo : public NCAL::UnionParentClass -{ -public: - UnionOfTimezoneObservanceEventJournalTimezoneTodo(Nepomuk2::SimpleResource* res) - : NCAL::UnionParentClass(res), m_res(res) - {} - - virtual ~UnionOfTimezoneObservanceEventJournalTimezoneTodo() {} - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#rdate. - * This property defines the list of date/times for a recurrence - * set. Inspired by RFC 2445 sec. 4.8.5.3. Note that RFC allows - * both DATE, DATE-TIME and PERIOD values for this property. That's - * why the range has been set to NcalTimeEntity. - */ - QList rdates() const { - QList value; - foreach(const QVariant& v, m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#rdate", QUrl::StrictMode))) - value << v.value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#rdate. - * This property defines the list of date/times for a recurrence - * set. Inspired by RFC 2445 sec. 4.8.5.3. Note that RFC allows - * both DATE, DATE-TIME and PERIOD values for this property. That's - * why the range has been set to NcalTimeEntity. - */ - void setRdates(const QList& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - foreach(const QUrl& v, value) - values << v; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#rdate", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#rdate. - * This property defines the list of date/times for a recurrence - * set. Inspired by RFC 2445 sec. 4.8.5.3. Note that RFC allows - * both DATE, DATE-TIME and PERIOD values for this property. That's - * why the range has been set to NcalTimeEntity. - */ - void addRdate(const QUrl& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#rdate", QUrl::StrictMode), value); - } - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#rrule. - * This property defines a rule or repeating pattern for recurring - * events, to-dos, or time zone definitions. sec. 4.8.5.4 - */ - QList rrules() const { - QList value; - foreach(const QVariant& v, m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#rrule", QUrl::StrictMode))) - value << v.value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#rrule. - * This property defines a rule or repeating pattern for recurring - * events, to-dos, or time zone definitions. sec. 4.8.5.4 - */ - void setRrules(const QList& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - foreach(const QUrl& v, value) - values << v; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#rrule", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#rrule. - * This property defines a rule or repeating pattern for recurring - * events, to-dos, or time zone definitions. sec. 4.8.5.4 - */ - void addRrule(const QUrl& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#rrule", QUrl::StrictMode), value); - } - -protected: - virtual QUrl resourceType() const { return QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#UnionOfTimezoneObservanceEventJournalTimezoneTodo", QUrl::StrictMode); } - -private: - Nepomuk2::SimpleResource* m_res; -}; -} -} - -#endif diff -Nru kdepim-runtime-4.12.3/agents/ontologies/ncal/unionparentclass.h kdepim-runtime-4.12.90/agents/ontologies/ncal/unionparentclass.h --- kdepim-runtime-4.12.3/agents/ontologies/ncal/unionparentclass.h 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/agents/ontologies/ncal/unionparentclass.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,37 +0,0 @@ -#ifndef _NCAL_UNIONPARENTCLASS_H_ -#define _NCAL_UNIONPARENTCLASS_H_ - -#include -#include -#include -#include -#include -#include -#include - -#include - -namespace Nepomuk2 { -namespace NCAL { -/** - * - */ -class UnionParentClass -{ -public: - UnionParentClass(Nepomuk2::SimpleResource* res) - : m_res(res) - {} - - virtual ~UnionParentClass() {} - -protected: - virtual QUrl resourceType() const { return QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#UnionParentClass", QUrl::StrictMode); } - -private: - Nepomuk2::SimpleResource* m_res; -}; -} -} - -#endif diff -Nru kdepim-runtime-4.12.3/agents/ontologies/ncal/weekday.h kdepim-runtime-4.12.90/agents/ontologies/ncal/weekday.h --- kdepim-runtime-4.12.3/agents/ontologies/ncal/weekday.h 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/agents/ontologies/ncal/weekday.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,39 +0,0 @@ -#ifndef _NCAL_WEEKDAY_H_ -#define _NCAL_WEEKDAY_H_ - -#include -#include -#include -#include -#include -#include -#include - -#include - -namespace Nepomuk2 { -namespace NCAL { -/** - * Day of the week. This class has been created to provide the limited - * vocabulary for ncal:byday property. See the documentation - * for ncal:byday for details. - */ -class Weekday -{ -public: - Weekday(Nepomuk2::SimpleResource* res) - : m_res(res) - {} - - virtual ~Weekday() {} - -protected: - virtual QUrl resourceType() const { return QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#Weekday", QUrl::StrictMode); } - -private: - Nepomuk2::SimpleResource* m_res; -}; -} -} - -#endif diff -Nru kdepim-runtime-4.12.3/agents/ontologies/nco/affiliation.h kdepim-runtime-4.12.90/agents/ontologies/nco/affiliation.h --- kdepim-runtime-4.12.3/agents/ontologies/nco/affiliation.h 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/agents/ontologies/nco/affiliation.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,197 +0,0 @@ -#ifndef _NCO_AFFILIATION_H_ -#define _NCO_AFFILIATION_H_ - -#include -#include -#include -#include -#include -#include -#include - -#include - -#include "nco/role.h" -namespace Nepomuk2 { -namespace NCO { -/** - * Aggregates three properties defined in RFC2426. Originally - * all three were attached directly to a person. One person could - * have only one title and one role within one organization. This - * class is intended to lift this limitation. - */ -class Affiliation : public NCO::Role -{ -public: - Affiliation(Nepomuk2::SimpleResource* res) - : NCO::Role(res), m_res(res) - {} - - virtual ~Affiliation() {} - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/03/22/nco#org. - * Name of an organization or a unit within an organization the - * object represented by a Contact is associated with. An equivalent - * of the 'ORG' property defined in RFC 2426 Sec. 3.5.5 - */ - QUrl org() const { - QUrl value; - if(m_res->contains(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nco#org", QUrl::StrictMode))) - value = m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nco#org", QUrl::StrictMode)).first().value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/03/22/nco#org. - * Name of an organization or a unit within an organization the - * object represented by a Contact is associated with. An equivalent - * of the 'ORG' property defined in RFC 2426 Sec. 3.5.5 - */ - void setOrg(const QUrl& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - values << value; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nco#org", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/03/22/nco#org. - * Name of an organization or a unit within an organization the - * object represented by a Contact is associated with. An equivalent - * of the 'ORG' property defined in RFC 2426 Sec. 3.5.5 - */ - void addOrg(const QUrl& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nco#org", QUrl::StrictMode), value); - } - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/03/22/nco#department. - * Department. The organizational unit within the organization. - */ - QStringList departments() const { - QStringList value; - foreach(const QVariant& v, m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nco#department", QUrl::StrictMode))) - value << v.value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/03/22/nco#department. - * Department. The organizational unit within the organization. - */ - void setDepartments(const QStringList& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - foreach(const QString& v, value) - values << v; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nco#department", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/03/22/nco#department. - * Department. The organizational unit within the organization. - */ - void addDepartment(const QString& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nco#department", QUrl::StrictMode), value); - } - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/03/22/nco#title. - * The official title the object represented by this contact in - * an organization. E.g. 'CEO', 'Director, Research and Development', - * 'Junior Software Developer/Analyst' etc. An equivalent of - * the 'TITLE' property defined in RFC 2426 Sec. 3.5.1 - */ - QString title() const { - QString value; - if(m_res->contains(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nco#title", QUrl::StrictMode))) - value = m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nco#title", QUrl::StrictMode)).first().value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/03/22/nco#title. - * The official title the object represented by this contact in - * an organization. E.g. 'CEO', 'Director, Research and Development', - * 'Junior Software Developer/Analyst' etc. An equivalent of - * the 'TITLE' property defined in RFC 2426 Sec. 3.5.1 - */ - void setTitle(const QString& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - values << value; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nco#title", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/03/22/nco#title. - * The official title the object represented by this contact in - * an organization. E.g. 'CEO', 'Director, Research and Development', - * 'Junior Software Developer/Analyst' etc. An equivalent of - * the 'TITLE' property defined in RFC 2426 Sec. 3.5.1 - */ - void addTitle(const QString& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nco#title", QUrl::StrictMode), value); - } - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/03/22/nco#role. - * Role an object represented by this contact represents in the - * organization. This might include 'Programmer', 'Manager', - * 'Sales Representative'. Be careful to avoid confusion with - * the title property. An equivalent of the 'ROLE' property as - * defined in RFC 2426. Sec. 3.5.2. Note the difference between - * nco:Role class and nco:role property. - */ - QStringList roles() const { - QStringList value; - foreach(const QVariant& v, m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nco#role", QUrl::StrictMode))) - value << v.value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/03/22/nco#role. - * Role an object represented by this contact represents in the - * organization. This might include 'Programmer', 'Manager', - * 'Sales Representative'. Be careful to avoid confusion with - * the title property. An equivalent of the 'ROLE' property as - * defined in RFC 2426. Sec. 3.5.2. Note the difference between - * nco:Role class and nco:role property. - */ - void setRoles(const QStringList& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - foreach(const QString& v, value) - values << v; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nco#role", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/03/22/nco#role. - * Role an object represented by this contact represents in the - * organization. This might include 'Programmer', 'Manager', - * 'Sales Representative'. Be careful to avoid confusion with - * the title property. An equivalent of the 'ROLE' property as - * defined in RFC 2426. Sec. 3.5.2. Note the difference between - * nco:Role class and nco:role property. - */ - void addRole(const QString& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nco#role", QUrl::StrictMode), value); - } - -protected: - virtual QUrl resourceType() const { return QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nco#Affiliation", QUrl::StrictMode); } - -private: - Nepomuk2::SimpleResource* m_res; -}; -} -} - -#endif diff -Nru kdepim-runtime-4.12.3/agents/ontologies/nco/audioimaccount.h kdepim-runtime-4.12.90/agents/ontologies/nco/audioimaccount.h --- kdepim-runtime-4.12.3/agents/ontologies/nco/audioimaccount.h 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/agents/ontologies/nco/audioimaccount.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,38 +0,0 @@ -#ifndef _NCO_AUDIOIMACCOUNT_H_ -#define _NCO_AUDIOIMACCOUNT_H_ - -#include -#include -#include -#include -#include -#include -#include - -#include - -#include "nco/imaccount.h" -namespace Nepomuk2 { -namespace NCO { -/** - * Deprecated in favour of nco:imCapabilityAudio. - */ -class AudioIMAccount : public NCO::IMAccount -{ -public: - AudioIMAccount(Nepomuk2::SimpleResource* res) - : NCO::IMAccount(res), m_res(res) - {} - - virtual ~AudioIMAccount() {} - -protected: - virtual QUrl resourceType() const { return QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nco#AudioIMAccount", QUrl::StrictMode); } - -private: - Nepomuk2::SimpleResource* m_res; -}; -} -} - -#endif diff -Nru kdepim-runtime-4.12.3/agents/ontologies/nco/bbsnumber.h kdepim-runtime-4.12.90/agents/ontologies/nco/bbsnumber.h --- kdepim-runtime-4.12.3/agents/ontologies/nco/bbsnumber.h 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/agents/ontologies/nco/bbsnumber.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,40 +0,0 @@ -#ifndef _NCO_BBSNUMBER_H_ -#define _NCO_BBSNUMBER_H_ - -#include -#include -#include -#include -#include -#include -#include - -#include - -#include "nco/modemnumber.h" -namespace Nepomuk2 { -namespace NCO { -/** - * A Bulletin Board System (BBS) phone number. Inspired by the - * (TYPE=bbsl) parameter of the TEL property as defined in RFC - * 2426 sec 3.3.1. - */ -class BbsNumber : public NCO::ModemNumber -{ -public: - BbsNumber(Nepomuk2::SimpleResource* res) - : NCO::ModemNumber(res), m_res(res) - {} - - virtual ~BbsNumber() {} - -protected: - virtual QUrl resourceType() const { return QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nco#BbsNumber", QUrl::StrictMode); } - -private: - Nepomuk2::SimpleResource* m_res; -}; -} -} - -#endif diff -Nru kdepim-runtime-4.12.3/agents/ontologies/nco/carphonenumber.h kdepim-runtime-4.12.90/agents/ontologies/nco/carphonenumber.h --- kdepim-runtime-4.12.3/agents/ontologies/nco/carphonenumber.h 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/agents/ontologies/nco/carphonenumber.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,39 +0,0 @@ -#ifndef _NCO_CARPHONENUMBER_H_ -#define _NCO_CARPHONENUMBER_H_ - -#include -#include -#include -#include -#include -#include -#include - -#include - -#include "nco/voicephonenumber.h" -namespace Nepomuk2 { -namespace NCO { -/** - * A car phone number. Inspired by the (TYPE=car) parameter of - * the TEL property as defined in RFC 2426 sec 3.3.1. - */ -class CarPhoneNumber : public NCO::VoicePhoneNumber -{ -public: - CarPhoneNumber(Nepomuk2::SimpleResource* res) - : NCO::VoicePhoneNumber(res), m_res(res) - {} - - virtual ~CarPhoneNumber() {} - -protected: - virtual QUrl resourceType() const { return QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nco#CarPhoneNumber", QUrl::StrictMode); } - -private: - Nepomuk2::SimpleResource* m_res; -}; -} -} - -#endif diff -Nru kdepim-runtime-4.12.3/agents/ontologies/nco/cellphonenumber.h kdepim-runtime-4.12.90/agents/ontologies/nco/cellphonenumber.h --- kdepim-runtime-4.12.3/agents/ontologies/nco/cellphonenumber.h 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/agents/ontologies/nco/cellphonenumber.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,42 +0,0 @@ -#ifndef _NCO_CELLPHONENUMBER_H_ -#define _NCO_CELLPHONENUMBER_H_ - -#include -#include -#include -#include -#include -#include -#include - -#include - -#include "nco/voicephonenumber.h" -#include "nco/messagingnumber.h" -namespace Nepomuk2 { -namespace NCO { -/** - * A cellular phone number. Inspired by the (TYPE=cell) parameter - * of the TEL property as defined in RFC 2426 sec 3.3.1. Usually - * a cellular phone can accept voice calls as well as textual messages - * (SMS), therefore this class has two superclasses. - */ -class CellPhoneNumber : public NCO::VoicePhoneNumber, public NCO::MessagingNumber -{ -public: - CellPhoneNumber(Nepomuk2::SimpleResource* res) - : NCO::VoicePhoneNumber(res), NCO::MessagingNumber(res), m_res(res) - {} - - virtual ~CellPhoneNumber() {} - -protected: - virtual QUrl resourceType() const { return QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nco#CellPhoneNumber", QUrl::StrictMode); } - -private: - Nepomuk2::SimpleResource* m_res; -}; -} -} - -#endif diff -Nru kdepim-runtime-4.12.3/agents/ontologies/nco/contactgroup.h kdepim-runtime-4.12.90/agents/ontologies/nco/contactgroup.h --- kdepim-runtime-4.12.3/agents/ontologies/nco/contactgroup.h 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/agents/ontologies/nco/contactgroup.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,76 +0,0 @@ -#ifndef _NCO_CONTACTGROUP_H_ -#define _NCO_CONTACTGROUP_H_ - -#include -#include -#include -#include -#include -#include -#include - -#include - -namespace Nepomuk2 { -namespace NCO { -/** - * A group of Contacts. Could be used to express a group in an addressbook - * or on a contact list of an IM application. One contact can belong - * to many groups. - */ -class ContactGroup -{ -public: - ContactGroup(Nepomuk2::SimpleResource* res) - : m_res(res) - {} - - virtual ~ContactGroup() {} - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/03/22/nco#contactGroupName. - * The name of the contact group. This property was NOT defined - * in the VCARD standard. See documentation of the 'ContactGroup' - * class for details - */ - QString contactGroupName() const { - QString value; - if(m_res->contains(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nco#contactGroupName", QUrl::StrictMode))) - value = m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nco#contactGroupName", QUrl::StrictMode)).first().value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/03/22/nco#contactGroupName. - * The name of the contact group. This property was NOT defined - * in the VCARD standard. See documentation of the 'ContactGroup' - * class for details - */ - void setContactGroupName(const QString& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - values << value; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nco#contactGroupName", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/03/22/nco#contactGroupName. - * The name of the contact group. This property was NOT defined - * in the VCARD standard. See documentation of the 'ContactGroup' - * class for details - */ - void addContactGroupName(const QString& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nco#contactGroupName", QUrl::StrictMode), value); - } - -protected: - virtual QUrl resourceType() const { return QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nco#ContactGroup", QUrl::StrictMode); } - -private: - Nepomuk2::SimpleResource* m_res; -}; -} -} - -#endif diff -Nru kdepim-runtime-4.12.3/agents/ontologies/nco/contact.h kdepim-runtime-4.12.90/agents/ontologies/nco/contact.h --- kdepim-runtime-4.12.3/agents/ontologies/nco/contact.h 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/agents/ontologies/nco/contact.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,444 +0,0 @@ -#ifndef _NCO_CONTACT_H_ -#define _NCO_CONTACT_H_ - -#include -#include -#include -#include -#include -#include -#include - -#include - -#include "nco/role.h" -namespace Nepomuk2 { -namespace NCO { -/** - * A Contact. A piece of data that can provide means to identify - * or communicate with an entity. - */ -class Contact : public NCO::Role -{ -public: - Contact(Nepomuk2::SimpleResource* res) - : NCO::Role(res), m_res(res) - {} - - virtual ~Contact() {} - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/03/22/nco#representative. - * An object that represent an object represented by this Contact. - * Usually this property is used to link a Contact to an organization, - * to a contact to the representative of this organization the - * user directly interacts with. An equivalent for the 'AGENT' - * property defined in RFC 2426 Sec. 3.5.4 - */ - QList representatives() const { - QList value; - foreach(const QVariant& v, m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nco#representative", QUrl::StrictMode))) - value << v.value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/03/22/nco#representative. - * An object that represent an object represented by this Contact. - * Usually this property is used to link a Contact to an organization, - * to a contact to the representative of this organization the - * user directly interacts with. An equivalent for the 'AGENT' - * property defined in RFC 2426 Sec. 3.5.4 - */ - void setRepresentatives(const QList& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - foreach(const QUrl& v, value) - values << v; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nco#representative", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/03/22/nco#representative. - * An object that represent an object represented by this Contact. - * Usually this property is used to link a Contact to an organization, - * to a contact to the representative of this organization the - * user directly interacts with. An equivalent for the 'AGENT' - * property defined in RFC 2426 Sec. 3.5.4 - */ - void addRepresentative(const QUrl& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nco#representative", QUrl::StrictMode), value); - } - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/03/22/nco#sound. - * Sound clip attached to a Contact. The DataObject referred to - * by this property is usually interpreted as an nfo:Audio. Inspired - * by the SOUND property defined in RFC 2425 sec. 3.6.6. - */ - QList sounds() const { - QList value; - foreach(const QVariant& v, m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nco#sound", QUrl::StrictMode))) - value << v.value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/03/22/nco#sound. - * Sound clip attached to a Contact. The DataObject referred to - * by this property is usually interpreted as an nfo:Audio. Inspired - * by the SOUND property defined in RFC 2425 sec. 3.6.6. - */ - void setSounds(const QList& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - foreach(const QUrl& v, value) - values << v; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nco#sound", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/03/22/nco#sound. - * Sound clip attached to a Contact. The DataObject referred to - * by this property is usually interpreted as an nfo:Audio. Inspired - * by the SOUND property defined in RFC 2425 sec. 3.6.6. - */ - void addSound(const QUrl& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nco#sound", QUrl::StrictMode), value); - } - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/03/22/nco#birthDate. - * Birth date of the object represented by this Contact. An equivalent - * of the 'BDAY' property as defined in RFC 2426 Sec. 3.1.5. - */ - QDate birthDate() const { - QDate value; - if(m_res->contains(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nco#birthDate", QUrl::StrictMode))) - value = m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nco#birthDate", QUrl::StrictMode)).first().value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/03/22/nco#birthDate. - * Birth date of the object represented by this Contact. An equivalent - * of the 'BDAY' property as defined in RFC 2426 Sec. 3.1.5. - */ - void setBirthDate(const QDate& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - values << value; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nco#birthDate", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/03/22/nco#birthDate. - * Birth date of the object represented by this Contact. An equivalent - * of the 'BDAY' property as defined in RFC 2426 Sec. 3.1.5. - */ - void addBirthDate(const QDate& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nco#birthDate", QUrl::StrictMode), value); - } - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/03/22/nco#photo. - * Photograph attached to a Contact. The DataObject referred - * to by this property is usually interpreted as an nfo:Image. - * Inspired by the PHOTO property defined in RFC 2426 sec. 3.1.4 - */ - QList photos() const { - QList value; - foreach(const QVariant& v, m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nco#photo", QUrl::StrictMode))) - value << v.value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/03/22/nco#photo. - * Photograph attached to a Contact. The DataObject referred - * to by this property is usually interpreted as an nfo:Image. - * Inspired by the PHOTO property defined in RFC 2426 sec. 3.1.4 - */ - void setPhotos(const QList& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - foreach(const QUrl& v, value) - values << v; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nco#photo", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/03/22/nco#photo. - * Photograph attached to a Contact. The DataObject referred - * to by this property is usually interpreted as an nfo:Image. - * Inspired by the PHOTO property defined in RFC 2426 sec. 3.1.4 - */ - void addPhoto(const QUrl& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nco#photo", QUrl::StrictMode), value); - } - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/03/22/nco#key. - * An encryption key attached to a contact. Inspired by the KEY - * property defined in RFC 2426 sec. 3.7.2 - */ - QList keys() const { - QList value; - foreach(const QVariant& v, m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nco#key", QUrl::StrictMode))) - value << v.value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/03/22/nco#key. - * An encryption key attached to a contact. Inspired by the KEY - * property defined in RFC 2426 sec. 3.7.2 - */ - void setKeys(const QList& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - foreach(const QUrl& v, value) - values << v; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nco#key", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/03/22/nco#key. - * An encryption key attached to a contact. Inspired by the KEY - * property defined in RFC 2426 sec. 3.7.2 - */ - void addKey(const QUrl& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nco#key", QUrl::StrictMode), value); - } - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/03/22/nco#hasLocation. - * Geographical location of the contact. Inspired by the 'GEO' - * property specified in RFC 2426 Sec. 3.4.2 - */ - QUrl hasLocation() const { - QUrl value; - if(m_res->contains(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nco#hasLocation", QUrl::StrictMode))) - value = m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nco#hasLocation", QUrl::StrictMode)).first().value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/03/22/nco#hasLocation. - * Geographical location of the contact. Inspired by the 'GEO' - * property specified in RFC 2426 Sec. 3.4.2 - */ - void setHasLocation(const QUrl& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - values << value; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nco#hasLocation", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/03/22/nco#hasLocation. - * Geographical location of the contact. Inspired by the 'GEO' - * property specified in RFC 2426 Sec. 3.4.2 - */ - void addHasLocation(const QUrl& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nco#hasLocation", QUrl::StrictMode), value); - } - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/03/22/nco#belongsToGroup. - * Links a Contact with a ContactGroup it belongs to. - */ - QList belongsToGroups() const { - QList value; - foreach(const QVariant& v, m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nco#belongsToGroup", QUrl::StrictMode))) - value << v.value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/03/22/nco#belongsToGroup. - * Links a Contact with a ContactGroup it belongs to. - */ - void setBelongsToGroups(const QList& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - foreach(const QUrl& v, value) - values << v; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nco#belongsToGroup", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/03/22/nco#belongsToGroup. - * Links a Contact with a ContactGroup it belongs to. - */ - void addBelongsToGroup(const QUrl& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nco#belongsToGroup", QUrl::StrictMode), value); - } - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/03/22/nco#note. - * A note about the object represented by this Contact. An equivalent - * for the 'NOTE' property defined in RFC 2426 Sec. 3.6.2 - */ - QStringList notes() const { - QStringList value; - foreach(const QVariant& v, m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nco#note", QUrl::StrictMode))) - value << v.value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/03/22/nco#note. - * A note about the object represented by this Contact. An equivalent - * for the 'NOTE' property defined in RFC 2426 Sec. 3.6.2 - */ - void setNotes(const QStringList& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - foreach(const QString& v, value) - values << v; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nco#note", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/03/22/nco#note. - * A note about the object represented by this Contact. An equivalent - * for the 'NOTE' property defined in RFC 2426 Sec. 3.6.2 - */ - void addNote(const QString& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nco#note", QUrl::StrictMode), value); - } - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/03/22/nco#nickname. - * A nickname of the Object represented by this Contact. This is - * an equivalent of the 'NICKNAME' property as defined in RFC 2426 - * Sec. 3.1.3. - */ - QStringList nicknames() const { - QStringList value; - foreach(const QVariant& v, m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nco#nickname", QUrl::StrictMode))) - value << v.value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/03/22/nco#nickname. - * A nickname of the Object represented by this Contact. This is - * an equivalent of the 'NICKNAME' property as defined in RFC 2426 - * Sec. 3.1.3. - */ - void setNicknames(const QStringList& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - foreach(const QString& v, value) - values << v; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nco#nickname", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/03/22/nco#nickname. - * A nickname of the Object represented by this Contact. This is - * an equivalent of the 'NICKNAME' property as defined in RFC 2426 - * Sec. 3.1.3. - */ - void addNickname(const QString& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nco#nickname", QUrl::StrictMode), value); - } - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/03/22/nco#fullname. - * To specify the formatted text corresponding to the name of the - * object the Contact represents. An equivalent of the FN property - * as defined in RFC 2426 Sec. 3.1.1. - */ - QString fullname() const { - QString value; - if(m_res->contains(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nco#fullname", QUrl::StrictMode))) - value = m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nco#fullname", QUrl::StrictMode)).first().value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/03/22/nco#fullname. - * To specify the formatted text corresponding to the name of the - * object the Contact represents. An equivalent of the FN property - * as defined in RFC 2426 Sec. 3.1.1. - */ - void setFullname(const QString& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - values << value; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nco#fullname", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/03/22/nco#fullname. - * To specify the formatted text corresponding to the name of the - * object the Contact represents. An equivalent of the FN property - * as defined in RFC 2426 Sec. 3.1.1. - */ - void addFullname(const QString& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nco#fullname", QUrl::StrictMode), value); - } - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/03/22/nco#contactUID. - * A value that represents a globally unique identifier corresponding - * to the individual or resource associated with the Contact. - * An equivalent of the 'UID' property defined in RFC 2426 Sec. - * 3.6.7 - */ - QString contactUID() const { - QString value; - if(m_res->contains(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nco#contactUID", QUrl::StrictMode))) - value = m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nco#contactUID", QUrl::StrictMode)).first().value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/03/22/nco#contactUID. - * A value that represents a globally unique identifier corresponding - * to the individual or resource associated with the Contact. - * An equivalent of the 'UID' property defined in RFC 2426 Sec. - * 3.6.7 - */ - void setContactUID(const QString& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - values << value; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nco#contactUID", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/03/22/nco#contactUID. - * A value that represents a globally unique identifier corresponding - * to the individual or resource associated with the Contact. - * An equivalent of the 'UID' property defined in RFC 2426 Sec. - * 3.6.7 - */ - void addContactUID(const QString& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nco#contactUID", QUrl::StrictMode), value); - } - -protected: - virtual QUrl resourceType() const { return QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nco#Contact", QUrl::StrictMode); } - -private: - Nepomuk2::SimpleResource* m_res; -}; -} -} - -#endif diff -Nru kdepim-runtime-4.12.3/agents/ontologies/nco/contactlistdataobject.h kdepim-runtime-4.12.90/agents/ontologies/nco/contactlistdataobject.h --- kdepim-runtime-4.12.3/agents/ontologies/nco/contactlistdataobject.h 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/agents/ontologies/nco/contactlistdataobject.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,38 +0,0 @@ -#ifndef _NCO_CONTACTLISTDATAOBJECT_H_ -#define _NCO_CONTACTLISTDATAOBJECT_H_ - -#include -#include -#include -#include -#include -#include -#include - -#include - -namespace Nepomuk2 { -namespace NCO { -/** - * An entity occuring on a contact list (usually interpreted as - * an nco:Contact) - */ -class ContactListDataObject -{ -public: - ContactListDataObject(Nepomuk2::SimpleResource* res) - : m_res(res) - {} - - virtual ~ContactListDataObject() {} - -protected: - virtual QUrl resourceType() const { return QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nco#ContactListDataObject", QUrl::StrictMode); } - -private: - Nepomuk2::SimpleResource* m_res; -}; -} -} - -#endif diff -Nru kdepim-runtime-4.12.3/agents/ontologies/nco/contactlist.h kdepim-runtime-4.12.90/agents/ontologies/nco/contactlist.h --- kdepim-runtime-4.12.3/agents/ontologies/nco/contactlist.h 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/agents/ontologies/nco/contactlist.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,77 +0,0 @@ -#ifndef _NCO_CONTACTLIST_H_ -#define _NCO_CONTACTLIST_H_ - -#include -#include -#include -#include -#include -#include -#include - -#include - -namespace Nepomuk2 { -namespace NCO { -/** - * A contact list, this class represents an addressbook or a contact - * list of an IM application. Contacts inside a contact list can - * belong to contact groups. - */ -class ContactList -{ -public: - ContactList(Nepomuk2::SimpleResource* res) - : m_res(res) - {} - - virtual ~ContactList() {} - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/03/22/nco#containsContact. - * A property used to group contacts into contact groups. This - * property was NOT defined in the VCARD standard. See documentation - * for the 'ContactList' class for details - */ - QList containsContacts() const { - QList value; - foreach(const QVariant& v, m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nco#containsContact", QUrl::StrictMode))) - value << v.value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/03/22/nco#containsContact. - * A property used to group contacts into contact groups. This - * property was NOT defined in the VCARD standard. See documentation - * for the 'ContactList' class for details - */ - void setContainsContacts(const QList& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - foreach(const QUrl& v, value) - values << v; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nco#containsContact", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/03/22/nco#containsContact. - * A property used to group contacts into contact groups. This - * property was NOT defined in the VCARD standard. See documentation - * for the 'ContactList' class for details - */ - void addContainsContact(const QUrl& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nco#containsContact", QUrl::StrictMode), value); - } - -protected: - virtual QUrl resourceType() const { return QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nco#ContactList", QUrl::StrictMode); } - -private: - Nepomuk2::SimpleResource* m_res; -}; -} -} - -#endif diff -Nru kdepim-runtime-4.12.3/agents/ontologies/nco/contactmedium.h kdepim-runtime-4.12.90/agents/ontologies/nco/contactmedium.h --- kdepim-runtime-4.12.3/agents/ontologies/nco/contactmedium.h 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/agents/ontologies/nco/contactmedium.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,83 +0,0 @@ -#ifndef _NCO_CONTACTMEDIUM_H_ -#define _NCO_CONTACTMEDIUM_H_ - -#include -#include -#include -#include -#include -#include -#include - -#include - -namespace Nepomuk2 { -namespace NCO { -/** - * A superclass for all contact media - ways to contact an entity - * represented by a Contact instance. Some of the subclasses of - * this class (the various kinds of telephone numbers and postal - * addresses) have been inspired by the values of the TYPE parameter - * of ADR and TEL properties defined in RFC 2426 sec. 3.2.1. and - * 3.3.1 respectively. Each value is represented by an appropriate - * subclass with two major exceptions TYPE=home and TYPE=work. - * They are to be expressed by the roles these contact media are - * attached to i.e. contact media with TYPE=home parameter are - * to be attached to the default role (nco:Contact or nco:PersonContact), - * whereas media with TYPE=work parameter should be attached - * to nco:Affiliation or nco:OrganizationContact. - */ -class ContactMedium -{ -public: - ContactMedium(Nepomuk2::SimpleResource* res) - : m_res(res) - {} - - virtual ~ContactMedium() {} - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/03/22/nco#contactMediumComment. - * A comment about the contact medium. (Deprecated in favor of - * nie:comment or nao:description - based on the context) - */ - QStringList contactMediumComments() const { - QStringList value; - foreach(const QVariant& v, m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nco#contactMediumComment", QUrl::StrictMode))) - value << v.value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/03/22/nco#contactMediumComment. - * A comment about the contact medium. (Deprecated in favor of - * nie:comment or nao:description - based on the context) - */ - void setContactMediumComments(const QStringList& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - foreach(const QString& v, value) - values << v; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nco#contactMediumComment", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/03/22/nco#contactMediumComment. - * A comment about the contact medium. (Deprecated in favor of - * nie:comment or nao:description - based on the context) - */ - void addContactMediumComment(const QString& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nco#contactMediumComment", QUrl::StrictMode), value); - } - -protected: - virtual QUrl resourceType() const { return QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nco#ContactMedium", QUrl::StrictMode); } - -private: - Nepomuk2::SimpleResource* m_res; -}; -} -} - -#endif diff -Nru kdepim-runtime-4.12.3/agents/ontologies/nco/domesticdeliveryaddress.h kdepim-runtime-4.12.90/agents/ontologies/nco/domesticdeliveryaddress.h --- kdepim-runtime-4.12.3/agents/ontologies/nco/domesticdeliveryaddress.h 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/agents/ontologies/nco/domesticdeliveryaddress.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,39 +0,0 @@ -#ifndef _NCO_DOMESTICDELIVERYADDRESS_H_ -#define _NCO_DOMESTICDELIVERYADDRESS_H_ - -#include -#include -#include -#include -#include -#include -#include - -#include - -#include "nco/postaladdress.h" -namespace Nepomuk2 { -namespace NCO { -/** - * Domestic Delivery Addresse. Class inspired by TYPE=dom parameter - * of the ADR property defined in RFC 2426 sec. 3.2.1 - */ -class DomesticDeliveryAddress : public NCO::PostalAddress -{ -public: - DomesticDeliveryAddress(Nepomuk2::SimpleResource* res) - : NCO::PostalAddress(res), m_res(res) - {} - - virtual ~DomesticDeliveryAddress() {} - -protected: - virtual QUrl resourceType() const { return QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nco#DomesticDeliveryAddress", QUrl::StrictMode); } - -private: - Nepomuk2::SimpleResource* m_res; -}; -} -} - -#endif diff -Nru kdepim-runtime-4.12.3/agents/ontologies/nco/emailaddress.h kdepim-runtime-4.12.90/agents/ontologies/nco/emailaddress.h --- kdepim-runtime-4.12.3/agents/ontologies/nco/emailaddress.h 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/agents/ontologies/nco/emailaddress.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,67 +0,0 @@ -#ifndef _NCO_EMAILADDRESS_H_ -#define _NCO_EMAILADDRESS_H_ - -#include -#include -#include -#include -#include -#include -#include - -#include - -#include "nco/contactmedium.h" -namespace Nepomuk2 { -namespace NCO { -/** - * An email address. The recommended best practice is to use mailto: - * uris for instances of this class. - */ -class EmailAddress : public NCO::ContactMedium -{ -public: - EmailAddress(Nepomuk2::SimpleResource* res) - : NCO::ContactMedium(res), m_res(res) - {} - - virtual ~EmailAddress() {} - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/03/22/nco#emailAddress. - */ - QString emailAddress() const { - QString value; - if(m_res->contains(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nco#emailAddress", QUrl::StrictMode))) - value = m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nco#emailAddress", QUrl::StrictMode)).first().value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/03/22/nco#emailAddress. - */ - void setEmailAddress(const QString& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - values << value; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nco#emailAddress", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/03/22/nco#emailAddress. - */ - void addEmailAddress(const QString& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nco#emailAddress", QUrl::StrictMode), value); - } - -protected: - virtual QUrl resourceType() const { return QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nco#EmailAddress", QUrl::StrictMode); } - -private: - Nepomuk2::SimpleResource* m_res; -}; -} -} - -#endif diff -Nru kdepim-runtime-4.12.3/agents/ontologies/nco/faxnumber.h kdepim-runtime-4.12.90/agents/ontologies/nco/faxnumber.h --- kdepim-runtime-4.12.3/agents/ontologies/nco/faxnumber.h 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/agents/ontologies/nco/faxnumber.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,39 +0,0 @@ -#ifndef _NCO_FAXNUMBER_H_ -#define _NCO_FAXNUMBER_H_ - -#include -#include -#include -#include -#include -#include -#include - -#include - -#include "nco/phonenumber.h" -namespace Nepomuk2 { -namespace NCO { -/** - * A fax number. Inspired by the (TYPE=fax) parameter of the TEL - * property as defined in RFC 2426 sec 3.3.1. - */ -class FaxNumber : public NCO::PhoneNumber -{ -public: - FaxNumber(Nepomuk2::SimpleResource* res) - : NCO::PhoneNumber(res), m_res(res) - {} - - virtual ~FaxNumber() {} - -protected: - virtual QUrl resourceType() const { return QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nco#FaxNumber", QUrl::StrictMode); } - -private: - Nepomuk2::SimpleResource* m_res; -}; -} -} - -#endif diff -Nru kdepim-runtime-4.12.3/agents/ontologies/nco/gender.h kdepim-runtime-4.12.90/agents/ontologies/nco/gender.h --- kdepim-runtime-4.12.3/agents/ontologies/nco/gender.h 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/agents/ontologies/nco/gender.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,37 +0,0 @@ -#ifndef _NCO_GENDER_H_ -#define _NCO_GENDER_H_ - -#include -#include -#include -#include -#include -#include -#include - -#include - -namespace Nepomuk2 { -namespace NCO { -/** - * Gender. Instances of this class may include male and female. - */ -class Gender -{ -public: - Gender(Nepomuk2::SimpleResource* res) - : m_res(res) - {} - - virtual ~Gender() {} - -protected: - virtual QUrl resourceType() const { return QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nco#Gender", QUrl::StrictMode); } - -private: - Nepomuk2::SimpleResource* m_res; -}; -} -} - -#endif diff -Nru kdepim-runtime-4.12.3/agents/ontologies/nco/imaccount.h kdepim-runtime-4.12.90/agents/ontologies/nco/imaccount.h --- kdepim-runtime-4.12.3/agents/ontologies/nco/imaccount.h 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/agents/ontologies/nco/imaccount.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,381 +0,0 @@ -#ifndef _NCO_IMACCOUNT_H_ -#define _NCO_IMACCOUNT_H_ - -#include -#include -#include -#include -#include -#include -#include - -#include - -#include "nco/contactmedium.h" -namespace Nepomuk2 { -namespace NCO { -/** - * An account in an Instant Messaging system. - */ -class IMAccount : public NCO::ContactMedium -{ -public: - IMAccount(Nepomuk2::SimpleResource* res) - : NCO::ContactMedium(res), m_res(res) - {} - - virtual ~IMAccount() {} - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/03/22/nco#hasIMCapability. - * Indicates that an IMAccount has a certain capability. - */ - QList hasIMCapabilitys() const { - QList value; - foreach(const QVariant& v, m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nco#hasIMCapability", QUrl::StrictMode))) - value << v.value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/03/22/nco#hasIMCapability. - * Indicates that an IMAccount has a certain capability. - */ - void setHasIMCapabilitys(const QList& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - foreach(const QUrl& v, value) - values << v; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nco#hasIMCapability", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/03/22/nco#hasIMCapability. - * Indicates that an IMAccount has a certain capability. - */ - void addHasIMCapability(const QUrl& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nco#hasIMCapability", QUrl::StrictMode), value); - } - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/03/22/nco#imID. - * Identifier of the IM account. Examples of such identifier might - * include ICQ UINs, Jabber IDs, Skype names etc. - */ - QStringList imIDs() const { - QStringList value; - foreach(const QVariant& v, m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nco#imID", QUrl::StrictMode))) - value << v.value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/03/22/nco#imID. - * Identifier of the IM account. Examples of such identifier might - * include ICQ UINs, Jabber IDs, Skype names etc. - */ - void setImIDs(const QStringList& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - foreach(const QString& v, value) - values << v; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nco#imID", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/03/22/nco#imID. - * Identifier of the IM account. Examples of such identifier might - * include ICQ UINs, Jabber IDs, Skype names etc. - */ - void addImID(const QString& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nco#imID", QUrl::StrictMode), value); - } - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/03/22/nco#requestedPresenceSubscriptionTo. - * Indicates that this IMAccount has requested a subscription - * to the presence information of the other IMAccount. - */ - QList requestedPresenceSubscriptionTos() const { - QList value; - foreach(const QVariant& v, m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nco#requestedPresenceSubscriptionTo", QUrl::StrictMode))) - value << v.value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/03/22/nco#requestedPresenceSubscriptionTo. - * Indicates that this IMAccount has requested a subscription - * to the presence information of the other IMAccount. - */ - void setRequestedPresenceSubscriptionTos(const QList& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - foreach(const QUrl& v, value) - values << v; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nco#requestedPresenceSubscriptionTo", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/03/22/nco#requestedPresenceSubscriptionTo. - * Indicates that this IMAccount has requested a subscription - * to the presence information of the other IMAccount. - */ - void addRequestedPresenceSubscriptionTo(const QUrl& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nco#requestedPresenceSubscriptionTo", QUrl::StrictMode), value); - } - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/03/22/nco#isAccessedBy. - * Indicates the local IMAccount by which this IMAccount is accessed. - * This does not imply membership of a contact list. - */ - QList isAccessedBys() const { - QList value; - foreach(const QVariant& v, m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nco#isAccessedBy", QUrl::StrictMode))) - value << v.value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/03/22/nco#isAccessedBy. - * Indicates the local IMAccount by which this IMAccount is accessed. - * This does not imply membership of a contact list. - */ - void setIsAccessedBys(const QList& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - foreach(const QUrl& v, value) - values << v; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nco#isAccessedBy", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/03/22/nco#isAccessedBy. - * Indicates the local IMAccount by which this IMAccount is accessed. - * This does not imply membership of a contact list. - */ - void addIsAccessedBy(const QUrl& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nco#isAccessedBy", QUrl::StrictMode), value); - } - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/03/22/nco#imNickname. - * A nickname attached to a particular IM Account. - */ - QStringList imNicknames() const { - QStringList value; - foreach(const QVariant& v, m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nco#imNickname", QUrl::StrictMode))) - value << v.value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/03/22/nco#imNickname. - * A nickname attached to a particular IM Account. - */ - void setImNicknames(const QStringList& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - foreach(const QString& v, value) - values << v; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nco#imNickname", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/03/22/nco#imNickname. - * A nickname attached to a particular IM Account. - */ - void addImNickname(const QString& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nco#imNickname", QUrl::StrictMode), value); - } - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/03/22/nco#isBlocked. - * Indicates that this IMAccount has been blocked. - */ - bool isBlocked() const { - bool value; - if(m_res->contains(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nco#isBlocked", QUrl::StrictMode))) - value = m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nco#isBlocked", QUrl::StrictMode)).first().value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/03/22/nco#isBlocked. - * Indicates that this IMAccount has been blocked. - */ - void setIsBlocked(const bool& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - values << value; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nco#isBlocked", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/03/22/nco#isBlocked. - * Indicates that this IMAccount has been blocked. - */ - void addIsBlocked(const bool& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nco#isBlocked", QUrl::StrictMode), value); - } - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/03/22/nco#imStatusMessage. - * A feature common in most IM systems. A message left by the user - * for all his/her contacts to see. - */ - QString imStatusMessage() const { - QString value; - if(m_res->contains(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nco#imStatusMessage", QUrl::StrictMode))) - value = m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nco#imStatusMessage", QUrl::StrictMode)).first().value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/03/22/nco#imStatusMessage. - * A feature common in most IM systems. A message left by the user - * for all his/her contacts to see. - */ - void setImStatusMessage(const QString& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - values << value; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nco#imStatusMessage", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/03/22/nco#imStatusMessage. - * A feature common in most IM systems. A message left by the user - * for all his/her contacts to see. - */ - void addImStatusMessage(const QString& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nco#imStatusMessage", QUrl::StrictMode), value); - } - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/03/22/nco#publishesPresenceTo. - * Indicates that this IMAccount publishes its presence information - * to the other IMAccount. - */ - QList publishesPresenceTos() const { - QList value; - foreach(const QVariant& v, m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nco#publishesPresenceTo", QUrl::StrictMode))) - value << v.value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/03/22/nco#publishesPresenceTo. - * Indicates that this IMAccount publishes its presence information - * to the other IMAccount. - */ - void setPublishesPresenceTos(const QList& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - foreach(const QUrl& v, value) - values << v; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nco#publishesPresenceTo", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/03/22/nco#publishesPresenceTo. - * Indicates that this IMAccount publishes its presence information - * to the other IMAccount. - */ - void addPublishesPresenceTo(const QUrl& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nco#publishesPresenceTo", QUrl::StrictMode), value); - } - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/03/22/nco#imStatus. - * Current status of the given IM account. Values for this property - * may include 'Online', 'Offline', 'Do not disturb' etc. The - * exact choice of them is unspecified. - */ - QString imStatus() const { - QString value; - if(m_res->contains(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nco#imStatus", QUrl::StrictMode))) - value = m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nco#imStatus", QUrl::StrictMode)).first().value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/03/22/nco#imStatus. - * Current status of the given IM account. Values for this property - * may include 'Online', 'Offline', 'Do not disturb' etc. The - * exact choice of them is unspecified. - */ - void setImStatus(const QString& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - values << value; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nco#imStatus", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/03/22/nco#imStatus. - * Current status of the given IM account. Values for this property - * may include 'Online', 'Offline', 'Do not disturb' etc. The - * exact choice of them is unspecified. - */ - void addImStatus(const QString& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nco#imStatus", QUrl::StrictMode), value); - } - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/03/22/nco#imAccountType. - * Type of the IM account. This may be the name of the service that - * provides the IM functionality. Examples might include Jabber, - * ICQ, MSN etc - */ - QString imAccountType() const { - QString value; - if(m_res->contains(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nco#imAccountType", QUrl::StrictMode))) - value = m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nco#imAccountType", QUrl::StrictMode)).first().value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/03/22/nco#imAccountType. - * Type of the IM account. This may be the name of the service that - * provides the IM functionality. Examples might include Jabber, - * ICQ, MSN etc - */ - void setImAccountType(const QString& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - values << value; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nco#imAccountType", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/03/22/nco#imAccountType. - * Type of the IM account. This may be the name of the service that - * provides the IM functionality. Examples might include Jabber, - * ICQ, MSN etc - */ - void addImAccountType(const QString& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nco#imAccountType", QUrl::StrictMode), value); - } - -protected: - virtual QUrl resourceType() const { return QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nco#IMAccount", QUrl::StrictMode); } - -private: - Nepomuk2::SimpleResource* m_res; -}; -} -} - -#endif diff -Nru kdepim-runtime-4.12.3/agents/ontologies/nco/imcapability.h kdepim-runtime-4.12.90/agents/ontologies/nco/imcapability.h --- kdepim-runtime-4.12.3/agents/ontologies/nco/imcapability.h 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/agents/ontologies/nco/imcapability.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,37 +0,0 @@ -#ifndef _NCO_IMCAPABILITY_H_ -#define _NCO_IMCAPABILITY_H_ - -#include -#include -#include -#include -#include -#include -#include - -#include - -namespace Nepomuk2 { -namespace NCO { -/** - * Capabilities of a cetain IMAccount. - */ -class IMCapability -{ -public: - IMCapability(Nepomuk2::SimpleResource* res) - : m_res(res) - {} - - virtual ~IMCapability() {} - -protected: - virtual QUrl resourceType() const { return QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nco#IMCapability", QUrl::StrictMode); } - -private: - Nepomuk2::SimpleResource* m_res; -}; -} -} - -#endif diff -Nru kdepim-runtime-4.12.3/agents/ontologies/nco/internationaldeliveryaddress.h kdepim-runtime-4.12.90/agents/ontologies/nco/internationaldeliveryaddress.h --- kdepim-runtime-4.12.3/agents/ontologies/nco/internationaldeliveryaddress.h 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/agents/ontologies/nco/internationaldeliveryaddress.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,39 +0,0 @@ -#ifndef _NCO_INTERNATIONALDELIVERYADDRESS_H_ -#define _NCO_INTERNATIONALDELIVERYADDRESS_H_ - -#include -#include -#include -#include -#include -#include -#include - -#include - -#include "nco/postaladdress.h" -namespace Nepomuk2 { -namespace NCO { -/** - * International Delivery Addresse. Class inspired by TYPE=intl - * parameter of the ADR property defined in RFC 2426 sec. 3.2.1 - */ -class InternationalDeliveryAddress : public NCO::PostalAddress -{ -public: - InternationalDeliveryAddress(Nepomuk2::SimpleResource* res) - : NCO::PostalAddress(res), m_res(res) - {} - - virtual ~InternationalDeliveryAddress() {} - -protected: - virtual QUrl resourceType() const { return QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nco#InternationalDeliveryAddress", QUrl::StrictMode); } - -private: - Nepomuk2::SimpleResource* m_res; -}; -} -} - -#endif diff -Nru kdepim-runtime-4.12.3/agents/ontologies/nco/isdnnumber.h kdepim-runtime-4.12.90/agents/ontologies/nco/isdnnumber.h --- kdepim-runtime-4.12.3/agents/ontologies/nco/isdnnumber.h 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/agents/ontologies/nco/isdnnumber.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,39 +0,0 @@ -#ifndef _NCO_ISDNNUMBER_H_ -#define _NCO_ISDNNUMBER_H_ - -#include -#include -#include -#include -#include -#include -#include - -#include - -#include "nco/voicephonenumber.h" -namespace Nepomuk2 { -namespace NCO { -/** - * An ISDN phone number. Inspired by the (TYPE=isdn) parameter - * of the TEL property as defined in RFC 2426 sec 3.3.1. - */ -class IsdnNumber : public NCO::VoicePhoneNumber -{ -public: - IsdnNumber(Nepomuk2::SimpleResource* res) - : NCO::VoicePhoneNumber(res), m_res(res) - {} - - virtual ~IsdnNumber() {} - -protected: - virtual QUrl resourceType() const { return QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nco#IsdnNumber", QUrl::StrictMode); } - -private: - Nepomuk2::SimpleResource* m_res; -}; -} -} - -#endif diff -Nru kdepim-runtime-4.12.3/agents/ontologies/nco/messagingnumber.h kdepim-runtime-4.12.90/agents/ontologies/nco/messagingnumber.h --- kdepim-runtime-4.12.3/agents/ontologies/nco/messagingnumber.h 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/agents/ontologies/nco/messagingnumber.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,38 +0,0 @@ -#ifndef _NCO_MESSAGINGNUMBER_H_ -#define _NCO_MESSAGINGNUMBER_H_ - -#include -#include -#include -#include -#include -#include -#include - -#include - -#include "nco/phonenumber.h" -namespace Nepomuk2 { -namespace NCO { -/** - * A number that can accept textual messages. - */ -class MessagingNumber : public NCO::PhoneNumber -{ -public: - MessagingNumber(Nepomuk2::SimpleResource* res) - : NCO::PhoneNumber(res), m_res(res) - {} - - virtual ~MessagingNumber() {} - -protected: - virtual QUrl resourceType() const { return QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nco#MessagingNumber", QUrl::StrictMode); } - -private: - Nepomuk2::SimpleResource* m_res; -}; -} -} - -#endif diff -Nru kdepim-runtime-4.12.3/agents/ontologies/nco/modemnumber.h kdepim-runtime-4.12.90/agents/ontologies/nco/modemnumber.h --- kdepim-runtime-4.12.3/agents/ontologies/nco/modemnumber.h 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/agents/ontologies/nco/modemnumber.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,39 +0,0 @@ -#ifndef _NCO_MODEMNUMBER_H_ -#define _NCO_MODEMNUMBER_H_ - -#include -#include -#include -#include -#include -#include -#include - -#include - -#include "nco/phonenumber.h" -namespace Nepomuk2 { -namespace NCO { -/** - * A modem phone number. Inspired by the (TYPE=modem) parameter - * of the TEL property as defined in RFC 2426 sec 3.3.1. - */ -class ModemNumber : public NCO::PhoneNumber -{ -public: - ModemNumber(Nepomuk2::SimpleResource* res) - : NCO::PhoneNumber(res), m_res(res) - {} - - virtual ~ModemNumber() {} - -protected: - virtual QUrl resourceType() const { return QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nco#ModemNumber", QUrl::StrictMode); } - -private: - Nepomuk2::SimpleResource* m_res; -}; -} -} - -#endif diff -Nru kdepim-runtime-4.12.3/agents/ontologies/nco/organizationcontact.h kdepim-runtime-4.12.90/agents/ontologies/nco/organizationcontact.h --- kdepim-runtime-4.12.3/agents/ontologies/nco/organizationcontact.h 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/agents/ontologies/nco/organizationcontact.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,73 +0,0 @@ -#ifndef _NCO_ORGANIZATIONCONTACT_H_ -#define _NCO_ORGANIZATIONCONTACT_H_ - -#include -#include -#include -#include -#include -#include -#include - -#include - -#include "nco/contact.h" -namespace Nepomuk2 { -namespace NCO { -/** - * A Contact that denotes on Organization. - */ -class OrganizationContact : public NCO::Contact -{ -public: - OrganizationContact(Nepomuk2::SimpleResource* res) - : NCO::Contact(res), m_res(res) - {} - - virtual ~OrganizationContact() {} - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/03/22/nco#logo. - * Logo of a company. Inspired by the LOGO property defined in RFC - * 2426 sec. 3.5.3 - */ - QList logos() const { - QList value; - foreach(const QVariant& v, m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nco#logo", QUrl::StrictMode))) - value << v.value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/03/22/nco#logo. - * Logo of a company. Inspired by the LOGO property defined in RFC - * 2426 sec. 3.5.3 - */ - void setLogos(const QList& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - foreach(const QUrl& v, value) - values << v; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nco#logo", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/03/22/nco#logo. - * Logo of a company. Inspired by the LOGO property defined in RFC - * 2426 sec. 3.5.3 - */ - void addLogo(const QUrl& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nco#logo", QUrl::StrictMode), value); - } - -protected: - virtual QUrl resourceType() const { return QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nco#OrganizationContact", QUrl::StrictMode); } - -private: - Nepomuk2::SimpleResource* m_res; -}; -} -} - -#endif diff -Nru kdepim-runtime-4.12.3/agents/ontologies/nco/pagernumber.h kdepim-runtime-4.12.90/agents/ontologies/nco/pagernumber.h --- kdepim-runtime-4.12.3/agents/ontologies/nco/pagernumber.h 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/agents/ontologies/nco/pagernumber.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,39 +0,0 @@ -#ifndef _NCO_PAGERNUMBER_H_ -#define _NCO_PAGERNUMBER_H_ - -#include -#include -#include -#include -#include -#include -#include - -#include - -#include "nco/messagingnumber.h" -namespace Nepomuk2 { -namespace NCO { -/** - * A pager phone number. Inspired by the (TYPE=pager) parameter - * of the TEL property as defined in RFC 2426 sec 3.3.1. - */ -class PagerNumber : public NCO::MessagingNumber -{ -public: - PagerNumber(Nepomuk2::SimpleResource* res) - : NCO::MessagingNumber(res), m_res(res) - {} - - virtual ~PagerNumber() {} - -protected: - virtual QUrl resourceType() const { return QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nco#PagerNumber", QUrl::StrictMode); } - -private: - Nepomuk2::SimpleResource* m_res; -}; -} -} - -#endif diff -Nru kdepim-runtime-4.12.3/agents/ontologies/nco/parceldeliveryaddress.h kdepim-runtime-4.12.90/agents/ontologies/nco/parceldeliveryaddress.h --- kdepim-runtime-4.12.3/agents/ontologies/nco/parceldeliveryaddress.h 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/agents/ontologies/nco/parceldeliveryaddress.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,39 +0,0 @@ -#ifndef _NCO_PARCELDELIVERYADDRESS_H_ -#define _NCO_PARCELDELIVERYADDRESS_H_ - -#include -#include -#include -#include -#include -#include -#include - -#include - -#include "nco/postaladdress.h" -namespace Nepomuk2 { -namespace NCO { -/** - * Parcel Delivery Addresse. Class inspired by TYPE=parcel parameter - * of the ADR property defined in RFC 2426 sec. 3.2.1 - */ -class ParcelDeliveryAddress : public NCO::PostalAddress -{ -public: - ParcelDeliveryAddress(Nepomuk2::SimpleResource* res) - : NCO::PostalAddress(res), m_res(res) - {} - - virtual ~ParcelDeliveryAddress() {} - -protected: - virtual QUrl resourceType() const { return QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nco#ParcelDeliveryAddress", QUrl::StrictMode); } - -private: - Nepomuk2::SimpleResource* m_res; -}; -} -} - -#endif diff -Nru kdepim-runtime-4.12.3/agents/ontologies/nco/pcsnumber.h kdepim-runtime-4.12.90/agents/ontologies/nco/pcsnumber.h --- kdepim-runtime-4.12.3/agents/ontologies/nco/pcsnumber.h 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/agents/ontologies/nco/pcsnumber.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,40 +0,0 @@ -#ifndef _NCO_PCSNUMBER_H_ -#define _NCO_PCSNUMBER_H_ - -#include -#include -#include -#include -#include -#include -#include - -#include - -#include "nco/voicephonenumber.h" -namespace Nepomuk2 { -namespace NCO { -/** - * Personal Communication Services Number. A class inspired - * by the TYPE=pcs parameter of the TEL property defined in RFC - * 2426 sec. 3.3.1 - */ -class PcsNumber : public NCO::VoicePhoneNumber -{ -public: - PcsNumber(Nepomuk2::SimpleResource* res) - : NCO::VoicePhoneNumber(res), m_res(res) - {} - - virtual ~PcsNumber() {} - -protected: - virtual QUrl resourceType() const { return QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nco#PcsNumber", QUrl::StrictMode); } - -private: - Nepomuk2::SimpleResource* m_res; -}; -} -} - -#endif diff -Nru kdepim-runtime-4.12.3/agents/ontologies/nco/personcontact.h kdepim-runtime-4.12.90/agents/ontologies/nco/personcontact.h --- kdepim-runtime-4.12.3/agents/ontologies/nco/personcontact.h 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/agents/ontologies/nco/personcontact.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,336 +0,0 @@ -#ifndef _NCO_PERSONCONTACT_H_ -#define _NCO_PERSONCONTACT_H_ - -#include -#include -#include -#include -#include -#include -#include - -#include - -#include "nco/contact.h" -namespace Nepomuk2 { -namespace NCO { -/** - * A Contact that denotes a Person. A person can have multiple Affiliations. - */ -class PersonContact : public NCO::Contact -{ -public: - PersonContact(Nepomuk2::SimpleResource* res) - : NCO::Contact(res), m_res(res) - {} - - virtual ~PersonContact() {} - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/03/22/nco#nameFamily. - * The family name of an Object represented by this Contact. These - * applies to people that have more than one given name. The 'first' - * one is considered 'the' given name (see nameGiven) property. - * All additional ones are considered 'additional' names. The - * name inherited from parents is the 'family name'. e.g. For Dr. - * John Phil Paul Stevenson Jr. M.D. A.C.P. we have contact with: - * honorificPrefix: 'Dr.', nameGiven: 'John', nameAdditional: - * 'Phil', nameAdditional: 'Paul', nameFamily: 'Stevenson', - * honorificSuffix: 'Jr.', honorificSuffix: 'M.D.', honorificSuffix: - * 'A.C.P.'. These properties form an equivalent of the compound - * 'N' property as defined in RFC 2426 Sec. 3.1.2 - */ - QString nameFamily() const { - QString value; - if(m_res->contains(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nco#nameFamily", QUrl::StrictMode))) - value = m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nco#nameFamily", QUrl::StrictMode)).first().value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/03/22/nco#nameFamily. - * The family name of an Object represented by this Contact. These - * applies to people that have more than one given name. The 'first' - * one is considered 'the' given name (see nameGiven) property. - * All additional ones are considered 'additional' names. The - * name inherited from parents is the 'family name'. e.g. For Dr. - * John Phil Paul Stevenson Jr. M.D. A.C.P. we have contact with: - * honorificPrefix: 'Dr.', nameGiven: 'John', nameAdditional: - * 'Phil', nameAdditional: 'Paul', nameFamily: 'Stevenson', - * honorificSuffix: 'Jr.', honorificSuffix: 'M.D.', honorificSuffix: - * 'A.C.P.'. These properties form an equivalent of the compound - * 'N' property as defined in RFC 2426 Sec. 3.1.2 - */ - void setNameFamily(const QString& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - values << value; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nco#nameFamily", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/03/22/nco#nameFamily. - * The family name of an Object represented by this Contact. These - * applies to people that have more than one given name. The 'first' - * one is considered 'the' given name (see nameGiven) property. - * All additional ones are considered 'additional' names. The - * name inherited from parents is the 'family name'. e.g. For Dr. - * John Phil Paul Stevenson Jr. M.D. A.C.P. we have contact with: - * honorificPrefix: 'Dr.', nameGiven: 'John', nameAdditional: - * 'Phil', nameAdditional: 'Paul', nameFamily: 'Stevenson', - * honorificSuffix: 'Jr.', honorificSuffix: 'M.D.', honorificSuffix: - * 'A.C.P.'. These properties form an equivalent of the compound - * 'N' property as defined in RFC 2426 Sec. 3.1.2 - */ - void addNameFamily(const QString& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nco#nameFamily", QUrl::StrictMode), value); - } - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/03/22/nco#hobby. - * A hobby associated with a PersonContact. This property can - * be used to express hobbies and interests. - */ - QStringList hobbys() const { - QStringList value; - foreach(const QVariant& v, m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nco#hobby", QUrl::StrictMode))) - value << v.value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/03/22/nco#hobby. - * A hobby associated with a PersonContact. This property can - * be used to express hobbies and interests. - */ - void setHobbys(const QStringList& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - foreach(const QString& v, value) - values << v; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nco#hobby", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/03/22/nco#hobby. - * A hobby associated with a PersonContact. This property can - * be used to express hobbies and interests. - */ - void addHobby(const QString& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nco#hobby", QUrl::StrictMode), value); - } - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/03/22/nco#gender. - * Gender of the given contact. - */ - QUrl gender() const { - QUrl value; - if(m_res->contains(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nco#gender", QUrl::StrictMode))) - value = m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nco#gender", QUrl::StrictMode)).first().value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/03/22/nco#gender. - * Gender of the given contact. - */ - void setGender(const QUrl& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - values << value; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nco#gender", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/03/22/nco#gender. - * Gender of the given contact. - */ - void addGender(const QUrl& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nco#gender", QUrl::StrictMode), value); - } - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/03/22/nco#nameAdditional. - * Additional given name of an object represented by this contact. - * See documentation for 'nameFamily' property for details. - */ - QStringList nameAdditionals() const { - QStringList value; - foreach(const QVariant& v, m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nco#nameAdditional", QUrl::StrictMode))) - value << v.value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/03/22/nco#nameAdditional. - * Additional given name of an object represented by this contact. - * See documentation for 'nameFamily' property for details. - */ - void setNameAdditionals(const QStringList& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - foreach(const QString& v, value) - values << v; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nco#nameAdditional", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/03/22/nco#nameAdditional. - * Additional given name of an object represented by this contact. - * See documentation for 'nameFamily' property for details. - */ - void addNameAdditional(const QString& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nco#nameAdditional", QUrl::StrictMode), value); - } - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/03/22/nco#hasAffiliation. - * Links a PersonContact with an Affiliation. - */ - QList hasAffiliations() const { - QList value; - foreach(const QVariant& v, m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nco#hasAffiliation", QUrl::StrictMode))) - value << v.value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/03/22/nco#hasAffiliation. - * Links a PersonContact with an Affiliation. - */ - void setHasAffiliations(const QList& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - foreach(const QUrl& v, value) - values << v; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nco#hasAffiliation", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/03/22/nco#hasAffiliation. - * Links a PersonContact with an Affiliation. - */ - void addHasAffiliation(const QUrl& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nco#hasAffiliation", QUrl::StrictMode), value); - } - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/03/22/nco#nameHonorificPrefix. - * A prefix for the name of the object represented by this Contact. - * See documentation for the 'nameFamily' property for details. - */ - QStringList nameHonorificPrefixs() const { - QStringList value; - foreach(const QVariant& v, m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nco#nameHonorificPrefix", QUrl::StrictMode))) - value << v.value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/03/22/nco#nameHonorificPrefix. - * A prefix for the name of the object represented by this Contact. - * See documentation for the 'nameFamily' property for details. - */ - void setNameHonorificPrefixs(const QStringList& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - foreach(const QString& v, value) - values << v; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nco#nameHonorificPrefix", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/03/22/nco#nameHonorificPrefix. - * A prefix for the name of the object represented by this Contact. - * See documentation for the 'nameFamily' property for details. - */ - void addNameHonorificPrefix(const QString& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nco#nameHonorificPrefix", QUrl::StrictMode), value); - } - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/03/22/nco#nameHonorificSuffix. - * A suffix for the name of the Object represented by the given object. - * See documentation for the 'nameFamily' for details. - */ - QStringList nameHonorificSuffixs() const { - QStringList value; - foreach(const QVariant& v, m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nco#nameHonorificSuffix", QUrl::StrictMode))) - value << v.value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/03/22/nco#nameHonorificSuffix. - * A suffix for the name of the Object represented by the given object. - * See documentation for the 'nameFamily' for details. - */ - void setNameHonorificSuffixs(const QStringList& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - foreach(const QString& v, value) - values << v; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nco#nameHonorificSuffix", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/03/22/nco#nameHonorificSuffix. - * A suffix for the name of the Object represented by the given object. - * See documentation for the 'nameFamily' for details. - */ - void addNameHonorificSuffix(const QString& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nco#nameHonorificSuffix", QUrl::StrictMode), value); - } - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/03/22/nco#nameGiven. - * The given name for the object represented by this Contact. See - * documentation for 'nameFamily' property for details. - */ - QString nameGiven() const { - QString value; - if(m_res->contains(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nco#nameGiven", QUrl::StrictMode))) - value = m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nco#nameGiven", QUrl::StrictMode)).first().value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/03/22/nco#nameGiven. - * The given name for the object represented by this Contact. See - * documentation for 'nameFamily' property for details. - */ - void setNameGiven(const QString& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - values << value; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nco#nameGiven", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/03/22/nco#nameGiven. - * The given name for the object represented by this Contact. See - * documentation for 'nameFamily' property for details. - */ - void addNameGiven(const QString& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nco#nameGiven", QUrl::StrictMode), value); - } - -protected: - virtual QUrl resourceType() const { return QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nco#PersonContact", QUrl::StrictMode); } - -private: - Nepomuk2::SimpleResource* m_res; -}; -} -} - -#endif diff -Nru kdepim-runtime-4.12.3/agents/ontologies/nco/phonenumber.h kdepim-runtime-4.12.90/agents/ontologies/nco/phonenumber.h --- kdepim-runtime-4.12.3/agents/ontologies/nco/phonenumber.h 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/agents/ontologies/nco/phonenumber.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,66 +0,0 @@ -#ifndef _NCO_PHONENUMBER_H_ -#define _NCO_PHONENUMBER_H_ - -#include -#include -#include -#include -#include -#include -#include - -#include - -#include "nco/contactmedium.h" -namespace Nepomuk2 { -namespace NCO { -/** - * A telephone number. - */ -class PhoneNumber : public NCO::ContactMedium -{ -public: - PhoneNumber(Nepomuk2::SimpleResource* res) - : NCO::ContactMedium(res), m_res(res) - {} - - virtual ~PhoneNumber() {} - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/03/22/nco#phoneNumber. - */ - QString phoneNumber() const { - QString value; - if(m_res->contains(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nco#phoneNumber", QUrl::StrictMode))) - value = m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nco#phoneNumber", QUrl::StrictMode)).first().value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/03/22/nco#phoneNumber. - */ - void setPhoneNumber(const QString& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - values << value; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nco#phoneNumber", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/03/22/nco#phoneNumber. - */ - void addPhoneNumber(const QString& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nco#phoneNumber", QUrl::StrictMode), value); - } - -protected: - virtual QUrl resourceType() const { return QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nco#PhoneNumber", QUrl::StrictMode); } - -private: - Nepomuk2::SimpleResource* m_res; -}; -} -} - -#endif diff -Nru kdepim-runtime-4.12.3/agents/ontologies/nco/postaladdress.h kdepim-runtime-4.12.90/agents/ontologies/nco/postaladdress.h --- kdepim-runtime-4.12.3/agents/ontologies/nco/postaladdress.h 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/agents/ontologies/nco/postaladdress.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,329 +0,0 @@ -#ifndef _NCO_POSTALADDRESS_H_ -#define _NCO_POSTALADDRESS_H_ - -#include -#include -#include -#include -#include -#include -#include - -#include - -#include "nco/contactmedium.h" -namespace Nepomuk2 { -namespace NCO { -/** - * A postal address. A class aggregating the various parts of a - * value for the 'ADR' property as defined in RFC 2426 Sec. 3.2.1. - */ -class PostalAddress : public NCO::ContactMedium -{ -public: - PostalAddress(Nepomuk2::SimpleResource* res) - : NCO::ContactMedium(res), m_res(res) - {} - - virtual ~PostalAddress() {} - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/03/22/nco#streetAddress. - * The streed address. Inspired by the third part of the value of - * the 'ADR' property as defined in RFC 2426, sec. 3.2.1 - */ - QString streetAddress() const { - QString value; - if(m_res->contains(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nco#streetAddress", QUrl::StrictMode))) - value = m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nco#streetAddress", QUrl::StrictMode)).first().value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/03/22/nco#streetAddress. - * The streed address. Inspired by the third part of the value of - * the 'ADR' property as defined in RFC 2426, sec. 3.2.1 - */ - void setStreetAddress(const QString& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - values << value; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nco#streetAddress", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/03/22/nco#streetAddress. - * The streed address. Inspired by the third part of the value of - * the 'ADR' property as defined in RFC 2426, sec. 3.2.1 - */ - void addStreetAddress(const QString& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nco#streetAddress", QUrl::StrictMode), value); - } - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/03/22/nco#pobox. - * Post office box. This is the first part of the value of the 'ADR' - * property as defined in RFC 2426, sec. 3.2.1 - */ - QString pobox() const { - QString value; - if(m_res->contains(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nco#pobox", QUrl::StrictMode))) - value = m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nco#pobox", QUrl::StrictMode)).first().value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/03/22/nco#pobox. - * Post office box. This is the first part of the value of the 'ADR' - * property as defined in RFC 2426, sec. 3.2.1 - */ - void setPobox(const QString& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - values << value; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nco#pobox", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/03/22/nco#pobox. - * Post office box. This is the first part of the value of the 'ADR' - * property as defined in RFC 2426, sec. 3.2.1 - */ - void addPobox(const QString& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nco#pobox", QUrl::StrictMode), value); - } - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/03/22/nco#extendedAddress. - * An extended part of an address. This field might be used to express - * parts of an address that aren't include in the name of the Contact - * but also aren't part of the actual location. Usually the streed - * address and following fields are enough for a postal letter - * to arrive. Examples may include ('University of California - * Campus building 45', 'Sears Tower 34th floor' etc.) Inspired - * by the second part of the value of the 'ADR' property as defined - * in RFC 2426, sec. 3.2.1 - */ - QString extendedAddress() const { - QString value; - if(m_res->contains(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nco#extendedAddress", QUrl::StrictMode))) - value = m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nco#extendedAddress", QUrl::StrictMode)).first().value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/03/22/nco#extendedAddress. - * An extended part of an address. This field might be used to express - * parts of an address that aren't include in the name of the Contact - * but also aren't part of the actual location. Usually the streed - * address and following fields are enough for a postal letter - * to arrive. Examples may include ('University of California - * Campus building 45', 'Sears Tower 34th floor' etc.) Inspired - * by the second part of the value of the 'ADR' property as defined - * in RFC 2426, sec. 3.2.1 - */ - void setExtendedAddress(const QString& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - values << value; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nco#extendedAddress", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/03/22/nco#extendedAddress. - * An extended part of an address. This field might be used to express - * parts of an address that aren't include in the name of the Contact - * but also aren't part of the actual location. Usually the streed - * address and following fields are enough for a postal letter - * to arrive. Examples may include ('University of California - * Campus building 45', 'Sears Tower 34th floor' etc.) Inspired - * by the second part of the value of the 'ADR' property as defined - * in RFC 2426, sec. 3.2.1 - */ - void addExtendedAddress(const QString& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nco#extendedAddress", QUrl::StrictMode), value); - } - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/03/22/nco#region. - * Region. Inspired by the fifth part of the value of the 'ADR' property - * as defined in RFC 2426, sec. 3.2.1 - */ - QString region() const { - QString value; - if(m_res->contains(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nco#region", QUrl::StrictMode))) - value = m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nco#region", QUrl::StrictMode)).first().value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/03/22/nco#region. - * Region. Inspired by the fifth part of the value of the 'ADR' property - * as defined in RFC 2426, sec. 3.2.1 - */ - void setRegion(const QString& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - values << value; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nco#region", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/03/22/nco#region. - * Region. Inspired by the fifth part of the value of the 'ADR' property - * as defined in RFC 2426, sec. 3.2.1 - */ - void addRegion(const QString& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nco#region", QUrl::StrictMode), value); - } - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/03/22/nco#addressLocation. - * The geographical location of a postal address. - */ - QUrl addressLocation() const { - QUrl value; - if(m_res->contains(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nco#addressLocation", QUrl::StrictMode))) - value = m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nco#addressLocation", QUrl::StrictMode)).first().value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/03/22/nco#addressLocation. - * The geographical location of a postal address. - */ - void setAddressLocation(const QUrl& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - values << value; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nco#addressLocation", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/03/22/nco#addressLocation. - * The geographical location of a postal address. - */ - void addAddressLocation(const QUrl& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nco#addressLocation", QUrl::StrictMode), value); - } - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/03/22/nco#locality. - * Locality or City. Inspired by the fourth part of the value of - * the 'ADR' property as defined in RFC 2426, sec. 3.2.1 - */ - QString locality() const { - QString value; - if(m_res->contains(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nco#locality", QUrl::StrictMode))) - value = m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nco#locality", QUrl::StrictMode)).first().value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/03/22/nco#locality. - * Locality or City. Inspired by the fourth part of the value of - * the 'ADR' property as defined in RFC 2426, sec. 3.2.1 - */ - void setLocality(const QString& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - values << value; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nco#locality", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/03/22/nco#locality. - * Locality or City. Inspired by the fourth part of the value of - * the 'ADR' property as defined in RFC 2426, sec. 3.2.1 - */ - void addLocality(const QString& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nco#locality", QUrl::StrictMode), value); - } - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/03/22/nco#country. - * A part of an address specyfing the country. Inspired by the seventh - * part of the value of the 'ADR' property as defined in RFC 2426, - * sec. 3.2.1 - */ - QString country() const { - QString value; - if(m_res->contains(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nco#country", QUrl::StrictMode))) - value = m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nco#country", QUrl::StrictMode)).first().value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/03/22/nco#country. - * A part of an address specyfing the country. Inspired by the seventh - * part of the value of the 'ADR' property as defined in RFC 2426, - * sec. 3.2.1 - */ - void setCountry(const QString& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - values << value; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nco#country", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/03/22/nco#country. - * A part of an address specyfing the country. Inspired by the seventh - * part of the value of the 'ADR' property as defined in RFC 2426, - * sec. 3.2.1 - */ - void addCountry(const QString& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nco#country", QUrl::StrictMode), value); - } - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/03/22/nco#postalcode. - * Postal Code. Inspired by the sixth part of the value of the 'ADR' - * property as defined in RFC 2426, sec. 3.2.1 - */ - QString postalcode() const { - QString value; - if(m_res->contains(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nco#postalcode", QUrl::StrictMode))) - value = m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nco#postalcode", QUrl::StrictMode)).first().value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/03/22/nco#postalcode. - * Postal Code. Inspired by the sixth part of the value of the 'ADR' - * property as defined in RFC 2426, sec. 3.2.1 - */ - void setPostalcode(const QString& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - values << value; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nco#postalcode", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/03/22/nco#postalcode. - * Postal Code. Inspired by the sixth part of the value of the 'ADR' - * property as defined in RFC 2426, sec. 3.2.1 - */ - void addPostalcode(const QString& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nco#postalcode", QUrl::StrictMode), value); - } - -protected: - virtual QUrl resourceType() const { return QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nco#PostalAddress", QUrl::StrictMode); } - -private: - Nepomuk2::SimpleResource* m_res; -}; -} -} - -#endif diff -Nru kdepim-runtime-4.12.3/agents/ontologies/nco/role.h kdepim-runtime-4.12.90/agents/ontologies/nco/role.h --- kdepim-runtime-4.12.3/agents/ontologies/nco/role.h 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/agents/ontologies/nco/role.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,433 +0,0 @@ -#ifndef _NCO_ROLE_H_ -#define _NCO_ROLE_H_ - -#include -#include -#include -#include -#include -#include -#include - -#include - -namespace Nepomuk2 { -namespace NCO { -/** - * A role played by a contact. Contacts that denote people, can - * have many roles (e.g. see the hasAffiliation property and Affiliation - * class). Contacts that denote Organizations or other Agents - * usually have one role. Each role can introduce additional contact - * media. - */ -class Role -{ -public: - Role(Nepomuk2::SimpleResource* res) - : m_res(res) - {} - - virtual ~Role() {} - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/03/22/nco#hasEmailAddress. - * An address for electronic mail communication with the object - * specified by this contact. An equivalent of the 'EMAIL' property - * as defined in RFC 2426 Sec. 3.3.1. - */ - QList hasEmailAddresses() const { - QList value; - foreach(const QVariant& v, m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nco#hasEmailAddress", QUrl::StrictMode))) - value << v.value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/03/22/nco#hasEmailAddress. - * An address for electronic mail communication with the object - * specified by this contact. An equivalent of the 'EMAIL' property - * as defined in RFC 2426 Sec. 3.3.1. - */ - void setHasEmailAddresses(const QList& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - foreach(const QUrl& v, value) - values << v; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nco#hasEmailAddress", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/03/22/nco#hasEmailAddress. - * An address for electronic mail communication with the object - * specified by this contact. An equivalent of the 'EMAIL' property - * as defined in RFC 2426 Sec. 3.3.1. - */ - void addHasEmailAddress(const QUrl& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nco#hasEmailAddress", QUrl::StrictMode), value); - } - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/03/22/nco#end. - * End datetime for the role, such as: the datetime of leaving a - * project or organization, datetime of ending employment, datetime - * of divorce. If absent or set to a date in the future, the role is - * currently active. - */ - QDateTime end() const { - QDateTime value; - if(m_res->contains(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nco#end", QUrl::StrictMode))) - value = m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nco#end", QUrl::StrictMode)).first().value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/03/22/nco#end. - * End datetime for the role, such as: the datetime of leaving a - * project or organization, datetime of ending employment, datetime - * of divorce. If absent or set to a date in the future, the role is - * currently active. - */ - void setEnd(const QDateTime& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - values << value; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nco#end", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/03/22/nco#end. - * End datetime for the role, such as: the datetime of leaving a - * project or organization, datetime of ending employment, datetime - * of divorce. If absent or set to a date in the future, the role is - * currently active. - */ - void addEnd(const QDateTime& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nco#end", QUrl::StrictMode), value); - } - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/03/22/nco#websiteUrl. - * A url of a website. - */ - QList websiteUrls() const { - QList value; - foreach(const QVariant& v, m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nco#websiteUrl", QUrl::StrictMode))) - value << v.value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/03/22/nco#websiteUrl. - * A url of a website. - */ - void setWebsiteUrls(const QList& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - foreach(const QUrl& v, value) - values << v; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nco#websiteUrl", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/03/22/nco#websiteUrl. - * A url of a website. - */ - void addWebsiteUrl(const QUrl& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nco#websiteUrl", QUrl::StrictMode), value); - } - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/03/22/nco#url. - * A uniform resource locator associated with the given role of - * a Contact. Inspired by the 'URL' property defined in RFC 2426 - * Sec. 3.6.8. - */ - QList urls() const { - QList value; - foreach(const QVariant& v, m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nco#url", QUrl::StrictMode))) - value << v.value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/03/22/nco#url. - * A uniform resource locator associated with the given role of - * a Contact. Inspired by the 'URL' property defined in RFC 2426 - * Sec. 3.6.8. - */ - void setUrls(const QList& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - foreach(const QUrl& v, value) - values << v; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nco#url", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/03/22/nco#url. - * A uniform resource locator associated with the given role of - * a Contact. Inspired by the 'URL' property defined in RFC 2426 - * Sec. 3.6.8. - */ - void addUrl(const QUrl& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nco#url", QUrl::StrictMode), value); - } - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/03/22/nco#hasPostalAddress. - * The default Address for a Contact. An equivalent of the 'ADR' - * property as defined in RFC 2426 Sec. 3.2.1. - */ - QList hasPostalAddresses() const { - QList value; - foreach(const QVariant& v, m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nco#hasPostalAddress", QUrl::StrictMode))) - value << v.value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/03/22/nco#hasPostalAddress. - * The default Address for a Contact. An equivalent of the 'ADR' - * property as defined in RFC 2426 Sec. 3.2.1. - */ - void setHasPostalAddresses(const QList& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - foreach(const QUrl& v, value) - values << v; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nco#hasPostalAddress", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/03/22/nco#hasPostalAddress. - * The default Address for a Contact. An equivalent of the 'ADR' - * property as defined in RFC 2426 Sec. 3.2.1. - */ - void addHasPostalAddress(const QUrl& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nco#hasPostalAddress", QUrl::StrictMode), value); - } - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/03/22/nco#blogUrl. - * A Blog url. - */ - QList blogUrls() const { - QList value; - foreach(const QVariant& v, m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nco#blogUrl", QUrl::StrictMode))) - value << v.value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/03/22/nco#blogUrl. - * A Blog url. - */ - void setBlogUrls(const QList& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - foreach(const QUrl& v, value) - values << v; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nco#blogUrl", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/03/22/nco#blogUrl. - * A Blog url. - */ - void addBlogUrl(const QUrl& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nco#blogUrl", QUrl::StrictMode), value); - } - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/03/22/nco#hasIMAccount. - * Indicates that an Instant Messaging account owned by an entity - * represented by this contact. - */ - QList hasIMAccounts() const { - QList value; - foreach(const QVariant& v, m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nco#hasIMAccount", QUrl::StrictMode))) - value << v.value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/03/22/nco#hasIMAccount. - * Indicates that an Instant Messaging account owned by an entity - * represented by this contact. - */ - void setHasIMAccounts(const QList& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - foreach(const QUrl& v, value) - values << v; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nco#hasIMAccount", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/03/22/nco#hasIMAccount. - * Indicates that an Instant Messaging account owned by an entity - * represented by this contact. - */ - void addHasIMAccount(const QUrl& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nco#hasIMAccount", QUrl::StrictMode), value); - } - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/03/22/nco#hasPhoneNumber. - * A number for telephony communication with the object represented - * by this Contact. An equivalent of the 'TEL' property defined - * in RFC 2426 Sec. 3.3.1 - */ - QList hasPhoneNumbers() const { - QList value; - foreach(const QVariant& v, m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nco#hasPhoneNumber", QUrl::StrictMode))) - value << v.value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/03/22/nco#hasPhoneNumber. - * A number for telephony communication with the object represented - * by this Contact. An equivalent of the 'TEL' property defined - * in RFC 2426 Sec. 3.3.1 - */ - void setHasPhoneNumbers(const QList& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - foreach(const QUrl& v, value) - values << v; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nco#hasPhoneNumber", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/03/22/nco#hasPhoneNumber. - * A number for telephony communication with the object represented - * by this Contact. An equivalent of the 'TEL' property defined - * in RFC 2426 Sec. 3.3.1 - */ - void addHasPhoneNumber(const QUrl& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nco#hasPhoneNumber", QUrl::StrictMode), value); - } - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/03/22/nco#foafUrl. - * The URL of the FOAF file. - */ - QList foafUrls() const { - QList value; - foreach(const QVariant& v, m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nco#foafUrl", QUrl::StrictMode))) - value << v.value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/03/22/nco#foafUrl. - * The URL of the FOAF file. - */ - void setFoafUrls(const QList& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - foreach(const QUrl& v, value) - values << v; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nco#foafUrl", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/03/22/nco#foafUrl. - * The URL of the FOAF file. - */ - void addFoafUrl(const QUrl& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nco#foafUrl", QUrl::StrictMode), value); - } - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/03/22/nco#start. - * Start datetime for the role, such as: the datetime of joining - * a project or organization, datetime of starting employment, - * datetime of marriage - */ - QDateTime start() const { - QDateTime value; - if(m_res->contains(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nco#start", QUrl::StrictMode))) - value = m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nco#start", QUrl::StrictMode)).first().value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/03/22/nco#start. - * Start datetime for the role, such as: the datetime of joining - * a project or organization, datetime of starting employment, - * datetime of marriage - */ - void setStart(const QDateTime& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - values << value; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nco#start", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/03/22/nco#start. - * Start datetime for the role, such as: the datetime of joining - * a project or organization, datetime of starting employment, - * datetime of marriage - */ - void addStart(const QDateTime& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nco#start", QUrl::StrictMode), value); - } - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/03/22/nco#hasContactMedium. - * A superProperty for all properties linking a Contact to an instance - * of a contact medium. - */ - QList hasContactMediums() const { - QList value; - foreach(const QVariant& v, m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nco#hasContactMedium", QUrl::StrictMode))) - value << v.value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/03/22/nco#hasContactMedium. - * A superProperty for all properties linking a Contact to an instance - * of a contact medium. - */ - void setHasContactMediums(const QList& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - foreach(const QUrl& v, value) - values << v; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nco#hasContactMedium", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/03/22/nco#hasContactMedium. - * A superProperty for all properties linking a Contact to an instance - * of a contact medium. - */ - void addHasContactMedium(const QUrl& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nco#hasContactMedium", QUrl::StrictMode), value); - } - -protected: - virtual QUrl resourceType() const { return QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nco#Role", QUrl::StrictMode); } - -private: - Nepomuk2::SimpleResource* m_res; -}; -} -} - -#endif diff -Nru kdepim-runtime-4.12.3/agents/ontologies/nco/videoimaccount.h kdepim-runtime-4.12.90/agents/ontologies/nco/videoimaccount.h --- kdepim-runtime-4.12.3/agents/ontologies/nco/videoimaccount.h 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/agents/ontologies/nco/videoimaccount.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,38 +0,0 @@ -#ifndef _NCO_VIDEOIMACCOUNT_H_ -#define _NCO_VIDEOIMACCOUNT_H_ - -#include -#include -#include -#include -#include -#include -#include - -#include - -#include "nco/audioimaccount.h" -namespace Nepomuk2 { -namespace NCO { -/** - * Deprecated in favour of nco:imCapabilityVideo. - */ -class VideoIMAccount : public NCO::AudioIMAccount -{ -public: - VideoIMAccount(Nepomuk2::SimpleResource* res) - : NCO::AudioIMAccount(res), m_res(res) - {} - - virtual ~VideoIMAccount() {} - -protected: - virtual QUrl resourceType() const { return QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nco#VideoIMAccount", QUrl::StrictMode); } - -private: - Nepomuk2::SimpleResource* m_res; -}; -} -} - -#endif diff -Nru kdepim-runtime-4.12.3/agents/ontologies/nco/videotelephonenumber.h kdepim-runtime-4.12.90/agents/ontologies/nco/videotelephonenumber.h --- kdepim-runtime-4.12.3/agents/ontologies/nco/videotelephonenumber.h 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/agents/ontologies/nco/videotelephonenumber.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,39 +0,0 @@ -#ifndef _NCO_VIDEOTELEPHONENUMBER_H_ -#define _NCO_VIDEOTELEPHONENUMBER_H_ - -#include -#include -#include -#include -#include -#include -#include - -#include - -#include "nco/voicephonenumber.h" -namespace Nepomuk2 { -namespace NCO { -/** - * A Video telephone number. A class inspired by the TYPE=video - * parameter of the TEL property defined in RFC 2426 sec. 3.3.1 - */ -class VideoTelephoneNumber : public NCO::VoicePhoneNumber -{ -public: - VideoTelephoneNumber(Nepomuk2::SimpleResource* res) - : NCO::VoicePhoneNumber(res), m_res(res) - {} - - virtual ~VideoTelephoneNumber() {} - -protected: - virtual QUrl resourceType() const { return QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nco#VideoTelephoneNumber", QUrl::StrictMode); } - -private: - Nepomuk2::SimpleResource* m_res; -}; -} -} - -#endif diff -Nru kdepim-runtime-4.12.3/agents/ontologies/nco/voicephonenumber.h kdepim-runtime-4.12.90/agents/ontologies/nco/voicephonenumber.h --- kdepim-runtime-4.12.3/agents/ontologies/nco/voicephonenumber.h 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/agents/ontologies/nco/voicephonenumber.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,77 +0,0 @@ -#ifndef _NCO_VOICEPHONENUMBER_H_ -#define _NCO_VOICEPHONENUMBER_H_ - -#include -#include -#include -#include -#include -#include -#include - -#include - -#include "nco/phonenumber.h" -namespace Nepomuk2 { -namespace NCO { -/** - * A telephone number with voice communication capabilities. - * Class inspired by the TYPE=voice parameter of the TEL property - * defined in RFC 2426 sec. 3.3.1 - */ -class VoicePhoneNumber : public NCO::PhoneNumber -{ -public: - VoicePhoneNumber(Nepomuk2::SimpleResource* res) - : NCO::PhoneNumber(res), m_res(res) - {} - - virtual ~VoicePhoneNumber() {} - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/03/22/nco#voiceMail. - * Indicates if the given number accepts voice mail. (e.g. there - * is an answering machine). Inspired by TYPE=msg parameter of - * the TEL property defined in RFC 2426 sec. 3.3.1 - */ - bool voiceMail() const { - bool value; - if(m_res->contains(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nco#voiceMail", QUrl::StrictMode))) - value = m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nco#voiceMail", QUrl::StrictMode)).first().value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/03/22/nco#voiceMail. - * Indicates if the given number accepts voice mail. (e.g. there - * is an answering machine). Inspired by TYPE=msg parameter of - * the TEL property defined in RFC 2426 sec. 3.3.1 - */ - void setVoiceMail(const bool& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - values << value; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nco#voiceMail", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/03/22/nco#voiceMail. - * Indicates if the given number accepts voice mail. (e.g. there - * is an answering machine). Inspired by TYPE=msg parameter of - * the TEL property defined in RFC 2426 sec. 3.3.1 - */ - void addVoiceMail(const bool& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nco#voiceMail", QUrl::StrictMode), value); - } - -protected: - virtual QUrl resourceType() const { return QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nco#VoicePhoneNumber", QUrl::StrictMode); } - -private: - Nepomuk2::SimpleResource* m_res; -}; -} -} - -#endif diff -Nru kdepim-runtime-4.12.3/agents/ontologies/nmo/email.h kdepim-runtime-4.12.90/agents/ontologies/nmo/email.h --- kdepim-runtime-4.12.3/agents/ontologies/nmo/email.h 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/agents/ontologies/nmo/email.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,288 +0,0 @@ -#ifndef _NMO_EMAIL_H_ -#define _NMO_EMAIL_H_ - -#include -#include -#include -#include -#include -#include -#include - -#include - -#include "nmo/message.h" -namespace Nepomuk2 { -namespace NMO { -/** - * An email. - */ -class Email : public NMO::Message -{ -public: - Email(Nepomuk2::SimpleResource* res) - : NMO::Message(res), m_res(res) - {} - - virtual ~Email() {} - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#to. - * deprecated in favor of nmo:emailTo - */ - QList tos() const { - QList value; - foreach(const QVariant& v, m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#to", QUrl::StrictMode))) - value << v.value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#to. - * deprecated in favor of nmo:emailTo - */ - void setTos(const QList& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - foreach(const QUrl& v, value) - values << v; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#to", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#to. - * deprecated in favor of nmo:emailTo - */ - void addTo(const QUrl& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#to", QUrl::StrictMode), value); - } - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#cc. - * deprecated in favor of nmo:emailCc - */ - QList ccs() const { - QList value; - foreach(const QVariant& v, m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#cc", QUrl::StrictMode))) - value << v.value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#cc. - * deprecated in favor of nmo:emailCc - */ - void setCcs(const QList& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - foreach(const QUrl& v, value) - values << v; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#cc", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#cc. - * deprecated in favor of nmo:emailCc - */ - void addCc(const QUrl& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#cc", QUrl::StrictMode), value); - } - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#emailBcc. - * A Contact that is to receive a bcc of the email. A Bcc (blind carbon - * copy) is a copy of an email message sent to a recipient whose email - * address does not appear in the message. - */ - QList emailBccs() const { - QList value; - foreach(const QVariant& v, m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#emailBcc", QUrl::StrictMode))) - value << v.value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#emailBcc. - * A Contact that is to receive a bcc of the email. A Bcc (blind carbon - * copy) is a copy of an email message sent to a recipient whose email - * address does not appear in the message. - */ - void setEmailBccs(const QList& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - foreach(const QUrl& v, value) - values << v; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#emailBcc", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#emailBcc. - * A Contact that is to receive a bcc of the email. A Bcc (blind carbon - * copy) is a copy of an email message sent to a recipient whose email - * address does not appear in the message. - */ - void addEmailBcc(const QUrl& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#emailBcc", QUrl::StrictMode), value); - } - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#emailTo. - * The primary intended recipient of an email. - */ - QList emailTos() const { - QList value; - foreach(const QVariant& v, m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#emailTo", QUrl::StrictMode))) - value << v.value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#emailTo. - * The primary intended recipient of an email. - */ - void setEmailTos(const QList& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - foreach(const QUrl& v, value) - values << v; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#emailTo", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#emailTo. - * The primary intended recipient of an email. - */ - void addEmailTo(const QUrl& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#emailTo", QUrl::StrictMode), value); - } - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#contentMimeType. - * Key used to store the MIME type of the content of an object when - * it is different from the object's main MIME type. This value - * can be used, for example, to model an e-mail message whose mime - * type is"message/rfc822", but whose content has type "text/html". - * If not specified, the MIME type of the content defaults to the - * value specified by the 'mimeType' property. - */ - QString contentMimeType() const { - QString value; - if(m_res->contains(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#contentMimeType", QUrl::StrictMode))) - value = m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#contentMimeType", QUrl::StrictMode)).first().value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#contentMimeType. - * Key used to store the MIME type of the content of an object when - * it is different from the object's main MIME type. This value - * can be used, for example, to model an e-mail message whose mime - * type is"message/rfc822", but whose content has type "text/html". - * If not specified, the MIME type of the content defaults to the - * value specified by the 'mimeType' property. - */ - void setContentMimeType(const QString& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - values << value; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#contentMimeType", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#contentMimeType. - * Key used to store the MIME type of the content of an object when - * it is different from the object's main MIME type. This value - * can be used, for example, to model an e-mail message whose mime - * type is"message/rfc822", but whose content has type "text/html". - * If not specified, the MIME type of the content defaults to the - * value specified by the 'mimeType' property. - */ - void addContentMimeType(const QString& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#contentMimeType", QUrl::StrictMode), value); - } - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#emailCc. - * A Contact that is to receive a cc of the email. A cc (carbon copy) - * is a copy of an email message whose recipient appears on the recipient - * list, so that all other recipients are aware of it. - */ - QList emailCcs() const { - QList value; - foreach(const QVariant& v, m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#emailCc", QUrl::StrictMode))) - value << v.value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#emailCc. - * A Contact that is to receive a cc of the email. A cc (carbon copy) - * is a copy of an email message whose recipient appears on the recipient - * list, so that all other recipients are aware of it. - */ - void setEmailCcs(const QList& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - foreach(const QUrl& v, value) - values << v; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#emailCc", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#emailCc. - * A Contact that is to receive a cc of the email. A cc (carbon copy) - * is a copy of an email message whose recipient appears on the recipient - * list, so that all other recipients are aware of it. - */ - void addEmailCc(const QUrl& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#emailCc", QUrl::StrictMode), value); - } - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#bcc. - * deprecated in favor of nmo:emailBcc - */ - QList bccs() const { - QList value; - foreach(const QVariant& v, m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#bcc", QUrl::StrictMode))) - value << v.value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#bcc. - * deprecated in favor of nmo:emailBcc - */ - void setBccs(const QList& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - foreach(const QUrl& v, value) - values << v; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#bcc", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#bcc. - * deprecated in favor of nmo:emailBcc - */ - void addBcc(const QUrl& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#bcc", QUrl::StrictMode), value); - } - -protected: - virtual QUrl resourceType() const { return QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#Email", QUrl::StrictMode); } - -private: - Nepomuk2::SimpleResource* m_res; -}; -} -} - -#endif diff -Nru kdepim-runtime-4.12.3/agents/ontologies/nmo/immessage.h kdepim-runtime-4.12.90/agents/ontologies/nmo/immessage.h --- kdepim-runtime-4.12.3/agents/ontologies/nmo/immessage.h 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/agents/ontologies/nmo/immessage.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,38 +0,0 @@ -#ifndef _NMO_IMMESSAGE_H_ -#define _NMO_IMMESSAGE_H_ - -#include -#include -#include -#include -#include -#include -#include - -#include - -#include "nmo/message.h" -namespace Nepomuk2 { -namespace NMO { -/** - * A message sent with Instant Messaging software. - */ -class IMMessage : public NMO::Message -{ -public: - IMMessage(Nepomuk2::SimpleResource* res) - : NMO::Message(res), m_res(res) - {} - - virtual ~IMMessage() {} - -protected: - virtual QUrl resourceType() const { return QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#IMMessage", QUrl::StrictMode); } - -private: - Nepomuk2::SimpleResource* m_res; -}; -} -} - -#endif diff -Nru kdepim-runtime-4.12.3/agents/ontologies/nmo/mailboxdataobject.h kdepim-runtime-4.12.90/agents/ontologies/nmo/mailboxdataobject.h --- kdepim-runtime-4.12.3/agents/ontologies/nmo/mailboxdataobject.h 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/agents/ontologies/nmo/mailboxdataobject.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,38 +0,0 @@ -#ifndef _NMO_MAILBOXDATAOBJECT_H_ -#define _NMO_MAILBOXDATAOBJECT_H_ - -#include -#include -#include -#include -#include -#include -#include - -#include - -namespace Nepomuk2 { -namespace NMO { -/** - * An entity encountered in a mailbox. Most common interpretations - * for such an entity include Message or Folder - */ -class MailboxDataObject -{ -public: - MailboxDataObject(Nepomuk2::SimpleResource* res) - : m_res(res) - {} - - virtual ~MailboxDataObject() {} - -protected: - virtual QUrl resourceType() const { return QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#MailboxDataObject", QUrl::StrictMode); } - -private: - Nepomuk2::SimpleResource* m_res; -}; -} -} - -#endif diff -Nru kdepim-runtime-4.12.3/agents/ontologies/nmo/mailbox.h kdepim-runtime-4.12.90/agents/ontologies/nmo/mailbox.h --- kdepim-runtime-4.12.3/agents/ontologies/nmo/mailbox.h 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/agents/ontologies/nmo/mailbox.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,37 +0,0 @@ -#ifndef _NMO_MAILBOX_H_ -#define _NMO_MAILBOX_H_ - -#include -#include -#include -#include -#include -#include -#include - -#include - -namespace Nepomuk2 { -namespace NMO { -/** - * A mailbox - container for MailboxDataObjects. - */ -class Mailbox -{ -public: - Mailbox(Nepomuk2::SimpleResource* res) - : m_res(res) - {} - - virtual ~Mailbox() {} - -protected: - virtual QUrl resourceType() const { return QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#Mailbox", QUrl::StrictMode); } - -private: - Nepomuk2::SimpleResource* m_res; -}; -} -} - -#endif diff -Nru kdepim-runtime-4.12.3/agents/ontologies/nmo/message.h kdepim-runtime-4.12.90/agents/ontologies/nmo/message.h --- kdepim-runtime-4.12.3/agents/ontologies/nmo/message.h 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/agents/ontologies/nmo/message.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,831 +0,0 @@ -#ifndef _NMO_MESSAGE_H_ -#define _NMO_MESSAGE_H_ - -#include -#include -#include -#include -#include -#include -#include - -#include - -namespace Nepomuk2 { -namespace NMO { -/** - * A message. Could be an email, instant messanging message, SMS - * message etc. - */ -class Message -{ -public: - Message(Nepomuk2::SimpleResource* res) - : m_res(res) - {} - - virtual ~Message() {} - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#replyTo. - * deprecated in favor of nmo:messageReplyTo - */ - QList replyTos() const { - QList value; - foreach(const QVariant& v, m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#replyTo", QUrl::StrictMode))) - value << v.value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#replyTo. - * deprecated in favor of nmo:messageReplyTo - */ - void setReplyTos(const QList& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - foreach(const QUrl& v, value) - values << v; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#replyTo", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#replyTo. - * deprecated in favor of nmo:messageReplyTo - */ - void addReplyTo(const QUrl& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#replyTo", QUrl::StrictMode), value); - } - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#plainTextMessageContent. - * Plain text representation of the body of the message. For multipart - * messages, all parts are concatenated into the value of this - * property. Attachments, whose mimeTypes are different from - * text/plain or message/rfc822 are considered separate DataObjects - * and are therefore not included in the value of this property. - */ - QStringList plainTextMessageContents() const { - QStringList value; - foreach(const QVariant& v, m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#plainTextMessageContent", QUrl::StrictMode))) - value << v.value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#plainTextMessageContent. - * Plain text representation of the body of the message. For multipart - * messages, all parts are concatenated into the value of this - * property. Attachments, whose mimeTypes are different from - * text/plain or message/rfc822 are considered separate DataObjects - * and are therefore not included in the value of this property. - */ - void setPlainTextMessageContents(const QStringList& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - foreach(const QString& v, value) - values << v; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#plainTextMessageContent", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#plainTextMessageContent. - * Plain text representation of the body of the message. For multipart - * messages, all parts are concatenated into the value of this - * property. Attachments, whose mimeTypes are different from - * text/plain or message/rfc822 are considered separate DataObjects - * and are therefore not included in the value of this property. - */ - void addPlainTextMessageContent(const QString& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#plainTextMessageContent", QUrl::StrictMode), value); - } - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#secondaryRecipient. - * deprecated in favor of nmo:secondaryMessageRecipient - */ - QList secondaryRecipients() const { - QList value; - foreach(const QVariant& v, m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#secondaryRecipient", QUrl::StrictMode))) - value << v.value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#secondaryRecipient. - * deprecated in favor of nmo:secondaryMessageRecipient - */ - void setSecondaryRecipients(const QList& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - foreach(const QUrl& v, value) - values << v; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#secondaryRecipient", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#secondaryRecipient. - * deprecated in favor of nmo:secondaryMessageRecipient - */ - void addSecondaryRecipient(const QUrl& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#secondaryRecipient", QUrl::StrictMode), value); - } - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#hasAttachment. - * Links a message with files that were sent as attachments. - */ - QList hasAttachments() const { - QList value; - foreach(const QVariant& v, m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#hasAttachment", QUrl::StrictMode))) - value << v.value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#hasAttachment. - * Links a message with files that were sent as attachments. - */ - void setHasAttachments(const QList& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - foreach(const QUrl& v, value) - values << v; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#hasAttachment", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#hasAttachment. - * Links a message with files that were sent as attachments. - */ - void addHasAttachment(const QUrl& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#hasAttachment", QUrl::StrictMode), value); - } - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#secondaryMessageRecipient. - * A superproperty for all "additional" recipients of a message. - */ - QList secondaryMessageRecipients() const { - QList value; - foreach(const QVariant& v, m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#secondaryMessageRecipient", QUrl::StrictMode))) - value << v.value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#secondaryMessageRecipient. - * A superproperty for all "additional" recipients of a message. - */ - void setSecondaryMessageRecipients(const QList& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - foreach(const QUrl& v, value) - values << v; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#secondaryMessageRecipient", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#secondaryMessageRecipient. - * A superproperty for all "additional" recipients of a message. - */ - void addSecondaryMessageRecipient(const QUrl& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#secondaryMessageRecipient", QUrl::StrictMode), value); - } - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#messageId. - * An identifier of a message. This property has been inspired - * by the message-id property defined in RFC 2822, Sec. 3.6.4. - * It should be used for all kinds of identifiers used by various - * messaging applications to connect multiple messages into - * conversations. For email messageids, values are according - * to RFC2822/sec 3.6.4 and the literal value in RDF must include - * the brackets. - */ - QStringList messageIds() const { - QStringList value; - foreach(const QVariant& v, m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#messageId", QUrl::StrictMode))) - value << v.value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#messageId. - * An identifier of a message. This property has been inspired - * by the message-id property defined in RFC 2822, Sec. 3.6.4. - * It should be used for all kinds of identifiers used by various - * messaging applications to connect multiple messages into - * conversations. For email messageids, values are according - * to RFC2822/sec 3.6.4 and the literal value in RDF must include - * the brackets. - */ - void setMessageIds(const QStringList& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - foreach(const QString& v, value) - values << v; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#messageId", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#messageId. - * An identifier of a message. This property has been inspired - * by the message-id property defined in RFC 2822, Sec. 3.6.4. - * It should be used for all kinds of identifiers used by various - * messaging applications to connect multiple messages into - * conversations. For email messageids, values are according - * to RFC2822/sec 3.6.4 and the literal value in RDF must include - * the brackets. - */ - void addMessageId(const QString& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#messageId", QUrl::StrictMode), value); - } - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#messageFrom. - * The sender of the message - */ - QUrl messageFrom() const { - QUrl value; - if(m_res->contains(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#messageFrom", QUrl::StrictMode))) - value = m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#messageFrom", QUrl::StrictMode)).first().value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#messageFrom. - * The sender of the message - */ - void setMessageFrom(const QUrl& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - values << value; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#messageFrom", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#messageFrom. - * The sender of the message - */ - void addMessageFrom(const QUrl& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#messageFrom", QUrl::StrictMode), value); - } - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#messageSender. - * The person or agent submitting the message to the network, if - * other from the one given with the nmo:from property. Defined - * in RFC 822 sec. 4.4.2 - */ - QUrl messageSender() const { - QUrl value; - if(m_res->contains(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#messageSender", QUrl::StrictMode))) - value = m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#messageSender", QUrl::StrictMode)).first().value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#messageSender. - * The person or agent submitting the message to the network, if - * other from the one given with the nmo:from property. Defined - * in RFC 822 sec. 4.4.2 - */ - void setMessageSender(const QUrl& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - values << value; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#messageSender", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#messageSender. - * The person or agent submitting the message to the network, if - * other from the one given with the nmo:from property. Defined - * in RFC 822 sec. 4.4.2 - */ - void addMessageSender(const QUrl& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#messageSender", QUrl::StrictMode), value); - } - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#inReplyTo. - * Signifies that a message is a reply to another message. This - * feature is commonly used to link messages into conversations. - * Note that it is more specific than nmo:references. See RFC 2822 - * sec. 3.6.4 - */ - QUrl inReplyTo() const { - QUrl value; - if(m_res->contains(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#inReplyTo", QUrl::StrictMode))) - value = m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#inReplyTo", QUrl::StrictMode)).first().value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#inReplyTo. - * Signifies that a message is a reply to another message. This - * feature is commonly used to link messages into conversations. - * Note that it is more specific than nmo:references. See RFC 2822 - * sec. 3.6.4 - */ - void setInReplyTo(const QUrl& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - values << value; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#inReplyTo", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#inReplyTo. - * Signifies that a message is a reply to another message. This - * feature is commonly used to link messages into conversations. - * Note that it is more specific than nmo:references. See RFC 2822 - * sec. 3.6.4 - */ - void addInReplyTo(const QUrl& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#inReplyTo", QUrl::StrictMode), value); - } - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#from. - * deprecated in favor of nmo:messageFrom - */ - QList froms() const { - QList value; - foreach(const QVariant& v, m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#from", QUrl::StrictMode))) - value << v.value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#from. - * deprecated in favor of nmo:messageFrom - */ - void setFroms(const QList& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - foreach(const QUrl& v, value) - values << v; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#from", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#from. - * deprecated in favor of nmo:messageFrom - */ - void addFrom(const QUrl& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#from", QUrl::StrictMode), value); - } - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#sender. - * deprecated in favor of nmo:messageSender - */ - QList senders() const { - QList value; - foreach(const QVariant& v, m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#sender", QUrl::StrictMode))) - value << v.value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#sender. - * deprecated in favor of nmo:messageSender - */ - void setSenders(const QList& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - foreach(const QUrl& v, value) - values << v; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#sender", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#sender. - * deprecated in favor of nmo:messageSender - */ - void addSender(const QUrl& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#sender", QUrl::StrictMode), value); - } - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#htmlMessageContent. - * HTML representation of the body of the message. For multipart - * messages, all parts are concatenated into the value of this - * property. Attachments, whose mimeTypes are different from - * text/plain or message/rfc822 are considered separate DataObjects - * and are therefore not included in the value of this property. - */ - QStringList htmlMessageContents() const { - QStringList value; - foreach(const QVariant& v, m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#htmlMessageContent", QUrl::StrictMode))) - value << v.value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#htmlMessageContent. - * HTML representation of the body of the message. For multipart - * messages, all parts are concatenated into the value of this - * property. Attachments, whose mimeTypes are different from - * text/plain or message/rfc822 are considered separate DataObjects - * and are therefore not included in the value of this property. - */ - void setHtmlMessageContents(const QStringList& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - foreach(const QString& v, value) - values << v; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#htmlMessageContent", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#htmlMessageContent. - * HTML representation of the body of the message. For multipart - * messages, all parts are concatenated into the value of this - * property. Attachments, whose mimeTypes are different from - * text/plain or message/rfc822 are considered separate DataObjects - * and are therefore not included in the value of this property. - */ - void addHtmlMessageContent(const QString& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#htmlMessageContent", QUrl::StrictMode), value); - } - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#primaryMessageRecipient. - * The primary intended recipient of a message. - */ - QList primaryMessageRecipients() const { - QList value; - foreach(const QVariant& v, m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#primaryMessageRecipient", QUrl::StrictMode))) - value << v.value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#primaryMessageRecipient. - * The primary intended recipient of a message. - */ - void setPrimaryMessageRecipients(const QList& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - foreach(const QUrl& v, value) - values << v; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#primaryMessageRecipient", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#primaryMessageRecipient. - * The primary intended recipient of a message. - */ - void addPrimaryMessageRecipient(const QUrl& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#primaryMessageRecipient", QUrl::StrictMode), value); - } - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#sentDate. - * Date when this message was sent. - */ - QDateTime sentDate() const { - QDateTime value; - if(m_res->contains(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#sentDate", QUrl::StrictMode))) - value = m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#sentDate", QUrl::StrictMode)).first().value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#sentDate. - * Date when this message was sent. - */ - void setSentDate(const QDateTime& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - values << value; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#sentDate", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#sentDate. - * Date when this message was sent. - */ - void addSentDate(const QDateTime& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#sentDate", QUrl::StrictMode), value); - } - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#recipient. - * deprecated in favor of nmo:messageRecipient - */ - QList recipients() const { - QList value; - foreach(const QVariant& v, m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#recipient", QUrl::StrictMode))) - value << v.value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#recipient. - * deprecated in favor of nmo:messageRecipient - */ - void setRecipients(const QList& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - foreach(const QUrl& v, value) - values << v; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#recipient", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#recipient. - * deprecated in favor of nmo:messageRecipient - */ - void addRecipient(const QUrl& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#recipient", QUrl::StrictMode), value); - } - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#messageSubject. - * The subject of a message - */ - QString messageSubject() const { - QString value; - if(m_res->contains(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#messageSubject", QUrl::StrictMode))) - value = m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#messageSubject", QUrl::StrictMode)).first().value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#messageSubject. - * The subject of a message - */ - void setMessageSubject(const QString& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - values << value; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#messageSubject", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#messageSubject. - * The subject of a message - */ - void addMessageSubject(const QString& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#messageSubject", QUrl::StrictMode), value); - } - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#references. - * Signifies that a message references another message. This - * property is a generic one. See RFC 2822 Sec. 3.6.4 - */ - QList referenceses() const { - QList value; - foreach(const QVariant& v, m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#references", QUrl::StrictMode))) - value << v.value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#references. - * Signifies that a message references another message. This - * property is a generic one. See RFC 2822 Sec. 3.6.4 - */ - void setReferenceses(const QList& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - foreach(const QUrl& v, value) - values << v; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#references", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#references. - * Signifies that a message references another message. This - * property is a generic one. See RFC 2822 Sec. 3.6.4 - */ - void addReferences(const QUrl& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#references", QUrl::StrictMode), value); - } - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#messageRecipient. - * A common superproperty for all properties that link a message - * with its recipients. Please don't use this property directly. - */ - QList messageRecipients() const { - QList value; - foreach(const QVariant& v, m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#messageRecipient", QUrl::StrictMode))) - value << v.value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#messageRecipient. - * A common superproperty for all properties that link a message - * with its recipients. Please don't use this property directly. - */ - void setMessageRecipients(const QList& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - foreach(const QUrl& v, value) - values << v; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#messageRecipient", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#messageRecipient. - * A common superproperty for all properties that link a message - * with its recipients. Please don't use this property directly. - */ - void addMessageRecipient(const QUrl& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#messageRecipient", QUrl::StrictMode), value); - } - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#receivedDate. - * Date when this message was received. - */ - QDateTime receivedDate() const { - QDateTime value; - if(m_res->contains(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#receivedDate", QUrl::StrictMode))) - value = m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#receivedDate", QUrl::StrictMode)).first().value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#receivedDate. - * Date when this message was received. - */ - void setReceivedDate(const QDateTime& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - values << value; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#receivedDate", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#receivedDate. - * Date when this message was received. - */ - void addReceivedDate(const QDateTime& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#receivedDate", QUrl::StrictMode), value); - } - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#isRead. - * A flag that states the fact that a MailboxDataObject has been - * read. - */ - bool isRead() const { - bool value; - if(m_res->contains(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#isRead", QUrl::StrictMode))) - value = m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#isRead", QUrl::StrictMode)).first().value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#isRead. - * A flag that states the fact that a MailboxDataObject has been - * read. - */ - void setIsRead(const bool& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - values << value; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#isRead", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#isRead. - * A flag that states the fact that a MailboxDataObject has been - * read. - */ - void addIsRead(const bool& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#isRead", QUrl::StrictMode), value); - } - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#messageHeader. - * Links the message wiith an arbitrary message header. - */ - QUrl messageHeader() const { - QUrl value; - if(m_res->contains(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#messageHeader", QUrl::StrictMode))) - value = m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#messageHeader", QUrl::StrictMode)).first().value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#messageHeader. - * Links the message wiith an arbitrary message header. - */ - void setMessageHeader(const QUrl& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - values << value; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#messageHeader", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#messageHeader. - * Links the message wiith an arbitrary message header. - */ - void addMessageHeader(const QUrl& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#messageHeader", QUrl::StrictMode), value); - } - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#primaryRecipient. - * deprecated in favor of primaryMessageRecipient - */ - QList primaryRecipients() const { - QList value; - foreach(const QVariant& v, m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#primaryRecipient", QUrl::StrictMode))) - value << v.value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#primaryRecipient. - * deprecated in favor of primaryMessageRecipient - */ - void setPrimaryRecipients(const QList& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - foreach(const QUrl& v, value) - values << v; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#primaryRecipient", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#primaryRecipient. - * deprecated in favor of primaryMessageRecipient - */ - void addPrimaryRecipient(const QUrl& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#primaryRecipient", QUrl::StrictMode), value); - } - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#messageReplyTo. - * An address where the reply should be sent. - */ - QUrl messageReplyTo() const { - QUrl value; - if(m_res->contains(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#messageReplyTo", QUrl::StrictMode))) - value = m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#messageReplyTo", QUrl::StrictMode)).first().value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#messageReplyTo. - * An address where the reply should be sent. - */ - void setMessageReplyTo(const QUrl& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - values << value; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#messageReplyTo", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#messageReplyTo. - * An address where the reply should be sent. - */ - void addMessageReplyTo(const QUrl& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#messageReplyTo", QUrl::StrictMode), value); - } - -protected: - virtual QUrl resourceType() const { return QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#Message", QUrl::StrictMode); } - -private: - Nepomuk2::SimpleResource* m_res; -}; -} -} - -#endif diff -Nru kdepim-runtime-4.12.3/agents/ontologies/nmo/messageheader.h kdepim-runtime-4.12.90/agents/ontologies/nmo/messageheader.h --- kdepim-runtime-4.12.3/agents/ontologies/nmo/messageheader.h 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/agents/ontologies/nmo/messageheader.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,99 +0,0 @@ -#ifndef _NMO_MESSAGEHEADER_H_ -#define _NMO_MESSAGEHEADER_H_ - -#include -#include -#include -#include -#include -#include -#include - -#include - -namespace Nepomuk2 { -namespace NMO { -/** - * An arbitrary message header. - */ -class MessageHeader -{ -public: - MessageHeader(Nepomuk2::SimpleResource* res) - : m_res(res) - {} - - virtual ~MessageHeader() {} - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#headerName. - * Name of the message header. - */ - QString headerName() const { - QString value; - if(m_res->contains(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#headerName", QUrl::StrictMode))) - value = m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#headerName", QUrl::StrictMode)).first().value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#headerName. - * Name of the message header. - */ - void setHeaderName(const QString& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - values << value; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#headerName", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#headerName. - * Name of the message header. - */ - void addHeaderName(const QString& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#headerName", QUrl::StrictMode), value); - } - - /** - * Get property http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#headerValue. - * Value of the message header. - */ - QString headerValue() const { - QString value; - if(m_res->contains(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#headerValue", QUrl::StrictMode))) - value = m_res->property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#headerValue", QUrl::StrictMode)).first().value(); - return value; - } - - /** - * Set property http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#headerValue. - * Value of the message header. - */ - void setHeaderValue(const QString& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - QVariantList values; - values << value; - m_res->setProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#headerValue", QUrl::StrictMode), values); - } - - /** - * Add value to property http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#headerValue. - * Value of the message header. - */ - void addHeaderValue(const QString& value) { - m_res->addProperty(Soprano::Vocabulary::RDF::type(), resourceType()); - m_res->addProperty(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#headerValue", QUrl::StrictMode), value); - } - -protected: - virtual QUrl resourceType() const { return QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#MessageHeader", QUrl::StrictMode); } - -private: - Nepomuk2::SimpleResource* m_res; -}; -} -} - -#endif diff -Nru kdepim-runtime-4.12.3/agents/ontologies/nmo/mimeentity.h kdepim-runtime-4.12.90/agents/ontologies/nmo/mimeentity.h --- kdepim-runtime-4.12.3/agents/ontologies/nmo/mimeentity.h 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/agents/ontologies/nmo/mimeentity.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,37 +0,0 @@ -#ifndef _NMO_MIMEENTITY_H_ -#define _NMO_MIMEENTITY_H_ - -#include -#include -#include -#include -#include -#include -#include - -#include - -namespace Nepomuk2 { -namespace NMO { -/** - * A MIME entity, as defined in RFC2045, Section 2.4. - */ -class MimeEntity -{ -public: - MimeEntity(Nepomuk2::SimpleResource* res) - : m_res(res) - {} - - virtual ~MimeEntity() {} - -protected: - virtual QUrl resourceType() const { return QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#MimeEntity", QUrl::StrictMode); } - -private: - Nepomuk2::SimpleResource* m_res; -}; -} -} - -#endif diff -Nru kdepim-runtime-4.12.3/agents/strigifeeder/CMakeLists.txt kdepim-runtime-4.12.90/agents/strigifeeder/CMakeLists.txt --- kdepim-runtime-4.12.3/agents/strigifeeder/CMakeLists.txt 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/agents/strigifeeder/CMakeLists.txt 1970-01-01 00:00:00.000000000 +0000 @@ -1,41 +0,0 @@ -include_directories( - ${kdepim-runtime_SOURCE_DIR} - ${Boost_INCLUDE_DIR} -) - -set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${KDE4_ENABLE_EXCEPTIONS}" ) - - -########### next target ############### - -if ( STRIGIQTDBUSCLIENT_LIBRARY ) - -include_directories(${STRIGI_INCLUDE_DIR} ${STRIGI_INCLUDE_DIR}/strigi) - -set(strigi_feeder_SRCS - configdialog.cpp - strigifeeder.cpp -) - -kde4_add_kcfg_files(strigi_feeder_SRCS settings.kcfgc) -kde4_add_ui_files(strigi_feeder_SRCS configdialog.ui) - -if (NOT WINCE) - kde4_add_plugin(akonadi_strigi_feeder ${strigi_feeder_SRCS}) -else() - kde4_add_plugin(akonadi_strigi_feeder STATIC ${strigi_feeder_SRCS}) -endif() -target_link_libraries(akonadi_strigi_feeder - ${KDEPIMLIBS_AKONADI_LIBS} - ${KDEPIMLIBS_KMIME_LIBS} - ${QT_QTCORE_LIBRARY} - ${QT_QTDBUS_LIBRARY} - ${STRIGIQTDBUSCLIENT_LIBRARY} - ${KDE4_KIO_LIBS} - ${KDE4_KIDLETIME_LIBRARY} -) - -install(TARGETS akonadi_strigi_feeder DESTINATION ${PLUGIN_INSTALL_DIR}) -install(FILES strigifeeder.desktop DESTINATION "${CMAKE_INSTALL_PREFIX}/share/akonadi/agents") - -endif () diff -Nru kdepim-runtime-4.12.3/agents/strigifeeder/configdialog.cpp kdepim-runtime-4.12.90/agents/strigifeeder/configdialog.cpp --- kdepim-runtime-4.12.3/agents/strigifeeder/configdialog.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/agents/strigifeeder/configdialog.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,54 +0,0 @@ -/* - Copyright (c) 2006 Volker Krause - Copyright (c) 2008 Sebastian Trueg - - 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 "configdialog.h" - -#include "settings.h" - -#include -#include - -using namespace Akonadi_Strigifeeder_Agent; - -ConfigDialog::ConfigDialog( WId windowId, Settings *settings, QWidget * parent ) - : KDialog( parent ), - mSettings( settings ) -{ - ui.setupUi( mainWidget() ); - setButtons( Ok | Cancel ); - - if ( windowId ) - KWindowSystem::setMainWindow( this, windowId ); - - connect( this, SIGNAL(okClicked()), SLOT(save()) ); - - m_manager = new KConfigDialogManager( this, mSettings ); - m_manager->updateWidgets(); -} - - -void ConfigDialog::save() -{ - m_manager->updateSettings(); - mSettings->setNeedsReindexing( true ); - mSettings->writeConfig(); -} - -#include "configdialog.moc" diff -Nru kdepim-runtime-4.12.3/agents/strigifeeder/configdialog.h kdepim-runtime-4.12.90/agents/strigifeeder/configdialog.h --- kdepim-runtime-4.12.3/agents/strigifeeder/configdialog.h 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/agents/strigifeeder/configdialog.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,52 +0,0 @@ -/* - Copyright (c) 2006 Volker Krause - Copyright (c) 2008 Sebastian Trueg - - 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 CONFIGDIALOG_H -#define CONFIGDIALOG_H - -#include "ui_configdialog.h" - -#include - -class KConfigDialogManager; -namespace Akonadi_Strigifeeder_Agent { -class Settings; -} - -namespace Akonadi_Strigifeeder_Agent { -class ConfigDialog : public KDialog -{ - Q_OBJECT - - public: - explicit ConfigDialog( WId windowId, Akonadi_Strigifeeder_Agent::Settings *settings, QWidget* parent = 0 ); - - private Q_SLOTS: - void save(); - - private: - KConfigDialogManager *m_manager; - Akonadi_Strigifeeder_Agent::Settings *mSettings; - Ui::StrigiFeederConfigDialog ui; -}; - -} - -#endif diff -Nru kdepim-runtime-4.12.3/agents/strigifeeder/configdialog.ui kdepim-runtime-4.12.90/agents/strigifeeder/configdialog.ui --- kdepim-runtime-4.12.3/agents/strigifeeder/configdialog.ui 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/agents/strigifeeder/configdialog.ui 1970-01-01 00:00:00.000000000 +0000 @@ -1,98 +0,0 @@ - - - StrigiFeederConfigDialog - - - - 0 - 0 - 400 - 300 - - - - - - - Initial Index Aggressiveness - - - - - - Cache content only - - - - - - - Local and cached content - - - true - - - - - - - Everything - - - - - - - - - - Encrypted Emails - - - 0 - - - - - - Do not index encrypted content - - - - - - - Decrypt and use cleartext index - - - - - - - - - - Qt::Vertical - - - - 20 - 172 - - - - - - - - - KButtonGroup - QGroupBox -
kbuttongroup.h
- 1 -
-
- - -
diff -Nru kdepim-runtime-4.12.3/agents/strigifeeder/Messages.sh kdepim-runtime-4.12.90/agents/strigifeeder/Messages.sh --- kdepim-runtime-4.12.3/agents/strigifeeder/Messages.sh 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/agents/strigifeeder/Messages.sh 1970-01-01 00:00:00.000000000 +0000 @@ -1,3 +0,0 @@ -#! /bin/sh -$EXTRACTRC *.ui *.kcfg >> rc.cpp -$XGETTEXT *.cpp -o $podir/akonadi_strigi_feeder.pot diff -Nru kdepim-runtime-4.12.3/agents/strigifeeder/settings.kcfgc kdepim-runtime-4.12.90/agents/strigifeeder/settings.kcfgc --- kdepim-runtime-4.12.3/agents/strigifeeder/settings.kcfgc 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/agents/strigifeeder/settings.kcfgc 1970-01-01 00:00:00.000000000 +0000 @@ -1,8 +0,0 @@ -File=strigifeeder.kcfg -ClassName=Settings -Mutators=true -ItemAccessors=true -SetUserTexts=true -Singleton=false -GlobalEnums=true -Namespace=Akonadi_Strigifeeder_Agent diff -Nru kdepim-runtime-4.12.3/agents/strigifeeder/strigifeeder.cpp kdepim-runtime-4.12.90/agents/strigifeeder/strigifeeder.cpp --- kdepim-runtime-4.12.3/agents/strigifeeder/strigifeeder.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/agents/strigifeeder/strigifeeder.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,447 +0,0 @@ -/* - Copyright (c) 2006 - 2007 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 "strigifeeder.h" - -#include "configdialog.h" -#include "settings.h" - -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include - -#include - -using namespace Akonadi; -using namespace Akonadi_Strigifeeder_Agent; - -static const int INDEX_COMPAT_LEVEL = 1; // increment when the index format changes - -static inline bool entityIsHidden( const Entity &entity ) -{ - return entity.hasAttribute(); -} - -StrigiFeeder::StrigiFeeder( const QString &id ) - : AgentBase( id ), - mTotalAmount( 0 ), - mProcessedAmount( 0 ), - mPendingJobs( 0 ), - mIndexCompatLevel( 1 ), - mStrigiDaemonStartupAttempted( false ), - mInitialUpdateDone( false ), - mSelfTestPassed( false ), -#ifndef _WIN32_WCE - mSystemIsIdle( false ), -#endif - mSettings( new Settings( componentData().config() ) ), - mStrigiDBusWatcher( QLatin1String( "org.freedesktop.xesam.searcher" ), QDBusConnection::sessionBus() ) -{ -#ifdef _WIN32_WCE - QThread::currentThread()->setPriority( QThread::LowestPriority ); -#endif - setIndexCompatibilityLevel( INDEX_COMPAT_LEVEL ); - - changeRecorder()->setAllMonitored(); - changeRecorder()->itemFetchScope().fetchFullPayload(); - changeRecorder()->itemFetchScope().setAncestorRetrieval( ItemFetchScope::Parent ); - - mStrigiDaemonStartupTimeout.setInterval( 300 * 1000 ); - mStrigiDaemonStartupTimeout.setSingleShot( true ); - connect( &mStrigiDaemonStartupTimeout, SIGNAL(timeout()), SLOT(selfTest()) ); - connect( this, SIGNAL(fullyIndexed()), this, SLOT(slotFullyIndexed()) ); - - connect( &mStrigiDBusWatcher, SIGNAL(serviceRegistered(QString)), this, SLOT(selfTest()) ); - connect( &mStrigiDBusWatcher, SIGNAL(serviceUnregistered(QString)), this, SLOT(selfTest()) ); - -// Do not use Idle detection for wince, because it does not work properly -// it could be inplemented, but the scheduler is just a round robin over -// priority classes, so if we set the prority low, it will suspend the thread -// if the user does something -#ifndef _WIN32_WCE - connect( KIdleTime::instance(), SIGNAL(timeoutReached(int)), SLOT(systemIdle()) ); - connect( KIdleTime::instance(), SIGNAL(resumingFromIdle()), SLOT(systemResumed()) ); - KIdleTime::instance()->addIdleTimeout( 10 * 1000 ); -#endif - - checkOnline(); - QTimer::singleShot( 0, this, SLOT(selfTest()) ); -} - -StrigiFeeder::~StrigiFeeder() -{ - delete mSettings; -} - -void StrigiFeeder::configure( WId windowId ) -{ - Akonadi_Strigifeeder_Agent::ConfigDialog dlg( windowId, mSettings ); - if ( dlg.exec() ) { - mSettings->writeConfig(); - emit configurationDialogAccepted(); - - QTimer::singleShot( 0, this, SLOT(selfTest()) ); - } else { - emit configurationDialogRejected(); - } -} - -void StrigiFeeder::setIndexCompatibilityLevel( int level ) -{ - mIndexCompatLevel = level; -} - -void StrigiFeeder::updateAll() -{ - CollectionFetchJob *collectionFetch = new CollectionFetchJob( Collection::root(), CollectionFetchJob::Recursive, this ); - connect( collectionFetch, SIGNAL(collectionsReceived(Akonadi::Collection::List)), SLOT(collectionsReceived(Akonadi::Collection::List)) ); -} - -static KUrl extendedItemUrl( const Item &item ) -{ - KUrl url = item.url(); - url.addQueryItem( "collection", QString::number( item.parentCollection().id() ) ); - url.addQueryItem( "mimetype", item.mimeType() ); - - return url; -} - -void StrigiFeeder::indexItem( const Item &item ) -{ - const QByteArray data = item.payloadData(); - mStrigi.indexFile( extendedItemUrl( item ).url(), QDateTime::currentDateTime().toTime_t(), data ); -} - -void StrigiFeeder::itemAdded( const Akonadi::Item &item, const Akonadi::Collection &collection ) -{ - if ( entityIsHidden( collection ) ) - return; - - if ( collection.isVirtual() ) - return; - - if ( item.hasPayload() ) { - indexItem( item ); - } else { - const ItemFetchScope scope = fetchScopeForCollection( collection ); - if ( scope.fullPayload() || !scope.payloadParts().isEmpty() ) { - ItemFetchJob *job = new ItemFetchJob( item ); - job->setFetchScope( scope ); - connect( job, SIGNAL(itemsReceived(Akonadi::Item::List)), - SLOT(notificationItemsReceived(Akonadi::Item::List)) ); - } - } -} - -void StrigiFeeder::itemChanged( const Akonadi::Item &item, const QSet& ) -{ - if ( entityIsHidden( item.parentCollection() ) ) - return; - - if ( item.hasPayload() ) { - indexItem( item ); - } else { - const Collection collection = item.parentCollection(); - const ItemFetchScope scope = fetchScopeForCollection( collection ); - if ( scope.fullPayload() || !scope.payloadParts().isEmpty() ) { - ItemFetchJob *job = new ItemFetchJob( item ); - job->setFetchScope( scope ); - connect( job, SIGNAL(itemsReceived(Akonadi::Item::List)), - SLOT(notificationItemsReceived(Akonadi::Item::List)) ); - } - } -} - -void StrigiFeeder::itemRemoved( const Akonadi::Item &item ) -{ - mStrigi.indexFile( extendedItemUrl( item ).url(), QDateTime::currentDateTime().toTime_t(), QByteArray() ); -} - -void StrigiFeeder::itemMoved( const Akonadi::Item &item, const Akonadi::Collection &collectionSource, - const Akonadi::Collection &collectionDestination ) -{ - Item changedItem( item ); - - // since the index url contains the parent collection id, we have to remove the old index and add - // a new one when items move between collections - changedItem.setParentCollection( collectionSource ); - mStrigi.indexFile( extendedItemUrl( item ).url(), QDateTime::currentDateTime().toTime_t(), QByteArray() ); - - changedItem.setParentCollection( collectionDestination ); - indexItem( changedItem ); -} - -void StrigiFeeder::collectionsReceived( const Akonadi::Collection::List &collections ) -{ - foreach ( const Collection &collection, collections ) { - if ( entityIsHidden( collection ) ) - continue; - - if ( collection.isVirtual() ) - continue; - - mCollectionQueue.append( collection ); - } - - if ( mPendingJobs == 0 ) { - processNextCollection(); - } -} - -void StrigiFeeder::processNextCollection() -{ - if ( mCurrentCollection.isValid() ) - return; - - if ( mCollectionQueue.isEmpty() ) { - emit fullyIndexed(); - mSettings->setNeedsReindexing( false ); - return; - } - - mCurrentCollection = mCollectionQueue.takeFirst(); - emit status( AgentBase::Running, i18n( "Indexing collection '%1'...", mCurrentCollection.name() ) ); - - ItemFetchJob *itemFetch = new ItemFetchJob( mCurrentCollection, this ); - itemFetch->fetchScope().setCacheOnly( true ); - connect( itemFetch, SIGNAL(itemsReceived(Akonadi::Item::List)), SLOT(itemHeadersReceived(Akonadi::Item::List)) ); - connect( itemFetch, SIGNAL(result(KJob*)), SLOT(itemFetchResult(KJob*)) ); - ++mPendingJobs; - mTotalAmount = 0; -} - -void StrigiFeeder::itemHeadersReceived( const Akonadi::Item::List &items ) -{ - const QSet indexedItems = mStrigi.getIndexedFiles().toSet(); - - Akonadi::Item::List itemsToUpdate; - foreach ( const Item &item, items ) { - if ( item.storageCollectionId() != mCurrentCollection.id() ) - continue; // stay away from links - - // update item if it does not exist - if ( !indexedItems.contains( extendedItemUrl( item ).url() ) ) - itemsToUpdate.append( item ); - } - - if ( !itemsToUpdate.isEmpty() ) { - ItemFetchJob *itemFetch = new ItemFetchJob( itemsToUpdate, this ); - itemFetch->setFetchScope( fetchScopeForCollection( mCurrentCollection ) ); - connect( itemFetch, SIGNAL(itemsReceived(Akonadi::Item::List)), SLOT(itemsReceived(Akonadi::Item::List)) ); - connect( itemFetch, SIGNAL(result(KJob*)), SLOT(itemFetchResult(KJob*)) ); - ++mPendingJobs; - mTotalAmount += itemsToUpdate.size(); - } -} - -void StrigiFeeder::itemFetchResult( KJob *job ) -{ - if ( job->error() ) - kDebug() << job->errorString(); - - --mPendingJobs; - if ( mPendingJobs == 0 ) { - mCurrentCollection = Collection(); - emit status( Idle, i18n( "Indexing completed." ) ); - processNextCollection(); - return; - } -} - -void StrigiFeeder::itemsReceived( const Akonadi::Item::List &items ) -{ - foreach ( const Item &item, items ) { - // we only get here if the item is not anywhere in strigi yet, so no need to delete it - indexItem( item ); - } - mProcessedAmount += items.count(); - emit percent( (mProcessedAmount * 100) / (mTotalAmount * 100) ); -} - -void StrigiFeeder::notificationItemsReceived( const Akonadi::Item::List &items ) -{ - foreach ( const Item &item, items ) { - if ( !item.hasPayload() ) - continue; - - indexItem( item ); - } -} - -void StrigiFeeder::selfTest() -{ - QStringList errorMessages; - mSelfTestPassed = false; - - QDBusInterface strigiInterface( QLatin1String( "org.freedesktop.xesam.searcher" ), - QLatin1String( "/org/freedesktop/xesam/searcher/main" ), - QLatin1String( "org.freedesktop.xesam.Search" ), - QDBusConnection::sessionBus(), this ); - - // if strigidaemon is not running, try to start it - if ( !mStrigiDaemonStartupAttempted && !strigiInterface.isValid() ) { - KProcess process; - const QString strigidaemon = KStandardDirs::findExe( QLatin1String( "strigidaemon" ) ); - if ( process.startDetached( strigidaemon ) == 0 ) { - errorMessages.append( i18n( "Unable to start the Strigi daemon." ) ); - } else { - mStrigiDaemonStartupAttempted = true; - mStrigiDaemonStartupTimeout.start(); - // wait for strigidaemon to start - checkOnline(); - emit status( Broken, i18n( "Waiting for the Strigi daemon to start..." ) ); - return; - } - } - - if ( strigiInterface.isValid() ) { - // everything ok - } else if ( mStrigiDaemonStartupAttempted && mStrigiDaemonStartupTimeout.isActive() ) { - // still waiting for strigidaemon to start - setOnline( false ); - emit status( Broken, i18n( "Waiting for the Strigi daemon to start..." ) ); - return; - } else { - errorMessages.append( i18n( "Strigi daemon is not running." ) ); - } - - if ( errorMessages.isEmpty() ) { - mSelfTestPassed = true; - mStrigiDaemonStartupAttempted = false; // everything worked, we can try again if the server goes down later - mStrigiDaemonStartupTimeout.stop(); - checkOnline(); - if ( !mInitialUpdateDone && needsReIndexing() ) { - mInitialUpdateDone = true; - QTimer::singleShot( 0, this, SLOT(updateAll()) ); - } else { - emit status( Idle, i18n( "Ready to index data." ) ); - } - return; - } - - checkOnline(); - - QString message = i18n( "Strigi Indexing Agent Has Been Disabled
" - "The Strigi service is not available or fully operational and attempts to rectify this have failed. " - "Therefore indexing of all data stored in the Akonadi PIM service has been disabled, which will " - "severely limit the capabilities of any application using this data.

" - "The following problems were detected:
  • %1
" - "Additional help can be found here: userbase.kde.org/Akonadi", - errorMessages.join( QLatin1String( "
  • " ) ) ); - - emit status( Broken, i18n( "Strigi not operational" ) ); - KMessageBox::error( 0, message, i18n( "Strigi Indexing Disabled" ), KMessageBox::Notify | KMessageBox::AllowLink ); -} - -bool StrigiFeeder::needsReIndexing() const -{ - const KConfigGroup group( componentData().config(), "InitialIndexing" ); - return mSettings->needsReindexing() - || mIndexCompatLevel > group.readEntry( "IndexCompatLevel", 0 ); -} - -ItemFetchScope StrigiFeeder::fetchScopeForCollection( const Akonadi::Collection &collection ) -{ - ItemFetchScope scope = changeRecorder()->itemFetchScope(); - - switch ( mSettings->indexAggressiveness() ) { - case Settings::LocalAndCached: - { - const QStringList localResources = QStringList() - << QLatin1String( "akonadi_mixedmaildir_resource" ) - << QLatin1String( "akonadi_maildir_resource" ) - << QLatin1String( "akonadi_mbox_resource" ) - << QLatin1String( "akonadi_contacts_resource" ); - scope.setCacheOnly( !localResources.contains( collection.resource() ) ); - break; - } - case Settings::Everything: - scope.setCacheOnly( false ); - break; - case Settings::CachedOnly: - default: - scope.setCacheOnly( true ); - } - - scope.fetchFullPayload( true ); - - return scope; -} - -void StrigiFeeder::slotFullyIndexed() -{ - KConfigGroup group( componentData().config(), "InitialIndexing" ); - group.writeEntry( "IndexCompatLevel", mIndexCompatLevel ); - group.sync(); -} - -void StrigiFeeder::doSetOnline( bool online ) -{ - changeRecorder()->setChangeRecordingEnabled( !online ); - Akonadi::AgentBase::doSetOnline( online ); -} - -void StrigiFeeder::checkOnline() -{ -#ifdef _WIN32_WCE - setOnline( mSelfTestPassed ); -#else - setOnline( mSelfTestPassed && mSystemIsIdle ); -#endif -} - - -void StrigiFeeder::systemIdle() -{ - emit status( Idle, i18n( "System idle, ready to index data." ) ); -#ifndef _WIN32_WCE - mSystemIsIdle = true; - KIdleTime::instance()->catchNextResumeEvent(); -#endif - checkOnline(); -} - -void StrigiFeeder::systemResumed() -{ - emit status( Idle, i18n( "System busy, indexing suspended." ) ); -#ifndef _WIN32_WCE - mSystemIsIdle = false; -#endif - checkOnline(); -} - -AKONADI_AGENT_FACTORY( StrigiFeeder, akonadi_strigi_feeder ) - -#include "strigifeeder.moc" diff -Nru kdepim-runtime-4.12.3/agents/strigifeeder/strigifeeder.desktop kdepim-runtime-4.12.90/agents/strigifeeder/strigifeeder.desktop --- kdepim-runtime-4.12.3/agents/strigifeeder/strigifeeder.desktop 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/agents/strigifeeder/strigifeeder.desktop 1970-01-01 00:00:00.000000000 +0000 @@ -1,100 +0,0 @@ -[Desktop Entry] -Name=Strigi Feeder -Name[bs]=Strigi dovod -Name[ca]=Alimentador de l'Strigi -Name[ca@valencia]=Alimentador de l'Strigi -Name[cs]=Podavač strigi -Name[da]=Strigi-feeder -Name[de]=Modul für Strigi -Name[el]=Τροφοδότης Strigi -Name[en_GB]=Strigi Feeder -Name[es]=Alimentador Strigi -Name[et]=Strigi söötur -Name[fi]=Strigi-syötteistin -Name[fr]=Connecteur Strigi -Name[ga]=Fothaire Strigi -Name[gl]=Fornecedor de Strigi -Name[hu]=Strigi feltöltő -Name[ia]=Syndication de Strigi -Name[it]=Fornitore per Strigi -Name[ja]=Strigi フィーダー -Name[kk]=Strigi іздеу -Name[km]=កម្មវិធី​អាន​មតិ​ព័ត៌មាន Strigi -Name[ko]=Strigi 공급자 -Name[lt]=Strigi šaltinis -Name[lv]=Strigi barotājs -Name[nb]=Sender til Strigi -Name[nds]=Strigi-Ingaav -Name[nl]=Strigi-toevoer -Name[pa]=ਸਟਰੀਗੀ ਫੀਡਰ -Name[pl]=Podajnik Strigi -Name[pt]=Fonte do Strigi -Name[pt_BR]=Fonte do Strigi -Name[ro]=Alimentator Strigi -Name[ru]=Поддержка Strigi -Name[sk]=Podávač Strigi -Name[sl]=Podajalnik za Strigi -Name[sr]=Стригијев уводник -Name[sr@ijekavian]=Стригијев уводник -Name[sr@ijekavianlatin]=Strigijev uvodnik -Name[sr@latin]=Strigijev uvodnik -Name[sv]=Inmatning till Strigi -Name[tr]=Strigi Besleyici -Name[uk]=Передавач Strigi -Name[x-test]=xxStrigi Feederxx -Name[zh_CN]=Strigi 采集器 -Name[zh_TW]=Strigi Feeder -Comment=Strigi-based fulltext search -Comment[bs]=Strigi-bazirana puna pretraga teksta -Comment[ca]=Cerca de text complet basada en Strigi -Comment[ca@valencia]=Cerca de text complet basada en Strigi -Comment[cs]=Plnotextové vyhledávání založené na Strigi -Comment[da]=Strigi-baseret fuldtekst-søgning -Comment[de]=Strigi-basierte Volltextsuche -Comment[el]=Αναζήτηση κειμένου βασισμένη στο Strigi -Comment[en_GB]=Strigi-based fulltext search -Comment[es]=Búsqueda de texto basada en Strigi -Comment[et]=Strigi-põhine täistekstiotsing -Comment[fi]=Strigiin perustuva kokotekstihaku -Comment[fr]=Recherche avec Strigi en texte intégral -Comment[ga]=Cuardach lántéacs bunaithe ar Strigi -Comment[gl]=Procura de texto completo baseada en Strigi -Comment[hu]=Strigi-alapú teljes szöveges kereső -Comment[ia]=Cerca de plen texto basate sur Strigi -Comment[it]=Ricerca su tutto il testo basata su Strigi -Comment[ja]=Strigi ベースの全文検索 -Comment[kk]=Strigi-негіздейтін толық мәтінді іздеу -Comment[km]=ស្វែងរក​អត្ថបទ​ពេញលេញ​មាន​មូលដ្ឋាន​លើ Strigi -Comment[ko]=Strigi 기반 전문 검색 -Comment[lt]=Viso teksto paieška, paremta Strigi -Comment[lv]=Strigi bāzēta pilna teksta meklēšana -Comment[nb]=Strigi-basert fulltekstsøk -Comment[nds]=Heeltextsöök mit Strigi -Comment[ne]=स्ट्रिगि-आधारित पूरा पाठ खोजी -Comment[nl]=In teksten zoeken met behulp van Strigi -Comment[pl]=Oparte na Strigi wyszukiwanie pełnotekstowe -Comment[pt]=Pesquisa por texto completo baseada no Strigi -Comment[pt_BR]=Pesquisa por texto completo baseada no Strigi -Comment[ro]=Căutare integrală de text bazată pe Strigi -Comment[ru]=Полнотекстовый поиск посредством Strigi -Comment[sk]=Fulltextové hľadanie založené na Strigi -Comment[sl]=Iskanje po vsem besedilu, ki temelji na Strigi -Comment[sr]=Целотекстуална претрага на основу Стригија -Comment[sr@ijekavian]=Целотекстуална претрага на основу Стригија -Comment[sr@ijekavianlatin]=Celotekstualna pretraga na osnovu Strigija -Comment[sr@latin]=Celotekstualna pretraga na osnovu Strigija -Comment[sv]=Fulltextsökning baserad på Strigi -Comment[tr]=Strigi-tabanlı tam metin araması -Comment[uk]=Повнотекстовий пошук на основі Strigi -Comment[wa]=Cweraedje dins tos l' tecse båzé so Strigi -Comment[x-test]=xxStrigi-based fulltext searchxx -Comment[zh_CN]=基于 Strigi 的全文搜索 -Comment[zh_TW]=使用 Strigi 的全文檢索 -Icon=strigi -Type=AkonadiAgent -Exec=akonadi_strigi_feeder - -X-Akonadi-MimeTypes=all/all -X-Akonadi-Capabilities=Unique,Autostart -X-Akonadi-Identifier=akonadi_strigi_feeder -X-Akonadi-LaunchMethod=AgentServer diff -Nru kdepim-runtime-4.12.3/agents/strigifeeder/strigifeeder.h kdepim-runtime-4.12.90/agents/strigifeeder/strigifeeder.h --- kdepim-runtime-4.12.3/agents/strigifeeder/strigifeeder.h 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/agents/strigifeeder/strigifeeder.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,109 +0,0 @@ -/* - Copyright (c) 2006 - 2007 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_STRIGI_FEEDER_H -#define AKONADI_STRIGI_FEEDER_H - -#include -#include -#include -#include - -class KJob; -class QDBusServiceWatcher; -namespace Akonadi_Strigifeeder_Agent { -class Settings; -} - -namespace Akonadi { - -class ItemFetchScope; - -/** - Full text search provider using strigi. -*/ -class StrigiFeeder : public AgentBase, public AgentBase::ObserverV2 -{ - Q_OBJECT - - public: - explicit StrigiFeeder( const QString &id ); - ~StrigiFeeder(); - - void configure( WId windowId ); - - /** - * Set the index compatibility level. If the current level is below this, a full re-indexing is performed. - */ - void setIndexCompatibilityLevel( int level ); - - public Q_SLOTS: - /** Trigger a complete update of all items. */ - void updateAll(); - - Q_SIGNALS: - void fullyIndexed(); - - protected: - void itemAdded( const Akonadi::Item &item, const Akonadi::Collection &collection ); - void itemChanged( const Akonadi::Item &item, const QSet &partIdentifiers ); - void itemRemoved( const Akonadi::Item &item ); - void itemMoved( const Akonadi::Item &item, const Akonadi::Collection &collectionSource, - const Akonadi::Collection &collectionDestination ); - - void doSetOnline( bool online ); - - private Q_SLOTS: - void collectionsReceived( const Akonadi::Collection::List &collections ); - void itemHeadersReceived( const Akonadi::Item::List &items ); - void itemsReceived( const Akonadi::Item::List &items ); - void notificationItemsReceived( const Akonadi::Item::List &items ); - void itemFetchResult( KJob *job ); - - void selfTest(); - void slotFullyIndexed(); - void systemIdle(); - void systemResumed(); - - private: - void processNextCollection(); - void checkOnline(); - bool needsReIndexing() const; - Akonadi::ItemFetchScope fetchScopeForCollection( const Akonadi::Collection &collection ); - - void indexItem( const Item &item ); - - StrigiClient mStrigi; - - Akonadi::Collection::List mCollectionQueue; - Akonadi::Collection mCurrentCollection; - int mTotalAmount, mProcessedAmount, mPendingJobs; - QTimer mStrigiDaemonStartupTimeout; - int mIndexCompatLevel; - bool mStrigiDaemonStartupAttempted; - bool mInitialUpdateDone; - bool mSelfTestPassed; - bool mSystemIsIdle; - Akonadi_Strigifeeder_Agent::Settings *mSettings; - QDBusServiceWatcher mStrigiDBusWatcher; -}; - -} - -#endif diff -Nru kdepim-runtime-4.12.3/agents/strigifeeder/strigifeeder.kcfg kdepim-runtime-4.12.90/agents/strigifeeder/strigifeeder.kcfg --- kdepim-runtime-4.12.3/agents/strigifeeder/strigifeeder.kcfg 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/agents/strigifeeder/strigifeeder.kcfg 1970-01-01 00:00:00.000000000 +0000 @@ -1,34 +0,0 @@ - - - - - - false - - - - - - - - - - NoIndexing - - - - - - - - - - - LocalAndCached - - - diff -Nru kdepim-runtime-4.12.3/CMakeLists.txt kdepim-runtime-4.12.90/CMakeLists.txt --- kdepim-runtime-4.12.3/CMakeLists.txt 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/CMakeLists.txt 2014-03-13 08:12:29.000000000 +0000 @@ -3,8 +3,6 @@ # where to look first for cmake modules. This line must be the first one or cmake will use the system's FindFoo.cmake set(CMAKE_MODULE_PATH ${kdepim-runtime_SOURCE_DIR}/cmake/modules) -add_definitions( -DDISABLE_NEPOMUK_LEGACY ) - ############### KDEPIM-Runtime version ################ # KDEPIM_RUNTIME_VERSION # Version scheme: "x.y.z build". @@ -35,28 +33,27 @@ # 3.2 alpha1 if(NOT DEFINED KDEPIM_RUNTIME_DEV_VERSION) - set(KDEPIM_RUNTIME_DEV_VERSION "") + set(KDEPIM_RUNTIME_DEV_VERSION "beta2") endif() -set(KDEPIM_RUNTIME_VERSION "4.12.3${KDEPIM_RUNTIME_DEV_VERSION}") +set(KDEPIM_RUNTIME_VERSION "4.13${KDEPIM_RUNTIME_DEV_VERSION}") -############### search-related options ################ -option(KDEPIM_NO_NEPOMUK "Build without nepomuk dependency" FALSE) +configure_file(kdepim-runtime-version.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/kdepim-runtime-version.h @ONLY) -if(KDEPIM_NO_NEPOMUK) - add_definitions(-DKDEPIM_NO_NEPOMUK) -endif() +############### search-related options ################ -add_definitions(-DQT_USE_FAST_CONCATENATION -DQT_USE_FAST_OPERATOR_PLUS) +add_definitions(-DQT_USE_QSTRINGBUILDER) ############### search packages used by KDE ############### +set(CMAKE_AUTOMOC ON) + # Kdelibs -find_package(KDE4 4.11.3 REQUIRED) +find_package(KDE4 4.12.0 REQUIRED) include(KDE4Defaults) # KdepimLibs -find_package(KdepimLibs 4.12.3) +find_package(KdepimLibs 4.12.90) set_package_properties(KdepimLibs PROPERTIES DESCRIPTION "The KDEPIM libraries" URL "http://www.kde.org" TYPE REQUIRED) #Boost @@ -66,37 +63,19 @@ set_package_properties(Boost PROPERTIES DESCRIPTION "Boost C++ Libraries" URL "http://www.boost.org" TYPE REQUIRED PURPOSE "Boost is required by Akonadi") # Akonadi -find_package(Akonadi 1.9.80 QUIET CONFIG) +find_package(Akonadi 1.11.80 QUIET CONFIG) set_package_properties(Akonadi PROPERTIES DESCRIPTION "Akonadi server libraries" URL "http://pim.kde.org/akonadi" TYPE REQUIRED PURPOSE "Access to PIM storage and services") # shared-mime-info find_package(SharedMimeInfo 0.30) set_package_properties(SharedMimeInfo PROPERTIES DESCRIPTION "The shared-mime-info utility" URL "http://freedesktop.org/wiki/Software/shared-mime-info" TYPE REQUIRED PURPOSE "Information about filetypes") -if(NOT KDEPIM_NO_NEPOMUK) - find_package(SharedDesktopOntologies 0.11) - set_package_properties(SharedDesktopOntologies PROPERTIES DESCRIPTION "Shared Desktop Ontologies" URL "http://sourceforge.net/projects/oscaf/" TYPE REQUIRED PURPOSE "Ontologies necessary for the Nepomuk semantic desktop") - - find_package(Soprano 2.9) - set_package_properties(Soprano PROPERTIES DESCRIPTION "C++/Qt4 framework for RDF data" URL "http://soprano.sourceforge.net" TYPE REQUIRED PURPOSE "Storage of semantic data") - - find_package(NepomukCore QUIET CONFIG) - set_package_properties(NepomukCore PROPERTIES DESCRIPTION "Nepomuk core libraries" URL "http://www.kde.org" TYPE REQUIRED PURPOSE "Nepomuk extends the search and tagging functionalities in KMail and Akonadi") -else() - message(STATUS "Skipping detection of Nepomuk dependencies, feature is disabled.") -endif() - -if(AKONADI_USE_STRIGI_SEARCH) - find_package(Strigi) - set_package_properties(Strigi PROPERTIES DESCRIPTION "Strigi" URL "https://projects.kde.org/strigi" TYPE REQUIRED) -endif() - # Libkolab -find_package(Libkolab 0.4 QUIET CONFIG) +find_package(Libkolab 0.5 QUIET CONFIG) set_package_properties(Libkolab PROPERTIES DESCRIPTION "libkolab" URL "http://mirror.kolabsys.com/pub/releases" TYPE OPTIONAL PURPOSE "The Kolab Format libraries are required to build the Kolab Groupware Resource") # Libkolabxml -find_package(Libkolabxml QUIET CONFIG) +find_package(Libkolabxml 1.0 QUIET CONFIG) set_package_properties(Libkolabxml PROPERTIES DESCRIPTION "Kolabxml" URL "http://mirror.kolabsys.com/pub/releases" TYPE OPTIONAL PURPOSE "The Kolab XML Format Schema Definitions Library is required to build the Kolab Groupware Resource") # Libkgapi2 @@ -116,20 +95,11 @@ find_package(Xsltproc) set_package_properties(Xsltproc PROPERTIES DESCRIPTION "XSLT processor from libxslt" TYPE REQUIRED PURPOSE "Required to generate D-Bus interfaces for all Akonadi resources.") -############### search programs & libraries used by kdepim-runtime ############### -if(Strigi_FOUND) - find_library(STRIGIQTDBUSCLIENT_LIBRARY NAMES strigiqtdbusclient - PATHS - /usr/lib - /usr/local/lib - ${LIB_INSTALL_DIR} - $ENV{STRIGI_HOME}/lib - ) - if(STRIGIQTDBUSCLIENT_LIBRARY) - message(STATUS "Found the strigiqtdbusclient library.") - endif() - mark_as_advanced(STRIGIQTDBUSCLIENT_LIBRARY) -endif() +find_package(AccountsQt 1.11 QUIET CONFIG) +set_package_properties(AccountsQt PROPERTIES DESCRIPTION "Qt bindings for accounts-sso" URL "https://code.google.com/p/accounts-sso/" TYPE OPTIONAL PURPOSE "Required to support AccountsQt in different resources") + +find_package(SignOnQt 8.56 QUIET CONFIG) +set_package_properties(SignOnQt PROPERTIES DESCRIPTION "SignOn Qt bindings for accounts-sso" URL "https://code.google.com/p/accounts-sso/" TYPE OPTIONAL PURPOSE "Required to support SignOn in different resources") ############### Load the CTest options ############### @@ -159,12 +129,7 @@ endif() endif () -if(WINCE) - set(LIBRARY_TYPE STATIC) - add_definitions(-DKDEPIM_STATIC_LIBS) -else() - set(LIBRARY_TYPE SHARED) -endif() +set(LIBRARY_TYPE SHARED) #FIXME: kde4_add_plugin doesn't have a parameter to build the plugins statically. if (RUNTIME_PLUGINS_STATIC) @@ -180,7 +145,7 @@ ############### Needed commands before building anything ############### -include_directories(${kdepim-runtime_SOURCE_DIR} ${kdepim-runtime_BINARY_DIR} ${AKONADI_INCLUDE_DIR} ${Boost_INCLUDE_DIR} ${KDE4_INCLUDES} ${KDEPIMLIBS_INCLUDE_DIRS}) +include_directories(${kdepim-runtime_SOURCE_DIR} ${kdepim-runtime_BINARY_DIR} ${KDEPIMLIBS_INCLUDE_DIRS} ${AKONADI_INCLUDE_DIR} ${KDE4_INCLUDES} ${Boost_INCLUDE_DIR}) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${KDE4_ENABLE_EXCEPTIONS}") ############### Generate akonadi-config.h ############### @@ -219,8 +184,6 @@ add_subdirectory(plugins) add_subdirectory(accountwizard) add_subdirectory(defaultsetup) - -if (NOT WINCE) add_subdirectory(resourcetester) add_subdirectory(kioslave) add_subdirectory(kcm) @@ -229,7 +192,6 @@ if (KDEPIMLIBS_KRESOURCES_LIBS) add_subdirectory(kresources) endif () -endif() if (QT_QTDECLARATIVE_FOUND) add_subdirectory(qml) endif () diff -Nru kdepim-runtime-4.12.3/debian/changelog kdepim-runtime-4.12.90/debian/changelog --- kdepim-runtime-4.12.3/debian/changelog 2014-03-04 19:42:45.000000000 +0000 +++ kdepim-runtime-4.12.90/debian/changelog 2014-03-19 11:23:16.000000000 +0000 @@ -1,3 +1,15 @@ +kdepim-runtime (4:4.12.90-0ubuntu1) trusty; urgency=medium + + [ Rohan Garg ] + * Add libaccounts-qt-dev, libsignon-qt-dev as build dependencies + * Update install file + + [ Jonathan Riddell ] + * New upstream beta release + * Build with latest signon-qt to fix build failure + + -- Jonathan Riddell Thu, 13 Mar 2014 23:59:30 +0000 + kdepim-runtime (4:4.12.3-0ubuntu1) trusty; urgency=medium * New upstream bugfix release diff -Nru kdepim-runtime-4.12.3/debian/control kdepim-runtime-4.12.90/debian/control --- kdepim-runtime-4.12.3/debian/control 2014-03-04 19:42:45.000000000 +0000 +++ kdepim-runtime-4.12.90/debian/control 2014-03-19 11:23:16.000000000 +0000 @@ -7,11 +7,13 @@ George Kiagiadakis Build-Depends: kde-sc-dev-latest (>= 4:4.10), debhelper (>= 7.3.16), cmake, pkg-kde-tools (>= 0.12), - kdepimlibs5-dev (>= 4:4.12.3), kdelibs5-dev (>= 4:4.12.3), libakonadi-dev (>= 1.8), + kdepimlibs5-dev (>= 4:4.12.90), kdelibs5-dev (>= 4:4.12.90), libakonadi-dev (>= 1.8), libxml2-dev, xsltproc, libstrigiqtdbusclient-dev, libboost1.54-dev (>= 1.40.0-2), libstreamanalyzer-dev, shared-mime-info (>= 0.30), shared-desktop-ontologies (>= 0.10), nepomuk-core-dev, libkolabxml-dev, libkolab-dev (>= 0.2), libkgapi-dev (>= 0.4.3), - libqjson-dev, libcurl4-openssl-dev, libqtwebkit-dev, libkfbapi-dev + libqjson-dev, libcurl4-openssl-dev, libqtwebkit-dev, libkfbapi-dev, + libaccounts-qt-dev, + libsignon-qt-dev (>= 8.56+14.04.20140307-0ubuntu2) Standards-Version: 3.9.3 Homepage: http://pim.kde.org/ Vcs-Browser: http://bazaar.launchpad.net/~kubuntu-packagers/kubuntu-packaging/kdepim-runtime diff -Nru kdepim-runtime-4.12.3/debian/kdepim-runtime.install kdepim-runtime-4.12.90/debian/kdepim-runtime.install --- kdepim-runtime-4.12.3/debian/kdepim-runtime.install 2014-03-04 19:42:45.000000000 +0000 +++ kdepim-runtime-4.12.90/debian/kdepim-runtime.install 2014-03-19 11:23:16.000000000 +0000 @@ -14,11 +14,8 @@ usr/bin/akonadi_localbookmarks_resource usr/bin/akonadi_maildispatcher_agent usr/bin/akonadi_mailtransport_dummy_resource -usr/bin/akonadi_microblog_resource usr/bin/akonadi_migration_agent usr/bin/akonadi_mixedmaildir_resource -usr/bin/akonadi_nepomuk_feeder -usr/bin/akonadi_nepomuktag_resource usr/bin/akonadi_nntp_resource usr/bin/akonadi_openxchange_resource usr/bin/akonadi_pop3_resource @@ -29,7 +26,6 @@ usr/bin/kjotsmigrator usr/bin/kmail-migrator usr/bin/kres-migrator -usr/bin/nepomukpimindexerutility usr/lib/kde4/accountwizard_plugin.so usr/lib/kde4/akonadi_akonotes_resource.so usr/lib/kde4/akonadi_contacts_resource.so @@ -38,10 +34,6 @@ usr/lib/kde4/akonadi_kalarm_resource.so usr/lib/kde4/akonadi_maildir_resource.so usr/lib/kde4/akonadi_mbox_resource.so -usr/lib/kde4/akonadi_nepomuk_calendar_feeder.so -usr/lib/kde4/akonadi_nepomuk_contact_feeder.so -usr/lib/kde4/akonadi_nepomuk_email_feeder.so -usr/lib/kde4/akonadi_nepomuk_note_feeder.so usr/lib/kde4/akonadi_notes_resource.so usr/lib/kde4/akonadi_serializer_addressee.so usr/lib/kde4/akonadi_serializer_bookmark.so @@ -94,7 +86,6 @@ usr/lib/libkmindexreader.so.4.*.* usr/lib/libmaildir.so.4 usr/lib/libmaildir.so.4.*.* -usr/share/akonadi/agents/akonadinepomukfeederagent.desktop usr/share/akonadi/agents/akonotesresource.desktop usr/share/akonadi/agents/birthdaysresource.desktop usr/share/akonadi/agents/contactsresource.desktop @@ -116,10 +107,8 @@ usr/share/akonadi/agents/maildirresource.desktop usr/share/akonadi/agents/maildispatcheragent.desktop usr/share/akonadi/agents/mboxresource.desktop -usr/share/akonadi/agents/microblog.desktop usr/share/akonadi/agents/mixedmaildirresource.desktop usr/share/akonadi/agents/mtdummyresource.desktop -usr/share/akonadi/agents/nepomuktagresource.desktop usr/share/akonadi/agents/newmailnotifieragent.desktop usr/share/akonadi/agents/nntpresource.desktop usr/share/akonadi/agents/notesresource.desktop @@ -175,7 +164,6 @@ usr/share/kde4/apps/akonadi_maildispatcher_agent/akonadi_maildispatcher_agent.notifyrc usr/share/kde4/apps/akonadi_newmailnotifier_agent/akonadi_newmailnotifier_agent.notifyrc usr/share/kde4/apps/kconf_update/newmailnotifier.upd -usr/share/kde4/apps/nepomukpimindexerutility/nepomukpimindexerutility.rc usr/share/kde4/config/accountwizard.knsrc usr/share/kde4/config/kmail-migratorrc usr/share/kde4/config/kres-migratorrc @@ -195,17 +183,10 @@ usr/share/kde4/services/kcm_akonadi_server.desktop usr/share/kde4/services/kresources/kabc/akonadi.desktop usr/share/kde4/services/kresources/kcal/akonadi.desktop -usr/share/kde4/services/nepomukcalendarfeeder.desktop -usr/share/kde4/services/nepomukcontactfeeder.desktop -usr/share/kde4/services/nepomukmailfeeder.desktop -usr/share/kde4/services/nepomuknotefeeder.desktop -usr/share/kde4/servicetypes/akonadinepomukfeeder.desktop usr/share/kde4/servicetypes/davgroupwareprovider.desktop usr/share/mime/packages/accountwizard-mime.xml usr/share/mime/packages/kdepim-mime.xml usr/share/mime/packages/x-vnd.akonadi.socialnotification.xml -usr/share/ontology/kde/aneo.ontology -usr/share/ontology/kde/aneo.trig usr/bin/akonadi_kolabproxy_resource usr/share/akonadi/agents/kolabproxyresource.desktop usr/share/applications/kde4/akonaditray.desktop @@ -219,3 +200,8 @@ usr/share/icons/hicolor/64x64/apps/akonaditray.png usr/share/icons/hicolor/scalable/apps/akonaditray.svgz usr/share/kde4/services/akonadi/davgroupware-providers/owncloud-pre5.desktop +usr/bin/knotes-migrator +usr/lib/libfolderarchivesettings.so.4 +usr/lib/libfolderarchivesettings.so.4.13.0 +usr/share/kde4/apps/akonadi_kolabproxy_resource/akonadi_kolabproxy_resource.notifyrc + diff -Nru kdepim-runtime-4.12.3/debian/not-installed kdepim-runtime-4.12.90/debian/not-installed --- kdepim-runtime-4.12.3/debian/not-installed 2014-03-04 19:42:45.000000000 +0000 +++ kdepim-runtime-4.12.90/debian/not-installed 2014-03-19 11:23:16.000000000 +0000 @@ -1,5 +1,6 @@ ./usr/lib/libakonadi-filestore.so ./usr/lib/libakonadi-xml.so +./usr/lib/libfolderarchivesettings.so ./usr/lib/libkdepim-copy.so ./usr/lib/libkmindexreader.so ./usr/lib/libmaildir.so diff -Nru kdepim-runtime-4.12.3/debian/patches/kubuntu_signonqt4.diff kdepim-runtime-4.12.90/debian/patches/kubuntu_signonqt4.diff --- kdepim-runtime-4.12.3/debian/patches/kubuntu_signonqt4.diff 1970-01-01 00:00:00.000000000 +0000 +++ kdepim-runtime-4.12.90/debian/patches/kubuntu_signonqt4.diff 2014-03-19 11:23:16.000000000 +0000 @@ -0,0 +1,97 @@ +Index: kdepim-runtime-4.12.90/CMakeLists.txt +=================================================================== +--- kdepim-runtime-4.12.90.orig/CMakeLists.txt 2014-03-13 08:12:29.000000000 +0000 ++++ kdepim-runtime-4.12.90/CMakeLists.txt 2014-03-16 17:23:52.895992619 +0000 +@@ -98,8 +98,8 @@ + find_package(AccountsQt 1.11 QUIET CONFIG) + set_package_properties(AccountsQt PROPERTIES DESCRIPTION "Qt bindings for accounts-sso" URL "https://code.google.com/p/accounts-sso/" TYPE OPTIONAL PURPOSE "Required to support AccountsQt in different resources") + +-find_package(SignOnQt 8.56 QUIET CONFIG) +-set_package_properties(SignOnQt PROPERTIES DESCRIPTION "SignOn Qt bindings for accounts-sso" URL "https://code.google.com/p/accounts-sso/" TYPE OPTIONAL PURPOSE "Required to support SignOn in different resources") ++find_package(SignOnQt4 8.56 QUIET CONFIG) ++set_package_properties(SignOnQt4 PROPERTIES DESCRIPTION "SignOn Qt bindings for accounts-sso" URL "https://code.google.com/p/accounts-sso/" TYPE OPTIONAL PURPOSE "Required to support SignOn in different resources") + + ############### Load the CTest options ############### + +Index: kdepim-runtime-4.12.90/resources/dav/resource/CMakeLists.txt +=================================================================== +--- kdepim-runtime-4.12.90.orig/resources/dav/resource/CMakeLists.txt 2014-03-16 17:25:30.071991692 +0000 ++++ kdepim-runtime-4.12.90/resources/dav/resource/CMakeLists.txt 2014-03-16 17:36:19.715985497 +0000 +@@ -55,7 +55,7 @@ + urlconfigurationdialog.cpp + ) + +- if(${AccountsQt_FOUND} AND ${SignOnQt_FOUND}) ++ if(${AccountsQt_FOUND} AND ${SignOnQt4_FOUND}) + include_directories(${ACCOUNTSQT_INCLUDE_DIRS} ${SIGNONQT_INCLUDE_DIRS}) + add_definitions(-DHAVE_ACCOUNTS) + set(davgroupwareresource_SRCS ../../shared/getcredentialsjob.cpp ${davgroupwareresource_SRCS}) +@@ -94,7 +94,7 @@ + ${KDEPIMLIBS_KABC_LIBS} + ${KDEPIMLIBS_KCALCORE_LIBS}) + +- if(${AccountsQt_FOUND} AND ${SignOnQt_FOUND}) ++ if(${AccountsQt_FOUND} AND ${SignOnQt4_FOUND}) + target_link_libraries(akonadi_davgroupware_resource + ${ACCOUNTSQT_LIBRARIES} + ${SIGNONQT_LIBRARIES}) +Index: kdepim-runtime-4.12.90/resources/google/CMakeLists.txt +=================================================================== +--- kdepim-runtime-4.12.90.orig/resources/google/CMakeLists.txt 2014-03-13 08:12:29.000000000 +0000 ++++ kdepim-runtime-4.12.90/resources/google/CMakeLists.txt 2014-03-16 17:35:44.843985829 +0000 +@@ -1,6 +1,6 @@ + include_directories(${LibKGAPI2_INCLUDE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}) + +-if(${AccountsQt_FOUND} AND ${SignOnQt_FOUND}) ++if(${AccountsQt_FOUND} AND ${SignOnQt4_FOUND}) + include_directories(${ACCOUNTSQT_INCLUDE_DIRS} ${SIGNONQT_INCLUDE_DIRS} ../) + add_definitions(-DHAVE_ACCOUNTS) + set(accounts_SRCS ../../shared/getcredentialsjob.cpp) +Index: kdepim-runtime-4.12.90/resources/facebook/CMakeLists.txt +=================================================================== +--- kdepim-runtime-4.12.90.orig/resources/facebook/CMakeLists.txt 2014-03-13 08:12:29.000000000 +0000 ++++ kdepim-runtime-4.12.90/resources/facebook/CMakeLists.txt 2014-03-16 17:38:17.891984370 +0000 +@@ -1,7 +1,7 @@ + project(facebookresource) + include_directories(${LibKFbAPI_INCLUDE_DIR}) + include_directories(${QJSON_INCLUDE_DIR} ${qjson_INCLUDE_DIR}) +-if(${AccountsQt_FOUND} AND ${SignOnQt_FOUND}) ++if(${AccountsQt_FOUND} AND ${SignOnQt4_FOUND}) + include_directories(${ACCOUNTSQT_INCLUDE_DIRS} ${SIGNONQT_INCLUDE_DIRS}) + add_definitions(-DHAVE_ACCOUNTS) + set(facebookresource_SRCS ../shared/getcredentialsjob.cpp) +@@ -71,7 +71,7 @@ + ${LibKFbAPI_LIBRARY} + ) + +-if(${AccountsQt_FOUND} AND ${SignOnQt_FOUND}) ++if(${AccountsQt_FOUND} AND ${SignOnQt4_FOUND}) + target_link_libraries(akonadi_facebook_resource + ${ACCOUNTSQT_LIBRARIES} + ${SIGNONQT_LIBRARIES}) +Index: kdepim-runtime-4.12.90/resources/google/calendar/CMakeLists.txt +=================================================================== +--- kdepim-runtime-4.12.90.orig/resources/google/calendar/CMakeLists.txt 2014-03-13 08:12:29.000000000 +0000 ++++ kdepim-runtime-4.12.90/resources/google/calendar/CMakeLists.txt 2014-03-16 17:37:25.131984873 +0000 +@@ -62,7 +62,7 @@ + ${LibKGAPI2_LIBRARY} + ) + +-if(${AccountsQt_FOUND} AND ${SignOnQt_FOUND}) ++if(${AccountsQt_FOUND} AND ${SignOnQt4_FOUND}) + target_link_libraries(akonadi_googlecalendar_resource + ${ACCOUNTSQT_LIBRARIES} + ${SIGNONQT_LIBRARIES}) +Index: kdepim-runtime-4.12.90/resources/google/contacts/CMakeLists.txt +=================================================================== +--- kdepim-runtime-4.12.90.orig/resources/google/contacts/CMakeLists.txt 2014-03-13 08:12:29.000000000 +0000 ++++ kdepim-runtime-4.12.90/resources/google/contacts/CMakeLists.txt 2014-03-16 17:37:28.979984836 +0000 +@@ -49,7 +49,7 @@ + ${LibKGAPI2_LIBRARY} + ) + +-if(${AccountsQt_FOUND} AND ${SignOnQt_FOUND}) ++if(${AccountsQt_FOUND} AND ${SignOnQt4_FOUND}) + target_link_libraries(akonadi_googlecontacts_resource + ${ACCOUNTSQT_LIBRARIES} + ${SIGNONQT_LIBRARIES}) diff -Nru kdepim-runtime-4.12.3/debian/patches/series kdepim-runtime-4.12.90/debian/patches/series --- kdepim-runtime-4.12.3/debian/patches/series 2014-03-04 19:42:45.000000000 +0000 +++ kdepim-runtime-4.12.90/debian/patches/series 2014-03-19 11:23:16.000000000 +0000 @@ -1 +1,2 @@ hide_akonaditray.diff +kubuntu_signonqt4.diff diff -Nru kdepim-runtime-4.12.3/defaultsetup/CMakeLists.txt kdepim-runtime-4.12.90/defaultsetup/CMakeLists.txt --- kdepim-runtime-4.12.3/defaultsetup/CMakeLists.txt 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/defaultsetup/CMakeLists.txt 2014-03-13 08:12:29.000000000 +0000 @@ -1,13 +1,7 @@ - -if (NOT WINCE) configure_file(defaultaddressbook.desktop ${CMAKE_CURRENT_BINARY_DIR}/defaultaddressbook) configure_file(defaultcalendar.desktop ${CMAKE_CURRENT_BINARY_DIR}/defaultcalendar) configure_file(defaultnotebook.desktop ${CMAKE_CURRENT_BINARY_DIR}/defaultnotebook) -else() -configure_file(defaultaddressbook-ce.desktop ${CMAKE_CURRENT_BINARY_DIR}/defaultaddressbook) -configure_file(defaultcalendar-ce.desktop ${CMAKE_CURRENT_BINARY_DIR}/defaultcalendar) -configure_file(defaultnotebook-ce.desktop ${CMAKE_CURRENT_BINARY_DIR}/defaultnotebook) -endif() + install ( FILES ${CMAKE_CURRENT_BINARY_DIR}/defaultcalendar ${CMAKE_CURRENT_BINARY_DIR}/defaultaddressbook ${CMAKE_CURRENT_BINARY_DIR}/defaultnotebook diff -Nru kdepim-runtime-4.12.3/defaultsetup/defaultaddressbook-ce.desktop kdepim-runtime-4.12.90/defaultsetup/defaultaddressbook-ce.desktop --- kdepim-runtime-4.12.3/defaultsetup/defaultaddressbook-ce.desktop 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/defaultsetup/defaultaddressbook-ce.desktop 1970-01-01 00:00:00.000000000 +0000 @@ -1,55 +0,0 @@ -[Agent] -Id=defaultaddressbook -Type=akonadi_contacts_resource -Name=Personal Contacts -Name[bg]=Лични контакти -Name[bs]=Lični kontakti -Name[ca]=Contactes personals -Name[ca@valencia]=Contactes personals -Name[cs]=Osobní kontakty -Name[da]=Personlige kontakter -Name[de]=Persönliche Kontakte -Name[el]=Προσωπικές επαφές -Name[en_GB]=Personal Contacts -Name[es]=Contactos personales -Name[et]=Isiklikud kontaktid -Name[fi]=Omat yhteystiedot -Name[fr]=Contacts personnels -Name[ga]=Teagmhálacha Pearsanta -Name[gl]=Contactos Persoais -Name[hu]=Személyes névjegyek -Name[ia]=Contactos personal -Name[it]=Contatti personali -Name[ja]=個人の連絡先 -Name[kk]=Дербес контакттар -Name[km]=ទំនាក់ទំនង​ផ្ទាល់ខ្លួន -Name[ko]=개인 연락처 -Name[lt]=Asmeniniai kontaktai -Name[lv]=Personīgie kontakti -Name[nb]=Personlige kontakter -Name[nds]=Persöönlich Kontakten -Name[nl]=Persoonlijke contacten -Name[nn]=Personlege kontaktar -Name[pa]=ਨਿੱਜੀ ਸੰਪਰਕ -Name[pl]=Kontakty osobiste -Name[pt]=Contactos Pessoais -Name[pt_BR]=Contatos pessoais -Name[ro]=Contacte personale -Name[ru]=Личные контакты -Name[sk]=Osobné kontakty -Name[sl]=Osebni stiki -Name[sr]=Лични контакти -Name[sr@ijekavian]=Лични контакти -Name[sr@ijekavianlatin]=Lični kontakti -Name[sr@latin]=Lični kontakti -Name[sv]=Personliga kontakter -Name[tr]=Kişisel Bağlantılar -Name[ug]=شەخسىي ئالاقەداشلار -Name[uk]=Особисті контакти -Name[x-test]=xxPersonal Contactsxx -Name[zh_CN]=个人联系人 -Name[zh_TW]=個人聯絡人 - -[Settings] -IsConfigured=true -Path[$e]=/My Documents/.local/share/contacts/ diff -Nru kdepim-runtime-4.12.3/defaultsetup/defaultcalendar-ce.desktop kdepim-runtime-4.12.90/defaultsetup/defaultcalendar-ce.desktop --- kdepim-runtime-4.12.3/defaultsetup/defaultcalendar-ce.desktop 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/defaultsetup/defaultcalendar-ce.desktop 1970-01-01 00:00:00.000000000 +0000 @@ -1,49 +0,0 @@ -[Agent] -Id=defaultcalendar -Type=akonadi_ical_resource -Name=Personal Calendar -Name[bs]=Lični kalendar -Name[ca]=Calendari personal -Name[ca@valencia]=Calendari personal -Name[cs]=Osobní kalendář -Name[da]=Personlig kalender -Name[de]=Persönlicher Kalender -Name[el]=Προσωπικό ημερολόγιο -Name[es]=Calendario personal -Name[et]=Isiklik kalender -Name[fi]=Oma kalenteri -Name[fr]=Agenda personnel -Name[ga]=Féilire Pearsanta -Name[gl]=Calendario persoal -Name[hu]=Személyes naptár -Name[ia]=Calendario Personal -Name[it]=Calendario personale -Name[kk]=Дербес күнтізбе -Name[km]=ប្រតិទិន​ផ្ទាល់ខ្លួន -Name[ko]=개인 달력 -Name[lt]=Asmeninis kalendorius -Name[lv]=Personīgais kalendārs -Name[nb]=Personlig kalender -Name[nds]=Persöönlich Kalenner -Name[nl]=Persoonlijke agenda -Name[pl]=Kalendarz osobisty -Name[pt]=Calendário Pessoal -Name[pt_BR]=Calendário pessoal -Name[ro]=Calendar personal -Name[ru]=Личный календарь -Name[sk]=Osobný kalendár -Name[sl]=Osebni koledar -Name[sr]=Лични календар -Name[sr@ijekavian]=Лични календар -Name[sr@ijekavianlatin]=Lični kalendar -Name[sr@latin]=Lični kalendar -Name[sv]=Personlig kalender -Name[tr]=Kişisel Takvim -Name[uk]=Особистий календар -Name[x-test]=xxPersonal Calendarxx -Name[zh_CN]=个人日历 -Name[zh_TW]=個人行事曆 - -[Settings] -Path[$e]=/My Documents/.local/share/korganizer/std.ics - diff -Nru kdepim-runtime-4.12.3/defaultsetup/defaultnotebook-ce.desktop kdepim-runtime-4.12.90/defaultsetup/defaultnotebook-ce.desktop --- kdepim-runtime-4.12.3/defaultsetup/defaultnotebook-ce.desktop 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/defaultsetup/defaultnotebook-ce.desktop 1970-01-01 00:00:00.000000000 +0000 @@ -1,79 +0,0 @@ -[Agent] -Id=defaultnotebook -Type=akonadi_akonotes_resource -Name=Notes -Name[af]=Notas -Name[ar]=ملاحظات -Name[be]=Заметкі -Name[bg]=Бележки -Name[br]=Notennoù -Name[bs]=Bilješke -Name[ca]=Notes -Name[ca@valencia]=Notes -Name[cs]=Poznámky -Name[cy]=Nodiadau -Name[da]=Noter -Name[de]=Notizen -Name[el]=Σημειώσεις -Name[en_GB]=Notes -Name[eo]=Notoj -Name[es]=Notas -Name[et]=Sedelid -Name[eu]=Oharrak -Name[fa]=یادداشتها -Name[fi]=Muistiinpanot -Name[fr]=Notes -Name[fy]=Notysjes -Name[ga]=Nótaí -Name[gl]=Notas -Name[he]=פתקים -Name[hu]=Feljegyzések -Name[ia]=Notas -Name[is]=Minnismiðar -Name[it]=Note -Name[ja]=メモ -Name[ka]=ჩანიშვნები -Name[kk]=Жазбалар -Name[km]=ចំណាំ -Name[ko]=노트 -Name[lt]=Užrašai -Name[lv]=Piezīmes -Name[mai]=टिप्पणी -Name[mk]=Белешки -Name[ms]=Nota -Name[nb]=Notater -Name[nds]=Notizen -Name[ne]=टिपोट -Name[nl]=Notities -Name[nn]=Notat -Name[oc]=Nòtas -Name[pa]=ਨੋਟਿਸ -Name[pl]=Notatki -Name[pt]=Notas -Name[pt_BR]=Notas -Name[ro]=Notițe -Name[ru]=Заметки -Name[se]=Nohtat -Name[sk]=Poznámky -Name[sl]=Notice -Name[sq]=Shënimet -Name[sr]=Белешке -Name[sr@ijekavian]=Биљешке -Name[sr@ijekavianlatin]=Bilješke -Name[sr@latin]=Beleške -Name[sv]=Anteckningar -Name[ta]=குறிப்புகள் -Name[tg]=Ахборот -Name[th]=บันทึกย่อ -Name[tr]=Notlar -Name[ug]=ئىزاھ -Name[uk]=Примітки -Name[uz]=Yozma xotira -Name[uz@cyrillic]=Ёзма хотира -Name[wa]=Notes -Name[x-test]=xxNotesxx -Name[zh_CN]=便笺 -Name[zh_TW]=備忘錄 - -[Settings] -Path[$e]=/My Documents/.local/share/notes/ diff -Nru kdepim-runtime-4.12.3/kcm/kcm_akonadi.desktop kdepim-runtime-4.12.90/kcm/kcm_akonadi.desktop --- kdepim-runtime-4.12.3/kcm/kcm_akonadi.desktop 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/kcm/kcm_akonadi.desktop 2014-03-13 08:12:29.000000000 +0000 @@ -65,7 +65,7 @@ Comment=Configuration of the Akonadi Personal Information Management framework Comment[ar]=ضبط إطار إدارة المعلومات الشخصية اكوندا Comment[bs]=Konfiguracija Akonadi frameworka za upravljanje licnim podacima -Comment[ca]=Configuració de l'entorn de gestió d'informació personal de l'Akonadi +Comment[ca]=Configuració de l'entorn per a la gestió de la informació personal de l'Akonadi Comment[ca@valencia]=Configuració de l'entorn de gestió d'informació personal de l'Akonadi Comment[da]=Konfiguration af Akonadi - framework til håndtering af personlig information (PIM) Comment[de]=Einrichtung des persönlichen Informationsmanagement von Akonadi diff -Nru kdepim-runtime-4.12.3/kcm/kcm_akonadi_resources.desktop kdepim-runtime-4.12.90/kcm/kcm_akonadi_resources.desktop --- kdepim-runtime-4.12.3/kcm/kcm_akonadi_resources.desktop 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/kcm/kcm_akonadi_resources.desktop 2014-03-13 08:12:29.000000000 +0000 @@ -64,7 +64,7 @@ Comment=Configuration of the Akonadi Personal Information Management framework Comment[ar]=ضبط إطار إدارة المعلومات الشخصية اكوندا Comment[bs]=Konfiguracija Akonadi frameworka za upravljanje licnim podacima -Comment[ca]=Configuració de l'entorn de gestió d'informació personal de l'Akonadi +Comment[ca]=Configuració de l'entorn per a la gestió de la informació personal de l'Akonadi Comment[ca@valencia]=Configuració de l'entorn de gestió d'informació personal de l'Akonadi Comment[da]=Konfiguration af Akonadi - framework til håndtering af personlig information (PIM) Comment[de]=Einrichtung des persönlichen Informationsmanagement von Akonadi diff -Nru kdepim-runtime-4.12.3/kcm/resourcesmanagementwidget.cpp kdepim-runtime-4.12.90/kcm/resourcesmanagementwidget.cpp --- kdepim-runtime-4.12.3/kcm/resourcesmanagementwidget.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/kcm/resourcesmanagementwidget.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -33,9 +33,7 @@ #include #include -#include #include -#include #include class ResourcesManagementWidget::Private @@ -138,4 +136,3 @@ } } -#include "resourcesmanagementwidget.moc" diff -Nru kdepim-runtime-4.12.3/kcm/resourcesmanagementwidget.h kdepim-runtime-4.12.90/kcm/resourcesmanagementwidget.h --- kdepim-runtime-4.12.3/kcm/resourcesmanagementwidget.h 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/kcm/resourcesmanagementwidget.h 2014-03-13 08:12:29.000000000 +0000 @@ -29,7 +29,6 @@ #include -class QItemSelection; /** @short A widget to manage imaplib diff -Nru kdepim-runtime-4.12.3/kcm/serverconfigmodule.cpp kdepim-runtime-4.12.90/kcm/serverconfigmodule.cpp --- kdepim-runtime-4.12.3/kcm/serverconfigmodule.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/kcm/serverconfigmodule.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -24,7 +24,6 @@ #include #include -#include #include #include #include @@ -240,4 +239,3 @@ } } -#include "serverconfigmodule.moc" diff -Nru kdepim-runtime-4.12.3/kdepim-runtime-version.h.cmake kdepim-runtime-4.12.90/kdepim-runtime-version.h.cmake --- kdepim-runtime-4.12.3/kdepim-runtime-version.h.cmake 1970-01-01 00:00:00.000000000 +0000 +++ kdepim-runtime-4.12.90/kdepim-runtime-version.h.cmake 2014-03-13 08:12:29.000000000 +0000 @@ -0,0 +1,36 @@ +/* + Copyright (c) 1998-1999 Preston Brown + Copyright (c) 2000-2004 Cornelius Schumacher + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU 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 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. +*/ + +/* + Set the version for this kdepim-runtime release. + + This version may be used by programs within this module that + do not want to maintain a version on their own. + + Note that we cannot use the kdelibs version because we may + build against older kdelibs releases. +*/ + +#ifndef KDEPIM_RUNTIME_VERSION_H +#define KDEPIM_RUNTIME_VERSION_H + + +#define KDEPIM_RUNTIME_VERSION "@KDEPIM_RUNTIME_VERSION@" + +#endif diff -Nru kdepim-runtime-4.12.3/kresources/kabc/akonadi.desktop kdepim-runtime-4.12.90/kresources/kabc/akonadi.desktop --- kdepim-runtime-4.12.3/kresources/kabc/akonadi.desktop 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/kresources/kabc/akonadi.desktop 2014-03-13 08:12:29.000000000 +0000 @@ -50,7 +50,7 @@ Comment=Provides access to contacts stored in Akonadi address book folders Comment[ar]=يوفر الدخول لجهات الإتصال المحفوظة في مجلد دفتر عناوين اكوندا Comment[bs]=Omogućuje pristup kontaktima pohranjenim u Akonadi imenicima -Comment[ca]=Proporciona l'accés als contactes emmagatzemats en carpetes de llibreta d'adreces de l'Akonadi +Comment[ca]=Proporciona l'accés als contactes emmagatzemats en carpetes de la llibreta d'adreces de l'Akonadi Comment[ca@valencia]=Proporciona l'accés als contactes emmagatzemats en carpetes de llibreta d'adreces de l'Akonadi Comment[da]=Giver adgang til kontakter lagret i Akonadi adressebogs-mapper Comment[de]=Ermöglicht den Zugriff auf Kontakte, die in Akonadi-Adressbuchordnern gespeichert sind. diff -Nru kdepim-runtime-4.12.3/kresources/kabc/resourceakonadiconfig.cpp kdepim-runtime-4.12.90/kresources/kabc/resourceakonadiconfig.cpp --- kdepim-runtime-4.12.3/kresources/kabc/resourceakonadiconfig.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/kresources/kabc/resourceakonadiconfig.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -74,4 +74,3 @@ connectMimeCheckBoxes(); } -#include "resourceakonadiconfig.moc" diff -Nru kdepim-runtime-4.12.3/kresources/kabc/resourceakonadi.cpp kdepim-runtime-4.12.90/kresources/kabc/resourceakonadi.cpp --- kdepim-runtime-4.12.3/kresources/kabc/resourceakonadi.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/kresources/kabc/resourceakonadi.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -254,5 +254,4 @@ return d->isReadOnly(); } -#include "resourceakonadi.moc" // kate: space-indent on; indent-width 2; replace-tabs on; diff -Nru kdepim-runtime-4.12.3/kresources/kabc/resourceakonadi_p.cpp kdepim-runtime-4.12.90/kresources/kabc/resourceakonadi_p.cpp --- kdepim-runtime-4.12.3/kresources/kabc/resourceakonadi_p.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/kresources/kabc/resourceakonadi_p.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -529,6 +529,5 @@ return contactGroup; } -#include "resourceakonadi_p.moc" // kate: space-indent on; indent-width 2; replace-tabs on; diff -Nru kdepim-runtime-4.12.3/kresources/kabc/subresource.cpp kdepim-runtime-4.12.90/kresources/kabc/subresource.cpp --- kdepim-runtime-4.12.3/kresources/kabc/subresource.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/kresources/kabc/subresource.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -180,6 +180,5 @@ mIdArbiter->removeArbitratedId( kresId ); } -#include "subresource.moc" // kate: space-indent on; indent-width 2; replace-tabs on; diff -Nru kdepim-runtime-4.12.3/kresources/kcal/akonadi.desktop kdepim-runtime-4.12.90/kresources/kcal/akonadi.desktop --- kdepim-runtime-4.12.3/kresources/kcal/akonadi.desktop 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/kresources/kcal/akonadi.desktop 2014-03-13 08:12:29.000000000 +0000 @@ -55,7 +55,7 @@ Comment=Provides access to calendars stored in Akonadi calendar folders Comment[ar]=يوفر الوصول للتقويمات المحفوظة في مجلد تقويم اكوندا Comment[bs]=Omogućava pristup kalendarima pohranjenim u Akonadi direktorijima kalendara -Comment[ca]=Proporciona l'accés als calendaris emmagatzemats en carpetes de calendari de l'Akonadi +Comment[ca]=Proporciona l'accés als calendaris emmagatzemats en carpetes del calendari de l'Akonadi Comment[ca@valencia]=Proporciona l'accés als calendaris emmagatzemats en carpetes de calendari de l'Akonadi Comment[da]=Giver adgang til kalendere lagret i Akonadi kalender-mapper Comment[de]=Ermöglicht den Zugriff auf Kalender, die in Akonadi-Ordnern gespeichert sind. diff -Nru kdepim-runtime-4.12.3/kresources/kcal/resourceakonadiconfig.cpp kdepim-runtime-4.12.90/kresources/kcal/resourceakonadiconfig.cpp --- kdepim-runtime-4.12.3/kresources/kcal/resourceakonadiconfig.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/kresources/kcal/resourceakonadiconfig.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -80,5 +80,4 @@ connectMimeCheckBoxes(); } -#include "resourceakonadiconfig.moc" // kate: space-indent on; indent-width 2; replace-tabs on; diff -Nru kdepim-runtime-4.12.3/kresources/kcal/resourceakonadi.cpp kdepim-runtime-4.12.90/kresources/kcal/resourceakonadi.cpp --- kdepim-runtime-4.12.3/kresources/kcal/resourceakonadi.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/kresources/kcal/resourceakonadi.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -448,6 +448,5 @@ return d->isReadOnly(); } -#include "resourceakonadi.moc" // kate: space-indent on; indent-width 2; replace-tabs on; diff -Nru kdepim-runtime-4.12.3/kresources/kcal/resourceakonadi_p.cpp kdepim-runtime-4.12.90/kresources/kcal/resourceakonadi_p.cpp --- kdepim-runtime-4.12.3/kresources/kcal/resourceakonadi_p.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/kresources/kcal/resourceakonadi_p.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -425,6 +425,5 @@ } } -#include "resourceakonadi_p.moc" // kate: space-indent on; indent-width 2; replace-tabs on; diff -Nru kdepim-runtime-4.12.3/kresources/kcal/subresource.cpp kdepim-runtime-4.12.90/kresources/kcal/subresource.cpp --- kdepim-runtime-4.12.3/kresources/kcal/subresource.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/kresources/kcal/subresource.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -168,6 +168,5 @@ mIdArbiter->removeArbitratedId( kresId ); } -#include "subresource.moc" // kate: space-indent on; indent-width 2; replace-tabs on; diff -Nru kdepim-runtime-4.12.3/kresources/shared/abstractsubresourcemodel.cpp kdepim-runtime-4.12.90/kresources/shared/abstractsubresourcemodel.cpp --- kdepim-runtime-4.12.3/kresources/shared/abstractsubresourcemodel.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/kresources/shared/abstractsubresourcemodel.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -312,6 +312,5 @@ } } -#include "abstractsubresourcemodel.moc" // kate: space-indent on; indent-width 2; replace-tabs on; diff -Nru kdepim-runtime-4.12.3/kresources/shared/itemfetchadapter.cpp kdepim-runtime-4.12.90/kresources/shared/itemfetchadapter.cpp --- kdepim-runtime-4.12.3/kresources/shared/itemfetchadapter.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/kresources/shared/itemfetchadapter.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -58,6 +58,5 @@ emit result( this, job ); } -#include "itemfetchadapter.moc" // kate: space-indent on; indent-width 2; replace-tabs on; diff -Nru kdepim-runtime-4.12.3/kresources/shared/resourceprivatebase.cpp kdepim-runtime-4.12.90/kresources/shared/resourceprivatebase.cpp --- kdepim-runtime-4.12.3/kresources/shared/resourceprivatebase.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/kresources/shared/resourceprivatebase.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -504,6 +504,5 @@ savingResult( job->error() == 0, job->errorString() ); } -#include "resourceprivatebase.moc" // kate: space-indent on; indent-width 2; replace-tabs on; diff -Nru kdepim-runtime-4.12.3/kresources/shared/storecollectionmodel.cpp kdepim-runtime-4.12.90/kresources/shared/storecollectionmodel.cpp --- kdepim-runtime-4.12.3/kresources/shared/storecollectionmodel.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/kresources/shared/storecollectionmodel.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -87,6 +87,5 @@ return mStoreMapping; } -#include "storecollectionmodel.moc" // kate: space-indent on; indent-width 2; replace-tabs on; diff -Nru kdepim-runtime-4.12.3/libkdepim-copy/kincidencechooser.cpp kdepim-runtime-4.12.90/libkdepim-copy/kincidencechooser.cpp --- kdepim-runtime-4.12.3/libkdepim-copy/kincidencechooser.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/libkdepim-copy/kincidencechooser.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -466,4 +466,3 @@ KDialog::accept(); } -#include "kincidencechooser.moc" diff -Nru kdepim-runtime-4.12.3/migration/CMakeLists.txt kdepim-runtime-4.12.90/migration/CMakeLists.txt --- kdepim-runtime-4.12.3/migration/CMakeLists.txt 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/migration/CMakeLists.txt 2014-03-13 08:12:29.000000000 +0000 @@ -1,3 +1,6 @@ +add_definitions( -DQT_NO_CAST_FROM_ASCII ) +add_definitions( -DQT_NO_CAST_TO_ASCII ) + add_definitions( -DKRESOURCES_DEPRECATED= -DKABC_DEPRECATED= @@ -30,6 +33,7 @@ add_subdirectory( kjots ) add_subdirectory( gid ) if (KDEPIMLIBS_KRESOURCES_LIBS) + add_subdirectory( knotes ) add_subdirectory( kres ) add_subdirectory( tests ) endif () diff -Nru kdepim-runtime-4.12.3/migration/entitytreecreatejob.cpp kdepim-runtime-4.12.90/migration/entitytreecreatejob.cpp --- kdepim-runtime-4.12.3/migration/entitytreecreatejob.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/migration/entitytreecreatejob.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -20,8 +20,6 @@ #include "entitytreecreatejob.h" -#include -#include #include #include @@ -113,4 +111,3 @@ commit(); } -#include "entitytreecreatejob.moc" diff -Nru kdepim-runtime-4.12.3/migration/gid/gidmigrator.cpp kdepim-runtime-4.12.90/migration/gid/gidmigrator.cpp --- kdepim-runtime-4.12.3/migration/gid/gidmigrator.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/migration/gid/gidmigrator.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -6,8 +6,11 @@ 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. + 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 diff -Nru kdepim-runtime-4.12.3/migration/gid/gidmigrator.h kdepim-runtime-4.12.90/migration/gid/gidmigrator.h --- kdepim-runtime-4.12.3/migration/gid/gidmigrator.h 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/migration/gid/gidmigrator.h 2014-03-13 08:12:29.000000000 +0000 @@ -21,7 +21,6 @@ #define GIDMIGRATOR_H #include -#include #include class GidMigrator: public MigratorBase diff -Nru kdepim-runtime-4.12.3/migration/gid/main.cpp kdepim-runtime-4.12.90/migration/gid/main.cpp --- kdepim-runtime-4.12.3/migration/gid/main.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/migration/gid/main.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -41,7 +41,7 @@ ki18n("(c) 2013 the Akonadi developers"), KLocalizedString(), "http://pim.kde.org/akonadi/"); - aboutData.setProgramIconName("akonadi"); + aboutData.setProgramIconName(QLatin1String("akonadi")); aboutData.addAuthor(ki18n("Christian Mollekopf"), ki18n("Author"), "mollekopf@kolabsys.com"); KCmdLineArgs::init(argc, argv, &aboutData); @@ -56,7 +56,7 @@ app->setQuitOnLastWindowClosed(false); KGlobal::setAllowQuit(true); - KGlobal::locale()->insertCatalog("libakonadi"); + KGlobal::locale()->insertCatalog(QLatin1String("libakonadi")); if (!Akonadi::Control::start(0)) { return 2; diff -Nru kdepim-runtime-4.12.3/migration/infodialog.cpp kdepim-runtime-4.12.90/migration/infodialog.cpp --- kdepim-runtime-4.12.3/migration/infodialog.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/migration/infodialog.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -102,24 +102,24 @@ QListWidgetItem *item = new QListWidgetItem( msg, mList ); switch ( type ) { case KMigratorBase::Success: - item->setIcon( KIcon( "dialog-ok-apply" ) ); + item->setIcon( KIcon( QLatin1String("dialog-ok-apply") ) ); mChange = true; kDebug() << msg; break; case KMigratorBase::Skip: - item->setIcon( KIcon( "dialog-ok" ) ); + item->setIcon( KIcon( QLatin1String("dialog-ok") ) ); kDebug() << msg; break; case KMigratorBase::Info: - item->setIcon( KIcon( "dialog-information" ) ); + item->setIcon( KIcon( QLatin1String("dialog-information") ) ); kDebug() << msg; break; case KMigratorBase::Warning: - item->setIcon( KIcon( "dialog-warning" ) ); + item->setIcon( KIcon( QLatin1String("dialog-warning") ) ); kDebug() << msg; break; case KMigratorBase::Error: { - item->setIcon( KIcon( "dialog-error" ) ); + item->setIcon( KIcon( QLatin1String("dialog-error") ) ); QFont currentFont = font(); currentFont.setBold( true ); item->setFont( currentFont ); @@ -184,4 +184,3 @@ mAutoScrollList = ( value == mList->verticalScrollBar()->maximum() ); } -#include "infodialog.moc" diff -Nru kdepim-runtime-4.12.3/migration/kaddressbook/kaddressbookmigrator.cpp kdepim-runtime-4.12.90/migration/kaddressbook/kaddressbookmigrator.cpp --- kdepim-runtime-4.12.3/migration/kaddressbook/kaddressbookmigrator.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/migration/kaddressbook/kaddressbookmigrator.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -34,10 +34,10 @@ KABC::Addressee::List readContacts( bool *ok ) { - const QString fileName = KStandardDirs::locateLocal( "data", "kabc/std.vcf" ); + const QString fileName = KStandardDirs::locateLocal( "data", QLatin1String("kabc/std.vcf") ); QFile file( fileName ); if ( !file.open( QIODevice::ReadOnly ) ) { - kDebug() << QString( "Unable to open file %1 for reading" ).arg( fileName ); + kDebug() << QString::fromLatin1("Unable to open file %1 for reading" ).arg( fileName ); *ok = false; return KABC::Addressee::List(); } @@ -53,7 +53,7 @@ bool writeContacts( const KABC::Addressee::List &contacts ) { - const QString path = QDir::home().absolutePath() + "/.local/share/contacts/"; + const QString path = QDir::home().absolutePath() + QLatin1String("/.local/share/contacts/"); if ( !QDir::root().mkpath( path ) ) return false; @@ -62,10 +62,10 @@ const KABC::Addressee contact = contacts.at( i ); const QByteArray content = converter.createVCard( contact ); - const QString fileName = path + QDir::separator() + contact.uid() + ".vcf"; + const QString fileName = path + QDir::separator() + contact.uid() + QLatin1String(".vcf"); QFile file( fileName ); if ( !file.open( QIODevice::WriteOnly ) ) { - kDebug() << QString( "Unable to open file %1 for writing" ).arg( fileName ); + kDebug() << QString::fromLatin1( "Unable to open file %1 for writing" ).arg( fileName ); return false; } diff -Nru kdepim-runtime-4.12.3/migration/kaddressbook/kaddressbookmigrator.desktop kdepim-runtime-4.12.90/migration/kaddressbook/kaddressbookmigrator.desktop --- kdepim-runtime-4.12.3/migration/kaddressbook/kaddressbookmigrator.desktop 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/migration/kaddressbook/kaddressbookmigrator.desktop 2014-03-13 08:12:29.000000000 +0000 @@ -49,7 +49,7 @@ Type=Application Comment=Tool to migrate the old kresource based address book to Akonadi. Comment[bs]=Alat za pomjeranje adresara baziranog na kresource u Akonadi. -Comment[ca]=Eina per migrar l'adreça de contactes antiga basada en kresource a l'Akonadi. +Comment[ca]=Eina per a migrar l'adreça de contactes antiga basada en kresource a l'Akonadi. Comment[ca@valencia]=Eina per migrar l'adreça de contactes antiga basada en kresource a l'Akonadi. Comment[da]=Værktøj til at migrere den gamle kresource-baserede adressebog til Akonadi. Comment[de]=Werkzeug zum Migrieren alter auf Ressourcen basierender Adressbücher nach Akonadi diff -Nru kdepim-runtime-4.12.3/migration/kjots/kjotsmigrator.cpp kdepim-runtime-4.12.90/migration/kjots/kjotsmigrator.cpp --- kdepim-runtime-4.12.3/migration/kjots/kjotsmigrator.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/migration/kjots/kjotsmigrator.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -24,9 +24,11 @@ #include #include -#include +#include #include #include +#include + #include @@ -50,14 +52,14 @@ KJotsMigrator::KJotsMigrator() : KMigratorBase(), unicode( false ) { - m_dataDir = QDir( KStandardDirs::locateLocal( "data", "kjots" ) ); - m_dataDir.setNameFilters( QStringList( "*.book" ) ); + m_dataDir = QDir( KStandardDirs::locateLocal( "data", QLatin1String("kjots") ) ); + m_dataDir.setNameFilters( QStringList( QLatin1String("*.book") ) ); if ( !m_dataDir.exists() ) { return; } - const QString &kjotsCfgFile = KStandardDirs::locateLocal( "config", QString( "kjotsrc" ) ); + const QString &kjotsCfgFile = KStandardDirs::locateLocal( "config", QLatin1String( "kjotsrc" ) ); KConfig config( kjotsCfgFile ); KConfigGroup cfgGroup = config.group( "kjots" ); @@ -73,7 +75,7 @@ { emit message( Info, i18n( "Beginning KJots migration..." ) ); - createAgentInstance( "akonadi_akonotes_resource", this, SLOT(notesResourceCreated(KJob*)) ); + createAgentInstance( QLatin1String("akonadi_akonotes_resource"), this, SLOT(notesResourceCreated(KJob*)) ); } void KJotsMigrator::notesResourceCreated( KJob *job ) @@ -90,8 +92,8 @@ instance.setName( i18nc( "Default name for resource holding notes", "Local Notes" ) ); OrgKdeAkonadiMaildirSettingsInterface *iface = new OrgKdeAkonadiMaildirSettingsInterface( - "org.freedesktop.Akonadi.Resource." + instance.identifier(), - "/Settings", QDBusConnection::sessionBus(), this ); + QLatin1String("org.freedesktop.Akonadi.Resource.") + instance.identifier(), + QLatin1String("/Settings"), QDBusConnection::sessionBus(), this ); if ( !iface->isValid() ) { migrationFailed( i18n( "Failed to obtain D-Bus interface for remote configuration." ), instance ); @@ -99,7 +101,7 @@ return; } - QDBusPendingReply response = iface->setPath( KGlobal::dirs()->localxdgdatadir() + "/notes/" + KRandom::randomString( 10 ) ); + QDBusPendingReply response = iface->setPath( KGlobal::dirs()->localxdgdatadir() + QLatin1String("/notes/") + KRandom::randomString( 10 ) ); // make sure the config is saved iface->writeConfig(); @@ -172,8 +174,8 @@ // This method taken from KJotsBook::openBook void KJotsMigrator::migrateLegacyBook( const QString& fileName ) { - QFile file( KStandardDirs::locateLocal( "data", "kjots/" ) + '/' + fileName ); - QDomDocument doc( "KJots" ); + QFile file( KStandardDirs::locateLocal( "data", QLatin1String("kjots/") ) + QLatin1Char('/') + fileName ); + QDomDocument doc( QLatin1String("KJots") ); bool oldBook = false; if ( !file.exists() || !file.open( QIODevice::ReadOnly | QIODevice::Text ) ) { @@ -205,11 +207,11 @@ QDomElement docElem = doc.documentElement(); - if ( docElem.tagName() == "KJots" ) { + if ( docElem.tagName() == QLatin1String("KJots") ) { QDomNode n = docElem.firstChild(); while ( !n.isNull() ) { QDomElement e = n.toElement(); // try to convert the node to an element. - if ( !e.isNull() && e.tagName() == "KJotsBook" ) { + if ( !e.isNull() && e.tagName() == QLatin1String("KJotsBook" )) { parseBookXml( e, oldBook, m_resourceCollection, 0 ); } n = n.nextSibling(); @@ -234,31 +236,31 @@ { Collection collection; collection.setParentCollection( parentCollection ); - collection.setContentMimeTypes( QStringList() << Collection::mimeType() << "text/x-vnd.akonadi.note" ); + collection.setContentMimeTypes( QStringList() << Collection::mimeType() << QLatin1String("text/x-vnd.akonadi.note") ); QDomNode n = me.firstChild(); EntityDisplayAttribute *eda = new EntityDisplayAttribute(); - eda->setIconName( "x-office-address-book" ); + eda->setIconName( QLatin1String("x-office-address-book") ); while ( !n.isNull() ) { QDomElement e = n.toElement(); // try to convert the node to an element. if ( !e.isNull() ) { - if ( e.tagName() == "Title" ) { + if ( e.tagName() == QLatin1String("Title") ) { eda->setDisplayName( e.text() ); collection.setName( KRandom::randomString( 10 ) ); } else - if ( e.tagName() == "ID" ) { + if ( e.tagName() == QLatin1String("ID") ) { // Legacy ID attribute? // setId(e.text().toULongLong()); } else - if ( e.tagName() == "Color" ) { + if ( e.tagName() == QLatin1String("Color") ) { QColor color( e.text() ); eda->setBackgroundColor( color ); } - if ( e.tagName() == "KJotsPage" ) { + if ( e.tagName() == QLatin1String("KJotsPage") ) { parsePageXml( e, oldBook, collection ); - } else if ( e.tagName() == "KJotsBook" ) { + } else if ( e.tagName() == QLatin1String("KJotsBook") ) { parseBookXml( e, oldBook, collection, depth + 1 ); } else { // Fatal error. Continue. @@ -284,31 +286,31 @@ QTextDocument document; EntityDisplayAttribute *eda = new EntityDisplayAttribute(); - eda->setIconName( "text-plain" ); + eda->setIconName( QLatin1String("text-plain") ); bool isRichText = false; - if ( me.tagName() == "KJotsPage" ) { + if ( me.tagName() == QLatin1String("KJotsPage") ) { QDomNode n = me.firstChild(); while ( !n.isNull() ) { // Titles and Ids? QDomElement e = n.toElement(); if ( !e.isNull() ) { - if ( e.tagName() == "Title" ) { + if ( e.tagName() == QLatin1String("Title") ) { note->subject()->fromUnicodeString( e.text(), encoding ); } else - if ( e.tagName() == "ID" ) { + if ( e.tagName() == QLatin1String("ID") ) { // Legacy ID attribute? // setId(e.text().toULongLong()); } else - if ( e.tagName() == "Color" ) { + if ( e.tagName() == QLatin1String("Color") ) { QColor color( e.text() ); eda->setBackgroundColor( color ); } - if ( e.tagName() == "Text" ) { + if ( e.tagName() == QLatin1String("Text") ) { QString bodyText = e.text(); //This is for 3.5 era book support. Remove when appropriate. - if ( e.hasAttribute( "fixed" ) ) { - bodyText.replace( "]]>", "]]>" ); + if ( e.hasAttribute( QLatin1String("fixed") ) ) { + bodyText.replace( QLatin1String("]]>"), QLatin1String("]]>") ); } if ( oldBook ) { @@ -340,7 +342,7 @@ Item item; item.setParentCollection( parentCollection ); - item.setMimeType( "text/x-vnd.akonadi.note" ); + item.setMimeType( QLatin1String("text/x-vnd.akonadi.note") ); item.setPayload( note ); item.addAttribute( eda ); @@ -353,5 +355,4 @@ emit message( Error, i18n( "Migration failed: %1" ,errorMsg ) ); } -#include "kjotsmigrator.moc" diff -Nru kdepim-runtime-4.12.3/migration/kjots/main.cpp kdepim-runtime-4.12.90/migration/kjots/main.cpp --- kdepim-runtime-4.12.3/migration/kjots/main.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/migration/kjots/main.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -41,7 +41,7 @@ ki18n( "(c) 2010 the Akonadi developers" ), KLocalizedString(), "http://pim.kde.org/akonadi/" ); - aboutData.setProgramIconName( "akonadi" ); + aboutData.setProgramIconName( QLatin1String("akonadi") ); aboutData.addAuthor( ki18n( "Stephen Kelly" ), ki18n( "Author" ), "steveire@gmail.com" ); KCmdLineArgs::init( argc, argv, &aboutData ); @@ -55,7 +55,7 @@ app->setQuitOnLastWindowClosed( false ); KGlobal::setAllowQuit( true ); - KGlobal::locale()->insertCatalog( "libakonadi" ); + KGlobal::locale()->insertCatalog( QLatin1String("libakonadi") ); if ( !Akonadi::Control::start( 0 ) ) return 2; diff -Nru kdepim-runtime-4.12.3/migration/kmail/abstractcollectionmigrator.cpp kdepim-runtime-4.12.90/migration/kmail/abstractcollectionmigrator.cpp --- kdepim-runtime-4.12.3/migration/kmail/abstractcollectionmigrator.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/migration/kmail/abstractcollectionmigrator.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -40,15 +40,14 @@ #include #include -#include +#include #include #include -#include -#define KOLAB_SHAREDSEEN "/vendor/cmu/cyrus-imapd/sharedseen" -#define KOLAB_INCIDENCESFOR "/vendor/kolab/incidences-for" -#define KOLAB_FOLDERTYPE "/vendor/kolab/folder-type" +#define KOLAB_SHAREDSEEN "/shared/vendor/cmu/cyrus-imapd/sharedseen" +#define KOLAB_INCIDENCESFOR "/shared/vendor/kolab/incidences-for" +#define KOLAB_FOLDERTYPE "/shared/vendor/kolab/folder-type" using namespace Akonadi; @@ -173,11 +172,11 @@ if ( newGroup.hasKey( "IncidencesFor" ) ) { const QString incidenceFor = newGroup.readEntry( "IncidencesFor" ); //kDebug( KDE_DEFAULT_DEBUG_AREA ) << "IncidencesFor=" << incidenceFor; - if ( incidenceFor == "nobody" ) { + if ( incidenceFor == QLatin1String("nobody") ) { annotations[ KOLAB_INCIDENCESFOR ] = "nobody"; - } else if ( incidenceFor == "admins" ) { + } else if ( incidenceFor == QLatin1String("admins") ) { annotations[ KOLAB_INCIDENCESFOR ] = "admins"; - } else if ( incidenceFor == "readers" ) { + } else if ( incidenceFor == QLatin1String("readers") ) { annotations[ KOLAB_INCIDENCESFOR ] = "readers"; } else { annotations[ KOLAB_INCIDENCESFOR ] = "admins"; //Default @@ -188,23 +187,23 @@ if ( newGroup.hasKey( "Annotation-FolderType" ) ) { const QString annotationFolderType = newGroup.readEntry( "Annotation-FolderType" ); EntityDisplayAttribute *attribute = mCurrentCollection.attribute( Akonadi::Collection::AddIfMissing ); - if ( annotationFolderType == "mail" ) { + if ( annotationFolderType == QLatin1String("mail") ) { //???? - } else if ( annotationFolderType == "event" ) { + } else if ( annotationFolderType == QLatin1String("event") ) { annotations[ KOLAB_FOLDERTYPE ] = "event"; - attribute->setIconName( "view-calendar" ); - } else if ( annotationFolderType == "task" ) { + attribute->setIconName( QLatin1String("view-calendar") ); + } else if ( annotationFolderType == QLatin1String("task") ) { annotations[ KOLAB_FOLDERTYPE ] = "task"; - attribute->setIconName( "view-pim-tasks" ); - } else if ( annotationFolderType == "contact" ) { + attribute->setIconName( QLatin1String("view-pim-tasks") ); + } else if ( annotationFolderType == QLatin1String("contact") ) { annotations[ KOLAB_FOLDERTYPE ] = "contact"; - attribute->setIconName( "view-pim-contacts" ); - } else if ( annotationFolderType == "note" ) { + attribute->setIconName( QLatin1String("view-pim-contacts") ); + } else if ( annotationFolderType == QLatin1String("note") ) { annotations[ KOLAB_FOLDERTYPE ] = "note"; - attribute->setIconName( "view-pim-notes" ); - } else if ( annotationFolderType == "journal" ) { + attribute->setIconName( QLatin1String("view-pim-notes") ); + } else if ( annotationFolderType == QLatin1String("journal") ) { annotations[ KOLAB_FOLDERTYPE ] = "journal"; - attribute->setIconName( "view-pim-journal" ); + attribute->setIconName( QLatin1String("view-pim-journal") ); } else { //???? } @@ -302,7 +301,7 @@ } // check emailidentity - const QStringList identityGroups = mEmailIdentityConfig->groupList().filter( QRegExp( "Identity #\\d+" ) ); + const QStringList identityGroups = mEmailIdentityConfig->groupList().filter( QRegExp( QLatin1String("Identity #\\d+") ) ); //kDebug( KDE_DEFAULT_DEBUG_AREA ) << "identityGroups=" << identityGroups; Q_FOREACH ( const QString &groupName, identityGroups ) { KConfigGroup identityGroup( mEmailIdentityConfig, groupName ); @@ -325,9 +324,9 @@ QStringList lstCollection = kcmkmailsummary.readEntry( "Role_CheckState", QStringList() ); QString visualPath( mCurrentFolderId ); - visualPath.remove( ".directory" ); - visualPath.replace( "/.", "/" ); - if ( !visualPath.isEmpty() && ( visualPath.at( 0 ) == '.' ) ) + visualPath.remove( QLatin1String(".directory") ); + visualPath.replace( QLatin1String("/."), QLatin1String("/") ); + if ( !visualPath.isEmpty() && ( visualPath.at( 0 ) == QLatin1Char('.') ) ) visualPath.remove( 0, 1 ); //remove first "." const QString localFolderPattern = QLatin1String( "/Local/%1" ); @@ -336,12 +335,12 @@ if ( lstCollection.contains( localFolderPattern.arg( visualPath ) ) ) { const int pos = lstCollection.indexOf( localFolderPattern.arg( visualPath ) ); lstCollection.replace( pos, newCollectionPattern.arg( mCurrentCollection.id() ) ); - lstCollection.insert( pos+1, "2" ); + lstCollection.insert( pos+1, QLatin1String("2") ); kcmkmailsummary.writeEntry( "Role_CheckState", lstCollection ); } else if ( lstCollection.contains( imapFolderPattern.arg( visualPath ) ) ) { const int pos = lstCollection.indexOf( imapFolderPattern.arg( visualPath ) ); lstCollection.replace( pos, newCollectionPattern.arg( mCurrentCollection.id() ) ); - lstCollection.insert( pos+1, "2" ); + lstCollection.insert( pos+1, QLatin1String("2") ); kcmkmailsummary.writeEntry( "Role_CheckState", lstCollection ); } @@ -366,7 +365,7 @@ general.deleteEntry( "default-mailbox-format" ); // check all expire folder - const QStringList folderGroups = mKMailConfig->groupList().filter( "Folder-" ); + const QStringList folderGroups = mKMailConfig->groupList().filter( QLatin1String("Folder-") ); //kDebug( KDE_DEFAULT_DEBUG_AREA ) << "folderGroups=" << folderGroups; Q_FOREACH ( const QString &groupName, folderGroups ) { KConfigGroup filterGroup( mKMailConfig, groupName ); @@ -375,7 +374,7 @@ } // check all account folder - const QStringList accountGroups = mKMailConfig->groupList().filter( QRegExp( "Account \\d+" ) ); + const QStringList accountGroups = mKMailConfig->groupList().filter( QRegExp( QLatin1String("Account \\d+") ) ); //kDebug( KDE_DEFAULT_DEBUG_AREA ) << "accountGroups=" << accountGroups; Q_FOREACH ( const QString &groupName, accountGroups ) { KConfigGroup accountGroup( mKMailConfig, groupName ); @@ -397,12 +396,12 @@ } // check all filters - const QStringList filterGroups = mKMailConfig->groupList().filter( QRegExp( "Filter #\\d+" ) ); + const QStringList filterGroups = mKMailConfig->groupList().filter( QRegExp( QLatin1String("Filter #\\d+") ) ); //kDebug( KDE_DEFAULT_DEBUG_AREA ) << "filterGroups=" << filterGroups; Q_FOREACH ( const QString &groupName, filterGroups ) { KConfigGroup filterGroup( mKMailConfig, groupName ); - const QStringList actionKeys = filterGroup.keyList().filter( QRegExp( "action-args-\\d+" ) ); + const QStringList actionKeys = filterGroup.keyList().filter( QRegExp( QLatin1String("action-args-\\d+") ) ); //kDebug( KDE_DEFAULT_DEBUG_AREA ) << "actionKeys=" << actionKeys; Q_FOREACH ( const QString &actionKey, actionKeys ) { @@ -837,6 +836,6 @@ return d->mCurrentStoreFolderId; } -#include "abstractcollectionmigrator.moc" +#include "moc_abstractcollectionmigrator.cpp" // kate: space-indent on; indent-width 2; replace-tabs on; diff -Nru kdepim-runtime-4.12.3/migration/kmail/CMakeLists.txt kdepim-runtime-4.12.90/migration/kmail/CMakeLists.txt --- kdepim-runtime-4.12.3/migration/kmail/CMakeLists.txt 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/migration/kmail/CMakeLists.txt 2014-03-13 08:12:29.000000000 +0000 @@ -9,6 +9,7 @@ main.cpp ${MIGRATION_AKONADI_SHARED_SOURCES} ${CMAKE_CURRENT_SOURCE_DIR}/../../resources/shared/collectionannotationsattribute.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/../../resources/shared/createandsettagsjob.cpp ${CMAKE_CURRENT_SOURCE_DIR}/../../resources/mixedmaildir/mixedmaildirstore.cpp ) @@ -18,8 +19,6 @@ ${CMAKE_CURRENT_SOURCE_DIR}/../../resources/mixedmaildir ${CMAKE_CURRENT_SOURCE_DIR}/../../resources/shared ${CMAKE_CURRENT_SOURCE_DIR}/../../resources/shared/filestore - ${NEPOMUK_CORE_INCLUDE_DIR} - ${SOPRANO_INCLUDE_DIR} ) macro(add_resource_iface _kcfgFile _ifaceName _className) @@ -42,13 +41,6 @@ add_resource_iface( mixedmaildir/mixedmaildirresource.kcfg org.kde.Akonadi.MixedMaildir.Settings MixedMaildirSettings ) -soprano_add_ontology(kmail-migrator_srcs - ${CMAKE_CURRENT_SOURCE_DIR}/messagetag.trig - "MessageTag" - "Vocabulary" - "trig" -) - kde4_add_app_icon(kmail-migrator_srcs "${KDE4_ICON_DIR}/oxygen/*/apps/akonadi.png") kde4_add_executable(kmail-migrator ${kmail-migrator_srcs} ) target_link_libraries(kmail-migrator @@ -62,8 +54,6 @@ akonadi-filestore maildir kmindexreader - ${NEPOMUK_CORE_LIBRARY} - ${SOPRANO_LIBRARIES} ) install(TARGETS kmail-migrator ${INSTALL_TARGETS_DEFAULT_ARGS}) diff -Nru kdepim-runtime-4.12.3/migration/kmail/emptyresourcecleaner.cpp kdepim-runtime-4.12.90/migration/kmail/emptyresourcecleaner.cpp --- kdepim-runtime-4.12.3/migration/kmail/emptyresourcecleaner.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/migration/kmail/emptyresourcecleaner.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -224,6 +224,6 @@ == d->mAllCollections.count(); } -#include "emptyresourcecleaner.moc" +#include "moc_emptyresourcecleaner.cpp" // kate: space-indent on; indent-width 2; replace-tabs on; diff -Nru kdepim-runtime-4.12.3/migration/kmail/imapcacheadapter.cpp kdepim-runtime-4.12.90/migration/kmail/imapcacheadapter.cpp --- kdepim-runtime-4.12.3/migration/kmail/imapcacheadapter.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/migration/kmail/imapcacheadapter.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -31,7 +31,7 @@ #include #include -#include +#include #include @@ -101,8 +101,8 @@ AgentInstance instance = createJob->instance(); OrgKdeAkonadiMixedMaildirSettingsInterface *iface = new OrgKdeAkonadiMixedMaildirSettingsInterface( - "org.freedesktop.Akonadi.Resource." + instance.identifier(), - "/Settings", QDBusConnection::sessionBus(), q ); + QLatin1String("org.freedesktop.Akonadi.Resource.") + instance.identifier(), + QLatin1String("/Settings"), QDBusConnection::sessionBus(), q ); if ( !iface->isValid() ) { kError() << "Failed to obtain D-Bus interface for remote configuration of local cache adapter resource" << instance.identifier(); @@ -163,6 +163,6 @@ d->processNextCollection(); } -#include "imapcacheadapter.moc" +#include "moc_imapcacheadapter.cpp" // kate: space-indent on; indent-width 2; replace-tabs on; diff -Nru kdepim-runtime-4.12.3/migration/kmail/imapcachecollectionmigrator.cpp kdepim-runtime-4.12.90/migration/kmail/imapcachecollectionmigrator.cpp --- kdepim-runtime-4.12.3/migration/kmail/imapcachecollectionmigrator.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/migration/kmail/imapcachecollectionmigrator.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -30,6 +30,8 @@ #include "filestore/itemfetchjob.h" #include "filestore/itemdeletejob.h" +#include "createandsettagsjob.h" + #include #include @@ -42,10 +44,9 @@ #include #include -#include - #include -#include +#include +#include #include #include @@ -358,17 +359,16 @@ const QStringList tagList = mTagListHash[ storeRemoteId ].value(); if ( !tagList.isEmpty() ) { kDebug( KDE_DEFAULT_DEBUG_AREA ) << "Tagging item" << item.url() << "with" << tagList; - QList nepomukTags; - Q_FOREACH ( const QString &tag, tagList ) { + + Akonadi::Tag::List tags; + Q_FOREACH( const QString &tag, tagList ) { if ( tag.isEmpty() ) { kWarning() << "TagList for item" << item.url() << "contains an empty tag"; } else { - nepomukTags << Nepomuk2::Tag( tag ); + tags << Akonadi::Tag(tag); } } - - Nepomuk2::Resource nepomukResource( item.url() ); - nepomukResource.setTags( nepomukTags ); + new CreateAndSetTagsJob(item, tags); } const Collection storeCollection = job->property( "storeParentCollection" ).value(); @@ -613,12 +613,12 @@ imapPath.remove( 0, 1 ); imapPath.chop( 1 ); - QChar separator = '/'; + QChar separator = QLatin1Char('/'); int namespaceLength = -1; for ( int i=0; i<=2; i++ ) { QStringList namespaces = accountGroup.readEntry( QString::number( i ), QStringList() ); - namespaces.replaceInStrings( QRegExp( "\"" ), "" ); + namespaces.replaceInStrings( QRegExp( QLatin1String("\"") ), QLatin1String("") ); foreach ( const QString &ns, namespaces ) { QString imapNs = ns; @@ -641,6 +641,6 @@ return separator + storeRemotedId; } -#include "imapcachecollectionmigrator.moc" +#include "moc_imapcachecollectionmigrator.cpp" // kate: space-indent on; indent-width 2; replace-tabs on; diff -Nru kdepim-runtime-4.12.3/migration/kmail/imapcachelocalimporter.cpp kdepim-runtime-4.12.90/migration/kmail/imapcachelocalimporter.cpp --- kdepim-runtime-4.12.3/migration/kmail/imapcachelocalimporter.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/migration/kmail/imapcachelocalimporter.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -35,7 +35,7 @@ #include #include -#include +#include using namespace Akonadi; @@ -196,8 +196,8 @@ void ImapCacheLocalImporter::Private::configureResource() { OrgKdeAkonadiMaildirSettingsInterface *iface = new OrgKdeAkonadiMaildirSettingsInterface( - "org.freedesktop.Akonadi.Resource." + mResource.identifier(), - "/Settings", QDBusConnection::sessionBus(), q ); + QLatin1String("org.freedesktop.Akonadi.Resource.") + mResource.identifier(), + QLatin1String("/Settings"), QDBusConnection::sessionBus(), q ); if ( !iface->isValid() ) { q->importFinished( mResource, i18n( "Failed to obtain D-Bus interface for remote configuration." ) ); @@ -343,6 +343,6 @@ job->start(); } -#include "imapcachelocalimporter.moc" +#include "moc_imapcachelocalimporter.cpp" // kate: space-indent on; indent-width 2; replace-tabs on; diff -Nru kdepim-runtime-4.12.3/migration/kmail/kmailmigrator.cpp kdepim-runtime-4.12.90/migration/kmail/kmailmigrator.cpp --- kdepim-runtime-4.12.3/migration/kmail/kmailmigrator.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/migration/kmail/kmailmigrator.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -24,11 +24,8 @@ #include "kmailmigrator.h" -#include "messagetag.h" // avoid metatype.h from interfering -#include #define POP3_METATYPE_H -#include #include "imapsettings.h" #include "pop3settings.h" @@ -49,6 +46,9 @@ #include #include #include +#include +#include +#include using Akonadi::AgentManager; using Akonadi::AgentInstance; using Akonadi::AgentInstanceCreateJob; @@ -60,14 +60,12 @@ #include #include #include -#include #include -#include #include #include #include -#include +Q_DECLARE_METATYPE(QList); using KWallet::Wallet; @@ -133,18 +131,18 @@ // copy current configs to backup location // strickly speaking neither kmailrc not mailtransports are changed by the migrator // but copy them anyway as the belong conceptually to the KMail1 -> KMail2 migration - backupConfig( "kmailrc", backupDir ); - backupConfig( "mailtransports", backupDir ); - backupConfig( "emailidentities", backupDir ); - backupConfig( "kcmkmailsummaryrc", backupDir ); - backupConfig( "templatesconfigurationrc", backupDir ); + backupConfig( QLatin1String("kmailrc"), backupDir ); + backupConfig( QLatin1String("mailtransports"), backupDir ); + backupConfig( QLatin1String("emailidentities"), backupDir ); + backupConfig( QLatin1String("kcmkmailsummaryrc"), backupDir ); + backupConfig( QLatin1String("templatesconfigurationrc"), backupDir ); KSharedConfigPtr oldConfig = KSharedConfig::openConfig( QLatin1String( "kmailrc" ) ); mConfig = KSharedConfig::openConfig( QLatin1String( "kmail2rc" ) ); const QFileInfo migratorConfigInfo( KStandardDirs::locateLocal( "config", KGlobal::config()->name() ) ); - const QString &newKMailCfgFile = KStandardDirs::locateLocal( "config", QString( "kmail2rc" ) ); + const QString &newKMailCfgFile = KStandardDirs::locateLocal( "config", QLatin1String( "kmail2rc" ) ); // copy old config into new config, if bool copy = false; @@ -155,7 +153,7 @@ // new config is empty copy = copy || mConfig->groupList().isEmpty(); // new config does not contain any account groups - copy = copy || mConfig->groupList().filter( QRegExp( "Account \\d+" ) ).isEmpty(); + copy = copy || mConfig->groupList().filter( QRegExp( QLatin1String("Account \\d+") ) ).isEmpty(); if ( copy ) { kDebug() << "Copying content from kmailrc"; @@ -176,9 +174,9 @@ migrateNotifyFile(); // copy autosave files if there are any - const QString autoSaveDir = KGlobal::dirs()->saveLocation( "data", "kmail/autosave", false ); + const QString autoSaveDir = KGlobal::dirs()->saveLocation( "data", QLatin1String("kmail/autosave"), false ); if ( !autoSaveDir.isEmpty() ) { - const QString destDir = KGlobal::dirs()->saveLocation( "data", "kmail2" ); + const QString destDir = KGlobal::dirs()->saveLocation( "data", QLatin1String("kmail2") ); KIO::CopyJob *job = KIO::copy( KUrl::fromPath( autoSaveDir ), KUrl::fromPath( destDir ), KIO::HideProgressInfo ); @@ -187,7 +185,7 @@ connect( job, SIGNAL(result(KJob*)), this, SLOT(autoSaveCopyResult(KJob*)) ); } - mAccounts = mConfig->groupList().filter( QRegExp( "Account \\d+" ) ); + mAccounts = mConfig->groupList().filter( QRegExp( QLatin1String("Account \\d+") ) ); mIt = mAccounts.begin(); migrateNext(); @@ -203,11 +201,11 @@ void KMailMigrator::deleteOldGroup() { - deleteOldGroup( "GroupwareFolderInfo" ); - deleteOldGroup( "Groupware" ); - deleteOldGroup( "IMAP Resource" ); - deleteOldGroup( "Folder_local_root" ); - deleteOldGroup( "Folder_search" ); + deleteOldGroup( QLatin1String("GroupwareFolderInfo") ); + deleteOldGroup( QLatin1String("Groupware") ); + deleteOldGroup( QLatin1String("IMAP Resource") ); + deleteOldGroup( QLatin1String("Folder_local_root") ); + deleteOldGroup( QLatin1String("Folder_search") ); } void KMailMigrator::deleteOldGroup( const QString& name ) { @@ -219,9 +217,9 @@ void KMailMigrator::migrateNotifyFile() { - const QString notifyFile = KStandardDirs::locate( "config", "kmail.notifyrc" ); + const QString notifyFile = KStandardDirs::locate( "config", QLatin1String("kmail.notifyrc") ); if ( !notifyFile.isEmpty() ) { - QFile::copy( notifyFile, KStandardDirs::locateLocal( "config", "kmail2.notifyrc" ) ); + QFile::copy( notifyFile, KStandardDirs::locateLocal( "config", QLatin1String("kmail2.notifyrc" )) ); } } @@ -231,7 +229,7 @@ KConfigGroup tagMigrationConfig( KGlobal::config(), QLatin1String( "MessageTags" ) ); const QStringList migratedTags = tagMigrationConfig.readEntry( "MigratedTags", QStringList() ); - const QStringList tagGroups = mConfig->groupList().filter( QRegExp( "MessageTag #\\d+" ) ); + const QStringList tagGroups = mConfig->groupList().filter( QRegExp( QLatin1String("MessageTag #\\d+") ) ); QSet groupNames = tagGroups.toSet(); groupNames.subtract( migratedTags.toSet() ); @@ -262,28 +260,22 @@ const QString shortcut = group.readEntry( QLatin1String( "shortcut" ), QString() ); - Nepomuk2::Tag nepomukTag( label ); - nepomukTag.setLabel( name ); - nepomukTag.setSymbols( QStringList( iconName ) ); - nepomukTag.setProperty( Vocabulary::MessageTag::inToolbar(), inToolbar ); + Akonadi::Tag tag(label); + Akonadi::TagAttribute *attr = tag.attribute(Akonadi::AttributeEntity::AddIfMissing); + attr->setDisplayName(name); + attr->setIconName( iconName ); + attr->setInToolbar( inToolbar ); + if (hasFont) { + attr->setFont( textFont.toString() ); + } + attr->setBackgroundColor( backgroundColor ); + attr->setTextColor( textColor ); + attr->setShortcut( shortcut ); - if ( textColor.isValid() ) { - nepomukTag.setProperty( Vocabulary::MessageTag::textColor(), textColor.name() ); - } - - if ( backgroundColor.isValid() ) { - nepomukTag.setProperty( Vocabulary::MessageTag::backgroundColor(), backgroundColor.name() ); - } - - if ( hasFont ) { - nepomukTag.setProperty( Vocabulary::MessageTag::font(), textFont.toString() ); - } - - if ( !shortcut.isEmpty() ) { - nepomukTag.setProperty( Vocabulary::MessageTag::shortcut(), shortcut ); - } + Akonadi::TagCreateJob *createJob = new Akonadi::TagCreateJob(tag); + createJob->setMergeIfExisting(true); - kDebug() << "Nepomuk::Tag: label=" << label << "name=" << name + kDebug() << "Tag: label=" << label << "name=" << name << "textColor=" << textColor << "backgroundColor=" << backgroundColor << "hasFont=" << hasFont << "font=" << textFont << "icon=" << iconName << "inToolbar=" << inToolbar @@ -305,8 +297,8 @@ void KMailMigrator::migrateRCFiles() { - const QDir sourceDir( KStandardDirs::locateLocal( "data", "kmail" ) ); - const QDir targetDir( KStandardDirs::locateLocal( "data", "kmail2" ) ); + const QDir sourceDir( KStandardDirs::locateLocal( "data", QLatin1String("kmail") ) ); + const QDir targetDir( KStandardDirs::locateLocal( "data", QLatin1String("kmail2") ) ); KStandardDirs::makeDir( targetDir.absolutePath() ); const QFileInfoList files = sourceDir.entryInfoList( QStringList() << QLatin1String( "*.rc" ), @@ -352,7 +344,7 @@ void KMailMigrator::migrateLocalFolders() { - if ( migrationState( "LocalFolders" ) == Complete ) { + if ( migrationState( QLatin1String("LocalFolders") ) == Complete ) { emit message( Skip, i18n( "Local folders have already been migrated." ) ); emit status( QString() ); migrationDone(); @@ -377,7 +369,7 @@ // show status/progress info of resources in our dialog mForwardResourceNotifications = true; - createAgentInstance( "akonadi_mixedmaildir_resource", this, + createAgentInstance( QLatin1String("akonadi_mixedmaildir_resource"), this, SLOT(localMaildirCreated(KJob*)) ); } } @@ -403,8 +395,8 @@ OrgKdeAkonadiImapSettingsInterface* KMailMigrator::createImapSettingsInterface( const Akonadi::AgentInstance& instance ) { OrgKdeAkonadiImapSettingsInterface *iface = new OrgKdeAkonadiImapSettingsInterface( - "org.freedesktop.Akonadi.Resource." + instance.identifier(), - "/Settings", QDBusConnection::sessionBus(), this ); + QLatin1String("org.freedesktop.Akonadi.Resource.") + instance.identifier(), + QLatin1String("/Settings"), QDBusConnection::sessionBus(), this ); if ( !iface->isValid() ) { migrationFailed( i18n( "Failed to obtain D-Bus interface for remote configuration." ), instance ); delete iface; @@ -416,8 +408,8 @@ OrgKdeAkonadiPOP3SettingsInterface* KMailMigrator::createPop3SettingsInterface( const Akonadi::AgentInstance& instance ) { OrgKdeAkonadiPOP3SettingsInterface *iface = new OrgKdeAkonadiPOP3SettingsInterface( - "org.freedesktop.Akonadi.Resource." + instance.identifier(), - "/Settings", QDBusConnection::sessionBus(), this ); + QLatin1String("org.freedesktop.Akonadi.Resource.") + instance.identifier(), + QLatin1String("/Settings"), QDBusConnection::sessionBus(), this ); if ( !iface->isValid() ) { migrationFailed( i18n( "Failed to obtain D-Bus interface for remote configuration." ), instance ); delete iface; @@ -449,7 +441,7 @@ ++mIt; } - deleteOldGroup( "FavoriteFolderView" ); + deleteOldGroup( QLatin1String("FavoriteFolderView") ); if ( mConfig->hasGroup( "Internal" ) ) { KConfigGroup cfgGroup( mConfig, "General" ); @@ -520,7 +512,7 @@ const QString accountId = group.readEntry( QLatin1String( "Id" ) ); // check if the account is used in filters - const QStringList filterGroups = mConfig->groupList().filter( QRegExp( "Filter #\\d+" ) ); + const QStringList filterGroups = mConfig->groupList().filter( QRegExp( QLatin1String("Filter #\\d+") ) ); //kDebug( KDE_DEFAULT_DEBUG_AREA ) << "filterGroups=" << filterGroups; Q_FOREACH ( const QString &groupName, filterGroups ) { KConfigGroup filterGroup( mConfig, groupName ); @@ -578,9 +570,9 @@ if ( !passwordFromFilePassword.isEmpty() ) password = passwordFromFilePassword; - if ( password.isEmpty() && mWallet->hasFolder( "kmail" ) ) { - mWallet->setFolder( "kmail" ); - mWallet->readPassword( "account-" + idString, password ); + if ( password.isEmpty() && mWallet->hasFolder( QLatin1String("kmail") ) ) { + mWallet->setFolder( QLatin1String("kmail") ); + mWallet->readPassword( QLatin1String("account-") + idString, password ); } if ( !password.isEmpty() ) { @@ -588,7 +580,7 @@ mWallet->createFolder( newFolder ); mWallet->setFolder( newFolder ); - mWallet->writePassword( instance.identifier() + "rc" , password ); + mWallet->writePassword( instance.identifier() + QLatin1String("rc") , password ); } } } @@ -606,20 +598,20 @@ const QString type = group.readEntry( "Type" ).toLower(); if ( type == QLatin1String( "imap" ) ) { - createAgentInstance( "akonadi_imap_resource", this, + createAgentInstance( QLatin1String("akonadi_imap_resource"), this, SLOT(imapAccountCreated(KJob*)) ); } else if ( type == QLatin1String( "dimap" ) ) { - createAgentInstance( "akonadi_imap_resource", this, + createAgentInstance( QLatin1String("akonadi_imap_resource"), this, SLOT(imapDisconnectedAccountCreated(KJob*)) ); } else if ( type == QLatin1String( "pop" ) ) { - createAgentInstance( "akonadi_pop3_resource", this, + createAgentInstance( QLatin1String("akonadi_pop3_resource"), this, SLOT(pop3AccountCreated(KJob*)) ); } else if ( type == QLatin1String( "maildir" ) ) { - createAgentInstance( "akonadi_maildir_resource", this, + createAgentInstance( QLatin1String("akonadi_maildir_resource"), this, SLOT(maildirAccountCreated(KJob*)) ); } else if ( type == QLatin1String( "local" ) ) { - createAgentInstance( "akonadi_mbox_resource", this, + createAgentInstance( QLatin1String("akonadi_mbox_resource"), this, SLOT(mboxAccountCreated(KJob*)) ); } else { return false; @@ -711,7 +703,7 @@ } const QString topLevelRemoteId = - "imap://" + config.readEntry( "login" ) + '@' + config.readEntry( "host" ) + '/'; + QLatin1String("imap://") + config.readEntry( "login" ) + QLatin1Char('@') + config.readEntry( "host" ) + QLatin1Char('/'); collectionMigrator->setTopLevelFolder( topLevelFolder, nameAccount, topLevelRemoteId ); collectionMigrator->setMigrationOptions( options ); @@ -805,17 +797,17 @@ // so we have to convert from the old string representations typedef MailTransport::Transport::EnumAuthenticationType AuthType; QString authOpt = config.readEntry( "auth" ); - if ( authOpt.contains( "PLAIN", Qt::CaseInsensitive ) ) + if ( authOpt.contains( QLatin1String("PLAIN"), Qt::CaseInsensitive ) ) iface->setAuthenticationMethod( AuthType::PLAIN ); - else if ( authOpt.contains( "CRAM", Qt::CaseInsensitive ) ) + else if ( authOpt.contains( QLatin1String("CRAM"), Qt::CaseInsensitive ) ) iface->setAuthenticationMethod( AuthType::CRAM_MD5 ); - else if ( authOpt.contains( "DIGEST", Qt::CaseInsensitive ) ) + else if ( authOpt.contains( QLatin1String("DIGEST"), Qt::CaseInsensitive ) ) iface->setAuthenticationMethod( AuthType::DIGEST_MD5); - else if ( authOpt.contains( "GSSAPI", Qt::CaseInsensitive ) ) + else if ( authOpt.contains( QLatin1String("GSSAPI"), Qt::CaseInsensitive ) ) iface->setAuthenticationMethod( AuthType::GSSAPI ); - else if ( authOpt.contains( "NTLM", Qt::CaseInsensitive ) ) + else if ( authOpt.contains( QLatin1String("NTLM"), Qt::CaseInsensitive ) ) iface->setAuthenticationMethod( AuthType::NTLM); - else if ( authOpt.contains( "APOP", Qt::CaseInsensitive ) ) + else if ( authOpt.contains( QLatin1String("APOP"), Qt::CaseInsensitive ) ) iface->setAuthenticationMethod( AuthType::APOP ); else iface->setAuthenticationMethod( AuthType::CLEAR ); @@ -837,7 +829,7 @@ config.deleteEntry( "store-passwd" ); config.deleteEntry( "passwd" ); } - migratePassword( config.readEntry( "Id" ), instance, "pop3", encpasswd ); + migratePassword( config.readEntry( "Id" ), instance, QLatin1String("pop3"), encpasswd ); // POP3 filter from files in kmail appdata const QString popFilterFileName = QString::fromLatin1( "kmail/%1:@%2:%3" ) @@ -878,8 +870,8 @@ KConfigGroup config( mConfig, mCurrentAccount ); OrgKdeAkonadiMboxSettingsInterface *iface = new OrgKdeAkonadiMboxSettingsInterface( - "org.freedesktop.Akonadi.Resource." + instance.identifier(), - "/Settings", QDBusConnection::sessionBus(), this ); + QLatin1String("org.freedesktop.Akonadi.Resource.") + instance.identifier(), + QLatin1String("/Settings"), QDBusConnection::sessionBus(), this ); if ( !iface->isValid() ) { migrationFailed( i18n( "Failed to obtain D-Bus interface for remote configuration." ), instance ); @@ -940,8 +932,8 @@ KConfigGroup config( mConfig, mCurrentAccount ); OrgKdeAkonadiMaildirSettingsInterface *iface = new OrgKdeAkonadiMaildirSettingsInterface( - "org.freedesktop.Akonadi.Resource." + instance.identifier(), - "/Settings", QDBusConnection::sessionBus(), this ); + QLatin1String("org.freedesktop.Akonadi.Resource.") + instance.identifier(), + QLatin1String("/Settings"), QDBusConnection::sessionBus(), this ); if ( !iface->isValid() ) { migrationFailed( i18n( "Failed to obtain D-Bus interface for remote configuration." ), instance ); @@ -1065,8 +1057,8 @@ void KMailMigrator::localFoldersMigrationFinished( const AgentInstance &instance, const QString &error ) { OrgKdeAkonadiMixedMaildirSettingsInterface *iface = new OrgKdeAkonadiMixedMaildirSettingsInterface( - "org.freedesktop.Akonadi.Resource." + instance.identifier(), - "/Settings", QDBusConnection::sessionBus(), this ); + QLatin1String("org.freedesktop.Akonadi.Resource.") + instance.identifier(), + QLatin1String("/Settings"), QDBusConnection::sessionBus(), this ); if ( !iface->isValid() ) { migrationFailed( i18n("Failed to obtain D-Bus interface for remote configuration."), instance ); @@ -1105,7 +1097,7 @@ mCurrentInstance = AgentInstance(); - setMigrationState( "LocalFolders", Complete, instance.identifier(), "LocalFolders" ); + setMigrationState( QLatin1String("LocalFolders"), Complete, instance.identifier(), QLatin1String("LocalFolders") ); emit message( Success, i18n( "Local folders migrated successfully." ) ); emit status( QString() ); migrationDone(); @@ -1135,12 +1127,12 @@ iface->setImapServer( config.readEntry( "host" ) ); iface->setImapPort( config.readEntry( "port", 143 ) ); iface->setUserName( config.readEntry( "login" ) ); - if ( config.readEntry( "use-ssl" ).toLower() == "true" ) - iface->setSafety( "SSL" ); - else if ( config.readEntry( "use-tls" ).toLower() == "true" ) - iface->setSafety( "STARTTLS" ); + if ( config.readEntry( "use-ssl" ).toLower() == QLatin1String("true") ) + iface->setSafety( QLatin1String("SSL") ); + else if ( config.readEntry( "use-tls" ).toLower() == QLatin1String("true") ) + iface->setSafety( QLatin1String("STARTTLS") ); else - iface->setSafety( "NONE" ); + iface->setSafety( QLatin1String("NONE") ); const QString authentication = config.readEntry( "auth" ).toUpper(); if ( authentication == QLatin1String( "LOGIN" ) ) iface->setAuthentication( MailTransport::Transport::EnumAuthenticationType::LOGIN ); @@ -1159,7 +1151,7 @@ else { iface->setAuthentication( MailTransport::Transport::EnumAuthenticationType::CLEAR ); } - if ( config.readEntry( "subscribed-folders" ).toLower() == "true" ) + if ( config.readEntry( "subscribed-folders" ).toLower() == QLatin1String("true") ) iface->setSubscriptionEnabled( true ); // skip interval checking so it doesn't interfere with cache importing @@ -1202,7 +1194,7 @@ config.deleteEntry( "store-passwd" ); config.deleteEntry( "passwd" ); } - migratePassword( config.readEntry( "Id" ), instance, "imap", encpasswd ); + migratePassword( config.readEntry( "Id" ), instance, QLatin1String("imap"), encpasswd ); // enable interval checking in case this had been configured const int checkInterval = config.readEntry( "check-interval", 0 ); @@ -1336,7 +1328,7 @@ mCurrentInstance = AgentInstance(); - setMigrationState( "LocalFolders", Complete, localFoldersIdentifier, "LocalFolders" ); + setMigrationState( QLatin1String("LocalFolders"), Complete, localFoldersIdentifier, QLatin1String("LocalFolders") ); emit message( Success, i18n( "Local folders migrated successfully." ) ); emit status( QString() ); migrationDone(); @@ -1356,8 +1348,7 @@ } result[i] = '\0'; - return KStringHandler::obscure( result ); + return KStringHandler::obscure( QString::fromLatin1(result) ); } -#include "kmailmigrator.moc" diff -Nru kdepim-runtime-4.12.3/migration/kmail/localfolderscollectionmigrator.cpp kdepim-runtime-4.12.90/migration/kmail/localfolderscollectionmigrator.cpp --- kdepim-runtime-4.12.3/migration/kmail/localfolderscollectionmigrator.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/migration/kmail/localfolderscollectionmigrator.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -26,7 +26,7 @@ #include #include -#include +#include #include @@ -119,6 +119,5 @@ collectionProcessed(); } -#include "localfolderscollectionmigrator.moc" // kate: space-indent on; indent-width 2; replace-tabs on; diff -Nru kdepim-runtime-4.12.3/migration/kmail/main.cpp kdepim-runtime-4.12.90/migration/kmail/main.cpp --- kdepim-runtime-4.12.3/migration/kmail/main.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/migration/kmail/main.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -43,7 +43,7 @@ ki18n( "(c) 2009-2010 the Akonadi developers" ), KLocalizedString(), "http://pim.kde.org/akonadi/" ); - aboutData.setProgramIconName( "akonadi" ); + aboutData.setProgramIconName( QLatin1String("akonadi") ); aboutData.addAuthor( ki18n( "Jonathan Armond" ), ki18n( "Author" ), "jon.armond@gmail.com" ); KCmdLineArgs::init( argc, argv, &aboutData ); @@ -57,7 +57,7 @@ app->setQuitOnLastWindowClosed( false ); KGlobal::setAllowQuit( true ); - KGlobal::locale()->insertCatalog( "libakonadi" ); + KGlobal::locale()->insertCatalog( QLatin1String("libakonadi") ); if ( !Akonadi::Control::start( 0 ) ) return 2; diff -Nru kdepim-runtime-4.12.3/migration/kmail/mixedtreeconverter.cpp kdepim-runtime-4.12.90/migration/kmail/mixedtreeconverter.cpp --- kdepim-runtime-4.12.3/migration/kmail/mixedtreeconverter.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/migration/kmail/mixedtreeconverter.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -118,4 +118,3 @@ } -#include "mixedtreeconverter.moc" diff -Nru kdepim-runtime-4.12.3/migration/kmigratorbase.cpp kdepim-runtime-4.12.90/migration/kmigratorbase.cpp --- kdepim-runtime-4.12.3/migration/kmigratorbase.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/migration/kmigratorbase.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -32,7 +32,6 @@ #include #include -#include #include #include @@ -59,14 +58,14 @@ { KGlobal::ref(); - const QString logFileName = KStandardDirs::locateLocal( "data", KGlobal::mainComponent().componentName() + "/migration.log" ); + const QString logFileName = KStandardDirs::locateLocal( "data", KGlobal::mainComponent().componentName() + QLatin1String("/migration.log") ); m_logFile = new QFile( logFileName ); if ( !m_logFile->open( QFile::Append ) ) { delete m_logFile; m_logFile = 0; kWarning() << "Unable to open log file: " << logFileName; } - logMessage( Info, "Starting migration..." ); + logMessage( Info, QLatin1String("Starting migration...") ); connect( this, SIGNAL(message(KMigratorBase::MessageType,QString)), SLOT(logMessage(KMigratorBase::MessageType,QString)) ); // load the vtable before we continue @@ -75,14 +74,14 @@ KMigratorBase::~KMigratorBase() { - logMessage( Info, "Migration finished." ); + logMessage( Info, QLatin1String("Migration finished.") ); delete m_logFile; KGlobal::deref(); } KMigratorBase::MigrationState KMigratorBase::migrationState( const QString &identifier ) const { - KConfigGroup cfg( KGlobal::config(), "Resource " + identifier ); + KConfigGroup cfg( KGlobal::config(), QLatin1String("Resource ") + identifier ); QMetaEnum e = metaObject()->enumerator( metaObject()->indexOfEnumerator( "MigrationState" ) ); const QString s = cfg.readEntry( "MigrationState", e.valueToKey( None ) ); MigrationState state = (MigrationState)e.keyToValue( s.toLatin1() ); @@ -100,22 +99,22 @@ void KMigratorBase::setMigrationState( const QString &identifier, MigrationState state, const QString &resId, const QString &type ) { - KConfigGroup cfg( KGlobal::config(), "Resource " + identifier ); + KConfigGroup cfg( KGlobal::config(), QLatin1String("Resource ") + identifier ); QMetaEnum e = metaObject()->enumerator( metaObject()->indexOfEnumerator( "MigrationState" ) ); - const QString stateStr = e.valueToKey( state ); + const QString stateStr = QLatin1String(e.valueToKey( state )); cfg.writeEntry( "MigrationState", stateStr ); cfg.writeEntry( "ResourceIdentifier", resId ); cfg.sync(); cfg = KConfigGroup( KGlobal::config(), "Bridged" ); - QStringList bridgedResources = cfg.readEntry( type + "Resources", QStringList() ); + QStringList bridgedResources = cfg.readEntry( type + QLatin1String("Resources"), QStringList() ); if ( state == Bridged ) { if ( !bridgedResources.contains( identifier ) ) bridgedResources << identifier; } else { bridgedResources.removeAll( identifier ); } - cfg.writeEntry( type + "Resources", bridgedResources ); + cfg.writeEntry( type + QLatin1String("Resources"), bridgedResources ); cfg.sync(); } @@ -137,4 +136,3 @@ } } -#include "kmigratorbase.moc" diff -Nru kdepim-runtime-4.12.3/migration/knotes/CMakeLists.txt kdepim-runtime-4.12.90/migration/knotes/CMakeLists.txt --- kdepim-runtime-4.12.3/migration/knotes/CMakeLists.txt 1970-01-01 00:00:00.000000000 +0000 +++ kdepim-runtime-4.12.90/migration/knotes/CMakeLists.txt 2014-03-13 08:12:29.000000000 +0000 @@ -0,0 +1,43 @@ +include_directories( + ${CMAKE_CURRENT_SOURCE_DIR}/../kres/ +) + + +set(knotes-migrator_srcs + main.cpp + knotesmigrator.cpp + notelockattribute.cpp + knotesmigratorconfig.cpp + notealarmattribute.cpp + notedisplayattribute.cpp + showfoldernotesattribute.cpp + ../kres/kresmigratorbase.cpp + ${MIGRATION_AKONADI_SHARED_SOURCES} +) + +kde4_add_kcfg_files(knotes-migrator_srcs knoteconfig.kcfgc) + +macro(add_resource_iface _kcfgFile _ifaceName _className) + kcfg_generate_dbus_interface(${kdepim-runtime_SOURCE_DIR}/resources/${_kcfgFile} ${_ifaceName}) + string(TOLOWER ${_className} _codeFile) + qt4_add_dbus_interface(knotes-migrator_srcs + ${CMAKE_CURRENT_BINARY_DIR}/${_ifaceName}.xml ${_codeFile} ${_className} + ) +endmacro() + +add_resource_iface( maildir/maildirresource.kcfg org.kde.Akonadi.Maildir.Settings MaildirSettings ) + +kde4_add_executable(knotes-migrator ${knotes-migrator_srcs}) + +target_link_libraries(knotes-migrator + ${KDEPIMLIBS_AKONADI_LIBS} + ${KDE4_KRESOURCE_LIBS} + ${KDEPIMLIBS_KABC_LIBS} + ${KDEPIMLIBS_KCAL_LIBS} + ${KDEPIMLIBS_KMIME_LIBS} + ${KDE4_KDECORE_LIBS} + ${QT_QTGUI_LIBRARY} +) + +install(TARGETS knotes-migrator ${INSTALL_TARGETS_DEFAULT_ARGS}) +#install(FILES knotes-migratorrc DESTINATION ${CONFIG_INSTALL_DIR}) diff -Nru kdepim-runtime-4.12.3/migration/knotes/knoteconfig.kcfg kdepim-runtime-4.12.90/migration/knotes/knoteconfig.kcfg --- kdepim-runtime-4.12.3/migration/knotes/knoteconfig.kcfg 1970-01-01 00:00:00.000000000 +0000 +++ kdepim-runtime-4.12.90/migration/knotes/knoteconfig.kcfg 2014-03-13 08:12:29.000000000 +0000 @@ -0,0 +1,89 @@ + + + kglobalsettings.h + + + + + Qt::yellow + + + + Qt::black + + + + 300 + + + + 300 + + + + true + + + + + + KGlobalSettings::generalFont() + + + + KGlobalSettings::windowTitleFont() + + + + true + + + + false + + + + 4 + + + + false + + + + + + + + + + + + -10 + + + + false + + + + QPoint( -10000, -10000 ) + + + + false + + + + false + + + + false + + + diff -Nru kdepim-runtime-4.12.3/migration/knotes/knoteconfig.kcfgc kdepim-runtime-4.12.90/migration/knotes/knoteconfig.kcfgc --- kdepim-runtime-4.12.3/migration/knotes/knoteconfig.kcfgc 1970-01-01 00:00:00.000000000 +0000 +++ kdepim-runtime-4.12.90/migration/knotes/knoteconfig.kcfgc 2014-03-13 08:12:29.000000000 +0000 @@ -0,0 +1,3 @@ +File=knoteconfig.kcfg +ClassName=KNoteConfig +Mutators=true diff -Nru kdepim-runtime-4.12.3/migration/knotes/knotesmigratorconfig.cpp kdepim-runtime-4.12.90/migration/knotes/knotesmigratorconfig.cpp --- kdepim-runtime-4.12.3/migration/knotes/knotesmigratorconfig.cpp 1970-01-01 00:00:00.000000000 +0000 +++ kdepim-runtime-4.12.90/migration/knotes/knotesmigratorconfig.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -0,0 +1,53 @@ +/* + Copyright (c) 2013, 2014 Montel Laurent + + This program is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License, version 2, as + published by the Free Software Foundation. + + 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 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 "knotesmigratorconfig.h" +#include "knoteconfig.h" + +#include +#include + +#include +using namespace KCal; + +KNotesMigratorConfig::KNotesMigratorConfig(KCal::Journal *journal) + : mJournal(journal), + mConfig(0) +{ + const QString configPath = KGlobal::dirs()->saveLocation( "data", QLatin1String("knotes/") ) + QLatin1String("notes/") + journal->uid(); + if (!configPath.isEmpty()) { + mConfig = new KNoteConfig( KSharedConfig::openConfig( configPath, KConfig::NoGlobals ) ); + mConfig->readConfig(); + } +} + +KNotesMigratorConfig::~KNotesMigratorConfig() +{ + delete mConfig; +} + +bool KNotesMigratorConfig::readOnly() const +{ + if (mConfig) + return mConfig->readOnly(); + return false; +} + +KNoteConfig *KNotesMigratorConfig::noteConfig() +{ + return mConfig; +} diff -Nru kdepim-runtime-4.12.3/migration/knotes/knotesmigratorconfig.h kdepim-runtime-4.12.90/migration/knotes/knotesmigratorconfig.h --- kdepim-runtime-4.12.3/migration/knotes/knotesmigratorconfig.h 1970-01-01 00:00:00.000000000 +0000 +++ kdepim-runtime-4.12.90/migration/knotes/knotesmigratorconfig.h 2014-03-13 08:12:29.000000000 +0000 @@ -0,0 +1,38 @@ +/* + Copyright (c) 2013, 2014 Montel Laurent + + This program is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License, version 2, as + published by the Free Software Foundation. + + 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 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 KNOTESMIGRATORCONFIG_H +#define KNOTESMIGRATORCONFIG_H + +namespace KCal { +class Journal; +} +class KNoteConfig; +class KNotesMigratorConfig +{ +public: + KNotesMigratorConfig(KCal::Journal *journal); + ~KNotesMigratorConfig(); + + bool readOnly() const; + KNoteConfig *noteConfig(); +private: + KCal::Journal *mJournal; + KNoteConfig *mConfig; +}; + +#endif diff -Nru kdepim-runtime-4.12.3/migration/knotes/knotesmigrator.cpp kdepim-runtime-4.12.90/migration/knotes/knotesmigrator.cpp --- kdepim-runtime-4.12.3/migration/knotes/knotesmigrator.cpp 1970-01-01 00:00:00.000000000 +0000 +++ kdepim-runtime-4.12.90/migration/knotes/knotesmigrator.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -0,0 +1,240 @@ +/* + Copyright (c) 2008 Volker Krause + Copyright (c) 2013 Laurent Montel + + 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 "knotesmigrator.h" +#include "notelockattribute.h" +#include "notealarmattribute.h" +#include "notedisplayattribute.h" +#include "showfoldernotesattribute.h" +#include "knotesmigratorconfig.h" +#include "knoteconfig.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "entitytreecreatejob.h" +#include + +#include +#include "maildirsettings.h" +#include + + +using namespace Akonadi; + +KNotesMigrator::KNotesMigrator() : + KResMigrator( QLatin1String("notes"), QString() ), m_notesResource( 0 ) +{ + Akonadi::AttributeFactory::registerAttribute(); + Akonadi::AttributeFactory::registerAttribute(); + Akonadi::AttributeFactory::registerAttribute(); + Akonadi::AttributeFactory::registerAttribute(); +} + +KNotesMigrator::~KNotesMigrator() +{ + delete m_notesResource; +} + +bool KNotesMigrator::migrateResource( KRES::Resource* res) +{ + if ( res->type() == QLatin1String("file") ) + createAgentInstance( QLatin1String("akonadi_akonotes_resource"), this, SLOT(notesResourceCreated(KJob*)) ); + else + return false; + return true; +} + +void KNotesMigrator::notesResourceCreated(KJob * job) +{ + if ( job->error() ) { + migrationFailed( i18n( "Failed to create resource: %1", job->errorText() ) ); + return; + } + + KRES::Resource *res = currentResource(); + m_agentInstance = static_cast( job )->instance(); + const KConfigGroup kresCfg = kresConfig( res ); + m_agentInstance.setName( kresCfg.readEntry( "ResourceName", "Migrated Notes" ) ); + + QString resourcePath = kresCfg.readEntry( "NotesURL" ); + KUrl url( resourcePath ); + + if ( !QFile::exists( url.toLocalFile() ) ) { + migrationCompleted( m_agentInstance ); + return; + } + + m_notesResource = new KCal::CalendarLocal( QString() ); + + bool success = m_notesResource->load( url.toLocalFile() ); + if ( !success ) { + migrationFailed( i18n( "Failed to open file for reading: %1" , resourcePath ) ); + return; + } + + OrgKdeAkonadiMaildirSettingsInterface *iface = new OrgKdeAkonadiMaildirSettingsInterface( + QLatin1String("org.freedesktop.Akonadi.Resource.") + m_agentInstance.identifier(), + QLatin1String("/Settings"), QDBusConnection::sessionBus(), this ); + + if ( !iface->isValid() ) { + migrationFailed( i18n( "Failed to obtain D-Bus interface for remote configuration." ), m_agentInstance ); + delete iface; + return; + } + iface->setReadOnly( res->readOnly() ); + + QDBusPendingReply response = iface->setPath( KGlobal::dirs()->localxdgdatadir() + QLatin1String("/notes/") + KRandom::randomString( 10 ) ); + + // make sure the config is saved + iface->writeConfig(); + + m_agentInstance.reconfigure(); + + ResourceSynchronizationJob *syncJob = new ResourceSynchronizationJob( m_agentInstance, this ); + connect( syncJob, SIGNAL(result(KJob*)), SLOT(syncDone(KJob*))); + syncJob->start(); +} + +void KNotesMigrator::syncDone(KJob *job) +{ + Q_UNUSED( job ); + emit message( Info, i18n( "Instance \"%1\" synchronized" , m_agentInstance.identifier() ) ); + qDebug()<<" m_agentInstance.identifier() :"<error() ) { + emit message( Error, i18nc( "A job to fetch akonadi resources failed. %1 is the error string.", "Fetching resources failed: %1" , job->errorString() ) ); + } +} + +void KNotesMigrator::rootCollectionsRecieved( const Akonadi::Collection::List &list ) +{ + emit message( Info, i18n( "Received root collections" ) ); + foreach ( const Collection &collection, list ) { + if ( collection.resource() == m_agentInstance.identifier() ) { + m_resourceCollection = collection; + startMigration(); + return; + } + } + emit message( Error, i18n( "Could not find root collection for resource \"%1\"" ,m_agentInstance.identifier() ) ); +} + +void KNotesMigrator::startMigration() +{ + KCal::Journal::List oldNotesList = m_notesResource->rawJournals(); + Akonadi::Item::List newItemsList; + KConfig config(QLatin1String("globalnotesettings")); + KConfigGroup grp = config.group(QLatin1String("SelectNoteFolder")); + grp.writeEntry("DefaultFolder", m_resourceCollection.id()); + config.sync(); + + emit message( Info, i18np( "Starting migration of %1 note", "Starting migration of %1 notes", oldNotesList.size() ) ); + + foreach ( KCal::Journal *journal, oldNotesList ) { + Item newItem; + newItem.setMimeType( QLatin1String("text/x-vnd.akonadi.note") ); + newItem.setParentCollection( m_resourceCollection ); + KMime::Message::Ptr note( new KMime::Message() ); + + QByteArray encoding( "utf-8" ); + note->subject( true )->fromUnicodeString( journal->summary(), encoding ); + note->mainBodyPart()->fromUnicodeString( journal->description() ); + note->contentType( true )->setMimeType( journal->descriptionIsRich() ? "text/html" : "text/plain" ); + + note->assemble(); + KNotesMigratorConfig *config = new KNotesMigratorConfig(journal); + if (config) { + + if (config->readOnly()) { + newItem.addAttribute( new NoteLockAttribute() ); + } + + //Position/Editor/Color etc. + NoteDisplayAttribute *displayAttribute = new NoteDisplayAttribute(); + displayAttribute->setBackgroundColor(config->noteConfig()->bgColor()); + displayAttribute->setForegroundColor(config->noteConfig()->fgColor()); + displayAttribute->setSize(QSize(config->noteConfig()->width(), config->noteConfig()->height())); + displayAttribute->setRememberDesktop(config->noteConfig()->rememberDesktop()); + displayAttribute->setTabSize(config->noteConfig()->tabSize()); + displayAttribute->setFont(config->noteConfig()->font()); + displayAttribute->setTitleFont(config->noteConfig()->titleFont()); + displayAttribute->setDesktop(config->noteConfig()->desktop()); + displayAttribute->setIsHidden(config->noteConfig()->hideNote()); + displayAttribute->setPosition(config->noteConfig()->position()); + displayAttribute->setShowInTaskbar(config->noteConfig()->showInTaskbar()); + displayAttribute->setKeepAbove(config->noteConfig()->keepAbove()); + displayAttribute->setKeepBelow(config->noteConfig()->keepBelow()); + displayAttribute->setAutoIndent(config->noteConfig()->autoIndent()); + newItem.addAttribute( displayAttribute ); + delete config; + } + + //Alarm. + //In note we have an unique alarm. + if (!journal->alarms().isEmpty()) { + KCal::Alarm *alarm = journal->alarms().first(); + if (alarm->hasTime()) { + NoteAlarmAttribute *alarmAttribute = new NoteAlarmAttribute; + alarmAttribute->setDateTime(alarm->time()); + newItem.addAttribute( alarmAttribute ); + } + } + newItem.setPayload( note ); + newItemsList.append( newItem ); + } + + EntityTreeCreateJob *createJob = new EntityTreeCreateJob( QList(), newItemsList,this ); + connect(createJob, SIGNAL(result(KJob*)), SLOT(newResourceFilled(KJob*))); +} + +void KNotesMigrator::newResourceFilled(KJob* job) +{ + Q_UNUSED( job ); + showDefaultCollection(); +} + +void KNotesMigrator::showDefaultCollection() +{ + ShowFolderNotesAttribute *attribute = m_resourceCollection.attribute( Akonadi::Collection::AddIfMissing ); + Q_UNUSED(attribute); + Akonadi::CollectionModifyJob *job = new Akonadi::CollectionModifyJob( m_resourceCollection ); + connect(job, SIGNAL(result(KJob*)), SLOT(slotCollectionModify(KJob*))); +} + +void KNotesMigrator::slotCollectionModify(KJob* job) +{ + Q_UNUSED( job ); + migrationCompleted( m_agentInstance ); +} diff -Nru kdepim-runtime-4.12.3/migration/knotes/knotesmigrator.h kdepim-runtime-4.12.90/migration/knotes/knotesmigrator.h --- kdepim-runtime-4.12.3/migration/knotes/knotesmigrator.h 1970-01-01 00:00:00.000000000 +0000 +++ kdepim-runtime-4.12.90/migration/knotes/knotesmigrator.h 2014-03-13 08:12:29.000000000 +0000 @@ -0,0 +1,67 @@ +/* + Copyright (c) 2008 Volker Krause + Copyright (c) 2010 Stephen Kelly + Copyright (c) 2013 Laurent Montel + + 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 KNOTESMIGRATOR_H +#define KNOTESMIGRATOR_H + +#include "kresmigrator.h" + +#include +#include +#include + +#include + +#include + +class KJob; + +/** + * Migrate KNotes resources to Akonadi + */ +class KNotesMigrator : public KResMigrator +{ + Q_OBJECT +public: + KNotesMigrator(); + ~KNotesMigrator(); + bool migrateResource( KRES::Resource *res ); + +private slots: + void notesResourceCreated( KJob* job ); + void syncDone(KJob *job); + void rootFetchFinished( KJob *job ); + void rootCollectionsRecieved( const Akonadi::Collection::List &list ); + void newResourceFilled( KJob *job ); + void slotCollectionModify(KJob *job); + +private: + void startMigration(); + void showDefaultCollection(); + +private: + Akonadi::Collection m_resourceCollection; + AgentInstance m_agentInstance; + + KCal::CalendarLocal *m_notesResource; +}; + +#endif diff -Nru kdepim-runtime-4.12.3/migration/knotes/main.cpp kdepim-runtime-4.12.90/migration/knotes/main.cpp --- kdepim-runtime-4.12.3/migration/knotes/main.cpp 1970-01-01 00:00:00.000000000 +0000 +++ kdepim-runtime-4.12.90/migration/knotes/main.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -0,0 +1,80 @@ +/* + Copyright (c) 2013, 2014 Montel Laurent + + This program is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License, version 2, as + published by the Free Software Foundation. + + 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 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 "knotesmigrator.h" + +#include "infodialog.h" + +#include + +#include +#include +#include +#include +#include + +int main( int argc, char **argv ) +{ + KAboutData aboutData( "knotesmigrator", 0, + ki18n( "KNotes Migration Tool" ), + "0.1", + ki18n( "Migration of KNotes notes to Akonadi" ), + KAboutData::License_LGPL, + ki18n( "(c) 2013 the Akonadi developers" ), + KLocalizedString(), + "http://pim.kde.org/akonadi/" ); + aboutData.setProgramIconName( QLatin1String("akonadi") ); + aboutData.addAuthor( ki18n( "Laurent Montel" ), ki18n( "Author" ), "montel@kde.org" ); + + KCmdLineArgs::init( argc, argv, &aboutData ); + KCmdLineOptions options; + options.add( "interactive", ki18n( "Show reporting dialog" ) ); + options.add( "interactive-on-change", ki18n( "Show report only if changes were made" ) ); + KCmdLineArgs::addCmdLineOptions( options ); + KCmdLineArgs *args = KCmdLineArgs::parsedArgs(); + + KApplication *app = new KApplication(); + app->setQuitOnLastWindowClosed( false ); + + KGlobal::setAllowQuit( true ); + KGlobal::locale()->insertCatalog( QLatin1String("libakonadi") ); + + if ( !Akonadi::Control::start( 0 ) ) + return 2; + + InfoDialog *infoDialog = 0; + if ( args->isSet( "interactive" ) || args->isSet( "interactive-on-change" ) ) { + infoDialog = new InfoDialog( args->isSet( "interactive-on-change" ) ); + infoDialog->show(); + } + args->clear(); + + KNotesMigrator *migrator = new KNotesMigrator; + migrator->setBridgingOnly(false); + migrator->setOmitClientBridge(false); + if ( infoDialog && migrator ) { + infoDialog->migratorAdded(); + QObject::connect( migrator, SIGNAL(message(KMigratorBase::MessageType,QString)), + infoDialog, SLOT(message(KMigratorBase::MessageType,QString)) ); + QObject::connect( migrator, SIGNAL(destroyed()), infoDialog, SLOT(migratorDone()) ); + } + + const int result = app->exec(); + if ( InfoDialog::hasError() ) + return 3; + return result; +} diff -Nru kdepim-runtime-4.12.3/migration/knotes/Messages.sh kdepim-runtime-4.12.90/migration/knotes/Messages.sh --- kdepim-runtime-4.12.3/migration/knotes/Messages.sh 1970-01-01 00:00:00.000000000 +0000 +++ kdepim-runtime-4.12.90/migration/knotes/Messages.sh 2014-03-13 08:12:29.000000000 +0000 @@ -0,0 +1,2 @@ +#!/bin/sh +$XGETTEXT ../*.cpp *.cpp -o $podir/knotes-migrator.pot diff -Nru kdepim-runtime-4.12.3/migration/knotes/notealarmattribute.cpp kdepim-runtime-4.12.90/migration/knotes/notealarmattribute.cpp --- kdepim-runtime-4.12.3/migration/knotes/notealarmattribute.cpp 1970-01-01 00:00:00.000000000 +0000 +++ kdepim-runtime-4.12.90/migration/knotes/notealarmattribute.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -0,0 +1,69 @@ +/* + Copyright (c) 2013, 2014 Montel Laurent + + This program is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License, version 2, as + published by the Free Software Foundation. + + 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 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 "notealarmattribute.h" + +#include + +NoteAlarmAttribute::NoteAlarmAttribute() + : Akonadi::Attribute() +{ + +} + +NoteAlarmAttribute::~NoteAlarmAttribute() +{ + +} + +NoteAlarmAttribute* NoteAlarmAttribute::clone() const +{ + NoteAlarmAttribute *attr = new NoteAlarmAttribute(); + attr->setDateTime(dateTime()); + return attr; +} + +void NoteAlarmAttribute::deserialize(const QByteArray& data) +{ + QDataStream s( data ); + s >> mDateTime; +} + +QByteArray NoteAlarmAttribute::serialized() const +{ + QByteArray result; + QDataStream s( &result, QIODevice::WriteOnly ); + s << mDateTime; + return result; +} + +QByteArray NoteAlarmAttribute::type() const +{ + return "NoteAlarmAttribute"; +} + +void NoteAlarmAttribute::setDateTime(const KDateTime &dateTime) +{ + mDateTime = dateTime; +} + +KDateTime NoteAlarmAttribute::dateTime() const +{ + return mDateTime; +} + + diff -Nru kdepim-runtime-4.12.3/migration/knotes/notealarmattribute.h kdepim-runtime-4.12.90/migration/knotes/notealarmattribute.h --- kdepim-runtime-4.12.3/migration/knotes/notealarmattribute.h 1970-01-01 00:00:00.000000000 +0000 +++ kdepim-runtime-4.12.90/migration/knotes/notealarmattribute.h 2014-03-13 08:12:29.000000000 +0000 @@ -0,0 +1,46 @@ +/* + Copyright (c) 2013, 2014 Montel Laurent + + This program is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License, version 2, as + published by the Free Software Foundation. + + 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 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 NOTE_ALARM_ATTRIBUTE_H +#define NOTE_ALARM_ATTRIBUTE_H + +#include + +#include + +class NoteAlarmAttribute : public Akonadi::Attribute +{ +public: + NoteAlarmAttribute(); + ~NoteAlarmAttribute(); + + QByteArray type() const; + + NoteAlarmAttribute* clone() const; + + QByteArray serialized() const; + + void deserialize( const QByteArray &data ); + + void setDateTime(const KDateTime &dateTime); + KDateTime dateTime() const; + +private: + KDateTime mDateTime; +}; + +#endif diff -Nru kdepim-runtime-4.12.3/migration/knotes/notedisplayattribute.cpp kdepim-runtime-4.12.90/migration/knotes/notedisplayattribute.cpp --- kdepim-runtime-4.12.3/migration/knotes/notedisplayattribute.cpp 1970-01-01 00:00:00.000000000 +0000 +++ kdepim-runtime-4.12.90/migration/knotes/notedisplayattribute.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -0,0 +1,255 @@ +/* + Copyright (c) 2013, 2014 Montel Laurent + + This program is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License, version 2, as + published by the Free Software Foundation. + + 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 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 "notedisplayattribute.h" + +#include + +#include + + +NoteDisplayAttribute::NoteDisplayAttribute() + : Akonadi::Attribute(), + mFont(KGlobalSettings::generalFont()), + mTitleFont(KGlobalSettings::windowTitleFont()), + mBackgroundColor(Qt::yellow), + mForegroundgroundColor(Qt::black), + mSize(300,300), + mPosition(QPoint( -10000, -10000 )), + mTabSize(4), + mDesktop(-10), + mRememberDesktop(true), + mAutoIndent(true), + mHide(false), + mShowInTaskbar(false), + mKeepAbove(false), + mKeepBelove(false), + mKeepBelow(false) +{ + +} + +NoteDisplayAttribute::~NoteDisplayAttribute() +{ + +} + +NoteDisplayAttribute* NoteDisplayAttribute::clone() const +{ + NoteDisplayAttribute *attr = new NoteDisplayAttribute(); + attr->setBackgroundColor(backgroundColor()); + attr->setForegroundColor(foregroundColor()); + attr->setSize(size()); + attr->setRememberDesktop(rememberDesktop()); + attr->setTabSize(tabSize()); + attr->setFont(font()); + attr->setTitleFont(titleFont()); + attr->setDesktop(desktop()); + attr->setIsHidden(isHidden()); + attr->setPosition(position()); + attr->setShowInTaskbar(showInTaskbar()); + attr->setKeepAbove(keepAbove()); + attr->setKeepBelow(keepBelow()); + attr->setAutoIndent(autoIndent()); + return attr; +} + +void NoteDisplayAttribute::deserialize(const QByteArray& data) +{ + QDataStream s( data ); + s >> mFont; + s >> mTitleFont; + s >> mBackgroundColor; + s >> mForegroundgroundColor; + s >> mSize; + s >> mPosition; + s >> mTabSize; + s >> mDesktop; + s >> mRememberDesktop; + s >> mAutoIndent; + s >> mHide; + s >> mShowInTaskbar; + s >> mKeepAbove; + s >> mKeepBelove; + s >> mKeepBelow; +} + +QByteArray NoteDisplayAttribute::serialized() const +{ + QByteArray result; + QDataStream s( &result, QIODevice::WriteOnly ); + s << mFont; + s << mTitleFont; + s << mBackgroundColor; + s << mForegroundgroundColor; + s << mSize; + s << mPosition; + s << mTabSize; + s << mDesktop; + s << mRememberDesktop; + s << mAutoIndent; + s << mHide; + s << mShowInTaskbar; + s << mKeepAbove; + s << mKeepBelove; + s << mKeepBelow; + return result; +} + +QByteArray NoteDisplayAttribute::type() const +{ + return "NoteDisplayAttribute"; +} + +void NoteDisplayAttribute::setBackgroundColor(const QColor &color) +{ + mBackgroundColor = color; +} + +QColor NoteDisplayAttribute::backgroundColor() const +{ + return mBackgroundColor; +} + +void NoteDisplayAttribute::setForegroundColor(const QColor &color) +{ + mForegroundgroundColor = color; +} + +QSize NoteDisplayAttribute::size() const +{ + return mSize; +} + +void NoteDisplayAttribute::setSize(const QSize &size) +{ + mSize = size; +} + +QColor NoteDisplayAttribute::foregroundColor() const +{ + return mForegroundgroundColor; +} + +bool NoteDisplayAttribute::rememberDesktop() const +{ + return mRememberDesktop; +} + +void NoteDisplayAttribute::setRememberDesktop(bool b) +{ + mRememberDesktop = b; +} + +int NoteDisplayAttribute::tabSize() const +{ + return mTabSize; +} + +void NoteDisplayAttribute::setTabSize(int value) +{ + mTabSize = value; +} + +bool NoteDisplayAttribute::autoIndent() const +{ + return mAutoIndent; +} + +void NoteDisplayAttribute::setAutoIndent(bool b) +{ + mAutoIndent = b; +} + +void NoteDisplayAttribute::setFont(const QFont &f) +{ + mFont = f; +} + +QFont NoteDisplayAttribute::font() const +{ + return mFont; +} + +void NoteDisplayAttribute::setTitleFont(const QFont &f) +{ + mTitleFont = f; +} + +QFont NoteDisplayAttribute::titleFont() const +{ + return mTitleFont; +} + +void NoteDisplayAttribute::setDesktop(int v) +{ + mDesktop = v; +} + +int NoteDisplayAttribute::desktop() const +{ + return mDesktop; +} + +void NoteDisplayAttribute::setIsHidden(bool b) +{ + mHide = b; +} + +bool NoteDisplayAttribute::isHidden() const +{ + return mHide; +} + +void NoteDisplayAttribute::setPosition(const QPoint &pos) +{ + mPosition = pos; +} + +QPoint NoteDisplayAttribute::position() const +{ + return mPosition; +} + +void NoteDisplayAttribute::setShowInTaskbar(bool b) +{ + mShowInTaskbar = b; +} + +bool NoteDisplayAttribute::showInTaskbar() const +{ + return mShowInTaskbar; +} + +void NoteDisplayAttribute::setKeepAbove(bool b) +{ + mKeepAbove = b; +} + +bool NoteDisplayAttribute::keepAbove() const +{ + return mKeepAbove; +} + +void NoteDisplayAttribute::setKeepBelow(bool b) +{ + mKeepBelow = b; +} + +bool NoteDisplayAttribute::keepBelow() const +{ + return mKeepBelow; +} diff -Nru kdepim-runtime-4.12.3/migration/knotes/notedisplayattribute.h kdepim-runtime-4.12.90/migration/knotes/notedisplayattribute.h --- kdepim-runtime-4.12.3/migration/knotes/notedisplayattribute.h 1970-01-01 00:00:00.000000000 +0000 +++ kdepim-runtime-4.12.90/migration/knotes/notedisplayattribute.h 2014-03-13 08:12:29.000000000 +0000 @@ -0,0 +1,94 @@ +/* + Copyright (c) 2013, 2014 Montel Laurent + + This program is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License, version 2, as + published by the Free Software Foundation. + + 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 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 NOTE_DISPLAY_ATTRIBUTE_H +#define NOTE_DISPLAY_ATTRIBUTE_H + +#include + +#include +#include +#include +#include + +class NoteDisplayAttribute : public Akonadi::Attribute +{ +public: + NoteDisplayAttribute(); + ~NoteDisplayAttribute(); + + QByteArray type() const; + + NoteDisplayAttribute* clone() const; + + QByteArray serialized() const; + + void deserialize( const QByteArray &data ); + + void setBackgroundColor(const QColor &color); + QColor backgroundColor() const; + QColor foregroundColor() const; + void setForegroundColor(const QColor &color); + + QSize size() const; + void setSize(const QSize &size); + + bool rememberDesktop() const; + void setRememberDesktop(bool b); + void setTabSize(int value); + int tabSize() const; + + + void setFont(const QFont &f); + QFont font() const; + void setTitleFont(const QFont &f); + QFont titleFont() const; + + void setDesktop(int v); + int desktop() const; + void setIsHidden(bool b); + bool isHidden() const; + void setPosition(const QPoint &pos); + QPoint position() const; + void setShowInTaskbar(bool b); + bool showInTaskbar() const; + void setKeepAbove(bool b); + bool keepAbove() const; + void setKeepBelow(bool b); + bool keepBelow() const; + + bool autoIndent() const; + void setAutoIndent(bool b); +private: + QFont mFont; + QFont mTitleFont; + QColor mBackgroundColor; + QColor mForegroundgroundColor; + QSize mSize; + QPoint mPosition; + int mTabSize; + int mDesktop; + bool mRememberDesktop; + bool mAutoIndent; + bool mHide; + bool mShowInTaskbar; + bool mKeepAbove; + bool mKeepBelove; + bool mKeepBelow; +}; + +#endif diff -Nru kdepim-runtime-4.12.3/migration/knotes/notelockattribute.cpp kdepim-runtime-4.12.90/migration/knotes/notelockattribute.cpp --- kdepim-runtime-4.12.3/migration/knotes/notelockattribute.cpp 1970-01-01 00:00:00.000000000 +0000 +++ kdepim-runtime-4.12.90/migration/knotes/notelockattribute.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -0,0 +1,58 @@ +/* + Copyright (C) 2010 Klarälvdalens Datakonsult AB, + a KDAB Group company, info@kdab.net, + author Stephen Kelly + + 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 "notelockattribute.h" + +#include + +NoteLockAttribute::NoteLockAttribute() + : Akonadi::Attribute() +{ + +} + +NoteLockAttribute::~NoteLockAttribute() +{ + +} + +NoteLockAttribute* NoteLockAttribute::clone() const +{ + return new NoteLockAttribute(); +} + +void NoteLockAttribute::deserialize(const QByteArray& data) +{ + Q_UNUSED( data ); +} + +QByteArray NoteLockAttribute::serialized() const +{ + return "-"; +} + +QByteArray NoteLockAttribute::type() const +{ + //We can't change this name! + return "KJotsLockAttribute"; +} + + diff -Nru kdepim-runtime-4.12.3/migration/knotes/notelockattribute.h kdepim-runtime-4.12.90/migration/knotes/notelockattribute.h --- kdepim-runtime-4.12.3/migration/knotes/notelockattribute.h 1970-01-01 00:00:00.000000000 +0000 +++ kdepim-runtime-4.12.90/migration/knotes/notelockattribute.h 2014-03-13 08:12:29.000000000 +0000 @@ -0,0 +1,42 @@ +/* + Copyright (C) 2010 Klarälvdalens Datakonsult AB, + a KDAB Group company, info@kdab.net, + author Stephen Kelly + + 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 KJOTS_LOCK_ATTRIBUTE_H +#define KJOTS_LOCK_ATTRIBUTE_H + +#include + +class NoteLockAttribute : public Akonadi::Attribute +{ +public: + NoteLockAttribute(); + ~NoteLockAttribute(); + + QByteArray type() const; + + NoteLockAttribute* clone() const; + + QByteArray serialized() const; + + void deserialize( const QByteArray &data ); +}; + +#endif diff -Nru kdepim-runtime-4.12.3/migration/knotes/showfoldernotesattribute.cpp kdepim-runtime-4.12.90/migration/knotes/showfoldernotesattribute.cpp --- kdepim-runtime-4.12.3/migration/knotes/showfoldernotesattribute.cpp 1970-01-01 00:00:00.000000000 +0000 +++ kdepim-runtime-4.12.90/migration/knotes/showfoldernotesattribute.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -0,0 +1,49 @@ +/* + Copyright (c) 2013, 2014 Montel Laurent + + This program is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License, version 2, as + published by the Free Software Foundation. + + 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 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 "showfoldernotesattribute.h" + +#include +ShowFolderNotesAttribute::ShowFolderNotesAttribute() +{ +} + +ShowFolderNotesAttribute::~ShowFolderNotesAttribute() +{ +} + +ShowFolderNotesAttribute *ShowFolderNotesAttribute::clone() const +{ + return new ShowFolderNotesAttribute(); +} + +QByteArray ShowFolderNotesAttribute::type() const +{ + static const QByteArray sType( "showfoldernotesattribute" ); + return sType; +} + +QByteArray ShowFolderNotesAttribute::serialized() const +{ + return "-"; +} + +void ShowFolderNotesAttribute::deserialize( const QByteArray &data ) +{ + Q_UNUSED( data ); +} diff -Nru kdepim-runtime-4.12.3/migration/knotes/showfoldernotesattribute.h kdepim-runtime-4.12.90/migration/knotes/showfoldernotesattribute.h --- kdepim-runtime-4.12.3/migration/knotes/showfoldernotesattribute.h 1970-01-01 00:00:00.000000000 +0000 +++ kdepim-runtime-4.12.90/migration/knotes/showfoldernotesattribute.h 2014-03-13 08:12:29.000000000 +0000 @@ -0,0 +1,36 @@ +/* + Copyright (c) 2013, 2014 Montel Laurent + + This program is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License, version 2, as + published by the Free Software Foundation. + + 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 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 SHOWFOLDERNOTESATTRIBUTE_H +#define SHOWFOLDERNOTESATTRIBUTE_H + +#include + +class ShowFolderNotesAttribute : public Akonadi::Attribute +{ +public: + ShowFolderNotesAttribute(); + ~ShowFolderNotesAttribute(); + + /* reimpl */ + ShowFolderNotesAttribute *clone() const; + QByteArray type() const; + QByteArray serialized() const; + void deserialize( const QByteArray &data ); +}; + +#endif // SHOWFOLDERNOTESATTRIBUTE_H diff -Nru kdepim-runtime-4.12.3/migration/kres/kabcmigrator.cpp kdepim-runtime-4.12.90/migration/kres/kabcmigrator.cpp --- kdepim-runtime-4.12.3/migration/kres/kabcmigrator.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/migration/kres/kabcmigrator.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -31,14 +31,14 @@ using namespace Akonadi; KABCMigrator::KABCMigrator() : - KResMigrator( "contact", "akonadi_kabc_resource" ) + KResMigrator( QLatin1String("contact"), QLatin1String("akonadi_kabc_resource") ) { } bool KABCMigrator::migrateResource( KABC::Resource* res) { kDebug() << res->identifier() << res->type(); - if ( res->type() == "file" ) + if ( res->type() == QLatin1String("file") ) return migrateFileResource( res ); else return false; @@ -49,15 +49,15 @@ { const KConfigGroup kresCfg = kresConfig( res ); const QString format = kresCfg.readEntry( "FileFormat", "" ); - if ( format == "binary" ) { + if ( format == QLatin1String("binary") ) { emit message( Warning, i18n( "Unsupported file format found. " "The file format '%1' is no longer supported, please convert to another one.", format ) ); return false; - } else if ( format != "vcard" ) { + } else if ( format != QLatin1String("vcard") ) { emit message( Skip, i18n( "File format '%1' is not yet supported natively.", format ) ); return false; } - createAgentInstance( "akonadi_vcard_resource", this, SLOT(fileResourceCreated(KJob*)) ); + createAgentInstance( QLatin1String("akonadi_vcard_resource"), this, SLOT(fileResourceCreated(KJob*)) ); return true; } @@ -72,14 +72,14 @@ const KConfigGroup kresCfg = kresConfig( res ); instance.setName( kresCfg.readEntry( "ResourceName", i18n("Migrated Addressbook") ) ); - OrgKdeAkonadiVCardSettingsInterface *iface = new OrgKdeAkonadiVCardSettingsInterface( "org.freedesktop.Akonadi.Resource." + instance.identifier(), - "/Settings", QDBusConnection::sessionBus(), this ); + OrgKdeAkonadiVCardSettingsInterface *iface = new OrgKdeAkonadiVCardSettingsInterface( QLatin1String("org.freedesktop.Akonadi.Resource.") + instance.identifier(), + QLatin1String("/Settings"), QDBusConnection::sessionBus(), this ); if ( !iface->isValid() ) { migrationFailed( i18n( "Failed to obtain D-Bus interface for remote configuration." ), instance ); delete iface; return; } - iface->setPath( kresCfg.readPathEntry( "FileName", KStandardDirs::locateLocal( "data", "kabc/std.vcf" ) ) ); + iface->setPath( kresCfg.readPathEntry( "FileName", KStandardDirs::locateLocal( "data", QLatin1String("kabc/std.vcf") ) ) ); iface->setReadOnly( res->readOnly() ); // make sure the config is saved @@ -89,4 +89,3 @@ migrationCompleted( instance ); } -#include "kabcmigrator.moc" diff -Nru kdepim-runtime-4.12.3/migration/kres/kcalmigrator.cpp kdepim-runtime-4.12.90/migration/kres/kcalmigrator.cpp --- kdepim-runtime-4.12.3/migration/kres/kcalmigrator.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/migration/kres/kcalmigrator.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -35,19 +35,19 @@ using namespace Akonadi; KCalMigrator::KCalMigrator() : - KResMigrator( "calendar", "akonadi_kcal_resource" ) + KResMigrator( QLatin1String("calendar"), QLatin1String("akonadi_kcal_resource") ) { } bool KCalMigrator::migrateResource( KCal::ResourceCalendar* res) { kDebug() << res->identifier() << res->type(); - if ( res->type() == "file" ) - createAgentInstance( "akonadi_ical_resource", this, SLOT(fileResourceCreated(KJob*)) ); - else if ( res->type() == "birthdays" ) - createAgentInstance( "akonadi_birthdays_resource", this, SLOT(birthdaysResourceCreated(KJob*)) ); - else if ( res->type() == "groupdav" ) - createAgentInstance( "akonadi_davgroupware_resource", this, SLOT(davResourceCreated(KJob*)) ); + if ( res->type() == QLatin1String("file") ) + createAgentInstance( QLatin1String("akonadi_ical_resource"), this, SLOT(fileResourceCreated(KJob*)) ); + else if ( res->type() == QLatin1String("birthdays") ) + createAgentInstance( QLatin1String("akonadi_birthdays_resource"), this, SLOT(birthdaysResourceCreated(KJob*)) ); + else if ( res->type() == QLatin1String("groupdav") ) + createAgentInstance( QLatin1String("akonadi_davgroupware_resource"), this, SLOT(davResourceCreated(KJob*)) ); else return false; return true; @@ -62,16 +62,16 @@ KCal::ResourceCalendar *res = currentResource(); AgentInstance instance = static_cast( job )->instance(); const KConfigGroup kresCfg = kresConfig( res ); - instance.setName( kresCfg.readEntry( "ResourceName", "Migrated Calendar" ) ); + instance.setName( kresCfg.readEntry( "ResourceName", i18n("Migrated Calendar") ) ); - OrgKdeAkonadiICalSettingsInterface *iface = new OrgKdeAkonadiICalSettingsInterface( "org.freedesktop.Akonadi.Resource." + instance.identifier(), - "/Settings", QDBusConnection::sessionBus(), this ); + OrgKdeAkonadiICalSettingsInterface *iface = new OrgKdeAkonadiICalSettingsInterface( QLatin1String("org.freedesktop.Akonadi.Resource.") + instance.identifier(), + QLatin1String("/Settings"), QDBusConnection::sessionBus(), this ); if ( !iface->isValid() ) { migrationFailed( i18n( "Failed to obtain D-Bus interface for remote configuration." ), instance ); delete iface; return; } - iface->setPath( kresCfg.readPathEntry( "CalendarURL", "" ) ); + iface->setPath( kresCfg.readPathEntry( "CalendarURL", QLatin1String("") ) ); iface->setReadOnly( res->readOnly() ); // make sure the config is saved @@ -90,11 +90,11 @@ KCal::ResourceCalendar *res = currentResource(); AgentInstance instance = static_cast( job )->instance(); const KConfigGroup kresCfg = kresConfig( res ); - instance.setName( kresCfg.readEntry( "ResourceName", "Migrated Birthdays" ) ); + instance.setName( kresCfg.readEntry( "ResourceName", i18n("Migrated Birthdays") ) ); OrgKdeAkonadiBirthdaysSettingsInterface *iface = - new OrgKdeAkonadiBirthdaysSettingsInterface( "org.freedesktop.Akonadi.Resource." + instance.identifier(), - "/Settings", QDBusConnection::sessionBus(), this ); + new OrgKdeAkonadiBirthdaysSettingsInterface( QLatin1String("org.freedesktop.Akonadi.Resource.") + instance.identifier(), + QLatin1String("/Settings"), QDBusConnection::sessionBus(), this ); if ( !iface->isValid() ) { migrationFailed( i18n( "Failed to obtain D-Bus interface for remote configuration." ), instance ); delete iface; @@ -117,25 +117,25 @@ KCal::ResourceCalendar *res = currentResource(); AgentInstance instance = static_cast( job )->instance(); const KConfigGroup kresCfg = kresConfig( res ); - QString name = kresCfg.readEntry( "ResourceName", "Migrated GroupDAV" ); + QString name = kresCfg.readEntry( "ResourceName", i18n("Migrated GroupDAV") ); instance.setName( name ); - QString groupdavCfgFile = KStandardDirs::locateLocal( "config", "kresources_groupwarerc" ); + QString groupdavCfgFile = KStandardDirs::locateLocal( "config", QLatin1String("kresources_groupwarerc") ); if ( !KStandardDirs::exists( groupdavCfgFile ) ) { migrationFailed( i18n( "Failed to find the configuration file for the GroupDAV KResource" ), instance ); return; } KConfig groupdavCfg( groupdavCfgFile ); - if ( !groupdavCfg.hasGroup( res->identifier() + ":General" ) ) { + if ( !groupdavCfg.hasGroup( res->identifier() + QLatin1String(":General") ) ) { migrationFailed( i18n( "Apparently invalid configuration file for the GroupDAV KResource" ), instance ); return; } - KConfigGroup groupdavGeneralCfg = groupdavCfg.group( res->identifier() + ":General" ); + KConfigGroup groupdavGeneralCfg = groupdavCfg.group( res->identifier() + QLatin1String(":General") ); OrgKdeAkonadiDavGroupwareSettingsInterface *iface = - new OrgKdeAkonadiDavGroupwareSettingsInterface( "org.freedesktop.Akonadi.Resource." + instance.identifier(), - "/Settings", QDBusConnection::sessionBus(), this ); + new OrgKdeAkonadiDavGroupwareSettingsInterface( QLatin1String("org.freedesktop.Akonadi.Resource.") + instance.identifier(), + QLatin1String("/Settings"), QDBusConnection::sessionBus(), this ); if ( !iface->isValid() ) { migrationFailed( i18n( "Failed to obtain D-Bus interface for remote configuration." ), instance ); delete iface; @@ -150,11 +150,11 @@ return; } - if ( !url.endsWith( '/' ) ) - url.append( "/" ); + if ( !url.endsWith( QLatin1Char('/') ) ) + url.append( QLatin1String("/") ); QStringList remoteUrls; - remoteUrls << QString( user + "|GroupDav|" + url ); + remoteUrls << QString( user + QLatin1String("|GroupDav|") + url ); kDebug() << name << remoteUrls; iface->setDisplayName( name ); @@ -167,4 +167,3 @@ } -#include "kcalmigrator.moc" diff -Nru kdepim-runtime-4.12.3/migration/kres/knotesmigrator.cpp kdepim-runtime-4.12.90/migration/kres/knotesmigrator.cpp --- kdepim-runtime-4.12.3/migration/kres/knotesmigrator.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/migration/kres/knotesmigrator.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -31,14 +31,13 @@ #include #include "maildirsettings.h" -#include #include using namespace Akonadi; KNotesMigrator::KNotesMigrator() : - KResMigrator( "notes", QString() ), m_notesResource( 0 ) + KResMigrator( QLatin1String("notes"), QString() ), m_notesResource( 0 ) { } @@ -49,8 +48,8 @@ bool KNotesMigrator::migrateResource( KRES::Resource* res) { - if ( res->type() == "file" ) - createAgentInstance( "akonadi_akonotes_resource", this, SLOT(notesResourceCreated(KJob*)) ); + if ( res->type() == QLatin1String("file") ) + createAgentInstance( QLatin1String("akonadi_akonotes_resource"), this, SLOT(notesResourceCreated(KJob*)) ); else return false; return true; @@ -85,8 +84,8 @@ } OrgKdeAkonadiMaildirSettingsInterface *iface = new OrgKdeAkonadiMaildirSettingsInterface( - "org.freedesktop.Akonadi.Resource." + m_agentInstance.identifier(), - "/Settings", QDBusConnection::sessionBus(), this ); + QLatin1String("org.freedesktop.Akonadi.Resource.") + m_agentInstance.identifier(), + QLatin1String("/Settings"), QDBusConnection::sessionBus(), this ); if ( !iface->isValid() ) { migrationFailed( i18n( "Failed to obtain D-Bus interface for remote configuration." ), m_agentInstance ); @@ -95,7 +94,7 @@ } iface->setReadOnly( res->readOnly() ); - QDBusPendingReply response = iface->setPath( KGlobal::dirs()->localxdgdatadir() + "/notes/" + KRandom::randomString( 10 ) ); + QDBusPendingReply response = iface->setPath( KGlobal::dirs()->localxdgdatadir() + QLatin1String("/notes/") + KRandom::randomString( 10 ) ); // make sure the config is saved iface->writeConfig(); @@ -147,7 +146,7 @@ foreach ( KCal::Journal *journal, oldNotesList ) { Item newItem; - newItem.setMimeType( "text/x-vnd.akonadi.note" ); + newItem.setMimeType( QLatin1String("text/x-vnd.akonadi.note") ); newItem.setParentCollection( m_resourceCollection ); KMime::Message::Ptr note( new KMime::Message() ); diff -Nru kdepim-runtime-4.12.3/migration/kres/kresmigratorbase.cpp kdepim-runtime-4.12.90/migration/kres/kresmigratorbase.cpp --- kdepim-runtime-4.12.3/migration/kres/kresmigratorbase.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/migration/kres/kresmigratorbase.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -40,7 +40,7 @@ mBridgingInProgress( false ) { KConfigGroup cfg( KGlobal::config(), "Bridged" ); - mPendingBridgedResources = cfg.readEntry( mType + "Resources", QStringList() ); + mPendingBridgedResources = cfg.readEntry( mType + QLatin1String("Resources"), QStringList() ); } void KResMigratorBase::migrateToBridge( KRES::Resource *res, const QString & typeId) @@ -70,7 +70,7 @@ const KConfigGroup kresCfg = kresConfig( res ); instance.setName( kresCfg.readEntry( "ResourceName", "Bridged KResource" ) ); - const QString akoResCfgFile = KStandardDirs::locateLocal( "config", QString( "%1rc" ).arg( instance.identifier() ) ); + const QString akoResCfgFile = KStandardDirs::locateLocal( "config", QString::fromLatin1( "%1rc" ).arg( instance.identifier() ) ); KConfig *akoResConfig = new KConfig( akoResCfgFile ); KConfigGroup bridgeResCfg( akoResConfig, kresCfg.name() ); kresCfg.copyTo( &bridgeResCfg ); @@ -131,7 +131,7 @@ nonConstInstance.synchronize(); // check if this one was previously bridged and remove the bridge - KConfigGroup cfg( KGlobal::config(), "Resource " + kresId ); + KConfigGroup cfg( KGlobal::config(), QLatin1String("Resource ") + kresId ); const QString bridgeId = cfg.readEntry( "ResourceIdentifier", "" ); if ( bridgeId != instance.identifier() ) { const AgentInstance bridge = AgentManager::self()->instance( bridgeId ); @@ -145,10 +145,10 @@ void KResMigratorBase::createKolabResource( const QString &kresId, const QString &kresName ) { // check if kolab resource exists. If not, create one. - Akonadi::AgentInstance kolabAgent = Akonadi::AgentManager::self()->instance( "akonadi_kolabproxy_resource" ); + Akonadi::AgentInstance kolabAgent = Akonadi::AgentManager::self()->instance( QLatin1String("akonadi_kolabproxy_resource") ); if ( !kolabAgent.isValid() ) { emit message( Info, i18n( "Attempting to create kolab resource" ) ); - KJob * job = createAgentInstance( "akonadi_kolabproxy_resource", this, SLOT(kolabResourceCreated(KJob*)) ); + KJob * job = createAgentInstance(QLatin1String( "akonadi_kolabproxy_resource"), this, SLOT(kolabResourceCreated(KJob*)) ); job->setProperty( "kresId", kresId ); job->setProperty( "kresName", kresName ); } else { @@ -175,4 +175,3 @@ -#include "kresmigratorbase.moc" diff -Nru kdepim-runtime-4.12.3/migration/kres/kresmigrator.h kdepim-runtime-4.12.90/migration/kres/kresmigrator.h --- kdepim-runtime-4.12.3/migration/kres/kresmigrator.h 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/migration/kres/kresmigrator.h 2014-03-13 08:12:29.000000000 +0000 @@ -58,7 +58,7 @@ void migrate() { - const QString kresCfgFile = KStandardDirs::locateLocal( "config", QString( "kresources/%1/stdrc" ).arg( mType ) ); + const QString kresCfgFile = KStandardDirs::locateLocal( "config", QString::fromLatin1( "kresources/%1/stdrc" ).arg( mType ) ); mConfig = new KConfig( kresCfgFile ); const KConfigGroup generalGroup( mConfig, QLatin1String( "General" ) ); mUnknownTypeResources = QSet::fromList( generalGroup.readEntry( QLatin1String( "ResourceKeys" ), QStringList() ) ); @@ -80,14 +80,14 @@ { while ( mIt != mResourcesToMigrate.constEnd() ) { mUnknownTypeResources.remove( ( *mIt )->identifier() ); - if ( ( *mIt )->type() == "akonadi" ) { + if ( ( *mIt )->type() == QLatin1String("akonadi") ) { mClientBridgeIdentifier = ( *mIt )->identifier(); mClientBridgeFound = true; emit message( Skip, i18n( "Client-side bridge already set up." ) ); ++mIt; continue; } - KConfigGroup cfg( KGlobal::config(), "Resource " + ( *mIt )->identifier() ); + //KConfigGroup cfg( KGlobal::config(), QLatin1String("Resource ") + ( *mIt )->identifier() ); kDebug() << "migrateNext:" << ( *mIt )->identifier(); if ( migrationState( ( *mIt )->identifier() ) == None ) { emit message( Info, i18n( "Trying to migrate '%1'...", ( *mIt )->resourceName() ) ); @@ -96,7 +96,7 @@ mCurrentKResource = res; ++mIt; - if ( res->type() == "imap" ) { + if ( res->type() == QLatin1String("imap") ) { createKolabResource( res->identifier(), res->resourceName() ); } else { bool nativeAvailable = mBridgeOnly ? false : migrateResource( res ); @@ -142,7 +142,7 @@ return; } const QString resId = mPendingBridgedResources.takeFirst(); - KConfigGroup resMigrationCfg( KGlobal::config(), "Resource " + resId ); + KConfigGroup resMigrationCfg( KGlobal::config(), QLatin1String("Resource ") + resId ); const QString akoResId = resMigrationCfg.readEntry( "ResourceIdentifier", "" ); if ( akoResId.isEmpty() ) { mUnknownTypeResources.remove( resId ); @@ -151,7 +151,7 @@ return; } - const QString bridgedCfgFile = KStandardDirs::locateLocal( "config", QString( "%1rc" ).arg( akoResId ) ); + const QString bridgedCfgFile = KStandardDirs::locateLocal( "config", QString::fromLatin1( "%1rc" ).arg( akoResId ) ); kDebug() << bridgedCfgFile; if ( !QFile::exists( bridgedCfgFile ) ) { emit message( Info, i18n( "Bridged resource %1 does not exist anymore, trying a direct migration", akoResId ) ); @@ -219,7 +219,7 @@ KConfigGroup kresConfig( KRES::Resource* res ) const { - return KConfigGroup( mConfig, "Resource_" + res->identifier() ); + return KConfigGroup( mConfig, QLatin1String("Resource_") + res->identifier() ); } T* currentResource() @@ -262,7 +262,7 @@ if ( !mOmitClientBridge ) { if ( !mClientBridgeFound ) { emit message( Info, i18n( "Setting up client-side bridge..." ) ); - T* clientBridge = mManager->createResource( "akonadi" ); + T* clientBridge = mManager->createResource( QLatin1String("akonadi") ); if ( clientBridge ) { mClientBridgeIdentifier = clientBridge->identifier(); clientBridge->setResourceName( i18n( "Akonadi Compatibility Resource" ) ); @@ -275,8 +275,8 @@ } mManager->writeConfig(); - const QString keyName( "DefaultAkonadiResourceIdentifier" ); - KConfigGroup clientBridgeConfig( mConfig, "Resource_" + mClientBridgeIdentifier ); + const QString keyName( QLatin1String("DefaultAkonadiResourceIdentifier") ); + KConfigGroup clientBridgeConfig( mConfig, QLatin1String("Resource_") + mClientBridgeIdentifier ); if ( !clientBridgeConfig.hasKey( keyName ) && !mAgentForOldDefaultResource.isEmpty() ) { clientBridgeConfig.writeEntry( keyName, mAgentForOldDefaultResource ); diff -Nru kdepim-runtime-4.12.3/migration/kres/main.cpp kdepim-runtime-4.12.90/migration/kres/main.cpp --- kdepim-runtime-4.12.3/migration/kres/main.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/migration/kres/main.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -49,10 +49,10 @@ ki18n( "(c) 2008 the Akonadi developers" ), KLocalizedString(), "http://pim.kde.org/akonadi/" ); - aboutData.setProgramIconName( "akonadi" ); + aboutData.setProgramIconName( QLatin1String("akonadi") ); aboutData.addAuthor( ki18n( "Volker Krause" ), ki18n( "Author" ), "vkrause@kde.org" ); - const QStringList supportedTypes = QStringList() << "contact" << "calendar" << "notes"; + const QStringList supportedTypes = QStringList() << QLatin1String("contact") << QLatin1String("calendar") << QLatin1String("notes"); KCmdLineArgs::init( argc, argv, &aboutData ); KCmdLineOptions options; @@ -62,17 +62,17 @@ options.add( "calendar-only", ki18n( "Only migrate calendar resources" ) ); options.add( "notes-only", ki18n( "Only migrate knotes resources" ) ); options.add( "type ", ki18n( "Only migrate the specified types (supported: contact, calendar, notes)" ), - supportedTypes.join( "," ).toLatin1() ); + supportedTypes.join( QLatin1String(",") ).toLatin1() ); options.add( "interactive", ki18n( "Show reporting dialog" ) ); options.add( "interactive-on-change", ki18n( "Show report only if changes were made" ) ); KCmdLineArgs::addCmdLineOptions( options ); KCmdLineArgs *args = KCmdLineArgs::parsedArgs(); QStringList typesToMigrate; - foreach ( const QString &type, args->getOption( "type" ).split( ',' ) ) { + foreach ( const QString &type, args->getOption( "type" ).split( QLatin1Char(',') ) ) { if ( !supportedTypes.contains( type ) ) kWarning() << "Unknown resource type: " << type; - else if ( !QDBusConnection::sessionBus().registerService( "org.kde.Akonadi.KResMigrator." + type ) ) + else if ( !QDBusConnection::sessionBus().registerService( QLatin1String("org.kde.Akonadi.KResMigrator.") + type ) ) kWarning() << "Migrator instance already running for type " << type; else typesToMigrate << type; @@ -84,7 +84,7 @@ app.setQuitOnLastWindowClosed( false ); KGlobal::setAllowQuit( true ); - KGlobal::locale()->insertCatalog( "libakonadi" ); + KGlobal::locale()->insertCatalog( QLatin1String("libakonadi") ); InfoDialog *infoDialog = 0; if ( args->isSet( "interactive" ) || args->isSet( "interactive-on-change" ) ) { @@ -94,11 +94,11 @@ foreach ( const QString &type, typesToMigrate ) { KResMigratorBase *m = 0; - if ( type == "contact" ) + if ( type == QLatin1String("contact") ) m = new KABCMigrator(); - else if ( type == "calendar" ) + else if ( type == QLatin1String("calendar") ) m = new KCalMigrator(); - else if ( type == "notes" ) + else if ( type == QLatin1String("notes") ) m = new KNotesMigrator(); else { kError() << "Unknown resource type: " << type; diff -Nru kdepim-runtime-4.12.3/migration/migratorbase.cpp kdepim-runtime-4.12.90/migration/migratorbase.cpp --- kdepim-runtime-4.12.3/migration/migratorbase.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/migration/migratorbase.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -23,7 +23,6 @@ #include #include #include -#include #include #include #include @@ -229,12 +228,12 @@ void MigratorBase::saveState() { - config().writeEntry("MigrationState", stateToIdentifier(mMigrationState)); + config().writeEntry(QLatin1String("MigrationState"), stateToIdentifier(mMigrationState)); } void MigratorBase::loadState() { - const QString state = config().readEntry("MigrationState", QString()); + const QString state = config().readEntry(QLatin1String("MigrationState"), QString()); if (!state.isEmpty()) { mMigrationState = identifierToState(state); } @@ -287,4 +286,3 @@ return QString(); } -#include "migratorbase.moc" diff -Nru kdepim-runtime-4.12.3/migration/tests/testgidmigration.cpp kdepim-runtime-4.12.90/migration/tests/testgidmigration.cpp --- kdepim-runtime-4.12.3/migration/tests/testgidmigration.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/migration/tests/testgidmigration.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -88,7 +88,7 @@ void TestGidMigration::init() { AkonadiTest::setAllResourcesOffline(); - Akonadi::AgentInstance agent = Akonadi::AgentManager::self()->instance("akonadi_knut_resource_0"); + Akonadi::AgentInstance agent = Akonadi::AgentManager::self()->instance(QLatin1String("akonadi_knut_resource_0")); QVERIFY(agent.isValid()); agent.setIsOnline(true); diff -Nru kdepim-runtime-4.12.3/migration/tests/testmigratorbase.cpp kdepim-runtime-4.12.90/migration/tests/testmigratorbase.cpp --- kdepim-runtime-4.12.3/migration/tests/testmigratorbase.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/migration/tests/testmigratorbase.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -32,12 +32,12 @@ bool mCanStart; explicit Testmigrator(const QString &identifier, QObject *parent = 0) - : MigratorBase("testmigrator" + identifier, parent), + : MigratorBase(QLatin1String("testmigrator") + identifier, parent), mCanStart(true) {}; explicit Testmigrator(const QString &identifier, const QString &logfile, const QString &configFile, QObject *parent = 0) - : MigratorBase("testmigrator" + identifier, configFile, logfile, parent), + : MigratorBase(QLatin1String("testmigrator") + identifier, configFile, logfile, parent), mCanStart(true) {}; diff -Nru kdepim-runtime-4.12.3/opensync/akonadisink.cpp kdepim-runtime-4.12.90/opensync/akonadisink.cpp --- kdepim-runtime-4.12.3/opensync/akonadisink.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/opensync/akonadisink.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -56,4 +56,3 @@ osync_trace( TRACE_EXIT, "%s", __PRETTY_FUNCTION__ ); } -#include "akonadisink.moc" diff -Nru kdepim-runtime-4.12.3/opensync/datasink.cpp kdepim-runtime-4.12.90/opensync/datasink.cpp --- kdepim-runtime-4.12.3/opensync/datasink.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/opensync/datasink.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -431,4 +431,3 @@ success(); } -#include "datasink.moc" diff -Nru kdepim-runtime-4.12.3/opensync/sinkbase.cpp kdepim-runtime-4.12.90/opensync/sinkbase.cpp --- kdepim-runtime-4.12.3/opensync/sinkbase.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/opensync/sinkbase.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -156,4 +156,3 @@ mContext = context; } -#include "sinkbase.moc" diff -Nru kdepim-runtime-4.12.3/plugins/akonadi_serializer_addressee.cpp kdepim-runtime-4.12.90/plugins/akonadi_serializer_addressee.cpp --- kdepim-runtime-4.12.3/plugins/akonadi_serializer_addressee.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/plugins/akonadi_serializer_addressee.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -265,4 +265,3 @@ Q_EXPORT_PLUGIN2( akonadi_serializer_addressee, Akonadi::SerializerPluginAddressee ) -#include "akonadi_serializer_addressee.moc" diff -Nru kdepim-runtime-4.12.3/plugins/akonadi_serializer_bookmark.cpp kdepim-runtime-4.12.90/plugins/akonadi_serializer_bookmark.cpp --- kdepim-runtime-4.12.3/plugins/akonadi_serializer_bookmark.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/plugins/akonadi_serializer_bookmark.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -74,4 +74,3 @@ Q_EXPORT_PLUGIN2( akonadi_serializer_bookmark, SerializerPluginBookmark ) -#include "akonadi_serializer_bookmark.moc" diff -Nru kdepim-runtime-4.12.3/plugins/akonadi_serializer_contactgroup.cpp kdepim-runtime-4.12.90/plugins/akonadi_serializer_contactgroup.cpp --- kdepim-runtime-4.12.3/plugins/akonadi_serializer_contactgroup.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/plugins/akonadi_serializer_contactgroup.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -119,7 +119,16 @@ compareList( reporter, i18n( "Member" ), leftJob->contacts(), rightJob->contacts() ); } +//// GidExtractorInterface + +QString SerializerPluginContactGroup::extractGid( const Item &item ) const +{ + if ( !item.hasPayload() ) { + return QString(); + } + return item.payload().id(); +} + Q_EXPORT_PLUGIN2( akonadi_serializer_contactgroup, Akonadi::SerializerPluginContactGroup ) -#include "akonadi_serializer_contactgroup.moc" // kate: space-indent on; indent-width 2; replace-tabs on; diff -Nru kdepim-runtime-4.12.3/plugins/akonadi_serializer_contactgroup.desktop kdepim-runtime-4.12.90/plugins/akonadi_serializer_contactgroup.desktop --- kdepim-runtime-4.12.3/plugins/akonadi_serializer_contactgroup.desktop 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/plugins/akonadi_serializer_contactgroup.desktop 2014-03-13 08:12:29.000000000 +0000 @@ -2,7 +2,7 @@ Name=Contact Group Serializer Name[ar]=مسلسل مجموعة جهات الإتصال Name[bs]=Serializator kontaktne grupe -Name[ca]=Serialitzador de grups de contactes +Name[ca]=Serialitzador de grup de contactes Name[ca@valencia]=Serialitzador de grups de contactes Name[da]=Serieordning af kontaktgruppe Name[de]=Kontaktgruppen-Serialisierung @@ -48,7 +48,7 @@ Comment=An Akonadi serializer plugin for contact group objects Comment[ar]=ملحق مسلسل اكوندا لكائنات مجموعة الإتصال Comment[bs]=Akonadi dodatak serializatora za objekte kontakt grupe -Comment[ca]=Un connector de serialització de l'Akonadi pels objectes de grups de contactes +Comment[ca]=Un connector de serialització de l'Akonadi pels objectes de grup de contactes Comment[ca@valencia]=Un connector de serialització de l'Akonadi pels objectes de grups de contactes Comment[da]=Et Akonadi-plugin til serieordning af kontaktgruppeobjekter Comment[de]=Akonadi-Modul zur Serialisierung von Kontaktgruppen diff -Nru kdepim-runtime-4.12.3/plugins/akonadi_serializer_contactgroup.h kdepim-runtime-4.12.90/plugins/akonadi_serializer_contactgroup.h --- kdepim-runtime-4.12.3/plugins/akonadi_serializer_contactgroup.h 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/plugins/akonadi_serializer_contactgroup.h 2014-03-13 08:12:29.000000000 +0000 @@ -24,6 +24,7 @@ #include #include +#include namespace Akonadi { @@ -32,11 +33,13 @@ */ class SerializerPluginContactGroup : public QObject, public ItemSerializerPlugin, - public DifferencesAlgorithmInterface + public DifferencesAlgorithmInterface, + public GidExtractorInterface { Q_OBJECT Q_INTERFACES( Akonadi::ItemSerializerPlugin ) Q_INTERFACES( Akonadi::DifferencesAlgorithmInterface ) + Q_INTERFACES( Akonadi::GidExtractorInterface ) public: bool deserialize( Item& item, const QByteArray& label, QIODevice& data, int version ); @@ -45,6 +48,8 @@ void compare( Akonadi::AbstractDifferencesReporter *reporter, const Akonadi::Item &leftItem, const Akonadi::Item &rightItem ); + + QString extractGid( const Item& item ) const; }; } diff -Nru kdepim-runtime-4.12.3/plugins/akonadi_serializer_kalarm.cpp kdepim-runtime-4.12.90/plugins/akonadi_serializer_kalarm.cpp --- kdepim-runtime-4.12.3/plugins/akonadi_serializer_kalarm.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/plugins/akonadi_serializer_kalarm.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -266,6 +266,5 @@ Q_EXPORT_PLUGIN2(akonadi_serializer_kalarm, SerializerPluginKAlarm) -#include "akonadi_serializer_kalarm.moc" // vim: et sw=4: diff -Nru kdepim-runtime-4.12.3/plugins/akonadi_serializer_kcalcore.cpp kdepim-runtime-4.12.90/plugins/akonadi_serializer_kcalcore.cpp --- kdepim-runtime-4.12.3/plugins/akonadi_serializer_kcalcore.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/plugins/akonadi_serializer_kcalcore.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -347,6 +347,15 @@ } } +//// GidExtractorInterface + +QString SerializerPluginKCalCore::extractGid( const Item &item ) const +{ + if ( !item.hasPayload() ) { + return QString(); + } + return item.payload()->instanceIdentifier(); +} + Q_EXPORT_PLUGIN2( akonadi_serializer_kcalcore, SerializerPluginKCalCore ) -#include "akonadi_serializer_kcalcore.moc" diff -Nru kdepim-runtime-4.12.3/plugins/akonadi_serializer_kcalcore.desktop kdepim-runtime-4.12.90/plugins/akonadi_serializer_kcalcore.desktop --- kdepim-runtime-4.12.3/plugins/akonadi_serializer_kcalcore.desktop 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/plugins/akonadi_serializer_kcalcore.desktop 2014-03-13 08:12:29.000000000 +0000 @@ -48,7 +48,7 @@ Comment=An Akonadi serializer plugin for events, tasks and journal entries Comment[ar]=ملحق مسلسل اكوندا لمدخلات الأحداث و المهمات و السّجل اليومي Comment[bs]=Akonadi dodatak serializatora za događaje, zadatke i žurnal upise -Comment[ca]=Un connector de serialització de l'Akonadi pels objectes incidències +Comment[ca]=Un connector de serialització de l'Akonadi pels objectes d'incidències Comment[ca@valencia]=Un connector de serialització de l'Akonadi pels objectes incidències Comment[da]=Et Akonadi-plugin til serieordning af hændelser, opgaver og journalindgange Comment[de]=Akonadi-Modul zur Serialisierung von Ereignissen diff -Nru kdepim-runtime-4.12.3/plugins/akonadi_serializer_kcalcore.h kdepim-runtime-4.12.90/plugins/akonadi_serializer_kcalcore.h --- kdepim-runtime-4.12.3/plugins/akonadi_serializer_kcalcore.h 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/plugins/akonadi_serializer_kcalcore.h 2014-03-13 08:12:29.000000000 +0000 @@ -24,18 +24,21 @@ #include #include +#include #include namespace Akonadi { class SerializerPluginKCalCore : public QObject, public ItemSerializerPlugin, - public DifferencesAlgorithmInterface + public DifferencesAlgorithmInterface, + public GidExtractorInterface { Q_OBJECT Q_INTERFACES( Akonadi::ItemSerializerPlugin ) Q_INTERFACES( Akonadi::DifferencesAlgorithmInterface ) + Q_INTERFACES( Akonadi::GidExtractorInterface ) public: bool deserialize( Item& item, const QByteArray& label, QIODevice& data, int version ); @@ -44,6 +47,9 @@ void compare( Akonadi::AbstractDifferencesReporter *reporter, const Akonadi::Item &leftItem, const Akonadi::Item &rightItem ); + + QString extractGid( const Item &item ) const; + private: KCalCore::ICalFormat mFormat; }; diff -Nru kdepim-runtime-4.12.3/plugins/akonadi_serializer_kcal.cpp kdepim-runtime-4.12.90/plugins/akonadi_serializer_kcal.cpp --- kdepim-runtime-4.12.3/plugins/akonadi_serializer_kcal.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/plugins/akonadi_serializer_kcal.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -300,4 +300,3 @@ Q_EXPORT_PLUGIN2( akonadi_serializer_kcal, SerializerPluginKCal ) -#include "akonadi_serializer_kcal.moc" diff -Nru kdepim-runtime-4.12.3/plugins/akonadi_serializer_kcal.desktop kdepim-runtime-4.12.90/plugins/akonadi_serializer_kcal.desktop --- kdepim-runtime-4.12.3/plugins/akonadi_serializer_kcal.desktop 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/plugins/akonadi_serializer_kcal.desktop 2014-03-13 08:12:29.000000000 +0000 @@ -48,7 +48,7 @@ Comment=An Akonadi serializer plugin for events, tasks and journal entries Comment[ar]=ملحق مسلسل اكوندا لمدخلات الأحداث و المهمات و السّجل اليومي Comment[bs]=Akonadi dodatak serializatora za događaje, zadatke i žurnal upise -Comment[ca]=Un connector de serialització de l'Akonadi pels objectes incidències +Comment[ca]=Un connector de serialització de l'Akonadi pels objectes d'incidències Comment[ca@valencia]=Un connector de serialització de l'Akonadi pels objectes incidències Comment[da]=Et Akonadi-plugin til serieordning af hændelser, opgaver og journalindgange Comment[de]=Akonadi-Modul zur Serialisierung von Ereignissen diff -Nru kdepim-runtime-4.12.3/plugins/akonadi_serializer_mail.cpp kdepim-runtime-4.12.90/plugins/akonadi_serializer_mail.cpp --- kdepim-runtime-4.12.3/plugins/akonadi_serializer_mail.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/plugins/akonadi_serializer_mail.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -111,7 +111,7 @@ if ( !addrList.isEmpty() ) parseAddrList( addrList, msg->from(), version, m_stringPool ); // sender - ImapParser::parseParenthesizedList( env[2], addrList ); + ImapParser::parseParenthesizedList( env[3], addrList ); if ( !addrList.isEmpty() ) parseAddrList( addrList, msg->sender(), version, m_stringPool ); // reply-to @@ -220,6 +220,17 @@ return set; } +QString SerializerPluginMail::extractGid(const Item& item) const +{ + if (!item.hasPayload()) + return QString(); + const KMime::Message::Ptr msg = item.payload(); + KMime::Headers::MessageID *mid = msg->messageID( false ); + if (mid) + return mid->asUnicodeString(); + return QString(); +} + Q_EXPORT_PLUGIN2( akonadi_serializer_mail, SerializerPluginMail ) -#include "akonadi_serializer_mail.moc" +#include "moc_akonadi_serializer_mail.cpp" diff -Nru kdepim-runtime-4.12.3/plugins/akonadi_serializer_mail.h kdepim-runtime-4.12.90/plugins/akonadi_serializer_mail.h --- kdepim-runtime-4.12.3/plugins/akonadi_serializer_mail.h 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/plugins/akonadi_serializer_mail.h 2014-03-13 08:12:29.000000000 +0000 @@ -25,6 +25,7 @@ #include #include +#include namespace Akonadi { @@ -48,15 +49,16 @@ QSet m_pool; }; -class SerializerPluginMail : public QObject, public ItemSerializerPlugin +class SerializerPluginMail : public QObject, public ItemSerializerPlugin, public GidExtractorInterface { Q_OBJECT - Q_INTERFACES( Akonadi::ItemSerializerPlugin ) + Q_INTERFACES( Akonadi::ItemSerializerPlugin Akonadi::GidExtractorInterface) public: bool deserialize( Item& item, const QByteArray& label, QIODevice& data, int version ); void serialize( const Item& item, const QByteArray& label, QIODevice& data, int &version ); QSet parts( const Item &item ) const; + QString extractGid(const Item& item) const; private: StringPool m_stringPool; }; diff -Nru kdepim-runtime-4.12.3/plugins/akonadi_serializer_microblog.cpp kdepim-runtime-4.12.90/plugins/akonadi_serializer_microblog.cpp --- kdepim-runtime-4.12.3/plugins/akonadi_serializer_microblog.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/plugins/akonadi_serializer_microblog.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -62,4 +62,3 @@ Q_EXPORT_PLUGIN2( akonadi_serializer_microblog, Akonadi::SerializerPluginmicroblog ) -#include "akonadi_serializer_microblog.moc" diff -Nru kdepim-runtime-4.12.3/plugins/akonadi_serializer_microblog.desktop kdepim-runtime-4.12.90/plugins/akonadi_serializer_microblog.desktop --- kdepim-runtime-4.12.3/plugins/akonadi_serializer_microblog.desktop 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/plugins/akonadi_serializer_microblog.desktop 2014-03-13 08:12:29.000000000 +0000 @@ -2,7 +2,7 @@ Name=Microblog Serializer Name[ar]=مسلسل التدوين المصغر Name[bs]=Siralizator mikrobloga -Name[ca]=Serialitzador de microbloc +Name[ca]=Serialitzador de micro-blog Name[ca@valencia]=Serialitzador de microbloc Name[da]=Serieordning af microblogs Name[de]=Microblog-Serialisierung @@ -48,7 +48,7 @@ Comment=An Akonadi serializer plugin for Microblog Comment[ar]=ملحق مسلسل اكوندا للتدوين المصغر Comment[bs]=Akonadi dodatak serializatora za Microblog -Comment[ca]=Un connector de serialització de l'Akonadi pels microblocs +Comment[ca]=Un connector de serialització de l'Akonadi pels micro-blogs Comment[ca@valencia]=Un connector de serialització de l'Akonadi pels microblocs Comment[da]=Et Akonadi-plugin til serieordning af microblogs Comment[de]=Akonadi-Modul zur Serialisierung von Microblog-Objekten diff -Nru kdepim-runtime-4.12.3/plugins/CMakeLists.txt kdepim-runtime-4.12.90/plugins/CMakeLists.txt --- kdepim-runtime-4.12.3/plugins/CMakeLists.txt 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/plugins/CMakeLists.txt 2014-03-13 08:12:29.000000000 +0000 @@ -31,13 +31,10 @@ target_link_libraries(akonadi_serializer_kcalcore ${KDE4_KDECORE_LIBS} ${KDEPIMLIBS_KCALUTILS_LIBS} ${KDEPIMLIBS_KCALCORE_LIBS} ${KDEPIMLIBS_AKONADI_LIBS}) install(TARGETS akonadi_serializer_kcalcore DESTINATION ${PLUGIN_INSTALL_DIR}) -if(NOT WINCE) - set(akonadi_serializer_bookmark_SRCS akonadi_serializer_bookmark.cpp) kde4_add_plugin(akonadi_serializer_bookmark ${SERIALIZER_TYPE} ${akonadi_serializer_bookmark_SRCS}) target_link_libraries(akonadi_serializer_bookmark ${KDE4_KDECORE_LIBS} ${KDE4_KIO_LIBS} ${KDEPIMLIBS_AKONADI_LIBS}) install(TARGETS akonadi_serializer_bookmark DESTINATION ${PLUGIN_INSTALL_DIR}) -endif() set(akonadi_serializer_contactgroup_PART_SRCS akonadi_serializer_contactgroup.cpp ) kde4_add_plugin(akonadi_serializer_contactgroup ${SERIALIZER_TYPE} ${akonadi_serializer_contactgroup_PART_SRCS}) @@ -45,12 +42,10 @@ ${KDEPIMLIBS_AKONADI_KABC_LIBS} ${KDEPIMLIBS_AKONADI_CONTACT_LIBS}) install(TARGETS akonadi_serializer_contactgroup DESTINATION ${PLUGIN_INSTALL_DIR}) -if(NOT WINCE) set( akonadi_serializer_microblog_SRCS akonadi_serializer_microblog.cpp ) kde4_add_plugin(akonadi_serializer_microblog ${SERIALIZER_TYPE} ${akonadi_serializer_microblog_SRCS}) target_link_libraries(akonadi_serializer_microblog ${KDEPIMLIBS_AKONADI_LIBS} ${QT_QTCORE_LIBRARY} ${KDE4_KDECORE_LIBS} ${QT_QTXML_LIBRARY} ${KDEPIMLIBS_KPIMUTILS_LIBS} ${KDEPIMLIBS_MICROBLOG_LIBS}) install(TARGETS akonadi_serializer_microblog DESTINATION ${PLUGIN_INSTALL_DIR}) -endif() set(akonadi_serializer_kalarm_SRCS akonadi_serializer_kalarm.cpp kaeventformatter.cpp) kde4_add_plugin(akonadi_serializer_kalarm ${SERIALIZER_TYPE} ${akonadi_serializer_kalarm_SRCS}) diff -Nru kdepim-runtime-4.12.3/plugins/tests/addresseeserializertest.cpp kdepim-runtime-4.12.90/plugins/tests/addresseeserializertest.cpp --- kdepim-runtime-4.12.3/plugins/tests/addresseeserializertest.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/plugins/tests/addresseeserializertest.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -44,4 +44,4 @@ QTEST_KDEMAIN( AddresseeSerializerTest, NoGUI ) -#include "addresseserializertest.moc" +#include "addresseeserializertest.moc" diff -Nru kdepim-runtime-4.12.3/plugins/tests/mailserializerplugintest.cpp kdepim-runtime-4.12.90/plugins/tests/mailserializerplugintest.cpp --- kdepim-runtime-4.12.3/plugins/tests/mailserializerplugintest.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/plugins/tests/mailserializerplugintest.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -93,4 +93,3 @@ QCOMPARE( data, serialized ); } -#include "mailserializerplugintest.moc" diff -Nru kdepim-runtime-4.12.3/plugins/tests/mailserializertest.cpp kdepim-runtime-4.12.90/plugins/tests/mailserializertest.cpp --- kdepim-runtime-4.12.3/plugins/tests/mailserializertest.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/plugins/tests/mailserializertest.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -18,7 +18,6 @@ */ #include "mailserializertest.h" -#include "mailserializertest.moc" #include "akonadi_serializer_mail.cpp" diff -Nru kdepim-runtime-4.12.3/qml/akonadi/CMakeLists.txt kdepim-runtime-4.12.90/qml/akonadi/CMakeLists.txt --- kdepim-runtime-4.12.3/qml/akonadi/CMakeLists.txt 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/qml/akonadi/CMakeLists.txt 2014-03-13 08:12:29.000000000 +0000 @@ -11,8 +11,6 @@ DESTINATION ${PLUGIN_INSTALL_DIR}/imports/org/kde/akonadi ) -if(NOT WINCE) add_subdirectory( tests ) -endif() endif () diff -Nru kdepim-runtime-4.12.3/qml/kde/kdeintegration.cpp kdepim-runtime-4.12.90/qml/kde/kdeintegration.cpp --- kdepim-runtime-4.12.3/qml/kde/kdeintegration.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/qml/kde/kdeintegration.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -302,5 +302,5 @@ return mm * QApplication::desktop()->logicalDpiX() / 25.4; } -#include "kdeintegration.moc" +#include "moc_kdeintegration.cpp" diff -Nru kdepim-runtime-4.12.3/qml/kde/kdeintegrationplugin.cpp kdepim-runtime-4.12.90/qml/kde/kdeintegrationplugin.cpp --- kdepim-runtime-4.12.3/qml/kde/kdeintegrationplugin.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/qml/kde/kdeintegrationplugin.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -43,6 +43,5 @@ engine->rootContext()->setContextProperty( QLatin1String("KDE"), new KDEIntegration( engine ) ); } -#include "kdeintegrationplugin.moc" Q_EXPORT_PLUGIN2( kdeintegrationplugin, KDEIntegrationPlugin ) diff -Nru kdepim-runtime-4.12.3/qml/kde/tests/qmlbreadcrumbnavigation/breadcrumbnavigationcontext.cpp kdepim-runtime-4.12.90/qml/kde/tests/qmlbreadcrumbnavigation/breadcrumbnavigationcontext.cpp --- kdepim-runtime-4.12.3/qml/kde/tests/qmlbreadcrumbnavigation/breadcrumbnavigationcontext.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/qml/kde/tests/qmlbreadcrumbnavigation/breadcrumbnavigationcontext.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -395,4 +395,3 @@ -#include "breadcrumbnavigationcontext.moc" diff -Nru kdepim-runtime-4.12.3/qml/kde/tests/qmlbreadcrumbnavigation/breadcrumbnavigation.cpp kdepim-runtime-4.12.90/qml/kde/tests/qmlbreadcrumbnavigation/breadcrumbnavigation.cpp --- kdepim-runtime-4.12.3/qml/kde/tests/qmlbreadcrumbnavigation/breadcrumbnavigation.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/qml/kde/tests/qmlbreadcrumbnavigation/breadcrumbnavigation.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -183,4 +183,3 @@ resetNavigation(); } -#include "breadcrumbnavigation.moc" diff -Nru kdepim-runtime-4.12.3/qml/kde/tests/qmlbreadcrumbnavigation/checkableitemproxymodel.cpp kdepim-runtime-4.12.90/qml/kde/tests/qmlbreadcrumbnavigation/checkableitemproxymodel.cpp --- kdepim-runtime-4.12.3/qml/kde/tests/qmlbreadcrumbnavigation/checkableitemproxymodel.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/qml/kde/tests/qmlbreadcrumbnavigation/checkableitemproxymodel.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -118,5 +118,5 @@ } -#include "checkableitemproxymodel.moc" +#include "moc_checkableitemproxymodel.cpp" diff -Nru kdepim-runtime-4.12.3/qml/kde/tests/qmlbreadcrumbnavigation/dynamictreemodel.cpp kdepim-runtime-4.12.90/qml/kde/tests/qmlbreadcrumbnavigation/dynamictreemodel.cpp --- kdepim-runtime-4.12.3/qml/kde/tests/qmlbreadcrumbnavigation/dynamictreemodel.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/qml/kde/tests/qmlbreadcrumbnavigation/dynamictreemodel.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -963,5 +963,4 @@ } -#include "dynamictreemodel.moc" diff -Nru kdepim-runtime-4.12.3/qml/kde/tests/qmlbreadcrumbnavigation/dynamictreewidget.cpp kdepim-runtime-4.12.90/qml/kde/tests/qmlbreadcrumbnavigation/dynamictreewidget.cpp --- kdepim-runtime-4.12.3/qml/kde/tests/qmlbreadcrumbnavigation/dynamictreewidget.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/qml/kde/tests/qmlbreadcrumbnavigation/dynamictreewidget.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -396,4 +396,3 @@ } -#include "dynamictreewidget.moc" diff -Nru kdepim-runtime-4.12.3/qml/kde/tests/qmlbreadcrumbnavigation/kbreadcrumbselectionmodel.cpp kdepim-runtime-4.12.90/qml/kde/tests/qmlbreadcrumbnavigation/kbreadcrumbselectionmodel.cpp --- kdepim-runtime-4.12.3/qml/kde/tests/qmlbreadcrumbnavigation/kbreadcrumbselectionmodel.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/qml/kde/tests/qmlbreadcrumbnavigation/kbreadcrumbselectionmodel.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -208,4 +208,3 @@ } } -#include "kbreadcrumbselectionmodel.moc" diff -Nru kdepim-runtime-4.12.3/qml/kde/tests/qmlbreadcrumbnavigation/kmodelindexproxymapper.cpp kdepim-runtime-4.12.90/qml/kde/tests/qmlbreadcrumbnavigation/kmodelindexproxymapper.cpp --- kdepim-runtime-4.12.3/qml/kde/tests/qmlbreadcrumbnavigation/kmodelindexproxymapper.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/qml/kde/tests/qmlbreadcrumbnavigation/kmodelindexproxymapper.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -245,4 +245,3 @@ return seekSelection; } -#include "kmodelindexproxymapper.moc" diff -Nru kdepim-runtime-4.12.3/qml/kde/tests/qmlbreadcrumbnavigation/kproxyitemselectionmodel.cpp kdepim-runtime-4.12.90/qml/kde/tests/qmlbreadcrumbnavigation/kproxyitemselectionmodel.cpp --- kdepim-runtime-4.12.3/qml/kde/tests/qmlbreadcrumbnavigation/kproxyitemselectionmodel.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/qml/kde/tests/qmlbreadcrumbnavigation/kproxyitemselectionmodel.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -253,5 +253,4 @@ QItemSelectionModel::select(mappedSelection, Select); } -#include "kproxyitemselectionmodel.moc" diff -Nru kdepim-runtime-4.12.3/qml/kde/tests/qmlbreadcrumbnavigation/kresettingproxymodel.cpp kdepim-runtime-4.12.90/qml/kde/tests/qmlbreadcrumbnavigation/kresettingproxymodel.cpp --- kdepim-runtime-4.12.3/qml/kde/tests/qmlbreadcrumbnavigation/kresettingproxymodel.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/qml/kde/tests/qmlbreadcrumbnavigation/kresettingproxymodel.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -52,4 +52,3 @@ QMetaObject::invokeMethod(this, "_q_sourceReset", Qt::DirectConnection); } -#include "kresettingproxymodel.moc" diff -Nru kdepim-runtime-4.12.3/qml/kde/tests/qmlbreadcrumbnavigation/kselectionproxymodel.cpp kdepim-runtime-4.12.90/qml/kde/tests/qmlbreadcrumbnavigation/kselectionproxymodel.cpp --- kdepim-runtime-4.12.3/qml/kde/tests/qmlbreadcrumbnavigation/kselectionproxymodel.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/qml/kde/tests/qmlbreadcrumbnavigation/kselectionproxymodel.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -2311,4 +2311,4 @@ return list; } -#include "kselectionproxymodel.moc" +#include "moc_kselectionproxymodel.cpp" diff -Nru kdepim-runtime-4.12.3/qml/kde/tests/qmlbreadcrumbnavigation/mainwindow.cpp kdepim-runtime-4.12.90/qml/kde/tests/qmlbreadcrumbnavigation/mainwindow.cpp --- kdepim-runtime-4.12.3/qml/kde/tests/qmlbreadcrumbnavigation/mainwindow.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/qml/kde/tests/qmlbreadcrumbnavigation/mainwindow.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -168,4 +168,3 @@ -#include "mainwindow.moc" diff -Nru kdepim-runtime-4.12.3/qml/kde/tests/qmlbreadcrumbnavigation/qmllistselectionmodel.cpp kdepim-runtime-4.12.90/qml/kde/tests/qmlbreadcrumbnavigation/qmllistselectionmodel.cpp --- kdepim-runtime-4.12.3/qml/kde/tests/qmlbreadcrumbnavigation/qmllistselectionmodel.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/qml/kde/tests/qmlbreadcrumbnavigation/qmllistselectionmodel.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -69,4 +69,3 @@ emit selectionChanged(); } -#include "qmllistselectionmodel.moc" diff -Nru kdepim-runtime-4.12.3/qml/kde/tests/qmlbreadcrumbnavigation/simple/mainwindow.cpp kdepim-runtime-4.12.90/qml/kde/tests/qmlbreadcrumbnavigation/simple/mainwindow.cpp --- kdepim-runtime-4.12.3/qml/kde/tests/qmlbreadcrumbnavigation/simple/mainwindow.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/qml/kde/tests/qmlbreadcrumbnavigation/simple/mainwindow.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -88,4 +88,3 @@ } -#include "mainwindow.moc" diff -Nru kdepim-runtime-4.12.3/qml/kde/tests/qml_moves/dynamictreemodel.cpp kdepim-runtime-4.12.90/qml/kde/tests/qml_moves/dynamictreemodel.cpp --- kdepim-runtime-4.12.3/qml/kde/tests/qml_moves/dynamictreemodel.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/qml/kde/tests/qml_moves/dynamictreemodel.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -1005,6 +1005,5 @@ m_model->layoutChanged(); } -//#include "dynamictreemodel.moc" diff -Nru kdepim-runtime-4.12.3/qml/kde/tests/qml_moves/mainwindow.cpp kdepim-runtime-4.12.90/qml/kde/tests/qml_moves/mainwindow.cpp --- kdepim-runtime-4.12.3/qml/kde/tests/qml_moves/mainwindow.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/qml/kde/tests/qml_moves/mainwindow.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -80,4 +80,3 @@ command->doCommand(); } -//#include "mainwindow.moc" diff -Nru kdepim-runtime-4.12.3/resources/agentserver/CMakeLists.txt kdepim-runtime-4.12.90/resources/agentserver/CMakeLists.txt --- kdepim-runtime-4.12.3/resources/agentserver/CMakeLists.txt 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/agentserver/CMakeLists.txt 1970-01-01 00:00:00.000000000 +0000 @@ -1,30 +0,0 @@ -set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${KDE4_ENABLE_EXCEPTIONS}" ) - -find_library(AGENT_SERVER_LIB akonadi_agent_server) - -kde4_add_executable(akonadi_agent_server dummy_main.cpp) - -target_link_libraries(akonadi_agent_server - ${AGENT_SERVER_LIB} - ${QT_QTCORE_LIBRARY} - ${QT_QTGUI_LIBRARY} - ${QT_QTDBUS_LIBRARY} - ${AKONADI_COMMON_LIBRARIES} - akonadi_ical_resource - akonadi_vcard_resource - akonadi_maildir_resource - akonadi_akonotes_resource - akonadi_contacts_resource - akonadi_strigi_feeder - korgac - newmailnotifieragent - - akonadi_serializer_mail - akonadi_serializer_kcalcore - akonadi_serializer_contactgroup - akonadi_serializer_addressee -) - -install(TARGETS akonadi_agent_server - ${INSTALL_TARGETS_DEFAULT_ARGS} -) diff -Nru kdepim-runtime-4.12.3/resources/agentserver/dummy_main.cpp kdepim-runtime-4.12.90/resources/agentserver/dummy_main.cpp --- kdepim-runtime-4.12.3/resources/agentserver/dummy_main.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/agentserver/dummy_main.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,41 +0,0 @@ -/* - Copyright (c) 2010 Andreas Holzammer - - 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 - -Q_IMPORT_PLUGIN(akonadi_ical_resource) -Q_IMPORT_PLUGIN(akonadi_vcard_resource) -Q_IMPORT_PLUGIN(akonadi_maildir_resource) -Q_IMPORT_PLUGIN(akonadi_akonotes_resource) -Q_IMPORT_PLUGIN(akonadi_contacts_resource) -Q_IMPORT_PLUGIN(akonadi_strigi_feeder) -Q_IMPORT_PLUGIN(korgac) -Q_IMPORT_PLUGIN(newmailnotifieragent) - -Q_IMPORT_PLUGIN(akonadi_serializer_mail) -Q_IMPORT_PLUGIN(akonadi_serializer_addressee) -Q_IMPORT_PLUGIN(akonadi_serializer_contactgroup) -Q_IMPORT_PLUGIN(akonadi_serializer_kcalcore) - -extern int cemain( int argc, char ** argv ); - -int main( int argc, char ** argv ) -{ - return cemain( argc, argv ); -} diff -Nru kdepim-runtime-4.12.3/resources/akonotes/akonotesresource.cpp kdepim-runtime-4.12.90/resources/akonotes/akonotesresource.cpp --- kdepim-runtime-4.12.3/resources/akonotes/akonotesresource.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/akonotes/akonotesresource.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -19,6 +19,7 @@ #include "akonotesresource.h" +#include #include AkonotesResource::AkonotesResource( const QString &id ) @@ -42,4 +43,3 @@ synchronize(); // heavy to do it in the MaildirResource method, which already has sync on demand working properly } -#include "akonotesresource.moc" diff -Nru kdepim-runtime-4.12.3/resources/akonotes/akonotesresource.desktop kdepim-runtime-4.12.90/resources/akonotes/akonotesresource.desktop --- kdepim-runtime-4.12.3/resources/akonotes/akonotesresource.desktop 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/akonotes/akonotesresource.desktop 2014-03-13 08:12:29.000000000 +0000 @@ -46,7 +46,7 @@ Name[zh_TW]=AkoNotes Comment=Loads a notes hierarchy from a local maildir folder Comment[bs]=Učitava hijerarhiju napomena iz loklnog maildir direktorija -Comment[ca]=Carrega una jerarquia de notes des d'una carpeta maildir local +Comment[ca]=Carrega una jerarquia de notes des d'una carpeta pel directori de correu local Comment[ca@valencia]=Carrega una jerarquia de notes des d'una carpeta maildir local Comment[da]=Indlæser et hierarki af noter fra en lokal maildir-mappe Comment[de]=Laden einer Notizenhierarchie aus einem lokalen Maildir-Ordner diff -Nru kdepim-runtime-4.12.3/resources/akonotes/CMakeLists.txt kdepim-runtime-4.12.90/resources/akonotes/CMakeLists.txt --- kdepim-runtime-4.12.3/resources/akonotes/CMakeLists.txt 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/akonotes/CMakeLists.txt 2014-03-13 08:12:29.000000000 +0000 @@ -34,14 +34,9 @@ install( FILES akonotesresource.desktop DESTINATION "${CMAKE_INSTALL_PREFIX}/share/akonadi/agents" ) -if (NOT WINCE) - kde4_add_plugin(akonadi_akonotes_resource ${akonotesresource_SRCS}) -else() - kde4_add_plugin(akonadi_akonotes_resource STATIC ${akonotesresource_SRCS}) -endif() +kde4_add_plugin(akonadi_akonotes_resource ${akonotesresource_SRCS}) - -target_link_libraries(akonadi_akonotes_resource ${KDEPIMLIBS_AKONADI_LIBS} ${KDEPIMLIBS_AKONADI_KMIME_LIBS} maildir ${QT_QTDBUS_LIBRARY} ${KDE4_KIO_LIBS} ${KDEPIMLIBS_KMIME_LIBS}) +target_link_libraries(akonadi_akonotes_resource ${KDEPIMLIBS_AKONADI_LIBS} ${KDEPIMLIBS_AKONADI_KMIME_LIBS} maildir ${QT_QTDBUS_LIBRARY} ${KDE4_KIO_LIBS} ${KDEPIMLIBS_KMIME_LIBS} folderarchivesettings) install(TARGETS akonadi_akonotes_resource DESTINATION ${PLUGIN_INSTALL_DIR}) diff -Nru kdepim-runtime-4.12.3/resources/birthdays/birthdaysresource.cpp kdepim-runtime-4.12.90/resources/birthdays/birthdaysresource.cpp --- kdepim-runtime-4.12.3/resources/birthdays/birthdaysresource.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/birthdays/birthdaysresource.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -35,7 +35,7 @@ #include #include -#include +#include #include using namespace Akonadi; @@ -341,4 +341,3 @@ AKONADI_RESOURCE_MAIN( BirthdaysResource ) -#include "birthdaysresource.moc" diff -Nru kdepim-runtime-4.12.3/resources/birthdays/configdialog.cpp kdepim-runtime-4.12.90/resources/birthdays/configdialog.cpp --- kdepim-runtime-4.12.3/resources/birthdays/configdialog.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/birthdays/configdialog.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -41,4 +41,3 @@ Settings::self()->writeConfig(); } -#include "configdialog.moc" diff -Nru kdepim-runtime-4.12.3/resources/CMakeLists.txt kdepim-runtime-4.12.90/resources/CMakeLists.txt --- kdepim-runtime-4.12.3/resources/CMakeLists.txt 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/CMakeLists.txt 2014-03-13 08:12:29.000000000 +0000 @@ -54,7 +54,6 @@ add_subdirectory( maildir ) -macro_optional_add_subdirectory( microblog ) macro_optional_add_subdirectory( openxchange ) add_subdirectory( pop3 ) @@ -66,23 +65,13 @@ add_subdirectory( facebook ) endif() -if (NOT WINCE) - add_subdirectory( nepomuktag ) -endif () - add_subdirectory( shared ) - -if (NOT WINCE) - add_subdirectory( birthdays ) - add_subdirectory( mixedmaildir ) - add_subdirectory( mailtransport_dummy ) - add_subdirectory( mbox ) - add_subdirectory( nntp ) - add_subdirectory( vcarddir ) - add_subdirectory( icaldir ) -else () - add_subdirectory( agentserver ) -endif () - +add_subdirectory( birthdays ) +add_subdirectory( mixedmaildir ) +add_subdirectory( mailtransport_dummy ) +add_subdirectory( mbox ) +add_subdirectory( nntp ) +add_subdirectory( vcarddir ) +add_subdirectory( icaldir ) add_subdirectory( vcard ) - +add_subdirectory( folderarchivesettings ) diff -Nru kdepim-runtime-4.12.3/resources/contacts/CMakeLists.txt kdepim-runtime-4.12.90/resources/contacts/CMakeLists.txt --- kdepim-runtime-4.12.3/resources/contacts/CMakeLists.txt 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/contacts/CMakeLists.txt 2014-03-13 08:12:29.000000000 +0000 @@ -23,11 +23,7 @@ install( FILES contactsresource.desktop DESTINATION "${CMAKE_INSTALL_PREFIX}/share/akonadi/agents" ) -if (NOT WINCE) - kde4_add_plugin(akonadi_contacts_resource ${contactsresource_SRCS}) -else() - kde4_add_plugin(akonadi_contacts_resource STATIC ${contactsresource_SRCS}) -endif() +kde4_add_plugin(akonadi_contacts_resource ${contactsresource_SRCS}) target_link_libraries(akonadi_contacts_resource ${KDEPIMLIBS_AKONADI_LIBS} diff -Nru kdepim-runtime-4.12.3/resources/contacts/contactsresource.cpp kdepim-runtime-4.12.90/resources/contacts/contactsresource.cpp --- kdepim-runtime-4.12.3/resources/contacts/contactsresource.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/contacts/contactsresource.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -532,4 +532,3 @@ AKONADI_AGENT_FACTORY( ContactsResource, akonadi_contacts_resource ) -#include "contactsresource.moc" diff -Nru kdepim-runtime-4.12.3/resources/contacts/wizard/CMakeLists.txt kdepim-runtime-4.12.90/resources/contacts/wizard/CMakeLists.txt --- kdepim-runtime-4.12.3/resources/contacts/wizard/CMakeLists.txt 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/contacts/wizard/CMakeLists.txt 2014-03-13 08:12:29.000000000 +0000 @@ -1,9 +1,5 @@ -if (WINCE) - set(CONTACTS_DIRECTORY_DEFAULT_PATH "/My Documents/.local/share/contacts/") -else () - set(CONTACTS_DIRECTORY_DEFAULT_PATH "$HOME/.local/share/contacts/") -endif () +set(CONTACTS_DIRECTORY_DEFAULT_PATH "$HOME/.local/share/contacts/") configure_file(contactswizard.es.cmake ${CMAKE_CURRENT_BINARY_DIR}/contactswizard.es) install ( FILES contactswizard.desktop ${CMAKE_CURRENT_BINARY_DIR}/contactswizard.es contactswizard.ui DESTINATION ${DATA_INSTALL_DIR}/akonadi/accountwizard/contacts/ ) diff -Nru kdepim-runtime-4.12.3/resources/dav/common/davcollectiondeletejob.cpp kdepim-runtime-4.12.90/resources/dav/common/davcollectiondeletejob.cpp --- kdepim-runtime-4.12.3/resources/dav/common/davcollectiondeletejob.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/dav/common/davcollectiondeletejob.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -59,4 +59,3 @@ emitResult(); } -#include "davcollectiondeletejob.moc" diff -Nru kdepim-runtime-4.12.3/resources/dav/common/davcollectionsfetchjob.cpp kdepim-runtime-4.12.90/resources/dav/common/davcollectionsfetchjob.cpp --- kdepim-runtime-4.12.3/resources/dav/common/davcollectionsfetchjob.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/dav/common/davcollectionsfetchjob.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -304,4 +304,3 @@ emitResult(); } -#include "davcollectionsfetchjob.moc" diff -Nru kdepim-runtime-4.12.3/resources/dav/common/davcollectionsmultifetchjob.cpp kdepim-runtime-4.12.90/resources/dav/common/davcollectionsmultifetchjob.cpp --- kdepim-runtime-4.12.3/resources/dav/common/davcollectionsmultifetchjob.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/dav/common/davcollectionsmultifetchjob.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -60,4 +60,3 @@ emitResult(); } -#include "davcollectionsmultifetchjob.moc" diff -Nru kdepim-runtime-4.12.3/resources/dav/common/davitemcreatejob.cpp kdepim-runtime-4.12.90/resources/dav/common/davitemcreatejob.cpp --- kdepim-runtime-4.12.3/resources/dav/common/davitemcreatejob.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/dav/common/davitemcreatejob.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -110,4 +110,3 @@ emitResult(); } -#include "davitemcreatejob.moc" diff -Nru kdepim-runtime-4.12.3/resources/dav/common/davitemdeletejob.cpp kdepim-runtime-4.12.90/resources/dav/common/davitemdeletejob.cpp --- kdepim-runtime-4.12.3/resources/dav/common/davitemdeletejob.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/dav/common/davitemdeletejob.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -62,4 +62,3 @@ emitResult(); } -#include "davitemdeletejob.moc" diff -Nru kdepim-runtime-4.12.3/resources/dav/common/davitemfetchjob.cpp kdepim-runtime-4.12.90/resources/dav/common/davitemfetchjob.cpp --- kdepim-runtime-4.12.3/resources/dav/common/davitemfetchjob.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/dav/common/davitemfetchjob.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -91,4 +91,3 @@ emitResult(); } -#include "davitemfetchjob.moc" diff -Nru kdepim-runtime-4.12.3/resources/dav/common/davitemmodifyjob.cpp kdepim-runtime-4.12.90/resources/dav/common/davitemmodifyjob.cpp --- kdepim-runtime-4.12.3/resources/dav/common/davitemmodifyjob.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/dav/common/davitemmodifyjob.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -110,4 +110,3 @@ emitResult(); } -#include "davitemmodifyjob.moc" diff -Nru kdepim-runtime-4.12.3/resources/dav/common/davitemsfetchjob.cpp kdepim-runtime-4.12.90/resources/dav/common/davitemsfetchjob.cpp --- kdepim-runtime-4.12.3/resources/dav/common/davitemsfetchjob.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/dav/common/davitemsfetchjob.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -80,7 +80,7 @@ } const DavMultigetProtocol *protocol = - dynamic_cast( DavManager::self()->davProtocol( mCollectionUrl.protocol() ) ); + static_cast( DavManager::self()->davProtocol( mCollectionUrl.protocol() ) ); const QDomDocument document = davJob->response(); const QDomElement documentElement = document.documentElement(); diff -Nru kdepim-runtime-4.12.3/resources/dav/common/davitemslistjob.cpp kdepim-runtime-4.12.90/resources/dav/common/davitemslistjob.cpp --- kdepim-runtime-4.12.3/resources/dav/common/davitemslistjob.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/dav/common/davitemslistjob.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -193,4 +193,3 @@ emitResult(); } -#include "davitemslistjob.moc" diff -Nru kdepim-runtime-4.12.3/resources/dav/common/etagcache.cpp kdepim-runtime-4.12.90/resources/dav/common/etagcache.cpp --- kdepim-runtime-4.12.3/resources/dav/common/etagcache.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/dav/common/etagcache.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -90,4 +90,3 @@ } } -#include "etagcache.moc" diff -Nru kdepim-runtime-4.12.3/resources/dav/resource/CMakeLists.txt kdepim-runtime-4.12.90/resources/dav/resource/CMakeLists.txt --- kdepim-runtime-4.12.3/resources/dav/resource/CMakeLists.txt 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/dav/resource/CMakeLists.txt 2014-03-13 08:12:29.000000000 +0000 @@ -55,6 +55,12 @@ urlconfigurationdialog.cpp ) + if(${AccountsQt_FOUND} AND ${SignOnQt_FOUND}) + include_directories(${ACCOUNTSQT_INCLUDE_DIRS} ${SIGNONQT_INCLUDE_DIRS}) + add_definitions(-DHAVE_ACCOUNTS) + set(davgroupwareresource_SRCS ../../shared/getcredentialsjob.cpp ${davgroupwareresource_SRCS}) + endif() + install( FILES davgroupwareresource.desktop DESTINATION "${CMAKE_INSTALL_PREFIX}/share/akonadi/agents" ) install( FILES davgroupwareprovider.desktop DESTINATION ${SERVICETYPES_INSTALL_DIR} ) @@ -88,6 +94,11 @@ ${KDEPIMLIBS_KABC_LIBS} ${KDEPIMLIBS_KCALCORE_LIBS}) + if(${AccountsQt_FOUND} AND ${SignOnQt_FOUND}) + target_link_libraries(akonadi_davgroupware_resource + ${ACCOUNTSQT_LIBRARIES} + ${SIGNONQT_LIBRARIES}) + endif() install(TARGETS akonadi_davgroupware_resource ${INSTALL_TARGETS_DEFAULT_ARGS}) else() add_feature_info("Davgroupware resource" QT_QTXMLPATTERNS_LIBRARY "The QtXmlPatterns library was not found. It is needed for building the davgroupware resource.") diff -Nru kdepim-runtime-4.12.3/resources/dav/resource/configdialog.cpp kdepim-runtime-4.12.90/resources/dav/resource/configdialog.cpp --- kdepim-runtime-4.12.3/resources/dav/resource/configdialog.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/dav/resource/configdialog.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -276,4 +276,3 @@ rootItem->insertRow( index, items ); } -#include "configdialog.moc" diff -Nru kdepim-runtime-4.12.3/resources/dav/resource/davgroupwareresource.cpp kdepim-runtime-4.12.90/resources/dav/resource/davgroupwareresource.cpp --- kdepim-runtime-4.12.3/resources/dav/resource/davgroupwareresource.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/dav/resource/davgroupwareresource.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -855,4 +855,3 @@ AKONADI_RESOURCE_MAIN( DavGroupwareResource ) -#include "davgroupwareresource.moc" diff -Nru kdepim-runtime-4.12.3/resources/dav/resource/davgroupwareresource.desktop kdepim-runtime-4.12.90/resources/dav/resource/davgroupwareresource.desktop --- kdepim-runtime-4.12.3/resources/dav/resource/davgroupwareresource.desktop 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/dav/resource/davgroupwareresource.desktop 2014-03-13 08:12:29.000000000 +0000 @@ -43,7 +43,7 @@ Name[zh_CN]=DAV 群件资源 Name[zh_TW]=DAV 群組資源 Comment="Resource to manage DAV calendars and address books (CalDAV, GroupDAV)" -Comment[bs]="Resurs za upravljanjeDAV kalendara i adresara (CalDAV, GroupDAV)" +Comment[bs]="Resurs za upravaljanje DAV kalendarima i adresarima (CalDAV, GroupDAV)" Comment[ca]=«Recurs per gestionar calendaris i llibretes d'adreces DAV (CalDAV, GroupDAV)» Comment[ca@valencia]=«Recurs per gestionar calendaris i llibretes d'adreces DAV (CalDAV, GroupDAV)» Comment[da]="Ressource til håndtering af DAV-kalendere og -adressebøger (CalDAV, GroupDAV)" @@ -56,7 +56,9 @@ Comment[ia]="Ressource pro administrar calendarios e adressarios de DAV (CalDAV, GroupDAV)" Comment[it]="Risorsa per gestire calendari e rubriche DAV (CalDAV, GroupDAV)" Comment[kk]="DAV күнтізбе және адрестік кітапшасын (CalDAV, GroupDAV) басқару ресурсы" +Comment[ko]="DAV 달력과 주소록을 관리하는 자원 (CalDAV, GroupDAV)" Comment[nb]=«Ressurs som håndterer DAV-kalendere og adressebøker (CalDAV, GroupDAV)» +Comment[nds]="Ressource för de Pleeg vun DAV-Kalenners un -Adressböker (CalDAV, GroupDAV)" Comment[nl]="Hulpbron om DAV-agenda's en adresboeken (CalDAV, GroupDAV) te beheren" Comment[pl]="Zasób do obsługi kalendarzy i książek adresowych DAV (CalDAV, GroupDAV)" Comment[pt]=Recurso para gerir os calendários e livros de endereços em DAV (CalDAV, GroupDAV) @@ -77,6 +79,7 @@ Exec=akonadi_davgroupware_resource Icon=folder-remote +X-Akonadi-Custom-KAccounts=dav-calendar,dav-contacts X-Akonadi-MimeTypes=text/calendar,application/x-vnd.akonadi.calendar.event,application/x-vnd.akonadi.calendar.todo,application/x-vnd.akonadi.calendar.journal,application/x-vnd.akonadi.calendar.freebusy,text/directory X-Akonadi-Capabilities=Resource,FreeBusyProvider X-Akonadi-Identifier=akonadi_davgroupware_resource diff -Nru kdepim-runtime-4.12.3/resources/dav/resource/davgroupwareresource.kcfg kdepim-runtime-4.12.90/resources/dav/resource/davgroupwareresource.kcfg --- kdepim-runtime-4.12.3/resources/dav/resource/davgroupwareresource.kcfg 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/dav/resource/davgroupwareresource.kcfg 2014-03-13 08:12:29.000000000 +0000 @@ -34,5 +34,12 @@ false + + + + + + + diff -Nru kdepim-runtime-4.12.3/resources/dav/resource/settings.cpp kdepim-runtime-4.12.90/resources/dav/resource/settings.cpp --- kdepim-runtime-4.12.3/resources/dav/resource/settings.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/dav/resource/settings.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -22,6 +22,9 @@ #include "settings.h" #include "settingsadaptor.h" +#ifdef HAVE_ACCOUNTS +#include "../shared/getcredentialsjob.h" +#endif #include #include @@ -42,6 +45,11 @@ #include #include +#ifdef HAVE_ACCOUNTS +#include +#include +#endif + class SettingsHelper { public: @@ -96,6 +104,10 @@ Settings::Settings() : SettingsBase(), mWinId( 0 ) { + +#ifdef HAVE_ACCOUNTS + m_manager = 0; +#endif Q_ASSERT( !s_globalSettings->q ); s_globalSettings->q = this; @@ -224,6 +236,9 @@ void Settings::reloadConfig() { +#ifdef HAVE_ACCOUNTS + importFromAccounts(); +#endif buildUrlsList(); updateRemoteUrls(); loadMappings(); @@ -281,6 +296,10 @@ if ( mUrls.contains( key ) ) if ( mUrls[ key ]->mUser == QLatin1String( "$default$" ) ) return defaultUsername(); +#ifdef HAVE_ACCOUNTS + else if ( mUrls[ key ]->mUser == QLatin1String( "$accounts$" ) ) + return accountsUsername(); +#endif else return mUrls[ key ]->mUser; else @@ -299,7 +318,97 @@ else return QString(); } +#ifdef HAVE_ACCOUNTS +void Settings::importFromAccounts() +{ + kDebug(); + Accounts::AccountId id = accountId(); + kDebug() << "Account Id: " << id; + + if ( !m_manager ) { + m_manager = new Accounts::Manager( this ); + } + + if ( !m_manager->accountList().contains( id ) ) { + return; + } + + removeAccountsDisabledServices(); + addAccountsEnabledServices(); + + setSettingsVersion( 3 ); + writeConfig(); +} + +void Settings::addAccountsEnabledServices() +{ + kDebug(); + Accounts::Account *acc = m_manager->account( accountId() ); + QStringList enabledServices = accountServices(); + kDebug() << "Enabled" << enabledServices; + foreach( QString serviceType, enabledServices ) { + Accounts::ServiceList services = acc->services( serviceType ); + foreach( const Accounts::Service &service, services ) { + configureAccountService( acc, service ); + } + } +} + +void Settings::removeAccountsDisabledServices() +{ + kDebug(); + QStringList urls = remoteUrls(); + for (int i = 0; i < urls.size(); ++i) { + if ( !urls.at( i ).startsWith( "$accounts$" ) ) { + continue; + } + + if (urls.at( i ).contains( "carddav" ) + && accountServices().contains( "dav-contacts" )) { + continue; + } + if (urls.at( i ).contains( "caldav" ) + && accountServices().contains( "dav-calendar" )) { + continue; + } + + urls.removeAt( i ); + } + + setRemoteUrls( urls ); +} + +void Settings::configureAccountService(Accounts::Account *acc, const Accounts::Service& service) +{ + kDebug() << "Configuring service: " << service.name(); + QString domain = acc->valueAsString( "server/host" ); + acc->selectService( service ); + + QString type; + if ( service.serviceType() == "dav-contacts" ) { + type = "CardDav"; + } else { + type = "CalDav"; + } + + QString url = "$accounts$|" + type + "|" + domain + acc->valueAsString("dav/path"); + kDebug() << url; + acc->selectService(); + + QStringList urls = remoteUrls(); + foreach ( const QString &serializedUrl, urls ) { + if ( url == serializedUrl ) { + kDebug() << "Url already configured"; + return; + } + } + + kDebug() << "Adding url"; + urls.append( url ); + setRemoteUrls( urls ); +} +#endif void Settings::buildUrlsList() { foreach ( const QString &serializedUrl, remoteUrls() ) { @@ -368,6 +477,10 @@ if ( user == QLatin1String( "$default$" ) ) entry = mResourceIdentifier + QLatin1Char(',') + user; +#ifdef HAVE_ACCOUNTS + else if (user == QLatin1String( "$accounts$" )) + return loadPasswordFromAccounts(); +#endif else entry = key + QLatin1Char(',') + user; @@ -398,7 +511,27 @@ return pass; } +#ifdef HAVE_ACCOUNTS +QString Settings::loadPasswordFromAccounts() +{ + kDebug() << "Getting credentials for: " << accountId(); + GetCredentialsJob *job = new GetCredentialsJob(accountId()); + job->exec(); + + return job->credentialsData().value("Secret").toString(); +} + +QString Settings::accountsUsername() const +{ + kDebug() << "Getting credentials for: " << accountId(); + GetCredentialsJob *job = new GetCredentialsJob(accountId()); + job->exec(); + + kDebug() << "Got some: " << job->credentialsData(); + return job->credentialsData().value("UserName").toString(); +} +#endif QString Settings::promptForPassword( const QString &user ) { QPointer dlg = new KDialog(); @@ -478,4 +611,3 @@ writeConfig(); } -#include "settings.moc" diff -Nru kdepim-runtime-4.12.3/resources/dav/resource/settings.h kdepim-runtime-4.12.90/resources/dav/resource/settings.h --- kdepim-runtime-4.12.3/resources/dav/resource/settings.h 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/dav/resource/settings.h 2014-03-13 08:12:29.000000000 +0000 @@ -28,6 +28,14 @@ #include +#ifdef HAVE_ACCOUNTS +namespace Accounts { + class Service; + class Account; + class Manager; +}; +#endif + class Settings : public SettingsBase { Q_OBJECT @@ -109,6 +117,14 @@ QString password( DavUtils::Protocol protocol, const QString &url ); private: +#ifdef HAVE_ACCOUNTS + void addAccountsEnabledServices(); + void removeAccountsDisabledServices(); + void configureAccountService(Accounts::Account *acc, const Accounts::Service &service); + void importFromAccounts(); + QString loadPasswordFromAccounts(); + QString accountsUsername() const; +#endif void buildUrlsList(); void loadMappings(); void updateRemoteUrls(); @@ -120,6 +136,9 @@ void updateToV3(); WId mWinId; +#ifdef HAVE_ACCOUNTS + Accounts::Manager *m_manager; +#endif QString mResourceIdentifier; QMap mUrls; QMap mPasswordsCache; diff -Nru kdepim-runtime-4.12.3/resources/dav/resource/setupwizard.cpp kdepim-runtime-4.12.90/resources/dav/resource/setupwizard.cpp --- kdepim-runtime-4.12.3/resources/dav/resource/setupwizard.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/dav/resource/setupwizard.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -533,4 +533,3 @@ mStatusLabel->document()->addResource( QTextDocument::ImageResource, QUrl( QLatin1String("icon") ), QVariant( icon ) ); } -#include "setupwizard.moc" diff -Nru kdepim-runtime-4.12.3/resources/dav/services/owncloud-pre5.desktop kdepim-runtime-4.12.90/resources/dav/services/owncloud-pre5.desktop --- kdepim-runtime-4.12.3/resources/dav/services/owncloud-pre5.desktop 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/dav/services/owncloud-pre5.desktop 2014-03-13 08:12:29.000000000 +0000 @@ -17,6 +17,7 @@ Name[kk]=ownCloud (< 5.0) Name[ko]=ownCloud (< 5.0) Name[nb]=ownCloud (< 5.0) +Name[nds]=ownCloud (< 5.0) Name[nl]=ownCloud (< 5.0) Name[pl]=ownCloud (< 5.0) Name[pt]=ownCloud (< 5.0) diff -Nru kdepim-runtime-4.12.3/resources/facebook/akonadi_facebook_resource.notifyrc kdepim-runtime-4.12.90/resources/facebook/akonadi_facebook_resource.notifyrc --- kdepim-runtime-4.12.3/resources/facebook/akonadi_facebook_resource.notifyrc 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/facebook/akonadi_facebook_resource.notifyrc 2014-03-13 08:12:29.000000000 +0000 @@ -18,6 +18,7 @@ Comment[ko]=Akonadi Facebook 통합 Comment[mr]=आकोनाडीचे फेसबूकशी एकीकरण Comment[nb]=Akonadi Facebook-integrering +Comment[nds]=Akonadi sien Facebook-Koppelsteed Comment[nl]=Facebook-integratie van Akonadi Comment[pl]=Integracja Facebooka z Akonadi Comment[pt]=Integração do Facebook com o Akonadi @@ -52,6 +53,7 @@ Name[kk]=Facebook ресурсы Name[ko]=Facebook 자원 Name[nb]=Facebook-ressurs +Name[nds]=Facebook-Ressource Name[nl]=Facebook-hulpmiddel Name[pl]=Zasób Facebooka Name[pt]=Recurso do Facebook @@ -89,6 +91,7 @@ Name[kk]=Facebook Name[ko]=Facebook Name[nb]=Facebook +Name[nds]=Facebook Name[nl]=Facebook Name[nn]=Facebook Name[pl]=Facebook @@ -124,6 +127,7 @@ Comment[kk]=Facebook-тан келетін құлақтандырулар Comment[ko]=Facebook에서 보낸 알림 Comment[nb]=Varsling som kommer fra Facebook +Comment[nds]=Bescheed vun Facebook Comment[nl]=Melding uit Facebook Comment[pl]=Powiadomienia przychodzące z Facebooka Comment[pt]=Notificação proveniente do Facebook @@ -159,6 +163,7 @@ Name[kk]=Жаңа Facebook құлақтандыруы Name[ko]=새 Facebook 알림 Name[nb]=Ny Facebook-varsling +Name[nds]=Nieg Facebook-Bescheed Name[nl]=Nieuwe Facebook-melding Name[pl]=Nowe powiadomienie na Facebooku Name[pt]=Nova notificação do Facebook @@ -192,6 +197,7 @@ Comment[kk]=Жаңа Facebook құлақтандыруы келді Comment[ko]=새 Facebook 알림이 있음 Comment[nb]=Du har ny Facebook-varsling +Comment[nds]=Du hest en nieg Facebook-Bescheed Comment[nl]=Er is een nieuwe Facebook-melding Comment[pl]=Masz nowe powiadomienie na Facebooku Comment[pt]=Tem uma notificação nova do Facebook diff -Nru kdepim-runtime-4.12.3/resources/facebook/CMakeLists.txt kdepim-runtime-4.12.90/resources/facebook/CMakeLists.txt --- kdepim-runtime-4.12.3/resources/facebook/CMakeLists.txt 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/facebook/CMakeLists.txt 2014-03-13 08:12:29.000000000 +0000 @@ -1,6 +1,11 @@ project(facebookresource) include_directories(${LibKFbAPI_INCLUDE_DIR}) include_directories(${QJSON_INCLUDE_DIR} ${qjson_INCLUDE_DIR}) +if(${AccountsQt_FOUND} AND ${SignOnQt_FOUND}) + include_directories(${ACCOUNTSQT_INCLUDE_DIRS} ${SIGNONQT_INCLUDE_DIRS}) + add_definitions(-DHAVE_ACCOUNTS) + set(facebookresource_SRCS ../shared/getcredentialsjob.cpp) +endif() set(facebookresource_SRCS facebookresource.cpp @@ -12,6 +17,7 @@ settings.cpp settingsdialog.cpp timestampattribute.cpp + ${facebookresource_SRCS} ) install(FILES facebookresource.desktop DESTINATION "${CMAKE_INSTALL_PREFIX}/share/akonadi/agents") @@ -65,6 +71,12 @@ ${LibKFbAPI_LIBRARY} ) +if(${AccountsQt_FOUND} AND ${SignOnQt_FOUND}) + target_link_libraries(akonadi_facebook_resource + ${ACCOUNTSQT_LIBRARIES} + ${SIGNONQT_LIBRARIES}) +endif() + add_subdirectory(icons) add_subdirectory(serializer) diff -Nru kdepim-runtime-4.12.3/resources/facebook/facebookresource.cpp kdepim-runtime-4.12.90/resources/facebook/facebookresource.cpp --- kdepim-runtime-4.12.3/resources/facebook/facebookresource.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/facebook/facebookresource.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -24,6 +24,9 @@ #include "settings.h" #include "settingsdialog.h" #include "timestampattribute.h" +#ifdef HAVE_ACCOUNTS +#include "../shared/getcredentialsjob.h" +#endif #include #include @@ -77,10 +80,39 @@ void FacebookResource::configurationChanged() { +#ifdef HAVE_ACCOUNTS + if ( Settings::self()->accountId() ) { + configureByAccount( Settings::self()->accountId() ); + } +#endif Settings::self()->writeConfig(); synchronize(); } +#ifdef HAVE_ACCOUNTS +void FacebookResource::configureByAccount( int accountId ) +{ + kDebug() << "Starting credentials job"; + GetCredentialsJob *gc = new GetCredentialsJob( accountId, this ); + connect(gc, SIGNAL(finished(KJob*)), SLOT(slotGetCredentials(KJob*))); + gc->start(); +} + +void FacebookResource::slotGetCredentials(KJob *job) +{ + if (job->error()) { + return;// We will get kDebug from within the job if it fails + } + + GetCredentialsJob *gJob = qobject_cast(job); + const QVariantMap data = gJob->credentialsData(); + const QString accessToken = data.value(QLatin1String("AccessToken")).toString(); + Settings::self()->setAccessToken(accessToken); + + synchronize(); +} + +#endif void FacebookResource::aboutToQuit() { slotAbortRequested(); @@ -238,69 +270,81 @@ void FacebookResource::retrieveCollections() { - Collection friends; - friends.setRemoteId( friendsRID ); - friends.setName( i18nc( "@title: addressbook name", "Friends on Facebook" ) ); - friends.setParentCollection( Akonadi::Collection::root() ); - friends.setContentMimeTypes( QStringList() << KABC::Addressee::mimeType() ); - friends.setRights( Collection::ReadOnly ); - EntityDisplayAttribute * const friendsDisplayAttribute = new EntityDisplayAttribute(); - friendsDisplayAttribute->setIconName( QLatin1String("facebookresource") ); - friends.addAttribute( friendsDisplayAttribute ); - - Collection events; - events.setRemoteId( eventsRID ); - events.setName( i18nc( "@title: events collection title", "Events on Facebook" ) ); - events.setParentCollection( Akonadi::Collection::root() ); - events.setContentMimeTypes( QStringList() << QLatin1String("text/calendar") << eventMimeType ); - events.setRights( Collection::ReadOnly ); - EntityDisplayAttribute * const evendDisplayAttribute = new EntityDisplayAttribute(); - evendDisplayAttribute->setIconName( QLatin1String("facebookresource") ); - events.addAttribute( evendDisplayAttribute ); - - Collection notes; - notes.setRemoteId( notesRID ); - notes.setName( i18nc( "@title: notes collection", "Notes on Facebook" ) ); - notes.setParentCollection( Akonadi::Collection::root() ); - notes.setContentMimeTypes( QStringList() << Akonadi::NoteUtils::noteMimeType() ); - notes.setRights( Collection::ReadOnly ); - EntityDisplayAttribute * const notesDisplayAttribute = new EntityDisplayAttribute(); - notesDisplayAttribute->setIconName( QLatin1String("facebookresource") ); - notes.addAttribute( notesDisplayAttribute ); - - Collection posts; - posts.setRemoteId( postsRID ); - posts.setName( i18nc( "@title: posts collection", "Posts on Facebook" ) ); - posts.setParentCollection( Akonadi::Collection::root() ); - posts.setContentMimeTypes( QStringList() << QLatin1String("text/x-vnd.akonadi.socialfeeditem") ); - posts.setRights( Collection::CanCreateItem ); - EntityDisplayAttribute * const postsDisplayAttribute = new EntityDisplayAttribute(); - postsDisplayAttribute->setIconName( QLatin1String("facebookresource") ); - //facebook's max post length is 63206 as of September 2012 - //(Facebook ... Face Boo K ... hex(FACE) – K ... 64206 – 1000 = 63206)...don't ask me. - SocialNetworkAttributes * const socialAttributes = - new SocialNetworkAttributes( Settings::self()->userName(), - QLatin1String( "Facebook" ), - true, - 63206 ); - posts.addAttribute( postsDisplayAttribute ); - posts.addAttribute( socialAttributes ); - - Collection notifications; - notifications.setRemoteId( notificationsRID ); - notifications.setName( i18nc( "@title: notifications collection", "Notifications on Facebook" ) ); - notifications.setParentCollection( Akonadi::Collection::root() ); - notifications.setContentMimeTypes( QStringList() << QLatin1String("text/x-vnd.akonadi.socialnotification") ); - notifications.setRights( Collection::ReadOnly ); - EntityDisplayAttribute * const notificationsDisplayAttribute = new EntityDisplayAttribute(); - notificationsDisplayAttribute->setIconName( QLatin1String("facebookresource") ); - notifications.addAttribute( notificationsDisplayAttribute ); - - collectionsRetrieved( Collection::List() << friends - << events - << notes - << posts - << notifications ); + Collection::List collections; + if (Settings::self()->accountServices().contains(QLatin1String("facebook-contacts"))) { + Collection friends; + friends.setRemoteId( friendsRID ); + friends.setName( i18nc( "@title: addressbook name", "Friends on Facebook" ) ); + friends.setParentCollection( Akonadi::Collection::root() ); + friends.setContentMimeTypes( QStringList() << KABC::Addressee::mimeType() ); + friends.setRights( Collection::ReadOnly ); + EntityDisplayAttribute * const friendsDisplayAttribute = new EntityDisplayAttribute(); + friendsDisplayAttribute->setIconName( QLatin1String("facebookresource") ); + friends.addAttribute( friendsDisplayAttribute ); + collections << friends; + } + + if (Settings::self()->accountServices().contains(QLatin1String("facebook-events"))) { + Collection events; + events.setRemoteId( eventsRID ); + events.setName( i18nc( "@title: events collection title", "Events on Facebook" ) ); + events.setParentCollection( Akonadi::Collection::root() ); + events.setContentMimeTypes( QStringList() << QLatin1String("text/calendar") << eventMimeType ); + events.setRights( Collection::ReadOnly ); + EntityDisplayAttribute * const evendDisplayAttribute = new EntityDisplayAttribute(); + evendDisplayAttribute->setIconName( QLatin1String("facebookresource") ); + events.addAttribute( evendDisplayAttribute ); + collections << events; + } + + if (Settings::self()->accountServices().contains(QLatin1String("facebook-notes"))) { + Collection notes; + notes.setRemoteId( notesRID ); + notes.setName( i18nc( "@title: notes collection", "Notes on Facebook" ) ); + notes.setParentCollection( Akonadi::Collection::root() ); + notes.setContentMimeTypes( QStringList() << Akonadi::NoteUtils::noteMimeType() ); + notes.setRights( Collection::ReadOnly ); + EntityDisplayAttribute * const notesDisplayAttribute = new EntityDisplayAttribute(); + notesDisplayAttribute->setIconName( QLatin1String("facebookresource") ); + notes.addAttribute( notesDisplayAttribute ); + collections << notes; + } + + if (Settings::self()->accountServices().contains(QLatin1String("facebook-feed"))) { + Collection posts; + posts.setRemoteId( postsRID ); + posts.setName( i18nc( "@title: posts collection", "Posts on Facebook" ) ); + posts.setParentCollection( Akonadi::Collection::root() ); + posts.setContentMimeTypes( QStringList() << QLatin1String("text/x-vnd.akonadi.socialfeeditem") ); + posts.setRights( Collection::CanCreateItem ); + EntityDisplayAttribute * const postsDisplayAttribute = new EntityDisplayAttribute(); + postsDisplayAttribute->setIconName( QLatin1String("facebookresource") ); + //facebook's max post length is 63206 as of September 2012 + //(Facebook ... Face Boo K ... hex(FACE) – K ... 64206 – 1000 = 63206)...don't ask me. + SocialNetworkAttributes * const socialAttributes = + new SocialNetworkAttributes( Settings::self()->userName(), + QLatin1String( "Facebook" ), + true, + 63206 ); + posts.addAttribute( postsDisplayAttribute ); + posts.addAttribute( socialAttributes ); + collections << posts; + } + + if (Settings::self()->accountServices().contains(QLatin1String("facebook-notifications"))) { + Collection notifications; + notifications.setRemoteId( notificationsRID ); + notifications.setName( i18nc( "@title: notifications collection", "Notifications on Facebook" ) ); + notifications.setParentCollection( Akonadi::Collection::root() ); + notifications.setContentMimeTypes( QStringList() << QLatin1String("text/x-vnd.akonadi.socialnotification") ); + notifications.setRights( Collection::ReadOnly ); + EntityDisplayAttribute * const notificationsDisplayAttribute = new EntityDisplayAttribute(); + notificationsDisplayAttribute->setIconName( QLatin1String("facebookresource") ); + notifications.addAttribute( notificationsDisplayAttribute ); + collections << notifications; + } + + collectionsRetrieved( collections ); } void FacebookResource::itemRemoved( const Akonadi::Item &item ) diff -Nru kdepim-runtime-4.12.3/resources/facebook/facebookresource.desktop kdepim-runtime-4.12.90/resources/facebook/facebookresource.desktop --- kdepim-runtime-4.12.3/resources/facebook/facebookresource.desktop 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/facebook/facebookresource.desktop 2014-03-13 08:12:29.000000000 +0000 @@ -17,6 +17,7 @@ Name[kk]=Facebook Name[ko]=Facebook Name[nb]=Facebook +Name[nds]=Facebook Name[nl]=Facebook Name[nn]=Facebook Name[pl]=Facebook @@ -53,6 +54,7 @@ Comment[kk]=Facebook деректеріңізді KDE-де қол жетімді қылу Comment[ko]=KDE에서 Facebook 데이터 사용 Comment[nb]=Gjør dine Facebook-data tilgjengelige i KDE +Comment[nds]=Maakt Dien Facebook-Daten binnen KDE verföögbor Comment[nl]=Maakt uw Facebook gegevens beschikbaar in KDE Comment[pl]=Sprawia, że twoje dane z Facebook są dostępne w KDE Comment[pt]=Disponibiliza os seus dados do Facebook no KDE @@ -73,6 +75,7 @@ Type=AkonadiResource Exec=akonadi_facebook_resource Icon=facebookresource +X-Akonadi-Custom-KAccounts=facebook-contacts,facebook-feed,facebook-events,facebook-notes,facebook-notifications X-Akonadi-MimeTypes=text/directory,text/calendar,application/x-vnd.akonadi.calendar.event,application/x-vnd.akonadi.note,text/x-vnd.akonadi.socialfeeditem,text/x-vnd.akonadi.socialnotification X-Akonadi-Capabilities=Resource X-Akonadi-Identifier=akonadi_facebook_resource diff -Nru kdepim-runtime-4.12.3/resources/facebook/facebookresource.h kdepim-runtime-4.12.90/resources/facebook/facebookresource.h --- kdepim-runtime-4.12.3/resources/facebook/facebookresource.h 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/facebook/facebookresource.h 2014-03-13 08:12:29.000000000 +0000 @@ -30,7 +30,6 @@ #include #include -#include class KStatusNotifierItem; @@ -54,7 +53,10 @@ public Q_SLOTS: void configure( WId windowId ); - +#ifdef HAVE_ACCOUNTS + void configureByAccount( int accountId ); + void slotGetCredentials(KJob *job); +#endif protected Q_SLOTS: void retrieveCollections(); void retrieveItems( const Akonadi::Collection &col ); diff -Nru kdepim-runtime-4.12.3/resources/facebook/serializer/akonadi_serializer_socialnotification.desktop kdepim-runtime-4.12.90/resources/facebook/serializer/akonadi_serializer_socialnotification.desktop --- kdepim-runtime-4.12.3/resources/facebook/serializer/akonadi_serializer_socialnotification.desktop 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/facebook/serializer/akonadi_serializer_socialnotification.desktop 2014-03-13 08:12:29.000000000 +0000 @@ -17,6 +17,7 @@ Name[kk]=Facebook құлақтандыруды тізбектеуі Name[ko]=Facebook 알림 시리얼라이저 Name[nb]=Facebook varslings-serialisator +Name[nds]=Facebook-Bescheed-Reegmoduul Name[nl]=Serialisator van Facebook-meldingen Name[pl]=Program szeregujący powiadomienia na Facebooku Name[pt]=Serialização das Notificações do Facebook @@ -52,6 +53,7 @@ Comment[kk]=Akonadi-дің Facebook құлақтандырулар тізбектеуіш плагині Comment[ko]=Facebook 알림을 위한 Akonadi 시리얼라이저 플러그인 Comment[nb]=Et Akonadi programtillegg for serialisering av Facebook-varslinger +Comment[nds]=Akonadi-Inreegmoduul för Facebook-Bescheden Comment[nl]=Een Akonadi serialisatorplug-in voor Facebook-meldingen Comment[pl]=Wtyczka Akonadi do szeregowania powiadomień Facebooka Comment[pt]=Um 'plugin' de serialização do Akonadi para as notificações do Facebook diff -Nru kdepim-runtime-4.12.3/resources/facebook/settingsbase.kcfg kdepim-runtime-4.12.90/resources/facebook/settingsbase.kcfg --- kdepim-runtime-4.12.3/resources/facebook/settingsbase.kcfg 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/facebook/settingsbase.kcfg 2014-03-13 08:12:29.000000000 +0000 @@ -13,6 +13,12 @@ 2000-01-01 + + + + + + true diff -Nru kdepim-runtime-4.12.3/resources/facebook/settings.cpp kdepim-runtime-4.12.90/resources/facebook/settings.cpp --- kdepim-runtime-4.12.3/resources/facebook/settings.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/facebook/settings.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -21,7 +21,6 @@ #include "settings.h" #include "settingsadaptor.h" -#include class SettingsHelper { diff -Nru kdepim-runtime-4.12.3/resources/facebook/settingsdialog.cpp kdepim-runtime-4.12.90/resources/facebook/settingsdialog.cpp --- kdepim-runtime-4.12.3/resources/facebook/settingsdialog.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/facebook/settingsdialog.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -166,6 +166,15 @@ { mParentResource->setName( nameEdit->text() ); Settings::self()->setDisplayNotifications( enableNotificationsCheckBox->isChecked() ); + if ( !Settings::self()->accountId() ) { + QStringList services; + services << QLatin1String("facebook-contacts") + << QLatin1String("facebook-feed") + << QLatin1String("facebook-events") + << QLatin1String("facebook-notes") + << QLatin1String("facebook-notifications"); + Settings::self()->setAccountServices(services); + } Settings::self()->writeConfig(); } @@ -215,4 +224,3 @@ } } -#include "settingsdialog.moc" diff -Nru kdepim-runtime-4.12.3/resources/folderarchivesettings/CMakeLists.txt kdepim-runtime-4.12.90/resources/folderarchivesettings/CMakeLists.txt --- kdepim-runtime-4.12.3/resources/folderarchivesettings/CMakeLists.txt 1970-01-01 00:00:00.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/folderarchivesettings/CMakeLists.txt 2014-03-13 08:12:29.000000000 +0000 @@ -0,0 +1,30 @@ +project(folderarchivesettings) + +include_directories( + ${CMAKE_CURRENT_SOURCE_DIR} + ${KDEPIMLIBS_INCLUDE_DIR} +) + +include(KDE4Defaults) + +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${KDE4_ENABLE_EXCEPTIONS}") + +set(folderarchivesettings_SRCS + folderarchivesettingpage.cpp + folderarchiveutil.cpp + folderarchiveaccountinfo.cpp +) + +kde4_add_library(folderarchivesettings ${LIBRARY_TYPE} ${folderarchivesettings_SRCS} ) + +target_link_libraries(folderarchivesettings + ${KDEPIMLIBS_KMIME_LIBS} + ${AKONADI_COMMON_LIBRARIES} + ${QT_QTGUI_LIBRARY} + ${KDEPIMLIBS_AKONADI_LIBS} +) + +set_target_properties(folderarchivesettings PROPERTIES VERSION ${GENERIC_LIB_VERSION} SOVERSION ${GENERIC_LIB_SOVERSION} ) + +install(TARGETS folderarchivesettings ${INSTALL_TARGETS_DEFAULT_ARGS}) + diff -Nru kdepim-runtime-4.12.3/resources/folderarchivesettings/folderarchiveaccountinfo.cpp kdepim-runtime-4.12.90/resources/folderarchivesettings/folderarchiveaccountinfo.cpp --- kdepim-runtime-4.12.3/resources/folderarchivesettings/folderarchiveaccountinfo.cpp 1970-01-01 00:00:00.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/folderarchivesettings/folderarchiveaccountinfo.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -0,0 +1,118 @@ +/* + Copyright (c) 2013, 2014 Montel Laurent + + This program is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License, version 2, as + published by the Free Software Foundation. + + 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 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 "folderarchiveaccountinfo.h" + +#include + +FolderArchiveAccountInfo::FolderArchiveAccountInfo() + : mArchiveType(UniqueFolder), + mArchiveTopLevelCollectionId(-1), + mEnabled(false), + mKeepExistingStructure(false) +{ +} + +FolderArchiveAccountInfo::FolderArchiveAccountInfo(const KConfigGroup &config) + : mArchiveType(UniqueFolder), + mArchiveTopLevelCollectionId(-1), + mEnabled(false), + mKeepExistingStructure(false) +{ + readConfig(config); +} + +FolderArchiveAccountInfo::~FolderArchiveAccountInfo() +{ +} + +bool FolderArchiveAccountInfo::isValid() const +{ + return (mArchiveTopLevelCollectionId > -1); +} + +void FolderArchiveAccountInfo::setFolderArchiveType(FolderArchiveAccountInfo::FolderArchiveType type) +{ + mArchiveType = type; +} + +FolderArchiveAccountInfo::FolderArchiveType FolderArchiveAccountInfo::folderArchiveType() const +{ + return mArchiveType; +} + +void FolderArchiveAccountInfo::setArchiveTopLevel(Akonadi::Collection::Id id) +{ + mArchiveTopLevelCollectionId = id; +} + +Akonadi::Collection::Id FolderArchiveAccountInfo::archiveTopLevel() const +{ + return mArchiveTopLevelCollectionId; +} + +QString FolderArchiveAccountInfo::instanceName() const +{ + return mInstanceName; +} + +void FolderArchiveAccountInfo::setInstanceName(const QString &instance) +{ + mInstanceName = instance; +} + +void FolderArchiveAccountInfo::setEnabled(bool enabled) +{ + mEnabled = enabled; +} + +bool FolderArchiveAccountInfo::enabled() const +{ + return mEnabled; +} + +void FolderArchiveAccountInfo::setKeepExistingStructure(bool b) +{ + mKeepExistingStructure = b; +} + +bool FolderArchiveAccountInfo::keepExistingStructure() const +{ + return mKeepExistingStructure; +} + +void FolderArchiveAccountInfo::readConfig(const KConfigGroup &config) +{ + mInstanceName = config.readEntry(QLatin1String("instanceName")); + mArchiveTopLevelCollectionId = config.readEntry(QLatin1String("topLevelCollectionId"), -1); + mArchiveType = static_cast(config.readEntry("folderArchiveType", (int)UniqueFolder)); + mEnabled = config.readEntry("enabled", false); + mKeepExistingStructure = config.readEntry("keepExistingStructure", false); +} + +void FolderArchiveAccountInfo::writeConfig(KConfigGroup &config ) +{ + config.writeEntry(QLatin1String("instanceName"), mInstanceName); + if (mArchiveTopLevelCollectionId>-1) + config.writeEntry(QLatin1String("topLevelCollectionId"), mArchiveTopLevelCollectionId); + else + config.deleteEntry(QLatin1String("topLevelCollectionId")); + + config.writeEntry(QLatin1String("folderArchiveType"), (int)mArchiveType); + config.writeEntry(QLatin1String("enabled"), mEnabled); + config.writeEntry("keepExistingStructure", mKeepExistingStructure); +} diff -Nru kdepim-runtime-4.12.3/resources/folderarchivesettings/folderarchiveaccountinfo.h kdepim-runtime-4.12.90/resources/folderarchivesettings/folderarchiveaccountinfo.h --- kdepim-runtime-4.12.3/resources/folderarchivesettings/folderarchiveaccountinfo.h 1970-01-01 00:00:00.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/folderarchivesettings/folderarchiveaccountinfo.h 2014-03-13 08:12:29.000000000 +0000 @@ -0,0 +1,65 @@ +/* + Copyright (c) 2013, 2014 Montel Laurent + + This program is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License, version 2, as + published by the Free Software Foundation. + + 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 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 FOLDERARCHIVEACCOUNTINFO_H +#define FOLDERARCHIVEACCOUNTINFO_H + +#include +#include + +class FolderArchiveAccountInfo +{ +public: + FolderArchiveAccountInfo(); + FolderArchiveAccountInfo(const KConfigGroup &config); + ~FolderArchiveAccountInfo(); + + enum FolderArchiveType { + UniqueFolder, + FolderByMonths, + FolderByYears + }; + + bool isValid() const; + + QString instanceName() const; + void setInstanceName(const QString &instance); + + void setArchiveTopLevel(Akonadi::Collection::Id id); + Akonadi::Collection::Id archiveTopLevel() const; + + void setFolderArchiveType(FolderArchiveType type); + FolderArchiveType folderArchiveType() const; + + void setEnabled(bool enabled); + bool enabled() const; + + void setKeepExistingStructure(bool b); + bool keepExistingStructure() const; + + void writeConfig(KConfigGroup &config ); + void readConfig(const KConfigGroup &config); + +private: + FolderArchiveAccountInfo::FolderArchiveType mArchiveType; + Akonadi::Collection::Id mArchiveTopLevelCollectionId; + QString mInstanceName; + bool mEnabled; + bool mKeepExistingStructure; +}; + +#endif // FOLDERARCHIVEACCOUNTINFO_H diff -Nru kdepim-runtime-4.12.3/resources/folderarchivesettings/folderarchivesettingpage.cpp kdepim-runtime-4.12.90/resources/folderarchivesettings/folderarchivesettingpage.cpp --- kdepim-runtime-4.12.3/resources/folderarchivesettings/folderarchivesettingpage.cpp 1970-01-01 00:00:00.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/folderarchivesettings/folderarchivesettingpage.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -0,0 +1,148 @@ +/* + Copyright (c) 2013, 2014 Montel Laurent + + This program is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License, version 2, as + published by the Free Software Foundation. + + 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 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 "folderarchivesettingpage.h" +#include "folderarchiveaccountinfo.h" +#include "folderarchiveutil.h" + +#include + +#include + +#include +#include +#include + +#include +#include +#include +#include +#include + +FolderArchiveComboBox::FolderArchiveComboBox(QWidget *parent) + : QComboBox(parent) +{ + initialize(); +} + +FolderArchiveComboBox::~FolderArchiveComboBox() +{ +} + +void FolderArchiveComboBox::initialize() +{ + addItem(i18nc("@item:inlistbox for option \"Archive folder name\"", "Unique"), + FolderArchiveAccountInfo::UniqueFolder); + addItem(i18nc("@item:inlistbox for option \"Archive folder name\"", "Month and year"), + FolderArchiveAccountInfo::FolderByMonths); + addItem(i18nc("@item:inlistbox for option \"Archive folder name\"", "Year"), + FolderArchiveAccountInfo::FolderByYears); +} + +void FolderArchiveComboBox::setType(FolderArchiveAccountInfo::FolderArchiveType type) +{ + const int index = findData(static_cast(type)); + if (index != -1) { + setCurrentIndex(index); + } else { + setCurrentIndex(0); + } +} + +FolderArchiveAccountInfo::FolderArchiveType FolderArchiveComboBox::type() const +{ + return static_cast(itemData(currentIndex()).toInt()); +} + +FolderArchiveSettingPage::FolderArchiveSettingPage(const QString &instanceName, QWidget *parent) + : QWidget(parent), + mInstanceName(instanceName), + mInfo(0) +{ + QVBoxLayout *lay = new QVBoxLayout; + mEnabled = new QCheckBox(i18n("Enable")); + connect(mEnabled, SIGNAL(toggled(bool)), this, SLOT(slotEnableChanged(bool))); + lay->addWidget(mEnabled); + + QHBoxLayout *hbox = new QHBoxLayout; + QLabel *lab = new QLabel(i18nc( + "@label:chooser for the folder that messages will be archived under", + "Archive into:")); + hbox->addWidget(lab); + mArchiveFolder = new Akonadi::CollectionRequester; + mArchiveFolder->setMimeTypeFilter(QStringList() << KMime::Message::mimeType()); + hbox->addWidget(mArchiveFolder); + lay->addLayout(hbox); + + hbox = new QHBoxLayout; + lab = new QLabel(i18nc("@label:listbox", "Archive folder name:")); + hbox->addWidget(lab); + mArchiveNamed = new FolderArchiveComboBox; + hbox->addWidget(mArchiveNamed); + + lay->addLayout(hbox); + + lay->addStretch(); + + setLayout(lay); +} + +FolderArchiveSettingPage::~FolderArchiveSettingPage() +{ + delete mInfo; +} + +void FolderArchiveSettingPage::slotEnableChanged(bool enabled) +{ + mArchiveFolder->setEnabled(enabled); + mArchiveNamed->setEnabled(enabled); +} + +void FolderArchiveSettingPage::loadSettings() +{ + KConfig config(FolderArchive::FolderArchiveUtil::configFileName()); + const QString groupName = FolderArchive::FolderArchiveUtil::groupConfigPattern() + mInstanceName; + if (config.hasGroup(groupName)) { + KConfigGroup grp = config.group(groupName); + mInfo = new FolderArchiveAccountInfo(grp); + mEnabled->setChecked(mInfo->enabled()); + mArchiveFolder->setCollection(Akonadi::Collection(mInfo->archiveTopLevel())); + mArchiveNamed->setType(mInfo->folderArchiveType()); + } else { + mInfo = new FolderArchiveAccountInfo(); + mEnabled->setChecked(false); + } + slotEnableChanged(mEnabled->isChecked()); +} + +void FolderArchiveSettingPage::writeSettings() +{ + KConfig config(FolderArchive::FolderArchiveUtil::configFileName()); + KConfigGroup grp = config.group(FolderArchive::FolderArchiveUtil::groupConfigPattern() + mInstanceName); + mInfo->setInstanceName(mInstanceName); + if (mArchiveFolder->collection().isValid()) { + mInfo->setEnabled(mEnabled->isChecked()); + mInfo->setArchiveTopLevel(mArchiveFolder->collection().id()); + } else { + mInfo->setEnabled(false); + mInfo->setArchiveTopLevel(-1); + } + + mInfo->setFolderArchiveType(mArchiveNamed->type()); + mInfo->writeConfig(grp); +} + diff -Nru kdepim-runtime-4.12.3/resources/folderarchivesettings/folderarchivesettingpage.h kdepim-runtime-4.12.90/resources/folderarchivesettings/folderarchivesettingpage.h --- kdepim-runtime-4.12.3/resources/folderarchivesettings/folderarchivesettingpage.h 1970-01-01 00:00:00.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/folderarchivesettings/folderarchivesettingpage.h 2014-03-13 08:12:29.000000000 +0000 @@ -0,0 +1,67 @@ +/* + Copyright (c) 2013, 2014 Montel Laurent + + This program is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License, version 2, as + published by the Free Software Foundation. + + 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 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 FOLDERARCHIVESETTINGPAGE_H +#define FOLDERARCHIVESETTINGPAGE_H + +#include "folderarchiveaccountinfo.h" +#include "folderarchivesettings_export.h" +#include +#include + +class QCheckBox; +namespace Akonadi { +class CollectionRequester; +} + +class FolderArchiveComboBox : public QComboBox +{ + Q_OBJECT +public: + explicit FolderArchiveComboBox(QWidget *parent = 0); + ~FolderArchiveComboBox(); + + void setType(FolderArchiveAccountInfo::FolderArchiveType type); + FolderArchiveAccountInfo::FolderArchiveType type() const; + +private: + void initialize(); +}; + +class FolderArchiveAccountInfo; +class FOLDERARCHIVESETTINGS_EXPORT FolderArchiveSettingPage : public QWidget +{ + Q_OBJECT +public: + explicit FolderArchiveSettingPage(const QString &instanceName, QWidget *parent=0); + ~FolderArchiveSettingPage(); + + void loadSettings(); + void writeSettings(); + +private Q_SLOTS: + void slotEnableChanged(bool enabled); + +private: + QString mInstanceName; + QCheckBox *mEnabled; + FolderArchiveComboBox *mArchiveNamed; + Akonadi::CollectionRequester *mArchiveFolder; + FolderArchiveAccountInfo *mInfo; +}; + +#endif // FOLDERARCHIVESETTINGPAGE_H diff -Nru kdepim-runtime-4.12.3/resources/folderarchivesettings/folderarchivesettings_export.h kdepim-runtime-4.12.90/resources/folderarchivesettings/folderarchivesettings_export.h --- kdepim-runtime-4.12.3/resources/folderarchivesettings/folderarchivesettings_export.h 1970-01-01 00:00:00.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/folderarchivesettings/folderarchivesettings_export.h 2014-03-13 08:12:29.000000000 +0000 @@ -0,0 +1,39 @@ +/* This file is part of the KDE project + Copyright (C) 2007 David Faure + + 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 FOLDERARCHIVESETTINGS_EXPORT_H +#define FOLDERARCHIVESETTINGS_EXPORT_H + +/* needed for KDE_EXPORT and KDE_IMPORT macros */ +#include + +#ifndef FOLDERARCHIVESETTINGS_EXPORT +# if defined(KDEPIM_STATIC_LIBS) + /* No export/import for static libraries */ +# define FOLDERARCHIVESETTINGS_EXPORT +# elif defined(MAKE_FOLDERARCHIVESETTINGS_LIB) + /* We are building this library */ +# define FOLDERARCHIVESETTINGS_EXPORT KDE_EXPORT +# else + /* We are using this library */ +# define FOLDERARCHIVESETTINGS_EXPORT KDE_IMPORT +# endif +#endif + +#endif diff -Nru kdepim-runtime-4.12.3/resources/folderarchivesettings/folderarchiveutil.cpp kdepim-runtime-4.12.90/resources/folderarchivesettings/folderarchiveutil.cpp --- kdepim-runtime-4.12.3/resources/folderarchivesettings/folderarchiveutil.cpp 1970-01-01 00:00:00.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/folderarchivesettings/folderarchiveutil.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -0,0 +1,30 @@ +/* + Copyright (c) 2013, 2014 Montel Laurent + + This program is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License, version 2, as + published by the Free Software Foundation. + + 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 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 "folderarchiveutil.h" + +using namespace FolderArchive; + +QString FolderArchiveUtil::groupConfigPattern() +{ + return QLatin1String("FolderArchiveAccount "); +} + +QString FolderArchiveUtil::configFileName() +{ + return QLatin1String(QLatin1String("foldermailarchiverc")); +} diff -Nru kdepim-runtime-4.12.3/resources/folderarchivesettings/folderarchiveutil.h kdepim-runtime-4.12.90/resources/folderarchivesettings/folderarchiveutil.h --- kdepim-runtime-4.12.3/resources/folderarchivesettings/folderarchiveutil.h 1970-01-01 00:00:00.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/folderarchivesettings/folderarchiveutil.h 2014-03-13 08:12:29.000000000 +0000 @@ -0,0 +1,31 @@ +/* + Copyright (c) 2013, 2014 Montel Laurent + + This program is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License, version 2, as + published by the Free Software Foundation. + + 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 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 FOLDERARCHIVEUTIL_H +#define FOLDERARCHIVEUTIL_H + +#include +namespace FolderArchive { +namespace FolderArchiveUtil +{ +QString groupConfigPattern(); +QString configFileName(); +} +} + + +#endif // FOLDERARCHIVEUTIL_H diff -Nru kdepim-runtime-4.12.3/resources/folderarchivesettings/Messages.sh kdepim-runtime-4.12.90/resources/folderarchivesettings/Messages.sh --- kdepim-runtime-4.12.3/resources/folderarchivesettings/Messages.sh 1970-01-01 00:00:00.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/folderarchivesettings/Messages.sh 2014-03-13 08:12:29.000000000 +0000 @@ -0,0 +1,2 @@ +#! /usr/bin/env bash +$XGETTEXT *.cpp -o $podir/libfolderarchivesettings.pot diff -Nru kdepim-runtime-4.12.3/resources/google/calendar/calendarresource.cpp kdepim-runtime-4.12.90/resources/google/calendar/calendarresource.cpp --- kdepim-runtime-4.12.3/resources/google/calendar/calendarresource.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/google/calendar/calendarresource.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -27,22 +27,13 @@ #include #include #include -#include #include - -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include #include #include +#include #include #include @@ -202,22 +193,14 @@ ktodo->setUid( QLatin1String("") ); if ( !ktodo->relatedTo( KCalCore::Incidence::RelTypeParent ).isEmpty() ) { - Nepomuk2::Query::Query query; - const Nepomuk2::Types::Class cl( Nepomuk2::Vocabulary::NCAL::Todo() ); - const Nepomuk2::Query::ResourceTypeTerm typeTerm( cl ); - const Nepomuk2::Query::Query::RequestProperty itemIdProperty ( - ItemSearchJob::akonadiItemIdUri(), false ); - const Nepomuk2::Query::ComparisonTerm term( - Nepomuk2::Vocabulary::NCAL::uid(), - Nepomuk2::Query::LiteralTerm( ktodo->relatedTo( KCalCore::Incidence::RelTypeParent ) ) ); - - query.setTerm( term ); - query.addRequestProperty( itemIdProperty ); - - ItemSearchJob *searchJob = new ItemSearchJob( query.toSparqlQuery(), this ); - searchJob->setProperty( ITEM_PROPERTY, QVariant::fromValue( item ) ); - searchJob->setProperty( TASK_PROPERTY, QVariant::fromValue( ktodo ) ); - connect( searchJob, SIGNAL(finished(KJob*)), + Akonadi::Item parentItem; + parentItem.setGid( ktodo->relatedTo( KCalCore::Incidence::RelTypeParent ) ); + + ItemFetchJob *fetchJob = new ItemFetchJob( parentItem, this ); + fetchJob->setProperty( ITEM_PROPERTY, QVariant::fromValue( item ) ); + fetchJob->setProperty( TASK_PROPERTY, QVariant::fromValue( ktodo ) ); + + connect( fetchJob, SIGNAL(finished(KJob*)), this, SLOT(slotTaskAddedSearchFinished(KJob*)) ); return; } else { @@ -434,12 +417,19 @@ ObjectsList calendars = fetchJob->property( CALENDARS_PROPERTY ).value(); ObjectsList taskLists = fetchJob->items(); + CachePolicy cachePolicy; + if ( Settings::self()->enableIntervalCheck() ) { + cachePolicy.setInheritFromParent( false ); + cachePolicy.setIntervalCheckTime( Settings::self()->intervalCheckTime() ); + } + m_rootCollection = Collection(); m_rootCollection.setContentMimeTypes( QStringList() << Collection::mimeType() ); m_rootCollection.setRemoteId( ROOT_COLLECTION_REMOTEID ); m_rootCollection.setName( fetchJob->account()->accountName() ); - m_rootCollection.setParent( Collection::root() ); + m_rootCollection.setParentCollection( Collection::root() ); m_rootCollection.setRights( Collection::CanCreateCollection ); + m_rootCollection.setCachePolicy( cachePolicy ); EntityDisplayAttribute *attr = m_rootCollection.attribute( Entity::AddIfMissing ); attr->setDisplayName( fetchJob->account()->accountName() ); @@ -458,7 +448,7 @@ Collection collection; collection.setContentMimeTypes( QStringList() << KCalCore::Event::eventMimeType() ); collection.setName( calendar->uid() ); - collection.setParent( m_rootCollection ); + collection.setParentCollection( m_rootCollection ); collection.setRemoteId( calendar->uid() ); if ( calendar->editable() ) { collection.setRights( Collection::CanChangeCollection | @@ -496,7 +486,7 @@ Collection collection; collection.setContentMimeTypes( QStringList() << KCalCore::Todo::todoMimeType() ); collection.setName( taskList->uid() ); - collection.setParent( m_rootCollection ); + collection.setParentCollection( m_rootCollection ); collection.setRemoteId( taskList->uid() ); collection.setRights( Collection::CanChangeCollection | Collection::CanCreateItem | @@ -707,12 +697,12 @@ void CalendarResource::slotTaskAddedSearchFinished( KJob *job ) { - ItemSearchJob *searchJob = qobject_cast( job ); + ItemFetchJob *fetchJob = qobject_cast( job ); Item item = job->property( ITEM_PROPERTY ).value(); TaskPtr task = job->property( TASK_PROPERTY ).value(); - Item::List items = searchJob->items(); - kDebug() << "Query returned" << items.count() << "results"; + Item::List items = fetchJob->items(); + kDebug() << "Parent query returned" << items.count() << "results"; const QString tasksListId = item.parentCollection().remoteId(); @@ -722,13 +712,13 @@ } KGAPI2::Job *newJob; - // The parent is not in Nepomuk, so give up and just store the item in Google + // The parent is not known, so give up and just store the item in Google // without the information about parent. if ( items.count() == 0 ) { task->setRelatedTo( QString(), KCalCore::Incidence::RelTypeParent ); newJob = new TaskCreateJob( task, tasksListId, account(), this ); } else { - const Item matchedItem = items.first(); + Item matchedItem = items.first(); task->setRelatedTo( matchedItem.remoteId(), KCalCore::Incidence::RelTypeParent ); TaskCreateJob *createJob = new TaskCreateJob( task, tasksListId, account(), this ); @@ -758,6 +748,7 @@ EventPtr event = objects.first().dynamicCast(); item.setRemoteId( event->uid() ); item.setRemoteRevision( event->etag() ); + item.setGid( event->uid() ); changeCommitted( item ); item.setPayload( event.dynamicCast() ); new ItemModifyJob( item, this ); @@ -765,6 +756,7 @@ TaskPtr task = objects.first().dynamicCast(); item.setRemoteId( task->uid() ); item.setRemoteRevision( task->etag() ); + item.setGid( task->uid() ); changeCommitted( item ); item.setPayload( task.dynamicCast() ); new ItemModifyJob( item, this ); diff -Nru kdepim-runtime-4.12.3/resources/google/calendar/CMakeLists.txt kdepim-runtime-4.12.90/resources/google/calendar/CMakeLists.txt --- kdepim-runtime-4.12.3/resources/google/calendar/CMakeLists.txt 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/google/calendar/CMakeLists.txt 2014-03-13 08:12:29.000000000 +0000 @@ -2,8 +2,6 @@ include_directories(${QJSON_INCLUDE_DIR} ${qjson_INCLUDE_DIR} - ${NEPOMUK_CORE_INCLUDE_DIR} - ${SOPRANO_INCLUDE_DIR} ) set(calendarresource_SRCS @@ -15,6 +13,7 @@ ../common/googleaccountmanager.cpp ../common/googlesettings.cpp ../common/googlesettingsdialog.cpp + ${accounts_SRCS} ) kde4_add_kcfg_files(calendarresource_SRCS ${CMAKE_CURRENT_SOURCE_DIR}/settingsbase.kcfgc) @@ -57,14 +56,19 @@ ${QT_QTNETWORK_LIBRARY} ${KDE4_KDECORE_LIBS} ${KDE4_KDEWEBKIT_LIBS} - ${NEPOMUK_CORE_LIBRARY} - ${SOPRANO_LIBRARIES} ${QJSON_LIBRARIES} ${QJSON_LIBRARY} # for Mac OSX ${qjson_LIBRARY} # for Debian ${LibKGAPI2_LIBRARY} ) +if(${AccountsQt_FOUND} AND ${SignOnQt_FOUND}) + target_link_libraries(akonadi_googlecalendar_resource + ${ACCOUNTSQT_LIBRARIES} + ${SIGNONQT_LIBRARIES}) +endif() + + install(TARGETS akonadi_googlecalendar_resource ${INSTALL_TARGETS_DEFAULT_ARGS}) install( diff -Nru kdepim-runtime-4.12.3/resources/google/calendar/googlecalendarresource.desktop kdepim-runtime-4.12.90/resources/google/calendar/googlecalendarresource.desktop --- kdepim-runtime-4.12.3/resources/google/calendar/googlecalendarresource.desktop 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/google/calendar/googlecalendarresource.desktop 2014-03-13 08:12:29.000000000 +0000 @@ -20,6 +20,7 @@ Name[ko]=Google 캘린더 및 할 일 Name[lv]=Google kalendāri un uzdevumi Name[nb]=Google kalendere og gjøremål +Name[nds]=Google-Kalenners un -Opgaven Name[nl]=Google agenda's en taken Name[pl]=Kalendarze i zadania Google Name[pt]=Calendários e Tarefas do Google @@ -57,6 +58,7 @@ Comment[ko]=KDE에서 Google 캘린더 및 할 일에 접근하기 Comment[lv]=Piekļūstiet saviem Google kalendāriem un uzdevumiem no KDE Comment[nb]=Bruk dine Google-kalendere og gjøremål fra KDE +Comment[nds]=Ut KDE op Dien Google-Kalenners un -Opgaven togriepen Comment[nl]=Heb toegang tot uw Google agenda's en taken vanuit KDE Comment[pl]=Uzyskaj dostęp do Kalendarzy i zadań Google z KDE Comment[pt]=Aceda aos seus calendários e tarefas da Google a partir do KDE diff -Nru kdepim-runtime-4.12.3/resources/google/calendar/settingsbase.kcfg kdepim-runtime-4.12.90/resources/google/calendar/settingsbase.kcfg --- kdepim-runtime-4.12.3/resources/google/calendar/settingsbase.kcfg 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/google/calendar/settingsbase.kcfg 2014-03-13 08:12:29.000000000 +0000 @@ -8,6 +8,14 @@ + + + + + 0 + + @@ -19,5 +27,11 @@ + + false + + + 60 + diff -Nru kdepim-runtime-4.12.3/resources/google/calendar/settingsdialog.cpp kdepim-runtime-4.12.90/resources/google/calendar/settingsdialog.cpp --- kdepim-runtime-4.12.3/resources/google/calendar/settingsdialog.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/google/calendar/settingsdialog.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -99,7 +99,6 @@ SettingsDialog::~SettingsDialog() { - saveSettings(); } void SettingsDialog::saveSettings() diff -Nru kdepim-runtime-4.12.3/resources/google/CMakeLists.txt kdepim-runtime-4.12.90/resources/google/CMakeLists.txt --- kdepim-runtime-4.12.3/resources/google/CMakeLists.txt 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/google/CMakeLists.txt 2014-03-13 08:12:29.000000000 +0000 @@ -1,5 +1,11 @@ include_directories(${LibKGAPI2_INCLUDE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}) +if(${AccountsQt_FOUND} AND ${SignOnQt_FOUND}) + include_directories(${ACCOUNTSQT_INCLUDE_DIRS} ${SIGNONQT_INCLUDE_DIRS} ../) + add_definitions(-DHAVE_ACCOUNTS) + set(accounts_SRCS ../../shared/getcredentialsjob.cpp) +endif() + macro_optional_add_subdirectory(calendar) macro_optional_add_subdirectory(contacts) diff -Nru kdepim-runtime-4.12.3/resources/google/common/googleaccountmanager.cpp kdepim-runtime-4.12.90/resources/google/common/googleaccountmanager.cpp --- kdepim-runtime-4.12.3/resources/google/common/googleaccountmanager.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/google/common/googleaccountmanager.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -241,4 +241,3 @@ return m_accounts.values(); } -#include "googleaccountmanager.moc" diff -Nru kdepim-runtime-4.12.3/resources/google/common/googleresource.cpp kdepim-runtime-4.12.90/resources/google/common/googleresource.cpp --- kdepim-runtime-4.12.3/resources/google/common/googleresource.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/google/common/googleresource.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -26,8 +26,16 @@ #include #include +#include +#include #include +#ifdef HAVE_ACCOUNTS +#include "shared/getcredentialsjob.h" +#endif + +#define ACCESS_TOKEN_PROPERTY "AccessToken" + Q_DECLARE_METATYPE( KGAPI2::Job* ) using namespace KGAPI2; @@ -45,7 +53,6 @@ this, SLOT(reloadConfig()) ); setNeedsNetwork( true ); - setOnline( true ); changeRecorder()->itemFetchScope().fetchFullPayload( true ); changeRecorder()->itemFetchScope().setAncestorRetrieval( ItemFetchScope::All ); @@ -122,27 +129,161 @@ m_isConfiguring = false; } +void GoogleResource::updateAccountToken( const AccountPtr &account, KGAPI2::Job *restartJob ) +{ + if ( accountId() > 0 ) { + configureKAccounts( accountId(), restartJob ); + } else if ( !settings()->account().isEmpty() ) { + AuthJob *authJob = new AuthJob( account, settings()->clientId(), settings()->clientSecret(), this ); + authJob->setProperty( JOB_PROPERTY, QVariant::fromValue( restartJob ) ); + connect( authJob, SIGNAL(finished(KGAPI2::Job*)), + this, SLOT(slotAuthJobFinished(KGAPI2::Job*)) ); + } +} + + void GoogleResource::reloadConfig() { const QString accountName = settings()->account(); - if ( accountName.isEmpty() ) { + + if ( accountId() > 0 ) { + if ( !configureKAccounts( accountId() ) ) { + emit status( Broken ); + return; + } + } else if ( !accountName.isEmpty() ) { + if ( !configureKGAPIAccount( m_accountMgr->findAccount( accountName ) ) ) { + emit status( NotConfigured, i18n( "Configured account does not exist" ) ); + return; + } + } else { emit status( NotConfigured ); return; } - m_account = m_accountMgr->findAccount( accountName ); - if ( m_account.isNull() ) { - emit status( NotConfigured, i18n( "Configured account does not exist" ) ); + emit status( Idle, i18nc( "@info:status", "Ready" ) ); +} + +bool GoogleResource::configureKAccounts( int accountId, KGAPI2::Job *restartJob ) +{ + if ( accountId == 0 ) { + return false; + } +#ifdef HAVE_ACCOUNTS + GetCredentialsJob *gc = new GetCredentialsJob( accountId, this ); + gc->setProperty( JOB_PROPERTY, QVariant::fromValue( restartJob ) ); + connect( gc, SIGNAL(finished(KJob*)), this, SLOT(slotKAccountsCredentialsReceived(KJob*)) ); + gc->start(); + // SUCKS! + return true; +#else + Q_UNUSED( restartJob ); + return false; +#endif +} + +#ifdef HAVE_ACCOUNTS +void GoogleResource::slotKAccountsCredentialsReceived( KJob *job ) +{ + if ( job->error() ) { + emit status( Broken ); + // FIXME: Fallback to KGAPI account? + return; + } + + GetCredentialsJob *gc = qobject_cast( job ); + const QVariantMap data = gc->credentialsData(); + const QString accessToken = data.value( QLatin1String( "AccessToken" ) ).toString(); + + // Createa temporary account that we use to fetch full user name + KGAPI2::AccountPtr account( new KGAPI2::Account ); + account->setAccessToken( accessToken ); + account->setScopes( scopes() ); + + KGAPI2::Job *otherJob = 0; + if ( !job->property( JOB_PROPERTY ).isNull() ) { + otherJob = job->property( JOB_PROPERTY ).value(); + } + + if ( settings()->accountName().isEmpty() ) { + account->setAccountName( i18n( "Unknown Account" ) ); + AccountInfoFetchJob *aiJob = new AccountInfoFetchJob( account, this ); + aiJob->setProperty( ACCESS_TOKEN_PROPERTY, accessToken ); + if ( otherJob ) { + aiJob->setProperty( JOB_PROPERTY, QVariant::fromValue( otherJob ) ); + } + connect( aiJob, SIGNAL(finished(KGAPI2::Job*)), + this, SLOT(slotKAccountsAccountInfoReceived(KGAPI2::Job*)) ); + } else { + m_account = AccountPtr( new Account( settings()->accountName(), + accessToken ) ); + finishKAccountsAuthentication( otherJob ); + } +} + +void GoogleResource::slotKAccountsAccountInfoReceived( KGAPI2::Job *job ) +{ + if ( !handleError( job ) ) { + emit error( job->errorString() ); + cancelTask( i18n( "Failed to refresh tokens") ); + return; + } + + AccountInfoFetchJob *aiJob = qobject_cast( job ); + Q_ASSERT( aiJob ); + aiJob->deleteLater(); + + const AccountPtr account = job->account(); + + if ( aiJob->items().count() != 1 ) { + kWarning() << "AccountInfoFetchJob returned unexpected amount of results"; + emit error( i18n( "Invalid reply" ) ); + cancelTask( i18n( "Failed to refresh tokens") ); return; } + AccountInfoPtr info = aiJob->items().first().dynamicCast(); + settings()->setAccountName( info->email() ); + m_account = AccountPtr( new Account( info->email(), + aiJob->property( ACCESS_TOKEN_PROPERTY ).toString() ) ); + settings()->writeConfig(); + + KGAPI2::Job *otherJob = 0; + if ( job->property( JOB_PROPERTY ).isNull() ) { + otherJob = job->property( JOB_PROPERTY ).value(); + } + + finishKAccountsAuthentication( otherJob ); +} + +void GoogleResource::finishKAccountsAuthentication( KGAPI2::Job *job ) +{ + updateResourceName(); emit status( Idle, i18nc( "@info:status", "Ready" ) ); + + if ( job ) { + job->setAccount( m_account ); + job->restart(); + } else { + synchronize(); + } +} +#endif // HAVE_ACCOUNTS + +bool GoogleResource::configureKGAPIAccount( const AccountPtr &account ) +{ + m_account = account; + return !m_account.isNull(); } void GoogleResource::slotAccountManagerReady( bool ready ) { - kDebug() << ready; + // If the resource have already been configured for KAccounts, then use that + if ( accountId() > 0 ) { + return; + } + kDebug() << ready; if ( !ready ) { emit status( Broken, i18n( "Can't access KWallet" ) ); return; @@ -151,7 +292,6 @@ const QString accountName = settings()->account(); if ( accountName.isEmpty() ) { emit status( NotConfigured ); - configure( 0 ); return; } @@ -167,11 +307,21 @@ void GoogleResource::slotAccountChanged( const AccountPtr &account ) { + // We don't care when using KAccounts + if ( accountId() > 0 ) { + return; + } + m_account = account; } void GoogleResource::slotAccountRemoved( const QString &accountName ) { + // We don't care when using KAccounts + if ( accountId() > 0 ) { + return; + } + if ( m_account && m_account->accountName() != accountName ) { return; } @@ -189,17 +339,15 @@ if ( job->error() == KGAPI2::Unauthorized ) { kDebug() << job << job->errorString(); + const QList resourceScopes = scopes(); Q_FOREACH(const QUrl &scope, resourceScopes) { if ( !m_account->scopes().contains( scope ) ) { m_account->addScope( scope ); } } - AuthJob *authJob = new AuthJob( m_account, settings()->clientId(), settings()->clientSecret(), this ); - authJob->setProperty( JOB_PROPERTY, QVariant::fromValue( job ) ); - connect( authJob, SIGNAL(finished(KGAPI2::Job*)), - this, SLOT(slotAuthJobFinished(KGAPI2::Job*)) ); + updateAccountToken( m_account ); return false; } @@ -210,7 +358,7 @@ bool GoogleResource::canPerformTask() { - if ( !m_account ) { + if ( !m_account && accountId() == 0 ) { cancelTask( i18nc( "@info:status", "Resource is not configured" ) ); emit status( NotConfigured, i18nc( "@info:status", "Resource is not configured" ) ); return false; @@ -235,8 +383,10 @@ } KGAPI2::Job *otherJob = job->property( JOB_PROPERTY ).value(); - otherJob->setAccount(m_account); - otherJob->restart(); + if ( otherJob ) { + otherJob->setAccount(m_account); + otherJob->restart(); + } job->deleteLater(); } @@ -279,5 +429,11 @@ return true; } - -#include "googleresource.moc" +int GoogleResource::accountId() const +{ +#ifdef HAVE_ACCOUNTS + return settings()->accountId(); +#else + return 0; +#endif +} diff -Nru kdepim-runtime-4.12.3/resources/google/common/googleresource.h kdepim-runtime-4.12.90/resources/google/common/googleresource.h --- kdepim-runtime-4.12.3/resources/google/common/googleresource.h 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/google/common/googleresource.h 2014-03-13 08:12:29.000000000 +0000 @@ -73,7 +73,17 @@ virtual void slotAccountChanged( const KGAPI2::AccountPtr &account ); virtual void slotAccountRemoved( const QString &accountName ); +#ifdef HAVE_ACCOUNTS + void slotKAccountsCredentialsReceived( KJob *job ); + void slotKAccountsAccountInfoReceived( KGAPI2::Job *job ); + void finishKAccountsAuthentication( KGAPI2::Job* job ); +#endif // HAVE_ACCOUNTS + protected: + bool configureKAccounts( int accountId, KGAPI2::Job *restartJob = 0 ); + bool configureKGAPIAccount( const KGAPI2::AccountPtr &account ); + void updateAccountToken( const KGAPI2::AccountPtr &account, KGAPI2::Job *restartJob = 0 ); + template bool canPerformTask( const Akonadi::Item &item, const QString &mimeType = QString() ) { if ( item.isValid() && !item.hasPayload()) { @@ -90,6 +100,14 @@ bool canPerformTask(); KGAPI2::AccountPtr account() const; + /** + * KAccounts support abstraction. + * + * Returns 0 when compiled without KAccounts or not configured for KAccounts + */ + int accountId() const; + + GoogleAccountManager* accountManager() const; virtual void aboutToQuit(); diff -Nru kdepim-runtime-4.12.3/resources/google/common/googlesettingsdialog.cpp kdepim-runtime-4.12.90/resources/google/common/googlesettingsdialog.cpp --- kdepim-runtime-4.12.3/resources/google/common/googlesettingsdialog.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/google/common/googlesettingsdialog.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -19,9 +19,13 @@ #include "googleaccountmanager.h" #include "googlesettings.h" #include "googleresource.h" +#include "settings.h" #include #include +#include +#include +#include #include #include @@ -29,6 +33,7 @@ #include #include #include +#include #include #include @@ -45,6 +50,9 @@ KWindowSystem::setMainWindow( this, wId ); setButtons( Ok | Cancel ); + connect( this, SIGNAL(accepted()), + this, SLOT(slotSaveSettings()) ); + QWidget *widget = new QWidget( this ); QVBoxLayout *mainLayout = new QVBoxLayout( widget ); setMainWidget( widget ); @@ -68,6 +76,27 @@ connect( m_removeAccButton, SIGNAL(clicked(bool)), this, SLOT(slotRemoveAccountClicked()) ); + QGroupBox *refreshBox = new QGroupBox( i18n( "Refresh" ), this ); + mainLayout->addWidget( refreshBox ); + QGridLayout *refreshLayout = new QGridLayout( refreshBox ); + + m_enableRefresh = new QCheckBox( i18n( "Enable interval refresh" ), refreshBox ); + m_enableRefresh->setChecked( Settings::self()->enableIntervalCheck() ); + refreshLayout->addWidget( m_enableRefresh, 0, 0, 1, 2 ); + + QLabel *label = new QLabel( i18n( "Refresh interval:" ) ); + refreshLayout->addWidget( label, 1, 0 ); + m_refreshSpinBox = new KIntSpinBox( 10, 720, 1, 30, this, 10 ); + m_refreshSpinBox->setSuffix( ki18np( " minute", " minutes" ) ); + m_refreshSpinBox->setEnabled( Settings::self()->enableIntervalCheck() ); + refreshLayout->addWidget( m_refreshSpinBox, 1, 1 ); + connect( m_enableRefresh, SIGNAL(toggled(bool)), + m_refreshSpinBox, SLOT(setEnabled(bool)) ); + + if ( m_enableRefresh->isEnabled() ) { + m_refreshSpinBox->setValue( Settings::self()->intervalCheckTime() ); + } + QMetaObject::invokeMethod( this, "reloadAccounts", Qt::QueuedConnection ); } @@ -214,4 +243,10 @@ job->deleteLater(); } -#include "googlesettingsdialog.moc" +void GoogleSettingsDialog::slotSaveSettings() +{ + Settings::self()->setEnableIntervalCheck( m_enableRefresh->isChecked() ); + Settings::self()->setIntervalCheckTime( m_refreshSpinBox->value() ); + + saveSettings(); +} diff -Nru kdepim-runtime-4.12.3/resources/google/common/googlesettingsdialog.h kdepim-runtime-4.12.90/resources/google/common/googlesettingsdialog.h --- kdepim-runtime-4.12.3/resources/google/common/googlesettingsdialog.h 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/google/common/googlesettingsdialog.h 2014-03-13 08:12:29.000000000 +0000 @@ -33,6 +33,9 @@ class QGroupBox; class KComboBox; +class QCheckBox; +class KIntSpinBox; + class GoogleSettingsDialog : public KDialog { @@ -53,12 +56,13 @@ protected: bool handleError( KGAPI2::Job *job ); + virtual void saveSettings() = 0; private Q_SLOTS: + void slotSaveSettings(); void slotAddAccountClicked(); void slotRemoveAccountClicked(); void slotAuthJobFinished( KGAPI2::Job *job ); - void slotAccountAuthenticated( KGAPI2::Job *job ); private: @@ -69,6 +73,8 @@ KPushButton *m_addAccButton; KPushButton *m_removeAccButton; KComboBox *m_accComboBox; + QCheckBox *m_enableRefresh; + KIntSpinBox *m_refreshSpinBox; }; diff -Nru kdepim-runtime-4.12.3/resources/google/contacts/CMakeLists.txt kdepim-runtime-4.12.90/resources/google/contacts/CMakeLists.txt --- kdepim-runtime-4.12.3/resources/google/contacts/CMakeLists.txt 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/google/contacts/CMakeLists.txt 2014-03-13 08:12:29.000000000 +0000 @@ -8,6 +8,7 @@ ../common/googleresource.cpp ../common/googleaccountmanager.cpp ../common/googlesettingsdialog.cpp + ${accounts_SRCS} ) kde4_add_kcfg_files(contactsresource_SRCS ${CMAKE_CURRENT_SOURCE_DIR}/settingsbase.kcfgc) @@ -48,6 +49,12 @@ ${LibKGAPI2_LIBRARY} ) +if(${AccountsQt_FOUND} AND ${SignOnQt_FOUND}) + target_link_libraries(akonadi_googlecontacts_resource + ${ACCOUNTSQT_LIBRARIES} + ${SIGNONQT_LIBRARIES}) +endif() + install(TARGETS akonadi_googlecontacts_resource ${INSTALL_TARGETS_DEFAULT_ARGS}) install( diff -Nru kdepim-runtime-4.12.3/resources/google/contacts/contactsresource.cpp kdepim-runtime-4.12.90/resources/google/contacts/contactsresource.cpp --- kdepim-runtime-4.12.3/resources/google/contacts/contactsresource.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/google/contacts/contactsresource.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -26,6 +26,7 @@ #include #include #include +#include #include #include @@ -93,7 +94,8 @@ QList< QUrl > ContactsResource::scopes() const { QList< QUrl > scopes; - scopes << Account::contactsScopeUrl(); + scopes << Account::contactsScopeUrl() + << Account::accountInfoScopeUrl(); return scopes; } @@ -341,12 +343,19 @@ ContactsGroupFetchJob *fetchJob = qobject_cast( job ); const ObjectsList objects = fetchJob->items(); + CachePolicy cachePolicy; + if ( Settings::self()->enableIntervalCheck() ) { + cachePolicy.setInheritFromParent( false ); + cachePolicy.setIntervalCheckTime( Settings::self()->intervalCheckTime() ); + } + m_rootCollection = Collection(); m_rootCollection.setContentMimeTypes( QStringList() << Collection::virtualMimeType() << KABC::Addressee::mimeType() ); m_rootCollection.setRemoteId( MYCONTACTS_REMOTEID ); m_rootCollection.setName( fetchJob->account()->accountName() ); - m_rootCollection.setParent( Collection::root() ); + m_rootCollection.setParentCollection( Collection::root() ); + m_rootCollection.setCachePolicy( cachePolicy ); m_rootCollection.setRights( Collection::CanCreateCollection | Collection::CanCreateItem | Collection::CanChangeItem | @@ -383,7 +392,7 @@ Collection collection; collection.setContentMimeTypes( QStringList() << KABC::Addressee::mimeType() ); collection.setName( group->title() ); - collection.setParent( m_rootCollection ); + collection.setParentCollection( m_rootCollection ); collection.setRights( Collection::CanLinkItem | Collection::CanUnlinkItem | Collection::CanChangeItem ); @@ -405,7 +414,7 @@ Collection otherCollection; otherCollection.setContentMimeTypes( QStringList() << KABC::Addressee::mimeType() ); otherCollection.setName( i18n( "Other Contacts" ) ); - otherCollection.setParent( m_rootCollection ); + otherCollection.setParentCollection( m_rootCollection ); otherCollection.setRights( Collection::CanCreateItem | Collection::CanChangeItem | Collection::CanDeleteItem ); diff -Nru kdepim-runtime-4.12.3/resources/google/contacts/googlecontactsresource.desktop kdepim-runtime-4.12.90/resources/google/contacts/googlecontactsresource.desktop --- kdepim-runtime-4.12.3/resources/google/contacts/googlecontactsresource.desktop 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/google/contacts/googlecontactsresource.desktop 2014-03-13 08:12:29.000000000 +0000 @@ -21,6 +21,7 @@ Name[ko]=Google 연락처 Name[lv]=Google kontakti Name[nb]=Google-kontakter +Name[nds]=Google-Kontakten Name[nl]=Google contactpersonen Name[pl]=Kontakty Google Name[pt]=Contactos do Google @@ -59,6 +60,7 @@ Comment[ko]=KDE에서 Google 연락처에 접근하기 Comment[lv]=Piekļūstiet saviem Google kontaktiem no KDE Comment[nb]=Bruk dine Google-kontakter fra KDE +Comment[nds]=Ut KDE op Dien Google-Kontakten togriepen Comment[nl]=Heb toegang tot uw Google contactpersonen vanuit KDE Comment[pl]=Uzyskaj dostęp do Kontaktów Google z KDE Comment[pt]=Aceda aos seus contactos da Google a partir do KDE diff -Nru kdepim-runtime-4.12.3/resources/google/contacts/settingsbase.kcfg kdepim-runtime-4.12.90/resources/google/contacts/settingsbase.kcfg --- kdepim-runtime-4.12.3/resources/google/contacts/settingsbase.kcfg 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/google/contacts/settingsbase.kcfg 2014-03-13 08:12:29.000000000 +0000 @@ -8,11 +8,19 @@ - - true + + - - 30 + + 0 + + + + false + + + 60 diff -Nru kdepim-runtime-4.12.3/resources/ical/CMakeLists.txt kdepim-runtime-4.12.90/resources/ical/CMakeLists.txt --- kdepim-runtime-4.12.3/resources/ical/CMakeLists.txt 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/ical/CMakeLists.txt 2014-03-13 08:12:29.000000000 +0000 @@ -9,10 +9,8 @@ set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${KDE4_ENABLE_EXCEPTIONS}" ) add_subdirectory( wizard ) -if (NOT WINCE) add_subdirectory( notes ) add_subdirectory( tests ) -endif() ########### next target ############### add_definitions( -DSETTINGS_NAMESPACE=Akonadi_ICal_Resource ) @@ -33,11 +31,7 @@ ${CMAKE_CURRENT_BINARY_DIR}/org.kde.Akonadi.ICal.Settings.xml settings.h Akonadi_ICal_Resource::Settings icalsettingsadaptor ICalSettingsAdaptor ) -if (NOT WINCE) kde4_add_plugin(akonadi_ical_resource ${icalresource_SRCS}) -else() -kde4_add_plugin(akonadi_ical_resource STATIC ${icalresource_SRCS}) -endif() if (Q_WS_MAC) set_target_properties(akonadi_ical_resource PROPERTIES MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/../Info.plist.template) diff -Nru kdepim-runtime-4.12.3/resources/ical/notes/notesresource.cpp kdepim-runtime-4.12.90/resources/ical/notes/notesresource.cpp --- kdepim-runtime-4.12.3/resources/ical/notes/notesresource.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/ical/notes/notesresource.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -58,4 +58,3 @@ AKONADI_AGENT_FACTORY( NotesResource, akonadi_notes_resource ) -#include "notesresource.moc" diff -Nru kdepim-runtime-4.12.3/resources/ical/shared/icalresourcebase.cpp kdepim-runtime-4.12.90/resources/ical/shared/icalresourcebase.cpp --- kdepim-runtime-4.12.3/resources/ical/shared/icalresourcebase.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/ical/shared/icalresourcebase.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -173,4 +173,3 @@ } -#include "icalresourcebase.moc" diff -Nru kdepim-runtime-4.12.3/resources/ical/shared/icalresource.cpp kdepim-runtime-4.12.90/resources/ical/shared/icalresource.cpp --- kdepim-runtime-4.12.3/resources/ical/shared/icalresource.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/ical/shared/icalresource.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -152,4 +152,3 @@ } -#include "icalresource.moc" diff -Nru kdepim-runtime-4.12.3/resources/ical/wizard/CMakeLists.txt kdepim-runtime-4.12.90/resources/ical/wizard/CMakeLists.txt --- kdepim-runtime-4.12.3/resources/ical/wizard/CMakeLists.txt 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/ical/wizard/CMakeLists.txt 2014-03-13 08:12:29.000000000 +0000 @@ -1,9 +1,4 @@ - -if (WINCE) - set(ICAL_FILE_DEFAULT_PATH "/My Documents/.local/share/korganizer/calendar.ics") -else () - set(ICAL_FILE_DEFAULT_PATH "$HOME/.local/share/korganizer/calendar.ics") -endif () +set(ICAL_FILE_DEFAULT_PATH "$HOME/.local/share/korganizer/calendar.ics") configure_file(icalwizard.es.cmake ${CMAKE_CURRENT_BINARY_DIR}/icalwizard.es) install ( FILES icalwizard.desktop ${CMAKE_CURRENT_BINARY_DIR}/icalwizard.es icalwizard.ui DESTINATION ${DATA_INSTALL_DIR}/akonadi/accountwizard/ical ) diff -Nru kdepim-runtime-4.12.3/resources/icaldir/icaldirresource.cpp kdepim-runtime-4.12.90/resources/icaldir/icaldirresource.cpp --- kdepim-runtime-4.12.3/resources/icaldir/icaldirresource.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/icaldir/icaldirresource.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -304,4 +304,3 @@ AKONADI_RESOURCE_MAIN( ICalDirResource ) -#include "icaldirresource.moc" diff -Nru kdepim-runtime-4.12.3/resources/icaldir/icaldirresource.desktop kdepim-runtime-4.12.90/resources/icaldir/icaldirresource.desktop --- kdepim-runtime-4.12.3/resources/icaldir/icaldirresource.desktop 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/icaldir/icaldirresource.desktop 2014-03-13 08:12:29.000000000 +0000 @@ -19,6 +19,7 @@ Name[kk]=ICal күнтізбе қапшығы Name[ko]=ICal 달력 폴더 Name[nb]=ICal kalendermappe +Name[nds]=ICal-Kalennerorner Name[nl]=ICal-agendamap Name[pl]=Folder kalendarza ICal Name[pt]=Pasta de Calendários ICal @@ -37,7 +38,7 @@ Name[zh_CN]=ICal 日历文件夹 Name[zh_TW]=ICal 行事曆資料夾 Comment="Provides access to calendar items, each stored in a single file, in a given directory" -Comment[bs]="Omogućava pristup elementima kalendara, pri čemu je svaki pohranjen u datoteci navedenog direktorija" +Comment[bs]="Puža pristup stavkama kalendara, svaka u pojedinoh datoteci u datom direktoriju" Comment[ca]=«Proporciona l'accés als elements d'un calendari, cada un emmagatzemat en un fitxer individual, en un directori proporcionat» Comment[ca@valencia]=«Proporciona l'accés als elements d'un calendari, cada un emmagatzemat en un fitxer individual, en un directori proporcionat» Comment[cs]="Poskytuje přístup k položkám kalendáře, každé uložené v jednom souboru v daném adresáři" @@ -51,7 +52,9 @@ Comment[ia]="Il provide accesso a elementos de calendario, cata un immagazinate in un file singule, in un date directorio" Comment[it]="Fornisce accesso a voci di calendario, ciascuna memorizzata in un singolo file in una data cartella" Comment[kk]="Көрсетілген қапшықта, бөлек файлдарда сақталған күнтізбенің жазуларына қатынау мүмкіндігін береді" +Comment[ko]="지정한 디렉터리의 단일 로컬 파일에 저장되어 있는 달력 항목에 접근하기" Comment[nb]=«Gir tilgang til kalenderelementer, hver lagret i én enkelt fil, i en gitt mappe» +Comment[nds]="Stellt Togriep op Kalennerindrääg praat, elkeen binnen een Datei binnen en angeven Orner" Comment[nl]="Geeft toegang tot agenda-items, elk opgeslagen in een enkel bestand in een opgegeven map" Comment[pl]="Daje dostęp do plików obiektów kalendarza, każdy w oddzielnym pliku, w podanym katalogu" Comment[pt]=Oferece o acesso aos itens do calendário, estando cada um guardado num único ficheiro de uma dada pasta diff -Nru kdepim-runtime-4.12.3/resources/imap/addcollectiontask.cpp kdepim-runtime-4.12.90/resources/imap/addcollectiontask.cpp --- kdepim-runtime-4.12.3/resources/imap/addcollectiontask.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/imap/addcollectiontask.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -81,6 +81,8 @@ void AddCollectionTask::onCreateDone( KJob *job ) { if ( job->error() ) { + emitError( i18n( "Failed to create the folder '%1' on the IMAP server. ", + m_collection.name() ) ); cancelTask( job->errorString() ); } else { // Automatically subscribe to newly created mailbox @@ -123,12 +125,11 @@ } job->setMailBox( mailBoxForCollection( m_collection ) ); - if ( job->serverCapability() == KIMAP::MetaDataJobBase::Annotatemore ) { - job->setEntry( entry ); - job->addMetaData( "value.shared", annotations[entry] ); - } else { - //We stripped the /shared prefix when getting the metadata, so we need to readd it now + if ( !entry.startsWith( "/shared" ) && !entry.startsWith( "/private" ) ) { + //Support for legacy annotations that don't include the prefix job->addMetaData( QByteArray("/shared") + entry, annotations[entry] ); + } else { + job->addMetaData( entry, annotations[entry] ); } connect( job, SIGNAL(result(KJob*)), @@ -153,4 +154,3 @@ changeCommitted( m_collection ); } -#include "addcollectiontask.moc" diff -Nru kdepim-runtime-4.12.3/resources/imap/additemtask.cpp kdepim-runtime-4.12.90/resources/imap/additemtask.cpp --- kdepim-runtime-4.12.3/resources/imap/additemtask.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/imap/additemtask.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -65,6 +65,7 @@ job->setMailBox( mailBox ); job->setContent( msg->encodedContent( true ) ); job->setFlags( fromAkonadiToSupportedImapFlags( item().flags().toList(), collection() ) ); + job->setInternalDate( msg->date()->dateTime() ); connect( job, SIGNAL(result(KJob*)), SLOT(onAppendMessageDone(KJob*)) ); job->start(); } @@ -203,6 +204,5 @@ } } -#include "additemtask.moc" diff -Nru kdepim-runtime-4.12.3/resources/imap/changecollectiontask.cpp kdepim-runtime-4.12.90/resources/imap/changecollectiontask.cpp --- kdepim-runtime-4.12.3/resources/imap/changecollectiontask.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/imap/changecollectiontask.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -31,7 +31,7 @@ #include "imapaclattribute.h" #include "imapquotaattribute.h" -#include +#include ChangeCollectionTask::ChangeCollectionTask( ResourceStateInterface::Ptr resource, QObject *parent ) : ResourceTask( DeferIfNoSession, resource, parent ), m_pendingJobs(0) @@ -137,12 +137,11 @@ } job->setMailBox( mailBoxForCollection( collection() ) ); - if ( job->serverCapability() == KIMAP::MetaDataJobBase::Annotatemore ) { - job->setEntry( entry ); - job->addMetaData( "value.shared", annotations[entry] ); - } else { - //We stripped the /shared prefix when getting the metadata, so we need to readd it now + if ( !entry.startsWith( "/shared" ) && !entry.startsWith( "/private" ) ) { + //Support for legacy annotations that don't include the prefix job->addMetaData( QByteArray("/shared") + entry, annotations[entry] ); + } else { + job->addMetaData( entry, annotations[entry] ); } kDebug( 5327 ) << "Job got entry:" << entry << "value:" << annotations[entry]; @@ -291,6 +290,5 @@ } } -#include "changecollectiontask.moc" diff -Nru kdepim-runtime-4.12.3/resources/imap/changeitemsflagstask.cpp kdepim-runtime-4.12.90/resources/imap/changeitemsflagstask.cpp --- kdepim-runtime-4.12.3/resources/imap/changeitemsflagstask.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/imap/changeitemsflagstask.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -129,4 +129,3 @@ } } -#include "changeitemsflagstask.moc" diff -Nru kdepim-runtime-4.12.3/resources/imap/changeitemtask.cpp kdepim-runtime-4.12.90/resources/imap/changeitemtask.cpp --- kdepim-runtime-4.12.3/resources/imap/changeitemtask.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/imap/changeitemtask.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -286,6 +286,5 @@ changeCommitted( i ); } -#include "changeitemtask.moc" diff -Nru kdepim-runtime-4.12.3/resources/imap/CMakeLists.txt kdepim-runtime-4.12.90/resources/imap/CMakeLists.txt --- kdepim-runtime-4.12.3/resources/imap/CMakeLists.txt 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/imap/CMakeLists.txt 2014-03-13 08:12:29.000000000 +0000 @@ -28,7 +28,6 @@ noselectattribute.cpp noinferiorsattribute.cpp passwordrequesterinterface.cpp - removecollectiontask.cpp removecollectionrecursivetask.cpp removeitemstask.cpp resourcestateinterface.cpp @@ -37,6 +36,7 @@ retrievecollectionstask.cpp retrieveitemtask.cpp retrieveitemstask.cpp + searchtask.cpp sessionpool.cpp timestampattribute.cpp uidvalidityattribute.cpp @@ -47,7 +47,7 @@ kde4_add_library(imapresource STATIC ${imapresource_LIB_SRCS}) -target_link_libraries(imapresource ${KDEPIMLIBS_AKONADI_LIBS} ${QT_QTDBUS_LIBRARY} ${QT_QTCORE_LIBRARY} ${QT_QTGUI_LIBRARY} ${QT_QTNETWORK_LIBRARY} ${KDEPIMLIBS_KIMAP_LIBS} ${KDEPIMLIBS_MAILTRANSPORT_LIBS} ${KDE4_KIO_LIBS} ${KDEPIMLIBS_KMIME_LIBS} ${KDEPIMLIBS_AKONADI_KMIME_LIBS} ${KDEPIMLIBS_KPIMIDENTITIES_LIBS} ${KDEPIMLIBS_KPIMUTILS_LIBS}) +target_link_libraries(imapresource ${KDEPIMLIBS_AKONADI_LIBS} ${QT_QTDBUS_LIBRARY} ${QT_QTCORE_LIBRARY} ${QT_QTGUI_LIBRARY} ${QT_QTNETWORK_LIBRARY} ${KDEPIMLIBS_KIMAP_LIBS} ${KDEPIMLIBS_MAILTRANSPORT_LIBS} ${KDE4_KIO_LIBS} ${KDEPIMLIBS_KMIME_LIBS} ${KDEPIMLIBS_AKONADI_KMIME_LIBS} ${KDEPIMLIBS_KPIMIDENTITIES_LIBS}) if( NOT IMAPRESOURCE_NO_SOLID) target_link_libraries(imapresource ${KDE4_SOLID_LIBS}) @@ -97,7 +97,7 @@ set_target_properties(akonadi_imap_resource PROPERTIES MACOSX_BUNDLE_BUNDLE_NAME "KDE Akonadi IMAP Resource") endif () -target_link_libraries(akonadi_imap_resource ${KDEPIMLIBS_AKONADI_LIBS} ${QT_QTDBUS_LIBRARY} ${QT_QTCORE_LIBRARY} ${QT_QTGUI_LIBRARY} ${QT_QTNETWORK_LIBRARY} ${KDEPIMLIBS_KIMAP_LIBS} ${KDEPIMLIBS_MAILTRANSPORT_LIBS} ${KDE4_KIO_LIBS} ${KDEPIMLIBS_KMIME_LIBS} ${KDEPIMLIBS_AKONADI_KMIME_LIBS} ${KDEPIMLIBS_KPIMIDENTITIES_LIBS} imapresource) +target_link_libraries(akonadi_imap_resource ${KDEPIMLIBS_AKONADI_LIBS} ${QT_QTDBUS_LIBRARY} ${QT_QTCORE_LIBRARY} ${QT_QTGUI_LIBRARY} ${QT_QTNETWORK_LIBRARY} ${KDEPIMLIBS_KIMAP_LIBS} ${KDEPIMLIBS_MAILTRANSPORT_LIBS} ${KDE4_KIO_LIBS} ${KDEPIMLIBS_KMIME_LIBS} ${KDEPIMLIBS_AKONADI_KMIME_LIBS} ${KDEPIMLIBS_KPIMIDENTITIES_LIBS} imapresource folderarchivesettings) if (RUNTIME_PLUGINS_STATIC) target_link_libraries(akonadi_imap_resource akonadi_serializer_mail) @@ -110,6 +110,4 @@ install(TARGETS akonadi_imap_resource ${INSTALL_TARGETS_DEFAULT_ARGS}) add_subdirectory( wizard ) -if(NOT WINCE) add_subdirectory( tests ) -endif() diff -Nru kdepim-runtime-4.12.3/resources/imap/expungecollectiontask.cpp kdepim-runtime-4.12.90/resources/imap/expungecollectiontask.cpp --- kdepim-runtime-4.12.3/resources/imap/expungecollectiontask.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/imap/expungecollectiontask.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -97,6 +97,5 @@ } } -#include "expungecollectiontask.moc" diff -Nru kdepim-runtime-4.12.3/resources/imap/imapidlemanager.cpp kdepim-runtime-4.12.90/resources/imap/imapidlemanager.cpp --- kdepim-runtime-4.12.3/resources/imap/imapidlemanager.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/imap/imapidlemanager.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -49,9 +49,7 @@ ImapIdleManager::~ImapIdleManager() { - if ( m_idle ) { - m_idle->stop(); - } + stop(); if ( m_pool ) { if ( m_sessionRequestId ) { m_pool->cancelSessionRequest( m_sessionRequestId ); @@ -62,6 +60,18 @@ } } +void ImapIdleManager::stop() +{ + if ( m_idle ) { + m_idle->stop(); + disconnect(m_idle, 0, this, 0); + m_idle = 0; + } + if ( m_pool ) { + disconnect(m_pool, 0, this, 0); + } +} + KIMAP::Session *ImapIdleManager::session() const { return m_session; @@ -171,6 +181,5 @@ m_resource->synchronizeCollection( m_state->collection().id() ); } -#include "imapidlemanager.moc" diff -Nru kdepim-runtime-4.12.3/resources/imap/imapidlemanager.h kdepim-runtime-4.12.90/resources/imap/imapidlemanager.h --- kdepim-runtime-4.12.3/resources/imap/imapidlemanager.h 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/imap/imapidlemanager.h 2014-03-13 08:12:29.000000000 +0000 @@ -51,6 +51,7 @@ public: ImapIdleManager( ResourceStateInterface::Ptr state, SessionPool *pool, ImapResource *parent ); ~ImapIdleManager(); + void stop(); KIMAP::Session *session() const; diff -Nru kdepim-runtime-4.12.3/resources/imap/imapresource.cpp kdepim-runtime-4.12.90/resources/imap/imapresource.cpp --- kdepim-runtime-4.12.3/resources/imap/imapresource.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/imap/imapresource.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -74,12 +74,12 @@ #include "movecollectiontask.h" #include "moveitemstask.h" #include "removecollectionrecursivetask.h" -#include "removecollectiontask.h" #include "removeitemstask.h" #include "retrievecollectionmetadatatask.h" #include "retrievecollectionstask.h" #include "retrieveitemtask.h" #include "retrieveitemstask.h" +#include "searchtask.h" #include "settingspasswordrequester.h" #include "sessionpool.h" @@ -88,7 +88,6 @@ #include "resourceadaptor.h" #ifdef MAIL_SERIALIZER_PLUGIN_STATIC -#include Q_IMPORT_PLUGIN(akonadi_serializer_mail) #endif @@ -184,15 +183,36 @@ ImapResource::~ImapResource() { - // Disconnect and destroy the pool now, otherwise it will be called from QObject - // destructor and at that point ResourceBase and most of other stuff is already - // destroyed, which causes a crash - m_pool->disconnect(); - delete m_pool; + //Destroy everything that could cause callbacks immediately, otherwise the callbacks can result in a crash. + if ( m_idle ) { + delete m_idle; + m_idle = 0; + } + + Q_FOREACH (ResourceTask* task, m_taskList) { + delete task; + } + m_taskList.clear(); + + delete m_pool; delete m_bodyCheckSession; } +void ImapResource::aboutToQuit() +{ + //TODO the resource would ideally have to signal when it's done with logging out etc, before the destructor gets called + if ( m_idle ) { + m_idle->stop(); + } + + Q_FOREACH (ResourceTask* task, m_taskList) { + task->kill(); + } + + m_pool->disconnect(); +} + void ImapResource::fetchItemsWithoutBodies( const Collection &collection, QObject* receiver, const char* slot) { @@ -237,7 +257,7 @@ Q_ARG( QList, uids ) ); } -// ---------------------------------------------------------------------------------- +// ----------------------------------------------------------------------------- int ImapResource::configureDialog( WId windowId ) { @@ -468,18 +488,6 @@ queueTask( task ); } -void ImapResource::retrieveCollectionAttributes( const Akonadi::Collection &collection ) -{ - emit status( AgentBase::Running, i18nc( "@info:status", "Retrieving folder attributes for '%1'", collection.name() ) ); - - ResourceStateInterface::Ptr state = ::ResourceState::createRetrieveCollectionMetadataState( this, collection ); - - RetrieveCollectionMetadataTask *task = new RetrieveCollectionMetadataTask( state, this ); - task->setSpontaneous( false ); - task->start( m_pool ); - queueTask( task ); -} - void ImapResource::triggerCollectionExtraInfoJobs( const QVariant &collectionVariant ) { const Collection collection( collectionVariant.value() ); @@ -561,6 +569,38 @@ +void ImapResource::addSearch(const QString& query, const QString& queryLanguage, const Collection& resultCollection) +{ +} + +void ImapResource::removeSearch(const Collection& resultCollection) +{ +} + +void ImapResource::search( const QString &query, const Collection &collection ) +{ + QVariantMap arg; + arg[QLatin1String("query")] = query; + arg[QLatin1String("collection")] = QVariant::fromValue( collection ); + scheduleCustomTask( this, "doSearch", arg ); +} + +void ImapResource::doSearch( const QVariant &arg ) +{ + const QVariantMap map = arg.toMap(); + const QString query = map[QLatin1String("query")].toString(); + const Collection collection = map[QLatin1String("collection")].value(); + + ResourceStateInterface::Ptr state = ::ResourceState::createSearchState( this, collection ); + emit status( AgentBase::Running, i18nc( "@info:status", "Searching..." ) ); + SearchTask *task = new SearchTask( state, query, this ); + task->start( m_pool ); + queueTask( task ); +} + + +// ----- + // ---------------------------------------------------------------------------------- void ImapResource::scheduleConnectionAttempt() @@ -575,13 +615,18 @@ kDebug() << "online=" << online; #endif if ( !online ) { - if ( m_pool->isConnected() ) - m_pool->disconnect(); - Q_FOREACH(ResourceTask* task, m_taskList) + Q_FOREACH(ResourceTask* task, m_taskList) { task->kill(); + delete task; + } m_taskList.clear(); - delete m_idle; - m_idle = 0; + if ( m_pool->isConnected() ) + m_pool->disconnect(); + if (m_idle) { + m_idle->stop(); + delete m_idle; + m_idle = 0; + } Settings::self()->clearCachedPassword(); } else if ( online && !m_pool->isConnected() ) { scheduleConnectionAttempt(); @@ -796,4 +841,3 @@ AKONADI_RESOURCE_MAIN( ImapResource ) -#include "imapresource.moc" diff -Nru kdepim-runtime-4.12.3/resources/imap/imapresource.h kdepim-runtime-4.12.90/resources/imap/imapresource.h --- kdepim-runtime-4.12.3/resources/imap/imapresource.h 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/imap/imapresource.h 2014-03-13 08:12:29.000000000 +0000 @@ -27,6 +27,7 @@ #define RESOURCES_IMAP_IMAPRESOURCE_H #include +#include #include class QTimer; @@ -37,13 +38,14 @@ class Session; } -class ImapAccount; class ImapIdleManager; class SessionPool; class ResourceState; class SubscriptionDialog; -class ImapResource : public Akonadi::ResourceBase, public Akonadi::AgentBase::ObserverV3 +class ImapResource : public Akonadi::ResourceBase, + public Akonadi::AgentBase::ObserverV3, + public Akonadi::AgentSearchInterface { Q_OBJECT Q_CLASSINFO( "D-Bus Interface", "org.kde.Akonadi.Imap.Resource" ) @@ -77,7 +79,6 @@ void abortActivity(); void retrieveCollections(); - void retrieveCollectionAttributes( const Akonadi::Collection &collection ); void retrieveItems( const Akonadi::Collection &col ); bool retrieveItem( const Akonadi::Item &item, const QSet &parts ); @@ -97,13 +98,20 @@ virtual void collectionMoved( const Akonadi::Collection &collection, const Akonadi::Collection &source, const Akonadi::Collection &destination ); + virtual void addSearch( const QString &query, const QString &queryLanguage, const Akonadi::Collection &resultCollection ); + virtual void removeSearch( const Akonadi::Collection &resultCollection ); + virtual void search( const QString &query, const Akonadi::Collection &collection ); virtual void doSetOnline(bool online); QChar separatorCharacter() const; void setSeparatorCharacter( const QChar &separator ); + virtual void aboutToQuit(); + private Q_SLOTS: + void doSearch( const QVariant &arg ); + void reconnect(); void scheduleConnectionAttempt(); diff -Nru kdepim-runtime-4.12.3/resources/imap/movecollectiontask.cpp kdepim-runtime-4.12.90/resources/imap/movecollectiontask.cpp --- kdepim-runtime-4.12.3/resources/imap/movecollectiontask.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/imap/movecollectiontask.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -91,11 +91,20 @@ doRename( examine->session() ); } +QString MoveCollectionTask::mailBoxForCollections( const Akonadi::Collection& parent, const Akonadi::Collection& child ) const +{ + const QString parentMailbox = mailBoxForCollection( parent ); + if ( parentMailbox.isEmpty() ) { + return child.remoteId().mid(1); //Strip separator on toplevel mailboxes + } + return parentMailbox + child.remoteId(); +} + void MoveCollectionTask::doRename( KIMAP::Session *session ) { // collection.remoteId() already includes the separator - const QString oldMailBox = mailBoxForCollection( sourceCollection() )+collection().remoteId(); - const QString newMailBox = mailBoxForCollection( targetCollection() )+collection().remoteId(); + const QString oldMailBox = mailBoxForCollections( sourceCollection(), collection() ); + const QString newMailBox = mailBoxForCollections( targetCollection(), collection() ); if ( oldMailBox != newMailBox ) { KIMAP::RenameJob *job = new KIMAP::RenameJob( session ); @@ -141,6 +150,5 @@ changeCommitted( collection() ); } -#include "movecollectiontask.moc" diff -Nru kdepim-runtime-4.12.3/resources/imap/movecollectiontask.h kdepim-runtime-4.12.90/resources/imap/movecollectiontask.h --- kdepim-runtime-4.12.3/resources/imap/movecollectiontask.h 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/imap/movecollectiontask.h 2014-03-13 08:12:29.000000000 +0000 @@ -42,6 +42,7 @@ private: void doRename( KIMAP::Session *session ); + QString mailBoxForCollections( const Akonadi::Collection &parent, const Akonadi::Collection &child ) const; Akonadi::Collection m_collection; }; diff -Nru kdepim-runtime-4.12.3/resources/imap/moveitemstask.cpp kdepim-runtime-4.12.90/resources/imap/moveitemstask.cpp --- kdepim-runtime-4.12.3/resources/imap/moveitemstask.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/imap/moveitemstask.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -287,7 +287,7 @@ // then update the property to the probable next uid to keep the cache in sync. // If not something happened in our back, so we don't update and a refetch will // happen at some point. - if ( m_newUids.last() == oldNextUid ) { + if ( !m_newUids.isEmpty() && m_newUids.last() == oldNextUid ) { if ( uidAttr == 0 ) { uidAttr = new UidNextAttribute( m_newUids.last() + 1 ); c.addAttribute( uidAttr ); @@ -312,6 +312,5 @@ } -#include "moveitemstask.moc" diff -Nru kdepim-runtime-4.12.3/resources/imap/passwordrequesterinterface.cpp kdepim-runtime-4.12.90/resources/imap/passwordrequesterinterface.cpp --- kdepim-runtime-4.12.3/resources/imap/passwordrequesterinterface.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/imap/passwordrequesterinterface.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -27,5 +27,4 @@ } -#include "passwordrequesterinterface.moc" diff -Nru kdepim-runtime-4.12.3/resources/imap/removecollectionrecursivetask.cpp kdepim-runtime-4.12.90/resources/imap/removecollectionrecursivetask.cpp --- kdepim-runtime-4.12.3/resources/imap/removecollectionrecursivetask.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/imap/removecollectionrecursivetask.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -104,21 +104,19 @@ selectJob->start(); // mark all items as deleted + // This step shouldn't be required, but apparently some servers don't allow deleting, non empty mailboxes (although they should). KIMAP::ImapSet allItems; allItems.add( KIMAP::ImapInterval( 1, 0 ) ); // means 1:* KIMAP::StoreJob *storeJob = new KIMAP::StoreJob( mSession ); storeJob->setSequenceSet( allItems ); storeJob->setFlags( KIMAP::MessageFlags() << Akonadi::MessageFlags::Deleted ); storeJob->setMode( KIMAP::StoreJob::AppendFlags ); - connect( storeJob, SIGNAL(result(KJob*)), SLOT(onJobDone(KJob*)) ); + // The result is explicitly ignored, since this can fail in the case of an empty folder storeJob->start(); - // expunge the mailbox - KIMAP::ExpungeJob *expungeJob = new KIMAP::ExpungeJob( mSession ); - connect( expungeJob, SIGNAL(result(KJob*)), SLOT(onJobDone(KJob*)) ); - expungeJob->start(); - - // Close the mailbox - some servers refuse to delete an opened mailbox + // Some IMAP servers don't allow deleting an opened mailbox, so make sure + // it's not opened (https://bugs.kde.org/show_bug.cgi?id=324932). CLOSE will + // also trigger EXPUNGE to take care of the messages deleted above KIMAP::CloseJob *closeJob = new KIMAP::CloseJob( mSession ); closeJob->setProperty( "folderDescriptor", descriptor.name ); connect( closeJob, SIGNAL(result(KJob*)), SLOT(onCloseJobDone(KJob*)) ); @@ -170,4 +168,3 @@ } } -#include "removecollectionrecursivetask.moc" diff -Nru kdepim-runtime-4.12.3/resources/imap/removecollectiontask.cpp kdepim-runtime-4.12.90/resources/imap/removecollectiontask.cpp --- kdepim-runtime-4.12.3/resources/imap/removecollectiontask.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/imap/removecollectiontask.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,95 +0,0 @@ -/* - Copyright (c) 2010 Klarälvdalens Datakonsult AB, - a KDAB Group company - Author: Kevin Ottens - - 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 "removecollectiontask.h" - -#include -#include - -#include -#include -#include - -RemoveCollectionTask::RemoveCollectionTask( ResourceStateInterface::Ptr resource, QObject *parent ) - : ResourceTask( DeferIfNoSession, resource, parent ) -{ - -} - -RemoveCollectionTask::~RemoveCollectionTask() -{ -} - -void RemoveCollectionTask::doStart( KIMAP::Session *session ) -{ - // Some IMAP servers don't allow deleting an opened mailbox, so make sure - // it's not opened (https://bugs.kde.org/show_bug.cgi?id=324932) - if ( session->selectedMailBox() != mailBoxForCollection( collection() ) ) { - doDelete( session ); - return; - } - - KIMAP::CloseJob *close = new KIMAP::CloseJob( session ); - connect( close, SIGNAL(result(KJob*)), - this, SLOT(onCloseDone(KJob*)) ); - close->start(); -} - -void RemoveCollectionTask::onCloseDone( KJob *job ) -{ - if ( job->error() ) { - changeProcessed(); - kDebug( 5327 ) << "Failed to delete the folder, resync the folder tree"; - emitWarning( i18n( "Failed to delete the folder, restoring folder list." ) ); - synchronizeCollectionTree(); - } else { - KIMAP::CloseJob *close = dynamic_cast( job ); - doDelete( close->session() ); - } -} - -void RemoveCollectionTask::doDelete( KIMAP::Session *session ) -{ - const QString mailBox = mailBoxForCollection( collection() ); - KIMAP::DeleteJob *job = new KIMAP::DeleteJob( session ); - job->setMailBox( mailBox ); - - connect( job, SIGNAL(result(KJob*)), - this, SLOT(onDeleteDone(KJob*)) ); - - job->start(); -} - -void RemoveCollectionTask::onDeleteDone( KJob *job ) -{ - // finish the task. - changeProcessed(); - - if ( job->error() ) { - kDebug( 5327 ) << "Failed to delete the folder, resync the folder tree"; - emitWarning( i18n( "Failed to delete the folder, restoring folder list." ) ); - synchronizeCollectionTree(); - } -} - -#include "removecollectiontask.moc" - - diff -Nru kdepim-runtime-4.12.3/resources/imap/removecollectiontask.h kdepim-runtime-4.12.90/resources/imap/removecollectiontask.h --- kdepim-runtime-4.12.3/resources/imap/removecollectiontask.h 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/imap/removecollectiontask.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,47 +0,0 @@ -/* - Copyright (c) 2010 Klarälvdalens Datakonsult AB, - a KDAB Group company - Author: Kevin Ottens - - 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 REMOVECOLLECTIONTASK_H -#define REMOVECOLLECTIONTASK_H - -#include "resourcetask.h" - -class RemoveCollectionTask : public ResourceTask -{ - Q_OBJECT - -public: - explicit RemoveCollectionTask( ResourceStateInterface::Ptr resource, QObject *parent = 0 ); - virtual ~RemoveCollectionTask(); - -private slots: - void onCloseDone(KJob*); - void onDeleteDone( KJob *job ); - -protected: - virtual void doStart( KIMAP::Session *session ); - -private: - void doDelete( KIMAP::Session *session ); - -}; - -#endif diff -Nru kdepim-runtime-4.12.3/resources/imap/removeitemstask.cpp kdepim-runtime-4.12.90/resources/imap/removeitemstask.cpp --- kdepim-runtime-4.12.3/resources/imap/removeitemstask.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/imap/removeitemstask.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -97,6 +97,5 @@ } } -#include "removeitemstask.moc" diff -Nru kdepim-runtime-4.12.3/resources/imap/resourcestate.cpp kdepim-runtime-4.12.90/resources/imap/resourcestate.cpp --- kdepim-runtime-4.12.3/resources/imap/resourcestate.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/imap/resourcestate.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -29,6 +29,7 @@ #include "timestampattribute.h" #include +#include #include ResourceStateInterface::Ptr ResourceState::createRetrieveItemState( ImapResource *resource, @@ -198,6 +199,16 @@ return ResourceStateInterface::Ptr( state ); } +ResourceStateInterface::Ptr ResourceState::createSearchState( ImapResource *resource, + const Akonadi::Collection &collection ) +{ + ResourceState *state = new ResourceState( resource ); + + state->m_collection = collection; + + return ResourceStateInterface::Ptr( state ); +} + ResourceState::ResourceState( ImapResource *resource ) : m_resource( resource ) @@ -406,6 +417,13 @@ m_resource->changeProcessed(); } +void ResourceState::searchFinished( const QVector &result, bool isRid ) +{ + m_resource->searchFinished( result, isRid ? Akonadi::AgentSearchInterface::Rid : + Akonadi::AgentSearchInterface::Uid ); +} + + void ResourceState::cancelTask( const QString &errorString ) { m_resource->cancelTask( errorString ); diff -Nru kdepim-runtime-4.12.3/resources/imap/resourcestate.h kdepim-runtime-4.12.90/resources/imap/resourcestate.h --- kdepim-runtime-4.12.3/resources/imap/resourcestate.h 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/imap/resourcestate.h 2014-03-13 08:12:29.000000000 +0000 @@ -84,6 +84,10 @@ static ResourceStateInterface::Ptr createIdleState( ImapResource *resource, const Akonadi::Collection &collection ); + + static ResourceStateInterface::Ptr createSearchState( ImapResource *resource, + const Akonadi::Collection &collection ); + private: explicit ResourceState( ImapResource *resource ); public: @@ -137,6 +141,8 @@ virtual void changeProcessed(); + virtual void searchFinished( const QVector &result, bool isRid = true ); + virtual void cancelTask( const QString &errorString ); virtual void deferTask(); virtual void taskDone(); diff -Nru kdepim-runtime-4.12.3/resources/imap/resourcestateinterface.h kdepim-runtime-4.12.90/resources/imap/resourcestateinterface.h --- kdepim-runtime-4.12.3/resources/imap/resourcestateinterface.h 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/imap/resourcestateinterface.h 2014-03-13 08:12:29.000000000 +0000 @@ -67,8 +67,6 @@ virtual void setIdleCollection( const Akonadi::Collection &collection ) = 0; virtual void applyCollectionChanges( const Akonadi::Collection &collection ) = 0; - virtual void collectionAttributesRetrieved( const Akonadi::Collection &collection ) = 0; - virtual void itemRetrieved( const Akonadi::Item &item ) = 0; virtual void itemsRetrieved( const Akonadi::Item::List &items ) = 0; @@ -85,6 +83,8 @@ virtual void changeProcessed() = 0; + virtual void searchFinished( const QVector &result, bool isRid = true ) = 0; + virtual void cancelTask( const QString &errorString ) = 0; virtual void deferTask() = 0; virtual void taskDone() = 0; diff -Nru kdepim-runtime-4.12.3/resources/imap/resourcetask.cpp kdepim-runtime-4.12.90/resources/imap/resourcetask.cpp --- kdepim-runtime-4.12.3/resources/imap/resourcetask.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/imap/resourcetask.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -245,12 +245,6 @@ m_resource->applyCollectionChanges( collection ); } -void ResourceTask::collectionAttributesRetrieved( const Akonadi::Collection &collection ) -{ - m_resource->collectionAttributesRetrieved( collection ); - deleteLater(); -} - void ResourceTask::itemRetrieved( const Akonadi::Item &item ) { m_resource->itemRetrieved( item ); @@ -287,6 +281,12 @@ deleteLater(); } +void ResourceTask::searchFinished( const QVector &result, bool isRid ) +{ + m_resource->searchFinished( result, isRid ); + deleteLater(); +} + void ResourceTask::collectionsRetrieved( const Akonadi::Collection::List &collections ) { m_resource->collectionsRetrieved( collections ); @@ -463,4 +463,3 @@ } -#include "resourcetask.moc" diff -Nru kdepim-runtime-4.12.3/resources/imap/resourcetask.h kdepim-runtime-4.12.90/resources/imap/resourcetask.h --- kdepim-runtime-4.12.3/resources/imap/resourcetask.h 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/imap/resourcetask.h 2014-03-13 08:12:29.000000000 +0000 @@ -92,8 +92,6 @@ void setIdleCollection( const Akonadi::Collection &collection ); void applyCollectionChanges( const Akonadi::Collection &collection ); - void collectionAttributesRetrieved( const Akonadi::Collection &collection ); - void itemRetrieved( const Akonadi::Item &item ); void itemsRetrieved( const Akonadi::Item::List &items ); @@ -110,6 +108,8 @@ void changeProcessed(); + void searchFinished( const QVector &result, bool isRid = true ); + void cancelTask( const QString &errorString ); void deferTask(); void taskDone(); diff -Nru kdepim-runtime-4.12.3/resources/imap/retrievecollectionmetadatatask.cpp kdepim-runtime-4.12.90/resources/imap/retrievecollectionmetadatatask.cpp --- kdepim-runtime-4.12.3/resources/imap/retrievecollectionmetadatatask.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/imap/retrievecollectionmetadatatask.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -39,10 +39,8 @@ #include "noselectattribute.h" #include "timestampattribute.h" -const uint RetrieveCollectionMetadataTask::TimestampTimeout = 3600 * 24 * 20; // 20 days - RetrieveCollectionMetadataTask::RetrieveCollectionMetadataTask( ResourceStateInterface::Ptr resource, QObject *parent ) - : ResourceTask( CancelIfNoSession, resource, parent ), m_isSpontaneous( true ), + : ResourceTask( CancelIfNoSession, resource, parent ), m_pendingMetaDataJobs( 0 ), m_collectionChanged( false ) { } @@ -51,16 +49,6 @@ { } -bool RetrieveCollectionMetadataTask::isSpontaneous() const -{ - return m_isSpontaneous; -} - -void RetrieveCollectionMetadataTask::setSpontaneous( bool spontaneous ) -{ - m_isSpontaneous = spontaneous; -} - void RetrieveCollectionMetadataTask::doStart( KIMAP::Session *session ) { kDebug( 5327 ) << collection().remoteId(); @@ -70,26 +58,7 @@ NoSelectAttribute* noselect = static_cast( collection().attribute( "noselect" ) ); if ( noselect->noSelect() ) { kDebug( 5327 ) << "No Select folder"; - endTask(); - return; - } - } - - // Evaluate timestamps only if this task is spontaneous (triggered from within the resource) - if ( m_isSpontaneous ) { - uint timestamp = 0; - const uint currentTimestamp = QDateTime::currentDateTime().toTime_t(); - - if ( collection().hasAttribute() ) { - timestamp = collection().attribute()->timestamp(); - } else { - m_collectionChanged = true; - } - - // Refresh only if we're older than twenty days - if ( timestamp + TimestampTimeout > currentTimestamp ) { - kDebug( 5327 ) << "Not refreshing because of timestamp"; - endTask(); + taskDone(); return; } } @@ -106,7 +75,7 @@ meta->setMailBox( mailBox ); if ( capabilities.contains( QLatin1String("METADATA") ) ) { meta->setServerCapability( KIMAP::MetaDataJobBase::Metadata ); - meta->addEntry( "/shared" ); + meta->addRequestedEntry( "/shared" ); meta->setDepth( KIMAP::GetMetaDataJob::AllLevels ); } else { meta->setServerCapability( KIMAP::MetaDataJobBase::Annotatemore ); @@ -144,7 +113,7 @@ // the server does not have any of the capabilities needed to get extra info, so this // step is done here if ( m_pendingMetaDataJobs == 0 ) { - endTask(); + taskDone(); } } @@ -156,40 +125,20 @@ } KIMAP::GetMetaDataJob *meta = qobject_cast( job ); - QMap > rawAnnotations = meta->allMetaData( meta->mailBox() ); - - QMap annotations; - QByteArray attribute = ""; - if ( meta->serverCapability() == KIMAP::MetaDataJobBase::Annotatemore ) { - attribute = "value.shared"; - } - - foreach ( const QByteArray &entry, rawAnnotations.keys() ) { //krazy:exclude=foreach - QByteArray annotation = entry; - if ( meta->serverCapability() == KIMAP::MetaDataJobBase::Metadata ) { - // Convert the annotations to the same style as used with ANNOTATEMORE, without the /shared prefix - // We're currently only supporting shared annotations, so this keeps things working for now. - if ( annotation.startsWith( "/shared/" ) ) { - annotation.remove( 0, QByteArray( "/shared" ).size() ); - } else { - //Since we're only fetching /shared annotations, only the empty "/shared" entry should match here - continue; - } - } - annotations[annotation] = rawAnnotations[entry][attribute]; - } + QMap rawAnnotations = meta->allMetaData(); // filter out unused and annoying Cyrus annotation /vendor/cmu/cyrus-imapd/lastupdate // which contains the current date and time and thus constantly changes for no good // reason which triggers a change notification and thus a bunch of Akonadi operations - annotations.remove( "/vendor/cmu/cyrus-imapd/lastupdate" ); + rawAnnotations.remove( "/shared/vendor/cmu/cyrus-imapd/lastupdate" ); + rawAnnotations.remove( "/private/vendor/cmu/cyrus-imapd/lastupdate" ); // Store the mailbox metadata Akonadi::CollectionAnnotationsAttribute *annotationsAttribute = m_collection.attribute( Akonadi::Collection::AddIfMissing ); const QMap oldAnnotations = annotationsAttribute->annotations(); - if ( oldAnnotations != annotations ) { - annotationsAttribute->setAnnotations( annotations ); + if ( oldAnnotations != rawAnnotations ) { + annotationsAttribute->setAnnotations( rawAnnotations ); m_collectionChanged = true; } @@ -362,24 +311,9 @@ TimestampAttribute *attr = m_collection.attribute( Akonadi::Collection::AddIfMissing ); attr->setTimestamp( currentTimestamp ); - if ( m_isSpontaneous ) { - applyCollectionChanges( m_collection ); - } + applyCollectionChanges( m_collection ); } - endTask(); - } -} - -void RetrieveCollectionMetadataTask::endTask() -{ - if ( m_isSpontaneous ) { taskDone(); - } else { - collectionAttributesRetrieved( m_collection ); } } - -#include "retrievecollectionmetadatatask.moc" - - diff -Nru kdepim-runtime-4.12.3/resources/imap/retrievecollectionmetadatatask.h kdepim-runtime-4.12.90/resources/imap/retrievecollectionmetadatatask.h --- kdepim-runtime-4.12.3/resources/imap/retrievecollectionmetadatatask.h 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/imap/retrievecollectionmetadatatask.h 2014-03-13 08:12:29.000000000 +0000 @@ -29,14 +29,9 @@ Q_OBJECT public: - static const uint TimestampTimeout; - explicit RetrieveCollectionMetadataTask( ResourceStateInterface::Ptr resource, QObject *parent = 0 ); virtual ~RetrieveCollectionMetadataTask(); - bool isSpontaneous() const; - void setSpontaneous( bool spontaneous ); - private slots: void onGetMetaDataDone( KJob *job ); void onGetAclDone( KJob *job ); @@ -48,9 +43,7 @@ private: void endTaskIfNeeded(); - void endTask(); - bool m_isSpontaneous; int m_pendingMetaDataJobs; bool m_collectionChanged; diff -Nru kdepim-runtime-4.12.3/resources/imap/retrievecollectionstask.cpp kdepim-runtime-4.12.90/resources/imap/retrievecollectionstask.cpp --- kdepim-runtime-4.12.3/resources/imap/retrievecollectionstask.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/imap/retrievecollectionstask.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -232,6 +232,5 @@ } } -#include "retrievecollectionstask.moc" diff -Nru kdepim-runtime-4.12.3/resources/imap/retrieveitemstask.cpp kdepim-runtime-4.12.90/resources/imap/retrieveitemstask.cpp --- kdepim-runtime-4.12.3/resources/imap/retrieveitemstask.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/imap/retrieveitemstask.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -171,9 +171,14 @@ const int messageCount = select->messageCount(); const qint64 uidValidity = select->uidValidity(); const qint64 nextUid = select->nextUid(); - const quint64 highestModSeq = select->highestModSequence(); + quint64 highestModSeq = select->highestModSequence(); const QList flags = select->permanentFlags(); + //The select job retrieves highestmodset whenever it's available, but in case of no CONDSTORE support we ignore it + if( !serverCapabilities().contains( QLatin1String( "CONDSTORE" )) ) { + highestModSeq = 0; + } + // uidvalidity can change between sessions, we don't want to refetch // folders in that case. Keep track of what is processed and what not. static QStringList processed; @@ -361,7 +366,9 @@ KIMAP::FetchJob::FetchScope scope; scope.parts.clear(); scope.mode = KIMAP::FetchJob::FetchScope::Flags; - scope.changedSince = highestModSeq; + if(serverCapabilities().contains( QLatin1String( "CONDSTORE" ))) { + scope.changedSince = highestModSeq; + } KIMAP::FetchJob* fetch = new KIMAP::FetchJob( m_session ); fetch->setSequenceSet( set ); @@ -521,6 +528,5 @@ return highestModSeq; } -#include "retrieveitemstask.moc" diff -Nru kdepim-runtime-4.12.3/resources/imap/retrieveitemtask.cpp kdepim-runtime-4.12.90/resources/imap/retrieveitemtask.cpp --- kdepim-runtime-4.12.3/resources/imap/retrieveitemtask.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/imap/retrieveitemtask.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -138,6 +138,5 @@ } -#include "retrieveitemtask.moc" diff -Nru kdepim-runtime-4.12.3/resources/imap/searchtask.cpp kdepim-runtime-4.12.90/resources/imap/searchtask.cpp --- kdepim-runtime-4.12.3/resources/imap/searchtask.cpp 1970-01-01 00:00:00.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/imap/searchtask.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -0,0 +1,223 @@ +/* + * Copyright 2013 Daniel Vrátil + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of + * the License or (at your option) version 3 or any later version + * accepted by the membership of KDE e.V. (or its successor approved + * by the membership of KDE e.V.), which shall act as a proxy + * defined in Section 14 of version 3 of the license. + * + * 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 General Public License + * along with this program. If not, see . + * + */ + +#include "searchtask.h" +#include +#include +#include +#include +#include +#include + +Q_DECLARE_METATYPE( KIMAP::Session* ) + +SearchTask::SearchTask( ResourceStateInterface::Ptr state, const QString &query, QObject *parent) + : ResourceTask( ResourceTask::DeferIfNoSession, state, parent) + , m_query( query ) +{ +} + +SearchTask::~SearchTask() +{ +} + +void SearchTask::doStart( KIMAP::Session *session ) +{ + kDebug() << collection().remoteId(); + + const QString mailbox = mailBoxForCollection( collection() ); + if ( session->selectedMailBox() == mailbox ) { + doSearch( session ); + return; + } + + KIMAP::SelectJob *select = new KIMAP::SelectJob( session ); + select->setMailBox( mailbox ); + connect( select, SIGNAL(finished(KJob*)), + this, SLOT(onSelectDone(KJob*)) ); + select->start(); +} + +void SearchTask::onSelectDone( KJob *job ) +{ + if ( job->error() ) { + searchFinished( QVector() ); + cancelTask( job->errorText() ); + return; + } + + doSearch( qobject_cast( job )->session() ); +} + +static KIMAP::Term::Relation mapRelation(Akonadi::SearchTerm::Relation relation) { + if (relation == Akonadi::SearchTerm::RelAnd){ + return KIMAP::Term::And; + } + return KIMAP::Term::Or; +} + +static KIMAP::Term recursiveEmailTermMapping(const Akonadi::SearchTerm &term) +{ + if (!term.subTerms().isEmpty()) { + QVector subterms; + Q_FOREACH (const Akonadi::SearchTerm &subterm, term.subTerms()) { + const KIMAP::Term newTerm = recursiveEmailTermMapping(subterm); + if (!newTerm.isNull()) { + subterms << newTerm; + } + } + return KIMAP::Term(mapRelation(term.relation()), subterms); + } else { + const Akonadi::EmailSearchTerm::EmailSearchField field = Akonadi::EmailSearchTerm::fromKey(term.key()); + switch (field) { + case Akonadi::EmailSearchTerm::Message: + return KIMAP::Term(KIMAP::Term::Text, term.value().toString()).setNegated(term.isNegated()); + case Akonadi::EmailSearchTerm::Body: + return KIMAP::Term(KIMAP::Term::Body, term.value().toString()).setNegated(term.isNegated()); + case Akonadi::EmailSearchTerm::Headers: + //FIXME +// return KIMAP::Term(KIMAP::Term::Header, term.value()).setNegated(term.isNegated()); + break; + case Akonadi::EmailSearchTerm::ByteSize: { + int value = term.value().toInt(); + switch (term.condition()) { + case Akonadi::SearchTerm::CondGreaterOrEqual: + value--; + case Akonadi::SearchTerm::CondGreaterThan: + return KIMAP::Term(KIMAP::Term::Larger, value).setNegated(term.isNegated()); + case Akonadi::SearchTerm::CondLessOrEqual: + value++; + case Akonadi::SearchTerm::CondLessThan: + return KIMAP::Term(KIMAP::Term::Smaller, value).setNegated(term.isNegated()); + case Akonadi::SearchTerm::CondEqual: + return KIMAP::Term(KIMAP::Term::And, QVector() << KIMAP::Term(KIMAP::Term::Smaller, value + 1) << KIMAP::Term(KIMAP::Term::Larger, value + 1)).setNegated(term.isNegated()); + case Akonadi::SearchTerm::CondContains: + kDebug()<<" invalid condition for ByteSize"; + break; + } + } + break; + case Akonadi::EmailSearchTerm::HeaderOnlyDate: + case Akonadi::EmailSearchTerm::HeaderDate: { + QDate value = term.value().toDateTime().date(); + switch (term.condition()) { + case Akonadi::SearchTerm::CondGreaterOrEqual: + value = value.addDays(-1); + case Akonadi::SearchTerm::CondGreaterThan: + return KIMAP::Term(KIMAP::Term::SentSince, value).setNegated(term.isNegated()); + case Akonadi::SearchTerm::CondLessOrEqual: + value = value.addDays(1); + case Akonadi::SearchTerm::CondLessThan: + return KIMAP::Term(KIMAP::Term::SentBefore, value).setNegated(term.isNegated()); + case Akonadi::SearchTerm::CondEqual: + return KIMAP::Term(KIMAP::Term::SentOn, value).setNegated(term.isNegated()); + case Akonadi::SearchTerm::CondContains: + kDebug()<<" invalid condition for Date"; + break; + } + } + case Akonadi::EmailSearchTerm::Subject: + return KIMAP::Term(KIMAP::Term::Subject, term.value().toString()).setNegated(term.isNegated()); + case Akonadi::EmailSearchTerm::HeaderFrom: + return KIMAP::Term(KIMAP::Term::From, term.value().toString()).setNegated(term.isNegated()); + case Akonadi::EmailSearchTerm::HeaderTo: + return KIMAP::Term(KIMAP::Term::To, term.value().toString()).setNegated(term.isNegated()); + case Akonadi::EmailSearchTerm::HeaderCC: + return KIMAP::Term(KIMAP::Term::Cc, term.value().toString()).setNegated(term.isNegated()); + case Akonadi::EmailSearchTerm::HeaderBCC: + return KIMAP::Term(KIMAP::Term::Bcc, term.value().toString()).setNegated(term.isNegated()); + case Akonadi::EmailSearchTerm::MessageStatus: + if (term.value().toString() == QString::fromLatin1(Akonadi::MessageFlags::Flagged)) { + return KIMAP::Term(KIMAP::Term::Flagged).setNegated(term.isNegated()); + } + if (term.value().toString() == QString::fromLatin1(Akonadi::MessageFlags::Deleted)) { + return KIMAP::Term(KIMAP::Term::Deleted).setNegated(term.isNegated()); + } + if (term.value().toString() == QString::fromLatin1(Akonadi::MessageFlags::Replied)) { + return KIMAP::Term(KIMAP::Term::Answered).setNegated(term.isNegated()); + } + if (term.value().toString() == QString::fromLatin1(Akonadi::MessageFlags::Seen)) { + return KIMAP::Term(KIMAP::Term::Seen).setNegated(term.isNegated()); + } + break; + case Akonadi::EmailSearchTerm::MessageTag: + break; + case Akonadi::EmailSearchTerm::HeaderReplyTo: + break; + case Akonadi::EmailSearchTerm::HeaderOrganization: + break; + case Akonadi::EmailSearchTerm::HeaderListId: + break; + case Akonadi::EmailSearchTerm::HeaderResentFrom: + break; + case Akonadi::EmailSearchTerm::HeaderXLoop: + break; + case Akonadi::EmailSearchTerm::HeaderXMailingList: + break; + case Akonadi::EmailSearchTerm::HeaderXSpamFlag: + break; + case Akonadi::EmailSearchTerm::Unknown: + default: + kWarning() << "unknown term " << term.key(); + } + } + return KIMAP::Term(); +} + +void SearchTask::doSearch( KIMAP::Session *session ) +{ + kDebug() << m_query; + + Akonadi::SearchQuery query = Akonadi::SearchQuery::fromJSON( m_query.toLatin1() ); + KIMAP::SearchJob *searchJob = new KIMAP::SearchJob( session ); + searchJob->setUidBased( true ); + + KIMAP::Term term = recursiveEmailTermMapping(query.term()); + if (term.isNull()) { + kWarning() << "failed to translate query " << m_query; + searchFinished( QVector() ); + cancelTask( "Invalid search" ); + return; + } + searchJob->setTerm(term); + + connect( searchJob, SIGNAL(finished(KJob*)), + this, SLOT(onSearchDone(KJob*)) ); + searchJob->start(); +} + +void SearchTask::onSearchDone( KJob* job ) +{ + if ( job->error() ) { + kWarning() << "Failed to execute search " << job->errorString(); + kDebug() << m_query; + searchFinished( QVector() ); + cancelTask( job->errorString() ); + return; + } + + KIMAP::SearchJob *searchJob = qobject_cast( job ); + const QList result = searchJob->results(); + kDebug() << result.count() << "matches"; + + searchFinished( result.toVector() ); + taskDone(); +} diff -Nru kdepim-runtime-4.12.3/resources/imap/searchtask.h kdepim-runtime-4.12.90/resources/imap/searchtask.h --- kdepim-runtime-4.12.3/resources/imap/searchtask.h 1970-01-01 00:00:00.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/imap/searchtask.h 2014-03-13 08:12:29.000000000 +0000 @@ -0,0 +1,48 @@ +/* + * Copyright 2013 Daniel Vrátil + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of + * the License or (at your option) version 3 or any later version + * accepted by the membership of KDE e.V. (or its successor approved + * by the membership of KDE e.V.), which shall act as a proxy + * defined in Section 14 of version 3 of the license. + * + * 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 General Public License + * along with this program. If not, see . + * + */ + +#ifndef SEARCHTASK_H +#define SEARCHTASK_H + +#include "resourcetask.h" + +class SearchTask : public ResourceTask +{ + Q_OBJECT + public: + SearchTask( ResourceStateInterface::Ptr state, const QString &query, QObject *parent ); + ~SearchTask(); + + protected: + virtual void doStart( KIMAP::Session *session ); + + private Q_SLOTS: + void onSelectDone( KJob *job ); + void onSearchDone( KJob *job ); + + private: + void doSearch( KIMAP::Session *session ); + + QString m_query; + +}; + +#endif // SEARCHTASK_H diff -Nru kdepim-runtime-4.12.3/resources/imap/serverinfodialog.cpp kdepim-runtime-4.12.90/resources/imap/serverinfodialog.cpp --- kdepim-runtime-4.12.3/resources/imap/serverinfodialog.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/imap/serverinfodialog.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -1,5 +1,5 @@ /* - Copyright (c) 2013 Montel Laurent + Copyright (c) 2013, 2014 Montel Laurent 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 @@ -22,7 +22,7 @@ #include "imapresource.h" #include "ui_serverinfo.h" -#include +#include ServerInfoDialog::ServerInfoDialog(ImapResource *parentResource, QWidget *parent) : KDialog(parent) diff -Nru kdepim-runtime-4.12.3/resources/imap/serverinfodialog.h kdepim-runtime-4.12.90/resources/imap/serverinfodialog.h --- kdepim-runtime-4.12.3/resources/imap/serverinfodialog.h 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/imap/serverinfodialog.h 2014-03-13 08:12:29.000000000 +0000 @@ -1,5 +1,5 @@ /* - Copyright (c) 2013 Montel Laurent + Copyright (c) 2013, 2014 Montel Laurent 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 diff -Nru kdepim-runtime-4.12.3/resources/imap/sessionpool.cpp kdepim-runtime-4.12.90/resources/imap/sessionpool.cpp --- kdepim-runtime-4.12.3/resources/imap/sessionpool.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/imap/sessionpool.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -31,8 +31,6 @@ #include #include -#include - #include "imapaccount.h" #include "passwordrequesterinterface.h" @@ -44,14 +42,13 @@ m_account( 0 ), m_passwordRequester( 0 ), m_initialConnectDone( false ), - m_pendingInitialSession( 0 ), - m_networkAccessHelper( new KPIMUtils::NetworkAccessHelper( this ) ) + m_pendingInitialSession( 0 ) { } SessionPool::~SessionPool() { - disconnect(); + disconnect( CloseSession ); } PasswordRequesterInterface *SessionPool::passwordRequester() const @@ -90,8 +87,6 @@ return false; } - m_networkAccessHelper->establishConnection(); - m_account = account; if ( m_account->authenticationMode() == KIMAP::LoginJob::GSSAPI ) { // for GSSAPI we don't have to ask for username/password, because it uses session wide tickets @@ -111,8 +106,6 @@ return; } - m_networkAccessHelper->releaseConnection(); - foreach ( KIMAP::Session *s, m_unusedPool + m_reservedPool + m_connectingPool ) { killSession( s, termination ); } @@ -224,15 +217,13 @@ { m_pendingInitialSession = 0; + QString msg; if ( m_account ) { - emit connectDone( errorCode, - i18n( "Could not connect to the IMAP-server %1.\n%2", - m_account->server(), errorMessage ) ); + msg = i18n( "Could not connect to the IMAP-server %1.\n%2", m_account->server(), errorMessage ); } else { // Can happen when we lose all ready connections while trying to establish // a new connection, for example. - emit connectDone( errorCode, - i18n( "Could not connect to the IMAP server.\n%1", errorMessage ) ); + msg = i18n( "Could not connect to the IMAP server.\n%1", errorMessage ); } if ( !m_initialConnectDone ) { @@ -246,6 +237,8 @@ } } } + //Always emit this at the end. This can call SessionPool::disconnect via ImapResource. + emit connectDone( errorCode, msg ); } void SessionPool::processPendingRequests() @@ -495,4 +488,3 @@ m_pendingInitialSession = 0; } -#include "sessionpool.moc" diff -Nru kdepim-runtime-4.12.3/resources/imap/sessionpool.h kdepim-runtime-4.12.90/resources/imap/sessionpool.h --- kdepim-runtime-4.12.3/resources/imap/sessionpool.h 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/imap/sessionpool.h 2014-03-13 08:12:29.000000000 +0000 @@ -34,10 +34,6 @@ class MailBoxDescriptor; } -namespace KPIMUtils { - class NetworkAccessHelper; -} - class ImapAccount; class PasswordRequesterInterface; @@ -126,8 +122,6 @@ QStringList m_capabilities; QList m_namespaces; - - KPIMUtils::NetworkAccessHelper* m_networkAccessHelper; }; #endif diff -Nru kdepim-runtime-4.12.3/resources/imap/settings.cpp kdepim-runtime-4.12.90/resources/imap/settings.cpp --- kdepim-runtime-4.12.3/resources/imap/settings.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/imap/settings.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -315,4 +315,3 @@ } } -#include "settings.moc" diff -Nru kdepim-runtime-4.12.3/resources/imap/settingspasswordrequester.cpp kdepim-runtime-4.12.90/resources/imap/settingspasswordrequester.cpp --- kdepim-runtime-4.12.3/resources/imap/settingspasswordrequester.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/imap/settingspasswordrequester.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -90,5 +90,4 @@ } } -#include "settingspasswordrequester.moc" diff -Nru kdepim-runtime-4.12.3/resources/imap/setupserver.cpp kdepim-runtime-4.12.90/resources/imap/setupserver.cpp --- kdepim-runtime-4.12.3/resources/imap/setupserver.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/imap/setupserver.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -32,13 +32,8 @@ #include "settings.h" #include "imapresource.h" #include "serverinfodialog.h" +#include "resources/folderarchivesettings/folderarchivesettingpage.h" -#include -#include -#include -#include -#include -#include #include #include @@ -131,6 +126,8 @@ { Settings::self()->setWinId( parent ); m_ui->setupUi( mainWidget() ); + m_folderArchiveSettingPage = new FolderArchiveSettingPage(m_parentResource->identifier()); + m_ui->tabWidget->addTab(m_folderArchiveSettingPage, i18n("Folder Archive")); m_ui->safeImapGroup->setId( m_ui->noRadio, KIMAP::LoginJob::Unencrypted ); m_ui->safeImapGroup->setId( m_ui->sslRadio, KIMAP::LoginJob::AnySslVersion ); m_ui->safeImapGroup->setId( m_ui->tlsRadio, KIMAP::LoginJob::TlsV1 ); @@ -258,6 +255,7 @@ void SetupServer::applySettings() { + m_folderArchiveSettingPage->writeSettings(); m_shouldClearCache = ( Settings::self()->imapServer() != m_ui->imapServer->text() ) || ( Settings::self()->userName() != m_ui->userName->text() ); @@ -339,6 +337,7 @@ void SetupServer::readSettings() { + m_folderArchiveSettingPage->loadSettings(); m_ui->accountName->setText( m_parentResource->name() ); m_oldResourceName = m_ui->accountName->text(); @@ -659,4 +658,3 @@ -#include "setupserver.moc" diff -Nru kdepim-runtime-4.12.3/resources/imap/setupserver.h kdepim-runtime-4.12.90/resources/imap/setupserver.h --- kdepim-runtime-4.12.3/resources/imap/setupserver.h 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/imap/setupserver.h 2014-03-13 08:12:29.000000000 +0000 @@ -42,7 +42,7 @@ class IdentityCombo; class IdentityManager; } - +class FolderArchiveSettingPage; class ImapResource; /** @@ -94,6 +94,7 @@ QString m_oldResourceName; QRegExpValidator mValidator; Akonadi::Collection mOldTrash; + FolderArchiveSettingPage *m_folderArchiveSettingPage; private slots: void slotTest(); diff -Nru kdepim-runtime-4.12.3/resources/imap/subscriptiondialog.cpp kdepim-runtime-4.12.90/resources/imap/subscriptiondialog.cpp --- kdepim-runtime-4.12.3/resources/imap/subscriptiondialog.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/imap/subscriptiondialog.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -456,4 +456,3 @@ #endif } -#include "subscriptiondialog.moc" diff -Nru kdepim-runtime-4.12.3/resources/imap/subscriptiondialog.h kdepim-runtime-4.12.90/resources/imap/subscriptiondialog.h --- kdepim-runtime-4.12.3/resources/imap/subscriptiondialog.h 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/imap/subscriptiondialog.h 2014-03-13 08:12:29.000000000 +0000 @@ -33,7 +33,6 @@ class QStandardItemModel; class QStandardItem; -class KDescendantsProxyModel; class KLineEdit; class QCheckBox; class ImapAccount; diff -Nru kdepim-runtime-4.12.3/resources/imap/tests/CMakeLists.txt kdepim-runtime-4.12.90/resources/imap/tests/CMakeLists.txt --- kdepim-runtime-4.12.3/resources/imap/tests/CMakeLists.txt 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/imap/tests/CMakeLists.txt 2014-03-13 08:12:29.000000000 +0000 @@ -31,7 +31,7 @@ testexpungecollectiontask testmovecollectiontask testmoveitemstask - testremovecollectiontask + testremovecollectionrecursivetask testremoveitemstask testretrievecollectionmetadatatask testretrievecollectionstask diff -Nru kdepim-runtime-4.12.3/resources/imap/tests/dummypasswordrequester.cpp kdepim-runtime-4.12.90/resources/imap/tests/dummypasswordrequester.cpp --- kdepim-runtime-4.12.3/resources/imap/tests/dummypasswordrequester.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/imap/tests/dummypasswordrequester.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -81,4 +81,3 @@ } } -#include "dummypasswordrequester.moc" diff -Nru kdepim-runtime-4.12.3/resources/imap/tests/dummyresourcestate.cpp kdepim-runtime-4.12.90/resources/imap/tests/dummyresourcestate.cpp --- kdepim-runtime-4.12.3/resources/imap/tests/dummyresourcestate.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/imap/tests/dummyresourcestate.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -22,12 +22,14 @@ #include "dummyresourcestate.h" Q_DECLARE_METATYPE(QList) +Q_DECLARE_METATYPE(QVector); DummyResourceState::DummyResourceState() : m_automaticExpunge( true ), m_subscriptionEnabled( true ), m_disconnectedMode( true ), m_intervalCheckTime( -1 ) { qRegisterMetaType >(); + qRegisterMetaType >(); } DummyResourceState::~DummyResourceState() @@ -258,6 +260,11 @@ recordCall( "changeProcessed" ); } +void DummyResourceState::searchFinished( const QVector &result, bool isRid ) +{ + recordCall( "searchFinished", QVariant::fromValue( result ) ); +} + void DummyResourceState::cancelTask( const QString &errorString ) { recordCall( "cancelTask", QVariant::fromValue(errorString) ); diff -Nru kdepim-runtime-4.12.3/resources/imap/tests/dummyresourcestate.h kdepim-runtime-4.12.90/resources/imap/tests/dummyresourcestate.h --- kdepim-runtime-4.12.3/resources/imap/tests/dummyresourcestate.h 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/imap/tests/dummyresourcestate.h 2014-03-13 08:12:29.000000000 +0000 @@ -98,6 +98,8 @@ virtual void collectionChangeCommitted( const Akonadi::Collection &collection ); + virtual void searchFinished( const QVector &result, bool isRid = true ); + virtual void changeProcessed(); virtual void cancelTask( const QString &errorString ); diff -Nru kdepim-runtime-4.12.3/resources/imap/tests/imaptestbase.cpp kdepim-runtime-4.12.90/resources/imap/tests/imaptestbase.cpp --- kdepim-runtime-4.12.3/resources/imap/tests/imaptestbase.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/imap/tests/imaptestbase.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -135,4 +135,3 @@ } -#include "imaptestbase.moc" diff -Nru kdepim-runtime-4.12.3/resources/imap/tests/testaddcollectiontask.cpp kdepim-runtime-4.12.90/resources/imap/tests/testaddcollectiontask.cpp --- kdepim-runtime-4.12.3/resources/imap/tests/testaddcollectiontask.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/imap/tests/testaddcollectiontask.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -20,6 +20,7 @@ #include "imaptestbase.h" #include "addcollectiontask.h" +#include class TestAddCollectionTask : public ImapTestBase { @@ -92,6 +93,30 @@ QTest::newRow( "folder with non-standard separator") << parentCollection << collection << scenario << callNames << "Foo" << ".Foo"; + + parentCollection = createCollectionChain( QLatin1String("/INBOX/Foo") ); + collection = Akonadi::Collection( 4 ); + collection.setName( QLatin1String("Bar") ); + collection.setParentCollection( parentCollection ); + Akonadi::CollectionAnnotationsAttribute *attr = collection.attribute( Akonadi::Collection::AddIfMissing ); + QMap annotations; + annotations.insert( "/shared/vendor/foobar/foo", "value" ); + attr->setAnnotations( annotations ); + + scenario.clear(); + scenario << defaultPoolConnectionScenario() + << "C: A000003 CREATE \"INBOX/Foo/Bar\"" + << "S: A000003 OK create done" + << "C: A000004 SUBSCRIBE \"INBOX/Foo/Bar\"" + << "S: A000004 OK subscribe done" + << "C: A000005 SETMETADATA \"INBOX/Foo/Bar\" (\"/shared/vendor/foobar/foo\" {5}\r\nvalue)" + << "S: A000005 OK SETMETADATA complete"; + + callNames.clear(); + callNames << QLatin1String("collectionChangeCommitted"); + + QTest::newRow( "folder with annotations" ) << parentCollection << collection << scenario << callNames + << collection.name() << "/Bar"; } void shouldCreateAndSubscribe() @@ -116,11 +141,13 @@ DummyResourceState::Ptr state = DummyResourceState::Ptr(new DummyResourceState); state->setParentCollection( parentCollection ); state->setCollection( collection ); + if (collection.hasAttribute()) { + state->setServerCapabilities( QStringList() << "METADATA" ); + } AddCollectionTask *task = new AddCollectionTask( state ); task->start( &pool ); - QTest::qWait( 100 ); - QCOMPARE( state->calls().count(), callNames.size() ); + QTRY_COMPARE( state->calls().count(), callNames.size() ); for ( int i = 0; i < callNames.size(); i++ ) { QString command = QString::fromUtf8( state->calls().at( i ).first ); QVariant parameter = state->calls().at( i ).second; diff -Nru kdepim-runtime-4.12.3/resources/imap/tests/testadditemtask.cpp kdepim-runtime-4.12.90/resources/imap/tests/testadditemtask.cpp --- kdepim-runtime-4.12.3/resources/imap/tests/testadditemtask.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/imap/tests/testadditemtask.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -156,9 +156,8 @@ state->setItem( item ); AddItemTask *task = new AddItemTask( state ); task->start( &pool ); - QTest::qWait( 100 ); - QCOMPARE( state->calls().count(), callNames.size() ); + QTRY_COMPARE( state->calls().count(), callNames.size() ); for ( int i = 0; i < callNames.size(); i++ ) { QString command = QString::fromUtf8( state->calls().at( i ).first ); QVariant parameter = state->calls().at( i ).second; diff -Nru kdepim-runtime-4.12.3/resources/imap/tests/testchangecollectiontask.cpp kdepim-runtime-4.12.90/resources/imap/tests/testchangecollectiontask.cpp --- kdepim-runtime-4.12.3/resources/imap/tests/testchangecollectiontask.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/imap/tests/testchangecollectiontask.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -38,12 +38,13 @@ QTest::addColumn< QList >( "scenario" ); QTest::addColumn( "callNames" ); QTest::addColumn( "collectionName" ); - QTest::addColumn( "supportsAnnotations" ); + QTest::addColumn( "caps" ); Akonadi::Collection collection; QSet parts; QList scenario; QStringList callNames; + QStringList caps; collection = createCollectionChain( QLatin1String("/Foo") ); collection.setName( QLatin1String("Bar") ); @@ -71,6 +72,8 @@ parts << "NAME" << "AccessRights" << "imapacl" << "collectionannotations"; + caps << "ACL" << "ANNOTATEMORE"; + scenario.clear(); scenario << defaultPoolConnectionScenario() << "C: A000003 SETACL \"Foo\" \"test@kdab.com\" \"lrswipckxtda\"" @@ -91,8 +94,10 @@ callNames.clear(); callNames << QLatin1String("collectionChangeCommitted"); - QTest::newRow( "complete case" ) << collection << parts << scenario << callNames << collection.name() << true; + QTest::newRow( "complete case" ) << collection << parts << scenario << callNames << collection.name() << caps; + caps.clear(); + caps << "ACL"; scenario.clear(); scenario << defaultPoolConnectionScenario() << "C: A000003 SETACL \"Foo\" \"test@kdab.com\" \"lrswipckxtda\"" @@ -105,10 +110,12 @@ << "S: A000006 OK rename done" << "C: A000007 SUBSCRIBE \"Bar\"" << "S: A000007 OK mailbox subscribed"; - QTest::newRow( "no ANNOTATEMORE support" ) << collection << parts << scenario << callNames << collection.name() << false; + QTest::newRow( "no ANNOTATEMORE support" ) << collection << parts << scenario << callNames << collection.name() << caps; collection = createCollectionChain( QLatin1String("/Foo") ); collection.setName( QLatin1String("Bar/Baz") ); + caps.clear(); + caps << "ACL" << "ANNOTATEMORE"; scenario.clear(); scenario << defaultPoolConnectionScenario() << "C: A000003 RENAME \"Foo\" \"BarBaz\"" @@ -120,7 +127,7 @@ callNames.clear(); callNames << QLatin1String("collectionChangeCommitted"); QTest::newRow( "rename with invalid separator" ) << collection << parts << scenario << callNames - << "BarBaz" << true; + << "BarBaz" << caps; collection = createCollectionChain( QLatin1String(".INBOX.Foo") ); collection.setName( QLatin1String("Bar") ); @@ -131,7 +138,51 @@ << "C: A000004 SUBSCRIBE \"INBOX.Bar\"" << "S: A000004 OK mailbox subscribed"; QTest::newRow( "rename with non-standard separator" ) << collection << parts << scenario << callNames - << "Bar" << true; + << "Bar" << caps; + + collection = createCollectionChain( QLatin1String("/Foo") ); + collection.setName( QLatin1String("Bar") ); + collection.setRights( Akonadi::Collection::AllRights ); + + acls = new Akonadi::ImapAclAttribute; + // Old rights + rights["test@kdab.com"] = KIMAP::Acl::rightsFromString( "lrswipckxtda" ); + rights["foo@kde.org"] = KIMAP::Acl::rightsFromString( "lrswipcda" ); + acls->setRights( rights ); + + // New rights + rights["test@kdab.com"] = KIMAP::Acl::rightsFromString( "lrswipckxtda" ); + rights["foo@kde.org"] = KIMAP::Acl::rightsFromString( "lrswipcda" ); + acls->setRights( rights ); + collection.addAttribute( acls ); + + annotationsAttr = new Akonadi::CollectionAnnotationsAttribute; + annotations["/vendor/kolab/folder-test"] = "false"; + annotations["/vendor/kolab/folder-test2"] = "true"; + annotationsAttr->setAnnotations( annotations ); + collection.addAttribute( annotationsAttr ); + + parts << "NAME" << "AccessRights" << "imapacl" << "collectionannotations"; + + caps << "ACL" << "METADATA"; + + scenario.clear(); + scenario << defaultPoolConnectionScenario() + << "C: A000003 SETACL \"Foo\" \"test@kdab.com\" \"lrswipckxtda\"" + << "S: A000003 OK acl changed" + << "C: A000004 SETMETADATA \"Foo\" (\"/shared/vendor/kolab/folder-test\" {5}\r\nfalse)" + << "S: A000004 OK SETMETADATA complete" + << "C: A000005 SETMETADATA \"Foo\" (\"/shared/vendor/kolab/folder-test2\" {4}\r\ntrue)" + << "S: A000005 OK SETMETADATA complete" + << "C: A000006 SETACL \"Foo\" \"foo@kde.org\" \"lrswipcda\"" + << "S: A000006 OK acl changed" + << "C: A000007 SETACL \"Foo\" \"test@kdab.com\" \"lrswipckxtda\"" + << "S: A000007 OK acl changed" + << "C: A000008 RENAME \"Foo\" \"Bar\"" + << "S: A000008 OK rename done" + << "C: A000009 SUBSCRIBE \"Bar\"" + << "S: A000009 OK mailbox subscribed"; + QTest::newRow( "complete case METADATA" ) << collection << parts << scenario << callNames << collection.name() << caps; } void shouldUpdateMetadataAclAndName() @@ -141,7 +192,7 @@ QFETCH( QList, scenario ); QFETCH( QStringList, callNames ); QFETCH( QString, collectionName ); - QFETCH( bool, supportsAnnotations ); + QFETCH( QStringList, caps ); FakeServer server; server.setScenario( scenario ); @@ -153,11 +204,6 @@ QVERIFY( pool.connect( createDefaultAccount() ) ); QVERIFY( waitForSignal( &pool, SIGNAL(connectDone(int,QString)) ) ); - QStringList caps; - caps << QLatin1String( "ACL" ); - if ( supportsAnnotations ) { - caps << QLatin1String( "ANNOTATEMORE" ); - } DummyResourceState::Ptr state = DummyResourceState::Ptr( new DummyResourceState ); state->setUserName( defaultUserName() ); state->setServerCapabilities( caps ); @@ -165,9 +211,8 @@ state->setParts( parts ); ChangeCollectionTask *task = new ChangeCollectionTask( state ); task->start( &pool ); - QTest::qWait( 100 ); - QCOMPARE( state->calls().count(), callNames.size() ); + QTRY_COMPARE( state->calls().count(), callNames.size() ); for ( int i = 0; i < callNames.size(); i++ ) { QString command = QString::fromUtf8(state->calls().at( i ).first); QVariant parameter = state->calls().at( i ).second; diff -Nru kdepim-runtime-4.12.3/resources/imap/tests/testchangeitemtask.cpp kdepim-runtime-4.12.90/resources/imap/tests/testchangeitemtask.cpp --- kdepim-runtime-4.12.3/resources/imap/tests/testchangeitemtask.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/imap/tests/testchangeitemtask.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -190,9 +190,8 @@ state->setItem( item ); ChangeItemTask *task = new ChangeItemTask( state ); task->start( &pool ); - QTest::qWait( 100 ); - QCOMPARE( state->calls().count(), callNames.size() ); + QTRY_COMPARE( state->calls().count(), callNames.size() ); for ( int i = 0; i < callNames.size(); i++ ) { QString command = QString::fromUtf8(state->calls().at( i ).first); QVariant parameter = state->calls().at( i ).second; diff -Nru kdepim-runtime-4.12.3/resources/imap/tests/testexpungecollectiontask.cpp kdepim-runtime-4.12.90/resources/imap/tests/testexpungecollectiontask.cpp --- kdepim-runtime-4.12.3/resources/imap/tests/testexpungecollectiontask.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/imap/tests/testexpungecollectiontask.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -100,9 +100,8 @@ state->setCollection( collection ); ExpungeCollectionTask *task = new ExpungeCollectionTask( state ); task->start( &pool ); - QTest::qWait( 100 ); - QCOMPARE( state->calls().count(), callNames.size() ); + QTRY_COMPARE( state->calls().count(), callNames.size() ); for ( int i = 0; i < callNames.size(); i++ ) { QString command = QString::fromUtf8(state->calls().at( i ).first); QVariant parameter = state->calls().at( i ).second; diff -Nru kdepim-runtime-4.12.3/resources/imap/tests/testmovecollectiontask.cpp kdepim-runtime-4.12.90/resources/imap/tests/testmovecollectiontask.cpp --- kdepim-runtime-4.12.3/resources/imap/tests/testmovecollectiontask.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/imap/tests/testmovecollectiontask.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -69,8 +69,37 @@ QTest::newRow( "moving mailbox" ) << collection << source << target << scenario << callNames; + { + const Akonadi::Collection toplevel = createCollectionChain( QLatin1String("/Bar") ); + scenario.clear(); + scenario << defaultPoolConnectionScenario() + << "C: A000003 RENAME \"Bar\" \"INBOX/Bar\"" + << "S: A000003 OK rename done" + << "C: A000004 SUBSCRIBE \"INBOX/Bar\"" + << "S: A000004 OK subscribe done"; + + callNames.clear(); + callNames << "collectionChangeCommitted"; + + QTest::newRow( "move mailbox from toplevel" ) << toplevel << root << inbox << scenario << callNames; + } + + { + const Akonadi::Collection toplevel = createCollectionChain( QLatin1String("/INBOX/Bar") ); + + scenario.clear(); + scenario << defaultPoolConnectionScenario() + << "C: A000003 RENAME \"INBOX/Bar\" \"Bar\"" + << "S: A000003 OK rename done" + << "C: A000004 SUBSCRIBE \"Bar\"" + << "S: A000004 OK subscribe done"; + callNames.clear(); + callNames << "collectionChangeCommitted"; + + QTest::newRow( "move mailbox to toplevel" ) << toplevel << inbox << root << scenario << callNames; + } // Same collections // The scenario changes though @@ -140,9 +169,8 @@ state->setTargetCollection( target ); MoveCollectionTask *task = new MoveCollectionTask( state ); task->start( &pool ); - QTest::qWait( 100 ); - QCOMPARE( state->calls().count(), callNames.size() ); + QTRY_COMPARE( state->calls().count(), callNames.size() ); for ( int i = 0; i < callNames.size(); i++ ) { QString command = QString::fromUtf8(state->calls().at( i ).first); QVariant parameter = state->calls().at( i ).second; diff -Nru kdepim-runtime-4.12.3/resources/imap/tests/testmoveitemstask.cpp kdepim-runtime-4.12.90/resources/imap/tests/testmoveitemstask.cpp --- kdepim-runtime-4.12.3/resources/imap/tests/testmoveitemstask.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/imap/tests/testmoveitemstask.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -235,9 +235,8 @@ state->setTargetCollection( target ); MoveItemsTask *task = new MoveItemsTask( state ); task->start( &pool ); - QTest::qWait( 100 ); - QCOMPARE( state->calls().count(), callNames.size() ); + QTRY_COMPARE( state->calls().count(), callNames.size() ); for ( int i = 0; i < callNames.size(); i++ ) { QString command = QString::fromUtf8(state->calls().at( i ).first); QVariant parameter = state->calls().at( i ).second; diff -Nru kdepim-runtime-4.12.3/resources/imap/tests/testremovecollectionrecursivetask.cpp kdepim-runtime-4.12.90/resources/imap/tests/testremovecollectionrecursivetask.cpp --- kdepim-runtime-4.12.3/resources/imap/tests/testremovecollectionrecursivetask.cpp 1970-01-01 00:00:00.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/imap/tests/testremovecollectionrecursivetask.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -0,0 +1,247 @@ +/* + Copyright (c) 2010 Klarälvdalens Datakonsult AB, a KDAB Group company + Author: Kevin Ottens + + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU 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 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 "imaptestbase.h" + +#include "removecollectionrecursivetask.h" + +class TestRemoveCollectionRecursiveTask : public ImapTestBase +{ + Q_OBJECT + + void shouldDeleteMailBoxRecursive_data() + { + QTest::addColumn( "collection" ); + QTest::addColumn< QList >( "scenario" ); + QTest::addColumn( "callNames" ); + + Akonadi::Collection collection; + QList scenario; + QStringList callNames; + + collection = createCollectionChain( QLatin1String("/INBOX/test1") ); + + scenario.clear(); + scenario << defaultPoolConnectionScenario() + << "C: A000003 LSUB \"\" *" + << "S: * LSUB ( \\HasChildren ) / INBOX" + << "S: * LSUB ( \\HasChildren ) / INBOX/test1" + << "S: * LSUB ( ) / INBOX/test1/test2" + << "S: A000003 OK Completed ( 0.000 secs 26 calls )" + << "C: A000004 SELECT \"INBOX/test1/test2\"" + << "S: * FLAGS ( \\Answered \\Flagged \\Draft \\Deleted \\Seen )" + << "S: * OK [ PERMANENTFLAGS ( \\Answered \\Flagged \\Draft \\Deleted \\Seen \\* ) ]" + << "S: * 1 EXISTS" + << "S: * 0 RECENT" + << "S: * OK [ UNSEEN 1 ]" + << "S: * OK [ UIDVALIDITY 1292857898 ]" + << "S: * OK [ UIDNEXT 2 ]" + << "S: A000004 OK Completed [ READ-WRITE ]" + << "C: A000005 STORE 1:* +FLAGS (\\DELETED)" + << "S: * 1 FETCH ( FLAGS (\\Deleted) ) " + << "S: A000005 OK Completed" + << "C: A000006 EXPUNGE" + << "S: * 1 EXPUNGE" + << "S: * 0 EXISTS" + << "S: * 0 RECENT" + << "S: A000006 OK Completed" + << "C: A000007 CLOSE" + << "S: A000007 OK Completed" + << "C: A000008 DELETE \"INBOX/test1/test2\"" + << "S: * 0 EXISTS" + << "S: * 0 RECENT" + << "S: A000008 OK Completed" + << "C: A000009 SELECT \"INBOX/test1\"" + << "S: * FLAGS ( \\Answered \\Flagged \\Draft \\Deleted \\Seen )" + << "S: * OK [ PERMANENTFLAGS ( \\Answered \\Flagged \\Draft \\Deleted \\Seen \\* ) ]" + << "S: * 1 EXISTS" + << "S: * 1 RECENT" + << "S: * OK [ UIDVALIDITY 1292857888 ]" + << "S: * OK [ UIDNEXT 2 ]" + << "S: A000009 OK Completed [ READ-WRITE ]" + << "C: A000010 STORE 1:* +FLAGS (\\DELETED)" + << "S: * 1 FETCH ( FLAGS (\\Recent \\Deleted \\Seen) )" + << "S: A000010 OK Completed" + << "C: A000011 EXPUNGE" + << "S: * 1 EXPUNGE" + << "S: * 0 EXISTS" + << "S: * 0 RECENT" + << "S: A000011 OK Completed" + << "C: A000012 CLOSE" + << "S: A000012 OK Completed" + << "C: A000013 DELETE \"INBOX/test1\"" + << "S: * 0 EXISTS" + << "S: * 0 RECENT" + << "S: A000013 OK Completed"; + callNames.clear(); + callNames << "changeProcessed"; + + QTest::newRow( "normal case" ) << collection << scenario << callNames; + + scenario.clear(); + scenario << defaultPoolConnectionScenario() + << "C: A000003 LSUB \"\" *" + << "S: * LSUB ( \\HasChildren ) / INBOX" + << "S: * LSUB ( \\HasChildren ) / INBOX/test1" + << "S: * LSUB ( ) / INBOX/test1/test2" + << "S: A000003 OK Completed ( 0.000 secs 26 calls )"; + collection.setRemoteId( "/test1" ); + collection.setParentCollection( Akonadi::Collection::root() ); + callNames.clear(); + callNames << "changeProcessed" << "emitWarning" << "synchronizeCollectionTree"; + QTest::newRow( "invalid collection" ) << collection << scenario << callNames; + + collection = createCollectionChain( QLatin1String(".INBOX.test1") ); + scenario.clear(); + scenario << defaultPoolConnectionScenario() + << "C: A000003 LSUB \"\" *" + << "S: * LSUB ( \\HasChildren ) . INBOX" + << "S: * LSUB ( \\HasChildren ) . INBOX.test1" + << "S: * LSUB ( ) . INBOX.test1.test2" + << "S: A000003 OK Completed ( 0.000 secs 26 calls )" + << "C: A000004 SELECT \"INBOX.test1.test2\"" + << "S: * FLAGS ( \\Answered \\Flagged \\Draft \\Deleted \\Seen )" + << "S: * OK [ PERMANENTFLAGS ( \\Answered \\Flagged \\Draft \\Deleted \\Seen \\* ) ]" + << "S: * 1 EXISTS" + << "S: * 0 RECENT" + << "S: * OK [ UNSEEN 1 ]" + << "S: * OK [ UIDVALIDITY 1292857898 ]" + << "S: * OK [ UIDNEXT 2 ]" + << "S: A000004 OK Completed [ READ-WRITE ]" + << "C: A000005 STORE 1:* +FLAGS (\\DELETED)" + << "S: * 1 FETCH ( FLAGS (\\Deleted) ) " + << "S: A000005 OK Completed" + << "C: A000006 EXPUNGE" + << "S: * 1 EXPUNGE" + << "S: * 0 EXISTS" + << "S: * 0 RECENT" + << "S: A000006 OK Completed" + << "C: A000007 CLOSE" + << "S: A000007 OK Completed" + << "C: A000008 DELETE \"INBOX.test1.test2\"" + << "S: * 0 EXISTS" + << "S: * 0 RECENT" + << "S: A000008 OK Completed" + << "C: A000009 SELECT \"INBOX.test1\"" + << "S: * FLAGS ( \\Answered \\Flagged \\Draft \\Deleted \\Seen )" + << "S: * OK [ PERMANENTFLAGS ( \\Answered \\Flagged \\Draft \\Deleted \\Seen \\* ) ]" + << "S: * 1 EXISTS" + << "S: * 1 RECENT" + << "S: * OK [ UIDVALIDITY 1292857888 ]" + << "S: * OK [ UIDNEXT 2 ]" + << "S: A000009 OK Completed [ READ-WRITE ]" + << "C: A000010 STORE 1:* +FLAGS (\\DELETED)" + << "S: * 1 FETCH ( FLAGS (\\Recent \\Deleted \\Seen) )" + << "S: A000010 OK Completed" + << "C: A000011 EXPUNGE" + << "S: * 1 EXPUNGE" + << "S: * 0 EXISTS" + << "S: * 0 RECENT" + << "S: A000011 OK Completed" + << "C: A000012 CLOSE" + << "S: A000012 OK Completed" + << "C: A000013 DELETE \"INBOX.test1\"" + << "S: * 0 EXISTS" + << "S: * 0 RECENT" + << "S: A000013 OK Completed"; + callNames.clear(); + callNames << "changeProcessed"; + QTest::newRow( "non-standard separator" ) << collection << scenario << callNames; + + collection = createCollectionChain( QLatin1String(".INBOX.test1") ); + scenario.clear(); + scenario << defaultPoolConnectionScenario() + << "C: A000003 LSUB \"\" *" + << "S: * LSUB ( \\HasChildren ) . INBOX" + << "S: * LSUB ( \\HasChildren ) . INBOX.test1" + << "S: * LSUB ( ) . INBOX.test1.test2" + << "S: A000003 OK Completed ( 0.000 secs 26 calls )" + << "C: A000004 SELECT \"INBOX.test1.test2\"" + << "S: * FLAGS ( \\Answered \\Flagged \\Draft \\Deleted \\Seen )" + << "S: * OK [ PERMANENTFLAGS ( \\Answered \\Flagged \\Draft \\Deleted \\Seen \\* ) ]" + << "S: * 1 EXISTS" + << "S: * 0 RECENT" + << "S: * OK [ UNSEEN 1 ]" + << "S: * OK [ UIDVALIDITY 1292857898 ]" + << "S: * OK [ UIDNEXT 2 ]" + << "S: A000004 OK Completed [ READ-WRITE ]" + << "C: A000005 STORE 1:* +FLAGS (\\DELETED)" + << "S: * 1 FETCH ( FLAGS (\\Deleted) ) " + << "S: A000005 OK Completed" + << "C: A000006 EXPUNGE" + << "S: * 1 EXPUNGE" + << "S: * 0 EXISTS" + << "S: * 0 RECENT" + << "S: A000006 OK Completed" + << "C: A000007 CLOSE" + << "S: A000007 NO Close failed"; + callNames.clear(); + callNames << "changeProcessed" << "emitWarning" << "synchronizeCollectionTree"; + QTest::newRow( "close failed" ) << collection << scenario << callNames; + } + + void shouldDeleteMailBoxRecursive() + { + QFETCH( Akonadi::Collection, collection ); + QFETCH( QList, scenario ); + QFETCH( QStringList, callNames ); + + FakeServer server; + server.setScenario( scenario ); + server.startAndWait(); + + SessionPool pool( 1 ); + + pool.setPasswordRequester( createDefaultRequester() ); + QVERIFY( pool.connect( createDefaultAccount() ) ); + QVERIFY( waitForSignal( &pool, SIGNAL(connectDone(int,QString)) ) ); + + DummyResourceState::Ptr state = DummyResourceState::Ptr( new DummyResourceState ); + state->setCollection( collection ); + RemoveCollectionRecursiveTask *task = new RemoveCollectionRecursiveTask( state ); + task->start( &pool ); + QEventLoop loop; + connect( task, SIGNAL(destroyed(QObject*)), &loop, SLOT(quit()) ); + loop.exec(); + + QCOMPARE( state->calls().count(), callNames.size() ); + for ( int i = 0; i < callNames.size(); i++ ) { + QString command = QString::fromUtf8(state->calls().at( i ).first); + QVariant parameter = state->calls().at( i ).second; + + if ( command == "cancelTask" && callNames[i] != "cancelTask" ) { + kDebug() << "Got a cancel:" << parameter.toString(); + } + + QCOMPARE( command, callNames[i] ); + + if ( command == "cancelTask" ) { + QVERIFY( !parameter.toString().isEmpty() ); + } + } + + QVERIFY( server.isAllScenarioDone() ); + + server.quit(); + } +}; + +QTEST_KDEMAIN_CORE( TestRemoveCollectionRecursiveTask ) + +#include "testremovecollectionrecursivetask.moc" diff -Nru kdepim-runtime-4.12.3/resources/imap/tests/testremovecollectiontask.cpp kdepim-runtime-4.12.90/resources/imap/tests/testremovecollectiontask.cpp --- kdepim-runtime-4.12.3/resources/imap/tests/testremovecollectiontask.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/imap/tests/testremovecollectiontask.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,345 +0,0 @@ -/* - Copyright (c) 2010 Klarälvdalens Datakonsult AB, a KDAB Group company - Author: Kevin Ottens - - This program is free software; you can redistribute it and/or - modify it under the terms of the GNU 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 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 "imaptestbase.h" - -#include "removecollectionrecursivetask.h" -#include "removecollectiontask.h" - -class TestRemoveCollectionTask : public ImapTestBase -{ - Q_OBJECT - -private slots: - void shouldDeleteMailBox_data() - { - QTest::addColumn( "collection" ); - QTest::addColumn< QList >( "scenario" ); - QTest::addColumn( "callNames" ); - QTest::addColumn( "selectedCollection" ); - - Akonadi::Collection collection; - QSet parts; - QString messageContent; - QList scenario; - QStringList callNames; - QString selectedCollection; - - collection = createCollectionChain( QLatin1String("/INBOX/Foo") ); - - scenario.clear(); - scenario << defaultPoolConnectionScenario() - << "C: A000003 DELETE \"INBOX/Foo\"" - << "S: A000003 OK delete done"; - - callNames.clear(); - callNames << "changeProcessed"; - - QTest::newRow( "normal case" ) << collection << scenario << callNames; - - - // We keep the same collection - - scenario.clear(); - scenario << defaultPoolConnectionScenario() - << "C: A000003 DELETE \"INBOX/Foo\"" - << "S: A000003 NO delete failed"; - - callNames.clear(); - callNames << "changeProcessed" << "emitWarning" << "synchronizeCollectionTree"; - - QTest::newRow( "delete failed" ) << collection << scenario << callNames; - - - collection = createCollectionChain( QLatin1String(".INBOX.Foo") ); - - scenario.clear(); - scenario << defaultPoolConnectionScenario() - << "C: A000003 DELETE \"INBOX.Foo\"" - << "S: A000003 OK delete done"; - - callNames.clear(); - callNames << "changeProcessed"; - - QTest::newRow( "non-standard separator" ) << collection << scenario << callNames; - } - - void shouldDeleteMailBox() - { - QFETCH( Akonadi::Collection, collection ); - QFETCH( QList, scenario ); - QFETCH( QStringList, callNames ); - - FakeServer server; - server.setScenario( scenario ); - server.startAndWait(); - - SessionPool pool( 1 ); - - pool.setPasswordRequester( createDefaultRequester() ); - QVERIFY( pool.connect( createDefaultAccount() ) ); - QVERIFY( waitForSignal( &pool, SIGNAL(connectDone(int,QString)) ) ); - - DummyResourceState::Ptr state = DummyResourceState::Ptr( new DummyResourceState ); - state->setCollection( collection ); - RemoveCollectionTask *task = new RemoveCollectionTask( state ); - task->start( &pool ); - QTest::qWait( 100 ); - - QCOMPARE( state->calls().count(), callNames.size() ); - for ( int i = 0; i < callNames.size(); i++ ) { - QString command = QString::fromUtf8(state->calls().at( i ).first); - QVariant parameter = state->calls().at( i ).second; - - if ( command == "cancelTask" && callNames[i] != "cancelTask" ) { - kDebug() << "Got a cancel:" << parameter.toString(); - } - - QCOMPARE( command, callNames[i] ); - - if ( command == "cancelTask" ) { - QVERIFY( !parameter.toString().isEmpty() ); - } - } - - QVERIFY( server.isAllScenarioDone() ); - - server.quit(); - } - - void shouldDeleteMailBoxRecursive_data() - { - QTest::addColumn( "collection" ); - QTest::addColumn< QList >( "scenario" ); - QTest::addColumn( "callNames" ); - - Akonadi::Collection collection; - QList scenario; - QStringList callNames; - - collection = createCollectionChain( QLatin1String("/INBOX/test1") ); - - scenario.clear(); - scenario << defaultPoolConnectionScenario() - << "C: A000003 LSUB \"\" *" - << "S: * LSUB ( \\HasChildren ) / INBOX" - << "S: * LSUB ( \\HasChildren ) / INBOX/test1" - << "S: * LSUB ( ) / INBOX/test1/test2" - << "S: A000003 OK Completed ( 0.000 secs 26 calls )" - << "C: A000004 SELECT \"INBOX/test1/test2\"" - << "S: * FLAGS ( \\Answered \\Flagged \\Draft \\Deleted \\Seen )" - << "S: * OK [ PERMANENTFLAGS ( \\Answered \\Flagged \\Draft \\Deleted \\Seen \\* ) ]" - << "S: * 1 EXISTS" - << "S: * 0 RECENT" - << "S: * OK [ UNSEEN 1 ]" - << "S: * OK [ UIDVALIDITY 1292857898 ]" - << "S: * OK [ UIDNEXT 2 ]" - << "S: A000004 OK Completed [ READ-WRITE ]" - << "C: A000005 STORE 1:* +FLAGS (\\DELETED)" - << "S: * 1 FETCH ( FLAGS (\\Deleted) ) " - << "S: A000005 OK Completed" - << "C: A000006 EXPUNGE" - << "S: * 1 EXPUNGE" - << "S: * 0 EXISTS" - << "S: * 0 RECENT" - << "S: A000006 OK Completed" - << "C: A000007 CLOSE" - << "S: A000007 OK Completed" - << "C: A000008 DELETE \"INBOX/test1/test2\"" - << "S: * 0 EXISTS" - << "S: * 0 RECENT" - << "S: A000008 OK Completed" - << "C: A000009 SELECT \"INBOX/test1\"" - << "S: * FLAGS ( \\Answered \\Flagged \\Draft \\Deleted \\Seen )" - << "S: * OK [ PERMANENTFLAGS ( \\Answered \\Flagged \\Draft \\Deleted \\Seen \\* ) ]" - << "S: * 1 EXISTS" - << "S: * 1 RECENT" - << "S: * OK [ UIDVALIDITY 1292857888 ]" - << "S: * OK [ UIDNEXT 2 ]" - << "S: A000009 OK Completed [ READ-WRITE ]" - << "C: A000010 STORE 1:* +FLAGS (\\DELETED)" - << "S: * 1 FETCH ( FLAGS (\\Recent \\Deleted \\Seen) )" - << "S: A000010 OK Completed" - << "C: A000011 EXPUNGE" - << "S: * 1 EXPUNGE" - << "S: * 0 EXISTS" - << "S: * 0 RECENT" - << "S: A000011 OK Completed" - << "C: A000012 CLOSE" - << "S: A000012 OK Completed" - << "C: A000013 DELETE \"INBOX/test1\"" - << "S: * 0 EXISTS" - << "S: * 0 RECENT" - << "S: A000013 OK Completed"; - callNames.clear(); - callNames << "changeProcessed"; - - QTest::newRow( "normal case" ) << collection << scenario << callNames; - - scenario.clear(); - scenario << defaultPoolConnectionScenario() - << "C: A000003 LSUB \"\" *" - << "S: * LSUB ( \\HasChildren ) / INBOX" - << "S: * LSUB ( \\HasChildren ) / INBOX/test1" - << "S: * LSUB ( ) / INBOX/test1/test2" - << "S: A000003 OK Completed ( 0.000 secs 26 calls )"; - collection.setRemoteId( "/test1" ); - collection.setParentCollection( Akonadi::Collection::root() ); - callNames.clear(); - callNames << "changeProcessed" << "emitWarning" << "synchronizeCollectionTree"; - QTest::newRow( "invalid collection" ) << collection << scenario << callNames; - - collection = createCollectionChain( QLatin1String(".INBOX.test1") ); - scenario.clear(); - scenario << defaultPoolConnectionScenario() - << "C: A000003 LSUB \"\" *" - << "S: * LSUB ( \\HasChildren ) . INBOX" - << "S: * LSUB ( \\HasChildren ) . INBOX.test1" - << "S: * LSUB ( ) . INBOX.test1.test2" - << "S: A000003 OK Completed ( 0.000 secs 26 calls )" - << "C: A000004 SELECT \"INBOX.test1.test2\"" - << "S: * FLAGS ( \\Answered \\Flagged \\Draft \\Deleted \\Seen )" - << "S: * OK [ PERMANENTFLAGS ( \\Answered \\Flagged \\Draft \\Deleted \\Seen \\* ) ]" - << "S: * 1 EXISTS" - << "S: * 0 RECENT" - << "S: * OK [ UNSEEN 1 ]" - << "S: * OK [ UIDVALIDITY 1292857898 ]" - << "S: * OK [ UIDNEXT 2 ]" - << "S: A000004 OK Completed [ READ-WRITE ]" - << "C: A000005 STORE 1:* +FLAGS (\\DELETED)" - << "S: * 1 FETCH ( FLAGS (\\Deleted) ) " - << "S: A000005 OK Completed" - << "C: A000006 EXPUNGE" - << "S: * 1 EXPUNGE" - << "S: * 0 EXISTS" - << "S: * 0 RECENT" - << "S: A000006 OK Completed" - << "C: A000007 CLOSE" - << "S: A000007 OK Completed" - << "C: A000008 DELETE \"INBOX.test1.test2\"" - << "S: * 0 EXISTS" - << "S: * 0 RECENT" - << "S: A000008 OK Completed" - << "C: A000009 SELECT \"INBOX.test1\"" - << "S: * FLAGS ( \\Answered \\Flagged \\Draft \\Deleted \\Seen )" - << "S: * OK [ PERMANENTFLAGS ( \\Answered \\Flagged \\Draft \\Deleted \\Seen \\* ) ]" - << "S: * 1 EXISTS" - << "S: * 1 RECENT" - << "S: * OK [ UIDVALIDITY 1292857888 ]" - << "S: * OK [ UIDNEXT 2 ]" - << "S: A000009 OK Completed [ READ-WRITE ]" - << "C: A000010 STORE 1:* +FLAGS (\\DELETED)" - << "S: * 1 FETCH ( FLAGS (\\Recent \\Deleted \\Seen) )" - << "S: A000010 OK Completed" - << "C: A000011 EXPUNGE" - << "S: * 1 EXPUNGE" - << "S: * 0 EXISTS" - << "S: * 0 RECENT" - << "S: A000011 OK Completed" - << "C: A000012 CLOSE" - << "S: A000012 OK Completed" - << "C: A000013 DELETE \"INBOX.test1\"" - << "S: * 0 EXISTS" - << "S: * 0 RECENT" - << "S: A000013 OK Completed"; - callNames.clear(); - callNames << "changeProcessed"; - QTest::newRow( "non-standard separator" ) << collection << scenario << callNames; - - collection = createCollectionChain( QLatin1String(".INBOX.test1") ); - scenario.clear(); - scenario << defaultPoolConnectionScenario() - << "C: A000003 LSUB \"\" *" - << "S: * LSUB ( \\HasChildren ) . INBOX" - << "S: * LSUB ( \\HasChildren ) . INBOX.test1" - << "S: * LSUB ( ) . INBOX.test1.test2" - << "S: A000003 OK Completed ( 0.000 secs 26 calls )" - << "C: A000004 SELECT \"INBOX.test1.test2\"" - << "S: * FLAGS ( \\Answered \\Flagged \\Draft \\Deleted \\Seen )" - << "S: * OK [ PERMANENTFLAGS ( \\Answered \\Flagged \\Draft \\Deleted \\Seen \\* ) ]" - << "S: * 1 EXISTS" - << "S: * 0 RECENT" - << "S: * OK [ UNSEEN 1 ]" - << "S: * OK [ UIDVALIDITY 1292857898 ]" - << "S: * OK [ UIDNEXT 2 ]" - << "S: A000004 OK Completed [ READ-WRITE ]" - << "C: A000005 STORE 1:* +FLAGS (\\DELETED)" - << "S: * 1 FETCH ( FLAGS (\\Deleted) ) " - << "S: A000005 OK Completed" - << "C: A000006 EXPUNGE" - << "S: * 1 EXPUNGE" - << "S: * 0 EXISTS" - << "S: * 0 RECENT" - << "S: A000006 OK Completed" - << "C: A000007 CLOSE" - << "S: A000007 NO Close failed"; - callNames.clear(); - callNames << "changeProcessed" << "emitWarning" << "synchronizeCollectionTree"; - QTest::newRow( "close failed" ) << collection << scenario << callNames; - } - - void shouldDeleteMailBoxRecursive() - { - QFETCH( Akonadi::Collection, collection ); - QFETCH( QList, scenario ); - QFETCH( QStringList, callNames ); - - FakeServer server; - server.setScenario( scenario ); - server.startAndWait(); - - SessionPool pool( 1 ); - - pool.setPasswordRequester( createDefaultRequester() ); - QVERIFY( pool.connect( createDefaultAccount() ) ); - QVERIFY( waitForSignal( &pool, SIGNAL(connectDone(int,QString)) ) ); - - DummyResourceState::Ptr state = DummyResourceState::Ptr( new DummyResourceState ); - state->setCollection( collection ); - RemoveCollectionRecursiveTask *task = new RemoveCollectionRecursiveTask( state ); - task->start( &pool ); - QEventLoop loop; - connect( task, SIGNAL(destroyed(QObject*)), &loop, SLOT(quit()) ); - loop.exec(); - - QCOMPARE( state->calls().count(), callNames.size() ); - for ( int i = 0; i < callNames.size(); i++ ) { - QString command = QString::fromUtf8(state->calls().at( i ).first); - QVariant parameter = state->calls().at( i ).second; - - if ( command == "cancelTask" && callNames[i] != "cancelTask" ) { - kDebug() << "Got a cancel:" << parameter.toString(); - } - - QCOMPARE( command, callNames[i] ); - - if ( command == "cancelTask" ) { - QVERIFY( !parameter.toString().isEmpty() ); - } - } - - QVERIFY( server.isAllScenarioDone() ); - - server.quit(); - } -}; - -QTEST_KDEMAIN_CORE( TestRemoveCollectionTask ) - -#include "testremovecollectiontask.moc" diff -Nru kdepim-runtime-4.12.3/resources/imap/tests/testremoveitemstask.cpp kdepim-runtime-4.12.90/resources/imap/tests/testremoveitemstask.cpp --- kdepim-runtime-4.12.3/resources/imap/tests/testremoveitemstask.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/imap/tests/testremoveitemstask.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -77,9 +77,8 @@ state->setItem( item ); RemoveItemsTask *task = new RemoveItemsTask( state ); task->start( &pool ); - QTest::qWait( 100 ); - QCOMPARE( state->calls().count(), callNames.size() ); + QTRY_COMPARE( state->calls().count(), callNames.size() ); for ( int i = 0; i < callNames.size(); i++ ) { QString command = QString::fromUtf8(state->calls().at( i ).first); QVariant parameter = state->calls().at( i ).second; diff -Nru kdepim-runtime-4.12.3/resources/imap/tests/testresourcetask.cpp kdepim-runtime-4.12.90/resources/imap/tests/testresourcetask.cpp --- kdepim-runtime-4.12.3/resources/imap/tests/testresourcetask.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/imap/tests/testresourcetask.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -134,25 +134,26 @@ pool.setPasswordRequester( createDefaultRequester() ); QVERIFY( pool.connect( createDefaultAccount() ) ); - QTest::qWait( 200 ); - QCOMPARE( poolSpy.count(), 1 ); + QTRY_COMPARE( poolSpy.count(), 1 ); QCOMPARE( poolSpy.at( 0 ).at( 0 ).toInt(), (int)SessionPool::NoError ); } if ( shouldRequestSession ) { + QSignalSpy requestSpy( &pool, SIGNAL(sessionRequestDone(qint64,KIMAP::Session*,int,QString)) ); pool.requestSession(); - QTest::qWait( 100 ); + QTRY_COMPARE( requestSpy.count(), 1 ); } QSignalSpy sessionSpy( &pool, SIGNAL(sessionRequestDone(qint64,KIMAP::Session*,int,QString)) ); DummyResourceTask *task = new DummyResourceTask( actionIfNoSession, state ); task->start( &pool ); - QTest::qWait( 100 ); if ( shouldConnect ) { - QCOMPARE( sessionSpy.count(), 1 ); + QTRY_COMPARE( sessionSpy.count(), 1 ); } else { + //We want to ensure the signal isn't emitted, so we have to wait + QTest::qWait( 500 ); QCOMPARE( sessionSpy.count(), 0 ); } diff -Nru kdepim-runtime-4.12.3/resources/imap/tests/testretrievecollectionmetadatatask.cpp kdepim-runtime-4.12.90/resources/imap/tests/testretrievecollectionmetadatatask.cpp --- kdepim-runtime-4.12.3/resources/imap/tests/testretrievecollectionmetadatatask.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/imap/tests/testretrievecollectionmetadatatask.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -30,7 +30,10 @@ #include "timestampattribute.h" #include +typedef QMap QBYTEARRAYMAP; + Q_DECLARE_METATYPE( Akonadi::Collection::Rights ) +Q_DECLARE_METATYPE( QBYTEARRAYMAP ) class TestRetrieveCollectionMetadataTask : public ImapTestBase { @@ -51,19 +54,17 @@ QTest::addColumn< QList >( "scenario" ); QTest::addColumn( "callNames" ); QTest::addColumn( "expectedRights" ); - QTest::addColumn( "spontaneous" ); + QTest::addColumn( "expectedAnnotations" ); Akonadi::Collection collection; QStringList capabilities; QList scenario; QStringList callNames; - bool spontaneous; + QMap expectedAnnotations; collection = createCollectionChain( QLatin1String("/INBOX/Foo") ); collection.setRights( 0 ); - collection.addAttribute( new TimestampAttribute( QDateTime::currentDateTime().toTime_t() - - RetrieveCollectionMetadataTask::TimestampTimeout - - 100 ) ); + collection.addAttribute( new TimestampAttribute( QDateTime::currentDateTime().toTime_t() ) ); capabilities.clear(); capabilities << "ANNOTATEMORE" << "ACL" << "QUOTA"; @@ -87,11 +88,12 @@ callNames.clear(); callNames << "applyCollectionChanges" << "taskDone"; - spontaneous = true; + expectedAnnotations.clear(); + expectedAnnotations.insert( "/shared/vendor/kolab/folder-test", "true" ); Akonadi::Collection::Rights rights = Akonadi::Collection::AllRights; QTest::newRow( "first listing, connected IMAP" ) << collection << capabilities << scenario - << callNames << rights << spontaneous; + << callNames << rights << expectedAnnotations; // // Test that if the parent collection doesn't allow renaming in its ACL, the child mailbox @@ -109,9 +111,8 @@ collection.removeAttribute(); rights = Akonadi::Collection::AllRights; rights &= ~Akonadi::Collection::CanChangeCollection; - spontaneous = true; QTest::newRow( "parent without create rights" ) << collection << capabilities << scenario - << callNames << rights << spontaneous; + << callNames << rights << expectedAnnotations; // // Test that if the parent collection is a noselect folder, the child mailbox will not have @@ -122,7 +123,8 @@ parentCollection.addAttribute( noSelectAttribute ); collection.setParentCollection( parentCollection ); QTest::newRow( "parent wit noselect" ) << collection << capabilities << scenario - << callNames << rights << spontaneous; + << callNames << rights << expectedAnnotations; + parentCollection.removeAttribute(); // // Test that the rights are properly set on the resulting collection if the mailbox doesn't @@ -144,68 +146,23 @@ << "S: * QUOTAROOT INBOX/Foo user/foo" << "S: * QUOTA user/foo ( )" << "S: A000006 OK quota retrieved"; - spontaneous = true; rights = Akonadi::Collection::CanCreateItem | Akonadi::Collection::CanChangeItem | Akonadi::Collection::CanChangeCollection; QTest::newRow( "only some rights" ) << collection << capabilities << scenario - << callNames << rights << spontaneous; - + << callNames << rights << expectedAnnotations; // - // We shouldn't query the server for any metadata if we did so recently... + // Test that a warning is issued if the insert rights of a folder have been revoked on the server. // collection = createCollectionChain( QLatin1String("/INBOX/Foo") ); - collection.setRights( 0 ); collection.addAttribute( new TimestampAttribute( QDateTime::currentDateTime().toTime_t() ) ); + collection.setParentCollection( parentCollection ); + collection.setRights( Akonadi::Collection::CanCreateItem ); capabilities.clear(); capabilities << "ANNOTATEMORE" << "ACL" << "QUOTA"; scenario.clear(); - scenario << defaultPoolConnectionScenario(); - - callNames.clear(); - callNames << "taskDone"; - - spontaneous = true; - - rights = Akonadi::Collection::AllRights; - QTest::newRow( "recent timestamp, no metadata harvesting" ) << collection << capabilities << scenario - << callNames << rights << spontaneous; - - // - // ... except if not spontaneous! - // - scenario.clear(); - scenario << defaultPoolConnectionScenario() - << "C: A000003 GETANNOTATION \"INBOX/Foo\" \"*\" \"value.shared\"" - << "S: * ANNOTATION INBOX/Foo /vendor/kolab/folder-test ( value.shared true )" - << "S: A000003 OK annotations retrieved" - << "C: A000004 GETACL \"INBOX/Foo\"" - << "S: * ACL INBOX/Foo foo@kde.org wi" - << "S: A000004 OK acl retrieved" - << "C: A000005 MYRIGHTS \"INBOX/Foo\"" - << "S: * MYRIGHTS \"INBOX/Foo\" wi" - << "S: A000005 OK rights retrieved" - << "C: A000006 GETQUOTAROOT \"INBOX/Foo\"" - << "S: * QUOTAROOT INBOX/Foo user/foo" - << "S: * QUOTA user/foo ( )" - << "S: A000006 OK quota retrieved"; - spontaneous = false; - rights = Akonadi::Collection::CanCreateItem | Akonadi::Collection::CanChangeItem | - Akonadi::Collection::CanChangeCollection; - callNames.clear(); - callNames << "collectionAttributesRetrieved"; - - QTest::newRow( "recent timestamp, but not spontaneous: harvesting" ) << collection << capabilities << scenario - << callNames << rights << spontaneous; - - // - // Test that a warning is issued if the insert rights of a folder have been revoked on the server. - // - collection.setParentCollection( parentCollection ); - collection.setRights( collection.rights() | Akonadi::Collection::CanCreateItem ); - scenario.clear(); scenario << defaultPoolConnectionScenario() << "C: A000003 GETANNOTATION \"INBOX/Foo\" \"*\" \"value.shared\"" << "S: * ANNOTATION INBOX/Foo /vendor/kolab/folder-test ( value.shared true )" @@ -220,18 +177,18 @@ << "S: * QUOTAROOT INBOX/Foo user/foo" << "S: * QUOTA user/foo ( )" << "S: A000006 OK quota retrieved"; - spontaneous = false; callNames.clear(); callNames << "showInformationDialog"; - callNames << "collectionAttributesRetrieved"; + callNames << "applyCollectionChanges"; + callNames << "taskDone"; rights = Akonadi::Collection::CanChangeItem | Akonadi::Collection::CanChangeCollection; QTest::newRow( "revoked rights" ) << collection << capabilities << scenario - << callNames << rights << spontaneous; + << callNames << rights << expectedAnnotations; // - // Test that NoInferiors overrides acl rigths and disallows creating new mailboxes + // Test that NoInferiors overrides acl rights and disallows creating new mailboxes // collection.setParentCollection( createCollectionChain( QString() ) ); collection.setRemoteId( "/INBOX" ); @@ -253,7 +210,6 @@ << "S: * QUOTAROOT INBOX user" << "S: * QUOTA user ( )" << "S: A000006 OK quota retrieved"; - spontaneous = true; callNames.clear(); callNames << "applyCollectionChanges"; @@ -262,7 +218,43 @@ rights = Akonadi::Collection::CanChangeItem | Akonadi::Collection::CanChangeCollection; QTest::newRow( "noinferiors" ) << collection << capabilities << scenario - << callNames << rights << spontaneous; + << callNames << rights << expectedAnnotations; + + collection = createCollectionChain( QLatin1String("/INBOX/Foo") ); + collection.setRights( 0 ); + collection.removeAttribute(); + + capabilities.clear(); + capabilities << "METADATA" << "ACL" << "QUOTA"; + + expectedAnnotations.clear(); + expectedAnnotations.insert( "/shared/vendor/kolab/folder-test", "true" ); + expectedAnnotations.insert( "/shared/vendor/kolab/folder-test2", "" ); + + scenario.clear(); + scenario << defaultPoolConnectionScenario() + << "C: A000003 GETMETADATA \"INBOX/Foo\" (DEPTH infinity) (/shared)" + << "S: * METADATA \"INBOX/Foo\" (/shared/vendor/kolab/folder-test \"true\")" + << "S: * METADATA \"INBOX/Foo\" (/shared/vendor/kolab/folder-test2 \"NIL\")" + << "S: * METADATA \"INBOX/Foo\" (/shared/vendor/cmu/cyrus-imapd/lastupdate \"true\")" + << "S: A000003 OK GETMETADATA complete" + << "C: A000004 GETACL \"INBOX/Foo\"" + << "S: * ACL INBOX/Foo foo@kde.org lrswipcda" + << "S: A000004 OK acl retrieved" + << "C: A000005 MYRIGHTS \"INBOX/Foo\"" + << "S: * MYRIGHTS \"INBOX/Foo\" lrswipkxtecda" + << "S: A000005 OK rights retrieved" + << "C: A000006 GETQUOTAROOT \"INBOX/Foo\"" + << "S: * QUOTAROOT INBOX/Foo user/Foo" + << "S: * QUOTA user/Foo ( )" + << "S: A000006 OK quota retrieved"; + + callNames.clear(); + callNames << "applyCollectionChanges" << "taskDone"; + + rights = Akonadi::Collection::AllRights; + QTest::newRow( "METADATA" ) << collection << capabilities << scenario + << callNames << rights << expectedAnnotations; } void shouldCollectionRetrieveMetadata() @@ -272,7 +264,7 @@ QFETCH( QList, scenario ); QFETCH( QStringList, callNames ); QFETCH( Akonadi::Collection::Rights, expectedRights ); - QFETCH( bool, spontaneous ); + QFETCH( QBYTEARRAYMAP, expectedAnnotations ); FakeServer server; server.setScenario( scenario ); @@ -289,12 +281,10 @@ state->setServerCapabilities( capabilities ); state->setUserName( "Hans" ); RetrieveCollectionMetadataTask *task = new RetrieveCollectionMetadataTask( state ); - task->setSpontaneous( spontaneous ); task->start( &pool ); - QTest::qWait( 100 ); - QCOMPARE( state->calls().count(), callNames.size() ); + QTRY_COMPARE( state->calls().count(), callNames.size() ); for ( int i = 0; i < callNames.size(); i++ ) { QString command = QString::fromUtf8(state->calls().at( i ).first); QVariant parameter = state->calls().at( i ).second; @@ -307,9 +297,6 @@ if ( command == "cancelTask" ) { QVERIFY( !parameter.toString().isEmpty() ); - } else if ( command == "applyCollectionChanges" ) { - Akonadi::Collection c = parameter.value(); - } if ( command == "applyCollectionChanges" ) { @@ -320,6 +307,11 @@ const qint64 timestamp = collection.attribute()->timestamp(); const qint64 currentTimestamp = QDateTime::currentDateTime().toTime_t(); QVERIFY( qAbs( currentTimestamp - timestamp ) < 5 ); + + if ( !expectedAnnotations.isEmpty() ) { + QVERIFY( collection.hasAttribute() ); + QCOMPARE( collection.attribute()->annotations(), expectedAnnotations ); + } } } diff -Nru kdepim-runtime-4.12.3/resources/imap/tests/testretrievecollectionstask.cpp kdepim-runtime-4.12.90/resources/imap/tests/testretrievecollectionstask.cpp --- kdepim-runtime-4.12.3/resources/imap/tests/testretrievecollectionstask.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/imap/tests/testretrievecollectionstask.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -323,11 +323,10 @@ RetrieveCollectionsTask *task = new RetrieveCollectionsTask( state ); task->start( &pool ); - QTest::qWait( 100 ); Akonadi::Collection::List collections; - QCOMPARE( state->calls().count(), callNames.size() ); + QTRY_COMPARE( state->calls().count(), callNames.size() ); for ( int i = 0; i < callNames.size(); i++ ) { QString command = QString::fromUtf8(state->calls().at( i ).first); QVariant parameter = state->calls().at( i ).second; diff -Nru kdepim-runtime-4.12.3/resources/imap/tests/testretrieveitemstask.cpp kdepim-runtime-4.12.90/resources/imap/tests/testretrieveitemstask.cpp --- kdepim-runtime-4.12.3/resources/imap/tests/testretrieveitemstask.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/imap/tests/testretrieveitemstask.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -237,6 +237,35 @@ callNames << "fetchItemsWithoutBodies" << "applyCollectionChanges" << "itemsRetrievedIncremental" << "itemsRetrievedIncremental" << "itemsRetrievalDone"; QTest::newRow( "highestmodseq test" ) << collection << scenario << callNames; + + collection = createCollectionChain(QLatin1String("/INBOX/Foo") ); + collection.setCachePolicy( policy ); + collection.attribute( Akonadi::Collection::AddIfMissing )->setUidNext( 2471 ); + collection.attribute( Akonadi::Entity::AddIfMissing )->setHighestModSeq( 123456788 ); + stats.setCount( 5 ); + collection.setStatistics( stats ); + scenario.clear(); + scenario << defaultPoolConnectionScenario( QList() << "XYMHIGHESTMODSEQ" ) + << "C: A000003 SELECT \"INBOX/Foo\"" + << "S: A000003 OK select done" + << "C: A000004 EXPUNGE" + << "S: A000004 OK expunge DONE" + << "C: A000005 SELECT \"INBOX/Foo\"" + << "S: * FLAGS (\\Answered \\Flagged \\Draft \\Deleted \\Seen)" + << "S: * OK [ PERMANENTFLAGS (\\Answered \\Flagged \\Draft \\Deleted \\Seen) ]" + << "S: * 5 EXISTS" + << "S: * 0 RECENT" + << "S: * OK [ UIDVALIDITY 1149151135 ]" + << "S: * OK [ UIDNEXT 2471 ]" + << "S: * OK [ HIGHESTMODSEQ 123456789 ]" + << "S: A000005 OK select done" + << "C: A000006 FETCH 1:5 (FLAGS UID)" + << "S: * 5 FETCH ( UID 2470 FLAGS () )" + << "S: A000006 OK fetch done"; + callNames.clear(); + callNames << "fetchItemsWithoutBodies" << "applyCollectionChanges" << "itemsRetrieved" << "itemsRetrievalDone"; + + QTest::newRow( "yahoo highestmodseq test" ) << collection << scenario << callNames; } void shouldIntrospectCollection() @@ -260,9 +289,8 @@ state->setCollection( collection ); RetrieveItemsTask *task = new RetrieveItemsTask( state ); task->start( &pool ); - QTest::qWait( 100 ); - QCOMPARE( state->calls().count(), callNames.size() ); + QTRY_COMPARE( state->calls().count(), callNames.size() ); for ( int i = 0; i < callNames.size(); i++ ) { QString command = QString::fromUtf8(state->calls().at( i ).first); QVariant parameter = state->calls().at( i ).second; diff -Nru kdepim-runtime-4.12.3/resources/imap/tests/testretrieveitemtask.cpp kdepim-runtime-4.12.90/resources/imap/tests/testretrieveitemtask.cpp --- kdepim-runtime-4.12.3/resources/imap/tests/testretrieveitemtask.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/imap/tests/testretrieveitemtask.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -90,9 +90,8 @@ state->setItem( item ); RetrieveItemTask *task = new RetrieveItemTask( state ); task->start( &pool ); - QTest::qWait( 100 ); - QCOMPARE( state->calls().count(), 1 ); + QTRY_COMPARE( state->calls().count(), 1 ); QString command = QString::fromUtf8(state->calls().first().first); if ( command == "cancelTask" && callName != "cancelTask" ) { diff -Nru kdepim-runtime-4.12.3/resources/kabc/kabcresource.cpp kdepim-runtime-4.12.90/resources/kabc/kabcresource.cpp --- kdepim-runtime-4.12.3/resources/kabc/kabcresource.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/kabc/kabcresource.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -892,6 +892,5 @@ AKONADI_RESOURCE_MAIN( KABCResource ) -#include "kabcresource.moc" // kate: space-indent on; indent-width 2; replace-tabs on; diff -Nru kdepim-runtime-4.12.3/resources/kabc/kresourceassistant.cpp kdepim-runtime-4.12.90/resources/kabc/kresourceassistant.cpp --- kdepim-runtime-4.12.3/resources/kabc/kresourceassistant.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/kabc/kresourceassistant.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -396,5 +396,5 @@ mCreationWidget->mResource->setResourceName( text ); } -#include "kresourceassistant.moc" +#include "moc_kresourceassistant.cpp" // kate: space-indent on; indent-width 2; replace-tabs on; diff -Nru kdepim-runtime-4.12.3/resources/kalarm/kalarm/CMakeLists.txt kdepim-runtime-4.12.90/resources/kalarm/kalarm/CMakeLists.txt --- kdepim-runtime-4.12.3/resources/kalarm/kalarm/CMakeLists.txt 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/kalarm/kalarm/CMakeLists.txt 2014-03-13 08:12:29.000000000 +0000 @@ -29,11 +29,7 @@ ${CMAKE_CURRENT_BINARY_DIR}/org.kde.Akonadi.KAlarm.Settings.xml settings.h Akonadi_KAlarm_Resource::Settings icalsettingsadaptor ICalSettingsAdaptor) add_custom_target(kalarm_resource_xml ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/org.kde.Akonadi.KAlarm.Settings.xml) -if (NOT WINCE) - kde4_add_plugin(akonadi_kalarm_resource ${kalarmresource_SRCS}) -else() - kde4_add_plugin(akonadi_kalarm_resource STATIC ${kalarmresource_SRCS}) -endif() +kde4_add_plugin(akonadi_kalarm_resource ${kalarmresource_SRCS}) if (Q_WS_MAC) set_target_properties(akonadi_kalarm_resource PROPERTIES MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/../Info.plist.template) diff -Nru kdepim-runtime-4.12.3/resources/kalarm/kalarm/kalarmresource.cpp kdepim-runtime-4.12.90/resources/kalarm/kalarm/kalarmresource.cpp --- kdepim-runtime-4.12.3/resources/kalarm/kalarm/kalarmresource.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/kalarm/kalarm/kalarmresource.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -534,6 +534,5 @@ AKONADI_AGENT_FACTORY(KAlarmResource, akonadi_kalarm_resource) -#include "kalarmresource.moc" // vim: et sw=4: diff -Nru kdepim-runtime-4.12.3/resources/kalarm/kalarmdir/CMakeLists.txt kdepim-runtime-4.12.90/resources/kalarm/kalarmdir/CMakeLists.txt --- kdepim-runtime-4.12.3/resources/kalarm/kalarmdir/CMakeLists.txt 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/kalarm/kalarmdir/CMakeLists.txt 2014-03-13 08:12:29.000000000 +0000 @@ -25,11 +25,7 @@ ${CMAKE_CURRENT_BINARY_DIR}/org.kde.Akonadi.KAlarmDir.Settings.xml settings.h Akonadi_KAlarm_Dir_Resource::Settings kalarmdirsettingsadaptor KAlarmDirSettingsAdaptor) add_custom_target(kalarmdir_resource_xml ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/org.kde.Akonadi.KAlarmDir.Settings.xml) -if (NOT WINCE) - kde4_add_plugin(akonadi_kalarm_dir_resource ${kalarmdirresource_SRCS}) -else() - kde4_add_plugin(akonadi_kalarm_dir_resource STATIC ${kalarmdirresource_SRCS}) -endif() +kde4_add_plugin(akonadi_kalarm_dir_resource ${kalarmdirresource_SRCS}) if (Q_WS_MAC) set_target_properties(akonadi_kalarm_dir_resource PROPERTIES MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/../Info.plist.template) diff -Nru kdepim-runtime-4.12.3/resources/kalarm/kalarmdir/kalarmdirresource.cpp kdepim-runtime-4.12.90/resources/kalarm/kalarmdir/kalarmdirresource.cpp --- kdepim-runtime-4.12.3/resources/kalarm/kalarmdir/kalarmdirresource.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/kalarm/kalarmdir/kalarmdirresource.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -1210,6 +1210,5 @@ AKONADI_AGENT_FACTORY(KAlarmDirResource, akonadi_kalarm_dir_resource) -#include "kalarmdirresource.moc" // vim: et sw=4: diff -Nru kdepim-runtime-4.12.3/resources/kcal/kcalresource.cpp kdepim-runtime-4.12.90/resources/kcal/kcalresource.cpp --- kdepim-runtime-4.12.3/resources/kcal/kcalresource.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/kcal/kcalresource.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -692,5 +692,4 @@ AKONADI_RESOURCE_MAIN( KCalResource ) -#include "kcalresource.moc" // kate: space-indent on; indent-width 2; replace-tabs on; diff -Nru kdepim-runtime-4.12.3/resources/kdeaccounts/kdeaccountsresource.cpp kdepim-runtime-4.12.90/resources/kdeaccounts/kdeaccountsresource.cpp --- kdepim-runtime-4.12.3/resources/kdeaccounts/kdeaccountsresource.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/kdeaccounts/kdeaccountsresource.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -166,4 +166,3 @@ AKONADI_RESOURCE_MAIN( KDEAccountsResource ) -#include "kdeaccountsresource.moc" diff -Nru kdepim-runtime-4.12.3/resources/kolabproxy/addressbookhandler.cpp kdepim-runtime-4.12.90/resources/kolabproxy/addressbookhandler.cpp --- kdepim-runtime-4.12.3/resources/kolabproxy/addressbookhandler.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/kolabproxy/addressbookhandler.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -153,3 +153,15 @@ { return QString::fromLatin1( "view-pim-contacts" ); } + +QString AddressBookHandler::extractGid(const Akonadi::Item& kolabItem) +{ + if ( kolabItem.hasPayload() ) { + return kolabItem.payload().uid(); + } else if ( kolabItem.hasPayload() ) { + return kolabItem.payload().id(); + } + kWarning() << "invalid payload type!"; + return QString(); +} + diff -Nru kdepim-runtime-4.12.3/resources/kolabproxy/addressbookhandler.h kdepim-runtime-4.12.90/resources/kolabproxy/addressbookhandler.h --- kdepim-runtime-4.12.3/resources/kolabproxy/addressbookhandler.h 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/kolabproxy/addressbookhandler.h 2014-03-13 08:12:29.000000000 +0000 @@ -38,6 +38,8 @@ virtual bool toKolabFormat( const Akonadi::Item &item, Akonadi::Item &imapItem ); virtual QStringList contentMimeTypes(); virtual QString iconName() const; + + virtual QString extractGid(const Akonadi::Item& kolabItem); }; #endif diff -Nru kdepim-runtime-4.12.3/resources/kolabproxy/akonadi_kolabproxy_resource.notifyrc kdepim-runtime-4.12.90/resources/kolabproxy/akonadi_kolabproxy_resource.notifyrc --- kdepim-runtime-4.12.3/resources/kolabproxy/akonadi_kolabproxy_resource.notifyrc 1970-01-01 00:00:00.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/kolabproxy/akonadi_kolabproxy_resource.notifyrc 2014-03-13 08:12:29.000000000 +0000 @@ -0,0 +1,96 @@ +[Global] +IconName=kolab +Comment=Kolab Proxy Resource Notifications +Comment[bs]=Notifikacija Kolab Proxy resursa +Comment[ca]=Notificacions del recurs d'intermediari del Kolab +Comment[da]=Bekendtgørelser fra Kolab-proxy-ressource +Comment[de]=Benachrichtigungen der Proxy-Ressource für Kolab +Comment[es]=Notificaciones de recursos del proxy Kolab +Comment[fi]=Kolab Proxy -resurssin ilmoitukset +Comment[fr]=Configuration des notifications Kolab +Comment[gl]=Notificacións do proxy de recurso de Kolab +Comment[hu]=Kolab proxy-erőforrás értesítések +Comment[ia]=Notificationes de ressource de proxy de Kolab +Comment[it]=Notifiche della risorsa proxy Kolab +Comment[ko]=Kolab 프록시 자원 알림 +Comment[nb]=Kolab Proxy ressursvarslinger +Comment[nds]=Kolab-Proxy-Ressourcebescheden +Comment[nl]=Melding van Kolab-proxy-hulpbron +Comment[pl]=Powiadomienia zasobu pośrednika Kolab +Comment[pt]=Configuração dos Recursos de 'Proxy' do Kolab +Comment[pt_BR]=Notificação dos recursos de proxy do Kolab +Comment[ru]=Уведомления от источника данных Kolab +Comment[sk]=Upozornenia zdroja Kolab Proxy +Comment[sr]=Обавештења прокси ресурса Колаба +Comment[sr@ijekavian]=Обавештења прокси ресурса Колаба +Comment[sr@ijekavianlatin]=Obaveštenja proksi resursa Kolaba +Comment[sr@latin]=Obaveštenja proksi resursa Kolaba +Comment[sv]=Kolab-proxy resursunderrättelser +Comment[tr]=Kolab Vekil Sunucu Kaynak Bildirimleri +Comment[uk]=Сповіщення ресурсу проксі-сервера Kolab +Comment[x-test]=xxKolab Proxy Resource Notificationsxx +Comment[zh_TW]=Kolab Proxy 資源通知 +Name=Kolab Resource +Name[bs]=Kolab resurs +Name[ca]=Recurs de Kolab +Name[cs]=Zdroj Kolab +Name[da]=Kolab-ressource +Name[de]=Kolab-Ressource +Name[es]=Recurso de Kolab +Name[fi]=Kolab-resurssi +Name[fr]=Ressource Kolab +Name[gl]=Recurso do Kolab +Name[hu]=Kolab erőforrás +Name[ia]=Ressource de Kolab +Name[it]=Risorsa Kolab +Name[ko]=Kolab 자원 +Name[nb]=Kolab-ressurs +Name[nds]=Kolab-Ressource +Name[nl]=Kolab-hulpbron +Name[pl]=Zasób Kolab +Name[pt]=Recurso do Kolab +Name[pt_BR]=Recurso do Kolab +Name[ru]=Источник данных Kolab +Name[sk]=Kolab zdroj +Name[sr]=Ресурс Колаба +Name[sr@ijekavian]=Ресурс Колаба +Name[sr@ijekavianlatin]=Resurs Kolaba +Name[sr@latin]=Resurs Kolaba +Name[sv]=Kolab-resurs +Name[tr]=Kolab Kaynağı +Name[uk]=Ресурс Kolab +Name[x-test]=xxKolab Resourcexx +Name[zh_TW]=Kolab 資源 + +[Event/Error] +Name=An error occurred +Name[bs]=Desila se greška +Name[ca]=S'ha produït un error +Name[da]=En fejl opstod +Name[de]=Es ist ein Fehler aufgetreten +Name[es]=Ocurrió un error +Name[fi]=Tapahtui virhe +Name[fr]=Une erreur est survenue +Name[gl]=Produciuse un erro +Name[hu]=Hiba történt +Name[ia]=Un error occurreva +Name[it]=Si è verificato un errore +Name[ko]=오류가 발생함 +Name[nb]=Det oppsto en feil +Name[nds]=Dat geev en Fehler +Name[nl]=Er deed zich een fout voor +Name[pl]=Wystąpił błąd +Name[pt]=Ocorreu um erro +Name[pt_BR]=Ocorreu um erro +Name[ru]=Произошла ошибка +Name[sk]=Vyskytla sa chyba +Name[sr]=Дошло је до грешке +Name[sr@ijekavian]=Дошло је до грешке +Name[sr@ijekavianlatin]=Došlo je do greške +Name[sr@latin]=Došlo je do greške +Name[sv]=Ett fel uppstod +Name[tr]=Bir hata oluştu +Name[uk]=Сталася помилка +Name[x-test]=xxAn error occurredxx +Name[zh_TW]=發生錯誤 +Action=Popup diff -Nru kdepim-runtime-4.12.3/resources/kolabproxy/calendarhandler.cpp kdepim-runtime-4.12.90/resources/kolabproxy/calendarhandler.cpp --- kdepim-runtime-4.12.3/resources/kolabproxy/calendarhandler.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/kolabproxy/calendarhandler.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -35,7 +35,7 @@ return Kolab::KolabObjectWriter::writeEvent( incidence.dynamicCast(), - m_formatVersion, PRODUCT_ID, m_calendar.timeZoneId() ); + m_formatVersion, PRODUCT_ID, QLatin1String("UTC") ); } QStringList CalendarHandler::contentMimeTypes() diff -Nru kdepim-runtime-4.12.3/resources/kolabproxy/CMakeLists.txt kdepim-runtime-4.12.90/resources/kolabproxy/CMakeLists.txt --- kdepim-runtime-4.12.3/resources/kolabproxy/CMakeLists.txt 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/kolabproxy/CMakeLists.txt 2014-03-13 08:12:29.000000000 +0000 @@ -24,6 +24,12 @@ setupdefaultfoldersjob.cpp kolabdefs.cpp upgradejob.cpp + imapitemaddedjob.cpp + imapitemremovedjob.cpp + itemaddedjob.cpp + itemchangedjob.cpp + handlermanager.cpp + revertitemchangesjob.cpp ) set(kolabproxyresource_SRCS @@ -57,6 +63,7 @@ endif() kde4_add_executable(akonadi_kolabproxy_resource ${kolabproxyresource_SRCS}) +install(FILES akonadi_kolabproxy_resource.notifyrc DESTINATION "${DATA_INSTALL_DIR}/akonadi_kolabproxy_resource" ) if(Q_WS_MAC) set_target_properties(akonadi_kolabproxy_resource PROPERTIES diff -Nru kdepim-runtime-4.12.3/resources/kolabproxy/collectiontreebuilder.cpp kdepim-runtime-4.12.90/resources/kolabproxy/collectiontreebuilder.cpp --- kdepim-runtime-4.12.3/resources/kolabproxy/collectiontreebuilder.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/kolabproxy/collectiontreebuilder.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -101,4 +101,3 @@ emitResult(); // error handling already done by Akonadi::Job } -#include "collectiontreebuilder.moc" diff -Nru kdepim-runtime-4.12.3/resources/kolabproxy/freebusyupdatehandler.cpp kdepim-runtime-4.12.90/resources/kolabproxy/freebusyupdatehandler.cpp --- kdepim-runtime-4.12.3/resources/kolabproxy/freebusyupdatehandler.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/kolabproxy/freebusyupdatehandler.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -20,7 +20,7 @@ #include "freebusyupdatehandler.h" #include -#include +#include #include #include diff -Nru kdepim-runtime-4.12.3/resources/kolabproxy/handlermanager.cpp kdepim-runtime-4.12.90/resources/kolabproxy/handlermanager.cpp --- kdepim-runtime-4.12.3/resources/kolabproxy/handlermanager.cpp 1970-01-01 00:00:00.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/kolabproxy/handlermanager.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -0,0 +1,83 @@ +/* + Copyright (c) 2013 Christian Mollekopf + + 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 "handlermanager.h" +#include + +Kolab::FolderType HandlerManager::getFolderType( const Akonadi::Collection& collection ) +{ + if (Akonadi::CollectionAnnotationsAttribute *attr = collection.attribute() ) { + return Kolab::folderTypeFromString( Kolab::getFolderTypeAnnotation(attr->annotations())); + } + return Kolab::MailType; +} + +bool HandlerManager::isKolabFolder(const Akonadi::Collection &collection) +{ + return (getFolderType(collection) != Kolab::MailType); +} + +bool HandlerManager::isHandledKolabFolder(const Akonadi::Collection& collection) +{ + return KolabHandler::hasHandler(getFolderType(collection)); +} + +KolabHandler::Ptr HandlerManager::getHandler(Akonadi::Entity::Id collectionId) +{ + return mMonitoredCollections.value(collectionId); +} + +QString HandlerManager::imapResourceForCollection( Akonadi::Collection::Id id ) +{ + return mResourceIdentifiers.value(id); +} + +bool HandlerManager::registerHandlerForCollection( const Akonadi::Collection &imapCollection, Kolab::Version version ) +{ + if (isHandledKolabFolder(imapCollection)) { + KolabHandler::Ptr handler = + KolabHandler::createHandler(getFolderType(imapCollection), imapCollection); + if (handler) { + handler->setKolabFormatVersion(version); + mMonitoredCollections.insert(imapCollection.id(), handler); + mResourceIdentifiers.insert(imapCollection.id(), imapCollection.resource()); + return true; + } + } + return false; +} + +void HandlerManager::removeFolder(Akonadi::Entity::Id imapCollection) +{ + mMonitoredCollections.remove(imapCollection); +} + +bool HandlerManager::isMonitored(Akonadi::Entity::Id imapCollection) const +{ + return mMonitoredCollections.contains(imapCollection); +} + +QList< Akonadi::Entity::Id > HandlerManager::monitoredCollections() const +{ + return mMonitoredCollections.keys(); +} + +void HandlerManager::clear() +{ + mMonitoredCollections.clear(); +} diff -Nru kdepim-runtime-4.12.3/resources/kolabproxy/handlermanager.h kdepim-runtime-4.12.90/resources/kolabproxy/handlermanager.h --- kdepim-runtime-4.12.3/resources/kolabproxy/handlermanager.h 1970-01-01 00:00:00.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/kolabproxy/handlermanager.h 2014-03-13 08:12:29.000000000 +0000 @@ -0,0 +1,57 @@ +/* + Copyright (c) 2013 Christian Mollekopf + + 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 HANDLERMANAGER_H +#define HANDLERMANAGER_H + +#include +#include +#include "kolabhandler.h" + +class HandlerManager +{ +public: + bool isMonitored(Akonadi::Collection::Id) const; + KolabHandler::Ptr getHandler(Akonadi::Collection::Id); + + /** + * Creates a new KolabHandler for @p imapCollection given it actually is + * a Kolab folder. + * + * @return @c true if @p imapCollection is a Kolab folder, @c false otherwise. + */ + bool registerHandlerForCollection(const Akonadi::Collection &imapCollection, Kolab::Version version); + + QString imapResourceForCollection(Akonadi::Collection::Id id); + + void removeFolder(Akonadi::Collection::Id imapCollection); + + QList monitoredCollections() const; + + void clear(); + + static bool isKolabFolder( const Akonadi::Collection &collection ); + static bool isHandledKolabFolder( const Akonadi::Collection &collection ); + static Kolab::FolderType getFolderType( const Akonadi::Collection &collection ); +private: + QMap mMonitoredCollections; + QMap mResourceIdentifiers; + +}; + +#endif \ No newline at end of file diff -Nru kdepim-runtime-4.12.3/resources/kolabproxy/imapitemaddedjob.cpp kdepim-runtime-4.12.90/resources/kolabproxy/imapitemaddedjob.cpp --- kdepim-runtime-4.12.3/resources/kolabproxy/imapitemaddedjob.cpp 1970-01-01 00:00:00.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/kolabproxy/imapitemaddedjob.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -0,0 +1,130 @@ +/* + Copyright (c) 2013 Christian Mollekopf + + 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 "imapitemaddedjob.h" +#include +#include +#include +#include +#include + +ImapItemAddedJob::ImapItemAddedJob(const Akonadi::Item &imapItem, const Akonadi::Collection &imapCollection, KolabHandler &handler, QObject* parent) + :KJob(parent), + mHandler(handler), + mImapItem(imapItem), + mKolabCollection(imapToKolab(imapCollection)), + mImapCollection(imapCollection) +{ + +} + +void ImapItemAddedJob::start() +{ + //TODO: slow, would be nice if ItemCreateJob would work with a Collection + // having only the remoteId set + Akonadi::CollectionFetchJob *job = + new Akonadi::CollectionFetchJob(mKolabCollection, Akonadi::CollectionFetchJob::Base, this ); + connect( job, SIGNAL(result(KJob*)), this, SLOT(onCollectionFetchDone(KJob*)) ); +} + +void ImapItemAddedJob::onCollectionFetchDone( KJob *job ) +{ + if ( job->error() ) { + kWarning( ) << "Error on collection fetch:" << job->errorText(); + return; + } + Akonadi::Collection::List collections = + qobject_cast(job)->collections(); + Q_ASSERT(collections.size() == 1); + mKolabCollection = collections.first(); + + const Akonadi::Item::List newItems = mHandler.translateItems(Akonadi::Item::List() << mImapItem); + if (newItems.isEmpty()) { + setError(KJob::UserDefinedError); + setErrorText("Failed to translate item"); + emitResult(); + return; + } + mTranslatedItem = newItems.first(); + + const QString &gid = mHandler.extractGid(mTranslatedItem); + if (!gid.isEmpty()) { + //We have a gid, let's see if this item already exists + Akonadi::Item item; + item.setGid(gid); + Akonadi::ItemFetchJob *itemFetchJob = new Akonadi::ItemFetchJob(item); + itemFetchJob->fetchScope().fetchFullPayload(false); + itemFetchJob->fetchScope().setFetchModificationTime(false); + itemFetchJob->fetchScope().setAncestorRetrieval(Akonadi::ItemFetchScope::Parent); + connect(itemFetchJob, SIGNAL(result(KJob*)), this, SLOT(onItemFetchJobDone(KJob*))); + } else { + kDebug() << "no gid, creating directly"; + Akonadi::ItemCreateJob *cjob = new Akonadi::ItemCreateJob(mTranslatedItem, mKolabCollection); + connect( cjob, SIGNAL(result(KJob*)), this, SLOT(itemCreatedDone(KJob*)) ); + } + } + + Akonadi::Item ImapItemAddedJob::getTranslatedItem() + { + return Akonadi::Item(); + } + + void ImapItemAddedJob::onItemFetchJobDone(KJob *job) + { + Akonadi::ItemFetchJob * const fetchJob = static_cast(job); + + Akonadi::Item::List conflictingItems; + foreach (const Akonadi::Item &item, fetchJob->items()) { + Q_ASSERT(item.parentCollection().isValid()); + //The same object may be in other collection, just not in this one. + if (item.parentCollection().id() != mKolabCollection.id()) { + continue; + } + conflictingItems << item; + } + if (conflictingItems.size() > 1) { + kWarning() << "Multiple conflicting items detected in col " << mKolabCollection.id() << ", this should never happen: "; + foreach (const Akonadi::Item &item, conflictingItems) { + kWarning() << "Conflicting kolab item: " << item.id(); + } + } + if (!conflictingItems.isEmpty()) { + //This is a conflict + const Akonadi::Item conflictingKolabItem = conflictingItems.first(); + mTranslatedItem.setId(conflictingKolabItem.id()); + imapToKolab(mImapItem, mTranslatedItem); + //TODO ensure the modifyjob doesn't collide with a removejob due to the original imap item vanishing. + kDebug() << "conflict, modifying existing item: " << conflictingKolabItem.id(); + Akonadi::ItemModifyJob *modJob = new Akonadi::ItemModifyJob(mTranslatedItem, this); + modJob->disableRevisionCheck(); + connect(modJob, SIGNAL(result(KJob*)), this, SLOT(itemCreatedDone(KJob*))); + } else { + kDebug() << "creating new item"; + Akonadi::ItemCreateJob *cjob = new Akonadi::ItemCreateJob(mTranslatedItem, mKolabCollection, this); + connect(cjob, SIGNAL(result(KJob*)), this, SLOT(itemCreatedDone(KJob*))); + } +} + +void ImapItemAddedJob::itemCreatedDone(KJob *job) +{ + if (job->error()) { + kWarning() << "Error on creating item:" << job->errorText(); + kWarning() << "imap item: " << mImapItem.id() << " in collection " << mImapCollection.id(); + } + emitResult(); +} diff -Nru kdepim-runtime-4.12.3/resources/kolabproxy/imapitemaddedjob.h kdepim-runtime-4.12.90/resources/kolabproxy/imapitemaddedjob.h --- kdepim-runtime-4.12.3/resources/kolabproxy/imapitemaddedjob.h 1970-01-01 00:00:00.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/kolabproxy/imapitemaddedjob.h 2014-03-13 08:12:29.000000000 +0000 @@ -0,0 +1,44 @@ +/* + Copyright (c) 2013 Christian Mollekopf + + 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 IMAPITEMADDEDJOB_H +#define IMAPITEMADDEDJOB_H +#include +#include "kolabhandler.h" + +class ImapItemAddedJob: public KJob +{ + Q_OBJECT +public: + ImapItemAddedJob(const Akonadi::Item &imapItem, const Akonadi::Collection &imapCollection, KolabHandler &handler, QObject* parent); + virtual void start(); +private slots: + void onItemFetchJobDone(KJob *job); + void onCollectionFetchDone(KJob *job); + void itemCreatedDone(KJob *job); +private: + Akonadi::Item getTranslatedItem(); + KolabHandler &mHandler; + Akonadi::Item mImapItem; + Akonadi::Item mTranslatedItem; + Akonadi::Collection mKolabCollection; + const Akonadi::Collection mImapCollection; + +}; + +#endif \ No newline at end of file diff -Nru kdepim-runtime-4.12.3/resources/kolabproxy/imapitemremovedjob.cpp kdepim-runtime-4.12.90/resources/kolabproxy/imapitemremovedjob.cpp --- kdepim-runtime-4.12.3/resources/kolabproxy/imapitemremovedjob.cpp 1970-01-01 00:00:00.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/kolabproxy/imapitemremovedjob.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -0,0 +1,72 @@ +/* + Copyright (c) 2013 Christian Mollekopf + + 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 "imapitemremovedjob.h" +#include +#include +#include +#include +#include +#include + +ImapItemRemovedJob::ImapItemRemovedJob(const Akonadi::Item& imapItem, QObject* parent) + :KJob(parent), + mImapItem(imapItem), + mKolabItem(imapToKolab(imapItem)) +{ + +} + +void ImapItemRemovedJob::start() +{ + Akonadi::ItemFetchJob *fetchJob = new Akonadi::ItemFetchJob(mKolabItem, this); + fetchJob->fetchScope().setFetchRemoteIdentification(true); + fetchJob->fetchScope().setCacheOnly(true); //don't access the imap backend again + connect(fetchJob, SIGNAL(result(KJob*)), this, SLOT(onItemFetchJobDone(KJob*))); +} + +void ImapItemRemovedJob::onItemFetchJobDone(KJob* job) +{ + //This fetch job can fail if the kolab item has already been removed, so we ignore errors + Akonadi::ItemFetchJob *fetchJob = static_cast(job); + Q_ASSERT(fetchJob->items().size() <= 1); + if (fetchJob->items().isEmpty()) { + emitResult(); + return; + } + const Akonadi::Item kolabItem = fetchJob->items().first(); + //Check if the currently relevant imap item was removed or just an outdated copy + if (kolabItem.remoteId().toLongLong() == mImapItem.id()) { + Akonadi::ItemDeleteJob *deleteJob = new Akonadi::ItemDeleteJob(kolabItem, this ); + connect(deleteJob, SIGNAL(result(KJob*)), this, SLOT(onDeleteDone(KJob*))); + } else { + emitResult(); + } +} + +void ImapItemRemovedJob::onDeleteDone(KJob* job) +{ + if (job->error()) { + kWarning() << "Delete job failed" << job->errorString(); + } + emitResult(); +} + + + + diff -Nru kdepim-runtime-4.12.3/resources/kolabproxy/imapitemremovedjob.h kdepim-runtime-4.12.90/resources/kolabproxy/imapitemremovedjob.h --- kdepim-runtime-4.12.3/resources/kolabproxy/imapitemremovedjob.h 1970-01-01 00:00:00.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/kolabproxy/imapitemremovedjob.h 2014-03-13 08:12:29.000000000 +0000 @@ -0,0 +1,39 @@ + +/* + Copyright (c) 2013 Christian Mollekopf + + 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 IMAPITEMREMOVEDJOB_H +#define IMAPITEMREMOVEDJOB_H +#include +#include "kolabhandler.h" + +class ImapItemRemovedJob: public KJob +{ + Q_OBJECT +public: + ImapItemRemovedJob(const Akonadi::Item &imapItem, QObject* parent); + virtual void start(); +private slots: + void onItemFetchJobDone(KJob *job); + void onDeleteDone(KJob *job); +private: + const Akonadi::Item mImapItem; + const Akonadi::Item mKolabItem; +}; + +#endif \ No newline at end of file diff -Nru kdepim-runtime-4.12.3/resources/kolabproxy/incidencehandler.cpp kdepim-runtime-4.12.90/resources/kolabproxy/incidencehandler.cpp --- kdepim-runtime-4.12.3/resources/kolabproxy/incidencehandler.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/kolabproxy/incidencehandler.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -21,18 +21,15 @@ #include "incidencehandler.h" -#include //krazy:exclude=camelcase - #include #include #include -#include +#include IncidenceHandler::IncidenceHandler( const Akonadi::Collection &imapCollection ) - : KolabHandler( imapCollection ), - m_calendar( QString::fromLatin1( "UTC" ) ) + : KolabHandler( imapCollection ) { } @@ -42,7 +39,6 @@ Akonadi::Item::List IncidenceHandler::translateItems( const Akonadi::Item::List &items ) { - kDebug() << "translateItems" << items.size(); Akonadi::Item::List newItems; Q_FOREACH ( const Akonadi::Item &item, items ) { if ( !item.hasPayload() ) { @@ -59,61 +55,6 @@ kWarning() << "Failed to read incidence."; continue; } - //TODO conflict resolving should happen for all object types, - //and not only for incidences (move to kolabhandler) - if ( m_uidMap.contains( incidencePtr->uid() ) ) { - StoredItem storedItem = m_uidMap[incidencePtr->uid()]; - kDebug() << "Conflict detected for incidence uid " << incidencePtr->uid() - << " for imap item id = " << item.id() - << " and the other imap item id is " - << storedItem.id << "; imap collection is " - << m_imapCollection.name() - << m_imapCollection.id() - << "; collection has rights " - << m_imapCollection.rights(); - - const Akonadi::Collection::Rights requiredRights = - Akonadi::Collection::CanDeleteItem | - Akonadi::Collection::CanCreateItem; - - if ( ( m_imapCollection.rights() & requiredRights ) != requiredRights ) { - kDebug() << "Skipping conflict resolution, no rights on collection " - << m_imapCollection.name(); - continue; - } - - ConflictResolution res = resolveConflict( incidencePtr ); - kDebug() << "ConflictResolution " << res; - if ( res == Local ) { - m_uidMap.remove( incidencePtr->uid() ); - incidencePtr = KCalCore::Incidence::Ptr(); - emit deleteItemFromImap( item ); - continue; - } else if ( res == Remote ) { - Akonadi::Item it( m_uidMap[incidencePtr->uid()].id ); - emit deleteItemFromImap( it ); - } else if ( res == Both ) { - incidencePtr->setSummary( i18n( "Copy of: %1", incidencePtr->summary() ) ); - incidencePtr->setUid( KCalCore::CalFormat::createUniqueId() ); - Akonadi::Item copiedItem( incidencePtr->mimeType() ); - incidenceToItem( incidencePtr, copiedItem ); - if ( checkForErrors( item.id() ) ) { - copiedItem.setPayloadFromData( "" ); - //TODO clear mimetype? - continue; - } - Akonadi::ItemFetchJob *job = new Akonadi::ItemFetchJob( item ); - job->fetchScope().fetchFullPayload(); - if ( job->exec() ) { - emit addItemToImap( copiedItem, job->items()[0].storageCollectionId() ); - } - // we can't do newItem.setRemoteId(..) yet because we don't have copiedItem.id() - // it's being added to imap, so we continue. - continue; - } - } - m_uidMap[incidencePtr->uid()] = StoredItem( item.id(), incidencePtr ); - kDebug() << "Add to uidMap: " << incidencePtr->uid() << item.id() << incidencePtr; Akonadi::Item newItem( incidencePtr->mimeType() ); newItem.setPayload( incidencePtr ); newItem.setRemoteId( QString::number( item.id() ) ); @@ -123,122 +64,34 @@ return newItems; } -IncidenceHandler::ConflictResolution IncidenceHandler::resolveConflict( - const KCalCore::Incidence::Ptr &inc ) -{ - /* - if ( !isResolveConflictSet() ) { - // we should do no conflict resolution - delete inc; - return; -} - */ - const QString origUid = inc->uid(); - KCalCore::Incidence::Ptr localIncidence = m_uidMap[origUid].incidence; - KCalCore::Incidence::Ptr addedIncidence = inc; - KCalCore::Incidence::Ptr result; - if ( localIncidence ) { - kDebug() << "Compare " << localIncidence << addedIncidence; - if ( *localIncidence.data() == *addedIncidence.data() ) { - // real duplicate, remove the second one - return Duplicate; - } else { - KPIM::KIncidenceChooser *ch = new KPIM::KIncidenceChooser(); - ch->setIncidence( localIncidence, addedIncidence ); - if ( KPIM::KIncidenceChooser::chooseMode == KPIM::KIncidenceChooser::ask ) { - connect ( this, SIGNAL(useGlobalMode()), ch, SLOT (useGlobalMode()) ); - if ( ch->exec() ) { - if ( KPIM::KIncidenceChooser::chooseMode != KPIM::KIncidenceChooser::ask ) { - emit useGlobalMode() ; - } - } - } - result = ch->getIncidence(); - delete ch; - } - } else { - // nothing there locally, just take the new one. Can't Happen (TM) - result = addedIncidence; - } - if ( result == localIncidence ) { - //take local - return Local; - } else if ( result == addedIncidence ) { - //take remote (inc) - return Remote; - } else if ( result == 0 ) { - // take both - return Both; - } - return Duplicate; -} - bool IncidenceHandler::toKolabFormat( const Akonadi::Item &item, Akonadi::Item &imapItem ) { -// kDebug() << "toKolabFormat"; - KCalCore::Incidence::Ptr incidencePtr; - if ( item.hasPayload() ) { - incidencePtr = item.payload(); - } else { + if ( !item.hasPayload() ) { kWarning() << "item is not an incidence"; return false; } -// kDebug() << "item payload: " << item.payloadData(); - incidenceToItem( incidencePtr, imapItem ); - if ( checkForErrors( item.id() ) ) { - imapItem.setPayloadFromData( "" ); + KCalCore::Incidence::Ptr incidencePtr = item.payload(); + if ( !incidencePtr ) { + kWarning() << "invalid incidence"; return false; } - return true; -} -void IncidenceHandler::incidenceToItem( const KCalCore::Incidence::Ptr &incidencePtr, - Akonadi::Item &imapItem ) -{ - if ( !incidencePtr ) { - imapItem.setPayloadFromData( "" ); - return; - } const KMime::Message::Ptr &message = incidenceToMime( incidencePtr ); imapItem.setMimeType( QLatin1String("message/rfc822") ); imapItem.setPayload( message ); -} -void IncidenceHandler::itemDeleted( const Akonadi::Item &item ) -{ - QMutableMapIterator it( m_uidMap ); - while ( it.hasNext() ) { - it.next(); - if ( it.value().id == item.id() ) { - kDebug() << "Remove from uidMap: " << it.key() << item.id() << it.value().incidence; - it.remove(); - break; - } + if ( checkForErrors( item.id() ) ) { + return false; } + return true; } -void IncidenceHandler::reset() -{ - m_uidMap.clear(); -} - -void IncidenceHandler::itemAdded( const Akonadi::Item &item ) +QString IncidenceHandler::extractGid(const Akonadi::Item& kolabItem) { - if ( !item.hasPayload() ) { - kWarning() << "Payload is not a MessagePtr!"; - return; + if ( !kolabItem.hasPayload() ) { + kWarning() << "Invalid payload!"; + return QString(); } - KMime::Message::Ptr payload = item.payload(); - Kolab::KolabObjectReader reader; - reader.parseMimeMessage( payload ); - if ( checkForErrors( item.id() ) ) { - return; - } - KCalCore::Incidence::Ptr e = reader.getIncidence(); - if ( !e ) { - return; - } - const KCalCore::Incidence::Ptr incidence( e ); - m_uidMap[e->uid()] = StoredItem( item.id(), incidence ); - kDebug() << "Add to uidMap: " << incidence->uid() << item.id() << incidence; + return kolabItem.payload()->instanceIdentifier(); } + diff -Nru kdepim-runtime-4.12.3/resources/kolabproxy/incidencehandler.h kdepim-runtime-4.12.90/resources/kolabproxy/incidencehandler.h --- kdepim-runtime-4.12.3/resources/kolabproxy/incidencehandler.h 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/kolabproxy/incidencehandler.h 2014-03-13 08:12:29.000000000 +0000 @@ -37,47 +37,13 @@ virtual ~IncidenceHandler(); - virtual void itemAdded( const Akonadi::Item &item ); - virtual void itemDeleted( const Akonadi::Item &item ); virtual Akonadi::Item::List translateItems( const Akonadi::Item::List &addrs ); virtual bool toKolabFormat( const Akonadi::Item &item, Akonadi::Item &imapItem ); - /**reimp*/ - void reset(); - - Q_SIGNALS: - void useGlobalMode(); + virtual QString extractGid(const Akonadi::Item& imapItem); protected: virtual KMime::Message::Ptr incidenceToMime( const KCalCore::Incidence::Ptr &incidence ) = 0; - - void incidenceToItem( const KCalCore::Incidence::Ptr &e, Akonadi::Item &imapItem ); - - struct StoredItem { - StoredItem( Akonadi::Entity::Id _id, const KCalCore::Incidence::Ptr &_inc ) - : id( _id ), incidence( _inc ) - { - } - - StoredItem() : id( -1 ) - { - } - - Akonadi::Entity::Id id; - KCalCore::Incidence::Ptr incidence; - }; - - enum ConflictResolution { - Local = 0, - Remote, - Both, - Duplicate - }; - - ConflictResolution resolveConflict( const KCalCore::Incidence::Ptr &inc ); - - KCalCore::MemoryCalendar m_calendar; - QMap m_uidMap; }; #endif diff -Nru kdepim-runtime-4.12.3/resources/kolabproxy/itemaddedjob.cpp kdepim-runtime-4.12.90/resources/kolabproxy/itemaddedjob.cpp --- kdepim-runtime-4.12.3/resources/kolabproxy/itemaddedjob.cpp 1970-01-01 00:00:00.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/kolabproxy/itemaddedjob.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -0,0 +1,75 @@ +/* + Copyright (c) 2013 Christian Mollekopf + + 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 "itemaddedjob.h" +#include +#include + +ItemAddedJob::ItemAddedJob(const Akonadi::Item& kolabItem, const Akonadi::Collection& col, KolabHandler& handler, QObject* parent) + :KJob(parent), + mHandler(handler), + mKolabItem(kolabItem), + mParentCollection(col) +{ + +} + +void ItemAddedJob::start() +{ + QMetaObject::invokeMethod(this, "doStart", Qt::QueuedConnection); +} + +void ItemAddedJob::doStart() +{ + const Akonadi::Collection imapCollection = kolabToImap(mParentCollection); + kDebug() << imapCollection.id(); + Akonadi::Item imapItem( "message/rfc822" ); + if (!mHandler.toKolabFormat(mKolabItem, imapItem)) { + kWarning() << "Failed to convert item to kolab format: " << mKolabItem.id(); + setError(KJob::UserDefinedError); + emitResult(); + return; + } + //FIXME remove + imapItem.setFlag(Akonadi::MessageFlags::Seen); + + Akonadi::ItemCreateJob *cjob = new Akonadi::ItemCreateJob(imapItem, imapCollection); + connect(cjob, SIGNAL(result(KJob*)), SLOT(onItemCreatedDone(KJob*))); +} + +void ItemAddedJob::onItemCreatedDone(KJob* job) +{ + if (job->error()) { + setError(KJob::UserDefinedError); + } else { + Akonadi::ItemCreateJob *cjob = static_cast(job); + mImapItem = cjob->item(); + } + emitResult(); +} + +Akonadi::Item ItemAddedJob::kolabItem() const +{ + return mKolabItem; +} + +Akonadi::Item ItemAddedJob::imapItem() const +{ + return mImapItem; +} diff -Nru kdepim-runtime-4.12.3/resources/kolabproxy/itemaddedjob.h kdepim-runtime-4.12.90/resources/kolabproxy/itemaddedjob.h --- kdepim-runtime-4.12.3/resources/kolabproxy/itemaddedjob.h 1970-01-01 00:00:00.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/kolabproxy/itemaddedjob.h 2014-03-13 08:12:29.000000000 +0000 @@ -0,0 +1,42 @@ +/* + Copyright (c) 2013 Christian Mollekopf + + 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 ITEMADDEDJOB_H +#define ITEMADDEDJOB_H +#include +#include "kolabhandler.h" + +class ItemAddedJob: public KJob +{ + Q_OBJECT +public: + ItemAddedJob(const Akonadi::Item &kolabItem, const Akonadi::Collection &col, KolabHandler &handler, QObject* parent); + virtual void start(); + Akonadi::Item kolabItem() const; + Akonadi::Item imapItem() const; +private slots: + void doStart(); + void onItemCreatedDone(KJob *job); +private: + KolabHandler &mHandler; + const Akonadi::Item mKolabItem; + Akonadi::Item mImapItem; + const Akonadi::Collection mParentCollection; +}; + +#endif \ No newline at end of file diff -Nru kdepim-runtime-4.12.3/resources/kolabproxy/itemchangedjob.cpp kdepim-runtime-4.12.90/resources/kolabproxy/itemchangedjob.cpp --- kdepim-runtime-4.12.3/resources/kolabproxy/itemchangedjob.cpp 1970-01-01 00:00:00.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/kolabproxy/itemchangedjob.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -0,0 +1,127 @@ +/* + Copyright (c) 2013 Christian Mollekopf + + 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 "itemchangedjob.h" +#include "itemaddedjob.h" +#include +#include +#include + +ItemChangedJob::ItemChangedJob(const Akonadi::Item& kolabItem, HandlerManager& handler, QObject* parent) +: KJob(parent), + mHandlerManager(handler), + mKolabItem(kolabItem) +{ + +} + +void ItemChangedJob::start() +{ + Akonadi::CollectionFetchJob *collectionFetchJob = new Akonadi::CollectionFetchJob(Akonadi::Collection(mKolabItem.storageCollectionId()), Akonadi::CollectionFetchJob::Base); + connect(collectionFetchJob, SIGNAL(result(KJob*)), this, SLOT(onKolabCollectionFetched(KJob*))); +} + +void ItemChangedJob::onKolabCollectionFetched(KJob* job) +{ + Akonadi::CollectionFetchJob *fetchjob = static_cast(job); + if (job->error() || fetchjob->collections().isEmpty()) { + kWarning() << "collection fetch job failed " << job->errorString() << fetchjob->collections().isEmpty(); + setError(KJob::UserDefinedError); + emitResult(); + return; + } + const Akonadi::Collection imapCollection = kolabToImap(fetchjob->collections().first()); + mHandler = mHandlerManager.getHandler(imapCollection.id()); + if (!mHandler) { + kWarning() << "Couldn't find a handler for the collection, but we should have one: " << imapCollection.id(); + setError(KJob::UserDefinedError); + emitResult(); + return; + } + + Akonadi::ItemFetchJob *itemFetchJob = new Akonadi::ItemFetchJob(kolabToImap(mKolabItem), this); + connect(itemFetchJob, SIGNAL(result(KJob*)), SLOT(onImapItemFetchDone(KJob*))); +} + +void ItemChangedJob::onImapItemFetchDone(KJob* job) +{ + if ( job->error() ) { + setError(KJob::UserDefinedError); + emitResult(); + return; + } + + Akonadi::ItemFetchJob *fetchJob = qobject_cast(job); + if (fetchJob->items().isEmpty()) { //The corresponding imap item hasn't been created yet + kDebug() << "item is not yet created in imap resource"; + Akonadi::CollectionFetchJob *fetch = + new Akonadi::CollectionFetchJob( Akonadi::Collection( mKolabItem.storageCollectionId() ), + Akonadi::CollectionFetchJob::Base, this ); + connect( fetch, SIGNAL(result(KJob*)), SLOT(onCollectionFetchDone(KJob*)) ); + } else { + kDebug() << "item is in imap resource"; + Akonadi::Item imapItem = fetchJob->items().first(); + + if (!mHandler->toKolabFormat(mKolabItem, imapItem)) { + kWarning() << "Failed to convert item to kolab format: " << mKolabItem.id(); + setError(KJob::UserDefinedError); + emitResult(); + return; + } + Akonadi::ItemModifyJob *mjob = new Akonadi::ItemModifyJob(imapItem); + connect(mjob, SIGNAL(result(KJob*)), SLOT(onItemModifyDone(KJob*))); + } +} + +void ItemChangedJob::onCollectionFetchDone(KJob *job) +{ + Akonadi::CollectionFetchJob *fetchJob = static_cast(job); + if ( job->error() || fetchJob->collections().isEmpty() ) { + kWarning() << "Collection fetch job failed" << fetchJob->errorString(); + setError(KJob::UserDefinedError); + emitResult(); + return; + } + + const Akonadi::Collection kolabCollection = fetchJob->collections().first(); + ItemAddedJob *itemAddedJob = new ItemAddedJob(mKolabItem, kolabCollection, *mHandler, this); + connect(itemAddedJob, SIGNAL(result(KJob*)), SLOT(onItemAddedDone(KJob*)) ); + itemAddedJob->start(); +} + +void ItemChangedJob::onItemAddedDone(KJob* job) +{ + if (job->error()) { + setError(KJob::UserDefinedError); + } + emitResult(); +} + +void ItemChangedJob::onItemModifyDone(KJob *job) +{ + if (job->error()) { + setError(KJob::UserDefinedError); + } + emitResult(); +} + +Akonadi::Item ItemChangedJob::item() const +{ + return mKolabItem; +} diff -Nru kdepim-runtime-4.12.3/resources/kolabproxy/itemchangedjob.h kdepim-runtime-4.12.90/resources/kolabproxy/itemchangedjob.h --- kdepim-runtime-4.12.3/resources/kolabproxy/itemchangedjob.h 1970-01-01 00:00:00.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/kolabproxy/itemchangedjob.h 2014-03-13 08:12:29.000000000 +0000 @@ -0,0 +1,44 @@ +/* + Copyright (c) 2013 Christian Mollekopf + + 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 ITEMCHANGEDJOB_H +#define ITEMCHANGEDJOB_H +#include +#include "kolabhandler.h" +#include "handlermanager.h" + +class ItemChangedJob: public KJob +{ + Q_OBJECT +public: + ItemChangedJob(const Akonadi::Item &kolabItem, HandlerManager &handler, QObject* parent); + virtual void start(); + Akonadi::Item item() const; +private slots: + void onKolabCollectionFetched(KJob* job); + void onImapItemFetchDone(KJob *job); + void onCollectionFetchDone(KJob *job); + void onItemAddedDone(KJob *job); + void onItemModifyDone(KJob *job); +private: + HandlerManager &mHandlerManager; + KolabHandler::Ptr mHandler; + const Akonadi::Item mKolabItem; +}; + +#endif \ No newline at end of file diff -Nru kdepim-runtime-4.12.3/resources/kolabproxy/journalhandler.cpp kdepim-runtime-4.12.90/resources/kolabproxy/journalhandler.cpp --- kdepim-runtime-4.12.3/resources/kolabproxy/journalhandler.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/kolabproxy/journalhandler.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -36,7 +36,7 @@ return Kolab::KolabObjectWriter::writeJournal( incidence.dynamicCast(), - m_formatVersion, PRODUCT_ID, m_calendar.timeZoneId() ); + m_formatVersion, PRODUCT_ID, QLatin1String("UTC") ); } QStringList JournalHandler::contentMimeTypes() diff -Nru kdepim-runtime-4.12.3/resources/kolabproxy/kolabdefs.cpp kdepim-runtime-4.12.90/resources/kolabproxy/kolabdefs.cpp --- kdepim-runtime-4.12.3/resources/kolabproxy/kolabdefs.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/kolabproxy/kolabdefs.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -19,7 +19,7 @@ #include "kolabdefs.h" -#include +#include #include @@ -101,3 +101,17 @@ { return Kolab::folderTypeFromString( std::string(folderTypeName.data(), folderTypeName.size()) ); } + +QByteArray Kolab::getFolderTypeAnnotation(const QMap< QByteArray, QByteArray > &annotations) +{ + if ( annotations.contains( "/shared" KOLAB_FOLDER_TYPE_ANNOTATION ) ) { + return annotations.value( "/shared" KOLAB_FOLDER_TYPE_ANNOTATION ); + } + return annotations.value(KOLAB_FOLDER_TYPE_ANNOTATION); +} + +void Kolab::setFolderTypeAnnotation(QMap< QByteArray, QByteArray >& annotations, const QByteArray& value) +{ + annotations["/shared" KOLAB_FOLDER_TYPE_ANNOTATION] = value; +} + diff -Nru kdepim-runtime-4.12.3/resources/kolabproxy/kolabdefs.h kdepim-runtime-4.12.90/resources/kolabproxy/kolabdefs.h --- kdepim-runtime-4.12.3/resources/kolabproxy/kolabdefs.h 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/kolabproxy/kolabdefs.h 2014-03-13 08:12:29.000000000 +0000 @@ -21,12 +21,15 @@ #define KOLABPROXY_KOLABDEFS_H #include +#include #include //libkolab #include //libkolab namespace Kolab { FolderType folderTypeFromString( const QByteArray &folderTypeName ); + QByteArray getFolderTypeAnnotation( const QMap &annotations); + void setFolderTypeAnnotation( QMap &annotations, const QByteArray &value); } namespace KolabV2 { diff -Nru kdepim-runtime-4.12.3/resources/kolabproxy/kolabhandler.cpp kdepim-runtime-4.12.90/resources/kolabproxy/kolabhandler.cpp --- kdepim-runtime-4.12.3/resources/kolabproxy/kolabhandler.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/kolabproxy/kolabhandler.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -24,16 +24,19 @@ #include "calendarhandler.h" #include "notehandler.h" #include "taskshandler.h" +#include "imapitemaddedjob.h" +#include "imapitemremovedjob.h" #include //libkolab -#include -#include +#include +#include KolabHandler::KolabHandler( const Akonadi::Collection &imapCollection ) : m_imapCollection( imapCollection ), m_formatVersion ( Kolab::KolabV3 ), - m_warningDisplayLevel( Kolab::ErrorHandler::Error ) + m_warningDisplayLevel( Kolab::ErrorHandler::Error ), + mItemAddJobInProgress( false ) { } @@ -149,12 +152,73 @@ } kWarning() << "Error on item " << affectedItem << ":\n" << errorMsg; - KPassivePopup *popup = KPassivePopup::message( - i18n( "An error occurred while reading/writing a Kolab-Groupware-Object(akonadi id %1): \n%2", - affectedItem, errorMsg ), - (QWidget*) 0 ); - popup->setTimeout(120000); Kolab::ErrorHandler::instance().clear(); return true; } +Akonadi::Item::List KolabHandler::resolveConflicts(const Akonadi::Item::List& kolabItems) +{ + //we should preserve the order here + Akonadi::Item::List finalItems; + QMap gidItemMap; + foreach (const Akonadi::Item &item, kolabItems) { + const QString gid = extractGid(item); + if (!gid.isEmpty()) { + gidItemMap[gid] << item; + } + } + foreach (const Akonadi::Item &item, kolabItems) { + const QString gid = extractGid(item); + if (gid.isEmpty()) { + finalItems << item; + } else if (gidItemMap.contains(gid)) { + //TODO assuming the items are in revers imap uid order (newest first) + finalItems << gidItemMap.value(gid).first(); + gidItemMap.remove(gid); + } + } + return finalItems; +} + +void KolabHandler::processItemAddedQueue() +{ + if (mItemAddedQueue.isEmpty() || mItemAddJobInProgress) { + return; + } + //TODO we would only have to serialize add jobs for items with the same GID + mItemAddJobInProgress = true; + const QPair pair = mItemAddedQueue.dequeue(); + ImapItemAddedJob *addedJob = new ImapItemAddedJob( pair.first, pair.second, *this, this ); + connect(addedJob, SIGNAL(result(KJob*)), this, SLOT(onItemAdded(KJob*))); + addedJob->start(); +} + +void KolabHandler::onItemAdded(KJob *job) +{ + mItemAddJobInProgress = false; + if (job->error()) { + kWarning() << job->errorString(); + } + processItemAddedQueue(); +} + +void KolabHandler::imapItemAdded(const Akonadi::Item& imapItem, const Akonadi::Collection& imapCollection) +{ + mItemAddedQueue.enqueue(qMakePair(imapItem, imapCollection)); + processItemAddedQueue(); +} + +void KolabHandler::imapItemRemoved(const Akonadi::Item& imapItem) +{ + //TODO delay this in case an imapItemAdded job is already running (it might reuse the item) + ImapItemRemovedJob *job = new ImapItemRemovedJob(imapItem, this); + connect(job, SIGNAL(result(KJob*)), this, SLOT(checkResult(KJob*))); + job->start(); +} + +void KolabHandler::checkResult(KJob* job) +{ + if ( job->error() ) { + kWarning() << "Error occurred: " << job->errorString(); + } +} \ No newline at end of file diff -Nru kdepim-runtime-4.12.3/resources/kolabproxy/kolabhandler.h kdepim-runtime-4.12.90/resources/kolabproxy/kolabhandler.h --- kdepim-runtime-4.12.3/resources/kolabproxy/kolabhandler.h 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/kolabproxy/kolabhandler.h 2014-03-13 08:12:29.000000000 +0000 @@ -26,9 +26,11 @@ #include #include +#include #include //libkolab +class KJob; /** @author Andras Mantia */ @@ -60,6 +62,15 @@ virtual ~KolabHandler(); /** + * Extracts the UID of a kolab object from an imap item. + * + * Used for conflict detection. + */ + virtual QString extractGid( const Akonadi::Item &kolabItem ) = 0; + + Akonadi::Item::List resolveConflicts( const Akonadi::Item::List &kolabItems ); + + /** * Translates Kolab items into the items supported by the handler. * @param addrs * @return the translated items @@ -86,20 +97,6 @@ virtual QByteArray mimeType() const; - virtual void itemDeleted( const Akonadi::Item &item ) - { - Q_UNUSED( item ); - } - - virtual void itemAdded( const Akonadi::Item &item ) - { - Q_UNUSED( item ); - } - - virtual void reset() - { - } - void setKolabFormatVersion( Kolab::Version ); /** @@ -117,9 +114,8 @@ */ bool checkForErrors( Akonadi::Item::Id affectedItem ); - Q_SIGNALS: - void deleteItemFromImap( const Akonadi::Item &item ); - void addItemToImap( const Akonadi::Item &item, Akonadi::Entity::Id collectionId ); + void imapItemAdded(const Akonadi::Item &imapItem, const Akonadi::Collection &imapCollection); + void imapItemRemoved(const Akonadi::Item &imapItem); protected: explicit KolabHandler( const Akonadi::Collection &imapCollection ); @@ -128,6 +124,37 @@ Akonadi::Collection m_imapCollection; Kolab::Version m_formatVersion; int m_warningDisplayLevel; + + private slots: + void onItemAdded(KJob*); + void checkResult(KJob*); + + private: + void processItemAddedQueue(); + QQueue > mItemAddedQueue; + bool mItemAddJobInProgress; }; +template +static inline T kolabToImap( const T &kolabObject ) +{ + return T( kolabObject.remoteId().toLongLong() ); +} + +template +static inline T imapToKolab( const T &imapObject, T &kolabObject) +{ + kolabObject.setRemoteId( QString::number( imapObject.id() ) ); + return kolabObject; +} + +template +static inline T imapToKolab( const T &imapObject ) +{ + T kolabObject; + imapToKolab( imapObject, kolabObject ); + return kolabObject; +} + + #endif diff -Nru kdepim-runtime-4.12.3/resources/kolabproxy/kolabproxyresource.cpp kdepim-runtime-4.12.90/resources/kolabproxy/kolabproxyresource.cpp --- kdepim-runtime-4.12.3/resources/kolabproxy/kolabproxyresource.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/kolabproxy/kolabproxyresource.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -26,6 +26,11 @@ #include "settingsadaptor.h" #include "kolabproxyadaptor.h" #include "setupkolab.h" +#include "imapitemaddedjob.h" +#include "imapitemremovedjob.h" +#include "itemaddedjob.h" +#include "itemchangedjob.h" +#include "revertitemchangesjob.h" #include #include "collectionannotationsattribute.h" //from shared @@ -41,17 +46,15 @@ #include #include #include -#include #include #include #include -#include #include #include -#include -#include +#include #include +#include #include #include @@ -65,22 +68,6 @@ #endif static const char KOLAB_COLLECTION[] = "KolabCollection"; -static const char KOLAB_ITEM[] = "KolabItem"; -static const char IMAP_COLLECTION[] = "ImapCollection"; - -template -static inline T kolabToImap( const T &kolabObject ) -{ - return T( kolabObject.remoteId().toLongLong() ); -} - -template -static inline T imapToKolab( const T &imapObject ) -{ - T kolabObject; - kolabObject.setRemoteId( QString::number( imapObject.id() ) ); - return kolabObject; -} static QString mailBoxForImapCollection( const Akonadi::Collection &imapCollection, bool showWarnings ) @@ -110,7 +97,8 @@ } KolabProxyResource::KolabProxyResource( const QString &id ) - : ResourceBase( id ) + : ResourceBase( id ), + mHandlerManager( new HandlerManager ) { Akonadi::AttributeFactory::registerAttribute(); new SettingsAdaptor( Settings::self() ); @@ -173,19 +161,31 @@ { } -KolabHandler::Ptr KolabProxyResource::getHandler(Akonadi::Entity::Id collectionId) +void KolabProxyResource::showErrorMessage(const QString &msg) { - KolabHandler::Ptr handler = m_monitoredCollections.value(collectionId); - if ( !handler ) { - kWarning() << "No handler for collection available: " << collectionId; - return KolabHandler::Ptr(); - } - return handler; + KNotification *notification = new KNotification(QLatin1String("Error"), KNotification::CloseOnTimeout, 0); + notification->setText(msg); + notification->setComponentData(KGlobal::mainComponent()); + notification->sendEvent(); +} + +bool KolabProxyResource::registerHandlerForCollection(const Akonadi::Collection& imapCollection) +{ + const Kolab::Version v = SetupKolab::readKolabVersion( imapCollection.resource() ); + if ( mHandlerManager->registerHandlerForCollection( imapCollection, v ) ) { + m_monitor->setCollectionMonitored( imapCollection ); + return true; + } + return false; +} + +QString KolabProxyResource::imapResourceForCollection( Akonadi::Entity::Id id) +{ + return mHandlerManager->imapResourceForCollection( id ); } void KolabProxyResource::retrieveCollections() { - kDebug() << "RETRIEVECOLLECTIONS "; CollectionTreeBuilder *job = new CollectionTreeBuilder( this ); connect( job, SIGNAL(result(KJob*)), this, SLOT(retrieveCollectionsTreeDone(KJob*)) ); } @@ -209,15 +209,14 @@ void KolabProxyResource::retrieveItems( const Akonadi::Collection &collection ) { - kDebug() << "RETRIEVEITEMS"; const Akonadi::Collection imapCollection = kolabToImap( collection ); - const KolabHandler::Ptr handler = getHandler( imapCollection.id() ); - if ( !handler ) { + if ( !mHandlerManager->isMonitored( imapCollection.id() ) ) { + //This should never happen + kWarning() << "received a retrieveItems request for a collection without imap counterpart" << collection.id(); cancelTask(); return; } - handler->reset(); Akonadi::ItemFetchJob *job = new Akonadi::ItemFetchJob( imapCollection ); job->fetchScope().fetchFullPayload(); job->fetchScope().setIgnoreRetrievalErrors( true ); @@ -238,20 +237,19 @@ itemsRetrieved( Akonadi::Item::List() ); return; } - const KolabHandler::Ptr handler = getHandler( items[0].storageCollectionId() ); + const KolabHandler::Ptr handler = mHandlerManager->getHandler( items[0].storageCollectionId() ); if ( !handler ) { cancelTask(); return; } - const Akonadi::Item::List newItems = handler->translateItems( items ); + const Akonadi::Item::List newItems = handler->resolveConflicts( handler->translateItems( items ) ); + itemsRetrieved( newItems ); - kDebug() << "RETRIEVEITEM DONE"; } bool KolabProxyResource::retrieveItem( const Akonadi::Item &item, const QSet &parts ) { Q_UNUSED( parts ); - kDebug() << "RETRIEVEITEM"; Akonadi::ItemFetchJob *job = new Akonadi::ItemFetchJob( kolabToImap( item ) ); job->fetchScope().fetchFullPayload(); job->setProperty( "itemId", item.id() ); @@ -272,7 +270,7 @@ cancelTask(); return; } - const KolabHandler::Ptr handler = getHandler( items[0].storageCollectionId() ); + const KolabHandler::Ptr handler = mHandlerManager->getHandler( items[0].storageCollectionId() ); if ( !handler ) { cancelTask(); return; @@ -286,12 +284,11 @@ Akonadi::Item item = newItems[0]; item.setId(job->property("itemId").value()); itemRetrieved( item ); - kDebug() << "RETRIEVEITEM DONE"; } void KolabProxyResource::aboutToQuit() { - m_monitoredCollections.clear(); + mHandlerManager->clear(); } void KolabProxyResource::configure( WId windowId ) @@ -311,9 +308,9 @@ kolabConfigDialog->exec(); emit configurationDialogAccepted(); - foreach ( Akonadi::Entity::Id id, m_monitoredCollections.keys() ) { //krazy:exclude=foreach - KolabHandler::Ptr handler = m_monitoredCollections.value( id ); - Kolab::Version v = SetupKolab::readKolabVersion( m_resourceIdentifier.value( id ) ); + foreach ( Akonadi::Entity::Id id, mHandlerManager->monitoredCollections() ) { //krazy:exclude=foreach + KolabHandler::Ptr handler = mHandlerManager->getHandler( id ); + Kolab::Version v = SetupKolab::readKolabVersion( mHandlerManager->imapResourceForCollection( id ) ); handler->setKolabFormatVersion( v ); } @@ -323,56 +320,32 @@ void KolabProxyResource::itemAdded( const Akonadi::Item &kolabItem, const Akonadi::Collection &collection ) { - kDebug() << "ITEMADDED"; - -// kDebug() << "Item added " << item.id() << collection.remoteId() << collection.id(); - const Akonadi::Collection imapCollection = kolabToImap( collection ); - createItem( imapCollection, kolabItem ); -} - -void KolabProxyResource::createItem( const Akonadi::Collection &imapCollection, const Akonadi::Item &kolabItem ) -{ - const KolabHandler::Ptr handler = getHandler( imapCollection.id() ); + const KolabHandler::Ptr handler = mHandlerManager->getHandler( imapCollection.id() ); if ( !handler ) { + kWarning() << "Couldn't find a handler for the collection, but we should have one: " << imapCollection.id(); + showErrorMessage(i18n("An error occured while writing the item to the backend.")); cancelTask(); + new Akonadi::ItemDeleteJob(kolabItem); return; } - Akonadi::Item imapItem( handler->contentMimeTypes()[0] ); - if (!handler->toKolabFormat( kolabItem, imapItem )) { - kWarning() << "Failed to convert item to kolab format: " << kolabItem.id(); - cancelTask(); - return; - } - imapItem.setFlag( Akonadi::MessageFlags::Seen ); - - Akonadi::ItemCreateJob *cjob = new Akonadi::ItemCreateJob( imapItem, imapCollection ); - cjob->setProperty( KOLAB_ITEM, QVariant::fromValue( kolabItem ) ); - cjob->setProperty( IMAP_COLLECTION, QVariant::fromValue( imapCollection ) ); - connect( cjob, SIGNAL(result(KJob*)), SLOT(imapItemCreationResult(KJob*)) ); + ItemAddedJob *itemAddedJob = new ItemAddedJob(kolabItem, collection, *handler, this); + connect(itemAddedJob, SIGNAL(result(KJob*)), this, SLOT(onItemAddedDone(KJob*))); + itemAddedJob->start(); } -void KolabProxyResource::imapItemCreationResult( KJob *job ) +void KolabProxyResource::onItemAddedDone(KJob* job) { - if ( job->error() ) { - cancelTask( job->errorText() ); - return; - } - - Akonadi::ItemCreateJob *cjob = qobject_cast( job ); - const Akonadi::Item imapItem = cjob->item(); - Akonadi::Item kolabItem = cjob->property( KOLAB_ITEM ).value(); - - // TODO add accessor to ItemCreateJob for the parent collection - const Akonadi::Collection imapCollection = - cjob->property( IMAP_COLLECTION ).value(); - - const KolabHandler::Ptr handler = getHandler( imapCollection.id() ); - if ( !handler ) { - cancelTask( ); + ItemAddedJob *itemAddedJob = static_cast(job); + Akonadi::Item kolabItem = itemAddedJob->kolabItem(); + const Akonadi::Item imapItem = itemAddedJob->imapItem(); + if (job->error()) { + kWarning() << "Failed to create imap item: " << job->errorString(); + showErrorMessage(i18n("An error occured while writing the item to the backend.")); + cancelTask(); + new Akonadi::ItemDeleteJob(kolabItem); return; } - handler->itemAdded( imapItem ); m_excludeAppend << imapItem.id(); kolabItem.setRemoteId( QString::number( imapItem.id() ) ); @@ -383,71 +356,24 @@ const QSet &parts ) { Q_UNUSED( parts ); - kDebug() << "ITEMCHANGED" << kolabItem.id() << kolabItem.remoteId(); - - Akonadi::ItemFetchJob *job = new Akonadi::ItemFetchJob( kolabToImap( kolabItem ), this ); - job->setProperty( KOLAB_ITEM, QVariant::fromValue( kolabItem ) ); - connect( job, SIGNAL(result(KJob*)), SLOT(imapItemUpdateFetchResult(KJob*)) ); + ItemChangedJob *itemChangedJob = new ItemChangedJob(kolabItem, *mHandlerManager, this); + connect(itemChangedJob, SIGNAL(result(KJob*)), this, SLOT(onItemChangedDone(KJob*))); + itemChangedJob->start(); } -void KolabProxyResource::imapItemUpdateFetchResult( KJob *job ) +void KolabProxyResource::onItemChangedDone(KJob* job) { + ItemChangedJob *itemChangedJob = static_cast(job); if ( job->error() ) { + showErrorMessage(i18n("An error occured while writing the item to the backend.")); cancelTask( job->errorText() ); + kWarning() << "Failed to modify item, reverting to state of imap item: " << itemChangedJob->item().id(); + RevertItemChangesJob *revertJob = new RevertItemChangesJob(itemChangedJob->item(), *mHandlerManager, this); + connect(revertJob, SIGNAL(result(KJob*)), this, SLOT(checkResult(KJob*))); + revertJob->start(); return; } - - const Akonadi::Item kolabItem = job->property( KOLAB_ITEM ).value(); - - Akonadi::ItemFetchJob *fetchJob = qobject_cast( job ); - if (fetchJob->items().isEmpty()) { //The corresponding imap item hasn't been created yet - Akonadi::CollectionFetchJob *fetch = - new Akonadi::CollectionFetchJob( Akonadi::Collection( kolabItem.storageCollectionId() ), - Akonadi::CollectionFetchJob::Base, this ); - fetch->setProperty( KOLAB_ITEM, QVariant::fromValue( kolabItem ) ); - connect( fetch, SIGNAL(result(KJob*)), SLOT(imapItemUpdateCollectionFetchResult(KJob*)) ); - } else { - Akonadi::Item imapItem = fetchJob->items().first(); - - const KolabHandler::Ptr handler = getHandler( imapItem.storageCollectionId() ); - if ( !handler ) { - cancelTask(); - return; - } - - if (!handler->toKolabFormat( kolabItem, imapItem )) { - kWarning() << "Failed to convert item to kolab format: " << kolabItem.id(); - cancelTask(); - return; - } - Akonadi::ItemModifyJob *mjob = new Akonadi::ItemModifyJob( imapItem ); - mjob->setProperty( KOLAB_ITEM, fetchJob->property( KOLAB_ITEM ) ); - connect( mjob, SIGNAL(result(KJob*)), SLOT(imapItemUpdateResult(KJob*)) ); - } -} - -void KolabProxyResource::imapItemUpdateCollectionFetchResult( KJob *job ) -{ - Akonadi::CollectionFetchJob *fetchJob = qobject_cast( job ); - if ( job->error() || fetchJob->collections().isEmpty() ) { - cancelTask( job->errorText() ); - return; - } - - const Akonadi::Item kolabItem = job->property( KOLAB_ITEM ).value(); - const Akonadi::Collection kolabCollection = fetchJob->collections().first(); - const Akonadi::Collection imapCollection = kolabToImap( kolabCollection ); - createItem( imapCollection, kolabItem ); -} - -void KolabProxyResource::imapItemUpdateResult( KJob *job ) -{ - if ( job->error() ) { - cancelTask( job->errorText() ); - return; - } - const Akonadi::Item kolabItem = job->property( KOLAB_ITEM ).value(); - changeCommitted( kolabItem ); + changeCommitted( itemChangedJob->item() ); } void KolabProxyResource::itemMoved( const Akonadi::Item &item, @@ -455,14 +381,13 @@ const Akonadi::Collection &collectionDestination ) { Q_UNUSED( collectionSource ); - new Akonadi::ItemMoveJob( kolabToImap( item ), kolabToImap( collectionDestination ), this ); + KJob *job = new Akonadi::ItemMoveJob( kolabToImap( item ), kolabToImap( collectionDestination ), this ); + connect(job, SIGNAL(result(KJob*)), this, SLOT(checkResult(KJob*))); changeCommitted( item ); } void KolabProxyResource::itemRemoved( const Akonadi::Item &item ) { - kDebug() << "ITEMREMOVED"; - kDebug() << "Item removed " << item.id() << item.remoteId(); const Akonadi::Item imapItem( item.remoteId().toUInt() ); Akonadi::ItemDeleteJob *djob = new Akonadi::ItemDeleteJob( imapItem ); changeCommitted( item ); @@ -494,10 +419,7 @@ Akonadi::Collection::AddIfMissing ); QMap annotations = attr->annotations(); - - annotations[KOLAB_FOLDER_TYPE_ANNOTATION] = - KolabHandler::kolabTypeForMimeType( collection.contentMimeTypes() ); - + Kolab::setFolderTypeAnnotation( annotations, KolabHandler::kolabTypeForMimeType( collection.contentMimeTypes() ) ); attr->setAnnotations( annotations ); Akonadi::CollectionCreateJob *job = new Akonadi::CollectionCreateJob( imapCollection, this ); @@ -545,10 +467,10 @@ } if ( attr->type() == "AccessRights" ) { + // Don't propagate access rights here, since it's already propagated using Collection::rights continue; } - //kDebug() << "cloning" << attr->type(); imapCollection.addAttribute( attr->clone() ); } } @@ -571,18 +493,17 @@ continue; } - //kDebug() << "cloning" << attr->type(); kolabCollection.addAttribute( attr->clone() ); } } void KolabProxyResource::updateFreeBusyInformation( const Akonadi::Collection &imapCollection ) { - if ( !isHandledKolabFolder( imapCollection ) ) { + if ( !HandlerManager::isHandledKolabFolder( imapCollection ) ) { return; } - if ( getFolderType( imapCollection ) != Kolab::EventType ) { + if ( HandlerManager::getFolderType( imapCollection ) != Kolab::EventType ) { return; } @@ -660,7 +581,8 @@ const Akonadi::Collection &destination ) { Q_UNUSED( source ); - new Akonadi::CollectionMoveJob( kolabToImap( collection ), kolabToImap( destination ), this ); + KJob *job = new Akonadi::CollectionMoveJob( kolabToImap( collection ), kolabToImap( destination ), this ); + connect(job, SIGNAL(result(KJob*)), this, SLOT(checkResult(KJob*))); changeCommitted( collection ); } @@ -674,103 +596,63 @@ changeCommitted( collection ); } -void KolabProxyResource::deleteImapItem( const Akonadi::Item &item ) -{ - kDebug() << "DELETEIMAPITEM"; - Akonadi::ItemDeleteJob *djob = new Akonadi::ItemDeleteJob( item ); - Q_UNUSED( djob ); -} - -void KolabProxyResource::addImapItem( const Akonadi::Item &item, - Akonadi::Entity::Id collectionId ) -{ - kDebug() << "ADDITEMTOIMAP"; - new Akonadi::ItemCreateJob( item, Akonadi::Collection( collectionId ) ); -} - void KolabProxyResource::imapItemAdded( const Akonadi::Item &item, const Akonadi::Collection &collection ) { - kDebug() << item.id() << collection.id() << Akonadi::Collection::root().id(); + //We only want updates about collections that are not from this resource + if ( collection.resource() == identifier() ) { + return; + } if ( m_excludeAppend.contains( item.id() ) ) { kDebug() << "item already present"; m_excludeAppend.removeAll( item.id() ); return; } - //TODO: slow, would be nice if ItemCreateJob would work with a Collection - // having only the remoteId set - const Akonadi::Collection kolabCol = imapToKolab( collection ); - Akonadi::CollectionFetchJob *job = - new Akonadi::CollectionFetchJob( kolabCol, Akonadi::CollectionFetchJob::Base, this ); - connect( job, SIGNAL(result(KJob*)), this, SLOT(collectionFetchDone(KJob*)) ); - job->setProperty( KOLAB_ITEM, QVariant::fromValue( item ) ); - job->setProperty( "collectionId", QString::number( collection.id() ) ); + if ( const KolabHandler::Ptr handler = mHandlerManager->getHandler( collection.id() ) ) { + handler->imapItemAdded(item, collection); + } } -void KolabProxyResource::collectionFetchDone( KJob *job ) +void KolabProxyResource::imapItemRemoved( const Akonadi::Item &item ) { - if ( job->error() ) { - kWarning( ) << "Error on collection fetch:" << job->errorText(); + //We only want updates about collections that are not from this resource + if ( item.parentCollection().resource() == identifier() ) { return; } - Akonadi::Collection::List collections = - qobject_cast(job)->collections(); - Q_ASSERT(collections.size() == 1); - const Akonadi::Collection c = collections[0]; - Q_ASSERT(c.remoteId() == job->property("collectionId").toString() ); - - if ( const KolabHandler::Ptr handler = getHandler( c.remoteId().toUInt() ) ) { - const Akonadi::Item item = job->property( KOLAB_ITEM ).value(); - const Akonadi::Item::List newItems = handler->translateItems( Akonadi::Item::List() << item ); - if ( !newItems.isEmpty() ) { - Akonadi::ItemCreateJob *cjob = new Akonadi::ItemCreateJob( newItems[0], c ); - connect( cjob, SIGNAL(result(KJob*)), this, SLOT(itemCreatedDone(KJob*)) ); - } + if ( const KolabHandler::Ptr handler = mHandlerManager->getHandler( item.parentCollection().id() ) ) { + handler->imapItemRemoved(item); } else { - kWarning() << "No handler found"; + //The handler is already gone, + kWarning() << "Couldn't find handler for collection " << item.storageCollectionId(); + ImapItemRemovedJob *job = new ImapItemRemovedJob(item, this); + connect(job, SIGNAL(result(KJob*)), this, SLOT(checkResult(KJob*))); + job->start(); } } -void KolabProxyResource::itemCreatedDone( KJob *job ) -{ - if ( job->error() ) { - kWarning( ) << "Error on creating item:" << job->errorText(); - } -} - -void KolabProxyResource::imapItemRemoved( const Akonadi::Item &item ) -{ - kDebug() << "IMAPITEMREMOVED"; - const Akonadi::Item kolabItem = imapToKolab( item ); - Q_FOREACH ( KolabHandler::Ptr handler, m_monitoredCollections ) { - handler->itemDeleted( item ); - } - Akonadi::ItemDeleteJob *job = new Akonadi::ItemDeleteJob( kolabItem, this ); - Q_UNUSED( job ); -} - void KolabProxyResource::imapItemMoved( const Akonadi::Item &item, const Akonadi::Collection &collectionSource, const Akonadi::Collection &collectionDestination ) { - kDebug(); - Q_UNUSED( collectionSource ); - new Akonadi::ItemMoveJob( imapToKolab( item ), imapToKolab( collectionDestination ), this ); + //We only want updates about collections that are not from this resource + if ( collectionSource.resource() == identifier() || collectionDestination.resource() == identifier() ) { + return; + } + KJob *job = new Akonadi::ItemMoveJob( imapToKolab( item ), imapToKolab( collectionDestination ), this ); + connect(job, SIGNAL(result(KJob*)), this, SLOT(checkResult(KJob*))); } void KolabProxyResource::imapCollectionAdded( const Akonadi::Collection &collection, const Akonadi::Collection &parent ) { Q_UNUSED( parent ); + //We only want updates about collections that are not from this resource if ( collection.resource() == identifier() ) { - // just to be sure... return; } - - kDebug() << "IMAPCOLLECTIONADDED"; - if ( m_monitoredCollections.contains( collection.id() ) ) { + if ( mHandlerManager->isMonitored( collection.id() ) ) { // something is wrong, so better reload out collection tree - kDebug() << "IMAPCOLLECTIONADDED ABORT"; + kWarning() << "IMAPCOLLECTIONADDED ABORT"; synchronizeCollectionTree(); return; } @@ -784,36 +666,15 @@ } } -Kolab::FolderType KolabProxyResource::getFolderType( const Akonadi::Collection& collection ) const -{ - Akonadi::CollectionAnnotationsAttribute *annotationsAttribute = - collection.attribute(); - if ( annotationsAttribute ) { - return Kolab::folderTypeFromString( annotationsAttribute->annotations().value(KOLAB_FOLDER_TYPE_ANNOTATION) ); - } - return Kolab::MailType; -} - -bool KolabProxyResource::isKolabFolder(const Akonadi::Collection &collection) const -{ - return (getFolderType(collection) != Kolab::MailType); -} - -bool KolabProxyResource::isHandledKolabFolder(const Akonadi::Collection& collection) const -{ - return KolabHandler::hasHandler(getFolderType(collection)); -} - void KolabProxyResource::imapCollectionChanged( const Akonadi::Collection &collection ) { + //We only want updates about collections that are not from this resource if ( collection.resource() == identifier() ) { - // just to be sure... return; } - //kDebug() << "IMAPCOLLECTIONCHANGED"; - if ( !m_monitoredCollections.contains( collection.id() ) ) { - if ( isHandledKolabFolder( collection ) ) { + if ( !mHandlerManager->isMonitored( collection.id() ) ) { + if ( HandlerManager::isHandledKolabFolder( collection ) ) { synchronizeCollectionTree(); return; } @@ -825,7 +686,7 @@ Akonadi::CollectionModifyJob *job = new Akonadi::CollectionModifyJob( kolabCollection, this ); Q_UNUSED( job ); } else { - if ( !isHandledKolabFolder( collection ) ) { + if ( !HandlerManager::isHandledKolabFolder( collection ) ) { //This is no longer a kolab folder, remove removeFolder( collection ); return; @@ -844,9 +705,14 @@ const Akonadi::Collection &source, const Akonadi::Collection &destination ) { - kDebug(); - Q_UNUSED( source ); - new Akonadi::CollectionMoveJob( imapToKolab( collection ), imapToKolab( destination ), this ); + //We only want updates about collections that are not from this resource + if ( source.resource() == identifier() || destination.resource() == identifier() ) { + return; + } + if ( mHandlerManager->isMonitored( collection.id() ) ) { + KJob *job = new Akonadi::CollectionMoveJob( imapToKolab( collection ), imapToKolab( destination ), this ); + connect(job, SIGNAL(result(KJob*)), this, SLOT(checkResult(KJob*))); + } } void KolabProxyResource::kolabFolderChangeResult( KJob *job ) @@ -854,7 +720,7 @@ if ( job->error() ) { // something went wrong or the change was too complex to handle in the above slots, // so re-sync the entire tree. - kDebug() << "Re-syncing collection tree as incremental changes did not succeed." + kWarning() << "Re-syncing collection tree as incremental changes did not succeed." << job->errorText(); synchronizeCollectionTree(); } @@ -862,22 +728,24 @@ void KolabProxyResource::removeFolder( const Akonadi::Collection &imapCollection ) { - Akonadi::Collection kolabCollection; - kolabCollection.setRemoteId( QString::number( imapCollection.id() ) ); - new Akonadi::CollectionDeleteJob( kolabCollection ); - m_monitoredCollections.remove( imapCollection.id() ); + KJob *deleteJob = new Akonadi::CollectionDeleteJob( imapToKolab( imapCollection ) ); + connect(deleteJob, SIGNAL(result(KJob*)), this, SLOT(checkResult(KJob*))); + mHandlerManager->removeFolder( imapCollection.id() ); updateFreeBusyInformation( imapCollection ); } void KolabProxyResource::imapCollectionRemoved( const Akonadi::Collection &imapCollection ) { + //We only want updates about collections that are not from this resource if ( imapCollection.resource() == identifier() ) { - // just to be sure... return; } - - kDebug() << "IMAPCOLLECTIONREMOVED"; - removeFolder(imapCollection); + if (mHandlerManager->isMonitored( imapCollection.id())) { + removeFolder(imapCollection); + } else if ( imapCollection.parentCollection() == Akonadi::Collection::root() ) { + //we are not explicitly monitoring the top-level collection, but it should be removed anyways when the rest is gone + removeFolder(imapCollection); + } } Akonadi::Collection KolabProxyResource::createCollection( @@ -923,8 +791,8 @@ } } applyAttributesFromImap( c, imapCollection ); - if ( isKolabFolder( imapCollection ) ) { - KolabHandler::Ptr handler = m_monitoredCollections.value( imapCollection.id() ); + if ( HandlerManager::isKolabFolder( imapCollection ) ) { + KolabHandler::Ptr handler = mHandlerManager->getHandler( imapCollection.id() ); if ( handler ) { contentTypes.append( handler->contentMimeTypes() ); kolabAttr->setIconName( handler->iconName() ); @@ -936,51 +804,27 @@ return c; } -bool KolabProxyResource::registerHandlerForCollection( const Akonadi::Collection &imapCollection ) -{ - if ( isHandledKolabFolder( imapCollection ) ) { - KolabHandler::Ptr handler = - KolabHandler::createHandler( getFolderType( imapCollection ), imapCollection ); - - if ( handler ) { - Kolab::Version v = SetupKolab::readKolabVersion( imapCollection.resource() ); - handler->setKolabFormatVersion( v ); - connect( handler.data(), SIGNAL(deleteItemFromImap(Akonadi::Item)), - this, SLOT(deleteImapItem(Akonadi::Item))); - connect( handler.data(), SIGNAL(addItemToImap(Akonadi::Item,Akonadi::Entity::Id)), - this, SLOT(addImapItem(Akonadi::Item,Akonadi::Entity::Id))); - m_monitor->setCollectionMonitored( imapCollection ); - m_monitoredCollections.insert( imapCollection.id(), handler ); - m_resourceIdentifier.insert( imapCollection.id(), imapCollection.resource() ); - return true; - } - } - - return false; -} - -QString KolabProxyResource::imapResourceForCollection( Akonadi::Collection::Id id ) -{ - if (m_resourceIdentifier.contains(id)) { - return m_resourceIdentifier[id]; - } - return QString(); -} - void KolabProxyResource::updateHiddenAttribute( const Akonadi::Collection &imapCollection ) { - if ( isKolabFolder( imapCollection ) && !imapCollection.hasAttribute()) { + if ( HandlerManager::isKolabFolder( imapCollection ) && !imapCollection.hasAttribute()) { Akonadi::Collection hiddenImapCol( imapCollection ); hiddenImapCol.attribute( Akonadi::Collection::AddIfMissing ); - new Akonadi::CollectionModifyJob( hiddenImapCol, this ); + KJob *job = new Akonadi::CollectionModifyJob( hiddenImapCol, this ); + connect( job, SIGNAL(result(KJob*)), this, SLOT(checkResult(KJob*)) ); } - if ( !isKolabFolder( imapCollection ) && imapCollection.hasAttribute()) { + if ( !HandlerManager::isKolabFolder( imapCollection ) && imapCollection.hasAttribute()) { Akonadi::Collection unhiddenImapCol( imapCollection ); unhiddenImapCol.removeAttribute(); - new Akonadi::CollectionModifyJob( unhiddenImapCol, this ); + KJob *job = new Akonadi::CollectionModifyJob( unhiddenImapCol, this ); + connect( job, SIGNAL(result(KJob*)), this, SLOT(checkResult(KJob*)) ); } } -AKONADI_RESOURCE_MAIN( KolabProxyResource ) +void KolabProxyResource::checkResult(KJob* job) +{ + if ( job->error() ) { + kWarning() << "Error occurred: " << job->errorString(); + } +} -#include "kolabproxyresource.moc" +AKONADI_RESOURCE_MAIN( KolabProxyResource ) diff -Nru kdepim-runtime-4.12.3/resources/kolabproxy/kolabproxyresource.h kdepim-runtime-4.12.90/resources/kolabproxy/kolabproxyresource.h --- kdepim-runtime-4.12.3/resources/kolabproxy/kolabproxyresource.h 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/kolabproxy/kolabproxyresource.h 2014-03-13 08:12:29.000000000 +0000 @@ -22,6 +22,7 @@ #define KOLABPROXY_KOLABPROXYRESOURCE_H #include "kolabhandler.h" +#include "handlermanager.h" #include @@ -81,13 +82,9 @@ const Akonadi::Collection &source, const Akonadi::Collection &destination ); - void itemCreatedDone( KJob *job ); - void collectionFetchDone( KJob *job ); void retrieveItemFetchDone( KJob * ); void retrieveItemsFetchDone( KJob * ); void retrieveCollectionsTreeDone( KJob *job ); - void addImapItem( const Akonadi::Item &item, Akonadi::Entity::Id collectionId ); - void deleteImapItem( const Akonadi::Item &item ); protected: virtual void aboutToQuit(); @@ -128,25 +125,20 @@ void updateFreeBusyInformation( const Akonadi::Collection &imapCollection ); private slots: - void imapItemCreationResult( KJob *job ); - void imapItemUpdateFetchResult( KJob *job ); - void imapItemUpdateResult( KJob *job ); - void imapItemUpdateCollectionFetchResult( KJob *job ); + void onItemAddedDone(KJob *job); + void onItemChangedDone(KJob *job); void imapFolderCreateResult( KJob *job ); void kolabFolderChangeResult( KJob *job ); + void checkResult( KJob *job ); private: + void showErrorMessage(const QString &); void removeFolder( const Akonadi::Collection &imapCollection ); - KolabHandler::Ptr getHandler(Akonadi::Collection::Id); - bool isKolabFolder( const Akonadi::Collection &collection ) const; - bool isHandledKolabFolder( const Akonadi::Collection &collection ) const; - Kolab::FolderType getFolderType( const Akonadi::Collection &collection ) const; Akonadi::Monitor *m_monitor; Akonadi::Monitor *m_collectionMonitor; - QMap m_monitoredCollections; - QMap m_resourceIdentifier; QList m_excludeAppend; FreeBusyUpdateHandler *m_freeBusyUpdateHandler; + QScopedPointer mHandlerManager; }; #endif diff -Nru kdepim-runtime-4.12.3/resources/kolabproxy/notehandler.cpp kdepim-runtime-4.12.90/resources/kolabproxy/notehandler.cpp --- kdepim-runtime-4.12.3/resources/kolabproxy/notehandler.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/kolabproxy/notehandler.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -19,6 +19,7 @@ */ #include "notehandler.h" +#include NotesHandler::NotesHandler( const Akonadi::Collection &imapCollection ) : JournalHandler( imapCollection ) @@ -89,3 +90,15 @@ noteItem.setPayload( reader.getNote() ); return true; } + +QString NotesHandler::extractGid(const Akonadi::Item& kolabItem) +{ + if ( !kolabItem.hasPayload() ) { + kWarning() << "Payload is not a MessagePtr!"; + return QString(); + } + const KMime::Message::Ptr payload = kolabItem.payload(); + const Akonadi::NoteUtils::NoteMessageWrapper note(payload); + return note.uid(); +} + diff -Nru kdepim-runtime-4.12.3/resources/kolabproxy/notehandler.h kdepim-runtime-4.12.90/resources/kolabproxy/notehandler.h --- kdepim-runtime-4.12.3/resources/kolabproxy/notehandler.h 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/kolabproxy/notehandler.h 2014-03-13 08:12:29.000000000 +0000 @@ -33,6 +33,8 @@ virtual QStringList contentMimeTypes(); virtual QString iconName() const; + virtual QString extractGid(const Akonadi::Item& kolabItem); + private: bool noteFromKolab( const KMime::Message::Ptr &kolabMsg, Akonadi::Item ¬eItem ); void noteToKolab( const KMime::Message::Ptr ¬e, Akonadi::Item &kolabItem ); diff -Nru kdepim-runtime-4.12.3/resources/kolabproxy/revertitemchangesjob.cpp kdepim-runtime-4.12.90/resources/kolabproxy/revertitemchangesjob.cpp --- kdepim-runtime-4.12.3/resources/kolabproxy/revertitemchangesjob.cpp 1970-01-01 00:00:00.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/kolabproxy/revertitemchangesjob.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -0,0 +1,85 @@ +/* + Copyright (c) 2013 Christian Mollekopf + + 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 "revertitemchangesjob.h" +#include +#include +#include +#include + +RevertItemChangesJob::RevertItemChangesJob(const Akonadi::Item& kolabItem, HandlerManager &handlerManager, QObject* parent) + :KJob(parent), + mHandlerManager(handlerManager), + mKolabItem(kolabItem) +{ + +} + +void RevertItemChangesJob::start() +{ + Akonadi::ItemFetchJob *itemFetchJob = new Akonadi::ItemFetchJob(kolabToImap(mKolabItem), this); + itemFetchJob->fetchScope().fetchFullPayload(); + itemFetchJob->fetchScope().setAncestorRetrieval(Akonadi::ItemFetchScope::Parent); + connect(itemFetchJob, SIGNAL(result(KJob*)), SLOT(onImapItemFetchDone(KJob*))); +} + +void RevertItemChangesJob::onImapItemFetchDone(KJob* job) +{ + if ( job->error() ) { + setError(KJob::UserDefinedError); + emitResult(); + return; + } + + Akonadi::ItemFetchJob *fetchJob = qobject_cast(job); + if (fetchJob->items().isEmpty()) { //The corresponding imap item hasn't been created yet + kDebug() << "item is not yet created in imap resource, deleting the kolab item"; + Akonadi::ItemDeleteJob *deleteJob = new Akonadi::ItemDeleteJob(mKolabItem, this); + connect(deleteJob, SIGNAL(result(KJob*)), SLOT(onItemModifyDone(KJob*))); + } else { + kDebug() << "reverting to state of imap item"; + Akonadi::Item imapItem = fetchJob->items().first(); + const KolabHandler::Ptr handler = mHandlerManager.getHandler(imapItem.parentCollection().id()); + if (!handler) { + kWarning() << "No handler: " << imapItem.parentCollection().id(); + setError(KJob::UserDefinedError); + emitResult(); + return; + } + const Akonadi::Item::List translatedItems = handler->translateItems(fetchJob->items()); + + if (translatedItems.isEmpty()) { + kWarning() << "Failed to reload item: " << mKolabItem.id(); + setError(KJob::UserDefinedError); + emitResult(); + return; + } + Akonadi::Item kolabItem = translatedItems.first(); + kolabItem.setId(mKolabItem.id()); + Akonadi::ItemModifyJob *mjob = new Akonadi::ItemModifyJob(kolabItem); + connect(mjob, SIGNAL(result(KJob*)), SLOT(onItemModifyDone(KJob*))); + } +} + +void RevertItemChangesJob::onItemModifyDone(KJob *job) +{ + if (job->error()) { + setError(KJob::UserDefinedError); + } + emitResult(); +} diff -Nru kdepim-runtime-4.12.3/resources/kolabproxy/revertitemchangesjob.h kdepim-runtime-4.12.90/resources/kolabproxy/revertitemchangesjob.h --- kdepim-runtime-4.12.3/resources/kolabproxy/revertitemchangesjob.h 1970-01-01 00:00:00.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/kolabproxy/revertitemchangesjob.h 2014-03-13 08:12:29.000000000 +0000 @@ -0,0 +1,44 @@ +/* + Copyright (c) 2013 Christian Mollekopf + + 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 REVERTITEMCHANGESJOB +#define REVERTITEMCHANGESJOB + +#include +#include "handlermanager.h" + +/** + * Restore kolab item to the state of imapItem + */ +class RevertItemChangesJob: public KJob +{ + Q_OBJECT +public: + RevertItemChangesJob(const Akonadi::Item &kolabItem, HandlerManager &handlerManager, QObject* parent); + virtual void start(); + +private slots: + void onImapItemFetchDone(KJob* job); + void onItemModifyDone(KJob *job); + +private: + HandlerManager &mHandlerManager; + const Akonadi::Item mKolabItem; +}; + +#endif \ No newline at end of file diff -Nru kdepim-runtime-4.12.3/resources/kolabproxy/setupdefaultfoldersjob.cpp kdepim-runtime-4.12.90/resources/kolabproxy/setupdefaultfoldersjob.cpp --- kdepim-runtime-4.12.3/resources/kolabproxy/setupdefaultfoldersjob.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/kolabproxy/setupdefaultfoldersjob.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -30,7 +30,7 @@ #include #include -#include +#include SetupDefaultFoldersJob::SetupDefaultFoldersJob( const Akonadi::AgentInstance &instance, QObject *parent ) @@ -100,8 +100,7 @@ Akonadi::CollectionAnnotationsAttribute *attr = 0; if ( ( attr = col.attribute() ) ) { folderType = - KolabV2::folderTypeFromString( - attr->annotations().value( KOLAB_FOLDER_TYPE_ANNOTATION ) ); + KolabV2::folderTypeFromString( Kolab::getFolderTypeAnnotation( attr->annotations() ) ); } KolabV2::FolderType guessedType = KolabV2::guessFolderTypeFromName( col.name() ); @@ -142,10 +141,7 @@ col.attribute( Akonadi::Entity::AddIfMissing ); QMap annotations; - annotations.insert( - KOLAB_FOLDER_TYPE_ANNOTATION, - KolabV2::folderTypeToString( static_cast( i ), true ) ); - + Kolab::setFolderTypeAnnotation( annotations, KolabV2::folderTypeToString( static_cast( i ), true ) ); attr->setAnnotations( annotations ); if ( !iconName.isEmpty() ) { Akonadi::EntityDisplayAttribute *attribute = @@ -162,10 +158,7 @@ col.attribute( Akonadi::Entity::AddIfMissing ); QMap annotations; - annotations.insert( - KOLAB_FOLDER_TYPE_ANNOTATION, - KolabV2::folderTypeToString( static_cast( i ), true ) ); - + Kolab::setFolderTypeAnnotation( annotations, KolabV2::folderTypeToString( static_cast( i ), true ) ); attr->setAnnotations( annotations ); if ( !iconName.isEmpty() ) { Akonadi::EntityDisplayAttribute *attribute = @@ -180,4 +173,3 @@ emitResult(); } -#include "setupdefaultfoldersjob.moc" diff -Nru kdepim-runtime-4.12.3/resources/kolabproxy/setupkolab.cpp kdepim-runtime-4.12.90/resources/kolabproxy/setupkolab.cpp --- kdepim-runtime-4.12.3/resources/kolabproxy/setupkolab.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/kolabproxy/setupkolab.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -63,13 +63,9 @@ { KConfigGroup grp( getConfigGroup() ); if ( resourceIdentifier.isEmpty() ) { - kWarning() << "Empty resource identifier, defaulting to v3"; return Kolab::KolabV3; } const QString key (QLatin1String("KolabFormatVersion") + resourceIdentifier ); - if ( !grp.hasKey( key ) ) { - kWarning() << "resource not found, defaulting to v3: " << resourceIdentifier; - } Kolab::Version version = static_cast( grp.readEntry( key, static_cast( Kolab::KolabV3 ) ) ); return version; @@ -229,4 +225,3 @@ } } -#include "setupkolab.moc" diff -Nru kdepim-runtime-4.12.3/resources/kolabproxy/taskshandler.cpp kdepim-runtime-4.12.90/resources/kolabproxy/taskshandler.cpp --- kdepim-runtime-4.12.3/resources/kolabproxy/taskshandler.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/kolabproxy/taskshandler.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -36,7 +36,7 @@ return Kolab::KolabObjectWriter::writeTodo( incidence.dynamicCast(), - m_formatVersion, PRODUCT_ID, m_calendar.timeZoneId() ); + m_formatVersion, PRODUCT_ID, QLatin1String("UTC") ); } QStringList TasksHandler::contentMimeTypes() diff -Nru kdepim-runtime-4.12.3/resources/kolabproxy/tests/clientsidetest.cpp kdepim-runtime-4.12.90/resources/kolabproxy/tests/clientsidetest.cpp --- kdepim-runtime-4.12.3/resources/kolabproxy/tests/clientsidetest.cpp 1970-01-01 00:00:00.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/kolabproxy/tests/clientsidetest.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -0,0 +1,237 @@ +/* + Copyright (c) 2013 Christian Mollekopf + + 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 +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include //libkolab +#include + +#include "../kolabdefs.h" +#include "testutils.h" + +Q_DECLARE_METATYPE(QSet) + +using namespace Akonadi; + +/* + * Tests clientside actions against the kolab proxy, such as creating an item. + */ +class ClientSideTest : public QObject +{ + Q_OBJECT + + AgentInstance mInstance; + Akonadi::Collection imapCollection; + Akonadi::Collection kolabCollection; + +public: + ClientSideTest(): + QObject() + { + qRegisterMetaType(); + qRegisterMetaType(); + qRegisterMetaType >(); + } + + void cleanup() { + //cleanup + Akonadi::ItemDeleteJob *deleteJob = new Akonadi::ItemDeleteJob(imapCollection); + deleteJob->exec(); + Akonadi::ItemDeleteJob *deleteJob2 = new Akonadi::ItemDeleteJob(kolabCollection); + deleteJob2->exec(); + QTest::qWait(TIMEOUT); + } + +private slots: + void initTestCase() { + AkonadiTest::checkTestIsIsolated(); + AttributeFactory::registerAttribute(); + + const AgentType type = AgentManager::self()->type("akonadi_kolabproxy_resource"); + AgentInstanceCreateJob *agentCreateJob = new AgentInstanceCreateJob(type); + AKVERIFYEXEC(agentCreateJob); + mInstance = agentCreateJob->instance(); + + //Wait for kolabproxy to create all folders + QVERIFY(TestUtils::ensurePopulated(mInstance.identifier(), 6)); + + Akonadi::CollectionPathResolver *resolver = new CollectionPathResolver(QLatin1String("res1/Calendar"), this); + AKVERIFYEXEC(resolver); + imapCollection = Akonadi::Collection( resolver->collection() ); + QVERIFY(imapCollection.isValid()); + + kolabCollection = TestUtils::findCollection(mInstance.identifier(), "Calendar"); + QVERIFY(kolabCollection.isValid()); + } + + void testItemCreate() + { + KDateTime date(QDate(2013,10,10), KDateTime::ClockTime); + date.setDateOnly(true); + + KCalCore::Event::Ptr event(new KCalCore::Event()); + event->setDtStart(date); + Akonadi::Item createdItem; + { + Akonadi::Item item(event->mimeType()); + item.setPayload(event); + Akonadi::ItemCreateJob *createJob = new Akonadi::ItemCreateJob(item, kolabCollection); + QVERIFY(TestUtils::ensure(imapCollection, SIGNAL(itemAdded(Akonadi::Item,Akonadi::Collection)), createJob)); + createdItem = createJob->item(); + QVERIFY(createdItem.isValid()); + } + + { + Akonadi::ItemFetchJob *fetchJob = new Akonadi::ItemFetchJob(imapCollection); + AKVERIFYEXEC(fetchJob); + QCOMPARE(fetchJob->items().size(), 1); +// const Akonadi::Item item = fetchJob->items().first(); +// QCOMPARE(item.id(), createdItem.remoteId().toLongLong()); + } + cleanup(); + } + + void testItemCreateFailure() + { + KCalCore::Event::Ptr event(new KCalCore::Event()); + //an event requires an start date, so this will fail + { + Akonadi::Item item(event->mimeType()); + item.setPayload(event); + Akonadi::ItemCreateJob *createJob = new Akonadi::ItemCreateJob(item, kolabCollection); + //Check that the signal is NOT emitted within the timeout + QVERIFY(!TestUtils::ensure(imapCollection, SIGNAL(itemAdded(Akonadi::Item, Akonadi::Collection)), createJob)); + //TODO akonadi currently doesn't support failing itemcreatejobs if the resource fails to store the item. + // the item will simply remain dirty in the akonadi server +// QVERIFY(createJob->error()); + } + + //Ensure the item has been removed by the kolabproxy + { + Akonadi::ItemFetchJob *fetchJob = new Akonadi::ItemFetchJob(kolabCollection); + AKVERIFYEXEC(fetchJob); + QCOMPARE(fetchJob->items().size(), 0); + } + } + + void testItemModify() + { + KDateTime date1(QDate(2013,10,10), KDateTime::ClockTime); + date1.setDateOnly(true); + KDateTime date2(QDate(2014,10,10), KDateTime::ClockTime); + date2.setDateOnly(true); + + KCalCore::Event::Ptr event(new KCalCore::Event()); + event->setDtStart(date1); + Akonadi::Item createdItem; + { + Akonadi::Item item(event->mimeType()); + item.setPayload(event); + Akonadi::ItemCreateJob *createJob = new Akonadi::ItemCreateJob(item, kolabCollection); + QVERIFY(TestUtils::ensure(imapCollection, SIGNAL(itemAdded(Akonadi::Item, Akonadi::Collection)), createJob)); + createdItem = createJob->item(); + QVERIFY(createdItem.isValid()); + } + + { + event->setDtStart(date2); + createdItem.setPayload(event); + Akonadi::ItemModifyJob *modifyJob = new Akonadi::ItemModifyJob(createdItem); + QVERIFY(TestUtils::ensure(imapCollection, SIGNAL(itemChanged(Akonadi::Item, QSet)), modifyJob)); + Akonadi::Item modifiedItem = modifyJob->item(); + QVERIFY(modifiedItem.hasPayload()); + QCOMPARE(modifiedItem.payload()->dtStart().toString(), date2.toString()); + } + + { + Akonadi::ItemFetchJob *fetchJob = new Akonadi::ItemFetchJob(imapCollection); + fetchJob->fetchScope().fetchFullPayload(true); + AKVERIFYEXEC(fetchJob); + QCOMPARE(fetchJob->items().size(), 1); + const Akonadi::Item item = fetchJob->items().first(); + QVERIFY(item.hasPayload()); + Kolab::KolabObjectReader reader(item.payload()); + QCOMPARE(reader.getEvent()->dtStart().toString(), date2.toString()); + } + cleanup(); + } + + void testItemModifyFailure() + { + KDateTime date1(QDate(2013,10,10), KDateTime::ClockTime); + date1.setDateOnly(true); + + KCalCore::Event::Ptr event(new KCalCore::Event()); + event->setDtStart(date1); + Akonadi::Item createdItem; + { + Akonadi::Item item(event->mimeType()); + item.setPayload(event); + Akonadi::ItemCreateJob *createJob = new Akonadi::ItemCreateJob(item, kolabCollection); + QVERIFY(TestUtils::ensure(imapCollection, SIGNAL(itemAdded(Akonadi::Item, Akonadi::Collection)), createJob)); + createdItem = createJob->item(); + QVERIFY(createdItem.isValid()); + } + + { + event->setDtStart(KDateTime()); + createdItem.setPayload(event); + Akonadi::ItemModifyJob *modifyJob = new Akonadi::ItemModifyJob(createdItem); + AKVERIFYEXEC(modifyJob); + QTest::qWait(TIMEOUT); + //FIXME this fails, no idea why +// QVERIFY(!TestUtils::ensure(imapCollection, SIGNAL(itemChanged(Akonadi::Item, QSet)), modifyJob)); + } + + //Ensure the change has been reverted for the kolab item + { + Akonadi::ItemFetchJob *fetchJob = new Akonadi::ItemFetchJob(kolabCollection); + fetchJob->fetchScope().fetchFullPayload(); + AKVERIFYEXEC(fetchJob); + QCOMPARE(fetchJob->items().size(), 1); + const Akonadi::Item item = fetchJob->items().first(); + QVERIFY(item.hasPayload()); + QCOMPARE(item.payload()->dtStart().toString(), date1.toString()); + } + cleanup(); + } + +}; + +QTEST_AKONADIMAIN( ClientSideTest, NoGUI ) + +#include "clientsidetest.moc" diff -Nru kdepim-runtime-4.12.3/resources/kolabproxy/tests/CMakeLists.txt kdepim-runtime-4.12.90/resources/kolabproxy/tests/CMakeLists.txt --- kdepim-runtime-4.12.3/resources/kolabproxy/tests/CMakeLists.txt 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/kolabproxy/tests/CMakeLists.txt 2014-03-13 08:12:29.000000000 +0000 @@ -6,10 +6,27 @@ list( APPEND kolabproxy_shared_relative_SRCS "../${_file}" ) endforeach() -kde4_add_library(kolabresourcetest STATIC ${kolabproxy_shared_relative_SRCS} ${AKONADI_COLLECTIONATTRIBUTES_SHARED_SOURCES}) +kde4_add_library(kolabresourcetest STATIC + ${kolabproxy_shared_relative_SRCS} + ${AKONADI_COLLECTIONATTRIBUTES_SHARED_SOURCES} + testutils.cpp +) kde4_add_unit_test(kolabconvertertest kolabconvertertest.cpp) -target_link_libraries(kolabconvertertest kolabresourcetest ${Libkolab_LIBRARIES} ${KDEPIMLIBS_AKONADI_LIBS} ${QT_QTXML_LIBRARY} ${QT_QTDBUS_LIBRARY} ${KDE4_KIO_LIBS} ${KDEPIMLIBS_KABC_LIBS} ${KDEPIMLIBS_AKONADI_KMIME_LIBS} ${KDEPIMLIBS_KMIME_LIBS} ${QT_QTTEST_LIBRARY} kdepim-copy ${KDEPIMLIBS_KCALCORE_LIBS}) +target_link_libraries(kolabconvertertest + kolabresourcetest + ${Libkolab_LIBRARIES} + ${KDEPIMLIBS_AKONADI_LIBS} + ${QT_QTXML_LIBRARY} + ${QT_QTDBUS_LIBRARY} + ${KDE4_KIO_LIBS} + ${KDEPIMLIBS_KABC_LIBS} + ${KDEPIMLIBS_AKONADI_KMIME_LIBS} + ${KDEPIMLIBS_KMIME_LIBS} + ${QT_QTTEST_LIBRARY} + kdepim-copy + ${KDEPIMLIBS_KCALCORE_LIBS} +) #akonadi_add_resourcetest( imap-kolab imaptest-kolab.es ) #akonadi_add_resourcetest( imap-dovecot imaptest-dovecot.es ) @@ -21,3 +38,5 @@ set(KDEPIMLIBS_RUN_SQLITE_ISOLATED_TESTS TRUE) add_akonadi_isolated_test_advanced(proxyintegrationtest.cpp "" "kolabresourcetest;${Libkolab_LIBRARIES}") +add_akonadi_isolated_test_advanced(imapsignaltest.cpp "" "kolabresourcetest;${Libkolab_LIBRARIES}") +add_akonadi_isolated_test_advanced(clientsidetest.cpp "" "kolabresourcetest;${Libkolab_LIBRARIES}") diff -Nru kdepim-runtime-4.12.3/resources/kolabproxy/tests/imapsignaltest.cpp kdepim-runtime-4.12.90/resources/kolabproxy/tests/imapsignaltest.cpp --- kdepim-runtime-4.12.3/resources/kolabproxy/tests/imapsignaltest.cpp 1970-01-01 00:00:00.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/kolabproxy/tests/imapsignaltest.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -0,0 +1,338 @@ +/* + Copyright (c) 2013 Christian Mollekopf + + 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 +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include //libkolab +#include + +#include "../kolabdefs.h" +#include "testutils.h" + +using namespace Akonadi; + +Q_DECLARE_METATYPE(QSet) + +class ImapSignalTest : public QObject +{ + Q_OBJECT + + AgentInstance mInstance; + Akonadi::Collection imapCollection; + Akonadi::Collection kolabCollection; + +public: + ImapSignalTest(): + QObject() + { + qRegisterMetaType(); + qRegisterMetaType(); + qRegisterMetaType >(); + } + +private: + static Akonadi::Item createImapItem(const KCalCore::Event::Ptr &event) { + const KMime::Message::Ptr &message = Kolab::KolabObjectWriter::writeEvent(event, Kolab::KolabV3, "Proxytest", QLatin1String("UTC") ); + Q_ASSERT(message); + Akonadi::Item imapItem1; + imapItem1.setMimeType( QLatin1String("message/rfc822") ); + imapItem1.setPayload( message ); + return imapItem1; + } + + void cleanup() { + //cleanup +// Akonadi::ItemDeleteJob *deleteJob = new Akonadi::ItemDeleteJob(imapCollection); +// AKVERIFYEXEC(deleteJob); + Akonadi::ItemDeleteJob *deleteJob2 = new Akonadi::ItemDeleteJob(kolabCollection); + AKVERIFYEXEC(deleteJob2); + QTest::qWait(TIMEOUT); + } + +private slots: + void initTestCase() { + AkonadiTest::checkTestIsIsolated(); + AttributeFactory::registerAttribute(); + + const AgentType type = AgentManager::self()->type("akonadi_kolabproxy_resource"); + AgentInstanceCreateJob *agentCreateJob = new AgentInstanceCreateJob(type); + AKVERIFYEXEC(agentCreateJob); + mInstance = agentCreateJob->instance(); + + //Wait for kolabproxy to create all folders + QVERIFY(TestUtils::ensurePopulated(mInstance.identifier(), 5)); + + Akonadi::CollectionPathResolver *resolver = new CollectionPathResolver(QLatin1String("res1/Calendar"), this); + AKVERIFYEXEC(resolver); + imapCollection = Akonadi::Collection( resolver->collection() ); + QVERIFY(imapCollection.isValid()); + + kolabCollection = TestUtils::findCollection(mInstance.identifier(), "Calendar"); + QVERIFY(kolabCollection.isValid()); + } + + + void itemAddedSignal() { + KCalCore::Event::Ptr event(new KCalCore::Event); + event->setSummary("summary1"); + event->setDtStart(KDateTime(QDate(2013,02,01), QTime(1,1), KDateTime::ClockTime)); + + //Create item in imap resource + { + Akonadi::ItemCreateJob *createJob = new Akonadi::ItemCreateJob(createImapItem(event), imapCollection, this); + QVERIFY(TestUtils::ensure(kolabCollection, SIGNAL(itemAdded(Akonadi::Item,Akonadi::Collection)), createJob)); + } + + //TestUtils::ensure kolab equivalent gets created + { + Akonadi::Item expectedItem; + expectedItem.setGid(event->instanceIdentifier()); + Akonadi::ItemFetchJob *fetchJob = new Akonadi::ItemFetchJob(expectedItem); + AKVERIFYEXEC(fetchJob); + QCOMPARE(fetchJob->items().size(), 1); +// QCOMPARE(fetchJob->items().first().parentCollection().id() ); + } + + //create item again in imap resource (same gid), but with different content + Akonadi::Item recreatdImapItem; + { + event->setSummary("summary2"); + Akonadi::ItemCreateJob *createJob = new Akonadi::ItemCreateJob(createImapItem(event), imapCollection, this); + QVERIFY(TestUtils::ensure(kolabCollection, SIGNAL(itemChanged(const Akonadi::Item &, const QSet &)), createJob)); + recreatdImapItem = createJob->item(); + } + + //TestUtils::ensure only one item with gid exists, and it's content and rid has been updated as expected + { + Akonadi::Item expectedItem; + expectedItem.setGid(event->instanceIdentifier()); + Akonadi::ItemFetchJob *fetchJob = new Akonadi::ItemFetchJob(expectedItem); + fetchJob->fetchScope().setFetchRemoteIdentification(true); + fetchJob->fetchScope().fetchFullPayload(true); + AKVERIFYEXEC(fetchJob); + QCOMPARE(fetchJob->items().size(), 1); + const Akonadi::Item item = fetchJob->items().first(); + QCOMPARE(item.remoteId().toLongLong(), recreatdImapItem.id()); + QVERIFY(item.hasPayload()); + QCOMPARE(item.payload()->summary(), event->summary()); + } + + //test retrieve items with duplicates + { + + mInstance.synchronize(); //triggers retrieve items + //TODO listen for some signals instead of a timeout + QTest::qWait(TIMEOUT); + { + Akonadi::ItemFetchJob *fetchJob = new Akonadi::ItemFetchJob(kolabCollection); + fetchJob->fetchScope().setFetchRemoteIdentification(true); + fetchJob->fetchScope().fetchFullPayload(true); + AKVERIFYEXEC(fetchJob); + QCOMPARE(fetchJob->items().size(), 1); + const Akonadi::Item item = fetchJob->items().first(); + QCOMPARE(item.remoteId().toLongLong(), recreatdImapItem.id()); + QVERIFY(item.hasPayload()); + QCOMPARE(item.payload()->summary(), event->summary()); + } + } + + cleanup(); + } + + void twoItemAddedSignals() { + KCalCore::Event::Ptr event(new KCalCore::Event); + event->setSummary("summary1"); + event->setDtStart(KDateTime(QDate(2013,02,01), QTime(1,1), KDateTime::ClockTime)); + + //Create item in imap resource + { + Akonadi::ItemCreateJob *createJob = new Akonadi::ItemCreateJob(createImapItem(event), imapCollection, this); + AKVERIFYEXEC(createJob); + } + Akonadi::Item secondImapItem; + { + event->setSummary("summary2"); + Akonadi::ItemCreateJob *createJob = new Akonadi::ItemCreateJob(createImapItem(event), imapCollection, this); + QVERIFY(TestUtils::ensure(kolabCollection, SIGNAL(itemChanged(const Akonadi::Item &, const QSet &)), createJob)); + secondImapItem = createJob->item(); + } + + //Ensure the conflict resolution still works with two consequitive item creates + { + Akonadi::ItemFetchJob *fetchJob = new Akonadi::ItemFetchJob(kolabCollection); + fetchJob->fetchScope().setFetchRemoteIdentification(true); + AKVERIFYEXEC(fetchJob); + QCOMPARE(fetchJob->items().size(), 1); + const Akonadi::Item item = fetchJob->items().first(); + QCOMPARE(item.remoteId().toLongLong(), secondImapItem.id()); + } + + cleanup(); + + } + + void itemRemovedSignal() { + + KCalCore::Event::Ptr event(new KCalCore::Event); + event->setSummary("summary1"); + event->setDtStart(KDateTime(QDate(2013,02,01), QTime(1,1), KDateTime::ClockTime)); + + Akonadi::Item firstImapItem; + { + Akonadi::ItemCreateJob *createJob = new Akonadi::ItemCreateJob(createImapItem(event), imapCollection, this); + QVERIFY(TestUtils::ensure(kolabCollection, SIGNAL(itemAdded(Akonadi::Item,Akonadi::Collection)), createJob)); + firstImapItem = createJob->item(); + } + + //create item again in imap resource (same gid), but with different content + Akonadi::Item secondImapItem; + { + event->setSummary("summary2"); + Akonadi::ItemCreateJob *createJob = new Akonadi::ItemCreateJob(createImapItem(event), imapCollection, this); +// AKVERIFYEXEC(createJob); + QVERIFY(TestUtils::ensure(kolabCollection, SIGNAL(itemChanged(const Akonadi::Item &, const QSet &)), createJob)); + secondImapItem = createJob->item(); + } + //we expect one kolab item that is linked to the second imap item + + //remove first imap item + { + Akonadi::ItemDeleteJob *deleteJob = new Akonadi::ItemDeleteJob(firstImapItem); + QVERIFY(!TestUtils::ensure(kolabCollection, SIGNAL(itemRemoved(const Akonadi::Item &)), deleteJob)); + } + + //TestUtils::ensure kolab item remains + { + Akonadi::ItemFetchJob *fetchJob = new Akonadi::ItemFetchJob(kolabCollection); + fetchJob->fetchScope().setFetchRemoteIdentification(true); + AKVERIFYEXEC(fetchJob); + QCOMPARE(fetchJob->items().size(), 1); + const Akonadi::Item item = fetchJob->items().first(); + QCOMPARE(item.remoteId().toLongLong(), secondImapItem.id()); + } + + //remove second imap item + { + Akonadi::ItemDeleteJob *deleteJob = new Akonadi::ItemDeleteJob(secondImapItem); + QVERIFY(TestUtils::ensure(kolabCollection, SIGNAL(itemRemoved(const Akonadi::Item &)), deleteJob)); + } + + //TestUtils::ensure kolab item is removed + { + Akonadi::ItemFetchJob *fetchJob = new Akonadi::ItemFetchJob(kolabCollection); + AKVERIFYEXEC(fetchJob); + QCOMPARE(fetchJob->items().size(), 0); + } + } + + void collectionAddedRemovedSignal() { + Akonadi::Collection createdCollection; + { + Akonadi::Collection col; + col.setParent(imapCollection); + col.setName("test"); + QMap annotations; + annotations.insert("/shared/vendor/kolab/folder-type", "event"); + col.addAttribute(new CollectionAnnotationsAttribute(annotations)); + Akonadi::CollectionCreateJob *createJob = new Akonadi::CollectionCreateJob(col, this); + QVERIFY(TestUtils::ensure(kolabCollection, SIGNAL(collectionAdded(const Akonadi::Collection &, const Akonadi::Collection &)), createJob)); + createdCollection = createJob->collection(); + } + { + Akonadi::CollectionFetchJob *fetchJob = new Akonadi::CollectionFetchJob(kolabCollection); + AKVERIFYEXEC(fetchJob); + QCOMPARE(fetchJob->collections().size(), 1); + } + //cleanup + { + Akonadi::CollectionDeleteJob *deleteJob = new Akonadi::CollectionDeleteJob(createdCollection); + QVERIFY(TestUtils::ensure(kolabCollection, SIGNAL(collectionRemoved(const Akonadi::Collection &)), deleteJob)); + } + { + Akonadi::CollectionFetchJob *fetchJob = new Akonadi::CollectionFetchJob(kolabCollection); + AKVERIFYEXEC(fetchJob); + QCOMPARE(fetchJob->collections().size(), 0); + } + } + + void collectionChangedSignal() { + Akonadi::Collection createdCollection; + { + Akonadi::Collection col; + col.setParent(imapCollection); + col.setName("test"); + QMap annotations; + annotations.insert("/shared/vendor/kolab/folder-type", "event"); + col.addAttribute(new CollectionAnnotationsAttribute(annotations)); + col.setRights(Akonadi::Collection::AllRights); + Akonadi::CollectionCreateJob *createJob = new Akonadi::CollectionCreateJob(col, this); + QVERIFY(TestUtils::ensure(kolabCollection, SIGNAL(collectionAdded(const Akonadi::Collection &, const Akonadi::Collection &)), createJob)); + createdCollection = createJob->collection(); + } + + { + Akonadi::CollectionFetchJob *fetchJob = new Akonadi::CollectionFetchJob(kolabCollection); + AKVERIFYEXEC(fetchJob); + QCOMPARE(fetchJob->collections().size(), 1); + QCOMPARE(fetchJob->collections().first().rights(), Akonadi::Collection::AllRights); + } + { + createdCollection.setRights(Akonadi::Collection::ReadOnly); + Akonadi::CollectionModifyJob *modJob = new Akonadi::CollectionModifyJob(createdCollection); + QVERIFY(TestUtils::ensure(kolabCollection, SIGNAL(collectionChanged(const Akonadi::Collection &)), modJob)); + } + { + Akonadi::CollectionFetchJob *fetchJob = new Akonadi::CollectionFetchJob(kolabCollection); + AKVERIFYEXEC(fetchJob); + QCOMPARE(fetchJob->collections().size(), 1); + QCOMPARE(fetchJob->collections().first().rights(), Akonadi::Collection::ReadOnly); + } + //cleanup + { + Akonadi::CollectionDeleteJob *deleteJob = new Akonadi::CollectionDeleteJob(createdCollection); + QVERIFY(TestUtils::ensure(kolabCollection, SIGNAL(collectionRemoved(const Akonadi::Collection &)), deleteJob)); + } + } + +}; + +QTEST_AKONADIMAIN( ImapSignalTest, NoGUI ) + +#include "imapsignaltest.moc" diff -Nru kdepim-runtime-4.12.3/resources/kolabproxy/tests/proxyintegrationtest.cpp kdepim-runtime-4.12.90/resources/kolabproxy/tests/proxyintegrationtest.cpp --- kdepim-runtime-4.12.3/resources/kolabproxy/tests/proxyintegrationtest.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/kolabproxy/tests/proxyintegrationtest.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -27,9 +27,12 @@ #include #include #include +#include #include #include //libkolab +#include "testutils.h" + #include "../kolabdefs.h" using namespace Akonadi; @@ -43,7 +46,7 @@ Collection col; col.setName(name); QMap annotations; - annotations.insert("/vendor/kolab/folder-type", annotation); + Kolab::setFolderTypeAnnotation( annotations, annotation ); col.addAttribute(new CollectionAnnotationsAttribute(annotations)); col.setRights(Collection::CanCreateItem | Collection::CanChangeItem | Collection::CanDeleteItem | Collection::CanCreateCollection | Collection::CanChangeCollection | Collection::CanDeleteCollection); return col; @@ -62,18 +65,7 @@ mInstance = agentCreateJob->instance(); //Wait for kolabproxy to create all folders - QTest::qWait(1000); - //The below is supposed to allow us to wait on the synchronization to complete, but that somehow crashes -// // QDBusInterface *interface = new QDBusInterface( -// // QString::fromLatin1( "org.freedesktop.Akonadi.Resource.%1" ).arg( instance.identifier() ), -// // "/", "org.freedesktop.Akonadi.Resource", QDBusConnection::sessionBus(), this ); -// QDBusInterface *interface = new QDBusInterface( -// ServerManager::agentServiceName(ServerManager::Resource, instance.identifier()), -// "/", "org.freedesktop.Akonadi.Resource", QDBusConnection::sessionBus(), this); -// -// QVERIFY( interface->isValid() ); -// instance.synchronize(); -// QVERIFY(QTest::kWaitForSignal(interface, SIGNAL(synchronized()), 5 * 1000)); + QVERIFY(TestUtils::ensurePopulated(mInstance.identifier(), 6)); } void setupKolabProxy() { @@ -122,13 +114,42 @@ if (!col.attribute()) { continue; } - if (Kolab::folderTypeFromString(col.attribute()->annotations().value(KOLAB_FOLDER_TYPE_ANNOTATION)) != Kolab::MailType) { + if (Kolab::folderTypeFromString(Kolab::getFolderTypeAnnotation(col.attribute()->annotations())) != Kolab::MailType) { //Kolab folder QVERIFY(col.attribute()); } } } + void testRemoval() { + Akonadi::AgentInstance instance = AgentManager::self()->instance("akonadi_knut_resource_0"); + AgentManager::self()->removeInstance(instance); + + //Ensure all kolab collections are removed as well + QTest::qWait(10); + bool kolabCollectionsAreGone = false; + Akonadi::Collection::List rootCollections; + for (int i = 0; i < TIMEOUT/10; i++) { + Akonadi::CollectionFetchJob *fetchJob = new Akonadi::CollectionFetchJob(Akonadi::Collection::root()); + AKVERIFYEXEC(fetchJob); + rootCollections.clear(); + foreach (const Akonadi::Collection &col, fetchJob->collections()) { + if (col.resource().contains("kolabproxy")) { + rootCollections << col; + } + } + if (rootCollections.size() == 0) { + kolabCollectionsAreGone = true; + break; + } + QTest::qWait(10); + } + if (!kolabCollectionsAreGone) { + kDebug() << rootCollections; + } + QVERIFY(kolabCollectionsAreGone); + } + }; QTEST_AKONADIMAIN( ProxyIntegrationTest, NoGUI ) diff -Nru kdepim-runtime-4.12.3/resources/kolabproxy/tests/testutils.cpp kdepim-runtime-4.12.90/resources/kolabproxy/tests/testutils.cpp --- kdepim-runtime-4.12.3/resources/kolabproxy/tests/testutils.cpp 1970-01-01 00:00:00.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/kolabproxy/tests/testutils.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -0,0 +1,101 @@ +/* + Copyright (c) 2013 Christian Mollekopf + + 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 "testutils.h" + +#include +#include +#include +#include +#include +#include +#include +#include //libkolab +#include + +#include "../kolabdefs.h" + +using namespace Akonadi; + +Akonadi::Item TestUtils::createImapItem(const KCalCore::Event::Ptr &event) { + const KMime::Message::Ptr &message = Kolab::KolabObjectWriter::writeEvent(event, Kolab::KolabV3, "Proxytest", QLatin1String("UTC") ); + Q_ASSERT(message); + Akonadi::Item imapItem1; + imapItem1.setMimeType( QLatin1String("message/rfc822") ); + imapItem1.setPayload( message ); + return imapItem1; +} + +TestUtils::MonitorPair TestUtils::monitor(Akonadi::Collection col, const char *signal) { + QSharedPointer monitor(new Akonadi::Monitor); + monitor->setCollectionMonitored(col); + QSharedPointer spy(new QSignalSpy(monitor.data(), signal)); + Q_ASSERT_X(spy->isValid(), "", signal); + return qMakePair, QSharedPointer >(spy, monitor); +} + +bool TestUtils::wait(const MonitorPair &pair) { + for (int i = 0; i < TIMEOUT/10 ; i++) { + if (pair.first->count() >= 1) { + kDebug() << pair.first->first(); + return true; + } + QTest::qWait(10); + } + return false; +} + +bool TestUtils::ensure(Akonadi::Collection col, const char *signal, Akonadi::Job *job) { + MonitorPair m = monitor(col, signal); + if (!job->exec()) { + return false; + } + return wait(m); +} + +bool TestUtils::ensurePopulated(QString agentinstance, int count) { + for (int i = 0; i < TIMEOUT/10 ; i++) { + Akonadi::CollectionFetchJob *fetchJob = new Akonadi::CollectionFetchJob(Collection::root(), CollectionFetchJob::Recursive); + fetchJob->fetchScope().setResource(agentinstance); + if (!fetchJob->exec()) { + return false; + } + if (fetchJob->collections().size() >= count) { + return true; + } + QTest::qWait(10); + } + return false; +} + +Akonadi::Collection TestUtils::findCollection(QString agentinstance, QString name) { + for (int i = 0; i < 500 ; i++) { + Akonadi::CollectionFetchJob *fetchJob = new Akonadi::CollectionFetchJob(Collection::root(), CollectionFetchJob::Recursive); + fetchJob->fetchScope().setResource(agentinstance); + if (!fetchJob->exec()) { + return Akonadi::Collection(); + } + foreach (const Collection &col, fetchJob->collections()) { + if (col.name().contains(name)) { + return col; + } + } + QTest::qWait(10); + } + return Akonadi::Collection(); +} diff -Nru kdepim-runtime-4.12.3/resources/kolabproxy/tests/testutils.h kdepim-runtime-4.12.90/resources/kolabproxy/tests/testutils.h --- kdepim-runtime-4.12.3/resources/kolabproxy/tests/testutils.h 1970-01-01 00:00:00.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/kolabproxy/tests/testutils.h 2014-03-13 08:12:29.000000000 +0000 @@ -0,0 +1,39 @@ + +/* + Copyright (c) 2013 Christian Mollekopf + + 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 +#include +#include +#include +#include + +using namespace Akonadi; +#define TIMEOUT 1000 +struct TestUtils +{ + static Akonadi::Item createImapItem(const KCalCore::Event::Ptr &event); + + typedef QPair, QSharedPointer > MonitorPair; + + static MonitorPair monitor(Akonadi::Collection col, const char *signal); + static bool wait(const MonitorPair &pair); + static bool ensure(Akonadi::Collection col, const char *signal, Akonadi::Job *job); + static bool ensurePopulated(QString agentinstance, int count); + static Akonadi::Collection findCollection(QString agentinstance, QString name); +}; diff -Nru kdepim-runtime-4.12.3/resources/kolabproxy/tests/unittestenv/kdehome/testdata-res1.xml kdepim-runtime-4.12.90/resources/kolabproxy/tests/unittestenv/kdehome/testdata-res1.xml --- kdepim-runtime-4.12.3/resources/kolabproxy/tests/unittestenv/kdehome/testdata-res1.xml 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/kolabproxy/tests/unittestenv/kdehome/testdata-res1.xml 2014-03-13 08:12:29.000000000 +0000 @@ -10,28 +10,28 @@ - /vendor/kolab/folder-type event + /shared/vendor/kolab/folder-type event - /vendor/kolab/folder-type contact + /shared/vendor/kolab/folder-type contact - /vendor/kolab/folder-type note + /shared/vendor/kolab/folder-type note - /vendor/kolab/folder-type task + /shared/vendor/kolab/folder-type task - /vendor/kolab/folder-type journal + /shared/vendor/kolab/folder-type journal - /vendor/kolab/folder-type configuration + /shared/vendor/kolab/folder-type configuration - /vendor/kolab/folder-type freebusy + /shared/vendor/kolab/folder-type freebusy - /vendor/kolab/folder-type file + /shared/vendor/kolab/folder-type file diff -Nru kdepim-runtime-4.12.3/resources/kolabproxy/upgradejob.cpp kdepim-runtime-4.12.90/resources/kolabproxy/upgradejob.cpp --- kdepim-runtime-4.12.3/resources/kolabproxy/upgradejob.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/kolabproxy/upgradejob.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -79,8 +79,7 @@ Akonadi::CollectionAnnotationsAttribute *attr = 0; if ( ( attr = col.attribute() ) ) { folderType = - KolabV2::folderTypeFromString( - attr->annotations().value( KOLAB_FOLDER_TYPE_ANNOTATION ) ); + KolabV2::folderTypeFromString( Kolab::getFolderTypeAnnotation( attr->annotations() ) ); } if ( folderType == KolabV2::Mail ) { //kWarning() << "Wrong folder annotation " diff -Nru kdepim-runtime-4.12.3/resources/localbookmarks/localbookmarksresource.cpp kdepim-runtime-4.12.90/resources/localbookmarks/localbookmarksresource.cpp --- kdepim-runtime-4.12.3/resources/localbookmarks/localbookmarksresource.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/localbookmarks/localbookmarksresource.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -219,4 +219,3 @@ AKONADI_RESOURCE_MAIN( LocalBookmarksResource ) -#include "localbookmarksresource.moc" diff -Nru kdepim-runtime-4.12.3/resources/maildir/CMakeLists.txt kdepim-runtime-4.12.90/resources/maildir/CMakeLists.txt --- kdepim-runtime-4.12.3/resources/maildir/CMakeLists.txt 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/maildir/CMakeLists.txt 2014-03-13 08:12:29.000000000 +0000 @@ -35,13 +35,9 @@ ${CMAKE_CURRENT_BINARY_DIR}/org.kde.Akonadi.Maildir.Settings.xml settings.h Akonadi_Maildir_Resource::MaildirSettings maildirsettingsadaptor MaildirSettingsAdaptor ) -if (NOT WINCE) - kde4_add_plugin(akonadi_maildir_resource ${maildirresource_SRCS}) -else() -kde4_add_plugin(akonadi_maildir_resource STATIC ${maildirresource_SRCS}) -endif() +kde4_add_plugin(akonadi_maildir_resource ${maildirresource_SRCS}) -target_link_libraries(akonadi_maildir_resource ${KDEPIMLIBS_AKONADI_LIBS} ${KDEPIMLIBS_AKONADI_KMIME_LIBS} maildir ${QT_QTDBUS_LIBRARY} ${KDE4_KIO_LIBS} ${KDEPIMLIBS_KMIME_LIBS} ) +target_link_libraries(akonadi_maildir_resource ${KDEPIMLIBS_AKONADI_LIBS} ${KDEPIMLIBS_AKONADI_KMIME_LIBS} maildir ${QT_QTDBUS_LIBRARY} ${KDE4_KIO_LIBS} ${KDEPIMLIBS_KMIME_LIBS} folderarchivesettings ) install(TARGETS akonadi_maildir_resource DESTINATION ${PLUGIN_INSTALL_DIR}) install(FILES ${CMAKE_CURRENT_BINARY_DIR}/org.kde.Akonadi.Maildir.Settings.xml diff -Nru kdepim-runtime-4.12.3/resources/maildir/configdialog.cpp kdepim-runtime-4.12.90/resources/maildir/configdialog.cpp --- kdepim-runtime-4.12.3/resources/maildir/configdialog.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/maildir/configdialog.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -19,6 +19,7 @@ #include "configdialog.h" #include "settings.h" +#include "resources/folderarchivesettings/folderarchivesettingpage.h" #include @@ -29,13 +30,17 @@ using KPIM::Maildir; using namespace Akonadi_Maildir_Resource; -ConfigDialog::ConfigDialog( MaildirSettings *settings, QWidget * parent) : +ConfigDialog::ConfigDialog(MaildirSettings *settings, const QString &identifier, QWidget * parent) : KDialog( parent ), mSettings( settings ), mToplevelIsContainer( false ) { setCaption( i18n( "Select a MailDir folder" ) ); ui.setupUi( mainWidget() ); + mFolderArchiveSettingPage = new FolderArchiveSettingPage(identifier); + mFolderArchiveSettingPage->loadSettings(); + ui.tabWidget->addTab(mFolderArchiveSettingPage, i18n("Folder Archive")); + mManager = new KConfigDialogManager( this, mSettings ); mManager->updateWidgets(); ui.kcfg_Path->setMode( KFile::Directory | KFile::ExistingOnly ); @@ -60,15 +65,14 @@ if ( d.exists() ) { Maildir md( d.path() ); - QString error; - if ( !md.isValid( error, false ) ) { + if ( !md.isValid( false ) ) { Maildir md2( d.path(), true ); if ( md2.isValid( false ) ) { ui.statusLabel->setText( i18n( "The selected path contains valid Maildir folders." ) ); mToplevelIsContainer = true; ok = true; } else { - ui.statusLabel->setText( error ); + ui.statusLabel->setText( md.lastError() ); } } else { ui.statusLabel->setText( i18n( "The selected path is a valid Maildir." ) ); @@ -89,6 +93,7 @@ void ConfigDialog::save() { + mFolderArchiveSettingPage->writeSettings(); mManager->updateSettings(); QString path = ui.kcfg_Path->url().isLocalFile() ? ui.kcfg_Path->url().toLocalFile() : ui.kcfg_Path->url().path(); mSettings->setPath( path ); @@ -103,4 +108,3 @@ } } -#include "configdialog.moc" diff -Nru kdepim-runtime-4.12.3/resources/maildir/configdialog.h kdepim-runtime-4.12.90/resources/maildir/configdialog.h --- kdepim-runtime-4.12.3/resources/maildir/configdialog.h 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/maildir/configdialog.h 2014-03-13 08:12:29.000000000 +0000 @@ -29,12 +29,12 @@ { class MaildirSettings; } - +class FolderArchiveSettingPage; class ConfigDialog : public KDialog { Q_OBJECT public: - explicit ConfigDialog( Akonadi_Maildir_Resource::MaildirSettings *settings, QWidget *parent = 0 ); + explicit ConfigDialog( Akonadi_Maildir_Resource::MaildirSettings *settings, const QString &identifier, QWidget *parent = 0 ); private slots: void checkPath(); @@ -43,6 +43,7 @@ private: Ui::ConfigDialog ui; KConfigDialogManager* mManager; + FolderArchiveSettingPage *mFolderArchiveSettingPage; Akonadi_Maildir_Resource::MaildirSettings *mSettings; bool mToplevelIsContainer; }; diff -Nru kdepim-runtime-4.12.3/resources/maildir/libmaildir/maildir.cpp kdepim-runtime-4.12.90/resources/maildir/libmaildir/maildir.cpp --- kdepim-runtime-4.12.3/resources/maildir/libmaildir/maildir.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/maildir/libmaildir/maildir.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -91,7 +91,7 @@ { return path == rhs.path; } - bool accessIsPossible( QString& error, bool createMissingFolders = true ) const; + bool accessIsPossible( bool createMissingFolders = true ); bool canAccess( const QString& path ) const; QStringList subPaths() const @@ -191,6 +191,7 @@ QString path; bool isRoot; QString hostName; + QString lastError; }; Maildir::Maildir( const QString& path, bool isRoot ) @@ -240,26 +241,26 @@ return d.isReadable() && d.isWritable(); } -bool Maildir::Private::accessIsPossible( QString& error, bool createMissingFolders ) const +bool Maildir::Private::accessIsPossible( bool createMissingFolders ) { QStringList paths = subPaths(); - + paths.prepend( path ); Q_FOREACH ( const QString &p, paths ) { if ( !QFile::exists( p ) ) { if ( !createMissingFolders ) { - error = i18n( "Error opening %1; this folder is missing.", p ); + lastError = i18n( "Error opening %1; this folder is missing.", p ); return false; } QDir().mkpath( p ); if ( !QFile::exists( p ) ) { - error = i18n( "Error opening %1; this folder is missing.", p ); + lastError = i18n( "Error opening %1; this folder is missing.", p ); return false; } } if ( !canAccess( p ) ) { - error = i18n( "Error opening %1; either this is not a valid " + lastError = i18n( "Error opening %1; either this is not a valid " "maildir folder, or you do not have sufficient access permissions." ,p ); return false; } @@ -269,24 +270,20 @@ bool Maildir::isValid( bool createMissingFolders ) const { - QString error; - return isValid( error, createMissingFolders ); -} - -bool Maildir::isValid( QString &error, bool createMissingFolders ) const -{ if ( path().isEmpty() ) { return false; } if ( !d->isRoot ) { - if ( d->accessIsPossible( error, createMissingFolders ) ) { + if ( d->accessIsPossible( createMissingFolders ) ) { return true; } } else { Q_FOREACH ( const QString &sf, subFolderList() ) { const Maildir subMd = Maildir( path() + QLatin1Char( '/' ) + sf ); - if ( !subMd.isValid( error ) ) + if ( !subMd.isValid() ) { + d->lastError = subMd.lastError(); return false; + } } return true; } @@ -477,11 +474,15 @@ if ( realKey.isEmpty() ) { // FIXME error handling? qWarning() << "Maildir::readEntry unable to find: " << key; + d->lastError = i18n( "Cannot locate mail file %1." ).arg( key ); return result; } QFile f( realKey ); - f.open( QIODevice::ReadOnly ); + if ( !f.open( QIODevice::ReadOnly ) ) { + d->lastError = i18n( "Cannot open mail file %1." ).arg( realKey ); + return result; + } // FIXME be safer than this result = f.readAll(); @@ -494,12 +495,15 @@ if ( realKey.isEmpty() ) { // FIXME error handling? qWarning() << "Maildir::size unable to find: " << key; + d->lastError = i18n( "Cannot locate mail file %1." ).arg( key ); return -1; } QFileInfo info( realKey ); - if ( !info.exists() ) + if ( !info.exists() ) { + d->lastError = i18n( "Cannot open mail file %1." ).arg( realKey ); return -1; + } return info.size(); } @@ -509,6 +513,7 @@ const QString realKey( d->findRealKey( key ) ); if ( realKey.isEmpty() ) { qWarning() << "Maildir::lastModified unable to find: " << key; + d->lastError = i18n( "Cannot locate mail file %1." ).arg( key ); return QDateTime(); } @@ -527,6 +532,7 @@ if ( !f.open( QIODevice::ReadOnly ) ) { // FIXME error handling? qWarning() << "Maildir::readEntryHeaders unable to find: " << file; + d->lastError = i18n( "Cannot locate mail file %1." ).arg( file ); return result; } f.map( 0, qMin( (qint64)8000, f.size() ) ); @@ -544,6 +550,7 @@ const QString realKey( d->findRealKey( key ) ); if ( realKey.isEmpty() ) { qWarning() << "Maildir::readEntryHeaders unable to find: " << key; + d->lastError = i18n( "Cannot locate mail file %1." ).arg( key ); return QByteArray(); } @@ -562,18 +569,24 @@ return fileName; } -void Maildir::writeEntry( const QString& key, const QByteArray& data ) +bool Maildir::writeEntry( const QString& key, const QByteArray& data ) { QString realKey( d->findRealKey( key ) ); if ( realKey.isEmpty() ) { // FIXME error handling? qWarning() << "Maildir::writeEntry unable to find: " << key; - return; + d->lastError = i18n( "Cannot locate mail file %1." ).arg( key ); + return false; } QFile f( realKey ); - f.open( QIODevice::WriteOnly ); - f.write( data ); + bool result = f.open( QIODevice::WriteOnly ); + result = result & ( f.write( data ) != -1 ); f.close(); + if ( !result) { + d->lastError = i18n( "Cannot write to mail file %1." ).arg( realKey ); + return false; + } + return true; } QString Maildir::addEntry( const QByteArray& data ) @@ -593,9 +606,13 @@ } while ( QFile::exists( key ) || QFile::exists( finalKey ) || QFile::exists( curKey ) ); QFile f( key ); - f.open( QIODevice::WriteOnly ); - f.write( data ); + bool result = f.open( QIODevice::WriteOnly ); + result = result & ( f.write( data ) != -1 ); f.close(); + if ( !result) { + d->lastError = i18n( "Cannot write to mail file %1." ).arg( key ); + return QString(); + } /* * FIXME: * @@ -607,6 +624,8 @@ */ if ( !f.rename( finalKey ) ) { qWarning() << "Maildir: Failed to add entry: " << finalKey << "! Error: " << f.errorString(); + d->lastError = i18n( "Failed to create mail file %1. The error was: %2" ).arg( finalKey, f.errorString() ); + return QString(); } KeyCache *keyCache = KeyCache::self(); keyCache->removeKey( d->path, key ); //remove all keys, be it "cur" or "new" first @@ -618,7 +637,6 @@ { QString realKey( d->findRealKey( key ) ); if ( realKey.isEmpty() ) { - // FIXME error handling? qWarning() << "Maildir::removeEntry unable to find: " << key; return false; } @@ -631,9 +649,9 @@ { QString realKey( d->findRealKey( key ) ); if ( realKey.isEmpty() ) { - // FIXME error handling? qWarning() << "Maildir::changeEntryFlags unable to find: " << key; - return key; + d->lastError = i18n( "Cannot locate mail file %1." ).arg( key ); + return QString(); } const QRegExp rx = *( statusSeparatorRx() ); @@ -698,6 +716,7 @@ if ( !f.rename( finalKey ) ) { qWarning() << "Maildir: Failed to rename entry: " << f.fileName() << " to " << finalKey << "! Error: " << f.errorString(); + d->lastError = i18n( "Failed to update the file name %1 to %2 on the disk. The error was: %3." ).arg( f.fileName(), finalKey, f.errorString() ); return QString(); } @@ -772,7 +791,8 @@ { const QString realKey( d->findRealKey( key ) ); if ( realKey.isEmpty() ) { - kDebug() << "Unable to find" << key; + kWarning() << "Unable to find: " << key; + d->lastError = i18n( "Cannot locate mail file %1." ).arg( key ); return QString(); } QFile f( realKey ); @@ -780,6 +800,7 @@ const QString targetKey = destination.path() + QDir::separator() + QLatin1String( "new" ) + QDir::separator() + key; if ( !f.rename( targetKey ) ) { kDebug() << "Failed to rename" << realKey << "to" << targetKey << "! Error: " << f.errorString();; + d->lastError = f.errorString(); return QString(); } @@ -816,3 +837,8 @@ { KeyCache::self()->refreshKeys( d->path ); } + +QString Maildir::lastError() const +{ + return d->lastError; +} diff -Nru kdepim-runtime-4.12.3/resources/maildir/libmaildir/maildir.h kdepim-runtime-4.12.90/resources/maildir/libmaildir/maildir.h --- kdepim-runtime-4.12.3/resources/maildir/libmaildir/maildir.h 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/maildir/libmaildir/maildir.h 2014-03-13 08:12:29.000000000 +0000 @@ -59,16 +59,6 @@ bool isValid( bool createMissingFolders = true ) const; /** - * Returns whether the maildir is valid, and sets the error out-parameter - * so it can be used to signal the kind of error to the user. - * @see isValid - * - * @param error will contain the error message - * @param createMissingFolders if true (the default), the cur/new/tmp folders are created if they are missing - */ - bool isValid( QString &error, bool createMissingFolders = true ) const; - - /** * Returns whether this is a normal maildir or a container containing maildirs. */ bool isRoot() const; @@ -191,8 +181,9 @@ /** * Write the given @p data to a file in the maildir with the given @p key. + * Returns true in case of success, false in case of any error. */ - void writeEntry( const QString& key, const QByteArray& data ); + bool writeEntry( const QString& key, const QByteArray& data ); /** * Adds the given @p data to the maildir. Returns the key of the entry. @@ -224,7 +215,7 @@ * Moves the file with the given @p key into the Maildir @p destination. * @returns The new file name inside @p destination. */ - QString moveEntryTo( const QString &key, const Maildir &destination ); + QString moveEntryTo( const QString& key, const KPIM::Maildir& destination ); /** * Creates the maildir tree structure specific directory path that the @@ -253,6 +244,11 @@ /** Reloads the keys associated with the maildir in the key cache*/ void refreshKeyCache(); + /** Return the last error message string. The error might not come from the last performed operation, + if that was sucessful. The caller should always check the return value of the methods before + querying the last error string. */ + QString lastError() const; + private: void swap( const Maildir& ); class Private; diff -Nru kdepim-runtime-4.12.3/resources/maildir/libmaildir/tests/testmaildir.cpp kdepim-runtime-4.12.90/resources/maildir/libmaildir/tests/testmaildir.cpp --- kdepim-runtime-4.12.3/resources/maildir/libmaildir/tests/testmaildir.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/maildir/libmaildir/tests/testmaildir.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -20,7 +20,6 @@ #include "testmaildir.h" -#include "testmaildir.moc" #include @@ -122,9 +121,8 @@ QDir temp( m_temp->name() ); temp.rmdir( QLatin1String( "new" ) ); - QString error; - QVERIFY( !good.isValid( error, false ) ); - QVERIFY( !error.isEmpty() ); + QVERIFY( !good.isValid( false ) ); + QVERIFY( !good.lastError().isEmpty() ); Maildir root1( QLatin1String( "/foo/bar/Mail" ), true ); QVERIFY( root1.isRoot() ); @@ -183,7 +181,7 @@ QByteArray data = d.readEntry( entries[0] ); QByteArray data2 = "changed\n"; - d.writeEntry( entries[0], data2 ); + QVERIFY( d.writeEntry( entries[0], data2 ) ); QCOMPARE( data2, d.readEntry( entries[0] ) ); } diff -Nru kdepim-runtime-4.12.3/resources/maildir/maildirresource.cpp kdepim-runtime-4.12.90/resources/maildir/maildirresource.cpp --- kdepim-runtime-4.12.3/resources/maildir/maildirresource.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/maildir/maildirresource.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -243,7 +243,7 @@ void MaildirResource::configure( WId windowId ) { - ConfigDialog dlg( mSettings ); + ConfigDialog dlg( mSettings, identifier() ); if ( windowId ) KWindowSystem::setMainWindow( &dlg, windowId ); dlg.setWindowIcon( KIcon( QLatin1String("message-rfc822") ) ); @@ -271,9 +271,8 @@ return; } Maildir dir = maildirForCollection( collection ); - QString errMsg; - if ( mSettings->readOnly() || !dir.isValid( errMsg ) ) { - cancelTask( errMsg ); + if ( mSettings->readOnly() || !dir.isValid() ) { + cancelTask( dir.lastError() ); return; } @@ -290,6 +289,12 @@ mChangedFiles.insert( rid ); mChangedCleanerTimer->start( CLEANER_TIMEOUT ); + if ( rid.isEmpty() ) { + restartMaildirScan( dir ); + cancelTask( dir.lastError() ); + return; + } + restartMaildirScan( dir ); Item i( item ); @@ -325,9 +330,8 @@ } Maildir dir = maildirForCollection( item.parentCollection() ); - QString errMsg; - if ( !dir.isValid( errMsg ) ) { - cancelTask( errMsg ); + if ( !dir.isValid() ) { + cancelTask( dir.lastError() ); return; } @@ -340,7 +344,7 @@ const QString newKey = dir.changeEntryFlags( item.remoteId(), item.flags() ); if ( newKey.isEmpty() ) { restartMaildirScan( dir ); - cancelTask( i18n( "Failed to change the flags for the mail." ) ); + cancelTask( i18n( "Failed to change the flags for the mail. %1" ).arg( dir.lastError() ) ); return; } newItem.setRemoteId( newKey ); @@ -355,18 +359,27 @@ //only the head has changed, get the current version of the mail //replace the head and store the new mail in the file const QByteArray currentData = dir.readEntry( newItem.remoteId() ); + if ( currentData.isEmpty() && !dir.lastError().isEmpty() ) { + restartMaildirScan( dir ); + cancelTask( dir.lastError() ); + return; + } const QByteArray newHead = mail->head(); mail->setContent( currentData ); mail->setHead( newHead ); mail->parse(); data = mail->encodedContent(); } - dir.writeEntry( newItem.remoteId(), data ); + if ( !dir.writeEntry( newItem.remoteId(), data ) ) { + restartMaildirScan( dir ); + cancelTask( dir.lastError() ); + return; + } mChangedFiles.insert( newItem.remoteId() ); mChangedCleanerTimer->start( CLEANER_TIMEOUT ); } else { restartMaildirScan( dir ); - cancelTask( i18n( "Error: Unsupported type." ) ); + cancelTask( i18n( "Maildir resource got a non-mail content!" ) ); return; } } @@ -392,15 +405,14 @@ } Maildir sourceDir = maildirForCollection( source ); - QString errMsg; - if ( !sourceDir.isValid( errMsg ) ) { - cancelTask( i18n( "Source folder is invalid: '%1'.", errMsg ) ); + if ( !sourceDir.isValid() ) { + cancelTask( i18n( "Source folder is invalid: '%1'.", sourceDir.lastError() ) ); return; } Maildir destDir = maildirForCollection( destination ); - if ( !destDir.isValid( errMsg ) ) { - cancelTask( i18n( "Destination folder is invalid: '%1'.", errMsg ) ); + if ( !destDir.isValid() ) { + cancelTask( i18n( "Destination folder is invalid: '%1'.", destDir.lastError() ) ); return; } @@ -416,7 +428,7 @@ restartMaildirScan( destDir ); if ( newRid.isEmpty() ) { - cancelTask( i18n( "Could not move message '%1' from '%2' to '%3'.", item.remoteId(), sourceDir.path(), destDir.path() ) ); + cancelTask( i18n( "Could not move message '%1' from '%2' to '%3'. The error was %4.", item.remoteId(), sourceDir.path(), destDir.path(), sourceDir.lastError() ) ); return; } @@ -479,9 +491,8 @@ void MaildirResource::retrieveCollections() { Maildir dir( mSettings->path(), mSettings->topLevelIsContainer() ); - QString errMsg; - if ( !dir.isValid( errMsg ) ) { - emit error( errMsg ); + if ( !dir.isValid() ) { + emit error( dir.lastError() ); collectionsRetrieved( Collection::List() ); return; } @@ -859,5 +870,3 @@ { mChangedFiles.clear(); } - -#include "maildirresource.moc" diff -Nru kdepim-runtime-4.12.3/resources/maildir/maildirresource.desktop kdepim-runtime-4.12.90/resources/maildir/maildirresource.desktop --- kdepim-runtime-4.12.3/resources/maildir/maildirresource.desktop 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/maildir/maildirresource.desktop 2014-03-13 08:12:29.000000000 +0000 @@ -53,7 +53,7 @@ Comment[ar]=تحمل البيانات من مجلد maildir المحلي Comment[bg]=Зареждане на данни от локална папка maildir Comment[bs]=Učitava podatke iz lokalnog maildir direktorija -Comment[ca]=Carregar dades des d'una carpeta «maildir» local +Comment[ca]=Carrega les dades des d'una carpeta pel directori de correu local Comment[ca@valencia]=Carregar dades des d'una carpeta «maildir» local Comment[cs]=Načítá data z místní složky maildir Comment[da]=Indlæser data fra en lokal maildir-mappe diff -Nru kdepim-runtime-4.12.3/resources/maildir/retrieveitemsjob.cpp kdepim-runtime-4.12.90/resources/maildir/retrieveitemsjob.cpp --- kdepim-runtime-4.12.3/resources/maildir/retrieveitemsjob.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/maildir/retrieveitemsjob.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -183,4 +183,3 @@ emitResult(); } -#include "retrieveitemsjob.moc" diff -Nru kdepim-runtime-4.12.3/resources/maildir/settings.ui kdepim-runtime-4.12.90/resources/maildir/settings.ui --- kdepim-runtime-4.12.3/resources/maildir/settings.ui 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/maildir/settings.ui 2014-03-13 08:12:29.000000000 +0000 @@ -16,20 +16,47 @@ - - - Select the folder containing the maildir information: - - - - - - - - - - Open in read-only mode - + + + 0 + + + + Maildir + + + + + + Select the folder containing the maildir information: + + + + + + + + + + Open in read-only mode + + + + + + + Qt::Vertical + + + + 20 + 141 + + + + + + @@ -42,19 +69,6 @@ - - - - Qt::Vertical - - - - 20 - 13 - - - - @@ -62,6 +76,7 @@ KUrlRequester QFrame
    kurlrequester.h
    + 1
    diff -Nru kdepim-runtime-4.12.3/resources/maildir/tests/synctest.cpp kdepim-runtime-4.12.90/resources/maildir/tests/synctest.cpp --- kdepim-runtime-4.12.3/resources/maildir/tests/synctest.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/maildir/tests/synctest.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -60,4 +60,3 @@ QTEST_AKONADIMAIN( SyncTest, NoGUI ) -#include "synctest.moc" diff -Nru kdepim-runtime-4.12.3/resources/mailtransport_dummy/configdialog.cpp kdepim-runtime-4.12.90/resources/mailtransport_dummy/configdialog.cpp --- kdepim-runtime-4.12.3/resources/mailtransport_dummy/configdialog.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/mailtransport_dummy/configdialog.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -54,4 +54,3 @@ Settings::self()->writeConfig(); } -#include "configdialog.moc" diff -Nru kdepim-runtime-4.12.3/resources/mailtransport_dummy/mtdummyresource.cpp kdepim-runtime-4.12.90/resources/mailtransport_dummy/mtdummyresource.cpp --- kdepim-runtime-4.12.3/resources/mailtransport_dummy/mtdummyresource.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/mailtransport_dummy/mtdummyresource.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -106,4 +106,3 @@ AKONADI_RESOURCE_MAIN( MTDummyResource ) -#include "mtdummyresource.moc" diff -Nru kdepim-runtime-4.12.3/resources/mbox/compactpage.cpp kdepim-runtime-4.12.90/resources/mbox/compactpage.cpp --- kdepim-runtime-4.12.3/resources/mbox/compactpage.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/mbox/compactpage.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -129,4 +129,3 @@ ui.messageLabel->setText( i18n( "MBox file compacted." ) ); } -#include "compactpage.moc" diff -Nru kdepim-runtime-4.12.3/resources/mbox/lockmethodpage.cpp kdepim-runtime-4.12.90/resources/mbox/lockmethodpage.cpp --- kdepim-runtime-4.12.3/resources/mbox/lockmethodpage.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/mbox/lockmethodpage.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -55,4 +55,3 @@ } } -#include "lockmethodpage.moc" diff -Nru kdepim-runtime-4.12.3/resources/mbox/mboxresource.cpp kdepim-runtime-4.12.90/resources/mbox/mboxresource.cpp --- kdepim-runtime-4.12.3/resources/mbox/mboxresource.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/mbox/mboxresource.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -360,4 +360,3 @@ AKONADI_AGENT_FACTORY( MboxResource, akonadi_mbox_resource ) -#include "mboxresource.moc" diff -Nru kdepim-runtime-4.12.3/resources/microblog/CMakeLists.txt kdepim-runtime-4.12.90/resources/microblog/CMakeLists.txt --- kdepim-runtime-4.12.3/resources/microblog/CMakeLists.txt 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/microblog/CMakeLists.txt 1970-01-01 00:00:00.000000000 +0000 @@ -1,33 +0,0 @@ -include_directories( ${Boost_INCLUDE_DIR} ) - -set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${KDE4_ENABLE_EXCEPTIONS}" ) - -########### next target ############### - -set( microblogresource_SRCS - microblog.cpp - configdialog.cpp - settings.cpp - communication.cpp - idattribute.cpp -) - -kcfg_generate_dbus_interface( ${CMAKE_CURRENT_SOURCE_DIR}/microblogresource.kcfg org.kde.Akonadi.Microblog.Settings) -qt4_add_dbus_adaptor( microblogresource_SRCS - ${CMAKE_CURRENT_BINARY_DIR}/org.kde.Akonadi.Microblog.Settings.xml settings.h Settings -) - -kde4_add_ui_files(microblogresource_SRCS microblogconfig.ui) -kde4_add_kcfg_files(microblogresource_SRCS settingsbase.kcfgc) -kde4_add_executable(akonadi_microblog_resource ${microblogresource_SRCS}) - -if (Q_WS_MAC) - set_target_properties(akonadi_microblog_resource PROPERTIES MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/../Info.plist.template) - set_target_properties(akonadi_microblog_resource PROPERTIES MACOSX_BUNDLE_GUI_IDENTIFIER "org.kde.Akonadi.Microblog") - set_target_properties(akonadi_microblog_resource PROPERTIES MACOSX_BUNDLE_BUNDLE_NAME "KDE Akonadi Microblog Resource") -endif () - -target_link_libraries(akonadi_microblog_resource ${KDE4_KDECORE_LIBS} ${KDE4_KDEUI_LIBS} ${KDE4_KIO_LIBS} ${KDEPIMLIBS_AKONADI_LIBS} ${QT_QTDBUS_LIBRARY} ${QT_QTCORE_LIBRARY} ${QT_QTXML_LIBRARY} ${KDEPIMLIBS_KPIMUTILS_LIBS} ${KDEPIMLIBS_MICROBLOG_LIBS}) - -install(TARGETS akonadi_microblog_resource ${INSTALL_TARGETS_DEFAULT_ARGS}) -install( FILES microblog.desktop DESTINATION "${CMAKE_INSTALL_PREFIX}/share/akonadi/agents" ) diff -Nru kdepim-runtime-4.12.3/resources/microblog/communication.cpp kdepim-runtime-4.12.90/resources/microblog/communication.cpp --- kdepim-runtime-4.12.3/resources/microblog/communication.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/microblog/communication.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,187 +0,0 @@ -/* - Copyright (C) 2009 Omat Holding B.V. - - 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 "communication.h" - -#include -#include - -#include -#include -#include - -#include -using namespace KIO; - -Communication::Communication( QObject* parent ) - : QObject( parent ), m_service(-1) -{ -} - -Communication::~Communication() -{ -} - -void Communication::setService( int service ) -{ - m_service = service; -} - -void Communication::setCredentials( const QString &username, const QString &password ) -{ - m_username = username; - m_password = password; -} - -KUrl Communication::getBaseUrl() -{ - KUrl url( serviceToApi( m_service ) ); - url.setUser( m_username ); - url.setPass( m_password ); - return url; -} - -void Communication::checkAuth() -{ - KUrl url = getBaseUrl(); - url.addPath( QLatin1String("account/verify_credentials.xml") ); - KIO::StoredTransferJob *job = KIO::storedGet( url, Reload, HideProgressInfo ) ; - connect( job, SIGNAL(result(KJob*)), this, SLOT(slotCheckAuthData(KJob*)) ); -} - -void Communication::slotCheckAuthData( KJob *job ) -{ - if ( job->error() ) { - kDebug() << "Job error, " << job->errorString(); - emit authFailed( i18n( "Login failed" ) ); - return; - } - - StoredTransferJob* transJob = static_cast( job ); - if ( transJob->isErrorPage() ) { - kDebug() << "Login failed"; - emit authFailed( i18n( "Login failed" ) ); - return; - } - - QByteArray data = transJob->data(); - kDebug() << "Received: " << data; - - QDomDocument dom; - dom.setContent( data ); - QDomNodeList nodeList = dom.elementsByTagName( QLatin1String("user") ); - if ( nodeList.count() > 0 ) { - kDebug() << "Authorization is OK"; - emit authOk(); - return; - } - - emit authFailed( i18n( "Authentication error" ) ); -} - -void Communication::retrieveFolder( const QString &folder, qlonglong since ) -{ - m_retrievingFolder = folder; - - KUrl url = getBaseUrl(); - if ( folder == QLatin1String("home") ) { - url.addPath( QLatin1String("statuses/friends_timeline.xml") ); - } else if ( folder == QLatin1String("replies") ) { - url.addPath( QLatin1String("statuses/replies.xml") ); - } else if ( folder == QLatin1String("favorites") ) { - url.addPath( QLatin1String("favorites.xml") ); - } else if ( folder == QLatin1String("inbox") ) { - url.addPath( QLatin1String("direct_messages.xml") ); - } else if ( folder == QLatin1String("outbox") ) { - url.addPath( QLatin1String("direct_messages/sent.xml") ); - } - - if ( since == 0 ) - url.addQueryItem( QLatin1String("page"), QLatin1String("1") ); - else - url.addQueryItem( QLatin1String("since_id"), QString::number( since ) ); - - kDebug() << url; - - KIO::StoredTransferJob *job = KIO::storedGet( url, Reload, HideProgressInfo ) ; - connect( job, SIGNAL(result(KJob*)), this, SLOT(slotStatusListReceived(KJob*)) ); -} - -void Communication::slotStatusListReceived( KJob* job ) -{ - QList list; - - if ( job->error() ) { - kDebug() << "Job error, " << job->errorString(); - emit statusList( list ); - return; - } - - StoredTransferJob* transJob = static_cast( job ); - QByteArray data = transJob->data(); - - // Parse the data. - QDomDocument document; - document.setContent( data ); - - QLatin1String main( "statuses" ); - QLatin1String sub( "status" ); - if ( m_retrievingFolder == QLatin1String("inbox") || m_retrievingFolder ==QLatin1String( "outbox") ) { - main = QLatin1String( "direct-messages" ); - sub = QLatin1String( "direct_message" ); - } - - QDomElement root = document.documentElement(); - if ( root.tagName() != main ) { - kDebug() << "** there's no " << main << "tag in XML\t the XML is: \n" << data.data(); - emit statusList( list ); - return; - } - - QDomNode node = root.firstChild(); - while ( !node.isNull() ) { - if ( node.toElement().tagName() != sub ) { - kDebug() << "** there's no " << sub << "tag in XML, maybe there is no new status!" << data.data(); - emit statusList( list ); - return; - } - - QByteArray g; - QTextStream out( &g ); - node.save( out, 0 ); - list << g; - - node = node.nextSibling(); - } - emit statusList( list ); -} - -QString Communication::serviceToApi( int service ) -{ - if ( service == 0 ) - return QLatin1String( "http://identi.ca/api/" ); - else if ( service == 1 ) - return QLatin1String( "http://twitter.com/" ); - - return QString(); -} - -#include "communication.moc" - - diff -Nru kdepim-runtime-4.12.3/resources/microblog/communication.h kdepim-runtime-4.12.90/resources/microblog/communication.h --- kdepim-runtime-4.12.3/resources/microblog/communication.h 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/microblog/communication.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,59 +0,0 @@ -/* - Copyright (C) 2009 Omat Holding B.V. - - 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 __COMMUNICATION_H__ -#define __COMMUNICATION_H__ - -#include -#include - -class Communication : public QObject -{ - Q_OBJECT - -public: - explicit Communication( QObject *parent ); - ~Communication(); - enum Service { Identi, Twitter }; - void setService( int ); - void setCredentials( const QString&, const QString& ); - void checkAuth(); - void retrieveFolder( const QString&, qlonglong since=0 ); - -private: - QString serviceToApi( int service ); - KUrl getBaseUrl(); - - int m_service; - QString m_username; - QString m_password; - QString m_retrievingFolder; - -private slots: - void slotCheckAuthData( KJob* ); - void slotStatusListReceived( KJob* job ); - -signals: - void authOk(); - void authFailed( const QString& ); - void statusList( const QList ); -}; - - -#endif diff -Nru kdepim-runtime-4.12.3/resources/microblog/configdialog.cpp kdepim-runtime-4.12.90/resources/microblog/configdialog.cpp --- kdepim-runtime-4.12.3/resources/microblog/configdialog.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/microblog/configdialog.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,115 +0,0 @@ -/* - Copyright (c) 2008 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 "configdialog.h" -#include "settings.h" - -#include -#include -#include -#include - -#include - -ConfigDialog::ConfigDialog( QWidget * parent ) : - KDialog( parent ) -{ - m_comm = new Communication( this ); - connect( m_comm, SIGNAL(authOk()), SLOT(slotAuthOk()) ); - connect( m_comm, SIGNAL(authFailed(QString)), SLOT(slotAuthFailed(QString)) ); - ui.setupUi( mainWidget() ); - mManager = new KConfigDialogManager( this, Settings::self() ); - mManager->updateWidgets(); - ui.password->setText( Settings::self()->password() ); - if (ui.kcfg_Name->text().isEmpty() ) { - KUser user; - QString usersName = user.property( KUser::FullName ).toString(); - if ( usersName.isEmpty() ) - usersName = user.loginName(); - if ( !usersName.isEmpty() ) - ui.kcfg_Name->setText( usersName ); - } - setButtons( KDialog::Ok | KDialog::Cancel ); - ui.testButton->setEnabled( !ui.kcfg_Name->text().isEmpty() ); - connect( ui.testButton, SIGNAL(clicked()), SLOT(slotTestClicked()) ); - connect( ui.kcfg_UserName, SIGNAL(textChanged(QString)), SLOT(slotTextChanged(QString))); - connect( ui.openidLabel, SIGNAL(linkActivated(QString)), SLOT(slotLinkClicked()) ); -} - -ConfigDialog::~ConfigDialog() -{ - delete m_comm; -} - -void ConfigDialog::slotTestClicked() -{ - kDebug() << "Test request" << ui.kcfg_Service->currentIndex() - << ui.kcfg_UserName->text() << ui.password->text(); - setCursor( Qt::BusyCursor ); - ui.statusLabel->setText( i18n( "Checking..." ) ); - ui.testButton->setEnabled( false ); - m_comm->setService( ui.kcfg_Service->currentIndex() ); - m_comm->setCredentials( ui.kcfg_UserName->text(), ui.password->text() ); - m_comm->checkAuth(); -} - -void ConfigDialog::slotTextChanged(const QString &text) -{ - ui.testButton->setEnabled( !text.isEmpty() ); -} - -void ConfigDialog::slotButtonClicked( int button ) -{ - if (button == KDialog::Ok) { - Settings::self()->setPassword( ui.password->text() ); - mManager->updateSettings(); - accept(); - } else { - KDialog::slotButtonClicked(button); - } - } - -void ConfigDialog::slotAuthOk() -{ - unsetCursor(); - ui.testButton->setEnabled( true ); - ui.statusLabel->setText( i18n( "OK" ) ); - ui.statusImageLabel->setPixmap( KIcon( QLatin1String("dialog-ok") ).pixmap( 16 ) ); - Settings::self()->setPassword( ui.password->text() ); - mManager->updateSettings(); -} - -void ConfigDialog::slotAuthFailed( const QString& error ) -{ - Q_UNUSED( error ); -//TODO what is the need of the unused parameter(s)? -// should error be shown to the user? - unsetCursor(); - ui.statusLabel->setText( i18n( "Failed" ) ); - ui.statusImageLabel->setPixmap( KIcon( QLatin1String("dialog-cancel") ).pixmap( 16 ) ); - ui.testButton->setEnabled( true ); -} - -void ConfigDialog::slotLinkClicked() -{ - QWhatsThis::showText( QCursor::pos(), i18n( "OpenId users must first specify a password in " - "the settings on the webpage, as this resource cannot use OpenId." ), this ); -} - -#include "configdialog.moc" diff -Nru kdepim-runtime-4.12.3/resources/microblog/configdialog.h kdepim-runtime-4.12.90/resources/microblog/configdialog.h --- kdepim-runtime-4.12.3/resources/microblog/configdialog.h 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/microblog/configdialog.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,53 +0,0 @@ -/* - Copyright (c) 2008 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 CONFIGDIALOG_H -#define CONFIGDIALOG_H - -#include - -#include "ui_microblogconfig.h" -#include "communication.h" - -class KConfigDialogManager; - -class ConfigDialog : public KDialog -{ - Q_OBJECT -public: - explicit ConfigDialog( QWidget *parent = 0 ); - ~ConfigDialog(); - -protected: - virtual void slotButtonClicked( int button ); - -private slots: - void slotTestClicked(); - void slotAuthOk(); - void slotAuthFailed( const QString& ); - void slotLinkClicked(); - void slotTextChanged(const QString &text); - -private: - Ui::ConfigDialog ui; - KConfigDialogManager* mManager; - Communication* m_comm; -}; - -#endif diff -Nru kdepim-runtime-4.12.3/resources/microblog/idattribute.cpp kdepim-runtime-4.12.90/resources/microblog/idattribute.cpp --- kdepim-runtime-4.12.3/resources/microblog/idattribute.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/microblog/idattribute.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,64 +0,0 @@ -/* - Copyright (C) 2009 Omat Holding B.V. - - 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 "idattribute.h" - -#include -#include - -#include - -IdAttribute::IdAttribute() : mId( 0 ) -{ -} - -IdAttribute::IdAttribute( qlonglong id ) - : mId( id ) -{ -} - -void IdAttribute::setId( qlonglong id ) -{ - mId = id; -} - -qlonglong IdAttribute::id() const -{ - return mId; -} - -QByteArray IdAttribute::type() const -{ - return "id"; -} - -Akonadi::Attribute* IdAttribute::clone() const -{ - return new IdAttribute( mId ); -} - -QByteArray IdAttribute::serialized() const -{ - return QByteArray::number( mId ); -} - -void IdAttribute::deserialize( const QByteArray &data ) -{ - mId = data.toLongLong(); -} diff -Nru kdepim-runtime-4.12.3/resources/microblog/idattribute.h kdepim-runtime-4.12.90/resources/microblog/idattribute.h --- kdepim-runtime-4.12.3/resources/microblog/idattribute.h 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/microblog/idattribute.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,41 +0,0 @@ -/* - Copyright (C) 2009 Omat Holding B.V. - - 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 IDATTRIBUTE_H -#define IDATTRIBUTE_H - -#include - -class IdAttribute : public Akonadi::Attribute -{ -public: - IdAttribute(); - IdAttribute( qlonglong id ); - void setId( qlonglong id ); - qlonglong id() const; - virtual QByteArray type() const; - virtual Attribute* clone() const; - virtual QByteArray serialized() const; - virtual void deserialize( const QByteArray &data ); - -private: - qlonglong mId; -}; - -#endif diff -Nru kdepim-runtime-4.12.3/resources/microblog/Messages.sh kdepim-runtime-4.12.90/resources/microblog/Messages.sh --- kdepim-runtime-4.12.3/resources/microblog/Messages.sh 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/microblog/Messages.sh 1970-01-01 00:00:00.000000000 +0000 @@ -1,3 +0,0 @@ -#! /usr/bin/env bash -$EXTRACTRC `find . -name \*.ui` `find . -name \*.kcfg` >> rc.cpp || exit 11 -$XGETTEXT *.cpp -o $podir/akonadi_microblog_resource.pot diff -Nru kdepim-runtime-4.12.3/resources/microblog/microblogconfig.ui kdepim-runtime-4.12.90/resources/microblog/microblogconfig.ui --- kdepim-runtime-4.12.3/resources/microblog/microblogconfig.ui 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/microblog/microblogconfig.ui 1970-01-01 00:00:00.000000000 +0000 @@ -1,183 +0,0 @@ - - - ConfigDialog - - - - 0 - 0 - 280 - 250 - - - - - 280 - 250 - - - - - - - <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> -<html><head><meta name="qrichtext" content="1" /><style type="text/css"> -p, li { white-space: pre-wrap; } -</style></head><body style=" font-family:'Liberation Sans'; font-size:9pt; font-weight:400; font-style:normal;"> -<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Account Details</span></p></body></html> - - - true - - - - - - - - - Name: - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - - - - Service: - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - - Identi.ca - - - - - Twitter - - - - - - - - Username: - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - - - - Password: - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - true - - - - - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - - - - - - - - - - - - - - Test - - - - - - - - - <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> -<html><head><meta name="qrichtext" content="1" /><style type="text/css"> -p, li { white-space: pre-wrap; } -</style></head><body style=" font-family:'Liberation Sans'; font-size:9pt; font-weight:400; font-style:normal;"> -<p align="right" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><a href="tomaistheking"><span style=" text-decoration: underline; color:#0000ff;">Using OpenID?</span></a></p></body></html> - - - - - - - Qt::Vertical - - - - 20 - 0 - - - - - - - - - KLineEdit - QLineEdit -
    klineedit.h
    -
    - - KComboBox - QComboBox -
    kcombobox.h
    -
    -
    - - -
    diff -Nru kdepim-runtime-4.12.3/resources/microblog/microblog.cpp kdepim-runtime-4.12.90/resources/microblog/microblog.cpp --- kdepim-runtime-4.12.3/resources/microblog/microblog.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/microblog/microblog.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,209 +0,0 @@ -/* - Copyright (C) 2009 Omat Holding B.V. - - 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 "microblog.h" -#include "configdialog.h" -#include "communication.h" -#include "settingsadaptor.h" -#include "idattribute.h" - -#include -#include -#include - -#include -#include -#include -#include -#include -#include - - -using namespace Akonadi; -using namespace Microblog; - -MicroblogResource::MicroblogResource( const QString &id ) - : ResourceBase( id ), m_comm( 0 ) -{ - new SettingsAdaptor( Settings::self() ); - QDBusConnection::sessionBus().registerObject( QLatin1String( "/Settings" ), - Settings::self(), QDBusConnection::ExportAdaptors ); - AttributeFactory::registerAttribute(); - initComm(); -} - -MicroblogResource::~MicroblogResource() -{ - delete m_comm; -} - -void MicroblogResource::initComm() -{ - delete m_comm; - m_comm = 0; - - if ( Settings::self()->userName().isEmpty() || Settings::self()->password().isEmpty() ) - return; - - m_comm = new Communication( this ); - m_comm->setService( Settings::self()->service() ); - m_comm->setCredentials( Settings::self()->userName(), Settings::self()->password() ); - connect( m_comm, SIGNAL(statusList(QList)), - SLOT(slotStatusList(QList)) ); - - synchronizeCollectionTree(); -} - -void MicroblogResource::retrieveCollections() -{ - QHash collections; - - // if there is no connection, don't continue. - if ( !m_comm ) { - kDebug() << "Tried to retrieve collection, but there is no connection"; - collectionsRetrieved( collections.values() ); - return; - } - - Collection root; - root.setName( i18n( "%1's microblog", Settings::self()->name() ) ); - root.setRemoteId( QLatin1String("microblog") ); - root.setContentMimeTypes( QStringList( Collection::mimeType() ) ); - Collection::Rights rights = Collection::ReadOnly; - root.setRights( rights ); - - CachePolicy policy; - policy.setInheritFromParent( false ); - policy.setSyncOnDemand( true ); - policy.setIntervalCheckTime( -1 ); - root.setCachePolicy( policy ); - - collections[ QLatin1String("rootfolderunique") ] = root; - - // for all the folders, inherit it from the parent. - policy.setInheritFromParent( true ); - - QStringList folders; - folders << QLatin1String("home") << QLatin1String("replies") << QLatin1String("favorites") << QLatin1String("inbox") << QLatin1String("outbox"); - QStringList foldersI18n; - foldersI18n << i18n( "Home" ) << i18n( "Replies" ) - << i18n( "Favorites" ) << i18n( "Inbox" ) << i18n( "Outbox" ); - QStringList contentTypes; - contentTypes << QLatin1String("application/x-vnd.kde.microblog"); - - for ( int i=0; i<5; ++i ) { - Collection c; - c.setRemoteId( folders.at( i ) ); - c.setContentMimeTypes( contentTypes ); - c.setName( foldersI18n.at( i ) ); - c.parentCollection().setRemoteId( QLatin1String("microblog") ); - c.setRights( Collection::ReadOnly ); - - CachePolicy policy; - policy.setInheritFromParent( false ); - policy.setSyncOnDemand( true ); - policy.setIntervalCheckTime( 5 ); - c.setCachePolicy( policy ); - - collections[ folders.at( i )] = c; - } - - collectionsRetrieved( collections.values() ); -} - -void MicroblogResource::retrieveItems( const Akonadi::Collection &collection ) -{ - if ( !m_comm ) { - itemsRetrievalDone(); - return; - } - - m_collection = collection; - - // get only newer items, except for favorites, which does not allow that. - int id = 0; - if ( m_collection.hasAttribute( "id" ) && collection.remoteId() != QLatin1String("favorites") ) { - IdAttribute* currentid = static_cast( m_collection.attribute( "id" ) ); - id = currentid->id(); - } - kDebug() << "Getting everything for " << collection.name() << "and id >" << id; - - m_comm->retrieveFolder( collection.remoteId(), id ); -} - -void MicroblogResource::slotStatusList( const QList list ) -{ - kDebug() << list.count() << "received for" << m_collection.name(); - if ( list.count() == 0 ) { - itemsRetrievalDone(); - return; - } - - IdAttribute* currentid; - if ( m_collection.hasAttribute( "id" ) ) { - currentid = static_cast( m_collection.attribute( "id" ) ); - } else { - currentid = new IdAttribute( 0 ); - m_collection.addAttribute( currentid ); - } - - Item::List messages; - foreach( const QByteArray& status, list ) { - Akonadi::Item item( -1 ); - StatusItem stat( status ); - item.setRemoteId( QString::number( stat.id() ) ); - if ( stat.id() > currentid->id() ) - currentid->setId( stat.id() ); - item.setMimeType( QLatin1String("application/x-vnd.kde.microblog") ); - item.setPayload( stat ); - item.setSize( status.length() ); - messages.append( item ); - } - - new Akonadi::CollectionModifyJob( m_collection ); - itemsRetrievedIncremental( messages, Item::List() ); -} - -bool MicroblogResource::retrieveItem( const Akonadi::Item &item, const QSet& ) -{ - itemRetrieved( item ); - return true; -} - -void MicroblogResource::configure( WId windowId ) -{ - ConfigDialog dlg; - if ( windowId ) - KWindowSystem::setMainWindow( &dlg, windowId ); - dlg.setWindowIcon( KIcon( QLatin1String("view-pim-journal") ) ); - if ( dlg.exec() ) { - emit configurationDialogAccepted(); - } else { - emit configurationDialogRejected(); - } - if ( !Settings::self()->name().isEmpty() ) - setName( i18n( "%1's microblog", Settings::self()->name() ) ); - initComm(); -} - -AKONADI_RESOURCE_MAIN( MicroblogResource ) - -#include "microblog.moc" - - diff -Nru kdepim-runtime-4.12.3/resources/microblog/microblog.desktop kdepim-runtime-4.12.90/resources/microblog/microblog.desktop --- kdepim-runtime-4.12.3/resources/microblog/microblog.desktop 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/microblog/microblog.desktop 1970-01-01 00:00:00.000000000 +0000 @@ -1,100 +0,0 @@ -[Desktop Entry] -Name=Microblog (Twitter and Identi.ca) -Name[ar]=التدوين المصغر ( تويتر و Identi.ca ) -Name[bg]=Микроблог (Twitter и Identi.ca) -Name[bs]=Mikroblog (Twitter i Identi.ca) -Name[ca]=Microbloc (Twitter i Identi.ca) -Name[ca@valencia]=Microbloc (Twitter i Identi.ca) -Name[cs]=Microblog (Twitter a Identi.ca) -Name[da]=Microblog (Twitter og Identi.ca) -Name[de]=Microblog (Twitter und Identi.ca) -Name[el]=Microblog (Twitter και Identi.ca) -Name[en_GB]=Microblog (Twitter and Identi.ca) -Name[es]=Microblog (Twitter e Identi.ca) -Name[et]=Mikroblogi (Twitter ja Identi.ca) -Name[fi]=Mikroblogaus (Twitter ja Identi.ca) -Name[fr]=Microblog (« Twitter » et « Identi.ca ») -Name[ga]=Micreabhlagadóireacht (Twitter agus Identi.ca) -Name[gl]=Microblog (Twitter e Identi.ca) -Name[hu]=Microblog (Twitter, Identi.ca) -Name[ia]=Microblot (Twitter e Identi.ca) -Name[it]=Microblog (Twitter e Identi.ca) -Name[ja]=マイクロブログ (Twitter や Identi.ca) -Name[kk]=Микроблог (Twitter және Identi.ca) -Name[km]=Microblog (Twitter និង Identi.ca) -Name[ko]=마이크로블로그 (트위터 및 identi.ca) -Name[lt]=Mažasis dienoraštis (Twitter ir Identi.ca) -Name[lv]=Mikroblogi (Twitter un Identi.ca) -Name[nb]=Mikroblogging (Twitter og Identi.ca) -Name[nds]=Lüttdaagbook (Twitter un Identi.ca) -Name[nl]=Microblog (Twitter en Identi.ca) -Name[nn]=Mikroblogging (Twitter og Identi.ca) -Name[pa]=ਮਾਈਕਰੋਬਲੌਗ (ਟਵਿੱਟਰ ਅਤੇ Identi.ca) -Name[pl]=Mikroblog (Twitter i Identi.ca) -Name[pt]=Micro-blog (Twitter e Identi.ca) -Name[pt_BR]=Microblog (Twitter e Identi.ca) -Name[ro]=Microblog (Twitter și Identi.ca) -Name[ru]=Микроблог (Twitter и Identi.ca) -Name[sk]=Mikroblog (Twitter a Identi.ca) -Name[sl]=Mikroblog (identi.ca in Twitter) -Name[sr]=Микроблог (Твитер и Идентика) -Name[sr@ijekavian]=Микроблог (Твитер и Идентика) -Name[sr@ijekavianlatin]=Mikroblog (Twitter i identi.ca) -Name[sr@latin]=Mikroblog (Twitter i identi.ca) -Name[sv]=Mikroblogg (Twitter och Identi.ca) -Name[tr]=Mini günlük (Twitter ve Identi.ca) -Name[uk]=Міктоблог (Twitter і Identi.ca) -Name[x-test]=xxMicroblog (Twitter and Identi.ca)xx -Name[zh_CN]=微博客(Twitter 和 Identi.ca 等) -Name[zh_TW]=Microblog(Twitter 與 Identi.ca) -Comment=Shows your microblog data from Twitter or Identi.ca. -Comment[ar]=تظهر بيانات التدوين المصغر من Twitter أو Identi.ca . -Comment[bs]=Prikazuje vaše mikroblog podatke sa Twittera ili Identi.ca-e. -Comment[ca]=Mostra les vostres dades d'un microbloc de Twitter o Identi.ca. -Comment[ca@valencia]=Mostra les vostres dades d'un microbloc de Twitter o Identi.ca. -Comment[da]=Viser dine microblog-data fra Twitter eller Identi.ca. -Comment[de]=Zeigt Microblog-Daten aus Twitter oder Identi.ca an. -Comment[el]=Εμφάνιση των δεδομένων σας από το Twitter ή το Identi.ca. -Comment[en_GB]=Shows your microblog data from Twitter or Identi.ca. -Comment[es]=Muestra sus datos microblog desde Twitter o Identi.ca. -Comment[et]=Näitab mikroblogi andmeid Twitterist või Identi.ca-st -Comment[fi]=Näyttää mikroblogitietosi Twitteristä tai Identi.casta. -Comment[fr]=Affiche vos données de micro-blogs provenant de « Twitter » et « Identi.ca ». -Comment[ga]=Taispeáin do shonraí micreabhlagadóireachta ó Twitter nó Identi.ca. -Comment[gl]=Mostra os seus datos de microblog de Twitter ou Identi.ca. -Comment[hu]=Megjeleníti a Twitter vagy az Identi.ca adatait. -Comment[ia]=Monstra tu datos de microblog de Twitter o Identi.ca. -Comment[it]=Mostra i dati di microblog da Twitter o Identi.ca. -Comment[ja]=Twitter や Identi.ca からマイクロブログを表示します。 -Comment[kk]=Twitter не Identi.ca.микроблогтарыңызды көрсету -Comment[km]=បង្ហាញ​ទិន្នន័យ microblog របស់​អ្នក​ពី Twitter ឬ Identi.ca ។ -Comment[ko]=트위터나 identi.ca의 마이크로블로그 데이터를 표시합니다. -Comment[lt]=Rodo mažojo dienoraščio duomenis iš Twitter arba Identi.ca. -Comment[lv]=Rāda jūsu mikrobliogu datus no Twitter un Identi.ca. -Comment[nb]=Viser dine mikrobloggdata fra Twitter eller Identi.ca -Comment[nds]=Wiest Dien Lüttdaagbook-Daten ut Twitter un Identi.ca. -Comment[nl]=Toont uw microblog gegevens uit Twitter of Identi.ca. -Comment[nn]=Viser mikrobloggdata frå Twitter eller Identi.ca. -Comment[pl]=Pokazuje dane mikroblogów z Twittera lub Identi.ca. -Comment[pt]=Mostra os seus dados dos micro-blogs Twitter ou Identi.ca. -Comment[pt_BR]=Exibe os dados do seu microblog do Twitter ou Identi.ca. -Comment[ro]=Vă arată datele de microblog de pe Twitter și Identi.ca. -Comment[ru]=Показывать данные с микроблогов Twitter или Identi.ca. -Comment[sk]=Zobrazí vaše dáta mikroblogu z Twittera alebo Identi.ca. -Comment[sl]=Prikazuje podatke z vašega računa na identi.ca in Twitter. -Comment[sr]=Приказује ваше микроблог податке са Твитера или Идентике. -Comment[sr@ijekavian]=Приказује ваше микроблог податке са Твитера или Идентике. -Comment[sr@ijekavianlatin]=Prikazuje vaše mikroblog podatke sa Twittera ili identi.ce. -Comment[sr@latin]=Prikazuje vaše mikroblog podatke sa Twittera ili identi.ce. -Comment[sv]=Visar data från din blogg hos Twitter eller Identi.ca. -Comment[tr]=Twitter veya Identi.ca servislerinde bulunan mini günlük verilerinizi gösterir. -Comment[uk]=Показує ваші дані з мікроблогу Twitter або Identi.ca. -Comment[x-test]=xxShows your microblog data from Twitter or Identi.ca.xx -Comment[zh_CN]=显示您在 Twitter 或 Identi.ca 上的微博客数据 -Comment[zh_TW]=顯示從 Twitter 或 Identi.ca 來的 microblog 資料 -Type=AkonadiResource -Exec=akonadi_microblog_resource - -X-Akonadi-MimeTypes=application/x-vnd.kde.microblog -X-Akonadi-Capabilities=Resource -X-Akonadi-Identifier=akonadi_microblog_resource diff -Nru kdepim-runtime-4.12.3/resources/microblog/microblog.h kdepim-runtime-4.12.90/resources/microblog/microblog.h --- kdepim-runtime-4.12.3/resources/microblog/microblog.h 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/microblog/microblog.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,53 +0,0 @@ -/* - Copyright (C) 2009 Omat Holding B.V. - - 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 __MICROBLOG_H__ -#define __MICROBLOG_H__ - -#include - -#include "communication.h" - -class MicroblogResource : public Akonadi::ResourceBase, public Akonadi::AgentBase::Observer -{ - Q_OBJECT - Q_CLASSINFO( "D-Bus Interface", "org.kde.Akonadi.Microblog.Resource" ) - -public: - explicit MicroblogResource( const QString &id ); - ~MicroblogResource(); - -public Q_SLOTS: - void configure( WId windowId ); - -protected Q_SLOTS: - virtual void retrieveCollections(); - virtual void retrieveItems( const Akonadi::Collection &col ); - virtual bool retrieveItem( const Akonadi::Item&, const QSet& ); - -private Q_SLOTS: - void slotStatusList( const QList ); - -private: - void initComm(); - Communication* m_comm; - Akonadi::Collection m_collection; -}; - -#endif diff -Nru kdepim-runtime-4.12.3/resources/microblog/microblogresource.kcfg kdepim-runtime-4.12.90/resources/microblog/microblogresource.kcfg --- kdepim-runtime-4.12.3/resources/microblog/microblogresource.kcfg 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/microblog/microblogresource.kcfg 1970-01-01 00:00:00.000000000 +0000 @@ -1,28 +0,0 @@ - - - - - - - - - - - - Identi - - - - - - - - - - - - diff -Nru kdepim-runtime-4.12.3/resources/microblog/settingsbase.kcfgc kdepim-runtime-4.12.90/resources/microblog/settingsbase.kcfgc --- kdepim-runtime-4.12.3/resources/microblog/settingsbase.kcfgc 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/microblog/settingsbase.kcfgc 1970-01-01 00:00:00.000000000 +0000 @@ -1,8 +0,0 @@ -File=microblogresource.kcfg -ClassName=SettingsBase -Mutators=true -ItemAccessors=true -SetUserTexts=true -Singleton=false -#IncludeFiles= -GlobalEnums=true diff -Nru kdepim-runtime-4.12.3/resources/microblog/settings.cpp kdepim-runtime-4.12.90/resources/microblog/settings.cpp --- kdepim-runtime-4.12.3/resources/microblog/settings.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/microblog/settings.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,61 +0,0 @@ -/* - Copyright (c) 2008 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 "settings.h" - -#include - -class SettingsHelper -{ -public: - SettingsHelper() : q( 0 ) {} - ~SettingsHelper() { - delete q; - } - Settings *q; -}; - -K_GLOBAL_STATIC( SettingsHelper, s_globalSettings ) - -Settings *Settings::self() -{ - if ( !s_globalSettings->q ) { - new Settings; - s_globalSettings->q->readConfig(); - } - - return s_globalSettings->q; -} - -Settings::Settings() : SettingsBase() -{ - Q_ASSERT( !s_globalSettings->q ); - s_globalSettings->q = this; -} - -QString Settings::password() const -{ - return mPassword; -} - -void Settings::setPassword( const QString & password ) -{ - mPassword = password; -} - diff -Nru kdepim-runtime-4.12.3/resources/microblog/settings.h kdepim-runtime-4.12.90/resources/microblog/settings.h --- kdepim-runtime-4.12.3/resources/microblog/settings.h 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/microblog/settings.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,39 +0,0 @@ -/* - Copyright (c) 2008 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 SETTINGS_H -#define SETTINGS_H - -#include "settingsbase.h" - -class Settings : public SettingsBase -{ -public: - Settings(); - static Settings *self(); - - // TODO: temporary, wallet support - QString password() const; - void setPassword( const QString &password ); - -private: - QString mPassword; -}; - -#endif diff -Nru kdepim-runtime-4.12.3/resources/mixedmaildir/CMakeLists.txt kdepim-runtime-4.12.90/resources/mixedmaildir/CMakeLists.txt --- kdepim-runtime-4.12.3/resources/mixedmaildir/CMakeLists.txt 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/mixedmaildir/CMakeLists.txt 2014-03-13 08:12:29.000000000 +0000 @@ -10,10 +10,6 @@ ${QT_QTDBUS_INCLUDE_DIR} ${Boost_INCLUDE_DIR} ) -include_directories( - ${SOPRANO_INCLUDE_DIR} - ${NEPOMUK_CORE_INCLUDE_DIR} -) set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${KDE4_ENABLE_EXCEPTIONS}" ) @@ -28,6 +24,7 @@ mixedmaildirresource.cpp mixedmaildirstore.cpp retrieveitemsjob.cpp + ../shared/createandsettagsjob.cpp ) install( FILES mixedmaildirresource.desktop DESTINATION "${CMAKE_INSTALL_PREFIX}/share/akonadi/agents" ) @@ -61,7 +58,6 @@ ${KDEPIMLIBS_KMBOX_LIBS} ${KDEPIMLIBS_KMIME_LIBS} ${KDEPIMLIBS_KPIMUTILS_LIBS} - ${NEPOMUK_CORE_LIBRARY} ) install(TARGETS akonadi_mixedmaildir_resource ${INSTALL_TARGETS_DEFAULT_ARGS}) diff -Nru kdepim-runtime-4.12.3/resources/mixedmaildir/compactchangehelper.cpp kdepim-runtime-4.12.90/resources/mixedmaildir/compactchangehelper.cpp --- kdepim-runtime-4.12.3/resources/mixedmaildir/compactchangehelper.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/mixedmaildir/compactchangehelper.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -233,6 +233,6 @@ } } -#include "compactchangehelper.moc" +#include "moc_compactchangehelper.cpp" // kate: space-indent on; indent-width 2; replace-tabs on; diff -Nru kdepim-runtime-4.12.3/resources/mixedmaildir/configdialog.cpp kdepim-runtime-4.12.90/resources/mixedmaildir/configdialog.cpp --- kdepim-runtime-4.12.3/resources/mixedmaildir/configdialog.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/mixedmaildir/configdialog.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -58,15 +58,14 @@ if ( d.exists() ) { Maildir md( d.path() ); - QString error; - if ( !md.isValid( error ) ) { + if ( !md.isValid() ) { Maildir md2( d.path(), true ); if ( md2.isValid() ) { ui.statusLabel->setText( i18n( "The selected path contains valid Maildir folders." ) ); mToplevelIsContainer = true; ok = true; } else { - ui.statusLabel->setText( error ); + ui.statusLabel->setText( md.lastError() ); } } else { ui.statusLabel->setText( i18n( "The selected path is a valid Maildir." ) ); @@ -92,4 +91,3 @@ Settings::self()->writeConfig(); } -#include "configdialog.moc" diff -Nru kdepim-runtime-4.12.3/resources/mixedmaildir/mixedmaildirresource.cpp kdepim-runtime-4.12.90/resources/mixedmaildir/mixedmaildirresource.cpp --- kdepim-runtime-4.12.3/resources/mixedmaildir/mixedmaildirresource.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/mixedmaildir/mixedmaildirresource.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -28,6 +28,7 @@ #include "settings.h" #include "settingsadaptor.h" #include "retrieveitemsjob.h" +#include "createandsettagsjob.h" #include "filestore/collectioncreatejob.h" @@ -54,18 +55,19 @@ #include -#include -#include - #include -#include +#include #include #include #include +#include + using namespace Akonadi; + + MixedMaildirResource::MixedMaildirResource( const QString &id ) : ResourceBase( id ), mStore( new MixedMaildirStore() ), mCompactHelper( 0 ) { @@ -805,22 +807,19 @@ const QStringList tagList = job->property( "tagList" ).value(); kDebug() << "Tagging item" << item.url() << "with" << tagList; - QList nepomukTags; + Akonadi::Tag::List tags; Q_FOREACH( const QString &tag, tagList ) { if ( tag.isEmpty() ) { kWarning() << "TagList for item" << item.url() << "contains an empty tag"; } else { - nepomukTags << Nepomuk2::Tag( tag ); + tags << Akonadi::Tag(tag); } } - - Nepomuk2::Resource nepomukResource( item.url() ); - nepomukResource.setTags( nepomukTags ); + new CreateAndSetTagsJob(item, tags); processNextTagContext(); } -#include "mixedmaildirresource.moc" AKONADI_RESOURCE_MAIN( MixedMaildirResource ) diff -Nru kdepim-runtime-4.12.3/resources/mixedmaildir/mixedmaildirstore.cpp kdepim-runtime-4.12.90/resources/mixedmaildir/mixedmaildirstore.cpp --- kdepim-runtime-4.12.3/resources/mixedmaildir/mixedmaildirstore.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/mixedmaildir/mixedmaildirstore.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -47,7 +47,7 @@ #include -#include +#include #include #include @@ -328,13 +328,16 @@ if ( !result.isEmpty() && mHasIndexData ) { mIndexData.insert( result, KMIndexDataPtr( new KMIndexData ) ); Q_ASSERT( mIndexData.value( result )->isEmpty() ); + } else { + //TODO: use the error string? + kWarning() << mMaildir.lastError(); } return result; } void writeEntry( const QString &key, const QByteArray &data ) { - mMaildir.writeEntry( key, data ); + mMaildir.writeEntry( key, data ); //TODO: error handling if ( mHasIndexData ) { mIndexData.insert( key, KMIndexDataPtr( new KMIndexData ) ); } @@ -359,6 +362,9 @@ if ( destination.mHasIndexData ) { destination.mIndexData.insert( result, KMIndexDataPtr( new KMIndexData ) ); } + } else { + //TODO error handling? + kWarning() << mMaildir.lastError(); } return result; @@ -373,7 +379,11 @@ } bool isValid( QString &error ) const { - return mMaildir.isValid( error ); + bool result = mMaildir.isValid(); + if ( !result ) { + error = mMaildir.lastError(); + } + return result; } bool isValidEntry( const QString &entry ) const { @@ -839,7 +849,7 @@ } item.setModificationTime( mbox->modificationTime() ); - + // TODO: size? if ( includeHeaders || includeBody ) { @@ -865,7 +875,7 @@ const qint64 entrySize = md->maildir().size( item.remoteId() ); if ( entrySize < 0 ) return false; - + item.setSize( entrySize ); item.setModificationTime( md->maildir().lastModified( item.remoteId() ) ); @@ -954,7 +964,7 @@ bool MixedMaildirStore::Private::visit( FileStore::Job *job ) { - const QString message = i18nc( "@info:status", "Unhandled operation %1", job->metaObject()->className() ); + const QString message = i18nc( "@info:status", "Unhandled operation %1", QLatin1String(job->metaObject()->className()) ); kError() << message; q->notifyError( FileStore::Job::InvalidJobContext, message ); return false; @@ -1741,7 +1751,7 @@ const bool payloadChangedButIgnored = payloadChanged && job->ignorePayload(); const bool ignoreModifyIfValid = nothingChanged || ( payloadChangedButIgnored && !flagsChanged ); - + Item item = job->item(); const Collection collection = item.parentCollection(); QString path; @@ -1801,7 +1811,7 @@ q->notifyItemsProcessed( Item::List() << item ); return true; } - + // make sure to read the index (if available) before modifying the data, which would // make the index invalid mbox->readIndexData(); @@ -1875,8 +1885,8 @@ Maildir md( mdPtr->maildir() ); newKey = md.changeEntryFlags( item.remoteId(), item.flags() ); if ( newKey.isEmpty() ) { - errorText = i18nc( "@info:status", "Cannot modify emails in folder %1", - collection.name() ); + errorText = i18nc( "@info:status", "Cannot modify emails in folder %1. %2", + collection.name(), md.lastError() ); kError() << errorText << "FolderType=" << folderType; q->notifyError( FileStore::Job::InvalidJobContext, errorText ); return false; @@ -2276,7 +2286,7 @@ CachePolicy cachePolicy; cachePolicy.setInheritFromParent( false ); - cachePolicy.setLocalParts( QStringList() << MessagePart::Envelope ); + cachePolicy.setLocalParts( QStringList() << QLatin1String(MessagePart::Envelope) ); cachePolicy.setSyncOnDemand( true ); cachePolicy.setCacheTimeout( 1 ); @@ -2352,6 +2362,5 @@ } } -#include "mixedmaildirstore.moc" // kate: space-indent on; indent-width 2; replace-tabs on; diff -Nru kdepim-runtime-4.12.3/resources/mixedmaildir/retrieveitemsjob.cpp kdepim-runtime-4.12.90/resources/mixedmaildir/retrieveitemsjob.cpp --- kdepim-runtime-4.12.3/resources/mixedmaildir/retrieveitemsjob.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/mixedmaildir/retrieveitemsjob.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -354,6 +354,6 @@ connect( job, SIGNAL(result(KJob*)), this, SLOT(akonadiFetchResult(KJob*)) ); } -#include "retrieveitemsjob.moc" +#include "moc_retrieveitemsjob.cpp" // kate: space-indent on; indent-width 2; replace-tabs on; diff -Nru kdepim-runtime-4.12.3/resources/mixedmaildir/retrieveitemsjob.h kdepim-runtime-4.12.90/resources/mixedmaildir/retrieveitemsjob.h --- kdepim-runtime-4.12.3/resources/mixedmaildir/retrieveitemsjob.h 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/mixedmaildir/retrieveitemsjob.h 2014-03-13 08:12:29.000000000 +0000 @@ -26,7 +26,6 @@ namespace Akonadi { class Collection; - class TransactionSequence; } class MixedMaildirStore; diff -Nru kdepim-runtime-4.12.3/resources/mixedmaildir/tests/itemfetchtest.cpp kdepim-runtime-4.12.90/resources/mixedmaildir/tests/itemfetchtest.cpp --- kdepim-runtime-4.12.3/resources/mixedmaildir/tests/itemfetchtest.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/mixedmaildir/tests/itemfetchtest.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -208,7 +208,7 @@ QCOMPARE( items[ 1 ].parentCollection(), collection1 ); QCOMPARE( items[ 2 ].parentCollection(), collection1 ); QCOMPARE( items[ 3 ].parentCollection(), collection1 ); - + QVERIFY( !items[ 0 ].hasPayload() ); QVERIFY( !items[ 1 ].hasPayload() ); QVERIFY( !items[ 2 ].hasPayload() ); @@ -219,7 +219,7 @@ ++flagCounts[ flag ]; } } - + // no flags from maildir file name, no advanced flags without index QCOMPARE( flagCounts.count(), 0 ); QCOMPARE( flagCounts[ "\\SEEN" ], 0 ); @@ -282,7 +282,7 @@ QVERIFY( !items[ 1 ].hasPayload() ); QVERIFY( !items[ 2 ].hasPayload() ); QVERIFY( !items[ 3 ].hasPayload() ); - + // see data/README Q_FOREACH( const Item &item, items ) { Q_FOREACH( const QByteArray &flag, item.flags() ) { @@ -349,14 +349,14 @@ QVERIFY( !items[ 1 ].hasPayload() ); QVERIFY( !items[ 2 ].hasPayload() ); QVERIFY( !items[ 3 ].hasPayload() ); - + // see data/README Q_FOREACH( const Item &item, items ) { Q_FOREACH( const QByteArray &flag, item.flags() ) { ++flagCounts[ flag ]; } } - + // 2x \SEEN flags: 2x from index, none from file name QCOMPARE( flagCounts[ "\\SEEN" ], 2 ); QCOMPARE( flagCounts[ "\\FLAGGED" ], 1 ); @@ -405,7 +405,7 @@ QVERIFY( !items[ 1 ].hasPayload() ); QVERIFY( !items[ 2 ].hasPayload() ); QVERIFY( !items[ 3 ].hasPayload() ); - + // see data/README Q_FOREACH( const Item &item, items ) { Q_FOREACH( const QByteArray &flag, item.flags() ) { @@ -482,7 +482,7 @@ QVERIFY( !items[ 2 ].hasPayload() ); QVERIFY( !items[ 3 ].hasPayload() ); QVERIFY( !items[ 4 ].hasPayload() ); - + // not flags from index, no flags from file names QCOMPARE( items[ 0 ].flags(), QSet() ); QCOMPARE( items[ 1 ].flags(), QSet() ); @@ -580,7 +580,7 @@ QVERIFY( !items[ 1 ].hasPayload() ); QVERIFY( !items[ 2 ].hasPayload() ); QVERIFY( !items[ 3 ].hasPayload() ); - + QCOMPARE( items[ 0 ].flags(), QSet() ); QCOMPARE( items[ 1 ].flags(), QSet() ); QCOMPARE( items[ 2 ].flags(), QSet() ); @@ -640,7 +640,7 @@ QVERIFY( !items[ 1 ].hasPayload() ); QVERIFY( !items[ 2 ].hasPayload() ); QVERIFY( !items[ 3 ].hasPayload() ); - + // see data/README QCOMPARE( items[ 0 ].flags(), QSet() ); QCOMPARE( items[ 1 ].flags(), QSet() << "\\SEEN" << "$TODO" ); @@ -701,7 +701,7 @@ QVERIFY( !items[ 1 ].hasPayload() ); QVERIFY( !items[ 2 ].hasPayload() ); QVERIFY( !items[ 3 ].hasPayload() ); - + // see data/README QCOMPARE( items[ 0 ].flags(), QSet() ); QCOMPARE( items[ 1 ].flags(), QSet() << "\\SEEN" << "$TODO" ); @@ -749,7 +749,7 @@ QVERIFY( !items[ 1 ].hasPayload() ); QVERIFY( !items[ 2 ].hasPayload() ); QVERIFY( !items[ 3 ].hasPayload() ); - + // see data/README QCOMPARE( items[ 0 ].flags(), QSet() << "\\SEEN" ); QCOMPARE( items[ 1 ].flags(), QSet() << "\\DELETED" ); @@ -806,7 +806,7 @@ QVERIFY( !items[ 1 ].hasPayload() ); QVERIFY( !items[ 2 ].hasPayload() ); QVERIFY( !items[ 3 ].hasPayload() ); - + QCOMPARE( items[ 0 ].flags(), QSet() ); QCOMPARE( items[ 1 ].flags(), QSet() ); QCOMPARE( items[ 2 ].flags(), QSet() ); @@ -857,9 +857,9 @@ QVERIFY( !items[ 0 ].hasPayload() ); QVERIFY( !items[ 1 ].hasPayload() ); QVERIFY( !items[ 2 ].hasPayload() ); - QVERIFY( !items[ 3 ].hasPayload() ); + QVERIFY( !items[ 3 ].hasPayload() ); QVERIFY( !items[ 4 ].hasPayload() ); - + // see data/README QCOMPARE( items[ 0 ].flags(), QSet() ); QCOMPARE( items[ 1 ].flags(), QSet() << "\\SEEN" << "$TODO" ); diff -Nru kdepim-runtime-4.12.3/resources/nepomuktag/CMakeLists.txt kdepim-runtime-4.12.90/resources/nepomuktag/CMakeLists.txt --- kdepim-runtime-4.12.3/resources/nepomuktag/CMakeLists.txt 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/nepomuktag/CMakeLists.txt 1970-01-01 00:00:00.000000000 +0000 @@ -1,35 +0,0 @@ -########### next target ############### - -include_directories( ${SOPRANO_INCLUDE_DIR} ${NEPOMUK_CORE_INCLUDE_DIR} ) - -set( nepomuktagresource_SRCS - nepomuktagresource.cpp -) - -install( FILES nepomuktagresource.desktop DESTINATION "${CMAKE_INSTALL_PREFIX}/share/akonadi/agents" ) - -qt4_generate_dbus_interface( ${CMAKE_CURRENT_SOURCE_DIR}/nepomuktagresource.h org.kde.Akonadi.NepomukTag.Resource.xml ) -qt4_add_dbus_adaptor( nepomuktagresource_SRCS - ${CMAKE_CURRENT_BINARY_DIR}/org.kde.Akonadi.NepomukTag.Resource.xml - nepomuktagresource.h NepomukTagResource - ) -kde4_add_executable(akonadi_nepomuktag_resource ${nepomuktagresource_SRCS}) - -if (Q_WS_MAC) - set_target_properties(akonadi_nepomuktag_resource PROPERTIES MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/../Info.plist.template) - set_target_properties(akonadi_nepomuktag_resource PROPERTIES MACOSX_BUNDLE_GUI_IDENTIFIER "org.kde.Akonadi.NepomukTag") - set_target_properties(akonadi_nepomuktag_resource PROPERTIES MACOSX_BUNDLE_BUNDLE_NAME "KDE Akonadi NepomukTag Resource") -endif () - -target_link_libraries(akonadi_nepomuktag_resource - ${KDE4_KDECORE_LIBS} - ${KDE4_KDEUI_LIBS} - ${KDEPIMLIBS_AKONADI_LIBS} - ${QT_QTDBUS_LIBRARY} - ${QT_QTCORE_LIBRARY} - ${SOPRANO_LIBRARIES} - ${NEPOMUK_CORE_LIBRARY} -) - -install(TARGETS akonadi_nepomuktag_resource ${INSTALL_TARGETS_DEFAULT_ARGS}) - diff -Nru kdepim-runtime-4.12.3/resources/nepomuktag/Messages.sh kdepim-runtime-4.12.90/resources/nepomuktag/Messages.sh --- kdepim-runtime-4.12.3/resources/nepomuktag/Messages.sh 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/nepomuktag/Messages.sh 1970-01-01 00:00:00.000000000 +0000 @@ -1,3 +0,0 @@ -#! /usr/bin/env bash -$EXTRACTRC `find . -name \*.ui` >> rc.cpp || exit 11 -$XGETTEXT *.cpp -o $podir/akonadi_nepomuktag_resource.pot diff -Nru kdepim-runtime-4.12.3/resources/nepomuktag/nepomuktagresource.cpp kdepim-runtime-4.12.90/resources/nepomuktag/nepomuktagresource.cpp --- kdepim-runtime-4.12.3/resources/nepomuktag/nepomuktagresource.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/nepomuktag/nepomuktagresource.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,337 +0,0 @@ -/* - Copyright (C) 2008 Omat Holding B.V. - - 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 "nepomuktagresource.h" - -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include - -#include -#include -#include -#include -#include - -#include -#include -#include - -using namespace Akonadi; -using namespace Nepomuk2::Vocabulary; - -NepomukTagResource::NepomukTagResource( const QString &id ) - : ResourceBase( id ), - mModel( new Soprano::Util::SignalCacheModel( Nepomuk2::ResourceManager::instance()->mainModel() ) ) -{ - Nepomuk2::ResourceManager::instance()->init(); - changeRecorder()->fetchCollection( true ); - setName( i18n( "Tags" ) ); - - m_root.setName( i18n( "Tags" ) ); - m_root.setRemoteId( QLatin1String("nepomuktags") ); - m_root.setContentMimeTypes( QStringList( Collection::mimeType() ) ); - Collection::Rights rights = Collection::CanCreateCollection; - m_root.setRights( rights ); - - CachePolicy policy; - policy.setInheritFromParent( false ); - policy.setSyncOnDemand( false ); - policy.setIntervalCheckTime( -1 ); - m_root.setCachePolicy( policy ); - - connect( mModel.data(), SIGNAL(statementAdded(Soprano::Statement)), - SLOT(statementAdded(Soprano::Statement)) ); - connect( mModel.data(), SIGNAL(statementRemoved(Soprano::Statement)), - SLOT(statementRemoved(Soprano::Statement)) ); - - m_pendingTagsTimer.setSingleShot( true ); - m_pendingTagsTimer.setInterval( 500 ); - connect( &m_pendingTagsTimer, SIGNAL(timeout()), SLOT(createPendingTagCollections()) ); - - synchronize(); -} - -NepomukTagResource::~NepomukTagResource() -{ -} - -void NepomukTagResource::retrieveCollections() -{ - m_pendingTagsTimer.stop(); - m_pendingTagUris.clear(); - - QHash collections; - - QStringList contentTypes; - contentTypes << QLatin1String("message/rfc822") << Collection::mimeType(); - - collections[ QLatin1String("rootfolderunique") ] = m_root; - - QList tags = Nepomuk2::Tag::allTags(); - foreach( const Nepomuk2::Tag& tag, tags ) { - kDebug() << "Found Nepomuk Tag:" << tag.genericLabel(); - if ( collections.contains( tag.genericLabel() ) ) - continue; - const Collection c = collectionFromTag( tag ); - collections[ tag.genericLabel()] = c; - } - collectionsRetrieved( collections.values() ); -} - -void NepomukTagResource::retrieveItems( const Akonadi::Collection & col ) -{ - kDebug() << "Requested items for: " << col.remoteId(); - ItemFetchJob *fetch = new ItemFetchJob( col, this ); - connect( fetch, SIGNAL(result(KJob*)), SLOT(slotLocalListResult(KJob*)) ); -} - -void NepomukTagResource::slotLocalListResult( KJob *job ) -{ - Item::List existingMessages = qobject_cast( job )->items(); - - Item::List taggedMessages; - const Nepomuk2::Tag tag( currentCollection().remoteId() ); - QList list = tag.tagOf(); - foreach( const Nepomuk2::Resource& resource, list ) { - if ( !resource.hasType( NMO::Email() ) ) - continue; - - KUrl url = resource.property( NIE::url() ).toUrl(); - kDebug() << "Found message: " << url; - taggedMessages << Item::fromUrl( url ); - } - - std::sort( existingMessages.begin(), existingMessages.end(), boost::bind( &Item::id, _1 ) < boost::bind( &Item::id, _2 ) ); - std::sort( taggedMessages.begin(), taggedMessages.end(), boost::bind( &Item::id, _1 ) < boost::bind( &Item::id, _2 ) ); - - Item::List itemsToLink, itemsToUnlink; - std::set_difference( taggedMessages.begin(), taggedMessages.end(), - existingMessages.begin(), existingMessages.end(), - std::back_inserter( itemsToLink ), - boost::bind( &Item::id, _1 ) < boost::bind( &Item::id, _2 ) ); - std::set_difference( existingMessages.begin(), existingMessages.end(), - taggedMessages.begin(), taggedMessages.end(), - std::back_inserter( itemsToUnlink ), - boost::bind( &Item::id, _1 ) < boost::bind( &Item::id, _2 ) ); - - if ( !itemsToUnlink.isEmpty() ) - new Akonadi::UnlinkJob( currentCollection(), itemsToUnlink, this ); - - if ( !itemsToLink.isEmpty() ) { - Akonadi::LinkJob* linkJob = new Akonadi::LinkJob( currentCollection(), itemsToLink, this ); - connect( linkJob, SIGNAL(result(KJob*)), this, SLOT(slotLinkResult(KJob*)) ); - } else { - itemsRetrievalDone(); - } -} - -void NepomukTagResource::linkDone( KJob* job ) -{ - if ( job->error() ) - kDebug()<errorText() ); -} - -void NepomukTagResource::unlinkDone( KJob* job ) -{ - if ( job->error() ) - kDebug()<errorText() ); -} - -void NepomukTagResource::slotLinkResult( KJob* job ) -{ - kDebug(); - if ( job->error() ) { - kDebug() << job->errorString(); - emit error( job->errorString() ); - } - itemsRetrievalDone(); -} - -void NepomukTagResource::configure( WId ) -{ - synchronizeCollectionTree(); - emit configurationDialogAccepted(); -} - -void NepomukTagResource::itemLinked(const Akonadi::Item& item, const Akonadi::Collection& collection) -{ - Nepomuk2::Resource res( item.url() ); - const Nepomuk2::Tag tag( collection.remoteId() ); - res.addTag( tag ); - changeProcessed(); -} - -void NepomukTagResource::itemUnlinked(const Akonadi::Item& item, const Akonadi::Collection& collection) -{ - Nepomuk2::Resource res( item.url() ); - QList allTags = res.tags(); - const Nepomuk2::Tag tag( collection.remoteId() ); - allTags.removeAll( tag ); - res.setTags( allTags ); - changeProcessed(); -} - -void NepomukTagResource::collectionAdded( const Collection & collection, const Collection &parent ) -{ - Q_UNUSED( parent ); - QString s = collection.name(); - Collection newCollection = collection; - newCollection.setVirtual( true ); - - // taken from kdelibs/nepomuk/core/ui/kmetadatatagwidget.cpp - // Copyright (C) 2006-2007 Sebastian Trueg - // --- - bool exists = false; - if ( !s.isEmpty() ) { - // see if the tag exists - QList l = Nepomuk2::Tag::allTags(); - QListIterator tagIt( l ); - while ( tagIt.hasNext() ) { - const Nepomuk2::Tag& tag = tagIt.next(); - if ( tag.label() == s || tag.identifiers().contains( s ) ) { - emit warning( i18n( "The tag %1 already exists", s ) ); - newCollection.setRemoteId( tag.uri().toString() ); - exists = true; - } - } - if ( !exists ) { - Nepomuk2::Tag tag( s ); - tag.setLabel( s ); - newCollection.setRemoteId( tag.uri().toString() ); - } - } - // --- - - newCollection.setRights( Collection::ReadOnly | Collection::CanDeleteCollection | Collection::CanLinkItem | Collection::CanUnlinkItem ); - changeCommitted( newCollection ); -} - -void NepomukTagResource::collectionChanged(const Akonadi::Collection& collection, const QSet< QByteArray >& partIdentifiers) -{ - Q_UNUSED( partIdentifiers ); - Nepomuk2::Tag tag( collection.remoteId() ); - tag.setLabel( collection.displayName() ); - EntityDisplayAttribute* attr = collection.attribute(); - if ( attr && !attr->iconName().isEmpty() ) - tag.setSymbols( QStringList() << attr->iconName() ); - changeCommitted( collection ); -} - -void NepomukTagResource::collectionRemoved(const Akonadi::Collection& collection) -{ - Nepomuk2::Tag tag( collection.remoteId() ); - tag.remove(); - changeCommitted( collection ); -} - - -void NepomukTagResource::statementAdded(const Soprano::Statement& statement) -{ - if ( statement.predicate() == Soprano::Vocabulary::NAO::hasTag() ) { - Nepomuk2::Resource resource(statement.subject().uri()); - const Akonadi::Item item = Item::fromUrl( resource.property(Nepomuk2::Vocabulary::NIE::url()).toUrl() ); - if ( !item.isValid() ) - return; - - Collection tagCollection; - tagCollection.setRemoteId( statement.object().uri().toString() ); - - LinkJob *job = new LinkJob( tagCollection, Item::List() << item, this ); - connect( job, SIGNAL(result(KJob*)), SLOT(linkDone(KJob*)) ); - } else if ( statement.predicate() == Soprano::Vocabulary::RDF::type() && statement.object() == Soprano::Vocabulary::NAO::Tag() ) { - // we need to delay the actual folder creation a bit, otherwise we will not see the fully created tag yet - m_pendingTagUris.append( statement.subject().uri() ); - if ( !m_pendingTagsTimer.isActive() ) - m_pendingTagsTimer.start(); - } -} - -void NepomukTagResource::statementRemoved(const Soprano::Statement& statement) -{ - if ( statement.predicate() == Soprano::Vocabulary::NAO::hasTag() ) { - Nepomuk2::Resource resource(statement.subject().uri()); - const Akonadi::Item item = Item::fromUrl( resource.property(Nepomuk2::Vocabulary::NIE::url()).toUrl() ); - - if ( !item.isValid() ) - return; - - Collection tagCollection; - tagCollection.setRemoteId( statement.object().uri().toString() ); - - UnlinkJob *job = new UnlinkJob( tagCollection, Item::List() << item, this ); - connect( job, SIGNAL(result(KJob*)), SLOT(unlinkDone(KJob*)) ); - } -} - -Collection NepomukTagResource::collectionFromTag(const Nepomuk2::Tag& tag) -{ - Collection c; - c.setName( tag.genericLabel() ); - c.setRemoteId( tag.uri().toString() ); - c.setRights( Collection::ReadOnly | Collection::CanDeleteCollection | Collection::CanLinkItem | Collection::CanUnlinkItem ); - c.setParentCollection( m_root ); - c.setContentMimeTypes( QStringList() << QLatin1String("message/rfc822") ); - c.setVirtual( true ); - if ( !tag.symbols().isEmpty() ) { - const QString icon = tag.symbols().first(); - EntityDisplayAttribute *attr = c.attribute( Collection::AddIfMissing ); - attr->setIconName( icon ); - } - return c; -} - -void NepomukTagResource::createPendingTagCollections() -{ - QList stillPendingTagUris; - foreach ( const QUrl &tagUri, m_pendingTagUris ) { - const Nepomuk2::Tag tag( tagUri ); - kDebug() << tagUri << tag.label(); - if ( tag.label().isEmpty() ) { - stillPendingTagUris.append( tagUri ); - } else { - const Collection c = collectionFromTag( tag ); - new CollectionCreateJob( c, this ); - } - } - - m_pendingTagUris = stillPendingTagUris; - if ( !stillPendingTagUris.isEmpty() ) - m_pendingTagsTimer.start(); -} - - -AKONADI_RESOURCE_MAIN( NepomukTagResource ) - -#include "nepomuktagresource.moc" - - diff -Nru kdepim-runtime-4.12.3/resources/nepomuktag/nepomuktagresource.desktop kdepim-runtime-4.12.90/resources/nepomuktag/nepomuktagresource.desktop --- kdepim-runtime-4.12.3/resources/nepomuktag/nepomuktagresource.desktop 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/nepomuktag/nepomuktagresource.desktop 1970-01-01 00:00:00.000000000 +0000 @@ -1,99 +0,0 @@ -[Desktop Entry] -Name=Nepomuk Tags (Virtual Folders) -Name[ar]=وسوم نبومك (المجلدات التخيلية) -Name[bs]=Nepomuk oznake (Virtualne datoteke) -Name[ca]=Etiquetes del Nepomuk (Carpetes virtuals) -Name[ca@valencia]=Etiquetes del Nepomuk (Carpetes virtuals) -Name[cs]=Značky Nepomuk (virtuální složky) -Name[da]=Nepomuk-mærker (virtuelle mapper) -Name[de]=Nepomuk-Stichwörter (Virtuelle Ordner) -Name[el]=Ετικέτες Nepomuk (εικονικοί φάκελοι) -Name[en_GB]=Nepomuk Tags (Virtual Folders) -Name[es]=Etiquetas Nepomuk (Carpetas virtuales) -Name[et]=Nepomuki sildid (virtuaalkaustad) -Name[fi]=Nepomuk-tunnisteet (virtuaalikansiot) -Name[fr]=Étiquettes Nepomuk (dossiers virtuels) -Name[ga]=Clibeanna Nepomuk (Fillteáin Fhíorúla) -Name[gl]=Etiquetas de Nepomuk (cartafoles virtuais) -Name[hu]=Nepomuk címkék (virtuális mappák) -Name[ia]=Etiquettas de Nepomuk (dossiers virtual) -Name[it]=Etichette Nepomuk (cartelle virtuali) -Name[ja]=Nepomuk タグ (仮想フォルダ) -Name[kk]=Nepomuk бегілері (Виртуады қапшықтар) -Name[km]=ស្លាក Nepomuk (ថត​និម្មិត) -Name[ko]=Nepomuk 태그 (가상 폴더) -Name[lt]=Nepomuk žymės (virtualūs aplankai) -Name[lv]=Nepomuk tagi (virtuālas mapes) -Name[nb]=Nepomuk-merker (virtuelle mapper) -Name[nds]=Nepomuk-Steekwöör (Virtuell Ornern) -Name[nl]=Nepomuk-tags (virtuele mappen) -Name[nn]=Nepomuk-merkelappar (virtuelle mapper) -Name[pa]=ਨਿਪੋਮੁਕ ਟੈਗ (ਵੁਰਚੁਅਲ ਫੋਲਡਰ) -Name[pl]=Znaczniki Nepomuk (foldery wirtualne) -Name[pt]=Marcas do Nepomuk (Pastas Virtuais) -Name[pt_BR]=Marcas do Nepomuk (Pastas virtuais) -Name[ro]=Etichete Nepomuk (dosare virtuale) -Name[ru]=Метки Nepomuk (виртуальные папки) -Name[sk]=Značky Nepomuk (virtuálne priečinky) -Name[sl]=Oznake Nepomuk (navidezne mape) -Name[sr]=Непомукове ознаке (виртуелне фасцикле) -Name[sr@ijekavian]=Непомукове ознаке (виртуелне фасцикле) -Name[sr@ijekavianlatin]=Nepomukove oznake (virtuelne fascikle) -Name[sr@latin]=Nepomukove oznake (virtuelne fascikle) -Name[sv]=Nepomuk-etiketter (virtuella korgar) -Name[tr]=Nepomuk Etiketleri (Sanal Dizinler) -Name[uk]=Мітки Nepomuk (Віртуальні теки) -Name[x-test]=xxNepomuk Tags (Virtual Folders)xx -Name[zh_CN]=Nepomuk 标签(虚拟文件夹) -Name[zh_TW]=Nepomuk 標籤(虛擬資料夾) -Comment=Virtual folders for selecting messages which have Nepomuk Tags. -Comment[ar]=المجلدات التخيلية لإختيار الرسائل التي تملك وسوم نبومك. -Comment[bs]=Virtualni folderi za izbor poruka koje imaju Nepomuk oznake. -Comment[ca]=Carpetes virtuals per a seleccionar missatges que tinguin etiquetes del Nepomuk. -Comment[ca@valencia]=Carpetes virtuals per a seleccionar missatges que tinguen etiquetes del Nepomuk. -Comment[da]=Virtuelle mapper til valg af beskeder som har Nepomuk-mærker. -Comment[de]=Virtuelle Ordner zur Auswahl von Nachrichten, die Nepomuk-Stichwörter enthalten. -Comment[el]=Εικονικοί φάκελοι για την επιλογή μηνυμάτων με ετικέτες Nepomuk. -Comment[en_GB]=Virtual folders for selecting messages which have Nepomuk Tags. -Comment[es]=Carpetas virtuales para seleccionar mensajes que tienen etiquetas Nepomuk. -Comment[et]=Virtuaalkaustad Nepomuki siltidega kirjade valimiseks. -Comment[fi]=Virtuaalikansiot Nepomuk-tunnisteisten tiedostojen valitsemiseksi. -Comment[fr]=Des dossiers virtuels permettant la sélection de messages avec des étiquettes Nepomuk. -Comment[gl]=Cartafoles virtuais para seleccionar mensaxes que teñan etiquetas de Nepomuk. -Comment[hu]=Virtuális mappák adott Nepomuk-címkéket tartalmazó üzenetek megjelenítéséhez. -Comment[ia]=Dossiers virtual pro seliger messages con etiquettas de Nepomuk -Comment[it]=Cartelle virtuali per la selezione di messaggi con etichette Nepomuk. -Comment[ja]=Nepomuk タグの付いたメッセージを選択するための仮想フォルダ -Comment[kk]=Nepomuk бегілері бар хабарламаларды таңдайтын виртуалды қапшықтар. -Comment[km]=ថត​និម្មិត​សម្រាប់​ជ្រើស​សារ​ដែល​មាន​ស្លាក Nepomuk ។ -Comment[ko]=Nepomuk 태그가 붙어 있는 메시지를 선택하는 가상 폴더입니다. -Comment[lt]=Virtualūs aplankai, skirti pažymėti laiškams, turintiems Nepomuk žymes. -Comment[lv]=Virtuālas mapes, lai atlasītu vēstules, kam ir Nepomuk tagi. -Comment[nb]=Virtuelle mapper til å velge meldinger som har Nepomuk-merker. -Comment[nds]=Virtuell Ornen för Narichten mit Nepomuk-Steekwöör -Comment[nl]=Virtuele mappen om berichten met Nepomuk-tags te selecteren. -Comment[nn]=Virtuelle mapper for val av meldingar som har Nepomuk-merkelappar. -Comment[pl]=Foldery wirtualne służące wybieraniu wiadomości, które posiadają znaczniki Nepomuka. -Comment[pt]=Pastas virtuais para seleccionar as mensagens que tenham Marcas do Nepomuk. -Comment[pt_BR]=Pastas virtuais para selecionar as mensagens que possuam marcas do Nepomuk. -Comment[ro]=Dosare virtuale pentru alegerea mesajelor care au marcaje Nepomuk. -Comment[ru]=Виртуальные папки для отбора писем с заданными метками Nepomuk. -Comment[sk]=Virtuálne priečinky na výber správ ktoré majú značky Nepomuk. -Comment[sl]=Navidezne mape za izbiranje sporočil z oznakami Nepomuk. -Comment[sr]=Виртуелне фасцикле за избор порука које имају Непомукове ознаке. -Comment[sr@ijekavian]=Виртуелне фасцикле за избор порука које имају Непомукове ознаке. -Comment[sr@ijekavianlatin]=Virtuelne fascikle za izbor poruka koje imaju Nepomukove oznake. -Comment[sr@latin]=Virtuelne fascikle za izbor poruka koje imaju Nepomukove oznake. -Comment[sv]=Virtuella korgar för att välja brev som har Nepomuk-etiketter. -Comment[tr]=Nepomuk Etiketi olan iletileri seçmek için sanal dizinler. -Comment[uk]="Віртуальні теки для вибору повідомлень, які мають мітки Nepomuk." -Comment[x-test]=xxVirtual folders for selecting messages which have Nepomuk Tags.xx -Comment[zh_CN]=含有 Nepomuk 标记,用于选择信件的虚拟文件夹。 -Comment[zh_TW]=用於選擇有 Nepomuk 標籤訊息用的虛擬資料夾 -Type=AkonadiResource -Exec=akonadi_nepomuktag_resource -Icon=nepomuk - -X-Akonadi-MimeTypes=message/rfc822 -X-Akonadi-Capabilities=Resource,Virtual,Unique,NoConfig -X-Akonadi-Identifier=akonadi_nepomuktag_resource diff -Nru kdepim-runtime-4.12.3/resources/nepomuktag/nepomuktagresource.h kdepim-runtime-4.12.90/resources/nepomuktag/nepomuktagresource.h --- kdepim-runtime-4.12.3/resources/nepomuktag/nepomuktagresource.h 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/nepomuktag/nepomuktagresource.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,89 +0,0 @@ -/* - Copyright (C) 2008 Omat Holding B.V. - - 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 __NEPOMUKTAG_RESOURCE_H__ -#define __NEPOMUKTAG_RESOURCE_H__ - -#include -#include - -#include -#include - -namespace Nepomuk2 { -class Tag; -} - -namespace Soprano { - namespace Util { - class SignalCacheModel; - } -} - -class NepomukTagResource : public Akonadi::ResourceBase, public Akonadi::AgentBase::ObserverV2 -{ - Q_OBJECT - Q_CLASSINFO( "D-Bus Interface", "org.kde.Akonadi.NepomukTag.Resource" ) - -public: - NepomukTagResource( const QString &id ); - ~NepomukTagResource(); - -public Q_SLOTS: - void configure( WId windowId ); - -protected Q_SLOTS: - virtual void retrieveCollections(); - virtual void retrieveItems( const Akonadi::Collection &col ); - virtual bool retrieveItem( const Akonadi::Item &, const QSet & ) { return true; }; - - -protected: - virtual void itemLinked( const Akonadi::Item &item, const Akonadi::Collection &collection ); - virtual void itemUnlinked( const Akonadi::Item& item, const Akonadi::Collection& collection ); - virtual void collectionAdded( const Akonadi::Collection &collection, const Akonadi::Collection &parent ); - virtual void collectionChanged(const Akonadi::Collection& collection, const QSet< QByteArray >& partIdentifiers); - // do not hide the other variant, use implementation from base class - // which just forwards to the one above - using Akonadi::AgentBase::ObserverV2::collectionChanged; - virtual void collectionRemoved( const Akonadi::Collection& collection ); - - private: - Akonadi::Collection collectionFromTag( const Nepomuk2::Tag &tag ); - - private Q_SLOTS: - void slotLocalListResult( KJob* job ); - void slotLinkResult( KJob* job ); - - void statementAdded( const Soprano::Statement &statement ); - void statementRemoved( const Soprano::Statement &statement ); - - void createPendingTagCollections(); - - void linkDone( KJob* ); - void unlinkDone( KJob* ); - - private: - Akonadi::Collection m_root; - QList m_pendingTagUris; - QTimer m_pendingTagsTimer; - QScopedPointer mModel; -}; - -#endif diff -Nru kdepim-runtime-4.12.3/resources/nntp/configdialog.cpp kdepim-runtime-4.12.90/resources/nntp/configdialog.cpp --- kdepim-runtime-4.12.3/resources/nntp/configdialog.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/nntp/configdialog.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -41,4 +41,3 @@ mManager->updateSettings(); } -#include "configdialog.moc" diff -Nru kdepim-runtime-4.12.3/resources/nntp/nntpresource.cpp kdepim-runtime-4.12.90/resources/nntp/nntpresource.cpp --- kdepim-runtime-4.12.3/resources/nntp/nntpresource.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/nntp/nntpresource.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -333,4 +333,3 @@ AKONADI_RESOURCE_MAIN( NntpResource ) -#include "nntpresource.moc" diff -Nru kdepim-runtime-4.12.3/resources/openxchange/openxchangeresource.cpp kdepim-runtime-4.12.90/resources/openxchange/openxchangeresource.cpp --- kdepim-runtime-4.12.3/resources/openxchange/openxchangeresource.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/openxchange/openxchangeresource.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -1136,4 +1136,3 @@ AKONADI_RESOURCE_MAIN( OpenXchangeResource ) -#include "openxchangeresource.moc" diff -Nru kdepim-runtime-4.12.3/resources/openxchange/openxchangeresource.desktop kdepim-runtime-4.12.90/resources/openxchange/openxchangeresource.desktop --- kdepim-runtime-4.12.3/resources/openxchange/openxchangeresource.desktop 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/openxchange/openxchangeresource.desktop 2014-03-13 08:12:29.000000000 +0000 @@ -45,43 +45,32 @@ Name[x-test]=xxOpen-Xchange Groupware Serverxx Name[zh_CN]=Open-Xchange 群件服务器 Name[zh_TW]=Open-Xchange 群組伺服器 -Comment=Provides access to the appointments, tasks, and contacts of an Open-Xchange groupware server. -Comment[bs]=Obezbjeđuje pristup zakazanim obavezama, zadacima i kontaktima za Open-Xchange grupni server. -Comment[ca]=Proporciona l'accés a les cites, tasques i contactes emmagatzemats en un servidor de treball en grup Open-Xchange. -Comment[ca@valencia]=Proporciona l'accés a les cites, tasques i contactes emmagatzemats en un servidor de treball en grup Open-Xchange. -Comment[da]=Giver adgang til aftaler, opgaver og kontakter på en Open-Xchange groupware-server. -Comment[de]=Ermöglicht den Zugriff auf Termine, Aufgaben und Kontakte, die auf einem Open-Xchange-Server gespeichert sind. -Comment[el]=Παρέχει πρόσβαση σε ραντεβού, εργασίες και επαφές ενός εξυπηρετητή groupware Open-Xchange -Comment[es]=Proporciona acceso a las citas, tareas y contactos almacenados en un servidor de colaboración Open-Xchange. -Comment[et]=Võimaldab kasutada Open-Xchange'i grupitöö serveri kohtumisi, ülesandeid ja kontakte. -Comment[fi]=Tarjoaa pääsyn Open-Xchange-työryhmäpalvelimen tapaamis-, tehtävä- ja yhteystietoihin. -Comment[fr]=Fournit l'accès aux contacts, aux rendez-vous et aux tâches stockés sur un serveur Open-Xchange de logiciels de collaboration. -Comment[gl]=Fornece acceso ás citas, tarefas e contactos almacenados nun servidor de traballo en grupo Open-Xchange. -Comment[hu]=Hozzáférést biztosít egy Open-Xchange csoportmunka kiszolgálón tárolt találkozókhoz, feladatokhoz és névjegyekhez. -Comment[ia]=Provide accesso a appunctamentos, cargas e contactos de un servitor de Open-Xchange Groupware. -Comment[it]=Consente l'accesso ad appuntamenti, attività e contatti di un server di groupware Open-Xchange. -Comment[kk]=Open-Xchange топтық іс серверінің кездесу, тапсырма және контакттар мәліметіне қатынау мүмкіндік береді. -Comment[ko]=Open-Xchange 그룹웨어 서버의 약속, 할 일, 연락처 정보를 가져옵니다. -Comment[nb]=Gir tilgang til avtaler, oppgaver og kontakter lagret på en Open-Xchange gruppevare-tjener -Comment[nds]=Stellt Togriep op de op en Open-Xchange-Arbeitkoppelserver wohrten Terminen, Opgaven un Kontakten praat -Comment[nl]=Geeft toegang tot afspraken, taken en contactpersonen op een Open-Xchange-groupware-server -Comment[nn]=Gjev tilgang til avtalar, oppgåver og kontaktar lagra på ein Open-Xchange-gruppevaretenar. -Comment[pl]=Zapewnia dostęp do spotkań, zadań i kontaktów serwera groupware Open-Xchange. +Comment="Provides access to the appointments, tasks, and contacts of an Open-Xchange groupware server." +Comment[bs]="Obezbjeđuje pristup zakazanim obavezama, zadacima i kontaktima za Open-Xchange grupni server." +Comment[ca]="Proporciona l'accés a les cites, tasques i contactes emmagatzemats en un servidor de treball en grup Open-Xchange." +Comment[da]="Giver adgang til aftaler, opgaver og kontakter på en Open-Xchange groupware-server." +Comment[de]="Ermöglicht den Zugriff auf Termine, Aufgaben und Kontakte, die auf einem Open-Xchange-Server gespeichert sind." +Comment[es]=«Proporciona acceso a las citas, tareas y contactos almacenados en un servidor de colaboración Open-Xchange». +Comment[fi]="Tarjoaa pääsyn Open-Xchange-työryhmäpalvelimen tapaamis-, tehtävä- ja yhteystietoihin." +Comment[hu]=„Hozzáférést biztosít egy Open-Xchange csoportmunka kiszolgálón tárolt találkozókhoz, feladatokhoz és névjegyekhez.” +Comment[it]="Consente l'accesso ad appuntamenti, attività e contatti di un server di groupware Open-Xchange." +Comment[ko]="Open-Xchange 그룹웨어 서버의 약속, 할 일, 연락처 정보를 가져옵니다." +Comment[nds]="Stellt Togriep op Terminen, Opgaven un Kontakten op en Open-Xchange-Arbeitkoppelserver praat." +Comment[nl]="Geeft toegang tot afspraken, taken en contactpersonen op een Open-Xchange-groupware-server." +Comment[pl]="Zapewnia dostęp do spotkań, zadań i kontaktów serwera groupware Open-Xchange." Comment[pt]=Oferece o acesso aos compromissos, tarefas e contactos guardados num servidor de 'groupware' Open-Xchange. -Comment[pt_BR]=Fornece acesso aos compromissos, tarefas e contatos de um servidor groupware Open-Xchange. +Comment[pt_BR]="Fornece acesso aos compromissos, tarefas e contatos de um servidor groupware Open-Xchange." Comment[ru]="Доступ к встречам, задачам и контактам на сервере совместной работы Open-Xchange" -Comment[sk]=Poskytuje prístup k schôdzkam, úlohám a kontaktom groupware servera Open-Xchange. -Comment[sl]=Omogoča dostop do sestankov, opravil in stikov, shranjenih na strežniku za skupinsko delo Open-Xchange. -Comment[sr]=Омогућава приступ састанцима, пословима и контактима са Опен‑ексчејнџовог групверског сервера -Comment[sr@ijekavian]=Омогућава приступ састанцима, пословима и контактима са Опен‑ексчејнџовог групверског сервера -Comment[sr@ijekavianlatin]=Omogućava pristup sastancima, poslovima i kontaktima sa Open‑Xchangeovog grupverskog servera -Comment[sr@latin]=Omogućava pristup sastancima, poslovima i kontaktima sa Open‑Xchangeovog grupverskog servera -Comment[sv]=Ger tillgång till möten, uppgifter och kontakter lagrade på en Open-Xchange grupprogramserver. -Comment[tr]=Open-Xchange groupware sunucusundaki toplantı, yapılacak iş ve kişilere erişimi sağlar. +Comment[sk]="Poskytuje prístup k schôdzkam, úlohám a kontaktom groupware servera Open-Xchange." +Comment[sr]="Омогућава приступ састанцима, пословима и контактима са Опен‑ексчејнџовог групверског сервера." +Comment[sr@ijekavian]="Омогућава приступ састанцима, пословима и контактима са Опен‑ексчејнџовог групверског сервера." +Comment[sr@ijekavianlatin]="Omogućava pristup sastancima, poslovima i kontaktima sa Open‑Xchangeovog grupverskog servera." +Comment[sr@latin]="Omogućava pristup sastancima, poslovima i kontaktima sa Open‑Xchangeovog grupverskog servera." +Comment[sv]="Ger tillgång till möten, uppgifter och kontakter lagrade på en Open-Xchange grupprogramserver." +Comment[tr]="Open-Xchange groupware sunucusundaki toplantı, yapılacak iş ve kişilere erişimi sağlar." Comment[uk]="Надає доступ до записів зустрічей, завдань і контактів, які зберігаються на сервері групової роботи Open-Xchange." -Comment[x-test]=xxProvides access to the appointments, tasks, and contacts of an Open-Xchange groupware server.xx -Comment[zh_CN]=提供对存储在 Open-Xchange 服务器上的约会、任务和联系人的访问支持。 -Comment[zh_TW]=提供存取儲存在 Open-Xchange 群組伺服器上的約會、工作與聯絡人的功能 +Comment[x-test]=xx"Provides access to the appointments, tasks, and contacts of an Open-Xchange groupware server."xx +Comment[zh_TW]=「提供存取儲存在 Open-Xchange 群組伺服器上的約會、工作與聯絡人的功能。」 Type=AkonadiResource Exec=akonadi_openxchange_resource Icon=ox diff -Nru kdepim-runtime-4.12.3/resources/openxchange/oxa/connectiontestjob.cpp kdepim-runtime-4.12.90/resources/openxchange/oxa/connectiontestjob.cpp --- kdepim-runtime-4.12.3/resources/openxchange/oxa/connectiontestjob.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/openxchange/oxa/connectiontestjob.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -75,4 +75,3 @@ emitResult(); } -#include "connectiontestjob.moc" diff -Nru kdepim-runtime-4.12.3/resources/openxchange/oxa/foldercreatejob.cpp kdepim-runtime-4.12.90/resources/openxchange/oxa/foldercreatejob.cpp --- kdepim-runtime-4.12.3/resources/openxchange/oxa/foldercreatejob.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/openxchange/oxa/foldercreatejob.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -94,4 +94,3 @@ emitResult(); } -#include "foldercreatejob.moc" diff -Nru kdepim-runtime-4.12.3/resources/openxchange/oxa/folderdeletejob.cpp kdepim-runtime-4.12.90/resources/openxchange/oxa/folderdeletejob.cpp --- kdepim-runtime-4.12.3/resources/openxchange/oxa/folderdeletejob.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/openxchange/oxa/folderdeletejob.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -76,4 +76,3 @@ emitResult(); } -#include "folderdeletejob.moc" diff -Nru kdepim-runtime-4.12.3/resources/openxchange/oxa/foldermodifyjob.cpp kdepim-runtime-4.12.90/resources/openxchange/oxa/foldermodifyjob.cpp --- kdepim-runtime-4.12.3/resources/openxchange/oxa/foldermodifyjob.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/openxchange/oxa/foldermodifyjob.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -93,4 +93,3 @@ emitResult(); } -#include "foldermodifyjob.moc" diff -Nru kdepim-runtime-4.12.3/resources/openxchange/oxa/foldermovejob.cpp kdepim-runtime-4.12.90/resources/openxchange/oxa/foldermovejob.cpp --- kdepim-runtime-4.12.3/resources/openxchange/oxa/foldermovejob.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/openxchange/oxa/foldermovejob.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -93,4 +93,3 @@ emitResult(); } -#include "foldermovejob.moc" diff -Nru kdepim-runtime-4.12.3/resources/openxchange/oxa/folderrequestjob.cpp kdepim-runtime-4.12.90/resources/openxchange/oxa/folderrequestjob.cpp --- kdepim-runtime-4.12.3/resources/openxchange/oxa/folderrequestjob.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/openxchange/oxa/folderrequestjob.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -83,4 +83,3 @@ emitResult(); } -#include "folderrequestjob.moc" diff -Nru kdepim-runtime-4.12.3/resources/openxchange/oxa/foldersrequestdeltajob.cpp kdepim-runtime-4.12.90/resources/openxchange/oxa/foldersrequestdeltajob.cpp --- kdepim-runtime-4.12.3/resources/openxchange/oxa/foldersrequestdeltajob.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/openxchange/oxa/foldersrequestdeltajob.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -91,4 +91,3 @@ emitResult(); } -#include "foldersrequestdeltajob.moc" diff -Nru kdepim-runtime-4.12.3/resources/openxchange/oxa/foldersrequestjob.cpp kdepim-runtime-4.12.90/resources/openxchange/oxa/foldersrequestjob.cpp --- kdepim-runtime-4.12.3/resources/openxchange/oxa/foldersrequestjob.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/openxchange/oxa/foldersrequestjob.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -92,4 +92,3 @@ emitResult(); } -#include "foldersrequestjob.moc" diff -Nru kdepim-runtime-4.12.3/resources/openxchange/oxa/objectcreatejob.cpp kdepim-runtime-4.12.90/resources/openxchange/oxa/objectcreatejob.cpp --- kdepim-runtime-4.12.3/resources/openxchange/oxa/objectcreatejob.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/openxchange/oxa/objectcreatejob.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -117,4 +117,3 @@ emitResult(); } -#include "objectcreatejob.moc" diff -Nru kdepim-runtime-4.12.3/resources/openxchange/oxa/objectdeletejob.cpp kdepim-runtime-4.12.90/resources/openxchange/oxa/objectdeletejob.cpp --- kdepim-runtime-4.12.3/resources/openxchange/oxa/objectdeletejob.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/openxchange/oxa/objectdeletejob.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -76,4 +76,3 @@ emitResult(); } -#include "objectdeletejob.moc" diff -Nru kdepim-runtime-4.12.3/resources/openxchange/oxa/objectmodifyjob.cpp kdepim-runtime-4.12.90/resources/openxchange/oxa/objectmodifyjob.cpp --- kdepim-runtime-4.12.3/resources/openxchange/oxa/objectmodifyjob.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/openxchange/oxa/objectmodifyjob.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -115,4 +115,3 @@ emitResult(); } -#include "objectmodifyjob.moc" diff -Nru kdepim-runtime-4.12.3/resources/openxchange/oxa/objectmovejob.cpp kdepim-runtime-4.12.90/resources/openxchange/oxa/objectmovejob.cpp --- kdepim-runtime-4.12.3/resources/openxchange/oxa/objectmovejob.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/openxchange/oxa/objectmovejob.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -94,4 +94,3 @@ emitResult(); } -#include "objectmovejob.moc" diff -Nru kdepim-runtime-4.12.3/resources/openxchange/oxa/objectrequestjob.cpp kdepim-runtime-4.12.90/resources/openxchange/oxa/objectrequestjob.cpp --- kdepim-runtime-4.12.3/resources/openxchange/oxa/objectrequestjob.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/openxchange/oxa/objectrequestjob.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -83,4 +83,3 @@ emitResult(); } -#include "objectrequestjob.moc" diff -Nru kdepim-runtime-4.12.3/resources/openxchange/oxa/objectsrequestdeltajob.cpp kdepim-runtime-4.12.90/resources/openxchange/oxa/objectsrequestdeltajob.cpp --- kdepim-runtime-4.12.3/resources/openxchange/oxa/objectsrequestdeltajob.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/openxchange/oxa/objectsrequestdeltajob.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -91,4 +91,3 @@ emitResult(); } -#include "objectsrequestdeltajob.moc" diff -Nru kdepim-runtime-4.12.3/resources/openxchange/oxa/objectsrequestjob.cpp kdepim-runtime-4.12.90/resources/openxchange/oxa/objectsrequestjob.cpp --- kdepim-runtime-4.12.3/resources/openxchange/oxa/objectsrequestjob.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/openxchange/oxa/objectsrequestjob.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -93,4 +93,3 @@ emitResult(); } -#include "objectsrequestjob.moc" diff -Nru kdepim-runtime-4.12.3/resources/openxchange/oxa/oxutils.h kdepim-runtime-4.12.90/resources/openxchange/oxa/oxutils.h --- kdepim-runtime-4.12.3/resources/openxchange/oxa/oxutils.h 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/openxchange/oxa/oxutils.h 2014-03-13 08:12:29.000000000 +0000 @@ -26,7 +26,6 @@ #include #include -class KDateTime; namespace OXA { diff -Nru kdepim-runtime-4.12.3/resources/openxchange/oxa/updateusersjob.cpp kdepim-runtime-4.12.90/resources/openxchange/oxa/updateusersjob.cpp --- kdepim-runtime-4.12.3/resources/openxchange/oxa/updateusersjob.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/openxchange/oxa/updateusersjob.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -91,4 +91,3 @@ emitResult(); } -#include "updateusersjob.moc" diff -Nru kdepim-runtime-4.12.3/resources/openxchange/oxa/useridrequestjob.cpp kdepim-runtime-4.12.90/resources/openxchange/oxa/useridrequestjob.cpp --- kdepim-runtime-4.12.3/resources/openxchange/oxa/useridrequestjob.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/openxchange/oxa/useridrequestjob.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -76,4 +76,3 @@ emitResult(); } -#include "useridrequestjob.moc" diff -Nru kdepim-runtime-4.12.3/resources/openxchange/oxa/users.cpp kdepim-runtime-4.12.90/resources/openxchange/oxa/users.cpp --- kdepim-runtime-4.12.3/resources/openxchange/oxa/users.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/openxchange/oxa/users.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -152,4 +152,3 @@ } } -#include "users.moc" diff -Nru kdepim-runtime-4.12.3/resources/openxchange/oxa/usersrequestjob.cpp kdepim-runtime-4.12.90/resources/openxchange/oxa/usersrequestjob.cpp --- kdepim-runtime-4.12.3/resources/openxchange/oxa/usersrequestjob.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/openxchange/oxa/usersrequestjob.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -98,4 +98,3 @@ emitResult(); } -#include "usersrequestjob.moc" diff -Nru kdepim-runtime-4.12.3/resources/pop3/accountdialog.cpp kdepim-runtime-4.12.90/resources/pop3/accountdialog.cpp --- kdepim-runtime-4.12.3/resources/pop3/accountdialog.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/pop3/accountdialog.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -688,4 +688,3 @@ } } -#include "accountdialog.moc" diff -Nru kdepim-runtime-4.12.3/resources/pop3/pop3resourceattribute.cpp kdepim-runtime-4.12.90/resources/pop3/pop3resourceattribute.cpp --- kdepim-runtime-4.12.3/resources/pop3/pop3resourceattribute.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/pop3/pop3resourceattribute.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -1,5 +1,5 @@ /* - Copyright (c) 2013 Montel Laurent + Copyright (c) 2013, 2014 Montel Laurent This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2, as diff -Nru kdepim-runtime-4.12.3/resources/pop3/pop3resourceattribute.h kdepim-runtime-4.12.90/resources/pop3/pop3resourceattribute.h --- kdepim-runtime-4.12.3/resources/pop3/pop3resourceattribute.h 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/pop3/pop3resourceattribute.h 2014-03-13 08:12:29.000000000 +0000 @@ -1,5 +1,5 @@ /* - Copyright (c) 2013 Montel Laurent + Copyright (c) 2013, 2014 Montel Laurent This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2, as diff -Nru kdepim-runtime-4.12.3/resources/pop3/popsettings.ui kdepim-runtime-4.12.90/resources/pop3/popsettings.ui --- kdepim-runtime-4.12.3/resources/pop3/popsettings.ui 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/pop3/popsettings.ui 2014-03-13 08:12:29.000000000 +0000 @@ -6,7 +6,7 @@ 0 0 - 442 + 451 557 @@ -406,6 +406,9 @@ Command that is executed before checking mail + + true + diff -Nru kdepim-runtime-4.12.3/resources/pop3/tests/fakeserver/fakeserver.cpp kdepim-runtime-4.12.90/resources/pop3/tests/fakeserver/fakeserver.cpp --- kdepim-runtime-4.12.3/resources/pop3/tests/fakeserver/fakeserver.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/pop3/tests/fakeserver/fakeserver.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -293,4 +293,3 @@ return mGotDisconnected; } -#include "fakeserver.moc" diff -Nru kdepim-runtime-4.12.3/resources/shared/createandsettagsjob.cpp kdepim-runtime-4.12.90/resources/shared/createandsettagsjob.cpp --- kdepim-runtime-4.12.3/resources/shared/createandsettagsjob.cpp 1970-01-01 00:00:00.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/shared/createandsettagsjob.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -0,0 +1,70 @@ +/* + * Copyright (c) 2014 Christian Mollekopf + * + * 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 "createandsettagsjob.h" +#include +#include + +using namespace Akonadi; + +CreateAndSetTagsJob::CreateAndSetTagsJob(const Item& item, const Akonadi::Tag::List& tags, QObject* parent) +: KJob(parent), + mItem(item), + mTags(tags) +{ + +} + +void CreateAndSetTagsJob::start() +{ + if (mTags.isEmpty()) { + emitResult(); + } + Q_FOREACH (const Akonadi::Tag &tag, mTags) { + Akonadi::TagCreateJob *createJob = new Akonadi::TagCreateJob(tag, this); + createJob->setMergeIfExisting(true); + connect(createJob, SIGNAL(result(KJob*)), this, SLOT(onCreateDone(KJob*))); + } +} + +void CreateAndSetTagsJob::onCreateDone(KJob *job) +{ + mCount++; + if (job->error()) { + kWarning() << "Failed to create tag " << job->errorString(); + } else { + Akonadi::TagCreateJob *createJob = static_cast(job); + mCreatedTags << createJob->tag(); + } + if (mCount == mTags.size()) { + Q_FOREACH (const Akonadi::Tag &tag, mCreatedTags) { + mItem.setTag(tag); + } + Akonadi::ItemModifyJob *modJob = new Akonadi::ItemModifyJob(mItem, this); + connect(modJob, SIGNAL(result(KJob*)), this, SLOT(onModifyDone(KJob*))); + } +} + +void CreateAndSetTagsJob::onModifyDone(KJob *job) +{ + if (job->error()) { + kWarning() << "Failed to modify item " << job->errorString(); + setError(KJob::UserDefinedError); + } + emitResult(); +} \ No newline at end of file diff -Nru kdepim-runtime-4.12.3/resources/shared/createandsettagsjob.h kdepim-runtime-4.12.90/resources/shared/createandsettagsjob.h --- kdepim-runtime-4.12.3/resources/shared/createandsettagsjob.h 1970-01-01 00:00:00.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/shared/createandsettagsjob.h 2014-03-13 08:12:29.000000000 +0000 @@ -0,0 +1,45 @@ +/* + * Copyright (c) 2014 Christian Mollekopf + * + * 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 CREATEANDSETTAGSJOB_H +#define CREATEANDSETTAGSJOB_H + +#include +#include +#include + +class CreateAndSetTagsJob : public KJob +{ + Q_OBJECT +public: + explicit CreateAndSetTagsJob(const Akonadi::Item &item, const Akonadi::Tag::List &tags, QObject* parent = 0); + + virtual void start(); + +private Q_SLOTS: + void onCreateDone(KJob*); + void onModifyDone(KJob*); + +private: + Akonadi::Item mItem; + Akonadi::Tag::List mTags; + Akonadi::Tag::List mCreatedTags; + int mCount; +}; + +#endif diff -Nru kdepim-runtime-4.12.3/resources/shared/filestore/abstractlocalstore.cpp kdepim-runtime-4.12.90/resources/shared/filestore/abstractlocalstore.cpp --- kdepim-runtime-4.12.3/resources/shared/filestore/abstractlocalstore.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/shared/filestore/abstractlocalstore.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -36,7 +36,7 @@ #include #include -#include +#include #include @@ -848,6 +848,6 @@ Q_UNUSED( errorText ); } -#include "abstractlocalstore.moc" +#include "moc_abstractlocalstore.cpp" // kate: space-indent on; indent-width 2; replace-tabs on; diff -Nru kdepim-runtime-4.12.3/resources/shared/filestore/collectioncreatejob.cpp kdepim-runtime-4.12.90/resources/shared/filestore/collectioncreatejob.cpp --- kdepim-runtime-4.12.3/resources/shared/filestore/collectioncreatejob.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/shared/filestore/collectioncreatejob.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -76,6 +76,5 @@ d->mCollection = collection; } -#include "collectioncreatejob.moc" // kate: space-indent on; indent-width 2; replace-tabs on; diff -Nru kdepim-runtime-4.12.3/resources/shared/filestore/collectiondeletejob.cpp kdepim-runtime-4.12.90/resources/shared/filestore/collectiondeletejob.cpp --- kdepim-runtime-4.12.3/resources/shared/filestore/collectiondeletejob.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/shared/filestore/collectiondeletejob.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -69,6 +69,5 @@ d->mCollection = collection; } -#include "collectiondeletejob.moc" // kate: space-indent on; indent-width 2; replace-tabs on; diff -Nru kdepim-runtime-4.12.3/resources/shared/filestore/collectionfetchjob.cpp kdepim-runtime-4.12.90/resources/shared/filestore/collectionfetchjob.cpp --- kdepim-runtime-4.12.3/resources/shared/filestore/collectionfetchjob.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/shared/filestore/collectionfetchjob.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -99,6 +99,5 @@ emit collectionsReceived( collections ); } -#include "collectionfetchjob.moc" // kate: space-indent on; indent-width 2; replace-tabs on; diff -Nru kdepim-runtime-4.12.3/resources/shared/filestore/collectionmodifyjob.cpp kdepim-runtime-4.12.90/resources/shared/filestore/collectionmodifyjob.cpp --- kdepim-runtime-4.12.3/resources/shared/filestore/collectionmodifyjob.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/shared/filestore/collectionmodifyjob.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -69,6 +69,5 @@ d->mCollection = collection; } -#include "collectionmodifyjob.moc" // kate: space-indent on; indent-width 2; replace-tabs on; diff -Nru kdepim-runtime-4.12.3/resources/shared/filestore/collectionmovejob.cpp kdepim-runtime-4.12.90/resources/shared/filestore/collectionmovejob.cpp --- kdepim-runtime-4.12.3/resources/shared/filestore/collectionmovejob.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/shared/filestore/collectionmovejob.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -76,6 +76,5 @@ d->mCollection = collection; } -#include "collectionmovejob.moc" // kate: space-indent on; indent-width 2; replace-tabs on; diff -Nru kdepim-runtime-4.12.3/resources/shared/filestore/itemcreatejob.cpp kdepim-runtime-4.12.90/resources/shared/filestore/itemcreatejob.cpp --- kdepim-runtime-4.12.3/resources/shared/filestore/itemcreatejob.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/shared/filestore/itemcreatejob.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -73,6 +73,5 @@ d->mItem = item; } -#include "itemcreatejob.moc" // kate: space-indent on; indent-width 2; replace-tabs on; diff -Nru kdepim-runtime-4.12.3/resources/shared/filestore/itemdeletejob.cpp kdepim-runtime-4.12.90/resources/shared/filestore/itemdeletejob.cpp --- kdepim-runtime-4.12.3/resources/shared/filestore/itemdeletejob.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/shared/filestore/itemdeletejob.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -66,6 +66,5 @@ d->mItem = item; } -#include "itemdeletejob.moc" // kate: space-indent on; indent-width 2; replace-tabs on; diff -Nru kdepim-runtime-4.12.3/resources/shared/filestore/itemfetchjob.cpp kdepim-runtime-4.12.90/resources/shared/filestore/itemfetchjob.cpp --- kdepim-runtime-4.12.3/resources/shared/filestore/itemfetchjob.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/shared/filestore/itemfetchjob.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -103,6 +103,5 @@ emit itemsReceived( items ); } -#include "itemfetchjob.moc" // kate: space-indent on; indent-width 2; replace-tabs on; diff -Nru kdepim-runtime-4.12.3/resources/shared/filestore/itemmodifyjob.cpp kdepim-runtime-4.12.90/resources/shared/filestore/itemmodifyjob.cpp --- kdepim-runtime-4.12.3/resources/shared/filestore/itemmodifyjob.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/shared/filestore/itemmodifyjob.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -88,6 +88,5 @@ d->mItem = item; } -#include "itemmodifyjob.moc" // kate: space-indent on; indent-width 2; replace-tabs on; diff -Nru kdepim-runtime-4.12.3/resources/shared/filestore/itemmovejob.cpp kdepim-runtime-4.12.90/resources/shared/filestore/itemmovejob.cpp --- kdepim-runtime-4.12.3/resources/shared/filestore/itemmovejob.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/shared/filestore/itemmovejob.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -74,6 +74,5 @@ d->mItem = item; } -#include "itemmovejob.moc" // kate: space-indent on; indent-width 2; replace-tabs on; diff -Nru kdepim-runtime-4.12.3/resources/shared/filestore/job.cpp kdepim-runtime-4.12.90/resources/shared/filestore/job.cpp --- kdepim-runtime-4.12.3/resources/shared/filestore/job.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/shared/filestore/job.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -55,6 +55,5 @@ return visitor->visit( this ); } -#include "job.moc" // kate: space-indent on; indent-width 2; replace-tabs on; diff -Nru kdepim-runtime-4.12.3/resources/shared/filestore/session.cpp kdepim-runtime-4.12.90/resources/shared/filestore/session.cpp --- kdepim-runtime-4.12.3/resources/shared/filestore/session.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/shared/filestore/session.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -142,6 +142,4 @@ job->emitResult(); } -#include "session_p.moc" - // kate: space-indent on; indent-width 2; replace-tabs on; diff -Nru kdepim-runtime-4.12.3/resources/shared/filestore/sessionimpls.cpp kdepim-runtime-4.12.90/resources/shared/filestore/sessionimpls.cpp --- kdepim-runtime-4.12.3/resources/shared/filestore/sessionimpls.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/shared/filestore/sessionimpls.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -198,6 +198,6 @@ d->mJobQueue.removeAll( job ); } -#include "sessionimpls_p.moc" +#include "moc_sessionimpls_p.cpp" // kate: space-indent on; indent-width 2; replace-tabs on; diff -Nru kdepim-runtime-4.12.3/resources/shared/filestore/storecompactjob.cpp kdepim-runtime-4.12.90/resources/shared/filestore/storecompactjob.cpp --- kdepim-runtime-4.12.3/resources/shared/filestore/storecompactjob.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/shared/filestore/storecompactjob.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -76,6 +76,5 @@ emit itemsChanged( items ); } -#include "storecompactjob.moc" // kate: space-indent on; indent-width 2; replace-tabs on; diff -Nru kdepim-runtime-4.12.3/resources/shared/filestore/storeinterface.h kdepim-runtime-4.12.90/resources/shared/filestore/storeinterface.h --- kdepim-runtime-4.12.3/resources/shared/filestore/storeinterface.h 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/shared/filestore/storeinterface.h 2014-03-13 08:12:29.000000000 +0000 @@ -28,9 +28,7 @@ namespace Akonadi { class Collection; - class CollectionFetchScope; class Item; - class ItemFetchScope; namespace FileStore { diff -Nru kdepim-runtime-4.12.3/resources/shared/filestore/tests/abstractlocalstoretest.cpp kdepim-runtime-4.12.90/resources/shared/filestore/tests/abstractlocalstoretest.cpp --- kdepim-runtime-4.12.3/resources/shared/filestore/tests/abstractlocalstoretest.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/shared/filestore/tests/abstractlocalstoretest.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -48,8 +48,8 @@ TestStore() : mLastCheckedJob( 0 ), mLastProcessedJob( 0 ), mErrorCode( 0 ) {} public: - mutable Job *mLastCheckedJob; - Job *mLastProcessedJob; + mutable Akonadi::FileStore::Job *mLastCheckedJob; + Akonadi::FileStore::Job *mLastProcessedJob; Collection mTopLevelCollection; @@ -57,7 +57,7 @@ QString mErrorText; protected: - void processJob( Job *job ); + void processJob( Akonadi::FileStore::Job *job ); protected: void setTopLevelCollection( const Collection &collection ) @@ -70,14 +70,14 @@ AbstractLocalStore::setTopLevelCollection( modifiedCollection ); } - void checkCollectionCreate( CollectionCreateJob *job, int &errorCode, QString &errorText ) const + void checkCollectionCreate( Akonadi::FileStore::CollectionCreateJob *job, int &errorCode, QString &errorText ) const { mLastCheckedJob = job; errorCode = mErrorCode; errorText = mErrorText; } - void checkCollectionDelete( CollectionDeleteJob *job, int &errorCode, QString &errorText ) const + void checkCollectionDelete( Akonadi::FileStore::CollectionDeleteJob *job, int &errorCode, QString &errorText ) const { mLastCheckedJob = job; errorCode = mErrorCode; @@ -119,7 +119,7 @@ errorText = mErrorText; } - void checkItemFetch( ItemFetchJob *job, int &errorCode, QString &errorText ) const + void checkItemFetch( Akonadi::FileStore::ItemFetchJob *job, int &errorCode, QString &errorText ) const { mLastCheckedJob = job; errorCode = mErrorCode; @@ -133,14 +133,14 @@ errorText = mErrorText; } - void checkItemMove( ItemMoveJob *job, int &errorCode, QString &errorText ) const + void checkItemMove( Akonadi::FileStore::ItemMoveJob *job, int &errorCode, QString &errorText ) const { mLastCheckedJob = job; errorCode = mErrorCode; errorText = mErrorText; } - void checkStoreCompact( StoreCompactJob *job, int &errorCode, QString &errorText ) const + void checkStoreCompact( Akonadi::FileStore::StoreCompactJob *job, int &errorCode, QString &errorText ) const { mLastCheckedJob = job; errorCode = mErrorCode; @@ -148,7 +148,7 @@ } }; -void TestStore::processJob( Job *job ) +void TestStore::processJob( Akonadi::FileStore::Job *job ) { mLastProcessedJob = job; @@ -236,7 +236,7 @@ job = mStore->createCollection( Collection(), Collection() ); QVERIFY( job != 0 ); QCOMPARE( mStore->mLastCheckedJob, job ); - QCOMPARE( job->error(), (int)Job::InvalidStoreState ); + QCOMPARE( job->error(), (int)Akonadi::FileStore::Job::InvalidStoreState ); QVERIFY( !job->errorText().isEmpty() ); QVERIFY( !job->exec() ); @@ -247,7 +247,7 @@ job = mStore->createCollection( Collection(), Collection() ); QVERIFY( job != 0 ); QCOMPARE( mStore->mLastCheckedJob, job ); - QCOMPARE( job->error(), (int)Job::InvalidJobContext ); + QCOMPARE( job->error(), (int)Akonadi::FileStore::Job::InvalidJobContext ); QVERIFY( !job->errorText().isEmpty() ); QVERIFY( !job->exec() ); @@ -259,7 +259,7 @@ job = mStore->createCollection( collection, Collection() ); QVERIFY( job != 0 ); QCOMPARE( mStore->mLastCheckedJob, job ); - QCOMPARE( job->error(), (int)Job::InvalidJobContext ); + QCOMPARE( job->error(), (int)Akonadi::FileStore::Job::InvalidJobContext ); QVERIFY( !job->errorText().isEmpty() ); QVERIFY( !job->exec() ); @@ -302,7 +302,7 @@ job = mStore->deleteCollection( Collection() ); QVERIFY( job != 0 ); QCOMPARE( mStore->mLastCheckedJob, job ); - QCOMPARE( job->error(), (int)Job::InvalidStoreState ); + QCOMPARE( job->error(), (int)Akonadi::FileStore::Job::InvalidStoreState ); QVERIFY( !job->errorText().isEmpty() ); QVERIFY( !job->exec() ); @@ -313,7 +313,7 @@ job = mStore->deleteCollection( Collection() ); QVERIFY( job != 0 ); QCOMPARE( mStore->mLastCheckedJob, job ); - QCOMPARE( job->error(), (int)Job::InvalidJobContext ); + QCOMPARE( job->error(), (int)Akonadi::FileStore::Job::InvalidJobContext ); QVERIFY( !job->errorText().isEmpty() ); QVERIFY( !job->exec() ); @@ -325,7 +325,7 @@ job = mStore->deleteCollection( collection ); QVERIFY( job != 0 ); QCOMPARE( mStore->mLastCheckedJob, job ); - QCOMPARE( job->error(), (int)Job::InvalidJobContext ); + QCOMPARE( job->error(), (int)Akonadi::FileStore::Job::InvalidJobContext ); QVERIFY( !job->errorText().isEmpty() ); QVERIFY( !job->exec() ); @@ -369,7 +369,7 @@ job = mStore->fetchCollections( Collection() ); QVERIFY( job != 0 ); QCOMPARE( mStore->mLastCheckedJob, job ); - QCOMPARE( job->error(), (int)Job::InvalidStoreState ); + QCOMPARE( job->error(), (int)Akonadi::FileStore::Job::InvalidStoreState ); QVERIFY( !job->errorText().isEmpty() ); QVERIFY( !job->exec() ); @@ -380,7 +380,7 @@ job = mStore->fetchCollections( Collection() ); QVERIFY( job != 0 ); QCOMPARE( mStore->mLastCheckedJob, job ); - QCOMPARE( job->error(), (int)Job::InvalidJobContext ); + QCOMPARE( job->error(), (int)Akonadi::FileStore::Job::InvalidJobContext ); QVERIFY( !job->errorText().isEmpty() ); QVERIFY( !job->exec() ); @@ -436,7 +436,7 @@ job = mStore->modifyCollection( Collection() ); QVERIFY( job != 0 ); QCOMPARE( mStore->mLastCheckedJob, job ); - QCOMPARE( job->error(), (int)Job::InvalidStoreState ); + QCOMPARE( job->error(), (int)Akonadi::FileStore::Job::InvalidStoreState ); QVERIFY( !job->errorText().isEmpty() ); QVERIFY( !job->exec() ); @@ -447,7 +447,7 @@ job = mStore->modifyCollection( Collection() ); QVERIFY( job != 0 ); QCOMPARE( mStore->mLastCheckedJob, job ); - QCOMPARE( job->error(), (int)Job::InvalidJobContext ); + QCOMPARE( job->error(), (int)Akonadi::FileStore::Job::InvalidJobContext ); QVERIFY( !job->errorText().isEmpty() ); QVERIFY( !job->exec() ); @@ -502,7 +502,7 @@ job = mStore->moveCollection( Collection(), Collection() ); QVERIFY( job != 0 ); QCOMPARE( mStore->mLastCheckedJob, job ); - QCOMPARE( job->error(), (int)Job::InvalidStoreState ); + QCOMPARE( job->error(), (int)Akonadi::FileStore::Job::InvalidStoreState ); QVERIFY( !job->errorText().isEmpty() ); QVERIFY( !job->exec() ); @@ -513,7 +513,7 @@ job = mStore->moveCollection( Collection(), Collection() ); QVERIFY( job != 0 ); QCOMPARE( mStore->mLastCheckedJob, job ); - QCOMPARE( job->error(), (int)Job::InvalidJobContext ); + QCOMPARE( job->error(), (int)Akonadi::FileStore::Job::InvalidJobContext ); QVERIFY( !job->errorText().isEmpty() ); QVERIFY( !job->exec() ); @@ -528,7 +528,7 @@ job = mStore->moveCollection( collection, Collection() ); QVERIFY( job != 0 ); QCOMPARE( mStore->mLastCheckedJob, job ); - QCOMPARE( job->error(), (int)Job::InvalidJobContext ); + QCOMPARE( job->error(), (int)Akonadi::FileStore::Job::InvalidJobContext ); QVERIFY( !job->errorText().isEmpty() ); QVERIFY( !job->exec() ); @@ -539,7 +539,7 @@ job = mStore->moveCollection( collection, parentCollection ); QVERIFY( job != 0 ); QCOMPARE( mStore->mLastCheckedJob, job ); - QCOMPARE( job->error(), (int)Job::InvalidJobContext ); + QCOMPARE( job->error(), (int)Akonadi::FileStore::Job::InvalidJobContext ); QVERIFY( !job->errorText().isEmpty() ); QVERIFY( !job->exec() ); @@ -581,7 +581,7 @@ job = mStore->fetchItems( Collection() ); QVERIFY( job != 0 ); QCOMPARE( mStore->mLastCheckedJob, job ); - QCOMPARE( job->error(), (int)Job::InvalidStoreState ); + QCOMPARE( job->error(), (int)Akonadi::FileStore::Job::InvalidStoreState ); QVERIFY( !job->errorText().isEmpty() ); QVERIFY( !job->exec() ); @@ -592,7 +592,7 @@ job = mStore->fetchItems( Collection() ); QVERIFY( job != 0 ); QCOMPARE( mStore->mLastCheckedJob, job ); - QCOMPARE( job->error(), (int)Job::InvalidJobContext ); + QCOMPARE( job->error(), (int)Akonadi::FileStore::Job::InvalidJobContext ); QVERIFY( !job->errorText().isEmpty() ); QVERIFY( !job->exec() ); @@ -635,7 +635,7 @@ job = mStore->fetchItem( Item() ); QVERIFY( job != 0 ); QCOMPARE( mStore->mLastCheckedJob, job ); - QCOMPARE( job->error(), (int)Job::InvalidStoreState ); + QCOMPARE( job->error(), (int)Akonadi::FileStore::Job::InvalidStoreState ); QVERIFY( !job->errorText().isEmpty() ); QVERIFY( !job->exec() ); @@ -646,7 +646,7 @@ job = mStore->fetchItem( Item() ); QVERIFY( job != 0 ); QCOMPARE( mStore->mLastCheckedJob, job ); - QCOMPARE( job->error(), (int)Job::InvalidJobContext ); + QCOMPARE( job->error(), (int)Akonadi::FileStore::Job::InvalidJobContext ); QVERIFY( !job->errorText().isEmpty() ); QVERIFY( !job->exec() ); @@ -689,7 +689,7 @@ job = mStore->createItem( Item(), Collection() ); QVERIFY( job != 0 ); QCOMPARE( mStore->mLastCheckedJob, job ); - QCOMPARE( job->error(), (int)Job::InvalidStoreState ); + QCOMPARE( job->error(), (int)Akonadi::FileStore::Job::InvalidStoreState ); QVERIFY( !job->errorText().isEmpty() ); QVERIFY( !job->exec() ); @@ -700,7 +700,7 @@ job = mStore->createItem( Item(), Collection() ); QVERIFY( job != 0 ); QCOMPARE( mStore->mLastCheckedJob, job ); - QCOMPARE( job->error(), (int)Job::InvalidJobContext ); + QCOMPARE( job->error(), (int)Akonadi::FileStore::Job::InvalidJobContext ); QVERIFY( !job->errorText().isEmpty() ); QVERIFY( !job->exec() ); @@ -743,7 +743,7 @@ job = mStore->deleteItem( Item() ); QVERIFY( job != 0 ); QCOMPARE( mStore->mLastCheckedJob, job ); - QCOMPARE( job->error(), (int)Job::InvalidStoreState ); + QCOMPARE( job->error(), (int)Akonadi::FileStore::Job::InvalidStoreState ); QVERIFY( !job->errorText().isEmpty() ); QVERIFY( !job->exec() ); @@ -754,7 +754,7 @@ job = mStore->deleteItem( Item() ); QVERIFY( job != 0 ); QCOMPARE( mStore->mLastCheckedJob, job ); - QCOMPARE( job->error(), (int)Job::InvalidJobContext ); + QCOMPARE( job->error(), (int)Akonadi::FileStore::Job::InvalidJobContext ); QVERIFY( !job->errorText().isEmpty() ); QVERIFY( !job->exec() ); @@ -797,7 +797,7 @@ job = mStore->modifyItem( Item() ); QVERIFY( job != 0 ); QCOMPARE( mStore->mLastCheckedJob, job ); - QCOMPARE( job->error(), (int)Job::InvalidStoreState ); + QCOMPARE( job->error(), (int)Akonadi::FileStore::Job::InvalidStoreState ); QVERIFY( !job->errorText().isEmpty() ); QVERIFY( !job->exec() ); @@ -808,7 +808,7 @@ job = mStore->modifyItem( Item() ); QVERIFY( job != 0 ); QCOMPARE( mStore->mLastCheckedJob, job ); - QCOMPARE( job->error(), (int)Job::InvalidJobContext ); + QCOMPARE( job->error(), (int)Akonadi::FileStore::Job::InvalidJobContext ); QVERIFY( !job->errorText().isEmpty() ); QVERIFY( !job->exec() ); @@ -849,7 +849,7 @@ job = mStore->moveItem( Item(), Collection() ); QVERIFY( job != 0 ); QCOMPARE( mStore->mLastCheckedJob, job ); - QCOMPARE( job->error(), (int)Job::InvalidStoreState ); + QCOMPARE( job->error(), (int)Akonadi::FileStore::Job::InvalidStoreState ); QVERIFY( !job->errorText().isEmpty() ); QVERIFY( !job->exec() ); @@ -860,7 +860,7 @@ job = mStore->moveItem( Item(), Collection() ); QVERIFY( job != 0 ); QCOMPARE( mStore->mLastCheckedJob, job ); - QCOMPARE( job->error(), (int)Job::InvalidJobContext ); + QCOMPARE( job->error(), (int)Akonadi::FileStore::Job::InvalidJobContext ); QVERIFY( !job->errorText().isEmpty() ); QVERIFY( !job->exec() ); @@ -875,7 +875,7 @@ job = mStore->moveItem( item, Collection() ); QVERIFY( job != 0 ); QCOMPARE( mStore->mLastCheckedJob, job ); - QCOMPARE( job->error(), (int)Job::InvalidJobContext ); + QCOMPARE( job->error(), (int)Akonadi::FileStore::Job::InvalidJobContext ); QVERIFY( !job->errorText().isEmpty() ); QVERIFY( !job->exec() ); @@ -886,7 +886,7 @@ job = mStore->moveItem( item, parentCollection ); QVERIFY( job != 0 ); QCOMPARE( mStore->mLastCheckedJob, job ); - QCOMPARE( job->error(), (int)Job::InvalidJobContext ); + QCOMPARE( job->error(), (int)Akonadi::FileStore::Job::InvalidJobContext ); QVERIFY( !job->errorText().isEmpty() ); QVERIFY( !job->exec() ); @@ -928,7 +928,7 @@ job = mStore->compactStore(); QVERIFY( job != 0 ); QCOMPARE( mStore->mLastCheckedJob, job ); - QCOMPARE( job->error(), (int)Job::InvalidStoreState ); + QCOMPARE( job->error(), (int)Akonadi::FileStore::Job::InvalidStoreState ); QVERIFY( !job->errorText().isEmpty() ); QVERIFY( !job->exec() ); diff -Nru kdepim-runtime-4.12.3/resources/shared/getcredentialsjob.cpp kdepim-runtime-4.12.90/resources/shared/getcredentialsjob.cpp --- kdepim-runtime-4.12.3/resources/shared/getcredentialsjob.cpp 1970-01-01 00:00:00.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/shared/getcredentialsjob.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -0,0 +1,103 @@ +/************************************************************************************* + * Copyright (C) 2013 by Alejandro Fiestas Olivares * + * * + * This library is free software; you can redistribute it and/or * + * modify it under the terms of the GNU Lesser General Public * + * License as published by the Free Software Foundation; either * + * version 2 of the License, or (at KDE e.V's discretion) 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 "getcredentialsjob.h" + +#include +#include +#include + +#include + +#include + +GetCredentialsJob::GetCredentialsJob(const Accounts::AccountId &id, QObject *parent) +: KJob(parent) +, m_id(id) +, m_manager(new Accounts::Manager(this)) +{ + +} + +void GetCredentialsJob::start() +{ + QMetaObject::invokeMethod(this, "getCredentials", Qt::QueuedConnection); +} + +void GetCredentialsJob::setServiceType(const QString &serviceType) +{ + m_serviceType = serviceType; +} + +void GetCredentialsJob::getCredentials() +{ + Accounts::Account *acc = m_manager->account(m_id); + if (!acc) { + setError(-1); + setErrorText(QLatin1String("Could not find account")); + emitResult(); + return; + } + Accounts::AccountService *service = new Accounts::AccountService(acc, m_manager->service(m_serviceType), this); + + Accounts::AuthData authData = service->authData(); + m_authData = authData.parameters(); + SignOn::Identity *identity = SignOn::Identity::existingIdentity(authData.credentialsId(), this); + + if (!identity) { + setError(-1); + setErrorText(QLatin1String("Could not find credentials")); + emitResult(); + return; + } + + m_authData["AccountUsername"] = acc->value(QLatin1String("username")).toString(); + QPointer authSession = identity->createSession(authData.method()); + + connect(authSession, SIGNAL(response(SignOn::SessionData)), + SLOT(sessionResponse(SignOn::SessionData))); + connect(authSession, SIGNAL(error(SignOn::Error)), + SLOT(sessionError(SignOn::Error))); + + authSession->process(authData.parameters(), authData.mechanism()); +} + +void GetCredentialsJob::sessionResponse(const SignOn::SessionData &data) +{ + m_sessionData = data; + emitResult(); +} + +void GetCredentialsJob::sessionError(const SignOn::Error &error) +{ + kDebug() << error.message(); + setError(-1); + setErrorText(error.message()); + emitResult(); +} + +Accounts::AccountId GetCredentialsJob::accountId() const +{ + return m_id; +} + +QVariantMap GetCredentialsJob::credentialsData() const +{ + return m_sessionData.toMap().unite(m_authData); +} diff -Nru kdepim-runtime-4.12.3/resources/shared/getcredentialsjob.h kdepim-runtime-4.12.90/resources/shared/getcredentialsjob.h --- kdepim-runtime-4.12.3/resources/shared/getcredentialsjob.h 1970-01-01 00:00:00.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/shared/getcredentialsjob.h 2014-03-13 08:12:29.000000000 +0000 @@ -0,0 +1,61 @@ +/************************************************************************************* + * Copyright (C) 2013 by Alejandro Fiestas Olivares * + * * + * This library is free software; you can redistribute it and/or * + * modify it under the terms of the GNU Lesser General Public * + * License as published by the Free Software Foundation; either * + * version 2 of the License, or (at KDE e.V's discretion) 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 GET_CREDENTIALS_JOB_H +#define GET_CREDENTIALS_JOB_H + +#include + +#include +#include +#include + +namespace Accounts { + class Manager; +}; +namespace SignOn { + class Error; +}; + +class GetCredentialsJob : public KJob +{ + Q_OBJECT +public: + explicit GetCredentialsJob(const Accounts::AccountId &id, QObject *parent = 0); + virtual void start(); + + void setServiceType(const QString &serviceType); + + QVariantMap credentialsData() const; + Accounts::AccountId accountId() const; + +private Q_SLOTS: + void getCredentials(); + void sessionResponse(const SignOn::SessionData &data); + void sessionError(const SignOn::Error &error); + +private: + QString m_serviceType; + Accounts::AccountId m_id; + QVariantMap m_authData; + Accounts::Manager *m_manager; + SignOn::SessionData m_sessionData; +}; + +#endif //GET_CREDENTIALS_JOB_H diff -Nru kdepim-runtime-4.12.3/resources/shared/singlefileresourcebase.cpp kdepim-runtime-4.12.90/resources/shared/singlefileresourcebase.cpp --- kdepim-runtime-4.12.3/resources/shared/singlefileresourcebase.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/shared/singlefileresourcebase.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -28,6 +28,7 @@ #include #include #include +#include #include #include @@ -277,4 +278,3 @@ emit status( Idle, i18nc( "@info:status", "Ready" ) ); } -#include "singlefileresourcebase.moc" diff -Nru kdepim-runtime-4.12.3/resources/shared/singlefileresource.h kdepim-runtime-4.12.90/resources/shared/singlefileresource.h --- kdepim-runtime-4.12.3/resources/shared/singlefileresource.h 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/shared/singlefileresource.h 2014-03-13 08:12:29.000000000 +0000 @@ -29,7 +29,7 @@ #include #include -#include +#include #include #include diff -Nru kdepim-runtime-4.12.3/resources/vcard/CMakeLists.txt kdepim-runtime-4.12.90/resources/vcard/CMakeLists.txt --- kdepim-runtime-4.12.3/resources/vcard/CMakeLists.txt 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/vcard/CMakeLists.txt 2014-03-13 08:12:29.000000000 +0000 @@ -22,11 +22,7 @@ ${CMAKE_CURRENT_BINARY_DIR}/org.kde.Akonadi.VCard.Settings.xml settings.h Akonadi_VCard_Resource::Settings vcardsettingsadaptor VCardSettingsAdaptor ) -if (NOT WINCE) kde4_add_plugin(akonadi_vcard_resource ${vcardresource_SRCS}) -else() -kde4_add_plugin(akonadi_vcard_resource STATIC ${vcardresource_SRCS}) -endif () if (Q_WS_MAC) set_target_properties(akonadi_vcard_resource PROPERTIES MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/../Info.plist.template) diff -Nru kdepim-runtime-4.12.3/resources/vcard/vcardresource.cpp kdepim-runtime-4.12.90/resources/vcard/vcardresource.cpp --- kdepim-runtime-4.12.3/resources/vcard/vcardresource.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/vcard/vcardresource.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -187,4 +187,3 @@ AKONADI_AGENT_FACTORY( VCardResource, akonadi_vcard_resource ) -#include "vcardresource.moc" diff -Nru kdepim-runtime-4.12.3/resources/vcard/vcardresource.desktop kdepim-runtime-4.12.90/resources/vcard/vcardresource.desktop --- kdepim-runtime-4.12.3/resources/vcard/vcardresource.desktop 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/vcard/vcardresource.desktop 2014-03-13 08:12:29.000000000 +0000 @@ -18,6 +18,7 @@ Name[kk]=VCard файлы Name[ko]=vCard 파일 Name[nb]=vCard-fil +Name[nds]=VCard-Datei Name[nl]=vCard-bestand Name[pl]=Plik vCard Name[pt]=Ficheiro vCard @@ -54,6 +55,7 @@ Comment[kk]=VCard файлынан деректі алып береді Comment[ko]=vCard 파일에서 데이터를 가져옵니다 Comment[nb]=Laster data fra en vCard-fil +Comment[nds]=Laadt Daten ut en VCard-Datei Comment[nl]=Laadt gegevens van een vCard-bestand Comment[pl]=Wczytuje dane z plików vCard Comment[pt]=Carrega os dados de um ficheiro vCard diff -Nru kdepim-runtime-4.12.3/resources/vcarddir/vcarddirresource.cpp kdepim-runtime-4.12.90/resources/vcarddir/vcarddirresource.cpp --- kdepim-runtime-4.12.3/resources/vcarddir/vcarddirresource.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/vcarddir/vcarddirresource.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -276,4 +276,3 @@ AKONADI_RESOURCE_MAIN( VCardDirResource ) -#include "vcarddirresource.moc" diff -Nru kdepim-runtime-4.12.3/resources/vcarddir/vcarddirresource.desktop kdepim-runtime-4.12.90/resources/vcarddir/vcarddirresource.desktop --- kdepim-runtime-4.12.3/resources/vcarddir/vcarddirresource.desktop 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resources/vcarddir/vcarddirresource.desktop 2014-03-13 08:12:29.000000000 +0000 @@ -18,6 +18,7 @@ Name[kk]=VCard қапшығы Name[ko]=vCard 디렉터리 Name[nb]=vCard-mappe +Name[nds]=VCard-Orner Name[nl]=vCard-map Name[pl]=Katalog vCard Name[pt]=Pasta de vCard's @@ -53,6 +54,7 @@ Comment[kk]=VCard қапшығынан деректі алып береді Comment[ko]=vCard 디렉터리에서 데이터를 가져옵니다 Comment[nb]=Laster data fra en mappe med vCard-filer +Comment[nds]=Laadt Daten ut en Orner mit VCard-Dateien Comment[nl]=Laadt gegevens van een map met vCards Comment[pl]=Wczytuje dane z katalogu wizytówkami vCard Comment[pt]=Carrega os dados de uma pasta com ficheiros vCard diff -Nru kdepim-runtime-4.12.3/resourcetester/collectiontest.cpp kdepim-runtime-4.12.90/resourcetester/collectiontest.cpp --- kdepim-runtime-4.12.3/resourcetester/collectiontest.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resourcetester/collectiontest.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -97,4 +97,3 @@ return createNewInstance( this ); } -#include "collectiontest.moc" diff -Nru kdepim-runtime-4.12.3/resourcetester/itemtest.cpp kdepim-runtime-4.12.90/resourcetester/itemtest.cpp --- kdepim-runtime-4.12.3/resourcetester/itemtest.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resourcetester/itemtest.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -80,4 +80,3 @@ return createNewInstance( this ); } -#include "itemtest.moc" diff -Nru kdepim-runtime-4.12.3/resourcetester/qemu.cpp kdepim-runtime-4.12.90/resourcetester/qemu.cpp --- kdepim-runtime-4.12.3/resourcetester/qemu.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resourcetester/qemu.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -202,4 +202,3 @@ } -#include "qemu.moc" diff -Nru kdepim-runtime-4.12.3/resourcetester/resource.cpp kdepim-runtime-4.12.90/resourcetester/resource.cpp --- kdepim-runtime-4.12.3/resourcetester/resource.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resourcetester/resource.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -154,4 +154,3 @@ return r; } -#include "resource.moc" diff -Nru kdepim-runtime-4.12.3/resourcetester/script.cpp kdepim-runtime-4.12.90/resourcetester/script.cpp --- kdepim-runtime-4.12.3/resourcetester/script.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resourcetester/script.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -67,4 +67,3 @@ } -#include "script.moc" diff -Nru kdepim-runtime-4.12.3/resourcetester/system.cpp kdepim-runtime-4.12.90/resourcetester/system.cpp --- kdepim-runtime-4.12.3/resourcetester/system.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resourcetester/system.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -43,4 +43,3 @@ QTest::qWait( secs * 1000 ); } -#include "system.moc" diff -Nru kdepim-runtime-4.12.3/resourcetester/test.cpp kdepim-runtime-4.12.90/resourcetester/test.cpp --- kdepim-runtime-4.12.3/resourcetester/test.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resourcetester/test.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -78,4 +78,3 @@ } -#include "test.moc" diff -Nru kdepim-runtime-4.12.3/resourcetester/xmloperations.cpp kdepim-runtime-4.12.90/resourcetester/xmloperations.cpp --- kdepim-runtime-4.12.3/resourcetester/xmloperations.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/resourcetester/xmloperations.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -426,4 +426,3 @@ return true; } -#include "xmloperations.moc" diff -Nru kdepim-runtime-4.12.3/.reviewboardrc kdepim-runtime-4.12.90/.reviewboardrc --- kdepim-runtime-4.12.3/.reviewboardrc 1970-01-01 00:00:00.000000000 +0000 +++ kdepim-runtime-4.12.90/.reviewboardrc 2014-03-13 08:12:29.000000000 +0000 @@ -0,0 +1,3 @@ +REVIEWBOARD_URL = "https://git.reviewboard.kde.org" +TARGET_GROUPS = "kdepim" +REPOSITORY = "kdepim-runtime" diff -Nru kdepim-runtime-4.12.3/tray/backupassistant.cpp kdepim-runtime-4.12.90/tray/backupassistant.cpp --- kdepim-runtime-4.12.3/tray/backupassistant.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/tray/backupassistant.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -26,7 +26,7 @@ #include #include #include -#include +#include #include BackupAssistant::BackupAssistant( QWidget *parent ) : KAssistantDialog( parent ), m_selectFileButton( 0 ) @@ -113,4 +113,3 @@ "report a bug, so we can find out what the cause is." ) ); } -#include "backupassistant.moc" diff -Nru kdepim-runtime-4.12.3/tray/backup.cpp kdepim-runtime-4.12.90/tray/backup.cpp --- kdepim-runtime-4.12.3/tray/backup.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/tray/backup.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -27,7 +27,6 @@ #include #include -#include #include #include @@ -162,4 +161,3 @@ emit completed( true ); } -#include "backup.moc" diff -Nru kdepim-runtime-4.12.3/tray/dock.cpp kdepim-runtime-4.12.90/tray/dock.cpp --- kdepim-runtime-4.12.3/tray/dock.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/tray/dock.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -21,19 +21,14 @@ #include "restoreassistant.h" #include "akonaditrayadaptor.h" -#include #include -#include #include #include -#include #include #include -#include -#include +#include #include -#include #include #include #include @@ -214,4 +209,3 @@ QProcess::startDetached( KStandardDirs::findExe( QLatin1String( "kcmshell4" ) ), QStringList() << QLatin1String("kcm_akonadi") ); } -#include "dock.moc" diff -Nru kdepim-runtime-4.12.3/tray/global.h kdepim-runtime-4.12.90/tray/global.h --- kdepim-runtime-4.12.3/tray/global.h 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/tray/global.h 2014-03-13 08:12:29.000000000 +0000 @@ -23,7 +23,6 @@ #define GLOBAL_H #include -#include namespace Tray { diff -Nru kdepim-runtime-4.12.3/tray/main.cpp kdepim-runtime-4.12.90/tray/main.cpp --- kdepim-runtime-4.12.3/tray/main.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/tray/main.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -16,7 +16,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include #include #include #include diff -Nru kdepim-runtime-4.12.3/tray/restoreassistant.cpp kdepim-runtime-4.12.90/tray/restoreassistant.cpp --- kdepim-runtime-4.12.3/tray/restoreassistant.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/tray/restoreassistant.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -25,7 +25,7 @@ #include #include #include -#include +#include #include RestoreAssistant::RestoreAssistant( QWidget *parent ) : KAssistantDialog( parent ), m_selectFileButton(0) @@ -102,4 +102,3 @@ "report a bug, so we can find out what the cause is." ) ); } -#include "restoreassistant.moc" diff -Nru kdepim-runtime-4.12.3/tray/restore.cpp kdepim-runtime-4.12.90/tray/restore.cpp --- kdepim-runtime-4.12.3/tray/restore.cpp 2014-02-27 18:05:13.000000000 +0000 +++ kdepim-runtime-4.12.90/tray/restore.cpp 2014-03-13 08:12:29.000000000 +0000 @@ -162,4 +162,3 @@ emit completed( true ); } -#include "restore.moc"