/* EventParser.c generated by valac 0.56.19, the Vala compiler
 * generated from EventParser.vala, do not modify */

/*-
 * Copyright (c) 2011-2015 elementary LLC
 *
 * This program 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 3 of the License, or
 * (at your option) any later version.
 * 
 * This program 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 this program.  If not, see <http://www.gnu.org/licenses/>.
 *
 * Authored by: Mario Guerriero <marioguerriero33@gmail.com>
 */

#include <glib-object.h>
#include <stdlib.h>
#include <string.h>
#include <glib.h>

#if !defined(VALA_STRICT_C)
#if !defined(__clang__) && defined(__GNUC__) && (__GNUC__ >= 14)
#pragma GCC diagnostic warning "-Wincompatible-pointer-types"
#elif defined(__clang__) && (__clang_major__ >= 16)
#pragma clang diagnostic ignored "-Wincompatible-function-pointer-types"
#pragma clang diagnostic ignored "-Wincompatible-pointer-types"
#endif
#endif
#if !defined(VALA_EXTERN)
#if defined(_MSC_VER)
#define VALA_EXTERN __declspec(dllexport) extern
#elif __GNUC__ >= 4
#define VALA_EXTERN __attribute__((visibility("default"))) extern
#else
#define VALA_EXTERN extern
#endif
#endif

#define MAYA_SERVICES_TYPE_EVENT_PARSER (maya_services_event_parser_get_type ())
#define MAYA_SERVICES_EVENT_PARSER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), MAYA_SERVICES_TYPE_EVENT_PARSER, MayaServicesEventParser))
#define MAYA_SERVICES_IS_EVENT_PARSER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), MAYA_SERVICES_TYPE_EVENT_PARSER))
#define MAYA_SERVICES_EVENT_PARSER_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), MAYA_SERVICES_TYPE_EVENT_PARSER, MayaServicesEventParserIface))

typedef struct _MayaServicesEventParser MayaServicesEventParser;
typedef struct _MayaServicesEventParserIface MayaServicesEventParserIface;

#define MAYA_SERVICES_TYPE_PARSED_EVENT (maya_services_parsed_event_get_type ())
#define MAYA_SERVICES_PARSED_EVENT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), MAYA_SERVICES_TYPE_PARSED_EVENT, MayaServicesParsedEvent))
#define MAYA_SERVICES_PARSED_EVENT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), MAYA_SERVICES_TYPE_PARSED_EVENT, MayaServicesParsedEventClass))
#define MAYA_SERVICES_IS_PARSED_EVENT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), MAYA_SERVICES_TYPE_PARSED_EVENT))
#define MAYA_SERVICES_IS_PARSED_EVENT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), MAYA_SERVICES_TYPE_PARSED_EVENT))
#define MAYA_SERVICES_PARSED_EVENT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), MAYA_SERVICES_TYPE_PARSED_EVENT, MayaServicesParsedEventClass))

typedef struct _MayaServicesParsedEvent MayaServicesParsedEvent;
typedef struct _MayaServicesParsedEventClass MayaServicesParsedEventClass;

struct _MayaServicesEventParserIface {
	GTypeInterface parent_iface;
	MayaServicesParsedEvent* (*parse_source) (MayaServicesEventParser* self, const gchar* source);
	gchar* (*get_language) (MayaServicesEventParser* self);
};

VALA_EXTERN GType maya_services_parsed_event_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (MayaServicesParsedEvent, g_object_unref)
VALA_EXTERN GType maya_services_event_parser_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (MayaServicesEventParser, g_object_unref)
VALA_EXTERN MayaServicesParsedEvent* maya_services_event_parser_parse_source (MayaServicesEventParser* self,
                                                                  const gchar* source);
VALA_EXTERN gchar* maya_services_event_parser_get_language (MayaServicesEventParser* self);
static GType maya_services_event_parser_get_type_once (void);

MayaServicesParsedEvent*
maya_services_event_parser_parse_source (MayaServicesEventParser* self,
                                         const gchar* source)
{
	MayaServicesEventParserIface* _iface_;
	g_return_val_if_fail (self != NULL, NULL);
	_iface_ = MAYA_SERVICES_EVENT_PARSER_GET_INTERFACE (self);
	if (_iface_->parse_source) {
		return _iface_->parse_source (self, source);
	}
	return NULL;
}

gchar*
maya_services_event_parser_get_language (MayaServicesEventParser* self)
{
	MayaServicesEventParserIface* _iface_;
	g_return_val_if_fail (self != NULL, NULL);
	_iface_ = MAYA_SERVICES_EVENT_PARSER_GET_INTERFACE (self);
	if (_iface_->get_language) {
		return _iface_->get_language (self);
	}
	return NULL;
}

static void
maya_services_event_parser_default_init (MayaServicesEventParserIface * iface,
                                         gpointer iface_data)
{
}

static GType
maya_services_event_parser_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (MayaServicesEventParserIface), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) maya_services_event_parser_default_init, (GClassFinalizeFunc) NULL, NULL, 0, 0, (GInstanceInitFunc) NULL, NULL };
	GType maya_services_event_parser_type_id;
	maya_services_event_parser_type_id = g_type_register_static (G_TYPE_INTERFACE, "MayaServicesEventParser", &g_define_type_info, 0);
	g_type_interface_add_prerequisite (maya_services_event_parser_type_id, G_TYPE_OBJECT);
	return maya_services_event_parser_type_id;
}

GType
maya_services_event_parser_get_type (void)
{
	static volatile gsize maya_services_event_parser_type_id__once = 0;
	if (g_once_init_enter (&maya_services_event_parser_type_id__once)) {
		GType maya_services_event_parser_type_id;
		maya_services_event_parser_type_id = maya_services_event_parser_get_type_once ();
		g_once_init_leave (&maya_services_event_parser_type_id__once, maya_services_event_parser_type_id);
	}
	return maya_services_event_parser_type_id__once;
}

