Difference between revisions of "Psi Plugins Soc 2006"

Jump to navigation Jump to search
(First update in weeks, oops)
 
m (Update on progress.)
Line 39: Line 39:
This week I allowed the plugins to access the Psi options tree, did a bit more work on the api and then wrote two games plugins. I took the old (Qt3) Tic Tac Toe example from Trolltech, ported it to Qt4 and added multiplayer support, wrapping it in a plugin interface and also found a Qt3 chess app, wrapped it in a plugin and rewrote the socket code so that when it thinks it writes to a socket, it really passes strings to the plugin to wrap in <message>s and send along the xmpp stream. Neither game's perfect (and it seems like the checkmate checking in the chess game I used might be dodgy) but they provide a nice example of the plugin interface taking stanzas, processing them and (upon user input) replying to them. Of course, there's no hooks for adding to the Psi GUI yet, so you have to start a chess game by saying 'chess start' to a contact but that's pretty much next on my TODO.
This week I allowed the plugins to access the Psi options tree, did a bit more work on the api and then wrote two games plugins. I took the old (Qt3) Tic Tac Toe example from Trolltech, ported it to Qt4 and added multiplayer support, wrapping it in a plugin interface and also found a Qt3 chess app, wrapped it in a plugin and rewrote the socket code so that when it thinks it writes to a socket, it really passes strings to the plugin to wrap in <message>s and send along the xmpp stream. Neither game's perfect (and it seems like the checkmate checking in the chess game I used might be dodgy) but they provide a nice example of the plugin interface taking stanzas, processing them and (upon user input) replying to them. Of course, there's no hooks for adding to the Psi GUI yet, so you have to start a chess game by saying 'chess start' to a contact but that's pretty much next on my TODO.


===Following Weeks (-20th August)===
Having already implemented enough to allow plugins to extend protocol (as shown in the chess plugin) and Python to read incoming messages, I've been concentrating on my PhD completion, which is a matter of some increasing urgency. Even if I don't get another chance to look at this before deadline, I think I've covered those parts of a plugin interface I scoped for this project.


==Tasks==
==Tasks==
Line 67: Line 69:
|-
|-
| Display plugin's own options in OptionDlg
| Display plugin's own options in OptionDlg
| 20%
| Yes
|-
|-
| Write a soft-coded options structure, such that we don't need to know what options we have in advance (and also allow us to remember options we don't know about, such as when running without plugins)
| Write a soft-coded options structure, such that we don't need to know what options we have in advance (and also allow us to remember options we don't know about, such as when running without plugins)
| 85%
| Yes
|-
|-
| Allow plugins to store their options in PluginManager (options[], with an options.addComment())
| Allow plugins to store their options in PluginManager (options[], with an options.addComment())
| 0%
| 80%
|-
|-
| Allow plugins to define new Caps
| Allow plugins to define new Caps
Line 79: Line 81:
|-
|-
| Define preliminary interface alerting plugins to messages, presence, iq
| Define preliminary interface alerting plugins to messages, presence, iq
| 25%
| 50%
|-
|-
| Define an interface allowing plugins to modify or discard completely incoming and outgoing stanzas
| Define an interface allowing plugins to modify or discard completely incoming and outgoing stanzas
| 20%
| 40%
|-
|-
| Allow plugins to register a namespace to listen to (or many namespaces)
| Allow plugins to register a namespace to listen to (or many namespaces)
| 0%
| 0% (I subsequently decided this was not a worthwhile feature)
|-
|-
| Allow the plugins to modify the GUI in some way (adding options to the right-click menu on the roster, for example).
| Allow the plugins to modify the GUI in some way (adding options to the right-click menu on the roster, for example).
| 0%
| 40%
|}
|}


Line 104: Line 106:
|-
|-
| Choose scripts to load/not
| Choose scripts to load/not
| 0%
| 0% (All scripts are loaded all the time)
|-
|-
| Develop a method for loading and executing scripts
| Develop a method for loading and executing scripts
| 60%
| 90%
|-
|-
| Write a glue layer from the plugin interface to Python
| Write a glue layer from the plugin interface to Python