libpurple/purplechanneljoindetails.c

Mon, 12 May 2025 20:25:16 -0500

author
Gary Kramlich <grim@reaperworld.com>
date
Mon, 12 May 2025 20:25:16 -0500
changeset 43246
0e9bbe9b4da8
parent 42799
8b06291db25c
permissions
-rw-r--r--

Handle formatting in server messages

Testing Done:
Used the default motd on my local ergo server to verify that formatting was working.

Reviewed at https://reviews.imfreedom.org/r/3991/

42326
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
1 /*
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
2 * Purple - Internet Messaging Library
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
3 * Copyright (C) Pidgin Developers <devel@pidgin.im>
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
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: 42576
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: 42576
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: 42576
diff changeset
7 * source distribution.
42326
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
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: 42576
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: 42576
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: 42576
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: 42576
diff changeset
12 * any later version.
42326
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
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: 42576
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: 42576
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: 42576
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: 42576
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: 42576
diff changeset
18 *
eddde70cedd8 Create a test for verifying license headers and correct the ones that were wrong
Gary Kramlich <grim@reaperworld.com>
parents: 42576
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: 42576
diff changeset
20 * this library; if not, see <https://www.gnu.org/licenses/>.
42326
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
21 */
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
22
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
23 #include "purplechanneljoindetails.h"
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
24 #include "util.h"
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
25
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
26 enum {
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
27 PROP_0,
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
28 PROP_NAME,
42799
8b06291db25c Add properties for the maximum length of properties to ChannelJoinDetails
Gary Kramlich <grim@reaperworld.com>
parents: 42767
diff changeset
29 PROP_NAME_MAX_LENGTH,
42326
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
30 PROP_NICKNAME_SUPPORTED,
42799
8b06291db25c Add properties for the maximum length of properties to ChannelJoinDetails
Gary Kramlich <grim@reaperworld.com>
parents: 42767
diff changeset
31 PROP_NICKNAME,
8b06291db25c Add properties for the maximum length of properties to ChannelJoinDetails
Gary Kramlich <grim@reaperworld.com>
parents: 42767
diff changeset
32 PROP_NICKNAME_MAX_LENGTH,
8b06291db25c Add properties for the maximum length of properties to ChannelJoinDetails
Gary Kramlich <grim@reaperworld.com>
parents: 42767
diff changeset
33 PROP_PASSWORD_SUPPORTED,
42326
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
34 PROP_PASSWORD,
42799
8b06291db25c Add properties for the maximum length of properties to ChannelJoinDetails
Gary Kramlich <grim@reaperworld.com>
parents: 42767
diff changeset
35 PROP_PASSWORD_MAX_LENGTH,
42326
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
36 N_PROPERTIES,
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
37 };
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
38 static GParamSpec *properties[N_PROPERTIES] = {NULL, };
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
39
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
40 struct _PurpleChannelJoinDetails {
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
41 GObject parent;
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
42
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
43 char *name;
42799
8b06291db25c Add properties for the maximum length of properties to ChannelJoinDetails
Gary Kramlich <grim@reaperworld.com>
parents: 42767
diff changeset
44 int name_max_length;
8b06291db25c Add properties for the maximum length of properties to ChannelJoinDetails
Gary Kramlich <grim@reaperworld.com>
parents: 42767
diff changeset
45
42326
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
46 gboolean nickname_supported;
42799
8b06291db25c Add properties for the maximum length of properties to ChannelJoinDetails
Gary Kramlich <grim@reaperworld.com>
parents: 42767
diff changeset
47 char *nickname;
8b06291db25c Add properties for the maximum length of properties to ChannelJoinDetails
Gary Kramlich <grim@reaperworld.com>
parents: 42767
diff changeset
48 int nickname_max_length;
8b06291db25c Add properties for the maximum length of properties to ChannelJoinDetails
Gary Kramlich <grim@reaperworld.com>
parents: 42767
diff changeset
49
8b06291db25c Add properties for the maximum length of properties to ChannelJoinDetails
Gary Kramlich <grim@reaperworld.com>
parents: 42767
diff changeset
50 gboolean password_supported;
42326
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
51 char *password;
42799
8b06291db25c Add properties for the maximum length of properties to ChannelJoinDetails
Gary Kramlich <grim@reaperworld.com>
parents: 42767
diff changeset
52 int password_max_length;
42326
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
53 };
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
54
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
55 /******************************************************************************
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
56 * Helpers
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
57 *****************************************************************************/
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
58 static void
42799
8b06291db25c Add properties for the maximum length of properties to ChannelJoinDetails
Gary Kramlich <grim@reaperworld.com>
parents: 42767
diff changeset
59 purple_channel_join_details_set_name_max_length(PurpleChannelJoinDetails *details,
8b06291db25c Add properties for the maximum length of properties to ChannelJoinDetails
Gary Kramlich <grim@reaperworld.com>
parents: 42767
diff changeset
60 int name_max_length)
8b06291db25c Add properties for the maximum length of properties to ChannelJoinDetails
Gary Kramlich <grim@reaperworld.com>
parents: 42767
diff changeset
61 {
8b06291db25c Add properties for the maximum length of properties to ChannelJoinDetails
Gary Kramlich <grim@reaperworld.com>
parents: 42767
diff changeset
62 g_return_if_fail(PURPLE_IS_CHANNEL_JOIN_DETAILS(details));
8b06291db25c Add properties for the maximum length of properties to ChannelJoinDetails
Gary Kramlich <grim@reaperworld.com>
parents: 42767
diff changeset
63
8b06291db25c Add properties for the maximum length of properties to ChannelJoinDetails
Gary Kramlich <grim@reaperworld.com>
parents: 42767
diff changeset
64 if(details->name_max_length != name_max_length) {
8b06291db25c Add properties for the maximum length of properties to ChannelJoinDetails
Gary Kramlich <grim@reaperworld.com>
parents: 42767
diff changeset
65 details->name_max_length = name_max_length;
8b06291db25c Add properties for the maximum length of properties to ChannelJoinDetails
Gary Kramlich <grim@reaperworld.com>
parents: 42767
diff changeset
66
8b06291db25c Add properties for the maximum length of properties to ChannelJoinDetails
Gary Kramlich <grim@reaperworld.com>
parents: 42767
diff changeset
67 g_object_notify_by_pspec(G_OBJECT(details),
8b06291db25c Add properties for the maximum length of properties to ChannelJoinDetails
Gary Kramlich <grim@reaperworld.com>
parents: 42767
diff changeset
68 properties[PROP_NAME_MAX_LENGTH]);
8b06291db25c Add properties for the maximum length of properties to ChannelJoinDetails
Gary Kramlich <grim@reaperworld.com>
parents: 42767
diff changeset
69 }
8b06291db25c Add properties for the maximum length of properties to ChannelJoinDetails
Gary Kramlich <grim@reaperworld.com>
parents: 42767
diff changeset
70 }
8b06291db25c Add properties for the maximum length of properties to ChannelJoinDetails
Gary Kramlich <grim@reaperworld.com>
parents: 42767
diff changeset
71
8b06291db25c Add properties for the maximum length of properties to ChannelJoinDetails
Gary Kramlich <grim@reaperworld.com>
parents: 42767
diff changeset
72 static void
42326
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
73 purple_channel_join_details_set_nickname_supported(PurpleChannelJoinDetails *details,
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
74 gboolean nickname_supported)
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
75 {
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
76 g_return_if_fail(PURPLE_IS_CHANNEL_JOIN_DETAILS(details));
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
77
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
78 if(details->nickname_supported != nickname_supported) {
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
79 details->nickname_supported = nickname_supported;
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
80
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
81 g_object_notify_by_pspec(G_OBJECT(details),
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
82 properties[PROP_NICKNAME_SUPPORTED]);
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
83 }
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
84 }
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
85
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
86 static void
42799
8b06291db25c Add properties for the maximum length of properties to ChannelJoinDetails
Gary Kramlich <grim@reaperworld.com>
parents: 42767
diff changeset
87 purple_channel_join_details_set_nickname_max_length(PurpleChannelJoinDetails *details,
8b06291db25c Add properties for the maximum length of properties to ChannelJoinDetails
Gary Kramlich <grim@reaperworld.com>
parents: 42767
diff changeset
88 int nickname_max_length)
8b06291db25c Add properties for the maximum length of properties to ChannelJoinDetails
Gary Kramlich <grim@reaperworld.com>
parents: 42767
diff changeset
89 {
8b06291db25c Add properties for the maximum length of properties to ChannelJoinDetails
Gary Kramlich <grim@reaperworld.com>
parents: 42767
diff changeset
90 g_return_if_fail(PURPLE_IS_CHANNEL_JOIN_DETAILS(details));
8b06291db25c Add properties for the maximum length of properties to ChannelJoinDetails
Gary Kramlich <grim@reaperworld.com>
parents: 42767
diff changeset
91
8b06291db25c Add properties for the maximum length of properties to ChannelJoinDetails
Gary Kramlich <grim@reaperworld.com>
parents: 42767
diff changeset
92 if(details->nickname_max_length != nickname_max_length) {
8b06291db25c Add properties for the maximum length of properties to ChannelJoinDetails
Gary Kramlich <grim@reaperworld.com>
parents: 42767
diff changeset
93 details->nickname_max_length = nickname_max_length;
8b06291db25c Add properties for the maximum length of properties to ChannelJoinDetails
Gary Kramlich <grim@reaperworld.com>
parents: 42767
diff changeset
94
8b06291db25c Add properties for the maximum length of properties to ChannelJoinDetails
Gary Kramlich <grim@reaperworld.com>
parents: 42767
diff changeset
95 g_object_notify_by_pspec(G_OBJECT(details),
8b06291db25c Add properties for the maximum length of properties to ChannelJoinDetails
Gary Kramlich <grim@reaperworld.com>
parents: 42767
diff changeset
96 properties[PROP_NICKNAME_MAX_LENGTH]);
8b06291db25c Add properties for the maximum length of properties to ChannelJoinDetails
Gary Kramlich <grim@reaperworld.com>
parents: 42767
diff changeset
97 }
8b06291db25c Add properties for the maximum length of properties to ChannelJoinDetails
Gary Kramlich <grim@reaperworld.com>
parents: 42767
diff changeset
98 }
8b06291db25c Add properties for the maximum length of properties to ChannelJoinDetails
Gary Kramlich <grim@reaperworld.com>
parents: 42767
diff changeset
99
8b06291db25c Add properties for the maximum length of properties to ChannelJoinDetails
Gary Kramlich <grim@reaperworld.com>
parents: 42767
diff changeset
100 static void
42326
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
101 purple_channel_join_details_set_password_supported(PurpleChannelJoinDetails *details,
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
102 gboolean password_supported)
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
103 {
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
104 g_return_if_fail(PURPLE_IS_CHANNEL_JOIN_DETAILS(details));
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
105
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
106 if(details->password_supported != password_supported) {
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
107 details->password_supported = password_supported;
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
108
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
109 g_object_notify_by_pspec(G_OBJECT(details),
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
110 properties[PROP_PASSWORD_SUPPORTED]);
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
111 }
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
112 }
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
113
42799
8b06291db25c Add properties for the maximum length of properties to ChannelJoinDetails
Gary Kramlich <grim@reaperworld.com>
parents: 42767
diff changeset
114 static void
8b06291db25c Add properties for the maximum length of properties to ChannelJoinDetails
Gary Kramlich <grim@reaperworld.com>
parents: 42767
diff changeset
115 purple_channel_join_details_set_password_max_length(PurpleChannelJoinDetails *details,
8b06291db25c Add properties for the maximum length of properties to ChannelJoinDetails
Gary Kramlich <grim@reaperworld.com>
parents: 42767
diff changeset
116 int password_max_length)
8b06291db25c Add properties for the maximum length of properties to ChannelJoinDetails
Gary Kramlich <grim@reaperworld.com>
parents: 42767
diff changeset
117 {
8b06291db25c Add properties for the maximum length of properties to ChannelJoinDetails
Gary Kramlich <grim@reaperworld.com>
parents: 42767
diff changeset
118 g_return_if_fail(PURPLE_IS_CHANNEL_JOIN_DETAILS(details));
8b06291db25c Add properties for the maximum length of properties to ChannelJoinDetails
Gary Kramlich <grim@reaperworld.com>
parents: 42767
diff changeset
119
8b06291db25c Add properties for the maximum length of properties to ChannelJoinDetails
Gary Kramlich <grim@reaperworld.com>
parents: 42767
diff changeset
120 if(details->password_max_length != password_max_length) {
8b06291db25c Add properties for the maximum length of properties to ChannelJoinDetails
Gary Kramlich <grim@reaperworld.com>
parents: 42767
diff changeset
121 details->password_max_length = password_max_length;
8b06291db25c Add properties for the maximum length of properties to ChannelJoinDetails
Gary Kramlich <grim@reaperworld.com>
parents: 42767
diff changeset
122
8b06291db25c Add properties for the maximum length of properties to ChannelJoinDetails
Gary Kramlich <grim@reaperworld.com>
parents: 42767
diff changeset
123 g_object_notify_by_pspec(G_OBJECT(details),
8b06291db25c Add properties for the maximum length of properties to ChannelJoinDetails
Gary Kramlich <grim@reaperworld.com>
parents: 42767
diff changeset
124 properties[PROP_PASSWORD_MAX_LENGTH]);
8b06291db25c Add properties for the maximum length of properties to ChannelJoinDetails
Gary Kramlich <grim@reaperworld.com>
parents: 42767
diff changeset
125 }
8b06291db25c Add properties for the maximum length of properties to ChannelJoinDetails
Gary Kramlich <grim@reaperworld.com>
parents: 42767
diff changeset
126 }
8b06291db25c Add properties for the maximum length of properties to ChannelJoinDetails
Gary Kramlich <grim@reaperworld.com>
parents: 42767
diff changeset
127
42326
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
128 /******************************************************************************
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
129 * GObject Implementation
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
130 *****************************************************************************/
42576
ab1ca778ddb2 Make sure all of the final types in libpurple are defined as such
Gary Kramlich <grim@reaperworld.com>
parents: 42364
diff changeset
131 G_DEFINE_FINAL_TYPE(PurpleChannelJoinDetails, purple_channel_join_details,
ab1ca778ddb2 Make sure all of the final types in libpurple are defined as such
Gary Kramlich <grim@reaperworld.com>
parents: 42364
diff changeset
132 G_TYPE_OBJECT)
42326
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
133
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
134 static void
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
135 purple_channel_join_details_finalize(GObject *obj) {
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
136 PurpleChannelJoinDetails *details = PURPLE_CHANNEL_JOIN_DETAILS(obj);
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
137
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
138 g_clear_pointer(&details->name, g_free);
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
139 g_clear_pointer(&details->nickname, g_free);
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
140 g_clear_pointer(&details->password, g_free);
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
141
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
142 G_OBJECT_CLASS(purple_channel_join_details_parent_class)->finalize(obj);
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
143 }
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
144
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
145 static void
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
146 purple_channel_join_details_get_property(GObject *obj, guint param_id,
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
147 GValue *value, GParamSpec *pspec)
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
148 {
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
149 PurpleChannelJoinDetails *details = PURPLE_CHANNEL_JOIN_DETAILS(obj);
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
150
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
151 switch(param_id) {
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
152 case PROP_NAME:
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
153 g_value_set_string(value,
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
154 purple_channel_join_details_get_name(details));
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
155 break;
42799
8b06291db25c Add properties for the maximum length of properties to ChannelJoinDetails
Gary Kramlich <grim@reaperworld.com>
parents: 42767
diff changeset
156 case PROP_NAME_MAX_LENGTH:
8b06291db25c Add properties for the maximum length of properties to ChannelJoinDetails
Gary Kramlich <grim@reaperworld.com>
parents: 42767
diff changeset
157 g_value_set_int(value,
8b06291db25c Add properties for the maximum length of properties to ChannelJoinDetails
Gary Kramlich <grim@reaperworld.com>
parents: 42767
diff changeset
158 purple_channel_join_details_get_name_max_length(details));
42326
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
159 break;
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
160 case PROP_NICKNAME_SUPPORTED:
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
161 g_value_set_boolean(value,
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
162 purple_channel_join_details_get_nickname_supported(details));
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
163 break;
42799
8b06291db25c Add properties for the maximum length of properties to ChannelJoinDetails
Gary Kramlich <grim@reaperworld.com>
parents: 42767
diff changeset
164 case PROP_NICKNAME:
8b06291db25c Add properties for the maximum length of properties to ChannelJoinDetails
Gary Kramlich <grim@reaperworld.com>
parents: 42767
diff changeset
165 g_value_set_string(value,
8b06291db25c Add properties for the maximum length of properties to ChannelJoinDetails
Gary Kramlich <grim@reaperworld.com>
parents: 42767
diff changeset
166 purple_channel_join_details_get_nickname(details));
8b06291db25c Add properties for the maximum length of properties to ChannelJoinDetails
Gary Kramlich <grim@reaperworld.com>
parents: 42767
diff changeset
167 break;
8b06291db25c Add properties for the maximum length of properties to ChannelJoinDetails
Gary Kramlich <grim@reaperworld.com>
parents: 42767
diff changeset
168 case PROP_NICKNAME_MAX_LENGTH:
8b06291db25c Add properties for the maximum length of properties to ChannelJoinDetails
Gary Kramlich <grim@reaperworld.com>
parents: 42767
diff changeset
169 g_value_set_int(value,
8b06291db25c Add properties for the maximum length of properties to ChannelJoinDetails
Gary Kramlich <grim@reaperworld.com>
parents: 42767
diff changeset
170 purple_channel_join_details_get_nickname_max_length(details));
8b06291db25c Add properties for the maximum length of properties to ChannelJoinDetails
Gary Kramlich <grim@reaperworld.com>
parents: 42767
diff changeset
171 break;
8b06291db25c Add properties for the maximum length of properties to ChannelJoinDetails
Gary Kramlich <grim@reaperworld.com>
parents: 42767
diff changeset
172 case PROP_PASSWORD_SUPPORTED:
8b06291db25c Add properties for the maximum length of properties to ChannelJoinDetails
Gary Kramlich <grim@reaperworld.com>
parents: 42767
diff changeset
173 g_value_set_boolean(value,
8b06291db25c Add properties for the maximum length of properties to ChannelJoinDetails
Gary Kramlich <grim@reaperworld.com>
parents: 42767
diff changeset
174 purple_channel_join_details_get_password_supported(details));
8b06291db25c Add properties for the maximum length of properties to ChannelJoinDetails
Gary Kramlich <grim@reaperworld.com>
parents: 42767
diff changeset
175 break;
42326
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
176 case PROP_PASSWORD:
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
177 g_value_set_string(value,
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
178 purple_channel_join_details_get_password(details));
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
179 break;
42799
8b06291db25c Add properties for the maximum length of properties to ChannelJoinDetails
Gary Kramlich <grim@reaperworld.com>
parents: 42767
diff changeset
180 case PROP_PASSWORD_MAX_LENGTH:
8b06291db25c Add properties for the maximum length of properties to ChannelJoinDetails
Gary Kramlich <grim@reaperworld.com>
parents: 42767
diff changeset
181 g_value_set_int(value,
8b06291db25c Add properties for the maximum length of properties to ChannelJoinDetails
Gary Kramlich <grim@reaperworld.com>
parents: 42767
diff changeset
182 purple_channel_join_details_get_password_max_length(details));
42326
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
183 break;
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
184 default:
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
185 G_OBJECT_WARN_INVALID_PROPERTY_ID(obj, param_id, pspec);
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
186 break;
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
187 }
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
188 }
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
189
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
190 static void
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
191 purple_channel_join_details_set_property(GObject *obj, guint param_id,
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
192 const GValue *value,
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
193 GParamSpec *pspec)
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
194 {
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
195 PurpleChannelJoinDetails *details = PURPLE_CHANNEL_JOIN_DETAILS(obj);
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
196
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
197 switch(param_id) {
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
198 case PROP_NAME:
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
199 purple_channel_join_details_set_name(details,
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
200 g_value_get_string(value));
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
201 break;
42799
8b06291db25c Add properties for the maximum length of properties to ChannelJoinDetails
Gary Kramlich <grim@reaperworld.com>
parents: 42767
diff changeset
202 case PROP_NAME_MAX_LENGTH:
8b06291db25c Add properties for the maximum length of properties to ChannelJoinDetails
Gary Kramlich <grim@reaperworld.com>
parents: 42767
diff changeset
203 purple_channel_join_details_set_name_max_length(details,
8b06291db25c Add properties for the maximum length of properties to ChannelJoinDetails
Gary Kramlich <grim@reaperworld.com>
parents: 42767
diff changeset
204 g_value_get_int(value));
8b06291db25c Add properties for the maximum length of properties to ChannelJoinDetails
Gary Kramlich <grim@reaperworld.com>
parents: 42767
diff changeset
205 break;
8b06291db25c Add properties for the maximum length of properties to ChannelJoinDetails
Gary Kramlich <grim@reaperworld.com>
parents: 42767
diff changeset
206 case PROP_NICKNAME_SUPPORTED:
8b06291db25c Add properties for the maximum length of properties to ChannelJoinDetails
Gary Kramlich <grim@reaperworld.com>
parents: 42767
diff changeset
207 purple_channel_join_details_set_nickname_supported(details,
8b06291db25c Add properties for the maximum length of properties to ChannelJoinDetails
Gary Kramlich <grim@reaperworld.com>
parents: 42767
diff changeset
208 g_value_get_boolean(value));
8b06291db25c Add properties for the maximum length of properties to ChannelJoinDetails
Gary Kramlich <grim@reaperworld.com>
parents: 42767
diff changeset
209 break;
42326
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
210 case PROP_NICKNAME:
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
211 purple_channel_join_details_set_nickname(details,
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
212 g_value_get_string(value));
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
213 break;
42799
8b06291db25c Add properties for the maximum length of properties to ChannelJoinDetails
Gary Kramlich <grim@reaperworld.com>
parents: 42767
diff changeset
214 case PROP_NICKNAME_MAX_LENGTH:
8b06291db25c Add properties for the maximum length of properties to ChannelJoinDetails
Gary Kramlich <grim@reaperworld.com>
parents: 42767
diff changeset
215 purple_channel_join_details_set_nickname_max_length(details,
8b06291db25c Add properties for the maximum length of properties to ChannelJoinDetails
Gary Kramlich <grim@reaperworld.com>
parents: 42767
diff changeset
216 g_value_get_int(value));
8b06291db25c Add properties for the maximum length of properties to ChannelJoinDetails
Gary Kramlich <grim@reaperworld.com>
parents: 42767
diff changeset
217 break;
8b06291db25c Add properties for the maximum length of properties to ChannelJoinDetails
Gary Kramlich <grim@reaperworld.com>
parents: 42767
diff changeset
218 case PROP_PASSWORD_SUPPORTED:
8b06291db25c Add properties for the maximum length of properties to ChannelJoinDetails
Gary Kramlich <grim@reaperworld.com>
parents: 42767
diff changeset
219 purple_channel_join_details_set_password_supported(details,
42326
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
220 g_value_get_boolean(value));
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
221 break;
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
222 case PROP_PASSWORD:
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
223 purple_channel_join_details_set_password(details,
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
224 g_value_get_string(value));
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
225 break;
42799
8b06291db25c Add properties for the maximum length of properties to ChannelJoinDetails
Gary Kramlich <grim@reaperworld.com>
parents: 42767
diff changeset
226 case PROP_PASSWORD_MAX_LENGTH:
8b06291db25c Add properties for the maximum length of properties to ChannelJoinDetails
Gary Kramlich <grim@reaperworld.com>
parents: 42767
diff changeset
227 purple_channel_join_details_set_password_max_length(details,
8b06291db25c Add properties for the maximum length of properties to ChannelJoinDetails
Gary Kramlich <grim@reaperworld.com>
parents: 42767
diff changeset
228 g_value_get_int(value));
42326
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
229 break;
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
230 default:
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
231 G_OBJECT_WARN_INVALID_PROPERTY_ID(obj, param_id, pspec);
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
232 break;
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
233 }
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
234 }
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
235
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
236 static void
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
237 purple_channel_join_details_init(G_GNUC_UNUSED PurpleChannelJoinDetails *details)
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
238 {
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
239 }
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
240
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
241 static void
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
242 purple_channel_join_details_class_init(PurpleChannelJoinDetailsClass *klass) {
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
243 GObjectClass *obj_class = G_OBJECT_CLASS(klass);
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
244
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
245 obj_class->finalize = purple_channel_join_details_finalize;
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
246 obj_class->get_property = purple_channel_join_details_get_property;
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
247 obj_class->set_property = purple_channel_join_details_set_property;
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
248
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
249 /**
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
250 * PurpleChannelJoinDetails:name:
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
251 *
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
252 * The name of the channel to join.
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
253 *
42613
780d7efe37c2 Remove the micro version from since tags for libpurple part 2
Gary Kramlich <grim@reaperworld.com>
parents: 42594
diff changeset
254 * Since: 3.0
42326
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
255 */
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
256 properties[PROP_NAME] = g_param_spec_string(
42799
8b06291db25c Add properties for the maximum length of properties to ChannelJoinDetails
Gary Kramlich <grim@reaperworld.com>
parents: 42767
diff changeset
257 "name", NULL, NULL,
42326
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
258 NULL,
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
259 G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
260
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
261 /**
42799
8b06291db25c Add properties for the maximum length of properties to ChannelJoinDetails
Gary Kramlich <grim@reaperworld.com>
parents: 42767
diff changeset
262 * PurpleChannelJoinDetails:name-max-length:
8b06291db25c Add properties for the maximum length of properties to ChannelJoinDetails
Gary Kramlich <grim@reaperworld.com>
parents: 42767
diff changeset
263 *
8b06291db25c Add properties for the maximum length of properties to ChannelJoinDetails
Gary Kramlich <grim@reaperworld.com>
parents: 42767
diff changeset
264 * The maximum length of the name of the channel to join.
8b06291db25c Add properties for the maximum length of properties to ChannelJoinDetails
Gary Kramlich <grim@reaperworld.com>
parents: 42767
diff changeset
265 *
8b06291db25c Add properties for the maximum length of properties to ChannelJoinDetails
Gary Kramlich <grim@reaperworld.com>
parents: 42767
diff changeset
266 * A value of %0 means there is no maximum.
8b06291db25c Add properties for the maximum length of properties to ChannelJoinDetails
Gary Kramlich <grim@reaperworld.com>
parents: 42767
diff changeset
267 *
8b06291db25c Add properties for the maximum length of properties to ChannelJoinDetails
Gary Kramlich <grim@reaperworld.com>
parents: 42767
diff changeset
268 * Since: 3.0
8b06291db25c Add properties for the maximum length of properties to ChannelJoinDetails
Gary Kramlich <grim@reaperworld.com>
parents: 42767
diff changeset
269 */
8b06291db25c Add properties for the maximum length of properties to ChannelJoinDetails
Gary Kramlich <grim@reaperworld.com>
parents: 42767
diff changeset
270 properties[PROP_NAME_MAX_LENGTH] = g_param_spec_int(
8b06291db25c Add properties for the maximum length of properties to ChannelJoinDetails
Gary Kramlich <grim@reaperworld.com>
parents: 42767
diff changeset
271 "name-max-length", NULL, NULL,
8b06291db25c Add properties for the maximum length of properties to ChannelJoinDetails
Gary Kramlich <grim@reaperworld.com>
parents: 42767
diff changeset
272 0, G_MAXINT, 0,
8b06291db25c Add properties for the maximum length of properties to ChannelJoinDetails
Gary Kramlich <grim@reaperworld.com>
parents: 42767
diff changeset
273 G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS);
8b06291db25c Add properties for the maximum length of properties to ChannelJoinDetails
Gary Kramlich <grim@reaperworld.com>
parents: 42767
diff changeset
274
8b06291db25c Add properties for the maximum length of properties to ChannelJoinDetails
Gary Kramlich <grim@reaperworld.com>
parents: 42767
diff changeset
275 /**
8b06291db25c Add properties for the maximum length of properties to ChannelJoinDetails
Gary Kramlich <grim@reaperworld.com>
parents: 42767
diff changeset
276 * PurpleChannelJoinDetails:nickname-supported:
8b06291db25c Add properties for the maximum length of properties to ChannelJoinDetails
Gary Kramlich <grim@reaperworld.com>
parents: 42767
diff changeset
277 *
8b06291db25c Add properties for the maximum length of properties to ChannelJoinDetails
Gary Kramlich <grim@reaperworld.com>
parents: 42767
diff changeset
278 * Whether or not the protocol supports channel-specific nicknames.
8b06291db25c Add properties for the maximum length of properties to ChannelJoinDetails
Gary Kramlich <grim@reaperworld.com>
parents: 42767
diff changeset
279 *
8b06291db25c Add properties for the maximum length of properties to ChannelJoinDetails
Gary Kramlich <grim@reaperworld.com>
parents: 42767
diff changeset
280 * Since: 3.0
8b06291db25c Add properties for the maximum length of properties to ChannelJoinDetails
Gary Kramlich <grim@reaperworld.com>
parents: 42767
diff changeset
281 */
8b06291db25c Add properties for the maximum length of properties to ChannelJoinDetails
Gary Kramlich <grim@reaperworld.com>
parents: 42767
diff changeset
282 properties[PROP_NICKNAME_SUPPORTED] = g_param_spec_boolean(
8b06291db25c Add properties for the maximum length of properties to ChannelJoinDetails
Gary Kramlich <grim@reaperworld.com>
parents: 42767
diff changeset
283 "nickname-supported", NULL, NULL,
8b06291db25c Add properties for the maximum length of properties to ChannelJoinDetails
Gary Kramlich <grim@reaperworld.com>
parents: 42767
diff changeset
284 FALSE,
8b06291db25c Add properties for the maximum length of properties to ChannelJoinDetails
Gary Kramlich <grim@reaperworld.com>
parents: 42767
diff changeset
285 G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS);
8b06291db25c Add properties for the maximum length of properties to ChannelJoinDetails
Gary Kramlich <grim@reaperworld.com>
parents: 42767
diff changeset
286
8b06291db25c Add properties for the maximum length of properties to ChannelJoinDetails
Gary Kramlich <grim@reaperworld.com>
parents: 42767
diff changeset
287 /**
42326
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
288 * PurpleChannelJoinDetails:nickname:
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
289 *
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
290 * The nickname of the user in the channel.
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
291 *
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
292 * Not all protocols support a channel-specific username, so user
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
293 * interfaces should check [property@ChannelJoinDetails:nickname-supported]
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
294 * before displaying this option to the user.
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
295 *
42613
780d7efe37c2 Remove the micro version from since tags for libpurple part 2
Gary Kramlich <grim@reaperworld.com>
parents: 42594
diff changeset
296 * Since: 3.0
42326
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
297 */
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
298 properties[PROP_NICKNAME] = g_param_spec_string(
42799
8b06291db25c Add properties for the maximum length of properties to ChannelJoinDetails
Gary Kramlich <grim@reaperworld.com>
parents: 42767
diff changeset
299 "nickname", NULL, NULL,
42326
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
300 NULL,
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
301 G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
302
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
303 /**
42799
8b06291db25c Add properties for the maximum length of properties to ChannelJoinDetails
Gary Kramlich <grim@reaperworld.com>
parents: 42767
diff changeset
304 * PurpleChannelJoinDetails:nickname-max-length:
42326
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
305 *
42799
8b06291db25c Add properties for the maximum length of properties to ChannelJoinDetails
Gary Kramlich <grim@reaperworld.com>
parents: 42767
diff changeset
306 * The maximum length for the channel specific nickname.
8b06291db25c Add properties for the maximum length of properties to ChannelJoinDetails
Gary Kramlich <grim@reaperworld.com>
parents: 42767
diff changeset
307 *
8b06291db25c Add properties for the maximum length of properties to ChannelJoinDetails
Gary Kramlich <grim@reaperworld.com>
parents: 42767
diff changeset
308 * A value of %0 indicates no limit.
42326
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
309 *
42613
780d7efe37c2 Remove the micro version from since tags for libpurple part 2
Gary Kramlich <grim@reaperworld.com>
parents: 42594
diff changeset
310 * Since: 3.0
42326
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
311 */
42799
8b06291db25c Add properties for the maximum length of properties to ChannelJoinDetails
Gary Kramlich <grim@reaperworld.com>
parents: 42767
diff changeset
312 properties[PROP_NICKNAME_MAX_LENGTH] = g_param_spec_int(
8b06291db25c Add properties for the maximum length of properties to ChannelJoinDetails
Gary Kramlich <grim@reaperworld.com>
parents: 42767
diff changeset
313 "nickname-max-length", NULL, NULL,
8b06291db25c Add properties for the maximum length of properties to ChannelJoinDetails
Gary Kramlich <grim@reaperworld.com>
parents: 42767
diff changeset
314 0, G_MAXINT, 0,
8b06291db25c Add properties for the maximum length of properties to ChannelJoinDetails
Gary Kramlich <grim@reaperworld.com>
parents: 42767
diff changeset
315 G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS);
8b06291db25c Add properties for the maximum length of properties to ChannelJoinDetails
Gary Kramlich <grim@reaperworld.com>
parents: 42767
diff changeset
316
8b06291db25c Add properties for the maximum length of properties to ChannelJoinDetails
Gary Kramlich <grim@reaperworld.com>
parents: 42767
diff changeset
317 /**
8b06291db25c Add properties for the maximum length of properties to ChannelJoinDetails
Gary Kramlich <grim@reaperworld.com>
parents: 42767
diff changeset
318 * PurpleChannelJoinDetails:password-supported:
8b06291db25c Add properties for the maximum length of properties to ChannelJoinDetails
Gary Kramlich <grim@reaperworld.com>
parents: 42767
diff changeset
319 *
8b06291db25c Add properties for the maximum length of properties to ChannelJoinDetails
Gary Kramlich <grim@reaperworld.com>
parents: 42767
diff changeset
320 * Whether or not the protocol supports channel passwords.
8b06291db25c Add properties for the maximum length of properties to ChannelJoinDetails
Gary Kramlich <grim@reaperworld.com>
parents: 42767
diff changeset
321 *
8b06291db25c Add properties for the maximum length of properties to ChannelJoinDetails
Gary Kramlich <grim@reaperworld.com>
parents: 42767
diff changeset
322 * Since: 3.0
8b06291db25c Add properties for the maximum length of properties to ChannelJoinDetails
Gary Kramlich <grim@reaperworld.com>
parents: 42767
diff changeset
323 */
8b06291db25c Add properties for the maximum length of properties to ChannelJoinDetails
Gary Kramlich <grim@reaperworld.com>
parents: 42767
diff changeset
324 properties[PROP_PASSWORD_SUPPORTED] = g_param_spec_boolean(
8b06291db25c Add properties for the maximum length of properties to ChannelJoinDetails
Gary Kramlich <grim@reaperworld.com>
parents: 42767
diff changeset
325 "password-supported", NULL, NULL,
42326
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
326 FALSE,
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
327 G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS);
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
328
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
329 /**
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
330 * PurpleChannelJoinDetails:password:
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
331 *
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
332 * The password to use to join the channel.
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
333 *
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
334 * This is protocol specific so be sure to check
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
335 * [property@PurpleChannelJoinDetails:password-supported] before displaying
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
336 * this option to the user.
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
337 *
42613
780d7efe37c2 Remove the micro version from since tags for libpurple part 2
Gary Kramlich <grim@reaperworld.com>
parents: 42594
diff changeset
338 * Since: 3.0
42326
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
339 */
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
340 properties[PROP_PASSWORD] = g_param_spec_string(
42799
8b06291db25c Add properties for the maximum length of properties to ChannelJoinDetails
Gary Kramlich <grim@reaperworld.com>
parents: 42767
diff changeset
341 "password", NULL, NULL,
42326
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
342 NULL,
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
343 G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
344
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
345 /**
42799
8b06291db25c Add properties for the maximum length of properties to ChannelJoinDetails
Gary Kramlich <grim@reaperworld.com>
parents: 42767
diff changeset
346 * PurpleChannelJoinDetails:password-max-length:
42326
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
347 *
42799
8b06291db25c Add properties for the maximum length of properties to ChannelJoinDetails
Gary Kramlich <grim@reaperworld.com>
parents: 42767
diff changeset
348 * The maximum length for the channel specific password.
8b06291db25c Add properties for the maximum length of properties to ChannelJoinDetails
Gary Kramlich <grim@reaperworld.com>
parents: 42767
diff changeset
349 *
8b06291db25c Add properties for the maximum length of properties to ChannelJoinDetails
Gary Kramlich <grim@reaperworld.com>
parents: 42767
diff changeset
350 * A value of %0 indicates no limit.
42326
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
351 *
42613
780d7efe37c2 Remove the micro version from since tags for libpurple part 2
Gary Kramlich <grim@reaperworld.com>
parents: 42594
diff changeset
352 * Since: 3.0
42326
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
353 */
42799
8b06291db25c Add properties for the maximum length of properties to ChannelJoinDetails
Gary Kramlich <grim@reaperworld.com>
parents: 42767
diff changeset
354 properties[PROP_PASSWORD_MAX_LENGTH] = g_param_spec_int(
8b06291db25c Add properties for the maximum length of properties to ChannelJoinDetails
Gary Kramlich <grim@reaperworld.com>
parents: 42767
diff changeset
355 "password-max-length", NULL, NULL,
8b06291db25c Add properties for the maximum length of properties to ChannelJoinDetails
Gary Kramlich <grim@reaperworld.com>
parents: 42767
diff changeset
356 0, G_MAXINT, 0,
42326
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
357 G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS);
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
358
42799
8b06291db25c Add properties for the maximum length of properties to ChannelJoinDetails
Gary Kramlich <grim@reaperworld.com>
parents: 42767
diff changeset
359
42326
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
360 g_object_class_install_properties(obj_class, N_PROPERTIES, properties);
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
361 }
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
362
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
363 /******************************************************************************
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
364 * Public API
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
365 *****************************************************************************/
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
366 PurpleChannelJoinDetails *
42799
8b06291db25c Add properties for the maximum length of properties to ChannelJoinDetails
Gary Kramlich <grim@reaperworld.com>
parents: 42767
diff changeset
367 purple_channel_join_details_new(int name_max_length,
8b06291db25c Add properties for the maximum length of properties to ChannelJoinDetails
Gary Kramlich <grim@reaperworld.com>
parents: 42767
diff changeset
368 gboolean nickname_supported,
8b06291db25c Add properties for the maximum length of properties to ChannelJoinDetails
Gary Kramlich <grim@reaperworld.com>
parents: 42767
diff changeset
369 int nickname_max_length,
8b06291db25c Add properties for the maximum length of properties to ChannelJoinDetails
Gary Kramlich <grim@reaperworld.com>
parents: 42767
diff changeset
370 gboolean password_supported,
8b06291db25c Add properties for the maximum length of properties to ChannelJoinDetails
Gary Kramlich <grim@reaperworld.com>
parents: 42767
diff changeset
371 int password_max_length)
42326
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
372 {
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
373 return g_object_new(
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
374 PURPLE_TYPE_CHANNEL_JOIN_DETAILS,
42799
8b06291db25c Add properties for the maximum length of properties to ChannelJoinDetails
Gary Kramlich <grim@reaperworld.com>
parents: 42767
diff changeset
375 "name-max-length", name_max_length,
42326
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
376 "nickname-supported", nickname_supported,
42799
8b06291db25c Add properties for the maximum length of properties to ChannelJoinDetails
Gary Kramlich <grim@reaperworld.com>
parents: 42767
diff changeset
377 "nickname-max-length", nickname_max_length,
42326
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
378 "password-supported", password_supported,
42799
8b06291db25c Add properties for the maximum length of properties to ChannelJoinDetails
Gary Kramlich <grim@reaperworld.com>
parents: 42767
diff changeset
379 "password-max-length", password_max_length,
42326
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
380 NULL);
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
381 }
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
382
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
383 const char *
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
384 purple_channel_join_details_get_name(PurpleChannelJoinDetails *details) {
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
385 g_return_val_if_fail(PURPLE_IS_CHANNEL_JOIN_DETAILS(details), NULL);
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
386
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
387 return details->name;
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
388 }
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
389
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
390 void
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
391 purple_channel_join_details_set_name(PurpleChannelJoinDetails *details,
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
392 const char *name)
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
393 {
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
394 g_return_if_fail(PURPLE_IS_CHANNEL_JOIN_DETAILS(details));
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
395
42767
8cf1d11b59c1 Use g_set_str everywhere
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42613
diff changeset
396 if(g_set_str(&details->name, name)) {
42326
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
397 g_object_notify_by_pspec(G_OBJECT(details), properties[PROP_NAME]);
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
398 }
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
399 }
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
400
42799
8b06291db25c Add properties for the maximum length of properties to ChannelJoinDetails
Gary Kramlich <grim@reaperworld.com>
parents: 42767
diff changeset
401 int
8b06291db25c Add properties for the maximum length of properties to ChannelJoinDetails
Gary Kramlich <grim@reaperworld.com>
parents: 42767
diff changeset
402 purple_channel_join_details_get_name_max_length(PurpleChannelJoinDetails *details)
8b06291db25c Add properties for the maximum length of properties to ChannelJoinDetails
Gary Kramlich <grim@reaperworld.com>
parents: 42767
diff changeset
403 {
8b06291db25c Add properties for the maximum length of properties to ChannelJoinDetails
Gary Kramlich <grim@reaperworld.com>
parents: 42767
diff changeset
404 g_return_val_if_fail(PURPLE_IS_CHANNEL_JOIN_DETAILS(details), 0);
8b06291db25c Add properties for the maximum length of properties to ChannelJoinDetails
Gary Kramlich <grim@reaperworld.com>
parents: 42767
diff changeset
405
8b06291db25c Add properties for the maximum length of properties to ChannelJoinDetails
Gary Kramlich <grim@reaperworld.com>
parents: 42767
diff changeset
406 return details->name_max_length;
8b06291db25c Add properties for the maximum length of properties to ChannelJoinDetails
Gary Kramlich <grim@reaperworld.com>
parents: 42767
diff changeset
407 }
8b06291db25c Add properties for the maximum length of properties to ChannelJoinDetails
Gary Kramlich <grim@reaperworld.com>
parents: 42767
diff changeset
408
8b06291db25c Add properties for the maximum length of properties to ChannelJoinDetails
Gary Kramlich <grim@reaperworld.com>
parents: 42767
diff changeset
409 gboolean
8b06291db25c Add properties for the maximum length of properties to ChannelJoinDetails
Gary Kramlich <grim@reaperworld.com>
parents: 42767
diff changeset
410 purple_channel_join_details_get_nickname_supported(PurpleChannelJoinDetails *details) {
8b06291db25c Add properties for the maximum length of properties to ChannelJoinDetails
Gary Kramlich <grim@reaperworld.com>
parents: 42767
diff changeset
411 g_return_val_if_fail(PURPLE_IS_CHANNEL_JOIN_DETAILS(details), FALSE);
8b06291db25c Add properties for the maximum length of properties to ChannelJoinDetails
Gary Kramlich <grim@reaperworld.com>
parents: 42767
diff changeset
412
8b06291db25c Add properties for the maximum length of properties to ChannelJoinDetails
Gary Kramlich <grim@reaperworld.com>
parents: 42767
diff changeset
413 return details->nickname_supported;
8b06291db25c Add properties for the maximum length of properties to ChannelJoinDetails
Gary Kramlich <grim@reaperworld.com>
parents: 42767
diff changeset
414 }
8b06291db25c Add properties for the maximum length of properties to ChannelJoinDetails
Gary Kramlich <grim@reaperworld.com>
parents: 42767
diff changeset
415
42326
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
416 const char *
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
417 purple_channel_join_details_get_nickname(PurpleChannelJoinDetails *details) {
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
418 g_return_val_if_fail(PURPLE_IS_CHANNEL_JOIN_DETAILS(details), NULL);
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
419
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
420 return details->nickname;
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
421 }
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
422
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
423 void
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
424 purple_channel_join_details_set_nickname(PurpleChannelJoinDetails *details,
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
425 const char *nickname)
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
426 {
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
427 g_return_if_fail(PURPLE_IS_CHANNEL_JOIN_DETAILS(details));
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
428
42767
8cf1d11b59c1 Use g_set_str everywhere
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42613
diff changeset
429 if(g_set_str(&details->nickname, nickname)) {
42326
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
430 g_object_notify_by_pspec(G_OBJECT(details), properties[PROP_NICKNAME]);
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
431 }
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
432 }
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
433
42799
8b06291db25c Add properties for the maximum length of properties to ChannelJoinDetails
Gary Kramlich <grim@reaperworld.com>
parents: 42767
diff changeset
434 int
8b06291db25c Add properties for the maximum length of properties to ChannelJoinDetails
Gary Kramlich <grim@reaperworld.com>
parents: 42767
diff changeset
435 purple_channel_join_details_get_nickname_max_length(PurpleChannelJoinDetails *details)
8b06291db25c Add properties for the maximum length of properties to ChannelJoinDetails
Gary Kramlich <grim@reaperworld.com>
parents: 42767
diff changeset
436 {
8b06291db25c Add properties for the maximum length of properties to ChannelJoinDetails
Gary Kramlich <grim@reaperworld.com>
parents: 42767
diff changeset
437 g_return_val_if_fail(PURPLE_IS_CHANNEL_JOIN_DETAILS(details), 0);
8b06291db25c Add properties for the maximum length of properties to ChannelJoinDetails
Gary Kramlich <grim@reaperworld.com>
parents: 42767
diff changeset
438
8b06291db25c Add properties for the maximum length of properties to ChannelJoinDetails
Gary Kramlich <grim@reaperworld.com>
parents: 42767
diff changeset
439 return details->nickname_max_length;
8b06291db25c Add properties for the maximum length of properties to ChannelJoinDetails
Gary Kramlich <grim@reaperworld.com>
parents: 42767
diff changeset
440 }
8b06291db25c Add properties for the maximum length of properties to ChannelJoinDetails
Gary Kramlich <grim@reaperworld.com>
parents: 42767
diff changeset
441
42326
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
442 gboolean
42799
8b06291db25c Add properties for the maximum length of properties to ChannelJoinDetails
Gary Kramlich <grim@reaperworld.com>
parents: 42767
diff changeset
443 purple_channel_join_details_get_password_supported(PurpleChannelJoinDetails *details)
8b06291db25c Add properties for the maximum length of properties to ChannelJoinDetails
Gary Kramlich <grim@reaperworld.com>
parents: 42767
diff changeset
444 {
42326
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
445 g_return_val_if_fail(PURPLE_IS_CHANNEL_JOIN_DETAILS(details), FALSE);
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
446
42799
8b06291db25c Add properties for the maximum length of properties to ChannelJoinDetails
Gary Kramlich <grim@reaperworld.com>
parents: 42767
diff changeset
447 return details->password_supported;
42326
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
448 }
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
449
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
450 const char *
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
451 purple_channel_join_details_get_password(PurpleChannelJoinDetails *details) {
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
452 g_return_val_if_fail(PURPLE_IS_CHANNEL_JOIN_DETAILS(details), NULL);
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
453
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
454 return details->password;
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
455 }
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
456
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
457 void
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
458 purple_channel_join_details_set_password(PurpleChannelJoinDetails *details,
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
459 const char *password)
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
460 {
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
461 g_return_if_fail(PURPLE_IS_CHANNEL_JOIN_DETAILS(details));
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
462
42767
8cf1d11b59c1 Use g_set_str everywhere
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42613
diff changeset
463 if(g_set_str(&details->password, password)) {
42326
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
464 g_object_notify_by_pspec(G_OBJECT(details), properties[PROP_PASSWORD]);
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
465 }
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
466 }
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
467
42799
8b06291db25c Add properties for the maximum length of properties to ChannelJoinDetails
Gary Kramlich <grim@reaperworld.com>
parents: 42767
diff changeset
468 int
8b06291db25c Add properties for the maximum length of properties to ChannelJoinDetails
Gary Kramlich <grim@reaperworld.com>
parents: 42767
diff changeset
469 purple_channel_join_details_get_password_max_length(PurpleChannelJoinDetails *details)
42326
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
470 {
42799
8b06291db25c Add properties for the maximum length of properties to ChannelJoinDetails
Gary Kramlich <grim@reaperworld.com>
parents: 42767
diff changeset
471 g_return_val_if_fail(PURPLE_IS_CHANNEL_JOIN_DETAILS(details), 0);
42326
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
472
42799
8b06291db25c Add properties for the maximum length of properties to ChannelJoinDetails
Gary Kramlich <grim@reaperworld.com>
parents: 42767
diff changeset
473 return details->password_max_length;
42326
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
474 }
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
475
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
476 void
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
477 purple_channel_join_details_merge(PurpleChannelJoinDetails *source,
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
478 PurpleChannelJoinDetails *destination)
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
479 {
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
480 GObject *obj = NULL;
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
481 const char *value = NULL;
42364
b739bb0811f7 Merge whether nickname and password are supported when merging ChannelJoinDetails
Gary Kramlich <grim@reaperworld.com>
parents: 42326
diff changeset
482 gboolean supported = FALSE;
42326
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
483
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
484 g_return_if_fail(PURPLE_IS_CHANNEL_JOIN_DETAILS(source));
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
485 g_return_if_fail(PURPLE_IS_CHANNEL_JOIN_DETAILS(destination));
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
486
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
487 obj = G_OBJECT(destination);
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
488 g_object_freeze_notify(obj);
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
489
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
490 value = purple_channel_join_details_get_name(source);
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
491 purple_channel_join_details_set_name(destination, value);
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
492
42364
b739bb0811f7 Merge whether nickname and password are supported when merging ChannelJoinDetails
Gary Kramlich <grim@reaperworld.com>
parents: 42326
diff changeset
493 supported = purple_channel_join_details_get_nickname_supported(source);
b739bb0811f7 Merge whether nickname and password are supported when merging ChannelJoinDetails
Gary Kramlich <grim@reaperworld.com>
parents: 42326
diff changeset
494 purple_channel_join_details_set_nickname_supported(destination, supported);
b739bb0811f7 Merge whether nickname and password are supported when merging ChannelJoinDetails
Gary Kramlich <grim@reaperworld.com>
parents: 42326
diff changeset
495
42326
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
496 value = purple_channel_join_details_get_nickname(source);
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
497 purple_channel_join_details_set_nickname(destination, value);
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
498
42364
b739bb0811f7 Merge whether nickname and password are supported when merging ChannelJoinDetails
Gary Kramlich <grim@reaperworld.com>
parents: 42326
diff changeset
499 supported = purple_channel_join_details_get_password_supported(source);
b739bb0811f7 Merge whether nickname and password are supported when merging ChannelJoinDetails
Gary Kramlich <grim@reaperworld.com>
parents: 42326
diff changeset
500 purple_channel_join_details_set_password_supported(destination, supported);
b739bb0811f7 Merge whether nickname and password are supported when merging ChannelJoinDetails
Gary Kramlich <grim@reaperworld.com>
parents: 42326
diff changeset
501
42326
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
502 value = purple_channel_join_details_get_password(source);
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
503 purple_channel_join_details_set_password(destination, value);
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
504
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
505 g_object_thaw_notify(obj);
3fc3dd614b4e Create PurpleChannelJoinDetails to replace the components for join chats
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
506 }

mercurial