ISupportLastWriteTime Interface
Represents a synchronization provider that is able to report the date and time when an item or change unit was last changed. This ability is useful to an application that implements last-writer-wins conflict resolution.
interface ISupportLastWriteTime : IUnknown
Members
ISupportLastWriteTime method |
Description |
Gets the date and time when the specified item was last changed. |
|
Gets the date and time when the specified change unit was last changed. |
Remarks
This interface is typically implemented by a provider. If a provider implements this interface, it must return a pointer to it when IID_ISupportLastWriteTime is passed to the QueryInterface method of its data transfer interface. The data transfer interface is the interface that a provider returns in response to the ISynchronousDataRetriever::LoadChangeData method.
To implement last-writer-wins conflict resolution, an application typically performs the following steps:
Registers an ISyncCallback object to receive conflict notifications.
In the ISyncCallback::OnConflict method, calls IChangeConflict::GetDestinationProviderConflictingData and IChangeConflict::GetSourceProviderConflictingData on the IChangeConflict object to get the data transfer interfaces for the conflicting changes.
Passes IID_ISupportLastWriteTime to the QueryInterface method of each data transfer interface to get the ISupportLastWriteTime objects that represent the conflicting changes.
Calls GetItemChangeTime or GetChangeUnitChangeTime on the ISupportLastWriteTime objects to get the last date and time the changes were made.
Compares the date and time values to determine which change was made last.
Indicates which change to keep by using the IChangeConflict::SetResolveActionForChange or IChangeConflict::SetResolveActionForChangeUnit method.
Requirements
Header: Synchronization.idl