OpenSync Mapping
[OpenSync Engine API]

The commands to manipulate mappings. More...


Functions

void osengine_mapping_duplicate (OSyncEngine *engine, OSyncMapping *dupe_mapping)
 Solves the conflict by duplicating the conflicting entries.
void osengine_mapping_solve (OSyncEngine *engine, OSyncMapping *mapping, OSyncChange *change)
 Solves the mapping by choosing a winner.
osync_bool osengine_mapping_ignore_conflict (OSyncEngine *engine, OSyncMapping *mapping, OSyncError **error)
 Ignores a conflict.
osync_bool osengine_mapping_ignore_supported (OSyncEngine *engine, OSyncMapping *mapping)
 Checks if a conflict can be ignore.
osync_bool osengine_mapping_solve_latest (OSyncEngine *engine, OSyncMapping *mapping, OSyncError **error)
 Solves a mapping by choosing the entry that was last modified.
osync_bool osengine_mapping_check_timestamps (OSyncEngine *engine, OSyncMapping *mapping, OSyncError **error)
 Checks if the mapping could be solved with solve_latest.
void osengine_mapping_solve_updated (OSyncEngine *engine, OSyncMapping *mapping, OSyncChange *change)
 Solves a mapping by setting an updated change.


Detailed Description

The commands to manipulate mappings.

Function Documentation

void osengine_mapping_duplicate ( OSyncEngine *  engine,
OSyncMapping *  dupe_mapping 
)

Solves the conflict by duplicating the conflicting entries.

Parameters:
engine The engine
dupe_mapping The conflicting mapping to duplicate

Definition at line 296 of file osengine_mapcmds.c.

void osengine_mapping_solve ( OSyncEngine *  engine,
OSyncMapping *  mapping,
OSyncChange change 
)

Solves the mapping by choosing a winner.

The winner will overwrite all other entries of this mapping

Parameters:
engine The engine
mapping The conflicting mapping
change The winning change

Definition at line 401 of file osengine_mapcmds.c.

osync_bool osengine_mapping_ignore_conflict ( OSyncEngine *  engine,
OSyncMapping *  mapping,
OSyncError **  error 
)

Ignores a conflict.

This ignores the conflict until the next sync. When the group is synchronized again the conflict is brought up again (unless the user solved it already outside of the engine)

Parameters:
engine The engine
mapping The mapping to ignore

Definition at line 420 of file osengine_mapcmds.c.

osync_bool osengine_mapping_ignore_supported ( OSyncEngine *  engine,
OSyncMapping *  mapping 
)

Checks if a conflict can be ignore.

To be able to ignore a conflict, you opensync must be able to read the changes of the conflict again during the next synchronization. This must be done even if they are not reported by the plugin. Therefore, all plugins should provide a "read" method. If there is a member in the engine's group that does not have this method (either since it is not possible to implement one or since it has not been done yet), this function will return FALSE.

Parameters:
engine The engine
mapping The mapping to check
Returns:
TRUE if conflicts can be ignored, FALSE otherwise

Definition at line 461 of file osengine_mapcmds.c.

Referenced by osengine_mapping_ignore_conflict().

osync_bool osengine_mapping_solve_latest ( OSyncEngine *  engine,
OSyncMapping *  mapping,
OSyncError **  error 
)

Solves a mapping by choosing the entry that was last modified.

Solves the mapping by choosing the last modified entry. Note that this can fail if one of the entries does not have a timestamp set or of the 2 latest timestamps were exactly equal. If it could not be solved you have to solve it with another function!

Parameters:
engine The engine
mapping The conflicting mapping
error A pointer to an error
Returns:
TRUE if the mapping was solved, FALSE otherwise

Definition at line 499 of file osengine_mapcmds.c.

osync_bool osengine_mapping_check_timestamps ( OSyncEngine *  engine,
OSyncMapping *  mapping,
OSyncError **  error 
)

Checks if the mapping could be solved with solve_latest.

This functions checks all changes to see if they contain valid timestamp information and if they could be used to solve but does not actually solve the mapping

Parameters:
engine The engine
mapping The conflicting mapping
error A pointer to an error
Returns:
TRUE if the mapping could be solved, FALSE otherwise

Definition at line 554 of file osengine_mapcmds.c.

void osengine_mapping_solve_updated ( OSyncEngine *  engine,
OSyncMapping *  mapping,
OSyncChange change 
)

Solves a mapping by setting an updated change.

Solves the mapping by setting an updated change. The change should have been edited by the user. This change will then be declared winner.

Parameters:
engine The engine
mapping The conflicting mapping
change The updated change

Definition at line 601 of file osengine_mapcmds.c.


Generated on Sun Jul 26 17:47:24 2009 for OpenSync by  doxygen 1.5.9