gwenhywfar
4.6.0beta
Main Page
Related Pages
Modules
Data Structures
Files
File List
Globals
src
base
multicache.h
Go to the documentation of this file.
1
/***************************************************************************
2
begin : Wed May 08 2013
3
copyright : (C) 2013 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
33
34
#ifdef __cplusplus
35
extern
"C"
{
36
#endif
37
56
57
58
typedef
struct
GWEN_MULTICACHE
GWEN_MULTICACHE
;
59
typedef
struct
GWEN_MULTICACHE_TYPE
GWEN_MULTICACHE_TYPE
;
60
61
62
typedef
int
GWENHYWFAR_CB
(*
GWEN_MULTICACHE_TYPE_ATTACH_FN
)(
void
*p);
63
typedef
int
GWENHYWFAR_CB
(*
GWEN_MULTICACHE_TYPE_FREE_FN
)(
void
*p);
64
65
66
73
74
GWENHYWFAR_API
GWEN_MULTICACHE_TYPE
*
GWEN_MultiCache_Type_new
(
GWEN_MULTICACHE
*mc);
75
76
GWENHYWFAR_API
void
GWEN_MultiCache_Type_free
(
GWEN_MULTICACHE_TYPE
*ct);
77
78
GWENHYWFAR_API
void
*
GWEN_MultiCache_Type_GetData
(
const
GWEN_MULTICACHE_TYPE
*ct, uint32_t
id
);
79
GWENHYWFAR_API
void
*
GWEN_MultiCache_Type_GetDataWithParams
(
const
GWEN_MULTICACHE_TYPE
*ct, uint32_t
id
,
80
uint32_t param1, uint32_t param2, uint32_t param3, uint32_t param4);
81
82
GWENHYWFAR_API
void
GWEN_MultiCache_Type_SetData
(
GWEN_MULTICACHE_TYPE
*ct, uint32_t
id
,
void
*ptr, uint32_t size);
83
GWENHYWFAR_API
void
GWEN_MultiCache_Type_SetDataWithParams
(
GWEN_MULTICACHE_TYPE
*ct, uint32_t
id
,
void
*ptr, uint32_t size,
84
uint32_t param1, uint32_t param2, uint32_t param3, uint32_t param4);
85
86
GWENHYWFAR_API
void
GWEN_MultiCache_Type_PurgeData
(
GWEN_MULTICACHE_TYPE
*ct, uint32_t
id
);
87
88
GWENHYWFAR_API
void
GWEN_MultiCache_Type_PurgeAll
(
GWEN_MULTICACHE_TYPE
*ct);
89
90
91
GWENHYWFAR_API
void
GWEN_MultiCache_Type_SetAttachFn
(
GWEN_MULTICACHE_TYPE
*ct,
GWEN_MULTICACHE_TYPE_ATTACH_FN
fn);
92
93
GWENHYWFAR_API
void
GWEN_MultiCache_Type_SetFreeFn
(
GWEN_MULTICACHE_TYPE
*ct,
GWEN_MULTICACHE_TYPE_FREE_FN
fn);
94
104
GWENHYWFAR_API
GWEN_MULTICACHE
*
GWEN_MultiCache_new
(uint64_t maxSize);
105
106
GWENHYWFAR_API
void
GWEN_MultiCache_free
(
GWEN_MULTICACHE
*mc);
107
108
109
GWENHYWFAR_API
uint64_t
GWEN_MultiCache_GetMaxSizeUsed
(
const
GWEN_MULTICACHE
*mc);
110
116
117
118
119
#ifdef __cplusplus
120
}
121
#endif
122
123
124
125
126
#endif
127
Generated on Wed May 29 2013 05:31:48 for gwenhywfar by
1.8.3.1