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_DEVICE_OBJECT_H 10 #define HDF_DEVICE_OBJECT_H 11 12 #include "hdf_device_desc.h" 13 #ifdef __cplusplus 14 extern "C" { 15 #endif /* __cplusplus */ 16 void HdfDeviceObjectConstruct(struct HdfDeviceObject *deviceObject); 17 struct HdfDeviceObject *HdfDeviceObjectAlloc(struct HdfDeviceObject *parent, const char *driverName); 18 void HdfDeviceObjectRelease(struct HdfDeviceObject *dev); 19 int HdfDeviceObjectRegister(struct HdfDeviceObject *dev); 20 int HdfDeviceObjectUnRegister(struct HdfDeviceObject *dev); 21 int HdfDeviceObjectPublishService(struct HdfDeviceObject *dev, const char *servName, uint8_t policy, uint32_t perm); 22 int HdfRemoveService(struct HdfDeviceObject *deviceObject); 23 int HdfDeviceObjectSetServInfo(struct HdfDeviceObject *dev, const char *info); 24 int HdfDeviceObjectUpdate(struct HdfDeviceObject *dev); 25 int HdfDeviceObjectSetInterfaceDesc(struct HdfDeviceObject *dev, const char *interfaceDesc); 26 bool HdfDeviceObjectCheckInterfaceDesc(struct HdfDeviceObject *dev, struct HdfSBuf *data); 27 28 #ifdef __cplusplus 29 } 30 #endif /* __cplusplus */ 31 #endif /* HDF_DEVICE_OBJECT_H */ 32