Lines Matching defs:queue

52 int AddSandboxPermissionNode(const char *name, SandboxQueue *queue)
54 APPSPAWN_CHECK_ONLY_EXPER(name != NULL && queue != NULL, return APPSPAWN_ARG_INVALID);
56 if (GetPermissionNodeInQueue(queue, name) != NULL) {
66 OH_ListAddWithOrder(&queue->front, &node->section.sandboxNode.node, PermissionNodeCompareProc);
76 OH_ListAddWithOrder(&queue->front, &node->sandboxNode.node, PermissionNodeCompareProc);
81 int32_t DeleteSandboxPermissions(SandboxQueue *queue)
83 APPSPAWN_CHECK_ONLY_EXPER(queue != NULL, return APPSPAWN_ARG_INVALID);
84 ListNode *node = queue->front.next;
85 while (node != &queue->front) {
95 node = queue->front.next;
100 int32_t PermissionRenumber(SandboxQueue *queue)
102 APPSPAWN_CHECK_ONLY_EXPER(queue != NULL, return -1);
103 ListNode *node = queue->front.next;
105 while (node != &queue->front) {
120 const SandboxPermissionNode *GetPermissionNodeInQueue(SandboxQueue *queue, const char *permission)
122 if (queue == NULL || permission == NULL) {
125 ListNode *node = OH_ListFind(&queue->front, (void *)permission, PermissionNodeCompareName);
132 const SandboxPermissionNode *GetPermissionNodeInQueueByIndex(SandboxQueue *queue, int32_t index)
134 if (queue == NULL) {
137 ListNode *node = OH_ListFind(&queue->front, (void *)&index, PermissionNodeCompareIndex);
144 int32_t GetPermissionIndexInQueue(SandboxQueue *queue, const char *permission)
146 APPSPAWN_CHECK_ONLY_EXPER(queue != NULL && permission != NULL, return INVALID_PERMISSION_INDEX);
147 const SandboxPermissionNode *permissionNode = GetPermissionNodeInQueue(queue, permission);