Sat, 09 Aug 2025 17:37:27 +0800
Fix the birb header path
The birb header referred would only work with birb provided by wrap casuing
build to fail because of system-installed birb dependency. The commit points
it to the correct path <birb.h>.
See: https://keep.imfreedom.org/birb/birb/file/5bf00c7d7f80/birb/meson.build#l77
|
41318
56092ffeae95
Move PurpleProxyInfo from a boxed type to a GObject
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
1 | /* |
|
56092ffeae95
Move PurpleProxyInfo from a boxed type to a GObject
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
2 | * Purple - Internet Messaging Library |
|
56092ffeae95
Move PurpleProxyInfo from a boxed type to a GObject
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
3 | * Copyright (C) Pidgin Developers <devel@pidgin.im> |
|
56092ffeae95
Move PurpleProxyInfo from a boxed type to a GObject
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
4 | * |
|
42594
eddde70cedd8
Create a test for verifying license headers and correct the ones that were wrong
Gary Kramlich <grim@reaperworld.com>
parents:
42584
diff
changeset
|
5 | * Purple is the legal property of its developers, whose names are too numerous |
|
eddde70cedd8
Create a test for verifying license headers and correct the ones that were wrong
Gary Kramlich <grim@reaperworld.com>
parents:
42584
diff
changeset
|
6 | * to list here. Please refer to the COPYRIGHT file distributed with this |
|
eddde70cedd8
Create a test for verifying license headers and correct the ones that were wrong
Gary Kramlich <grim@reaperworld.com>
parents:
42584
diff
changeset
|
7 | * source distribution. |
|
41318
56092ffeae95
Move PurpleProxyInfo from a boxed type to a GObject
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
8 | * |
|
42594
eddde70cedd8
Create a test for verifying license headers and correct the ones that were wrong
Gary Kramlich <grim@reaperworld.com>
parents:
42584
diff
changeset
|
9 | * This library is free software; you can redistribute it and/or modify it |
|
eddde70cedd8
Create a test for verifying license headers and correct the ones that were wrong
Gary Kramlich <grim@reaperworld.com>
parents:
42584
diff
changeset
|
10 | * under the terms of the GNU General Public License as published by the Free |
|
eddde70cedd8
Create a test for verifying license headers and correct the ones that were wrong
Gary Kramlich <grim@reaperworld.com>
parents:
42584
diff
changeset
|
11 | * Software Foundation; either version 2 of the License, or (at your option) |
|
eddde70cedd8
Create a test for verifying license headers and correct the ones that were wrong
Gary Kramlich <grim@reaperworld.com>
parents:
42584
diff
changeset
|
12 | * any later version. |
|
41318
56092ffeae95
Move PurpleProxyInfo from a boxed type to a GObject
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
13 | * |
|
42594
eddde70cedd8
Create a test for verifying license headers and correct the ones that were wrong
Gary Kramlich <grim@reaperworld.com>
parents:
42584
diff
changeset
|
14 | * This library is distributed in the hope that it will be useful, but WITHOUT |
|
eddde70cedd8
Create a test for verifying license headers and correct the ones that were wrong
Gary Kramlich <grim@reaperworld.com>
parents:
42584
diff
changeset
|
15 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
|
eddde70cedd8
Create a test for verifying license headers and correct the ones that were wrong
Gary Kramlich <grim@reaperworld.com>
parents:
42584
diff
changeset
|
16 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for |
|
eddde70cedd8
Create a test for verifying license headers and correct the ones that were wrong
Gary Kramlich <grim@reaperworld.com>
parents:
42584
diff
changeset
|
17 | * more details. |
|
eddde70cedd8
Create a test for verifying license headers and correct the ones that were wrong
Gary Kramlich <grim@reaperworld.com>
parents:
42584
diff
changeset
|
18 | * |
|
eddde70cedd8
Create a test for verifying license headers and correct the ones that were wrong
Gary Kramlich <grim@reaperworld.com>
parents:
42584
diff
changeset
|
19 | * You should have received a copy of the GNU General Public License along with |
|
eddde70cedd8
Create a test for verifying license headers and correct the ones that were wrong
Gary Kramlich <grim@reaperworld.com>
parents:
42584
diff
changeset
|
20 | * this library; if not, see <https://www.gnu.org/licenses/>. |
|
41318
56092ffeae95
Move PurpleProxyInfo from a boxed type to a GObject
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
21 | */ |
|
56092ffeae95
Move PurpleProxyInfo from a boxed type to a GObject
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
22 | |
|
56092ffeae95
Move PurpleProxyInfo from a boxed type to a GObject
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
23 | #include "purpleproxyinfo.h" |
|
56092ffeae95
Move PurpleProxyInfo from a boxed type to a GObject
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
24 | |
|
56092ffeae95
Move PurpleProxyInfo from a boxed type to a GObject
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
25 | #include "purpleenums.h" |
|
56092ffeae95
Move PurpleProxyInfo from a boxed type to a GObject
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
26 | |
|
56092ffeae95
Move PurpleProxyInfo from a boxed type to a GObject
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
27 | struct _PurpleProxyInfo { |
|
43075
0639bc52668a
Fix formatting for PurpleProxyInfo
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
43071
diff
changeset
|
28 | GObject parent; |
|
41318
56092ffeae95
Move PurpleProxyInfo from a boxed type to a GObject
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
29 | |
|
43075
0639bc52668a
Fix formatting for PurpleProxyInfo
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
43071
diff
changeset
|
30 | PurpleProxyType proxy_type; |
|
0639bc52668a
Fix formatting for PurpleProxyInfo
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
43071
diff
changeset
|
31 | char *hostname; |
|
0639bc52668a
Fix formatting for PurpleProxyInfo
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
43071
diff
changeset
|
32 | int port; |
|
0639bc52668a
Fix formatting for PurpleProxyInfo
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
43071
diff
changeset
|
33 | char *username; |
|
0639bc52668a
Fix formatting for PurpleProxyInfo
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
43071
diff
changeset
|
34 | char *password; |
|
41318
56092ffeae95
Move PurpleProxyInfo from a boxed type to a GObject
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
35 | }; |
|
56092ffeae95
Move PurpleProxyInfo from a boxed type to a GObject
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
36 | |
|
56092ffeae95
Move PurpleProxyInfo from a boxed type to a GObject
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
37 | enum { |
|
43075
0639bc52668a
Fix formatting for PurpleProxyInfo
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
43071
diff
changeset
|
38 | PROP_0, |
|
0639bc52668a
Fix formatting for PurpleProxyInfo
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
43071
diff
changeset
|
39 | PROP_PROXY_TYPE, |
|
0639bc52668a
Fix formatting for PurpleProxyInfo
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
43071
diff
changeset
|
40 | PROP_HOSTNAME, |
|
0639bc52668a
Fix formatting for PurpleProxyInfo
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
43071
diff
changeset
|
41 | PROP_PORT, |
|
0639bc52668a
Fix formatting for PurpleProxyInfo
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
43071
diff
changeset
|
42 | PROP_USERNAME, |
|
0639bc52668a
Fix formatting for PurpleProxyInfo
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
43071
diff
changeset
|
43 | PROP_PASSWORD, |
|
0639bc52668a
Fix formatting for PurpleProxyInfo
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
43071
diff
changeset
|
44 | N_PROPERTIES, |
|
41318
56092ffeae95
Move PurpleProxyInfo from a boxed type to a GObject
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
45 | }; |
|
56092ffeae95
Move PurpleProxyInfo from a boxed type to a GObject
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
46 | static GParamSpec *properties[N_PROPERTIES] = {NULL, }; |
|
56092ffeae95
Move PurpleProxyInfo from a boxed type to a GObject
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
47 | |
|
42576
ab1ca778ddb2
Make sure all of the final types in libpurple are defined as such
Gary Kramlich <grim@reaperworld.com>
parents:
42303
diff
changeset
|
48 | G_DEFINE_FINAL_TYPE(PurpleProxyInfo, purple_proxy_info, G_TYPE_OBJECT) |
|
41318
56092ffeae95
Move PurpleProxyInfo from a boxed type to a GObject
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
49 | |
|
56092ffeae95
Move PurpleProxyInfo from a boxed type to a GObject
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
50 | /****************************************************************************** |
|
56092ffeae95
Move PurpleProxyInfo from a boxed type to a GObject
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
51 | * GObject Implementation |
|
56092ffeae95
Move PurpleProxyInfo from a boxed type to a GObject
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
52 | *****************************************************************************/ |
|
56092ffeae95
Move PurpleProxyInfo from a boxed type to a GObject
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
53 | static void |
|
56092ffeae95
Move PurpleProxyInfo from a boxed type to a GObject
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
54 | purple_proxy_info_get_property(GObject *obj, guint param_id, GValue *value, |
|
56092ffeae95
Move PurpleProxyInfo from a boxed type to a GObject
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
55 | GParamSpec *pspec) |
|
56092ffeae95
Move PurpleProxyInfo from a boxed type to a GObject
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
56 | { |
|
43075
0639bc52668a
Fix formatting for PurpleProxyInfo
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
43071
diff
changeset
|
57 | PurpleProxyInfo *info = PURPLE_PROXY_INFO(obj); |
|
41318
56092ffeae95
Move PurpleProxyInfo from a boxed type to a GObject
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
58 | |
|
43075
0639bc52668a
Fix formatting for PurpleProxyInfo
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
43071
diff
changeset
|
59 | switch(param_id) { |
|
0639bc52668a
Fix formatting for PurpleProxyInfo
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
43071
diff
changeset
|
60 | case PROP_PROXY_TYPE: |
|
0639bc52668a
Fix formatting for PurpleProxyInfo
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
43071
diff
changeset
|
61 | g_value_set_enum(value, purple_proxy_info_get_proxy_type(info)); |
|
0639bc52668a
Fix formatting for PurpleProxyInfo
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
43071
diff
changeset
|
62 | break; |
|
0639bc52668a
Fix formatting for PurpleProxyInfo
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
43071
diff
changeset
|
63 | case PROP_HOSTNAME: |
|
0639bc52668a
Fix formatting for PurpleProxyInfo
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
43071
diff
changeset
|
64 | g_value_set_string(value, purple_proxy_info_get_hostname(info)); |
|
0639bc52668a
Fix formatting for PurpleProxyInfo
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
43071
diff
changeset
|
65 | break; |
|
0639bc52668a
Fix formatting for PurpleProxyInfo
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
43071
diff
changeset
|
66 | case PROP_PORT: |
|
0639bc52668a
Fix formatting for PurpleProxyInfo
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
43071
diff
changeset
|
67 | g_value_set_int(value, purple_proxy_info_get_port(info)); |
|
0639bc52668a
Fix formatting for PurpleProxyInfo
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
43071
diff
changeset
|
68 | break; |
|
0639bc52668a
Fix formatting for PurpleProxyInfo
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
43071
diff
changeset
|
69 | case PROP_USERNAME: |
|
0639bc52668a
Fix formatting for PurpleProxyInfo
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
43071
diff
changeset
|
70 | g_value_set_string(value, purple_proxy_info_get_username(info)); |
|
0639bc52668a
Fix formatting for PurpleProxyInfo
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
43071
diff
changeset
|
71 | break; |
|
0639bc52668a
Fix formatting for PurpleProxyInfo
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
43071
diff
changeset
|
72 | case PROP_PASSWORD: |
|
0639bc52668a
Fix formatting for PurpleProxyInfo
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
43071
diff
changeset
|
73 | g_value_set_string(value, purple_proxy_info_get_password(info)); |
|
0639bc52668a
Fix formatting for PurpleProxyInfo
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
43071
diff
changeset
|
74 | break; |
|
0639bc52668a
Fix formatting for PurpleProxyInfo
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
43071
diff
changeset
|
75 | default: |
|
0639bc52668a
Fix formatting for PurpleProxyInfo
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
43071
diff
changeset
|
76 | G_OBJECT_WARN_INVALID_PROPERTY_ID(obj, param_id, pspec); |
|
0639bc52668a
Fix formatting for PurpleProxyInfo
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
43071
diff
changeset
|
77 | break; |
|
0639bc52668a
Fix formatting for PurpleProxyInfo
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
43071
diff
changeset
|
78 | } |
|
41318
56092ffeae95
Move PurpleProxyInfo from a boxed type to a GObject
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
79 | } |
|
56092ffeae95
Move PurpleProxyInfo from a boxed type to a GObject
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
80 | |
|
56092ffeae95
Move PurpleProxyInfo from a boxed type to a GObject
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
81 | static void |
|
56092ffeae95
Move PurpleProxyInfo from a boxed type to a GObject
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
82 | purple_proxy_info_set_property(GObject *obj, guint param_id, |
|
56092ffeae95
Move PurpleProxyInfo from a boxed type to a GObject
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
83 | const GValue *value, GParamSpec *pspec) |
|
56092ffeae95
Move PurpleProxyInfo from a boxed type to a GObject
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
84 | { |
|
43075
0639bc52668a
Fix formatting for PurpleProxyInfo
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
43071
diff
changeset
|
85 | PurpleProxyInfo *info = PURPLE_PROXY_INFO(obj); |
|
41318
56092ffeae95
Move PurpleProxyInfo from a boxed type to a GObject
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
86 | |
|
43075
0639bc52668a
Fix formatting for PurpleProxyInfo
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
43071
diff
changeset
|
87 | switch(param_id) { |
|
0639bc52668a
Fix formatting for PurpleProxyInfo
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
43071
diff
changeset
|
88 | case PROP_PROXY_TYPE: |
|
0639bc52668a
Fix formatting for PurpleProxyInfo
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
43071
diff
changeset
|
89 | purple_proxy_info_set_proxy_type(info, g_value_get_enum(value)); |
|
0639bc52668a
Fix formatting for PurpleProxyInfo
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
43071
diff
changeset
|
90 | break; |
|
0639bc52668a
Fix formatting for PurpleProxyInfo
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
43071
diff
changeset
|
91 | case PROP_HOSTNAME: |
|
0639bc52668a
Fix formatting for PurpleProxyInfo
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
43071
diff
changeset
|
92 | purple_proxy_info_set_hostname(info, g_value_get_string(value)); |
|
0639bc52668a
Fix formatting for PurpleProxyInfo
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
43071
diff
changeset
|
93 | break; |
|
0639bc52668a
Fix formatting for PurpleProxyInfo
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
43071
diff
changeset
|
94 | case PROP_PORT: |
|
0639bc52668a
Fix formatting for PurpleProxyInfo
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
43071
diff
changeset
|
95 | purple_proxy_info_set_port(info, g_value_get_int(value)); |
|
0639bc52668a
Fix formatting for PurpleProxyInfo
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
43071
diff
changeset
|
96 | break; |
|
0639bc52668a
Fix formatting for PurpleProxyInfo
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
43071
diff
changeset
|
97 | case PROP_USERNAME: |
|
0639bc52668a
Fix formatting for PurpleProxyInfo
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
43071
diff
changeset
|
98 | purple_proxy_info_set_username(info, g_value_get_string(value)); |
|
0639bc52668a
Fix formatting for PurpleProxyInfo
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
43071
diff
changeset
|
99 | break; |
|
0639bc52668a
Fix formatting for PurpleProxyInfo
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
43071
diff
changeset
|
100 | case PROP_PASSWORD: |
|
0639bc52668a
Fix formatting for PurpleProxyInfo
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
43071
diff
changeset
|
101 | purple_proxy_info_set_password(info, g_value_get_string(value)); |
|
0639bc52668a
Fix formatting for PurpleProxyInfo
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
43071
diff
changeset
|
102 | break; |
|
0639bc52668a
Fix formatting for PurpleProxyInfo
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
43071
diff
changeset
|
103 | default: |
|
0639bc52668a
Fix formatting for PurpleProxyInfo
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
43071
diff
changeset
|
104 | G_OBJECT_WARN_INVALID_PROPERTY_ID(obj, param_id, pspec); |
|
0639bc52668a
Fix formatting for PurpleProxyInfo
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
43071
diff
changeset
|
105 | break; |
|
0639bc52668a
Fix formatting for PurpleProxyInfo
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
43071
diff
changeset
|
106 | } |
|
41318
56092ffeae95
Move PurpleProxyInfo from a boxed type to a GObject
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
107 | } |
|
56092ffeae95
Move PurpleProxyInfo from a boxed type to a GObject
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
108 | |
|
56092ffeae95
Move PurpleProxyInfo from a boxed type to a GObject
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
109 | static void |
|
56092ffeae95
Move PurpleProxyInfo from a boxed type to a GObject
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
110 | purple_proxy_info_finalize(GObject *obj) { |
|
43075
0639bc52668a
Fix formatting for PurpleProxyInfo
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
43071
diff
changeset
|
111 | PurpleProxyInfo *info = PURPLE_PROXY_INFO(obj); |
|
41318
56092ffeae95
Move PurpleProxyInfo from a boxed type to a GObject
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
112 | |
|
43075
0639bc52668a
Fix formatting for PurpleProxyInfo
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
43071
diff
changeset
|
113 | g_free(info->hostname); |
|
0639bc52668a
Fix formatting for PurpleProxyInfo
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
43071
diff
changeset
|
114 | g_free(info->username); |
|
0639bc52668a
Fix formatting for PurpleProxyInfo
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
43071
diff
changeset
|
115 | g_free(info->password); |
|
41318
56092ffeae95
Move PurpleProxyInfo from a boxed type to a GObject
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
116 | |
|
43075
0639bc52668a
Fix formatting for PurpleProxyInfo
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
43071
diff
changeset
|
117 | G_OBJECT_CLASS(purple_proxy_info_parent_class)->finalize(obj); |
|
41318
56092ffeae95
Move PurpleProxyInfo from a boxed type to a GObject
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
118 | } |
|
56092ffeae95
Move PurpleProxyInfo from a boxed type to a GObject
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
119 | |
|
56092ffeae95
Move PurpleProxyInfo from a boxed type to a GObject
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
120 | static void |
|
41960
c8a4853205e3
Bump C standard to C99 for libpurple files and fix warnings
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
41318
diff
changeset
|
121 | purple_proxy_info_init(G_GNUC_UNUSED PurpleProxyInfo *info) { |
|
41318
56092ffeae95
Move PurpleProxyInfo from a boxed type to a GObject
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
122 | } |
|
56092ffeae95
Move PurpleProxyInfo from a boxed type to a GObject
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
123 | |
|
56092ffeae95
Move PurpleProxyInfo from a boxed type to a GObject
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
124 | static void |
|
56092ffeae95
Move PurpleProxyInfo from a boxed type to a GObject
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
125 | purple_proxy_info_class_init(PurpleProxyInfoClass *klass) { |
|
43071
071588186662
Remove nick and blurb from libpurple properties
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42767
diff
changeset
|
126 | GObjectClass *obj_class = G_OBJECT_CLASS(klass); |
|
41318
56092ffeae95
Move PurpleProxyInfo from a boxed type to a GObject
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
127 | |
|
43071
071588186662
Remove nick and blurb from libpurple properties
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42767
diff
changeset
|
128 | obj_class->get_property = purple_proxy_info_get_property; |
|
071588186662
Remove nick and blurb from libpurple properties
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42767
diff
changeset
|
129 | obj_class->set_property = purple_proxy_info_set_property; |
|
071588186662
Remove nick and blurb from libpurple properties
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42767
diff
changeset
|
130 | obj_class->finalize = purple_proxy_info_finalize; |
|
41318
56092ffeae95
Move PurpleProxyInfo from a boxed type to a GObject
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
131 | |
|
43071
071588186662
Remove nick and blurb from libpurple properties
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42767
diff
changeset
|
132 | /** |
|
071588186662
Remove nick and blurb from libpurple properties
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42767
diff
changeset
|
133 | * PurpleProxyInfo:proxy-type: |
|
071588186662
Remove nick and blurb from libpurple properties
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42767
diff
changeset
|
134 | * |
|
071588186662
Remove nick and blurb from libpurple properties
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42767
diff
changeset
|
135 | * The [enum@ProxyType] to use for this proxy. |
|
071588186662
Remove nick and blurb from libpurple properties
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42767
diff
changeset
|
136 | * |
|
071588186662
Remove nick and blurb from libpurple properties
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42767
diff
changeset
|
137 | * Since: 3.0 |
|
071588186662
Remove nick and blurb from libpurple properties
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42767
diff
changeset
|
138 | */ |
|
071588186662
Remove nick and blurb from libpurple properties
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42767
diff
changeset
|
139 | properties[PROP_PROXY_TYPE] = g_param_spec_enum( |
|
071588186662
Remove nick and blurb from libpurple properties
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42767
diff
changeset
|
140 | "proxy-type", NULL, NULL, |
|
071588186662
Remove nick and blurb from libpurple properties
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42767
diff
changeset
|
141 | PURPLE_TYPE_PROXY_TYPE, |
|
071588186662
Remove nick and blurb from libpurple properties
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42767
diff
changeset
|
142 | PURPLE_PROXY_TYPE_USE_GLOBAL, |
|
071588186662
Remove nick and blurb from libpurple properties
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42767
diff
changeset
|
143 | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS); |
|
41318
56092ffeae95
Move PurpleProxyInfo from a boxed type to a GObject
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
144 | |
|
43071
071588186662
Remove nick and blurb from libpurple properties
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42767
diff
changeset
|
145 | /** |
|
071588186662
Remove nick and blurb from libpurple properties
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42767
diff
changeset
|
146 | * PurpleProxyInfo:hostname: |
|
071588186662
Remove nick and blurb from libpurple properties
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42767
diff
changeset
|
147 | * |
|
071588186662
Remove nick and blurb from libpurple properties
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42767
diff
changeset
|
148 | * The hostname to use for this proxy. |
|
071588186662
Remove nick and blurb from libpurple properties
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42767
diff
changeset
|
149 | * |
|
071588186662
Remove nick and blurb from libpurple properties
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42767
diff
changeset
|
150 | * Since: 3.0 |
|
071588186662
Remove nick and blurb from libpurple properties
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42767
diff
changeset
|
151 | */ |
|
071588186662
Remove nick and blurb from libpurple properties
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42767
diff
changeset
|
152 | properties[PROP_HOSTNAME] = g_param_spec_string( |
|
071588186662
Remove nick and blurb from libpurple properties
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42767
diff
changeset
|
153 | "hostname", NULL, NULL, |
|
071588186662
Remove nick and blurb from libpurple properties
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42767
diff
changeset
|
154 | NULL, |
|
071588186662
Remove nick and blurb from libpurple properties
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42767
diff
changeset
|
155 | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS); |
|
41318
56092ffeae95
Move PurpleProxyInfo from a boxed type to a GObject
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
156 | |
|
43071
071588186662
Remove nick and blurb from libpurple properties
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42767
diff
changeset
|
157 | /** |
|
071588186662
Remove nick and blurb from libpurple properties
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42767
diff
changeset
|
158 | * PurpleProxyInfo:port: |
|
071588186662
Remove nick and blurb from libpurple properties
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42767
diff
changeset
|
159 | * |
|
071588186662
Remove nick and blurb from libpurple properties
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42767
diff
changeset
|
160 | * The port to use for this proxy. |
|
071588186662
Remove nick and blurb from libpurple properties
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42767
diff
changeset
|
161 | * |
|
071588186662
Remove nick and blurb from libpurple properties
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42767
diff
changeset
|
162 | * Since: 3.0 |
|
071588186662
Remove nick and blurb from libpurple properties
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42767
diff
changeset
|
163 | */ |
|
071588186662
Remove nick and blurb from libpurple properties
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42767
diff
changeset
|
164 | properties[PROP_PORT] = g_param_spec_int( |
|
071588186662
Remove nick and blurb from libpurple properties
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42767
diff
changeset
|
165 | "port", NULL, NULL, |
|
071588186662
Remove nick and blurb from libpurple properties
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42767
diff
changeset
|
166 | 0, 65535, 0, |
|
071588186662
Remove nick and blurb from libpurple properties
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42767
diff
changeset
|
167 | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS); |
|
41318
56092ffeae95
Move PurpleProxyInfo from a boxed type to a GObject
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
168 | |
|
43071
071588186662
Remove nick and blurb from libpurple properties
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42767
diff
changeset
|
169 | /** |
|
071588186662
Remove nick and blurb from libpurple properties
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42767
diff
changeset
|
170 | * PurpleProxyInfo:username: |
|
071588186662
Remove nick and blurb from libpurple properties
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42767
diff
changeset
|
171 | * |
|
071588186662
Remove nick and blurb from libpurple properties
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42767
diff
changeset
|
172 | * The username to use for this proxy. |
|
071588186662
Remove nick and blurb from libpurple properties
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42767
diff
changeset
|
173 | * |
|
071588186662
Remove nick and blurb from libpurple properties
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42767
diff
changeset
|
174 | * Since: 3.0 |
|
071588186662
Remove nick and blurb from libpurple properties
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42767
diff
changeset
|
175 | */ |
|
071588186662
Remove nick and blurb from libpurple properties
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42767
diff
changeset
|
176 | properties[PROP_USERNAME] = g_param_spec_string( |
|
071588186662
Remove nick and blurb from libpurple properties
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42767
diff
changeset
|
177 | "username", NULL, NULL, |
|
071588186662
Remove nick and blurb from libpurple properties
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42767
diff
changeset
|
178 | NULL, |
|
071588186662
Remove nick and blurb from libpurple properties
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42767
diff
changeset
|
179 | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS); |
|
41318
56092ffeae95
Move PurpleProxyInfo from a boxed type to a GObject
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
180 | |
|
43071
071588186662
Remove nick and blurb from libpurple properties
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42767
diff
changeset
|
181 | /** |
|
071588186662
Remove nick and blurb from libpurple properties
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42767
diff
changeset
|
182 | * PurpleProxyInfo:password: |
|
071588186662
Remove nick and blurb from libpurple properties
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42767
diff
changeset
|
183 | * |
|
071588186662
Remove nick and blurb from libpurple properties
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42767
diff
changeset
|
184 | * The password to use for this proxy. |
|
071588186662
Remove nick and blurb from libpurple properties
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42767
diff
changeset
|
185 | * |
|
071588186662
Remove nick and blurb from libpurple properties
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42767
diff
changeset
|
186 | * Since: 3.0 |
|
071588186662
Remove nick and blurb from libpurple properties
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42767
diff
changeset
|
187 | */ |
|
071588186662
Remove nick and blurb from libpurple properties
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42767
diff
changeset
|
188 | properties[PROP_PASSWORD] = g_param_spec_string( |
|
071588186662
Remove nick and blurb from libpurple properties
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42767
diff
changeset
|
189 | "password", NULL, NULL, |
|
071588186662
Remove nick and blurb from libpurple properties
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42767
diff
changeset
|
190 | NULL, |
|
071588186662
Remove nick and blurb from libpurple properties
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42767
diff
changeset
|
191 | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS); |
|
41318
56092ffeae95
Move PurpleProxyInfo from a boxed type to a GObject
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
192 | |
|
56092ffeae95
Move PurpleProxyInfo from a boxed type to a GObject
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
193 | |
|
43071
071588186662
Remove nick and blurb from libpurple properties
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42767
diff
changeset
|
194 | g_object_class_install_properties(obj_class, N_PROPERTIES, properties); |
|
41318
56092ffeae95
Move PurpleProxyInfo from a boxed type to a GObject
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
195 | } |
|
56092ffeae95
Move PurpleProxyInfo from a boxed type to a GObject
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
196 | |
|
56092ffeae95
Move PurpleProxyInfo from a boxed type to a GObject
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
197 | /****************************************************************************** |
|
56092ffeae95
Move PurpleProxyInfo from a boxed type to a GObject
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
198 | * Public API |
|
56092ffeae95
Move PurpleProxyInfo from a boxed type to a GObject
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
199 | *****************************************************************************/ |
|
56092ffeae95
Move PurpleProxyInfo from a boxed type to a GObject
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
200 | PurpleProxyInfo * |
|
56092ffeae95
Move PurpleProxyInfo from a boxed type to a GObject
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
201 | purple_proxy_info_new(void) { |
|
43075
0639bc52668a
Fix formatting for PurpleProxyInfo
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
43071
diff
changeset
|
202 | return g_object_new(PURPLE_TYPE_PROXY_INFO, NULL); |
|
41318
56092ffeae95
Move PurpleProxyInfo from a boxed type to a GObject
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
203 | } |
|
56092ffeae95
Move PurpleProxyInfo from a boxed type to a GObject
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
204 | |
|
56092ffeae95
Move PurpleProxyInfo from a boxed type to a GObject
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
205 | void |
|
56092ffeae95
Move PurpleProxyInfo from a boxed type to a GObject
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
206 | purple_proxy_info_set_proxy_type(PurpleProxyInfo *info, |
|
56092ffeae95
Move PurpleProxyInfo from a boxed type to a GObject
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
207 | PurpleProxyType proxy_type) |
|
56092ffeae95
Move PurpleProxyInfo from a boxed type to a GObject
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
208 | { |
|
43075
0639bc52668a
Fix formatting for PurpleProxyInfo
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
43071
diff
changeset
|
209 | g_return_if_fail(PURPLE_IS_PROXY_INFO(info)); |
|
41318
56092ffeae95
Move PurpleProxyInfo from a boxed type to a GObject
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
210 | |
|
43075
0639bc52668a
Fix formatting for PurpleProxyInfo
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
43071
diff
changeset
|
211 | info->proxy_type = proxy_type; |
|
41318
56092ffeae95
Move PurpleProxyInfo from a boxed type to a GObject
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
212 | |
|
43075
0639bc52668a
Fix formatting for PurpleProxyInfo
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
43071
diff
changeset
|
213 | g_object_notify_by_pspec(G_OBJECT(info), properties[PROP_PROXY_TYPE]); |
|
41318
56092ffeae95
Move PurpleProxyInfo from a boxed type to a GObject
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
214 | } |
|
56092ffeae95
Move PurpleProxyInfo from a boxed type to a GObject
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
215 | |
|
56092ffeae95
Move PurpleProxyInfo from a boxed type to a GObject
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
216 | PurpleProxyType |
|
56092ffeae95
Move PurpleProxyInfo from a boxed type to a GObject
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
217 | purple_proxy_info_get_proxy_type(PurpleProxyInfo *info) { |
|
43075
0639bc52668a
Fix formatting for PurpleProxyInfo
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
43071
diff
changeset
|
218 | g_return_val_if_fail(PURPLE_IS_PROXY_INFO(info), PURPLE_PROXY_TYPE_NONE); |
|
41318
56092ffeae95
Move PurpleProxyInfo from a boxed type to a GObject
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
219 | |
|
43075
0639bc52668a
Fix formatting for PurpleProxyInfo
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
43071
diff
changeset
|
220 | return info->proxy_type; |
|
41318
56092ffeae95
Move PurpleProxyInfo from a boxed type to a GObject
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
221 | } |
|
56092ffeae95
Move PurpleProxyInfo from a boxed type to a GObject
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
222 | |
|
56092ffeae95
Move PurpleProxyInfo from a boxed type to a GObject
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
223 | void |
|
43075
0639bc52668a
Fix formatting for PurpleProxyInfo
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
43071
diff
changeset
|
224 | purple_proxy_info_set_hostname(PurpleProxyInfo *info, const char *hostname) { |
|
0639bc52668a
Fix formatting for PurpleProxyInfo
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
43071
diff
changeset
|
225 | g_return_if_fail(PURPLE_IS_PROXY_INFO(info)); |
|
41318
56092ffeae95
Move PurpleProxyInfo from a boxed type to a GObject
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
226 | |
|
43075
0639bc52668a
Fix formatting for PurpleProxyInfo
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
43071
diff
changeset
|
227 | if(g_set_str(&info->hostname, hostname)) { |
|
42767
8cf1d11b59c1
Use g_set_str everywhere
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42615
diff
changeset
|
228 | g_object_notify_by_pspec(G_OBJECT(info), properties[PROP_HOSTNAME]); |
|
8cf1d11b59c1
Use g_set_str everywhere
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42615
diff
changeset
|
229 | } |
|
41318
56092ffeae95
Move PurpleProxyInfo from a boxed type to a GObject
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
230 | } |
|
56092ffeae95
Move PurpleProxyInfo from a boxed type to a GObject
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
231 | |
|
43075
0639bc52668a
Fix formatting for PurpleProxyInfo
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
43071
diff
changeset
|
232 | const char * |
|
41318
56092ffeae95
Move PurpleProxyInfo from a boxed type to a GObject
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
233 | purple_proxy_info_get_hostname(PurpleProxyInfo *info) { |
|
43075
0639bc52668a
Fix formatting for PurpleProxyInfo
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
43071
diff
changeset
|
234 | g_return_val_if_fail(PURPLE_IS_PROXY_INFO(info), NULL); |
|
41318
56092ffeae95
Move PurpleProxyInfo from a boxed type to a GObject
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
235 | |
|
43075
0639bc52668a
Fix formatting for PurpleProxyInfo
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
43071
diff
changeset
|
236 | return info->hostname; |
|
41318
56092ffeae95
Move PurpleProxyInfo from a boxed type to a GObject
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
237 | } |
|
56092ffeae95
Move PurpleProxyInfo from a boxed type to a GObject
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
238 | |
|
56092ffeae95
Move PurpleProxyInfo from a boxed type to a GObject
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
239 | void |
|
43075
0639bc52668a
Fix formatting for PurpleProxyInfo
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
43071
diff
changeset
|
240 | purple_proxy_info_set_port(PurpleProxyInfo *info, int port) { |
|
0639bc52668a
Fix formatting for PurpleProxyInfo
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
43071
diff
changeset
|
241 | g_return_if_fail(PURPLE_IS_PROXY_INFO(info)); |
|
41318
56092ffeae95
Move PurpleProxyInfo from a boxed type to a GObject
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
242 | |
|
43075
0639bc52668a
Fix formatting for PurpleProxyInfo
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
43071
diff
changeset
|
243 | info->port = port; |
|
41318
56092ffeae95
Move PurpleProxyInfo from a boxed type to a GObject
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
244 | |
|
43075
0639bc52668a
Fix formatting for PurpleProxyInfo
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
43071
diff
changeset
|
245 | g_object_notify_by_pspec(G_OBJECT(info), properties[PROP_PORT]); |
|
41318
56092ffeae95
Move PurpleProxyInfo from a boxed type to a GObject
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
246 | } |
|
56092ffeae95
Move PurpleProxyInfo from a boxed type to a GObject
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
247 | |
|
43075
0639bc52668a
Fix formatting for PurpleProxyInfo
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
43071
diff
changeset
|
248 | int |
|
41318
56092ffeae95
Move PurpleProxyInfo from a boxed type to a GObject
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
249 | purple_proxy_info_get_port(PurpleProxyInfo *info) { |
|
43075
0639bc52668a
Fix formatting for PurpleProxyInfo
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
43071
diff
changeset
|
250 | g_return_val_if_fail(PURPLE_IS_PROXY_INFO(info), 0); |
|
41318
56092ffeae95
Move PurpleProxyInfo from a boxed type to a GObject
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
251 | |
|
43075
0639bc52668a
Fix formatting for PurpleProxyInfo
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
43071
diff
changeset
|
252 | return info->port; |
|
41318
56092ffeae95
Move PurpleProxyInfo from a boxed type to a GObject
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
253 | } |
|
56092ffeae95
Move PurpleProxyInfo from a boxed type to a GObject
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
254 | |
|
56092ffeae95
Move PurpleProxyInfo from a boxed type to a GObject
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
255 | void |
|
43075
0639bc52668a
Fix formatting for PurpleProxyInfo
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
43071
diff
changeset
|
256 | purple_proxy_info_set_username(PurpleProxyInfo *info, const char *username) { |
|
0639bc52668a
Fix formatting for PurpleProxyInfo
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
43071
diff
changeset
|
257 | g_return_if_fail(PURPLE_IS_PROXY_INFO(info)); |
|
41318
56092ffeae95
Move PurpleProxyInfo from a boxed type to a GObject
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
258 | |
|
43075
0639bc52668a
Fix formatting for PurpleProxyInfo
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
43071
diff
changeset
|
259 | if(g_set_str(&info->username, username)) { |
|
42767
8cf1d11b59c1
Use g_set_str everywhere
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42615
diff
changeset
|
260 | g_object_notify_by_pspec(G_OBJECT(info), properties[PROP_USERNAME]); |
|
8cf1d11b59c1
Use g_set_str everywhere
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42615
diff
changeset
|
261 | } |
|
41318
56092ffeae95
Move PurpleProxyInfo from a boxed type to a GObject
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
262 | } |
|
56092ffeae95
Move PurpleProxyInfo from a boxed type to a GObject
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
263 | |
|
43075
0639bc52668a
Fix formatting for PurpleProxyInfo
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
43071
diff
changeset
|
264 | const char * |
|
41318
56092ffeae95
Move PurpleProxyInfo from a boxed type to a GObject
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
265 | purple_proxy_info_get_username(PurpleProxyInfo *info) { |
|
43075
0639bc52668a
Fix formatting for PurpleProxyInfo
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
43071
diff
changeset
|
266 | g_return_val_if_fail(PURPLE_IS_PROXY_INFO(info), NULL); |
|
41318
56092ffeae95
Move PurpleProxyInfo from a boxed type to a GObject
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
267 | |
|
43075
0639bc52668a
Fix formatting for PurpleProxyInfo
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
43071
diff
changeset
|
268 | return info->username; |
|
41318
56092ffeae95
Move PurpleProxyInfo from a boxed type to a GObject
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
269 | } |
|
56092ffeae95
Move PurpleProxyInfo from a boxed type to a GObject
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
270 | |
|
56092ffeae95
Move PurpleProxyInfo from a boxed type to a GObject
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
271 | void |
|
43075
0639bc52668a
Fix formatting for PurpleProxyInfo
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
43071
diff
changeset
|
272 | purple_proxy_info_set_password(PurpleProxyInfo *info, const char *password) { |
|
0639bc52668a
Fix formatting for PurpleProxyInfo
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
43071
diff
changeset
|
273 | g_return_if_fail(PURPLE_IS_PROXY_INFO(info)); |
|
41318
56092ffeae95
Move PurpleProxyInfo from a boxed type to a GObject
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
274 | |
|
43075
0639bc52668a
Fix formatting for PurpleProxyInfo
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
43071
diff
changeset
|
275 | if(g_set_str(&info->password, password)) { |
|
42767
8cf1d11b59c1
Use g_set_str everywhere
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42615
diff
changeset
|
276 | g_object_notify_by_pspec(G_OBJECT(info), properties[PROP_PASSWORD]); |
|
8cf1d11b59c1
Use g_set_str everywhere
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42615
diff
changeset
|
277 | } |
|
41318
56092ffeae95
Move PurpleProxyInfo from a boxed type to a GObject
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
278 | } |
|
56092ffeae95
Move PurpleProxyInfo from a boxed type to a GObject
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
279 | |
|
43075
0639bc52668a
Fix formatting for PurpleProxyInfo
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
43071
diff
changeset
|
280 | const char * |
|
41318
56092ffeae95
Move PurpleProxyInfo from a boxed type to a GObject
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
281 | purple_proxy_info_get_password(PurpleProxyInfo *info) { |
|
43075
0639bc52668a
Fix formatting for PurpleProxyInfo
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
43071
diff
changeset
|
282 | g_return_val_if_fail(PURPLE_IS_PROXY_INFO(info), NULL); |
|
41318
56092ffeae95
Move PurpleProxyInfo from a boxed type to a GObject
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
283 | |
|
43075
0639bc52668a
Fix formatting for PurpleProxyInfo
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
43071
diff
changeset
|
284 | return info->password; |
|
41318
56092ffeae95
Move PurpleProxyInfo from a boxed type to a GObject
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
285 | } |