/* moonshot-logger.c generated by valac 0.34.9, the Vala compiler
 * generated from moonshot-logger.vala, do not modify */

/*
 * Copyright (c) 2011-2016, JANET(UK)
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 *
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 *
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 *
 * 3. Neither the name of JANET(UK) nor the names of its contributors
 *    may be used to endorse or promote products derived from this software
 *    without specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 * SUCH DAMAGE.
 */

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


#define TYPE_MOONSHOT_LOGGER (moonshot_logger_get_type ())
#define MOONSHOT_LOGGER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_MOONSHOT_LOGGER, MoonshotLogger))
#define MOONSHOT_LOGGER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_MOONSHOT_LOGGER, MoonshotLoggerClass))
#define IS_MOONSHOT_LOGGER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_MOONSHOT_LOGGER))
#define IS_MOONSHOT_LOGGER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_MOONSHOT_LOGGER))
#define MOONSHOT_LOGGER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_MOONSHOT_LOGGER, MoonshotLoggerClass))

typedef struct _MoonshotLogger MoonshotLogger;
typedef struct _MoonshotLoggerClass MoonshotLoggerClass;
typedef struct _MoonshotLoggerPrivate MoonshotLoggerPrivate;

struct _MoonshotLogger {
	GObject parent_instance;
	MoonshotLoggerPrivate * priv;
};

struct _MoonshotLoggerClass {
	GObjectClass parent_class;
};


static gpointer moonshot_logger_parent_class = NULL;

GType moonshot_logger_get_type (void) G_GNUC_CONST;
MoonshotLogger* get_logger (const gchar* name);
MoonshotLogger* moonshot_logger_new (const gchar* name);
MoonshotLogger* moonshot_logger_construct (GType object_type, const gchar* name);
enum  {
	MOONSHOT_LOGGER_DUMMY_PROPERTY
};
void moonshot_logger_trace (MoonshotLogger* self, const gchar* message, GError* e);
void moonshot_logger_debug (MoonshotLogger* self, const gchar* message, GError* e);
void moonshot_logger_info (MoonshotLogger* self, const gchar* message, GError* e);
void moonshot_logger_warn (MoonshotLogger* self, const gchar* message, GError* e);
void moonshot_logger_error (MoonshotLogger* self, const gchar* message, GError* e);
void moonshot_logger_fatal (MoonshotLogger* self, const gchar* message, GError* e);


MoonshotLogger* get_logger (const gchar* name) {
	MoonshotLogger* result = NULL;
	const gchar* _tmp0_ = NULL;
	MoonshotLogger* _tmp1_ = NULL;
#line 34 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-logger.vala"
	g_return_val_if_fail (name != NULL, NULL);
#line 35 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-logger.vala"
	_tmp0_ = name;
#line 35 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-logger.vala"
	_tmp1_ = moonshot_logger_new (_tmp0_);
#line 35 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-logger.vala"
	result = _tmp1_;
#line 35 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-logger.vala"
	return result;
#line 95 "moonshot-logger.c"
}


MoonshotLogger* moonshot_logger_construct (GType object_type, const gchar* name) {
	MoonshotLogger * self = NULL;
#line 133 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-logger.vala"
	g_return_val_if_fail (name != NULL, NULL);
#line 133 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-logger.vala"
	self = (MoonshotLogger*) g_object_new (object_type, NULL);
#line 133 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-logger.vala"
	return self;
#line 107 "moonshot-logger.c"
}


MoonshotLogger* moonshot_logger_new (const gchar* name) {
#line 133 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-logger.vala"
	return moonshot_logger_construct (TYPE_MOONSHOT_LOGGER, name);
#line 114 "moonshot-logger.c"
}


/**
     * Log a trace message.
     * @param message log message
     * @param e optional Error to be logged
     */
void moonshot_logger_trace (MoonshotLogger* self, const gchar* message, GError* e) {
#line 141 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-logger.vala"
	g_return_if_fail (self != NULL);
#line 141 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-logger.vala"
	g_return_if_fail (message != NULL);
#line 128 "moonshot-logger.c"
}


/**
     * Log a debug message.
     * @param message log message
     * @param e optional Error to be logged
     */
void moonshot_logger_debug (MoonshotLogger* self, const gchar* message, GError* e) {
#line 150 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-logger.vala"
	g_return_if_fail (self != NULL);
#line 150 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-logger.vala"
	g_return_if_fail (message != NULL);
#line 142 "moonshot-logger.c"
}


/**
     * Log an info message.
     * @param e optional Error to be logged
     */
void moonshot_logger_info (MoonshotLogger* self, const gchar* message, GError* e) {
#line 158 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-logger.vala"
	g_return_if_fail (self != NULL);
#line 158 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-logger.vala"
	g_return_if_fail (message != NULL);
#line 155 "moonshot-logger.c"
}


/**
     * Log a warning message.
     * @param message log message
     * @param e optional Error to be logged
     */
void moonshot_logger_warn (MoonshotLogger* self, const gchar* message, GError* e) {
#line 166 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-logger.vala"
	g_return_if_fail (self != NULL);
#line 166 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-logger.vala"
	g_return_if_fail (message != NULL);
#line 169 "moonshot-logger.c"
}


/**
     * Log an error message.
     * @param message log message
     * @param e optional Error to be logged
     */
void moonshot_logger_error (MoonshotLogger* self, const gchar* message, GError* e) {
#line 174 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-logger.vala"
	g_return_if_fail (self != NULL);
#line 174 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-logger.vala"
	g_return_if_fail (message != NULL);
#line 183 "moonshot-logger.c"
}


/**
     * Log a fatal message.
     * @param message log message
     * @param e optional Error to be logged
     */
void moonshot_logger_fatal (MoonshotLogger* self, const gchar* message, GError* e) {
#line 182 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-logger.vala"
	g_return_if_fail (self != NULL);
#line 182 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-logger.vala"
	g_return_if_fail (message != NULL);
#line 197 "moonshot-logger.c"
}


static void moonshot_logger_class_init (MoonshotLoggerClass * klass) {
#line 131 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-logger.vala"
	moonshot_logger_parent_class = g_type_class_peek_parent (klass);
#line 204 "moonshot-logger.c"
}


static void moonshot_logger_instance_init (MoonshotLogger * self) {
}


/** Logger that currently does nothing, but may eventually write to stdout or a file if enabled */
GType moonshot_logger_get_type (void) {
	static volatile gsize moonshot_logger_type_id__volatile = 0;
	if (g_once_init_enter (&moonshot_logger_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (MoonshotLoggerClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) moonshot_logger_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (MoonshotLogger), 0, (GInstanceInitFunc) moonshot_logger_instance_init, NULL };
		GType moonshot_logger_type_id;
		moonshot_logger_type_id = g_type_register_static (G_TYPE_OBJECT, "MoonshotLogger", &g_define_type_info, 0);
		g_once_init_leave (&moonshot_logger_type_id__volatile, moonshot_logger_type_id);
	}
	return moonshot_logger_type_id__volatile;
}



