server: Add support for all query types.

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>