Hybrid ICN (hICN) plugin  v21.06-rc0-4-g18fa668
listLRU.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2017-2019 Cisco and/or its affiliates.
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 
29 #ifndef listLRU_h
30 #define listLRU_h
31 
32 struct list_lru_entry;
33 typedef struct list_lru_entry ListLruEntry;
34 
35 struct list_lru;
36 typedef struct list_lru ListLru;
37 
42 void listLRU_EntryDestroy(ListLruEntry **entryPtr);
43 
48 void listLRU_EntryMoveToHead(ListLruEntry *entry);
49 
54 void *listLRU_EntryGetData(ListLruEntry *entry);
55 
60 ListLru *listLRU_Create();
61 
66 void listLRU_Destroy(ListLru **listPtr);
67 
74 size_t listLRU_Length(const ListLru *lru);
75 
81 ListLruEntry *listLRU_NewHeadEntry(ListLru *lru, void *data);
82 
93 ListLruEntry *listLRU_PopTail(ListLru *list);
94 #endif // listLRU_h
listLRU_Create
ListLru * listLRU_Create()
listLRU_Destroy
void listLRU_Destroy(ListLru **listPtr)
listLRU_NewHeadEntry
ListLruEntry * listLRU_NewHeadEntry(ListLru *lru, void *data)
listLRU_EntryDestroy
void listLRU_EntryDestroy(ListLruEntry **entryPtr)
listLRU_PopTail
ListLruEntry * listLRU_PopTail(ListLru *list)
listLRU_EntryGetData
void * listLRU_EntryGetData(ListLruEntry *entry)
listLRU_EntryMoveToHead
void listLRU_EntryMoveToHead(ListLruEntry *entry)
listLRU_Length
size_t listLRU_Length(const ListLru *lru)