Darrell Anderson 13 years ago
commit 7e7abc11d5

@ -47,7 +47,7 @@ using namespace KCal;
ResourceCalDav* ResourceCalDavConfig::getCalDavResource(KRES::Resource* resource) {
ResourceCalDav *res = dynamic_cast<ResourceCalDav *>( resource );
if (!res) {
kdDebug() << "invalid resource type";
kdDebug() << "invalid resource type" << '\n';
}
return res;
@ -59,7 +59,7 @@ CalDavPrefs* ResourceCalDavConfig::getPrefs(ResourceCalDav* res) {
if (res) {
p = res->prefs();
if (!p) {
kdDebug() << "CalDAV: res->prefs() returned NULL";
kdDebug() << "CalDAV: res->prefs() returned NULL" << '\n';
}
}

@ -20,7 +20,7 @@
#include <tqmutex.h>
#define log(s) kdDebug() << s;
#define log(s) kdDebug() << s << '\n';
/*=========================================================================
| NAMESPACE

@ -69,7 +69,7 @@ Wallet* CalDavPrefs::getWallet() {
// the wallet is not marked as inaccessible
if (NULL == mWallet) {
kdDebug() << "creating wallet for " + mPrefix;
kdDebug() << "creating wallet for " + mPrefix << '\n';
mWallet = Wallet::openWallet(Wallet::NetworkWallet(), 0);
if (NULL == mWallet) {
@ -182,13 +182,13 @@ TQString CalDavPrefs::getusername() {
}
void CalDavPrefs::setRememberPassword(bool v) {
kdDebug() << "remember: " << v;
kdDebug() << "remember: " << v << '\n';
CalDavPrefsSkel::setRememberPassword(v);
if (!v) {
// we should not remember password. If there is one already stored, it must be removed.
kdDebug() << "removing password from wallet";
kdDebug() << "removing password from wallet" << '\n';
removePasswordFromWallet();
}
}

@ -54,7 +54,7 @@ public:
}
virtual ~CalDavPrefs() {
kdDebug() << "removing wallet";
kdDebug() << "removing wallet" << '\n';
removeWallet();
}

@ -44,26 +44,26 @@ void CalDavReader::cleanJournalsJob() {
}
int CalDavReader::runJob(runtime_info* RT) {
kdDebug() << "reader::run, url: " << url();
kdDebug() << "reader::run, url: " << url() << '\n';
response* result = caldav_get_response();
CALDAV_RESPONSE res = OK;
if ((OK == res) && (url() != "")) {
if (mGetAll) {
kdDebug() << "getting all objects";
kdDebug() << "getting all objects" << '\n';
res = caldav_getall_object(result, std::string(url().ascii()).c_str(), RT);
} else {
kdDebug() << "getting object from the specified time range";
kdDebug() << "getting object from the specified time range" << '\n';
res = caldav_get_object(result, mTimeStart.toTime_t(), mTimeEnd.toTime_t(), std::string(url().ascii()).c_str(), RT);
}
if (OK == res) {
kdDebug() << "success";
kdDebug() << "success" << '\n';
if (result->msg) {
mData = result->msg;
} else {
kdDebug() << "empty collection";
kdDebug() << "empty collection" << '\n';
// empty collection
mData = "";
}
@ -76,28 +76,28 @@ int CalDavReader::runJob(runtime_info* RT) {
}
int CalDavReader::runTasksJob(runtime_info* RT) {
kdDebug() << "reader::run, tasksUrl: " << tasksUrl();
kdDebug() << "reader::run, tasksUrl: " << tasksUrl() << '\n';
response* result = caldav_get_response();
CALDAV_RESPONSE tasksres = OK;
if ((OK == tasksres) && (tasksUrl() != "")) {
kdDebug() << "reader::run, url: " << tasksUrl();
kdDebug() << "reader::run, url: " << tasksUrl() << '\n';
if (mGetAll) {
kdDebug() << "getting all objects";
kdDebug() << "getting all objects" << '\n';
tasksres = caldav_tasks_getall_object(result, std::string(tasksUrl().ascii()).c_str(), RT);
} else {
kdDebug() << "getting object from the specified time range";
kdDebug() << "getting object from the specified time range" << '\n';
tasksres = caldav_tasks_get_object(result, mTimeStart.toTime_t(), mTimeEnd.toTime_t(), std::string(tasksUrl().ascii()).c_str(), RT);
}
if (OK == tasksres) {
kdDebug() << "success";
kdDebug() << "success" << '\n';
if (result->msg) {
mTasksData = result->msg;
} else {
kdDebug() << "empty collection";
kdDebug() << "empty collection" << '\n';
// empty collection
mTasksData = "";
}
@ -110,28 +110,28 @@ int CalDavReader::runTasksJob(runtime_info* RT) {
}
int CalDavReader::runJournalsJob(runtime_info* RT) {
kdDebug() << "reader::run, journalsUrl: " << journalsUrl();
kdDebug() << "reader::run, journalsUrl: " << journalsUrl() << '\n';
response* result = caldav_get_response();
CALDAV_RESPONSE journalsres = OK;
if ((OK == journalsres) && (journalsUrl() != "")) {
kdDebug() << "reader::run, url: " << journalsUrl();
kdDebug() << "reader::run, url: " << journalsUrl() << '\n';
if (mGetAll) {
kdDebug() << "getting all objects";
kdDebug() << "getting all objects" << '\n';
journalsres = caldav_tasks_getall_object(result, std::string(journalsUrl().ascii()).c_str(), RT);
} else {
kdDebug() << "getting object from the specified time range";
kdDebug() << "getting object from the specified time range" << '\n';
journalsres = caldav_tasks_get_object(result, mTimeStart.toTime_t(), mTimeEnd.toTime_t(), std::string(journalsUrl().ascii()).c_str(), RT);
}
if (OK == journalsres) {
kdDebug() << "success";
kdDebug() << "success" << '\n';
if (result->msg) {
mJournalsData = result->msg;
} else {
kdDebug() << "empty collection";
kdDebug() << "empty collection" << '\n';
// empty collection
mJournalsData = "";
}

@ -61,7 +61,7 @@ const int ResourceCalDav::DEFAULT_SAVE_POLICY = ResourceCached::SaveDelaye
| UTILITY
========================================================================*/
#define log(s) kdDebug() << identifier() << ": " << (s);
#define log(s) kdDebug() << identifier() << ": " << (s) << '\n';
/*=========================================================================
| CONSTRUCTOR / DESTRUCTOR

@ -50,24 +50,24 @@ int CalDavWriter::runJob(runtime_info* RT) {
int res = OK;
if ((OK == res) && (url() != "")) {
kdDebug() << "pushing added objects";
kdDebug() << "pushing added objects" << '\n';
res = pushObjects(mAdded, caldav_add_object, OK, RT);
if (OK == res) {
#ifdef USE_CALDAV_MODIFY
kdDebug() << "pushing changed objects";
kdDebug() << "pushing changed objects" << '\n';
res = pushObjects(mChanged, caldav_modify_object, OK, RT);
if (OK == res) {
kdDebug() << "pushing deleted objects";
kdDebug() << "pushing deleted objects" << '\n';
res = pushObjects(mDeleted, caldav_delete_object, OK, RT);
}
#else // if USE_CALDAV_MODIFY
kdDebug() << "pushing changed objects (delete)";
kdDebug() << "pushing changed objects (delete)" << '\n';
res = pushObjects(mChanged, caldav_delete_object, OK, RT);
if (OK == res) {
kdDebug() << "pushing changed objects (add)";
kdDebug() << "pushing changed objects (add)" << '\n';
res = pushObjects(mChanged, caldav_add_object, OK, RT);
if (OK == res) {
kdDebug() << "pushing deleted objects";
kdDebug() << "pushing deleted objects" << '\n';
res = pushObjects(mDeleted, caldav_delete_object, OK, RT);
}
}
@ -78,24 +78,24 @@ int CalDavWriter::runJob(runtime_info* RT) {
int tasksres = OK;
if ((OK == tasksres) && (tasksUrl() != "")) {
kdDebug() << "pushing added tasks objects";
kdDebug() << "pushing added tasks objects" << '\n';
tasksres = pushTasksObjects(mTasksAdded, caldav_add_object, OK, RT);
if (OK == tasksres) {
#ifdef USE_CALDAV_TASKS_MODIFY
kdDebug() << "pushing changed objects";
kdDebug() << "pushing changed objects" << '\n';
tasksres = pushTasksObjects(mTasksChanged, caldav_tasks_modify_object, OK, RT);
if (OK == tasksres) {
kdDebug() << "pushing deleted objects";
kdDebug() << "pushing deleted objects" << '\n';
tasksres = pushTasksObjects(mTasksDeleted, caldav_tasks_delete_object, OK, RT);
}
#else // if USE_CALDAV_TASKS_MODIFY
kdDebug() << "pushing changed objects (delete)";
kdDebug() << "pushing changed objects (delete)" << '\n';
tasksres = pushTasksObjects(mTasksChanged, caldav_tasks_delete_object, OK, RT);
if (OK == tasksres) {
kdDebug() << "pushing changed objects (add)";
kdDebug() << "pushing changed objects (add)" << '\n';
tasksres = pushTasksObjects(mTasksChanged, caldav_add_object, OK, RT);
if (OK == tasksres) {
kdDebug() << "pushing deleted objects";
kdDebug() << "pushing deleted objects" << '\n';
tasksres = pushTasksObjects(mTasksDeleted, caldav_tasks_delete_object, OK, RT);
}
}
@ -106,24 +106,24 @@ int CalDavWriter::runJob(runtime_info* RT) {
int journalsres = OK;
if ((OK == journalsres) && (tasksUrl() != "")) {
kdDebug() << "pushing added tasks objects";
kdDebug() << "pushing added tasks objects" << '\n';
journalsres = pushJournalsObjects(mJournalsAdded, caldav_add_object, OK, RT);
if (OK == journalsres) {
#ifdef USE_CALDAV_TASKS_MODIFY
kdDebug() << "pushing changed objects";
kdDebug() << "pushing changed objects" << '\n';
journalsres = pushJournalsObjects(mJournalsChanged, caldav_tasks_modify_object, OK, RT);
if (OK == journalsres) {
kdDebug() << "pushing deleted objects";
kdDebug() << "pushing deleted objects" << '\n';
journalsres = pushJournalsObjects(mJournalsDeleted, caldav_tasks_delete_object, OK, RT);
}
#else // if USE_CALDAV_TASKS_MODIFY
kdDebug() << "pushing changed objects (delete)";
kdDebug() << "pushing changed objects (delete)" << '\n';
journalsres = pushJournalsObjects(mJournalsChanged, caldav_tasks_delete_object, OK, RT);
if (OK == journalsres) {
kdDebug() << "pushing changed objects (add)";
kdDebug() << "pushing changed objects (add)" << '\n';
journalsres = pushJournalsObjects(mJournalsChanged, caldav_add_object, OK, RT);
if (OK == journalsres) {
kdDebug() << "pushing deleted objects";
kdDebug() << "pushing deleted objects" << '\n';
journalsres = pushJournalsObjects(mJournalsDeleted, caldav_tasks_delete_object, OK, RT);
}
}

@ -46,7 +46,7 @@ using namespace KABC;
ResourceCardDav* ResourceCardDavConfig::getCardDavResource(KRES::Resource* resource) {
ResourceCardDav *res = dynamic_cast<ResourceCardDav *>( resource );
if (!res) {
kdDebug() << "invalid resource type";
kdDebug() << "invalid resource type" << '\n';
}
return res;
@ -58,7 +58,7 @@ CardDavPrefs* ResourceCardDavConfig::getPrefs(ResourceCardDav* res) {
if (res) {
p = res->prefs();
if (!p) {
kdDebug() << "CardDAV: res->prefs() returned NULL";
kdDebug() << "CardDAV: res->prefs() returned NULL" << '\n';
}
}

@ -19,7 +19,7 @@
#include <tqmutex.h>
#define log(s) kdDebug() << s;
#define log(s) kdDebug() << s << '\n';
/*=========================================================================
| NAMESPACE

@ -68,7 +68,7 @@ Wallet* CardDavPrefs::getWallet() {
// the wallet is not marked as inaccessible
if (NULL == mWallet) {
kdDebug() << "creating wallet for " + mPrefix;
kdDebug() << "creating wallet for " + mPrefix << '\n';
mWallet = Wallet::openWallet(Wallet::NetworkWallet(), 0);
if (NULL == mWallet) {
@ -181,13 +181,13 @@ TQString CardDavPrefs::getusername() {
}
void CardDavPrefs::setRememberPassword(bool v) {
kdDebug() << "remember: " << v;
kdDebug() << "remember: " << v << '\n';
CardDavPrefsSkel::setRememberPassword(v);
if (!v) {
// we should not remember password. If there is one already stored, it must be removed.
kdDebug() << "removing password from wallet";
kdDebug() << "removing password from wallet" << '\n';
removePasswordFromWallet();
}
}

@ -53,7 +53,7 @@ public:
}
virtual ~CardDavPrefs() {
kdDebug() << "removing wallet";
kdDebug() << "removing wallet" << '\n';
removeWallet();
}

@ -33,23 +33,23 @@ void CardDavReader::cleanJob() {
}
int CardDavReader::runJob(runtime_info* RT) {
kdDebug() << "reader::run, url: " << url();
kdDebug() << "reader::run, url: " << url() << '\n';
response* result = carddav_get_response();
CARDDAV_RESPONSE res = OK;
kdDebug() << "getting all objects";
kdDebug() << "getting all objects" << '\n';
if (getUseURI() == false)
res = carddav_getall_object(result, std::string(url().ascii()).c_str(), RT);
else
res = carddav_getall_object_by_uri(result, std::string(url().ascii()).c_str(), RT);
if (OK == res) {
kdDebug() << "success";
kdDebug() << "success" << '\n';
if (result->msg) {
mData = result->msg;
} else {
kdDebug() << "empty collection";
kdDebug() << "empty collection" << '\n';
// empty collection
mData = "";
}

@ -61,7 +61,7 @@ const int ResourceCardDav::DEFAULT_SAVE_POLICY = ResourceCached::SaveDelay
| UTILITY
========================================================================*/
#define log(s) kdDebug() << identifier() << ": " << (s);
#define log(s) kdDebug() << identifier() << ": " << (s) << '\n';
/*=========================================================================
| CONSTRUCTOR / DESTRUCTOR

@ -47,17 +47,17 @@ int CardDavWriter::runJob(runtime_info* RT) {
int res = OK;
kdDebug() << "pushing added objects";
kdDebug() << "pushing added objects" << '\n';
res = pushObjects(mAdded, carddav_add_object, OK, RT);
if (OK == res) {
#ifdef USE_CARDDAV_MODIFY
kdDebug() << "pushing changed objects";
kdDebug() << "pushing changed objects" << '\n';
if (getUseURI() == false)
res = pushObjects(mChanged, carddav_modify_object, OK, RT);
else
res = pushObjects(mChanged, carddav_modify_object_by_uri, OK, RT);
if (OK == res) {
kdDebug() << "pushing deleted objects";
kdDebug() << "pushing deleted objects" << '\n';
while (mDeleted.contains("BEGIN:VCARD", TRUE) > 0) {
int endLocation = mDeleted.find("END:VCARD", 0, TRUE);
TQString deletedCurSeq = mDeleted.mid(0, endLocation+9);
@ -69,19 +69,19 @@ int CardDavWriter::runJob(runtime_info* RT) {
}
}
#else // if USE_CARDDAV_MODIFY
kdDebug() << "pushing changed objects (delete)";
kdDebug() << "pushing changed objects (delete)" << '\n';
if (getUseURI() == false)
res = pushObjects(mChanged, carddav_delete_object, OK, RT);
else
res = pushObjects(mChanged, carddav_delete_object_by_uri, OK, RT);
if (OK == res) {
kdDebug() << "pushing changed objects (add)";
kdDebug() << "pushing changed objects (add)" << '\n';
if (getUseURI() == false)
res = pushObjects(mChanged, carddav_add_object, OK, RT);
else
res = pushObjects(mChanged, carddav_add_object, OK, RT);
if (OK == res) {
kdDebug() << "pushing deleted objects";
kdDebug() << "pushing deleted objects" << '\n';
while (mDeleted.contains("BEGIN:VCARD", TRUE) > 0) {
int endLocation = mDeleted.find("END:VCARD", 0, TRUE);
TQString deletedCurSeq = mDeleted.mid(0, endLocation+9);

Loading…
Cancel
Save