xpcom/io/nsDirectoryServiceDefs.h

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/xpcom/io/nsDirectoryServiceDefs.h	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,154 @@
     1.4 +/* -*- Mode: C++; tab-width: 4; 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 +/**
    1.10 + * Defines the property names for directories available from 
    1.11 + * nsIDirectoryService. These dirs are always available even if no 
    1.12 + * nsIDirectoryServiceProviders have been registered with the service. 
    1.13 + * Application level keys are defined in nsAppDirectoryServiceDefs.h.
    1.14 + *
    1.15 + * Keys whose definition ends in "DIR" or "FILE" return a single nsIFile (or 
    1.16 + * subclass). Keys whose definition ends in "LIST" return an nsISimpleEnumerator
    1.17 + * which enumerates a list of file objects.
    1.18 + *
    1.19 + * Defines listed in this file are FROZEN.  This list may grow.
    1.20 + */
    1.21 +
    1.22 +#ifndef nsDirectoryServiceDefs_h___
    1.23 +#define nsDirectoryServiceDefs_h___
    1.24 +
    1.25 +/* General OS specific locations */
    1.26 +
    1.27 +#define NS_OS_HOME_DIR                          "Home"
    1.28 +#define NS_OS_TEMP_DIR                          "TmpD"
    1.29 +#define NS_OS_CURRENT_WORKING_DIR               "CurWorkD"
    1.30 +/* Files stored in this directory will appear on the user's desktop,
    1.31 + * if there is one, otherwise it's just the same as "Home"
    1.32 + */
    1.33 +#define NS_OS_DESKTOP_DIR                       "Desk"
    1.34 +
    1.35 +/* Property returns the directory in which the procces was started from.  
    1.36 + * On Unix this will be the path in the MOZILLA_FIVE_HOME env var and if 
    1.37 + * unset will be the current working directory. 
    1.38 + */
    1.39 +#define NS_OS_CURRENT_PROCESS_DIR               "CurProcD"
    1.40 +                                                                                                                       
    1.41 +/* This location is similar to NS_OS_CURRENT_PROCESS_DIR, however, 
    1.42 + * NS_XPCOM_CURRENT_PROCESS_DIR can be overriden by passing a "bin
    1.43 + * directory" to NS_InitXPCOM2(). 
    1.44 + */
    1.45 +#define NS_XPCOM_CURRENT_PROCESS_DIR            "XCurProcD"
    1.46 +
    1.47 +/* Property will return the location of the the XPCOM Shared Library.
    1.48 + */
    1.49 +#define NS_XPCOM_LIBRARY_FILE                   "XpcomLib"
    1.50 +
    1.51 +/* Property will return the current location of the the GRE directory.  
    1.52 + * If no GRE is used, this propery will behave like 
    1.53 + * NS_XPCOM_CURRENT_PROCESS_DIR.
    1.54 + */
    1.55 +#define NS_GRE_DIR                              "GreD"
    1.56 +
    1.57 +/* Platform Specific Locations */
    1.58 +
    1.59 +#if !defined (XP_UNIX) || defined(MOZ_WIDGET_COCOA)
    1.60 +    #define NS_OS_SYSTEM_DIR                    "SysD"
    1.61 +#endif
    1.62 +
    1.63 +#if defined (MOZ_WIDGET_COCOA)
    1.64 +    #define NS_MAC_DESKTOP_DIR                  NS_OS_DESKTOP_DIR
    1.65 +    #define NS_MAC_TRASH_DIR                    "Trsh"
    1.66 +    #define NS_MAC_STARTUP_DIR                  "Strt"
    1.67 +    #define NS_MAC_SHUTDOWN_DIR                 "Shdwn"
    1.68 +    #define NS_MAC_APPLE_MENU_DIR               "ApplMenu"
    1.69 +    #define NS_MAC_CONTROL_PANELS_DIR           "CntlPnl"
    1.70 +    #define NS_MAC_EXTENSIONS_DIR               "Exts"
    1.71 +    #define NS_MAC_FONTS_DIR                    "Fnts"
    1.72 +    #define NS_MAC_PREFS_DIR                    "Prfs"
    1.73 +    #define NS_MAC_DOCUMENTS_DIR                "Docs"
    1.74 +    #define NS_MAC_INTERNET_SEARCH_DIR          "ISrch"
    1.75 +    #define NS_OSX_HOME_DIR                     NS_OS_HOME_DIR
    1.76 +    #define NS_MAC_HOME_DIR                     NS_OS_HOME_DIR
    1.77 +    #define NS_MAC_DEFAULT_DOWNLOAD_DIR         "DfltDwnld"
    1.78 +    #define NS_MAC_USER_LIB_DIR                 "ULibDir"   // Only available under OS X
    1.79 +    #define NS_OSX_DEFAULT_DOWNLOAD_DIR         NS_MAC_DEFAULT_DOWNLOAD_DIR
    1.80 +    #define NS_OSX_USER_DESKTOP_DIR             "UsrDsk"
    1.81 +    #define NS_OSX_LOCAL_DESKTOP_DIR            "LocDsk"
    1.82 +    #define NS_OSX_USER_APPLICATIONS_DIR        "UsrApp"
    1.83 +    #define NS_OSX_LOCAL_APPLICATIONS_DIR       "LocApp"
    1.84 +    #define NS_OSX_USER_DOCUMENTS_DIR           "UsrDocs"
    1.85 +    #define NS_OSX_LOCAL_DOCUMENTS_DIR          "LocDocs"
    1.86 +    #define NS_OSX_USER_INTERNET_PLUGIN_DIR     "UsrIntrntPlgn"
    1.87 +    #define NS_OSX_LOCAL_INTERNET_PLUGIN_DIR    "LoclIntrntPlgn"
    1.88 +    #define NS_OSX_USER_FRAMEWORKS_DIR          "UsrFrmwrks"
    1.89 +    #define NS_OSX_LOCAL_FRAMEWORKS_DIR         "LocFrmwrks"
    1.90 +    #define NS_OSX_USER_PREFERENCES_DIR         "UsrPrfs"
    1.91 +    #define NS_OSX_LOCAL_PREFERENCES_DIR        "LocPrfs"
    1.92 +    #define NS_OSX_PICTURE_DOCUMENTS_DIR        "Pct"
    1.93 +    #define NS_OSX_MOVIE_DOCUMENTS_DIR          "Mov"
    1.94 +    #define NS_OSX_MUSIC_DOCUMENTS_DIR          "Music"
    1.95 +    #define NS_OSX_INTERNET_SITES_DIR           "IntrntSts"
    1.96 +#elif defined (XP_WIN)
    1.97 +    #define NS_WIN_WINDOWS_DIR                  "WinD"
    1.98 +    #define NS_WIN_PROGRAM_FILES_DIR            "ProgF"
    1.99 +    #define NS_WIN_HOME_DIR                     NS_OS_HOME_DIR
   1.100 +    #define NS_WIN_DESKTOP_DIR                  "DeskV" // virtual folder at the root of the namespace
   1.101 +    #define NS_WIN_PROGRAMS_DIR                 "Progs" // User start menu programs directory!
   1.102 +    #define NS_WIN_CONTROLS_DIR                 "Cntls"
   1.103 +    #define NS_WIN_PRINTERS_DIR                 "Prnts"
   1.104 +    #define NS_WIN_PERSONAL_DIR                 "Pers"
   1.105 +    #define NS_WIN_FAVORITES_DIR                "Favs"
   1.106 +    #define NS_WIN_STARTUP_DIR                  "Strt"
   1.107 +    #define NS_WIN_RECENT_DIR                   "Rcnt"
   1.108 +    #define NS_WIN_SEND_TO_DIR                  "SndTo"
   1.109 +    #define NS_WIN_BITBUCKET_DIR                "Buckt"
   1.110 +    #define NS_WIN_STARTMENU_DIR                "Strt"
   1.111 +// This gives the same thing as NS_OS_DESKTOP_DIR
   1.112 +    #define NS_WIN_DESKTOP_DIRECTORY            "DeskP" // file sys dir which physically stores objects on desktop
   1.113 +    #define NS_WIN_DRIVES_DIR                   "Drivs"
   1.114 +    #define NS_WIN_NETWORK_DIR                  "NetW"
   1.115 +    #define NS_WIN_NETHOOD_DIR                  "netH"
   1.116 +    #define NS_WIN_FONTS_DIR                    "Fnts"
   1.117 +    #define NS_WIN_TEMPLATES_DIR                "Tmpls"
   1.118 +    #define NS_WIN_COMMON_STARTMENU_DIR         "CmStrt"
   1.119 +    #define NS_WIN_COMMON_PROGRAMS_DIR          "CmPrgs"
   1.120 +    #define NS_WIN_COMMON_STARTUP_DIR           "CmStrt"
   1.121 +    #define NS_WIN_COMMON_DESKTOP_DIRECTORY     "CmDeskP"
   1.122 +    #define NS_WIN_COMMON_APPDATA_DIR           "CmAppData"
   1.123 +    #define NS_WIN_APPDATA_DIR                  "AppData"
   1.124 +    #define NS_WIN_LOCAL_APPDATA_DIR            "LocalAppData"
   1.125 +    #define NS_WIN_PRINTHOOD                    "PrntHd"
   1.126 +    #define NS_WIN_COOKIES_DIR                  "CookD"
   1.127 +    #define NS_WIN_DEFAULT_DOWNLOAD_DIR         "DfltDwnld"
   1.128 +    // On Win7 and up these ids will return the default save-to location for
   1.129 +    // Windows Libraries associated with the specific content type. For other
   1.130 +    // os they return the local user folder. Note these can return network file
   1.131 +    // paths which can jank the ui thread so be careful how you access them.
   1.132 +    #define NS_WIN_DOCUMENTS_DIR                "Docs"
   1.133 +    #define NS_WIN_PICTURES_DIR                 "Pict"
   1.134 +    #define NS_WIN_MUSIC_DIR                    "Music"
   1.135 +    #define NS_WIN_VIDEOS_DIR                   "Vids"
   1.136 +#elif defined (XP_UNIX)
   1.137 +    #define NS_UNIX_LOCAL_DIR                   "Locl"
   1.138 +    #define NS_UNIX_LIB_DIR                     "LibD"
   1.139 +    #define NS_UNIX_HOME_DIR                    NS_OS_HOME_DIR
   1.140 +    #define NS_UNIX_XDG_DESKTOP_DIR             "XDGDesk"
   1.141 +    #define NS_UNIX_XDG_DOCUMENTS_DIR           "XDGDocs"
   1.142 +    #define NS_UNIX_XDG_DOWNLOAD_DIR            "XDGDwnld"
   1.143 +    #define NS_UNIX_XDG_MUSIC_DIR               "XDGMusic"
   1.144 +    #define NS_UNIX_XDG_PICTURES_DIR            "XDGPict"
   1.145 +    #define NS_UNIX_XDG_PUBLIC_SHARE_DIR        "XDGPubSh"
   1.146 +    #define NS_UNIX_XDG_TEMPLATES_DIR           "XDGTempl"
   1.147 +    #define NS_UNIX_XDG_VIDEOS_DIR              "XDGVids"
   1.148 +    #define NS_UNIX_DEFAULT_DOWNLOAD_DIR        "DfltDwnld"
   1.149 +#endif
   1.150 +
   1.151 +/* Deprecated */
   1.152 +
   1.153 +#define NS_OS_DRIVE_DIR                         "DrvD"
   1.154 +
   1.155 +
   1.156 +
   1.157 +#endif

mercurial