Bug 1857841 - pt 3. Add a new page kind named "fresh" r=glandium
[gecko.git] / dom / ipc / PropertyBagUtils.h
blob7eb94b46a78d3830f38442917d7617b5a55dc669
1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
3 /* This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
7 #ifndef IPC_PropertyBagUtils_h
8 #define IPC_PropertyBagUtils_h
10 #include "mozilla/ipc/IPDLParamTraits.h"
11 #include "nsIPropertyBag2.h"
12 #include "nsIVariant.h"
14 namespace mozilla::ipc {
16 /**
17 * Limited nsIVariant support. Not all types are implemented and only
18 * nsIURI is implemented with nsIVariant::GetAsInterface.
20 template <>
21 struct IPDLParamTraits<nsIVariant*> {
22 static void Write(IPC::MessageWriter* aWriter, IProtocol* aActor,
23 nsIVariant* aParam);
24 static bool Read(IPC::MessageReader* aReader, IProtocol* aActor,
25 RefPtr<nsIVariant>* aResult);
28 template <>
29 struct IPDLParamTraits<nsIPropertyBag2*> {
30 static void Write(IPC::MessageWriter* aWriter, IProtocol* aActor,
31 nsIPropertyBag2* aParam);
32 static bool Read(IPC::MessageReader* aReader, IProtocol* aActor,
33 RefPtr<nsIPropertyBag2>* aResult);
36 } // namespace mozilla::ipc
38 #endif // mozilla_ipc_URIUtils_h