#include "actuator.h"
#include "control.h"
#include "options.h"
+#include "image.h"
/**The time period (in seconds) before the control key expires */
#define CONTROL_TIMEOUT 180
}
/**
- * Aids in parsing request parameters. Expected keys along with their type
- * and whether or not they're required are provided. This function will then
- * parse the parameter string to find these keys.
+ * Aids in parsing request parameters.
+ * Input: The expected keys along with their type and whether or not
+ * they're required.
* @param context The context to work in
* @param params The parameter string to be parsed
* @param values An array of FCGIValue's that specify expected keys
}
if (FCGI_TYPE(val->flags) == FCGI_INT_T)
- *((int*) val->value) = parsed;
+ *((int*) val->value) = (int) parsed;
else
*((long*) val->value) = parsed;
} break;
va_end(list);
}
+
+/**
+ * Write binary data
+ * See fwrite
+ */
+void FCGI_WriteBinary(void * data, size_t size, size_t num_elem)
+{
+ Log(LOGDEBUG,"Writing!");
+ fwrite(data, size, num_elem, stdout);
+}
+
/**
* Escapes a string so it can be used safely.
* Currently escapes to ensure the validity for use as a JSON string
module_handler = Sensor_Handler;
} else if (!strcmp("actuators", module)) {
module_handler = Actuator_Handler;
+ } else if (!strcmp("image", module)) {
+ module_handler = Image_Handler;
}
context.current_module = module;