* not part of the build*

Fixed 71951, 74511, 74525


git-svn-id: svn://10.0.0.236/trunk@91125 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
idk%eng.sun.com
2001-04-03 11:57:15 +00:00
parent a8c7226929
commit 64984abc73
27 changed files with 176 additions and 1020 deletions

View File

@@ -0,0 +1,42 @@
/* -*- Mode: java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
* The contents of this file are subject to the Mozilla Public
* License Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is Sun Microsystems,
* Inc. Portions created by Sun are
* Copyright (C) 1999 Sun Microsystems, Inc. All
* Rights Reserved.
*
* Contributor(s):
* Igor Kushnirskiy <idk@eng.sun.com>
*/
package org.mozilla.xpcom;
public class CID extends ID {
public CID(String cid) {
super(cid);
}
public boolean equals(Object obj) {
if (! (obj instanceof CID)) {
return false;
}
boolean res = id.equals(((CID)obj).id);
return res;
}
protected String getPrefixForToString() {
return "org.mozilla.xpcom.CID@";
}
}

View File

@@ -0,0 +1,53 @@
/* -*- Mode: java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
* The contents of this file are subject to the Mozilla Public
* License Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is Sun Microsystems,
* Inc. Portions created by Sun are
* Copyright (C) 1999 Sun Microsystems, Inc. All
* Rights Reserved.
*
* Contributor(s):
* Igor Kushnirskiy <idk@eng.sun.com>
*/
package org.mozilla.xpcom;
public class ID {
public ID(String id) {
this.id = ((id == null) ? "" : id).toLowerCase();;
}
public boolean equals(Object obj) {
if (! (obj instanceof IID)) {
return false;
}
boolean res = id.equals(((ID)obj).id);
return res;
}
public String toString() {
return getPrefixForToString()+id;
}
public int hashCode() {
int h = id.hashCode();
return h;
}
public String getString() {
return id;
}
protected String id;
protected String getPrefixForToString() {
return "org.mozilla.xpcom.ID@";
}
}

View File

@@ -21,37 +21,21 @@
*/
package org.mozilla.xpcom;
public class IID {
public class IID extends ID {
public IID(String iid) {
this.iid = ((iid == null) ? "" : iid).toLowerCase();;
super(iid);
}
public boolean equals(Object obj) {
if (! (obj instanceof IID)) {
return false;
}
boolean res = iid.equals(((IID)obj).iid);
boolean res = id.equals(((IID)obj).id);
return res;
}
public String toString() {
return "org.mozilla.xpcom.IID@"+iid;
protected String getPrefixForToString() {
return "org.mozilla.xpcom.IID@";
}
public int hashCode() {
int h = iid.hashCode();
return h;
}
public String getString() {
return iid;
}
private String iid;
public static Class TYPE;
static {
try {
TYPE = Class.forName("org.mozilla.xpcom.Proxy");
} catch (Exception e) { //it could not happen
TYPE = null;
}
}
}

View File

@@ -86,12 +86,12 @@ public class InterfaceRegistry {
private static Hashtable registerInterfaces(Class cl) {
try {
Object iidStr = cl.getField(IID_STRING).get(cl);
if (iidStr instanceof String) {
IID iid = new IID((String)iidStr);
Object iidTmp = cl.getField(IID_STRING).get(cl);
if (iidTmp instanceof IID) {
IID iid = (IID)iidTmp;
// if this iface hasn't been registered, yet
if (interfaces.get(iid) == null) {
String[] methodNames = Utilities.getInterfaceMethodNames((String)iidStr);
String[] methodNames = Utilities.getInterfaceMethodNames(iid.getString());
if (methodNames != null) {
Method[] rmethods = new Method[methodNames.length];
Class[] ifaces = cl.getInterfaces();

View File

@@ -1,330 +0,0 @@
/*
* ************* DO NOT EDIT THIS FILE ***********
*
* This file was automatically generated from nsIComponentManager.idl.
*/
package org.mozilla.xpcom;
/**
* Interface nsIComponentManager
*
* IID: 0x8458a740-d5dc-11d2-92fb-00e09805570f
*/
public interface nsIComponentManager extends nsISupports
{
public static final String IID =
"8458a740-d5dc-11d2-92fb-00e09805570f";
/**
* findFactory
*
* Returns the factory object that can be used to create instances of
* CID aClass
*
* @param aClass The classid of the factory that is being requested
*/
/* nsIFactory findFactory (in nsCIDRef aClass); */
public nsIFactory findFactory(IID aClass);
/**
* getClassObject
*
* @param aClass : CID of the class whose class object is requested
* @param aIID : IID of an interface that the class object is known to
* to implement. nsISupports and nsIFactory are known to
* be implemented by the class object.
*/
/**
* contractIDToClassID
*
* Get the ClassID for a given ContractID. Many ClassIDs may implement a
* ContractID. In such a situation, this returns the preferred ClassID, which
* happens to be the last registered ClassID.
*
* @param aContractID : Contractid for which ClassID is requested
* @return aClass : ClassID return
*/
/**
* classIDToContractid
*
* Get the ContractID for a given ClassID. A ClassIDs may implement multiple
* ContractIDs. This function return the last registered ContractID.
*
* @param aClass : ClassID for which ContractID is requested.
* @return aClassName : returns class name asssociated with aClass
* @return : ContractID last registered for aClass
*/
/* string CLSIDToContractID (in nsCIDRef aClass, out string aClassName); */
public String cLSIDToContractID(IID aClass, String[] aClassName);
/**
* createInstance
*
* Create an instance of the CID aClass and return the interface aIID.
*
* @param aClass : ClassID of object instance requested
* @param aDelegate : Used for aggregation
* @param aIID : IID of interface requested
*/
/**
* createInstanceByContractID
*
* Create an instance of the CID that implements aContractID and return the
* interface aIID. This is a convenience function that effectively does
* ContractIDToClassID() followed by CreateInstance().
*
* @param aContractID : aContractID of object instance requested
* @param aDelegate : Used for aggregation
* @param aIID : IID of interface requested
*/
/**
* registryLocationForSpec
*
* Given a file specification, return the registry representation of
* the filename. Files that are found relative to the components
* directory will have a registry representation
* "rel:<relative-native-path>" while filenames that are not, will have
* "abs:<full-native-path>".
*/
/* string registryLocationForSpec (in nsIFile aSpec); */
public String registryLocationForSpec(nsIFile aSpec);
/**
* specForRegistyLocation
*
* Create a file specification for the registry representation (rel:/abs:)
* got via registryLocationForSpec.
*/
/* nsIFile specForRegistryLocation (in string aLocation); */
public nsIFile specForRegistryLocation(String aLocation);
/**
* registerFactory
*
* Register a factory and ContractID associated with CID aClass
*
* @param aClass : CID of object
* @param aClassName : Class Name of CID
* @param aContractID : ContractID associated with CID aClass
* @param aFactory : Factory that will be registered for CID aClass
* @param aReplace : Boolean that indicates whether to replace a previous
* registration for the CID aClass.
*/
/* void registerFactory (in nsCIDRef aClass, in string aClassName, in string aContractID, in nsIFactory aFactory, in boolean aReplace); */
public void registerFactory(IID aClass, String aClassName, String aContractID, nsIFactory aFactory, boolean aReplace);
/**
* registerComponent
*
* Register a native dll module via its registry representation as returned
* by registryLocationForSpec() as the container of CID implemenation
* aClass and associate aContractID and aClassName to the CID aClass. Native
* dll component type is assumed.
*
* @param aClass : CID implemenation contained in module
* @param aClassName : Class name associated with CID aClass
* @param aContractID : ContractID associated with CID aClass
* @param aLocation : Location of module (dll). Format of this is the
* registry representation as returned by
* registryLocationForSpec()
* @param aReplace : Boolean that indicates whether to replace a previous
* module registration for aClass.
* @param aPersist : Remember this registration across sessions.
*/
/* void registerComponent (in nsCIDRef aClass, in string aClassName, in string aContractID, in string aLocation, in boolean aReplace, in boolean aPersist); */
public void registerComponent(IID aClass, String aClassName, String aContractID, String aLocation, boolean aReplace, boolean aPersist);
/**
* registerComponentWithType
*
* Register a module's location via its registry representation
* as returned by registryLocationForSpec() as the container of CID implemenation
* aClass of type aType and associate aContractID and aClassName to the CID aClass.
*
* @param aClass : CID implemenation contained in module
* @param aClassName : Class name associated with CID aClass
* @param aContractID : ContractID associated with CID aClass
* @param aSpec : Filename spec for module's location.
* @param aLocation : Location of module of type aType. Format of this string
* is the registry representation as returned by
* registryLocationForSpec()
* @param aReplace : Boolean that indicates whether to replace a previous
* loader registration for aClass.
* @param aPersist : Remember this registration across sessions.
* @param aType : Component Type of CID aClass.
*/
/* void registerComponentWithType (in nsCIDRef aClass, in string aClassName, in string aContractID, in nsIFile aSpec, in string aLocation, in boolean aReplace, in boolean aPersist, in string aType); */
public void registerComponentWithType(IID aClass, String aClassName, String aContractID, nsIFile aSpec, String aLocation, boolean aReplace, boolean aPersist, String aType);
/**
* registerComponentSpec
*
* Register a native dll module via its file specification as the container
* of CID implemenation aClass and associate aContractID and aClassName to the
* CID aClass. Native dll component type is assumed.
*
* @param aClass : CID implemenation contained in module
* @param aClassName : Class name associated with CID aClass
* @param aContractID : ContractID associated with CID aClass
* @param aLibrary : File specification Location of module (dll).
* @param aReplace : Boolean that indicates whether to replace a previous
* module registration for aClass.
* @param aPersist : Remember this registration across sessions.
*/
/* void registerComponentSpec (in nsCIDRef aClass, in string aClassName, in string aContractID, in nsIFile aLibrary, in boolean aReplace, in boolean aPersist); */
public void registerComponentSpec(IID aClass, String aClassName, String aContractID, nsIFile aLibrary, boolean aReplace, boolean aPersist);
/**
* registerComponentLib
*
* Register a native dll module via its dll name (not full path) as the
* container of CID implemenation aClass and associate aContractID and aClassName
* to the CID aClass. Native dll component type is assumed and the system
* services will be used to load this dll.
*
* @param aClass : CID implemenation contained in module
* @param aClassName : Class name associated with CID aClass
* @param aContractID : ContractID associated with CID aClass
* @param aDllNameLocation : Dll name of module.
* @param aReplace : Boolean that indicates whether to replace a previous
* module registration for aClass.
* @param aPersist : Remember this registration across sessions.
*/
/* void registerComponentLib (in nsCIDRef aClass, in string aClassName, in string aContractID, in string aDllName, in boolean aReplace, in boolean aPersist); */
public void registerComponentLib(IID aClass, String aClassName, String aContractID, String aDllName, boolean aReplace, boolean aPersist);
/**
* unregisterFactory
*
* Unregister a factory associated with CID aClass.
*
* @param aClass : ClassID being unregistered
* @param aFactory : Factory previously registered to create instances of
* ClassID aClass.
*/
/* void unregisterFactory (in nsCIDRef aClass, in nsIFactory aFactory); */
public void unregisterFactory(IID aClass, nsIFactory aFactory);
/**
* unregisterComponent
*
* Disassociate module aLocation represented as registry location as returned
* by registryLocationForSpec() as containing ClassID aClass.
*
* @param aClass : ClassID being unregistered
* @param aLocation : Location of module. Format of this is the registry
* representation as returned by registryLocationForSpec().
* Components of any type will be unregistered.
*/
/* void unregisterComponent (in nsCIDRef aClass, in string aLocation); */
public void unregisterComponent(IID aClass, String aLocation);
/**
* unregisterComponentSpec
*
* Disassociate module references by file specification aLibrarySpec as
* containing ClassID aClass.
*/
/* void unregisterComponentSpec (in nsCIDRef aClass, in nsIFile aLibrarySpec); */
public void unregisterComponentSpec(IID aClass, nsIFile aLibrarySpec);
/**
* freeLibraries
*
* Enumerates all loaded modules and unloads unused modules.
*/
/* void freeLibraries (); */
public void freeLibraries();
/**
* ID values for 'when'
*/
/* const long NS_Startup = 0; */
public static final int NS_Startup = 0;
/* const long NS_Script = 1; */
public static final int NS_Script = 1;
/* const long NS_Timer = 2; */
public static final int NS_Timer = 2;
/* const long NS_Shutdown = 3; */
public static final int NS_Shutdown = 3;
/**
* autoRegister
*
* Enumerates directory looking for modules of all types and registers
* modules who have changed (modtime or size) since the last time
* autoRegister() was invoked.
*
* @param when : ID values of when the call is being made.
* @param directory : Directory the will be enumerated.
*/
/* void autoRegister (in long when, in nsIFile directory); */
public void autoRegister(int when, nsIFile directory);
/**
* autoRegisterComponent
*
* Loads module using appropriate loader and gives it an opportunity to
* register its CIDs if module's modtime or size changed since the last
* time this was called.
*
* @param when : ID values of when the call is being made.
* @param aFileLocation : File specification of module.
*/
/* void autoRegisterComponent (in long when, in nsIFile aFileLocation); */
public void autoRegisterComponent(int when, nsIFile aFileLocation);
/**
* autoUnregisterComponent
*
* Loads module using approriate loader and gives it an opportunity to
* unregister its CIDs
*/
/* void autoUnregisterComponent (in long when, in nsIFile aFileLocation); */
public void autoUnregisterComponent(int when, nsIFile aFileLocation);
/**
* isRegistered
*
* Returns true if a factory or module is registered for CID aClass.
*
* @param aClass : ClassID queried for registeration
* @return : true if a factory or module is registered for CID aClass.
* false otherwise.
*/
/* boolean isRegistered (in nsCIDRef aClass); */
public boolean isRegistered(IID aClass);
/**
* enumerateCLSIDs
*
* Enumerate the list of all registered ClassIDs.
*
* @return : enumerator for ClassIDs.
*/
/* nsIEnumerator enumerateCLSIDs (); */
public nsIEnumerator enumerateCLSIDs();
/**
* enumerateContractIDs
*
* Enumerate the list of all registered ContractIDs.
*
* @return : enumerator for ContractIDs.
*/
/* nsIEnumerator enumerateContractIDs (); */
public nsIEnumerator enumerateContractIDs();
}
/*
* end
*/

View File

@@ -1,49 +0,0 @@
/*
* ************* DO NOT EDIT THIS FILE ***********
*
* This file was automatically generated from nsIEnumerator.idl.
*/
package org.mozilla.xpcom;
/**
* Interface nsIEnumerator
*
* IID: 0xad385286-cbc4-11d2-8cca-0060b0fc14a3
*/
public interface nsIEnumerator extends nsISupports
{
public static final String IID =
"ad385286-cbc4-11d2-8cca-0060b0fc14a3";
/** First will reset the list. will return NS_FAILED if no items
*/
/* void first (); */
public void first();
/** Next will advance the list. will return failed if already at end
*/
/* void next (); */
public void next();
/** CurrentItem will return the CurrentItem item it will fail if the
* list is empty
*/
/* nsISupports currentItem (); */
public nsISupports currentItem();
/** return if the collection is at the end. that is the beginning following
* a call to Prev and it is the end of the list following a call to next
*/
/* void isDone (); */
public void isDone();
}
/*
* end
*/

View File

@@ -1,33 +0,0 @@
/*
* ************* DO NOT EDIT THIS FILE ***********
*
* This file was automatically generated from nsIFactory.idl.
*/
package org.mozilla.xpcom;
/**
* Interface nsIFactory
*
* IID: 0x00000001-0000-0000-c000-000000000046
*/
public interface nsIFactory extends nsISupports
{
public static final String IID =
"00000001-0000-0000-c000-000000000046";
/* void createInstance (in nsISupports aOuter, in nsIIDRef iid, [iid_is (iid), retval] out nsQIResult result); */
public Object createInstance(nsISupports aOuter, IID iid);
/* void lockFactory (in PRBool lock); */
public void lockFactory(boolean lock);
}
/*
* end
*/

View File

@@ -1,365 +0,0 @@
/*
* ************* DO NOT EDIT THIS FILE ***********
*
* This file was automatically generated from nsIFile.idl.
*/
package org.mozilla.xpcom;
/**
* Interface nsIFile
*
* IID: 0xc8c0a080-0868-11d3-915f-d9d889d48e3c
*/
public interface nsIFile extends nsISupports
{
public static final String IID =
"c8c0a080-0868-11d3-915f-d9d889d48e3c";
/**
* Create Types
*
* NORMAL_FILE_TYPE - A normal file.
* DIRECTORY_TYPE - A directory/folder.
*/
/* const unsigned long NORMAL_FILE_TYPE = 0; */
public static final int NORMAL_FILE_TYPE = 0;
/* const unsigned long DIRECTORY_TYPE = 1; */
public static final int DIRECTORY_TYPE = 1;
/**
* appendPath
*
* This function is used for constructing a descendant of the
* current nsIFile.
*
* @param relativePath
* A string which is intented to be a child node of the
* nsIFile.
*/
/* void append ([const] in string node); */
public void append(String node);
/* void appendUnicode ([const] in wstring node); */
public void appendUnicode(String node);
/**
* Normalize the pathName (e.g. removing .. and . components on Unix).
*/
/* void normalize (); */
public void normalize();
/**
* create
*
* This function will create a new file or directory in the
* file system. Any nodes that have not been created or
* resolved, will be. If the file or directory already
* exists create() will return NS_ERROR_FILE_ALREADY_EXISTS.
*
* @param type
* This specifies the type of file system object
* to be made. The only two types at this time
* are file and directory which are defined above.
* If the type is unrecongnized, we will return an
* error (NS_ERROR_FILE_UNKNOWN_TYPE).
*
* @param permissions
* The unix style octal permissions. This may
* be ignored on systems that do not need to do
* permissions.
*/
/* void create (in unsigned long type, in unsigned long permissions); */
public void create(int type, int permissions);
/**
* Accessor to the leaf name of the file itself.
*/
/* attribute string leafName; */
public String getLeafName();
public void setLeafName(String value);
/* attribute wstring unicodeLeafName; */
public String getUnicodeLeafName();
public void setUnicodeLeafName(String value);
/**
* copyTo
*
* This will copy this file to the specified newParentDir.
* If a newName is specified, the file will be renamed.
* If 'this' is not created we will return an error
* (NS_ERROR_FILE_TARGET_DOES_NOT_EXIST).
*
* copyTo will NOT resolve aliases/shortcuts during the copy.
*
* @param newParentDir
* This param is the destination directory. If the
* newParentDir is null, copyTo() will use the parent
* directory of this file. If the newParentDir is not
* null and is not a directory, an error will be
* returned (NS_ERROR_FILE_DESTINATION_NOT_DIR)
*
* @param newName
* This param allows you to specify a new name for
* the file to be copied. This param may be null, in
* which case the current leaf name will be used.
*
*/
/* void copyTo (in nsIFile newParentDir, [const] in string newName); */
public void copyTo(nsIFile newParentDir, String newName);
/* void copyToUnicode (in nsIFile newParentDir, [const] in wstring newName); */
public void copyToUnicode(nsIFile newParentDir, String newName);
/**
* copyToFollowingLinks
*
* This function is identical to copyTo except it, as
* the name implies, follows symbolic links. Some OSes
* such as Unix and Linux always follow symbolic links
* when copying.
*/
/* void copyToFollowingLinks (in nsIFile newParentDir, [const] in string newName); */
public void copyToFollowingLinks(nsIFile newParentDir, String newName);
/* void copyToFollowingLinksUnicode (in nsIFile newParentDir, [const] in wstring newName); */
public void copyToFollowingLinksUnicode(nsIFile newParentDir, String newName);
/**
* moveTo
*
* This will move this file to the specified newParentDir.
* If a newName is specified, the file will be renamed.
* If 'this' is not created we will return an error
* (NS_ERROR_FILE_TARGET_DOES_NOT_EXIST).
*
* moveTo will NOT resolve aliases/shortcuts during the copy.
* moveTo will do the right thing and allow copies across
* volumes.
*
* @param newParentDir
* This param is the destination directory. If the
* newParentDir is null, moveTo() will rename the file
* within its current directory. If the newParentDir is
* not null and does not name a directory, an error will
* be returned (NS_ERROR_FILE_DESTINATION_NOT_DIR)
*
* @param newName
* This param allows you to specify a new name for
* the file to be moved. This param may be null, in
* which case the current leaf name will be used.
*
*/
/* void moveTo (in nsIFile newParentDir, [const] in string newName); */
public void moveTo(nsIFile newParentDir, String newName);
/* void moveToUnicode (in nsIFile newParentDir, [const] in wstring newName); */
public void moveToUnicode(nsIFile newParentDir, String newName);
/**
* This will try to execute this file. It will not block for
* execution. 'args' will be passed through on the command line
* if the OS supports that.
*/
/* void spawn ([array, size_is (count)] in string args, in unsigned long count); */
public void spawn(String[] args, int count);
/**
* This will try to delete this file. The 'recursive' flag
* must be PR_TRUE to delete directories which are not empty.
*
* This will not resolve any symlinks.
*/
/* void delete (in boolean recursive); */
public void delete(boolean recursive);
/**
* Attributes of nsIFile.
*/
/* attribute unsigned long permissions; */
public int getPermissions();
public void setPermissions(int value);
/* attribute unsigned long permissionsOfLink; */
public int getPermissionsOfLink();
public void setPermissionsOfLink(int value);
/**
* File Times are to be in milliseconds from
* midnight (00:00:00), January 1, 1970 Greenwich Mean
* Time (GMT).
*/
/* attribute PRInt64 lastModificationDate; */
public long getLastModificationDate();
public void setLastModificationDate(long value);
/* attribute PRInt64 lastModificationDateOfLink; */
public long getLastModificationDateOfLink();
public void setLastModificationDateOfLink(long value);
/**
* WARNING! On the Mac getting/setting the file size with nsIFile
* only deals with the size of the data fork. If you need to
* know the size of the combined data and resource forks use the
* GetFileSizeWithResFork() method defined in nsILocalFileMac.h
*/
/* attribute PRInt64 fileSize; */
public long getFileSize();
public void setFileSize(long value);
/* readonly attribute PRInt64 fileSizeOfLink; */
public long getFileSizeOfLink();
/**
* target & path
*
* Accessor to the string path. These strings are
* not guaranteed to be a usable path to pass to NSPR
* or the C stdlib. There are problems that affect
* platforms on which a path does not fully specify a
* file, because two volumes can have the same name.
* This is solved by holding "private", native data in
* the nsIFile implementation. This native data is lost
* when you convert to a string.
*
* DO NOT PASS TO USE WITH NSPR OR STDLIB.
*
* target:
* Find out what the symlink points at. Will give error
* (NS_ERROR_FILE_INVALID_PATH) if not a symlink.
*
* path:
* Find out what the nsIFile points at.
*/
/* readonly attribute string target; */
public String getTarget();
/* readonly attribute wstring unicodeTarget; */
public String getUnicodeTarget();
/* readonly attribute string path; */
public String getPath();
/* readonly attribute wstring unicodePath; */
public String getUnicodePath();
/* boolean exists (); */
public boolean exists();
/* boolean isWritable (); */
public boolean isWritable();
/* boolean isReadable (); */
public boolean isReadable();
/* boolean isExecutable (); */
public boolean isExecutable();
/* boolean isHidden (); */
public boolean isHidden();
/* boolean isDirectory (); */
public boolean isDirectory();
/* boolean isFile (); */
public boolean isFile();
/* boolean isSymlink (); */
public boolean isSymlink();
/**
* Not a regular file, not a directory, not a symlink.
*/
/* boolean isSpecial (); */
public boolean isSpecial();
/**
* createUnique
*
* This function will create a new file or directory in the
* file system. Any nodes that have not been created or
* resolved, will be. If this file already exists, we try
* variations on the leaf name "suggestedName" until we find
* one that did not already exist.
*
* If the search for nonexistent files takes too long
* (thousands of the variants already exist), we give up and
* return NS_ERROR_FILE_TOO_BIG.
*
* @param type
* This specifies the type of file system object
* to be made. The only two types at this time
* are file and directory which are defined above.
* If the type is unrecongnized, we will return an
* error (NS_ERROR_FILE_UNKNOWN_TYPE).
*
* @param permissions
* The unix style octal permissions. This may
* be ignored on systems that do not need to do
* permissions.
*/
/* void createUnique (in string suggestedName, in unsigned long type, in unsigned long permissions); */
public void createUnique(String suggestedName, int type, int permissions);
/**
* clone()
*
* This function will allocate and initialize a nsIFile object to the
* exact location of the |this| nsIFile.
*
* @param file
* A nsIFile which this object will be initialize
* with.
*
*/
/* nsIFile clone (); */
/* public nsIFile clone(); */
/**
* Will determine if the inFile equals this.
*/
/* boolean equals (in nsIFile inFile); */
public boolean equals(nsIFile inFile);
/**
* Will determine if inFile is a descendant of this file
* If |recur| is true, look in subdirectories too
*/
/* boolean contains (in nsIFile inFile, in boolean recur); */
public boolean contains(nsIFile inFile, boolean recur);
/**
* Parent will be null when this is at the top of the volume.
*/
/* readonly attribute nsIFile parent; */
public nsIFile getParent();
/**
* Returns an enumeration of the elements in a directory. Each
* element in the enumeration is an nsIFile.
*
* @return NS_ERROR_FILE_NOT_DIRECTORY if the current nsIFile does
* not specify a directory.
*/
/* readonly attribute nsISimpleEnumerator directoryEntries; */
public nsISimpleEnumerator getDirectoryEntries();
/**
* Accesses the file: url for the nsIFile. Setting this causes the path
* to be reset.
*/
/* attribute string URL; */
public String getURL();
public void setURL(String value);
}
/*
* end
*/

View File

@@ -1,33 +0,0 @@
/*
* ************* DO NOT EDIT THIS FILE ***********
*
* This file was automatically generated from nsIEnumerator.idl.
*/
package org.mozilla.xpcom;
/**
* Interface nsISimpleEnumerator
*
* IID: 0xD1899240-F9D2-11D2-BDD6-000064657374
*/
public interface nsISimpleEnumerator extends nsISupports
{
public static final String IID =
"D1899240-F9D2-11D2-BDD6-000064657374";
/* boolean hasMoreElements (); */
public boolean hasMoreElements();
/* nsISupports getNext (); */
public nsISupports getNext();
}
/*
* end
*/

View File

@@ -1,30 +0,0 @@
/*
* ************* DO NOT EDIT THIS FILE ***********
*
* This file was automatically generated from nsISupports.idl.
*/
package org.mozilla.xpcom;
/**
* Interface nsISupports
*
* IID: 0x00000000-0000-0000-c000-000000000046
*/
public interface nsISupports
{
public static final String IID =
"00000000-0000-0000-c000-000000000046";
/* void QueryInterface (in nsIIDRef uuid, [iid_is (uuid), retval] out nsQIResult result); */
public Object queryInterface(IID uuid);
}
/*
* end
*/

View File

@@ -1,37 +0,0 @@
/*
* ************* DO NOT EDIT THIS FILE ***********
*
* This file was automatically generated from nsISupportsPrimitives.idl.
*/
package org.mozilla.xpcom;
/**
* Interface nsISupportsString
*
* IID: 0xd65ff270-4a1c-11d3-9890-006008962422
*/
public interface nsISupportsString extends nsISupports
{
public static final String IID =
"d65ff270-4a1c-11d3-9890-006008962422";
/* attribute string data; */
public String getData();
public void setData(String value);
/* string toString (); */
public String toString_();
/* void setDataWithLength (in unsigned long length, [size_is (length)] in string data); */
public void setDataWithLength(int length, String data);
}
/*
* end
*/