btw, will you be including jesus-miner's GBT code?
Also, how will the selection of protocol work... Automagic or manual?
I am implementing stratum first up as I believe going forward that it is the better suited protocol for pool mining based on a number of things I won't go into again here. The major disadvantage to stratum is that it needed a rewrite of great chunks of cgminer to work as it worked outside the bounds of all the machinery cgminer had in place for http communication and the very complex network scheduler that I had written into cgminer to make it scale. GBT is yet another competing standard which seemed to be designed as a drop-in replacement for getwork that shared some of the ideas with it, and in the process, took on some of its disadvantages. So in actual fact it's less work to implement GBT, and while it claims to offer a lot more "features", none of those features are remotely relevant to how most of us mine. So I'm implementing stratum first as a show of support for what I believe is the better protocol.
Now Luke-jr has claimed, in his usual FUD way, that stratum is "bad for bitcoin" which is right up there for his standard of crap accusations. It seems the only reason he's so vehemently against stratum is that it was a competing protocol to what he was working on, and therefore anything he didn't do must be wrong in his eyes. As I said above, any extra features of GBT are going to be largely irrelevant to miners and there is not any point implementing them. On the other hand, GBT is yet another communication protocol that some pools are already supporting (basically because they're using his pool software so they get it by default). So in the future, after I release a stratum supporting version of cgminer, I will be implementing my own GBT support for the purposes of maintaining maximum compatibility with pools. Provided I have the time, I'm not planning on taking his code if I can help it.
Now you can try and hold Luke-jr to task over this and if he firmly believes stratum is bad for bitcoin, then he should not try and copy my implementation of it into his hostile fork and actually differentiate his software from mine, withholding support for stratum. However, he has shown that with scrypt for example, even though he was firmly opposed to litecoin mining, he took my implementation of it into his software because he was afraid he would lose his audience.
Within a few milliseconds of posting this I expect him to come and spam my forum thread with all sorts of bullshit rebuttal for what I just posted but he will do precisely what I predicted with pulling in my stratum code regardless. I have him on ignore in this forum, as I find wasting energy dealing with him absolutely pointless.
As for the selection of work, cgminer can detect stratum from either the way you input it ( stratum+tcp:// ) or if you put a stratum url in by mistake as http:// or with no prefix it will test to see if it's a stratum url first, or if the pool advertises stratum support in the getwork response it will automatically switch to it by itself. So if it all goes according to plan it should all just happen automatically.