1 /*
2  * Copyright (C) 2020 The Android Open Source Project
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 #ifndef ANDROID_EFFECT_HAPTICGENERATOR_CORE_H_
18 #define ANDROID_EFFECT_HAPTICGENERATOR_CORE_H_
19 
20 #include <system/audio_effect.h>
21 
22 #if __cplusplus
23 extern "C" {
24 #endif
25 
26 // The HapticGenerator type UUID is not defined by OpenSL ES and has been
27 // generated from http://www.itu.int/ITU-T/asn1/uuid.html
28 static const effect_uuid_t FX_IID_HAPTICGENERATOR_ = { 0x1411e6d6, 0xaecd, 0x4021, 0xa1cf,
29         { 0xa6, 0xac, 0xeb, 0x0d, 0x71, 0xe5 } };
30 const effect_uuid_t * const FX_IID_HAPTICGENERATOR = &FX_IID_HAPTICGENERATOR_;
31 
32 /* enumerated parameter settings for haptic generator effect */
33 typedef enum
34 {
35     HG_PARAM_HAPTIC_INTENSITY, // haptic intensity
36     HG_PARAM_VIBRATOR_INFO, // vibrator information, e.g. resonant frequency, Q factor
37 } t_hapticgenerator_params;
38 
39 #if __cplusplus
40 }  // extern "C"
41 #endif
42 
43 
44 #endif /*ANDROID_EFFECT_HAPTICGENERATOR_CORE_H_*/
45