kitchensync

calendarmerger.h

00001 /*
00002     This file is part of KitchenSync.
00003 
00004     Copyright (c) 2004 Holger Hans Peter Freyther <freyther@kde.org>
00005 
00006     This library is free software; you can redistribute it and/or
00007     modify it under the terms of the GNU Library General Public
00008     License as published by the Free Software Foundation; either
00009     version 2 of the License, or (at your option) any later version.
00010 
00011     This library is distributed in the hope that it will be useful,
00012     but WITHOUT ANY WARRANTY; without even the implied warranty of
00013     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00014     Library General Public License for more details.
00015 
00016     You should have received a copy of the GNU Library General Public License
00017     along with this library; see the file COPYING.LIB.  If not, write to
00018     the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00019     Boston, MA 02110-1301, USA.
00020 */
00021 #ifndef KSYNC_CALENDARSYNCEE_MERGER_H
00022 #define KSYNC_CALENDARSYNCEE_MERGER_H
00023 
00024 
00025 #include <merger.h>
00026 
00027 namespace KSync{
00028 class CalendarSyncEntry;
00029 class KDE_EXPORT CalendarMerger : public Merger 
00030 {
00031 public:
00035     enum BaseSupports {
00036 // InicdenceBase
00037         Organizer = 0,
00038         ReadOnly,
00039         DtStart,
00040         Duration,
00041         Float,
00042 // Inicdence
00043         Attendee,
00044         CreatedDate,
00045         Revision,
00046         Description,
00047         Summary,
00048         Category,
00049         Relations,
00050         ExDates,
00051         Attachments,
00052         Secrecy,
00053         Resources,
00054         Priority,
00055         Alarms,
00056         Recurrence,
00057         Location,
00058         BaseLast
00059     };
00060 
00064     enum TodoSupports {
00065         DtDue = BaseLast,
00066         StartDate,
00067         Completed,
00068         Percent,
00069         StartDateTime, /* time of startdate supported probably also not support Float*/
00070         DueDateTime   /* time of duedate   supported probably also not support Float*/      
00071     };
00072 
00076     enum EventSupports  {
00077         DtEnd = BaseLast
00078     };
00079 
00080     CalendarMerger( const QBitArray& todo, const QBitArray& event);
00081     ~CalendarMerger();
00082 
00083     bool merge( SyncEntry* entry, SyncEntry* other );
00084 private:
00091     void mergeTodo( CalendarSyncEntry *entry, CalendarSyncEntry* other);
00092     void mergeEvent( CalendarSyncEntry *entry, CalendarSyncEntry* other);
00093     QBitArray mEvent, mTodo;
00094 };
00095 }
00096 
00097 
00098 #endif
KDE Home | KDE Accessibility Home | Description of Access Keys