Mercurial > pidgin.yaz
comparison libpurple/protocols/gg/confer.c @ 15823:32c366eeeb99
sed -ie 's/gaim/purple/g'
author | Sean Egan <seanegan@gmail.com> |
---|---|
date | Mon, 19 Mar 2007 07:01:17 +0000 |
parents | 5fe8042783c1 |
children | 44b4e8bd759b |
comparison
equal
deleted
inserted
replaced
15822:84b0f9b23ede | 15823:32c366eeeb99 |
---|---|
1 /** | 1 /** |
2 * @file confer.c | 2 * @file confer.c |
3 * | 3 * |
4 * gaim | 4 * purple |
5 * | 5 * |
6 * Copyright (C) 2005 Bartosz Oler <bartosz@bzimage.us> | 6 * Copyright (C) 2005 Bartosz Oler <bartosz@bzimage.us> |
7 * | 7 * |
8 * This program is free software; you can redistribute it and/or modify | 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 | 9 * it under the terms of the GNU General Public License as published by |
24 #include <libgadu.h> | 24 #include <libgadu.h> |
25 #include "gg.h" | 25 #include "gg.h" |
26 #include "gg-utils.h" | 26 #include "gg-utils.h" |
27 #include "confer.h" | 27 #include "confer.h" |
28 | 28 |
29 /* GaimConversation *ggp_confer_find_by_name(GaimConnection *gc, const gchar *name) {{{ */ | 29 /* PurpleConversation *ggp_confer_find_by_name(PurpleConnection *gc, const gchar *name) {{{ */ |
30 GaimConversation *ggp_confer_find_by_name(GaimConnection *gc, const gchar *name) | 30 PurpleConversation *ggp_confer_find_by_name(PurpleConnection *gc, const gchar *name) |
31 { | 31 { |
32 g_return_val_if_fail(gc != NULL, NULL); | 32 g_return_val_if_fail(gc != NULL, NULL); |
33 g_return_val_if_fail(name != NULL, NULL); | 33 g_return_val_if_fail(name != NULL, NULL); |
34 | 34 |
35 return gaim_find_conversation_with_account(GAIM_CONV_TYPE_CHAT, name, | 35 return purple_find_conversation_with_account(PURPLE_CONV_TYPE_CHAT, name, |
36 gaim_connection_get_account(gc)); | 36 purple_connection_get_account(gc)); |
37 } | 37 } |
38 /* }}} */ | 38 /* }}} */ |
39 | 39 |
40 /* void ggp_confer_participants_add_uin(GaimConnection *gc, const gchar *chat_name, const uin_t uin) {{{ */ | 40 /* void ggp_confer_participants_add_uin(PurpleConnection *gc, const gchar *chat_name, const uin_t uin) {{{ */ |
41 void ggp_confer_participants_add_uin(GaimConnection *gc, const gchar *chat_name, | 41 void ggp_confer_participants_add_uin(PurpleConnection *gc, const gchar *chat_name, |
42 const uin_t uin) | 42 const uin_t uin) |
43 { | 43 { |
44 GaimConversation *conv; | 44 PurpleConversation *conv; |
45 GGPInfo *info = gc->proto_data; | 45 GGPInfo *info = gc->proto_data; |
46 GGPChat *chat; | 46 GGPChat *chat; |
47 GList *l; | 47 GList *l; |
48 gchar *str_uin; | 48 gchar *str_uin; |
49 | 49 |
57 chat->participants = g_list_append( | 57 chat->participants = g_list_append( |
58 chat->participants, GINT_TO_POINTER(uin)); | 58 chat->participants, GINT_TO_POINTER(uin)); |
59 | 59 |
60 str_uin = g_strdup_printf("%lu", (unsigned long int)uin); | 60 str_uin = g_strdup_printf("%lu", (unsigned long int)uin); |
61 conv = ggp_confer_find_by_name(gc, chat_name); | 61 conv = ggp_confer_find_by_name(gc, chat_name); |
62 gaim_conv_chat_add_user(GAIM_CONV_CHAT(conv), str_uin, NULL, | 62 purple_conv_chat_add_user(PURPLE_CONV_CHAT(conv), str_uin, NULL, |
63 GAIM_CBFLAGS_NONE, TRUE); | 63 PURPLE_CBFLAGS_NONE, TRUE); |
64 | 64 |
65 g_free(str_uin); | 65 g_free(str_uin); |
66 } | 66 } |
67 break; | 67 break; |
68 } | 68 } |
69 } | 69 } |
70 /* }}} */ | 70 /* }}} */ |
71 | 71 |
72 /* void ggp_confer_participants_add(GaimConnection *gc, const gchar *chat_name, const uin_t *recipients, int count) {{{ */ | 72 /* void ggp_confer_participants_add(PurpleConnection *gc, const gchar *chat_name, const uin_t *recipients, int count) {{{ */ |
73 void ggp_confer_participants_add(GaimConnection *gc, const gchar *chat_name, | 73 void ggp_confer_participants_add(PurpleConnection *gc, const gchar *chat_name, |
74 const uin_t *recipients, int count) | 74 const uin_t *recipients, int count) |
75 { | 75 { |
76 GGPInfo *info = gc->proto_data; | 76 GGPInfo *info = gc->proto_data; |
77 GList *l; | 77 GList *l; |
78 gchar *str_uin; | 78 gchar *str_uin; |
83 | 83 |
84 if (g_utf8_collate(chat->name, chat_name) != 0) | 84 if (g_utf8_collate(chat->name, chat_name) != 0) |
85 continue; | 85 continue; |
86 | 86 |
87 for (i = 0; i < count; i++) { | 87 for (i = 0; i < count; i++) { |
88 GaimConversation *conv; | 88 PurpleConversation *conv; |
89 | 89 |
90 if (g_list_find(chat->participants, | 90 if (g_list_find(chat->participants, |
91 GINT_TO_POINTER(recipients[i])) != NULL) { | 91 GINT_TO_POINTER(recipients[i])) != NULL) { |
92 continue; | 92 continue; |
93 } | 93 } |
95 chat->participants = g_list_append(chat->participants, | 95 chat->participants = g_list_append(chat->participants, |
96 GINT_TO_POINTER(recipients[i])); | 96 GINT_TO_POINTER(recipients[i])); |
97 | 97 |
98 str_uin = g_strdup_printf("%lu", (unsigned long int)recipients[i]); | 98 str_uin = g_strdup_printf("%lu", (unsigned long int)recipients[i]); |
99 conv = ggp_confer_find_by_name(gc, chat_name); | 99 conv = ggp_confer_find_by_name(gc, chat_name); |
100 gaim_conv_chat_add_user(GAIM_CONV_CHAT(conv), | 100 purple_conv_chat_add_user(PURPLE_CONV_CHAT(conv), |
101 str_uin, NULL, | 101 str_uin, NULL, |
102 GAIM_CBFLAGS_NONE, TRUE); | 102 PURPLE_CBFLAGS_NONE, TRUE); |
103 g_free(str_uin); | 103 g_free(str_uin); |
104 } | 104 } |
105 break; | 105 break; |
106 } | 106 } |
107 } | 107 } |
108 /* }}} */ | 108 /* }}} */ |
109 | 109 |
110 /* const char *ggp_confer_find_by_participants(GaimConnection *gc, const uin_t *recipients, int count) {{{ */ | 110 /* const char *ggp_confer_find_by_participants(PurpleConnection *gc, const uin_t *recipients, int count) {{{ */ |
111 const char *ggp_confer_find_by_participants(GaimConnection *gc, | 111 const char *ggp_confer_find_by_participants(PurpleConnection *gc, |
112 const uin_t *recipients, int count) | 112 const uin_t *recipients, int count) |
113 { | 113 { |
114 GGPInfo *info = gc->proto_data; | 114 GGPInfo *info = gc->proto_data; |
115 GGPChat *chat = NULL; | 115 GGPChat *chat = NULL; |
116 GList *l; | 116 GList *l; |
144 else | 144 else |
145 return chat->name; | 145 return chat->name; |
146 } | 146 } |
147 /* }}} */ | 147 /* }}} */ |
148 | 148 |
149 /* const char *ggp_confer_add_new(GaimConnection *gc, const char *name) {{{ */ | 149 /* const char *ggp_confer_add_new(PurpleConnection *gc, const char *name) {{{ */ |
150 const char *ggp_confer_add_new(GaimConnection *gc, const char *name) | 150 const char *ggp_confer_add_new(PurpleConnection *gc, const char *name) |
151 { | 151 { |
152 GGPInfo *info = gc->proto_data; | 152 GGPInfo *info = gc->proto_data; |
153 GGPChat *chat; | 153 GGPChat *chat; |
154 | 154 |
155 chat = g_new0(GGPChat, 1); | 155 chat = g_new0(GGPChat, 1); |