cpp version:

* add LockType for non-locking support
* API prototype changes