| 168 char name[128]; |
168 char name[128]; |
| 169 char *password; |
169 char *password; |
| 170 GMainLoop *loop = g_main_loop_new(NULL, FALSE); |
170 GMainLoop *loop = g_main_loop_new(NULL, FALSE); |
| 171 PurpleAccount *account; |
171 PurpleAccount *account; |
| 172 PurpleSavedStatus *status; |
172 PurpleSavedStatus *status; |
| |
173 PurpleProtocolManager *protocol_manager = NULL; |
| 173 char *res; |
174 char *res; |
| 174 |
175 |
| 175 #ifndef _WIN32 |
176 #ifndef _WIN32 |
| 176 /* libpurple's built-in DNS resolution forks processes to perform |
177 /* libpurple's built-in DNS resolution forks processes to perform |
| 177 * blocking lookups without blocking the main process. It does not |
178 * blocking lookups without blocking the main process. It does not |
| 183 |
184 |
| 184 init_libpurple(); |
185 init_libpurple(); |
| 185 |
186 |
| 186 printf("libpurple initialized.\n"); |
187 printf("libpurple initialized.\n"); |
| 187 |
188 |
| 188 list = purple_protocols_get_all(); |
189 protocol_manager = purple_protocol_manager_get_default(); |
| |
190 list = purple_protocol_manager_get_all(protocol_manager); |
| 189 for (i = 0, iter = list; iter; iter = iter->next) { |
191 for (i = 0, iter = list; iter; iter = iter->next) { |
| 190 PurpleProtocol *protocol = iter->data; |
192 PurpleProtocol *protocol = iter->data; |
| 191 if (protocol && purple_protocol_get_name(protocol)) { |
193 if (protocol && purple_protocol_get_name(protocol)) { |
| 192 printf("\t%d: %s\n", i++, purple_protocol_get_name(protocol)); |
194 printf("\t%d: %s\n", i++, purple_protocol_get_name(protocol)); |
| 193 names = g_list_append(names, (gpointer)purple_protocol_get_id(protocol)); |
195 names = g_list_append(names, (gpointer)purple_protocol_get_id(protocol)); |