author Timothy B. Terriberry <>
Mon, 18 Apr 2011 12:22:51 -0700
changeset 68694 deee3852caafda96c264d6be29fe5c2fc8564951
parent 4623 fc03e4af38b10198be6fdd51bf304d1520765f7e
child 83128 3b6d9e92b1482db3abe6a2d264e0b858d7be6614
permissions -rw-r--r--
Bug 650834 - Add casts to pointer differences in assertion r=dougt

/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
 * Version: MPL 1.1/GPL 2.0/LGPL 2.1
 * The contents of this file are subject to the Mozilla Public License Version
 * 1.1 (the "License"); you may not use this file except in compliance with
 * the License. You may obtain a copy of the License at
 * Software distributed under the License is distributed on an "AS IS" basis,
 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
 * for the specific language governing rights and limitations under the
 * License.
 * The Original Code is The Browser Profile Migrator.
 * The Initial Developer of the Original Code is Ben Goodger.
 * Portions created by the Initial Developer are Copyright (C) 2004
 * the Initial Developer. All Rights Reserved.
 * Contributor(s):
 * Alternatively, the contents of this file may be used under the terms of
 * either the GNU General Public License Version 2 or later (the "GPL"), or
 * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
 * in which case the provisions of the GPL or the LGPL are applicable instead
 * of those above. If you wish to allow use of your version of this file only
 * under the terms of either the GPL or the LGPL, and not to allow others to
 * use your version of this file under the terms of the MPL, indicate your
 * decision by deleting the provisions above and replace them with the notice
 * and other provisions required by the GPL or the LGPL. If you do not delete
 * the provisions above, a recipient may use your version of this file under
 * the terms of any one of the MPL, the GPL or the LGPL.
 * ***** END LICENSE BLOCK ***** */

#include "nsISupports.idl"

interface nsISupportsArray;
interface nsIProfileStartup;

[scriptable, uuid(f8365b4a-da55-4e47-be7a-230142360f62)]
interface nsIBrowserProfileMigrator : nsISupports 
   * profile items to migrate. use with migrate().
  const unsigned short ALL         = 0x0000;
  const unsigned short SETTINGS    = 0x0001;
  const unsigned short COOKIES     = 0x0002;
  const unsigned short HISTORY     = 0x0004;
  const unsigned short FORMDATA    = 0x0008;
  const unsigned short PASSWORDS   = 0x0010;
  const unsigned short BOOKMARKS   = 0x0020;
  const unsigned short OTHERDATA   = 0x0040;

   * Copy user profile information to the current active profile.
   * @param aItems   list of data items to migrate. see above for values.
   * @param aStartup helper interface which is non-null if called during startup. 
   * @param aProfile profile to migrate from, if there is more than one.
  void migrate(in unsigned short aItems, in nsIProfileStartup aStartup, in wstring aProfile);

   * A bit field containing profile items that this migrator
   * offers for import. 
   * @param   aProfile the profile that we are looking for available data
   *          to import
   * @param   aDoingStartup "true" if the profile is not currently being used.
   * @returns bit field containing profile items (see above)
  unsigned short getMigrateData(in wstring aProfile, in boolean aDoingStartup);

   * Whether or not there is any data that can be imported from this 
   * browser (i.e. whether or not it is installed, and there exists
   * a user profile)
  readonly attribute boolean          sourceExists;

   * Whether or not the import source implementing this interface
   * has multiple user profiles configured.
  readonly attribute boolean          sourceHasMultipleProfiles;

   * An enumeration of available profiles. If the import source does 
   * not support profiles, this attribute is null.
  readonly attribute nsISupportsArray sourceProfiles;
   * The import source homepage.  Returns null if not present/available
  readonly attribute AUTF8String      sourceHomePageURL;