• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 #include "hdf_io_service.h"
10 #include "hdf_vnode_adapter.h"
11 
HdfIoServiceBind(const char * serviceName)12 struct HdfIoService *HdfIoServiceBind(const char *serviceName)
13 {
14     return HdfIoServiceAdapterObtain(serviceName);
15 }
16 
HdfIoServiceRecycle(struct HdfIoService * service)17 void HdfIoServiceRecycle(struct HdfIoService *service)
18 {
19     HdfIoServiceAdapterRecycle(service);
20 }
21 
HdfIoServicePublish(const char * serviceName,uint32_t mode)22 struct HdfIoService *HdfIoServicePublish(const char *serviceName, uint32_t mode)
23 {
24     if (HdfIoServiceAdapterPublish != NULL) {
25         return HdfIoServiceAdapterPublish(serviceName, mode);
26     }
27 
28     return NULL;
29 }
30 
HdfIoServiceRemove(struct HdfIoService * service)31 void HdfIoServiceRemove(struct HdfIoService *service)
32 {
33     if (HdfIoServiceAdapterRemove != NULL) {
34         HdfIoServiceAdapterRemove(service);
35     }
36 }
37