/*
 * Created on 2005-05-18
 *
 * Part of the Symbian development plug-in for Eclipse
 * Copyright (C) Mikołaj Zalewski, 2005
 */
package pl.zalewski.mikolaj.symbdev.core.internal.mmpmodel;

import org.eclipse.core.runtime.IPath;

/**
 * The interface provides a read-only access to mappings of
 * paths to auto directories that these paths are associated with.
 * 
 * @author mikolaj
 */
public interface IAutoEntriesMapper {
    /**
     * If this file has been added automatically because it is in
     * a selected directory, then the path to the directory is
     * returned.
     * @param file A project root-relative path to a file
     * @return A project root-relative path of a directory it was
     * added because or <code>null</code> if this file was not
     * added automatically.
     */
    public abstract IPath getDirectoryForAutoFile(IPath file);

    /**
     * If this directory has been added automatically because it is
     * in a selected directory, then the path to the directory is
     * returned.
     * @param dir A project root-relative path to a directory
     * @return A project root-relative path of a directory it was
     * added because or <code>null</code> if this directory was not
     * added automatically.
     */
    public abstract IPath getDirectoryForAutoDir(IPath dir);

    /**
     * Checks if this path is on the "don't add" list
     * @param path A project root-relative path
     * @return <code>true</code> if the source watcher should not
     * add this file/enter this directory
     */
    public abstract boolean isDontAdd(IPath path);
    
    /**
     * Checks if this directory is a directory exlipcitly selected
     * by the user (as given in IMMPModel.getSourceDirs).
     * @param path The path to the directory
     * @return <code>true</code> if this directory is selected by
     * the user
     * @see pl.zalewski.mikolaj.symbdev.core.mmpmodel.IMMPModel.getSourceDirs()
     */
    public abstract boolean isSelectedDir(IPath dir);
    
    public abstract IPath[] getAutoDirsForDirectory(IPath dir);
    public abstract IPath[] getAutoFilesForDirectory(IPath dir);
}