summaryrefslogtreecommitdiffstats
path: root/kitchensync/libqopensync/syncmapping.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-09-08 01:37:34 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-09-08 01:37:34 +0000
commitd4f48636cc2631625434326e146d04f503d0247a (patch)
treea371a2337bddce3de3fa3fcac52275a8204570d9 /kitchensync/libqopensync/syncmapping.cpp
parentd8b40941f9d1a221add0b9094eb09405a91a8aab (diff)
downloadtdepim-d4f48636cc2631625434326e146d04f503d0247a.tar.gz
tdepim-d4f48636cc2631625434326e146d04f503d0247a.zip
Reverse OpenSync patch as it causes a build failure on Debian
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1172771 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kitchensync/libqopensync/syncmapping.cpp')
-rw-r--r--kitchensync/libqopensync/syncmapping.cpp43
1 files changed, 18 insertions, 25 deletions
diff --git a/kitchensync/libqopensync/syncmapping.cpp b/kitchensync/libqopensync/syncmapping.cpp
index d716af17a..95939ab85 100644
--- a/kitchensync/libqopensync/syncmapping.cpp
+++ b/kitchensync/libqopensync/syncmapping.cpp
@@ -20,20 +20,19 @@
*/
#include <tqstring.h>
-#include <opensync/opensync.h>
-#include <opensync/opensync-engine.h>
+#include <osengine/engine.h>
#include "syncmapping.h"
using namespace QSync;
SyncMapping::SyncMapping()
- : mEngine( 0 ), mMappingEngine( 0 )
+ : mEngine( 0 ), mMapping( 0 )
{
}
-SyncMapping::SyncMapping( OSyncMappingEngine *mapping, OSyncEngine *engine )
- : mEngine( engine ), mMappingEngine( mapping )
+SyncMapping::SyncMapping( OSyncMapping *mapping, OSyncEngine *engine )
+ : mEngine( engine ), mMapping( mapping )
{
}
@@ -43,64 +42,58 @@ SyncMapping::~SyncMapping()
bool SyncMapping::isValid() const
{
- return ( mEngine != 0 && mMappingEngine != 0 );
+ return ( mEngine != 0 && mMapping != 0 );
}
-/*
long long SyncMapping::id() const
{
- Q_ASSERT( mMappingEngine );
+ Q_ASSERT( mMapping );
- return osync_mapping_engine_get_id( mMappingEngine );
+ return osengine_mapping_get_id( mMapping );
}
-*/
void SyncMapping::duplicate()
{
Q_ASSERT( mEngine );
- Q_ASSERT( mMappingEngine );
-
- OSyncError *error = 0;
+ Q_ASSERT( mMapping );
- osync_mapping_engine_duplicate( mMappingEngine, &error );
+ osengine_mapping_duplicate( mEngine, mMapping );
}
void SyncMapping::solve( const SyncChange &change )
{
Q_ASSERT( mEngine );
- Q_ASSERT( mMappingEngine );
+ Q_ASSERT( mMapping );
Q_ASSERT( change.isValid() );
- OSyncError *error = 0;
-
- osync_mapping_engine_solve( mMappingEngine, change.mSyncChange, &error );
+ osengine_mapping_solve( mEngine, mMapping, change.mSyncChange );
}
void SyncMapping::ignore()
{
Q_ASSERT( mEngine );
- Q_ASSERT( mMappingEngine );
+ Q_ASSERT( mMapping );
//TODO: error should be returned as Result
OSyncError *error = 0;
- osync_mapping_engine_ignore( mMappingEngine, &error );
+ osengine_mapping_ignore_conflict( mEngine, mMapping, &error );
}
int SyncMapping::changesCount() const
{
- Q_ASSERT( mMappingEngine );
+ Q_ASSERT( mMapping );
- return osync_mapping_engine_num_changes( mMappingEngine );
+ return osengine_mapping_num_changes( mMapping );
}
SyncChange SyncMapping::changeAt( int pos )
{
- Q_ASSERT( mMappingEngine );
+ Q_ASSERT( mMapping );
- if ( pos < 0 || pos >= osync_mapping_engine_num_changes( mMappingEngine ) )
+ if ( pos < 0 || pos >= osengine_mapping_num_changes( mMapping ) )
return SyncChange();
- OSyncChange *ochange = osync_mapping_engine_nth_change( mMappingEngine, pos );
+ OSyncChange *ochange = osengine_mapping_nth_change( mMapping, pos );
return SyncChange( ochange );
}