toolkit/profile/nsIProfileMigrator.idl

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

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

mercurial