Blame gio/gsocks4proxy.c

Packit ae235b
 /* GIO - GLib Input, Output and Streaming Library
Packit ae235b
 *
Packit ae235b
 * Copyright (C) 2010 Collabora, Ltd.
Packit ae235b
 *
Packit ae235b
 * This library is free software; you can redistribute it and/or
Packit ae235b
 * modify it under the terms of the GNU Lesser General Public
Packit ae235b
 * License as published by the Free Software Foundation; either
Packit ae235b
 * version 2.1 of the License, or (at your option) any later version.
Packit ae235b
 *
Packit ae235b
 * This library is distributed in the hope that it will be useful,
Packit ae235b
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
Packit ae235b
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
Packit ae235b
 * Lesser General Public License for more details.
Packit ae235b
 *
Packit ae235b
 * You should have received a copy of the GNU Lesser General
Packit ae235b
 * Public License along with this library; if not, see <http://www.gnu.org/licenses/>.
Packit ae235b
 *
Packit ae235b
 * Author: Nicolas Dufresne <nicolas.dufresne@collabora.co.uk>
Packit ae235b
 */
Packit ae235b
Packit ae235b
#include "config.h"
Packit ae235b
Packit ae235b
#include "gsocks4proxy.h"
Packit ae235b
Packit ae235b
#include "giomodule.h"
Packit ae235b
#include "giomodule-priv.h"
Packit ae235b
#include "gproxy.h"
Packit ae235b
#include "gsocks4aproxy.h"
Packit ae235b
Packit ae235b
struct _GSocks4Proxy
Packit ae235b
{
Packit ae235b
  GSocks4aProxy parent;
Packit ae235b
};
Packit ae235b
Packit ae235b
struct _GSocks4ProxyClass
Packit ae235b
{
Packit ae235b
  GSocks4aProxyClass parent_class;
Packit ae235b
};
Packit ae235b
Packit ae235b
#define g_socks4_proxy_get_type _g_socks4_proxy_get_type
Packit ae235b
G_DEFINE_TYPE_WITH_CODE (GSocks4Proxy, g_socks4_proxy, G_TYPE_SOCKS4A_PROXY,
Packit ae235b
			 _g_io_modules_ensure_extension_points_registered ();
Packit ae235b
			 g_io_extension_point_implement (G_PROXY_EXTENSION_POINT_NAME,
Packit ae235b
							 g_define_type_id,
Packit ae235b
							 "socks4",
Packit ae235b
							 0))
Packit ae235b
Packit ae235b
static void
Packit ae235b
g_socks4_proxy_finalize (GObject *object)
Packit ae235b
{
Packit ae235b
  /* must chain up */
Packit ae235b
  G_OBJECT_CLASS (g_socks4_proxy_parent_class)->finalize (object);
Packit ae235b
}
Packit ae235b
Packit ae235b
static void
Packit ae235b
g_socks4_proxy_init (GSocks4Proxy *proxy)
Packit ae235b
{
Packit ae235b
  G_SOCKS4A_PROXY (proxy)->supports_hostname = FALSE;
Packit ae235b
}
Packit ae235b
Packit ae235b
Packit ae235b
static void
Packit ae235b
g_socks4_proxy_class_init (GSocks4ProxyClass *class)
Packit ae235b
{
Packit ae235b
  GObjectClass *object_class;
Packit ae235b
Packit ae235b
  object_class = (GObjectClass *) class;
Packit ae235b
  object_class->finalize = g_socks4_proxy_finalize;
Packit ae235b
}