• 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
16sequenceable light_agent_type..LightColor;
17sequenceable light_animation_ipc..OHOS.Sensors.LightAnimationIPC;
18sequenceable light_info_ipc..OHOS.Sensors.LightInfoIPC;
19sequenceable OHOS.IRemoteObject;
20sequenceable raw_file_descriptor..OHOS.Sensors.RawFileDescriptor;
21sequenceable vibrator_infos..OHOS.Sensors.VibratePattern;
22sequenceable vibrator_infos..OHOS.Sensors.VibratorCapacity;
23sequenceable vibrator_infos..OHOS.Sensors.VibratorIdentifierIPC;
24sequenceable vibrator_infos..OHOS.Sensors.VibratorInfoIPC;
25sequenceable vibrator_infos..OHOS.Sensors.EffectInfoIPC;
26sequenceable vibrator_infos..OHOS.Sensors.CustomHapticInfoIPC;
27sequenceable vibrator_infos..OHOS.Sensors.PrimitiveEffectIPC;
28sequenceable vibrator_infos..OHOS.Sensors.VibratePackageIPC;
29
30interface OHOS.Sensors.IMiscdeviceService {
31    void Vibrate([in] VibratorIdentifierIPC identifier, [in] int timeOut, [in] int usage, [in] boolean systemUsage);
32    void PlayVibratorEffect([in] VibratorIdentifierIPC identifier, [in] String effect, [in] int loopCount, [in] int usage, [in] boolean systemUsage);
33    void PlayVibratorCustom([in] VibratorIdentifierIPC identifier, [in] FileDescriptor fd, [in] long offset, [in] long length, [in] CustomHapticInfoIPC customHapticInfoIPC);
34    void StopVibrator([in] VibratorIdentifierIPC identifier);
35    void StopVibratorByMode([in] VibratorIdentifierIPC identifier, [in] String mode);
36    void IsSupportEffect([in] VibratorIdentifierIPC identifier, [in] String effect, [out] boolean state);
37    void GetLightList([out] LightInfoIPC[] lightInfoIpcList);
38    void TurnOn([in] int lightId, [in] int singleColor, [in] LightAnimationIPC animation);
39    void TurnOff([in] int lightId);
40    void GetDelayTime([in] VibratorIdentifierIPC identifier, [out] int delayTime);
41    void PlayPattern([in] VibratorIdentifierIPC identifier, [in] VibratePattern pattern, [in] CustomHapticInfoIPC customHapticInfoIPC);
42    void TransferClientRemoteObject([in] IRemoteObject vibratorClient);
43    void PlayPrimitiveEffect([in] VibratorIdentifierIPC identifier, [in] String effect, [in] PrimitiveEffectIPC primitiveEffectIPC);
44    void GetVibratorCapacity([in] VibratorIdentifierIPC identifier, [out] VibratorCapacity capacity);
45    void GetVibratorList([in] VibratorIdentifierIPC identifier, [out] VibratorInfoIPC[] vibratorInfoIPC);
46    void GetEffectInfo([in] VibratorIdentifierIPC identifier, [in] String effectType, [out] EffectInfoIPC effectInfoIPC);
47    void SubscribeVibratorPlugInfo([in] IRemoteObject vibratorClient);
48    void PlayPackageBySessionId([in] VibratorIdentifierIPC identifier, [in] VibratePackageIPC packageIPC, [in] CustomHapticInfoIPC customHapticInfoIPC);
49    void StopVibrateBySessionId([in] VibratorIdentifierIPC identifier, [in] unsigned int sessionId);
50}