browser/components/migration/public/nsIBrowserProfileMigrator.idl

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/browser/components/migration/public/nsIBrowserProfileMigrator.idl	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,64 @@
     1.4 +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
     1.5 +/* This Source Code Form is subject to the terms of the Mozilla Public
     1.6 + * License, v. 2.0. If a copy of the MPL was not distributed with this
     1.7 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     1.8 +
     1.9 +#include "nsISupports.idl"
    1.10 +
    1.11 +interface nsIArray;
    1.12 +interface nsIProfileStartup;
    1.13 +
    1.14 +[scriptable, uuid(44993E0E-74E8-4BEC-9D66-AD8156E0A274)]
    1.15 +interface nsIBrowserProfileMigrator : nsISupports
    1.16 +{
    1.17 +  /**
    1.18 +   * profile items to migrate. use with migrate().
    1.19 +   */
    1.20 +  const unsigned short ALL         = 0x0000;
    1.21 +  const unsigned short SETTINGS    = 0x0001;
    1.22 +  const unsigned short COOKIES     = 0x0002;
    1.23 +  const unsigned short HISTORY     = 0x0004;
    1.24 +  const unsigned short FORMDATA    = 0x0008;
    1.25 +  const unsigned short PASSWORDS   = 0x0010;
    1.26 +  const unsigned short BOOKMARKS   = 0x0020;
    1.27 +  const unsigned short OTHERDATA   = 0x0040;
    1.28 +  const unsigned short SESSION     = 0x0080;
    1.29 +
    1.30 +  /**
    1.31 +   * Copy user profile information to the current active profile.
    1.32 +   * @param aItems   list of data items to migrate. see above for values.
    1.33 +   * @param aStartup helper interface which is non-null if called during startup. 
    1.34 +   * @param aProfile profile to migrate from, if there is more than one.
    1.35 +   */
    1.36 +  void migrate(in unsigned short aItems, in nsIProfileStartup aStartup, in wstring aProfile);
    1.37 +
    1.38 +  /**
    1.39 +   * A bit field containing profile items that this migrator
    1.40 +   * offers for import. 
    1.41 +   * @param   aProfile the profile that we are looking for available data
    1.42 +   *          to import
    1.43 +   * @param   aDoingStartup "true" if the profile is not currently being used.
    1.44 +   * @return  bit field containing profile items (see above)
    1.45 +   * @note    a return value of 0 represents no items rather than ALL.
    1.46 +   */
    1.47 +  unsigned short getMigrateData(in wstring aProfile, in boolean aDoingStartup);
    1.48 +
    1.49 +  /** 
    1.50 +   * Whether or not there is any data that can be imported from this 
    1.51 +   * browser (i.e. whether or not it is installed, and there exists
    1.52 +   * a user profile)
    1.53 +   */
    1.54 +  readonly attribute boolean          sourceExists;
    1.55 +
    1.56 +
    1.57 +  /** 
    1.58 +   * An enumeration of available profiles. If the import source does 
    1.59 +   * not support profiles, this attribute is null.
    1.60 +   */
    1.61 +  readonly attribute jsval            sourceProfiles;
    1.62 +
    1.63 +  /**
    1.64 +   * The import source homepage.  Returns null if not present/available
    1.65 +   */
    1.66 +  readonly attribute AUTF8String      sourceHomePageURL;
    1.67 +};

mercurial