I'm not sure if you want to work with Qt, but may be you should take a look at Vidalia's torcontrol classes: https://gitweb.torproject.org/vidalia.git/tree/HEAD:/src/torcontrol
Thanks, Tomas, for the suggestion. I actually tried to use Vidalia's Tor control code back in late 2010 when I looked for a C/C++ controller, but I chose not to use it for several reasons: it lacked (and I think still does) the path selection, Qt is a huge dependency, and I wasn't yet familiar with Qt dev. I was sidetracked for a while -- learning Qt dev in the process -- so now Vidalia's looks pretty attractive. Since I was almost done with my port, however, I might as well try to finish it and release it.