Wed, 04 Sep 2013 20:38:42 +0530
Added PurpleProtocolOverrideFlags and purple_protocol_override()
| 9278 | 1 | /* |
| 15884 | 2 | * purple |
| 9278 | 3 | * |
| 15884 | 4 | * Purple is the legal property of its developers, whose names are too numerous |
| 9278 | 5 | * to list here. Please refer to the COPYRIGHT file distributed with this |
| 6 | * source distribution. | |
| 7 | * | |
| 8 | * This program is free software; you can redistribute it and/or modify | |
| 9 | * it under the terms of the GNU General Public License as published by | |
| 10 | * the Free Software Foundation; either version 2 of the License, or | |
| 11 | * (at your option) any later version. | |
| 12 | * | |
| 13 | * This program is distributed in the hope that it will be useful, | |
| 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| 16 | * GNU General Public License for more details. | |
| 17 | * | |
| 18 | * You should have received a copy of the GNU General Public License | |
| 19 | * along with this program; if not, write to the Free Software | |
|
19859
71d37b57eff2
The FSF changed its address a while ago; our files were out of date.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
19534
diff
changeset
|
20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA |
| 9278 | 21 | * |
| 22 | */ | |
| 23 | ||
|
10989
ea41b63cfea5
[gaim-migrate @ 12827]
Daniel Atallah <datallah@pidgin.im>
parents:
9284
diff
changeset
|
24 | #include "internal.h" |
|
36543
a8c3fecee2d3
Renamed prpl.[ch] to protocol.[ch]
Ankit Vani <a@nevitus.org>
parents:
32280
diff
changeset
|
25 | #include "protocol.h" |
| 9279 | 26 | #include "util.h" |
|
10989
ea41b63cfea5
[gaim-migrate @ 12827]
Daniel Atallah <datallah@pidgin.im>
parents:
9284
diff
changeset
|
27 | #include "debug.h" |
| 9278 | 28 | |
| 29 | #include "yahoo_friend.h" | |
|
27791
4601e7074a83
Add support for receiving contact details from buddies.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
27389
diff
changeset
|
30 | #include "yahoo_aliases.h" |
| 9278 | 31 | |
| 9283 | 32 | static YahooFriend *yahoo_friend_new(void) |
| 9278 | 33 | { |
| 34 | YahooFriend *ret; | |
| 35 | ||
| 36 | ret = g_new0(YahooFriend, 1); | |
| 37 | ret->status = YAHOO_STATUS_OFFLINE; | |
|
12010
aa2f3b07ec09
[gaim-migrate @ 14303]
Peter Lawler <pidgin@bleeter.id.au>
parents:
11644
diff
changeset
|
38 | ret->presence = YAHOO_PRESENCE_DEFAULT; |
| 9278 | 39 | |
| 40 | return ret; | |
| 41 | } | |
| 42 | ||
| 15884 | 43 | YahooFriend *yahoo_friend_find(PurpleConnection *gc, const char *name) |
| 9279 | 44 | { |
|
27959
f842ae57da4e
Move from "struct yahoo_data" to "YahooData" to be consistent with other structs
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
27791
diff
changeset
|
45 | YahooData *yd; |
| 9279 | 46 | const char *norm; |
| 47 | ||
| 48 | g_return_val_if_fail(gc != NULL, NULL); | |
| 49 | ||
|
32280
704f84f692f6
Convert yahoo prpl to use accessor functions purple_connection_get_protocol_data() and purple_connection_set_protocol_data()
Andrew Victor <andrew.victor@mxit.com>
parents:
31294
diff
changeset
|
50 | yd = purple_connection_get_protocol_data(gc); |
|
704f84f692f6
Convert yahoo prpl to use accessor functions purple_connection_get_protocol_data() and purple_connection_set_protocol_data()
Andrew Victor <andrew.victor@mxit.com>
parents:
31294
diff
changeset
|
51 | g_return_val_if_fail(yd != NULL, NULL); |
|
704f84f692f6
Convert yahoo prpl to use accessor functions purple_connection_get_protocol_data() and purple_connection_set_protocol_data()
Andrew Victor <andrew.victor@mxit.com>
parents:
31294
diff
changeset
|
52 | |
| 15884 | 53 | norm = purple_normalize(purple_connection_get_account(gc), name); |
| 9279 | 54 | |
| 55 | return g_hash_table_lookup(yd->friends, norm); | |
| 56 | } | |
| 57 | ||
| 15884 | 58 | YahooFriend *yahoo_friend_find_or_new(PurpleConnection *gc, const char *name) |
| 9279 | 59 | { |
| 60 | YahooFriend *f; | |
|
27959
f842ae57da4e
Move from "struct yahoo_data" to "YahooData" to be consistent with other structs
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
27791
diff
changeset
|
61 | YahooData *yd; |
| 9279 | 62 | const char *norm; |
| 63 | ||
| 64 | g_return_val_if_fail(gc != NULL, NULL); | |
| 65 | ||
|
32280
704f84f692f6
Convert yahoo prpl to use accessor functions purple_connection_get_protocol_data() and purple_connection_set_protocol_data()
Andrew Victor <andrew.victor@mxit.com>
parents:
31294
diff
changeset
|
66 | yd = purple_connection_get_protocol_data(gc); |
|
704f84f692f6
Convert yahoo prpl to use accessor functions purple_connection_get_protocol_data() and purple_connection_set_protocol_data()
Andrew Victor <andrew.victor@mxit.com>
parents:
31294
diff
changeset
|
67 | g_return_val_if_fail(yd != NULL, NULL); |
|
704f84f692f6
Convert yahoo prpl to use accessor functions purple_connection_get_protocol_data() and purple_connection_set_protocol_data()
Andrew Victor <andrew.victor@mxit.com>
parents:
31294
diff
changeset
|
68 | |
| 15884 | 69 | norm = purple_normalize(purple_connection_get_account(gc), name); |
| 9279 | 70 | |
| 71 | f = g_hash_table_lookup(yd->friends, norm); | |
| 72 | if (!f) { | |
| 73 | f = yahoo_friend_new(); | |
| 74 | g_hash_table_insert(yd->friends, g_strdup(norm), f); | |
| 75 | } | |
| 76 | ||
| 77 | return f; | |
| 78 | } | |
| 79 | ||
| 9281 | 80 | void yahoo_friend_set_ip(YahooFriend *f, const char *ip) |
| 81 | { | |
|
22980
b5c23c9bbd24
Leak fixes. Avoid creating an unnecessary parallel data structure to YahooFriend.
Daniel Atallah <datallah@pidgin.im>
parents:
19859
diff
changeset
|
82 | g_free(f->ip); |
| 9281 | 83 | f->ip = g_strdup(ip); |
| 84 | } | |
| 85 | ||
| 86 | const char *yahoo_friend_get_ip(YahooFriend *f) | |
| 87 | { | |
| 88 | return f->ip; | |
| 89 | } | |
| 90 | ||
| 9283 | 91 | void yahoo_friend_set_game(YahooFriend *f, const char *game) |
| 92 | { | |
|
22980
b5c23c9bbd24
Leak fixes. Avoid creating an unnecessary parallel data structure to YahooFriend.
Daniel Atallah <datallah@pidgin.im>
parents:
19859
diff
changeset
|
93 | g_free(f->game); |
| 9283 | 94 | |
| 95 | if (game) | |
| 96 | f->game = g_strdup(game); | |
| 97 | else | |
| 98 | f->game = NULL; | |
| 99 | } | |
| 100 | ||
| 101 | const char *yahoo_friend_get_game(YahooFriend *f) | |
| 102 | { | |
| 103 | return f->game; | |
| 104 | } | |
| 105 | ||
| 106 | void yahoo_friend_set_status_message(YahooFriend *f, char *msg) | |
| 107 | { | |
|
22980
b5c23c9bbd24
Leak fixes. Avoid creating an unnecessary parallel data structure to YahooFriend.
Daniel Atallah <datallah@pidgin.im>
parents:
19859
diff
changeset
|
108 | g_free(f->msg); |
| 9283 | 109 | |
| 110 | f->msg = msg; | |
| 111 | } | |
| 112 | ||
| 113 | const char *yahoo_friend_get_status_message(YahooFriend *f) | |
| 114 | { | |
| 115 | return f->msg; | |
| 116 | } | |
| 117 | ||
| 9284 | 118 | void yahoo_friend_set_buddy_icon_need_request(YahooFriend *f, gboolean needs) |
| 119 | { | |
| 120 | f->bicon_sent_request = !needs; | |
| 121 | } | |
| 122 | ||
| 123 | gboolean yahoo_friend_get_buddy_icon_need_request(YahooFriend *f) | |
| 124 | { | |
| 125 | return !f->bicon_sent_request; | |
| 126 | } | |
| 127 | ||
|
22980
b5c23c9bbd24
Leak fixes. Avoid creating an unnecessary parallel data structure to YahooFriend.
Daniel Atallah <datallah@pidgin.im>
parents:
19859
diff
changeset
|
128 | void yahoo_friend_set_alias_id(YahooFriend *f, const char *alias_id) |
|
b5c23c9bbd24
Leak fixes. Avoid creating an unnecessary parallel data structure to YahooFriend.
Daniel Atallah <datallah@pidgin.im>
parents:
19859
diff
changeset
|
129 | { |
|
27791
4601e7074a83
Add support for receiving contact details from buddies.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
27389
diff
changeset
|
130 | g_free(f->ypd.id); |
|
4601e7074a83
Add support for receiving contact details from buddies.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
27389
diff
changeset
|
131 | f->ypd.id = g_strdup(alias_id); |
|
22980
b5c23c9bbd24
Leak fixes. Avoid creating an unnecessary parallel data structure to YahooFriend.
Daniel Atallah <datallah@pidgin.im>
parents:
19859
diff
changeset
|
132 | } |
|
b5c23c9bbd24
Leak fixes. Avoid creating an unnecessary parallel data structure to YahooFriend.
Daniel Atallah <datallah@pidgin.im>
parents:
19859
diff
changeset
|
133 | |
|
b5c23c9bbd24
Leak fixes. Avoid creating an unnecessary parallel data structure to YahooFriend.
Daniel Atallah <datallah@pidgin.im>
parents:
19859
diff
changeset
|
134 | const char *yahoo_friend_get_alias_id(YahooFriend *f) |
|
b5c23c9bbd24
Leak fixes. Avoid creating an unnecessary parallel data structure to YahooFriend.
Daniel Atallah <datallah@pidgin.im>
parents:
19859
diff
changeset
|
135 | { |
|
27791
4601e7074a83
Add support for receiving contact details from buddies.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
27389
diff
changeset
|
136 | return f->ypd.id; |
|
22980
b5c23c9bbd24
Leak fixes. Avoid creating an unnecessary parallel data structure to YahooFriend.
Daniel Atallah <datallah@pidgin.im>
parents:
19859
diff
changeset
|
137 | } |
|
b5c23c9bbd24
Leak fixes. Avoid creating an unnecessary parallel data structure to YahooFriend.
Daniel Atallah <datallah@pidgin.im>
parents:
19859
diff
changeset
|
138 | |
| 9278 | 139 | void yahoo_friend_free(gpointer p) |
| 140 | { | |
| 141 | YahooFriend *f = p; | |
|
22980
b5c23c9bbd24
Leak fixes. Avoid creating an unnecessary parallel data structure to YahooFriend.
Daniel Atallah <datallah@pidgin.im>
parents:
19859
diff
changeset
|
142 | g_free(f->msg); |
|
b5c23c9bbd24
Leak fixes. Avoid creating an unnecessary parallel data structure to YahooFriend.
Daniel Atallah <datallah@pidgin.im>
parents:
19859
diff
changeset
|
143 | g_free(f->game); |
|
b5c23c9bbd24
Leak fixes. Avoid creating an unnecessary parallel data structure to YahooFriend.
Daniel Atallah <datallah@pidgin.im>
parents:
19859
diff
changeset
|
144 | g_free(f->ip); |
|
27791
4601e7074a83
Add support for receiving contact details from buddies.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
27389
diff
changeset
|
145 | yahoo_personal_details_reset(&f->ypd, TRUE); |
| 9278 | 146 | g_free(f); |
| 147 | } | |
|
10989
ea41b63cfea5
[gaim-migrate @ 12827]
Daniel Atallah <datallah@pidgin.im>
parents:
9284
diff
changeset
|
148 | |
| 15884 | 149 | void yahoo_process_presence(PurpleConnection *gc, struct yahoo_packet *pkt) |
|
10989
ea41b63cfea5
[gaim-migrate @ 12827]
Daniel Atallah <datallah@pidgin.im>
parents:
9284
diff
changeset
|
150 | { |
|
ea41b63cfea5
[gaim-migrate @ 12827]
Daniel Atallah <datallah@pidgin.im>
parents:
9284
diff
changeset
|
151 | GSList *l = pkt->hash; |
|
ea41b63cfea5
[gaim-migrate @ 12827]
Daniel Atallah <datallah@pidgin.im>
parents:
9284
diff
changeset
|
152 | YahooFriend *f; |
|
26371
edb4870ff737
msn interoperability : presence settings
Sulabh Mahajan <sulabh@pidgin.im>
parents:
26348
diff
changeset
|
153 | char *temp = NULL; |
|
10989
ea41b63cfea5
[gaim-migrate @ 12827]
Daniel Atallah <datallah@pidgin.im>
parents:
9284
diff
changeset
|
154 | char *who = NULL; |
|
ea41b63cfea5
[gaim-migrate @ 12827]
Daniel Atallah <datallah@pidgin.im>
parents:
9284
diff
changeset
|
155 | int value = 0; |
|
28660
db3b43e7fcea
Handle adding Lotus Sametime and Microsoft OCS buddies to Yahoo! accounts.
Jason Cohen <kryojenik23-pidgin@steltek.com>
parents:
27959
diff
changeset
|
156 | YahooFederation fed = YAHOO_FEDERATION_NONE; |
|
31294
73607ab89c6f
Remove trailing whitespace
Richard Laager <rlaager@pidgin.im>
parents:
29324
diff
changeset
|
157 | |
|
10989
ea41b63cfea5
[gaim-migrate @ 12827]
Daniel Atallah <datallah@pidgin.im>
parents:
9284
diff
changeset
|
158 | while (l) { |
|
ea41b63cfea5
[gaim-migrate @ 12827]
Daniel Atallah <datallah@pidgin.im>
parents:
9284
diff
changeset
|
159 | struct yahoo_pair *pair = l->data; |
|
ea41b63cfea5
[gaim-migrate @ 12827]
Daniel Atallah <datallah@pidgin.im>
parents:
9284
diff
changeset
|
160 | |
|
ea41b63cfea5
[gaim-migrate @ 12827]
Daniel Atallah <datallah@pidgin.im>
parents:
9284
diff
changeset
|
161 | switch (pair->key) { |
|
ea41b63cfea5
[gaim-migrate @ 12827]
Daniel Atallah <datallah@pidgin.im>
parents:
9284
diff
changeset
|
162 | case 7: |
|
26371
edb4870ff737
msn interoperability : presence settings
Sulabh Mahajan <sulabh@pidgin.im>
parents:
26348
diff
changeset
|
163 | temp = pair->value; |
|
10989
ea41b63cfea5
[gaim-migrate @ 12827]
Daniel Atallah <datallah@pidgin.im>
parents:
9284
diff
changeset
|
164 | break; |
|
ea41b63cfea5
[gaim-migrate @ 12827]
Daniel Atallah <datallah@pidgin.im>
parents:
9284
diff
changeset
|
165 | case 31: |
|
ea41b63cfea5
[gaim-migrate @ 12827]
Daniel Atallah <datallah@pidgin.im>
parents:
9284
diff
changeset
|
166 | value = strtol(pair->value, NULL, 10); |
|
ea41b63cfea5
[gaim-migrate @ 12827]
Daniel Atallah <datallah@pidgin.im>
parents:
9284
diff
changeset
|
167 | break; |
|
26371
edb4870ff737
msn interoperability : presence settings
Sulabh Mahajan <sulabh@pidgin.im>
parents:
26348
diff
changeset
|
168 | case 241: |
|
28660
db3b43e7fcea
Handle adding Lotus Sametime and Microsoft OCS buddies to Yahoo! accounts.
Jason Cohen <kryojenik23-pidgin@steltek.com>
parents:
27959
diff
changeset
|
169 | fed = strtol(pair->value, NULL, 10); |
|
26371
edb4870ff737
msn interoperability : presence settings
Sulabh Mahajan <sulabh@pidgin.im>
parents:
26348
diff
changeset
|
170 | break; |
|
10989
ea41b63cfea5
[gaim-migrate @ 12827]
Daniel Atallah <datallah@pidgin.im>
parents:
9284
diff
changeset
|
171 | } |
|
ea41b63cfea5
[gaim-migrate @ 12827]
Daniel Atallah <datallah@pidgin.im>
parents:
9284
diff
changeset
|
172 | |
|
ea41b63cfea5
[gaim-migrate @ 12827]
Daniel Atallah <datallah@pidgin.im>
parents:
9284
diff
changeset
|
173 | l = l->next; |
|
ea41b63cfea5
[gaim-migrate @ 12827]
Daniel Atallah <datallah@pidgin.im>
parents:
9284
diff
changeset
|
174 | } |
|
ea41b63cfea5
[gaim-migrate @ 12827]
Daniel Atallah <datallah@pidgin.im>
parents:
9284
diff
changeset
|
175 | |
|
27389
cfeec7c4b10d
Fix a small leak.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
26372
diff
changeset
|
176 | if (value != 1 && value != 2) { |
|
cfeec7c4b10d
Fix a small leak.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
26372
diff
changeset
|
177 | purple_debug_error("yahoo", "Received unknown value for presence key: %d\n", value); |
|
cfeec7c4b10d
Fix a small leak.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
26372
diff
changeset
|
178 | return; |
|
cfeec7c4b10d
Fix a small leak.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
26372
diff
changeset
|
179 | } |
|
31294
73607ab89c6f
Remove trailing whitespace
Richard Laager <rlaager@pidgin.im>
parents:
29324
diff
changeset
|
180 | |
|
28660
db3b43e7fcea
Handle adding Lotus Sametime and Microsoft OCS buddies to Yahoo! accounts.
Jason Cohen <kryojenik23-pidgin@steltek.com>
parents:
27959
diff
changeset
|
181 | switch (fed) { |
|
db3b43e7fcea
Handle adding Lotus Sametime and Microsoft OCS buddies to Yahoo! accounts.
Jason Cohen <kryojenik23-pidgin@steltek.com>
parents:
27959
diff
changeset
|
182 | case YAHOO_FEDERATION_MSN: |
|
db3b43e7fcea
Handle adding Lotus Sametime and Microsoft OCS buddies to Yahoo! accounts.
Jason Cohen <kryojenik23-pidgin@steltek.com>
parents:
27959
diff
changeset
|
183 | who = g_strconcat("msn/", temp, NULL); |
|
db3b43e7fcea
Handle adding Lotus Sametime and Microsoft OCS buddies to Yahoo! accounts.
Jason Cohen <kryojenik23-pidgin@steltek.com>
parents:
27959
diff
changeset
|
184 | break; |
|
db3b43e7fcea
Handle adding Lotus Sametime and Microsoft OCS buddies to Yahoo! accounts.
Jason Cohen <kryojenik23-pidgin@steltek.com>
parents:
27959
diff
changeset
|
185 | case YAHOO_FEDERATION_OCS: |
|
db3b43e7fcea
Handle adding Lotus Sametime and Microsoft OCS buddies to Yahoo! accounts.
Jason Cohen <kryojenik23-pidgin@steltek.com>
parents:
27959
diff
changeset
|
186 | who = g_strconcat("ocs/", temp, NULL); |
|
db3b43e7fcea
Handle adding Lotus Sametime and Microsoft OCS buddies to Yahoo! accounts.
Jason Cohen <kryojenik23-pidgin@steltek.com>
parents:
27959
diff
changeset
|
187 | break; |
|
db3b43e7fcea
Handle adding Lotus Sametime and Microsoft OCS buddies to Yahoo! accounts.
Jason Cohen <kryojenik23-pidgin@steltek.com>
parents:
27959
diff
changeset
|
188 | case YAHOO_FEDERATION_IBM: |
|
db3b43e7fcea
Handle adding Lotus Sametime and Microsoft OCS buddies to Yahoo! accounts.
Jason Cohen <kryojenik23-pidgin@steltek.com>
parents:
27959
diff
changeset
|
189 | who = g_strconcat("ibm/", temp, NULL); |
|
db3b43e7fcea
Handle adding Lotus Sametime and Microsoft OCS buddies to Yahoo! accounts.
Jason Cohen <kryojenik23-pidgin@steltek.com>
parents:
27959
diff
changeset
|
190 | break; |
|
29324
125eb74677d6
Support Yahoo !PingBox. Includes a couple warning fixes. Fixes #7347.
Kartik Mohta <kartikmohta@gmail.com>
parents:
28660
diff
changeset
|
191 | case YAHOO_FEDERATION_PBX: |
|
125eb74677d6
Support Yahoo !PingBox. Includes a couple warning fixes. Fixes #7347.
Kartik Mohta <kartikmohta@gmail.com>
parents:
28660
diff
changeset
|
192 | who = g_strconcat("pbx/", temp, NULL); |
|
125eb74677d6
Support Yahoo !PingBox. Includes a couple warning fixes. Fixes #7347.
Kartik Mohta <kartikmohta@gmail.com>
parents:
28660
diff
changeset
|
193 | break; |
|
28660
db3b43e7fcea
Handle adding Lotus Sametime and Microsoft OCS buddies to Yahoo! accounts.
Jason Cohen <kryojenik23-pidgin@steltek.com>
parents:
27959
diff
changeset
|
194 | case YAHOO_FEDERATION_NONE: |
|
db3b43e7fcea
Handle adding Lotus Sametime and Microsoft OCS buddies to Yahoo! accounts.
Jason Cohen <kryojenik23-pidgin@steltek.com>
parents:
27959
diff
changeset
|
195 | who = g_strdup(temp); |
|
db3b43e7fcea
Handle adding Lotus Sametime and Microsoft OCS buddies to Yahoo! accounts.
Jason Cohen <kryojenik23-pidgin@steltek.com>
parents:
27959
diff
changeset
|
196 | break; |
|
db3b43e7fcea
Handle adding Lotus Sametime and Microsoft OCS buddies to Yahoo! accounts.
Jason Cohen <kryojenik23-pidgin@steltek.com>
parents:
27959
diff
changeset
|
197 | } |
|
10989
ea41b63cfea5
[gaim-migrate @ 12827]
Daniel Atallah <datallah@pidgin.im>
parents:
9284
diff
changeset
|
198 | g_return_if_fail(who != NULL); |
|
ea41b63cfea5
[gaim-migrate @ 12827]
Daniel Atallah <datallah@pidgin.im>
parents:
9284
diff
changeset
|
199 | |
|
ea41b63cfea5
[gaim-migrate @ 12827]
Daniel Atallah <datallah@pidgin.im>
parents:
9284
diff
changeset
|
200 | f = yahoo_friend_find(gc, who); |
|
26371
edb4870ff737
msn interoperability : presence settings
Sulabh Mahajan <sulabh@pidgin.im>
parents:
26348
diff
changeset
|
201 | if (!f) { |
|
edb4870ff737
msn interoperability : presence settings
Sulabh Mahajan <sulabh@pidgin.im>
parents:
26348
diff
changeset
|
202 | g_free(who); |
|
10989
ea41b63cfea5
[gaim-migrate @ 12827]
Daniel Atallah <datallah@pidgin.im>
parents:
9284
diff
changeset
|
203 | return; |
|
26371
edb4870ff737
msn interoperability : presence settings
Sulabh Mahajan <sulabh@pidgin.im>
parents:
26348
diff
changeset
|
204 | } |
|
10989
ea41b63cfea5
[gaim-migrate @ 12827]
Daniel Atallah <datallah@pidgin.im>
parents:
9284
diff
changeset
|
205 | |
|
12010
aa2f3b07ec09
[gaim-migrate @ 14303]
Peter Lawler <pidgin@bleeter.id.au>
parents:
11644
diff
changeset
|
206 | if (pkt->service == YAHOO_SERVICE_PRESENCE_PERM) { |
| 15884 | 207 | purple_debug_info("yahoo", "Setting permanent presence for %s to %d.\n", who, (value == 1)); |
|
10989
ea41b63cfea5
[gaim-migrate @ 12827]
Daniel Atallah <datallah@pidgin.im>
parents:
9284
diff
changeset
|
208 | /* If setting from perm offline to online when in invisible status, |
|
ea41b63cfea5
[gaim-migrate @ 12827]
Daniel Atallah <datallah@pidgin.im>
parents:
9284
diff
changeset
|
209 | * this has already been taken care of (when the temp status changed) */ |
|
12010
aa2f3b07ec09
[gaim-migrate @ 14303]
Peter Lawler <pidgin@bleeter.id.au>
parents:
11644
diff
changeset
|
210 | if (value == 2 && f->presence == YAHOO_PRESENCE_ONLINE) { |
|
10989
ea41b63cfea5
[gaim-migrate @ 12827]
Daniel Atallah <datallah@pidgin.im>
parents:
9284
diff
changeset
|
211 | } else { |
|
ea41b63cfea5
[gaim-migrate @ 12827]
Daniel Atallah <datallah@pidgin.im>
parents:
9284
diff
changeset
|
212 | if (value == 1) /* Setting Perm offline */ |
|
12010
aa2f3b07ec09
[gaim-migrate @ 14303]
Peter Lawler <pidgin@bleeter.id.au>
parents:
11644
diff
changeset
|
213 | f->presence = YAHOO_PRESENCE_PERM_OFFLINE; |
|
10989
ea41b63cfea5
[gaim-migrate @ 12827]
Daniel Atallah <datallah@pidgin.im>
parents:
9284
diff
changeset
|
214 | else |
|
12010
aa2f3b07ec09
[gaim-migrate @ 14303]
Peter Lawler <pidgin@bleeter.id.au>
parents:
11644
diff
changeset
|
215 | f->presence = YAHOO_PRESENCE_DEFAULT; |
|
10989
ea41b63cfea5
[gaim-migrate @ 12827]
Daniel Atallah <datallah@pidgin.im>
parents:
9284
diff
changeset
|
216 | } |
|
ea41b63cfea5
[gaim-migrate @ 12827]
Daniel Atallah <datallah@pidgin.im>
parents:
9284
diff
changeset
|
217 | } else { |
| 15884 | 218 | purple_debug_info("yahoo", "Setting session presence for %s to %d.\n", who, (value == 1)); |
|
10989
ea41b63cfea5
[gaim-migrate @ 12827]
Daniel Atallah <datallah@pidgin.im>
parents:
9284
diff
changeset
|
219 | if (value == 1) |
|
12010
aa2f3b07ec09
[gaim-migrate @ 14303]
Peter Lawler <pidgin@bleeter.id.au>
parents:
11644
diff
changeset
|
220 | f->presence = YAHOO_PRESENCE_ONLINE; |
|
10989
ea41b63cfea5
[gaim-migrate @ 12827]
Daniel Atallah <datallah@pidgin.im>
parents:
9284
diff
changeset
|
221 | else |
|
12010
aa2f3b07ec09
[gaim-migrate @ 14303]
Peter Lawler <pidgin@bleeter.id.au>
parents:
11644
diff
changeset
|
222 | f->presence = YAHOO_PRESENCE_DEFAULT; |
|
10989
ea41b63cfea5
[gaim-migrate @ 12827]
Daniel Atallah <datallah@pidgin.im>
parents:
9284
diff
changeset
|
223 | } |
|
26371
edb4870ff737
msn interoperability : presence settings
Sulabh Mahajan <sulabh@pidgin.im>
parents:
26348
diff
changeset
|
224 | g_free(who); |
|
10989
ea41b63cfea5
[gaim-migrate @ 12827]
Daniel Atallah <datallah@pidgin.im>
parents:
9284
diff
changeset
|
225 | } |
|
ea41b63cfea5
[gaim-migrate @ 12827]
Daniel Atallah <datallah@pidgin.im>
parents:
9284
diff
changeset
|
226 | |
| 15884 | 227 | void yahoo_friend_update_presence(PurpleConnection *gc, const char *name, |
|
12010
aa2f3b07ec09
[gaim-migrate @ 14303]
Peter Lawler <pidgin@bleeter.id.au>
parents:
11644
diff
changeset
|
228 | YahooPresenceVisibility presence) |
|
10989
ea41b63cfea5
[gaim-migrate @ 12827]
Daniel Atallah <datallah@pidgin.im>
parents:
9284
diff
changeset
|
229 | { |
|
32280
704f84f692f6
Convert yahoo prpl to use accessor functions purple_connection_get_protocol_data() and purple_connection_set_protocol_data()
Andrew Victor <andrew.victor@mxit.com>
parents:
31294
diff
changeset
|
230 | YahooData *yd = purple_connection_get_protocol_data(gc); |
|
10989
ea41b63cfea5
[gaim-migrate @ 12827]
Daniel Atallah <datallah@pidgin.im>
parents:
9284
diff
changeset
|
231 | struct yahoo_packet *pkt = NULL; |
|
ea41b63cfea5
[gaim-migrate @ 12827]
Daniel Atallah <datallah@pidgin.im>
parents:
9284
diff
changeset
|
232 | YahooFriend *f; |
|
19534
ac814f829edf
Add some additional yahoo keys to the stealth packets to make them work again. Fixes #2654.
Daniel Atallah <datallah@pidgin.im>
parents:
15884
diff
changeset
|
233 | const char *thirtyone, *thirteen; |
|
ac814f829edf
Add some additional yahoo keys to the stealth packets to make them work again. Fixes #2654.
Daniel Atallah <datallah@pidgin.im>
parents:
15884
diff
changeset
|
234 | int service = -1; |
|
26371
edb4870ff737
msn interoperability : presence settings
Sulabh Mahajan <sulabh@pidgin.im>
parents:
26348
diff
changeset
|
235 | const char *temp = NULL; |
|
10989
ea41b63cfea5
[gaim-migrate @ 12827]
Daniel Atallah <datallah@pidgin.im>
parents:
9284
diff
changeset
|
236 | |
|
ea41b63cfea5
[gaim-migrate @ 12827]
Daniel Atallah <datallah@pidgin.im>
parents:
9284
diff
changeset
|
237 | if (!yd->logged_in) |
|
ea41b63cfea5
[gaim-migrate @ 12827]
Daniel Atallah <datallah@pidgin.im>
parents:
9284
diff
changeset
|
238 | return; |
|
ea41b63cfea5
[gaim-migrate @ 12827]
Daniel Atallah <datallah@pidgin.im>
parents:
9284
diff
changeset
|
239 | |
|
ea41b63cfea5
[gaim-migrate @ 12827]
Daniel Atallah <datallah@pidgin.im>
parents:
9284
diff
changeset
|
240 | f = yahoo_friend_find(gc, name); |
|
ea41b63cfea5
[gaim-migrate @ 12827]
Daniel Atallah <datallah@pidgin.im>
parents:
9284
diff
changeset
|
241 | if (!f) |
|
ea41b63cfea5
[gaim-migrate @ 12827]
Daniel Atallah <datallah@pidgin.im>
parents:
9284
diff
changeset
|
242 | return; |
|
31294
73607ab89c6f
Remove trailing whitespace
Richard Laager <rlaager@pidgin.im>
parents:
29324
diff
changeset
|
243 | |
|
28660
db3b43e7fcea
Handle adding Lotus Sametime and Microsoft OCS buddies to Yahoo! accounts.
Jason Cohen <kryojenik23-pidgin@steltek.com>
parents:
27959
diff
changeset
|
244 | if(f->fed != YAHOO_FEDERATION_NONE) |
|
26371
edb4870ff737
msn interoperability : presence settings
Sulabh Mahajan <sulabh@pidgin.im>
parents:
26348
diff
changeset
|
245 | temp = name+4; |
|
edb4870ff737
msn interoperability : presence settings
Sulabh Mahajan <sulabh@pidgin.im>
parents:
26348
diff
changeset
|
246 | else |
|
edb4870ff737
msn interoperability : presence settings
Sulabh Mahajan <sulabh@pidgin.im>
parents:
26348
diff
changeset
|
247 | temp = name; |
|
31294
73607ab89c6f
Remove trailing whitespace
Richard Laager <rlaager@pidgin.im>
parents:
29324
diff
changeset
|
248 | |
|
10989
ea41b63cfea5
[gaim-migrate @ 12827]
Daniel Atallah <datallah@pidgin.im>
parents:
9284
diff
changeset
|
249 | /* No need to change the value if it is already correct */ |
|
12010
aa2f3b07ec09
[gaim-migrate @ 14303]
Peter Lawler <pidgin@bleeter.id.au>
parents:
11644
diff
changeset
|
250 | if (f->presence == presence) { |
| 15884 | 251 | purple_debug_info("yahoo", "Not setting presence because there are no changes.\n"); |
|
10989
ea41b63cfea5
[gaim-migrate @ 12827]
Daniel Atallah <datallah@pidgin.im>
parents:
9284
diff
changeset
|
252 | return; |
|
ea41b63cfea5
[gaim-migrate @ 12827]
Daniel Atallah <datallah@pidgin.im>
parents:
9284
diff
changeset
|
253 | } |
|
ea41b63cfea5
[gaim-migrate @ 12827]
Daniel Atallah <datallah@pidgin.im>
parents:
9284
diff
changeset
|
254 | |
|
12010
aa2f3b07ec09
[gaim-migrate @ 14303]
Peter Lawler <pidgin@bleeter.id.au>
parents:
11644
diff
changeset
|
255 | if (presence == YAHOO_PRESENCE_PERM_OFFLINE) { |
|
19534
ac814f829edf
Add some additional yahoo keys to the stealth packets to make them work again. Fixes #2654.
Daniel Atallah <datallah@pidgin.im>
parents:
15884
diff
changeset
|
256 | service = YAHOO_SERVICE_PRESENCE_PERM; |
|
ac814f829edf
Add some additional yahoo keys to the stealth packets to make them work again. Fixes #2654.
Daniel Atallah <datallah@pidgin.im>
parents:
15884
diff
changeset
|
257 | thirtyone = "1"; |
|
ac814f829edf
Add some additional yahoo keys to the stealth packets to make them work again. Fixes #2654.
Daniel Atallah <datallah@pidgin.im>
parents:
15884
diff
changeset
|
258 | thirteen = "2"; |
|
12010
aa2f3b07ec09
[gaim-migrate @ 14303]
Peter Lawler <pidgin@bleeter.id.au>
parents:
11644
diff
changeset
|
259 | } else if (presence == YAHOO_PRESENCE_DEFAULT) { |
|
aa2f3b07ec09
[gaim-migrate @ 14303]
Peter Lawler <pidgin@bleeter.id.au>
parents:
11644
diff
changeset
|
260 | if (f->presence == YAHOO_PRESENCE_PERM_OFFLINE) { |
|
19534
ac814f829edf
Add some additional yahoo keys to the stealth packets to make them work again. Fixes #2654.
Daniel Atallah <datallah@pidgin.im>
parents:
15884
diff
changeset
|
261 | service = YAHOO_SERVICE_PRESENCE_PERM; |
|
ac814f829edf
Add some additional yahoo keys to the stealth packets to make them work again. Fixes #2654.
Daniel Atallah <datallah@pidgin.im>
parents:
15884
diff
changeset
|
262 | thirtyone = "2"; |
|
ac814f829edf
Add some additional yahoo keys to the stealth packets to make them work again. Fixes #2654.
Daniel Atallah <datallah@pidgin.im>
parents:
15884
diff
changeset
|
263 | thirteen = "2"; |
|
10989
ea41b63cfea5
[gaim-migrate @ 12827]
Daniel Atallah <datallah@pidgin.im>
parents:
9284
diff
changeset
|
264 | } else if (yd->current_status == YAHOO_STATUS_INVISIBLE) { |
|
19534
ac814f829edf
Add some additional yahoo keys to the stealth packets to make them work again. Fixes #2654.
Daniel Atallah <datallah@pidgin.im>
parents:
15884
diff
changeset
|
265 | service = YAHOO_SERVICE_PRESENCE_SESSION; |
|
ac814f829edf
Add some additional yahoo keys to the stealth packets to make them work again. Fixes #2654.
Daniel Atallah <datallah@pidgin.im>
parents:
15884
diff
changeset
|
266 | thirtyone = "2"; |
|
ac814f829edf
Add some additional yahoo keys to the stealth packets to make them work again. Fixes #2654.
Daniel Atallah <datallah@pidgin.im>
parents:
15884
diff
changeset
|
267 | thirteen = "1"; |
|
10989
ea41b63cfea5
[gaim-migrate @ 12827]
Daniel Atallah <datallah@pidgin.im>
parents:
9284
diff
changeset
|
268 | } |
|
12010
aa2f3b07ec09
[gaim-migrate @ 14303]
Peter Lawler <pidgin@bleeter.id.au>
parents:
11644
diff
changeset
|
269 | } else if (presence == YAHOO_PRESENCE_ONLINE) { |
|
aa2f3b07ec09
[gaim-migrate @ 14303]
Peter Lawler <pidgin@bleeter.id.au>
parents:
11644
diff
changeset
|
270 | if (f->presence == YAHOO_PRESENCE_PERM_OFFLINE) { |
|
aa2f3b07ec09
[gaim-migrate @ 14303]
Peter Lawler <pidgin@bleeter.id.au>
parents:
11644
diff
changeset
|
271 | pkt = yahoo_packet_new(YAHOO_SERVICE_PRESENCE_PERM, |
|
10989
ea41b63cfea5
[gaim-migrate @ 12827]
Daniel Atallah <datallah@pidgin.im>
parents:
9284
diff
changeset
|
272 | YAHOO_STATUS_AVAILABLE, yd->session_id); |
|
28660
db3b43e7fcea
Handle adding Lotus Sametime and Microsoft OCS buddies to Yahoo! accounts.
Jason Cohen <kryojenik23-pidgin@steltek.com>
parents:
27959
diff
changeset
|
273 | if(f->fed) |
|
26348
3992ecfbc7e2
MSN Interoperability, add, remove buddies, change group, send im, etc
Sulabh Mahajan <sulabh@pidgin.im>
parents:
23689
diff
changeset
|
274 | yahoo_packet_hash(pkt, "ssssssiss", |
|
3992ecfbc7e2
MSN Interoperability, add, remove buddies, change group, send im, etc
Sulabh Mahajan <sulabh@pidgin.im>
parents:
23689
diff
changeset
|
275 | 1, purple_connection_get_display_name(gc), |
|
3992ecfbc7e2
MSN Interoperability, add, remove buddies, change group, send im, etc
Sulabh Mahajan <sulabh@pidgin.im>
parents:
23689
diff
changeset
|
276 | 31, "2", 13, "2", |
|
3992ecfbc7e2
MSN Interoperability, add, remove buddies, change group, send im, etc
Sulabh Mahajan <sulabh@pidgin.im>
parents:
23689
diff
changeset
|
277 | 302, "319", 300, "319", |
|
28660
db3b43e7fcea
Handle adding Lotus Sametime and Microsoft OCS buddies to Yahoo! accounts.
Jason Cohen <kryojenik23-pidgin@steltek.com>
parents:
27959
diff
changeset
|
278 | 7, temp, 241, f->fed, |
|
26348
3992ecfbc7e2
MSN Interoperability, add, remove buddies, change group, send im, etc
Sulabh Mahajan <sulabh@pidgin.im>
parents:
23689
diff
changeset
|
279 | 301, "319", 303, "319"); |
|
3992ecfbc7e2
MSN Interoperability, add, remove buddies, change group, send im, etc
Sulabh Mahajan <sulabh@pidgin.im>
parents:
23689
diff
changeset
|
280 | else |
|
3992ecfbc7e2
MSN Interoperability, add, remove buddies, change group, send im, etc
Sulabh Mahajan <sulabh@pidgin.im>
parents:
23689
diff
changeset
|
281 | yahoo_packet_hash(pkt, "ssssssss", |
| 15884 | 282 | 1, purple_connection_get_display_name(gc), |
|
19534
ac814f829edf
Add some additional yahoo keys to the stealth packets to make them work again. Fixes #2654.
Daniel Atallah <datallah@pidgin.im>
parents:
15884
diff
changeset
|
283 | 31, "2", 13, "2", |
|
ac814f829edf
Add some additional yahoo keys to the stealth packets to make them work again. Fixes #2654.
Daniel Atallah <datallah@pidgin.im>
parents:
15884
diff
changeset
|
284 | 302, "319", 300, "319", |
|
26371
edb4870ff737
msn interoperability : presence settings
Sulabh Mahajan <sulabh@pidgin.im>
parents:
26348
diff
changeset
|
285 | 7, temp, |
|
19534
ac814f829edf
Add some additional yahoo keys to the stealth packets to make them work again. Fixes #2654.
Daniel Atallah <datallah@pidgin.im>
parents:
15884
diff
changeset
|
286 | 301, "319", 303, "319"); |
|
26348
3992ecfbc7e2
MSN Interoperability, add, remove buddies, change group, send im, etc
Sulabh Mahajan <sulabh@pidgin.im>
parents:
23689
diff
changeset
|
287 | |
|
10989
ea41b63cfea5
[gaim-migrate @ 12827]
Daniel Atallah <datallah@pidgin.im>
parents:
9284
diff
changeset
|
288 | yahoo_packet_send_and_free(pkt, yd); |
|
ea41b63cfea5
[gaim-migrate @ 12827]
Daniel Atallah <datallah@pidgin.im>
parents:
9284
diff
changeset
|
289 | } |
|
ea41b63cfea5
[gaim-migrate @ 12827]
Daniel Atallah <datallah@pidgin.im>
parents:
9284
diff
changeset
|
290 | |
|
19534
ac814f829edf
Add some additional yahoo keys to the stealth packets to make them work again. Fixes #2654.
Daniel Atallah <datallah@pidgin.im>
parents:
15884
diff
changeset
|
291 | service = YAHOO_SERVICE_PRESENCE_SESSION; |
|
ac814f829edf
Add some additional yahoo keys to the stealth packets to make them work again. Fixes #2654.
Daniel Atallah <datallah@pidgin.im>
parents:
15884
diff
changeset
|
292 | thirtyone = "1"; |
|
ac814f829edf
Add some additional yahoo keys to the stealth packets to make them work again. Fixes #2654.
Daniel Atallah <datallah@pidgin.im>
parents:
15884
diff
changeset
|
293 | thirteen = "1"; |
|
10989
ea41b63cfea5
[gaim-migrate @ 12827]
Daniel Atallah <datallah@pidgin.im>
parents:
9284
diff
changeset
|
294 | } |
|
ea41b63cfea5
[gaim-migrate @ 12827]
Daniel Atallah <datallah@pidgin.im>
parents:
9284
diff
changeset
|
295 | |
|
19534
ac814f829edf
Add some additional yahoo keys to the stealth packets to make them work again. Fixes #2654.
Daniel Atallah <datallah@pidgin.im>
parents:
15884
diff
changeset
|
296 | if (service > 0) { |
|
ac814f829edf
Add some additional yahoo keys to the stealth packets to make them work again. Fixes #2654.
Daniel Atallah <datallah@pidgin.im>
parents:
15884
diff
changeset
|
297 | pkt = yahoo_packet_new(service, |
|
ac814f829edf
Add some additional yahoo keys to the stealth packets to make them work again. Fixes #2654.
Daniel Atallah <datallah@pidgin.im>
parents:
15884
diff
changeset
|
298 | YAHOO_STATUS_AVAILABLE, yd->session_id); |
|
ac814f829edf
Add some additional yahoo keys to the stealth packets to make them work again. Fixes #2654.
Daniel Atallah <datallah@pidgin.im>
parents:
15884
diff
changeset
|
299 | |
|
28660
db3b43e7fcea
Handle adding Lotus Sametime and Microsoft OCS buddies to Yahoo! accounts.
Jason Cohen <kryojenik23-pidgin@steltek.com>
parents:
27959
diff
changeset
|
300 | if(f->fed) |
|
26348
3992ecfbc7e2
MSN Interoperability, add, remove buddies, change group, send im, etc
Sulabh Mahajan <sulabh@pidgin.im>
parents:
23689
diff
changeset
|
301 | yahoo_packet_hash(pkt, "ssssssiss", |
|
3992ecfbc7e2
MSN Interoperability, add, remove buddies, change group, send im, etc
Sulabh Mahajan <sulabh@pidgin.im>
parents:
23689
diff
changeset
|
302 | 1, purple_connection_get_display_name(gc), |
|
3992ecfbc7e2
MSN Interoperability, add, remove buddies, change group, send im, etc
Sulabh Mahajan <sulabh@pidgin.im>
parents:
23689
diff
changeset
|
303 | 31, thirtyone, 13, thirteen, |
|
3992ecfbc7e2
MSN Interoperability, add, remove buddies, change group, send im, etc
Sulabh Mahajan <sulabh@pidgin.im>
parents:
23689
diff
changeset
|
304 | 302, "319", 300, "319", |
|
28660
db3b43e7fcea
Handle adding Lotus Sametime and Microsoft OCS buddies to Yahoo! accounts.
Jason Cohen <kryojenik23-pidgin@steltek.com>
parents:
27959
diff
changeset
|
305 | 7, temp, 241, f->fed, |
|
26348
3992ecfbc7e2
MSN Interoperability, add, remove buddies, change group, send im, etc
Sulabh Mahajan <sulabh@pidgin.im>
parents:
23689
diff
changeset
|
306 | 301, "319", 303, "319"); |
|
3992ecfbc7e2
MSN Interoperability, add, remove buddies, change group, send im, etc
Sulabh Mahajan <sulabh@pidgin.im>
parents:
23689
diff
changeset
|
307 | else |
|
3992ecfbc7e2
MSN Interoperability, add, remove buddies, change group, send im, etc
Sulabh Mahajan <sulabh@pidgin.im>
parents:
23689
diff
changeset
|
308 | yahoo_packet_hash(pkt, "ssssssss", |
|
19534
ac814f829edf
Add some additional yahoo keys to the stealth packets to make them work again. Fixes #2654.
Daniel Atallah <datallah@pidgin.im>
parents:
15884
diff
changeset
|
309 | 1, purple_connection_get_display_name(gc), |
|
ac814f829edf
Add some additional yahoo keys to the stealth packets to make them work again. Fixes #2654.
Daniel Atallah <datallah@pidgin.im>
parents:
15884
diff
changeset
|
310 | 31, thirtyone, 13, thirteen, |
|
ac814f829edf
Add some additional yahoo keys to the stealth packets to make them work again. Fixes #2654.
Daniel Atallah <datallah@pidgin.im>
parents:
15884
diff
changeset
|
311 | 302, "319", 300, "319", |
|
26371
edb4870ff737
msn interoperability : presence settings
Sulabh Mahajan <sulabh@pidgin.im>
parents:
26348
diff
changeset
|
312 | 7, temp, |
|
19534
ac814f829edf
Add some additional yahoo keys to the stealth packets to make them work again. Fixes #2654.
Daniel Atallah <datallah@pidgin.im>
parents:
15884
diff
changeset
|
313 | 301, "319", 303, "319"); |
|
ac814f829edf
Add some additional yahoo keys to the stealth packets to make them work again. Fixes #2654.
Daniel Atallah <datallah@pidgin.im>
parents:
15884
diff
changeset
|
314 | |
|
10989
ea41b63cfea5
[gaim-migrate @ 12827]
Daniel Atallah <datallah@pidgin.im>
parents:
9284
diff
changeset
|
315 | yahoo_packet_send_and_free(pkt, yd); |
|
19534
ac814f829edf
Add some additional yahoo keys to the stealth packets to make them work again. Fixes #2654.
Daniel Atallah <datallah@pidgin.im>
parents:
15884
diff
changeset
|
316 | } |
|
10989
ea41b63cfea5
[gaim-migrate @ 12827]
Daniel Atallah <datallah@pidgin.im>
parents:
9284
diff
changeset
|
317 | } |
|
23681
f8841c9d3e39
Sending of p2p packet, providing peer with our IP address to make a connection to us.
Sulabh Mahajan <sulabh@pidgin.im>
parents:
22980
diff
changeset
|
318 | |
|
f8841c9d3e39
Sending of p2p packet, providing peer with our IP address to make a connection to us.
Sulabh Mahajan <sulabh@pidgin.im>
parents:
22980
diff
changeset
|
319 | void yahoo_friend_set_p2p_status(YahooFriend *f, YahooP2PStatus p2p_status) |
|
f8841c9d3e39
Sending of p2p packet, providing peer with our IP address to make a connection to us.
Sulabh Mahajan <sulabh@pidgin.im>
parents:
22980
diff
changeset
|
320 | { |
|
f8841c9d3e39
Sending of p2p packet, providing peer with our IP address to make a connection to us.
Sulabh Mahajan <sulabh@pidgin.im>
parents:
22980
diff
changeset
|
321 | f->p2p_status = p2p_status; |
|
f8841c9d3e39
Sending of p2p packet, providing peer with our IP address to make a connection to us.
Sulabh Mahajan <sulabh@pidgin.im>
parents:
22980
diff
changeset
|
322 | } |
|
f8841c9d3e39
Sending of p2p packet, providing peer with our IP address to make a connection to us.
Sulabh Mahajan <sulabh@pidgin.im>
parents:
22980
diff
changeset
|
323 | |
|
f8841c9d3e39
Sending of p2p packet, providing peer with our IP address to make a connection to us.
Sulabh Mahajan <sulabh@pidgin.im>
parents:
22980
diff
changeset
|
324 | YahooP2PStatus yahoo_friend_get_p2p_status(YahooFriend *f) |
|
f8841c9d3e39
Sending of p2p packet, providing peer with our IP address to make a connection to us.
Sulabh Mahajan <sulabh@pidgin.im>
parents:
22980
diff
changeset
|
325 | { |
|
f8841c9d3e39
Sending of p2p packet, providing peer with our IP address to make a connection to us.
Sulabh Mahajan <sulabh@pidgin.im>
parents:
22980
diff
changeset
|
326 | return f->p2p_status; |
|
f8841c9d3e39
Sending of p2p packet, providing peer with our IP address to make a connection to us.
Sulabh Mahajan <sulabh@pidgin.im>
parents:
22980
diff
changeset
|
327 | } |