dom/ipc/PrefsTypes.ipdlh
author Kershaw Chang <kershaw@mozilla.com>
Fri, 11 Jan 2019 18:57:23 +0000
changeset 453535 c083f11eb58d
parent 453470 4e94bbb90315
child 465344 6194cbc69a4c
permissions -rw-r--r--
Bug 1513057 - P1: Start the new socket process basics (prefs, full xpcom init, logging, no sandboxing) r=mayhemer,dragana Differential Revision: https://phabricator.services.mozilla.com/D14148

/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* 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/. */

using struct mozilla::null_t from "ipc/IPCMessageUtils.h";

namespace mozilla {
namespace dom {

union PrefValue {
  nsCString;
  int32_t;
  bool;
};

union MaybePrefValue {
  PrefValue;
  null_t;
};

// This serialization form mirrors that used in mozilla::Pref in
// Preferences.cpp. The two should be kept in sync, e.g. if something is added
// to one it should also be added to the other.
//
// Note: there is no need to pass the isSticky attribute because that's an
// immutable attribute obtained from file at startup.
struct Pref {
  nsCString name;
  bool isLocked;
  MaybePrefValue defaultValue;
  MaybePrefValue userValue;
};

} // namespace dom
} // namespace mozilla