Back to index

lightning-sunbird  0.9+nobinonly
nsIPrefMigration.idl
Go to the documentation of this file.
00001 /* -*- Mode: IDL; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
00002 /* ***** BEGIN LICENSE BLOCK *****
00003  * Version: MPL 1.1/GPL 2.0/LGPL 2.1
00004  *
00005  * The contents of this file are subject to the Mozilla Public License Version
00006  * 1.1 (the "License"); you may not use this file except in compliance with
00007  * the License. You may obtain a copy of the License at
00008  * http://www.mozilla.org/MPL/
00009  *
00010  * Software distributed under the License is distributed on an "AS IS" basis,
00011  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
00012  * for the specific language governing rights and limitations under the
00013  * License.
00014  *
00015  * The Original Code is mozilla.org code.
00016  *
00017  * The Initial Developer of the Original Code is
00018  * Netscape Communications Corporation.
00019  * Portions created by the Initial Developer are Copyright (C) 1998
00020  * the Initial Developer. All Rights Reserved.
00021  *
00022  * Contributor(s):
00023  *
00024  * Alternatively, the contents of this file may be used under the terms of
00025  * either of the GNU General Public License Version 2 or later (the "GPL"),
00026  * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
00027  * in which case the provisions of the GPL or the LGPL are applicable instead
00028  * of those above. If you wish to allow use of your version of this file only
00029  * under the terms of either the GPL or the LGPL, and not to allow others to
00030  * use your version of this file under the terms of the MPL, indicate your
00031  * decision by deleting the provisions above and replace them with the notice
00032  * and other provisions required by the GPL or the LGPL. If you do not delete
00033  * the provisions above, a recipient may use your version of this file under
00034  * the terms of any one of the MPL, the GPL or the LGPL.
00035  *
00036  * ***** END LICENSE BLOCK ***** */
00037 
00038 #include "nsISupports.idl"
00039 
00040 %{C++
00041 
00042 #define NS_PROFILEMIGRATION_CONTRACTID "@mozilla.org/profile/migration;1"
00043 #define NS_PREFCONVERTER_CONTRACTID "@mozilla.org/migration/pref-converter;1"
00044 #define NS_ERROR_NOT_ENOUGH_SPACE_TO_MIGRATE NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_MAILNEWS, 1) 
00045 
00046 /* these are hard coded, in ascii, as they will be used for directory folder names on disk.  NEW_LOCAL_MAIL_DIR_NAME is also used as the host name for the local folders account */
00047 #define NEW_MAIL_DIR_NAME "Mail"
00048 #define NEW_NEWS_DIR_NAME "News"
00049 #define NEW_IMAPMAIL_DIR_NAME "ImapMail"
00050 #define NEW_LOCAL_MAIL_DIR_NAME "Local Folders"
00051 
00052 #if defined(XP_UNIX) && !defined(XP_MACOSX)
00053 #define PREF_FILE_NAME_IN_4x "preferences.js"
00054 #elif defined(XP_MAC) || defined(XP_MACOSX)
00055 #define PREF_FILE_NAME_IN_4x "Netscape Preferences"
00056 #elif defined(XP_WIN) || defined(XP_OS2)
00057 #define PREF_FILE_NAME_IN_4x "prefs.js"
00058 #else
00059 /* this will cause a failure at run time, as it should, since we don't know
00060    how to migrate platforms other than Mac, Windows and UNIX */
00061 #define PREF_FILE_NAME_IN_4x ""
00062 #endif /* XP_UNIX */
00063 
00064 %}
00065 
00066 [scriptable, uuid(85c86e4c-6a6c-11d3-9a55-004005263078)]
00067 interface nsIPrefMigration: nsISupports
00068 {
00069   void AddProfilePaths(in string oldProfilePathStr, in string newProfilePathStr);
00070   void ProcessPrefs(in boolean showProgressAsModalWindow);
00071   void ProcessPrefsFromJS();
00072   /* will raise an exception from JS if there was an error */
00073   void GetError();   
00074 
00079   void WindowCloseCallback();  
00080   void ShowSpaceDialog(out PRInt32 choice);  
00081 };
00082 
00083 [scriptable, uuid(88fabfa4-1dd2-11b2-94a1-902f0abd94b1)]
00084 interface nsIPrefConverter: nsISupports
00085 {
00086     void ConvertPrefsToUTF8();
00087 };