xpcom/io/nsDirectoryServiceDefs.h

Thu, 22 Jan 2015 13:21:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 22 Jan 2015 13:21:57 +0100
branch
TOR_BUG_9701
changeset 15
b8a032363ba2
permissions
-rw-r--r--

Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6

michael@0 1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
michael@0 2 /* This Source Code Form is subject to the terms of the Mozilla Public
michael@0 3 * License, v. 2.0. If a copy of the MPL was not distributed with this
michael@0 4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
michael@0 5
michael@0 6 /**
michael@0 7 * Defines the property names for directories available from
michael@0 8 * nsIDirectoryService. These dirs are always available even if no
michael@0 9 * nsIDirectoryServiceProviders have been registered with the service.
michael@0 10 * Application level keys are defined in nsAppDirectoryServiceDefs.h.
michael@0 11 *
michael@0 12 * Keys whose definition ends in "DIR" or "FILE" return a single nsIFile (or
michael@0 13 * subclass). Keys whose definition ends in "LIST" return an nsISimpleEnumerator
michael@0 14 * which enumerates a list of file objects.
michael@0 15 *
michael@0 16 * Defines listed in this file are FROZEN. This list may grow.
michael@0 17 */
michael@0 18
michael@0 19 #ifndef nsDirectoryServiceDefs_h___
michael@0 20 #define nsDirectoryServiceDefs_h___
michael@0 21
michael@0 22 /* General OS specific locations */
michael@0 23
michael@0 24 #define NS_OS_HOME_DIR "Home"
michael@0 25 #define NS_OS_TEMP_DIR "TmpD"
michael@0 26 #define NS_OS_CURRENT_WORKING_DIR "CurWorkD"
michael@0 27 /* Files stored in this directory will appear on the user's desktop,
michael@0 28 * if there is one, otherwise it's just the same as "Home"
michael@0 29 */
michael@0 30 #define NS_OS_DESKTOP_DIR "Desk"
michael@0 31
michael@0 32 /* Property returns the directory in which the procces was started from.
michael@0 33 * On Unix this will be the path in the MOZILLA_FIVE_HOME env var and if
michael@0 34 * unset will be the current working directory.
michael@0 35 */
michael@0 36 #define NS_OS_CURRENT_PROCESS_DIR "CurProcD"
michael@0 37
michael@0 38 /* This location is similar to NS_OS_CURRENT_PROCESS_DIR, however,
michael@0 39 * NS_XPCOM_CURRENT_PROCESS_DIR can be overriden by passing a "bin
michael@0 40 * directory" to NS_InitXPCOM2().
michael@0 41 */
michael@0 42 #define NS_XPCOM_CURRENT_PROCESS_DIR "XCurProcD"
michael@0 43
michael@0 44 /* Property will return the location of the the XPCOM Shared Library.
michael@0 45 */
michael@0 46 #define NS_XPCOM_LIBRARY_FILE "XpcomLib"
michael@0 47
michael@0 48 /* Property will return the current location of the the GRE directory.
michael@0 49 * If no GRE is used, this propery will behave like
michael@0 50 * NS_XPCOM_CURRENT_PROCESS_DIR.
michael@0 51 */
michael@0 52 #define NS_GRE_DIR "GreD"
michael@0 53
michael@0 54 /* Platform Specific Locations */
michael@0 55
michael@0 56 #if !defined (XP_UNIX) || defined(MOZ_WIDGET_COCOA)
michael@0 57 #define NS_OS_SYSTEM_DIR "SysD"
michael@0 58 #endif
michael@0 59
michael@0 60 #if defined (MOZ_WIDGET_COCOA)
michael@0 61 #define NS_MAC_DESKTOP_DIR NS_OS_DESKTOP_DIR
michael@0 62 #define NS_MAC_TRASH_DIR "Trsh"
michael@0 63 #define NS_MAC_STARTUP_DIR "Strt"
michael@0 64 #define NS_MAC_SHUTDOWN_DIR "Shdwn"
michael@0 65 #define NS_MAC_APPLE_MENU_DIR "ApplMenu"
michael@0 66 #define NS_MAC_CONTROL_PANELS_DIR "CntlPnl"
michael@0 67 #define NS_MAC_EXTENSIONS_DIR "Exts"
michael@0 68 #define NS_MAC_FONTS_DIR "Fnts"
michael@0 69 #define NS_MAC_PREFS_DIR "Prfs"
michael@0 70 #define NS_MAC_DOCUMENTS_DIR "Docs"
michael@0 71 #define NS_MAC_INTERNET_SEARCH_DIR "ISrch"
michael@0 72 #define NS_OSX_HOME_DIR NS_OS_HOME_DIR
michael@0 73 #define NS_MAC_HOME_DIR NS_OS_HOME_DIR
michael@0 74 #define NS_MAC_DEFAULT_DOWNLOAD_DIR "DfltDwnld"
michael@0 75 #define NS_MAC_USER_LIB_DIR "ULibDir" // Only available under OS X
michael@0 76 #define NS_OSX_DEFAULT_DOWNLOAD_DIR NS_MAC_DEFAULT_DOWNLOAD_DIR
michael@0 77 #define NS_OSX_USER_DESKTOP_DIR "UsrDsk"
michael@0 78 #define NS_OSX_LOCAL_DESKTOP_DIR "LocDsk"
michael@0 79 #define NS_OSX_USER_APPLICATIONS_DIR "UsrApp"
michael@0 80 #define NS_OSX_LOCAL_APPLICATIONS_DIR "LocApp"
michael@0 81 #define NS_OSX_USER_DOCUMENTS_DIR "UsrDocs"
michael@0 82 #define NS_OSX_LOCAL_DOCUMENTS_DIR "LocDocs"
michael@0 83 #define NS_OSX_USER_INTERNET_PLUGIN_DIR "UsrIntrntPlgn"
michael@0 84 #define NS_OSX_LOCAL_INTERNET_PLUGIN_DIR "LoclIntrntPlgn"
michael@0 85 #define NS_OSX_USER_FRAMEWORKS_DIR "UsrFrmwrks"
michael@0 86 #define NS_OSX_LOCAL_FRAMEWORKS_DIR "LocFrmwrks"
michael@0 87 #define NS_OSX_USER_PREFERENCES_DIR "UsrPrfs"
michael@0 88 #define NS_OSX_LOCAL_PREFERENCES_DIR "LocPrfs"
michael@0 89 #define NS_OSX_PICTURE_DOCUMENTS_DIR "Pct"
michael@0 90 #define NS_OSX_MOVIE_DOCUMENTS_DIR "Mov"
michael@0 91 #define NS_OSX_MUSIC_DOCUMENTS_DIR "Music"
michael@0 92 #define NS_OSX_INTERNET_SITES_DIR "IntrntSts"
michael@0 93 #elif defined (XP_WIN)
michael@0 94 #define NS_WIN_WINDOWS_DIR "WinD"
michael@0 95 #define NS_WIN_PROGRAM_FILES_DIR "ProgF"
michael@0 96 #define NS_WIN_HOME_DIR NS_OS_HOME_DIR
michael@0 97 #define NS_WIN_DESKTOP_DIR "DeskV" // virtual folder at the root of the namespace
michael@0 98 #define NS_WIN_PROGRAMS_DIR "Progs" // User start menu programs directory!
michael@0 99 #define NS_WIN_CONTROLS_DIR "Cntls"
michael@0 100 #define NS_WIN_PRINTERS_DIR "Prnts"
michael@0 101 #define NS_WIN_PERSONAL_DIR "Pers"
michael@0 102 #define NS_WIN_FAVORITES_DIR "Favs"
michael@0 103 #define NS_WIN_STARTUP_DIR "Strt"
michael@0 104 #define NS_WIN_RECENT_DIR "Rcnt"
michael@0 105 #define NS_WIN_SEND_TO_DIR "SndTo"
michael@0 106 #define NS_WIN_BITBUCKET_DIR "Buckt"
michael@0 107 #define NS_WIN_STARTMENU_DIR "Strt"
michael@0 108 // This gives the same thing as NS_OS_DESKTOP_DIR
michael@0 109 #define NS_WIN_DESKTOP_DIRECTORY "DeskP" // file sys dir which physically stores objects on desktop
michael@0 110 #define NS_WIN_DRIVES_DIR "Drivs"
michael@0 111 #define NS_WIN_NETWORK_DIR "NetW"
michael@0 112 #define NS_WIN_NETHOOD_DIR "netH"
michael@0 113 #define NS_WIN_FONTS_DIR "Fnts"
michael@0 114 #define NS_WIN_TEMPLATES_DIR "Tmpls"
michael@0 115 #define NS_WIN_COMMON_STARTMENU_DIR "CmStrt"
michael@0 116 #define NS_WIN_COMMON_PROGRAMS_DIR "CmPrgs"
michael@0 117 #define NS_WIN_COMMON_STARTUP_DIR "CmStrt"
michael@0 118 #define NS_WIN_COMMON_DESKTOP_DIRECTORY "CmDeskP"
michael@0 119 #define NS_WIN_COMMON_APPDATA_DIR "CmAppData"
michael@0 120 #define NS_WIN_APPDATA_DIR "AppData"
michael@0 121 #define NS_WIN_LOCAL_APPDATA_DIR "LocalAppData"
michael@0 122 #define NS_WIN_PRINTHOOD "PrntHd"
michael@0 123 #define NS_WIN_COOKIES_DIR "CookD"
michael@0 124 #define NS_WIN_DEFAULT_DOWNLOAD_DIR "DfltDwnld"
michael@0 125 // On Win7 and up these ids will return the default save-to location for
michael@0 126 // Windows Libraries associated with the specific content type. For other
michael@0 127 // os they return the local user folder. Note these can return network file
michael@0 128 // paths which can jank the ui thread so be careful how you access them.
michael@0 129 #define NS_WIN_DOCUMENTS_DIR "Docs"
michael@0 130 #define NS_WIN_PICTURES_DIR "Pict"
michael@0 131 #define NS_WIN_MUSIC_DIR "Music"
michael@0 132 #define NS_WIN_VIDEOS_DIR "Vids"
michael@0 133 #elif defined (XP_UNIX)
michael@0 134 #define NS_UNIX_LOCAL_DIR "Locl"
michael@0 135 #define NS_UNIX_LIB_DIR "LibD"
michael@0 136 #define NS_UNIX_HOME_DIR NS_OS_HOME_DIR
michael@0 137 #define NS_UNIX_XDG_DESKTOP_DIR "XDGDesk"
michael@0 138 #define NS_UNIX_XDG_DOCUMENTS_DIR "XDGDocs"
michael@0 139 #define NS_UNIX_XDG_DOWNLOAD_DIR "XDGDwnld"
michael@0 140 #define NS_UNIX_XDG_MUSIC_DIR "XDGMusic"
michael@0 141 #define NS_UNIX_XDG_PICTURES_DIR "XDGPict"
michael@0 142 #define NS_UNIX_XDG_PUBLIC_SHARE_DIR "XDGPubSh"
michael@0 143 #define NS_UNIX_XDG_TEMPLATES_DIR "XDGTempl"
michael@0 144 #define NS_UNIX_XDG_VIDEOS_DIR "XDGVids"
michael@0 145 #define NS_UNIX_DEFAULT_DOWNLOAD_DIR "DfltDwnld"
michael@0 146 #endif
michael@0 147
michael@0 148 /* Deprecated */
michael@0 149
michael@0 150 #define NS_OS_DRIVE_DIR "DrvD"
michael@0 151
michael@0 152
michael@0 153
michael@0 154 #endif

mercurial