/* rygel-ruih-wildcard-filter-entry.c generated by valac 0.30.0.35-2c9e8, the Vala compiler
 * generated from rygel-ruih-wildcard-filter-entry.vala, do not modify */

/*
 * Copyright (C) 2013  Cable Television Laboratories, Inc.
 *
 * Author: Neha Shanbhag <N.Shanbhag@cablelabs.com>
 * Contact: http://www.cablelabs.com/
 *
 * This file is part of Rygel.
 *
 * Rygel is free software; you can redistribute it and/or modify
 * it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * Rygel 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
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 */

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


#define TYPE_FILTER_ENTRY (filter_entry_get_type ())
#define FILTER_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_FILTER_ENTRY, FilterEntry))
#define FILTER_ENTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_FILTER_ENTRY, FilterEntryClass))
#define IS_FILTER_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_FILTER_ENTRY))
#define IS_FILTER_ENTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_FILTER_ENTRY))
#define FILTER_ENTRY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_FILTER_ENTRY, FilterEntryClass))

typedef struct _FilterEntry FilterEntry;
typedef struct _FilterEntryClass FilterEntryClass;
typedef struct _FilterEntryPrivate FilterEntryPrivate;

#define TYPE_WILD_CARD_FILTER_ENTRY (wild_card_filter_entry_get_type ())
#define WILD_CARD_FILTER_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_WILD_CARD_FILTER_ENTRY, WildCardFilterEntry))
#define WILD_CARD_FILTER_ENTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_WILD_CARD_FILTER_ENTRY, WildCardFilterEntryClass))
#define IS_WILD_CARD_FILTER_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_WILD_CARD_FILTER_ENTRY))
#define IS_WILD_CARD_FILTER_ENTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_WILD_CARD_FILTER_ENTRY))
#define WILD_CARD_FILTER_ENTRY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_WILD_CARD_FILTER_ENTRY, WildCardFilterEntryClass))

typedef struct _WildCardFilterEntry WildCardFilterEntry;
typedef struct _WildCardFilterEntryClass WildCardFilterEntryClass;
typedef struct _WildCardFilterEntryPrivate WildCardFilterEntryPrivate;

struct _FilterEntry {
	GTypeInstance parent_instance;
	volatile int ref_count;
	FilterEntryPrivate * priv;
};

struct _FilterEntryClass {
	GTypeClass parent_class;
	void (*finalize) (FilterEntry *self);
	gboolean (*matches) (FilterEntry* self, const gchar* name, const gchar* value);
};

struct _WildCardFilterEntry {
	FilterEntry parent_instance;
	WildCardFilterEntryPrivate * priv;
};

struct _WildCardFilterEntryClass {
	FilterEntryClass parent_class;
};


static gpointer wild_card_filter_entry_parent_class = NULL;

gpointer filter_entry_ref (gpointer instance);
void filter_entry_unref (gpointer instance);
GParamSpec* param_spec_filter_entry (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
void value_set_filter_entry (GValue* value, gpointer v_object);
void value_take_filter_entry (GValue* value, gpointer v_object);
gpointer value_get_filter_entry (const GValue* value);
GType filter_entry_get_type (void) G_GNUC_CONST;
GType wild_card_filter_entry_get_type (void) G_GNUC_CONST;
enum  {
	WILD_CARD_FILTER_ENTRY_DUMMY_PROPERTY
};
WildCardFilterEntry* wild_card_filter_entry_new (void);
WildCardFilterEntry* wild_card_filter_entry_construct (GType object_type);
FilterEntry* filter_entry_new (const gchar* name, const gchar* value);
FilterEntry* filter_entry_construct (GType object_type, const gchar* name, const gchar* value);
static gboolean wild_card_filter_entry_real_matches (FilterEntry* base, const gchar* name, const gchar* value);


WildCardFilterEntry* wild_card_filter_entry_construct (GType object_type) {
	WildCardFilterEntry* self = NULL;
	self = (WildCardFilterEntry*) filter_entry_construct (object_type, "*", "*");
	return self;
}


WildCardFilterEntry* wild_card_filter_entry_new (void) {
	return wild_card_filter_entry_construct (TYPE_WILD_CARD_FILTER_ENTRY);
}


static gboolean wild_card_filter_entry_real_matches (FilterEntry* base, const gchar* name, const gchar* value) {
	WildCardFilterEntry * self;
	gboolean result = FALSE;
	self = (WildCardFilterEntry*) base;
	g_return_val_if_fail (name != NULL, FALSE);
	g_return_val_if_fail (value != NULL, FALSE);
	result = TRUE;
	return result;
}


static void wild_card_filter_entry_class_init (WildCardFilterEntryClass * klass) {
	wild_card_filter_entry_parent_class = g_type_class_peek_parent (klass);
	((FilterEntryClass *) klass)->matches = wild_card_filter_entry_real_matches;
}


static void wild_card_filter_entry_instance_init (WildCardFilterEntry * self) {
}


GType wild_card_filter_entry_get_type (void) {
	static volatile gsize wild_card_filter_entry_type_id__volatile = 0;
	if (g_once_init_enter (&wild_card_filter_entry_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (WildCardFilterEntryClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) wild_card_filter_entry_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (WildCardFilterEntry), 0, (GInstanceInitFunc) wild_card_filter_entry_instance_init, NULL };
		GType wild_card_filter_entry_type_id;
		wild_card_filter_entry_type_id = g_type_register_static (TYPE_FILTER_ENTRY, "WildCardFilterEntry", &g_define_type_info, 0);
		g_once_init_leave (&wild_card_filter_entry_type_id__volatile, wild_card_filter_entry_type_id);
	}
	return wild_card_filter_entry_type_id__volatile;
}



