Commit d69b9185 authored by Daniel Vrátil's avatar Daniel Vrátil 🤖

Remove the unused Invitations agent

The agent is not useful, likely unused since forever and haven't seen
an update in ages.
parent 9647c85c
......@@ -4,5 +4,4 @@ add_definitions( -DQT_NO_CAST_TO_ASCII )
add_subdirectory( maildispatcher )
add_subdirectory( newmailnotifier )
add_subdirectory( migration )
add_subdirectory( invitations )
add_definitions(-DTRANSLATION_DOMAIN=\"akonadi_invitations_agent\")
set( invitationsagent_SRCS
invitationsagent.cpp
incidenceattribute.cpp
)
ecm_qt_declare_logging_category(invitationsagent_SRCS HEADER invitationagent_debug.h IDENTIFIER INVITATIONAGENT_LOG CATEGORY_NAME org.kde.pim.invitationagent)
add_executable(akonadi_invitations_agent ${invitationsagent_SRCS})
target_link_libraries(akonadi_invitations_agent
KF5::AkonadiCore
KF5::AkonadiMime
KF5::Mime
KF5::CalendarCore
KF5::AkonadiAgentBase
KF5::I18n
)
if( APPLE )
set_target_properties(akonadi_invitations_agent PROPERTIES MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/../Info.plist.template)
set_target_properties(akonadi_invitations_agent PROPERTIES MACOSX_BUNDLE_GUI_IDENTIFIER "org.kde.Akonadi.invitationsagent")
set_target_properties(akonadi_invitations_agent PROPERTIES MACOSX_BUNDLE_BUNDLE_NAME "KDE Akonadi Invitations Calendar")
endif ()
install(TARGETS akonadi_invitations_agent ${KDE_INSTALL_TARGETS_DEFAULT_ARGS})
install(FILES invitationsagent.desktop DESTINATION "${KDE_INSTALL_DATAROOTDIR}/akonadi/agents")
#! /bin/sh
$XGETTEXT *.cpp -o $podir/akonadi_invitations_agent.pot
/*
Copyright (c) 2009 Sebastian Sauer <sebsauer@kdab.com>
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 "incidenceattribute.h"
#include <QString>
#include <QTextStream>
using namespace Akonadi;
IncidenceAttribute::IncidenceAttribute()
: Attribute()
{
}
IncidenceAttribute::~IncidenceAttribute()
{
}
QByteArray IncidenceAttribute::type() const
{
static const QByteArray sType("incidence");
return sType;
}
Attribute *IncidenceAttribute::clone() const
{
IncidenceAttribute *other = new IncidenceAttribute;
return other;
}
QByteArray IncidenceAttribute::serialized() const
{
QString data;
QTextStream out(&data);
out << mStatus;
out << mReferenceId;
return data.toUtf8();
}
void IncidenceAttribute::deserialize(const QByteArray &data)
{
QString s(QString::fromUtf8(data));
QTextStream in(&s);
in >> mStatus;
in >> mReferenceId;
}
QString IncidenceAttribute::status() const
{
return mStatus;
}
void IncidenceAttribute::setStatus(const QString &newstatus)
{
mStatus = newstatus;
}
Akonadi::Item::Id IncidenceAttribute::reference() const
{
return mReferenceId;
}
void IncidenceAttribute::setReference(Akonadi::Item::Id id)
{
mReferenceId = id;
}
/*
Copyright (c) 2009 Sebastian Sauer <sebsauer@kdab.com>
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 INCIDENCEATTRIBUTE_H
#define INCIDENCEATTRIBUTE_H
#include <item.h>
#include <attribute.h>
namespace Akonadi {
class IncidenceAttribute : public Akonadi::Attribute
{
public:
explicit IncidenceAttribute();
~IncidenceAttribute();
QByteArray type() const override;
Attribute *clone() const override;
QByteArray serialized() const override;
void deserialize(const QByteArray &data) override;
/**
* The status the invitation is in.
*
* One of;
* "new", "accepted", "tentative", "counter", "cancel", "reply", "delegated"
*/
QString status() const;
void setStatus(const QString &newstatus);
/**
* The referenced item. This is used e.g. in the invitationagent to
* let users know where the original mail message is.
*/
Akonadi::Item::Id reference() const;
void setReference(Akonadi::Item::Id id);
private:
QString mStatus;
Akonadi::Item::Id mReferenceId;
};
}
#endif
This diff is collapsed.
[Desktop Entry]
Name=Invitations Dispatcher Agent
Name[ar]=وكيل إرسال الدّعوات
Name[bs]=Agent za raspodjelu poziva
Name[ca]=Agent distribuïdor d'invitacions
Name[ca@valencia]=Agent distribuïdor d'invitacions
Name[cs]=Agent odesílatele pozvánek
Name[da]=Invitationsafsendingsagent
Name[de]=Agent zur Einladungs-Auslieferung
Name[el]=Πράκτορας αποστολής προσκλήσεων
Name[en_GB]=Invitations Dispatcher Agent
Name[es]=Agente despachador de mensajes
Name[et]=Kutsete edastamise agent
Name[fi]=Kutsunlähetysagentti
Name[fr]=Agent de diffusions d'invitations
Name[gl]=Axente de Despacho de Convites
Name[hu]=Meghívófeladó ügynök
Name[ia]=Agente Distributor de Invitationes
Name[it]=Agente per la consegna degli inviti
Name[ja]=正体ディスパッチャーエージェント
Name[kk]=Шақыру реттеуш агенті
Name[km]=ការ​អញ្ជើញ​​ភ្នាក់ងារ​​កម្មវិធី​បញ្ជូន
Name[ko]=초대장 가져오기 에이전트
Name[lt]=Laiškų gijų išdėstymo agentas
Name[lv]=Ielūgumu nosūtīšanas aģents
Name[nb]=Agent for invitasjonssendinger
Name[nds]=Inladenverdeel-Hölper
Name[nl]=Uitnodigingen-verspreidingsagent
Name[pl]=Pośrednik obsługi zaproszeń
Name[pt]=Agente de Despacho de Convites
Name[pt_BR]=Agente de encaminhamento de convites
Name[ro]=Agent de remitere a invitațiilor
Name[ru]=Агент диспетчера приглашений
Name[sk]=Agent spracovania pozvánok
Name[sl]=Posrednik za razpošiljanje povabil
Name[sr]=Агент отпремања позивница
Name[sr@ijekavian]=Агент отпремања позивница
Name[sr@ijekavianlatin]=Agent otpremanja pozivnica
Name[sr@latin]=Agent otpremanja pozivnica
Name[sv]=Modul för inbjudningssändning
Name[tr]=Davetiye Dağıtıcı Programı
Name[uk]=Агент розподілу запрошень
Name[x-test]=xxInvitations Dispatcher Agentxx
Name[zh_CN]=邀请签发代理
Name[zh_TW]=邀請配送代理程式
Comment=Dispatches invitations from your calendar
Comment[ar]=يُرسل الدّعوات من التّقويم
Comment[bs]=Raspoređuje pozive iz vašeg kalendara
Comment[ca]=Distribueix invitacions des del calendari
Comment[ca@valencia]=Distribueix invitacions des del calendari
Comment[da]=Udsender invitationer fra din kalender
Comment[de]=Verschickt Einladungen aus Ihren Kalender
Comment[el]=Διανέμει προσκλήσεις από το ημερολόγιό σας
Comment[en_GB]=Dispatches invitations from your calendar
Comment[es]=Remite invitaciones desde su calendario
Comment[et]=Kutsete edastamine sinu kalendrist
Comment[fi]=Lähettää kutsuja kalenteristasi
Comment[fr]=Diffuse les invitations à partir de votre agenda
Comment[gl]=Xestiona invitacións do calendario.
Comment[hu]=Meghívásokat kézbesít a naptárából
Comment[ia]=Expedi invitationes ex tu calendario
Comment[it]=Consegna inviti dal tuo calendario
Comment[kk]=Күнтізбеңіздегі шақыруларды үлестіру
Comment[ko]=달력에서 초대장을 가져옵니다
Comment[lt]=Išsiunčia pakvietimus iš Jūsų kalendoriaus
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
Comment[pt_BR]=Encaminhamento de convites do seu calendário
Comment[ro]=Remite invitații din calendar
Comment[ru]=Рассылает приглашения из календаря
Comment[sk]=Vybavuje pozvánky z vášho kalendára
Comment[sl]=Odpošlje povabila z vašega koledarja
Comment[sr]=Отпрема позивнице из вашег календара
Comment[sr@ijekavian]=Отпрема позивнице из вашег календара
Comment[sr@ijekavianlatin]=Otprema pozivnice iz vašeg kalendara
Comment[sr@latin]=Otprema pozivnice iz vašeg kalendara
Comment[sv]=Skickar inbjudningar från kalendern
Comment[tr]=Takviminizdeki davetleri yollar
Comment[uk]=Роповсюджує запрошення на основі даних календаря
Comment[x-test]=xxDispatches invitations from your calendarxx
Comment[zh_CN]=从您的日历发送邀请
Comment[zh_TW]=從您的行事曆中分配邀請
Type=AkonadiAgent
Exec=akonadi_invitations_agent
Icon=mail-folder-outbox
X-Akonadi-Identifier=akonadi_invitations_agent
X-Akonadi-Capabilities=Unique,NoConfig
#X-Akonadi-MimeTypes=message/rfc822
#X-Akonadi-MimeTypes=text/calendar
X-Akonadi-MimeTypes=application/x-vnd.akonadi.calendar.event
#X-Akonadi-MimeTypes=application/x-vnd.akonadi.calendar.todo
#X-Akonadi-MimeTypes=application/x-vnd.akonadi.calendar.journal
#X-Akonadi-MimeTypes=application/x-vnd.akonadi.calendar.freebusy
/*
Copyright 2009 Sebastian Sauer <sebsauer@kdab.net>
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 INVITATIONSAGENT_H
#define INVITATIONSAGENT_H
#include <KCalCore/MemoryCalendar>
#include <AgentBase>
#include <Collection>
#include <Item>
#include <ItemCreateJob>
#include <QObject>
class KJob;
class InvitationsAgent;
class InvitationsCollection;
class InvitationsAgentItem : public QObject
{
Q_OBJECT
public:
InvitationsAgentItem(InvitationsAgent *a, const Akonadi::Item &originalItem);
~InvitationsAgentItem() override;
void add(const Akonadi::Item &newItem);
private Q_SLOTS:
void createItemResult(KJob *job);
void fetchItemDone(KJob *);
void modifyItemDone(KJob *job);
private:
InvitationsAgent *m_agent = nullptr;
const Akonadi::Item m_originalItem;
QList<Akonadi::ItemCreateJob *> m_jobs;
};
class InvitationsAgent : public Akonadi::AgentBase, public Akonadi::AgentBase::ObserverV3
{
Q_OBJECT
public:
explicit InvitationsAgent(const QString &id);
~InvitationsAgent() override;
Akonadi::Collection collection() const;
public Q_SLOTS:
void configure(WId windowId) override;
private Q_SLOTS:
void initStart();
void initDone(KJob *job = nullptr);
private:
Akonadi::Item handleContent(const QString &vcal, const KCalCore::MemoryCalendar::Ptr &calendar, const Akonadi::Item &item);
void itemAdded(const Akonadi::Item &item, const Akonadi::Collection &collection) override;
private:
QString m_resourceId;
InvitationsCollection *m_invitationsCollection = nullptr;
Akonadi::Collection m_collection;
};
#endif // MAILDISPATCHERAGENT_H
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment