device and event apis