Mercurial > pidgin
comparison src/protocols/zephyr/zephyr.c @ 3572:bdd0bebd2d04
[gaim-migrate @ 3670]
Phase II. No longer do you have to worry about protocol plugins. When
Gaim probes plugins on load, it will detect protocol plugins and add them
to the list of available protocols. When you try to log an account on with
one of them, Gaim will automatically load the plugin--when no more accounts
need the protocol--Gaim will automatically unload it. Protocol plugins are
no longer available in the plugins ui, and no protocols are compiled statically
by default.
committer: Tailor Script <tailor@pidgin.im>
author | Sean Egan <seanegan@gmail.com> |
---|---|
date | Mon, 30 Sep 2002 01:05:18 +0000 |
parents | 7a3f16a375a5 |
children | 9682c0e022c6 |
comparison
equal
deleted
inserted
replaced
3571:a88c62c5b7da | 3572:bdd0bebd2d04 |
---|---|
59 char *recipient; | 59 char *recipient; |
60 char *name; | 60 char *name; |
61 gboolean open; | 61 gboolean open; |
62 int id; | 62 int id; |
63 }; | 63 }; |
64 | |
65 static char *zephyr_name() | |
66 { | |
67 return "Zephyr"; | |
68 } | |
69 | 64 |
70 #define z_call(func) if (func != ZERR_NONE)\ | 65 #define z_call(func) if (func != ZERR_NONE)\ |
71 return; | 66 return; |
72 #define z_call_r(func) if (func != ZERR_NONE)\ | 67 #define z_call_r(func) if (func != ZERR_NONE)\ |
73 return TRUE; | 68 return TRUE; |
943 | 938 |
944 void zephyr_init(struct prpl *ret) | 939 void zephyr_init(struct prpl *ret) |
945 { | 940 { |
946 ret->protocol = PROTO_ZEPHYR; | 941 ret->protocol = PROTO_ZEPHYR; |
947 ret->options = OPT_PROTO_NO_PASSWORD; | 942 ret->options = OPT_PROTO_NO_PASSWORD; |
948 ret->name = zephyr_name; | 943 ret->name = g_strdup("Zephyr"); |
949 ret->login = zephyr_login; | 944 ret->login = zephyr_login; |
950 ret->close = zephyr_close; | 945 ret->close = zephyr_close; |
951 ret->add_buddy = zephyr_add_buddy; | 946 ret->add_buddy = zephyr_add_buddy; |
952 ret->remove_buddy = zephyr_remove_buddy; | 947 ret->remove_buddy = zephyr_remove_buddy; |
953 ret->send_im = zephyr_send_im; | 948 ret->send_im = zephyr_send_im; |
964 my_protocol = ret; | 959 my_protocol = ret; |
965 } | 960 } |
966 | 961 |
967 #ifndef STATIC | 962 #ifndef STATIC |
968 | 963 |
969 char *gaim_plugin_init(GModule *handle) | 964 void *gaim_prpl_init(struct prpl *prpl) |
970 { | 965 { |
971 load_protocol(zephyr_init, sizeof(struct prpl)); | 966 zephyr_init(prpl); |
972 return NULL; | 967 prpl->plug->desc.api_version = PLUGIN_API_VERSION; |
973 } | 968 } |
974 | 969 |
975 void gaim_plugin_remove() | |
976 { | |
977 struct prpl *p = find_prpl(PROTO_ZEPHYR); | |
978 if (p == my_protocol) | |
979 unload_protocol(p); | |
980 } | |
981 | |
982 char *name() | |
983 { | |
984 return "Zephyr"; | |
985 } | |
986 | |
987 char *description() | |
988 { | |
989 return PRPL_DESC("Zephyr"); | |
990 } | |
991 | 970 |
992 #endif | 971 #endif |