-
Notifications
You must be signed in to change notification settings - Fork 0
The Network
Warning: this class is under continuous active development, which means all this information is subject to change or invalidation at any time. Use this as a guide to the source code, to know what to look for, but take it all with a grain of salt.
The network object itself is a loopingThread, a subclass of threading.Thread which calls its process() function repeatedly until terminated. In this case, it's running sync functions with the plugin, which don't actually do much of anything at the time of this writing. Most of the power of the Network is in its other functions, most of which delegate instructions to the plugin or other objects "owned" by the network.
This function takes a username and password, and uses the username to figure out which plugin to use. Specifically, it uses the hostname, for example campadrenalin@googlewave.com, which uses the plugin associated with googlewave.com. It tries to initialize the plugin with this information, and uses self.status to inform you if this fails.
The extensible plugin system can very easily allow a plugin to associate itself with a domain.
A vestigial function that opens a very generic browser window to an URL. It has an optional argument, a function for the window to call on its destroy event. This was originally built as part of a verification system to get a token saved to disk (as opposed to the current hack, where the token is stored in an Appengine site which can be queried with the username and password to return a token).
Back to How the Code Works