1 /*
2 * Copyright (c) 2022 FuZhou Lockzhiner Electronic Co., Ltd. All rights reserved.
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
16 #include "hal_hota_board.h"
17
HotaHalInit(void)18 int HotaHalInit(void)
19 {
20 return OHOS_SUCCESS;
21 }
22
HotaHalDeInit(void)23 int HotaHalDeInit(void)
24 {
25 return OHOS_FAILURE;
26 }
27
HotaHalGetUpdateIndex(unsigned int * index)28 int HotaHalGetUpdateIndex(unsigned int *index)
29 {
30 return OHOS_SUCCESS;
31 }
HotaHalWrite(int partition,unsigned char * buffer,unsigned int offset,unsigned int bufLen)32 int HotaHalWrite(int partition, unsigned char *buffer, unsigned int offset, unsigned int bufLen)
33 {
34 return OHOS_SUCCESS;
35 }
36
HotaHalRead(int partition,unsigned int offset,unsigned int bufLen,unsigned char * buffer)37 int HotaHalRead(int partition, unsigned int offset, unsigned int bufLen, unsigned char *buffer)
38 {
39 return OHOS_FAILURE;
40 }
41
HotaHalSetBootSettings(void)42 int HotaHalSetBootSettings(void)
43 {
44 return OHOS_SUCCESS;
45 }
46
HotaHalRestart(void)47 int HotaHalRestart(void)
48 {
49 return OHOS_SUCCESS;
50 }
51
HotaHalRollback(void)52 int HotaHalRollback(void)
53 {
54 return OHOS_SUCCESS;
55 }
56
HotaHalGetPartitionInfo()57 const ComponentTableInfo *HotaHalGetPartitionInfo()
58 {
59 return NULL;
60 }
61
HotaHalGetPubKey(unsigned int * length)62 unsigned char *HotaHalGetPubKey(unsigned int *length)
63 {
64 return NULL;
65 }
66
HotaHalGetUpdateAbility(void)67 int HotaHalGetUpdateAbility(void)
68 {
69 return 0;
70 }
71
HotaHalGetOtaPkgPath(char * path,int len)72 int HotaHalGetOtaPkgPath(char *path, int len)
73 {
74 return 0;
75 }
76
HotaHalIsDeviceCanReboot(void)77 int HotaHalIsDeviceCanReboot(void)
78 {
79 return 1;
80 }
81
HotaHalGetMetaData(UpdateMetaData * metaData)82 int HotaHalGetMetaData(UpdateMetaData *metaData)
83 {
84 return OHOS_SUCCESS;
85 }
86
HotaHalSetMetaData(UpdateMetaData * metaData)87 int HotaHalSetMetaData(UpdateMetaData *metaData)
88 {
89 return 0;
90 }
91
HotaHalRebootAndCleanUserData(void)92 int HotaHalRebootAndCleanUserData(void)
93 {
94 return 0;
95 }
96
HotaHalRebootAndCleanCache(void)97 int HotaHalRebootAndCleanCache(void)
98 {
99 return 0;
100 }
101
HotaHalCheckVersionValid(const char * currentVersion,const char * pkgVersion,unsigned int pkgVersionLength)102 int HotaHalCheckVersionValid(const char *currentVersion, const char *pkgVersion, unsigned int pkgVersionLength)
103 {
104 return 1;
105 }
106
107