diff options
author | Matt A. Tobin <mattatobin@localhost.localdomain> | 2018-02-02 04:16:08 -0500 |
---|---|---|
committer | Matt A. Tobin <mattatobin@localhost.localdomain> | 2018-02-02 04:16:08 -0500 |
commit | 5f8de423f190bbb79a62f804151bc24824fa32d8 (patch) | |
tree | 10027f336435511475e392454359edea8e25895d /toolkit/profile/nsIToolkitProfileService.idl | |
parent | 49ee0794b5d912db1f95dce6eb52d781dc210db5 (diff) | |
download | UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.gz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.lz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.xz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.zip |
Add m-esr52 at 52.6.0
Diffstat (limited to 'toolkit/profile/nsIToolkitProfileService.idl')
-rw-r--r-- | toolkit/profile/nsIToolkitProfileService.idl | 108 |
1 files changed, 108 insertions, 0 deletions
diff --git a/toolkit/profile/nsIToolkitProfileService.idl b/toolkit/profile/nsIToolkitProfileService.idl new file mode 100644 index 000000000..46a5b3cbc --- /dev/null +++ b/toolkit/profile/nsIToolkitProfileService.idl @@ -0,0 +1,108 @@ +/* -*- Mode: IDL; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +#include "nsISupports.idl" + +interface nsISimpleEnumerator; +interface nsIFile; +interface nsIToolkitProfile; +interface nsIProfileLock; + +[scriptable, uuid(1947899b-f369-48fa-89da-f7c37bb1e6bc)] +interface nsIToolkitProfileService : nsISupports +{ + attribute boolean startWithLastProfile; + attribute boolean startOffline; + + readonly attribute nsISimpleEnumerator /*nsIToolkitProfile*/ profiles; + + /** + * The currently selected profile (the one used or about to be used by the + * browser). + */ + attribute nsIToolkitProfile selectedProfile; + + /** + * The default profile (the one used or about to be used by the + * browser if no other profile is specified at runtime). This is the profile + * marked with Default=1 in profiles.ini and is usually the same as + * selectedProfile, except on Developer Edition. + * + * Developer Edition uses a profile named "dev-edition-default" as the + * default profile (which it creates if it doesn't exist), unless a special + * empty file named "ignore-dev-edition-profile" is present next to + * profiles.ini. In that case Developer Edition behaves the same as any + * other build of Firefox. + */ + attribute nsIToolkitProfile defaultProfile; + + /** + * Get a profile by name. This is mainly for use by the -P + * commandline flag. + * + * @param aName The profile name to find. + */ + nsIToolkitProfile getProfileByName(in AUTF8String aName); + + /** + * Lock an arbitrary path as a profile. If the path does not exist, it + * will be created and the defaults copied from the application directory. + */ + nsIProfileLock lockProfilePath(in nsIFile aDirectory, + in nsIFile aTempDirectory); + + /** + * Create a new profile. + * + * The profile temporary directory will be chosen based on where the + * profile directory is located. + * + * @param aRootDir + * The profile directory. May be null, in which case a suitable + * default will be chosen based on the profile name. + * @param aName + * The profile name. + */ + nsIToolkitProfile createProfile(in nsIFile aRootDir, + in AUTF8String aName); + + /** + * Create the default profile for an application. + * + * The profile will be typically in + * {Application Data}/.profilename/{salt}.default or + * {Application Data}/.appname/{salt}.default + * or if aVendorName is provided + * {Application Data}/.vendor/appname/{salt}.default + * + * @note Either aProfileName or aAppName must be non-empty + * + * @param aProfileName + * The name of the profile + * @param aAppName + * The name of the application + * @param aVendorName + * The name of the vendor + * @return The created profile. + */ + nsIToolkitProfile createDefaultProfileForApp(in AUTF8String aProfileName, + in AUTF8String aAppName, + in AUTF8String aVendorName); + + /** + * Returns the number of profiles. + * @return 0, 1, or 2. More than 2 profiles will always return 2. + */ + readonly attribute unsigned long profileCount; + + /** + * Flush the profiles list file. + */ + void flush(); +}; + +%{C++ +#define NS_PROFILESERVICE_CONTRACTID "@mozilla.org/toolkit/profile-service;1" +%} |