Back to index

lightning-sunbird  0.9+nobinonly
Public Member Functions
org.mozilla.xpcom.internal.GREImpl Class Reference
Inheritance diagram for org.mozilla.xpcom.internal.GREImpl:
Inheritance graph
[legend]
Collaboration diagram for org.mozilla.xpcom.internal.GREImpl:
Collaboration graph
[legend]

List of all members.

Public Member Functions

void initEmbedding (File aLibXULDirectory, File aAppDirectory, IAppFileLocProvider aAppDirProvider)
 Initializes libXUL for embedding purposes.
native void initEmbeddingNative (File aLibXULDirectory, File aAppDirectory, IAppFileLocProvider aAppDirProvider)
native void termEmbedding ()
 Terminates libXUL embedding.
native ProfileLock lockProfileDirectory (File aDirectory)
 Lock a profile directory using platform-specific semantics.
native void notifyProfile ()
 Fire notifications to inform the toolkit about a new profile.

Detailed Description

Definition at line 46 of file GREImpl.java.


Member Function Documentation

void org.mozilla.xpcom.internal.GREImpl.initEmbedding ( File  aLibXULDirectory,
File  aAppDirectory,
IAppFileLocProvider  aAppDirProvider 
) [inline]

Initializes libXUL for embedding purposes.

NOTE: This function must be called from the "main" thread.

NOTE: At the present time, this function may only be called once in a given process. Use termEmbedding to clean up and free resources allocated by initEmbedding.

Parameters:
aLibXULDirectoryThe directory in which the libXUL shared library was found.
aAppDirectoryThe directory in which the application components and resources can be found. This will map to the "resource:app" directory service key.
aAppDirProviderA directory provider for the application. This provider will be aggregated by a libXUL provider which will provide the base required GRE keys.
Exceptions:
XPCOMExceptionif a failure occurred during initialization

Implements org.mozilla.xpcom.IGRE.

Definition at line 48 of file GREImpl.java.

                                               {
    initEmbeddingNative(aLibXULDirectory, aAppDirectory, aAppDirProvider);
  }

Here is the call graph for this function:

native void org.mozilla.xpcom.internal.GREImpl.initEmbeddingNative ( File  aLibXULDirectory,
File  aAppDirectory,
IAppFileLocProvider  aAppDirProvider 
)

Here is the caller graph for this function:

Lock a profile directory using platform-specific semantics.

Parameters:
aDirectoryThe profile directory to lock.
Returns:
A lock object. The directory will remain locked until the lock is released by invoking the release method, or by the termination of the JVM, whichever comes first.
Exceptions:
XPCOMExceptionif a failure occurred

Implements org.mozilla.xpcom.IGRE.

Fire notifications to inform the toolkit about a new profile.

This method should be called after initEmbedding if the embedder wishes to run with a profile.

Normally the embedder should call lockProfileDirectory to lock the directory before calling this method.

NOTE: There are two possibilities for selecting a profile:

  • Select the profile before calling initEmbedding. The aAppDirProvider object passed to initEmbedding should provide the NS_APP_USER_PROFILE_50_DIR key, and may also provide the following keys:
    • NS_APP_USER_PROFILE_LOCAL_50_DIR
    • NS_APP_PROFILE_DIR_STARTUP
    • NS_APP_PROFILE_LOCAL_DIR_STARTUP
    In this scenario notifyProfile should be called immediately after initEmbedding. Component registration information will be stored in the profile and JS components may be stored in the fastload cache.
  • Select a profile some time after calling initEmbedding. In this case the embedder must install a directory service provider which provides NS_APP_USER_PROFILE_50_DIR and optionally NS_APP_USER_PROFILE_LOCAL_50_DIR. Component registration information will be stored in the application directory and JS components will not fastload.

Implements org.mozilla.xpcom.IGRE.

Terminates libXUL embedding.

NOTE: Release any references to XPCOM objects that you may be holding before calling this function.

Implements org.mozilla.xpcom.IGRE.


The documentation for this class was generated from the following file: