1 /* gmpc-connection.c generated by valac 0.12.0, the Vala compiler
2  * generated from gmpc-connection.vala, do not modify */
3 
4 /* Gnome Music Player Client (GMPC)
5  * Copyright (C) 2004-2011 Qball Cow <qball@gmpclient.org>
6  * Project homepage: http://gmpclient.org/
7 
8  * This program is free software; you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License as published by
10  * the Free Software Foundation; either version 2 of the License, or
11  * (at your option) any later version.
12 
13  * This program 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
16  * GNU General Public License for more details.
17 
18  * You should have received a copy of the GNU General Public License along
19  * with this program; if not, write to the Free Software Foundation, Inc.,
20  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
21 */
22 
23 #include <glib.h>
24 #include <glib-object.h>
25 #include "gmpc-extras.h"
26 #include <libmpd/libmpd.h>
27 
28 
29 
30 static gpointer gmpc_connection_parent_class = NULL;
31 
32 enum  {
33 	GMPC_CONNECTION_DUMMY_PROPERTY
34 };
35 static void g_cclosure_user_marshal_VOID__POINTER_INT (GClosure * closure, GValue * return_value, guint n_param_values, const GValue * param_values, gpointer invocation_hint, gpointer marshal_data);
36 
37 
gmpc_connection_construct(GType object_type)38 GmpcConnection* gmpc_connection_construct (GType object_type) {
39 	GmpcConnection * self = NULL;
40 	self = (GmpcConnection*) g_object_new (object_type, NULL);
41 	return self;
42 }
43 
44 
gmpc_connection_new(void)45 GmpcConnection* gmpc_connection_new (void) {
46 	return gmpc_connection_construct (GMPC_TYPE_CONNECTION);
47 }
48 
49 
g_cclosure_user_marshal_VOID__POINTER_INT(GClosure * closure,GValue * return_value,guint n_param_values,const GValue * param_values,gpointer invocation_hint,gpointer marshal_data)50 static void g_cclosure_user_marshal_VOID__POINTER_INT (GClosure * closure, GValue * return_value, guint n_param_values, const GValue * param_values, gpointer invocation_hint, gpointer marshal_data) {
51 	typedef void (*GMarshalFunc_VOID__POINTER_INT) (gpointer data1, gpointer arg_1, gint arg_2, gpointer data2);
52 	register GMarshalFunc_VOID__POINTER_INT callback;
53 	register GCClosure * cc;
54 	register gpointer data1, data2;
55 	cc = (GCClosure *) closure;
56 	g_return_if_fail (n_param_values == 3);
57 	if (G_CCLOSURE_SWAP_DATA (closure)) {
58 		data1 = closure->data;
59 		data2 = param_values->data[0].v_pointer;
60 	} else {
61 		data1 = param_values->data[0].v_pointer;
62 		data2 = closure->data;
63 	}
64 	callback = (GMarshalFunc_VOID__POINTER_INT) (marshal_data ? marshal_data : cc->callback);
65 	callback (data1, g_value_get_pointer (param_values + 1), g_value_get_int (param_values + 2), data2);
66 }
67 
68 
gmpc_connection_class_init(GmpcConnectionClass * klass)69 static void gmpc_connection_class_init (GmpcConnectionClass * klass) {
70 	gmpc_connection_parent_class = g_type_class_peek_parent (klass);
71 	g_signal_new ("connection_changed", GMPC_TYPE_CONNECTION, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_user_marshal_VOID__POINTER_INT, G_TYPE_NONE, 2, G_TYPE_POINTER, G_TYPE_INT);
72 	g_signal_new ("status_changed", GMPC_TYPE_CONNECTION, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_user_marshal_VOID__POINTER_INT, G_TYPE_NONE, 2, G_TYPE_POINTER, G_TYPE_INT);
73 }
74 
75 
gmpc_connection_instance_init(GmpcConnection * self)76 static void gmpc_connection_instance_init (GmpcConnection * self) {
77 }
78 
79 
gmpc_connection_get_type(void)80 GType gmpc_connection_get_type (void) {
81 	static volatile gsize gmpc_connection_type_id__volatile = 0;
82 	if (g_once_init_enter (&gmpc_connection_type_id__volatile)) {
83 		static const GTypeInfo g_define_type_info = { sizeof (GmpcConnectionClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) gmpc_connection_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (GmpcConnection), 0, (GInstanceInitFunc) gmpc_connection_instance_init, NULL };
84 		GType gmpc_connection_type_id;
85 		gmpc_connection_type_id = g_type_register_static (G_TYPE_OBJECT, "GmpcConnection", &g_define_type_info, 0);
86 		g_once_init_leave (&gmpc_connection_type_id__volatile, gmpc_connection_type_id);
87 	}
88 	return gmpc_connection_type_id__volatile;
89 }
90 
91 
92 
93