• 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 MECHBODY_CONTROLLER_STUB_TEST_H
17 #define MECHBODY_CONTROLLER_STUB_TEST_H
18 
19 #include "gtest/gtest.h"
20 #include "mechbody_controller_stub.h"
21 #include "mechbody_controller_service.h"
22 
23 namespace OHOS {
24 namespace MechBodyController {
25 
26 class MechBodyControllerStubTest : public testing::Test {
27 public:
28     static void SetUpTestCase();
29     static void TearDownTestCase();
30     void SetUp() override;
31     void TearDown() override;
32 };
33 
GetInstance()34 MechBodyControllerService& MechBodyControllerService::GetInstance()
35 {
36     static auto instance = new MechBodyControllerService();
37     return *instance;
38 }
39 
MechBodyControllerService()40 MechBodyControllerService::MechBodyControllerService()
41 {
42 }
43 
~MechBodyControllerService()44 MechBodyControllerService::~MechBodyControllerService()
45 {
46 }
47 
OnDeviceConnected(int32_t mechId)48 int32_t MechBodyControllerService::OnDeviceConnected(int32_t mechId)
49 {
50     return 0;
51 }
52 
RegisterAttachStateChangeCallback(const sptr<IRemoteObject> callback)53 int32_t MechBodyControllerService::RegisterAttachStateChangeCallback(const sptr<IRemoteObject> callback)
54 {
55     return 0;
56 }
57 
UnRegisterAttachStateChangeCallback()58 int32_t MechBodyControllerService::UnRegisterAttachStateChangeCallback()
59 {
60     return 0;
61 }
62 
OnAttachStateChange(const AttachmentState & attachmentState,const MechInfo & mechInfo)63 int32_t MechBodyControllerService::OnAttachStateChange(const AttachmentState &attachmentState,
64     const MechInfo &mechInfo)
65 {
66     return 0;
67 }
68 
GetAttachedDevices(std::set<MechInfo> & mechInfo)69 int32_t MechBodyControllerService::GetAttachedDevices(std::set<MechInfo> &mechInfo)
70 {
71     return 0;
72 }
73 
SetUserOperation(const std::shared_ptr<Operation> & operation,const std::string & mac,const std::string & param)74 int32_t MechBodyControllerService::SetUserOperation(const std::shared_ptr<Operation> &operation,
75     const std::string &mac, const std::string &param)
76 {
77     return 0;
78 }
79 
SetTrackingEnabled(bool & isEnabled)80 int32_t MechBodyControllerService::SetTrackingEnabled(bool &isEnabled)
81 {
82     return 0;
83 }
84 
GetTrackingEnabled(bool & isEnabled)85 int32_t MechBodyControllerService::GetTrackingEnabled(bool &isEnabled)
86 {
87     return 0;
88 }
89 
RegisterTrackingEventCallback(sptr<IRemoteObject> callback)90 int32_t MechBodyControllerService::RegisterTrackingEventCallback(sptr<IRemoteObject> callback)
91 {
92     return 0;
93 }
94 
UnRegisterTrackingEventCallback()95 int32_t MechBodyControllerService::UnRegisterTrackingEventCallback()
96 {
97     return 0;
98 }
99 
SetTrackingLayout(CameraTrackingLayout & cameraTrackingLayout)100 int32_t MechBodyControllerService::SetTrackingLayout(CameraTrackingLayout &cameraTrackingLayout)
101 {
102     return 0;
103 }
104 
GetTrackingLayout(CameraTrackingLayout & cameraTrackingLayout)105 int32_t MechBodyControllerService::GetTrackingLayout(CameraTrackingLayout &cameraTrackingLayout)
106 {
107     return 0;
108 }
109 
RegisterCmdChannel(const sptr<IRemoteObject> callback)110 int32_t MechBodyControllerService::RegisterCmdChannel(const sptr<IRemoteObject> callback)
111 {
112     return 0;
113 }
114 
RotateByDegree(const int32_t & mechId,std::string & cmdId,const std::shared_ptr<RotateByDegreeParam> & rotateByDegreeParam)115 int32_t MechBodyControllerService::RotateByDegree(const int32_t &mechId, std::string &cmdId,
116     const std::shared_ptr<RotateByDegreeParam> &rotateByDegreeParam)
117 {
118     return 0;
119 }
120 
RotateToEulerAngles(const int32_t & mechId,std::string & cmdId,const std::shared_ptr<RotateToEulerAnglesParam> & rotateToEulerAnglesParam)121 int32_t MechBodyControllerService::RotateToEulerAngles(const int32_t &mechId, std::string &cmdId,
122     const std::shared_ptr<RotateToEulerAnglesParam> &rotateToEulerAnglesParam)
123 {
124     return 0;
125 }
126 
GetMaxRotationTime(const int32_t & mechId,std::shared_ptr<TimeLimit> & speedLimit)127 int32_t MechBodyControllerService::GetMaxRotationTime(const int32_t &mechId, std::shared_ptr<TimeLimit> &speedLimit)
128 {
129     return 0;
130 }
131 
GetMaxRotationSpeed(const int32_t & mechId,RotateSpeedLimit & speedLimit)132 int32_t MechBodyControllerService::GetMaxRotationSpeed(const int32_t &mechId, RotateSpeedLimit &speedLimit)
133 {
134     return 0;
135 }
136 
RotateBySpeed(const int32_t & mechId,std::string & cmdId,const std::shared_ptr<RotateBySpeedParam> & rotateBySpeedParam)137 int32_t MechBodyControllerService::RotateBySpeed(const int32_t &mechId, std::string &cmdId,
138     const std::shared_ptr<RotateBySpeedParam> &rotateBySpeedParam)
139 {
140     return 0;
141 }
142 
StopMoving(const int32_t & mechId,std::string & cmdId)143 int32_t MechBodyControllerService::StopMoving(const int32_t &mechId, std::string &cmdId)
144 {
145     return 0;
146 }
147 
GetRotationAngles(const int32_t & mechId,std::shared_ptr<EulerAngles> & eulerAngles)148 int32_t MechBodyControllerService::GetRotationAngles(const int32_t &mechId, std::shared_ptr<EulerAngles> &eulerAngles)
149 {
150     return 0;
151 }
152 
GetRotationDegreeLimits(const int32_t & mechId,RotateDegreeLimit & rotationLimit)153 int32_t MechBodyControllerService::GetRotationDegreeLimits(const int32_t &mechId, RotateDegreeLimit &rotationLimit)
154 {
155     return 0;
156 }
157 
GetRotationAxesStatus(const int32_t & mechId,RotationAxesStatus & axesStatus)158 int32_t MechBodyControllerService::GetRotationAxesStatus(const int32_t &mechId, RotationAxesStatus &axesStatus)
159 {
160     return 0;
161 }
162 
RegisterRotationAxesStatusChangeCallback(const sptr<IRemoteObject> callback)163 int32_t MechBodyControllerService::RegisterRotationAxesStatusChangeCallback(const sptr<IRemoteObject> callback)
164 {
165     return 0;
166 }
167 
UnRegisterRotationAxesStatusChangeCallback()168 int32_t MechBodyControllerService::UnRegisterRotationAxesStatusChangeCallback()
169 {
170     return 0;
171 }
172 } // namespace MechBodyController
173 } // namespace OHOS
174 #endif // MECHBODY_CONTROLLER_STUB_TEST_H