• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2020-2021 Huawei Device Co., Ltd.
3  *
4  * HDF is dual licensed: you can use it either under the terms of
5  * the GPL, or the BSD license, at your option.
6  * See the LICENSE file in the root of this repository for complete details.
7  */
8 
9 #ifndef HDF_DRIVER_LOADER_H
10 #define HDF_DRIVER_LOADER_H
11 
12 #include "hdf_device_info.h"
13 #include "hdf_device_node.h"
14 #include "hdf_object.h"
15 
16 struct IDriverLoader {
17     struct HdfObject object;
18     struct HdfDriver *(*GetDriver)(const char *driverName);
19     void (*ReclaimDriver)(struct HdfDriver *driver);
20 };
21 
22 struct HdfDriverLoader {
23     struct IDriverLoader super;
24 };
25 
26 struct HdfObject *HdfDriverLoaderCreate(void);
27 void HdfDriverLoaderConstruct(struct HdfDriverLoader *inst);
28 void HdfDriverLoaderRelease(struct HdfObject *object);
29 struct IDriverLoader *HdfDriverLoaderGetInstance(void);
30 struct HdfDriver *HdfDriverLoaderGetDriver(const char *moduleName);
31 struct HdfDeviceNode *HdfDriverLoaderLoadNode(
32     struct IDriverLoader *loader, const struct HdfDeviceInfo *deviceInfo);
33 void HdfDriverLoaderUnLoadNode(struct IDriverLoader *loader, const struct HdfDeviceInfo *deviceInfo);
34 
35 #endif /* HDF_DRIVER_LOADER_H */
36