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 *deviceObject); 19 int HdfDeviceObjectRegister(struct HdfDeviceObject *deviceObject); 20 int HdfDeviceObjectUnRegister(struct HdfDeviceObject *deviceObject); 21 int HdfDeviceObjectPublishService(struct HdfDeviceObject *deviceObject, 22 const char *servName, uint8_t policy, uint32_t perm); 23 int HdfRemoveService(struct HdfDeviceObject *deviceObject); 24 int HdfDeviceObjectSetServInfo(struct HdfDeviceObject *dev, const char *info); 25 int HdfDeviceObjectUpdate(struct HdfDeviceObject *dev); 26 int HdfDeviceObjectSetInterfaceDesc(struct HdfDeviceObject *dev, const char *interfaceDesc); 27 bool HdfDeviceObjectCheckInterfaceDesc(struct HdfDeviceObject *dev, struct HdfSBuf *data); 28 29 #ifdef __cplusplus 30 } 31 #endif /* __cplusplus */ 32 #endif /* HDF_DEVICE_OBJECT_H */ 33