Mercurial > hg > soniczoomios
diff eventLogger.h @ 30:c0a6f7c66719
Josh M test "in house" version 0.1
author | Robert Tubb <rt300@eecs.qmul.ac.uk> |
---|---|
date | Wed, 27 Feb 2013 11:39:07 +0000 |
parents | fabb3a5cdfc9 |
children | 23ef179c3748 |
line wrap: on
line diff
--- a/eventLogger.h Fri Feb 22 17:41:38 2013 +0000 +++ b/eventLogger.h Wed Feb 27 11:39:07 2013 +0000 @@ -31,7 +31,7 @@ #define EVENT_LOG_FILENAME "log.json" //#define LOGGING_SERVER_URL "http://www.isophonics.net/datacollector/" #define LOGGING_SERVER_URL "http://127.0.0.1:8080/testservice/" -#define UPLOAD_CHUNK_SIZE 100 +#define UPLOAD_CHUNK_SIZE 20 #define QUESTIONNAIRE_ENABLE_TIME 100000 // milliseconds #define APP_CREATION_TIME 381429000000 // milliseconds to the time i wrote this wee blighter saves digits @@ -159,6 +159,15 @@ 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, const char* userComments); void urlResponse(ofHttpResponse & response); + + void questionnaireOK(); + void eventlogOK(); + void testConnectionOK(); + void questionnaireNotOK(); + void eventlogNotOK(); + void testConnectionNotOK(); + + void printAll(); private: int currentHTTPRequestID; @@ -182,19 +191,16 @@ void deleteLogs(); // new user bool uploadEventLog(bool async); void firstEverAppOpen(); - void readJsonToLog(const string &jsonFile); + void checkExistingLogFile(const string &jsonFile); void uploadQuestionnaire(); bool sendToServer(string functionName, Json::Value jsonData, bool async); + + + + Json::Value logsToJson(); Json::Value questionnaireToJson(); - void printAll(){ - cout << "ALL LOGGED EVENTS!: \n"; - vector<lEvent>::iterator evIter; - for(evIter = theEvents.begin(); evIter < theEvents.end(); evIter++){ - cout << *evIter; - - } - }; + // ServerComms *serverComms;