nsIToolkitProfileService
interface in Gecko 1.8.1.
nsISupports
Last changed in Gecko 1.6 Implemented by: @mozilla.org/profile/manager;1
. To get access to the Profile Manager service:
var profile = Components.classes["@mozilla.org/profile/manager;1"] .getService(Components.interfaces.nsIProfile);
void cloneProfile(in wstring profileName); |
void createNewProfile(in wstring profileName, in wstring nativeProfileDir, in wstring langcode, in boolean useExistingDir); |
void deleteProfile(in wstring name, in boolean canDeleteFiles); |
void getProfileList(out unsigned long length, [retval, array, size_is(length)] out wstring profileNames); |
boolean profileExists(in wstring profileName); |
void renameProfile(in wstring oldName, in wstring newName); |
void shutDownCurrentProfile(in unsigned long shutDownType); |
Attribute | Type | Description |
currentProfile |
wstring |
The name of the profile currently in use. |
profileCount |
long |
The number of profiles. Read only. |
Constant | Value | Description |
SHUTDOWN_PERSIST |
0x00000001 |
When shutting down the profile, save all changes. |
SHUTDOWN_CLEANSE |
0x00000002 |
When shutting down the profile, discard changes. Unimplemented |
Clones the current profile, creating a copy of it with a new name.
void cloneProfile( in wstring profileName );
profileName
Creates a new profile. Appropriate default values will be copied into the preferences in the new profile.
void createNewProfile( in wstring profileName, in wstring nativeProfileDir, in wstring langcode, in boolean useExistingDir );
profileName
nativeProfileDir
null
, a new folder will be created in the default profiles directory.langcode
useExistingDir
true
, an existing directory may be used; otherwise, the profile directory will be unique.Deletes the specified profile.
void deleteProfile( in wstring name, in boolean canDeleteFiles );
name
canDeleteFiles
true
, the Profile Manager will try to delete all of the profile's files and its directory.Returns an array of strings indicating the names of all the available profiles.
void getProfileList( out unsigned long length, [retval, array, size_is(length)] out wstring profileNames );
length
profileNames
array.profileNames
Determine whether or not a profile with the specified name exists.
boolean profileExists( in wstring profileName );
profileName
true
if there is a profile with the specified name.
Renames an existing profile.
void renameProfile( in wstring oldName, in wstring newName );
oldName
newName
NS_ERROR_FAILURE
newName
.Shuts down the current profile; this essentially "logs out" the current profile.
void shutDownCurrentProfile( in unsigned long shutDownType );
shutDownType