diff soap.cpp @ 348:75a59f58319e serializedQuery

New branch for serialized queries over SOAP
author mas01mc
date Mon, 27 Oct 2008 11:08:13 +0000
parents 30384a82983a
children 8ff9d4d83222
line wrap: on
line diff
--- a/soap.cpp	Wed Oct 08 17:23:15 2008 +0000
+++ b/soap.cpp	Mon Oct 27 11:08:13 2008 +0000
@@ -320,8 +320,6 @@
   DOUBLESTRINGIFY(absolute_threshold, absolute_thresholdStr);
   DOUBLESTRINGIFY(radius, radiusStr);
 
-  // WS queries only support 1-nearest neighbour point reporting
-  // at the moment, until we figure out how to better serve results
   snprintf(qtypeStr, 256, "nsequence");
   const char *argv[]={
     "./audioDB",
@@ -359,7 +357,16 @@
     return SOAP_FAULT;
   }
 }
-
+
+// Query an audioDB database by vector (serialized)
+int adb__shingleQuery(struct soap* soap, xsd__string dbName, struct adb__queryVector qVector, xsd__int queryType,xsd__int pointNN,xsd__int trackNN,xsd__int sequenceLength,xsd__double radius,xsd__double absolute_threshold,xsd__int lsh_exact,struct adb__queryResponse &adbQueryResponse){
+  cout << "qvector[" << qVector.__sizeQvector << "]: ";
+  for(int k=0; k < qVector.__sizeQvector ; k++)
+    cout << qVector.Qvector[k] << " ";
+  cout.flush();
+  return SOAP_OK;
+}
+
 /* Server loop */
 void audioDB::startServer(){
   struct soap soap;