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 DEVSVC_MANAGER_CLNT_H 10 #define DEVSVC_MANAGER_CLNT_H 11 12 #include "devsvc_manager_if.h" 13 14 #ifdef __cplusplus 15 extern "C" { 16 #endif /* __cplusplus */ 17 18 struct DevSvcManagerClnt { 19 struct IDevSvcManager *devSvcMgrIf; 20 }; 21 22 struct DevSvcManagerClnt *DevSvcManagerClntGetInstance(void); 23 struct HdfDeviceObject *DevSvcManagerClntGetDeviceObject(const char *svcName); 24 int DevSvcManagerClntAddService(struct HdfDeviceObject *service, const struct HdfServiceInfo *servinfo); 25 int DevSvcManagerClntUpdateService(struct HdfDeviceObject *service, const struct HdfServiceInfo *servinfo); 26 void DevSvcManagerClntRemoveService(const char *svcName); 27 int DevSvcManagerClntSubscribeService(const char *svcName, struct SubscriberCallback callback); 28 int DevSvcManagerClntUnsubscribeService(const char *svcName); 29 30 #ifdef __cplusplus 31 } 32 #endif /* __cplusplus */ 33 34 #endif /* DEVSVC_MANAGER_CLNT_H */ 35