Mercurial > pidgin
comparison src/gaim-client-example.c @ 11277:421a8523ad04
[gaim-migrate @ 13467]
added support for lists and hash tables to libgaim-client
committer: Tailor Script <tailor@pidgin.im>
author | Piotr Zielinski <zielaj> |
---|---|
date | Tue, 16 Aug 2005 15:22:35 +0000 |
parents | 66f872f30e40 |
children | c9312177821a |
comparison
equal
deleted
inserted
replaced
11276:17ebda61c6ce | 11277:421a8523ad04 |
---|---|
20 */ | 20 */ |
21 | 21 |
22 int main (int argc, char **argv) | 22 int main (int argc, char **argv) |
23 { | 23 { |
24 GaimAccount *account; | 24 GaimAccount *account; |
25 GList *alist, *node; | |
26 | |
25 gaim_init(); | 27 gaim_init(); |
26 | 28 |
27 account = gaim_accounts_find_any("", ""); | 29 alist = gaim_accounts_get_all(); |
28 g_print("Alias: %s\n", gaim_account_get_alias(account)); | 30 for (node = alist; node; node = node->next) { |
31 GaimAccount *account = (GaimAccount*) node->data; | |
32 char *name = gaim_account_get_username(account); | |
33 g_print("Name: %s\n", name); | |
34 g_free(name); | |
35 } | |
36 | |
37 g_list_free(alist); | |
29 | 38 |
30 return 0; | 39 return 0; |
31 } | 40 } |