[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-pim
Subject: Re: [Kde-pim] libkcal amendments for email alarms
From: Cornelius Schumacher <schumacher () kde ! org>
Date: 2002-12-02 13:47:35
[Download RAW message or body]
On Monday 02 December 2002 14:22, David Jarvie wrote:
>
> I have been thinking about how to implement the same mechanism for Events,
> etc., and notice that all components (even VCALENDAR) are allowed by
> RFC2445 to have custom properties. To ensure that we don't lose custom
> properties when reading calendars and writing them back, I think that we
> need to implement custom property read/write for the following classes:
> Calendar, IncidenceBase, Alarm. If we ever read VTIMEZONE components, they
> should be treated in the same way. The best way to implement this would, I
> think, be to have a common base class for each of the above classes, whose
> purpose would be to read, write and manipulate custom properties. It would
> be
>
> class CustomProperties
> {
> public:
> /** Create or modify a custom calendar property. */
> void setCustomProperty(const QCString &app, const QCString &key,
> const QString &value);
> /** Delete a custom calendar property. */
> void removeCustomProperty(const QCString &app, const QCString &key);
> /** Return the value of a custom calendar property. */
> QString customProperty(const QCString &app, const QCString &key) const;
> /** Initialise the alarm's custom calendar properties to the specified
> * key/value pairs. */
> void setCustomProperties(const QMap<QCString, QString> &properties);
> /** Return all custom calendar property key/value pairs. */
> QMap<QCString, QString> customProperties() const;
> private:
> QMap<QCString, QString> mCustomProperties; // custom calendar
> properties };
>
> Each of Calendar, IncidenceBase and Alarm would be publically derived from
> it.
>
> Using this, there would only need to be one place in ICalFormatImpl to read
> or to write custom properties, rather than having to duplicate code between
> Alarms and Incidences/FreeBusys.
>
> Comments?
Excellent idea.
--
Cornelius Schumacher <schumacher@kde.org>
_______________________________________________
kde-pim mailing list
kde-pim@mail.kde.org
http://mail.kde.org/mailman/listinfo/kde-pim
kde-pim home page at http://pim.kde.org/
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic