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 enum { 15 HDF_OBJECT_ID_DEVMGR_SERVICE = 0, 16 HDF_OBJECT_ID_DEVSVC_MANAGER, 17 HDF_OBJECT_ID_DEVHOST_SERVICE, 18 HDF_OBJECT_ID_DRIVER_INSTALLER, 19 HDF_OBJECT_ID_DRIVER_LOADER, 20 HDF_OBJECT_ID_DEVICE, 21 HDF_OBJECT_ID_DEVICE_TOKEN, 22 HDF_OBJECT_ID_DEVICE_SERVICE, 23 HDF_OBJECT_ID_REMOTE_SERVICE, 24 HDF_OBJECT_ID_MAX 25 }; 26 27 struct HdfObjectCreator { 28 struct HdfObject *(*Create)(void); 29 void (*Release)(struct HdfObject *); 30 }; 31 32 const struct HdfObjectCreator *HdfObjectManagerGetCreators(int objectId); 33 struct HdfObject *HdfObjectManagerGetObject(int ObjectId); 34 void HdfObjectManagerFreeObject(struct HdfObject *object); 35 36 #endif /* HDF_OBJECT_MANAGER_H */ 37