Share via


IRequestFilteredSync::SpecifyFilter

When implemented by a derived class, negotiates which filter is used by the source provider during change enumeration.

HRESULT SpecifyFilter(
  IFilterRequestCallback * pCallback);

Parameters

  • pCallback
    [in] The callback interface that is used by the destination provider to request that a filter be used by the source provider during change enumeration.

Return Value

  • S_OK

  • Provider-determined error codes.

Remarks

Filter negotiation is achieved by using the following steps:

  1. Before the source provider begins enumerating changes, Sync Framework starts filter negotiation by calling IRequestFilteredSync::SpecifyFilter on the destination provider.

  2. During processing of IRequestFilteredSync::SpecifyFilter, the destination provider passes filters to IFilterRequestCallback::RequestFilter.

  3. During processing of IFilterRequestCallback::RequestFilter, Sync Framework calls ISupportFilteredSync::AddFilter on the source provider. If the source provider does not support the requested filter, the destination provider can continue to request filters until it finds one that is supported.

When a filter has been successfully negotiated, the source provider uses it to determine which items to include during change enumeration.

Notes for Implementers

An implementation of this method can repeatedly call IFilterRequestCallback::RequestFilter until a filter is found that is supported by both the destination provider and the source provider. The source provider indicates that it does not support a filter by returning SYNC_E_FILTER_NOT_SUPPORTED in response to the ISupportFilteredSync::AddFilter call.

When ISupportFilteredSync::AddFilter returns an error other than SYNC_E_FILTER_NOT_SUPPORTED, IRequestFilteredSync::SpecifyFilter should return the error to Sync Framework. This ends the synchronization session.

See Also

Reference

IRequestFilteredSync Interface
ISupportFilteredSync Interface
IFilterRequestCallback Interface