Improvde #include order consistency
[glib.git] / gio / gsocks4proxy.c
blob05c74c8daf66f5260af2904edf7a503bb4016664
1 /* GIO - GLib Input, Output and Streaming Library
3 * Copyright (C) 2010 Collabora, Ltd.
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public
7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version.
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Lesser General Public License for more details.
15 * You should have received a copy of the GNU Lesser General
16 * Public License along with this library; if not, write to the
17 * Free Software Foundation, Inc., 59 Temple Place, Suite 330,
18 * Boston, MA 02111-1307, USA.
20 * Author: Nicolas Dufresne <nicolas.dufresne@collabora.co.uk>
23 #include "config.h"
25 #include "gsocks4proxy.h"
27 #include "giomodule.h"
28 #include "giomodule-priv.h"
29 #include "gproxy.h"
30 #include "gsocks4aproxy.h"
32 struct _GSocks4Proxy
34 GSocks4aProxy parent;
37 struct _GSocks4ProxyClass
39 GSocks4aProxyClass parent_class;
42 #define g_socks4_proxy_get_type _g_socks4_proxy_get_type
43 G_DEFINE_TYPE_WITH_CODE (GSocks4Proxy, g_socks4_proxy, G_TYPE_SOCKS4A_PROXY,
44 _g_io_modules_ensure_extension_points_registered ();
45 g_io_extension_point_implement (G_PROXY_EXTENSION_POINT_NAME,
46 g_define_type_id,
47 "socks4",
48 0))
50 static void
51 g_socks4_proxy_finalize (GObject *object)
53 /* must chain up */
54 G_OBJECT_CLASS (g_socks4_proxy_parent_class)->finalize (object);
57 static void
58 g_socks4_proxy_init (GSocks4Proxy *proxy)
60 G_SOCKS4A_PROXY (proxy)->supports_hostname = FALSE;
64 static void
65 g_socks4_proxy_class_init (GSocks4ProxyClass *class)
67 GObjectClass *object_class;
69 object_class = (GObjectClass *) class;
70 object_class->finalize = g_socks4_proxy_finalize;