1 /* valalockable.c generated by valac, the Vala compiler
2  * generated from valalockable.vala, do not modify */
3 
4 /* valalockable.vala
5  *
6  * Copyright (C) 2006-2007  Raffaele Sandrini, Jürg Billeter
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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
21  *
22  * Author:
23  * 	Raffaele Sandrini <raffaele@sandrini.ch>
24  * 	Jürg Billeter <j@bitron.ch>
25  */
26 
27 #include "vala.h"
28 #include <glib.h>
29 
30 static GType vala_lockable_get_type_once (void);
31 
32 gboolean
vala_lockable_get_lock_used(ValaLockable * self)33 vala_lockable_get_lock_used (ValaLockable* self)
34 {
35 	g_return_val_if_fail (self != NULL, FALSE);
36 	return VALA_LOCKABLE_GET_INTERFACE (self)->get_lock_used (self);
37 }
38 
39 void
vala_lockable_set_lock_used(ValaLockable * self,gboolean value)40 vala_lockable_set_lock_used (ValaLockable* self,
41                              gboolean value)
42 {
43 	g_return_if_fail (self != NULL);
44 	VALA_LOCKABLE_GET_INTERFACE (self)->set_lock_used (self, value);
45 }
46 
47 static void
vala_lockable_default_init(ValaLockableIface * iface,gpointer iface_data)48 vala_lockable_default_init (ValaLockableIface * iface,
49                             gpointer iface_data)
50 {
51 }
52 
53 /**
54  * Represents a lockable object.
55  */
56 static GType
vala_lockable_get_type_once(void)57 vala_lockable_get_type_once (void)
58 {
59 	static const GTypeInfo g_define_type_info = { sizeof (ValaLockableIface), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) vala_lockable_default_init, (GClassFinalizeFunc) NULL, NULL, 0, 0, (GInstanceInitFunc) NULL, NULL };
60 	GType vala_lockable_type_id;
61 	vala_lockable_type_id = g_type_register_static (G_TYPE_INTERFACE, "ValaLockable", &g_define_type_info, 0);
62 	return vala_lockable_type_id;
63 }
64 
65 GType
vala_lockable_get_type(void)66 vala_lockable_get_type (void)
67 {
68 	static volatile gsize vala_lockable_type_id__volatile = 0;
69 	if (g_once_init_enter (&vala_lockable_type_id__volatile)) {
70 		GType vala_lockable_type_id;
71 		vala_lockable_type_id = vala_lockable_get_type_once ();
72 		g_once_init_leave (&vala_lockable_type_id__volatile, vala_lockable_type_id);
73 	}
74 	return vala_lockable_type_id__volatile;
75 }
76 
77