prefapi_private_data.h 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. /* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  2. /* This Source Code Form is subject to the terms of the Mozilla Public
  3. * License, v. 2.0. If a copy of the MPL was not distributed with this
  4. * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
  5. /* Data shared between prefapi.c and nsPref.cpp */
  6. #ifndef prefapi_private_data_h
  7. #define prefapi_private_data_h
  8. #include "mozilla/MemoryReporting.h"
  9. #include "mozilla/UniquePtr.h"
  10. extern PLDHashTable* gHashTable;
  11. namespace mozilla {
  12. namespace dom {
  13. class PrefSetting;
  14. } // namespace dom
  15. } // namespace mozilla
  16. mozilla::UniquePtr<char*[]>
  17. pref_savePrefs(PLDHashTable* aTable, uint32_t* aPrefCount);
  18. nsresult
  19. pref_SetPref(const mozilla::dom::PrefSetting& aPref);
  20. int pref_CompareStrings(const void *v1, const void *v2, void* unused);
  21. PrefHashEntry* pref_HashTableLookup(const char *key);
  22. bool
  23. pref_EntryHasAdvisablySizedValues(PrefHashEntry* aHashEntry);
  24. void pref_GetPrefFromEntry(PrefHashEntry *aHashEntry,
  25. mozilla::dom::PrefSetting* aPref);
  26. size_t
  27. pref_SizeOfPrivateData(mozilla::MallocSizeOf aMallocSizeOf);
  28. #endif