# hdf\_device\_desc.h - [Overview](#section2126061454165627) - [Summary](#section1232562669165627) - [Data Structures](#nested-classes) - [Macros](#define-members) - [Enumerations](#enum-members) - [Functions](#func-members) ## **Overview** **Related Modules:** [Core](Core.md) **Description:** Declares functions related to driver loading, service obtaining, and power management. **Since:** 1.0 ## **Summary** ## Data Structures

Data Structure Name

Description

HdfDeviceObject

Defines the device object.

HdfDeviceIoClient

Defines the client object structure of the I/O service.

IDeviceIoService

Defines the driver service.

SubscriberCallback

Called when the driver subscribes to other driver services.

IPowerEventListener

Defines the power management functions provided by the HDF for the driver.

HdfDriverEntry

Defines the entry structure of the driver in the HDF.

## Macros

Macro Name and Value

Description

MAX_PRIORITY_NUM 200

The maximum priority for loading the host and device.

HDF_INIT(module) HDF_DRIVER_INIT(module)

Registers the driver with the HDF.

## Enumerations

Enumeration Name

Description

ServicePolicy { SERVICE_POLICY_NONE = 0, SERVICE_POLICY_PUBLIC, SERVICE_POLICY_CAPACITY, SERVICE_POLICY_FRIENDLY, SERVICE_POLICY_PRIVATE, SERVICE_POLICY_INVALID }

Enumerates policies for releasing driver services developed based on the HDF.

DevicePreload { DEVICE_PRELOAD_ENABLE = 0, DEVICE_PRELOAD_DISABLE, DEVICE_PRELOAD_INVALID }

Enumerates driver loading policies.

## Functions

Function

Description

DevSvcManagerClntGetService (const char *svcName)

const struct HdfObject *

Obtains the driver service object based on a driver service name.

HdfDeviceGetServiceName (const struct HdfDeviceObject *deviceObject)

const char *

Obtains the service name of a driver.

HdfDeviceSubscribeService (struct HdfDeviceObject *deviceObject, const char *serviceName, struct SubscriberCallback callback)

int32_t

Subscribes to a driver service.

HdfDeviceSendEvent (const struct HdfDeviceObject *deviceObject, uint32_t id, const struct HdfSBuf *data)

int32_t

Sends event messages.

HdfDeviceSendEventToClient (const struct HdfDeviceIoClient *client, uint32_t id, const struct HdfSBuf *data)

int32_t

Sends an event message to a specified client object.