1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6 #include
"nsISupports.idl"
10 * Helper interface for nsIProfileMigrator.
12 * @provider Toolkit (Startup code)
13 * @client Application (Profile-migration code)
14 * @obtainable nsIProfileMigrator.migrate
16 [scriptable
, uuid(048e5ca1
-0eb7
-4bb1
-a9a2
-a36f7d4e0e3c
)]
17 interface nsIProfileStartup
: nsISupports
20 * The root directory of the semi-current profile, during profile migration.
21 * After nsIProfileMigrator.migrate has returned, this object will not be
24 readonly attribute nsIFile directory
;
27 * Do profile-startup by setting NS_APP_USER_PROFILE_50_DIR in the directory
28 * service and notifying the profile-startup observer topics.
34 * Migrate application settings from an outside source.
36 * @provider Application (Profile-migration code)
37 * @client Toolkit (Startup code)
38 * @obtainable service, contractid("@mozilla.org/toolkit/profile-migrator;1")
40 [scriptable
, uuid(3df284a5
-2258-4d46
-a664
-761ecdc04c22
)]
41 interface nsIProfileMigrator
: nsISupports
44 * Migrate data from an outside source, if possible. Does nothing
47 * When this method is called, a default profile has been created;
48 * XPCOM has been initialized such that compreg.dat is in the
49 * profile; the directory service does *not* return a key for
50 * NS_APP_USER_PROFILE_50_DIR or any of the keys depending on an active
51 * profile. To figure out the directory of the "current" profile, use
54 * If your migrator needs to access services that use the profile (to
55 * set profile prefs or bookmarks, for example), use aStartup.doStartup.
57 * @param aStartup nsIProfileStartup object to use during migration.
58 * @param aKey optional key of a migrator to use to skip source selection.
59 * @param aProfileName optional name of the profile to use for migration.
61 * @note The startup code ignores COM exceptions thrown from this method.
63 void migrate
(in nsIProfileStartup aStartup
, in ACString aKey
,
64 [optional] in AUTF8String aProfileName
);
68 #define NS_PROFILEMIGRATOR_CONTRACTID
"@mozilla.org/toolkit/profile-migrator;1"