1 /*
2  * Copyright (c) 2021-2023 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 /**
17  * @addtogroup DriverHdi
18  * @{
19  *
20  * @brief Provides APIs for a system ability to obtain hardware device interface (HDI) services,
21  * load or unload a device, and listen for service status, and capabilities for the hdi-gen tool to
22  * automatically generate code in the interface description language (IDL).
23  *
24  * The HDF and the IDL code generated allow system abilities to access the HDI driver service.
25  *
26  * @since 1.0
27  */
28 
29 /**
30  * @file servstat_listener_hdi.h
31  *
32  * @brief Defines the data structs and interface types related to service status listening based on C.
33  *
34  * @since 1.0
35  */
36 
37 #ifndef HDI_SERVICE_STATUS_LISTENER_INF_H
38 #define HDI_SERVICE_STATUS_LISTENER_INF_H
39 
40 #include "hdf_types.h"
41 #include "hdf_service_status.h"
42 
43 #ifdef __cplusplus
44 extern "C" {
45 #endif /* __cplusplus */
46 /**
47  * @brief Creates an HDI service status listener object. You can set the function for receiving the service status
48  * and use <b>RegisterServiceStatusListener()</b> to register the listener object.
49  *
50  * @return Returns the pointer to the listener object created.
51  */
52 
53 struct ServiceStatusListener *HdiServiceStatusListenerNewInstance(void);
54 /**
55  * @brief Releases an HDI service status listener object.
56  *
57  * @param listener Indicates the pointer to the listener object to release.
58  */
59 void HdiServiceStatusListenerFree(struct ServiceStatusListener *listener);
60 
61 #ifdef __cplusplus
62 }
63 #endif /* __cplusplus */
64 
65 #endif /* HDI_SERVICE_STATUS_LISTENER_INF_H */
66