/* notifications-mock.c generated by valac 0.34.7, the Vala compiler
 * generated from notifications-mock.vala, do not modify */

/*
 * This file is part of gitg
 *
 * Copyright (C) 2015 - Jesse van den Kieboom
 *
 * gitg is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * gitg is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with gitg. If not, see <http://www.gnu.org/licenses/>.
 */

#include <glib.h>
#include <glib-object.h>
#include "libgitg-ext/libgitg-ext.h"
#include <gee.h>


#define GITG_TEST_TYPE_NOTIFICATIONS (gitg_test_notifications_get_type ())
#define GITG_TEST_NOTIFICATIONS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GITG_TEST_TYPE_NOTIFICATIONS, GitgTestNotifications))
#define GITG_TEST_NOTIFICATIONS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GITG_TEST_TYPE_NOTIFICATIONS, GitgTestNotificationsClass))
#define GITG_TEST_IS_NOTIFICATIONS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GITG_TEST_TYPE_NOTIFICATIONS))
#define GITG_TEST_IS_NOTIFICATIONS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GITG_TEST_TYPE_NOTIFICATIONS))
#define GITG_TEST_NOTIFICATIONS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GITG_TEST_TYPE_NOTIFICATIONS, GitgTestNotificationsClass))

typedef struct _GitgTestNotifications GitgTestNotifications;
typedef struct _GitgTestNotificationsClass GitgTestNotificationsClass;
typedef struct _GitgTestNotificationsPrivate GitgTestNotificationsPrivate;
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))

struct _GitgTestNotifications {
	GObject parent_instance;
	GitgTestNotificationsPrivate * priv;
	GeeArrayList* notifications;
};

struct _GitgTestNotificationsClass {
	GObjectClass parent_class;
};


static gpointer gitg_test_notifications_parent_class = NULL;
static GitgExtNotificationsIface* gitg_test_notifications_gitg_ext_notifications_parent_iface = NULL;

GType gitg_test_notifications_get_type (void) G_GNUC_CONST;
enum  {
	GITG_TEST_NOTIFICATIONS_DUMMY_PROPERTY
};
GitgTestNotifications* gitg_test_notifications_new (void);
GitgTestNotifications* gitg_test_notifications_construct (GType object_type);
static void gitg_test_notifications_real_add (GitgExtNotifications* base, GitgExtNotification* notification);
static void gitg_test_notifications_real_remove (GitgExtNotifications* base, GitgExtNotification* notification, guint delay);
static void gitg_test_notifications_finalize (GObject* obj);


GitgTestNotifications* gitg_test_notifications_construct (GType object_type) {
	GitgTestNotifications * self = NULL;
	GeeArrayList* _tmp0_ = NULL;
#line 29 "/home/jesse/dev/gitg/tests/gitg/notifications-mock.vala"
	self = (GitgTestNotifications*) g_object_new (object_type, NULL);
#line 31 "/home/jesse/dev/gitg/tests/gitg/notifications-mock.vala"
	_tmp0_ = gee_array_list_new (GITG_EXT_TYPE_NOTIFICATION, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL);
#line 31 "/home/jesse/dev/gitg/tests/gitg/notifications-mock.vala"
	_g_object_unref0 (self->notifications);
#line 31 "/home/jesse/dev/gitg/tests/gitg/notifications-mock.vala"
	self->notifications = _tmp0_;
#line 29 "/home/jesse/dev/gitg/tests/gitg/notifications-mock.vala"
	return self;
#line 80 "notifications-mock.c"
}


GitgTestNotifications* gitg_test_notifications_new (void) {
#line 29 "/home/jesse/dev/gitg/tests/gitg/notifications-mock.vala"
	return gitg_test_notifications_construct (GITG_TEST_TYPE_NOTIFICATIONS);
#line 87 "notifications-mock.c"
}


static void gitg_test_notifications_real_add (GitgExtNotifications* base, GitgExtNotification* notification) {
	GitgTestNotifications * self;
	GitgExtNotification* _tmp0_ = NULL;
	GeeArrayList* _tmp1_ = NULL;
	GitgExtNotification* _tmp2_ = NULL;
#line 34 "/home/jesse/dev/gitg/tests/gitg/notifications-mock.vala"
	self = (GitgTestNotifications*) base;
#line 34 "/home/jesse/dev/gitg/tests/gitg/notifications-mock.vala"
	g_return_if_fail (notification != NULL);
#line 36 "/home/jesse/dev/gitg/tests/gitg/notifications-mock.vala"
	_tmp0_ = notification;
#line 36 "/home/jesse/dev/gitg/tests/gitg/notifications-mock.vala"
	g_signal_emit_by_name (self, "added", _tmp0_);
#line 37 "/home/jesse/dev/gitg/tests/gitg/notifications-mock.vala"
	_tmp1_ = self->notifications;
#line 37 "/home/jesse/dev/gitg/tests/gitg/notifications-mock.vala"
	_tmp2_ = notification;
#line 37 "/home/jesse/dev/gitg/tests/gitg/notifications-mock.vala"
	gee_abstract_collection_add ((GeeAbstractCollection*) _tmp1_, _tmp2_);
#line 110 "notifications-mock.c"
}


static void gitg_test_notifications_real_remove (GitgExtNotifications* base, GitgExtNotification* notification, guint delay) {
	GitgTestNotifications * self;
	GitgExtNotification* _tmp0_ = NULL;
	GeeArrayList* _tmp1_ = NULL;
	GitgExtNotification* _tmp2_ = NULL;
#line 40 "/home/jesse/dev/gitg/tests/gitg/notifications-mock.vala"
	self = (GitgTestNotifications*) base;
#line 40 "/home/jesse/dev/gitg/tests/gitg/notifications-mock.vala"
	g_return_if_fail (notification != NULL);
#line 42 "/home/jesse/dev/gitg/tests/gitg/notifications-mock.vala"
	_tmp0_ = notification;
#line 42 "/home/jesse/dev/gitg/tests/gitg/notifications-mock.vala"
	g_signal_emit_by_name (self, "removed", _tmp0_);
#line 43 "/home/jesse/dev/gitg/tests/gitg/notifications-mock.vala"
	_tmp1_ = self->notifications;
#line 43 "/home/jesse/dev/gitg/tests/gitg/notifications-mock.vala"
	_tmp2_ = notification;
#line 43 "/home/jesse/dev/gitg/tests/gitg/notifications-mock.vala"
	gee_abstract_collection_remove ((GeeAbstractCollection*) _tmp1_, _tmp2_);
#line 133 "notifications-mock.c"
}


static void gitg_test_notifications_class_init (GitgTestNotificationsClass * klass) {
#line 22 "/home/jesse/dev/gitg/tests/gitg/notifications-mock.vala"
	gitg_test_notifications_parent_class = g_type_class_peek_parent (klass);
#line 22 "/home/jesse/dev/gitg/tests/gitg/notifications-mock.vala"
	G_OBJECT_CLASS (klass)->finalize = gitg_test_notifications_finalize;
#line 22 "/home/jesse/dev/gitg/tests/gitg/notifications-mock.vala"
	g_signal_new ("added", GITG_TEST_TYPE_NOTIFICATIONS, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__OBJECT, G_TYPE_NONE, 1, GITG_EXT_TYPE_NOTIFICATION);
#line 22 "/home/jesse/dev/gitg/tests/gitg/notifications-mock.vala"
	g_signal_new ("removed", GITG_TEST_TYPE_NOTIFICATIONS, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__OBJECT, G_TYPE_NONE, 1, GITG_EXT_TYPE_NOTIFICATION);
#line 146 "notifications-mock.c"
}


static void gitg_test_notifications_gitg_ext_notifications_interface_init (GitgExtNotificationsIface * iface) {
#line 22 "/home/jesse/dev/gitg/tests/gitg/notifications-mock.vala"
	gitg_test_notifications_gitg_ext_notifications_parent_iface = g_type_interface_peek_parent (iface);
#line 22 "/home/jesse/dev/gitg/tests/gitg/notifications-mock.vala"
	iface->add = (void (*)(GitgExtNotifications*, GitgExtNotification*)) gitg_test_notifications_real_add;
#line 22 "/home/jesse/dev/gitg/tests/gitg/notifications-mock.vala"
	iface->remove = (void (*)(GitgExtNotifications*, GitgExtNotification*, guint)) gitg_test_notifications_real_remove;
#line 157 "notifications-mock.c"
}


static void gitg_test_notifications_instance_init (GitgTestNotifications * self) {
}


static void gitg_test_notifications_finalize (GObject* obj) {
	GitgTestNotifications * self;
#line 22 "/home/jesse/dev/gitg/tests/gitg/notifications-mock.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, GITG_TEST_TYPE_NOTIFICATIONS, GitgTestNotifications);
#line 27 "/home/jesse/dev/gitg/tests/gitg/notifications-mock.vala"
	_g_object_unref0 (self->notifications);
#line 22 "/home/jesse/dev/gitg/tests/gitg/notifications-mock.vala"
	G_OBJECT_CLASS (gitg_test_notifications_parent_class)->finalize (obj);
#line 173 "notifications-mock.c"
}


GType gitg_test_notifications_get_type (void) {
	static volatile gsize gitg_test_notifications_type_id__volatile = 0;
	if (g_once_init_enter (&gitg_test_notifications_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (GitgTestNotificationsClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) gitg_test_notifications_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (GitgTestNotifications), 0, (GInstanceInitFunc) gitg_test_notifications_instance_init, NULL };
		static const GInterfaceInfo gitg_ext_notifications_info = { (GInterfaceInitFunc) gitg_test_notifications_gitg_ext_notifications_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
		GType gitg_test_notifications_type_id;
		gitg_test_notifications_type_id = g_type_register_static (G_TYPE_OBJECT, "GitgTestNotifications", &g_define_type_info, 0);
		g_type_add_interface_static (gitg_test_notifications_type_id, GITG_EXT_TYPE_NOTIFICATIONS, &gitg_ext_notifications_info);
		g_once_init_leave (&gitg_test_notifications_type_id__volatile, gitg_test_notifications_type_id);
	}
	return gitg_test_notifications_type_id__volatile;
}



