Update the callback API functions, adding connection state arg.