Add C implementation for door manager