/* rygel-http-response-element.c generated by valac 0.40.8, the Vala compiler
 * generated from rygel-http-response-element.vala, do not modify */

/*
 * Copyright (C) 2013  Cable Television Laboratories, Inc.
 *
 * Author: Craig Pratt <craig@ecaspia.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 RYGEL_TYPE_HTTP_RESPONSE_ELEMENT (rygel_http_response_element_get_type ())
#define RYGEL_HTTP_RESPONSE_ELEMENT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), RYGEL_TYPE_HTTP_RESPONSE_ELEMENT, RygelHTTPResponseElement))
#define RYGEL_HTTP_RESPONSE_ELEMENT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), RYGEL_TYPE_HTTP_RESPONSE_ELEMENT, RygelHTTPResponseElementClass))
#define RYGEL_IS_HTTP_RESPONSE_ELEMENT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), RYGEL_TYPE_HTTP_RESPONSE_ELEMENT))
#define RYGEL_IS_HTTP_RESPONSE_ELEMENT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), RYGEL_TYPE_HTTP_RESPONSE_ELEMENT))
#define RYGEL_HTTP_RESPONSE_ELEMENT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), RYGEL_TYPE_HTTP_RESPONSE_ELEMENT, RygelHTTPResponseElementClass))

typedef struct _RygelHTTPResponseElement RygelHTTPResponseElement;
typedef struct _RygelHTTPResponseElementClass RygelHTTPResponseElementClass;
typedef struct _RygelHTTPResponseElementPrivate RygelHTTPResponseElementPrivate;

#define RYGEL_TYPE_HTTP_REQUEST (rygel_http_request_get_type ())
#define RYGEL_HTTP_REQUEST(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), RYGEL_TYPE_HTTP_REQUEST, RygelHTTPRequest))
#define RYGEL_HTTP_REQUEST_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), RYGEL_TYPE_HTTP_REQUEST, RygelHTTPRequestClass))
#define RYGEL_IS_HTTP_REQUEST(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), RYGEL_TYPE_HTTP_REQUEST))
#define RYGEL_IS_HTTP_REQUEST_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), RYGEL_TYPE_HTTP_REQUEST))
#define RYGEL_HTTP_REQUEST_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), RYGEL_TYPE_HTTP_REQUEST, RygelHTTPRequestClass))

typedef struct _RygelHTTPRequest RygelHTTPRequest;
typedef struct _RygelHTTPRequestClass RygelHTTPRequestClass;
enum  {
	RYGEL_HTTP_RESPONSE_ELEMENT_0_PROPERTY,
	RYGEL_HTTP_RESPONSE_ELEMENT_NUM_PROPERTIES
};
static GParamSpec* rygel_http_response_element_properties[RYGEL_HTTP_RESPONSE_ELEMENT_NUM_PROPERTIES];

struct _RygelHTTPResponseElement {
	GObject parent_instance;
	RygelHTTPResponseElementPrivate * priv;
};

struct _RygelHTTPResponseElementClass {
	GObjectClass parent_class;
	void (*add_response_headers) (RygelHTTPResponseElement* self, RygelHTTPRequest* request);
	gchar* (*to_string) (RygelHTTPResponseElement* self);
};


static gpointer rygel_http_response_element_parent_class = NULL;

GType rygel_http_response_element_get_type (void) G_GNUC_CONST;
GType rygel_http_request_get_type (void) G_GNUC_CONST;
#define RYGEL_HTTP_RESPONSE_ELEMENT_UNSPECIFIED ((gint64) -1)
void rygel_http_response_element_add_response_headers (RygelHTTPResponseElement* self,
                                                       RygelHTTPRequest* request);
static void rygel_http_response_element_real_add_response_headers (RygelHTTPResponseElement* self,
                                                            RygelHTTPRequest* request);
gchar* rygel_http_response_element_to_string (RygelHTTPResponseElement* self);
static gchar* rygel_http_response_element_real_to_string (RygelHTTPResponseElement* self);
RygelHTTPResponseElement* rygel_http_response_element_construct (GType object_type);


/**
     * Set the type-appropriate headers on the associated HTTP Message
     */
static void
rygel_http_response_element_real_add_response_headers (RygelHTTPResponseElement* self,
                                                       RygelHTTPRequest* request)
{
	g_critical ("Type `%s' does not implement abstract method `rygel_http_response_element_add_response_headers'", g_type_name (G_TYPE_FROM_INSTANCE (self)));
	return;
}


void
rygel_http_response_element_add_response_headers (RygelHTTPResponseElement* self,
                                                  RygelHTTPRequest* request)
{
	g_return_if_fail (self != NULL);
	RYGEL_HTTP_RESPONSE_ELEMENT_GET_CLASS (self)->add_response_headers (self, request);
}


static gchar*
rygel_http_response_element_real_to_string (RygelHTTPResponseElement* self)
{
	g_critical ("Type `%s' does not implement abstract method `rygel_http_response_element_to_string'", g_type_name (G_TYPE_FROM_INSTANCE (self)));
	return NULL;
}


gchar*
rygel_http_response_element_to_string (RygelHTTPResponseElement* self)
{
	g_return_val_if_fail (self != NULL, NULL);
	return RYGEL_HTTP_RESPONSE_ELEMENT_GET_CLASS (self)->to_string (self);
}


RygelHTTPResponseElement*
rygel_http_response_element_construct (GType object_type)
{
	RygelHTTPResponseElement * self = NULL;
	self = (RygelHTTPResponseElement*) g_object_new (object_type, NULL);
	return self;
}


static void
rygel_http_response_element_class_init (RygelHTTPResponseElementClass * klass)
{
	rygel_http_response_element_parent_class = g_type_class_peek_parent (klass);
	((RygelHTTPResponseElementClass *) klass)->add_response_headers = (void (*) (RygelHTTPResponseElement *, RygelHTTPRequest*)) rygel_http_response_element_real_add_response_headers;
	((RygelHTTPResponseElementClass *) klass)->to_string = (gchar* (*) (RygelHTTPResponseElement *)) rygel_http_response_element_real_to_string;
}


static void
rygel_http_response_element_instance_init (RygelHTTPResponseElement * self)
{
}


/**
 * This abstract class represents an entity that can contribute response headers to a
 * HTTP request.
 */
GType
rygel_http_response_element_get_type (void)
{
	static volatile gsize rygel_http_response_element_type_id__volatile = 0;
	if (g_once_init_enter (&rygel_http_response_element_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (RygelHTTPResponseElementClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) rygel_http_response_element_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (RygelHTTPResponseElement), 0, (GInstanceInitFunc) rygel_http_response_element_instance_init, NULL };
		GType rygel_http_response_element_type_id;
		rygel_http_response_element_type_id = g_type_register_static (G_TYPE_OBJECT, "RygelHTTPResponseElement", &g_define_type_info, G_TYPE_FLAG_ABSTRACT);
		g_once_init_leave (&rygel_http_response_element_type_id__volatile, rygel_http_response_element_type_id);
	}
	return rygel_http_response_element_type_id__volatile;
}



