Sync Framework Core Components
Sync Framework core components can be used from an unmanaged language to perform synchronization. These components can be used to manage metadata and to create synchronization providers and applications.
Structures, Enumerations, and Flags
The following table lists the structures, enumerations, and sets of flags defined by Sync Framework, and which feature each component is typically associated with.
Component | Associated feature |
---|---|
Metadata |
|
Metadata |
|
Filtering |
|
Metadata |
|
Metadata |
|
Metadata |
|
Session |
|
Metadata |
|
Change application service |
|
Constraint conflicts |
|
Concurrency conflicts |
|
Constraint conflicts |
|
Filtering |
|
Filtering |
|
Metadata |
|
Constraint conflicts |
|
Recovery synchronization |
|
Application callback |
|
Application callback |
|
Concurrency conflicts |
|
Change application |
|
Versioning |
|
Metadata |
|
Metadata |
|
Filtering |
|
Metadata |
Interfaces Implemented by Sync Framework
The following interfaces are implemented by Sync Framework.
Factory Interfaces
The following interfaces are used primarily for creating other Sync Framework components. Each of these interfaces can be created by passing CLSID_SyncServices and the specified IID to CoCreateInstance.
Interface | IID |
---|---|
IID_IApplicationSyncServices |
|
IID_IClockVectorServices |
|
IID_IProviderCustomFilteredSyncServices |
|
IID_IProviderFilteredSyncServices |
|
IID_IProviderFilteredSyncServices2 |
|
IID_IProviderSyncServices |
|
IID_IProviderSyncServices2 |
Change Batch Interfaces
The following interfaces represent a batch of changes. Each interface can be obtained by passing the specified IID to the QueryInterface method of any other interface. Some interfaces are only implemented when the specified conditions are met.
Interface | IID | Condition |
---|---|---|
IID_ISyncChangeBatch |
The change batch can not be part of a recovery synchronization. |
|
IID_ISyncChangeBatch2 |
Always. |
|
IID_ISyncChangeBatchAdvanced |
Always. |
|
IID_ISyncChangeBatchBase |
Always. |
|
IID_ISyncChangeBatchBase2 |
Always. |
|
IID_ISyncChangeBatchWithFilterKeyMap |
Always. |
|
IID_ISyncChangeBatchWithPrerequisite |
Always. |
|
IID_ISyncFullEnumerationChangeBatch |
The change batch must be part of a recovery synchronization. |
|
IID_ISyncFullEnumerationChangeBatch2 |
The change batch must be part of a recovery synchronization. |
The following interfaces represent a single change. Each interface can be obtained by passing the specified IID to the QueryInterface method of any other interface.
Interface | IID |
---|---|
IID_ISyncChange |
|
IID_ISyncChangeWithFilterKeyMap |
|
IID_ISyncChangeWithPrerequisite |
|
IID_ISyncFullEnumerationChange |
|
IID_ISyncMergeTombstoneChange |
The following interfaces are used to add additional information to an ISyncChange object. Each interface can be obtained by using the specified mechanism.
Interface | Obtained by |
---|---|
Passing IID_IFilterTrackingSyncChangeBuilder to the QueryInterface method of an ISyncChangeBuilder object. |
|
Returned by various methods, such as ISyncChangeBatchBase::AddItemMetadataToGroup. |
The following interfaces are used to handle change units. Each interface can be obtained by using the specified mechanism.
Interface | Obtained by |
---|---|
Calling IEnumSyncChangeUnits::Next. |
|
Calling a method such as ISyncChange::GetChangeUnits. |
The following interfaces are used to build or enumerate a list of changes. Each interface can be obtained by using the specified mechanism.
Interface | Obtained by |
---|---|
Calling IProviderSyncServices::CreateDestinationChangeVersionsBuilder. |
|
Passing IID_IDestinationChangeVersionsBuilder2 to the QueryInterface method of an IDestinationChangeVersionsBuilder object. |
|
Calling ISyncChangeBatchBase::GetChangeEnumerator or IDestinationChangeVersionsBuilder::GetChangeEnumerator. |
|
Passing IID_IFilterTrackingSyncChangeBuilder to the QueryInterface method of an IDestinationChangeVersionsBuilder object. |
Change Applier Interfaces
The following interfaces can be used by the destination provider to help handle conflicts and apply changes.
Any of the interfaces in the following table can be obtained by passing the specified IID to the IProviderSyncServices::CreateChangeApplier method or to the QueryInterface method of any of the other interfaces in the table.
Interface | IID |
---|---|
IID_IAsynchronousNotifyingChangeApplier |
|
IID_ISynchronousNotifyingChangeApplier |
|
IID_ISynchronousNotifyingChangeApplier2 |
The change applier registers the following of interface with the destination provider by calling IAsynchronousNotifyingChangeApplierTarget::RegisterCallback.
Interface | IID |
---|---|
IID_IAsynchronousNotifyingChangeApplierTargetCallback |
The following interfaces are used to communicate between the change applier and a provider during conflict detection and change application. Each interface can be obtained by using the specified mechanism.
Interface | Obtained by |
---|---|
Passed to methods such as ISynchronousDataRetriever::LoadChangeData. |
|
Passing IID_IFilterTrackingSaveChangeContext to the QueryInterface method of an ISaveChangeContext or ISaveChangeWithChangeUnitsContext object. |
|
Calling IProviderSyncServices::CreateRecoverableErrorData, IRecoverableError::GetRecoverableErrorDataForChange, or IRecoverableError::GetRecoverableErrorDataForChangeUnit. |
|
Passed to ISynchronousNotifyingChangeApplierTarget::SaveChange and IAsynchronousNotifyingChangeApplierTarget::SaveChange. |
|
Passing IID_ISaveChangeContext2 to the QueryInterface method of an ISaveChangeContext object. |
|
Passed to ISynchronousNotifyingChangeApplierTarget::SaveChangeWithChangeUnits and IAsynchronousNotifyingChangeApplierTarget::SaveChangeWithChangeUnits. |
|
Passing IID_ISaveChangeWithChangeUnitsContext2 to the QueryInterface method of an ISaveChangeWithChangeUnitsContext object. |
|
Passed to IAsynchronousDataRetriever::RegisterCallback. |
The following interfaces can be used in place of a standard change applier when greater flexibility is required. Each interface is obtained by using the specified mechanism.
Interface | Obtained by |
---|---|
Calling IChangeApplicationServices::GetChangeApplicationContext. |
|
Passing IID_IChangeApplicationServices to IProviderSyncServices::CreateChangeApplier. |
Conflict Logging
The following interfaces are used to log conflicts. Each interface can be obtained by using the specified mechanism.
Interface | Obtained by |
---|---|
Can be implemented by a provider, or can be obtained by passing IID_IConflictLogAccess to the QueryInterface method of an IMemoryConflictLog object. |
|
Can be implemented by a provider, or can be obtained by passing IID_IConflictLogWriter to the QueryInterface method of an IMemoryConflictLog object. |
|
Calling IProviderSyncServices2::CreateLoggedConflictsEnumBuilder. |
|
Filtering
The following interfaces represent information about filters that are used to control the data that is included in the synchronization scope. Each interface can be obtained by using the specified mechanism.
Interface | Obtained by |
---|---|
Passing the SYNC_FILTER_INFO_FLAG_CHANGE_UNIT_LIST flag to the IProviderFilteredSyncServices::CreateFilterInfo and then passing IID_IChangeUnitListFilterInfo to the QueryInterface method of the returned ISyncFilterInfo object. |
|
Calling IProviderCustomFilteredSyncServices::CreateCombinedFilterInfo. |
|
Calling IProviderCustomFilteredSyncServices::CreateCustomFilterInfo. |
|
Calling IProviderCustomFilteredSyncServices::CreateFilterKeyMap or ISyncChangeBatchWithFilterKeyMap::GetFilterKeyMap. |
|
Passed to IRequestFilteredSync::SpecifyFilter. |
|
Calling methods such as IProviderFilteredSyncServices::CreateFilterInfo. |
|
Passing IID_ISyncFilterInfo2 to the QueryInterface method of an ISyncFilterInfo object. |
Knowledge Metadata
The following interfaces represent a knowledge object. Any of the interfaces in the table can be obtained by passing the specified IID to the QueryInterface method of any of the other interfaces in the table. Be aware that some of the methods on some of the interfaces will fail when the minimum supported version of the knowledge object is not the expected value, such as ISyncKnowledge::GetSingleItemExceptions, which will fail when the minimum supported version is not SYNC_SERIALIZATION_VERSION_V1. Also, some of the methods will change the minimum supported version, such as IKnowledgeWithMarkers::AddAllChangeUnitsRequiredMarker, which will set the minimum supported version to SYNC_SERIALIZATION_VERSION_V3. For details on the minimum supported version that is required or set, see the reference documentation for each method.
Interface | IID |
---|---|
IID_ISyncKnowledge |
|
IID_ISyncKnowledge2 |
|
IID_IKnowledgeWithMarkers |
|
IID_IForgottenKnowledge |
The following interfaces represent the components of a knowledge object that has a minimum supported version of SYNC_SERIALIZATION_VERSION_V1. The minimum supported version of a knowledge object can be obtained by calling ISyncKnowledge2::GetMinimumSupportedVersion. Each interface can be obtained by calling the specified method.
Interface | Obtained by calling |
---|---|
The following interfaces represent the components of all versions of a knowledge object. Each interface can be obtained by calling the specified method.
Interface | Obtained by calling |
---|---|
ISyncKnowledge::FindClockVectorForItem or ISyncKnowledge::FindClockVectorForChangeUnit |
|
IProviderSyncServices::CreateReplicaKeyMap or ISyncKnowledge::GetReplicaKeyMap. |
The following interfaces are used to inspect or build a knowledge object. Each interface can be obtained by the specified mechanism.
Interface | Obtained by |
---|---|
Passing IID_IConstructReplicaKeyMap to the QueryInterface method of an IReplicaKeyMap object. |
|
Passing IID_ICoreFragmentInspector to ISyncKnowledge2::GetInspector. |
|
Passing IID_IKnowledgeBuilder2 to the QueryInterface method of an IKnowledgeBuilder object. |
Session Interfaces
The following interfaces are used by a synchronization application to start a synchronization session and to retrieve information about the session. Each interface can be obtained by using the specified mechanism.
Interface | Obtained by |
---|---|
Passing IID_ISyncSessionExtendedErrorInfo to the QueryInterface method of an ISyncSession object. |
|
Calling IProviderSyncServices2::CreateSyncSessionState. Also passed by Sync Framework to IKnowledgeSyncProvider::BeginSession and IKnowledgeSyncProvider::EndSession. |
|
Passing IID_ISyncSessionState2 to the QueryInterface method of an ISyncSessionState object. |
|
Passing IID_ISyncDataConversionControl to the QueryInterface method of an ISyncSessionState object. |
Application Callback Data Interfaces
The following interfaces are passed by Sync Framework to a synchronization application by using the specified callback method.
Interface | Callback method |
---|---|
Other Interfaces
The following interface is used to register a provider converter. It can be obtained by calling the specified method.
Interface | Obtained by calling |
---|---|
Implemented by Synchronization Providers
The following interfaces are implemented by synchronization providers.
Provider Interfaces
Each of the following interfaces must be returned by the QueryInterface method of the ISyncProvider object when it receives the specified IID. These interfaces are passed by the synchronization application to the synchronization session object by using IApplicationSyncServices::CreateSyncSession.
Interface | IID |
---|---|
IID_IKnowledgeSyncProvider |
|
IID_ISyncProvider |
|
IID_IFilterTrackingProvider |
|
IID_IRequestFilteredSync |
|
IID_ISupportFilteredSync |
Change Applier Target Interfaces
The following interfaces are implemented by a destination provider that uses a synchronous change applier. Each implemented interface must be returned by the QueryInterface method of the ISynchronousNotifyingChangeApplierTarget object when it receives the specified IID. These interfaces are passed to the change applier component by using a method such as ISynchronousNotifyingChangeApplier::ApplyChanges.
Interface | IID |
---|---|
IID_ISynchronousNotifyingChangeApplierTarget |
|
IID_ISynchronousNotifyingChangeApplierTarget2 |
|
IID_IFilteredReplicaNotifyingChangeApplierTarget |
|
IID_IFilterTrackingNotifyingChangeApplierTarget |
The following interface is implemented by a destination provider that uses an asynchronous change applier. This interface is passed to the change applier component by using a method such as IAsynchronousNotifyingChangeApplier::ApplyChanges.
Interface | IID |
---|---|
IID_IAsynchronousNotifyingChangeApplierTarget |
Data Retriever Interfaces
The following interfaces are implemented by a destination provider that uses a change applier. These interfaces are passed to the change applier component by using a method such as the specified method.
Interface | Method |
---|---|
Other Provider Interfaces
The following interfaces are implemented by a provider to take advantage of various features, such as filtering or data conversion. The interface is passed to Sync Framework by using the specified mechanism.
Interface | Mechanism |
---|---|
Returned by a method such as IFilteredReplicaNotifyingChangeApplierTarget::GetNewMoveins. |
|
Passed to IProviderConverterRegistration::RegisterProviderConverter. |
|
Returned when IID_ISupportLastWriteTime is passed to the QueryInterface of the data retriever object. Typically, this is an ISynchronousDataRetriever object. |
|
Passed to ISyncDataConversionControl::SetSourceDataConverter or ISyncDataConversionControl::SetDestinationDataConverter. |
|
Passed to methods such as IProviderCustomFilteredSyncServices::CreateCustomFilterInfo or IFilterKeyMap::AddFilter. |
|
Passed to IProviderCustomFilteredSyncServices::DeserializeFilterKeyMap or IProviderCustomFilteredSyncServices::DeserializeChangeBatchWithFilterKeyMap. |
Implemented by Synchronization Applications
The following interfaces are implemented by a synchronization application to receive notification of events that occur during synchronization. Sync Framework obtains these interfaces by passing the specified IID to the QueryInterface method of the ISyncCallback interface that is passed to ISyncSession::RegisterCallback.
Interface | IID |
---|---|
IID_ISyncCallback |
|
IID_ISyncCallback2 |
|
IID_ISyncConstraintCallback |
Error Codes
Sync Framework uses a set of custom errors to report problems. For more information, see Sync Framework Error Codes.
See Also
Concepts
Sync Framework Unmanaged API
Microsoft Sync Framework
Custom Provider Fundamentals
Managing Metadata for Standard Providers
Implementing a Standard Custom Provider
Implementing a Synchronization Application