5 #include "fcgi_stdio.h"
7 #define DEFAULT_SIZE 128
14 IoTQuery(FCGX_Request * request);
19 void sendResponse(char *data, int length);
23 bool checkDirectory();
24 bool openStatusFile();
25 void updateStatusFile();
31 void removeOldestSlot();
32 char * getSlotFileName(long long);
33 char * getSaltFileName();
35 FCGX_Request * request;
37 /* Directory slot files are placed in. */
39 /* Full URI from Apache */
41 /* Query portion of URI */
43 /* Type of request: GET or PUT */
45 /* Root directory for all accounts */
46 const char * iotcloudroot;
47 /* Expected length of data from client */
49 /* Sequence number for oldest slot */
50 long long oldestentry;
51 /* Sequence number for newest slot */
52 long long newestentry;
53 /* Sequence number from request */
54 long long requestsequencenumber;
57 /* fd for queuestatus file */
59 /* Is the request to get a slot? */
61 /* Is the request to put a slot? */
63 /* Is the request to set the salt? */
65 /* Is the request to get the salt? */