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