Sdílet prostřednictvím


IProviderMetadataUpgradeCallback Interface

When implemented by a derived class, represents methods that Sync Framework can call to notify a provider about events that occur during a metadata store upgrade that is initiated because the provider version has changed.

interface IProviderMetadataUpgradeCallback : IUnknown

Members

IProviderMetadataUpgradeCallback method Description

IProviderMetadataUpgradeCallback::OnProviderUpgradeRequired

Occurs when the expected provider compatibility version specified to ISyncMetadataStoreSerializer::DeserializeReplicaMetadata does not match the provider version that is contained in the serialized metadata.

IProviderMetadataUpgradeCallback::OnReplicaCustomFieldDeserialized

Occurs when the custom metadata field for the replica is read from the serialized metadata.

IProviderMetadataUpgradeCallback::OnItemMetadataDeserialized

Occurs one time for each item that is read from the serialized metadata.

Remarks

The IProviderMetadataUpgradeCallback interface is typically implemented by a provider.

After a provider opens a metadata storage service store, it can check the provider version that is associated with the metadata in the store, and determine whether the metadata must be upgraded. To get the provider version associated with the metadata, call IReplicaMetadata2::GetProviderVersion.

To upgrade the metadata for a replica, the provider saves the metadata in canonical format, removes the metadata from the current store, initializes new replica metadata in the metadata store by using the upgraded schema, and imports the metadata into the store by using ISyncMetadataStoreSerializer::DeserializeReplicaMetadata together with an IProviderMetadataUpgradeCallback object. For more information, see Upgrading the Metadata Store Version.

Requirements

Header: MetaStore.h

See Also

Concepts

Sync Framework Metadata Storage Service Components