2007-03-22 10:30:00 -07:00
|
|
|
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
2012-05-21 04:12:37 -07:00
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
2007-03-22 10:30:00 -07:00
|
|
|
|
|
|
|
/* Data shared between prefapi.c and nsPref.cpp */
|
|
|
|
|
2013-06-23 05:03:39 -07:00
|
|
|
#include "mozilla/MemoryReporting.h"
|
|
|
|
|
2007-03-22 10:30:00 -07:00
|
|
|
extern PLDHashTable gHashTable;
|
2011-09-28 23:19:26 -07:00
|
|
|
extern bool gDirty;
|
2007-03-22 10:30:00 -07:00
|
|
|
|
2012-08-22 13:00:21 -07:00
|
|
|
namespace mozilla {
|
|
|
|
namespace dom {
|
|
|
|
class PrefSetting;
|
|
|
|
}
|
|
|
|
}
|
2010-10-19 13:35:08 -07:00
|
|
|
|
2010-09-27 14:23:35 -07:00
|
|
|
enum pref_SaveTypes { SAVE_NONSHARED, SAVE_SHARED, SAVE_ALL, SAVE_ALL_AND_DEFAULTS };
|
2007-03-22 10:30:00 -07:00
|
|
|
|
|
|
|
// Passed as the arg to pref_savePref
|
|
|
|
struct pref_saveArgs {
|
|
|
|
char **prefArray;
|
|
|
|
pref_SaveTypes saveTypes;
|
|
|
|
};
|
|
|
|
|
|
|
|
PLDHashOperator
|
2012-08-22 08:56:38 -07:00
|
|
|
pref_savePref(PLDHashTable *table, PLDHashEntryHdr *heh, uint32_t i, void *arg);
|
2007-03-22 10:30:00 -07:00
|
|
|
|
2010-10-19 13:35:08 -07:00
|
|
|
PLDHashOperator
|
2012-08-22 13:00:21 -07:00
|
|
|
pref_GetPrefs(PLDHashTable *table,
|
|
|
|
PLDHashEntryHdr *heh, uint32_t i, void *arg);
|
2010-10-19 13:35:08 -07:00
|
|
|
|
|
|
|
nsresult
|
2012-08-22 13:00:21 -07:00
|
|
|
pref_SetPref(const mozilla::dom::PrefSetting& aPref);
|
2010-10-19 13:35:08 -07:00
|
|
|
|
2008-10-10 08:04:34 -07:00
|
|
|
int pref_CompareStrings(const void *v1, const void *v2, void* unused);
|
2010-09-28 10:02:37 -07:00
|
|
|
PrefHashEntry* pref_HashTableLookup(const void *key);
|
2010-10-19 13:35:08 -07:00
|
|
|
|
2012-08-22 13:00:21 -07:00
|
|
|
void pref_GetPrefFromEntry(PrefHashEntry *aHashEntry,
|
|
|
|
mozilla::dom::PrefSetting* aPref);
|
2012-10-11 08:36:21 -07:00
|
|
|
|
|
|
|
size_t
|
2013-06-23 05:03:39 -07:00
|
|
|
pref_SizeOfPrivateData(mozilla::MallocSizeOf aMallocSizeOf);
|