comparison src/protocols/zephyr/zephyr.c @ 5205:fefad67de2c7

[gaim-migrate @ 5573] I had a damn good commit message, but it was eaten. Let's try it again. Announcing, Gaim Plugin API version 2.0, or GPAPIV2.0 for short. There are lots'a cool thingies here. Okay now, this isn't as cool as the previous message, but: 1) There's now a single entry function for all plugin types. It returns a detailed information structure on the plugin. This removes a lot of the ugliness from old plugins. Oh yeah, libicq wasn't converted to this, so if you use it, well, you shouldn't have used it anyway, but now you can't! bwahahaha. Use AIM/ICQ. 2) There are now 3 types of plugins: Standard, Loader, and Protocol plugins. Standard plugins are, well, standard, compiled plugins. Loader plugins load other plugins. For example, the perl support is now a loader plugin. It loads perl scripts. In the future, we'll have Ruby and Python loader plugins. Protocol plugins are, well, protocol plugins... yeah... 3) Plugins have unique IDs, so they can be referred to or automatically updated from a plugin database in the future. Neat, huh? 4) Plugins will have dependency support in the future, and can be hidden, so if you have, say, a logging core plugin, it won't have to show up, but then you load the GTK+ logging plugin and it'll auto-load the core plugin. Core/UI split plugins! 5) There will eventually be custom plugin signals and RPC of some sort, for the core/ui split plugins. So, okay, back up .gaimrc. I'd like to thank my parents for their support, javabsp for helping convert a bunch of protocol plugins, and Etan for helping convert a bunch of standard plugins. Have fun. If you have any problems, please let me know, but you probably won't have anything major happen. You will have to convert your plugins, though, and I'm not guaranteeing that all perl scripts will still work. I'll end up changing the perl script API eventually, so I know they won't down the road. Don't worry, though. It'll be mass cool. faceprint wants me to just commit the damn code already. So, here we go!!! .. .. I need a massage. From a young, cute girl. Are there any young, cute girls in the audience? IM me plz k thx. committer: Tailor Script <tailor@pidgin.im>
author Christian Hammond <chipx86@chipx86.com>
date Fri, 25 Apr 2003 06:47:33 +0000
parents ccb0ab32ba01
children 890b29f00b68
comparison
equal deleted inserted replaced
5204:44de70702205 5205:fefad67de2c7
948 static const char *zephyr_list_icon(struct gaim_account *a, struct buddy *b) 948 static const char *zephyr_list_icon(struct gaim_account *a, struct buddy *b)
949 { 949 {
950 return "zephyr"; 950 return "zephyr";
951 } 951 }
952 952
953 static struct prpl *my_protocol = NULL; 953 static GaimPlugin *my_protocol = NULL;
954 954
955 void zephyr_init(struct prpl *ret) 955 static GaimPluginProtocolInfo prpl_info =
956 { 956 {
957 ret->protocol = PROTO_ZEPHYR; 957 GAIM_PROTO_ZEPHYR,
958 ret->options = OPT_PROTO_NO_PASSWORD; 958 OPT_PROTO_NO_PASSWORD,
959 ret->name = g_strdup("Zephyr"); 959 NULL,
960 ret->list_icon = zephyr_list_icon; 960 NULL,
961 ret->login = zephyr_login; 961 zephyr_list_icon,
962 ret->close = zephyr_close; 962 NULL,
963 ret->add_buddy = zephyr_add_buddy; 963 NULL,
964 ret->remove_buddy = zephyr_remove_buddy; 964 NULL,
965 ret->send_im = zephyr_send_im; 965 zephyr_away_states,
966 ret->get_info = zephyr_zloc; 966 NULL,
967 ret->normalize = zephyr_normalize; 967 zephyr_buddy_menu,
968 ret->buddy_menu = zephyr_buddy_menu; 968 zephyr_chat_info,
969 ret->away_states = zephyr_away_states; 969 zephyr_login,
970 ret->set_away = zephyr_set_away; 970 zephyr_close,
971 ret->chat_info = zephyr_chat_info; 971 zephyr_send_im,
972 ret->join_chat = zephyr_join_chat; 972 NULL,
973 ret->chat_send = zephyr_chat_send; 973 NULL,
974 ret->chat_leave = zephyr_chat_leave; 974 zephyr_zloc,
975 975 zephyr_set_away,
976 my_protocol = ret; 976 NULL,
977 } 977 NULL,
978 978 NULL,
979 #ifndef STATIC 979 NULL,
980 980 NULL,
981 G_MODULE_EXPORT void gaim_prpl_init(struct prpl *prpl) 981 NULL,
982 { 982 zephyr_add_buddy,
983 zephyr_init(prpl); 983 NULL,
984 prpl->plug->desc.api_version = PLUGIN_API_VERSION; 984 zephyr_remove_buddy,
985 } 985 NULL,
986 986 NULL,
987 987 NULL,
988 #endif 988 NULL,
989 NULL,
990 NULL,
991 NULL,
992 zephyr_join_chat,
993 NULL,
994 zephyr_chat_leave,
995 NULL,
996 zephyr_chat_send,
997 NULL,
998 NULL,
999 NULL,
1000 NULL,
1001 NULL,
1002 NULL,
1003 NULL,
1004 NULL,
1005 NULL,
1006 zephyr_normalize
1007 };
1008
1009 static GaimPluginInfo info =
1010 {
1011 2, /**< api_version */
1012 GAIM_PLUGIN_PROTOCOL, /**< type */
1013 NULL, /**< ui_requirement */
1014 0, /**< flags */
1015 NULL, /**< dependencies */
1016 GAIM_PRIORITY_DEFAULT, /**< priority */
1017
1018 "prpl-zephyr", /**< id */
1019 "Zephyr", /**< name */
1020 VERSION, /**< version */
1021 /** summary */
1022 N_("Zephyr Protocol Plugin"),
1023 /** description */
1024 N_("Zephyr Protocol Plugin"),
1025 NULL, /**< author */
1026 WEBSITE, /**< homepage */
1027
1028 NULL, /**< load */
1029 NULL, /**< unload */
1030 NULL, /**< destroy */
1031
1032 NULL, /**< ui_info */
1033 &prpl_info /**< extra_info */
1034 };
1035
1036 static void
1037 __init_plugin(GaimPlugin *plugin)
1038 {
1039 my_protocol = plugin;
1040 }
1041
1042 GAIM_INIT_PLUGIN(zephyr, __init_plugin, info);