1 /*
2 * Copyright (c) 2023 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 #include "zidl/mock_screen_manager_service_stub.h"
17
18 #include <ipc_skeleton.h>
19 #include "window_manager_hilog.h"
20
21 namespace OHOS {
22 namespace Rosen {
23 namespace {
24 constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, HILOG_DOMAIN_DISPLAY, "MockScreenManagerServiceStub"};
25 }
26
OnRemoteRequest(uint32_t code,MessageParcel & data,MessageParcel & reply,MessageOption & option)27 int32_t MockScreenManagerServiceStub::OnRemoteRequest(uint32_t code, MessageParcel &data, MessageParcel &reply,
28 MessageOption &option)
29 {
30 if (data.ReadInterfaceToken() != GetDescriptor()) {
31 WLOGFE("InterfaceToken check failed");
32 return -1;
33 }
34 auto msgId = static_cast<MockScreenManagerServiceMessage>(code);
35 switch (msgId) {
36 case MockScreenManagerServiceMessage::TRANS_ID_GET_SCREEN_DUMP_INFO: {
37 // todo
38 break;
39 }
40 default:
41 WLOGFW("unknown transaction code %{public}d", code);
42 return IPCObjectStub::OnRemoteRequest(code, data, reply, option);
43 }
44 return 0;
45 }
46 } // namespace Rosen
47 } // namespace OHOS