1 /* This Source Code Form is subject to the terms of the Mozilla Public
2 * License, v. 2.0. If a copy of the MPL was not distributed with this
3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
5 #ifndef mozilla_ipc_TransportSecurityInfoUtils_h
6 #define mozilla_ipc_TransportSecurityInfoUtils_h
8 #include "ipc/EnumSerializer.h"
9 #include "mozilla/RefPtr.h"
10 #include "nsITransportSecurityInfo.h"
11 #include "nsIX509Cert.h"
22 struct ParamTraits
<nsITransportSecurityInfo
*> {
23 static void Write(MessageWriter
* aWriter
, nsITransportSecurityInfo
* aParam
);
24 static bool Read(MessageReader
* aReader
,
25 RefPtr
<nsITransportSecurityInfo
>* aResult
);
29 struct ParamTraits
<nsIX509Cert
*> {
30 static void Write(MessageWriter
* aWriter
, nsIX509Cert
* aCert
);
31 static bool Read(MessageReader
* aReader
, RefPtr
<nsIX509Cert
>* aResult
);
35 struct ParamTraits
<nsITransportSecurityInfo::OverridableErrorCategory
>
36 : public ContiguousEnumSerializerInclusive
<
37 nsITransportSecurityInfo::OverridableErrorCategory
,
38 nsITransportSecurityInfo::OverridableErrorCategory::ERROR_UNSET
,
39 nsITransportSecurityInfo::OverridableErrorCategory::ERROR_TIME
> {};
43 #endif // mozilla_ipc_TransportSecurityInfoUtils_h