Back to index

lightning-sunbird  0.9+nobinonly
SpecialSystemDirectory.h
Go to the documentation of this file.
00001 /* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
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 Communicator client code, released
00016  * March 31, 1998.
00017  *
00018  * The Initial Developer of the Original Code is
00019  * Netscape Communications Corporation.
00020  * Portions created by the Initial Developer are Copyright (C) 1998
00021  * the Initial Developer. All Rights Reserved.
00022  *
00023  * Contributor(s):
00024  *   Doug Turner <dougt@netscape.com>
00025  *   IBM Corp.
00026  *
00027  * Alternatively, the contents of this file may be used under the terms of
00028  * either of the GNU General Public License Version 2 or later (the "GPL"),
00029  * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
00030  * in which case the provisions of the GPL or the LGPL are applicable instead
00031  * of those above. If you wish to allow use of your version of this file only
00032  * under the terms of either the GPL or the LGPL, and not to allow others to
00033  * use your version of this file under the terms of the MPL, indicate your
00034  * decision by deleting the provisions above and replace them with the notice
00035  * and other provisions required by the GPL or the LGPL. If you do not delete
00036  * the provisions above, a recipient may use your version of this file under
00037  * the terms of any one of the MPL, the GPL or the LGPL.
00038  *
00039  * ***** END LICENSE BLOCK ***** */
00040 
00041 #ifndef _SPECIALSYSTEMDIRECTORY_H_
00042 #define _SPECIALSYSTEMDIRECTORY_H_
00043 
00044 #include "nscore.h"
00045 #include "nsILocalFile.h"
00046 
00047 #if defined(XP_MAC) || defined(XP_MACOSX)
00048 #include <Types.h>
00049 #include "nsILocalFileMac.h"
00050 #include "prenv.h"
00051 #endif
00052 
00053 
00054 extern NS_COM void StartupSpecialSystemDirectory();
00055 extern NS_COM void ShutdownSpecialSystemDirectory();
00056 
00057 
00058 enum SystemDirectories {
00059   OS_DriveDirectory         =   1,   
00060   OS_TemporaryDirectory     =   2,   
00061   OS_CurrentProcessDirectory=   3,   
00062   OS_CurrentWorkingDirectory=   4,
00063   XPCOM_CurrentProcessComponentDirectory=   5,   
00064   XPCOM_CurrentProcessComponentRegistry=   6,   
00065   
00066   Moz_BinDirectory          =   100 ,
00067   Mac_SystemDirectory       =   101,   
00068   Mac_DesktopDirectory      =   102,   
00069   Mac_TrashDirectory        =   103,   
00070   Mac_StartupDirectory      =   104,   
00071   Mac_ShutdownDirectory     =   105,   
00072   Mac_AppleMenuDirectory    =   106,   
00073   Mac_ControlPanelDirectory =   107,   
00074   Mac_ExtensionDirectory    =   108,   
00075   Mac_FontsDirectory        =   109,   
00076   Mac_ClassicPreferencesDirectory =   110,   
00077   Mac_DocumentsDirectory          =   111,   
00078   Mac_InternetSearchDirectory     =   112,   
00079   Mac_DefaultDownloadDirectory    =   113,   
00080   Mac_UserLibDirectory      =   114,   
00081   Mac_PreferencesDirectory  =   115,
00082    
00083   Win_SystemDirectory       =   201,   
00084   Win_WindowsDirectory      =   202,
00085   Win_HomeDirectory         =   203,   
00086   Win_Desktop               =   204,   
00087   Win_Programs              =   205,   
00088   Win_Controls              =   206,   
00089   Win_Printers              =   207,   
00090   Win_Personal              =   208,   
00091   Win_Favorites             =   209,   
00092   Win_Startup               =   210,   
00093   Win_Recent                =   211,   
00094   Win_Sendto                =   212,   
00095   Win_Bitbucket             =   213,   
00096   Win_Startmenu             =   214,   
00097   Win_Desktopdirectory      =   215,   
00098   Win_Drives                =   216,   
00099   Win_Network               =   217,   
00100   Win_Nethood               =   218,   
00101   Win_Fonts                 =   219,   
00102   Win_Templates             =   220,   
00103   Win_Common_Startmenu      =   221,   
00104   Win_Common_Programs       =   222,   
00105   Win_Common_Startup        =   223,   
00106   Win_Common_Desktopdirectory = 224,   
00107   Win_Appdata               =   225,   
00108   Win_Printhood             =   226,   
00109   Win_Cookies               =   227, 
00110   Win_LocalAppdata          =   228,
00111   Win_ProgramFiles          =   229,
00112   
00113   Unix_LocalDirectory       =   301,   
00114   Unix_LibDirectory         =   302,   
00115   Unix_HomeDirectory        =   303,
00116   Unix_DesktopDirectory     =   304,
00117   
00118   BeOS_SettingsDirectory    =   401,   
00119   BeOS_HomeDirectory        =   402,   
00120   BeOS_DesktopDirectory     =   403,   
00121   BeOS_SystemDirectory      =   404,
00122   
00123   OS2_SystemDirectory       =   501,   
00124   OS2_OS2Directory          =   502,   
00125   OS2_DesktopDirectory      =   503,   
00126   OS2_HomeDirectory         =   504
00127 };
00128 
00129 nsresult
00130 GetSpecialSystemDirectory(SystemDirectories aSystemSystemDirectory,
00131                           nsILocalFile** aFile);
00132 #if defined(XP_MACOSX)
00133 nsresult
00134 GetOSXFolderType(short aDomain, OSType aFolderType, nsILocalFile **localFile);
00135 #endif
00136 
00137 #endif