Mercurial > pidgin
annotate libpurple/prpl.c @ 24872:955bfda56492
Apparently X-OIM-Proxy was not a good way to decide that we received a
multi-part message. Now always just split if a boundary is available from
the content-type. Try and match the telephone number before the using the
address from the From line.
Fixes #7901.
author | Elliott Sales de Andrade <qulogic@pidgin.im> |
---|---|
date | Sat, 27 Dec 2008 09:32:38 +0000 |
parents | 785db7300ef2 |
children | bcad7dc4b453 8c2631eb5da7 a6e3cb32cdd2 |
rev | line source |
---|---|
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1 /* |
15822 | 2 * purple |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
3 * |
15822 | 4 * Purple is the legal property of its developers, whose names are too numerous |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
5 * to list here. Please refer to the COPYRIGHT file distributed with this |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
6 * source distribution. |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
7 * |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
8 * This program is free software; you can redistribute it and/or modify |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
9 * it under the terms of the GNU General Public License as published by |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
10 * the Free Software Foundation; either version 2 of the License, or |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
11 * (at your option) any later version. |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
12 * |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
13 * This program is distributed in the hope that it will be useful, |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
16 * GNU General Public License for more details. |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
17 * |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
18 * You should have received a copy of the GNU General Public License |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
19 * along with this program; if not, write to the Free Software |
19681
44b4e8bd759b
The FSF changed its address a while ago; our files were out of date.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
19531
diff
changeset
|
20 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
21 * |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
22 */ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
23 #include "internal.h" |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
24 #include "conversation.h" |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
25 #include "debug.h" |
24301
785db7300ef2
Improve our NetworkManager support in a couple of ways:
Richard Laager <rlaager@wiktel.com>
parents:
23571
diff
changeset
|
26 #include "network.h" |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
27 #include "notify.h" |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
28 #include "prpl.h" |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
29 #include "request.h" |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
30 #include "util.h" |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
31 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
32 /**************************************************************************/ |
22097
eab7d03edfcb
This adds accessor and mutator API for the PurpleAttentionType struct.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
21628
diff
changeset
|
33 /** @name Attention Type API */ |
eab7d03edfcb
This adds accessor and mutator API for the PurpleAttentionType struct.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
21628
diff
changeset
|
34 /**************************************************************************/ |
eab7d03edfcb
This adds accessor and mutator API for the PurpleAttentionType struct.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
21628
diff
changeset
|
35 PurpleAttentionType * |
eab7d03edfcb
This adds accessor and mutator API for the PurpleAttentionType struct.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
21628
diff
changeset
|
36 purple_attention_type_new(const char *ulname, const char *name, |
eab7d03edfcb
This adds accessor and mutator API for the PurpleAttentionType struct.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
21628
diff
changeset
|
37 const char *inc_desc, const char *out_desc) |
eab7d03edfcb
This adds accessor and mutator API for the PurpleAttentionType struct.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
21628
diff
changeset
|
38 { |
eab7d03edfcb
This adds accessor and mutator API for the PurpleAttentionType struct.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
21628
diff
changeset
|
39 PurpleAttentionType *attn = g_new0(PurpleAttentionType, 1); |
eab7d03edfcb
This adds accessor and mutator API for the PurpleAttentionType struct.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
21628
diff
changeset
|
40 |
eab7d03edfcb
This adds accessor and mutator API for the PurpleAttentionType struct.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
21628
diff
changeset
|
41 purple_attention_type_set_name(attn, name); |
eab7d03edfcb
This adds accessor and mutator API for the PurpleAttentionType struct.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
21628
diff
changeset
|
42 purple_attention_type_set_incoming_desc(attn, inc_desc); |
eab7d03edfcb
This adds accessor and mutator API for the PurpleAttentionType struct.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
21628
diff
changeset
|
43 purple_attention_type_set_outgoing_desc(attn, out_desc); |
eab7d03edfcb
This adds accessor and mutator API for the PurpleAttentionType struct.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
21628
diff
changeset
|
44 purple_attention_type_set_unlocalized_name(attn, ulname); |
eab7d03edfcb
This adds accessor and mutator API for the PurpleAttentionType struct.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
21628
diff
changeset
|
45 |
eab7d03edfcb
This adds accessor and mutator API for the PurpleAttentionType struct.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
21628
diff
changeset
|
46 return attn; |
eab7d03edfcb
This adds accessor and mutator API for the PurpleAttentionType struct.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
21628
diff
changeset
|
47 } |
eab7d03edfcb
This adds accessor and mutator API for the PurpleAttentionType struct.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
21628
diff
changeset
|
48 |
eab7d03edfcb
This adds accessor and mutator API for the PurpleAttentionType struct.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
21628
diff
changeset
|
49 |
eab7d03edfcb
This adds accessor and mutator API for the PurpleAttentionType struct.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
21628
diff
changeset
|
50 void |
eab7d03edfcb
This adds accessor and mutator API for the PurpleAttentionType struct.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
21628
diff
changeset
|
51 purple_attention_type_set_name(PurpleAttentionType *type, const char *name) |
eab7d03edfcb
This adds accessor and mutator API for the PurpleAttentionType struct.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
21628
diff
changeset
|
52 { |
eab7d03edfcb
This adds accessor and mutator API for the PurpleAttentionType struct.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
21628
diff
changeset
|
53 g_return_if_fail(type != NULL); |
eab7d03edfcb
This adds accessor and mutator API for the PurpleAttentionType struct.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
21628
diff
changeset
|
54 |
eab7d03edfcb
This adds accessor and mutator API for the PurpleAttentionType struct.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
21628
diff
changeset
|
55 type->name = name; |
eab7d03edfcb
This adds accessor and mutator API for the PurpleAttentionType struct.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
21628
diff
changeset
|
56 } |
eab7d03edfcb
This adds accessor and mutator API for the PurpleAttentionType struct.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
21628
diff
changeset
|
57 |
eab7d03edfcb
This adds accessor and mutator API for the PurpleAttentionType struct.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
21628
diff
changeset
|
58 void |
eab7d03edfcb
This adds accessor and mutator API for the PurpleAttentionType struct.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
21628
diff
changeset
|
59 purple_attention_type_set_incoming_desc(PurpleAttentionType *type, const char *desc) |
eab7d03edfcb
This adds accessor and mutator API for the PurpleAttentionType struct.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
21628
diff
changeset
|
60 { |
eab7d03edfcb
This adds accessor and mutator API for the PurpleAttentionType struct.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
21628
diff
changeset
|
61 g_return_if_fail(type != NULL); |
eab7d03edfcb
This adds accessor and mutator API for the PurpleAttentionType struct.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
21628
diff
changeset
|
62 |
eab7d03edfcb
This adds accessor and mutator API for the PurpleAttentionType struct.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
21628
diff
changeset
|
63 type->incoming_description = desc; |
eab7d03edfcb
This adds accessor and mutator API for the PurpleAttentionType struct.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
21628
diff
changeset
|
64 } |
eab7d03edfcb
This adds accessor and mutator API for the PurpleAttentionType struct.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
21628
diff
changeset
|
65 |
eab7d03edfcb
This adds accessor and mutator API for the PurpleAttentionType struct.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
21628
diff
changeset
|
66 void |
eab7d03edfcb
This adds accessor and mutator API for the PurpleAttentionType struct.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
21628
diff
changeset
|
67 purple_attention_type_set_outgoing_desc(PurpleAttentionType *type, const char *desc) |
eab7d03edfcb
This adds accessor and mutator API for the PurpleAttentionType struct.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
21628
diff
changeset
|
68 { |
eab7d03edfcb
This adds accessor and mutator API for the PurpleAttentionType struct.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
21628
diff
changeset
|
69 g_return_if_fail(type != NULL); |
eab7d03edfcb
This adds accessor and mutator API for the PurpleAttentionType struct.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
21628
diff
changeset
|
70 |
eab7d03edfcb
This adds accessor and mutator API for the PurpleAttentionType struct.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
21628
diff
changeset
|
71 type->outgoing_description = desc; |
eab7d03edfcb
This adds accessor and mutator API for the PurpleAttentionType struct.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
21628
diff
changeset
|
72 } |
eab7d03edfcb
This adds accessor and mutator API for the PurpleAttentionType struct.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
21628
diff
changeset
|
73 |
eab7d03edfcb
This adds accessor and mutator API for the PurpleAttentionType struct.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
21628
diff
changeset
|
74 void |
eab7d03edfcb
This adds accessor and mutator API for the PurpleAttentionType struct.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
21628
diff
changeset
|
75 purple_attention_type_set_icon_name(PurpleAttentionType *type, const char *name) |
eab7d03edfcb
This adds accessor and mutator API for the PurpleAttentionType struct.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
21628
diff
changeset
|
76 { |
eab7d03edfcb
This adds accessor and mutator API for the PurpleAttentionType struct.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
21628
diff
changeset
|
77 g_return_if_fail(type != NULL); |
eab7d03edfcb
This adds accessor and mutator API for the PurpleAttentionType struct.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
21628
diff
changeset
|
78 |
eab7d03edfcb
This adds accessor and mutator API for the PurpleAttentionType struct.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
21628
diff
changeset
|
79 type->icon_name = name; |
eab7d03edfcb
This adds accessor and mutator API for the PurpleAttentionType struct.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
21628
diff
changeset
|
80 } |
eab7d03edfcb
This adds accessor and mutator API for the PurpleAttentionType struct.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
21628
diff
changeset
|
81 |
eab7d03edfcb
This adds accessor and mutator API for the PurpleAttentionType struct.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
21628
diff
changeset
|
82 void |
eab7d03edfcb
This adds accessor and mutator API for the PurpleAttentionType struct.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
21628
diff
changeset
|
83 purple_attention_type_set_unlocalized_name(PurpleAttentionType *type, const char *ulname) |
eab7d03edfcb
This adds accessor and mutator API for the PurpleAttentionType struct.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
21628
diff
changeset
|
84 { |
eab7d03edfcb
This adds accessor and mutator API for the PurpleAttentionType struct.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
21628
diff
changeset
|
85 g_return_if_fail(type != NULL); |
eab7d03edfcb
This adds accessor and mutator API for the PurpleAttentionType struct.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
21628
diff
changeset
|
86 |
eab7d03edfcb
This adds accessor and mutator API for the PurpleAttentionType struct.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
21628
diff
changeset
|
87 type->unlocalized_name = ulname; |
eab7d03edfcb
This adds accessor and mutator API for the PurpleAttentionType struct.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
21628
diff
changeset
|
88 } |
eab7d03edfcb
This adds accessor and mutator API for the PurpleAttentionType struct.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
21628
diff
changeset
|
89 |
eab7d03edfcb
This adds accessor and mutator API for the PurpleAttentionType struct.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
21628
diff
changeset
|
90 const char * |
22122
f55f84a1e3f7
const-ify paramteters to some of the new API I added. I thought I did this already.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
22097
diff
changeset
|
91 purple_attention_type_get_name(const PurpleAttentionType *type) |
22097
eab7d03edfcb
This adds accessor and mutator API for the PurpleAttentionType struct.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
21628
diff
changeset
|
92 { |
eab7d03edfcb
This adds accessor and mutator API for the PurpleAttentionType struct.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
21628
diff
changeset
|
93 g_return_val_if_fail(type != NULL, NULL); |
eab7d03edfcb
This adds accessor and mutator API for the PurpleAttentionType struct.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
21628
diff
changeset
|
94 |
eab7d03edfcb
This adds accessor and mutator API for the PurpleAttentionType struct.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
21628
diff
changeset
|
95 return type->name; |
eab7d03edfcb
This adds accessor and mutator API for the PurpleAttentionType struct.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
21628
diff
changeset
|
96 } |
eab7d03edfcb
This adds accessor and mutator API for the PurpleAttentionType struct.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
21628
diff
changeset
|
97 |
eab7d03edfcb
This adds accessor and mutator API for the PurpleAttentionType struct.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
21628
diff
changeset
|
98 const char * |
22122
f55f84a1e3f7
const-ify paramteters to some of the new API I added. I thought I did this already.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
22097
diff
changeset
|
99 purple_attention_type_get_incoming_desc(const PurpleAttentionType *type) |
22097
eab7d03edfcb
This adds accessor and mutator API for the PurpleAttentionType struct.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
21628
diff
changeset
|
100 { |
eab7d03edfcb
This adds accessor and mutator API for the PurpleAttentionType struct.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
21628
diff
changeset
|
101 g_return_val_if_fail(type != NULL, NULL); |
eab7d03edfcb
This adds accessor and mutator API for the PurpleAttentionType struct.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
21628
diff
changeset
|
102 |
eab7d03edfcb
This adds accessor and mutator API for the PurpleAttentionType struct.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
21628
diff
changeset
|
103 return type->incoming_description; |
eab7d03edfcb
This adds accessor and mutator API for the PurpleAttentionType struct.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
21628
diff
changeset
|
104 } |
eab7d03edfcb
This adds accessor and mutator API for the PurpleAttentionType struct.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
21628
diff
changeset
|
105 |
eab7d03edfcb
This adds accessor and mutator API for the PurpleAttentionType struct.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
21628
diff
changeset
|
106 const char * |
22122
f55f84a1e3f7
const-ify paramteters to some of the new API I added. I thought I did this already.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
22097
diff
changeset
|
107 purple_attention_type_get_outgoing_desc(const PurpleAttentionType *type) |
22097
eab7d03edfcb
This adds accessor and mutator API for the PurpleAttentionType struct.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
21628
diff
changeset
|
108 { |
eab7d03edfcb
This adds accessor and mutator API for the PurpleAttentionType struct.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
21628
diff
changeset
|
109 g_return_val_if_fail(type != NULL, NULL); |
eab7d03edfcb
This adds accessor and mutator API for the PurpleAttentionType struct.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
21628
diff
changeset
|
110 |
eab7d03edfcb
This adds accessor and mutator API for the PurpleAttentionType struct.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
21628
diff
changeset
|
111 return type->outgoing_description; |
eab7d03edfcb
This adds accessor and mutator API for the PurpleAttentionType struct.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
21628
diff
changeset
|
112 } |
eab7d03edfcb
This adds accessor and mutator API for the PurpleAttentionType struct.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
21628
diff
changeset
|
113 |
eab7d03edfcb
This adds accessor and mutator API for the PurpleAttentionType struct.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
21628
diff
changeset
|
114 const char * |
22122
f55f84a1e3f7
const-ify paramteters to some of the new API I added. I thought I did this already.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
22097
diff
changeset
|
115 purple_attention_type_get_icon_name(const PurpleAttentionType *type) |
22097
eab7d03edfcb
This adds accessor and mutator API for the PurpleAttentionType struct.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
21628
diff
changeset
|
116 { |
eab7d03edfcb
This adds accessor and mutator API for the PurpleAttentionType struct.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
21628
diff
changeset
|
117 g_return_val_if_fail(type != NULL, NULL); |
eab7d03edfcb
This adds accessor and mutator API for the PurpleAttentionType struct.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
21628
diff
changeset
|
118 |
eab7d03edfcb
This adds accessor and mutator API for the PurpleAttentionType struct.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
21628
diff
changeset
|
119 if(type->icon_name == NULL || *(type->icon_name) == '\0') |
eab7d03edfcb
This adds accessor and mutator API for the PurpleAttentionType struct.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
21628
diff
changeset
|
120 return NULL; |
eab7d03edfcb
This adds accessor and mutator API for the PurpleAttentionType struct.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
21628
diff
changeset
|
121 |
eab7d03edfcb
This adds accessor and mutator API for the PurpleAttentionType struct.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
21628
diff
changeset
|
122 return type->icon_name; |
eab7d03edfcb
This adds accessor and mutator API for the PurpleAttentionType struct.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
21628
diff
changeset
|
123 } |
eab7d03edfcb
This adds accessor and mutator API for the PurpleAttentionType struct.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
21628
diff
changeset
|
124 |
eab7d03edfcb
This adds accessor and mutator API for the PurpleAttentionType struct.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
21628
diff
changeset
|
125 const char * |
22122
f55f84a1e3f7
const-ify paramteters to some of the new API I added. I thought I did this already.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
22097
diff
changeset
|
126 purple_attention_type_get_unlocalized_name(const PurpleAttentionType *type) |
22097
eab7d03edfcb
This adds accessor and mutator API for the PurpleAttentionType struct.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
21628
diff
changeset
|
127 { |
eab7d03edfcb
This adds accessor and mutator API for the PurpleAttentionType struct.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
21628
diff
changeset
|
128 g_return_val_if_fail(type != NULL, NULL); |
eab7d03edfcb
This adds accessor and mutator API for the PurpleAttentionType struct.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
21628
diff
changeset
|
129 |
eab7d03edfcb
This adds accessor and mutator API for the PurpleAttentionType struct.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
21628
diff
changeset
|
130 return type->unlocalized_name; |
eab7d03edfcb
This adds accessor and mutator API for the PurpleAttentionType struct.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
21628
diff
changeset
|
131 } |
eab7d03edfcb
This adds accessor and mutator API for the PurpleAttentionType struct.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
21628
diff
changeset
|
132 |
eab7d03edfcb
This adds accessor and mutator API for the PurpleAttentionType struct.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
21628
diff
changeset
|
133 /**************************************************************************/ |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
134 /** @name Protocol Plugin API */ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
135 /**************************************************************************/ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
136 void |
15822 | 137 purple_prpl_got_account_idle(PurpleAccount *account, gboolean idle, |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
138 time_t idle_time) |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
139 { |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
140 g_return_if_fail(account != NULL); |
15822 | 141 g_return_if_fail(purple_account_is_connected(account)); |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
142 |
15822 | 143 purple_presence_set_idle(purple_account_get_presence(account), |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
144 idle, idle_time); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
145 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
146 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
147 void |
15822 | 148 purple_prpl_got_account_login_time(PurpleAccount *account, time_t login_time) |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
149 { |
15822 | 150 PurplePresence *presence; |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
151 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
152 g_return_if_fail(account != NULL); |
15822 | 153 g_return_if_fail(purple_account_is_connected(account)); |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
154 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
155 if (login_time == 0) |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
156 login_time = time(NULL); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
157 |
15822 | 158 presence = purple_account_get_presence(account); |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
159 |
15822 | 160 purple_presence_set_login_time(presence, login_time); |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
161 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
162 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
163 void |
15822 | 164 purple_prpl_got_account_status(PurpleAccount *account, const char *status_id, ...) |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
165 { |
15822 | 166 PurplePresence *presence; |
167 PurpleStatus *status; | |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
168 va_list args; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
169 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
170 g_return_if_fail(account != NULL); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
171 g_return_if_fail(status_id != NULL); |
15822 | 172 g_return_if_fail(purple_account_is_connected(account)); |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
173 |
15822 | 174 presence = purple_account_get_presence(account); |
175 status = purple_presence_get_status(presence, status_id); | |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
176 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
177 g_return_if_fail(status != NULL); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
178 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
179 va_start(args, status_id); |
15822 | 180 purple_status_set_active_with_attrs(status, TRUE, args); |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
181 va_end(args); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
182 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
183 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
184 void |
15822 | 185 purple_prpl_got_user_idle(PurpleAccount *account, const char *name, |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
186 gboolean idle, time_t idle_time) |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
187 { |
15822 | 188 PurplePresence *presence; |
18104
e4d21d4dfcca
Update the idleness and login-time for all the blistnodes of the same buddy.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
16909
diff
changeset
|
189 GSList *list; |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
190 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
191 g_return_if_fail(account != NULL); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
192 g_return_if_fail(name != NULL); |
15822 | 193 g_return_if_fail(purple_account_is_connected(account)); |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
194 |
18104
e4d21d4dfcca
Update the idleness and login-time for all the blistnodes of the same buddy.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
16909
diff
changeset
|
195 if ((list = purple_find_buddies(account, name)) == NULL) |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
196 return; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
197 |
18104
e4d21d4dfcca
Update the idleness and login-time for all the blistnodes of the same buddy.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
16909
diff
changeset
|
198 while (list) { |
e4d21d4dfcca
Update the idleness and login-time for all the blistnodes of the same buddy.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
16909
diff
changeset
|
199 presence = purple_buddy_get_presence(list->data); |
e4d21d4dfcca
Update the idleness and login-time for all the blistnodes of the same buddy.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
16909
diff
changeset
|
200 list = g_slist_delete_link(list, list); |
e4d21d4dfcca
Update the idleness and login-time for all the blistnodes of the same buddy.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
16909
diff
changeset
|
201 purple_presence_set_idle(presence, idle, idle_time); |
e4d21d4dfcca
Update the idleness and login-time for all the blistnodes of the same buddy.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
16909
diff
changeset
|
202 } |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
203 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
204 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
205 void |
15822 | 206 purple_prpl_got_user_login_time(PurpleAccount *account, const char *name, |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
207 time_t login_time) |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
208 { |
18104
e4d21d4dfcca
Update the idleness and login-time for all the blistnodes of the same buddy.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
16909
diff
changeset
|
209 GSList *list; |
15822 | 210 PurplePresence *presence; |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
211 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
212 g_return_if_fail(account != NULL); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
213 g_return_if_fail(name != NULL); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
214 |
18104
e4d21d4dfcca
Update the idleness and login-time for all the blistnodes of the same buddy.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
16909
diff
changeset
|
215 if ((list = purple_find_buddies(account, name)) == NULL) |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
216 return; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
217 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
218 if (login_time == 0) |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
219 login_time = time(NULL); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
220 |
18104
e4d21d4dfcca
Update the idleness and login-time for all the blistnodes of the same buddy.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
16909
diff
changeset
|
221 while (list) { |
e4d21d4dfcca
Update the idleness and login-time for all the blistnodes of the same buddy.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
16909
diff
changeset
|
222 PurpleBuddy *buddy = list->data; |
e4d21d4dfcca
Update the idleness and login-time for all the blistnodes of the same buddy.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
16909
diff
changeset
|
223 presence = purple_buddy_get_presence(buddy); |
e4d21d4dfcca
Update the idleness and login-time for all the blistnodes of the same buddy.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
16909
diff
changeset
|
224 list = g_slist_delete_link(list, list); |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
225 |
18104
e4d21d4dfcca
Update the idleness and login-time for all the blistnodes of the same buddy.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
16909
diff
changeset
|
226 if (purple_presence_get_login_time(presence) != login_time) |
e4d21d4dfcca
Update the idleness and login-time for all the blistnodes of the same buddy.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
16909
diff
changeset
|
227 { |
e4d21d4dfcca
Update the idleness and login-time for all the blistnodes of the same buddy.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
16909
diff
changeset
|
228 purple_presence_set_login_time(presence, login_time); |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
229 |
18104
e4d21d4dfcca
Update the idleness and login-time for all the blistnodes of the same buddy.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
16909
diff
changeset
|
230 purple_signal_emit(purple_blist_get_handle(), "buddy-got-login-time", buddy); |
e4d21d4dfcca
Update the idleness and login-time for all the blistnodes of the same buddy.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
16909
diff
changeset
|
231 } |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
232 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
233 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
234 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
235 void |
15822 | 236 purple_prpl_got_user_status(PurpleAccount *account, const char *name, |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
237 const char *status_id, ...) |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
238 { |
16909
d177369ce625
this should fix 647, and a few others
Nathan Walp <nwalp@pidgin.im>
parents:
15822
diff
changeset
|
239 GSList *list, *l; |
15822 | 240 PurpleBuddy *buddy; |
241 PurplePresence *presence; | |
242 PurpleStatus *status; | |
243 PurpleStatus *old_status; | |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
244 va_list args; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
245 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
246 g_return_if_fail(account != NULL); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
247 g_return_if_fail(name != NULL); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
248 g_return_if_fail(status_id != NULL); |
15822 | 249 g_return_if_fail(purple_account_is_connected(account) || purple_account_is_connecting(account)); |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
250 |
16909
d177369ce625
this should fix 647, and a few others
Nathan Walp <nwalp@pidgin.im>
parents:
15822
diff
changeset
|
251 if((list = purple_find_buddies(account, name)) == NULL) |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
252 return; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
253 |
16909
d177369ce625
this should fix 647, and a few others
Nathan Walp <nwalp@pidgin.im>
parents:
15822
diff
changeset
|
254 for(l = list; l != NULL; l = l->next) { |
d177369ce625
this should fix 647, and a few others
Nathan Walp <nwalp@pidgin.im>
parents:
15822
diff
changeset
|
255 buddy = l->data; |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
256 |
16909
d177369ce625
this should fix 647, and a few others
Nathan Walp <nwalp@pidgin.im>
parents:
15822
diff
changeset
|
257 presence = purple_buddy_get_presence(buddy); |
d177369ce625
this should fix 647, and a few others
Nathan Walp <nwalp@pidgin.im>
parents:
15822
diff
changeset
|
258 status = purple_presence_get_status(presence, status_id); |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
259 |
16909
d177369ce625
this should fix 647, and a few others
Nathan Walp <nwalp@pidgin.im>
parents:
15822
diff
changeset
|
260 if(NULL == status) |
d177369ce625
this should fix 647, and a few others
Nathan Walp <nwalp@pidgin.im>
parents:
15822
diff
changeset
|
261 continue; |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
262 |
16909
d177369ce625
this should fix 647, and a few others
Nathan Walp <nwalp@pidgin.im>
parents:
15822
diff
changeset
|
263 old_status = purple_presence_get_active_status(presence); |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
264 |
16909
d177369ce625
this should fix 647, and a few others
Nathan Walp <nwalp@pidgin.im>
parents:
15822
diff
changeset
|
265 va_start(args, status_id); |
d177369ce625
this should fix 647, and a few others
Nathan Walp <nwalp@pidgin.im>
parents:
15822
diff
changeset
|
266 purple_status_set_active_with_attrs(status, TRUE, args); |
d177369ce625
this should fix 647, and a few others
Nathan Walp <nwalp@pidgin.im>
parents:
15822
diff
changeset
|
267 va_end(args); |
d177369ce625
this should fix 647, and a few others
Nathan Walp <nwalp@pidgin.im>
parents:
15822
diff
changeset
|
268 |
d177369ce625
this should fix 647, and a few others
Nathan Walp <nwalp@pidgin.im>
parents:
15822
diff
changeset
|
269 purple_blist_update_buddy_status(buddy, old_status); |
d177369ce625
this should fix 647, and a few others
Nathan Walp <nwalp@pidgin.im>
parents:
15822
diff
changeset
|
270 } |
d177369ce625
this should fix 647, and a few others
Nathan Walp <nwalp@pidgin.im>
parents:
15822
diff
changeset
|
271 |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
272 g_slist_free(list); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
273 |
16909
d177369ce625
this should fix 647, and a few others
Nathan Walp <nwalp@pidgin.im>
parents:
15822
diff
changeset
|
274 /* we get to re-use the last status we found */ |
15822 | 275 if (!purple_status_is_online(status)) |
276 serv_got_typing_stopped(purple_account_get_connection(account), name); | |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
277 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
278 |
15822 | 279 void purple_prpl_got_user_status_deactive(PurpleAccount *account, const char *name, |
15523
84b3ab83df35
Use the status API to handle mobileness, and convert AIM to use it. This makes mobile buddies prioritze lower in Perons, and ensures the UI is notified of changes in mobileness. Other protocols to follow.
Sean Egan <seanegan@gmail.com>
parents:
15373
diff
changeset
|
280 const char *status_id) |
84b3ab83df35
Use the status API to handle mobileness, and convert AIM to use it. This makes mobile buddies prioritze lower in Perons, and ensures the UI is notified of changes in mobileness. Other protocols to follow.
Sean Egan <seanegan@gmail.com>
parents:
15373
diff
changeset
|
281 { |
16909
d177369ce625
this should fix 647, and a few others
Nathan Walp <nwalp@pidgin.im>
parents:
15822
diff
changeset
|
282 GSList *list, *l; |
15822 | 283 PurpleBuddy *buddy; |
284 PurplePresence *presence; | |
285 PurpleStatus *status; | |
15523
84b3ab83df35
Use the status API to handle mobileness, and convert AIM to use it. This makes mobile buddies prioritze lower in Perons, and ensures the UI is notified of changes in mobileness. Other protocols to follow.
Sean Egan <seanegan@gmail.com>
parents:
15373
diff
changeset
|
286 |
84b3ab83df35
Use the status API to handle mobileness, and convert AIM to use it. This makes mobile buddies prioritze lower in Perons, and ensures the UI is notified of changes in mobileness. Other protocols to follow.
Sean Egan <seanegan@gmail.com>
parents:
15373
diff
changeset
|
287 g_return_if_fail(account != NULL); |
84b3ab83df35
Use the status API to handle mobileness, and convert AIM to use it. This makes mobile buddies prioritze lower in Perons, and ensures the UI is notified of changes in mobileness. Other protocols to follow.
Sean Egan <seanegan@gmail.com>
parents:
15373
diff
changeset
|
288 g_return_if_fail(name != NULL); |
84b3ab83df35
Use the status API to handle mobileness, and convert AIM to use it. This makes mobile buddies prioritze lower in Perons, and ensures the UI is notified of changes in mobileness. Other protocols to follow.
Sean Egan <seanegan@gmail.com>
parents:
15373
diff
changeset
|
289 g_return_if_fail(status_id != NULL); |
15822 | 290 g_return_if_fail(purple_account_is_connected(account) || purple_account_is_connecting(account)); |
15523
84b3ab83df35
Use the status API to handle mobileness, and convert AIM to use it. This makes mobile buddies prioritze lower in Perons, and ensures the UI is notified of changes in mobileness. Other protocols to follow.
Sean Egan <seanegan@gmail.com>
parents:
15373
diff
changeset
|
291 |
16909
d177369ce625
this should fix 647, and a few others
Nathan Walp <nwalp@pidgin.im>
parents:
15822
diff
changeset
|
292 if((list = purple_find_buddies(account, name)) == NULL) |
15523
84b3ab83df35
Use the status API to handle mobileness, and convert AIM to use it. This makes mobile buddies prioritze lower in Perons, and ensures the UI is notified of changes in mobileness. Other protocols to follow.
Sean Egan <seanegan@gmail.com>
parents:
15373
diff
changeset
|
293 return; |
84b3ab83df35
Use the status API to handle mobileness, and convert AIM to use it. This makes mobile buddies prioritze lower in Perons, and ensures the UI is notified of changes in mobileness. Other protocols to follow.
Sean Egan <seanegan@gmail.com>
parents:
15373
diff
changeset
|
294 |
16909
d177369ce625
this should fix 647, and a few others
Nathan Walp <nwalp@pidgin.im>
parents:
15822
diff
changeset
|
295 for(l = list; l != NULL; l = l->next) { |
d177369ce625
this should fix 647, and a few others
Nathan Walp <nwalp@pidgin.im>
parents:
15822
diff
changeset
|
296 buddy = l->data; |
d177369ce625
this should fix 647, and a few others
Nathan Walp <nwalp@pidgin.im>
parents:
15822
diff
changeset
|
297 |
d177369ce625
this should fix 647, and a few others
Nathan Walp <nwalp@pidgin.im>
parents:
15822
diff
changeset
|
298 presence = purple_buddy_get_presence(buddy); |
d177369ce625
this should fix 647, and a few others
Nathan Walp <nwalp@pidgin.im>
parents:
15822
diff
changeset
|
299 status = purple_presence_get_status(presence, status_id); |
15523
84b3ab83df35
Use the status API to handle mobileness, and convert AIM to use it. This makes mobile buddies prioritze lower in Perons, and ensures the UI is notified of changes in mobileness. Other protocols to follow.
Sean Egan <seanegan@gmail.com>
parents:
15373
diff
changeset
|
300 |
16909
d177369ce625
this should fix 647, and a few others
Nathan Walp <nwalp@pidgin.im>
parents:
15822
diff
changeset
|
301 if(NULL == status) |
d177369ce625
this should fix 647, and a few others
Nathan Walp <nwalp@pidgin.im>
parents:
15822
diff
changeset
|
302 continue; |
d177369ce625
this should fix 647, and a few others
Nathan Walp <nwalp@pidgin.im>
parents:
15822
diff
changeset
|
303 |
19531
ecc6019f0a82
Deactivate only an active status.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
19476
diff
changeset
|
304 if (purple_status_is_active(status)) { |
ecc6019f0a82
Deactivate only an active status.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
19476
diff
changeset
|
305 purple_status_set_active(status, FALSE); |
ecc6019f0a82
Deactivate only an active status.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
19476
diff
changeset
|
306 purple_blist_update_buddy_status(buddy, status); |
ecc6019f0a82
Deactivate only an active status.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
19476
diff
changeset
|
307 } |
16909
d177369ce625
this should fix 647, and a few others
Nathan Walp <nwalp@pidgin.im>
parents:
15822
diff
changeset
|
308 } |
d177369ce625
this should fix 647, and a few others
Nathan Walp <nwalp@pidgin.im>
parents:
15822
diff
changeset
|
309 |
d177369ce625
this should fix 647, and a few others
Nathan Walp <nwalp@pidgin.im>
parents:
15822
diff
changeset
|
310 g_slist_free(list); |
15523
84b3ab83df35
Use the status API to handle mobileness, and convert AIM to use it. This makes mobile buddies prioritze lower in Perons, and ensures the UI is notified of changes in mobileness. Other protocols to follow.
Sean Egan <seanegan@gmail.com>
parents:
15373
diff
changeset
|
311 } |
84b3ab83df35
Use the status API to handle mobileness, and convert AIM to use it. This makes mobile buddies prioritze lower in Perons, and ensures the UI is notified of changes in mobileness. Other protocols to follow.
Sean Egan <seanegan@gmail.com>
parents:
15373
diff
changeset
|
312 |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
313 static void |
15822 | 314 do_prpl_change_account_status(PurpleAccount *account, |
315 PurpleStatus *old_status, PurpleStatus *new_status) | |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
316 { |
15822 | 317 PurplePlugin *prpl; |
318 PurplePluginProtocolInfo *prpl_info; | |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
319 |
15822 | 320 if (purple_status_is_online(new_status) && |
24301
785db7300ef2
Improve our NetworkManager support in a couple of ways:
Richard Laager <rlaager@wiktel.com>
parents:
23571
diff
changeset
|
321 purple_account_is_disconnected(account) && |
785db7300ef2
Improve our NetworkManager support in a couple of ways:
Richard Laager <rlaager@wiktel.com>
parents:
23571
diff
changeset
|
322 purple_network_is_available()) |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
323 { |
15822 | 324 purple_account_connect(account); |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
325 return; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
326 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
327 |
15822 | 328 if (!purple_status_is_online(new_status)) |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
329 { |
15822 | 330 if (!purple_account_is_disconnected(account)) |
331 purple_account_disconnect(account); | |
20219
d68db74b7165
applied changes from c9d6104bcfe2e630e98e45bc6a0975adfb9544e5
Richard Laager <rlaager@wiktel.com>
parents:
19681
diff
changeset
|
332 /* Clear out the unsaved password if we're already disconnected and we switch to offline status */ |
d68db74b7165
applied changes from c9d6104bcfe2e630e98e45bc6a0975adfb9544e5
Richard Laager <rlaager@wiktel.com>
parents:
19681
diff
changeset
|
333 else if (!purple_account_get_remember_password(account)) |
d68db74b7165
applied changes from c9d6104bcfe2e630e98e45bc6a0975adfb9544e5
Richard Laager <rlaager@wiktel.com>
parents:
19681
diff
changeset
|
334 purple_account_set_password(account, NULL); |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
335 return; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
336 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
337 |
15822 | 338 if (purple_account_is_connecting(account)) |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
339 /* |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
340 * We don't need to call the set_status PRPL function because |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
341 * the PRPL will take care of setting its status during the |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
342 * connection process. |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
343 */ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
344 return; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
345 |
15822 | 346 prpl = purple_find_prpl(purple_account_get_protocol_id(account)); |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
347 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
348 if (prpl == NULL) |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
349 return; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
350 |
15822 | 351 prpl_info = PURPLE_PLUGIN_PROTOCOL_INFO(prpl); |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
352 |
15822 | 353 if (!purple_account_is_disconnected(account) && prpl_info->set_status != NULL) |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
354 { |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
355 prpl_info->set_status(account, new_status); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
356 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
357 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
358 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
359 void |
15822 | 360 purple_prpl_change_account_status(PurpleAccount *account, |
361 PurpleStatus *old_status, PurpleStatus *new_status) | |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
362 { |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
363 g_return_if_fail(account != NULL); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
364 g_return_if_fail(new_status != NULL); |
21628
495f2f1de998
old_status can be NULL when [de]activating a non-exclusive status.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
20219
diff
changeset
|
365 g_return_if_fail(!purple_status_is_exclusive(new_status) || old_status != NULL); |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
366 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
367 do_prpl_change_account_status(account, old_status, new_status); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
368 |
15822 | 369 purple_signal_emit(purple_accounts_get_handle(), "account-status-changed", |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
370 account, old_status, new_status); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
371 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
372 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
373 GList * |
15822 | 374 purple_prpl_get_statuses(PurpleAccount *account, PurplePresence *presence) |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
375 { |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
376 GList *statuses = NULL; |
18118
ab6d2763b8d8
Re-fix the DBus list handling code by killing const GList* / const GSList*
Richard Laager <rlaager@wiktel.com>
parents:
18104
diff
changeset
|
377 GList *l; |
15822 | 378 PurpleStatus *status; |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
379 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
380 g_return_val_if_fail(account != NULL, NULL); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
381 g_return_val_if_fail(presence != NULL, NULL); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
382 |
15822 | 383 for (l = purple_account_get_status_types(account); l != NULL; l = l->next) |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
384 { |
15822 | 385 status = purple_status_new((PurpleStatusType *)l->data, presence); |
15593
f485c87e6546
sf patch #1655057, from Peter Tang
Mark Doliner <mark@kingant.net>
parents:
15523
diff
changeset
|
386 statuses = g_list_prepend(statuses, status); |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
387 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
388 |
15593
f485c87e6546
sf patch #1655057, from Peter Tang
Mark Doliner <mark@kingant.net>
parents:
15523
diff
changeset
|
389 statuses = g_list_reverse(statuses); |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
390 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
391 return statuses; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
392 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
393 |
23571
49850f7ca393
Add purple_prpl_got_attention_in_chat, then deprecate
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
22122
diff
changeset
|
394 void |
49850f7ca393
Add purple_prpl_got_attention_in_chat, then deprecate
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
22122
diff
changeset
|
395 purple_prpl_send_attention(PurpleConnection *gc, const char *who, guint type_code) |
49850f7ca393
Add purple_prpl_got_attention_in_chat, then deprecate
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
22122
diff
changeset
|
396 { |
49850f7ca393
Add purple_prpl_got_attention_in_chat, then deprecate
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
22122
diff
changeset
|
397 PurpleAttentionType *attn; |
49850f7ca393
Add purple_prpl_got_attention_in_chat, then deprecate
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
22122
diff
changeset
|
398 PurpleMessageFlags flags; |
49850f7ca393
Add purple_prpl_got_attention_in_chat, then deprecate
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
22122
diff
changeset
|
399 PurplePlugin *prpl; |
49850f7ca393
Add purple_prpl_got_attention_in_chat, then deprecate
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
22122
diff
changeset
|
400 PurpleConversation *conv; |
49850f7ca393
Add purple_prpl_got_attention_in_chat, then deprecate
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
22122
diff
changeset
|
401 gboolean (*send_attention)(PurpleConnection *, const char *, guint); |
49850f7ca393
Add purple_prpl_got_attention_in_chat, then deprecate
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
22122
diff
changeset
|
402 PurpleBuddy *buddy; |
49850f7ca393
Add purple_prpl_got_attention_in_chat, then deprecate
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
22122
diff
changeset
|
403 const char *alias; |
49850f7ca393
Add purple_prpl_got_attention_in_chat, then deprecate
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
22122
diff
changeset
|
404 gchar *description; |
49850f7ca393
Add purple_prpl_got_attention_in_chat, then deprecate
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
22122
diff
changeset
|
405 time_t mtime; |
49850f7ca393
Add purple_prpl_got_attention_in_chat, then deprecate
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
22122
diff
changeset
|
406 |
49850f7ca393
Add purple_prpl_got_attention_in_chat, then deprecate
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
22122
diff
changeset
|
407 g_return_if_fail(gc != NULL); |
49850f7ca393
Add purple_prpl_got_attention_in_chat, then deprecate
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
22122
diff
changeset
|
408 g_return_if_fail(who != NULL); |
49850f7ca393
Add purple_prpl_got_attention_in_chat, then deprecate
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
22122
diff
changeset
|
409 |
49850f7ca393
Add purple_prpl_got_attention_in_chat, then deprecate
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
22122
diff
changeset
|
410 prpl = purple_find_prpl(purple_account_get_protocol_id(gc->account)); |
49850f7ca393
Add purple_prpl_got_attention_in_chat, then deprecate
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
22122
diff
changeset
|
411 send_attention = PURPLE_PLUGIN_PROTOCOL_INFO(prpl)->send_attention; |
49850f7ca393
Add purple_prpl_got_attention_in_chat, then deprecate
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
22122
diff
changeset
|
412 g_return_if_fail(send_attention != NULL); |
49850f7ca393
Add purple_prpl_got_attention_in_chat, then deprecate
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
22122
diff
changeset
|
413 |
49850f7ca393
Add purple_prpl_got_attention_in_chat, then deprecate
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
22122
diff
changeset
|
414 mtime = time(NULL); |
49850f7ca393
Add purple_prpl_got_attention_in_chat, then deprecate
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
22122
diff
changeset
|
415 |
49850f7ca393
Add purple_prpl_got_attention_in_chat, then deprecate
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
22122
diff
changeset
|
416 attn = purple_get_attention_type_from_code(gc->account, type_code); |
49850f7ca393
Add purple_prpl_got_attention_in_chat, then deprecate
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
22122
diff
changeset
|
417 |
49850f7ca393
Add purple_prpl_got_attention_in_chat, then deprecate
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
22122
diff
changeset
|
418 if ((buddy = purple_find_buddy(purple_connection_get_account(gc), who)) != NULL) |
49850f7ca393
Add purple_prpl_got_attention_in_chat, then deprecate
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
22122
diff
changeset
|
419 alias = purple_buddy_get_contact_alias(buddy); |
49850f7ca393
Add purple_prpl_got_attention_in_chat, then deprecate
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
22122
diff
changeset
|
420 else |
49850f7ca393
Add purple_prpl_got_attention_in_chat, then deprecate
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
22122
diff
changeset
|
421 alias = who; |
49850f7ca393
Add purple_prpl_got_attention_in_chat, then deprecate
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
22122
diff
changeset
|
422 |
49850f7ca393
Add purple_prpl_got_attention_in_chat, then deprecate
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
22122
diff
changeset
|
423 if (attn && purple_attention_type_get_outgoing_desc(attn)) { |
49850f7ca393
Add purple_prpl_got_attention_in_chat, then deprecate
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
22122
diff
changeset
|
424 description = g_strdup_printf(purple_attention_type_get_outgoing_desc(attn), alias); |
49850f7ca393
Add purple_prpl_got_attention_in_chat, then deprecate
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
22122
diff
changeset
|
425 } else { |
49850f7ca393
Add purple_prpl_got_attention_in_chat, then deprecate
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
22122
diff
changeset
|
426 description = g_strdup_printf(_("Requesting %s's attention..."), alias); |
49850f7ca393
Add purple_prpl_got_attention_in_chat, then deprecate
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
22122
diff
changeset
|
427 } |
49850f7ca393
Add purple_prpl_got_attention_in_chat, then deprecate
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
22122
diff
changeset
|
428 |
49850f7ca393
Add purple_prpl_got_attention_in_chat, then deprecate
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
22122
diff
changeset
|
429 flags = PURPLE_MESSAGE_SEND | PURPLE_MESSAGE_NOTIFY | PURPLE_MESSAGE_SYSTEM; |
49850f7ca393
Add purple_prpl_got_attention_in_chat, then deprecate
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
22122
diff
changeset
|
430 |
49850f7ca393
Add purple_prpl_got_attention_in_chat, then deprecate
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
22122
diff
changeset
|
431 purple_debug_info("server", "serv_send_attention: sending '%s' to %s\n", |
49850f7ca393
Add purple_prpl_got_attention_in_chat, then deprecate
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
22122
diff
changeset
|
432 description, who); |
49850f7ca393
Add purple_prpl_got_attention_in_chat, then deprecate
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
22122
diff
changeset
|
433 |
49850f7ca393
Add purple_prpl_got_attention_in_chat, then deprecate
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
22122
diff
changeset
|
434 if (!send_attention(gc, who, type_code)) |
49850f7ca393
Add purple_prpl_got_attention_in_chat, then deprecate
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
22122
diff
changeset
|
435 return; |
49850f7ca393
Add purple_prpl_got_attention_in_chat, then deprecate
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
22122
diff
changeset
|
436 |
49850f7ca393
Add purple_prpl_got_attention_in_chat, then deprecate
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
22122
diff
changeset
|
437 conv = purple_conversation_new(PURPLE_CONV_TYPE_IM, gc->account, who); |
49850f7ca393
Add purple_prpl_got_attention_in_chat, then deprecate
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
22122
diff
changeset
|
438 purple_conv_im_write(PURPLE_CONV_IM(conv), NULL, description, flags, mtime); |
49850f7ca393
Add purple_prpl_got_attention_in_chat, then deprecate
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
22122
diff
changeset
|
439 |
49850f7ca393
Add purple_prpl_got_attention_in_chat, then deprecate
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
22122
diff
changeset
|
440 g_free(description); |
49850f7ca393
Add purple_prpl_got_attention_in_chat, then deprecate
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
22122
diff
changeset
|
441 } |
49850f7ca393
Add purple_prpl_got_attention_in_chat, then deprecate
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
22122
diff
changeset
|
442 |
49850f7ca393
Add purple_prpl_got_attention_in_chat, then deprecate
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
22122
diff
changeset
|
443 static void |
49850f7ca393
Add purple_prpl_got_attention_in_chat, then deprecate
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
22122
diff
changeset
|
444 got_attention(PurpleConnection *gc, int id, const char *who, guint type_code) |
49850f7ca393
Add purple_prpl_got_attention_in_chat, then deprecate
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
22122
diff
changeset
|
445 { |
49850f7ca393
Add purple_prpl_got_attention_in_chat, then deprecate
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
22122
diff
changeset
|
446 PurpleMessageFlags flags; |
49850f7ca393
Add purple_prpl_got_attention_in_chat, then deprecate
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
22122
diff
changeset
|
447 PurpleAttentionType *attn; |
49850f7ca393
Add purple_prpl_got_attention_in_chat, then deprecate
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
22122
diff
changeset
|
448 PurpleBuddy *buddy; |
49850f7ca393
Add purple_prpl_got_attention_in_chat, then deprecate
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
22122
diff
changeset
|
449 const char *alias; |
49850f7ca393
Add purple_prpl_got_attention_in_chat, then deprecate
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
22122
diff
changeset
|
450 gchar *description; |
49850f7ca393
Add purple_prpl_got_attention_in_chat, then deprecate
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
22122
diff
changeset
|
451 time_t mtime; |
49850f7ca393
Add purple_prpl_got_attention_in_chat, then deprecate
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
22122
diff
changeset
|
452 |
49850f7ca393
Add purple_prpl_got_attention_in_chat, then deprecate
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
22122
diff
changeset
|
453 mtime = time(NULL); |
49850f7ca393
Add purple_prpl_got_attention_in_chat, then deprecate
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
22122
diff
changeset
|
454 |
49850f7ca393
Add purple_prpl_got_attention_in_chat, then deprecate
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
22122
diff
changeset
|
455 attn = purple_get_attention_type_from_code(gc->account, type_code); |
49850f7ca393
Add purple_prpl_got_attention_in_chat, then deprecate
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
22122
diff
changeset
|
456 |
49850f7ca393
Add purple_prpl_got_attention_in_chat, then deprecate
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
22122
diff
changeset
|
457 /* PURPLE_MESSAGE_NOTIFY is for attention messages. */ |
49850f7ca393
Add purple_prpl_got_attention_in_chat, then deprecate
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
22122
diff
changeset
|
458 flags = PURPLE_MESSAGE_SYSTEM | PURPLE_MESSAGE_NOTIFY | PURPLE_MESSAGE_RECV; |
49850f7ca393
Add purple_prpl_got_attention_in_chat, then deprecate
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
22122
diff
changeset
|
459 |
49850f7ca393
Add purple_prpl_got_attention_in_chat, then deprecate
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
22122
diff
changeset
|
460 /* TODO: if (attn->icon_name) is non-null, use it to lookup an emoticon and display |
49850f7ca393
Add purple_prpl_got_attention_in_chat, then deprecate
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
22122
diff
changeset
|
461 * it next to the attention command. And if it is null, display a generic icon. */ |
49850f7ca393
Add purple_prpl_got_attention_in_chat, then deprecate
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
22122
diff
changeset
|
462 |
49850f7ca393
Add purple_prpl_got_attention_in_chat, then deprecate
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
22122
diff
changeset
|
463 if ((buddy = purple_find_buddy(purple_connection_get_account(gc), who)) != NULL) |
49850f7ca393
Add purple_prpl_got_attention_in_chat, then deprecate
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
22122
diff
changeset
|
464 alias = purple_buddy_get_contact_alias(buddy); |
49850f7ca393
Add purple_prpl_got_attention_in_chat, then deprecate
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
22122
diff
changeset
|
465 else |
49850f7ca393
Add purple_prpl_got_attention_in_chat, then deprecate
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
22122
diff
changeset
|
466 alias = who; |
49850f7ca393
Add purple_prpl_got_attention_in_chat, then deprecate
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
22122
diff
changeset
|
467 |
49850f7ca393
Add purple_prpl_got_attention_in_chat, then deprecate
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
22122
diff
changeset
|
468 if (attn && purple_attention_type_get_incoming_desc(attn)) { |
49850f7ca393
Add purple_prpl_got_attention_in_chat, then deprecate
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
22122
diff
changeset
|
469 description = g_strdup_printf(purple_attention_type_get_incoming_desc(attn), alias); |
49850f7ca393
Add purple_prpl_got_attention_in_chat, then deprecate
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
22122
diff
changeset
|
470 } else { |
49850f7ca393
Add purple_prpl_got_attention_in_chat, then deprecate
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
22122
diff
changeset
|
471 description = g_strdup_printf(_("%s has requested your attention!"), alias); |
49850f7ca393
Add purple_prpl_got_attention_in_chat, then deprecate
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
22122
diff
changeset
|
472 } |
49850f7ca393
Add purple_prpl_got_attention_in_chat, then deprecate
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
22122
diff
changeset
|
473 |
49850f7ca393
Add purple_prpl_got_attention_in_chat, then deprecate
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
22122
diff
changeset
|
474 purple_debug_info("server", "got_attention: got '%s' from %s\n", |
49850f7ca393
Add purple_prpl_got_attention_in_chat, then deprecate
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
22122
diff
changeset
|
475 description, who); |
49850f7ca393
Add purple_prpl_got_attention_in_chat, then deprecate
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
22122
diff
changeset
|
476 |
49850f7ca393
Add purple_prpl_got_attention_in_chat, then deprecate
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
22122
diff
changeset
|
477 if (id == -1) |
49850f7ca393
Add purple_prpl_got_attention_in_chat, then deprecate
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
22122
diff
changeset
|
478 serv_got_im(gc, who, description, flags, mtime); |
49850f7ca393
Add purple_prpl_got_attention_in_chat, then deprecate
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
22122
diff
changeset
|
479 else |
49850f7ca393
Add purple_prpl_got_attention_in_chat, then deprecate
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
22122
diff
changeset
|
480 serv_got_chat_in(gc, id, who, flags, description, mtime); |
49850f7ca393
Add purple_prpl_got_attention_in_chat, then deprecate
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
22122
diff
changeset
|
481 |
49850f7ca393
Add purple_prpl_got_attention_in_chat, then deprecate
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
22122
diff
changeset
|
482 /* TODO: sounds (depending on PurpleAttentionType), shaking, etc. */ |
49850f7ca393
Add purple_prpl_got_attention_in_chat, then deprecate
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
22122
diff
changeset
|
483 |
49850f7ca393
Add purple_prpl_got_attention_in_chat, then deprecate
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
22122
diff
changeset
|
484 g_free(description); |
49850f7ca393
Add purple_prpl_got_attention_in_chat, then deprecate
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
22122
diff
changeset
|
485 } |
49850f7ca393
Add purple_prpl_got_attention_in_chat, then deprecate
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
22122
diff
changeset
|
486 |
49850f7ca393
Add purple_prpl_got_attention_in_chat, then deprecate
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
22122
diff
changeset
|
487 void |
49850f7ca393
Add purple_prpl_got_attention_in_chat, then deprecate
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
22122
diff
changeset
|
488 purple_prpl_got_attention(PurpleConnection *gc, const char *who, guint type_code) |
49850f7ca393
Add purple_prpl_got_attention_in_chat, then deprecate
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
22122
diff
changeset
|
489 { |
49850f7ca393
Add purple_prpl_got_attention_in_chat, then deprecate
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
22122
diff
changeset
|
490 got_attention(gc, -1, who, type_code); |
49850f7ca393
Add purple_prpl_got_attention_in_chat, then deprecate
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
22122
diff
changeset
|
491 } |
49850f7ca393
Add purple_prpl_got_attention_in_chat, then deprecate
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
22122
diff
changeset
|
492 |
49850f7ca393
Add purple_prpl_got_attention_in_chat, then deprecate
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
22122
diff
changeset
|
493 void |
49850f7ca393
Add purple_prpl_got_attention_in_chat, then deprecate
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
22122
diff
changeset
|
494 purple_prpl_got_attention_in_chat(PurpleConnection *gc, int id, const char *who, guint type_code) |
49850f7ca393
Add purple_prpl_got_attention_in_chat, then deprecate
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
22122
diff
changeset
|
495 { |
49850f7ca393
Add purple_prpl_got_attention_in_chat, then deprecate
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
22122
diff
changeset
|
496 got_attention(gc, id, who, type_code); |
49850f7ca393
Add purple_prpl_got_attention_in_chat, then deprecate
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
22122
diff
changeset
|
497 } |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
498 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
499 /************************************************************************** |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
500 * Protocol Plugin Subsystem API |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
501 **************************************************************************/ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
502 |
15822 | 503 PurplePlugin * |
504 purple_find_prpl(const char *id) | |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
505 { |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
506 GList *l; |
15822 | 507 PurplePlugin *plugin; |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
508 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
509 g_return_val_if_fail(id != NULL, NULL); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
510 |
15822 | 511 for (l = purple_plugins_get_protocols(); l != NULL; l = l->next) { |
512 plugin = (PurplePlugin *)l->data; | |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
513 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
514 if (!strcmp(plugin->info->id, id)) |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
515 return plugin; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
516 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
517 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
518 return NULL; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
519 } |