captive_private_bcb_pin_object_get_ref(): Invalidate 'map'ped data optionally.
[captive.git] / src / libcaptive / cc / privatebcbpin.h
1 /* $Id$
2  * Include file for reactos Cache Manager (Cc*) PrivateBcbPin structure of libcaptive
3  * Copyright (C) 2003 Jan Kratochvil <project-captive@jankratochvil.net>
4  * 
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
8  * 
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.
13  * 
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
17  */
18
19
20 #ifndef _CAPTIVE_CC_PRIVATE_BCB_PIN_H
21 #define _CAPTIVE_CC_PRIVATE_BCB_PIN_H 1
22
23
24 #include <glib/gmacros.h>
25 #include <glib-object.h>
26 #include "sharedcachemap.h"
27
28
29 G_BEGIN_DECLS
30
31 #define CAPTIVE_PRIVATE_BCB_PIN_TYPE_OBJECT            (captive_private_bcb_pin_object_get_type())
32 #define CAPTIVE_PRIVATE_BCB_PIN_OBJECT(object)         (G_TYPE_CHECK_INSTANCE_CAST((object),CAPTIVE_PRIVATE_BCB_PIN_TYPE_OBJECT,CaptivePrivateBcbPinObject))
33 #define CAPTIVE_PRIVATE_BCB_PIN_OBJECT_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST((klass),CAPTIVE_PRIVATE_BCB_PIN_TYPE_OBJECT,CaptivePrivateBcbPinObjectClass))
34 #define CAPTIVE_PRIVATE_BCB_PIN_IS_OBJECT(object)      (G_TYPE_CHECK_INSTANCE_TYPE((object),CAPTIVE_PRIVATE_BCB_PIN_TYPE_OBJECT))
35 #define CAPTIVE_PRIVATE_BCB_PIN_IS_OBJECT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass),CAPTIVE_PRIVATE_BCB_PIN_TYPE_OBJECT))
36 #define CAPTIVE_PRIVATE_BCB_PIN_OBJECT_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS((obj),CAPTIVE_PRIVATE_BCB_PIN_TYPE_OBJECT,CaptivePrivateBcbPinObjectClass))
37 typedef struct _CaptivePrivateBcbPinObject      CaptivePrivateBcbPinObject;
38 typedef struct _CaptivePrivateBcbPinObjectClass CaptivePrivateBcbPinObjectClass;
39
40
41 GType captive_private_bcb_pin_object_get_type(void);
42
43 GHashTable *captive_private_bcb_pin_object_hash_new(void);
44 void captive_private_bcb_pin_object_hash_destroy(GHashTable *pin_hash);
45 void _captive_private_bcb_pin_object_connect_SharedCacheMap
46                 (CaptivePrivateBcbPinObject *captive_private_bcb_pin_object,CaptiveSharedCacheMapObject *SharedCacheMap);
47 CaptivePrivateBcbPinObject *captive_private_bcb_pin_object_new(CaptiveSharedCacheMapObject *captive_shared_cache_map_object,
48                 guint64 offset);
49 CaptivePrivateBcbPinObject *captive_private_bcb_pin_object_get(CaptiveSharedCacheMapObject *captive_shared_cache_map_object,
50                 guint64 offset);
51 CaptivePrivateBcbPinObject *captive_private_bcb_pin_object_get_ref(CaptiveSharedCacheMapObject *captive_shared_cache_map_object,
52                 guint64 offset,gboolean invalidate_new);
53 gboolean captive_private_bcb_pin_object_is_dirty(CaptivePrivateBcbPinObject *captive_private_bcb_pin_object);
54 void captive_private_bcb_pin_object_flush(CaptivePrivateBcbPinObject *captive_private_bcb_pin_object);
55 void captive_private_bcb_pin_object_set_dirty(CaptivePrivateBcbPinObject *captive_private_bcb_pin_object);
56 void captive_private_bcb_pin_object_set_lsn(CaptivePrivateBcbPinObject *captive_private_bcb_pin_object,gint64 lsn);
57 void captive_private_bcb_pin_object_detach_pin(CaptivePrivateBcbPinObject *captive_private_bcb_pin_object);
58
59 G_END_DECLS
60
61
62 #endif /* _CAPTIVE_CC_PRIVATE_BCB_PIN_H */