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 #include "WMFClearKeyActivate.h"
10 #include "WMFClearKeyContentEnabler.h"
11 #include "WMFClearKeyUtils.h"
15 using Microsoft::WRL::ComPtr
;
16 using Microsoft::WRL::MakeAndInitialize
;
18 HRESULT
WMFClearKeyActivate::RuntimeClassInitialize() { return S_OK
; }
20 STDMETHODIMP
WMFClearKeyActivate::ActivateObject(REFIID aRiid
, void** aPpv
) {
22 ComPtr
<IMFContentEnabler
> contentEnabler
;
24 MakeAndInitialize
<WMFClearKeyContentEnabler
>(&contentEnabler
));
25 RETURN_IF_FAILED(contentEnabler
.CopyTo(aRiid
, aPpv
));
29 STDMETHODIMP
WMFClearKeyActivate::ShutdownObject() {
34 STDMETHODIMP
WMFClearKeyActivate::DetachObject() {
39 // IMFAttributes inherited by IMFActivate
40 STDMETHODIMP
WMFClearKeyActivate::GetItem(REFGUID aGuidKey
,
41 PROPVARIANT
* aValue
) {
46 STDMETHODIMP
WMFClearKeyActivate::GetItemType(REFGUID aGuidKey
,
47 MF_ATTRIBUTE_TYPE
* aType
) {
52 STDMETHODIMP
WMFClearKeyActivate::CompareItem(REFGUID aGuidKey
,
53 REFPROPVARIANT aValue
,
59 STDMETHODIMP
WMFClearKeyActivate::Compare(IMFAttributes
* aAttributes
,
60 MF_ATTRIBUTES_MATCH_TYPE aType
,
66 STDMETHODIMP
WMFClearKeyActivate::GetUINT32(REFGUID aGuidKey
, UINT32
* aValue
) {
71 STDMETHODIMP
WMFClearKeyActivate::GetUINT64(REFGUID aGuidKey
, UINT64
* aValue
) {
76 STDMETHODIMP
WMFClearKeyActivate::GetDouble(REFGUID aGuidKey
, double* aValue
) {
81 STDMETHODIMP
WMFClearKeyActivate::GetGUID(REFGUID aGuidKey
, GUID
* aGuidValue
) {
86 STDMETHODIMP
WMFClearKeyActivate::GetStringLength(REFGUID aGuidKey
,
87 UINT32
* aPcchLength
) {
92 STDMETHODIMP
WMFClearKeyActivate::GetString(REFGUID aGuidKey
, LPWSTR aPwszValue
,
94 UINT32
* aPcchLength
) {
99 STDMETHODIMP
WMFClearKeyActivate::GetAllocatedString(REFGUID aGuidKey
,
101 UINT32
* aPcchLength
) {
106 STDMETHODIMP
WMFClearKeyActivate::GetBlobSize(REFGUID aGuidKey
,
107 UINT32
* aPcbBlobSize
) {
112 STDMETHODIMP
WMFClearKeyActivate::GetBlob(REFGUID aGuidKey
, UINT8
* pBuf
,
114 UINT32
* aPcbBlobSize
) {
119 STDMETHODIMP
WMFClearKeyActivate::GetAllocatedBlob(REFGUID aGuidKey
,
126 STDMETHODIMP
WMFClearKeyActivate::GetUnknown(REFGUID aGuidKey
, REFIID aRiid
,
132 STDMETHODIMP
WMFClearKeyActivate::SetItem(REFGUID aGuidKey
,
133 REFPROPVARIANT aValue
) {
138 STDMETHODIMP
WMFClearKeyActivate::DeleteItem(REFGUID aGuidKey
) {
143 STDMETHODIMP
WMFClearKeyActivate::DeleteAllItems() {
148 STDMETHODIMP
WMFClearKeyActivate::SetUINT32(REFGUID aGuidKey
, UINT32 aValue
) {
153 STDMETHODIMP
WMFClearKeyActivate::SetUINT64(REFGUID aGuidKey
, UINT64 aValue
) {
158 STDMETHODIMP
WMFClearKeyActivate::SetDouble(REFGUID aGuidKey
, double aValue
) {
163 STDMETHODIMP
WMFClearKeyActivate::SetGUID(REFGUID aGuidKey
,
164 REFGUID aGuidValue
) {
169 STDMETHODIMP
WMFClearKeyActivate::SetString(REFGUID aGuidKey
,
175 STDMETHODIMP
WMFClearKeyActivate::SetBlob(REFGUID aGuidKey
, const UINT8
* aBuf
,
181 STDMETHODIMP
WMFClearKeyActivate::SetUnknown(REFGUID aGuidKey
,
182 IUnknown
* aUnknown
) {
187 STDMETHODIMP
WMFClearKeyActivate::LockStore() {
192 STDMETHODIMP
WMFClearKeyActivate::UnlockStore() {
197 STDMETHODIMP
WMFClearKeyActivate::GetCount(UINT32
* aPcItems
) {
202 STDMETHODIMP
WMFClearKeyActivate::GetItemByIndex(UINT32 aIndex
, GUID
* aGuidKey
,
203 PROPVARIANT
* aValue
) {
208 STDMETHODIMP
WMFClearKeyActivate::CopyAllItems(IMFAttributes
* aDest
) {
213 } // namespace mozilla