nsDirectoryServiceDefs.h 9.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204
  1. /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  2. /* ***** BEGIN LICENSE BLOCK *****
  3. * Version: MPL 1.1/GPL 2.0/LGPL 2.1
  4. *
  5. * The contents of this file are subject to the Mozilla Public License Version
  6. * 1.1 (the "License"); you may not use this file except in compliance with
  7. * the License. You may obtain a copy of the License at
  8. * http://www.mozilla.org/MPL/
  9. *
  10. * Software distributed under the License is distributed on an "AS IS" basis,
  11. * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
  12. * for the specific language governing rights and limitations under the
  13. * License.
  14. *
  15. * The Original Code is mozilla.org code.
  16. *
  17. * The Initial Developer of the Original Code is
  18. * Netscape Communications Corporation.
  19. * Portions created by the Initial Developer are Copyright (C) 2000
  20. * the Initial Developer. All Rights Reserved.
  21. *
  22. * Contributor(s):
  23. * Conrad Carlen [email protected]
  24. *
  25. * Alternatively, the contents of this file may be used under the terms of
  26. * either of the GNU General Public License Version 2 or later (the "GPL"),
  27. * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
  28. * in which case the provisions of the GPL or the LGPL are applicable instead
  29. * of those above. If you wish to allow use of your version of this file only
  30. * under the terms of either the GPL or the LGPL, and not to allow others to
  31. * use your version of this file under the terms of the MPL, indicate your
  32. * decision by deleting the provisions above and replace them with the notice
  33. * and other provisions required by the GPL or the LGPL. If you do not delete
  34. * the provisions above, a recipient may use your version of this file under
  35. * the terms of any one of the MPL, the GPL or the LGPL.
  36. *
  37. * ***** END LICENSE BLOCK ***** */
  38. /**
  39. * Defines the property names for directories available from
  40. * nsIDirectoryService. These dirs are always available even if no
  41. * nsIDirectoryServiceProviders have been registered with the service.
  42. * Application level keys are defined in nsAppDirectoryServiceDefs.h.
  43. *
  44. * Keys whose definition ends in "DIR" or "FILE" return a single nsIFile (or
  45. * subclass). Keys whose definition ends in "LIST" return an nsISimpleEnumerator
  46. * which enumerates a list of file objects.
  47. *
  48. * Defines listed in this file are FROZEN. This list may grow.
  49. */
  50. #ifndef nsDirectoryServiceDefs_h___
  51. #define nsDirectoryServiceDefs_h___
  52. /* General OS specific locations */
  53. #define NS_OS_HOME_DIR "Home"
  54. #define NS_OS_TEMP_DIR "TmpD"
  55. #define NS_OS_CURRENT_WORKING_DIR "CurWorkD"
  56. /* Files stored in this directory will appear on the user's desktop,
  57. * if there is one, otherwise it's just the same as "Home"
  58. */
  59. #define NS_OS_DESKTOP_DIR "Desk"
  60. /* Property returns the directory in which the procces was started from.
  61. * On Unix this will be the path in the MOZILLA_FIVE_HOME env var and if
  62. * unset will be the current working directory.
  63. */
  64. #define NS_OS_CURRENT_PROCESS_DIR "CurProcD"
  65. /* This location is similar to NS_OS_CURRENT_PROCESS_DIR, however,
  66. * NS_XPCOM_CURRENT_PROCESS_DIR can be overriden by passing a "bin
  67. * directory" to NS_InitXPCOM2().
  68. */
  69. #define NS_XPCOM_CURRENT_PROCESS_DIR "XCurProcD"
  70. /* Property will return the location of the application components
  71. * directory. By default, this directory will be contained in the
  72. * NS_XPCOM_CURRENT_PROCESS_DIR.
  73. */
  74. #define NS_XPCOM_COMPONENT_DIR "ComsD"
  75. /* Property will return a list of components directories that will
  76. * will be registered after the application components directory.
  77. */
  78. #define NS_XPCOM_COMPONENT_DIR_LIST "ComsDL"
  79. /* Property will return the location of the application components
  80. * registry file.
  81. */
  82. #define NS_XPCOM_COMPONENT_REGISTRY_FILE "ComRegF"
  83. /* Property will return the location of the application XPTI
  84. * registry file.
  85. */
  86. #define NS_XPCOM_XPTI_REGISTRY_FILE "XptiRegF"
  87. /* Property will return the location of the the XPCOM Shared Library.
  88. */
  89. #define NS_XPCOM_LIBRARY_FILE "XpcomLib"
  90. /* Property will return the current location of the the GRE directory.
  91. * If no GRE is used, this propery will behave like
  92. * NS_XPCOM_CURRENT_PROCESS_DIR.
  93. */
  94. #define NS_GRE_DIR "GreD"
  95. /* Property will return the current location of the the GRE component
  96. * directory. If no GRE is used, this propery will behave like
  97. * NS_XPCOM_COMPONENT_DIR.
  98. */
  99. #define NS_GRE_COMPONENT_DIR "GreComsD"
  100. /* Platform Specific Locations */
  101. #if !defined (XP_UNIX) || defined(XP_MACOSX)
  102. #define NS_OS_SYSTEM_DIR "SysD"
  103. #endif
  104. #if defined (XP_MACOSX)
  105. #define NS_MAC_DESKTOP_DIR NS_OS_DESKTOP_DIR
  106. #define NS_MAC_TRASH_DIR "Trsh"
  107. #define NS_MAC_STARTUP_DIR "Strt"
  108. #define NS_MAC_SHUTDOWN_DIR "Shdwn"
  109. #define NS_MAC_APPLE_MENU_DIR "ApplMenu"
  110. #define NS_MAC_CONTROL_PANELS_DIR "CntlPnl"
  111. #define NS_MAC_EXTENSIONS_DIR "Exts"
  112. #define NS_MAC_FONTS_DIR "Fnts"
  113. #define NS_MAC_PREFS_DIR "Prfs"
  114. #define NS_MAC_DOCUMENTS_DIR "Docs"
  115. #define NS_MAC_INTERNET_SEARCH_DIR "ISrch"
  116. #define NS_OSX_HOME_DIR NS_OS_HOME_DIR
  117. #define NS_MAC_HOME_DIR NS_OS_HOME_DIR
  118. #define NS_MAC_DEFAULT_DOWNLOAD_DIR "DfltDwnld"
  119. #define NS_MAC_USER_LIB_DIR "ULibDir" // Only available under OS X
  120. #define NS_OSX_DEFAULT_DOWNLOAD_DIR NS_MAC_DEFAULT_DOWNLOAD_DIR
  121. #define NS_OSX_USER_DESKTOP_DIR "UsrDsk"
  122. #define NS_OSX_LOCAL_DESKTOP_DIR "LocDsk"
  123. #define NS_OSX_USER_APPLICATIONS_DIR "UsrApp"
  124. #define NS_OSX_LOCAL_APPLICATIONS_DIR "LocApp"
  125. #define NS_OSX_USER_DOCUMENTS_DIR "UsrDocs"
  126. #define NS_OSX_LOCAL_DOCUMENTS_DIR "LocDocs"
  127. #define NS_OSX_USER_INTERNET_PLUGIN_DIR "UsrIntrntPlgn"
  128. #define NS_OSX_LOCAL_INTERNET_PLUGIN_DIR "LoclIntrntPlgn"
  129. #define NS_OSX_USER_FRAMEWORKS_DIR "UsrFrmwrks"
  130. #define NS_OSX_LOCAL_FRAMEWORKS_DIR "LocFrmwrks"
  131. #define NS_OSX_USER_PREFERENCES_DIR "UsrPrfs"
  132. #define NS_OSX_LOCAL_PREFERENCES_DIR "LocPrfs"
  133. #define NS_OSX_PICTURE_DOCUMENTS_DIR "Pct"
  134. #define NS_OSX_MOVIE_DOCUMENTS_DIR "Mov"
  135. #define NS_OSX_MUSIC_DOCUMENTS_DIR "Music"
  136. #define NS_OSX_INTERNET_SITES_DIR "IntrntSts"
  137. #elif defined (XP_WIN)
  138. #define NS_WIN_WINDOWS_DIR "WinD"
  139. #define NS_WIN_PROGRAM_FILES_DIR "ProgF"
  140. #define NS_WIN_HOME_DIR NS_OS_HOME_DIR
  141. #define NS_WIN_DESKTOP_DIR "DeskV" // virtual folder at the root of the namespace
  142. #define NS_WIN_PROGRAMS_DIR "Progs" // User start menu programs directory!
  143. #define NS_WIN_CONTROLS_DIR "Cntls"
  144. #define NS_WIN_PRINTERS_DIR "Prnts"
  145. #define NS_WIN_PERSONAL_DIR "Pers"
  146. #define NS_WIN_FAVORITES_DIR "Favs"
  147. #define NS_WIN_STARTUP_DIR "Strt"
  148. #define NS_WIN_RECENT_DIR "Rcnt"
  149. #define NS_WIN_SEND_TO_DIR "SndTo"
  150. #define NS_WIN_BITBUCKET_DIR "Buckt"
  151. #define NS_WIN_STARTMENU_DIR "Strt"
  152. // This gives the same thing as NS_OS_DESKTOP_DIR
  153. #define NS_WIN_DESKTOP_DIRECTORY "DeskP" // file sys dir which physically stores objects on desktop
  154. #define NS_WIN_DRIVES_DIR "Drivs"
  155. #define NS_WIN_NETWORK_DIR "NetW"
  156. #define NS_WIN_NETHOOD_DIR "netH"
  157. #define NS_WIN_FONTS_DIR "Fnts"
  158. #define NS_WIN_TEMPLATES_DIR "Tmpls"
  159. #define NS_WIN_COMMON_STARTMENU_DIR "CmStrt"
  160. #define NS_WIN_COMMON_PROGRAMS_DIR "CmPrgs"
  161. #define NS_WIN_COMMON_STARTUP_DIR "CmStrt"
  162. #define NS_WIN_COMMON_DESKTOP_DIRECTORY "CmDeskP"
  163. #define NS_WIN_APPDATA_DIR "AppData"
  164. #define NS_WIN_LOCAL_APPDATA_DIR "LocalAppData"
  165. #define NS_WIN_PRINTHOOD "PrntHd"
  166. #define NS_WIN_COOKIES_DIR "CookD"
  167. #elif defined (XP_UNIX)
  168. #define NS_UNIX_LOCAL_DIR "Locl"
  169. #define NS_UNIX_LIB_DIR "LibD"
  170. #define NS_UNIX_HOME_DIR NS_OS_HOME_DIR
  171. #elif defined (XP_OS2)
  172. #define NS_OS2_DIR "OS2Dir"
  173. #define NS_OS2_HOME_DIR NS_OS_HOME_DIR
  174. #define NS_OS2_DESKTOP_DIR NS_OS_DESKTOP_DIR
  175. #elif defined (XP_BEOS)
  176. #define NS_BEOS_SETTINGS_DIR "Setngs"
  177. #define NS_BEOS_HOME_DIR NS_OS_HOME_DIR
  178. #define NS_BEOS_DESKTOP_DIR NS_OS_DESKTOP_DIR
  179. #endif
  180. /* Deprecated */
  181. #define NS_OS_DRIVE_DIR "DrvD"
  182. #endif