agendainterface/agendautil/inc/agendautil_p.h
changeset 55 2c54b51f39c4
parent 51 0b38fc5b94c6
child 64 1881ad52dc45
equal deleted inserted replaced
51:0b38fc5b94c6 55:2c54b51f39c4
    27 #include <calinstanceview.h>
    27 #include <calinstanceview.h>
    28 #include <calalarm.h>
    28 #include <calalarm.h>
    29 #include <calcategory.h>
    29 #include <calcategory.h>
    30 
    30 
    31 // User includes
    31 // User includes
    32 #include "agendautil.h"
    32 #include <agendautil.h>
    33 
    33 
    34 // Forward declarations
    34 // Forward declarations
    35 class CCalSession;
    35 class CCalSession;
    36 
    36 
    37 // Enums
    37 // Enums
    59 {
    59 {
    60 public:
    60 public:
    61 	AgendaUtilPrivate(AgendaUtil* calendar);
    61 	AgendaUtilPrivate(AgendaUtil* calendar);
    62 	~AgendaUtilPrivate();
    62 	~AgendaUtilPrivate();
    63 
    63 
    64 	ulong addEntry(const AgendaEntry& entry);
    64 	ulong store(AgendaEntry &entry, AgendaUtil::RecurrenceRange range);
    65 	ulong cloneEntry(const AgendaEntry& entry, AgendaEntry::Type type);
    65 	ulong cloneEntry(const AgendaEntry& entry, AgendaEntry::Type type);
    66 	bool updateEntry(const AgendaEntry& entry, bool isChild = false);
       
    67 	bool storeRepeatingEntry(const AgendaEntry& entry, bool copyToChildren);
       
    68 	bool createException(const AgendaEntry& entry, QDateTime instanceOriginalDateTime);
       
    69 	
    66 	
    70 	bool deleteEntry(ulong id);
    67 	bool deleteEntry(ulong id);
    71 	void deleteRepeatedEntry(
    68 	void deleteRepeatedEntry(
    72 			AgendaEntry& entry,
    69 			AgendaEntry& entry,
    73 			AgendaUtil::RecurrenceRange range);
    70 			AgendaUtil::RecurrenceRange range);
    90 			QDateTime day, AgendaUtil::FilterFlags filter);
    87 			QDateTime day, AgendaUtil::FilterFlags filter);
    91 
    88 
    92 	AgendaUtil::Error error() const;
    89 	AgendaUtil::Error error() const;
    93 	void setCompleted(AgendaEntry& entry, bool complete, QDateTime& dateTime);
    90 	void setCompleted(AgendaEntry& entry, bool complete, QDateTime& dateTime);
    94 	AgendaEntry parentEntry(AgendaEntry& entry);
    91 	AgendaEntry parentEntry(AgendaEntry& entry);
    95 	void clearRepeatingProperties(AgendaEntry& entry);
       
    96 	void getPreviousInstanceTimes(AgendaEntry& entry, QDateTime& startTime, 
    92 	void getPreviousInstanceTimes(AgendaEntry& entry, QDateTime& startTime, 
    97 		                              QDateTime& endTime);
    93 		                              QDateTime& endTime);
    98 	void getNextInstanceTimes(AgendaEntry& entry, QDateTime& startTime, 
    94 	void getNextInstanceTimes(AgendaEntry& entry, QDateTime& startTime, 
    99 							  QDateTime& endTime);
    95 							  QDateTime& endTime);
   100 	bool areNoEntriesInCalendar();
    96 	bool areNoEntriesInCalendar();
   112 	void CalChangeNotification(RArray<TCalChangeEntry>& aChangeItems);
   108 	void CalChangeNotification(RArray<TCalChangeEntry>& aChangeItems);
   113 
   109 
   114 private:
   110 private:
   115 	AgendaEntry createAgendaEntryFromCalEntry(
   111 	AgendaEntry createAgendaEntryFromCalEntry(
   116 			CCalEntry& calEntry, CCalInstance* instance = NULL);
   112 			CCalEntry& calEntry, CCalInstance* instance = NULL);
       
   113 	void createCCalEntryFromAgendaEntry(AgendaEntry &agendaEntry, CCalEntry &calEntry);
   117 	bool addAttendeesToEntry(
   114 	bool addAttendeesToEntry(
   118 			const QList<AgendaAttendee>& attendees, CCalEntry& entry);
   115 			const QList<AgendaAttendee>& attendees, CCalEntry& entry);
   119 	bool addCategoriesToEntry(
   116 	bool addCategoriesToEntry(
   120 			const QList<AgendaCategory>& categories, CCalEntry& entry);
   117 			const QList<AgendaCategory>& categories, CCalEntry& entry);
   121 	bool setAlarmToEntry(const AgendaAlarm& alarm, CCalEntry& entry);
   118 	bool setAlarmToEntry(const AgendaAlarm& alarm, CCalEntry& entry);
   140 	RepeatIndex getRepeatIndex(const CCalEntry& aEntry);
   137 	RepeatIndex getRepeatIndex(const CCalEntry& aEntry);
   141 	TTime getPreviousInstanceForRepeatOther(CCalEntry& entry, 
   138 	TTime getPreviousInstanceForRepeatOther(CCalEntry& entry, 
   142 									const CalCommon::TCalTimeRange& timeRange);
   139 									const CalCommon::TCalTimeRange& timeRange);
   143 	TTime getNextInstanceForRepeatOther(CCalEntry& aEntry, 
   140 	TTime getNextInstanceForRepeatOther(CCalEntry& aEntry, 
   144 								   const CalCommon::TCalTimeRange& timeRange);
   141 								   const CalCommon::TCalTimeRange& timeRange);
   145 	bool haveRepeatPropertiesChanged(const CCalEntry& newEntry, 
   142 	
   146 	                                  const CCalEntry& oldEntry);
       
   147 	void copyChildrenExceptionData( CCalEntry& editedEntry,
       
   148 								RPointerArray<CCalEntry>& oldEntries );
       
   149 	bool isFieldSame( CCalEntry& entryOne, CCalEntry& entryTwo,
       
   150 								DifferenceFlag flag);
       
   151 	void copyField( const CCalEntry& src, CCalEntry& dst,
       
   152 							DifferenceFlag field );
       
   153 	void storeEachChildEntry(CCalEntry &entry,
       
   154 							  RPointerArray<CCalEntry> &oldEntries,
       
   155 							  bool resetLocalUid);
       
   156 	TCalTime generateRecurrenceIdFromEntry( CCalEntry& entry, 
   143 	TCalTime generateRecurrenceIdFromEntry( CCalEntry& entry, 
   157 											TCalTime instanceDate );
   144 											TCalTime instanceDate );
   158 	
   145 	
   159 	bool endsAtStartOfDay( CCalInstance* instance,
   146 	bool endsAtStartOfDay( CCalInstance* instance,
   160 						  const TTime& day );
   147 						  const TTime& day );
   161 						  
   148 						  
   162 	AgendaRepeatRule createAgendaRRuleFromTCalRRule(TCalRRule &calRRule);
   149 	AgendaRepeatRule createAgendaRRuleFromTCalRRule(TCalRRule &calRRule);
   163 	
   150 	
   164 	TCalRRule createTCalRRuleFromAgendaRRule(AgendaRepeatRule &agendaRRule);
   151 	TCalRRule createTCalRRuleFromAgendaRRule(AgendaRepeatRule &agendaRRule, bool isNonFloating);
   165 
   152 
   166 
   153 
   167 private:
   154 private:
   168 	AgendaUtil *q;
   155 	AgendaUtil *q;
   169 	CCalSession* iCalSession;
   156 	CCalSession* iCalSession;