Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef DUMMYSTORAGE_H
00023 #define DUMMYSTORAGE_H
00024
00025 #include "extendedstorage.h"
00026 #include "extendedcalendar.h"
00027 #include "notebook.h"
00028
00029
00035 class MKCAL_EXPORT DummyStorage : public mKCal::ExtendedStorage
00036 {
00037 public:
00038 DummyStorage(const mKCal::ExtendedCalendar::Ptr &cal) : mKCal::ExtendedStorage(cal)
00039 {
00040 mKCal::Notebook::Ptr nb = mKCal::Notebook::Ptr( new mKCal::Notebook("dummy-name",
00041 "dummy-desc") );
00042 bool r;
00043 r = addNotebook(nb);
00044 Q_ASSERT(r);
00045 r = setDefaultNotebook(nb);
00046 Q_ASSERT(r);
00047 }
00048
00049 void calendarModified(bool, KCalCore::Calendar *)
00050 {
00051 }
00052 void calendarIncidenceAdded(const KCalCore::Incidence::Ptr&)
00053 {
00054 }
00055 void calendarIncidenceChanged(const KCalCore::Incidence::Ptr&)
00056 {
00057 }
00058 void calendarIncidenceDeleted(const KCalCore::Incidence::Ptr&)
00059 {
00060 }
00061 void calendarIncidenceAdditionCanceled(const KCalCore::Incidence::Ptr&)
00062 {
00063 }
00064
00069 bool open()
00070 {
00071 return true;
00072 }
00073
00078 bool load()
00079 {
00080 return true;
00081 }
00082
00087 bool save()
00088 {
00089 return true;
00090 }
00091 bool close()
00092 {
00093 return true;
00094 }
00095 bool load(const QString&, const KDateTime&)
00096 {
00097 return true;
00098 }
00099 bool load(const QDate&)
00100 {
00101 return true;
00102 }
00103 bool load(const QDate&, const QDate&)
00104 {
00105 return true;
00106 }
00107 bool loadNotebookIncidences(const QString&)
00108 {
00109 return true;
00110 }
00111 bool loadJournals()
00112 {
00113 return true;
00114 }
00115 bool loadPlainIncidences()
00116 {
00117 return true;
00118 }
00119 bool loadRecurringIncidences()
00120 {
00121 return true;
00122 }
00123 bool loadGeoIncidences()
00124 {
00125 return true;
00126 }
00127 bool loadGeoIncidences(float, float, float, float)
00128 {
00129 return true;
00130 }
00131 bool loadAttendeeIncidences()
00132 {
00133 return true;
00134 }
00135 int loadUncompletedTodos()
00136 {
00137 return 0;
00138 }
00139 int loadCompletedTodos(bool, int, KDateTime*)
00140 {
00141 return 0;
00142 }
00143 int loadIncidences(bool, int, KDateTime*)
00144 {
00145 return 0;
00146 }
00147 int loadFutureIncidences(int, KDateTime*)
00148 {
00149 return 0;
00150 }
00151 int loadGeoIncidences(bool, int, KDateTime*)
00152 {
00153 return 0;
00154 }
00155 int loadUnreadInvitationIncidences()
00156 {
00157 return 0;
00158 }
00159 int loadOldInvitationIncidences(int, KDateTime*)
00160 {
00161 return 0;
00162 }
00163 KCalCore::Person::List loadContacts()
00164 {
00165 KCalCore::Person::List l;
00166 return l;
00167 }
00168 int loadContactIncidences(const KCalCore::Person::Ptr&, int, KDateTime*)
00169 {
00170 return 0;
00171 }
00172 int loadJournals(int, KDateTime*)
00173 {
00174 return 0;
00175 }
00176 bool notifyOpened(const KCalCore::Incidence::Ptr&)
00177 {
00178 return true;
00179 }
00180 bool cancel()
00181 {
00182 return true;
00183 }
00184 void calendarModified(bool, const KCalCore::Calendar*) const
00185 {
00186 }
00187 void calendarIncidenceAdded(const KCalCore::Incidence::Ptr&) const
00188 {
00189 }
00190 void calendarIncidenceChanged(const KCalCore::Incidence::Ptr&) const
00191 {
00192 }
00193 void calendarIncidenceDeleted(const KCalCore::Incidence::Ptr&) const
00194 {
00195 }
00196 void calendarIncidenceAdditionCanceled(const KCalCore::Incidence::Ptr&) const
00197 {
00198 }
00199 bool insertedIncidences(KCalCore::Incidence::List *, const KDateTime&, const QString&)
00200 {
00201 return true;
00202 }
00203 bool modifiedIncidences(KCalCore::Incidence::List *, const KDateTime&, const QString&)
00204 {
00205 return true;
00206 }
00207 bool deletedIncidences(KCalCore::Incidence::List *, const KDateTime&, const QString&)
00208 {
00209 return true;
00210 }
00211 bool deletedIncidencesCreatedAfter(KCalCore::Incidence::List *, const KDateTime&, const QString&)
00212 {
00213 return true;
00214 }
00215 bool allIncidences(KCalCore::Incidence::List *, const QString&)
00216 {
00217 return true;
00218 }
00219 bool duplicateIncidences(KCalCore::Incidence::List *, const KCalCore::Incidence::Ptr&, const QString&)
00220 {
00221 return true;
00222 }
00223 bool loadNotebooks()
00224 {
00225 return true;
00226 }
00227 bool reloadNotebooks()
00228 {
00229 return true;
00230 }
00231 bool modifyNotebook(const mKCal::Notebook::Ptr&, mKCal::DBOperation, bool)
00232 {
00233 return true;
00234 }
00235 KDateTime incidenceDeletedDate( const KCalCore::Incidence::Ptr &incidence )
00236 {
00237 Q_UNUSED(incidence);
00238 return KDateTime();
00239 }
00240 int eventCount()
00241 {
00242 return 0;
00243 }
00244 int todoCount()
00245 {
00246 return 0;
00247 }
00248 int journalCount()
00249 {
00250 return 0;
00251 }
00252 void virtual_hook( int, void * ) {
00253 return;
00254 }
00255 };
00256
00257 #endif