diff eventLogger.h @ 42:3d627dce8bf0

Tidied up startup logic.
author Robert Tubb <rt300@eecs.qmul.ac.uk>
date Wed, 17 Apr 2013 13:44:05 +0100
parents af06bb942d58
children b91a1859829a
line wrap: on
line diff
--- a/eventLogger.h	Fri Apr 12 17:50:25 2013 +0100
+++ b/eventLogger.h	Wed Apr 17 13:44:05 2013 +0100
@@ -30,7 +30,7 @@
 
 #define EVENT_THIN_FACTOR 12
 #define EVENT_LOG_FILENAME "log.json"
-#define UPLOAD_CHUNK_SIZE 10
+#define UPLOAD_CHUNK_SIZE 1000
 #define APP_CREATION_TIME 381429000000   // milliseconds to the time i wrote this wee blighter. saves digits
 #define SCROLL_TRAIL_LENGTH 200
 #define PROGRAM_VERSION 0.5 // NOW USES NEW HILBERT CURVE. ALL OLD PRESETS WILL BE INVALID :(
@@ -156,7 +156,7 @@
     EventLogger();
     
 // public methods:
-    void init();
+    void startLoadAll();
     void exitAndSave();
     void setUsername(const char *u);
     void newUser();
@@ -193,16 +193,17 @@
     
     ofxiPhoneDeviceType iOSdeviceType;
     
-    void testConnection();
+
     vector<int> questionnaireAnswers;
     int interfaceOrder;
 
 // private methods
+    void testConnection();
     void checkLogFile();
     void deleteLogs(); // new user
     bool uploadEventLog(bool async);
     void firstEverAppOpen();
-    void checkExistingLogFile(const string &jsonFile);
+    void loadExistingLogFile(const string &jsonFile);
     void uploadQuestionnaire();
     bool sendToServer(string functionName, Json::Value jsonData, bool async);