1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/modules/libpref/src/prefapi_private_data.h Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,49 @@ 1.4 +/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ 1.5 +/* This Source Code Form is subject to the terms of the Mozilla Public 1.6 + * License, v. 2.0. If a copy of the MPL was not distributed with this 1.7 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 1.8 + 1.9 +/* Data shared between prefapi.c and nsPref.cpp */ 1.10 + 1.11 +#ifndef prefapi_private_data_h 1.12 +#define prefapi_private_data_h 1.13 + 1.14 +#include "mozilla/MemoryReporting.h" 1.15 + 1.16 +extern PLDHashTable gHashTable; 1.17 +extern bool gDirty; 1.18 + 1.19 +namespace mozilla { 1.20 +namespace dom { 1.21 +class PrefSetting; 1.22 +} 1.23 +} 1.24 + 1.25 +enum pref_SaveTypes { SAVE_NONSHARED, SAVE_SHARED, SAVE_ALL, SAVE_ALL_AND_DEFAULTS }; 1.26 + 1.27 +// Passed as the arg to pref_savePref 1.28 +struct pref_saveArgs { 1.29 + char **prefArray; 1.30 + pref_SaveTypes saveTypes; 1.31 +}; 1.32 + 1.33 +PLDHashOperator 1.34 +pref_savePref(PLDHashTable *table, PLDHashEntryHdr *heh, uint32_t i, void *arg); 1.35 + 1.36 +PLDHashOperator 1.37 +pref_GetPrefs(PLDHashTable *table, 1.38 + PLDHashEntryHdr *heh, uint32_t i, void *arg); 1.39 + 1.40 +nsresult 1.41 +pref_SetPref(const mozilla::dom::PrefSetting& aPref); 1.42 + 1.43 +int pref_CompareStrings(const void *v1, const void *v2, void* unused); 1.44 +PrefHashEntry* pref_HashTableLookup(const void *key); 1.45 + 1.46 +void pref_GetPrefFromEntry(PrefHashEntry *aHashEntry, 1.47 + mozilla::dom::PrefSetting* aPref); 1.48 + 1.49 +size_t 1.50 +pref_SizeOfPrivateData(mozilla::MallocSizeOf aMallocSizeOf); 1.51 + 1.52 +#endif