Hello community,
here is the log from the commit of package libopensync-plugin-kdepim
checked in at Fri Jul 7 04:02:53 CEST 2006.
--------
--- libopensync-plugin-kdepim/libopensync-plugin-kdepim.changes 2006-01-25 21:37:38.000000000 +0100
+++ libopensync-plugin-kdepim/libopensync-plugin-kdepim.changes 2006-07-06 14:48:56.000000000 +0200
@@ -1,0 +2,8 @@
+Thu Jul 6 13:52:10 CEST 2006 - dgollub@suse.de
+
+- update to version 0.18_SVN1095:
+ o internal plugin name change from kdepim to kdepim-sync
+ o added internal description of plugin
+ o fixed kdepim-sync crash
+
+-------------------------------------------------------------------
Old:
----
libopensync-plugin-kdepim-0.18_SVN770.tar.bz2
New:
----
libopensync-plugin-kdepim-0.18_SVN1095.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ libopensync-plugin-kdepim.spec ++++++
--- /var/tmp/diff_new_pack.xiTZU2/_old 2006-07-07 03:59:39.000000000 +0200
+++ /var/tmp/diff_new_pack.xiTZU2/_new 2006-07-07 03:59:39.000000000 +0200
@@ -1,21 +1,26 @@
#
-# spec file for package libopensync-plugin-kdepim (Version 0.18_SVN770)
+# spec file for package libopensync-plugin-kdepim (Version 0.18_SVN1095)
#
-# Copyright (c) 2005 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2006 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
-# Please submit bugfixes or comments via http://bugs.opensuse.org
+# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
# norootforbuild
Name: libopensync-plugin-kdepim
+# BuildRequires: kdelibs3-devel libopensync-devel xorg-x11
+%if 0%{?mandriva_version}
+BuildRequires: libkdecore4 libkdepim2-common-devel libopensync-devel xorg-x11
+%else
BuildRequires: kdelibs3-devel kdepim3-devel libopensync-devel xorg-x11
+%endif
URL: http://www.opensync.org
-Version: 0.18_SVN770
+Version: 0.18_SVN1095
Release: 1
-Summary: KDE PIM syncronisation plugin for OpenSync.
+Summary: KDE PIM Synchronization Plug-In for OpenSync
License: GPL
Group: Productivity/Other
Autoreqprov: on
@@ -25,10 +30,10 @@
%define prefix /usr
%description
-This plugin allows applications using OpenSync to synchronise to and
+This plug-in allows applications using OpenSync to synchronize to and
from KDE Addressbook.
-You need to install the libopensync-package, too.
+Additionally install the libopensync package.
@@ -39,14 +44,10 @@
%prep
%setup -q
-. /etc/opt/kde3/common_options
-%{?suse_update_config:%{suse_update_config -f . }}
-libtoolize --force
-autoreconf -sfi
-#does not build with this. removed it as first approach
-#update_admin --no-unsermake
%build
+. /etc/opt/kde3/common_options
+autoreconf -sfi
CFLAGS="$RPM_OPT_FLAGS" ./configure --prefix=%{_prefix} --libdir=%{_libdir} \
%if "%_lib" != "lib"
--enable-libsuffix=64 \
@@ -64,19 +65,23 @@
%clean
rm -rf $RPM_BUILD_ROOT
-%post
-%run_ldconfig
+%post -p /sbin/ldconfig
-%postun
-%run_ldconfig
+%postun -p /sbin/ldconfig
%files
%defattr(-, root, root)
%{_libdir}/opensync/plugins/kdepim_lib.so
%{_libdir}/opensync/plugins/kdepim_sync.so
+%{_datadir}/opensync/defaults/kdepim-sync
%doc AUTHORS COPYING INSTALL ChangeLog NEWS README
%changelog -n libopensync-plugin-kdepim
+* Thu Jul 06 2006 - dgollub@suse.de
+- update to version 0.18_SVN1095:
+ o internal plugin name change from kdepim to kdepim-sync
+ o added internal description of plugin
+ o fixed kdepim-sync crash
* Wed Jan 25 2006 - mls@suse.de
- converted neededforbuild to BuildRequires
* Mon Dec 12 2005 - dgollub@suse.de
++++++ libopensync-plugin-kdepim-0.18_SVN770.tar.bz2 -> libopensync-plugin-kdepim-0.18_SVN1095.tar.bz2 ++++++
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libopensync-plugin-kdepim-0.18_SVN770/Makefile.am new/libopensync-plugin-kdepim-0.18_SVN1095/Makefile.am
--- old/libopensync-plugin-kdepim-0.18_SVN770/Makefile.am 2005-04-19 16:18:32.000000000 +0200
+++ new/libopensync-plugin-kdepim-0.18_SVN1095/Makefile.am 2006-01-31 22:36:35.000000000 +0100
@@ -2,6 +2,7 @@
SUBDIRS = tests
plugindir=@OPENSYNC_PLUGINDIR@
+configdir=@OPENSYNC_CONFIGDIR@
INCLUDES = $(OSYNC_CFLAGS) $(XML_CFLAGS) $(GLIB_CFLAGS) $(KDE_INCLUDES) $(QT_INCLUDES) -I$(top_srcdir)
# KDE has broken classes so -Werror cannot be used (lots of non-virtual
@@ -11,6 +12,8 @@
#FIXME: Is there a KDE macro to set this?
LIB_KCAL = -lkcal
+config_DATA = src/kdepim-sync
+
plugin_LTLIBRARIES = kdepim_sync.la kdepim_lib.la
EXTRA_DIST = \
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libopensync-plugin-kdepim-0.18_SVN770/README new/libopensync-plugin-kdepim-0.18_SVN1095/README
--- old/libopensync-plugin-kdepim-0.18_SVN770/README 2005-01-26 21:34:37.000000000 +0100
+++ new/libopensync-plugin-kdepim-0.18_SVN1095/README 2006-05-28 01:54:12.000000000 +0200
@@ -12,8 +12,8 @@
Compiling and installing kdepim_plugin
--------------------------------------
- $ cd kdepim_plugin
- $ ./autogen.sh
+ $ autoreconf -sfi
+ $ ./configure
$ make
$ su
$ make install
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libopensync-plugin-kdepim-0.18_SVN770/src/kaddrbook.cpp new/libopensync-plugin-kdepim-0.18_SVN1095/src/kaddrbook.cpp
--- old/libopensync-plugin-kdepim-0.18_SVN770/src/kaddrbook.cpp 2005-09-02 21:40:34.000000000 +0200
+++ new/libopensync-plugin-kdepim-0.18_SVN1095/src/kaddrbook.cpp 2006-01-31 20:04:12.000000000 +0100
@@ -124,7 +124,7 @@
QString hash = calc_hash(*it);
// Convert the VCARD data into a string
- QString tmp = converter.createVCard(*it);
+ QString tmp = converter.createVCard(*it, KABC::VCardConverter::v2_1);
char *data = strdup((const char *)tmp.utf8());
osync_change_set_data(chg, data, strlen(data) + 1, TRUE);
@@ -149,18 +149,6 @@
return true;
}
-/*void kabc_get_data(OSyncContext *ctx, OSyncChange *chg)
-{
- QString uid = osync_change_get_uid(chg);
- KABC::Addressee a = addressbookptr->findByUid(uid);
- KABC::VCardConverter converter;
- QCString card = converter.createVCard(a).utf8();
- const char *data = card;
- //FIXME: deallocate data somewhere
- osync_change_set_data(chg, strdup(data), strlen(data), 1);
- osync_context_report_success(ctx);
-}*/
-
/** vcard access method
*
* This method is used by both access() and commit_change() method,
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libopensync-plugin-kdepim-0.18_SVN770/src/kcal.cpp new/libopensync-plugin-kdepim-0.18_SVN1095/src/kcal.cpp
--- old/libopensync-plugin-kdepim-0.18_SVN770/src/kcal.cpp 2005-10-04 22:07:29.000000000 +0200
+++ new/libopensync-plugin-kdepim-0.18_SVN1095/src/kcal.cpp 2006-05-19 21:39:55.000000000 +0200
@@ -187,14 +187,12 @@
case CHANGE_ADDED:
case CHANGE_MODIFIED:
{
- printf("Adding\n");
KCal::ICalFormat format;
/* First, parse to a temporary calendar, because
* we should set the uid on the events
*/
- printf("Adding1\n");
KCal::CalendarLocal cal(QString::fromLatin1( "UTC" ));
QString data = QString::fromUtf8(osync_change_get_data(chg), osync_change_get_datasize(chg));
if (!format.fromString(&cal, data)) {
@@ -202,7 +200,6 @@
return false;
}
- printf("Adding2 %p\n", calendar);
/*FIXME: The event/to-do will be overwritten. But I can't differentiate
* between a field being removed and a missing field because
* the other device don't support them, because OpenSync currently
@@ -218,7 +215,6 @@
*
* We iterate over the list, but it should have only one event.
*/
- printf("Adding3\n");
KCal::Incidence::List evts = cal.incidences();
for (KCal::Incidence::List::ConstIterator i = evts.begin(); i != evts.end(); i++) {
KCal::Incidence *e = (*i)->clone();
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libopensync-plugin-kdepim-0.18_SVN770/src/kdepim-sync new/libopensync-plugin-kdepim-0.18_SVN1095/src/kdepim-sync
--- old/libopensync-plugin-kdepim-0.18_SVN770/src/kdepim-sync 1970-01-01 01:00:00.000000000 +0100
+++ new/libopensync-plugin-kdepim-0.18_SVN1095/src/kdepim-sync 2006-01-31 22:36:35.000000000 +0100
@@ -0,0 +1 @@
+<config></config>
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libopensync-plugin-kdepim-0.18_SVN770/src/kdepim_impl.cpp new/libopensync-plugin-kdepim-0.18_SVN1095/src/kdepim_impl.cpp
--- old/libopensync-plugin-kdepim-0.18_SVN770/src/kdepim_impl.cpp 2005-09-02 21:40:34.000000000 +0200
+++ new/libopensync-plugin-kdepim-0.18_SVN1095/src/kdepim_impl.cpp 2006-06-03 14:27:49.000000000 +0200
@@ -1,4 +1,4 @@
-/***********************************************************************
+/***********************************************************************
Actual implementation of the KDE PIM OpenSync plugin
Copyright (C) 2004 Conectiva S. A.
Based on code Copyright (C) 2004 Stewart Heitmann
@@ -11,13 +11,13 @@
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS.
IN NO EVENT SHALL THE COPYRIGHT HOLDER(S) AND AUTHOR(S) BE LIABLE FOR ANY
-CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES
-WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-ALL LIABILITY, INCLUDING LIABILITY FOR INFRINGEMENT OF ANY PATENTS,
-COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS, RELATING TO USE OF THIS
+ALL LIABILITY, INCLUDING LIABILITY FOR INFRINGEMENT OF ANY PATENTS,
+COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS, RELATING TO USE OF THIS
SOFTWARE IS DISCLAIMED.
*************************************************************************/
/**
@@ -37,7 +37,7 @@
#include
-#include
+#include
#include
#include "osyncbase.h"
@@ -48,241 +48,239 @@
class KdePluginImplementation: public KdePluginImplementationBase
{
- private:
- KCalDataSource *kcal;
- KNotesDataSource *knotes;
- KContactDataSource *kaddrbook;
-
- OSyncHashTable *hashtable;
- OSyncMember *member;
-
- KApplication *application;
-
-
- public:
- KdePluginImplementation(OSyncMember *memb)
- :member(memb)
- {
- }
-
- void initKDE() {
- if (sentinal) {
- return;
- }
-
- KAboutData aboutData(
- "libopensync-kdepim-plugin", // internal program name
- "OpenSync-KDE-plugin", // displayable program name.
- "0.1", // version string
- "OpenSync KDEPIM plugin", // short porgram description
- KAboutData::License_GPL, // license type
- "(c) 2005, Eduardo Pereira Habkost", // copyright statement
- 0, // any free form text
- "http://www.opensync.org", // program home page address
- "http://www.opensync.org/newticket" // bug report email address
- );
-
- KCmdLineArgs::init(&aboutData);
- application = new KApplication();
-
- sentinal = true;
- }
-
- bool init(OSyncError **error)
- {
- osync_trace(TRACE_ENTRY, "%s(%p)", __func__, error);
-
- initKDE();
-
- hashtable = osync_hashtable_new();
-
- kcal = new KCalDataSource(member, hashtable);
- knotes = new KNotesDataSource(member, hashtable);
- kaddrbook = new KContactDataSource(member, hashtable);
+ public:
+ KdePluginImplementation( OSyncMember *member )
+ : mMember( member ),
+ mApplication( 0 ),
+ mNewApplication( false )
+ {
+ }
+ void initKDE()
+ {
+ if (sentinal)
+ return;
+
+ KAboutData aboutData(
+ "libopensync-kdepim-plugin", // internal program name
+ "OpenSync-KDE-plugin", // displayable program name.
+ "0.1", // version string
+ "OpenSync KDEPIM plugin", // short porgram description
+ KAboutData::License_GPL, // license type
+ "(c) 2005, Eduardo Pereira Habkost", // copyright statement
+ 0, // any free form text
+ "http://www.opensync.org", // program home page address
+ "http://www.opensync.org/newticket" // bug report email address
+ );
+
+ KCmdLineArgs::init( &aboutData );
+ if ( kapp )
+ mApplication = kapp;
+ else {
+ mApplication = new KApplication( true, true );
+ mNewApplication = true;
+ }
+
+ sentinal = true;
+ }
+
+ bool init(OSyncError **error)
+ {
+ osync_trace(TRACE_ENTRY, "%s(%p)", __func__, error);
+
+ initKDE();
+
+ mHashtable = osync_hashtable_new();
+
+ mKcal = new KCalDataSource(mMember, mHashtable);
+ mKnotes = new KNotesDataSource(mMember, mHashtable);
+ mKaddrbook = new KContactDataSource(mMember, mHashtable);
+
+ osync_trace(TRACE_EXIT, "%s", __func__);
+ return true;
+ }
+
+ virtual ~KdePluginImplementation()
+ {
+ delete mKcal;
+ mKcal = 0;
+
+ delete mKnotes;
+ mKnotes = 0;
+
+ if ( mNewApplication ) {
+ delete mApplication;
+ mApplication = 0;
+ }
+
+ if ( mHashtable )
+ osync_hashtable_free(mHashtable);
+ }
+
+ virtual void connect(OSyncContext *ctx)
+ {
+ osync_trace(TRACE_ENTRY, "%s(%p)", __func__, ctx);
+
+ OSyncError *error = NULL;
+ if ( !osync_hashtable_load(mHashtable, mMember, &error) ) {
+ osync_context_report_osyncerror(ctx, &error);
+ osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(&error));
+ osync_error_free(&error);
+ return;
+ }
+
+
+ if (mKcal && (osync_member_objtype_enabled(mMember, "todo") ||
+ osync_member_objtype_enabled(mMember, "event")) && !mKcal->connect(ctx)) {
+ osync_trace(TRACE_EXIT_ERROR, "%s: Unable to open calendar", __func__);
+ return;
+ }
+
+ if (mKnotes && osync_member_objtype_enabled(mMember, "note") && \
+ !mKnotes->connect(ctx)) {
+ osync_trace(TRACE_EXIT_ERROR, "%s: Unable to open notes", __func__);
+ return;
+ }
+
+ if (mKaddrbook && osync_member_objtype_enabled(mMember, "contact") && \
+ !mKaddrbook->connect(ctx)) {
+ osync_trace(TRACE_EXIT_ERROR, "%s: Unable to open addressbook", __func__);
+ return;
+ }
+
+ osync_context_report_success(ctx);
osync_trace(TRACE_EXIT, "%s", __func__);
- return true;
- }
-
- virtual ~KdePluginImplementation()
- {
- if (kcal) {
- delete kcal;
- kcal = NULL;
- }
-
- if (knotes) {
- delete knotes;
- knotes = NULL;
- }
-
- /*if (application) {
- delete application;
- application = NULL;
- }*/
-
- if (hashtable)
- osync_hashtable_free(hashtable);
- }
-
- virtual void connect(OSyncContext *ctx)
- {
- osync_trace(TRACE_ENTRY, "%s(%p)", __func__, ctx);
-
- OSyncError *error = NULL;
- if (!osync_hashtable_load(hashtable, member, &error)) {
- osync_context_report_osyncerror(ctx, &error);
- osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(&error));
- osync_error_free(&error);
- return;
- }
-
-
- if (kcal && \
- (osync_member_objtype_enabled(member, "todo") || \
- osync_member_objtype_enabled(member, "event")) && \
- !kcal->connect(ctx)) {
- osync_trace(TRACE_EXIT_ERROR, "%s: Unable to open calendar", __func__);
- return;
- }
-
- if (knotes && \
- osync_member_objtype_enabled(member, "note") && \
- !knotes->connect(ctx)) {
- osync_trace(TRACE_EXIT_ERROR, "%s: Unable to open notes", __func__);
- return;
- }
-
- if (kaddrbook && \
- osync_member_objtype_enabled(member, "contact") && \
- !kaddrbook->connect(ctx)) {
- osync_trace(TRACE_EXIT_ERROR, "%s: Unable to open addressbook", __func__);
- return;
- }
-
- osync_context_report_success(ctx);
- osync_trace(TRACE_EXIT, "%s", __func__);
- }
-
- virtual void disconnect(OSyncContext *ctx)
- {
- osync_hashtable_close(hashtable);
-
- if (kcal && kcal->connected && !kcal->disconnect(ctx))
- return;
- if (knotes && knotes->connected && !knotes->disconnect(ctx))
- return;
- if (kaddrbook && kaddrbook->connected && !kaddrbook->disconnect(ctx))
- return;
-
- osync_context_report_success(ctx);
- }
-
- virtual void get_changeinfo(OSyncContext *ctx)
- {
- if (kaddrbook && kaddrbook->connected && !kaddrbook->contact_get_changeinfo(ctx))
- return;
-
- if (kcal && kcal->connected && !kcal->get_changeinfo_events(ctx))
- return;
-
- if (kcal && kcal->connected && !kcal->get_changeinfo_todos(ctx))
- return;
-
- if (knotes && knotes->connected && !knotes->get_changeinfo(ctx))
- return;
-
- osync_context_report_success(ctx);
- }
-
- virtual bool vcard_access(OSyncContext *ctx, OSyncChange *chg)
- {
- if (kaddrbook)
- return kaddrbook->vcard_access(ctx, chg);
- else {
- osync_context_report_error(ctx, OSYNC_ERROR_NOT_SUPPORTED, "No addressbook loaded");
- return false;
- }
- return true;
- }
-
- virtual bool vcard_commit_change(OSyncContext *ctx, OSyncChange *chg)
- {
- if (kaddrbook)
- return kaddrbook->vcard_commit_change(ctx, chg);
- else {
- osync_context_report_error(ctx, OSYNC_ERROR_NOT_SUPPORTED, "No addressbook loaded");
- return false;
- }
- return true;
- }
-
- virtual bool event_access(OSyncContext *ctx, OSyncChange *chg)
- {
- if (kcal)
- return kcal->event_access(ctx, chg);
- else {
- osync_context_report_error(ctx, OSYNC_ERROR_NOT_SUPPORTED, "No calendar loaded");
- return false;
- }
- return true;
- }
-
- virtual bool event_commit_change(OSyncContext *ctx, OSyncChange *chg)
- {
- if (kcal)
- return kcal->event_commit_change(ctx, chg);
- else {
- osync_context_report_error(ctx, OSYNC_ERROR_NOT_SUPPORTED, "No calendar loaded");
- return false;
- }
- return true;
- }
-
- virtual bool todo_access(OSyncContext *ctx, OSyncChange *chg)
- {
- if (kcal)
- return kcal->todo_access(ctx, chg);
- else {
- osync_context_report_error(ctx, OSYNC_ERROR_NOT_SUPPORTED, "No calendar loaded");
- return false;
- }
- return true;
- }
-
- virtual bool todo_commit_change(OSyncContext *ctx, OSyncChange *chg)
- {
- if (kcal)
- return kcal->todo_commit_change(ctx, chg);
- else {
- osync_context_report_error(ctx, OSYNC_ERROR_NOT_SUPPORTED, "No calendar loaded");
- return false;
- }
- return true;
- }
-
- virtual bool note_access(OSyncContext *ctx, OSyncChange *chg)
- {
- if (knotes)
- return knotes->access(ctx, chg);
- else {
- osync_context_report_error(ctx, OSYNC_ERROR_NOT_SUPPORTED, "No notes loaded");
- return false;
- }
- return true;
- }
-
- virtual bool note_commit_change(OSyncContext *ctx, OSyncChange *chg)
- {
- if (knotes)
- return knotes->commit_change(ctx, chg);
- else {
- osync_context_report_error(ctx, OSYNC_ERROR_NOT_SUPPORTED, "No notes loaded");
- return false;
- }
- return true;
- }
+ }
+
+ virtual void disconnect(OSyncContext *ctx)
+ {
+ osync_hashtable_close(mHashtable);
+
+ if (mKcal && mKcal->connected && !mKcal->disconnect(ctx))
+ return;
+ if (mKnotes && mKnotes->connected && !mKnotes->disconnect(ctx))
+ return;
+ if (mKaddrbook && mKaddrbook->connected && !mKaddrbook->disconnect(ctx))
+ return;
+
+ osync_context_report_success(ctx);
+ }
+
+ virtual void get_changeinfo(OSyncContext *ctx)
+ {
+ if (mKaddrbook && mKaddrbook->connected && !mKaddrbook->contact_get_changeinfo(ctx))
+ return;
+
+ if (mKcal && mKcal->connected && !mKcal->get_changeinfo_events(ctx))
+ return;
+
+ if (mKcal && mKcal->connected && !mKcal->get_changeinfo_todos(ctx))
+ return;
+
+ if (mKnotes && mKnotes->connected && !mKnotes->get_changeinfo(ctx))
+ return;
+ osync_context_report_success(ctx);
+ }
+
+ virtual bool vcard_access(OSyncContext *ctx, OSyncChange *chg)
+ {
+ if (mKaddrbook)
+ return mKaddrbook->vcard_access(ctx, chg);
+ else {
+ osync_context_report_error(ctx, OSYNC_ERROR_NOT_SUPPORTED, "No addressbook loaded");
+ return false;
+ }
+ return true;
+ }
+
+ virtual bool vcard_commit_change(OSyncContext *ctx, OSyncChange *chg)
+ {
+ if (mKaddrbook)
+ return mKaddrbook->vcard_commit_change(ctx, chg);
+ else {
+ osync_context_report_error(ctx, OSYNC_ERROR_NOT_SUPPORTED, "No addressbook loaded");
+ return false;
+ }
+ return true;
+ }
+
+ virtual bool event_access(OSyncContext *ctx, OSyncChange *chg)
+ {
+ if (mKcal)
+ return mKcal->event_access(ctx, chg);
+ else {
+ osync_context_report_error(ctx, OSYNC_ERROR_NOT_SUPPORTED, "No calendar loaded");
+ return false;
+ }
+ return true;
+ }
+
+ virtual bool event_commit_change(OSyncContext *ctx, OSyncChange *chg)
+ {
+ if (mKcal)
+ return mKcal->event_commit_change(ctx, chg);
+ else {
+ osync_context_report_error(ctx, OSYNC_ERROR_NOT_SUPPORTED, "No calendar loaded");
+ return false;
+ }
+ return true;
+ }
+
+ virtual bool todo_access(OSyncContext *ctx, OSyncChange *chg)
+ {
+ if (mKcal)
+ return mKcal->todo_access(ctx, chg);
+ else {
+ osync_context_report_error(ctx, OSYNC_ERROR_NOT_SUPPORTED, "No calendar loaded");
+ return false;
+ }
+ return true;
+ }
+
+ virtual bool todo_commit_change(OSyncContext *ctx, OSyncChange *chg)
+ {
+ if (mKcal)
+ return mKcal->todo_commit_change(ctx, chg);
+ else {
+ osync_context_report_error(ctx, OSYNC_ERROR_NOT_SUPPORTED, "No calendar loaded");
+ return false;
+ }
+ return true;
+ }
+
+ virtual bool note_access(OSyncContext *ctx, OSyncChange *chg)
+ {
+ if (mKnotes)
+ return mKnotes->access(ctx, chg);
+ else {
+ osync_context_report_error(ctx, OSYNC_ERROR_NOT_SUPPORTED, "No notes loaded");
+ return false;
+ }
+ return true;
+ }
+
+ virtual bool note_commit_change(OSyncContext *ctx, OSyncChange *chg)
+ {
+ if (mKnotes)
+ return mKnotes->commit_change(ctx, chg);
+ else {
+ osync_context_report_error(ctx, OSYNC_ERROR_NOT_SUPPORTED, "No notes loaded");
+ return false;
+ }
+ return true;
+ }
+
+ private:
+ KCalDataSource *mKcal;
+ KNotesDataSource *mKnotes;
+ KContactDataSource *mKaddrbook;
+
+ OSyncHashTable *mHashtable;
+ OSyncMember *mMember;
+
+ KApplication *mApplication;
+ bool mNewApplication;
};
@@ -290,13 +288,13 @@
KdePluginImplementationBase *new_KdePluginImplementation(OSyncMember *member, OSyncError **error)
{
- KdePluginImplementation *imp = new KdePluginImplementation(member);
- if (!imp->init(error)) {
- delete imp;
- return NULL;
- }
+ KdePluginImplementation *imp = new KdePluginImplementation(member);
+ if (!imp->init(error)) {
+ delete imp;
+ return 0;
+ }
- return imp;
+ return imp;
}
-}// extern "C"
+}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libopensync-plugin-kdepim-0.18_SVN770/src/kdepim_sync.cpp new/libopensync-plugin-kdepim-0.18_SVN1095/src/kdepim_sync.cpp
--- old/libopensync-plugin-kdepim-0.18_SVN770/src/kdepim_sync.cpp 2005-04-12 13:14:21.000000000 +0200
+++ new/libopensync-plugin-kdepim-0.18_SVN1095/src/kdepim_sync.cpp 2006-01-31 22:36:35.000000000 +0100
@@ -177,11 +177,12 @@
extern "C" {
void get_info(OSyncEnv *env)
{
- OSyncPluginInfo *info = osync_plugin_new_info(env);
+ OSyncPluginInfo *info = osync_plugin_new_info(env);
info->version = 1;
- info->name = "kdepim";
+ info->name = "kdepim-sync";
/*FIXME: i18n */
- info->description = "Plugin for the KDEPIM on KDE 3.x";
+ info->longname = "KDE Desktop";
+ info->description = "Plugin for the KDE 3.5 Desktop";
info->config_type = NO_CONFIGURATION;
info->functions.initialize = kde_initialize;
@@ -194,7 +195,7 @@
osync_plugin_accept_objformat(info, "contact", "vcard30", "kde");
osync_plugin_set_commit_objformat(info, "contact", "vcard30", kde_vcard_commit_change);
osync_plugin_set_access_objformat(info, "contact", "vcard30", kde_vcard_access);
- osync_plugin_accept_objformat(info, "contact", "vcard21", "kde");
+ osync_plugin_accept_objformat(info, "contact", "vcard21", "kde");
osync_plugin_set_commit_objformat(info, "contact", "vcard21", kde_vcard_commit_change);
osync_plugin_set_access_objformat(info, "contact", "vcard21", kde_vcard_access);
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libopensync-plugin-kdepim-0.18_SVN770/src/knotes.cpp new/libopensync-plugin-kdepim-0.18_SVN1095/src/knotes.cpp
--- old/libopensync-plugin-kdepim-0.18_SVN770/src/knotes.cpp 2005-09-15 21:37:06.000000000 +0200
+++ new/libopensync-plugin-kdepim-0.18_SVN1095/src/knotes.cpp 2006-05-19 21:39:55.000000000 +0200
@@ -104,7 +104,7 @@
static QString strip_html(QString input)
{
- printf("input is %s\n", (const char*)input.local8Bit());
+ osync_trace(TRACE_INTERNAL, "input is %s\n", (const char*)input.local8Bit());
QString output = NULL;
unsigned int i = 0;
int inbraces = 0;
@@ -119,7 +119,7 @@
if (!inbraces)
output += input[i];
}
- printf("output is %s\n", (const char*)output.stripWhiteSpace().local8Bit());
+ osync_trace(TRACE_INTERNAL, "output is %s\n", (const char*)output.stripWhiteSpace().local8Bit());
return output.stripWhiteSpace();
}
@@ -144,7 +144,7 @@
for (i = fNotes.begin(); i != fNotes.end(); i++) {
osync_debug("knotes", 4, "Note key: %s", (const char*)i.key().local8Bit());
osync_debug("knotes", 4, "Note summary: %s", (const char*)i.data().local8Bit());
- printf("reporting notes %s\n", (const char*)i.key().local8Bit());
+ osync_trace(TRACE_INTERNAL, "reporting notes %s\n", (const char*)i.key().local8Bit());
QString uid = i.key();
QString hash = NULL;
@@ -226,14 +226,14 @@
return false;
}
- printf("Getting note %s and %s\n", osync_change_get_printable(chg), osxml_find_node(root, "Summary"));
+ osync_trace(TRACE_INTERNAL, "Getting note %s and %s\n", osync_change_get_printable(chg), osxml_find_node(root, "Summary"));
QString summary = QString(osxml_find_node(root, "Summary"));
QString body = osxml_find_node(root, "Body");
QString hash;
switch (type) {
case CHANGE_ADDED:
- printf("addding new \"%s\" and \"%s\"\n", (const char*)summary.local8Bit(), (const char*)body.local8Bit());
+ osync_trace(TRACE_INTERNAL, "addding new \"%s\" and \"%s\"\n", (const char*)summary.local8Bit(), (const char*)body.local8Bit());
uid = kn_iface->newNote(summary, body);
if (kn_iface->status() != DCOPStub::CallSucceeded) {
osync_context_report_error(ctx, OSYNC_ERROR_GENERIC, "Unable to add new note");
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
---------------------------------------------------------------------
To unsubscribe, e-mail: opensuse-commit-unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit-help@opensuse.org