summaryrefslogtreecommitdiffstats
path: root/kresources/exchange/resourceexchange.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-09-01 00:37:02 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-09-01 00:37:02 +0000
commitcc29364f06178f8f6b457384f2ec37a042bd9d43 (patch)
tree7c77a3184c698bbf9d98cef09fb1ba8124daceba /kresources/exchange/resourceexchange.cpp
parent4f6c584bacc8c3c694228f36ada3de77a76614a6 (diff)
downloadtdepim-cc29364f06178f8f6b457384f2ec37a042bd9d43.tar.gz
tdepim-cc29364f06178f8f6b457384f2ec37a042bd9d43.zip
* Massive set of changes to bring in all fixes and enhancements from the Enterprise PIM branch
* Ensured that the Trinity changes were applied on top of those enhancements, and any redundancy removed * Added journal read support to the CalDAV resource * Fixed CalDAV resource to use events URL for tasks and journals when separate URL checkbox unchecked git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1170461 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kresources/exchange/resourceexchange.cpp')
-rw-r--r--kresources/exchange/resourceexchange.cpp36
1 files changed, 29 insertions, 7 deletions
diff --git a/kresources/exchange/resourceexchange.cpp b/kresources/exchange/resourceexchange.cpp
index 8e877f9b0..82c0ab07d 100644
--- a/kresources/exchange/resourceexchange.cpp
+++ b/kresources/exchange/resourceexchange.cpp
@@ -91,6 +91,7 @@ ResourceExchange::ResourceExchange( const KConfig *config )
mCachedSeconds = config->readNumEntry( "ExchangeCacheTimeout", 600 );
mAutoMailbox = config->readBoolEntry( "ExchangeAutoMailbox", true );
} else {
+ setResourceName( i18n( "Exchange Server" ) );
mAccount = new ExchangeAccount( "", "", "", "" );
mCachedSeconds = 600;
}
@@ -248,19 +249,26 @@ void ResourceExchange::slotMonitorError( int errorCode, const TQString& moreInfo
}
-bool ResourceExchange::addEvent(Event *anEvent)
+bool ResourceExchange::addEvent( Event *event )
{
+ return addEvent( event, TQString() );
+}
+
+bool ResourceExchange::addEvent( Event *event, const TQString &subresource )
+{
+ Q_UNUSED( subresource ); //subresources are not supported
+
if( !mCache ) return false;
kdDebug() << "ResourceExchange::addEvent" << endl;
// FIXME: first check of upload finished successfully, only then
// add to cache
- mCache->addEvent( anEvent );
+ mCache->addEvent( event );
- uploadEvent( anEvent );
-// insertEvent(anEvent);
+ uploadEvent( event );
+// insertEvent( event );
- anEvent->registerObserver( this );
+ event->registerObserver( this );
// setModified( true );
return true;
@@ -341,8 +349,14 @@ void ResourceExchange::unsubscribeEvents( const TQDate &/*start*/, const TQDate
kdDebug() << "ResourceExchange::unsubscribeEvents()" << endl;
}
-bool ResourceExchange::addTodo(Todo */*todo*/)
+bool ResourceExchange::addTodo( Todo *todo )
+{
+ return addTodo( todo, TQString() );
+}
+
+bool ResourceExchange::addTodo( Todo */*todo*/, const TQString &subresource )
{
+ Q_UNUSED( subresource ); //subresources are not supported
// This resource doesn't handle todos yet!
return false;
/* if( !mCache)
@@ -356,6 +370,7 @@ bool ResourceExchange::addTodo(Todo */*todo*/)
return true;*/
}
+
bool ResourceExchange::deleteTodo(Todo */*todo*/)
{
// We don't handle todos yet
@@ -530,8 +545,15 @@ Event::List ResourceExchange::rawEvents( EventSortField sortField, SortDirection
return mCache->rawEvents( sortField, sortDirection );
}
-bool ResourceExchange::addJournal(Journal */*journal*/)
+bool ResourceExchange::addJournal( Journal *journal )
+{
+ return addJournal( journal, TQString() );
+}
+
+bool ResourceExchange::addJournal( Journal */*journal*/, const TQString &subresource )
{
+ Q_UNUSED( subresource ); //subresources are not supported
+
// This resource doesn't handle journals yet
return false;
/* kdDebug(5800) << "Adding Journal on " << journal->dtStart().toString() << endl;