comparison src/account.c @ 6485:70d5122bc3ff

[gaim-migrate @ 6999] Removed the old event system and replaced it with a much better signal system. There will most likely be some bugs in this, but it seems to be working for now. Plugins can now generate their own signals, and other plugins can find those plugins and connect to them. This could give plugins a form of IPC. It's also useful for other things. It's rather flexible, except for the damn marshalling, but there's no way around that that I or the glib people can see. committer: Tailor Script <tailor@pidgin.im>
author Christian Hammond <chipx86@chipx86.com>
date Mon, 18 Aug 2003 01:03:43 +0000
parents 41e6d15f4687
children 800ef4a51096
comparison
equal deleted inserted replaced
6484:5ced8e111473 6485:70d5122bc3ff
3 * @ingroup core 3 * @ingroup core
4 * 4 *
5 * gaim 5 * gaim
6 * 6 *
7 * Copyright (C) 2003 Christian Hammond <chipx86@gnupdate.org> 7 * Copyright (C) 2003 Christian Hammond <chipx86@gnupdate.org>
8 * 8 *
9 * This program is free software; you can redistribute it and/or modify 9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by 10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or 11 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version. 12 * (at your option) any later version.
13 * 13 *
23 #include "internal.h" 23 #include "internal.h"
24 #include "account.h" 24 #include "account.h"
25 #include "debug.h" 25 #include "debug.h"
26 #include "prefs.h" 26 #include "prefs.h"
27 #include "prpl.h" 27 #include "prpl.h"
28 #include "signals.h"
28 #include "server.h" 29 #include "server.h"
29 #include "util.h" 30 #include "util.h"
30 31
31 typedef enum 32 typedef enum
32 { 33 {
1411 1412
1412 g_free(who); 1413 g_free(who);
1413 1414
1414 return account; 1415 return account;
1415 } 1416 }
1417
1418 void *
1419 gaim_accounts_get_handle(void)
1420 {
1421 static int handle;
1422
1423 return &handle;
1424 }
1425
1426 void
1427 gaim_accounts_init(void)
1428 {
1429 void *handle = gaim_accounts_get_handle();
1430
1431 gaim_signal_register(handle, "account-connecting",
1432 gaim_marshal_VOID__POINTER);
1433
1434 gaim_signal_register(handle, "account-away",
1435 gaim_marshal_VOID__POINTER_POINTER_POINTER);
1436
1437 gaim_signal_register(handle, "account-setting-info",
1438 gaim_marshal_VOID__POINTER_POINTER);
1439 gaim_signal_register(handle, "account-set-info",
1440 gaim_marshal_VOID__POINTER_POINTER);
1441
1442 gaim_signal_register(handle, "account-warned",
1443 gaim_marshal_VOID__POINTER_POINTER_UINT);
1444 }
1445
1446 void
1447 gaim_accounts_uninit(void)
1448 {
1449 gaim_signals_unregister_by_instance(gaim_accounts_get_handle());
1450 }