• Main Page
  • Related Pages
  • Namespaces
  • Classes
  • Files
  • File List
  • File Members

include/FCam/Event.h

Go to the documentation of this file.
00001 #ifndef FCAM_EVENT_H
00002 #define FCAM_EVENT_H
00003 
00006 
00007 #include <string>
00008 
00009 #include "Time.h"
00010 #include "TSQueue.h"
00011 
00012 
00013 namespace FCam {
00014 
00018     class EventGenerator {
00019     };
00020     
00023     class Event {
00024       public:
00025         EventGenerator *creator; 
00026         int type;                
00027         int data;                
00028         Time time;               
00029         std::string description; 
00030 
00039         enum {Error = 0,               
00040               Warning,                 
00041               FocusPressed,            
00042               FocusReleased,           
00043               ShutterPressed,          
00044               ShutterReleased,         
00045               N900LensClosed = 10000,  
00046               N900LensOpened,          
00047               N900SlideOpened,         
00048               N900SlideClosed,               
00049               F2LensRemoved = 20000,   
00050               F2LensInstalled,         
00051               F2ZoomChanged,           
00052               F2FocusChanged           
00053         };
00054 
00059         enum {Unknown = 0,        
00060               InternalError,      
00061               DriverError,        
00062               ImageTargetLocked,  
00063               ResolutionMismatch, 
00064               OutOfMemory,        
00065               FrameLimitHit,      
00066               LensHistoryError,   
00067               FlashHistoryError,  
00068               DemosaicError,      
00069               ImageLockError,     
00070               BadCast,            
00071               FileLoadError,       
00072               FileLoadWarning,     
00073               FileSaveError,       
00074               FileSaveWarning,     
00075               SensorStoppedError, 
00076               ParseError,         
00077               FrameDataError,     
00078               OutOfRange,         
00079         };
00080     };
00081         
00106     bool getNextEvent(Event *);
00110     bool getNextEvent(Event *, int type);
00114     bool getNextEvent(Event *, int type, int data);
00118     bool getNextEvent(Event *, int type, EventGenerator *creator);
00123     bool getNextEvent(Event *, int type, int data, EventGenerator *creator);
00128     bool getNextEvent(Event *, EventGenerator *creator);
00129 
00131     void postEvent(Event);
00132 
00135     void postEvent(int type, int code, const std::string &msg, EventGenerator *creator = NULL);
00136 
00138     void error(int code, EventGenerator *creator, const char *fmt, ...);
00139 
00141     void warning(int code, EventGenerator *creator, const char *fmt, ...);    
00142 
00144     void error(int code, const char *fmt, ...);
00145 
00147     void warning(int code, const char *fmt, ...);    
00148 
00150     extern TSQueue<Event> _eventQueue;
00151 }
00152 
00153 #endif

Generated on Thu Jul 15 2010 17:51:28 for FCam by  doxygen 1.7.1