Gets a change batch that contains item metadata for items that are not contained in the specified knowledge from the destination provider and that are accepted by the specified filter.
HRESULT GetFilteredChangeBatch( DWORD dwBatchSize, ISyncKnowledge *pSyncKnowledge, ISyncFilterInfo * pFilterInfo, IChangeBatchCallback *pCallback, ISyncChangeBatch ** ppSyncChangeBatch);
[in] The size of the batch to be created.
[in] The knowledge from the destination provider.
[in] Information about the filter that controls which items are included in the change batch.
[in, unique] A callback interface that is called to determine whether an item should be added to the batch.
[out] Returns the next batch of changes.
This method helps a synchronization provider implement its IKnowledgeSyncProvider::GetChangeBatch method when a filtered synchronization has been specified.
The IChangeBatchCallback::OnAddingItemToBatch method of pCallback will be called before each item is added to a batch. If the method returns TRUE in its pfShouldIncludeInBatch parameter, the item is added to the batch; otherwise, it is not added.
Before providers call this method, they must ensure that the versions in the metadata store reflect all local changes, including deletes. This is achieved through an explicit metadata maintenance pass to enumerate items and update their metadata.
The implementation of this class that is available through ISqlSyncMetadataStore adds changes to the change batch in global ID order.
The implementation of this class that is available through ISqlSyncMetadataStore calls SetLastBatch on the returned change batch when there are no more changes to send.
To aid a provider that uses global ID ordering and has the ability to use ranges, changes should be enumerated and added to the change batch in global ID order. The first change in the returned change batch starts a new range.
If there are no more changes to send after this batch, SetLastBatch must be called on the returned change batch, or Sync Framework will call IKnowledgeSyncProvider::GetChangeBatch again to retrieve another batch of changes.