diff -ur libopensync-plugin-kdepim-0.22/AUTHORS libopensync-plugin-kdepim-0.22-kde4/AUTHORS --- libopensync-plugin-kdepim-0.22/AUTHORS 2007-03-27 13:49:57.000000000 +0200 +++ libopensync-plugin-kdepim-0.22-kde4/AUTHORS 2009-04-02 07:38:05.000000000 +0200 @@ -1,2 +1,4 @@ Stewart Heitmann <sheitmann@users.sourceforge.net> Eduardo Pereira Habkost <ehabkost@conectiva.com.br> + +Thomas Gillespie <tomjamesgillespie@googlemail.com> diff -ur libopensync-plugin-kdepim-0.22/configure.ac libopensync-plugin-kdepim-0.22-kde4/configure.ac --- libopensync-plugin-kdepim-0.22/configure.ac 2007-03-27 13:49:57.000000000 +0200 +++ libopensync-plugin-kdepim-0.22-kde4/configure.ac 2009-04-02 08:06:28.000000000 +0200 @@ -16,14 +16,14 @@ AC_DISABLE_STATIC AC_PROG_LIBTOOL -KDE_SET_PREFIX +dnl KDE_SET_PREFIX dnl for NLS support. Call them in this order! dnl WITH_NLS is for the po files -AM_KDE_WITH_NLS +dnl AM_KDE_WITH_NLS -KDE_USE_QT(3.0.0) -AC_PATH_KDE +dnl KDE_USE_QT(3.0.0) +dnl AC_PATH_KDE export PKG_CONFIG_PATH=${PKG_CONFIG_PATH}:/usr/lib/pkgconfig:$prefix/lib/pkgconfig:/usr/local/lib/pkgconfig pkg_modules="opensync-1.0" @@ -79,7 +79,7 @@ dnl PACKAGE set before AC_C_BIGENDIAN -AC_CHECK_KDEMAXPATHLEN +dnl AC_CHECK_KDEMAXPATHLEN AC_CONFIG_FILES([ Makefile src/Makefile tests/Makefile ]) AC_OUTPUT diff -ur libopensync-plugin-kdepim-0.22/src/kaddrbook.cpp libopensync-plugin-kdepim-0.22-kde4/src/kaddrbook.cpp --- libopensync-plugin-kdepim-0.22/src/kaddrbook.cpp 2007-03-27 13:49:57.000000000 +0200 +++ libopensync-plugin-kdepim-0.22-kde4/src/kaddrbook.cpp 2009-04-02 09:20:52.000000000 +0200 @@ -28,8 +28,8 @@ #include "kaddrbook.h" #include <kapplication.h> -#include <dcopclient.h> -#include <qdeepcopy.h> +//#include <dcopclient.h> +//#include <qdeepcopy.h> KContactDataSource::KContactDataSource(OSyncMember *member, OSyncHashTable *hashtable) : converter(new VCardConverter()), hashtable(hashtable), member(member), connected(false) { @@ -64,7 +64,7 @@ { osync_trace(TRACE_ENTRY, "%s(%p)", __func__, ctx); - DCOPClient *dcopc = KApplication::kApplication()->dcopClient(); +/* DCOPClient *dcopc = KApplication::kApplication()->dcopClient(); if (!dcopc) { osync_context_report_error(ctx, OSYNC_ERROR_INITIALIZATION, "Unable to initialize dcop client"); osync_trace(TRACE_EXIT_ERROR, "%s: Unable to initialize dcop client", __func__); @@ -72,6 +72,7 @@ } QString appId = dcopc->registerAs("opensync-kaddrbook"); +*/ //get a handle to the standard KDE addressbook addressbookptr = StdAddressBook::self(true); @@ -146,7 +147,7 @@ QString uid = a->uid(); osync_change_set_member(chg, member); - osync_change_set_uid(chg, uid.local8Bit()); + osync_change_set_uid(chg, uid.toLocal8Bit()); QString hash = calc_hash(*a); @@ -154,7 +155,7 @@ // only vcard3.0 exports Categories QString tmp = converter->createVCard(*a, VCardConverter::v3_0); - char *data = strdup((const char *)tmp.utf8()); + char *data = strdup((const char *)tmp.toUtf8()); osync_trace(TRACE_SENSITIVE,"\n%s", data); @@ -164,7 +165,7 @@ osync_change_set_objtype_string(chg, "contact"); osync_change_set_objformat_string(chg, "vcard30"); - osync_change_set_hash(chg, hash.data()); + osync_change_set_hash(chg, hash.toUtf8()); return (chg); } @@ -223,7 +224,7 @@ OSyncChangeType chtype = osync_change_get_changetype(chg); switch(chtype) { case CHANGE_MODIFIED: { - Addressee addressee = converter->parseVCard(QString::fromUtf8(data, data_size)); + Addressee addressee = converter->parseVCard(QByteArray(data, data_size)); // ensure it has the correct UID and revision addressee.setUid(uid); @@ -234,12 +235,12 @@ addressbookptr->insertAddressee(addressee); QString hash = calc_hash(addressee); - osync_change_set_hash(chg, hash); - osync_debug("kde", 3, "KDE ADDRESSBOOK ENTRY UPDATED (UID=%s)", (const char *)uid.local8Bit()); + osync_change_set_hash(chg, hash.toUtf8()); + osync_debug("kde", 3, "KDE ADDRESSBOOK ENTRY UPDATED (UID=%s)", (const char *)uid.toLocal8Bit()); break; } case CHANGE_ADDED: { - Addressee addressee = converter->parseVCard(QString::fromUtf8(data, data_size)); + Addressee addressee = converter->parseVCard(QByteArray(data, data_size)); // ensure it has the correct revision addressee.setRevision(QDateTime::currentDateTime()); @@ -247,11 +248,11 @@ // add the new address to the addressbook addressbookptr->insertAddressee(addressee); - osync_change_set_uid(chg, addressee.uid().local8Bit()); + osync_change_set_uid(chg, addressee.uid().toLocal8Bit()); QString hash = calc_hash(addressee); - osync_change_set_hash(chg, hash); - osync_debug("kde", 3, "KDE ADDRESSBOOK ENTRY ADDED (UID=%s)", (const char *)addressee.uid().local8Bit()); + osync_change_set_hash(chg, hash.toUtf8()); + osync_debug("kde", 3, "KDE ADDRESSBOOK ENTRY ADDED (UID=%s)", (const char *)addressee.uid().toLocal8Bit()); break; } case CHANGE_DELETED: { @@ -266,7 +267,7 @@ if(!addressee.isEmpty()) addressbookptr->removeAddressee(addressee); - osync_debug("kde", 3, "KDE ADDRESSBOOK ENTRY DELETED (UID=%s)", (const char*)uid.local8Bit()); + osync_debug("kde", 3, "KDE ADDRESSBOOK ENTRY DELETED (UID=%s)", (const char*)uid.toLocal8Bit()); break; } diff -ur libopensync-plugin-kdepim-0.22/src/kcal.cpp libopensync-plugin-kdepim-0.22-kde4/src/kcal.cpp --- libopensync-plugin-kdepim-0.22/src/kcal.cpp 2007-03-27 13:49:57.000000000 +0200 +++ libopensync-plugin-kdepim-0.22-kde4/src/kcal.cpp 2009-04-02 09:04:50.000000000 +0200 @@ -26,7 +26,7 @@ #include "kcal.h" #include <kapplication.h> -#include <dcopclient.h> +//#include <dcopclient.h> KCalDataSource::KCalDataSource(OSyncMember *member, OSyncHashTable *hashtable) : hashtable(hashtable), member(member) @@ -36,6 +36,7 @@ bool KCalDataSource::connect(OSyncContext *ctx) { +/* DCOPClient *dcopc = KApplication::kApplication()->dcopClient(); if (!dcopc) { osync_context_report_error(ctx, OSYNC_ERROR_INITIALIZATION, "Unable to initialize dcop client"); @@ -52,19 +53,14 @@ osync_trace(TRACE_EXIT_ERROR, "%s: KOrganizer is running", __func__); return false; } - +*/ calendar = new KCal::CalendarResources(QString::fromLatin1( "UTC" )); if (!calendar) { osync_context_report_error(ctx, OSYNC_ERROR_GENERIC, "Can't open KDE calendar"); return false; } -#if KDE_IS_VERSION(3,3,0) - /* On KDE 3.2, there was no readConfig() and load(): the data - * was loaded automatically on the CalendarResources() constructor - */ calendar->readConfig(); calendar->load(); -#endif //Detection mechanismn if this is the first sync if (osync_member_objtype_enabled(member, "event") @@ -98,9 +94,9 @@ static QString calc_hash(const KCal::Incidence *e) { - QDateTime d = e->lastModified(); + KDateTime d = e->lastModified(); if (!d.isValid()) { - d = QDateTime::currentDateTime(); + d = KDateTime::currentLocalDateTime(); //e->setLastModified(&d); } /*FIXME: not i18ned string */ @@ -122,17 +118,17 @@ /* Build a local calendar for the incidence data */ KCal::CalendarLocal cal(calendar->timeZoneId()); - osync_debug("kcal", 3, "timezoneid: %s\n", (const char*)cal.timeZoneId().local8Bit()); + osync_debug("kcal", 3, "timezoneid: %s\n", (const char*)cal.timeZoneId().toLocal8Bit()); cal.addIncidence(e->clone()); /* Convert the data to vcalendar */ KCal::ICalFormat format; - QCString datastr = format.toString(&cal).utf8(); + QByteArray datastr = format.toString(&cal).toUtf8(); const char *data = datastr; - osync_debug("kcal", 3, "UID: %s\n", (const char*)uid.local8Bit()); + osync_debug("kcal", 3, "UID: %s\n", (const char*)uid.toLocal8Bit()); OSyncChange *chg = osync_change_new(); - osync_change_set_uid(chg, uid.local8Bit()); + osync_change_set_uid(chg, uid.toLocal8Bit()); osync_change_set_member(chg, member); // object type and format @@ -142,7 +138,7 @@ // Use the hash table to check if the object // needs to be reported - osync_change_set_hash(chg, hash.data()); + osync_change_set_hash(chg, hash.toUtf8()); if (osync_hashtable_detect_change(hashtable, chg)) { osync_context_report_change(ctx, chg); osync_hashtable_update_hash(hashtable, chg); @@ -191,7 +187,7 @@ } for (KCal::Todo::List::ConstIterator i = todos.begin(); i != todos.end(); i++) { - osync_debug("kcal", 3, "%p: doesFloat: %d", *i, (*i)->doesFloat()); + osync_debug("kcal", 3, "%p: doesFloat: %d", *i, (*i)->allDay()); if (!report_incidence(ctx, *i, "todo", "vtodo20")) return false; } @@ -261,12 +257,12 @@ e->setUid(osync_change_get_uid(chg)); osync_debug("kcal", 3, "Writing incidence: uid: %s, summary: %s", - (const char*)e->uid().local8Bit(), (const char*)e->summary().local8Bit()); + (const char*)e->uid().toLocal8Bit(), (const char*)e->summary().toLocal8Bit()); - QString c_uid = e->uid().utf8(); - osync_change_set_uid(chg, (const char*)c_uid); + QString c_uid = e->uid().toUtf8(); + osync_change_set_uid(chg, (const char*)c_uid.toUtf8()); QString hash = calc_hash(*i); - osync_change_set_hash(chg, hash); + osync_change_set_hash(chg, hash.toUtf8()); calendar->addIncidence(e); } break; diff -ur libopensync-plugin-kdepim-0.22/src/kcal.h libopensync-plugin-kdepim-0.22-kde4/src/kcal.h --- libopensync-plugin-kdepim-0.22/src/kcal.h 2007-03-27 13:49:57.000000000 +0200 +++ libopensync-plugin-kdepim-0.22-kde4/src/kcal.h 2009-04-02 07:38:24.000000000 +0200 @@ -23,10 +23,10 @@ * @autor Eduardo Pereira Habkost <ehabkost@conectiva.com.br> */ -#include <libkcal/calendarresources.h> -#include <libkcal/incidence.h> -#include <libkcal/icalformat.h> -#include <libkcal/calendarlocal.h> +#include <kcal/calendarresources.h> +#include <kcal/incidence.h> +#include <kcal/icalformat.h> +#include <kcal/calendarlocal.h> #include <kdeversion.h> #include "osyncbase.h" diff -ur libopensync-plugin-kdepim-0.22/src/kdepim_impl.cpp libopensync-plugin-kdepim-0.22-kde4/src/kdepim_impl.cpp --- libopensync-plugin-kdepim-0.22/src/kdepim_impl.cpp 2007-03-27 13:49:57.000000000 +0200 +++ libopensync-plugin-kdepim-0.22-kde4/src/kdepim_impl.cpp 2009-04-02 07:54:32.000000000 +0200 @@ -27,14 +27,14 @@ -#include <libkcal/resourcecalendar.h> -#include <kinstance.h> +#include <kcal/resourcecalendar.h> +//#include <kinstance.h> #include <klocale.h> #include <kapplication.h> #include <kcmdlineargs.h> #include <kaboutdata.h> -#include <qsignal.h> +//#include <qsignal.h> #include <qfile.h> @@ -61,22 +61,23 @@ 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 + QByteArray("libopensync-kdepim-plugin"), // internal program name + QByteArray(""), + ki18n("Opensync kdepim plugin"), // displayable name + QByteArray("0.22-kde4"), + ki18n("Sync kdepim with opensync"), // short program 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 + ki18n("(c) 2005, Eduardo Pereira Habkost, (c)"), // copyright statement + ki18n(""), // any free form text + QByteArray("http://www.opensync.org"), // program home page address + QByteArray("http://www.opensync.org") ); KCmdLineArgs::init( &aboutData ); if ( kapp ) mApplication = kapp; else { - mApplication = new KApplication( true, true ); + mApplication = new KApplication( true ); mNewApplication = true; } @@ -92,7 +93,7 @@ mHashtable = osync_hashtable_new(); mKcal = new KCalDataSource(mMember, mHashtable); - mKnotes = new KNotesDataSource(mMember, mHashtable); + // mKnotes = new KNotesDataSource(mMember, mHashtable); mKaddrbook = new KContactDataSource(mMember, mHashtable); osync_trace(TRACE_EXIT, "%s", __func__); @@ -104,8 +105,8 @@ delete mKcal; mKcal = 0; - delete mKnotes; - mKnotes = 0; + // delete mKnotes; + // mKnotes = 0; if ( mNewApplication ) { delete mApplication; @@ -135,11 +136,11 @@ return; } - if (mKnotes && osync_member_objtype_enabled(mMember, "note") && \ +/* 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)) { @@ -157,8 +158,8 @@ if (mKcal && mKcal->connected && !mKcal->disconnect(ctx)) return; - if (mKnotes && mKnotes->connected && !mKnotes->disconnect(ctx)) - return; +// if (mKnotes && mKnotes->connected && !mKnotes->disconnect(ctx)) +// return; if (mKaddrbook && mKaddrbook->connected && !mKaddrbook->disconnect(ctx)) return; @@ -185,10 +186,10 @@ osync_anchor_update(mMember, "todo", "true"); } - if (mKnotes && mKnotes->connected) +/* if (mKnotes && mKnotes->connected) { osync_anchor_update(mMember, "note", "true"); - } + }*/ osync_context_report_success(ctx); } @@ -208,8 +209,8 @@ !mKcal->get_changeinfo_todos(ctx)) return; - if (mKnotes && mKnotes->connected && !mKnotes->get_changeinfo(ctx)) - return; +// if (mKnotes && mKnotes->connected && !mKnotes->get_changeinfo(ctx)) +// return; osync_context_report_success(ctx); } @@ -282,9 +283,9 @@ virtual bool note_access(OSyncContext *ctx, OSyncChange *chg) { - if (mKnotes) +/* if (mKnotes) return mKnotes->access(ctx, chg); - else { + else */ { osync_context_report_error(ctx, OSYNC_ERROR_NOT_SUPPORTED, "No notes loaded"); return false; } @@ -293,9 +294,9 @@ virtual bool note_commit_change(OSyncContext *ctx, OSyncChange *chg) { - if (mKnotes) +/* if (mKnotes) return mKnotes->commit_change(ctx, chg); - else { + else */ { osync_context_report_error(ctx, OSYNC_ERROR_NOT_SUPPORTED, "No notes loaded"); return false; } @@ -304,7 +305,7 @@ private: KCalDataSource *mKcal; - KNotesDataSource *mKnotes; + // KNotesDataSource *mKnotes; KContactDataSource *mKaddrbook; OSyncHashTable *mHashtable; diff -ur libopensync-plugin-kdepim-0.22/src/kdepim_sync.cpp libopensync-plugin-kdepim-0.22-kde4/src/kdepim_sync.cpp --- libopensync-plugin-kdepim-0.22/src/kdepim_sync.cpp 2007-03-27 13:49:57.000000000 +0200 +++ libopensync-plugin-kdepim-0.22-kde4/src/kdepim_sync.cpp 2009-04-02 08:22:37.000000000 +0200 @@ -49,7 +49,7 @@ osync_debug("kde", 3, "%s", __FUNCTION__); osync_debug("kde", 3, "Loading implementation module"); - module = dlopen(KDEPIM_LIBDIR"/kdepim_lib.so", RTLD_NOW); + module = dlopen(KDEPIM_LIBDIR"/kdepim_lib.so", RTLD_NOW | RTLD_DEEPBIND); if (!module) { osync_error_set(e, OSYNC_ERROR_INITIALIZATION, "Can't load plugin implementation module from %s: %s", KDEPIM_LIBDIR"/kdepim_lib.so", dlerror()); @@ -191,7 +191,7 @@ info->name = "kdepim-sync"; /*FIXME: i18n */ info->longname = "KDE Desktop"; - info->description = "Plugin for the KDE 3.5 Desktop"; + info->description = "Plugin for the KDE 4 Desktop"; info->config_type = NO_CONFIGURATION; info->functions.initialize = kde_initialize; diff -ur libopensync-plugin-kdepim-0.22/src/knotes.cpp libopensync-plugin-kdepim-0.22-kde4/src/knotes.cpp --- libopensync-plugin-kdepim-0.22/src/knotes.cpp 2007-03-27 13:49:57.000000000 +0200 +++ libopensync-plugin-kdepim-0.22-kde4/src/knotes.cpp 2009-04-02 07:58:48.000000000 +0200 @@ -33,8 +33,10 @@ #include "knotes.h" #include <glib.h> /*An adapted C++ implementation of RSA Data Securities MD5 algorithm.*/ -#include <kmdcodec.h> +// #include <kmdcodec.h> +///Wont work because we dont have dcop in kde4 (i dont think), port later +/* KNotesDataSource::KNotesDataSource(OSyncMember *m, OSyncHashTable *h) :member(m), hashtable(h) { @@ -57,7 +59,7 @@ osync_context_report_error(ctx, OSYNC_ERROR_INITIALIZATION, "Unable to attach dcop for knotes"); osync_trace(TRACE_EXIT_ERROR, "%s: Unable to attach dcop for knotes", __func__); return FALSE; - }*/ + }* / QString appId = kn_dcop->registerAs("opensync"); @@ -105,7 +107,7 @@ osync_context_report_error(ctx, OSYNC_ERROR_INITIALIZATION, "Unable to detach dcop for knotes"); osync_trace(TRACE_EXIT_ERROR, "%s: Unable to detach dcop for knotes", __func__); return FALSE; - }*/ + }* / //destroy dcop delete kn_iface; kn_iface = NULL; @@ -162,7 +164,7 @@ for (i = fNotes.begin(); i != fNotes.end(); i++) { /* XXX: don't report empty notes, knotes always * "keeps" at least one - */ + * / if (kn_iface->text(i.key()) == "") { osync_debug("knotes", 4, "Skipping empty note"); continue; @@ -230,7 +232,7 @@ * so it shouldn't call osync_context_report_success(). On success, * it should just return true and let the caller report success() to * OpenSync - */ + * / bool KNotesDataSource::__access(OSyncContext *ctx, OSyncChange *chg) { osync_trace(TRACE_ENTRY, "%s(%p, %p)", __func__, ctx, chg); @@ -332,7 +334,7 @@ osync_context_report_error(ctx, OSYNC_ERROR_GENERIC, "Unable to delete note"); osync_trace(TRACE_EXIT_ERROR, "%s: Unable to delete note", __func__); return false; - }*/ + }* / } osync_trace(TRACE_EXIT, "%s", __func__); @@ -363,3 +365,4 @@ osync_trace(TRACE_EXIT, "%s", __func__); return true; } +*/ diff -ur libopensync-plugin-kdepim-0.22/src/knotes.h libopensync-plugin-kdepim-0.22-kde4/src/knotes.h --- libopensync-plugin-kdepim-0.22/src/knotes.h 2007-03-27 13:49:57.000000000 +0200 +++ libopensync-plugin-kdepim-0.22-kde4/src/knotes.h 2009-04-02 07:59:41.000000000 +0200 @@ -32,10 +32,10 @@ #include <kapplication.h> #include <qmap.h> #include "KNotesIface.h" -#include "KNotesIface_stub.h" +//#include "KNotesIface_stub.h" #include <stdio.h> #include <qtimer.h> -#include <dcopclient.h> +//#include <dcopclient.h> #include <qstring.h> #include <qstringlist.h> @@ -54,6 +54,7 @@ /** KNotes access implementation interface */ +/* class KNotesDataSource { private: @@ -65,7 +66,7 @@ /** Ugly hack to restart KNotes if it * was running - */ + * / bool knotesWasRunning; /** access() method, used by commit() and access() @@ -73,7 +74,7 @@ * Returns true on succes, but don't send success reporting * to context, because the caller may need to do more * operations - */ + * / bool __access(OSyncContext *ctx, OSyncChange *chg); bool saveNotes(OSyncContext *ctx); public: @@ -83,21 +84,21 @@ * * On success, returns true, but doesn't call osync_context_report_success() * On error, returns false, after calling osync_context_report_error() - */ + * / bool connect(OSyncContext *ctx); /** disconnect() method * * On success, returns true, but doesn't call osync_context_report_success() * On error, returns false, after calling osync_context_report_error() - */ + * / bool disconnect(OSyncContext *ctx); /** get_changeinfo() method * * On success, returns true, but doesn't call osync_context_report_success() * On error, returns false, after calling osync_context_report_error() - */ + * / bool get_changeinfo(OSyncContext *ctx); void get_data(OSyncContext *ctx, OSyncChange *chg); @@ -106,14 +107,15 @@ * * On success, returns true, after calling osync_context_report_success() * On error, returns false, after calling osync_context_report_error() - */ + * / bool access(OSyncContext *ctx, OSyncChange *chg); /** commit_change() method * * On success, returns true, after calling osync_context_report_success() * On error, returns false, after calling osync_context_report_error() - */ + * / bool commit_change(OSyncContext *ctx, OSyncChange *chg); bool connected; }; +*/ diff -ur libopensync-plugin-kdepim-0.22/src/KNotesIface.h libopensync-plugin-kdepim-0.22-kde4/src/KNotesIface.h --- libopensync-plugin-kdepim-0.22/src/KNotesIface.h 2007-03-27 13:49:57.000000000 +0200 +++ libopensync-plugin-kdepim-0.22-kde4/src/KNotesIface.h 2009-04-02 07:38:22.000000000 +0200 @@ -25,9 +25,9 @@ #include <qstring.h> #include <qmap.h> -#include <dcopobject.h> - +//#include <dcopobject.h> +/* class KNotesIface : virtual public DCOPObject { K_DCOP @@ -38,7 +38,7 @@ * KNotes will choose an appropriate name * @param text the body of the new note * @return the new notes' id - */ + * / virtual QString newNote( const QString& name = QString::null, const QString& text = QString::null ) = 0; @@ -49,72 +49,72 @@ * @param name the name (title) of the new note, if it is empty, * KNotes will choose an appropriate name * @return the new notes' id - */ + * / virtual QString newNoteFromClipboard( const QString& name = QString::null ) = 0; /** * Show a note as if it had been selected from the "notes" menu. * @param noteId the id of the note to show - */ + * / virtual ASYNC showNote( const QString& noteId ) const = 0; /** * Hide a note. * @param noteId the id of the note to hide - */ + * / virtual ASYNC hideNote( const QString& noteId ) const = 0; /** * Deletes a note forever. * @param noteId the id of the note to kill - */ + * / virtual ASYNC killNote( const QString& noteId ) = 0; /** * Deletes a note forever. * @param noteId the id of the note to kill * @param force do not request confirmation - */ + * / virtual ASYNC killNote( const QString& noteId, bool force ) = 0; /** * Get all the notes including their ids. * @return a QMap that maps the id of a note to its name - */ + * / virtual QMap<QString,QString> notes() const = 0; /** * Changes the title/name of a note. * @param noteId the id of the note to be modified * @param newName the new title - */ + * / virtual ASYNC setName( const QString& noteId, const QString& newName ) = 0; /** * Sets the text of a note. This will delete the old text! * @param noteId the id of the note * @param newText the new text for the note - */ + * / virtual ASYNC setText( const QString& noteId, const QString& newText ) = 0; /** * Returns the title/name of a note. * @param noteId the id of the note in question * @return the name as a QString - */ + * / virtual QString name( const QString& noteId ) const = 0; /** * Returns the text of a note. * @param noteId the id of the note in question * @return the body as a QString - */ + * / virtual QString text( const QString& noteId ) const = 0; /** * This tells KNotes that a specific app has synchronized with all the notes. * @param app the app that has synced with KNotes - */ + * / virtual ASYNC sync( const QString& app ) = 0; /** @@ -123,7 +123,7 @@ * @param noteId the id of the note * @return true if the note is new, false if not or if the note does * not exist - */ + * / virtual bool isNew( const QString& app, const QString& noteId ) const = 0; /** @@ -132,8 +132,8 @@ * @param noteId the id of the note * @return true if modified (note that this will return true if the note is * new as well!) and false if the note is not modified or doesn't exist - */ + * / virtual bool isModified( const QString& app, const QString& noteId ) const = 0; }; - +*/ #endif diff -ur libopensync-plugin-kdepim-0.22/src/Makefile.am libopensync-plugin-kdepim-0.22-kde4/src/Makefile.am --- libopensync-plugin-kdepim-0.22/src/Makefile.am 2007-03-27 13:49:57.000000000 +0200 +++ libopensync-plugin-kdepim-0.22-kde4/src/Makefile.am 2009-04-02 08:25:15.000000000 +0200 @@ -1,12 +1,15 @@ plugindir=@OPENSYNC_PLUGINDIR@ configdir=@OPENSYNC_CONFIGDIR@ +KDE_INCLUDES = -I/usr/include/kde4 +QT_INCLUDES = -I/usr/include/Qt INCLUDES = $(OSYNC_CFLAGS) $(XML_CFLAGS) $(GLIB_CFLAGS) $(KDE_INCLUDES) $(QT_INCLUDES) -I$(top_srcdir) -I$(top_srcdir)/src # KDE has broken classes so -Werror cannot be used (lots of non-virtual # destructors in polymorphic classes). AM_CXXFLAGS = -Wall -#FIXME: Is there a KDE macro to set this? +KDE_LDFLAGS = -L/usr/lib`kde4-config --libsuffix`/kde4/devel +LIB_KABC = -lkabc LIB_KCAL = -lkcal config_DATA = kdepim-sync @@ -32,21 +35,9 @@ # ugly hack to make the c++ library work kdepim_sync_la_LIBADD = -lstdc++ @OSYNC_LIBS@ -$(srcdir)/kdepim_impl.cpp: KNotesIface_stub.h -KNotesIface_stub.cpp: KNotesIface_stub.h - -KNotesIface_stub.cpp: - dcopidl $(srcdir)/KNotesIface.h > KNotesIface.kidl - dcopidl2cpp KNotesIface.kidl -KNotesIface_stub.h: - dcopidl $(srcdir)/KNotesIface.h > KNotesIface.kidl - dcopidl2cpp KNotesIface.kidl - dist_kdepim_lib_la_SOURCES = \ kdepim_impl.cpp \ kcal.cpp \ - knotes.cpp \ kaddrbook.cpp -nodist_kdepim_lib_la_SOURCES = KNotesIface_stub.cpp kdepim_lib_la_LDFLAGS = $(KDE_LDFLAGS) -avoid-version -export-dynamic -module kdepim_lib_la_LIBADD = $(KDE_RPATH) $(LIB_KABC) $(LIB_KCAL) -L$(libdir) @OSYNC_LIBS@ -lopensync-xml