1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771
|
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/qt4/Qt -I/usr/include/qt4
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
|