• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2021 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 MISCDEVICE_SERVICE_PROXY_H
17 #define MISCDEVICE_SERVICE_PROXY_H
18 
19 #include "i_miscdevice_service.h"
20 #include "iremote_proxy.h"
21 #include "nocopyable.h"
22 
23 namespace OHOS {
24 namespace Sensors {
25 class MiscdeviceServiceProxy : public IRemoteProxy<IMiscdeviceService> {
26 public:
27     explicit MiscdeviceServiceProxy(const sptr<IRemoteObject> &impl);
28     ~MiscdeviceServiceProxy() = default;
29     virtual int32_t Vibrate(int32_t vibratorId, int32_t timeOut, int32_t usage) override;
30     virtual int32_t CancelVibrator(int32_t vibratorId) override;
31     virtual int32_t PlayVibratorEffect(int32_t vibratorId, const std::string &effect,
32 	                                   int32_t loopCount, int32_t usage) override;
33     virtual int32_t StopVibratorEffect(int32_t vibratorId, const std::string &effect) override;
34     virtual std::vector<LightInfo> GetLightList() override;
35     virtual int32_t TurnOn(int32_t lightId, const LightColor &color, const LightAnimation &animation) override;
36     virtual int32_t TurnOff(int32_t lightId) override;
37 
38 private:
39     DISALLOW_COPY_AND_MOVE(MiscdeviceServiceProxy);
40     static inline BrokerDelegator<MiscdeviceServiceProxy> delegator_;
41 };
42 }  // namespace Sensors
43 }  // namespace OHOS
44 #endif  // MISCDEVICE_SERVICE_PROXY_H
45