That would be kind of cool, as some stuff is proving really difficult to wrap (I'm still a little bamboozled at a couple of aspects of the message structs). Plus having a backend version of many of those commands makes for a really straightforward (and automatically documented by virtue of paralelling the protocol.

 I'd still like a way to be able to overwrite protocol commands. I was talking with a friend about it, and they made an interesting , and quite tantalising, idea.

 It would be nice to be able, for instance, in python reimplement commands, so that one could (for instance) create a python handler for a virtual folder that appears to webcit and all as a normal folder, but infact back ends out to other things.

 

Ie (pseudocodey)

def reimplemented_ cmd_msgs (args):
       if current_folder = "virtual folder":
                     return data from mysql for instance
       else: #Not one of our folders. Must be a real one!
                    citsupport.cmd_msgs(args) #pass back to the C handler, as I dont handle this folder!

citlib.addcommand("MSGS",reimplemented_cmd_msgs)

 
Another question is, is there a way for if I register a protocol command, for the handler to know the name of the command that handled it

 so I could do something like;-


void python_generic_command(cmd,args) {

      call_python_code("mulltiplexor.py" , cmd,args)
}

(in _init_)

citadelregistorprotocolcommand("CMD1",python_generic_comand)

citadelregistorprotocolcommand(" CMD2",python_generic_comand)

citadelregistorprotocolcommand("CMD3",python_generic_comand)


The idea being I can multiplex multiple commands into a single python call routine, and if necessary register them from python.

A final question would be, how would I be able to put in a hook, so that when a message hits a folder, it'll first pass it to a routine that evaluates whether a python command should evaluate it. The idea I have is the ability t o say "Ok register python routine "handle_lunch_orders" into folder "lunch_orders", so that whenever someone emails to "lunch orders" , it calls that routine, and, orders lunch or something. This could be the most powerful part of the whole schema, as if implemented properly, it'd be dead simple to add handlers for Kolabs nutty new protocol, as well as creating a fairly distributed app across multiple servers and folders that communicates ,via email or whatever. Which is one of those things that Im not even sure Exchange can do. 

 

Also, it'd be nice to have a way to interact with webcit somehow. But I suspect thats a bigger issue, so I'll not think about that for now. 

Reply via email to