modules/libpref/src/prefapi_private_data.h

branch
TOR_BUG_3246
changeset 7
129ffea94266
equal deleted inserted replaced
-1:000000000000 0:f1798a31b6c4
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
6 /* Data shared between prefapi.c and nsPref.cpp */
7
8 #ifndef prefapi_private_data_h
9 #define prefapi_private_data_h
10
11 #include "mozilla/MemoryReporting.h"
12
13 extern PLDHashTable gHashTable;
14 extern bool gDirty;
15
16 namespace mozilla {
17 namespace dom {
18 class PrefSetting;
19 }
20 }
21
22 enum pref_SaveTypes { SAVE_NONSHARED, SAVE_SHARED, SAVE_ALL, SAVE_ALL_AND_DEFAULTS };
23
24 // Passed as the arg to pref_savePref
25 struct pref_saveArgs {
26 char **prefArray;
27 pref_SaveTypes saveTypes;
28 };
29
30 PLDHashOperator
31 pref_savePref(PLDHashTable *table, PLDHashEntryHdr *heh, uint32_t i, void *arg);
32
33 PLDHashOperator
34 pref_GetPrefs(PLDHashTable *table,
35 PLDHashEntryHdr *heh, uint32_t i, void *arg);
36
37 nsresult
38 pref_SetPref(const mozilla::dom::PrefSetting& aPref);
39
40 int pref_CompareStrings(const void *v1, const void *v2, void* unused);
41 PrefHashEntry* pref_HashTableLookup(const void *key);
42
43 void pref_GetPrefFromEntry(PrefHashEntry *aHashEntry,
44 mozilla::dom::PrefSetting* aPref);
45
46 size_t
47 pref_SizeOfPrivateData(mozilla::MallocSizeOf aMallocSizeOf);
48
49 #endif

mercurial