1 /*
2  * Copyright (c) 2020-2022 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 DEVMGR_SERVICE_IF_H
10 #define DEVMGR_SERVICE_IF_H
11 
12 #include "devhost_service_if.h"
13 #include "device_token_if.h"
14 #include "hdf_device_desc.h"
15 #include "hdf_object.h"
16 #include "hdf_power_state.h"
17 #include "hdf_sbuf.h"
18 #include "power_state_token_if.h"
19 
20 struct IDevmgrService {
21     struct HdfObject base;
22     struct HdfDeviceObject object;
23     int (*AttachDeviceHost)(struct IDevmgrService *, uint16_t, struct IDevHostService *);
24     int (*AttachDevice)(struct IDevmgrService *, struct IHdfDeviceToken *);
25     int (*DetachDevice)(struct IDevmgrService *, devid_t);
26     int (*LoadDevice)(struct IDevmgrService *, const char *);
27     int (*UnloadDevice)(struct IDevmgrService *, const char *);
28     int (*StartService)(struct IDevmgrService *);
29     int (*PowerStateChange)(struct IDevmgrService *, enum HdfPowerState pEvent);
30     int (*ListAllDevice)(struct IDevmgrService *, struct HdfSBuf *);
31 };
32 
33 #endif /* DEVMGR_SERVICE_IF_H */
34