1 /*
2 * Copyright (c) 2020 Huawei Device Co., Ltd.
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at
6 *
7 * http://www.apache.org/licenses/LICENSE-2.0
8 *
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
14 */
15 #include "service_registry.h"
16 #include <ohos_errno.h>
17
SAMGR_RegisterServiceApi(const char * service,const char * feature,const Identity * identity,IUnknown * iUnknown)18 int __attribute__((weak)) SAMGR_RegisterServiceApi(const char *service, const char *feature,
19 const Identity *identity, IUnknown *iUnknown)
20 {
21 (void)service;
22 (void)feature;
23 (void)iUnknown;
24 (void)identity;
25 return EC_FAILURE;
26 }
27
SAMGR_FindServiceApi(const char * service,const char * feature)28 IUnknown *__attribute__((weak)) SAMGR_FindServiceApi(const char *service, const char *feature)
29 {
30 (void)service;
31 (void)feature;
32 return NULL;
33 }
34
SAMGR_RegisterSystemCapabilityApi(const char * sysCap,BOOL isReg)35 int32 __attribute__((weak)) SAMGR_RegisterSystemCapabilityApi(const char *sysCap, BOOL isReg)
36 {
37 (void)sysCap;
38 (void)isReg;
39 return EC_FAILURE;
40 }
41
SAMGR_QuerySystemCapabilityApi(const char * sysCap)42 BOOL __attribute__((weak)) SAMGR_QuerySystemCapabilityApi(const char *sysCap)
43 {
44 (void)sysCap;
45 return FALSE;
46 }
47
SAMGR_GetSystemCapabilitiesApi(char sysCaps[MAX_SYSCAP_NUM][MAX_SYSCAP_NAME_LEN],int32 * size)48 int32 __attribute__((weak)) SAMGR_GetSystemCapabilitiesApi(char sysCaps[MAX_SYSCAP_NUM][MAX_SYSCAP_NAME_LEN],
49 int32 *size)
50 {
51 (void)sysCaps;
52 (void)size;
53 return EC_FAILURE;
54 }