gwenhywfar
4.10.0beta
Main Page
Related Pages
Modules
Data Structures
Files
File List
Globals
gwenhywfar4
gwenhywfar
memcache.h
Go to the documentation of this file.
1
/***************************************************************************
2
begin : Mon Jul 14 2008
3
copyright : (C) 2008 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
#ifndef GWENHYWFAR_MEMCACHE_H
26
#define GWENHYWFAR_MEMCACHE_H
27
28
29
#include <
gwenhywfar/gwenhywfarapi.h
>
30
31
#include <time.h>
32
#include <inttypes.h>
33
34
35
36
typedef
struct
GWEN_MEMCACHE_ENTRY
GWEN_MEMCACHE_ENTRY
;
37
38
typedef
struct
GWEN_MEMCACHE
GWEN_MEMCACHE
;
39
40
41
GWENHYWFAR_API
42
void
GWEN_MemCacheEntry_free
(
GWEN_MEMCACHE_ENTRY
*me);
43
44
GWENHYWFAR_API
45
uint32_t
GWEN_MemCacheEntry_GetId
(
GWEN_MEMCACHE_ENTRY
*me);
46
47
48
GWENHYWFAR_API
49
void
*
GWEN_MemCacheEntry_GetDataPtr
(
GWEN_MEMCACHE_ENTRY
*me);
50
51
GWENHYWFAR_API
52
size_t
GWEN_MemCacheEntry_GetDataLen
(
GWEN_MEMCACHE_ENTRY
*me);
53
54
GWENHYWFAR_API
55
int
GWEN_MemCacheEntry_GetIsValid
(
const
GWEN_MEMCACHE_ENTRY
*me);
56
57
GWENHYWFAR_API
58
void
GWEN_MemCacheEntry_BeginUse
(
GWEN_MEMCACHE_ENTRY
*me);
59
60
GWENHYWFAR_API
61
void
GWEN_MemCacheEntry_EndUse
(
GWEN_MEMCACHE_ENTRY
*me);
62
63
64
65
66
GWENHYWFAR_API
67
GWEN_MEMCACHE
*
GWEN_MemCache_new
(
size_t
maxCacheMemory,
68
uint32_t maxCacheEntries);
69
70
GWENHYWFAR_API
71
void
GWEN_MemCache_free
(
GWEN_MEMCACHE
*mc);
72
73
82
GWENHYWFAR_API
83
GWEN_MEMCACHE_ENTRY
*
GWEN_MemCache_FindEntry
(
GWEN_MEMCACHE
*mc,
84
uint32_t
id
);
85
93
GWENHYWFAR_API
94
GWEN_MEMCACHE_ENTRY
*
GWEN_MemCache_CreateEntry
(
GWEN_MEMCACHE
*mc,
95
uint32_t
id
,
96
void
*dataPtr,
97
size_t
dataLen);
98
107
GWENHYWFAR_API
108
void
GWEN_MemCache_PurgeEntry
(
GWEN_MEMCACHE
*mc,
109
uint32_t
id
);
110
116
GWENHYWFAR_API
117
void
GWEN_MemCache_PurgeEntries
(
GWEN_MEMCACHE
*mc,
118
uint32_t
id
, uint32_t mask);
119
125
GWENHYWFAR_API
126
void
GWEN_MemCache_Purge
(
GWEN_MEMCACHE
*mc);
127
128
129
130
131
132
#endif
Generated on Tue Feb 11 2014 11:09:43 for gwenhywfar by
1.8.1.2