May I know whether your first question is specified for Notebook attach? Or just need to know the attach and detach event?
If your requirements is attach and detach event on Type-C port, you could refer file app.c,
If your requirements is identify the Notebook, this need additional interaction on the CC line. By default, the firmware cannot identify this is Notebook or genetic DRP.
For HPI question, please kindly fill a mycase or contact local FAE for clarifying it. Since HPI is discover under NDA.