• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2025 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 LNN_LOCAL_NET_LEDGER_STRUCT_H
17 #define LNN_LOCAL_NET_LEDGER_STRUCT_H
18 
19 #include <stdint.h>
20 
21 #include "bus_center_info_key_struct.h"
22 
23 #ifdef __cplusplus
24 extern "C" {
25 #endif
26 
27 typedef enum {
28     LL_INIT_UNKNOWN = 0,
29     LL_INIT_FAIL,
30     LL_INIT_SUCCESS,
31 } LocalLedgerStatus;
32 
33 typedef struct {
34     InfoKey key;
35     int32_t maxLen;
36     int32_t (*getInfo)(void *info, uint32_t len);
37     int32_t (*setInfo)(const void *info);
38 } LocalLedgerKey;
39 
40 typedef struct {
41     InfoKey key;
42     int32_t maxLen;
43     int32_t (*getInfo)(void *info, uint32_t len, int32_t ifnameIdx);
44     int32_t (*setInfo)(const void *info, int32_t ifnameIdx);
45 } LocalLedgerKeyByIfname;
46 
47 typedef enum {
48     UPDATE_ACCOUNT_LONG = 1,
49     UPDATE_DEV_NAME = 2,
50     UPDATE_DEV_UNIFIED_NAME = 4,
51     UPDATE_DEV_UNIFIED_DEFAULT_NAME = 8,
52     UPDATE_DEV_NICK_NAME = 16,
53     UPDATE_NETWORKID = 32,
54     UPDATE_CONCURRENT_AUTH = 64,
55     UPDATE_CIPHERKEY = 128,
56     UPDATE_SLE_CAP = 256,
57 } StateVersionChangeReason;
58 
59 #ifdef __cplusplus
60 }
61 #endif
62 
63 #endif // LNN_LOCAL_NET_LEDGER_STRUCT_H