Rename "query" to "db_query" in vland, so we can add "daemon_query"

Change-Id: I15479939062c8f6b68aa2567a983b3938cd9816e
diff --git a/vland.py b/vland.py
index 919b1bb..aaca67f 100644
--- a/vland.py
+++ b/vland.py
@@ -131,10 +131,27 @@
 
     response = {}
 
-    if json_data['type'] == 'query':
-        response['type'] = 'queryresponse'
+    # Several types of IPC message here, with potentially different
+    # access control and safety
+
+    # First - simple queries to the database only. Should be safe!
+    if json_data['type'] == 'db_query':
+        response['type'] = 'response'
         try:
-            response['data'] = util.perform_query(db, json_data['command'], json_data['data'])
+            response['data'] = util.perform_db_query(db, json_data['command'], json_data['data'])
+            response['response'] = 'ACK'
+        except InputError as e:
+            print e
+            response['response'] = 'ERROR'
+            response['error'] = e.__str__()
+            print 'FOO?'
+            pass
+
+    # Next - simple queries about daemon state only. Should be safe!
+    if json_data['type'] == 'daemon_query':
+        response['type'] = 'response'
+        try:
+            response['data'] = util.perform_daemon_query(state, json_data['command'], json_data['data'])
             response['response'] = 'ACK'
         except InputError as e:
             print e