• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2025 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_MECHBODY_CONTROLLER_STUB_H
17 #define OHOS_MECHBODY_CONTROLLER_STUB_H
18 
19 #include <iremote_stub.h>
20 #include <map>
21 
22 #include "mechbody_controller_interface.h"
23 
24 namespace OHOS {
25 namespace MechBodyController {
26 class MechBodyControllerStub : public IRemoteStub<IMechBodyController> {
27 public:
28     MechBodyControllerStub();
29     ~MechBodyControllerStub();
30     int32_t OnRemoteRequest(uint32_t code, MessageParcel& data, MessageParcel& reply, MessageOption& option) override;
31 
32 private:
33     void InitFuncsInner();
34 
35     int32_t AttachStateChangeListenOnInner(MessageParcel &data, MessageParcel &reply);
36     int32_t AttachStateChangeListenOffInner(MessageParcel &data, MessageParcel &reply);
37     int32_t GetAttachedDevicesInner(MessageParcel &data, MessageParcel &reply);
38     int32_t SetUserOperationInner(MessageParcel &data, MessageParcel &reply);
39 
40     int32_t SetCameraTrackingEnabledInner(MessageParcel &data, MessageParcel &reply);
41     int32_t GetCameraTrackingEnabledInner(MessageParcel &data, MessageParcel &reply);
42     int32_t TrackingEventListenOnInner(MessageParcel &data, MessageParcel &reply);
43     int32_t TrackingEventListenOffInner(MessageParcel &data, MessageParcel &reply);
44     int32_t SetCameraTrackingLayoutInner(MessageParcel &data, MessageParcel &reply);
45     int32_t GetCameraTrackingLayoutInner(MessageParcel &data, MessageParcel &reply);
46 
47     int32_t RegisterCmdChannelInner(MessageParcel &data, MessageParcel &reply);
48     int32_t RotateByDegreeInner(MessageParcel &data, MessageParcel &reply);
49     int32_t RotateToEulerAnglesInner(MessageParcel &data, MessageParcel &reply);
50     int32_t GetMaxRotationTimeInner(MessageParcel &data, MessageParcel &reply);
51     int32_t GetMaxRotationSpeedInner(MessageParcel &data, MessageParcel &reply);
52     int32_t RotateBySpeedInner(MessageParcel &data, MessageParcel &reply);
53     int32_t StopMovingInner(MessageParcel &data, MessageParcel &reply);
54     int32_t GetRotationAnglesInner(MessageParcel &data, MessageParcel &reply);
55     int32_t GetRotationDegreeLimitsInner(MessageParcel &data, MessageParcel &reply);
56     int32_t GetRotationAxesStatusInner(MessageParcel &data, MessageParcel &reply);
57     int32_t RotationAxesStatusChangeListenOnInner(MessageParcel &data, MessageParcel &reply);
58     int32_t RotationAxesStatusChangeListenOffInner(MessageParcel &data, MessageParcel &reply);
59 
60     int32_t Test(MessageParcel &data, MessageParcel &reply);
61 
62 private:
63     using MechBodyControllerFunc = int32_t(MechBodyControllerStub::*)(MessageParcel& data, MessageParcel& reply);
64     std::map<uint32_t, MechBodyControllerFunc> funcsMap_;
65 };
66 } // namespace MechBodyController
67 } // namespace OHOS
68 #endif // OHOS_MECHBODY_CONTROLLER_STUB_H
69