MFCDMSerializers.h (2060B)
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/. */ 4 5 #ifndef DOM_MEDIA_IPC_MFCDMSERIALIZERS_H_ 6 #define DOM_MEDIA_IPC_MFCDMSERIALIZERS_H_ 7 8 #include "MediaData.h" 9 #include "mozilla/KeySystemConfig.h" 10 #include "mozilla/dom/BindingIPCUtils.h" 11 #include "mozilla/dom/MediaKeyMessageEventBinding.h" 12 #include "mozilla/dom/MediaKeySessionBinding.h" 13 #include "mozilla/dom/MediaKeyStatusMapBinding.h" 14 15 namespace IPC { 16 17 template <> 18 struct ParamTraits<mozilla::KeySystemConfig::Requirement> 19 : public ContiguousEnumSerializerInclusive< 20 mozilla::KeySystemConfig::Requirement, 21 mozilla::KeySystemConfig::Requirement::Required, 22 mozilla::KeySystemConfig::Requirement::NotAllowed> {}; 23 24 template <> 25 struct ParamTraits<mozilla::KeySystemConfig::SessionType> 26 : public ContiguousEnumSerializerInclusive< 27 mozilla::KeySystemConfig::SessionType, 28 mozilla::KeySystemConfig::SessionType::Temporary, 29 mozilla::KeySystemConfig::SessionType::PersistentLicense> {}; 30 31 template <> 32 struct ParamTraits<mozilla::CryptoScheme> 33 : public ContiguousEnumSerializerInclusive< 34 mozilla::CryptoScheme, mozilla::CryptoScheme::None, 35 mozilla::CryptoScheme::Cbcs_1_9> {}; 36 37 template <> 38 struct ParamTraits<mozilla::dom::MediaKeyMessageType> 39 : public mozilla::dom::WebIDLEnumSerializer< 40 mozilla::dom::MediaKeyMessageType> {}; 41 42 template <> 43 struct ParamTraits<mozilla::dom::MediaKeyStatus> 44 : public mozilla::dom::WebIDLEnumSerializer<mozilla::dom::MediaKeyStatus> { 45 }; 46 47 template <> 48 struct ParamTraits<mozilla::dom::HDCPVersion> 49 : public mozilla::dom::WebIDLEnumSerializer<mozilla::dom::HDCPVersion> {}; 50 51 template <> 52 struct ParamTraits<mozilla::dom::MediaKeySessionClosedReason> 53 : public mozilla::dom::WebIDLEnumSerializer< 54 mozilla::dom::MediaKeySessionClosedReason> {}; 55 56 } // namespace IPC 57 58 #endif // DOM_MEDIA_IPC_MFCDMSERIALIZERS_H_