Changeset 1760
- Timestamp:
- 02/19/07 13:45:59 (22 months ago)
- Location:
- plugins/kdepim/src
- Files:
-
- 5 modified
-
kaddrbook.cpp (modified) (4 diffs)
-
kcal.cpp (modified) (8 diffs)
-
kdepim_sync.cpp (modified) (7 diffs)
-
knotes.cpp (modified) (4 diffs)
-
osyncbase.h (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
plugins/kdepim/src/kaddrbook.cpp
r1757 r1760 46 46 //Regard entries with invalid revision dates as having just been changed. 47 47 QDateTime revdate = e.revision(); 48 osync_debug("kde", 3, "Getting hash: %s", revdate.toString().data());48 // osync_debug("kde", 3, "Getting hash: %s", revdate.toString().data()); 49 49 if (!revdate.isValid()) { 50 50 revdate = QDateTime::currentDateTime(); … … 202 202 QString hash = calc_hash(addressee); 203 203 osync_change_set_hash(chg, hash); 204 osync_debug("kde", 3, "KDE ADDRESSBOOK ENTRY UPDATED (UID=%s)", (const char *)uid.local8Bit());204 // osync_debug("kde", 3, "KDE ADDRESSBOOK ENTRY UPDATED (UID=%s)", (const char *)uid.local8Bit()); 205 205 break; 206 206 } … … 218 218 QString hash = calc_hash(addressee); 219 219 osync_change_set_hash(chg, hash); 220 osync_debug("kde", 3, "KDE ADDRESSBOOK ENTRY ADDED (UID=%s)", (const char *)addressee.uid().local8Bit());220 // osync_debug("kde", 3, "KDE ADDRESSBOOK ENTRY ADDED (UID=%s)", (const char *)addressee.uid().local8Bit()); 221 221 break; 222 222 } … … 233 233 addressbookptr->removeAddressee(addressee); 234 234 235 osync_debug("kde", 3, "KDE ADDRESSBOOK ENTRY DELETED (UID=%s)", (const char*)uid.local8Bit());235 // osync_debug("kde", 3, "KDE ADDRESSBOOK ENTRY DELETED (UID=%s)", (const char*)uid.local8Bit()); 236 236 237 237 break; -
plugins/kdepim/src/kcal.cpp
r1757 r1760 80 80 } 81 81 82 osync_debug("kcal", 3, "Calendar: %d events", calendar->events().size());82 // osync_debug("kcal", 3, "Calendar: %d events", calendar->events().size()); 83 83 84 84 connected = true; … … 116 116 bool KCalDataSource::report_incidence(OSyncContext *ctx, KCal::Incidence *e, const char *objtype, const char *objformat) 117 117 { 118 osync_debug("kcal", 3, "One calendar incidence (%s)", objtype);118 // osync_debug("kcal", 3, "One calendar incidence (%s)", objtype); 119 119 QString hash = calc_hash(e); 120 120 … … 123 123 /* Build a local calendar for the incidence data */ 124 124 KCal::CalendarLocal cal(calendar->timeZoneId()); 125 osync_debug("kcal", 3, "timezoneid: %s\n", (const char*)cal.timeZoneId().local8Bit());125 // osync_debug("kcal", 3, "timezoneid: %s\n", (const char*)cal.timeZoneId().local8Bit()); 126 126 cal.addIncidence(e->clone()); 127 127 … … 131 131 const char *data = datastr; 132 132 133 osync_debug("kcal", 3, "UID: %s\n", (const char*)uid.local8Bit());133 // osync_debug("kcal", 3, "UID: %s\n", (const char*)uid.local8Bit()); 134 134 OSyncChange *chg = osync_change_new(); 135 135 osync_change_set_uid(chg, uid.local8Bit()); … … 155 155 { 156 156 KCal::Event::List events = calendar->events(); 157 osync_debug("kcal", 3, "Number of events: %d", events.size());157 // osync_debug("kcal", 3, "Number of events: %d", events.size()); 158 158 159 159 if (osync_member_get_slow_sync(member, "event")) { 160 osync_debug("kcal", 3, "Setting slow-sync for events");160 // osync_debug("kcal", 3, "Setting slow-sync for events"); 161 161 osync_hashtable_set_slow_sync(hashtable, "event"); 162 162 } … … 184 184 KCal::Todo::List todos = calendar->todos(); 185 185 186 osync_debug("kcal", 3, "Number of to-dos: %d", todos.size());186 // osync_debug("kcal", 3, "Number of to-dos: %d", todos.size()); 187 187 188 188 if (osync_member_get_slow_sync(member, "todo")) { 189 osync_debug("kcal", 3, "Setting slow-sync for todos");189 // osync_debug("kcal", 3, "Setting slow-sync for todos"); 190 190 osync_hashtable_set_slow_sync(hashtable, "todo"); 191 191 } 192 192 193 193 for (KCal::Todo::List::ConstIterator i = todos.begin(); i != todos.end(); i++) { 194 osync_debug("kcal", 3, "%p: doesFloat: %d", *i, (*i)->doesFloat());194 // osync_debug("kcal", 3, "%p: doesFloat: %d", *i, (*i)->doesFloat()); 195 195 if (!report_incidence(ctx, *i, "todo", "vtodo20")) 196 196 return false; … … 214 214 { 215 215 OSyncChangeType type = osync_change_get_changetype(chg); 216 osync_debug("kcal", 3, "%s", __FUNCTION__);216 // osync_debug("kcal", 3, "%s", __FUNCTION__); 217 217 switch (type) { 218 218 case OSYNC_CHANGE_TYPE_DELETED: { … … 261 261 e->setUid(osync_change_get_uid(chg)); 262 262 263 osync_debug("kcal", 3, "Writing incidence: uid: %s, summary: %s",263 // osync_debug("kcal", 3, "Writing incidence: uid: %s, summary: %s", 264 264 (const char*)e->uid().local8Bit(), (const char*)e->summary().local8Bit()); 265 265 -
plugins/kdepim/src/kdepim_sync.cpp
r1757 r1760 48 48 void *module; 49 49 50 osync_debug("kde", 3, "%s", __FUNCTION__);51 52 osync_debug("kde", 3, "Loading implementation module");50 // osync_debug("kde", 3, "%s", __FUNCTION__); 51 52 // osync_debug("kde", 3, "Loading implementation module"); 53 53 module = dlopen(KDEPIM_LIBDIR"/kdepim_lib.so", RTLD_NOW); 54 54 if (!module) { 55 osync_error_set(e , OSYNC_ERROR_INITIALIZATION, "Can't load plugin implementation module from %s: %s",55 osync_error_set(error, OSYNC_ERROR_INITIALIZATION, "Can't load plugin implementation module from %s: %s", 56 56 KDEPIM_LIBDIR"/kdepim_lib.so", dlerror()); 57 57 goto error; 58 58 } 59 osync_debug("kde", 3, "Getting initialization function");59 // osync_debug("kde", 3, "Getting initialization function"); 60 60 init_func = (KdeImplInitFunc)dlsym(module, "new_KdePluginImplementation"); 61 61 if (!init_func) { 62 osync_error_set(e , OSYNC_ERROR_INITIALIZATION, "Invalid plugin implementation module");62 osync_error_set(error, OSYNC_ERROR_INITIALIZATION, "Invalid plugin implementation module"); 63 63 goto error; 64 64 } 65 65 66 osync_debug("kde", 3, "Initializing implementation module");67 impl_object = init_func( member, e);66 // osync_debug("kde", 3, "Initializing implementation module"); 67 impl_object = init_func(plugin, info, error); 68 68 if (!impl_object) 69 69 goto error; … … 77 77 static void kde_finalize(void *data) 78 78 { 79 osync_debug("kde", 3, "%s()", __FUNCTION__);79 // osync_debug("kde", 3, "%s()", __FUNCTION__); 80 80 81 81 KdePluginImplementationBase *impl_object = (KdePluginImplementationBase *)data; … … 99 99 { 100 100 KdePluginImplementationBase *impl_object = impl_object_for_context(ctx); 101 osync_debug("kde", 3, "%s",__FUNCTION__);101 // osync_debug("kde", 3, "%s",__FUNCTION__); 102 102 103 103 impl_object->get_changeinfo(ctx); … … 108 108 KdePluginImplementationBase *impl_object = impl_object_for_context(ctx); 109 109 110 osync_debug("kde", 3, "%s()",__FUNCTION__);110 // osync_debug("kde", 3, "%s()",__FUNCTION__); 111 111 112 112 impl_object->sync_done(ctx); … … 117 117 KdePluginImplementationBase *impl_object = impl_object_for_context(ctx); 118 118 119 osync_debug("kde", 3, "%s()",__FUNCTION__);119 // osync_debug("kde", 3, "%s()",__FUNCTION__); 120 120 121 121 return impl_object->vcard_commit_change(ctx, change); … … 126 126 KdePluginImplementationBase *impl_object = impl_object_for_context(ctx); 127 127 128 osync_debug("kde", 3, "%s()",__FUNCTION__);128 // osync_debug("kde", 3, "%s()",__FUNCTION__); 129 129 130 130 return impl_object->vcard_access(ctx, change); … … 140 140 osync_trace(TRACE_ENTRY, "%s(%p, %p, %p)", __func__, data, info, error); 141 141 142 OSync EvoEnv *env = (OSyncEvoEnv *)data;142 OSyncKDEEnv *env = (OSyncKDEEnv *)data; 143 143 144 144 osync_objtype_sink_set_available(env->contact_sink, TRUE); -
plugins/kdepim/src/knotes.cpp
r1757 r1760 155 155 156 156 if (osync_member_get_slow_sync(member, "note")) { 157 osync_debug("kcal", 3, "Setting slow-sync for notes");157 // osync_debug("kcal", 3, "Setting slow-sync for notes"); 158 158 osync_hashtable_set_slow_sync(hashtable, "note"); 159 159 } … … 165 165 */ 166 166 if (kn_iface->text(i.key()) == "") { 167 osync_debug("knotes", 4, "Skipping empty note");167 // osync_debug("knotes", 4, "Skipping empty note"); 168 168 continue; 169 169 } 170 170 171 osync_debug("knotes", 4, "Note key: %s", (const char*)i.key().local8Bit());172 osync_debug("knotes", 4, "Note summary: %s", (const char*)i.data().local8Bit());171 // osync_debug("knotes", 4, "Note key: %s", (const char*)i.key().local8Bit()); 172 // osync_debug("knotes", 4, "Note summary: %s", (const char*)i.data().local8Bit()); 173 173 osync_trace(TRACE_INTERNAL, "reporting notes %s\n", (const char*)i.key().local8Bit()); 174 174 … … 207 207 osync_change_set_data(chg, (char*)doc, sizeof(doc), 1); 208 208 209 osync_debug("knotes", 4, "Reporting note:\%s", osync_change_get_printable(chg));209 // osync_debug("knotes", 4, "Reporting note:\%s", osync_change_get_printable(chg)); 210 210 211 211 // Use the hash table to check if the object … … 327 327 QString asdasd = "dcop knotes KNotesIface killNote " + uid + " true"; 328 328 system((const char*)asdasd.local8Bit()); 329 osync_debug("knotes", 4, "Deleting note %s", (const char*)uid.local8Bit());329 // osync_debug("knotes", 4, "Deleting note %s", (const char*)uid.local8Bit()); 330 330 /*kn_iface->killNote(uid, true); 331 331 if (kn_iface->status() != DCOPStub::CallSucceeded) { -
plugins/kdepim/src/osyncbase.h
r1757 r1760 5 5 { 6 6 #include <opensync/opensync.h> 7 #include <opensync/opensync-plugin.h> 8 #include <opensync/opensync-context.h> 9 #include <opensync/opensync-data.h> 10 #include <opensync/opensync-helper.h> 7 11 } 12 13 typedef struct OSyncKDEEnv { 14 char *change_id; 15 OSyncObjTypeSink *contact_sink; 16 } OSyncKDEEnv; 8 17 /** Base class to OpenSync plugin. 9 18 * … … 32 41 }; 33 42 34 typedef KdePluginImplementationBase *(*KdeImplInitFunc)(OSync Member *m, OSyncError **e);43 typedef KdePluginImplementationBase *(*KdeImplInitFunc)(OSyncPlugin *plugin, OSyncPluginInfo *info, OSyncError **error); 35 44 36 45 #endif // KDEPIM_OSYNC_BASE_H
