modification of callback parameters

previously, the client id was passed to callback trough a pointer. this
is more safe to pass it by value.

first documentation work