gwenhywfar 5.12.1
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
30
31#include <time.h>
32#include <inttypes.h>
33
34
35
37
39
40
43
46
47
50
53
56
59
62
63
64
65
67GWEN_MEMCACHE *GWEN_MemCache_new(size_t maxCacheMemory,
68 uint32_t maxCacheEntries);
69
72
73
84 uint32_t id);
85
95 uint32_t id,
96 void *dataPtr,
97 size_t dataLen);
98
109 uint32_t id);
110
118 uint32_t id, uint32_t mask);
119
127
128
129
130
131
132#endif
#define GWENHYWFAR_API
GWENHYWFAR_API void GWEN_MemCache_PurgeEntry(GWEN_MEMCACHE *mc, uint32_t id)
GWENHYWFAR_API GWEN_MEMCACHE_ENTRY * GWEN_MemCache_CreateEntry(GWEN_MEMCACHE *mc, uint32_t id, void *dataPtr, size_t dataLen)
struct GWEN_MEMCACHE_ENTRY GWEN_MEMCACHE_ENTRY
Definition memcache.h:36
GWENHYWFAR_API void GWEN_MemCacheEntry_free(GWEN_MEMCACHE_ENTRY *me)
GWENHYWFAR_API size_t GWEN_MemCacheEntry_GetDataLen(GWEN_MEMCACHE_ENTRY *me)
GWENHYWFAR_API GWEN_MEMCACHE * GWEN_MemCache_new(size_t maxCacheMemory, uint32_t maxCacheEntries)
GWENHYWFAR_API void GWEN_MemCache_free(GWEN_MEMCACHE *mc)
GWENHYWFAR_API int GWEN_MemCacheEntry_GetIsValid(const GWEN_MEMCACHE_ENTRY *me)
GWENHYWFAR_API void GWEN_MemCacheEntry_EndUse(GWEN_MEMCACHE_ENTRY *me)
GWENHYWFAR_API void GWEN_MemCache_PurgeEntries(GWEN_MEMCACHE *mc, uint32_t id, uint32_t mask)
GWENHYWFAR_API uint32_t GWEN_MemCacheEntry_GetId(GWEN_MEMCACHE_ENTRY *me)
GWENHYWFAR_API void * GWEN_MemCacheEntry_GetDataPtr(GWEN_MEMCACHE_ENTRY *me)
GWENHYWFAR_API GWEN_MEMCACHE_ENTRY * GWEN_MemCache_FindEntry(GWEN_MEMCACHE *mc, uint32_t id)
GWENHYWFAR_API void GWEN_MemCache_Purge(GWEN_MEMCACHE *mc)
GWENHYWFAR_API void GWEN_MemCacheEntry_BeginUse(GWEN_MEMCACHE_ENTRY *me)
struct GWEN_MEMCACHE GWEN_MEMCACHE
Definition memcache.h:38