Mercurial > hg > soniczoomios
view eventLogger.h @ 4:7541aeaebcdc
presest store locally. bit crap still though.
author | Robert Tubb <rt300@eecs.qmul.ac.uk> |
---|---|
date | Tue, 04 Dec 2012 18:36:00 +0000 |
parents | 23efe1f0cd8a |
children | 5ee5ef99e117 |
line wrap: on
line source
// // eventLogger.h // oscSenderExample // // Created by Robert Tubb on 05/11/2012. // // // This class handle everything to do with loggin user actions, // uploading logs to server, and storing locally if not uploaded #ifndef __oscSenderExample__eventLogger__ #define __oscSenderExample__eventLogger__ #include "ofMain.h" #include "ofxiPhone.h" #include "2dvector.h" #include "ofxiPhoneExtras.h" #include <sys/time.h> #include <iostream> #include <string> #include <map> #include "2dvector.h" enum leventType {SAVE_PRESET, SAVE_DESET, SCROLL, ZOOM, CHANGE_SLIDER, SWAP_VIEW}; class lEvent{ // try and make this as compact as possible. leventType eventType; double val1; // x coord, scale if zoom double val2; // y coord, 0 if zoom int sliderID; }; class EventLogger{ public: // what we need... /* time, type, value */ vector<lEvent> theEvents; string userID; // get something from hardware?? EventLogger(); void logEvent(const leventType& evtType,const TwoVector& centre, const double& scale, const int& sliderID); void sendHttp(); }; #endif /* defined(__oscSenderExample__eventLogger__) */