diff PRPL @ 1030:38452403563b

[gaim-migrate @ 1040] updating the buddy list to work better with multiple connections. there are still a bunch of things fucked up with this but i wanted more people to start working on it than just me, especially since i won't be here this weekend. committer: Tailor Script <tailor@pidgin.im>
author Eric Warmenhoven <eric@warmenhoven.org>
date Fri, 27 Oct 2000 07:53:32 +0000
parents 7e231bc0018a
children ce201056e7a6
line wrap: on
line diff
--- a/PRPL	Thu Oct 26 18:05:29 2000 +0000
+++ b/PRPL	Fri Oct 27 07:53:32 2000 +0000
@@ -68,3 +68,33 @@
 Simply load the oscar.so file from the normal plugin window. This will set up everything necessary.
 You may unload the plugin at any time, but the protocol will still be loaded. This may or may not
 be a problem and may or may not be fixed at a later point in time.
+
+======
+
+I guess I should document how to write a PRPL.
+
+The first thing to do is to write your init function. It should be delcared
+
+void my_proto_init(struct prpl *p);
+
+You then fill in the members of the struct. See prpl.h for what they are.
+
+If you're going to load your protocol dynamically, put the function gaim_plugin_init(void *) in the
+file, and have it call
+
+	load_protocol(my_proto_init);
+
+and return a non-negative int. Then compile as a plugin, load the .so file, and you're set. If you're
+going to load it dynamically, extern the my_proto_init function, and in prpl.c, call load_protocol.
+
+Your PRPL needs to have a login function, which ideally should set up a gdk_input watcher. When you
+want to indicate that the account is online, simply call account_online(struct gaim_connection *).
+When there is information from the server, you should call the appropriate serv_got function (see
+gaim.h for a (partial?) list).
+
+When the UI wants to send something via the server, it will call the appropriate function that you set
+in your PRPL, if it's non-NULL.
+
+There's currently no way to unload a PRPL, even if compiled dynamically and the plugin is removed. If
+you do remove a dynamic PRPL and try to load a new version of it, you will still be using the old
+version. Hopefully I can figure out how to fix this. Maybe it's not that important.