Bug 1858509 add thread-safety annotations around MediaSourceDemuxer::mMonitor r=alwu
[gecko.git] / ipc / glue / TransportSecurityInfoUtils.h
blob009db8e16265f20848d41b38b3aeac35a3bc354d
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"
13 class MessageReader;
14 class MessageWriter;
16 namespace IPC {
18 template <typename>
19 struct ParamTraits;
21 template <>
22 struct ParamTraits<nsITransportSecurityInfo*> {
23 static void Write(MessageWriter* aWriter, nsITransportSecurityInfo* aParam);
24 static bool Read(MessageReader* aReader,
25 RefPtr<nsITransportSecurityInfo>* aResult);
28 template <>
29 struct ParamTraits<nsIX509Cert*> {
30 static void Write(MessageWriter* aWriter, nsIX509Cert* aCert);
31 static bool Read(MessageReader* aReader, RefPtr<nsIX509Cert>* aResult);
34 template <>
35 struct ParamTraits<nsITransportSecurityInfo::OverridableErrorCategory>
36 : public ContiguousEnumSerializerInclusive<
37 nsITransportSecurityInfo::OverridableErrorCategory,
38 nsITransportSecurityInfo::OverridableErrorCategory::ERROR_UNSET,
39 nsITransportSecurityInfo::OverridableErrorCategory::ERROR_TIME> {};
41 } // namespace IPC
43 #endif // mozilla_ipc_TransportSecurityInfoUtils_h