Fri, 20 Oct 2023 01:09:45 -0500
Implement ProtocolFileTransfer
Testing Done:
Ran the unit tests under valgrind.
Bugs closed: PIDGIN-17833
Reviewed at https://reviews.imfreedom.org/r/2643/
|
39968
71622ee1354e
move PurpleAccountUserSplit to their own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
1 | /* purple |
|
71622ee1354e
move PurpleAccountUserSplit to their own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
2 | * |
|
71622ee1354e
move PurpleAccountUserSplit to their own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
3 | * Purple is the legal property of its developers, whose names are too numerous |
|
71622ee1354e
move PurpleAccountUserSplit to their own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
4 | * to list here. Please refer to the COPYRIGHT file distributed with this |
|
71622ee1354e
move PurpleAccountUserSplit to their own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
5 | * source distribution. |
|
71622ee1354e
move PurpleAccountUserSplit to their own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
6 | * |
|
71622ee1354e
move PurpleAccountUserSplit to their own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
7 | * This program is free software; you can redistribute it and/or modify |
|
71622ee1354e
move PurpleAccountUserSplit to their own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
8 | * it under the terms of the GNU General Public License as published by |
|
71622ee1354e
move PurpleAccountUserSplit to their own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
9 | * the Free Software Foundation; either version 2 of the License, or |
|
71622ee1354e
move PurpleAccountUserSplit to their own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
10 | * (at your option) any later version. |
|
71622ee1354e
move PurpleAccountUserSplit to their own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
11 | * |
|
71622ee1354e
move PurpleAccountUserSplit to their own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
12 | * This program is distributed in the hope that it will be useful, |
|
71622ee1354e
move PurpleAccountUserSplit to their own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
71622ee1354e
move PurpleAccountUserSplit to their own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
71622ee1354e
move PurpleAccountUserSplit to their own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
15 | * GNU General Public License for more details. |
|
71622ee1354e
move PurpleAccountUserSplit to their own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
16 | * |
|
71622ee1354e
move PurpleAccountUserSplit to their own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
17 | * You should have received a copy of the GNU General Public License |
|
71622ee1354e
move PurpleAccountUserSplit to their own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
18 | * along with this program; if not, write to the Free Software |
|
71622ee1354e
move PurpleAccountUserSplit to their own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
19 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA |
|
71622ee1354e
move PurpleAccountUserSplit to their own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
20 | */ |
|
71622ee1354e
move PurpleAccountUserSplit to their own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
21 | |
|
71622ee1354e
move PurpleAccountUserSplit to their own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
22 | #include "purpleaccountusersplit.h" |
|
71622ee1354e
move PurpleAccountUserSplit to their own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
23 | |
|
39969
b1ccd1961499
Make PurpleAccountUserSplit a boxed type
Gary Kramlich <grim@reaperworld.com>
parents:
39968
diff
changeset
|
24 | /****************************************************************************** |
|
b1ccd1961499
Make PurpleAccountUserSplit a boxed type
Gary Kramlich <grim@reaperworld.com>
parents:
39968
diff
changeset
|
25 | * Structs |
|
b1ccd1961499
Make PurpleAccountUserSplit a boxed type
Gary Kramlich <grim@reaperworld.com>
parents:
39968
diff
changeset
|
26 | *****************************************************************************/ |
|
b1ccd1961499
Make PurpleAccountUserSplit a boxed type
Gary Kramlich <grim@reaperworld.com>
parents:
39968
diff
changeset
|
27 | struct _PurpleAccountUserSplit { |
|
b1ccd1961499
Make PurpleAccountUserSplit a boxed type
Gary Kramlich <grim@reaperworld.com>
parents:
39968
diff
changeset
|
28 | gchar *text; |
|
b1ccd1961499
Make PurpleAccountUserSplit a boxed type
Gary Kramlich <grim@reaperworld.com>
parents:
39968
diff
changeset
|
29 | gchar *default_value; |
|
b1ccd1961499
Make PurpleAccountUserSplit a boxed type
Gary Kramlich <grim@reaperworld.com>
parents:
39968
diff
changeset
|
30 | gchar field_sep; |
|
b1ccd1961499
Make PurpleAccountUserSplit a boxed type
Gary Kramlich <grim@reaperworld.com>
parents:
39968
diff
changeset
|
31 | gboolean reverse; |
|
39968
71622ee1354e
move PurpleAccountUserSplit to their own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
32 | gboolean constant; |
|
71622ee1354e
move PurpleAccountUserSplit to their own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
33 | }; |
|
71622ee1354e
move PurpleAccountUserSplit to their own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
34 | |
|
39969
b1ccd1961499
Make PurpleAccountUserSplit a boxed type
Gary Kramlich <grim@reaperworld.com>
parents:
39968
diff
changeset
|
35 | /****************************************************************************** |
|
b1ccd1961499
Make PurpleAccountUserSplit a boxed type
Gary Kramlich <grim@reaperworld.com>
parents:
39968
diff
changeset
|
36 | * Public API |
|
b1ccd1961499
Make PurpleAccountUserSplit a boxed type
Gary Kramlich <grim@reaperworld.com>
parents:
39968
diff
changeset
|
37 | *****************************************************************************/ |
|
b1ccd1961499
Make PurpleAccountUserSplit a boxed type
Gary Kramlich <grim@reaperworld.com>
parents:
39968
diff
changeset
|
38 | G_DEFINE_BOXED_TYPE( |
|
b1ccd1961499
Make PurpleAccountUserSplit a boxed type
Gary Kramlich <grim@reaperworld.com>
parents:
39968
diff
changeset
|
39 | PurpleAccountUserSplit, |
|
b1ccd1961499
Make PurpleAccountUserSplit a boxed type
Gary Kramlich <grim@reaperworld.com>
parents:
39968
diff
changeset
|
40 | purple_account_user_split, |
|
b1ccd1961499
Make PurpleAccountUserSplit a boxed type
Gary Kramlich <grim@reaperworld.com>
parents:
39968
diff
changeset
|
41 | purple_account_user_split_copy, |
|
b1ccd1961499
Make PurpleAccountUserSplit a boxed type
Gary Kramlich <grim@reaperworld.com>
parents:
39968
diff
changeset
|
42 | purple_account_user_split_destroy |
|
b1ccd1961499
Make PurpleAccountUserSplit a boxed type
Gary Kramlich <grim@reaperworld.com>
parents:
39968
diff
changeset
|
43 | ); |
|
b1ccd1961499
Make PurpleAccountUserSplit a boxed type
Gary Kramlich <grim@reaperworld.com>
parents:
39968
diff
changeset
|
44 | |
|
39968
71622ee1354e
move PurpleAccountUserSplit to their own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
45 | PurpleAccountUserSplit * |
|
39969
b1ccd1961499
Make PurpleAccountUserSplit a boxed type
Gary Kramlich <grim@reaperworld.com>
parents:
39968
diff
changeset
|
46 | purple_account_user_split_new(const gchar *text, const gchar *default_value, gchar sep) |
|
39968
71622ee1354e
move PurpleAccountUserSplit to their own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
47 | { |
|
71622ee1354e
move PurpleAccountUserSplit to their own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
48 | PurpleAccountUserSplit *split; |
|
71622ee1354e
move PurpleAccountUserSplit to their own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
49 | |
|
71622ee1354e
move PurpleAccountUserSplit to their own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
50 | g_return_val_if_fail(text != NULL, NULL); |
|
71622ee1354e
move PurpleAccountUserSplit to their own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
51 | g_return_val_if_fail(sep != 0, NULL); |
|
71622ee1354e
move PurpleAccountUserSplit to their own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
52 | |
|
71622ee1354e
move PurpleAccountUserSplit to their own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
53 | split = g_new0(PurpleAccountUserSplit, 1); |
|
71622ee1354e
move PurpleAccountUserSplit to their own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
54 | |
|
71622ee1354e
move PurpleAccountUserSplit to their own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
55 | split->text = g_strdup(text); |
|
71622ee1354e
move PurpleAccountUserSplit to their own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
56 | split->field_sep = sep; |
|
71622ee1354e
move PurpleAccountUserSplit to their own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
57 | split->default_value = g_strdup(default_value); |
|
71622ee1354e
move PurpleAccountUserSplit to their own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
58 | split->reverse = TRUE; |
|
71622ee1354e
move PurpleAccountUserSplit to their own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
59 | |
|
71622ee1354e
move PurpleAccountUserSplit to their own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
60 | return split; |
|
71622ee1354e
move PurpleAccountUserSplit to their own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
61 | } |
|
71622ee1354e
move PurpleAccountUserSplit to their own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
62 | |
|
39969
b1ccd1961499
Make PurpleAccountUserSplit a boxed type
Gary Kramlich <grim@reaperworld.com>
parents:
39968
diff
changeset
|
63 | PurpleAccountUserSplit * |
|
b1ccd1961499
Make PurpleAccountUserSplit a boxed type
Gary Kramlich <grim@reaperworld.com>
parents:
39968
diff
changeset
|
64 | purple_account_user_split_copy(PurpleAccountUserSplit *split) { |
|
b1ccd1961499
Make PurpleAccountUserSplit a boxed type
Gary Kramlich <grim@reaperworld.com>
parents:
39968
diff
changeset
|
65 | PurpleAccountUserSplit *newsplit = NULL; |
|
b1ccd1961499
Make PurpleAccountUserSplit a boxed type
Gary Kramlich <grim@reaperworld.com>
parents:
39968
diff
changeset
|
66 | |
|
b1ccd1961499
Make PurpleAccountUserSplit a boxed type
Gary Kramlich <grim@reaperworld.com>
parents:
39968
diff
changeset
|
67 | newsplit = purple_account_user_split_new(split->text, split->default_value, split->field_sep); |
|
b1ccd1961499
Make PurpleAccountUserSplit a boxed type
Gary Kramlich <grim@reaperworld.com>
parents:
39968
diff
changeset
|
68 | |
|
b1ccd1961499
Make PurpleAccountUserSplit a boxed type
Gary Kramlich <grim@reaperworld.com>
parents:
39968
diff
changeset
|
69 | newsplit->reverse = split->reverse; |
|
b1ccd1961499
Make PurpleAccountUserSplit a boxed type
Gary Kramlich <grim@reaperworld.com>
parents:
39968
diff
changeset
|
70 | newsplit->constant = split->constant; |
|
b1ccd1961499
Make PurpleAccountUserSplit a boxed type
Gary Kramlich <grim@reaperworld.com>
parents:
39968
diff
changeset
|
71 | |
|
b1ccd1961499
Make PurpleAccountUserSplit a boxed type
Gary Kramlich <grim@reaperworld.com>
parents:
39968
diff
changeset
|
72 | return newsplit; |
|
b1ccd1961499
Make PurpleAccountUserSplit a boxed type
Gary Kramlich <grim@reaperworld.com>
parents:
39968
diff
changeset
|
73 | } |
|
b1ccd1961499
Make PurpleAccountUserSplit a boxed type
Gary Kramlich <grim@reaperworld.com>
parents:
39968
diff
changeset
|
74 | |
|
b1ccd1961499
Make PurpleAccountUserSplit a boxed type
Gary Kramlich <grim@reaperworld.com>
parents:
39968
diff
changeset
|
75 | |
|
39968
71622ee1354e
move PurpleAccountUserSplit to their own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
76 | void |
|
71622ee1354e
move PurpleAccountUserSplit to their own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
77 | purple_account_user_split_destroy(PurpleAccountUserSplit *split) |
|
71622ee1354e
move PurpleAccountUserSplit to their own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
78 | { |
|
71622ee1354e
move PurpleAccountUserSplit to their own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
79 | g_return_if_fail(split != NULL); |
|
71622ee1354e
move PurpleAccountUserSplit to their own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
80 | |
|
71622ee1354e
move PurpleAccountUserSplit to their own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
81 | g_free(split->text); |
|
71622ee1354e
move PurpleAccountUserSplit to their own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
82 | g_free(split->default_value); |
|
71622ee1354e
move PurpleAccountUserSplit to their own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
83 | g_free(split); |
|
71622ee1354e
move PurpleAccountUserSplit to their own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
84 | } |
|
71622ee1354e
move PurpleAccountUserSplit to their own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
85 | |
|
39969
b1ccd1961499
Make PurpleAccountUserSplit a boxed type
Gary Kramlich <grim@reaperworld.com>
parents:
39968
diff
changeset
|
86 | const gchar * |
|
41241
1a222acd5e89
Remove the unnecessary const specifier for the accountusersplit api
Gary Kramlich <grim@reaperworld.com>
parents:
39969
diff
changeset
|
87 | purple_account_user_split_get_text(PurpleAccountUserSplit *split) |
|
39968
71622ee1354e
move PurpleAccountUserSplit to their own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
88 | { |
|
71622ee1354e
move PurpleAccountUserSplit to their own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
89 | g_return_val_if_fail(split != NULL, NULL); |
|
71622ee1354e
move PurpleAccountUserSplit to their own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
90 | |
|
71622ee1354e
move PurpleAccountUserSplit to their own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
91 | return split->text; |
|
71622ee1354e
move PurpleAccountUserSplit to their own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
92 | } |
|
71622ee1354e
move PurpleAccountUserSplit to their own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
93 | |
|
39969
b1ccd1961499
Make PurpleAccountUserSplit a boxed type
Gary Kramlich <grim@reaperworld.com>
parents:
39968
diff
changeset
|
94 | const gchar * |
|
41241
1a222acd5e89
Remove the unnecessary const specifier for the accountusersplit api
Gary Kramlich <grim@reaperworld.com>
parents:
39969
diff
changeset
|
95 | purple_account_user_split_get_default_value(PurpleAccountUserSplit *split) |
|
39968
71622ee1354e
move PurpleAccountUserSplit to their own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
96 | { |
|
71622ee1354e
move PurpleAccountUserSplit to their own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
97 | g_return_val_if_fail(split != NULL, NULL); |
|
71622ee1354e
move PurpleAccountUserSplit to their own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
98 | |
|
71622ee1354e
move PurpleAccountUserSplit to their own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
99 | return split->default_value; |
|
71622ee1354e
move PurpleAccountUserSplit to their own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
100 | } |
|
71622ee1354e
move PurpleAccountUserSplit to their own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
101 | |
|
71622ee1354e
move PurpleAccountUserSplit to their own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
102 | char |
|
41241
1a222acd5e89
Remove the unnecessary const specifier for the accountusersplit api
Gary Kramlich <grim@reaperworld.com>
parents:
39969
diff
changeset
|
103 | purple_account_user_split_get_separator(PurpleAccountUserSplit *split) |
|
39968
71622ee1354e
move PurpleAccountUserSplit to their own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
104 | { |
|
71622ee1354e
move PurpleAccountUserSplit to their own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
105 | g_return_val_if_fail(split != NULL, 0); |
|
71622ee1354e
move PurpleAccountUserSplit to their own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
106 | |
|
71622ee1354e
move PurpleAccountUserSplit to their own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
107 | return split->field_sep; |
|
71622ee1354e
move PurpleAccountUserSplit to their own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
108 | } |
|
71622ee1354e
move PurpleAccountUserSplit to their own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
109 | |
|
71622ee1354e
move PurpleAccountUserSplit to their own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
110 | gboolean |
|
41241
1a222acd5e89
Remove the unnecessary const specifier for the accountusersplit api
Gary Kramlich <grim@reaperworld.com>
parents:
39969
diff
changeset
|
111 | purple_account_user_split_get_reverse(PurpleAccountUserSplit *split) |
|
39968
71622ee1354e
move PurpleAccountUserSplit to their own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
112 | { |
|
71622ee1354e
move PurpleAccountUserSplit to their own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
113 | g_return_val_if_fail(split != NULL, FALSE); |
|
71622ee1354e
move PurpleAccountUserSplit to their own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
114 | |
|
71622ee1354e
move PurpleAccountUserSplit to their own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
115 | return split->reverse; |
|
71622ee1354e
move PurpleAccountUserSplit to their own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
116 | } |
|
71622ee1354e
move PurpleAccountUserSplit to their own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
117 | |
|
71622ee1354e
move PurpleAccountUserSplit to their own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
118 | void |
|
71622ee1354e
move PurpleAccountUserSplit to their own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
119 | purple_account_user_split_set_reverse(PurpleAccountUserSplit *split, gboolean reverse) |
|
71622ee1354e
move PurpleAccountUserSplit to their own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
120 | { |
|
71622ee1354e
move PurpleAccountUserSplit to their own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
121 | g_return_if_fail(split != NULL); |
|
71622ee1354e
move PurpleAccountUserSplit to their own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
122 | |
|
71622ee1354e
move PurpleAccountUserSplit to their own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
123 | split->reverse = reverse; |
|
71622ee1354e
move PurpleAccountUserSplit to their own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
124 | } |
|
71622ee1354e
move PurpleAccountUserSplit to their own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
125 | |
|
71622ee1354e
move PurpleAccountUserSplit to their own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
126 | gboolean |
|
41241
1a222acd5e89
Remove the unnecessary const specifier for the accountusersplit api
Gary Kramlich <grim@reaperworld.com>
parents:
39969
diff
changeset
|
127 | purple_account_user_split_is_constant(PurpleAccountUserSplit *split) |
|
39968
71622ee1354e
move PurpleAccountUserSplit to their own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
128 | { |
|
71622ee1354e
move PurpleAccountUserSplit to their own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
129 | g_return_val_if_fail(split != NULL, FALSE); |
|
71622ee1354e
move PurpleAccountUserSplit to their own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
130 | |
|
71622ee1354e
move PurpleAccountUserSplit to their own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
131 | return split->constant; |
|
71622ee1354e
move PurpleAccountUserSplit to their own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
132 | } |
|
71622ee1354e
move PurpleAccountUserSplit to their own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
133 | |
|
71622ee1354e
move PurpleAccountUserSplit to their own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
134 | void |
|
71622ee1354e
move PurpleAccountUserSplit to their own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
135 | purple_account_user_split_set_constant(PurpleAccountUserSplit *split, |
|
71622ee1354e
move PurpleAccountUserSplit to their own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
136 | gboolean constant) |
|
71622ee1354e
move PurpleAccountUserSplit to their own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
137 | { |
|
71622ee1354e
move PurpleAccountUserSplit to their own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
138 | g_return_if_fail(split != NULL); |
|
71622ee1354e
move PurpleAccountUserSplit to their own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
139 | |
|
71622ee1354e
move PurpleAccountUserSplit to their own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
140 | split->constant = constant; |
|
71622ee1354e
move PurpleAccountUserSplit to their own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
141 | } |
|
39969
b1ccd1961499
Make PurpleAccountUserSplit a boxed type
Gary Kramlich <grim@reaperworld.com>
parents:
39968
diff
changeset
|
142 |