PageRenderTime 46ms CodeModel.GetById 18ms RepoModel.GetById 1ms app.codeStats 0ms

/gecko_api/include/nsIPrefBranch.h

http://firefox-mac-pdf.googlecode.com/
C Header | 566 lines | 190 code | 64 blank | 312 comment | 0 complexity | a1753f226b8b99eead9274e56872c5be MD5 | raw file
  1. /*
  2. * DO NOT EDIT. THIS FILE IS GENERATED FROM /builds/tinderbox/XR-Trunk/Darwin_8.8.4_Depend/mozilla/modules/libpref/public/nsIPrefBranch.idl
  3. */
  4. #ifndef __gen_nsIPrefBranch_h__
  5. #define __gen_nsIPrefBranch_h__
  6. #ifndef __gen_nsISupports_h__
  7. #include "nsISupports.h"
  8. #endif
  9. /* For IDL files that don't want to include root IDL files. */
  10. #ifndef NS_NO_VTABLE
  11. #define NS_NO_VTABLE
  12. #endif
  13. /* starting interface: nsIPrefBranch */
  14. #define NS_IPREFBRANCH_IID_STR "56c35506-f14b-11d3-99d3-ddbfac2ccf65"
  15. #define NS_IPREFBRANCH_IID \
  16. {0x56c35506, 0xf14b, 0x11d3, \
  17. { 0x99, 0xd3, 0xdd, 0xbf, 0xac, 0x2c, 0xcf, 0x65 }}
  18. /**
  19. * The nsIPrefBranch interface is used to manipulate the preferences data. This
  20. * object may be obtained from the preferences service (nsIPrefService) and
  21. * used to get and set default and/or user preferences across the application.
  22. *
  23. * This object is created with a "root" value which describes the base point in
  24. * the preferences "tree" from which this "branch" stems. Preferences are
  25. * accessed off of this root by using just the final portion of the preference.
  26. * For example, if this object is created with the root "browser.startup.",
  27. * the preferences "browser.startup.page", "browser.startup.homepage",
  28. * and "browser.startup.homepage_override" can be accessed by simply passing
  29. * "page", "homepage", or "homepage_override" to the various Get/Set methods.
  30. *
  31. * @see nsIPrefService
  32. *
  33. * @status FROZEN
  34. */
  35. class NS_NO_VTABLE NS_SCRIPTABLE nsIPrefBranch : public nsISupports {
  36. public:
  37. NS_DECLARE_STATIC_IID_ACCESSOR(NS_IPREFBRANCH_IID)
  38. /**
  39. * Values describing the basic preference types.
  40. *
  41. * @see getPrefType
  42. */
  43. enum { PREF_INVALID = 0 };
  44. enum { PREF_STRING = 32 };
  45. enum { PREF_INT = 64 };
  46. enum { PREF_BOOL = 128 };
  47. /**
  48. * Called to get the root on which this branch is based, such as
  49. * "browser.startup."
  50. */
  51. /* readonly attribute string root; */
  52. NS_SCRIPTABLE NS_IMETHOD GetRoot(char * *aRoot) = 0;
  53. /**
  54. * Called to determine the type of a specific preference.
  55. *
  56. * @param aPrefName The preference to get the type of.
  57. *
  58. * @return long A value representing the type of the preference. This
  59. * value will be PREF_STRING, PREF_INT, or PREF_BOOL.
  60. */
  61. /* long getPrefType (in string aPrefName); */
  62. NS_SCRIPTABLE NS_IMETHOD GetPrefType(const char *aPrefName, PRInt32 *_retval) = 0;
  63. /**
  64. * Called to get the state of an individual boolean preference.
  65. *
  66. * @param aPrefName The boolean preference to get the state of.
  67. *
  68. * @return boolean The value of the requested boolean preference.
  69. *
  70. * @see setBoolPref
  71. */
  72. /* boolean getBoolPref (in string aPrefName); */
  73. NS_SCRIPTABLE NS_IMETHOD GetBoolPref(const char *aPrefName, PRBool *_retval) = 0;
  74. /**
  75. * Called to set the state of an individual boolean preference.
  76. *
  77. * @param aPrefName The boolean preference to set the state of.
  78. * @param aValue The boolean value to set the preference to.
  79. *
  80. * @return NS_OK The value was successfully set.
  81. * @return Other The value was not set or is the wrong type.
  82. *
  83. * @see getBoolPref
  84. */
  85. /* void setBoolPref (in string aPrefName, in long aValue); */
  86. NS_SCRIPTABLE NS_IMETHOD SetBoolPref(const char *aPrefName, PRInt32 aValue) = 0;
  87. /**
  88. * Called to get the state of an individual string preference.
  89. *
  90. * @param aPrefName The string preference to retrieve.
  91. *
  92. * @return string The value of the requested string preference.
  93. *
  94. * @see setCharPref
  95. */
  96. /* string getCharPref (in string aPrefName); */
  97. NS_SCRIPTABLE NS_IMETHOD GetCharPref(const char *aPrefName, char **_retval) = 0;
  98. /**
  99. * Called to set the state of an individual string preference.
  100. *
  101. * @param aPrefName The string preference to set.
  102. * @param aValue The string value to set the preference to.
  103. *
  104. * @return NS_OK The value was successfully set.
  105. * @return Other The value was not set or is the wrong type.
  106. *
  107. * @see getCharPref
  108. */
  109. /* void setCharPref (in string aPrefName, in string aValue); */
  110. NS_SCRIPTABLE NS_IMETHOD SetCharPref(const char *aPrefName, const char *aValue) = 0;
  111. /**
  112. * Called to get the state of an individual integer preference.
  113. *
  114. * @param aPrefName The integer preference to get the value of.
  115. *
  116. * @return long The value of the requested integer preference.
  117. *
  118. * @see setIntPref
  119. */
  120. /* long getIntPref (in string aPrefName); */
  121. NS_SCRIPTABLE NS_IMETHOD GetIntPref(const char *aPrefName, PRInt32 *_retval) = 0;
  122. /**
  123. * Called to set the state of an individual integer preference.
  124. *
  125. * @param aPrefName The integer preference to set the value of.
  126. * @param aValue The integer value to set the preference to.
  127. *
  128. * @return NS_OK The value was successfully set.
  129. * @return Other The value was not set or is the wrong type.
  130. *
  131. * @see getIntPref
  132. */
  133. /* void setIntPref (in string aPrefName, in long aValue); */
  134. NS_SCRIPTABLE NS_IMETHOD SetIntPref(const char *aPrefName, PRInt32 aValue) = 0;
  135. /**
  136. * Called to get the state of an individual complex preference. A complex
  137. * preference is a preference which represents an XPCOM object that can not
  138. * be easily represented using a standard boolean, integer or string value.
  139. *
  140. * @param aPrefName The complex preference to get the value of.
  141. * @param aType The XPCOM interface that this complex preference
  142. * represents. Interfaces currently supported are:
  143. * - nsILocalFile
  144. * - nsISupportsString (UniChar)
  145. * - nsIPrefLocalizedString (Localized UniChar)
  146. * - nsIFileSpec (deprecated - to be removed eventually)
  147. * @param aValue The XPCOM object into which to the complex preference
  148. * value should be retrieved.
  149. *
  150. * @return NS_OK The value was successfully retrieved.
  151. * @return Other The value does not exist or is the wrong type.
  152. *
  153. * @see setComplexValue
  154. */
  155. /* void getComplexValue (in string aPrefName, in nsIIDRef aType, [iid_is (aType), retval] out nsQIResult aValue); */
  156. NS_SCRIPTABLE NS_IMETHOD GetComplexValue(const char *aPrefName, const nsIID & aType, void * *aValue) = 0;
  157. /**
  158. * Called to set the state of an individual complex preference. A complex
  159. * preference is a preference which represents an XPCOM object that can not
  160. * be easily represented using a standard boolean, integer or string value.
  161. *
  162. * @param aPrefName The complex preference to set the value of.
  163. * @param aType The XPCOM interface that this complex preference
  164. * represents. Interfaces currently supported are:
  165. * - nsILocalFile
  166. * - nsISupportsString (UniChar)
  167. * - nsIPrefLocalizedString (Localized UniChar)
  168. * - nsIFileSpec (deprecated - to be removed eventually)
  169. * @param aValue The XPCOM object from which to set the complex preference
  170. * value.
  171. *
  172. * @return NS_OK The value was successfully set.
  173. * @return Other The value was not set or is the wrong type.
  174. *
  175. * @see getComplexValue
  176. */
  177. /* void setComplexValue (in string aPrefName, in nsIIDRef aType, in nsISupports aValue); */
  178. NS_SCRIPTABLE NS_IMETHOD SetComplexValue(const char *aPrefName, const nsIID & aType, nsISupports *aValue) = 0;
  179. /**
  180. * Called to clear a user set value from a specific preference. This will, in
  181. * effect, reset the value to the default value. If no default value exists
  182. * the preference will cease to exist.
  183. *
  184. * @param aPrefName The preference to be cleared.
  185. *
  186. * @note
  187. * This method does nothing if this object is a default branch.
  188. *
  189. * @return NS_OK The user preference was successfully cleared.
  190. * @return Other The preference does not exist or have a user set value.
  191. */
  192. /* void clearUserPref (in string aPrefName); */
  193. NS_SCRIPTABLE NS_IMETHOD ClearUserPref(const char *aPrefName) = 0;
  194. /**
  195. * Called to lock a specific preference. Locking a preference will cause the
  196. * preference service to always return the default value regardless of
  197. * whether there is a user set value or not.
  198. *
  199. * @param aPrefName The preference to be locked.
  200. *
  201. * @note
  202. * This method can be called on either a default or user branch but, in
  203. * effect, always operates on the default branch.
  204. *
  205. * @return NS_OK The preference was successfully locked.
  206. * @return Other The preference does not exist or an error occurred.
  207. *
  208. * @see unlockPref
  209. */
  210. /* void lockPref (in string aPrefName); */
  211. NS_SCRIPTABLE NS_IMETHOD LockPref(const char *aPrefName) = 0;
  212. /**
  213. * Called to check if a specific preference has a user value associated to
  214. * it.
  215. *
  216. * @param aPrefName The preference to be tested.
  217. *
  218. * @note
  219. * This method can be called on either a default or user branch but, in
  220. * effect, always operates on the user branch.
  221. *
  222. * @note
  223. * If a preference was manually set to a value that equals the default value,
  224. * then the preference no longer has a user set value, i.e. it is
  225. * considered reset to its default value.
  226. * In particular, this method will return false for such a preference and
  227. * the preference will not be saved to a file by nsIPrefService.savePrefFile.
  228. *
  229. * @return boolean true The preference has a user set value.
  230. * false The preference only has a default value.
  231. */
  232. /* boolean prefHasUserValue (in string aPrefName); */
  233. NS_SCRIPTABLE NS_IMETHOD PrefHasUserValue(const char *aPrefName, PRBool *_retval) = 0;
  234. /**
  235. * Called to check if a specific preference is locked. If a preference is
  236. * locked calling its Get method will always return the default value.
  237. *
  238. * @param aPrefName The preference to be tested.
  239. *
  240. * @note
  241. * This method can be called on either a default or user branch but, in
  242. * effect, always operates on the default branch.
  243. *
  244. * @return boolean true The preference is locked.
  245. * false The preference is not locked.
  246. *
  247. * @see lockPref
  248. * @see unlockPref
  249. */
  250. /* boolean prefIsLocked (in string aPrefName); */
  251. NS_SCRIPTABLE NS_IMETHOD PrefIsLocked(const char *aPrefName, PRBool *_retval) = 0;
  252. /**
  253. * Called to unlock a specific preference. Unlocking a previously locked
  254. * preference allows the preference service to once again return the user set
  255. * value of the preference.
  256. *
  257. * @param aPrefName The preference to be unlocked.
  258. *
  259. * @note
  260. * This method can be called on either a default or user branch but, in
  261. * effect, always operates on the default branch.
  262. *
  263. * @return NS_OK The preference was successfully unlocked.
  264. * @return Other The preference does not exist or an error occurred.
  265. *
  266. * @see lockPref
  267. */
  268. /* void unlockPref (in string aPrefName); */
  269. NS_SCRIPTABLE NS_IMETHOD UnlockPref(const char *aPrefName) = 0;
  270. /**
  271. * Called to remove all of the preferences referenced by this branch.
  272. *
  273. * @param aStartingAt The point on the branch at which to start the deleting
  274. * preferences. Pass in "" to remove all preferences
  275. * referenced by this branch.
  276. *
  277. * @note
  278. * This method can be called on either a default or user branch but, in
  279. * effect, always operates on both.
  280. *
  281. * @return NS_OK The preference(s) were successfully removed.
  282. * @return Other The preference(s) do not exist or an error occurred.
  283. */
  284. /* void deleteBranch (in string aStartingAt); */
  285. NS_SCRIPTABLE NS_IMETHOD DeleteBranch(const char *aStartingAt) = 0;
  286. /**
  287. * Returns an array of strings representing the child preferences of the
  288. * root of this branch.
  289. *
  290. * @param aStartingAt The point on the branch at which to start enumerating
  291. * the child preferences. Pass in "" to enumerate all
  292. * preferences referenced by this branch.
  293. * @param aCount Receives the number of elements in the array.
  294. * @param aChildArray Receives the array of child preferences.
  295. *
  296. * @note
  297. * This method can be called on either a default or user branch but, in
  298. * effect, always operates on both.
  299. *
  300. * @return NS_OK The preference list was successfully retrieved.
  301. * @return Other The preference(s) do not exist or an error occurred.
  302. */
  303. /* void getChildList (in string aStartingAt, out unsigned long aCount, [array, size_is (aCount), retval] out string aChildArray); */
  304. NS_SCRIPTABLE NS_IMETHOD GetChildList(const char *aStartingAt, PRUint32 *aCount, char ***aChildArray) = 0;
  305. /**
  306. * Called to reset all of the preferences referenced by this branch to their
  307. * default values.
  308. *
  309. * @param aStartingAt The point on the branch at which to start the resetting
  310. * preferences to their default values. Pass in "" to
  311. * reset all preferences referenced by this branch.
  312. *
  313. * @note
  314. * This method can be called on either a default or user branch but, in
  315. * effect, always operates on the user branch.
  316. *
  317. * @return NS_OK The preference(s) were successfully reset.
  318. * @return Other The preference(s) do not exist or an error occurred.
  319. */
  320. /* void resetBranch (in string aStartingAt); */
  321. NS_SCRIPTABLE NS_IMETHOD ResetBranch(const char *aStartingAt) = 0;
  322. };
  323. NS_DEFINE_STATIC_IID_ACCESSOR(nsIPrefBranch, NS_IPREFBRANCH_IID)
  324. /* Use this macro when declaring classes that implement this interface. */
  325. #define NS_DECL_NSIPREFBRANCH \
  326. NS_SCRIPTABLE NS_IMETHOD GetRoot(char * *aRoot); \
  327. NS_SCRIPTABLE NS_IMETHOD GetPrefType(const char *aPrefName, PRInt32 *_retval); \
  328. NS_SCRIPTABLE NS_IMETHOD GetBoolPref(const char *aPrefName, PRBool *_retval); \
  329. NS_SCRIPTABLE NS_IMETHOD SetBoolPref(const char *aPrefName, PRInt32 aValue); \
  330. NS_SCRIPTABLE NS_IMETHOD GetCharPref(const char *aPrefName, char **_retval); \
  331. NS_SCRIPTABLE NS_IMETHOD SetCharPref(const char *aPrefName, const char *aValue); \
  332. NS_SCRIPTABLE NS_IMETHOD GetIntPref(const char *aPrefName, PRInt32 *_retval); \
  333. NS_SCRIPTABLE NS_IMETHOD SetIntPref(const char *aPrefName, PRInt32 aValue); \
  334. NS_SCRIPTABLE NS_IMETHOD GetComplexValue(const char *aPrefName, const nsIID & aType, void * *aValue); \
  335. NS_SCRIPTABLE NS_IMETHOD SetComplexValue(const char *aPrefName, const nsIID & aType, nsISupports *aValue); \
  336. NS_SCRIPTABLE NS_IMETHOD ClearUserPref(const char *aPrefName); \
  337. NS_SCRIPTABLE NS_IMETHOD LockPref(const char *aPrefName); \
  338. NS_SCRIPTABLE NS_IMETHOD PrefHasUserValue(const char *aPrefName, PRBool *_retval); \
  339. NS_SCRIPTABLE NS_IMETHOD PrefIsLocked(const char *aPrefName, PRBool *_retval); \
  340. NS_SCRIPTABLE NS_IMETHOD UnlockPref(const char *aPrefName); \
  341. NS_SCRIPTABLE NS_IMETHOD DeleteBranch(const char *aStartingAt); \
  342. NS_SCRIPTABLE NS_IMETHOD GetChildList(const char *aStartingAt, PRUint32 *aCount, char ***aChildArray); \
  343. NS_SCRIPTABLE NS_IMETHOD ResetBranch(const char *aStartingAt);
  344. /* Use this macro to declare functions that forward the behavior of this interface to another object. */
  345. #define NS_FORWARD_NSIPREFBRANCH(_to) \
  346. NS_SCRIPTABLE NS_IMETHOD GetRoot(char * *aRoot) { return _to GetRoot(aRoot); } \
  347. NS_SCRIPTABLE NS_IMETHOD GetPrefType(const char *aPrefName, PRInt32 *_retval) { return _to GetPrefType(aPrefName, _retval); } \
  348. NS_SCRIPTABLE NS_IMETHOD GetBoolPref(const char *aPrefName, PRBool *_retval) { return _to GetBoolPref(aPrefName, _retval); } \
  349. NS_SCRIPTABLE NS_IMETHOD SetBoolPref(const char *aPrefName, PRInt32 aValue) { return _to SetBoolPref(aPrefName, aValue); } \
  350. NS_SCRIPTABLE NS_IMETHOD GetCharPref(const char *aPrefName, char **_retval) { return _to GetCharPref(aPrefName, _retval); } \
  351. NS_SCRIPTABLE NS_IMETHOD SetCharPref(const char *aPrefName, const char *aValue) { return _to SetCharPref(aPrefName, aValue); } \
  352. NS_SCRIPTABLE NS_IMETHOD GetIntPref(const char *aPrefName, PRInt32 *_retval) { return _to GetIntPref(aPrefName, _retval); } \
  353. NS_SCRIPTABLE NS_IMETHOD SetIntPref(const char *aPrefName, PRInt32 aValue) { return _to SetIntPref(aPrefName, aValue); } \
  354. NS_SCRIPTABLE NS_IMETHOD GetComplexValue(const char *aPrefName, const nsIID & aType, void * *aValue) { return _to GetComplexValue(aPrefName, aType, aValue); } \
  355. NS_SCRIPTABLE NS_IMETHOD SetComplexValue(const char *aPrefName, const nsIID & aType, nsISupports *aValue) { return _to SetComplexValue(aPrefName, aType, aValue); } \
  356. NS_SCRIPTABLE NS_IMETHOD ClearUserPref(const char *aPrefName) { return _to ClearUserPref(aPrefName); } \
  357. NS_SCRIPTABLE NS_IMETHOD LockPref(const char *aPrefName) { return _to LockPref(aPrefName); } \
  358. NS_SCRIPTABLE NS_IMETHOD PrefHasUserValue(const char *aPrefName, PRBool *_retval) { return _to PrefHasUserValue(aPrefName, _retval); } \
  359. NS_SCRIPTABLE NS_IMETHOD PrefIsLocked(const char *aPrefName, PRBool *_retval) { return _to PrefIsLocked(aPrefName, _retval); } \
  360. NS_SCRIPTABLE NS_IMETHOD UnlockPref(const char *aPrefName) { return _to UnlockPref(aPrefName); } \
  361. NS_SCRIPTABLE NS_IMETHOD DeleteBranch(const char *aStartingAt) { return _to DeleteBranch(aStartingAt); } \
  362. NS_SCRIPTABLE NS_IMETHOD GetChildList(const char *aStartingAt, PRUint32 *aCount, char ***aChildArray) { return _to GetChildList(aStartingAt, aCount, aChildArray); } \
  363. NS_SCRIPTABLE NS_IMETHOD ResetBranch(const char *aStartingAt) { return _to ResetBranch(aStartingAt); }
  364. /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
  365. #define NS_FORWARD_SAFE_NSIPREFBRANCH(_to) \
  366. NS_SCRIPTABLE NS_IMETHOD GetRoot(char * *aRoot) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetRoot(aRoot); } \
  367. NS_SCRIPTABLE NS_IMETHOD GetPrefType(const char *aPrefName, PRInt32 *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetPrefType(aPrefName, _retval); } \
  368. NS_SCRIPTABLE NS_IMETHOD GetBoolPref(const char *aPrefName, PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetBoolPref(aPrefName, _retval); } \
  369. NS_SCRIPTABLE NS_IMETHOD SetBoolPref(const char *aPrefName, PRInt32 aValue) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetBoolPref(aPrefName, aValue); } \
  370. NS_SCRIPTABLE NS_IMETHOD GetCharPref(const char *aPrefName, char **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetCharPref(aPrefName, _retval); } \
  371. NS_SCRIPTABLE NS_IMETHOD SetCharPref(const char *aPrefName, const char *aValue) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetCharPref(aPrefName, aValue); } \
  372. NS_SCRIPTABLE NS_IMETHOD GetIntPref(const char *aPrefName, PRInt32 *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetIntPref(aPrefName, _retval); } \
  373. NS_SCRIPTABLE NS_IMETHOD SetIntPref(const char *aPrefName, PRInt32 aValue) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetIntPref(aPrefName, aValue); } \
  374. NS_SCRIPTABLE NS_IMETHOD GetComplexValue(const char *aPrefName, const nsIID & aType, void * *aValue) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetComplexValue(aPrefName, aType, aValue); } \
  375. NS_SCRIPTABLE NS_IMETHOD SetComplexValue(const char *aPrefName, const nsIID & aType, nsISupports *aValue) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetComplexValue(aPrefName, aType, aValue); } \
  376. NS_SCRIPTABLE NS_IMETHOD ClearUserPref(const char *aPrefName) { return !_to ? NS_ERROR_NULL_POINTER : _to->ClearUserPref(aPrefName); } \
  377. NS_SCRIPTABLE NS_IMETHOD LockPref(const char *aPrefName) { return !_to ? NS_ERROR_NULL_POINTER : _to->LockPref(aPrefName); } \
  378. NS_SCRIPTABLE NS_IMETHOD PrefHasUserValue(const char *aPrefName, PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->PrefHasUserValue(aPrefName, _retval); } \
  379. NS_SCRIPTABLE NS_IMETHOD PrefIsLocked(const char *aPrefName, PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->PrefIsLocked(aPrefName, _retval); } \
  380. NS_SCRIPTABLE NS_IMETHOD UnlockPref(const char *aPrefName) { return !_to ? NS_ERROR_NULL_POINTER : _to->UnlockPref(aPrefName); } \
  381. NS_SCRIPTABLE NS_IMETHOD DeleteBranch(const char *aStartingAt) { return !_to ? NS_ERROR_NULL_POINTER : _to->DeleteBranch(aStartingAt); } \
  382. NS_SCRIPTABLE NS_IMETHOD GetChildList(const char *aStartingAt, PRUint32 *aCount, char ***aChildArray) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetChildList(aStartingAt, aCount, aChildArray); } \
  383. NS_SCRIPTABLE NS_IMETHOD ResetBranch(const char *aStartingAt) { return !_to ? NS_ERROR_NULL_POINTER : _to->ResetBranch(aStartingAt); }
  384. #if 0
  385. /* Use the code below as a template for the implementation class for this interface. */
  386. /* Header file */
  387. class nsPrefBranch : public nsIPrefBranch
  388. {
  389. public:
  390. NS_DECL_ISUPPORTS
  391. NS_DECL_NSIPREFBRANCH
  392. nsPrefBranch();
  393. private:
  394. ~nsPrefBranch();
  395. protected:
  396. /* additional members */
  397. };
  398. /* Implementation file */
  399. NS_IMPL_ISUPPORTS1(nsPrefBranch, nsIPrefBranch)
  400. nsPrefBranch::nsPrefBranch()
  401. {
  402. /* member initializers and constructor code */
  403. }
  404. nsPrefBranch::~nsPrefBranch()
  405. {
  406. /* destructor code */
  407. }
  408. /* readonly attribute string root; */
  409. NS_IMETHODIMP nsPrefBranch::GetRoot(char * *aRoot)
  410. {
  411. return NS_ERROR_NOT_IMPLEMENTED;
  412. }
  413. /* long getPrefType (in string aPrefName); */
  414. NS_IMETHODIMP nsPrefBranch::GetPrefType(const char *aPrefName, PRInt32 *_retval)
  415. {
  416. return NS_ERROR_NOT_IMPLEMENTED;
  417. }
  418. /* boolean getBoolPref (in string aPrefName); */
  419. NS_IMETHODIMP nsPrefBranch::GetBoolPref(const char *aPrefName, PRBool *_retval)
  420. {
  421. return NS_ERROR_NOT_IMPLEMENTED;
  422. }
  423. /* void setBoolPref (in string aPrefName, in long aValue); */
  424. NS_IMETHODIMP nsPrefBranch::SetBoolPref(const char *aPrefName, PRInt32 aValue)
  425. {
  426. return NS_ERROR_NOT_IMPLEMENTED;
  427. }
  428. /* string getCharPref (in string aPrefName); */
  429. NS_IMETHODIMP nsPrefBranch::GetCharPref(const char *aPrefName, char **_retval)
  430. {
  431. return NS_ERROR_NOT_IMPLEMENTED;
  432. }
  433. /* void setCharPref (in string aPrefName, in string aValue); */
  434. NS_IMETHODIMP nsPrefBranch::SetCharPref(const char *aPrefName, const char *aValue)
  435. {
  436. return NS_ERROR_NOT_IMPLEMENTED;
  437. }
  438. /* long getIntPref (in string aPrefName); */
  439. NS_IMETHODIMP nsPrefBranch::GetIntPref(const char *aPrefName, PRInt32 *_retval)
  440. {
  441. return NS_ERROR_NOT_IMPLEMENTED;
  442. }
  443. /* void setIntPref (in string aPrefName, in long aValue); */
  444. NS_IMETHODIMP nsPrefBranch::SetIntPref(const char *aPrefName, PRInt32 aValue)
  445. {
  446. return NS_ERROR_NOT_IMPLEMENTED;
  447. }
  448. /* void getComplexValue (in string aPrefName, in nsIIDRef aType, [iid_is (aType), retval] out nsQIResult aValue); */
  449. NS_IMETHODIMP nsPrefBranch::GetComplexValue(const char *aPrefName, const nsIID & aType, void * *aValue)
  450. {
  451. return NS_ERROR_NOT_IMPLEMENTED;
  452. }
  453. /* void setComplexValue (in string aPrefName, in nsIIDRef aType, in nsISupports aValue); */
  454. NS_IMETHODIMP nsPrefBranch::SetComplexValue(const char *aPrefName, const nsIID & aType, nsISupports *aValue)
  455. {
  456. return NS_ERROR_NOT_IMPLEMENTED;
  457. }
  458. /* void clearUserPref (in string aPrefName); */
  459. NS_IMETHODIMP nsPrefBranch::ClearUserPref(const char *aPrefName)
  460. {
  461. return NS_ERROR_NOT_IMPLEMENTED;
  462. }
  463. /* void lockPref (in string aPrefName); */
  464. NS_IMETHODIMP nsPrefBranch::LockPref(const char *aPrefName)
  465. {
  466. return NS_ERROR_NOT_IMPLEMENTED;
  467. }
  468. /* boolean prefHasUserValue (in string aPrefName); */
  469. NS_IMETHODIMP nsPrefBranch::PrefHasUserValue(const char *aPrefName, PRBool *_retval)
  470. {
  471. return NS_ERROR_NOT_IMPLEMENTED;
  472. }
  473. /* boolean prefIsLocked (in string aPrefName); */
  474. NS_IMETHODIMP nsPrefBranch::PrefIsLocked(const char *aPrefName, PRBool *_retval)
  475. {
  476. return NS_ERROR_NOT_IMPLEMENTED;
  477. }
  478. /* void unlockPref (in string aPrefName); */
  479. NS_IMETHODIMP nsPrefBranch::UnlockPref(const char *aPrefName)
  480. {
  481. return NS_ERROR_NOT_IMPLEMENTED;
  482. }
  483. /* void deleteBranch (in string aStartingAt); */
  484. NS_IMETHODIMP nsPrefBranch::DeleteBranch(const char *aStartingAt)
  485. {
  486. return NS_ERROR_NOT_IMPLEMENTED;
  487. }
  488. /* void getChildList (in string aStartingAt, out unsigned long aCount, [array, size_is (aCount), retval] out string aChildArray); */
  489. NS_IMETHODIMP nsPrefBranch::GetChildList(const char *aStartingAt, PRUint32 *aCount, char ***aChildArray)
  490. {
  491. return NS_ERROR_NOT_IMPLEMENTED;
  492. }
  493. /* void resetBranch (in string aStartingAt); */
  494. NS_IMETHODIMP nsPrefBranch::ResetBranch(const char *aStartingAt)
  495. {
  496. return NS_ERROR_NOT_IMPLEMENTED;
  497. }
  498. /* End of implementation class template. */
  499. #endif
  500. #define NS_PREFBRANCH_CONTRACTID "@mozilla.org/preferencesbranch;1"
  501. #define NS_PREFBRANCH_CLASSNAME "Preferences Branch"
  502. #endif /* __gen_nsIPrefBranch_h__ */