1 #ifndef HIDL_GENERATED_ANDROID_HARDWARE_AUDIO_EFFECT_V7_0_ILOUDNESSENHANCEREFFECT_H
2 #define HIDL_GENERATED_ANDROID_HARDWARE_AUDIO_EFFECT_V7_0_ILOUDNESSENHANCEREFFECT_H
3 
4 #include <android/hardware/audio/effect/7.0/IEffect.h>
5 #include <android/hardware/audio/effect/7.0/types.h>
6 
7 #include <android/hidl/manager/1.0/IServiceNotification.h>
8 
9 #include <hidl/HidlSupport.h>
10 #include <hidl/MQDescriptor.h>
11 #include <hidl/Status.h>
12 #include <utils/NativeHandle.h>
13 #include <utils/misc.h>
14 
15 namespace android {
16 namespace hardware {
17 namespace audio {
18 namespace effect {
19 namespace V7_0 {
20 
21 struct ILoudnessEnhancerEffect : public ::android::hardware::audio::effect::V7_0::IEffect {
22     /**
23      * Type tag for use in template logic that indicates this is a 'pure' class.
24      */
25     typedef ::android::hardware::details::i_tag _hidl_tag;
26 
27     /**
28      * Fully qualified interface name: "[email protected]::ILoudnessEnhancerEffect"
29      */
30     static const char* descriptor;
31 
32     /**
33      * Returns whether this object's implementation is outside of the current process.
34      */
isRemoteILoudnessEnhancerEffect35     virtual bool isRemote() const override { return false; }
36 
37     /**
38      * Initialize effect engine--all configurations return to default.
39      *
40      * @return retval operation completion status.
41      */
42     virtual ::android::hardware::Return<::android::hardware::audio::effect::V7_0::Result> init() override = 0;
43 
44     /**
45      * Apply new audio parameters configurations for input and output buffers.
46      * The provider callbacks may be empty, but in this case the buffer
47      * must be provided in the EffectConfig structure.
48      *
49      * @param config configuration descriptor.
50      * @param inputBufferProvider optional buffer provider reference.
51      * @param outputBufferProvider optional buffer provider reference.
52      * @return retval operation completion status.
53      */
54     virtual ::android::hardware::Return<::android::hardware::audio::effect::V7_0::Result> setConfig(const ::android::hardware::audio::effect::V7_0::EffectConfig& config, const ::android::sp<::android::hardware::audio::effect::V7_0::IEffectBufferProviderCallback>& inputBufferProvider, const ::android::sp<::android::hardware::audio::effect::V7_0::IEffectBufferProviderCallback>& outputBufferProvider) override = 0;
55 
56     /**
57      * Reset the effect engine. Keep configuration but resets state and buffer
58      * content.
59      *
60      * @return retval operation completion status.
61      */
62     virtual ::android::hardware::Return<::android::hardware::audio::effect::V7_0::Result> reset() override = 0;
63 
64     /**
65      * Enable processing.
66      *
67      * @return retval operation completion status.
68      */
69     virtual ::android::hardware::Return<::android::hardware::audio::effect::V7_0::Result> enable() override = 0;
70 
71     /**
72      * Disable processing.
73      *
74      * @return retval operation completion status.
75      */
76     virtual ::android::hardware::Return<::android::hardware::audio::effect::V7_0::Result> disable() override = 0;
77 
78     /**
79      * Set the rendering device the audio output path is connected to.  The
80      * effect implementation must set EFFECT_FLAG_DEVICE_IND flag in its
81      * descriptor to receive this command when the device changes.
82      *
83      * Note: this method is only supported for effects inserted into
84      *       the output chain.
85      *
86      * @param device output device specification.
87      * @return retval operation completion status.
88      */
89     virtual ::android::hardware::Return<::android::hardware::audio::effect::V7_0::Result> setDevice(const ::android::hardware::audio::common::V7_0::DeviceAddress& device) override = 0;
90 
91     /**
92      * Return callback for setAndGetVolume
93      */
94     using setAndGetVolume_cb = std::function<void(::android::hardware::audio::effect::V7_0::Result retval, const ::android::hardware::hidl_vec<uint32_t>& result)>;
95     /**
96      * Set and get volume. Used by audio framework to delegate volume control to
97      * effect engine. The effect implementation must set EFFECT_FLAG_VOLUME_CTRL
98      * flag in its descriptor to receive this command. The effect engine must
99      * return the volume that should be applied before the effect is
100      * processed. The overall volume (the volume actually applied by the effect
101      * engine multiplied by the returned value) should match the value indicated
102      * in the command.
103      *
104      * @param volumes vector containing volume for each channel defined in
105      *                EffectConfig for output buffer expressed in 8.24 fixed
106      *                point format.
107      * @return result updated volume values.
108      * @return retval operation completion status.
109      */
110     virtual ::android::hardware::Return<void> setAndGetVolume(const ::android::hardware::hidl_vec<uint32_t>& volumes, setAndGetVolume_cb _hidl_cb) override = 0;
111 
112     /**
113      * Notify the effect of the volume change. The effect implementation must
114      * set EFFECT_FLAG_VOLUME_IND flag in its descriptor to receive this
115      * command.
116      *
117      * @param volumes vector containing volume for each channel defined in
118      *                EffectConfig for output buffer expressed in 8.24 fixed
119      *                point format.
120      * @return retval operation completion status.
121      */
122     virtual ::android::hardware::Return<::android::hardware::audio::effect::V7_0::Result> volumeChangeNotification(const ::android::hardware::hidl_vec<uint32_t>& volumes) override = 0;
123 
124     /**
125      * Set the audio mode. The effect implementation must set
126      * EFFECT_FLAG_AUDIO_MODE_IND flag in its descriptor to receive this command
127      * when the audio mode changes.
128      *
129      * @param mode desired audio mode.
130      * @return retval operation completion status.
131      */
132     virtual ::android::hardware::Return<::android::hardware::audio::effect::V7_0::Result> setAudioMode(::android::hardware::audio::common::V7_0::AudioMode mode) override = 0;
133 
134     /**
135      * Apply new audio parameters configurations for input and output buffers of
136      * reverse stream.  An example of reverse stream is the echo reference
137      * supplied to an Acoustic Echo Canceler.
138      *
139      * @param config configuration descriptor.
140      * @param inputBufferProvider optional buffer provider reference.
141      * @param outputBufferProvider optional buffer provider reference.
142      * @return retval operation completion status.
143      */
144     virtual ::android::hardware::Return<::android::hardware::audio::effect::V7_0::Result> setConfigReverse(const ::android::hardware::audio::effect::V7_0::EffectConfig& config, const ::android::sp<::android::hardware::audio::effect::V7_0::IEffectBufferProviderCallback>& inputBufferProvider, const ::android::sp<::android::hardware::audio::effect::V7_0::IEffectBufferProviderCallback>& outputBufferProvider) override = 0;
145 
146     /**
147      * Set the capture device the audio input path is connected to. The effect
148      * implementation must set EFFECT_FLAG_DEVICE_IND flag in its descriptor to
149      * receive this command when the device changes.
150      *
151      * Note: this method is only supported for effects inserted into
152      *       the input chain.
153      *
154      * @param device input device specification.
155      * @return retval operation completion status.
156      */
157     virtual ::android::hardware::Return<::android::hardware::audio::effect::V7_0::Result> setInputDevice(const ::android::hardware::audio::common::V7_0::DeviceAddress& device) override = 0;
158 
159     /**
160      * Return callback for getConfig
161      */
162     using getConfig_cb = std::function<void(::android::hardware::audio::effect::V7_0::Result retval, const ::android::hardware::audio::effect::V7_0::EffectConfig& config)>;
163     /**
164      * Read audio parameters configurations for input and output buffers.
165      *
166      * @return retval operation completion status.
167      * @return config configuration descriptor.
168      */
169     virtual ::android::hardware::Return<void> getConfig(getConfig_cb _hidl_cb) override = 0;
170 
171     /**
172      * Return callback for getConfigReverse
173      */
174     using getConfigReverse_cb = std::function<void(::android::hardware::audio::effect::V7_0::Result retval, const ::android::hardware::audio::effect::V7_0::EffectConfig& config)>;
175     /**
176      * Read audio parameters configurations for input and output buffers of
177      * reverse stream.
178      *
179      * @return retval operation completion status.
180      * @return config configuration descriptor.
181      */
182     virtual ::android::hardware::Return<void> getConfigReverse(getConfigReverse_cb _hidl_cb) override = 0;
183 
184     /**
185      * Return callback for getSupportedAuxChannelsConfigs
186      */
187     using getSupportedAuxChannelsConfigs_cb = std::function<void(::android::hardware::audio::effect::V7_0::Result retval, const ::android::hardware::hidl_vec<::android::hardware::audio::effect::V7_0::EffectAuxChannelsConfig>& result)>;
188     /**
189      * Queries for supported combinations of main and auxiliary channels
190      * (e.g. for a multi-microphone noise suppressor).
191      *
192      * @param maxConfigs maximum number of the combinations to return.
193      * @return retval absence of the feature support is indicated using
194      *                NOT_SUPPORTED code. RESULT_TOO_BIG is returned if
195      *                the number of supported combinations exceeds 'maxConfigs'.
196      * @return result list of configuration descriptors.
197      */
198     virtual ::android::hardware::Return<void> getSupportedAuxChannelsConfigs(uint32_t maxConfigs, getSupportedAuxChannelsConfigs_cb _hidl_cb) override = 0;
199 
200     /**
201      * Return callback for getAuxChannelsConfig
202      */
203     using getAuxChannelsConfig_cb = std::function<void(::android::hardware::audio::effect::V7_0::Result retval, const ::android::hardware::audio::effect::V7_0::EffectAuxChannelsConfig& result)>;
204     /**
205      * Retrieves the current configuration of main and auxiliary channels.
206      *
207      * @return retval absence of the feature support is indicated using
208      *                NOT_SUPPORTED code.
209      * @return result configuration descriptor.
210      */
211     virtual ::android::hardware::Return<void> getAuxChannelsConfig(getAuxChannelsConfig_cb _hidl_cb) override = 0;
212 
213     /**
214      * Sets the current configuration of main and auxiliary channels.
215      *
216      * @return retval operation completion status; absence of the feature
217      *                support is indicated using NOT_SUPPORTED code.
218      */
219     virtual ::android::hardware::Return<::android::hardware::audio::effect::V7_0::Result> setAuxChannelsConfig(const ::android::hardware::audio::effect::V7_0::EffectAuxChannelsConfig& config) override = 0;
220 
221     /**
222      * Set the audio source the capture path is configured for (Camcorder, voice
223      * recognition...).
224      *
225      * Note: this method is only supported for effects inserted into
226      *       the input chain.
227      *
228      * @param source source descriptor.
229      * @return retval operation completion status.
230      */
231     virtual ::android::hardware::Return<::android::hardware::audio::effect::V7_0::Result> setAudioSource(const ::android::hardware::hidl_string& source) override = 0;
232 
233     /**
234      * This command indicates if the playback thread the effect is attached to
235      * is offloaded or not, and updates the I/O handle of the playback thread
236      * the effect is attached to.
237      *
238      * @param param effect offload descriptor.
239      * @return retval operation completion status.
240      */
241     virtual ::android::hardware::Return<::android::hardware::audio::effect::V7_0::Result> offload(const ::android::hardware::audio::effect::V7_0::EffectOffloadParameter& param) override = 0;
242 
243     /**
244      * Return callback for getDescriptor
245      */
246     using getDescriptor_cb = std::function<void(::android::hardware::audio::effect::V7_0::Result retval, const ::android::hardware::audio::effect::V7_0::EffectDescriptor& descriptor)>;
247     /**
248      * Returns the effect descriptor.
249      *
250      * @return retval operation completion status.
251      * @return descriptor effect descriptor.
252      */
253     virtual ::android::hardware::Return<void> getDescriptor(getDescriptor_cb _hidl_cb) override = 0;
254 
255     /**
256      * Return callback for prepareForProcessing
257      */
258     using prepareForProcessing_cb = std::function<void(::android::hardware::audio::effect::V7_0::Result retval, const ::android::hardware::MQDescriptorSync<::android::hardware::audio::effect::V7_0::Result>& statusMQ)>;
259     /**
260      * Set up required transports for passing audio buffers to the effect.
261      *
262      * The transport consists of shared memory and a message queue for reporting
263      * effect processing operation status. The shared memory is set up
264      * separately using 'setProcessBuffers' method.
265      *
266      * Processing is requested by setting 'REQUEST_PROCESS' or
267      * 'REQUEST_PROCESS_REVERSE' EventFlags associated with the status message
268      * queue. The result of processing may be one of the following:
269      *   OK if there were no errors during processing;
270      *   INVALID_ARGUMENTS if audio buffers are invalid;
271      *   INVALID_STATE if the engine has finished the disable phase;
272      *   NOT_INITIALIZED if the audio buffers were not set;
273      *   NOT_SUPPORTED if the requested processing type is not supported by
274      *                 the effect.
275      *
276      * @return retval OK if both message queues were created successfully.
277      *                INVALID_STATE if the method was already called.
278      *                INVALID_ARGUMENTS if there was a problem setting up
279      *                                  the queue.
280      * @return statusMQ a message queue used for passing status from the effect.
281      */
282     virtual ::android::hardware::Return<void> prepareForProcessing(prepareForProcessing_cb _hidl_cb) override = 0;
283 
284     /**
285      * Set up input and output buffers for processing audio data. The effect
286      * may modify both the input and the output buffer during the operation.
287      * Buffers may be set multiple times during effect lifetime.
288      *
289      * The input and the output buffer may be reused between different effects,
290      * and the input buffer may be used as an output buffer. Buffers are
291      * distinguished using 'AudioBuffer.id' field.
292      *
293      * @param inBuffer input audio buffer.
294      * @param outBuffer output audio buffer.
295      * @return retval OK if both buffers were mapped successfully.
296      *                INVALID_ARGUMENTS if there was a problem with mapping
297      *                                  any of the buffers.
298      */
299     virtual ::android::hardware::Return<::android::hardware::audio::effect::V7_0::Result> setProcessBuffers(const ::android::hardware::audio::effect::V7_0::AudioBuffer& inBuffer, const ::android::hardware::audio::effect::V7_0::AudioBuffer& outBuffer) override = 0;
300 
301     /**
302      * Return callback for command
303      */
304     using command_cb = std::function<void(int32_t status, const ::android::hardware::hidl_vec<uint8_t>& result)>;
305     /**
306      * Execute a vendor specific command on the effect. The command code
307      * and data, as well as result data are not interpreted by Android
308      * Framework and are passed as-is between the application and the effect.
309      *
310      * The effect must use standard POSIX.1-2001 error codes for the operation
311      * completion status.
312      *
313      * Use this method only if the effect is provided by a third party, and
314      * there is no interface defined for it. This method only works for effects
315      * implemented in software.
316      *
317      * @param commandId the ID of the command.
318      * @param data command data.
319      * @param resultMaxSize maximum size in bytes of the result; can be 0.
320      * @return status command completion status.
321      * @return result result data.
322      */
323     virtual ::android::hardware::Return<void> command(uint32_t commandId, const ::android::hardware::hidl_vec<uint8_t>& data, uint32_t resultMaxSize, command_cb _hidl_cb) override = 0;
324 
325     /**
326      * Set a vendor-specific parameter and apply it immediately. The parameter
327      * code and data are not interpreted by Android Framework and are passed
328      * as-is between the application and the effect.
329      *
330      * The effect must use INVALID_ARGUMENTS return code if the parameter ID is
331      * unknown or if provided parameter data is invalid. If the effect does not
332      * support setting vendor-specific parameters, it must return NOT_SUPPORTED.
333      *
334      * Use this method only if the effect is provided by a third party, and
335      * there is no interface defined for it. This method only works for effects
336      * implemented in software.
337      *
338      * @param parameter identifying data of the parameter.
339      * @param value the value of the parameter.
340      * @return retval operation completion status.
341      */
342     virtual ::android::hardware::Return<::android::hardware::audio::effect::V7_0::Result> setParameter(const ::android::hardware::hidl_vec<uint8_t>& parameter, const ::android::hardware::hidl_vec<uint8_t>& value) override = 0;
343 
344     /**
345      * Return callback for getParameter
346      */
347     using getParameter_cb = std::function<void(::android::hardware::audio::effect::V7_0::Result retval, const ::android::hardware::hidl_vec<uint8_t>& value)>;
348     /**
349      * Get a vendor-specific parameter value. The parameter code and returned
350      * data are not interpreted by Android Framework and are passed as-is
351      * between the application and the effect.
352      *
353      * The effect must use INVALID_ARGUMENTS return code if the parameter ID is
354      * unknown. If the effect does not support setting vendor-specific
355      * parameters, it must return NOT_SUPPORTED.
356      *
357      * Use this method only if the effect is provided by a third party, and
358      * there is no interface defined for it.  This method only works for effects
359      * implemented in software.
360      *
361      * @param parameter identifying data of the parameter.
362      * @param valueMaxSize maximum size in bytes of the value.
363      * @return retval operation completion status.
364      * @return result the value of the parameter.
365      */
366     virtual ::android::hardware::Return<void> getParameter(const ::android::hardware::hidl_vec<uint8_t>& parameter, uint32_t valueMaxSize, getParameter_cb _hidl_cb) override = 0;
367 
368     /**
369      * Return callback for getSupportedConfigsForFeature
370      */
371     using getSupportedConfigsForFeature_cb = std::function<void(::android::hardware::audio::effect::V7_0::Result retval, uint32_t configsCount, const ::android::hardware::hidl_vec<uint8_t>& configsData)>;
372     /**
373      * Get supported configs for a vendor-specific feature. The configs returned
374      * are not interpreted by Android Framework and are passed as-is between the
375      * application and the effect.
376      *
377      * The effect must use INVALID_ARGUMENTS return code if the feature ID is
378      * unknown. If the effect does not support getting vendor-specific feature
379      * configs, it must return NOT_SUPPORTED. If the feature is supported but
380      * the total number of supported configurations exceeds the maximum number
381      * indicated by the caller, the method must return RESULT_TOO_BIG.
382      *
383      * Use this method only if the effect is provided by a third party, and
384      * there is no interface defined for it.  This method only works for effects
385      * implemented in software.
386      *
387      * @param featureId feature identifier.
388      * @param maxConfigs maximum number of configs to return.
389      * @param configSize size of each config in bytes.
390      * @return retval operation completion status.
391      * @return configsCount number of configs returned.
392      * @return configsData data for all the configs returned.
393      */
394     virtual ::android::hardware::Return<void> getSupportedConfigsForFeature(uint32_t featureId, uint32_t maxConfigs, uint32_t configSize, getSupportedConfigsForFeature_cb _hidl_cb) override = 0;
395 
396     /**
397      * Return callback for getCurrentConfigForFeature
398      */
399     using getCurrentConfigForFeature_cb = std::function<void(::android::hardware::audio::effect::V7_0::Result retval, const ::android::hardware::hidl_vec<uint8_t>& configData)>;
400     /**
401      * Get the current config for a vendor-specific feature. The config returned
402      * is not interpreted by Android Framework and is passed as-is between the
403      * application and the effect.
404      *
405      * The effect must use INVALID_ARGUMENTS return code if the feature ID is
406      * unknown. If the effect does not support getting vendor-specific
407      * feature configs, it must return NOT_SUPPORTED.
408      *
409      * Use this method only if the effect is provided by a third party, and
410      * there is no interface defined for it.  This method only works for effects
411      * implemented in software.
412      *
413      * @param featureId feature identifier.
414      * @param configSize size of the config in bytes.
415      * @return retval operation completion status.
416      * @return configData config data.
417      */
418     virtual ::android::hardware::Return<void> getCurrentConfigForFeature(uint32_t featureId, uint32_t configSize, getCurrentConfigForFeature_cb _hidl_cb) override = 0;
419 
420     /**
421      * Set the current config for a vendor-specific feature. The config data
422      * is not interpreted by Android Framework and is passed as-is between the
423      * application and the effect.
424      *
425      * The effect must use INVALID_ARGUMENTS return code if the feature ID is
426      * unknown. If the effect does not support getting vendor-specific
427      * feature configs, it must return NOT_SUPPORTED.
428      *
429      * Use this method only if the effect is provided by a third party, and
430      * there is no interface defined for it.  This method only works for effects
431      * implemented in software.
432      *
433      * @param featureId feature identifier.
434      * @param configData config data.
435      * @return retval operation completion status.
436      */
437     virtual ::android::hardware::Return<::android::hardware::audio::effect::V7_0::Result> setCurrentConfigForFeature(uint32_t featureId, const ::android::hardware::hidl_vec<uint8_t>& configData) override = 0;
438 
439     /**
440      * Called by the framework to deinitialize the effect and free up
441      * all currently allocated resources. It is recommended to close
442      * the effect on the client side as soon as it is becomes unused.
443      *
444      * The client must ensure that this function is not called while
445      * audio data is being transferred through the effect's message queues.
446      *
447      * @return retval OK in case the success.
448      *                INVALID_STATE if the effect was already closed.
449      */
450     virtual ::android::hardware::Return<::android::hardware::audio::effect::V7_0::Result> close() override = 0;
451 
452     /**
453      * Sets target gain expressed in millibels.
454      */
455     virtual ::android::hardware::Return<::android::hardware::audio::effect::V7_0::Result> setTargetGain(int32_t targetGainMb) = 0;
456 
457     /**
458      * Return callback for getTargetGain
459      */
460     using getTargetGain_cb = std::function<void(::android::hardware::audio::effect::V7_0::Result retval, int32_t targetGainMb)>;
461     /**
462      * Gets target gain expressed in millibels.
463      */
464     virtual ::android::hardware::Return<void> getTargetGain(getTargetGain_cb _hidl_cb) = 0;
465 
466     /**
467      * Return callback for interfaceChain
468      */
469     using interfaceChain_cb = std::function<void(const ::android::hardware::hidl_vec<::android::hardware::hidl_string>& descriptors)>;
470     /*
471      * Provides run-time type information for this object.
472      * For example, for the following interface definition:
473      *     package [email protected];
474      *     interface IParent {};
475      *     interface IChild extends IParent {};
476      * Calling interfaceChain on an IChild object must yield the following:
477      *     ["[email protected]::IChild",
478      *      "[email protected]::IParent"
479      *      "[email protected]::IBase"]
480      *
481      * @return descriptors a vector of descriptors of the run-time type of the
482      *         object.
483      */
484     virtual ::android::hardware::Return<void> interfaceChain(interfaceChain_cb _hidl_cb) override;
485 
486     /*
487      * Emit diagnostic information to the given file.
488      *
489      * Optionally overriden.
490      *
491      * @param fd      File descriptor to dump data to.
492      *                Must only be used for the duration of this call.
493      * @param options Arguments for debugging.
494      *                Must support empty for default debug information.
495      */
496     virtual ::android::hardware::Return<void> debug(const ::android::hardware::hidl_handle& fd, const ::android::hardware::hidl_vec<::android::hardware::hidl_string>& options) override;
497 
498     /**
499      * Return callback for interfaceDescriptor
500      */
501     using interfaceDescriptor_cb = std::function<void(const ::android::hardware::hidl_string& descriptor)>;
502     /*
503      * Provides run-time type information for this object.
504      * For example, for the following interface definition:
505      *     package [email protected];
506      *     interface IParent {};
507      *     interface IChild extends IParent {};
508      * Calling interfaceDescriptor on an IChild object must yield
509      *     "[email protected]::IChild"
510      *
511      * @return descriptor a descriptor of the run-time type of the
512      *         object (the first element of the vector returned by
513      *         interfaceChain())
514      */
515     virtual ::android::hardware::Return<void> interfaceDescriptor(interfaceDescriptor_cb _hidl_cb) override;
516 
517     /**
518      * Return callback for getHashChain
519      */
520     using getHashChain_cb = std::function<void(const ::android::hardware::hidl_vec<::android::hardware::hidl_array<uint8_t, 32>>& hashchain)>;
521     /*
522      * Returns hashes of the source HAL files that define the interfaces of the
523      * runtime type information on the object.
524      * For example, for the following interface definition:
525      *     package [email protected];
526      *     interface IParent {};
527      *     interface IChild extends IParent {};
528      * Calling interfaceChain on an IChild object must yield the following:
529      *     [(hash of IChild.hal),
530      *      (hash of IParent.hal)
531      *      (hash of IBase.hal)].
532      *
533      * SHA-256 is used as the hashing algorithm. Each hash has 32 bytes
534      * according to SHA-256 standard.
535      *
536      * @return hashchain a vector of SHA-1 digests
537      */
538     virtual ::android::hardware::Return<void> getHashChain(getHashChain_cb _hidl_cb) override;
539 
540     /*
541      * This method trigger the interface to enable/disable instrumentation based
542      * on system property hal.instrumentation.enable.
543      */
544     virtual ::android::hardware::Return<void> setHALInstrumentation() override;
545 
546     /*
547      * Registers a death recipient, to be called when the process hosting this
548      * interface dies.
549      *
550      * @param recipient a hidl_death_recipient callback object
551      * @param cookie a cookie that must be returned with the callback
552      * @return success whether the death recipient was registered successfully.
553      */
554     virtual ::android::hardware::Return<bool> linkToDeath(const ::android::sp<::android::hardware::hidl_death_recipient>& recipient, uint64_t cookie) override;
555 
556     /*
557      * Provides way to determine if interface is running without requesting
558      * any functionality.
559      */
560     virtual ::android::hardware::Return<void> ping() override;
561 
562     /**
563      * Return callback for getDebugInfo
564      */
565     using getDebugInfo_cb = std::function<void(const ::android::hidl::base::V1_0::DebugInfo& info)>;
566     /*
567      * Get debug information on references on this interface.
568      * @return info debugging information. See comments of DebugInfo.
569      */
570     virtual ::android::hardware::Return<void> getDebugInfo(getDebugInfo_cb _hidl_cb) override;
571 
572     /*
573      * This method notifies the interface that one or more system properties
574      * have changed. The default implementation calls
575      * (C++)  report_sysprop_change() in libcutils or
576      * (Java) android.os.SystemProperties.reportSyspropChanged,
577      * which in turn calls a set of registered callbacks (eg to update trace
578      * tags).
579      */
580     virtual ::android::hardware::Return<void> notifySyspropsChanged() override;
581 
582     /*
583      * Unregisters the registered death recipient. If this service was registered
584      * multiple times with the same exact death recipient, this unlinks the most
585      * recently registered one.
586      *
587      * @param recipient a previously registered hidl_death_recipient callback
588      * @return success whether the death recipient was unregistered successfully.
589      */
590     virtual ::android::hardware::Return<bool> unlinkToDeath(const ::android::sp<::android::hardware::hidl_death_recipient>& recipient) override;
591 
592     // cast static functions
593     /**
594      * This performs a checked cast based on what the underlying implementation actually is.
595      */
596     static ::android::hardware::Return<::android::sp<::android::hardware::audio::effect::V7_0::ILoudnessEnhancerEffect>> castFrom(const ::android::sp<::android::hardware::audio::effect::V7_0::ILoudnessEnhancerEffect>& parent, bool emitError = false);
597     /**
598      * This performs a checked cast based on what the underlying implementation actually is.
599      */
600     static ::android::hardware::Return<::android::sp<::android::hardware::audio::effect::V7_0::ILoudnessEnhancerEffect>> castFrom(const ::android::sp<::android::hardware::audio::effect::V7_0::IEffect>& parent, bool emitError = false);
601     /**
602      * This performs a checked cast based on what the underlying implementation actually is.
603      */
604     static ::android::hardware::Return<::android::sp<::android::hardware::audio::effect::V7_0::ILoudnessEnhancerEffect>> castFrom(const ::android::sp<::android::hidl::base::V1_0::IBase>& parent, bool emitError = false);
605 
606     // helper methods for interactions with the hwservicemanager
607     /**
608      * This gets the service of this type with the specified instance name. If the
609      * service is currently not available or not in the VINTF manifest on a Trebilized
610      * device, this will return nullptr. This is useful when you don't want to block
611      * during device boot. If getStub is true, this will try to return an unwrapped
612      * passthrough implementation in the same process. This is useful when getting an
613      * implementation from the same partition/compilation group.
614      *
615      * In general, prefer getService(std::string,bool)
616      */
617     static ::android::sp<ILoudnessEnhancerEffect> tryGetService(const std::string &serviceName="default", bool getStub=false);
618     /**
619      * Deprecated. See tryGetService(std::string, bool)
620      */
621     static ::android::sp<ILoudnessEnhancerEffect> tryGetService(const char serviceName[], bool getStub=false)  { std::string str(serviceName ? serviceName : "");      return tryGetService(str, getStub); }
622     /**
623      * Deprecated. See tryGetService(std::string, bool)
624      */
625     static ::android::sp<ILoudnessEnhancerEffect> tryGetService(const ::android::hardware::hidl_string& serviceName, bool getStub=false)  { std::string str(serviceName.c_str());      return tryGetService(str, getStub); }
626     /**
627      * Calls tryGetService("default", bool). This is the recommended instance name for singleton services.
628      */
tryGetServiceILoudnessEnhancerEffect629     static ::android::sp<ILoudnessEnhancerEffect> tryGetService(bool getStub) { return tryGetService("default", getStub); }
630     /**
631      * This gets the service of this type with the specified instance name. If the
632      * service is not in the VINTF manifest on a Trebilized device, this will return
633      * nullptr. If the service is not available, this will wait for the service to
634      * become available. If the service is a lazy service, this will start the service
635      * and return when it becomes available. If getStub is true, this will try to
636      * return an unwrapped passthrough implementation in the same process. This is
637      * useful when getting an implementation from the same partition/compilation group.
638      */
639     static ::android::sp<ILoudnessEnhancerEffect> getService(const std::string &serviceName="default", bool getStub=false);
640     /**
641      * Deprecated. See getService(std::string, bool)
642      */
643     static ::android::sp<ILoudnessEnhancerEffect> getService(const char serviceName[], bool getStub=false)  { std::string str(serviceName ? serviceName : "");      return getService(str, getStub); }
644     /**
645      * Deprecated. See getService(std::string, bool)
646      */
647     static ::android::sp<ILoudnessEnhancerEffect> getService(const ::android::hardware::hidl_string& serviceName, bool getStub=false)  { std::string str(serviceName.c_str());      return getService(str, getStub); }
648     /**
649      * Calls getService("default", bool). This is the recommended instance name for singleton services.
650      */
getServiceILoudnessEnhancerEffect651     static ::android::sp<ILoudnessEnhancerEffect> getService(bool getStub) { return getService("default", getStub); }
652     /**
653      * Registers a service with the service manager. For Trebilized devices, the service
654      * must also be in the VINTF manifest.
655      */
656     __attribute__ ((warn_unused_result))::android::status_t registerAsService(const std::string &serviceName="default");
657     /**
658      * Registers for notifications for when a service is registered.
659      */
660     static bool registerForNotifications(
661             const std::string &serviceName,
662             const ::android::sp<::android::hidl::manager::V1_0::IServiceNotification> &notification);
663 };
664 
665 //
666 // type declarations for package
667 //
668 
669 static inline std::string toString(const ::android::sp<::android::hardware::audio::effect::V7_0::ILoudnessEnhancerEffect>& o);
670 
671 //
672 // type header definitions for package
673 //
674 
toString(const::android::sp<::android::hardware::audio::effect::V7_0::ILoudnessEnhancerEffect> & o)675 static inline std::string toString(const ::android::sp<::android::hardware::audio::effect::V7_0::ILoudnessEnhancerEffect>& o) {
676     std::string os = "[class or subclass of ";
677     os += ::android::hardware::audio::effect::V7_0::ILoudnessEnhancerEffect::descriptor;
678     os += "]";
679     os += o->isRemote() ? "@remote" : "@local";
680     return os;
681 }
682 
683 
684 }  // namespace V7_0
685 }  // namespace effect
686 }  // namespace audio
687 }  // namespace hardware
688 }  // namespace android
689 
690 //
691 // global type declarations for package
692 //
693 
694 
695 #endif  // HIDL_GENERATED_ANDROID_HARDWARE_AUDIO_EFFECT_V7_0_ILOUDNESSENHANCEREFFECT_H
696