Mercurial > pidgin.yaz
comparison libpurple/protocols/jabber/jabber.c @ 23445:4ac5db6e39f3
Custom smileys for XMPP according to XEP 0231. Refs #5627.
committer: Sadrul Habib Chowdhury <imadil@gmail.com>
author | Marcus Lundblad <ml@update.uu.se> |
---|---|
date | Sun, 01 Jun 2008 20:55:54 +0000 |
parents | e0bcb8cfda74 |
children | c45d05bd58ed |
comparison
equal
deleted
inserted
replaced
23262:5793bcea224c | 23445:4ac5db6e39f3 |
---|---|
40 #include "xmlnode.h" | 40 #include "xmlnode.h" |
41 | 41 |
42 #include "auth.h" | 42 #include "auth.h" |
43 #include "buddy.h" | 43 #include "buddy.h" |
44 #include "chat.h" | 44 #include "chat.h" |
45 #include "data.h" | |
45 #include "disco.h" | 46 #include "disco.h" |
46 #include "google.h" | 47 #include "google.h" |
47 #include "iq.h" | 48 #include "iq.h" |
48 #include "jutil.h" | 49 #include "jutil.h" |
49 #include "message.h" | 50 #include "message.h" |
54 #include "ping.h" | 55 #include "ping.h" |
55 #include "si.h" | 56 #include "si.h" |
56 #include "xdata.h" | 57 #include "xdata.h" |
57 #include "pep.h" | 58 #include "pep.h" |
58 #include "adhoccommands.h" | 59 #include "adhoccommands.h" |
60 | |
59 | 61 |
60 #define JABBER_CONNECT_STEPS (js->gsc ? 9 : 5) | 62 #define JABBER_CONNECT_STEPS (js->gsc ? 9 : 5) |
61 | 63 |
62 static PurplePlugin *my_protocol = NULL; | 64 static PurplePlugin *my_protocol = NULL; |
63 GList *jabber_features = NULL; | 65 GList *jabber_features = NULL; |
608 const char *connect_server = purple_account_get_string(account, | 610 const char *connect_server = purple_account_get_string(account, |
609 "connect_server", ""); | 611 "connect_server", ""); |
610 JabberStream *js; | 612 JabberStream *js; |
611 JabberBuddy *my_jb = NULL; | 613 JabberBuddy *my_jb = NULL; |
612 | 614 |
613 gc->flags |= PURPLE_CONNECTION_HTML; | 615 gc->flags |= PURPLE_CONNECTION_HTML | |
616 PURPLE_CONNECTION_ALLOW_CUSTOM_SMILEY; | |
614 js = gc->proto_data = g_new0(JabberStream, 1); | 617 js = gc->proto_data = g_new0(JabberStream, 1); |
615 js->gc = gc; | 618 js->gc = gc; |
616 js->fd = -1; | 619 js->fd = -1; |
617 js->iq_callbacks = g_hash_table_new_full(g_str_hash, g_str_equal, | 620 js->iq_callbacks = g_hash_table_new_full(g_str_hash, g_str_equal, |
618 g_free, g_free); | 621 g_free, g_free); |
1860 { | 1863 { |
1861 JabberStream *js = gc->proto_data; | 1864 JabberStream *js = gc->proto_data; |
1862 JabberID *jid; | 1865 JabberID *jid; |
1863 JabberBuddy *jb; | 1866 JabberBuddy *jb; |
1864 JabberBuddyResource *jbr; | 1867 JabberBuddyResource *jbr; |
1868 PurpleAccount *account = purple_connection_get_account(gc); | |
1869 PurpleConversation *conv = | |
1870 purple_find_conversation_with_account(PURPLE_CONV_TYPE_ANY, | |
1871 who, account); | |
1865 | 1872 |
1866 if(!(jid = jabber_id_new(who))) | 1873 if(!(jid = jabber_id_new(who))) |
1867 return; | 1874 return; |
1868 | 1875 |
1869 if((jb = jabber_buddy_find(js, who, TRUE)) && | 1876 if((jb = jabber_buddy_find(js, who, TRUE)) && |
1873 jbr->thread_id = NULL; | 1880 jbr->thread_id = NULL; |
1874 } | 1881 } |
1875 if(jbr->chat_states == JABBER_CHAT_STATES_SUPPORTED) | 1882 if(jbr->chat_states == JABBER_CHAT_STATES_SUPPORTED) |
1876 jabber_message_conv_closed(js, who); | 1883 jabber_message_conv_closed(js, who); |
1877 } | 1884 } |
1885 | |
1886 jabber_data_delete_associated_with_conv(conv); | |
1878 | 1887 |
1879 jabber_id_free(jid); | 1888 jabber_id_free(jid); |
1880 } | 1889 } |
1881 | 1890 |
1882 | 1891 |