Mercurial > pidgin
annotate plugins/gevolution/gevolution.c @ 11054:bc700cc98b82
[gaim-migrate @ 12992]
Patch #1218079 from Stanislav Brabec
"Attached patch adds basic support for Novell Groupwise to Gaim Evolution integration."
committer: Tailor Script <tailor@pidgin.im>
author | Richard Laager <rlaager@wiktel.com> |
---|---|
date | Sun, 03 Jul 2005 06:42:16 +0000 |
parents | 50224ac8184d |
children | 5a8bc4b1f5b6 |
rev | line source |
---|---|
8089 | 1 /* |
2 * Evolution integration plugin for Gaim | |
3 * | |
4 * Copyright (C) 2003 Christian Hammond. | |
5 * | |
6 * This program is free software; you can redistribute it and/or | |
7 * modify it under the terms of the GNU General Public License as | |
8 * published by the Free Software Foundation; either version 2 of the | |
9 * License, or (at your option) any later version. | |
10 * | |
11 * This program is distributed in the hope that it will be useful, but | |
12 * WITHOUT ANY WARRANTY; without even the implied warranty of | |
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
14 * General Public License for more details. | |
15 * | |
16 * You should have received a copy of the GNU General Public License | |
17 * along with this program; if not, write to the Free Software | |
18 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA | |
19 * 02111-1307, USA. | |
20 */ | |
21 #include "internal.h" | |
9821 | 22 #include "gtkgaim.h" |
8089 | 23 |
24 #include "connection.h" | |
25 #include "debug.h" | |
26 #include "prefs.h" | |
27 #include "signals.h" | |
10831 | 28 #include "util.h" |
9954 | 29 #include "version.h" |
8089 | 30 |
9821 | 31 #include "gtkblist.h" |
8089 | 32 #include "gtkconv.h" |
33 #include "gtkplugin.h" | |
34 #include "gtkutils.h" | |
35 | |
36 #include "gevolution.h" | |
37 | |
38 #include <libedata-book/Evolution-DataServer-Addressbook.h> | |
39 | |
40 #include <libebook/e-book-listener.h> | |
41 #include <libedata-book/e-data-book-factory.h> | |
42 #include <bonobo/bonobo-main.h> | |
43 | |
44 #define GEVOLUTION_PLUGIN_ID "gtk-x11-gevolution" | |
45 | |
46 #define E_DATA_BOOK_FACTORY_OAF_ID \ | |
47 "OAFIID:GNOME_Evolution_DataServer_BookFactory" | |
48 | |
49 enum | |
50 { | |
51 COLUMN_AUTOADD, | |
52 COLUMN_ICON, | |
53 COLUMN_SCREENNAME, | |
54 COLUMN_DATA, | |
55 NUM_COLUMNS | |
56 }; | |
57 | |
58 static GaimBlistUiOps *backup_blist_ui_ops = NULL; | |
59 static GaimBlistUiOps *blist_ui_ops = NULL; | |
60 static EBook *book = NULL; | |
61 static gulong timer = 0; | |
62 static gulong book_view_tag = 0; | |
63 static EBookView *book_view = NULL; | |
64 | |
65 static void | |
66 update_ims_from_contact(EContact *contact, const char *name, | |
67 const char *prpl_id, EContactField field) | |
68 { | |
69 GList *ims = e_contact_get(contact, field); | |
70 GList *l, *l2; | |
71 | |
72 if (ims == NULL) | |
73 return; | |
74 | |
75 for (l = gaim_connections_get_all(); l != NULL; l = l->next) | |
76 { | |
77 GaimConnection *gc = (GaimConnection *)l->data; | |
78 GaimAccount *account = gaim_connection_get_account(gc); | |
10831 | 79 char *me = g_strdup(gaim_normalize(account, gaim_account_get_username(account))); |
8089 | 80 |
81 if (strcmp(gaim_account_get_protocol_id(account), prpl_id)) | |
82 continue; | |
83 | |
84 if (!gaim_account_get_bool(account, "gevo-autoadd", FALSE)) | |
85 continue; | |
86 | |
87 for (l2 = ims; l2 != NULL; l2 = l2->next) | |
88 { | |
10831 | 89 if (gaim_find_buddy(account, l2->data) != NULL || |
90 !strcmp(me, gaim_normalize(account, l2->data))) | |
8089 | 91 continue; |
92 | |
93 gevo_add_buddy(account, _("Buddies"), l2->data, name); | |
94 } | |
10831 | 95 g_free(me); |
8089 | 96 } |
97 | |
98 g_list_foreach(ims, (GFunc)g_free, NULL); | |
99 g_list_free(ims); | |
100 } | |
101 | |
102 static void | |
103 update_buddies_from_contact(EContact *contact) | |
104 { | |
105 const char *name; | |
106 | |
107 name = e_contact_get_const(contact, E_CONTACT_FULL_NAME); | |
108 | |
109 update_ims_from_contact(contact, name, "prpl-oscar", E_CONTACT_IM_AIM); | |
110 update_ims_from_contact(contact, name, "prpl-jabber", E_CONTACT_IM_JABBER); | |
111 update_ims_from_contact(contact, name, "prpl-yahoo", E_CONTACT_IM_YAHOO); | |
112 update_ims_from_contact(contact, name, "prpl-msn", E_CONTACT_IM_MSN); | |
113 update_ims_from_contact(contact, name, "prpl-oscar", E_CONTACT_IM_ICQ); | |
11054
bc700cc98b82
[gaim-migrate @ 12992]
Richard Laager <rlaager@wiktel.com>
parents:
11033
diff
changeset
|
114 update_ims_from_contact(contact, name, "prpl-novell", E_CONTACT_IM_GROUPWISE); |
8089 | 115 } |
116 | |
117 static void | |
118 contacts_changed_cb(EBookView *book_view, const GList *contacts) | |
119 { | |
120 const GList *l; | |
121 | |
122 if (gaim_connections_get_all() == NULL) | |
123 return; | |
124 | |
125 for (l = contacts; l != NULL; l = l->next) | |
126 { | |
127 EContact *contact = (EContact *)l->data; | |
128 | |
129 update_buddies_from_contact(contact); | |
130 } | |
131 } | |
132 | |
133 static void | |
134 request_add_buddy(GaimAccount *account, const char *username, | |
135 const char *group, const char *alias) | |
136 { | |
137 if (book == NULL) | |
138 { | |
139 backup_blist_ui_ops->request_add_buddy(account, username, group, | |
140 alias); | |
141 } | |
142 else | |
143 { | |
144 gevo_add_buddy_dialog_show(account, username, group, alias); | |
145 } | |
146 } | |
147 | |
148 static void | |
149 got_book_view_cb(EBook *book, EBookStatus status, EBookView *view, | |
150 gpointer user_data) | |
151 { | |
152 book_view_tag = 0; | |
153 | |
154 if (status != E_BOOK_ERROR_OK) | |
155 { | |
156 gaim_debug_error("evolution", "Unable to retrieve book view! :(\n"); | |
157 | |
158 return; | |
159 } | |
160 | |
161 book_view = view; | |
162 | |
163 g_object_ref(book_view); | |
164 | |
165 g_signal_connect(G_OBJECT(book_view), "contacts_changed", | |
166 G_CALLBACK(contacts_changed_cb), book); | |
167 | |
168 g_signal_connect(G_OBJECT(book_view), "contacts_added", | |
169 G_CALLBACK(contacts_changed_cb), book); | |
170 | |
171 e_book_view_start(view); | |
172 } | |
173 | |
174 static void | |
175 signed_on_cb(GaimConnection *gc) | |
176 { | |
177 EBookQuery *query; | |
178 gboolean status; | |
179 GList *contacts; | |
180 GList *l; | |
181 | |
182 if (book == NULL) | |
183 return; | |
184 | |
185 query = e_book_query_any_field_contains(""); | |
186 | |
187 status = e_book_get_contacts(book, query, &contacts, NULL); | |
188 | |
189 e_book_query_unref(query); | |
190 | |
191 if (!status) | |
192 return; | |
193 | |
194 for (l = contacts; l != NULL; l = l->next) | |
195 { | |
196 EContact *contact = E_CONTACT(l->data); | |
197 | |
198 update_buddies_from_contact(contact); | |
199 | |
200 g_object_unref(contact); | |
201 } | |
202 | |
203 g_list_free(contacts); | |
204 } | |
205 | |
206 static void | |
9055
a243d688c93c
[gaim-migrate @ 9831]
Christian Hammond <chipx86@chipx86.com>
parents:
9051
diff
changeset
|
207 menu_item_activate_cb(GaimBlistNode *node, gpointer user_data) |
8089 | 208 { |
9051 | 209 GaimBuddy *buddy = (GaimBuddy *)node; |
8089 | 210 gevo_associate_buddy_dialog_new(buddy); |
211 } | |
212 | |
213 static void | |
9051 | 214 blist_node_extended_menu_cb(GaimBlistNode *node, GList **menu) |
8089 | 215 { |
9051 | 216 GaimBlistNodeAction *act; |
217 GaimBuddy *buddy; | |
8089 | 218 |
9051 | 219 if (!GAIM_BLIST_NODE_IS_BUDDY(node)) |
220 return; | |
221 | |
222 buddy = (GaimBuddy *)node; | |
223 | |
8089 | 224 if (gevo_prpl_is_supported(buddy->account, buddy)) |
225 { | |
9051 | 226 act = gaim_blist_node_action_new(_("Add to Address Book"), |
10662
54ac161a876e
[gaim-migrate @ 12199]
Etan Reisner <pidgin@unreliablesource.net>
parents:
10081
diff
changeset
|
227 menu_item_activate_cb, |
54ac161a876e
[gaim-migrate @ 12199]
Etan Reisner <pidgin@unreliablesource.net>
parents:
10081
diff
changeset
|
228 NULL, NULL); |
9051 | 229 *menu = g_list_append(*menu, act); |
8089 | 230 } |
231 } | |
232 | |
233 static gboolean | |
234 load_timeout(gpointer data) | |
235 { | |
236 GaimPlugin *plugin = (GaimPlugin *)data; | |
8127
96ee7b21c1ae
[gaim-migrate @ 8832]
Christian Hammond <chipx86@chipx86.com>
parents:
8089
diff
changeset
|
237 EBookQuery *query; |
8089 | 238 |
239 timer = 0; | |
240 | |
10081
ff4be2d1401d
[gaim-migrate @ 11071]
Christian Hammond <chipx86@chipx86.com>
parents:
10055
diff
changeset
|
241 if (!gevo_load_addressbook(NULL, &book, NULL)) |
8089 | 242 return FALSE; |
243 | |
8127
96ee7b21c1ae
[gaim-migrate @ 8832]
Christian Hammond <chipx86@chipx86.com>
parents:
8089
diff
changeset
|
244 query = e_book_query_any_field_contains(""); |
96ee7b21c1ae
[gaim-migrate @ 8832]
Christian Hammond <chipx86@chipx86.com>
parents:
8089
diff
changeset
|
245 |
96ee7b21c1ae
[gaim-migrate @ 8832]
Christian Hammond <chipx86@chipx86.com>
parents:
8089
diff
changeset
|
246 book_view_tag = e_book_async_get_book_view(book, query, NULL, -1, |
96ee7b21c1ae
[gaim-migrate @ 8832]
Christian Hammond <chipx86@chipx86.com>
parents:
8089
diff
changeset
|
247 got_book_view_cb, NULL); |
96ee7b21c1ae
[gaim-migrate @ 8832]
Christian Hammond <chipx86@chipx86.com>
parents:
8089
diff
changeset
|
248 |
96ee7b21c1ae
[gaim-migrate @ 8832]
Christian Hammond <chipx86@chipx86.com>
parents:
8089
diff
changeset
|
249 e_book_query_unref(query); |
8089 | 250 |
9051 | 251 gaim_signal_connect(gaim_blist_get_handle(), "blist-node-extended-menu", |
252 plugin, GAIM_CALLBACK(blist_node_extended_menu_cb), NULL); | |
8089 | 253 |
254 return FALSE; | |
255 } | |
256 | |
257 static gboolean | |
258 plugin_load(GaimPlugin *plugin) | |
259 { | |
11033
50224ac8184d
[gaim-migrate @ 12919]
Etan Reisner <pidgin@unreliablesource.net>
parents:
10884
diff
changeset
|
260 gaim_debug_register_category("evolution"); |
50224ac8184d
[gaim-migrate @ 12919]
Etan Reisner <pidgin@unreliablesource.net>
parents:
10884
diff
changeset
|
261 |
8089 | 262 bonobo_activate(); |
263 | |
264 backup_blist_ui_ops = gaim_blist_get_ui_ops(); | |
265 | |
266 blist_ui_ops = g_memdup(backup_blist_ui_ops, sizeof(GaimBlistUiOps)); | |
267 blist_ui_ops->request_add_buddy = request_add_buddy; | |
268 | |
269 gaim_blist_set_ui_ops(blist_ui_ops); | |
270 | |
271 gaim_signal_connect(gaim_connections_get_handle(), "signed-on", | |
272 plugin, GAIM_CALLBACK(signed_on_cb), NULL); | |
273 | |
274 timer = g_timeout_add(1, load_timeout, plugin); | |
275 | |
276 return TRUE; | |
277 } | |
278 | |
279 static gboolean | |
280 plugin_unload(GaimPlugin *plugin) | |
281 { | |
282 gaim_blist_set_ui_ops(backup_blist_ui_ops); | |
283 | |
284 g_free(blist_ui_ops); | |
285 | |
286 backup_blist_ui_ops = NULL; | |
287 blist_ui_ops = NULL; | |
288 | |
289 if (book_view != NULL) | |
290 { | |
291 e_book_view_stop(book_view); | |
292 g_object_unref(book_view); | |
293 book_view = NULL; | |
294 } | |
295 | |
296 if (book != NULL) | |
297 { | |
298 g_object_unref(book); | |
299 book = NULL; | |
300 } | |
301 | |
11033
50224ac8184d
[gaim-migrate @ 12919]
Etan Reisner <pidgin@unreliablesource.net>
parents:
10884
diff
changeset
|
302 gaim_debug_unregister_category("evolution"); |
50224ac8184d
[gaim-migrate @ 12919]
Etan Reisner <pidgin@unreliablesource.net>
parents:
10884
diff
changeset
|
303 |
8089 | 304 return TRUE; |
305 } | |
306 | |
307 static void | |
308 plugin_destroy(GaimPlugin *plugin) | |
309 { | |
10055
0436734708fa
[gaim-migrate @ 11020]
Christian Hammond <chipx86@chipx86.com>
parents:
9954
diff
changeset
|
310 bonobo_debug_shutdown(); |
8089 | 311 } |
312 | |
313 static void | |
314 autoadd_toggled_cb(GtkCellRendererToggle *renderer, gchar *path_str, | |
315 gpointer data) | |
316 { | |
317 GaimAccount *account; | |
318 GtkTreeModel *model = (GtkTreeModel *)data; | |
319 GtkTreeIter iter; | |
320 gboolean autoadd; | |
321 | |
322 gtk_tree_model_get_iter_from_string(model, &iter, path_str); | |
323 gtk_tree_model_get(model, &iter, | |
324 COLUMN_DATA, &account, | |
325 COLUMN_AUTOADD, &autoadd, | |
326 -1); | |
327 | |
328 gaim_account_set_bool(account, "gevo-autoadd", !autoadd); | |
329 | |
330 gtk_list_store_set(GTK_LIST_STORE(model), &iter, | |
331 COLUMN_AUTOADD, !autoadd, | |
332 -1); | |
333 } | |
334 | |
335 static GtkWidget * | |
336 get_config_frame(GaimPlugin *plugin) | |
337 { | |
338 GtkWidget *ret; | |
339 GtkWidget *vbox; | |
340 GtkWidget *label; | |
341 GtkWidget *sw; | |
342 GtkWidget *treeview; | |
343 GtkTreeViewColumn *column; | |
344 GtkCellRenderer *renderer; | |
345 GdkPixbuf *pixbuf, *scale = NULL; | |
346 GtkListStore *model; | |
347 GList *l; | |
348 | |
349 /* Outside container */ | |
350 ret = gtk_vbox_new(FALSE, 18); | |
351 gtk_container_set_border_width(GTK_CONTAINER(ret), 12); | |
352 | |
353 /* Configuration frame */ | |
354 vbox = gaim_gtk_make_frame(ret, _("Evolution Integration Configuration")); | |
355 | |
356 /* Label */ | |
357 label = gtk_label_new(_("Select all accounts that buddies should be " | |
358 "auto-added to.")); | |
359 gtk_misc_set_alignment(GTK_MISC(label), 0, 0.5); | |
360 gtk_box_pack_start(GTK_BOX(vbox), label, FALSE, FALSE, 0); | |
361 gtk_widget_show(label); | |
362 | |
363 /* Scrolled window */ | |
364 sw = gtk_scrolled_window_new(0, 0); | |
365 gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(sw), | |
366 GTK_POLICY_AUTOMATIC, | |
367 GTK_POLICY_ALWAYS); | |
368 gtk_scrolled_window_set_shadow_type(GTK_SCROLLED_WINDOW(sw), | |
369 GTK_SHADOW_IN); | |
370 gtk_box_pack_start(GTK_BOX(vbox), sw, TRUE, TRUE, 0); | |
371 gtk_widget_set_size_request(sw, 300, 300); | |
372 gtk_widget_show(sw); | |
373 | |
374 /* Create the list model for the treeview. */ | |
375 model = gtk_list_store_new(NUM_COLUMNS, | |
376 G_TYPE_BOOLEAN, GDK_TYPE_PIXBUF, | |
377 G_TYPE_STRING, G_TYPE_POINTER); | |
378 | |
379 /* Setup the treeview */ | |
380 treeview = gtk_tree_view_new_with_model(GTK_TREE_MODEL(model)); | |
381 gtk_tree_view_set_rules_hint(GTK_TREE_VIEW(treeview), TRUE); | |
382 gtk_container_add(GTK_CONTAINER(sw), treeview); | |
383 gtk_widget_show(treeview); | |
384 | |
385 /* Setup the column */ | |
386 column = gtk_tree_view_column_new(); | |
387 gtk_tree_view_column_set_title(column, _("Account")); | |
388 gtk_tree_view_insert_column(GTK_TREE_VIEW(treeview), column, -1); | |
389 | |
390 /* Checkbox */ | |
391 renderer = gtk_cell_renderer_toggle_new(); | |
392 | |
393 g_signal_connect(G_OBJECT(renderer), "toggled", | |
394 G_CALLBACK(autoadd_toggled_cb), model); | |
395 | |
396 gtk_tree_view_column_pack_start(column, renderer, FALSE); | |
397 gtk_tree_view_column_add_attribute(column, renderer, | |
398 "active", COLUMN_AUTOADD); | |
399 | |
400 /* Icon */ | |
401 renderer = gtk_cell_renderer_pixbuf_new(); | |
402 gtk_tree_view_column_pack_start(column, renderer, FALSE); | |
403 gtk_tree_view_column_add_attribute(column, renderer, | |
404 "pixbuf", COLUMN_ICON); | |
405 | |
406 /* Screenname */ | |
407 renderer = gtk_cell_renderer_text_new(); | |
408 gtk_tree_view_column_pack_start(column, renderer, TRUE); | |
409 gtk_tree_view_column_add_attribute(column, renderer, | |
410 "text", COLUMN_SCREENNAME); | |
411 | |
412 | |
413 /* Populate */ | |
414 for (l = gaim_accounts_get_all(); l != NULL; l = l->next) | |
415 { | |
416 GaimAccount *account = (GaimAccount *)l->data; | |
417 GtkTreeIter iter; | |
418 | |
419 gaim_debug_info("evolution", "Adding account\n"); | |
420 | |
421 gtk_list_store_append(model, &iter); | |
422 | |
10884 | 423 pixbuf = gaim_gtk_create_prpl_icon(account); |
8089 | 424 |
425 if (pixbuf != NULL) | |
426 { | |
427 scale = gdk_pixbuf_scale_simple(pixbuf, 16, 16, | |
428 GDK_INTERP_BILINEAR); | |
429 | |
430 if (!gaim_account_is_connected(account)) | |
431 gdk_pixbuf_saturate_and_pixelate(scale, scale, 0.0, FALSE); | |
432 } | |
433 | |
434 gtk_list_store_set(model, &iter, | |
435 COLUMN_AUTOADD, | |
436 gaim_account_get_bool(account, "gevo-autoadd", | |
437 FALSE), | |
438 COLUMN_ICON, scale, | |
439 COLUMN_SCREENNAME, | |
440 gaim_account_get_username(account), | |
441 COLUMN_DATA, account, | |
442 -1); | |
443 | |
444 if (pixbuf != NULL) g_object_unref(G_OBJECT(pixbuf)); | |
445 if (scale != NULL) g_object_unref(G_OBJECT(scale)); | |
446 } | |
447 | |
448 gtk_widget_show_all(ret); | |
449 | |
450 return ret; | |
451 } | |
452 | |
453 static GaimGtkPluginUiInfo ui_info = | |
454 { | |
455 get_config_frame | |
456 }; | |
457 | |
458 static GaimPluginInfo info = | |
459 { | |
9954 | 460 GAIM_PLUGIN_MAGIC, |
461 GAIM_MAJOR_VERSION, | |
462 GAIM_MINOR_VERSION, | |
8089 | 463 GAIM_PLUGIN_STANDARD, /**< type */ |
464 GAIM_GTK_PLUGIN_TYPE, /**< ui_requirement */ | |
465 0, /**< flags */ | |
466 NULL, /**< dependencies */ | |
467 GAIM_PRIORITY_DEFAULT, /**< priority */ | |
468 | |
469 GEVOLUTION_PLUGIN_ID, /**< id */ | |
470 N_("Evolution Integration"), /**< name */ | |
471 VERSION, /**< version */ | |
472 /** summary */ | |
473 N_("Provides integration with Ximian Evolution."), | |
474 /** description */ | |
475 N_("Provides integration with Ximian Evolution."), | |
476 "Christian Hammond <chipx86@gnupdate.org>", /**< author */ | |
477 GAIM_WEBSITE, /**< homepage */ | |
478 | |
479 plugin_load, /**< load */ | |
480 plugin_unload, /**< unload */ | |
481 plugin_destroy, /**< destroy */ | |
482 | |
483 &ui_info, /**< ui_info */ | |
8993 | 484 NULL, /**< extra_info */ |
485 NULL, | |
486 NULL | |
8089 | 487 }; |
488 | |
489 static void | |
490 init_plugin(GaimPlugin *plugin) | |
491 { | |
492 /* TODO: Change to core-remote when possible. */ | |
493 /* info.dependencies = g_list_append(info.dependencies, "gtk-remote"); */ | |
494 | |
495 /* | |
496 * I'm going to rant a little bit here... | |
497 * | |
498 * For some reason, when we init bonobo from inside a plugin, it will | |
499 * segfault when destroyed. The backtraces are within gmodule somewhere. | |
500 * There's not much I can do, and I'm not sure where the bug lies. | |
501 * However, plugins are only destroyed when Gaim is shutting down. After | |
502 * destroying the plugins, gaim ends, and anything else is of course | |
503 * freed. That includes this, if we make the module resident, which | |
504 * prevents us from being able to actually unload it. | |
505 * | |
506 * So, in conclusion, this is an evil hack, but it doesn't harm anything | |
507 * and it works. | |
508 */ | |
509 g_module_make_resident(plugin->handle); | |
10055
0436734708fa
[gaim-migrate @ 11020]
Christian Hammond <chipx86@chipx86.com>
parents:
9954
diff
changeset
|
510 |
0436734708fa
[gaim-migrate @ 11020]
Christian Hammond <chipx86@chipx86.com>
parents:
9954
diff
changeset
|
511 if (!bonobo_init_full(NULL, NULL, bonobo_activation_orb_get(), |
0436734708fa
[gaim-migrate @ 11020]
Christian Hammond <chipx86@chipx86.com>
parents:
9954
diff
changeset
|
512 CORBA_OBJECT_NIL, CORBA_OBJECT_NIL)) |
0436734708fa
[gaim-migrate @ 11020]
Christian Hammond <chipx86@chipx86.com>
parents:
9954
diff
changeset
|
513 { |
0436734708fa
[gaim-migrate @ 11020]
Christian Hammond <chipx86@chipx86.com>
parents:
9954
diff
changeset
|
514 gaim_debug_error("evolution", "Unable to initialize bonobo.\n"); |
0436734708fa
[gaim-migrate @ 11020]
Christian Hammond <chipx86@chipx86.com>
parents:
9954
diff
changeset
|
515 } |
8089 | 516 } |
517 | |
518 GAIM_INIT_PLUGIN(gevolution, init_plugin, info) |