• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2023-2024 Huawei Device Co., Ltd.
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at
6  *
7  * http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  */
15 
16 #ifndef OHOS_HDI_DRM_V1_0_MEDIADECRYPTMODULESTUB_H
17 #define OHOS_HDI_DRM_V1_0_MEDIADECRYPTMODULESTUB_H
18 
19 #include <ipc_object_stub.h>
20 #include <message_option.h>
21 #include <message_parcel.h>
22 #include <object_collector.h>
23 #include <refbase.h>
24 #include "v1_0/imedia_decrypt_module.h"
25 
26 namespace OHOS {
27 namespace HDI {
28 namespace Drm {
29 namespace V1_0 {
30 using namespace OHOS;
31 class MediaDecryptModuleStub : public IPCObjectStub {
32 public:
33     explicit MediaDecryptModuleStub(const sptr<IMediaDecryptModule> &impl);
34     virtual ~MediaDecryptModuleStub();
35 
36     int32_t OnRemoteRequest(uint32_t code, MessageParcel &data, MessageParcel &reply, MessageOption &option) override;
37 
38     static int32_t MediaDecryptModuleStubDecryptMediaData_(MessageParcel &mediaDecryptModuleData,
39         MessageParcel &mediaDecryptModuleReply, MessageOption &mediaDecryptModuleOption,
40         sptr<OHOS::HDI::Drm::V1_0::IMediaDecryptModule> impl);
41 
42     static int32_t MediaDecryptModuleStubRelease_(MessageParcel &mediaDecryptModuleData,
43         MessageParcel &mediaDecryptModuleReply, MessageOption &mediaDecryptModuleOption,
44         sptr<OHOS::HDI::Drm::V1_0::IMediaDecryptModule> impl);
45 
46     static int32_t MediaDecryptModuleStubGetVersion_(MessageParcel &mediaDecryptModuleData,
47         MessageParcel &mediaDecryptModuleReply, MessageOption &mediaDecryptModuleOption,
48         sptr<OHOS::HDI::Drm::V1_0::IMediaDecryptModule> impl);
49 
50 private:
51     int32_t MediaDecryptModuleStubDecryptMediaData(MessageParcel &mediaDecryptModuleData,
52         MessageParcel &mediaDecryptModuleReply, MessageOption &mediaDecryptModuleOption);
53 
54     int32_t MediaDecryptModuleStubRelease(MessageParcel &mediaDecryptModuleData, MessageParcel &mediaDecryptModuleReply,
55         MessageOption &mediaDecryptModuleOption);
56 
57     int32_t MediaDecryptModuleStubGetVersion(MessageParcel &mediaDecryptModuleData,
58         MessageParcel &mediaDecryptModuleReply, MessageOption &mediaDecryptModuleOption);
59 
60     static inline ObjectDelegator<OHOS::HDI::Drm::V1_0::MediaDecryptModuleStub,
61         OHOS::HDI::Drm::V1_0::IMediaDecryptModule>
62         objDelegator_;
63     sptr<OHOS::HDI::Drm::V1_0::IMediaDecryptModule> impl_;
64 };
65 } // V1_0
66 } // Drm
67 } // HDI
68 } // OHOS
69 
70 #endif // OHOS_HDI_DRM_V1_0_MEDIADECRYPTMODULESTUB_H