• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 2022 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 
16 #ifndef HC_DEV_INFO_MOCK_H
17 #define HC_DEV_INFO_MOCK_H
18 
19 #include <stdint.h>
20 #include <stdbool.h>
21 
22 #ifdef __cplusplus
23 extern "C" {
24 #endif
25 
26 #define INPUT_UDID_LEN 65
27 #define MAX_INPUT_UDID_LEN 200
28 #define MAX_SESSION_COUNT 30
29 
30 /*
31  * Get the unique device ID of the device(UDID).
32  * udid: It is used to store the UDID finally obtained.
33  * udidLen: The size of array to store UDID. Its value is the real udid size + 1 (including '\0').
34  *          In liteos and linux, the udidLen must be 65.
35  * Return 0 if the UDID is successfully obtained, other returns an error code.
36  */
37 int32_t HcGetUdid(uint8_t *udid, int32_t udidLen);
38 
39 const char *GetStoragePath(void);
40 const char *GetStorageDirPath(void);
41 const char *GetAccountStoragePath(void);
42 const char *GetPseudonymStoragePath(void);
43 
44 void SetDeviceStatus(bool isClient);
45 void SetAccountStorageTest(bool isAccountStorageTest);
46 
47 #ifdef __cplusplus
48 }
49 #endif
50 #endif