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"
18 * Limited nsIVariant support. Not all types are implemented and only
19 * nsIURI is implemented with nsIVariant::GetAsInterface.
22 struct IPDLParamTraits
<nsIVariant
*> {
23 static void Write(IPC::Message
* aMsg
, IProtocol
* aActor
, nsIVariant
* aParam
);
24 static bool Read(const IPC::Message
* aMsg
, PickleIterator
* aIter
,
25 IProtocol
* aActor
, RefPtr
<nsIVariant
>* aResult
);
29 struct IPDLParamTraits
<nsIPropertyBag2
*> {
30 static void Write(IPC::Message
* aMsg
, IProtocol
* aActor
,
31 nsIPropertyBag2
* aParam
);
32 static bool Read(const IPC::Message
* aMsg
, PickleIterator
* aIter
,
33 IProtocol
* aActor
, RefPtr
<nsIPropertyBag2
>* aResult
);
37 } // namespace mozilla
39 #endif // mozilla_ipc_URIUtils_h