/* rygel-http-seek.c generated by valac 0.56.1, the Vala compiler
 * generated from rygel-http-seek.vala, do not modify */

/*
 * Copyright (C) 2008-2009 Nokia Corporation.
 * Copyright (C) 2012 Intel Corporation.
 * Copyright (C) 2013 Cable Television Laboratories, Inc.
 *
 * Author: Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
 *                               <zeeshan.ali@nokia.com>
 *         Jens Georg <jensg@openismus.com>
 *         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 "rygel-server.h"
#include <libsoup/soup.h>
#include <glib.h>
#include <glib-object.h>
#include <string.h>

enum  {
	RYGEL_HTTP_SEEK_REQUEST_0_PROPERTY,
	RYGEL_HTTP_SEEK_REQUEST_NUM_PROPERTIES
};
static GParamSpec* rygel_http_seek_request_properties[RYGEL_HTTP_SEEK_REQUEST_NUM_PROPERTIES];

/**
 * Various errors that can be thrown when attempting to seek into a stream.
 *
 * Note: All codes must be set to Soup.Status codes
 */

static gpointer rygel_http_seek_request_parent_class = NULL;

static GType rygel_http_seek_request_get_type_once (void);
static inline gpointer _vala_memdup2 (gconstpointer mem,
                        gsize byte_size);

GQuark
rygel_http_seek_request_error_quark (void)
{
	return g_quark_from_static_string ("rygel-http-seek-request-error-quark");
}

static GType
rygel_http_seek_request_error_get_type_once (void)
{
	static const GEnumValue values[] = {{RYGEL_HTTP_SEEK_REQUEST_ERROR_INVALID_RANGE, "RYGEL_HTTP_SEEK_REQUEST_ERROR_INVALID_RANGE", "invalid-range"}, {RYGEL_HTTP_SEEK_REQUEST_ERROR_BAD_REQUEST, "RYGEL_HTTP_SEEK_REQUEST_ERROR_BAD_REQUEST", "bad-request"}, {RYGEL_HTTP_SEEK_REQUEST_ERROR_OUT_OF_RANGE, "RYGEL_HTTP_SEEK_REQUEST_ERROR_OUT_OF_RANGE", "out-of-range"}, {0, NULL, NULL}};
	GType rygel_http_seek_request_error_type_id;
	rygel_http_seek_request_error_type_id = g_enum_register_static ("RygelHTTPSeekRequestError", values);
	return rygel_http_seek_request_error_type_id;
}

GType
rygel_http_seek_request_error_get_type (void)
{
	static volatile gsize rygel_http_seek_request_error_type_id__once = 0;
	if (g_once_init_enter (&rygel_http_seek_request_error_type_id__once)) {
		GType rygel_http_seek_request_error_type_id;
		rygel_http_seek_request_error_type_id = rygel_http_seek_request_error_get_type_once ();
		g_once_init_leave (&rygel_http_seek_request_error_type_id__once, rygel_http_seek_request_error_type_id);
	}
	return rygel_http_seek_request_error_type_id__once;
}

RygelHTTPSeekRequest*
rygel_http_seek_request_construct (GType object_type)
{
	RygelHTTPSeekRequest * self = NULL;
	self = (RygelHTTPSeekRequest*) g_object_new (object_type, NULL);
	return self;
}

static void
rygel_http_seek_request_class_init (RygelHTTPSeekRequestClass * klass,
                                    gpointer klass_data)
{
	rygel_http_seek_request_parent_class = g_type_class_peek_parent (klass);
}

static void
rygel_http_seek_request_instance_init (RygelHTTPSeekRequest * self,
                                       gpointer klass)
{
}

/**
 * HTTPSeekRequest is an abstract base for a variety of seek request types.
 */
static GType
rygel_http_seek_request_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (RygelHTTPSeekRequestClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) rygel_http_seek_request_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (RygelHTTPSeekRequest), 0, (GInstanceInitFunc) rygel_http_seek_request_instance_init, NULL };
	GType rygel_http_seek_request_type_id;
	rygel_http_seek_request_type_id = g_type_register_static (G_TYPE_OBJECT, "RygelHTTPSeekRequest", &g_define_type_info, G_TYPE_FLAG_ABSTRACT);
	return rygel_http_seek_request_type_id;
}

GType
rygel_http_seek_request_get_type (void)
{
	static volatile gsize rygel_http_seek_request_type_id__once = 0;
	if (g_once_init_enter (&rygel_http_seek_request_type_id__once)) {
		GType rygel_http_seek_request_type_id;
		rygel_http_seek_request_type_id = rygel_http_seek_request_get_type_once ();
		g_once_init_leave (&rygel_http_seek_request_type_id__once, rygel_http_seek_request_type_id);
	}
	return rygel_http_seek_request_type_id__once;
}

static inline gpointer
_vala_memdup2 (gconstpointer mem,
               gsize byte_size)
{
	gpointer new_mem;
	if (mem && byte_size != 0) {
		new_mem = g_malloc (byte_size);
		memcpy (new_mem, mem, byte_size);
	} else {
		new_mem = NULL;
	}
	return new_mem;
}

