Redesign requests, add callbacks, add power callback

First, redesign clients and requests to have more state stored in
the qmidev.  This gives us a way to cancel them later (although we
don't yet) and gives us a place to register for event messages.

Add a way to register for event messages on a client.

Add the power callback, and a test for it.

BUG=chromium-os:28018,chromium-os:28019
TEST=power_test

Change-Id: Ie120327fa56ea4edeac7df3d291242701efd17f0
10 files changed
tree: 6346a668dfbfeac58022d61d039ad9b0196056a2
  1. .gitignore
  2. LICENSE
  3. Makefile
  4. README
  5. include/
  6. src/