package dev.photosync.core.provider;

/**
 * Creates providers of one kind. Registered in a {@link ProviderCatalog} at
 * start-up; that registration is the only place a new backend has to be named.
 */
public interface ProviderFactory {

    ProviderDescriptor descriptor();

    /**
     * Builds a provider bound to these credentials. Cheap and non-blocking: no
     * network call happens until {@link PhotoProvider#identify()} or a real
     * request, because this runs while the settings screen is being built.
     */
    PhotoProvider connect(ProviderConnection connection);
}
