michael@0: /* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: /* Data shared between prefapi.c and nsPref.cpp */ michael@0: michael@0: #ifndef prefapi_private_data_h michael@0: #define prefapi_private_data_h michael@0: michael@0: #include "mozilla/MemoryReporting.h" michael@0: michael@0: extern PLDHashTable gHashTable; michael@0: extern bool gDirty; michael@0: michael@0: namespace mozilla { michael@0: namespace dom { michael@0: class PrefSetting; michael@0: } michael@0: } michael@0: michael@0: enum pref_SaveTypes { SAVE_NONSHARED, SAVE_SHARED, SAVE_ALL, SAVE_ALL_AND_DEFAULTS }; michael@0: michael@0: // Passed as the arg to pref_savePref michael@0: struct pref_saveArgs { michael@0: char **prefArray; michael@0: pref_SaveTypes saveTypes; michael@0: }; michael@0: michael@0: PLDHashOperator michael@0: pref_savePref(PLDHashTable *table, PLDHashEntryHdr *heh, uint32_t i, void *arg); michael@0: michael@0: PLDHashOperator michael@0: pref_GetPrefs(PLDHashTable *table, michael@0: PLDHashEntryHdr *heh, uint32_t i, void *arg); michael@0: michael@0: nsresult michael@0: pref_SetPref(const mozilla::dom::PrefSetting& aPref); michael@0: michael@0: int pref_CompareStrings(const void *v1, const void *v2, void* unused); michael@0: PrefHashEntry* pref_HashTableLookup(const void *key); michael@0: michael@0: void pref_GetPrefFromEntry(PrefHashEntry *aHashEntry, michael@0: mozilla::dom::PrefSetting* aPref); michael@0: michael@0: size_t michael@0: pref_SizeOfPrivateData(mozilla::MallocSizeOf aMallocSizeOf); michael@0: michael@0: #endif