1 /* 2 * Copyright (c) 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_SVCMGR_IOSERVICE_H 10 #define DEVSVC_SVCMGR_IOSERVICE_H 11 12 #include "hdf_base.h" 13 #include "hdf_service_status.h" 14 15 #ifdef __cplusplus 16 extern "C" { 17 #endif /* __cplusplus */ 18 19 #define DEV_SVCMGR_NODE "devsvc_mgr" 20 21 enum SvcMgrIoCmd { 22 SVCMGR_REGISTER_LISTENER, 23 SVCMGR_UNREGISTER_LISTENER, 24 }; 25 26 struct ISvcMgrIoservice { 27 int32_t (*RegisterServiceStatusListener)(struct ISvcMgrIoservice *self, 28 struct ServiceStatusListener *listener, uint16_t deviceClass); 29 int32_t (*UnregisterServiceStatusListener)(struct ISvcMgrIoservice *self, 30 struct ServiceStatusListener *listener); 31 }; 32 33 struct ISvcMgrIoservice *SvcMgrIoserviceGet(void); 34 void SvcMgrIoserviceRelease(struct ISvcMgrIoservice *svcmgr); 35 36 #ifdef __cplusplus 37 } 38 #endif /* __cplusplus */ 39 40 #endif // DEVSVC_SVCMGR_IOSERVICE_H