gwenhywfar  5.11.1beta
multicache.h
Go to the documentation of this file.
1 /***************************************************************************
2  begin : Wed May 08 2013
3  copyright : (C) 2020 by Martin Preuss
4  email : martin@libchipcard.de
5 
6  ***************************************************************************
7  * *
8  * This library is free software; you can redistribute it and/or *
9  * modify it under the terms of the GNU Lesser General Public *
10  * License as published by the Free Software Foundation; either *
11  * version 2.1 of the License, or (at your option) any later version. *
12  * *
13  * This library is distributed in the hope that it will be useful, *
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
16  * Lesser General Public License for more details. *
17  * *
18  * You should have received a copy of the GNU Lesser General Public *
19  * License along with this library; if not, write to the Free Software *
20  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, *
21  * MA 02111-1307 USA *
22  * *
23  ***************************************************************************/
24 
25 
26 #ifndef GWENHYWFAR_MULTICACHE_H
27 #define GWENHYWFAR_MULTICACHE_H
28 
29 
30 #include <gwenhywfar/list1.h>
31 #include <gwenhywfar/misc.h>
32 #include <gwenhywfar/idlist64.h>
33 
34 
35 #ifdef __cplusplus
36 extern "C" {
37 #endif
38 
57 
58 
59 typedef struct GWEN_MULTICACHE GWEN_MULTICACHE;
61 
62 
65 
68 
69 
70 
77 
79 
81 
84  uint32_t param1, uint32_t param2, uint32_t param3, uint32_t param4);
85 
87  uint32_t param1, uint32_t param2, uint32_t param3, uint32_t param4,
88  double param5);
89 
90 GWENHYWFAR_API void GWEN_MultiCache_Type_SetData(GWEN_MULTICACHE_TYPE *ct, uint32_t id, void *ptr, uint32_t size);
92  uint32_t size,
93  uint32_t param1, uint32_t param2, uint32_t param3, uint32_t param4);
94 
96  uint32_t size,
97  uint32_t param1, uint32_t param2, uint32_t param3, uint32_t param4,
98  double param5);
99 
101 
103 
104 
106 
107 
109 
111 
112 
115 
118 
129 
131 
132 
134 
135 GWENHYWFAR_API int GWEN_MultiCache_GetUsageString(const GWEN_MULTICACHE *mc, char *ptrBuffer, int lenBuffer);
136 
142 
143 
144 
145 #ifdef __cplusplus
146 }
147 #endif
148 
149 
150 
151 
152 #endif
153 
#define GWENHYWFAR_API
Definition: gwenhywfarapi.h:67
#define GWENHYWFAR_CB
Definition: gwenhywfarapi.h:89
GWEN_SIMPLEPTRLIST GWEN_IDLIST64
Definition: idlist64.h:42
GWENHYWFAR_API void * GWEN_MultiCache_Type_GetDataWithParams(const GWEN_MULTICACHE_TYPE *ct, uint32_t id, uint32_t param1, uint32_t param2, uint32_t param3, uint32_t param4)
GWENHYWFAR_API void GWEN_MultiCache_Type_SetDataWithParams5(GWEN_MULTICACHE_TYPE *ct, uint32_t id, void *ptr, uint32_t size, uint32_t param1, uint32_t param2, uint32_t param3, uint32_t param4, double param5)
GWENHYWFAR_API uint64_t GWEN_MultiCache_GetMaxSizeUsed(const GWEN_MULTICACHE *mc)
struct GWEN_MULTICACHE GWEN_MULTICACHE
Definition: multicache.h:59
GWENHYWFAR_API void GWEN_MultiCache_Type_PurgeData(GWEN_MULTICACHE_TYPE *ct, uint32_t id)
GWENHYWFAR_API void GWEN_MultiCache_Type_SetAttachObjectFn(GWEN_MULTICACHE_TYPE *ct, GWEN_MULTICACHE_TYPE_ATTACH_OBJECT_FN fn)
int GWENHYWFAR_CB(* GWEN_MULTICACHE_TYPE_ATTACH_FN)(void *p)
Definition: multicache.h:63
GWENHYWFAR_API GWEN_MULTICACHE * GWEN_MultiCache_new(uint64_t maxSize)
GWENHYWFAR_API void GWEN_MultiCache_Type_SetFreeObjectFn(GWEN_MULTICACHE_TYPE *ct, GWEN_MULTICACHE_TYPE_FREE_OBJECT_FN fn)
struct GWEN_MULTICACHE_TYPE GWEN_MULTICACHE_TYPE
Definition: multicache.h:60
GWENHYWFAR_API void GWEN_MultiCache_free(GWEN_MULTICACHE *mc)
GWENHYWFAR_API void GWEN_MultiCache_Type_SetAttachFn(GWEN_MULTICACHE_TYPE *ct, GWEN_MULTICACHE_TYPE_ATTACH_FN fn)
int GWENHYWFAR_CB(* GWEN_MULTICACHE_TYPE_ATTACH_OBJECT_FN)(const GWEN_MULTICACHE_TYPE *ct, void *p)
Definition: multicache.h:66
GWENHYWFAR_API void * GWEN_MultiCache_Type_GetDataWithParams5(const GWEN_MULTICACHE_TYPE *ct, uint32_t id, uint32_t param1, uint32_t param2, uint32_t param3, uint32_t param4, double param5)
GWENHYWFAR_API void GWEN_MultiCache_Type_free(GWEN_MULTICACHE_TYPE *ct)
GWENHYWFAR_API void * GWEN_MultiCache_Type_GetData(const GWEN_MULTICACHE_TYPE *ct, uint32_t id)
GWENHYWFAR_API int GWEN_MultiCache_GetUsageString(const GWEN_MULTICACHE *mc, char *ptrBuffer, int lenBuffer)
GWENHYWFAR_API GWEN_MULTICACHE_TYPE * GWEN_MultiCache_Type_new(GWEN_MULTICACHE *mc)
GWENHYWFAR_API void GWEN_MultiCache_Type_SetFreeFn(GWEN_MULTICACHE_TYPE *ct, GWEN_MULTICACHE_TYPE_FREE_FN fn)
int GWENHYWFAR_CB(* GWEN_MULTICACHE_TYPE_FREE_OBJECT_FN)(const GWEN_MULTICACHE_TYPE *ct, void *p)
Definition: multicache.h:67
GWENHYWFAR_API GWEN_IDLIST64 * GWEN_MultiCache_Type_GetIdsInCache(const GWEN_MULTICACHE_TYPE *ct)
GWENHYWFAR_API void GWEN_MultiCache_Type_PurgeAll(GWEN_MULTICACHE_TYPE *ct)
int GWENHYWFAR_CB(* GWEN_MULTICACHE_TYPE_FREE_FN)(void *p)
Definition: multicache.h:64
GWENHYWFAR_API void GWEN_MultiCache_Type_SetData(GWEN_MULTICACHE_TYPE *ct, uint32_t id, void *ptr, uint32_t size)
GWENHYWFAR_API void GWEN_MultiCache_Type_SetDataWithParams(GWEN_MULTICACHE_TYPE *ct, uint32_t id, void *ptr, uint32_t size, uint32_t param1, uint32_t param2, uint32_t param3, uint32_t param4)