FreeRDP/FreeRDP — pull request #1706 by awakecoding (2014-02-28 20:41:59+00:00)
Title: Channel System Refactoring and WTSAPI Convergence

This pull request includes a lot of changes to improve consistency between FreeRDP and the WTSAPI. It also attempts at solving multiple problems in the core virtual channel system that are huge bottlenecks to higher performance and maintainability.

* Move core virtual channel code back into the core and avoid duplicated maintenance of lists
* Add new HashTable util, make use of it to speed up channel table lookups
* Stop putting internal protocol variables in rdpSettings->ChannelDefArray. Define proper variables inside rdpMcs and properly maintain more protocol variables without making a mess out of rdpSettings.
* Modify MCS and GCC code to make use of internal data structures for internal protocol variables
* Add more checks in MCS and GCC for robustness, improve protocol checks according to the specs
* Fix all inconsistencies between the FreeRDP API and the WTSAPI, make use of exact same types, calling conventions and declarations.
* Implement libwinpr-wtsapi, a stub WTSAPI library that can dynamically make use of any WTSAPI implementation by registering a structure of callbacks. Migrate existing core FreeRDP virtual channel code to use it.
* Integrate and make use of proper wtsapi32.h, pchannel.h and cchannel.h header definitions (maintained in winpr/wtsapi.h) and get rid of our own duplicated definitions in FreeRDP.
* Reduced custom WTSAPI extensions to a minimum. We can now at least extend a clean WTSAPI core rather than have an improper WTSAPI, which makes custom extensibility much easier to manage.
* Updated and tested the multiple FreeRDP servers (wfreerdp-server, xfreerdp-server, mfreerdp-server).