Bug 270889 - nsIDirectoryServiceProvider2 impl. r=darin

git-svn-id: svn://10.0.0.236/trunk@167606 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
pedemont%us.ibm.com
2005-01-12 18:23:59 +00:00
parent 56cfedaae5
commit d14f0f6995
3 changed files with 172 additions and 14 deletions

View File

@@ -42,9 +42,18 @@ import java.io.*;
/**
* Used by XPCOM's Directory Service to get file locations.
* <p>
* This interface is similar to <code>nsIDirectoryServiceProvider</code> and
* <code>nsIDirectoryServiceProvider2</code>, except that its methods use
* <code>java.io.File</code> instead of <code>nsIFile</code>.
* </p>
*
* @see GeckoEmbed#initEmbedding
* @see XPCOM#initXPCOM
* @see <a href="http://lxr.mozilla.org/mozilla/source/xpcom/io/nsIDirectoryService.idl">
* nsIDirectoryServiceProvider </a>
* @see <a href="http://lxr.mozilla.org/mozilla/source/xpcom/io/nsDirectoryServiceDefs.h">
* Directory Service property names </a>
*/
public interface AppFileLocProvider {
@@ -53,19 +62,28 @@ public interface AppFileLocProvider {
* a prop or on every request if the prop is not persistent.
*
* @param prop the symbolic name of the file
* @param persistent an array of length one used to supply the output value: <ul>
* <li><code>true</code> - The returned file will be cached
* by Directory Service. Subsequent requests for this prop
* will bypass the provider and use the cache. </li>
* <li><code>false</code> - The provider will be asked for
* this prop each time it is requested. </li>
* </ul>
* @param persistent an array of length one used to supply the output value:
* <ul>
* <li><code>true</code> - The returned file will be
* cached by Directory Service. Subsequent requests for
* this prop will bypass the provider and use the cache.
* </li>
* <li><code>false</code> - The provider will be asked
* for this prop each time it is requested. </li>
* </ul>
*
* @return the file represented by the property
*
* @see <a href="http://lxr.mozilla.org/mozilla/source/xpcom/io/nsDirectoryServiceDefs.h">
* Directory Service property names </a>
*/
public File getFile(String prop, boolean[] persistent);
/**
* Directory Service calls this when it gets a request for
* a prop and the requested type is nsISimpleEnumerator.
*
* @param prop the symbolic name of the file list
*
* @return an array for a list of file locations
*/
public File[] getFiles(String prop);
}