Thu, 22 Jan 2015 13:21:57 +0100
Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6
michael@0 | 1 | /* This Source Code Form is subject to the terms of the Mozilla Public |
michael@0 | 2 | * License, v. 2.0. If a copy of the MPL was not distributed with this file, |
michael@0 | 3 | * You can obtain one at http://mozilla.org/MPL/2.0/. */ |
michael@0 | 4 | |
michael@0 | 5 | #ifndef mozilla_ipc_nsIIPCSerializableURI_h |
michael@0 | 6 | #define mozilla_ipc_nsIIPCSerializableURI_h |
michael@0 | 7 | |
michael@0 | 8 | #include "nsISupports.h" |
michael@0 | 9 | #include "mozilla/Attributes.h" |
michael@0 | 10 | |
michael@0 | 11 | namespace mozilla { |
michael@0 | 12 | namespace ipc { |
michael@0 | 13 | class URIParams; |
michael@0 | 14 | } |
michael@0 | 15 | } |
michael@0 | 16 | |
michael@0 | 17 | #define NS_IIPCSERIALIZABLEURI_IID \ |
michael@0 | 18 | {0xfee3437d, 0x3daf, 0x411f, {0xb0, 0x1d, 0xdc, 0xd4, 0x88, 0x55, 0xe3, 0xd}} |
michael@0 | 19 | |
michael@0 | 20 | class NS_NO_VTABLE nsIIPCSerializableURI : public nsISupports |
michael@0 | 21 | { |
michael@0 | 22 | public: |
michael@0 | 23 | NS_DECLARE_STATIC_IID_ACCESSOR(NS_IIPCSERIALIZABLEURI_IID) |
michael@0 | 24 | |
michael@0 | 25 | virtual void |
michael@0 | 26 | Serialize(mozilla::ipc::URIParams& aParams) = 0; |
michael@0 | 27 | |
michael@0 | 28 | virtual bool |
michael@0 | 29 | Deserialize(const mozilla::ipc::URIParams& aParams) = 0; |
michael@0 | 30 | }; |
michael@0 | 31 | |
michael@0 | 32 | NS_DEFINE_STATIC_IID_ACCESSOR(nsIIPCSerializableURI, |
michael@0 | 33 | NS_IIPCSERIALIZABLEURI_IID) |
michael@0 | 34 | |
michael@0 | 35 | #define NS_DECL_NSIIPCSERIALIZABLEURI \ |
michael@0 | 36 | virtual void \ |
michael@0 | 37 | Serialize(mozilla::ipc::URIParams&) MOZ_OVERRIDE; \ |
michael@0 | 38 | virtual bool \ |
michael@0 | 39 | Deserialize(const mozilla::ipc::URIParams&) MOZ_OVERRIDE; |
michael@0 | 40 | |
michael@0 | 41 | #define NS_FORWARD_NSIIPCSERIALIZABLEURI(_to) \ |
michael@0 | 42 | virtual void \ |
michael@0 | 43 | Serialize(mozilla::ipc::URIParams& aParams) MOZ_OVERRIDE \ |
michael@0 | 44 | { _to Serialize(aParams); } \ |
michael@0 | 45 | virtual bool \ |
michael@0 | 46 | Deserialize(const mozilla::ipc::URIParams& aParams) MOZ_OVERRIDE \ |
michael@0 | 47 | { return _to Deserialize(aParams); } |
michael@0 | 48 | |
michael@0 | 49 | #define NS_FORWARD_SAFE_NSIIPCSERIALIZABLEURI(_to) \ |
michael@0 | 50 | virtual void \ |
michael@0 | 51 | Serialize(mozilla::ipc::URIParams& aParams) MOZ_OVERRIDE \ |
michael@0 | 52 | { if (_to) { _to->Serialize(aParams); } } \ |
michael@0 | 53 | virtual bool \ |
michael@0 | 54 | Deserialize(const mozilla::ipc::URIParams& aParams) MOZ_OVERRIDE \ |
michael@0 | 55 | { if (_to) { return _to->Deserialize(aParams); } return false; } |
michael@0 | 56 | |
michael@0 | 57 | #endif // mozilla_ipc_nsIIPCSerializableURI_h |