Override snap context

Is there any way to override “object_bases” and “active_base” in order to limit snap to some objects ?
Looks like those vars are no more available in context in 2.8x

From snap source code

act = view_layer->basact;
for (Base * base = view_layer->object_bases.first ...

But looks like python context “view_layer” doesn’t expose any of them.