Home
last modified time | relevance | path

Searched refs:node (Results 1 – 25 of 200) sorted by relevance

12345678

/base/security/huks/utils/list/
Dhks_double_list.c22 void InitializeDoubleList(struct DoubleList *node) in InitializeDoubleList() argument
24 if (node == NULL) { in InitializeDoubleList()
28 node->prev = node; in InitializeDoubleList()
29 node->next = node; in InitializeDoubleList()
32 void AddNodeAfterDoubleListHead(struct DoubleList *head, struct DoubleList *node) in AddNodeAfterDoubleListHead() argument
34 if ((head == NULL) || (node == NULL)) { in AddNodeAfterDoubleListHead()
42 head->next->prev = node; in AddNodeAfterDoubleListHead()
43 node->next = head->next; in AddNodeAfterDoubleListHead()
44 node->prev = head; in AddNodeAfterDoubleListHead()
45 head->next = node; in AddNodeAfterDoubleListHead()
[all …]
/base/useriam/user_auth_framework/test/fuzztest/services/servicecore_fuzzer/src/
Dschedule_node_fuzzer.cpp59 auto node = GetScheduleNode(parcel); in FuzzScheduleNodeGetScheduleId() local
60 if (node != nullptr) { in FuzzScheduleNodeGetScheduleId()
61 node->GetScheduleId(); in FuzzScheduleNodeGetScheduleId()
69 auto node = GetScheduleNode(parcel); in FuzzScheduleNodeGetContextId() local
70 if (node != nullptr) { in FuzzScheduleNodeGetContextId()
71 node->GetContextId(); in FuzzScheduleNodeGetContextId()
79 auto node = GetScheduleNode(parcel); in FuzzScheduleNodeGetAuthType() local
80 if (node != nullptr) { in FuzzScheduleNodeGetAuthType()
81 node->GetAuthType(); in FuzzScheduleNodeGetAuthType()
89 auto node = GetScheduleNode(parcel); in FuzzScheduleNodeGetExecutorMatcher() local
[all …]
Dresource_node_fuzzer.cpp106 auto node = GetResourceNode(parcel); in FuzzResourceNodeGetExecutorIndex() local
107 if (node != nullptr) { in FuzzResourceNodeGetExecutorIndex()
108 node->GetExecutorIndex(); in FuzzResourceNodeGetExecutorIndex()
116 auto node = GetResourceNode(parcel); in FuzzResourceNodeGetOwnerDeviceId() local
117 if (node != nullptr) { in FuzzResourceNodeGetOwnerDeviceId()
118 node->GetOwnerDeviceId(); in FuzzResourceNodeGetOwnerDeviceId()
126 auto node = GetResourceNode(parcel); in FuzzResourceNodeGetOwnerPid() local
127 if (node != nullptr) { in FuzzResourceNodeGetOwnerPid()
128 node->GetOwnerPid(); in FuzzResourceNodeGetOwnerPid()
136 auto node = GetResourceNode(parcel); in FuzzResourceNodeGetAuthType() local
[all …]
/base/security/certificate_manager/services/cert_manager_standard/cert_manager_engine/main/core/src/
Dcert_manager_session_mgr.c46 static void FreeSessionNode(struct CmSessionNode **node) in FreeSessionNode() argument
48 if ((node == NULL) || (*node == NULL)) { in FreeSessionNode()
52 CM_FREE_PTR((*node)->handle.data); in FreeSessionNode()
53 CM_FREE_PTR((*node)->info.uri.data); in FreeSessionNode()
54 CM_FREE_PTR(*node); in FreeSessionNode()
107 …atic int32_t ConstructSessionInfo(const struct CmSessionNodeInfo *info, struct CmSessionNode *node) in ConstructSessionInfo() argument
117 node->info.userId = info->userId; in ConstructSessionInfo()
118 node->info.uid = info->uid; in ConstructSessionInfo()
119 node->info.uri.data = data; in ConstructSessionInfo()
120 node->info.uri.size = size; in ConstructSessionInfo()
[all …]
/base/update/updater/test/unittest/utils/json/
Dutils_json_test.cpp57 JsonNode node(str);
58 EXPECT_EQ(node.Key(), std::nullopt);
59 EXPECT_EQ(node["key"].Key(), "key");
63 JsonNode node(str);
64 EXPECT_EQ(node.Key(), std::nullopt);
71 JsonNode node(str);
72 EXPECT_EQ((node["key"] == 1), false);
78 JsonNode node(str);
79 EXPECT_EQ(node["key"].Type(), NodeType::STRING);
80 EXPECT_EQ(node["key"], "value1");
[all …]
Dutils_json_visitor_test.cpp90 JsonNode node {newJsonStr}; in TestInvalidCases() local
91 EXPECT_EQ(false, Visit<SETVAL>(node[Traits<T>::STRUCT_KEY], obj)) << data.first; in TestInvalidCases()
92 EXPECT_EQ(false, Visit<SETVAL>({}, node[Traits<T>::STRUCT_KEY], obj)) << data.first; in TestInvalidCases()
98 JsonNode node {newJsonStr}; in TestInvalidCases() local
99 EXPECT_EQ(false, Visit<SETVAL>(node[Traits<T>::STRUCT_KEY], obj)) << data.first; in TestInvalidCases()
100 EXPECT_EQ(false, Visit<SETVAL>({}, node[Traits<T>::STRUCT_KEY], obj)) << data.first; in TestInvalidCases()
140 JsonNode node {dJson}; variable
142 EXPECT_EQ(Visit<SETVAL>(node["D"], d), true);
167 JsonNode node {eJson}; variable
168 EXPECT_EQ(Visit<SETVAL>(node["E"], e), true);
[all …]
/base/useriam/user_auth_framework/test/unittest/services/mocks/
Dmock_resource_node.h49 auto node = std::make_shared<MockResourceNode>(); variable
50 EXPECT_CALL(*node, GetExecutorIndex()).WillRepeatedly(Return(executorId));
51 EXPECT_CALL(*node, GetAuthType()).WillRepeatedly(Return(PIN));
52 EXPECT_CALL(*node, GetExecutorRole()).WillRepeatedly(Return(COLLECTOR));
53 EXPECT_CALL(*node, GetExecutorMatcher()).WillRepeatedly(Return(0));
54 EXPECT_CALL(*node, GetExecutorSensorHint()).WillRepeatedly(Return(0));
55 EXPECT_CALL(*node, Detach()).Times(detach ? 1 : 0);
56 return node;
63 auto node = std::make_shared<MockResourceNode>(); in CreateWithExecuteIndex() local
65 EXPECT_CALL(*node, GetExecutorIndex()).WillRepeatedly(Return(executorId)); in CreateWithExecuteIndex()
[all …]
/base/hiviewdfx/hiview/plugins/freeze_detector/
Drule_cluster.cpp91 for (xmlNode* node = root; node; node = node->next) { in ParseRuleFile() local
92 if (node->type != XML_ELEMENT_NODE) { in ParseRuleFile()
95 if (TAG_FREEZE == std::string((char*)(node->name))) { in ParseRuleFile()
96 ParseTagFreeze(node); in ParseRuleFile()
108 for (xmlNode* node = tag->children; node; node = node->next) { in ParseTagFreeze() local
109 if (TAG_RULES == std::string((char*)(node->name))) { in ParseTagFreeze()
110 ParseTagRules(node); in ParseTagFreeze()
117 for (xmlNode* node = tag->children; node; node = node->next) { in ParseTagRules() local
118 if (TAG_RULE == std::string((char*)(node->name))) { in ParseTagRules()
119 ParseTagRule(node); in ParseTagRules()
[all …]
/base/startup/init/services/utils/
Dinit_hashmap.c50 HashNode *node = (HashNode *)root; in GetHashNodeByNode() local
51 while (node != NULL) { in GetHashNodeByNode()
52 int ret = tab->nodeCompare(node, new); in GetHashNodeByNode()
54 return node; in GetHashNodeByNode()
56 node = node->next; in GetHashNodeByNode()
64 HashNode *node = (HashNode *)root; in GetHashNodeByKey() local
65 while (node != NULL) { in GetHashNodeByKey()
66 int ret = keyCompare(node, key); in GetHashNodeByKey()
68 return node; in GetHashNodeByKey()
70 node = node->next; in GetHashNodeByKey()
[all …]
/base/startup/init/services/include/
Dlist.h76 #define ListEmpty(node) ((node).next == &(node) && (node).prev == &(node)) argument
78 #define ForEachListEntry(list, node) for (node = (list)->next; node != (list); node = node->next) argument
118 typedef int (*ListCompareProc)(ListNode *node, ListNode *newNode);
141 typedef int (*ListTraversalProc)(ListNode *node, void *data);
180 typedef void (*ListDestroyProc)(ListNode *node);
/base/security/selinux/interfaces/policycoreutils/src/
Dselinux_map.c48 static int GroupNodeGetNodeHashCode(const HashNode *node) in GroupNodeGetNodeHashCode() argument
50 ParamHashNode *groupNode = HASHMAP_ENTRY(node, ParamHashNode, hashNode); in GroupNodeGetNodeHashCode()
54 static void GroupNodeFree(const HashNode *node) in GroupNodeFree() argument
56 ParamHashNode *groupNode = HASHMAP_ENTRY(node, ParamHashNode, hashNode); in GroupNodeFree()
98 int32_t HashMapAdd(HashTab *handle, HashNode *node) in HashMapAdd() argument
100 if (handle == NULL || !(node != NULL && node->next == NULL)) { in HashMapAdd()
103 int hashCode = GroupNodeGetNodeHashCode(node); in HashMapAdd()
108 HashNode *tmp = GetHashNodeByNode(handle->buckets[hashCode], node); in HashMapAdd()
112 node->next = handle->buckets[hashCode]; in HashMapAdd()
113 handle->buckets[hashCode] = node; in HashMapAdd()
[all …]
/base/startup/init/test/unittest/init/
Dgroup_unittest.cpp32 HashNode node; member
38 TestHashNode *testNode1 = HASHMAP_ENTRY(node1, TestHashNode, node); in TestHashNodeCompare()
39 TestHashNode *testNode2 = HASHMAP_ENTRY(node2, TestHashNode, node); in TestHashNodeCompare()
45 TestHashNode *testNode1 = HASHMAP_ENTRY(node1, TestHashNode, node); in TestHashKeyCompare()
49 static int TestHashNodeFunction(const HashNode *node) in TestHashNodeFunction() argument
51 TestHashNode *testNode = HASHMAP_ENTRY(node, TestHashNode, node); in TestHashNodeFunction()
71 static void TestHashNodeFree(const HashNode *node) in TestHashNodeFree() argument
73 TestHashNode *testNode = HASHMAP_ENTRY(node, TestHashNode, node); in TestHashNodeFree()
80 …TestHashNode *node = reinterpret_cast<TestHashNode *>(malloc(sizeof(TestHashNode) + strlen(value) … in TestCreateHashNode() local
81 if (node == nullptr) { in TestCreateHashNode()
[all …]
/base/update/updater/services/ui/
Dupdater_ui_config.cpp70 std::string SelectConfig(const JsonNode &node) in SelectConfig() argument
73 for (const auto &iter : node) { in SelectConfig()
104 JsonNode node { Fs::path { UI_CFG_FILE }}; in Init() local
105 const JsonNode &cfgNode = node[UI_CFG_KEY]; in Init()
131 bool UpdaterUiConfig::Init(const JsonNode &node) in Init() argument
133 static bool res = [&node] () { in Init()
134 …return LoadLangRes(node) && LoadStrategy(node) && LoadCallbacks(node) && LoadFocusCfg(node) && Loa… in Init()
149 bool UpdaterUiConfig::LoadPages(const JsonNode &node) in LoadPages() argument
152 if (!Visit<SETVAL>(node, pagePath)) { in LoadPages()
174 bool UpdaterUiConfig::LoadLangRes(const JsonNode &node) in LoadLangRes() argument
[all …]
Dupdater_ui_config.h32 static bool Init(const JsonNode &node);
33 static bool LoadStrategy(const JsonNode &node);
34 static bool LoadPages(const JsonNode &node);
35 static bool LoadLangRes(const JsonNode &node);
36 static bool LoadCallbacks(const JsonNode &node);
37 static bool LoadFocusCfg(const JsonNode &node);
/base/startup/init/services/init/standard/
Dinit_cmdexecutor.c53 OH_ListInit(&cmdExec->node); in AddCmdExecutor()
56 OH_ListAddTail(&cmd->cmdExecutor, &cmdExec->node); in AddCmdExecutor()
68 ListNode *node = cmd->cmdExecutor.next; in RemoveCmdExecutor() local
69 while (node != &cmd->cmdExecutor) { in RemoveCmdExecutor()
70 PluginCmdExecutor *cmdExec = ListEntry(node, PluginCmdExecutor, node); in RemoveCmdExecutor()
72 OH_ListRemove(&cmdExec->node); in RemoveCmdExecutor()
76 node = node->next; in RemoveCmdExecutor()
98 ListNode *node = cmd->cmdExecutor.next; in PluginExecCmd_() local
99 while (node != &cmd->cmdExecutor) { in PluginExecCmd_()
100 PluginCmdExecutor *cmdExec = ListEntry(node, PluginCmdExecutor, node); in PluginExecCmd_()
[all …]
Dinit_control_fd_service.c130 InitGroupNode *node = GetNextGroupNode(NODE_TYPE_SERVICES, NULL); in DumpAllExtData() local
131 while (node != NULL) { in DumpAllExtData()
132 if (node->data.service == NULL) { in DumpAllExtData()
133 node = GetNextGroupNode(NODE_TYPE_SERVICES, node); in DumpAllExtData()
136 DumpServiceHookExecute(node->name, cmd); in DumpAllExtData()
137 node = GetNextGroupNode(NODE_TYPE_SERVICES, node); in DumpAllExtData()
144 InitGroupNode *node = GetNextGroupNode(NODE_TYPE_SERVICES, NULL); in DumpAllServices() local
145 while (node != NULL) { in DumpAllServices()
146 if (node->data.service == NULL) { in DumpAllServices()
147 node = GetNextGroupNode(NODE_TYPE_SERVICES, node); in DumpAllServices()
[all …]
/base/startup/init/services/param/trigger/
Dtrigger_manager.c35 CommandNode *node = (CommandNode *)calloc(1, size); in AddCommand() local
36 PARAM_CHECK(node != NULL, return -1, "Failed to alloc memory for command"); in AddCommand()
37 node->cmdKeyIndex = cmdKeyIndex; in AddCommand()
38 node->next = NULL; in AddCommand()
39 node->content[0] = '\0'; in AddCommand()
41 int ret = memcpy_s(node->content, size, content, strlen(content)); in AddCommand()
42 node->content[strlen(content)] = '\0'; in AddCommand()
43 PARAM_CHECK(ret == EOK, free(node); in AddCommand()
48 trigger->firstCmd = node; in AddCommand()
49 trigger->lastCmd = node; in AddCommand()
[all …]
/base/startup/init/services/param/watcher/proxy/
Dwatcher_manager.cpp163 …TraversalNode([this, mananger, name, value](ParamWatcherListPtr list, WatcherNodePtr node, uint32_… in ProcessParameterChange() argument
164 auto remoteWatcher = mananger->GetRemoteWatcher(node->GetNodeId()); in ProcessParameterChange()
345 …remoteWatchers_->TraversalNodeSafe([this](ParamWatcherListPtr list, WatcherNodePtr node, uint32_t … in OnStop() argument
346 RemoteWatcherPtr remoteWatcher = ConvertTo<RemoteWatcher>(node); in OnStop()
370 [this, remoteWatcher](ParamWatcherListPtr list, WatcherNodePtr node, uint32_t index) { in OnRemoteDied() argument
371 auto group = GetWatcherGroup(node->GetNodeId()); in OnRemoteDied()
388 WatcherNodePtr node = remoteWatchers_->GetNextNode(nullptr); in GetRemoteWatcher() local
389 while (node != nullptr) { in GetRemoteWatcher()
390 RemoteWatcherPtr remoteWatcher = ConvertTo<RemoteWatcher>(node); in GetRemoteWatcher()
397 node = remoteWatchers_->GetNextNode(node); in GetRemoteWatcher()
[all …]
/base/startup/init/services/param/adapter/
Dparam_selinux.c152 ParamNode *node = GetParamNode(WORKSPACE_NAME_DAC, name); in GetWorkSpaceSize() local
153 if (node == NULL) { in GetWorkSpaceSize()
160 …int ret = ParamMemcpy(name, sizeof(name) - 1, node->data + node->keyLength + 1, node->valueLength); in GetWorkSpaceSize()
162 name[node->valueLength] = '\0'; in GetWorkSpaceSize()
175 ParamContextsList *node = head; in SelinuxGetAllLabel() local
178 while (node != NULL) { in SelinuxGetAllLabel()
179 … PARAM_LOGV("SelinuxGetAllLabel name %s content %s", node->info.paraName, node->info.paraContext); in SelinuxGetAllLabel()
180 if (node->info.paraContext == NULL || node->info.paraName == NULL) { in SelinuxGetAllLabel()
181 node = node->next; in SelinuxGetAllLabel()
184 …int ret = AddWorkSpace(node->info.paraContext, readOnly, GetWorkSpaceSize(node->info.paraContext)); in SelinuxGetAllLabel()
[all …]
/base/useriam/user_auth_framework/test/unittest/services/src/
Dresource_node_test.cpp58 auto node = ResourceNode::MakeNewResource(info, nullptr, templateIdList, fwkPublicKey); variable
59 EXPECT_EQ(node, nullptr);
73 auto node = ResourceNode::MakeNewResource(info, nullptr, templateIdList, fwkPublicKey); variable
74 ASSERT_NE(node, nullptr);
76 EXPECT_EQ(node->GetExecutorIndex(), DEST_EXECUTOR_INDEX);
104 auto node = ResourceNode::MakeNewResource(info, nullptr, templateIdList, fwkPublicKey); variable
106 ASSERT_NE(node, nullptr);
108 EXPECT_EQ(node->GetExecutorIndex(), DEST_EXECUTOR_INDEX);
125 auto node = ResourceNode::MakeNewResource(info, testCallback, templateIdList, fwkPublicKey); variable
126 EXPECT_NE(node, nullptr);
[all …]
/base/update/updater/utils/json/
Djson_visitor.h47 …static bool VisitStruct(const JsonNode &node, const JsonNode &defaultNode, T &t, std::index_sequen… in VisitStruct()
53 node[key], defaultNode[key], FthMember, key)) { in VisitStruct()
60 return VisitStruct(node, defaultNode, t, std::index_sequence<R...> {}); in VisitStruct()
69 …static bool VisitMember(const JsonNode &node, const JsonNode &defaultNode, T &obj, const char *key)
71 auto r = node.As<T>();
89 …static auto VisitMember(const JsonNode &node, const JsonNode &defaultNode, T &obj, const char *key)
91 …if ((node.Type() != NodeType::UNKNOWN && node.Type() != NodeType::NUL && node.Type() != NodeType::…
98 for (auto &subNode : node) {
117 …static bool VisitMember(const JsonNode &node, const JsonNode &defaultNode, T &obj, const char *key)
119 return StructVisitor<SETVAL>::VisitStruct(node, defaultNode, obj,
[all …]
/base/startup/init/services/modules/init_hook/
Dinit_hook.c28 static int ServiceExtDataCompareProc(ListNode *node, void *data) in ServiceExtDataCompareProc() argument
30 ServiceExtData *item = ListEntry(node, ServiceExtData, node); in ServiceExtDataCompareProc()
39 ListNode *node = OH_ListFind(&service->extDataNode, (void *)&id, ServiceExtDataCompareProc); in GetServiceExtData_() local
40 return (ServiceExtData *)node; in GetServiceExtData_()
53 OH_ListInit(&extData->node); in AddServiceExtData()
58 OH_ListAddTail(&service->extDataNode, &extData->node); in AddServiceExtData()
62 OH_ListAddTail(&service->extDataNode, &extData->node); in AddServiceExtData()
77 OH_ListRemove(&extData->node); in DelServiceExtData()
131 InitGroupNode *node = GetNextGroupNode(NODE_TYPE_SERVICES, NULL); in CmdClear() local
132 while (node != NULL) { in CmdClear()
[all …]
/base/startup/init/services/param/base/
Dparam_comm.c57 HashNode *node = OH_HashMapGet(paramSpace->workSpaceHashHandle, (const void *)tmpName); in GetWorkSpace() local
58 if (node != NULL) { in GetWorkSpace()
59 space = HASHMAP_ENTRY(node, WorkSpace, hashNode); in GetWorkSpace()
65 static int CompareIndex(const HashNode *node, const void *key) in CompareIndex() argument
67 WorkSpace *workSpace = HASHMAP_ENTRY(node, WorkSpace, hashNode); in CompareIndex()
86 …HashNode *node = OH_HashMapFind(paramSpace->workSpaceHashHandle, hashCode, (const void *)&index, C… in GetTrieNodeByHandle() local
87 if (node == NULL) { in GetTrieNodeByHandle()
92 WorkSpace *workSpace = HASHMAP_ENTRY(node, WorkSpace, hashNode); in GetTrieNodeByHandle()
108 ListNode *node = paramSpace->workSpaceList.next; in GetFirstWorkSpace() local
109 if (node != &paramSpace->workSpaceList) { in GetFirstWorkSpace()
[all …]
/base/security/permission_lite/services/pms/src/
Dperm_operate.c41 int ModifyPermission(TNode *node, const char *permission, const enum IsGranted granted) in ModifyPermission() argument
43 if (node == NULL || permission == NULL) { in ModifyPermission()
47 for (int i = 0; i < node->permNum; i++) { in ModifyPermission()
48 if (strcmp(node->permList[i].name, permission) == 0) { in ModifyPermission()
49 node->permList[i].granted = granted; in ModifyPermission()
56 void AddTask(TList *list, TNode *node) in AddTask() argument
59 list->head = node; in AddTask()
61 node->next = list->head; in AddTask()
62 list->head = node; in AddTask()
/base/security/device_security_level/baselib/utils/src/
Dutils_state_machine.c43 const StateNode *node = nodes + i; in GetScheduleStateNode() local
44 if ((node->state == state) && (node->event == event)) { in GetScheduleStateNode()
45 return node; in GetScheduleStateNode()
92 const StateNode *node = GetScheduleStateNode(nodes, nodeCnt, state, event); in ScheduleMachine() local
93 if (node != NULL) { in ScheduleMachine()
95 if (node->process != NULL) { in ScheduleMachine()
97 result = node->process(machine, event, para); in ScheduleMachine()
100 machine->currState = (result == true) ? node->nextStateT : node->nextStateF; in ScheduleMachine()

12345678