2 * Object-private include file for reactos Cache Manager (Cc*) SharedCacheMap structure of libcaptive
3 * Copyright (C) 2003 Jan Kratochvil <project-captive@jankratochvil.net>
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; exactly version 2 of June 1991 is required
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 #ifndef _CAPTIVE_CC_SHARED_CACHE_MAP_PRIV_H
21 #define _CAPTIVE_CC_SHARED_CACHE_MAP_PRIV_H 1
24 #include <glib/gmacros.h>
25 #include <glib-object.h>
26 #include "reactos/ddk/cctypes.h"
27 #include "privatebcbmap.h"
32 typedef struct _CaptiveSharedCacheMapObject_page CaptiveSharedCacheMapObject_page;
34 struct _CaptiveSharedCacheMapObject_page {
37 gint64 lsn_oldest,lsn_newest;
40 struct _CaptiveSharedCacheMapObject {
41 GObject parent_instance;
44 FILE_OBJECT *FileObject;
45 SECTION_OBJECT_POINTERS *SectionObjectPointers;
46 /* ValidDataLength<=FileSize<=AllocationSize */
47 guint64 AllocationSize; /* ==CC_FILE_SIZES.AllocationSize.QuadPart */
48 guint64 FileSize; /* ==CC_FILE_SIZES.FileSize.QuadPart */
49 guint64 ValidDataLength; /* ==CC_FILE_SIZES.ValidDataLength.QuadPart */
50 CACHE_MANAGER_CALLBACKS CallBacks;
51 VOID *LazyWriterContext;
53 CaptivePrivateBcbMapObject *map;
54 GHashTable *pin_hash; /* map: (guint64 *) -> (CaptivePrivateBcbPinObject *) */
55 gboolean LogHandle_set;
56 gboolean FlushToLsnRoutine_set;
58 gpointer buffer; /* FileOffset 0 based */
59 CaptiveSharedCacheMapObject_page *pages; /* FileOffset 0 based, item corresponds to 'buffer' PAGE_SIZE */
61 struct _CaptiveSharedCacheMapObjectClass {
62 GObjectClass parent_class;
64 void (*FileSizes_changed)(CaptiveSharedCacheMapObject *captive_shared_cache_map_object,
65 guint64 AllocationSize,guint64 FileSize,guint64 ValidDataLength);
66 void (*purge)(CaptiveSharedCacheMapObject *captive_shared_cache_map_object);
72 #endif /* _CAPTIVE_CC_SHARED_CACHE_MAP_PRIV_H */