* NOT PART OF TBOX BUILD *
java uses general syntax for return values.
(idl: void test0([retval] out long l); will be
java: long test0(); intead of
java void test0(long[] l);
)
author=sdv@sparc.spb.su
git-svn-id: svn://10.0.0.236/trunk@80566 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -136,11 +136,15 @@ public class InterfaceRegistry {
|
||||
public static int getIndexByMethod(Method method, IID iid) {
|
||||
int result = -1;
|
||||
MethodArray m = (MethodArray)iMethods.get(iid);
|
||||
String methodName = method.getName();
|
||||
if (m != null && m.methods !=null) {
|
||||
|
||||
for (int i = 0; i < m.methods.length; i++) {
|
||||
if (method.equals(m.methods[i])) {
|
||||
result = i;
|
||||
break;
|
||||
if (m.methods[i] != null) {
|
||||
if (methodName.equals(m.methods[i].getName())) {
|
||||
result = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -33,10 +33,12 @@ class ProxyHandler implements InvocationHandler {
|
||||
Method method,
|
||||
Object[] args) throws Throwable {
|
||||
System.out.println("--[java]ProxyHandler.invoke "+method);
|
||||
if ("toString".equals(method.getName()) &&
|
||||
(method.getParameterTypes()).length == 0) { //it is String toString() method
|
||||
return "ProxyObject@{oid = "+oid+" iid = "+iid+"}";
|
||||
}
|
||||
/*
|
||||
*if ("toString".equals(method.getName()) &&
|
||||
* (method.getParameterTypes()).length == 0) { //it is String toString() method
|
||||
* return "ProxyObject@{oid = "+oid+" iid = "+iid+"}";
|
||||
*}
|
||||
*/
|
||||
return Utilities.callMethod(oid, method, iid, orb, args);
|
||||
}
|
||||
private long oid;
|
||||
|
||||
@@ -27,6 +27,7 @@ public class Utilities {
|
||||
|
||||
static Object callMethodByIndex(Object obj, IID iid, int mid, Object[] args) {
|
||||
System.out.println("--[java]org.mozilla.xpcom.Utilities.callMethodByIndex "+args.length+" "+mid);
|
||||
Object retObject = null;
|
||||
for (int i = 0; i < args.length; i++) {
|
||||
System.out.println("--[java]callMethodByIndex args["+i+"] = "+args[i]);
|
||||
}
|
||||
@@ -34,13 +35,14 @@ public class Utilities {
|
||||
System.out.println("--[java] org.mozilla.xpcom.Utilities.callMethodByIndex method "+method);
|
||||
try {
|
||||
if (method != null) {
|
||||
method.invoke(obj,args);
|
||||
retObject = method.invoke(obj,args);
|
||||
System.out.println("--[java] Utilities.callMethodByIndex: retObject = " + retObject);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
System.out.println("--callMethodByIndex method finished"+method);
|
||||
return null; //nb for testing
|
||||
System.out.println("--[java] Utilities.callMethodByIndex method finished"+method);
|
||||
return retObject;
|
||||
}
|
||||
|
||||
static Object callMethod(long oid, Method method, IID iid, long orb , Object[] args) {
|
||||
|
||||
@@ -19,45 +19,230 @@ 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 void findFactory(IID aClass, nsIFactory[] _retval);
|
||||
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 void cLSIDToContractID(IID aClass, String[] aClassName, String[] _retval);
|
||||
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 void registryLocationForSpec(nsISupports aSpec, String[] _retval);
|
||||
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 void specForRegistryLocation(String aLocation, nsISupports[] _retval);
|
||||
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, nsISupports aSpec, String aLocation, boolean aReplace, boolean aPersist, 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, nsISupports aLibrary, boolean aReplace, 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, nsISupports 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;
|
||||
@@ -70,24 +255,73 @@ public interface nsIComponentManager extends nsISupports
|
||||
|
||||
/* 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, nsISupports 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, nsISupports 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, nsISupports 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 void isRegistered(IID aClass, boolean[] _retval);
|
||||
public boolean isRegistered(IID aClass);
|
||||
/**
|
||||
* enumerateCLSIDs
|
||||
*
|
||||
* Enumerate the list of all registered ClassIDs.
|
||||
*
|
||||
* @return : enumerator for ClassIDs.
|
||||
*/
|
||||
|
||||
/* nsIEnumerator enumerateCLSIDs (); */
|
||||
public void enumerateCLSIDs(nsIEnumerator[] _retval);
|
||||
public nsIEnumerator enumerateCLSIDs();
|
||||
/**
|
||||
* enumerateContractIDs
|
||||
*
|
||||
* Enumerate the list of all registered ContractIDs.
|
||||
*
|
||||
* @return : enumerator for ContractIDs.
|
||||
*/
|
||||
|
||||
/* nsIEnumerator enumerateContractIDs (); */
|
||||
public void enumerateContractIDs(nsIEnumerator[] _retval);
|
||||
public nsIEnumerator enumerateContractIDs();
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -19,15 +19,25 @@ 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 void currentItem(nsISupports[] _retval);
|
||||
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();
|
||||
|
||||
@@ -21,7 +21,7 @@ public interface nsIFactory extends nsISupports
|
||||
|
||||
|
||||
/* void createInstance (in nsISupports aOuter, in nsIIDRef iid, [iid_is (iid), retval] out nsQIResult result); */
|
||||
public void createInstance(nsISupports aOuter, IID iid, Object[] result);
|
||||
public Object createInstance(nsISupports aOuter, IID iid);
|
||||
|
||||
/* void lockFactory (in PRBool lock); */
|
||||
public void lockFactory(boolean lock);
|
||||
|
||||
365
mozilla/java/xpcom/java/classes/org/mozilla/xpcom/nsIFile.java
Normal file
365
mozilla/java/xpcom/java/classes/org/mozilla/xpcom/nsIFile.java
Normal file
@@ -0,0 +1,365 @@
|
||||
/*
|
||||
* ************* 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
|
||||
*/
|
||||
@@ -0,0 +1,33 @@
|
||||
/*
|
||||
* ************* 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
|
||||
*/
|
||||
@@ -21,7 +21,7 @@ public interface nsISupports
|
||||
|
||||
|
||||
/* void QueryInterface (in nsIIDRef uuid, [iid_is (uuid), retval] out nsQIResult result); */
|
||||
public void queryInterface(IID uuid, Object[] result);
|
||||
public Object queryInterface(IID uuid);
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* ************* DO NOT EDIT THIS FILE ***********
|
||||
*
|
||||
* This file was automatically generated from nsISupportsString.idl.
|
||||
* This file was automatically generated from nsISupportsPrimitives.idl.
|
||||
*/
|
||||
|
||||
|
||||
@@ -20,8 +20,15 @@ public interface nsISupportsString extends nsISupports
|
||||
"d65ff270-4a1c-11d3-9890-006008962422";
|
||||
|
||||
|
||||
/* attribute string data; */
|
||||
public String getData();
|
||||
public void setData(String value);
|
||||
|
||||
/* string toString (); */
|
||||
public void toString(String[] _retval);
|
||||
public String toString();
|
||||
|
||||
/* void setDataWithLength (in unsigned long length, [size_is (length)] in string data); */
|
||||
public void setDataWithLength(int length, String data);
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user