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

/*
 * This file is part of gitg
 *
 * Copyright (C) 2012 - 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>


#define GITG_TYPE_REF (gitg_ref_get_type ())
#define GITG_REF(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GITG_TYPE_REF, GitgRef))
#define GITG_IS_REF(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GITG_TYPE_REF))
#define GITG_REF_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), GITG_TYPE_REF, GitgRefIface))

typedef struct _GitgRef GitgRef;
typedef struct _GitgRefIface GitgRefIface;

#define GITG_TYPE_REPOSITORY (gitg_repository_get_type ())
#define GITG_REPOSITORY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GITG_TYPE_REPOSITORY, GitgRepository))
#define GITG_REPOSITORY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GITG_TYPE_REPOSITORY, GitgRepositoryClass))
#define GITG_IS_REPOSITORY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GITG_TYPE_REPOSITORY))
#define GITG_IS_REPOSITORY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GITG_TYPE_REPOSITORY))
#define GITG_REPOSITORY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GITG_TYPE_REPOSITORY, GitgRepositoryClass))

typedef struct _GitgRepository GitgRepository;
typedef struct _GitgRepositoryClass GitgRepositoryClass;

#define GITG_TYPE_PARSED_REF_NAME (gitg_parsed_ref_name_get_type ())
#define GITG_PARSED_REF_NAME(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GITG_TYPE_PARSED_REF_NAME, GitgParsedRefName))
#define GITG_PARSED_REF_NAME_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GITG_TYPE_PARSED_REF_NAME, GitgParsedRefNameClass))
#define GITG_IS_PARSED_REF_NAME(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GITG_TYPE_PARSED_REF_NAME))
#define GITG_IS_PARSED_REF_NAME_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GITG_TYPE_PARSED_REF_NAME))
#define GITG_PARSED_REF_NAME_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GITG_TYPE_PARSED_REF_NAME, GitgParsedRefNameClass))

typedef struct _GitgParsedRefName GitgParsedRefName;
typedef struct _GitgParsedRefNameClass GitgParsedRefNameClass;

#define GITG_TYPE_REF_STATE (gitg_ref_state_get_type ())

#define GITG_TYPE_BRANCH (gitg_branch_get_type ())
#define GITG_BRANCH(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GITG_TYPE_BRANCH, GitgBranch))
#define GITG_IS_BRANCH(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GITG_TYPE_BRANCH))
#define GITG_BRANCH_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), GITG_TYPE_BRANCH, GitgBranchIface))

typedef struct _GitgBranch GitgBranch;
typedef struct _GitgBranchIface GitgBranchIface;

typedef enum  {
	GITG_REF_STATE_NONE,
	GITG_REF_STATE_SELECTED,
	GITG_REF_STATE_PRELIGHT
} GitgRefState;

struct _GitgRefIface {
	GTypeInterface parent_iface;
	GitgRepository* (*get_owner) (GitgRef* self);
	GitgParsedRefName* (*get_d_parsed_name) (GitgRef* self);
	void (*set_d_parsed_name) (GitgRef* self, GitgParsedRefName* value);
	GList* (*get_d_pushes) (GitgRef* self);
	void (*set_d_pushes) (GitgRef* self, GList* value);
	GitgRefState (*get_state) (GitgRef* self);
	void (*set_state) (GitgRef* self, GitgRefState value);
	gboolean (*get_working) (GitgRef* self);
	void (*set_working) (GitgRef* self, gboolean value);
};

struct _GitgBranchIface {
	GTypeInterface parent_iface;
	GitgRef* (*get_upstream) (GitgBranch* self, GError** error);
};



GType gitg_repository_get_type (void) G_GNUC_CONST;
GType gitg_parsed_ref_name_get_type (void) G_GNUC_CONST;
GType gitg_ref_state_get_type (void) G_GNUC_CONST;
GType gitg_ref_get_type (void) G_GNUC_CONST;
GType gitg_branch_get_type (void) G_GNUC_CONST;
GitgRef* gitg_branch_get_upstream (GitgBranch* self, GError** error);


GitgRef* gitg_branch_get_upstream (GitgBranch* self, GError** error) {
#line 24 "/home/jesse/dev/gitg/libgitg/gitg-branch.vala"
	g_return_val_if_fail (self != NULL, NULL);
#line 24 "/home/jesse/dev/gitg/libgitg/gitg-branch.vala"
	return GITG_BRANCH_GET_INTERFACE (self)->get_upstream (self, error);
#line 106 "gitg-branch.c"
}


static void gitg_branch_base_init (GitgBranchIface * iface) {
#line 22 "/home/jesse/dev/gitg/libgitg/gitg-branch.vala"
	static gboolean initialized = FALSE;
#line 22 "/home/jesse/dev/gitg/libgitg/gitg-branch.vala"
	if (!initialized) {
#line 22 "/home/jesse/dev/gitg/libgitg/gitg-branch.vala"
		initialized = TRUE;
#line 117 "gitg-branch.c"
	}
}


GType gitg_branch_get_type (void) {
	static volatile gsize gitg_branch_type_id__volatile = 0;
	if (g_once_init_enter (&gitg_branch_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (GitgBranchIface), (GBaseInitFunc) gitg_branch_base_init, (GBaseFinalizeFunc) NULL, (GClassInitFunc) NULL, (GClassFinalizeFunc) NULL, NULL, 0, 0, (GInstanceInitFunc) NULL, NULL };
		GType gitg_branch_type_id;
		gitg_branch_type_id = g_type_register_static (G_TYPE_INTERFACE, "GitgBranch", &g_define_type_info, 0);
		g_type_interface_add_prerequisite (gitg_branch_type_id, ggit_branch_get_type ());
		g_type_interface_add_prerequisite (gitg_branch_type_id, GITG_TYPE_REF);
		g_once_init_leave (&gitg_branch_type_id__volatile, gitg_branch_type_id);
	}
	return gitg_branch_type_id__volatile;
}



