Mercurial > hg > soniczoomios
diff eventLogger.h @ 27:ae4d2c3ce5e0
Details. Zoom trailing finger move sorted. Qs rephrased.
author | Robert Tubb <rt300@eecs.qmul.ac.uk> |
---|---|
date | Wed, 13 Feb 2013 17:03:56 +0000 |
parents | f42a00e3f22d |
children | e2c62db1e265 |
line wrap: on
line diff
--- a/eventLogger.h Fri Feb 01 18:31:43 2013 +0000 +++ b/eventLogger.h Wed Feb 13 17:03:56 2013 +0000 @@ -56,7 +56,8 @@ SEQ_LOCKED, // 15 SYNTH_LOCKED, // 16 PLAY_PRESSED, // 17 - PAUSE_PRESSED}; // 18 + PAUSE_PRESSED, // 18 + HELP_PRESSED}; // 19 //--------------------------------------------------------------------------- @@ -132,26 +133,28 @@ public: int nextUploadNumber; bool loggingEnabled; + bool logUploadInProgress; bool serverConnectionOK; bool consentGiven; unsigned int deviceID; // unique get something from hardware?? unsigned int totalInteractionTime, savedInteractionTime, sessionTime, sessionStartTime; string userName; // not unique - + EventLogger(); void init(); void exitAndSave(); void setUsername(const char *u); + void newUser(); void logEvent(const leventType& evtType,const TwoVector& centre = TwoVector(), const double& scale = 1.0, const int& sliderID = -1, const double& sliderVal = 0.0); void questionnaireAnswersObtained(vector<int> answers); - + void urlResponse(ofHttpResponse & response); private: // what we need... /* time, type, value */ - + int currentHTTPRequestID; vector<lEvent> theEvents; @@ -167,12 +170,13 @@ bool questionnaireCompleted; bool questionnaireUploaded; + void checkLogFile(); - bool uploadEventLog(); + bool uploadEventLog(bool async); void firstEverAppOpen(); void readJsonToLog(const string &jsonFile); - bool uploadQuestionnaire(); - bool sendToServer(string functionName, Json::Value jsonData); + void uploadQuestionnaire(); + bool sendToServer(string functionName, Json::Value jsonData, bool async); Json::Value logsToJson(); Json::Value questionnaireToJson(); void printAll(){