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 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_object.h" 15 #include "power_state_token_if.h" 16 #include "hdf_power_state.h" 17 18 struct IDevmgrService { 19 struct HdfObject base; 20 struct HdfDeviceObject object; 21 int (*AttachDeviceHost)(struct IDevmgrService *, uint16_t, struct IDevHostService *); 22 int (*AttachDevice)(struct IDevmgrService *, struct IHdfDeviceToken *); 23 int (*DetachDevice)(struct IDevmgrService *, devid_t); 24 int (*LoadDevice)(struct IDevmgrService *, const char *); 25 int (*UnloadDevice)(struct IDevmgrService *, const char *); 26 int (*StartService)(struct IDevmgrService *); 27 int (*PowerStateChange)(struct IDevmgrService *, enum HdfPowerState pEvent); 28 }; 29 30 #endif /* DEVMGR_SERVICE_IF_H */ 31