21#ifndef _AKONADI_CALENDARBASE_H_
22#define _AKONADI_CALENDARBASE_H_
24#include "akonadi-calendar_export.h"
26#include <akonadi/item.h>
27#include <akonadi/collection.h>
28#include <kcalcore/memorycalendar.h>
29#include <kcalcore/incidence.h>
30#include <KDE/KDateTime>
34class CalendarBasePrivate;
35class IncidenceChanger;
50class AKONADI_CALENDAR_EXPORT
CalendarBase :
public KCalCore::MemoryCalendar
54 typedef QSharedPointer<CalendarBase> Ptr;
71 Akonadi::Item item(
const QString &uid)
const;
77 Akonadi::Item
item(
const KCalCore::Incidence::Ptr &incidence)
const;
82 Akonadi::Item item(Akonadi::Item::Id)
const;
88 Akonadi::Item::List items()
const;
101 Akonadi::Item::List itemList(
const KCalCore::Incidence::List &incidenceList)
const;
108 KCalCore::Incidence::List childIncidences(
const QString &parentUid)
const;
115 KCalCore::Incidence::List childIncidences(
const Akonadi::Item::Id &parentId)
const;
122 Akonadi::Item::List childItems(
const QString &parentUid)
const;
129 Akonadi::Item::List childItems(
const Akonadi::Item::Id &parentId)
const;
142 void setWeakPointer(
const QWeakPointer<Akonadi::CalendarBase> &pointer);
149 QWeakPointer<CalendarBase> weakPointer()
const;
150 bool addEvent(
const KCalCore::Event::Ptr &event);
157 bool deleteEvent(
const KCalCore::Event::Ptr &event);
164 void deleteAllEvents();
175 bool addTodo(
const KCalCore::Todo::Ptr &todo);
182 bool deleteTodo(
const KCalCore::Todo::Ptr &todo);
189 void deleteAllTodos();
200 bool addJournal(
const KCalCore::Journal::Ptr &journal);
207 bool deleteJournal(
const KCalCore::Journal::Ptr &journal);
214 void deleteAllJournals();
225 bool addIncidence(
const KCalCore::Incidence::Ptr &incidence);
232 bool deleteIncidence(
const KCalCore::Incidence::Ptr &);
239 void startBatchAdding();
247 void endBatchAdding();
258 Akonadi::IncidenceChanger *incidenceChanger()
const;
265 bool modifyIncidence(
const KCalCore::Incidence::Ptr &newIncidence);
294 QScopedPointer<CalendarBasePrivate> d_ptr;
295 CalendarBase(CalendarBasePrivate *
const d, QObject *parent);
The base class for all akonadi aware calendars.
void deleteFinished(bool success, const QString &errorMessage)
This signal is emitted when an incidence is deleted in akonadi through delete{Incidence,...
void modifyFinished(bool success, const QString &errorMessage)
This signal is emitted when an incidence is modified in akonadi through modifyIncidence().
void createFinished(bool success, const QString &errorMessage)
This signal is emitted when an incidence is created in akonadi through add{Incidence,...
Akonadi::Item item(const KCalCore::Incidence::Ptr &incidence) const
Returns the Item containing the incidence with uid uid or an invalid Item if the incidence isn't foun...
qint64 Id
Describes the unique id type.
This class provides an encapsulation of iTIP transactions (RFC 2446).
FreeBusyManager::Singleton.