/* gitg-ext-command-lines.c generated by valac 0.34.7, the Vala compiler
 * generated from gitg-ext-command-lines.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 <libgit2-glib/ggit.h>
#include <stdlib.h>
#include <string.h>
#include <gtk/gtk.h>
#include <gio/gio.h>
#include "libgitg/libgitg.h"
#include <gee.h>


#define GITG_EXT_TYPE_COMMAND_LINES (gitg_ext_command_lines_get_type ())
#define GITG_EXT_COMMAND_LINES(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GITG_EXT_TYPE_COMMAND_LINES, GitgExtCommandLines))
#define GITG_EXT_COMMAND_LINES_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GITG_EXT_TYPE_COMMAND_LINES, GitgExtCommandLinesClass))
#define GITG_EXT_IS_COMMAND_LINES(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GITG_EXT_TYPE_COMMAND_LINES))
#define GITG_EXT_IS_COMMAND_LINES_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GITG_EXT_TYPE_COMMAND_LINES))
#define GITG_EXT_COMMAND_LINES_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GITG_EXT_TYPE_COMMAND_LINES, GitgExtCommandLinesClass))

typedef struct _GitgExtCommandLines GitgExtCommandLines;
typedef struct _GitgExtCommandLinesClass GitgExtCommandLinesClass;
typedef struct _GitgExtCommandLinesPrivate GitgExtCommandLinesPrivate;

#define GITG_EXT_TYPE_COMMAND_LINE (gitg_ext_command_line_get_type ())
#define GITG_EXT_COMMAND_LINE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GITG_EXT_TYPE_COMMAND_LINE, GitgExtCommandLine))
#define GITG_EXT_IS_COMMAND_LINE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GITG_EXT_TYPE_COMMAND_LINE))
#define GITG_EXT_COMMAND_LINE_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), GITG_EXT_TYPE_COMMAND_LINE, GitgExtCommandLineIface))

typedef struct _GitgExtCommandLine GitgExtCommandLine;
typedef struct _GitgExtCommandLineIface GitgExtCommandLineIface;

#define GITG_EXT_TYPE_APPLICATION (gitg_ext_application_get_type ())
#define GITG_EXT_APPLICATION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GITG_EXT_TYPE_APPLICATION, GitgExtApplication))
#define GITG_EXT_IS_APPLICATION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GITG_EXT_TYPE_APPLICATION))
#define GITG_EXT_APPLICATION_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), GITG_EXT_TYPE_APPLICATION, GitgExtApplicationIface))

typedef struct _GitgExtApplication GitgExtApplication;
typedef struct _GitgExtApplicationIface GitgExtApplicationIface;

#define GITG_EXT_TYPE_UI_ELEMENT (gitg_ext_ui_element_get_type ())
#define GITG_EXT_UI_ELEMENT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GITG_EXT_TYPE_UI_ELEMENT, GitgExtUIElement))
#define GITG_EXT_IS_UI_ELEMENT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GITG_EXT_TYPE_UI_ELEMENT))
#define GITG_EXT_UI_ELEMENT_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), GITG_EXT_TYPE_UI_ELEMENT, GitgExtUIElementIface))

typedef struct _GitgExtUIElement GitgExtUIElement;
typedef struct _GitgExtUIElementIface GitgExtUIElementIface;

#define GITG_EXT_TYPE_ACTIVITY (gitg_ext_activity_get_type ())
#define GITG_EXT_ACTIVITY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GITG_EXT_TYPE_ACTIVITY, GitgExtActivity))
#define GITG_EXT_IS_ACTIVITY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GITG_EXT_TYPE_ACTIVITY))
#define GITG_EXT_ACTIVITY_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), GITG_EXT_TYPE_ACTIVITY, GitgExtActivityIface))

typedef struct _GitgExtActivity GitgExtActivity;
typedef struct _GitgExtActivityIface GitgExtActivityIface;

#define GITG_EXT_TYPE_USER_QUERY (gitg_ext_user_query_get_type ())
#define GITG_EXT_USER_QUERY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GITG_EXT_TYPE_USER_QUERY, GitgExtUserQuery))
#define GITG_EXT_USER_QUERY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GITG_EXT_TYPE_USER_QUERY, GitgExtUserQueryClass))
#define GITG_EXT_IS_USER_QUERY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GITG_EXT_TYPE_USER_QUERY))
#define GITG_EXT_IS_USER_QUERY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GITG_EXT_TYPE_USER_QUERY))
#define GITG_EXT_USER_QUERY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GITG_EXT_TYPE_USER_QUERY, GitgExtUserQueryClass))

typedef struct _GitgExtUserQuery GitgExtUserQuery;
typedef struct _GitgExtUserQueryClass GitgExtUserQueryClass;

#define GITG_EXT_TYPE_MESSAGE_BUS (gitg_ext_message_bus_get_type ())
#define GITG_EXT_MESSAGE_BUS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GITG_EXT_TYPE_MESSAGE_BUS, GitgExtMessageBus))
#define GITG_EXT_MESSAGE_BUS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GITG_EXT_TYPE_MESSAGE_BUS, GitgExtMessageBusClass))
#define GITG_EXT_IS_MESSAGE_BUS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GITG_EXT_TYPE_MESSAGE_BUS))
#define GITG_EXT_IS_MESSAGE_BUS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GITG_EXT_TYPE_MESSAGE_BUS))
#define GITG_EXT_MESSAGE_BUS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GITG_EXT_TYPE_MESSAGE_BUS, GitgExtMessageBusClass))

typedef struct _GitgExtMessageBus GitgExtMessageBus;
typedef struct _GitgExtMessageBusClass GitgExtMessageBusClass;

#define GITG_EXT_TYPE_NOTIFICATIONS (gitg_ext_notifications_get_type ())
#define GITG_EXT_NOTIFICATIONS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GITG_EXT_TYPE_NOTIFICATIONS, GitgExtNotifications))
#define GITG_EXT_IS_NOTIFICATIONS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GITG_EXT_TYPE_NOTIFICATIONS))
#define GITG_EXT_NOTIFICATIONS_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), GITG_EXT_TYPE_NOTIFICATIONS, GitgExtNotificationsIface))

typedef struct _GitgExtNotifications GitgExtNotifications;
typedef struct _GitgExtNotificationsIface GitgExtNotificationsIface;

#define GITG_EXT_TYPE_NOTIFICATION (gitg_ext_notification_get_type ())
#define GITG_EXT_NOTIFICATION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GITG_EXT_TYPE_NOTIFICATION, GitgExtNotification))
#define GITG_EXT_IS_NOTIFICATION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GITG_EXT_TYPE_NOTIFICATION))
#define GITG_EXT_NOTIFICATION_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), GITG_EXT_TYPE_NOTIFICATION, GitgExtNotificationIface))

typedef struct _GitgExtNotification GitgExtNotification;
typedef struct _GitgExtNotificationIface GitgExtNotificationIface;

#define GITG_EXT_TYPE_REMOTE_LOOKUP (gitg_ext_remote_lookup_get_type ())
#define GITG_EXT_REMOTE_LOOKUP(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GITG_EXT_TYPE_REMOTE_LOOKUP, GitgExtRemoteLookup))
#define GITG_EXT_IS_REMOTE_LOOKUP(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GITG_EXT_TYPE_REMOTE_LOOKUP))
#define GITG_EXT_REMOTE_LOOKUP_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), GITG_EXT_TYPE_REMOTE_LOOKUP, GitgExtRemoteLookupIface))

typedef struct _GitgExtRemoteLookup GitgExtRemoteLookup;
typedef struct _GitgExtRemoteLookupIface GitgExtRemoteLookupIface;
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))

struct _GitgExtCommandLines {
	GObject parent_instance;
	GitgExtCommandLinesPrivate * priv;
};

struct _GitgExtCommandLinesClass {
	GObjectClass parent_class;
};

struct _GitgExtUIElementIface {
	GTypeInterface parent_iface;
	gint (*negotiate_order) (GitgExtUIElement* self, GitgExtUIElement* other);
	void (*activate) (GitgExtUIElement* self);
	GitgExtApplication* (*get_application) (GitgExtUIElement* self);
	void (*set_application) (GitgExtUIElement* self, GitgExtApplication* value);
	gchar* (*get_id) (GitgExtUIElement* self);
	gchar* (*get_display_name) (GitgExtUIElement* self);
	gchar* (*get_description) (GitgExtUIElement* self);
	gchar* (*get_icon) (GitgExtUIElement* self);
	GtkWidget* (*get_widget) (GitgExtUIElement* self);
	gboolean (*get_available) (GitgExtUIElement* self);
	gboolean (*get_enabled) (GitgExtUIElement* self);
};

struct _GitgExtActivityIface {
	GTypeInterface parent_iface;
	gboolean (*is_default_for) (GitgExtActivity* self, const gchar* action);
};

struct _GitgExtNotificationIface {
	GTypeInterface parent_iface;
	GtkWidget* (*get_widget) (GitgExtNotification* self);
};

struct _GitgExtNotificationsIface {
	GTypeInterface parent_iface;
	void (*add) (GitgExtNotifications* self, GitgExtNotification* notification);
	void (*remove) (GitgExtNotifications* self, GitgExtNotification* notification, guint delay);
};

struct _GitgExtRemoteLookupIface {
	GTypeInterface parent_iface;
	GitgRemote* (*lookup) (GitgExtRemoteLookup* self, const gchar* name);
};

struct _GitgExtApplicationIface {
	GTypeInterface parent_iface;
	GgitSignature* (*get_verified_committer) (GitgExtApplication* self);
	GitgExtActivity* (*get_activity_by_id) (GitgExtApplication* self, const gchar* id);
	GitgExtActivity* (*set_activity_by_id) (GitgExtApplication* self, const gchar* id);
	void (*user_query) (GitgExtApplication* self, GitgExtUserQuery* query);
	void (*user_query_async) (GitgExtApplication* self, GitgExtUserQuery* query, GAsyncReadyCallback _callback_, gpointer _user_data_);
	GtkResponseType (*user_query_finish) (GitgExtApplication* self, GAsyncResult* _res_);
	void (*show_infobar) (GitgExtApplication* self, const gchar* primary_msg, const gchar* secondary_msg, GtkMessageType type);
	GitgExtApplication* (*open_new) (GitgExtApplication* self, GgitRepository* repository, const gchar* hint);
	void (*open_repository) (GitgExtApplication* self, GFile* path);
	GitgRepository* (*get_repository) (GitgExtApplication* self);
	void (*set_repository) (GitgExtApplication* self, GitgRepository* value);
	GitgExtMessageBus* (*get_message_bus) (GitgExtApplication* self);
	GitgExtActivity* (*get_current_activity) (GitgExtApplication* self);
	GeeMap* (*get_environment) (GitgExtApplication* self);
	GitgExtNotifications* (*get_notifications) (GitgExtApplication* self);
	gboolean (*get_busy) (GitgExtApplication* self);
	void (*set_busy) (GitgExtApplication* self, gboolean value);
	GitgExtRemoteLookup* (*get_remote_lookup) (GitgExtApplication* self);
};

struct _GitgExtCommandLineIface {
	GTypeInterface parent_iface;
	GOptionGroup* (*get_option_group) (GitgExtCommandLine* self);
	void (*parse_finished) (GitgExtCommandLine* self);
	void (*apply) (GitgExtCommandLine* self, GitgExtApplication* application);
};

struct _GitgExtCommandLinesPrivate {
	GitgExtCommandLine** d_command_lines;
	gint d_command_lines_length1;
	gint _d_command_lines_size_;
};


static gpointer gitg_ext_command_lines_parent_class = NULL;

GType gitg_ext_command_lines_get_type (void) G_GNUC_CONST;
GType gitg_ext_ui_element_get_type (void) G_GNUC_CONST;
GType gitg_ext_activity_get_type (void) G_GNUC_CONST;
GType gitg_ext_user_query_get_type (void) G_GNUC_CONST;
GType gitg_ext_message_bus_get_type (void) G_GNUC_CONST;
GType gitg_ext_notification_get_type (void) G_GNUC_CONST;
GType gitg_ext_notifications_get_type (void) G_GNUC_CONST;
GType gitg_ext_remote_lookup_get_type (void) G_GNUC_CONST;
GType gitg_ext_application_get_type (void) G_GNUC_CONST;
GType gitg_ext_command_line_get_type (void) G_GNUC_CONST;
#define GITG_EXT_COMMAND_LINES_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), GITG_EXT_TYPE_COMMAND_LINES, GitgExtCommandLinesPrivate))
enum  {
	GITG_EXT_COMMAND_LINES_DUMMY_PROPERTY
};
GitgExtCommandLines* gitg_ext_command_lines_new (GitgExtCommandLine** command_lines, int command_lines_length1);
GitgExtCommandLines* gitg_ext_command_lines_construct (GType object_type, GitgExtCommandLine** command_lines, int command_lines_length1);
static GitgExtCommandLine** _vala_array_dup1 (GitgExtCommandLine** self, int length);
gpointer gitg_ext_command_lines_get_for (GitgExtCommandLines* self, GType t_type, GBoxedCopyFunc t_dup_func, GDestroyNotify t_destroy_func);
void gitg_ext_command_lines_parse_finished (GitgExtCommandLines* self);
void gitg_ext_command_line_parse_finished (GitgExtCommandLine* self);
void gitg_ext_command_lines_apply (GitgExtCommandLines* self, GitgExtApplication* application);
void gitg_ext_command_line_apply (GitgExtCommandLine* self, GitgExtApplication* application);
static void gitg_ext_command_lines_finalize (GObject* obj);
static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func);
static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func);


static gpointer _g_object_ref0 (gpointer self) {
#line 28 "/home/jesse/dev/gitg/libgitg-ext/gitg-ext-command-lines.vala"
	return self ? g_object_ref (self) : NULL;
#line 236 "gitg-ext-command-lines.c"
}


static GitgExtCommandLine** _vala_array_dup1 (GitgExtCommandLine** self, int length) {
	GitgExtCommandLine** result;
	int i;
#line 28 "/home/jesse/dev/gitg/libgitg-ext/gitg-ext-command-lines.vala"
	result = g_new0 (GitgExtCommandLine*, length + 1);
#line 28 "/home/jesse/dev/gitg/libgitg-ext/gitg-ext-command-lines.vala"
	for (i = 0; i < length; i++) {
#line 247 "gitg-ext-command-lines.c"
		GitgExtCommandLine* _tmp0_ = NULL;
#line 28 "/home/jesse/dev/gitg/libgitg-ext/gitg-ext-command-lines.vala"
		_tmp0_ = _g_object_ref0 (self[i]);
#line 28 "/home/jesse/dev/gitg/libgitg-ext/gitg-ext-command-lines.vala"
		result[i] = _tmp0_;
#line 253 "gitg-ext-command-lines.c"
	}
#line 28 "/home/jesse/dev/gitg/libgitg-ext/gitg-ext-command-lines.vala"
	return result;
#line 257 "gitg-ext-command-lines.c"
}


GitgExtCommandLines* gitg_ext_command_lines_construct (GType object_type, GitgExtCommandLine** command_lines, int command_lines_length1) {
	GitgExtCommandLines * self = NULL;
	GitgExtCommandLine** _tmp0_ = NULL;
	gint _tmp0__length1 = 0;
	GitgExtCommandLine** _tmp1_ = NULL;
	gint _tmp1__length1 = 0;
#line 26 "/home/jesse/dev/gitg/libgitg-ext/gitg-ext-command-lines.vala"
	self = (GitgExtCommandLines*) g_object_new (object_type, NULL);
#line 28 "/home/jesse/dev/gitg/libgitg-ext/gitg-ext-command-lines.vala"
	_tmp0_ = command_lines;
#line 28 "/home/jesse/dev/gitg/libgitg-ext/gitg-ext-command-lines.vala"
	_tmp0__length1 = command_lines_length1;
#line 28 "/home/jesse/dev/gitg/libgitg-ext/gitg-ext-command-lines.vala"
	_tmp1_ = (_tmp0_ != NULL) ? _vala_array_dup1 (_tmp0_, _tmp0__length1) : ((gpointer) _tmp0_);
#line 28 "/home/jesse/dev/gitg/libgitg-ext/gitg-ext-command-lines.vala"
	_tmp1__length1 = _tmp0__length1;
#line 28 "/home/jesse/dev/gitg/libgitg-ext/gitg-ext-command-lines.vala"
	self->priv->d_command_lines = (_vala_array_free (self->priv->d_command_lines, self->priv->d_command_lines_length1, (GDestroyNotify) g_object_unref), NULL);
#line 28 "/home/jesse/dev/gitg/libgitg-ext/gitg-ext-command-lines.vala"
	self->priv->d_command_lines = _tmp1_;
#line 28 "/home/jesse/dev/gitg/libgitg-ext/gitg-ext-command-lines.vala"
	self->priv->d_command_lines_length1 = _tmp1__length1;
#line 28 "/home/jesse/dev/gitg/libgitg-ext/gitg-ext-command-lines.vala"
	self->priv->_d_command_lines_size_ = self->priv->d_command_lines_length1;
#line 26 "/home/jesse/dev/gitg/libgitg-ext/gitg-ext-command-lines.vala"
	return self;
#line 287 "gitg-ext-command-lines.c"
}


GitgExtCommandLines* gitg_ext_command_lines_new (GitgExtCommandLine** command_lines, int command_lines_length1) {
#line 26 "/home/jesse/dev/gitg/libgitg-ext/gitg-ext-command-lines.vala"
	return gitg_ext_command_lines_construct (GITG_EXT_TYPE_COMMAND_LINES, command_lines, command_lines_length1);
#line 294 "gitg-ext-command-lines.c"
}


gpointer gitg_ext_command_lines_get_for (GitgExtCommandLines* self, GType t_type, GBoxedCopyFunc t_dup_func, GDestroyNotify t_destroy_func) {
	gpointer result = NULL;
	GitgExtCommandLine** _tmp0_ = NULL;
	gint _tmp0__length1 = 0;
#line 31 "/home/jesse/dev/gitg/libgitg-ext/gitg-ext-command-lines.vala"
	g_return_val_if_fail (self != NULL, NULL);
#line 33 "/home/jesse/dev/gitg/libgitg-ext/gitg-ext-command-lines.vala"
	_tmp0_ = self->priv->d_command_lines;
#line 33 "/home/jesse/dev/gitg/libgitg-ext/gitg-ext-command-lines.vala"
	_tmp0__length1 = self->priv->d_command_lines_length1;
#line 308 "gitg-ext-command-lines.c"
	{
		GitgExtCommandLine** cmd_collection = NULL;
		gint cmd_collection_length1 = 0;
		gint _cmd_collection_size_ = 0;
		gint cmd_it = 0;
#line 33 "/home/jesse/dev/gitg/libgitg-ext/gitg-ext-command-lines.vala"
		cmd_collection = _tmp0_;
#line 33 "/home/jesse/dev/gitg/libgitg-ext/gitg-ext-command-lines.vala"
		cmd_collection_length1 = _tmp0__length1;
#line 33 "/home/jesse/dev/gitg/libgitg-ext/gitg-ext-command-lines.vala"
		for (cmd_it = 0; cmd_it < _tmp0__length1; cmd_it = cmd_it + 1) {
#line 320 "gitg-ext-command-lines.c"
			GitgExtCommandLine* _tmp1_ = NULL;
			GitgExtCommandLine* cmd = NULL;
#line 33 "/home/jesse/dev/gitg/libgitg-ext/gitg-ext-command-lines.vala"
			_tmp1_ = _g_object_ref0 (cmd_collection[cmd_it]);
#line 33 "/home/jesse/dev/gitg/libgitg-ext/gitg-ext-command-lines.vala"
			cmd = _tmp1_;
#line 327 "gitg-ext-command-lines.c"
			{
				GitgExtCommandLine* _tmp2_ = NULL;
				GType _tmp3_ = 0UL;
#line 35 "/home/jesse/dev/gitg/libgitg-ext/gitg-ext-command-lines.vala"
				_tmp2_ = cmd;
#line 35 "/home/jesse/dev/gitg/libgitg-ext/gitg-ext-command-lines.vala"
				_tmp3_ = G_TYPE_FROM_INSTANCE ((GObject*) _tmp2_);
#line 35 "/home/jesse/dev/gitg/libgitg-ext/gitg-ext-command-lines.vala"
				if (_tmp3_ == t_type) {
#line 337 "gitg-ext-command-lines.c"
					GitgExtCommandLine* _tmp4_ = NULL;
					gpointer _tmp5_ = NULL;
#line 37 "/home/jesse/dev/gitg/libgitg-ext/gitg-ext-command-lines.vala"
					_tmp4_ = cmd;
#line 37 "/home/jesse/dev/gitg/libgitg-ext/gitg-ext-command-lines.vala"
					_tmp5_ = ((((gconstpointer) _tmp4_) != NULL) && (t_dup_func != NULL)) ? t_dup_func ((gpointer) ((gconstpointer) _tmp4_)) : ((gpointer) ((gconstpointer) _tmp4_));
#line 37 "/home/jesse/dev/gitg/libgitg-ext/gitg-ext-command-lines.vala"
					result = _tmp5_;
#line 37 "/home/jesse/dev/gitg/libgitg-ext/gitg-ext-command-lines.vala"
					_g_object_unref0 (cmd);
#line 37 "/home/jesse/dev/gitg/libgitg-ext/gitg-ext-command-lines.vala"
					return result;
#line 350 "gitg-ext-command-lines.c"
				}
#line 33 "/home/jesse/dev/gitg/libgitg-ext/gitg-ext-command-lines.vala"
				_g_object_unref0 (cmd);
#line 354 "gitg-ext-command-lines.c"
			}
		}
	}
#line 41 "/home/jesse/dev/gitg/libgitg-ext/gitg-ext-command-lines.vala"
	result = NULL;
#line 41 "/home/jesse/dev/gitg/libgitg-ext/gitg-ext-command-lines.vala"
	return result;
#line 362 "gitg-ext-command-lines.c"
}


void gitg_ext_command_lines_parse_finished (GitgExtCommandLines* self) {
	GitgExtCommandLine** _tmp0_ = NULL;
	gint _tmp0__length1 = 0;
#line 44 "/home/jesse/dev/gitg/libgitg-ext/gitg-ext-command-lines.vala"
	g_return_if_fail (self != NULL);
#line 46 "/home/jesse/dev/gitg/libgitg-ext/gitg-ext-command-lines.vala"
	_tmp0_ = self->priv->d_command_lines;
#line 46 "/home/jesse/dev/gitg/libgitg-ext/gitg-ext-command-lines.vala"
	_tmp0__length1 = self->priv->d_command_lines_length1;
#line 375 "gitg-ext-command-lines.c"
	{
		GitgExtCommandLine** cmd_collection = NULL;
		gint cmd_collection_length1 = 0;
		gint _cmd_collection_size_ = 0;
		gint cmd_it = 0;
#line 46 "/home/jesse/dev/gitg/libgitg-ext/gitg-ext-command-lines.vala"
		cmd_collection = _tmp0_;
#line 46 "/home/jesse/dev/gitg/libgitg-ext/gitg-ext-command-lines.vala"
		cmd_collection_length1 = _tmp0__length1;
#line 46 "/home/jesse/dev/gitg/libgitg-ext/gitg-ext-command-lines.vala"
		for (cmd_it = 0; cmd_it < _tmp0__length1; cmd_it = cmd_it + 1) {
#line 387 "gitg-ext-command-lines.c"
			GitgExtCommandLine* _tmp1_ = NULL;
			GitgExtCommandLine* cmd = NULL;
#line 46 "/home/jesse/dev/gitg/libgitg-ext/gitg-ext-command-lines.vala"
			_tmp1_ = _g_object_ref0 (cmd_collection[cmd_it]);
#line 46 "/home/jesse/dev/gitg/libgitg-ext/gitg-ext-command-lines.vala"
			cmd = _tmp1_;
#line 394 "gitg-ext-command-lines.c"
			{
				GitgExtCommandLine* _tmp2_ = NULL;
#line 48 "/home/jesse/dev/gitg/libgitg-ext/gitg-ext-command-lines.vala"
				_tmp2_ = cmd;
#line 48 "/home/jesse/dev/gitg/libgitg-ext/gitg-ext-command-lines.vala"
				gitg_ext_command_line_parse_finished (_tmp2_);
#line 46 "/home/jesse/dev/gitg/libgitg-ext/gitg-ext-command-lines.vala"
				_g_object_unref0 (cmd);
#line 403 "gitg-ext-command-lines.c"
			}
		}
	}
}


void gitg_ext_command_lines_apply (GitgExtCommandLines* self, GitgExtApplication* application) {
	GitgExtCommandLine** _tmp0_ = NULL;
	gint _tmp0__length1 = 0;
#line 52 "/home/jesse/dev/gitg/libgitg-ext/gitg-ext-command-lines.vala"
	g_return_if_fail (self != NULL);
#line 52 "/home/jesse/dev/gitg/libgitg-ext/gitg-ext-command-lines.vala"
	g_return_if_fail (application != NULL);
#line 54 "/home/jesse/dev/gitg/libgitg-ext/gitg-ext-command-lines.vala"
	_tmp0_ = self->priv->d_command_lines;
#line 54 "/home/jesse/dev/gitg/libgitg-ext/gitg-ext-command-lines.vala"
	_tmp0__length1 = self->priv->d_command_lines_length1;
#line 421 "gitg-ext-command-lines.c"
	{
		GitgExtCommandLine** cmd_collection = NULL;
		gint cmd_collection_length1 = 0;
		gint _cmd_collection_size_ = 0;
		gint cmd_it = 0;
#line 54 "/home/jesse/dev/gitg/libgitg-ext/gitg-ext-command-lines.vala"
		cmd_collection = _tmp0_;
#line 54 "/home/jesse/dev/gitg/libgitg-ext/gitg-ext-command-lines.vala"
		cmd_collection_length1 = _tmp0__length1;
#line 54 "/home/jesse/dev/gitg/libgitg-ext/gitg-ext-command-lines.vala"
		for (cmd_it = 0; cmd_it < _tmp0__length1; cmd_it = cmd_it + 1) {
#line 433 "gitg-ext-command-lines.c"
			GitgExtCommandLine* _tmp1_ = NULL;
			GitgExtCommandLine* cmd = NULL;
#line 54 "/home/jesse/dev/gitg/libgitg-ext/gitg-ext-command-lines.vala"
			_tmp1_ = _g_object_ref0 (cmd_collection[cmd_it]);
#line 54 "/home/jesse/dev/gitg/libgitg-ext/gitg-ext-command-lines.vala"
			cmd = _tmp1_;
#line 440 "gitg-ext-command-lines.c"
			{
				GitgExtCommandLine* _tmp2_ = NULL;
				GitgExtApplication* _tmp3_ = NULL;
#line 56 "/home/jesse/dev/gitg/libgitg-ext/gitg-ext-command-lines.vala"
				_tmp2_ = cmd;
#line 56 "/home/jesse/dev/gitg/libgitg-ext/gitg-ext-command-lines.vala"
				_tmp3_ = application;
#line 56 "/home/jesse/dev/gitg/libgitg-ext/gitg-ext-command-lines.vala"
				gitg_ext_command_line_apply (_tmp2_, _tmp3_);
#line 54 "/home/jesse/dev/gitg/libgitg-ext/gitg-ext-command-lines.vala"
				_g_object_unref0 (cmd);
#line 452 "gitg-ext-command-lines.c"
			}
		}
	}
}


static void gitg_ext_command_lines_class_init (GitgExtCommandLinesClass * klass) {
#line 22 "/home/jesse/dev/gitg/libgitg-ext/gitg-ext-command-lines.vala"
	gitg_ext_command_lines_parent_class = g_type_class_peek_parent (klass);
#line 22 "/home/jesse/dev/gitg/libgitg-ext/gitg-ext-command-lines.vala"
	g_type_class_add_private (klass, sizeof (GitgExtCommandLinesPrivate));
#line 22 "/home/jesse/dev/gitg/libgitg-ext/gitg-ext-command-lines.vala"
	G_OBJECT_CLASS (klass)->finalize = gitg_ext_command_lines_finalize;
#line 466 "gitg-ext-command-lines.c"
}


static void gitg_ext_command_lines_instance_init (GitgExtCommandLines * self) {
#line 22 "/home/jesse/dev/gitg/libgitg-ext/gitg-ext-command-lines.vala"
	self->priv = GITG_EXT_COMMAND_LINES_GET_PRIVATE (self);
#line 473 "gitg-ext-command-lines.c"
}


static void gitg_ext_command_lines_finalize (GObject* obj) {
	GitgExtCommandLines * self;
#line 22 "/home/jesse/dev/gitg/libgitg-ext/gitg-ext-command-lines.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, GITG_EXT_TYPE_COMMAND_LINES, GitgExtCommandLines);
#line 24 "/home/jesse/dev/gitg/libgitg-ext/gitg-ext-command-lines.vala"
	self->priv->d_command_lines = (_vala_array_free (self->priv->d_command_lines, self->priv->d_command_lines_length1, (GDestroyNotify) g_object_unref), NULL);
#line 22 "/home/jesse/dev/gitg/libgitg-ext/gitg-ext-command-lines.vala"
	G_OBJECT_CLASS (gitg_ext_command_lines_parent_class)->finalize (obj);
#line 485 "gitg-ext-command-lines.c"
}


GType gitg_ext_command_lines_get_type (void) {
	static volatile gsize gitg_ext_command_lines_type_id__volatile = 0;
	if (g_once_init_enter (&gitg_ext_command_lines_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (GitgExtCommandLinesClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) gitg_ext_command_lines_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (GitgExtCommandLines), 0, (GInstanceInitFunc) gitg_ext_command_lines_instance_init, NULL };
		GType gitg_ext_command_lines_type_id;
		gitg_ext_command_lines_type_id = g_type_register_static (G_TYPE_OBJECT, "GitgExtCommandLines", &g_define_type_info, 0);
		g_once_init_leave (&gitg_ext_command_lines_type_id__volatile, gitg_ext_command_lines_type_id);
	}
	return gitg_ext_command_lines_type_id__volatile;
}


static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func) {
	if ((array != NULL) && (destroy_func != NULL)) {
		int i;
		for (i = 0; i < array_length; i = i + 1) {
			if (((gpointer*) array)[i] != NULL) {
				destroy_func (((gpointer*) array)[i]);
			}
		}
	}
}


static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func) {
	_vala_array_destroy (array, array_length, destroy_func);
	g_free (array);
}



