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 DEVSVC_MANAGER_IF_H 10 #define DEVSVC_MANAGER_IF_H 11 12 #include "devsvc_listener_holder.h" 13 #include "hdf_device_desc.h" 14 #include "hdf_object.h" 15 #include "hdf_service_info.h" 16 17 struct IDevSvcManager { 18 struct HdfObject object; 19 int (*StartService)(struct IDevSvcManager *); 20 int (*AddService)(struct IDevSvcManager *, struct HdfDeviceObject *, const struct HdfServiceInfo *); 21 int (*UpdateService)(struct IDevSvcManager *, struct HdfDeviceObject *, const struct HdfServiceInfo *); 22 int (*SubscribeService)(struct IDevSvcManager *, const char *, struct SubscriberCallback); 23 int (*UnsubscribeService)(struct IDevSvcManager *, const char *); 24 struct HdfObject *(*GetService)(struct IDevSvcManager *, const char *); 25 struct HdfDeviceObject *(*GetObject)(struct IDevSvcManager *, const char *); 26 void (*RemoveService)(struct IDevSvcManager *, const char *, const struct HdfDeviceObject *); 27 int (*RegsterServListener)(struct IDevSvcManager *, struct ServStatListenerHolder *); 28 void (*UnregsterServListener)(struct IDevSvcManager *, struct ServStatListenerHolder *); 29 void (*ListAllService)(struct IDevSvcManager *, struct HdfSBuf *); 30 int (*ListServiceByInterfaceDesc)(struct IDevSvcManager *, const char *, struct HdfSBuf *); 31 }; 32 33 #endif /* DEVSVC_MANAGER_IF_H */ 34