Back to index

lightning-sunbird  0.9+nobinonly
nsSpecialSystemDirectory.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 _NSSPECIALSYSTEMDIRECTORY_H_
00042 #define _NSSPECIALSYSTEMDIRECTORY_H_
00043 
00044 #include "xpcomobsolete.h"
00045 #include "nsFileSpec.h"
00046 
00047 #if defined(XP_MAC) || defined(XP_MACOSX)
00048 #include <Types.h>
00049 #endif
00050 
00051 // SEE ALSO:
00052 //      mozilla/xpfe/appshell/public/nsFileLocations.h
00053 
00054 class NS_COM_OBSOLETE nsSpecialSystemDirectory : public nsFileSpec
00055 {
00056 
00057     public:
00058         enum SystemDirectories
00059         {
00060             OS_DriveDirectory         =   1
00061         ,   OS_TemporaryDirectory     =   2
00062         ,   OS_CurrentProcessDirectory=   3
00063         ,   OS_CurrentWorkingDirectory=   4
00064 
00065         ,   XPCOM_CurrentProcessComponentDirectory=   5
00066         ,   XPCOM_CurrentProcessComponentRegistry=   6            
00067           
00068         ,   Moz_BinDirectory          = 10
00069 
00070         ,   Mac_SystemDirectory       =   101
00071         ,   Mac_DesktopDirectory      =   102
00072         ,   Mac_TrashDirectory        =   103
00073         ,   Mac_StartupDirectory      =   104
00074         ,   Mac_ShutdownDirectory     =   105
00075         ,   Mac_AppleMenuDirectory    =   106
00076         ,   Mac_ControlPanelDirectory =   107
00077         ,   Mac_ExtensionDirectory    =   108
00078         ,   Mac_FontsDirectory        =   109
00079         ,   Mac_ClassicPreferencesDirectory  =   110
00080         ,   Mac_DocumentsDirectory    =   111
00081         ,   Mac_InternetSearchDirectory    =   112
00082         ,   Mac_DefaultDownloadDirectory   =   113
00083         ,   Mac_UserLibDirectory      =   114
00084         ,   Mac_PreferencesDirectory  =   115
00085         
00086         ,   Win_SystemDirectory       =   201
00087         ,   Win_WindowsDirectory      =   202
00088 
00089         ,   Win_HomeDirectory         =   203
00090         ,   Win_Desktop               =   204    
00091         ,   Win_Programs              =   205    
00092         ,   Win_Controls              =   206    
00093         ,   Win_Printers              =   207    
00094         ,   Win_Personal              =   208    
00095         ,   Win_Favorites             =   209    
00096         ,   Win_Startup               =   210    
00097         ,   Win_Recent                =   211    
00098         ,   Win_Sendto                =   212    
00099         ,   Win_Bitbucket             =   213    
00100         ,   Win_Startmenu             =   214    
00101         ,   Win_Desktopdirectory      =   215    
00102         ,   Win_Drives                =   216    
00103         ,   Win_Network               =   217    
00104         ,   Win_Nethood               =   218    
00105         ,   Win_Fonts                 =   219    
00106         ,   Win_Templates             =   220    
00107         ,   Win_Common_Startmenu      =   221    
00108         ,   Win_Common_Programs       =   222    
00109         ,   Win_Common_Startup        =   223   
00110         ,   Win_Common_Desktopdirectory = 224   
00111         ,   Win_Appdata               =   225    
00112         ,   Win_Printhood             =   226    
00113         ,   Win_Cookies               =   227
00114          
00115         ,   Unix_LocalDirectory       =   301
00116         ,   Unix_LibDirectory         =   302
00117         ,   Unix_HomeDirectory        =   303
00118 
00119         ,   BeOS_SettingsDirectory    =   401
00120         ,   BeOS_HomeDirectory        =   402
00121         ,   BeOS_DesktopDirectory     =   403
00122         ,   BeOS_SystemDirectory      =   404
00123 
00124         ,   OS2_SystemDirectory       =   501
00125         ,   OS2_OS2Directory          =   502
00126         ,   OS2_DesktopDirectory      =   503
00127         ,   OS2_HomeDirectory         =   504
00128         };
00129 
00130                     //nsSpecialSystemDirectory();
00131                     nsSpecialSystemDirectory(SystemDirectories aSystemSystemDirectory);
00132         
00133     virtual         ~nsSpecialSystemDirectory();
00134 
00135     void            operator = (SystemDirectories aSystemSystemDirectory);
00136  
00137 #if defined(XP_MAC) || defined(XP_MACOSX)
00138     void            operator = (OSType folderType);
00139                     nsSpecialSystemDirectory(OSType folderType);
00140     enum {
00141       kDefaultDownloadFolderType = FOUR_CHAR_CODE('DfD')    /* Default Download Folder */
00142     };              
00143 #endif
00144 
00153     static void Set(SystemDirectories dirToSet, nsFileSpec *dirSpec);
00154 
00155 
00156 private:
00157     void            operator = (const char* inPath) { *(nsFileSpec*)this = inPath; }
00158 
00159 }; // class NS_COM_OBSOLETE nsSpecialSystemDirectory
00160 
00161 
00162 #endif