/*
 * Copyright (C) 2012 - Juan Ferrer Toribio
 *
 * 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/>.
 */

#ifndef GVN_VALUE_H
#define GVN_VALUE_H

#include <glib-object.h>
#include "gvn-null.h"

#define gvn_value_compare(a, b)		(!gvn_value_compare0 (a, b))
#define gvn_value_is_null(value)	(G_VALUE_TYPE (value) == GVN_TYPE_NULL)

GValue *	gvn_value_new				(GType type);
void		gvn_value_new_with_content	(GValue * value, GType type, gpointer content);
void		gvn_value_new_from_string	(GValue * value, GType type, const gchar * string, gsize length);
void		gvn_value_set_null			(GValue * value);
void		gvn_value_get_valist		(const GValue * value, va_list va);
gint		gvn_value_compare0			(const GValue * a, const GValue * b);
void		gvn_value_copy				(const GValue * src, GValue * dst);
gboolean	gvn_value_ccopy				(const GValue * src, GValue * dst);
void		gvn_value_to_format_string	(const GValue * src, const gchar * format, GValue * dst);
void		gvn_type_init				();

#endif