/src/glib/gio/gsocks4proxy.c
Line | Count | Source (jump to first uncovered line) |
1 | | /* GIO - GLib Input, Output and Streaming Library |
2 | | * |
3 | | * Copyright (C) 2010 Collabora, Ltd. |
4 | | * |
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.1 of the License, or (at your option) any later version. |
9 | | * |
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. |
14 | | * |
15 | | * You should have received a copy of the GNU Lesser General |
16 | | * Public License along with this library; if not, see <http://www.gnu.org/licenses/>. |
17 | | * |
18 | | * Author: Nicolas Dufresne <nicolas.dufresne@collabora.co.uk> |
19 | | */ |
20 | | |
21 | | #include "config.h" |
22 | | |
23 | | #include "gsocks4proxy.h" |
24 | | |
25 | | #include "giomodule.h" |
26 | | #include "giomodule-priv.h" |
27 | | #include "gproxy.h" |
28 | | #include "gsocks4aproxy.h" |
29 | | |
30 | | struct _GSocks4Proxy |
31 | | { |
32 | | GSocks4aProxy parent; |
33 | | }; |
34 | | |
35 | | struct _GSocks4ProxyClass |
36 | | { |
37 | | GSocks4aProxyClass parent_class; |
38 | | }; |
39 | | |
40 | | #define g_socks4_proxy_get_type _g_socks4_proxy_get_type |
41 | | G_DEFINE_TYPE_WITH_CODE (GSocks4Proxy, g_socks4_proxy, G_TYPE_SOCKS4A_PROXY, |
42 | | _g_io_modules_ensure_extension_points_registered (); |
43 | | g_io_extension_point_implement (G_PROXY_EXTENSION_POINT_NAME, |
44 | | g_define_type_id, |
45 | | "socks4", |
46 | | 0)) |
47 | | |
48 | | static void |
49 | | g_socks4_proxy_finalize (GObject *object) |
50 | 0 | { |
51 | | /* must chain up */ |
52 | 0 | G_OBJECT_CLASS (g_socks4_proxy_parent_class)->finalize (object); |
53 | 0 | } |
54 | | |
55 | | static void |
56 | | g_socks4_proxy_init (GSocks4Proxy *proxy) |
57 | 0 | { |
58 | 0 | G_SOCKS4A_PROXY (proxy)->supports_hostname = FALSE; |
59 | 0 | } |
60 | | |
61 | | |
62 | | static void |
63 | | g_socks4_proxy_class_init (GSocks4ProxyClass *class) |
64 | 0 | { |
65 | 0 | GObjectClass *object_class; |
66 | |
|
67 | 0 | object_class = (GObjectClass *) class; |
68 | 0 | object_class->finalize = g_socks4_proxy_finalize; |
69 | 0 | } |