Partager via


Composants principaux de Sync Framework

Les composants principaux de Sync Framework peuvent être utilisés à partir d'un langage non managé pour effectuer la synchronisation. Ces composants peuvent être utilisés pour gérer les métadonnées et créer des fournisseurs de synchronisation et des applications.

Structures, énumérations et indicateurs

Le tableau suivant liste les structures, énumérations et indicateurs définis par Sync Framework, ainsi que les fonctionnalités auxquelles chaque composant est généralement associé.

Composant

Fonctionnalité associée

Structure ID_PARAMETER_PAIR

Métadonnées

Structure ID_PARAMETERS

Métadonnées

Structure SYNC_FILTER_CHANGE

Filtrage

Structure SYNC_GID

Métadonnées

Structure SYNC_ID

Métadonnées

Structure SYNC_RANGE

Métadonnées

Structure SYNC_SESSION_STATISTICS

Session

Structure SYNC_VERSION

Métadonnées

Énumération CHANGE_APPLICATION_ACTION

Service d'application de modifications

Énumération COLLISION_CONFLICT_RESOLUTION_POLICY

Conflits de contraintes

Énumération CONFLICT_RESOLUTION_POLICY

Conflits d'accès concurrenciel

Énumération CONSTRAINT_CONFLICT_REASON

Conflits de contraintes

Énumération FILTER_COMBINATION_TYPE

Filtrage

Énumération FILTERING_TYPE

Filtrage

Énumération KNOWLEDGE_COOKIE_COMPARISON_RESULT

Métadonnées

Énumération SYNC_CONSTRAINT_RESOLVE_ACTION

Conflits de contraintes

Énumération SYNC_FULL_ENUMERATION_ACTION

Synchronisation de récupération

Énumération SYNC_PROGRESS_STAGE

Rappel d'application

Énumération SYNC_PROVIDER_ROLE

Rappel d'application

Énumération SYNC_RESOLVE_ACTION

Conflits d'accès concurrenciel

Énumération SYNC_SAVE_ACTION

Application des modifications

Énumération SYNC_SERIALIZATION_VERSION

Contrôle de version

Énumération SYNC_STATISTICS

Métadonnées

Indicateurs SYNC_CHANGE_FLAG

Métadonnées

Indicateurs SYNC_FILTER_INFO_FLAG

Filtrage

Indicateurs SYNC_SERIALIZE

Métadonnées

Interfaces implémentées par Sync Framework

Les interfaces suivantes sont implémentées par Sync Framework.

Interfaces de fabrique

Les interfaces suivantes sont principalement utilisées pour la création d'autres composants Sync Framework. Chacune de ces interfaces peut être créée en passant CLSID_SyncServices et l'IID spécifié à CoCreateInstance.

Interface

IID

Interface IApplicationSyncServices

IID_IApplicationSyncServices

Interface IClockVectorServices

IID_IClockVectorServices

Interface IProviderCustomFilteredSyncServices

IID_IProviderCustomFilteredSyncServices

Interface IProviderFilteredSyncServices

IID_IProviderFilteredSyncServices

Interface IProviderFilteredSyncServices2

IID_IProviderFilteredSyncServices2

Interface IProviderSyncServices

IID_IProviderSyncServices

Interface IProviderSyncServices2

IID_IProviderSyncServices2

Interfaces de lot de modifications

Les interfaces suivantes représentent un lot de modifications. Chaque interface peut être obtenue en passant l'IID spécifié à la méthode QueryInterface de toute autre interface. Certaines interfaces sont implémentées uniquement lorsque les conditions spécifiées sont rencontrées.

Interface

IID

Condition

Interface ISyncChangeBatch

IID_ISyncChangeBatch

Le lot de modifications ne peut pas faire partie d'une synchronisation de récupération.

Interface ISyncChangeBatch2

IID_ISyncChangeBatch2

Toujours.

Interface ISyncChangeBatchAdvanced

IID_ISyncChangeBatchAdvanced

Toujours.

Interface ISyncChangeBatchBase

IID_ISyncChangeBatchBase

Toujours.

Interface ISyncChangeBatchBase2

IID_ISyncChangeBatchBase2

Toujours.

Interface ISyncChangeBatchWithFilterKeyMap

IID_ISyncChangeBatchWithFilterKeyMap

Toujours.

Interface ISyncChangeBatchWithPrerequisite

IID_ISyncChangeBatchWithPrerequisite

Toujours.

Interface ISyncFullEnumerationChangeBatch

IID_ISyncFullEnumerationChangeBatch

Le lot de modifications doit faire partie d'une synchronisation de récupération.

Interface ISyncFullEnumerationChangeBatch2

IID_ISyncFullEnumerationChangeBatch2

Le lot de modifications doit faire partie d'une synchronisation de récupération.

Les interfaces suivantes représentent une modification unique. Chaque interface peut être obtenue en passant l'IID spécifié à la méthode QueryInterface de toute autre interface.

Interface

IID

Interface ISyncChange

IID_ISyncChange

Interface ISyncChangeWithFilterKeyMap

IID_ISyncChangeWithFilterKeyMap

Interface ISyncChangeWithPrerequisite

IID_ISyncChangeWithPrerequisite

Interface ISyncFullEnumerationChange

IID_ISyncFullEnumerationChange

Interface ISyncMergeTombstoneChange

IID_ISyncMergeTombstoneChange

Les interfaces suivantes sont utilisées pour ajouter des informations supplémentaires à un objet ISyncChange. Chaque interface peut être obtenue à l'aide du mécanisme spécifié.

Interface

Mode d'obtention

Interface IFilterTrackingSyncChangeBuilder

En passant IID_IFilterTrackingSyncChangeBuilder à la méthode QueryInterface d'un objet ISyncChangeBuilder.

Interface ISyncChangeBuilder

Retournée par différentes méthodes, telles qu'ISyncChangeBatchBase::AddItemMetadataToGroup.

Les interfaces suivantes sont utilisées pour gérer des unités de modification. Chaque interface peut être obtenue à l'aide du mécanisme spécifié.

Interface

Mode d'obtention

Interface ISyncChangeUnit

En appelant IEnumSyncChangeUnits::Next.

Interface IEnumSyncChangeUnits

En appelant une méthode telle qu'ISyncChange::GetChangeUnits.

Les interfaces suivantes sont utilisées pour générer ou énumérer une liste de modifications. Chaque interface peut être obtenue à l'aide du mécanisme spécifié.

Interface

Mode d'obtention

Interface IDestinationChangeVersionsBuilder

En appelant IProviderSyncServices::CreateDestinationChangeVersionsBuilder.

Interface IDestinationChangeVersionsBuilder2

En passant IID_IDestinationChangeVersionsBuilder2 à la méthode QueryInterface d'un objet IDestinationChangeVersionsBuilder.

Interface IEnumSyncChanges

En appelant ISyncChangeBatchBase::GetChangeEnumerator ou IDestinationChangeVersionsBuilder::GetChangeEnumerator.

Interface IFilterTrackingSyncChangeBuilder

En passant IID_IFilterTrackingSyncChangeBuilder à la méthode QueryInterface d'un objet IDestinationChangeVersionsBuilder.

Interfaces d'applicateur de modifications

Les interfaces suivantes peuvent être utilisées par le fournisseur de destination afin d'aider à gérer les conflits et à appliquer des modifications.

N'importe quelle interface du tableau suivant peut être obtenue en passant l'IID spécifié à la méthode IProviderSyncServices::CreateChangeApplier ou à la méthode QueryInterface de n'importe quelle autre interface du tableau.

Interface

IID

Interface IAsynchronousNotifyingChangeApplier

IID_IAsynchronousNotifyingChangeApplier

Interface ISynchronousNotifyingChangeApplier

IID_ISynchronousNotifyingChangeApplier

Interface ISynchronousNotifyingChangeApplier2

IID_ISynchronousNotifyingChangeApplier2

L'applicateur de modifications enregistre l'interface suivante avec le fournisseur de destination en appelant IAsynchronousNotifyingChangeApplierTarget::RegisterCallback.

Interface

IID

Interface IAsynchronousNotifyingChangeApplierTargetCallback

IID_IAsynchronousNotifyingChangeApplierTargetCallback

Les interfaces suivantes sont utilisées pour communiquer entre l'applicateur de modifications et un fournisseur lors de la détection de conflit et l'application des modifications. Chaque interface peut être obtenue à l'aide du mécanisme spécifié.

Interface

Mode d'obtention

Interface ILoadChangeContext

Passée à des méthodes telles qu'ISynchronousDataRetriever::LoadChangeData.

Interface IFilterTrackingSaveChangeContext

En passant IID_IFilterTrackingSaveChangeContext à la méthode QueryInterface d'un objet ISaveChangeContext ou ISaveChangeWithChangeUnitsContext.

Interface IRecoverableErrorData

En appelant IProviderSyncServices::CreateRecoverableErrorData, IRecoverableError::GetRecoverableErrorDataForChange ou IRecoverableError::GetRecoverableErrorDataForChangeUnit.

Interface ISaveChangeContext

Passée à ISynchronousNotifyingChangeApplierTarget::SaveChange et IAsynchronousNotifyingChangeApplierTarget::SaveChange.

Interface ISaveChangeContext2

En passant IID_ISaveChangeContext2 à la méthode QueryInterface d'un objet ISaveChangeContext.

Interface ISaveChangeWithChangeUnitsContext

Passée à ISynchronousNotifyingChangeApplierTarget::SaveChangeWithChangeUnits et IAsynchronousNotifyingChangeApplierTarget::SaveChangeWithChangeUnits.

Interface ISaveChangeWithChangeUnitsContext2

En passant IID_ISaveChangeWithChangeUnitsContext2 à la méthode QueryInterface d'un objet ISaveChangeWithChangeUnitsContext.

Interface IDataRetrieverCallback

Passée à IAsynchronousDataRetriever::RegisterCallback.

Les interfaces suivantes peuvent être utilisées à la place d'un applicateur de modifications standard lorsqu'une plus grande souplesse est nécessaire. Chaque interface est obtenue à l'aide du mécanisme spécifié.

Interface

Mode d'obtention

Interface IChangeApplicationContext

En appelant IChangeApplicationServices::GetChangeApplicationContext.

Interface IChangeApplicationServices

En passant IID_IChangeApplicationServices à IProviderSyncServices::CreateChangeApplier.

Journalisation des conflits

Les interfaces suivantes sont utilisées pour enregistrer les conflits dans un fichier journal. Chaque interface peut être obtenue à l'aide du mécanisme spécifié.

Interface

Mode d'obtention

Interface IConflictLogAccess

Peut être implémentée par un fournisseur ou peut être obtenue en passant IID_IConflictLogAccess à la méthode QueryInterface d'un objet IMemoryConflictLog.

Interface IConflictLogWriter

Peut être implémentée par un fournisseur ou peut être obtenue en passant IID_IConflictLogWriter à la méthode QueryInterface d'un objet IMemoryConflictLog.

Interface IEnumLoggedConflicts

En appelant IEnumLoggedConflictsBuilder::GetChangeEnumerator.

Interface IEnumLoggedConflictsBuilder

En appelant IProviderSyncServices2::CreateLoggedConflictsEnumBuilder.

Interface ILoggedConflict

En appelant IProviderSyncServices2::CreateLoggedConflict.

Interface IMemoryConflictLog

En appelant IProviderSyncServices2::CreateMemoryConflictLog.

Filtrage

Les interfaces suivantes représentent les informations relatives aux filtres utilisés pour contrôler les données incluses dans l'étendue de la synchronisation. Chaque interface peut être obtenue à l'aide du mécanisme spécifié.

Interface

Mode d'obtention

Interface IChangeUnitListFilterInfo

En passant l'indicateur SYNC_FILTER_INFO_FLAG_CHANGE_UNIT_LIST à IProviderFilteredSyncServices::CreateFilterInfo, puis en passant IID_IChangeUnitListFilterInfo à la méthode QueryInterface de l'objet ISyncFilterInfo retourné.

Interface ICombinedFilterInfo

En appelant IProviderCustomFilteredSyncServices::CreateCombinedFilterInfo.

Interface ICustomFilterInfo

En appelant IProviderCustomFilteredSyncServices::CreateCustomFilterInfo.

Interface IFilterKeyMap

En appelant IProviderCustomFilteredSyncServices::CreateFilterKeyMap ou ISyncChangeBatchWithFilterKeyMap::GetFilterKeyMap.

Interface IFilterRequestCallback

Passée à IRequestFilteredSync::SpecifyFilter.

Interface IFilterTrackingRequestCallback

Passée à IFilterTrackingProvider::SpecifyTrackedFilters.

Interface ISyncFilterInfo

Méthodes d'appel telles qu'IProviderFilteredSyncServices::CreateFilterInfo.

Interface ISyncFilterInfo2

En passant IID_ISyncFilterInfo2 à la méthode QueryInterface d'un objet ISyncFilterInfo.

Métadonnées de connaissance

Les interfaces suivantes représentent un objet de connaissance. N'importe quelle interface du tableau suivant peut être obtenue en passant l'IID spécifié à la méthode QueryInterface de n'importe quelle autre interface du tableau. Sachez que certaines méthodes de certaines interfaces échouent lorsque la version minimale prise en charge de l'objet de connaissance n'a pas la valeur attendue ; par exemple ISyncKnowledge::GetSingleItemExceptions échouera si la version minimale prise en charge n'est pas SYNC_SERIALIZATION_VERSION_V1. En outre, certaines méthodes modifient la version minimale prise en charge ; par exemple IKnowledgeWithMarkers::AddAllChangeUnitsRequiredMarker définira la version minimale prise en charge sur SYNC_SERIALIZATION_VERSION_V3. Pour plus d'informations sur la version minimale prise en charge requise ou définie, consultez la documentation de référence pour chaque méthode.

Interface

IID

Interface ISyncKnowledge

IID_ISyncKnowledge

Interface ISyncKnowledge2

IID_ISyncKnowledge2

Interface IKnowledgeWithMarkers

IID_IKnowledgeWithMarkers

Interface IForgottenKnowledge

IID_IForgottenKnowledge

Les interfaces suivantes représentent les composants d'un objet de connaissance dont la version minimale prise en charge est SYNC_SERIALIZATION_VERSION_V1. La version minimale prise en charge d'un objet de connaissance peut être obtenue en appelant ISyncKnowledge2::GetMinimumSupportedVersion. Chaque interface peut être obtenue en appelant la méthode spécifiée.

Interface

Obtenue en appelant

Interface IChangeUnitException

IEnumChangeUnitExceptions::Next

Interface IRangeException

IEnumRangeExceptions::Next

Interface ISingleItemException

IEnumSingleItemExceptions::Next

Interface IEnumChangeUnitExceptions

ISyncKnowledge::GetChangeUnitExceptions

Interface IEnumRangeExceptions

ISyncKnowledge::GetRangeExceptions

Interface IEnumSingleItemExceptions

ISyncKnowledge::GetSingleItemExceptions

Les interfaces suivantes représentent les composants de toutes les versions d'un objet de connaissance. Chaque interface peut être obtenue en appelant la méthode spécifiée.

Interface

Obtenue en appelant

Interface IClockVector

ISyncKnowledge::FindClockVectorForItem ou ISyncKnowledge::FindClockVectorForChangeUnit

Interface IClockVectorElement

IEnumClockVector::Next

Interface IEnumClockVector

IClockVector::GetClockVectorElements

Interface ICoreFragment

ICoreFragmentInspector::NextCoreFragments

Interface IReplicaKeyMap

IProviderSyncServices::CreateReplicaKeyMap ou ISyncKnowledge::GetReplicaKeyMap.

Les interfaces suivantes sont utilisées pour inspecter ou générer un objet de connaissance. Chaque interface peut être obtenue à l'aide du mécanisme spécifié.

Interface

Mode d'obtention

Interface IConstructReplicaKeyMap

En passant IID_IConstructReplicaKeyMap à la méthode QueryInterface d'un objet IReplicaKeyMap.

Interface ICoreFragmentInspector

En passant d'IID_ICoreFragmentInspector à ISyncKnowledge2::GetInspector.

Interface IKnowledgeBuilder

En appelant IClockVectorServices::CreateKnowledgeBuilder.

Interface IKnowledgeBuilder2

En passant IID_IKnowledgeBuilder2 à la méthode QueryInterface d'un objet IKnowledgeBuilder.

Interfaces de session

Les interfaces suivantes sont utilisées par une application de synchronisation pour démarrer une session de synchronisation et récupérer des informations sur la session. Chaque interface peut être obtenue à l'aide du mécanisme spécifié.

Interface

Mode d'obtention

Interface ISyncSession

En appelant IApplicationSyncServices::CreateSyncSession.

Interface ISyncSessionExtendedErrorInfo

En passant IID_ISyncSessionExtendedErrorInfo à la méthode QueryInterface d'un objet ISyncSession.

Interface ISyncSessionState

En appelant IProviderSyncServices2::CreateSyncSessionState. Également passé par Sync Framework à IKnowledgeSyncProvider::BeginSession et IKnowledgeSyncProvider::EndSession.

Interface ISyncSessionState2

En passant IID_ISyncSessionState2 à la méthode QueryInterface d'un objet ISyncSessionState.

Interface ISyncDataConversionControl

En passant IID_ISyncDataConversionControl à la méthode QueryInterface d'un objet ISyncSessionState.

Interfaces des données de rappel d'application

Les interfaces suivantes sont passées par Sync Framework à une application de synchronisation à l'aide de la méthode de rappel spécifiée.

Interface

Méthode de rappel

Interface IChangeConflict

ISyncCallback::OnConflict

Interface IConstraintConflict

ISyncConstraintCallback::OnConstraintConflict

Interface IRecoverableError

ISyncCallback::OnRecoverableError

Autres interfaces

L'interface suivante est utilisée pour enregistrer un convertisseur de fournisseur. Elle peut être obtenue en appelant la méthode spécifiée.

Interface

Obtenue en appelant

Interface IProviderConverterRegistration

IProviderSyncServices2::CreateProviderConverterRegistration

Implémentée par les fournisseurs de synchronisation

Les interfaces suivantes sont implémentées par les fournisseurs de synchronisation.

Interfaces de fournisseur

Chacune des interfaces suivantes doit être retournée par la méthode QueryInterface de l'objet ISyncProvider lorsqu'il reçoit l'IID spécifié. Ces interfaces sont passées par l'application de synchronisation à l'objet de session de synchronisation à l'aide d'IApplicationSyncServices::CreateSyncSession.

Interface

IID

Interface IKnowledgeSyncProvider

IID_IKnowledgeSyncProvider

Interface ISyncProvider

IID_ISyncProvider

Interface IFilterTrackingProvider

IID_IFilterTrackingProvider

Interface IRequestFilteredSync

IID_IRequestFilteredSync

Interface ISupportFilteredSync

IID_ISupportFilteredSync

Interfaces des cibles d'applicateur de modifications

Les interfaces suivantes sont implémentées par un fournisseur de destination qui utilise un applicateur de modifications synchrone. Chaque interface implémentée doit être retournée par la méthode QueryInterface de l'objet ISynchronousNotifyingChangeApplierTarget lorsqu'il reçoit l'IID spécifié. Ces interfaces sont passées au composant applicateur de modifications à l'aide d'une méthode telle qu'ISynchronousNotifyingChangeApplier::ApplyChanges.

Interface

IID

Interface ISynchronousNotifyingChangeApplierTarget

IID_ISynchronousNotifyingChangeApplierTarget

Interface ISynchronousNotifyingChangeApplierTarget2

IID_ISynchronousNotifyingChangeApplierTarget2

Interface IFilteredReplicaNotifyingChangeApplierTarget

IID_IFilteredReplicaNotifyingChangeApplierTarget

Interface IFilterTrackingNotifyingChangeApplierTarget

IID_IFilterTrackingNotifyingChangeApplierTarget

L'interface suivante est implémentée par un fournisseur de destination qui utilise un applicateur de modifications asynchrone. Cette interface est passée au composant applicateur de modifications à l'aide d'une méthode telle qu'IAsynchronousNotifyingChangeApplier::ApplyChanges.

Interface

IID

Interface IAsynchronousNotifyingChangeApplierTarget

IID_IAsynchronousNotifyingChangeApplierTarget

Interfaces d'extracteur de données

Les interfaces suivantes sont implémentées par un fournisseur de destination qui utilise un applicateur de modifications. Ces interfaces sont passées au composant applicateur de modifications à l'aide d'une méthode spécifiée.

Interface

Méthode

Interface IAsynchronousDataRetriever

IAsynchronousNotifyingChangeApplier::ApplyChanges.

Interface ISynchronousDataRetriever

ISynchronousNotifyingChangeApplier::ApplyChanges.

Autres interfaces de fournisseur

Les interfaces suivantes sont implémentées par un fournisseur pour tirer parti de différentes fonctionnalités, telles que le filtrage ou la conversion de données. L'interface est passée à Sync Framework à l'aide du mécanisme spécifié.

Interface

Mécanisme

Interface IEnumItemIds

Retournée par une méthode telle qu'IFilteredReplicaNotifyingChangeApplierTarget::GetNewMoveins.

Interface IProviderConverter

Passée à IProviderConverterRegistration::RegisterProviderConverter.

Interface ISupportLastWriteTime

Retournée lorsque IID_ISupportLastWriteTime est passé à la méthode QueryInterface de l'objet d'extracteur de données. Il s'agit généralement d'un objet ISynchronousDataRetriever.

Interface ISyncDataConverter

Passée à ISyncDataConversionControl::SetSourceDataConverter ou ISyncDataConversionControl::SetDestinationDataConverter.

Interface ISyncFilter

Passée à des méthodes telles qu'IProviderCustomFilteredSyncServices::CreateCustomFilterInfo ou IFilterKeyMap::AddFilter.

Interface ISyncFilterDeserializer

Passée à IProviderCustomFilteredSyncServices::DeserializeFilterKeyMap ou IProviderCustomFilteredSyncServices::DeserializeChangeBatchWithFilterKeyMap.

Implémentée par des applications de synchronisation

Les interfaces suivantes sont implémentées par une application de synchronisation pour recevoir une notification des événements qui se produisent pendant la synchronisation. Sync Framework obtient ces interfaces en passant l'IID spécifié à la méthode QueryInterface de l'interface ISyncCallback qui est passée à ISyncSession::RegisterCallback.

Interface

IID

Interface ISyncCallback

IID_ISyncCallback

Interface ISyncCallback2

IID_ISyncCallback2

Interface ISyncConstraintCallback

IID_ISyncConstraintCallback

Codes d'erreur

Sync Framework utilise un ensemble d'erreurs personnalisées pour signaler les problèmes. Pour plus d'informations, consultez Codes d'erreur Sync Framework.

Voir aussi

Autres ressources

API non managée Sync Framework

Microsoft Sync Framework

Principes de base des fournisseurs personnalisés

Gestion des métadonnées pour les fournisseurs standard

Implémentation d'un fournisseur personnalisé standard

Implémentation d'une application de synchronisation