comparison src/protocols/napster/napster.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 4fa8ca4f4259
children 0a0116686d51
comparison
equal deleted inserted replaced
5637:69c92ae58876 5638:0bdfa28c678e
37 #include <stdlib.h> 37 #include <stdlib.h>
38 #include <stdio.h> 38 #include <stdio.h>
39 #include <time.h> 39 #include <time.h>
40 #include <sys/stat.h> 40 #include <sys/stat.h>
41 #include "gaim.h" 41 #include "gaim.h"
42 #include "accountopt.h"
42 #include "multi.h" 43 #include "multi.h"
43 #include "prpl.h" 44 #include "prpl.h"
44 #include "proxy.h" 45 #include "proxy.h"
45 46
46 #ifdef _WIN32 47 #ifdef _WIN32
47 #include "win32dep.h" 48 #include "win32dep.h"
48 #endif 49 #endif
49 50
50 #define USEROPT_NAPSERVER 3
51 #define NAP_SERVER "64.124.41.187" 51 #define NAP_SERVER "64.124.41.187"
52 #define USEROPT_NAPPORT 4
53 #define NAP_PORT 8888 52 #define NAP_PORT 8888
54 53
55 #define NAPSTER_CONNECT_STEPS 2 54 #define NAPSTER_CONNECT_STEPS 2
56 55
57 GSList *nap_connections = NULL; 56 GSList *nap_connections = NULL;
648 &prpl_info /**< extra_info */ 647 &prpl_info /**< extra_info */
649 }; 648 };
650 649
651 static void __init_plugin(GaimPlugin *plugin) 650 static void __init_plugin(GaimPlugin *plugin)
652 { 651 {
653 struct proto_user_opt *puo; 652 GaimAccountOption *option;
654 653
655 puo = g_new0(struct proto_user_opt, 1); 654 option = gaim_account_option_string_new(_("Server"), "server",
656 puo->label = g_strdup(_("Server:")); 655 NAP_SERVER);
657 puo->def = g_strdup(NAP_SERVER); 656 prpl_info.protocol_options = g_list_append(prpl_info.protocol_options,
658 puo->pos = USEROPT_NAPSERVER; 657 option);
659 prpl_info.user_opts = g_list_append(prpl_info.user_opts, puo); 658
660 659 option = gaim_account_option_int_new(_("Port"), "port", 8888);
661 puo = g_new0(struct proto_user_opt, 1); 660 prpl_info.protocol_options = g_list_append(prpl_info.protocol_options,
662 puo->label = g_strdup(_("Port:")); 661 option);
663 puo->def = g_strdup("8888");
664 puo->pos = USEROPT_NAPPORT;
665 prpl_info.user_opts = g_list_append(prpl_info.user_opts, puo);
666 662
667 my_protocol = plugin; 663 my_protocol = plugin;
668 } 664 }
669 665
670 GAIM_INIT_PLUGIN(napster, __init_plugin, info); 666 GAIM_INIT_PLUGIN(napster, __init_plugin, info);