comparison src/protocols/yahoo/yahoo.c @ 5638:0bdfa28c678e

[gaim-migrate @ 6047] We're slowly killing off multi.h. The proto_user_split and proto_user_opt have been replaced with GaimAccountOption and GaimAccountUserSplit structures, which of course have an API. The account dialog is being rewritten as well, and will soon allow you to add and modify accounts again. committer: Tailor Script <tailor@pidgin.im>
author Christian Hammond <chipx86@chipx86.com>
date Sun, 01 Jun 2003 17:40:20 +0000
parents 011a0a975060
children 46d7ad0dfa26
comparison
equal deleted inserted replaced
5637:69c92ae58876 5638:0bdfa28c678e
40 #include <stdio.h> 40 #include <stdio.h>
41 #include <time.h> 41 #include <time.h>
42 #include <sys/stat.h> 42 #include <sys/stat.h>
43 #include <ctype.h> 43 #include <ctype.h>
44 #include "gaim.h" 44 #include "gaim.h"
45 #include "accountopt.h"
45 #include "multi.h" 46 #include "multi.h"
46 #include "prpl.h" 47 #include "prpl.h"
47 #include "proxy.h" 48 #include "proxy.h"
48 #include "md5.h" 49 #include "md5.h"
49 50
55 56
56 /* #define YAHOO_DEBUG */ 57 /* #define YAHOO_DEBUG */
57 58
58 #define USEROPT_MAIL 0 59 #define USEROPT_MAIL 0
59 60
60 #define USEROPT_PAGERHOST 3
61 #define YAHOO_PAGER_HOST "scs.yahoo.com" 61 #define YAHOO_PAGER_HOST "scs.yahoo.com"
62 #define USEROPT_PAGERPORT 4
63 #define YAHOO_PAGER_PORT 5050 62 #define YAHOO_PAGER_PORT 5050
64 63
65 #define YAHOO_PROTO_VER 0x0900 64 #define YAHOO_PROTO_VER 0x0900
66 65
67 enum yahoo_service { /* these are easier to see in hex */ 66 enum yahoo_service { /* these are easier to see in hex */
1428 1427
1429 puo = g_new0(struct proto_user_opt, 1); 1428 puo = g_new0(struct proto_user_opt, 1);
1430 puo->label = g_strdup(_("Pager Host:")); 1429 puo->label = g_strdup(_("Pager Host:"));
1431 puo->def = g_strdup(YAHOO_PAGER_HOST); 1430 puo->def = g_strdup(YAHOO_PAGER_HOST);
1432 puo->pos = USEROPT_PAGERHOST; 1431 puo->pos = USEROPT_PAGERHOST;
1433 ret->user_opts = g_list_append(ret->user_opts, puo); 1432 ret->protocol_options = g_list_append(ret->protocol_options, puo);
1434 1433
1435 puo = g_new0(struct proto_user_opt, 1); 1434 puo = g_new0(struct proto_user_opt, 1);
1436 puo->label = g_strdup(_("Pager Port:")); 1435 puo->label = g_strdup(_("Pager Port:"));
1437 puo->def = g_strdup("5050"); 1436 puo->def = g_strdup("5050");
1438 puo->pos = USEROPT_PAGERPORT; 1437 puo->pos = USEROPT_PAGERPORT;
1439 ret->user_opts = g_list_append(ret->user_opts, puo); 1438 ret->protocol_options = g_list_append(ret->protocol_options, puo);
1440 1439
1441 my_protocol = ret; 1440 my_protocol = ret;
1442 } 1441 }
1443 1442
1444 #ifndef STATIC 1443 #ifndef STATIC
1534 }; 1533 };
1535 1534
1536 static void 1535 static void
1537 __init_plugin(GaimPlugin *plugin) 1536 __init_plugin(GaimPlugin *plugin)
1538 { 1537 {
1539 struct proto_user_opt *puo; 1538 GaimAccountOption *option;
1540 1539
1541 puo = g_new0(struct proto_user_opt, 1); 1540 option = gaim_account_option_string_new(_("Pager Host"), "server",
1542 puo->label = g_strdup("Pager Host:"); 1541 YAHOO_PAGER_HOST);
1543 puo->def = g_strdup(YAHOO_PAGER_HOST); 1542 prpl_info.protocol_options = g_list_append(prpl_info.protocol_options,
1544 puo->pos = USEROPT_PAGERHOST; 1543 option);
1545 prpl_info.user_opts = g_list_append(prpl_info.user_opts, puo); 1544
1546 1545 option = gaim_account_option_int_new(_("Pager Port"), "port",
1547 puo = g_new0(struct proto_user_opt, 1); 1546 YAHOO_PAGER_PORT);
1548 puo->label = g_strdup("Pager Port:"); 1547 prpl_info.protocol_options = g_list_append(prpl_info.protocol_options,
1549 puo->def = g_strdup("5050"); 1548 option);
1550 puo->pos = USEROPT_PAGERPORT;
1551 prpl_info.user_opts = g_list_append(prpl_info.user_opts, puo);
1552 1549
1553 my_protocol = plugin; 1550 my_protocol = plugin;
1554 } 1551 }
1555 1552
1556 GAIM_INIT_PLUGIN(yahoo, __init_plugin, info); 1553 GAIM_INIT_PLUGIN(yahoo, __init_plugin, info);