• 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_OBJECT_MANAGER_H
10 #define HDF_OBJECT_MANAGER_H
11 
12 #include "hdf_object.h"
13 
14 #ifdef __cplusplus
15 extern "C" {
16 #endif /* __cplusplus */
17 
18 enum {
19     HDF_OBJECT_ID_DEVMGR_SERVICE = 0,
20     HDF_OBJECT_ID_DEVSVC_MANAGER,
21     HDF_OBJECT_ID_DEVHOST_SERVICE,
22     HDF_OBJECT_ID_DRIVER_INSTALLER,
23     HDF_OBJECT_ID_DRIVER_LOADER,
24     HDF_OBJECT_ID_DEVICE,
25     HDF_OBJECT_ID_DEVICE_TOKEN,
26     HDF_OBJECT_ID_DEVICE_SERVICE,
27     HDF_OBJECT_ID_REMOTE_SERVICE,
28     HDF_OBJECT_ID_MAX
29 };
30 
31 struct HdfObjectCreator {
32     struct HdfObject *(*Create)(void);
33     void (*Release)(struct HdfObject *);
34 };
35 
36 const struct HdfObjectCreator *HdfObjectManagerGetCreators(int objectId);
37 struct HdfObject *HdfObjectManagerGetObject(int objectId);
38 void HdfObjectManagerFreeObject(struct HdfObject *object);
39 
40 #ifdef __cplusplus
41 }
42 #endif /* __cplusplus */
43 #endif /* HDF_OBJECT_MANAGER_H */
44