diff eventLogger.h @ 14:6a9191f5b269

Questionnaire view started function basic
author Robert Tubb <rt300@eecs.qmul.ac.uk>
date Wed, 16 Jan 2013 19:03:51 +0000
parents 346807b47860
children e45c3e631d20
line wrap: on
line diff
--- a/eventLogger.h	Wed Jan 16 15:33:13 2013 +0000
+++ b/eventLogger.h	Wed Jan 16 19:03:51 2013 +0000
@@ -25,7 +25,7 @@
 #include "json.h"
 
 #import "iViewController.h"
-
+#import "QuestionnaireViewController.h"
 
 // can add but don't change ordering - this will invalidate logs
 enum leventType {SAVE_PRESET,
@@ -106,32 +106,44 @@
 
 class EventLogger{
 public:
+    bool loggingEnabled;
+    bool internetConnectionOK;
+    unsigned int deviceID; // unique get something from hardware??
+    unsigned int totalInteractionTime, sessionTime, sessionStartTime;
+    string userName; // not unique
+    
+    EventLogger();
+    void init();
+    void exitAndSave();
+    void setUsername(const char *u);
+    void logEvent(const leventType& evtType,const TwoVector& centre = TwoVector(), const double& scale = 1.0, const int& sliderID = -1, const double& sliderVal = 0.0);
+
+    
+private:
     // what we need...
     /*
      time, type, value
      */
-    bool loggingEnabled;
-    bool internetConnectionOK;
+
+    
     vector<lEvent> theEvents;
     
+    QuestionnaireViewController * questionnaireViewController;
+    // values applicable to all events
+
+    unsigned int nextUploadQty;
+
     
-    // values applicable to all events
-    unsigned int deviceID; // unique get something from hardware??
-    unsigned int totalInteractionTime, sessionTime, sessionStartTime;
-    string userName; // not unique
-    unsigned int nextUploadQty;
-    EventLogger();
-    void init();
+    
     bool testConnection();
-    void setUsername(const char *u);
-    void logEvent(const leventType& evtType,const TwoVector& centre = TwoVector(), const double& scale = 1.0, const int& sliderID = -1, const double& sliderVal = 0.0);
+    
 
     void sendHttp();
     void checkLogFile();
     bool attemptUpload();
     void firstEverAppOpen();
     void readJsonToLog(const string &jsonFile);
-    void exitAndSave();
+    
     Json::Value logsToJson();
     void printAll(){
         cout << "ALL LOGGED EVENTS!: \n";