• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2021-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_INTERFACE_H
17 #define OHOS_MECHBODY_CONTROLLER_INTERFACE_H
18 
19 #include <vector>
20 #include <set>
21 #include "mechbody_controller_types.h"
22 
23 namespace OHOS {
24 namespace MechBodyController {
25 class IMechBodyController : public OHOS::IRemoteBroker {
26 public:
27     DECLARE_INTERFACE_DESCRIPTOR(u"OHOS.MechBodyController.IMechBodyController");
28 
29 public:
30     virtual int32_t OnDeviceConnected(int32_t mechId) = 0;
31     virtual int32_t OnDeviceDisconnected(int32_t mechId) = 0;
32 
33     virtual int32_t RegisterAttachStateChangeCallback(const sptr<IRemoteObject> callback) = 0;
34     virtual int32_t UnRegisterAttachStateChangeCallback() = 0;
35     virtual int32_t GetAttachedDevices(std::set<MechInfo> &mechInfo) = 0;
36     virtual int32_t SetUserOperation(const std::shared_ptr<Operation> &operation,
37         const std::string &mac, const std::string &param) = 0;
38 
39     virtual int32_t SetTrackingEnabled(bool &isEnabled) = 0;
40     virtual int32_t GetTrackingEnabled(bool &isEnabled) = 0;
41     virtual int32_t RegisterTrackingEventCallback(sptr<IRemoteObject> callback) = 0;
42     virtual int32_t UnRegisterTrackingEventCallback() = 0;
43     virtual int32_t SetTrackingLayout(CameraTrackingLayout &cameraTrackingLayout) = 0;
44     virtual int32_t GetTrackingLayout(CameraTrackingLayout &cameraTrackingLayout) = 0;
45 
46     virtual int32_t RegisterCmdChannel(const sptr<IRemoteObject> callback) = 0;
47     virtual int32_t RotateByDegree(const int32_t &mechId, std::string &cmdId,
48         const std::shared_ptr<RotateByDegreeParam> &rotateByDegreeParam) = 0;
49     virtual int32_t RotateToEulerAngles(const int32_t &mechId, std::string &cmdId,
50         const std::shared_ptr<RotateToEulerAnglesParam> &rotateToEulerAnglesParam) = 0;
51     virtual int32_t GetMaxRotationTime(const int32_t &mechId, std::shared_ptr<TimeLimit> &speedLimit) = 0;
52     virtual int32_t GetMaxRotationSpeed(const int32_t &mechId, RotateSpeedLimit &speedLimit) = 0;
53     virtual int32_t RotateBySpeed(const int32_t &mechId, std::string &cmdId,
54         const std::shared_ptr<RotateBySpeedParam> &rotateBySpeedParam) = 0;
55     virtual int32_t StopMoving(const int32_t &mechId, std::string &cmdId) = 0;
56     virtual int32_t GetRotationAngles(const int32_t &mechId, std::shared_ptr<EulerAngles> &eulerAngles) = 0;
57     virtual int32_t GetRotationDegreeLimits(const int32_t &mechId, RotateDegreeLimit &rotationLimit) = 0;
58     virtual int32_t GetRotationAxesStatus(const int32_t &mechId, RotationAxesStatus &axesStatus) = 0;
59     virtual int32_t RegisterRotationAxesStatusChangeCallback(const sptr<IRemoteObject> callback) = 0;
60     virtual int32_t UnRegisterRotationAxesStatusChangeCallback() = 0;
61 };
62 } // namespace MechBodyController
63 } // namespace OHOS
64 #endif // OHOS_MECHBODY_CONTROLLER_INTERFACE_H
65