libGizmod/GizmoEvent.hpp

Go to the documentation of this file.
00001 
00012 /*
00013   
00014   Copyright (c) 2007, Tim Burrell
00015   Licensed under the Apache License, Version 2.0 (the "License");
00016   you may not use this file except in compliance with the License.
00017   You may obtain a copy of the License at 
00018 
00019         http://www.apache.org/licenses/LICENSE-2.0
00020 
00021   Unless required by applicable law or agreed to in writing, software
00022   distributed under the License is distributed on an "AS IS" BASIS,
00023   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00024   See the License for the specific language governing permissions and 
00025   limitations under the License. 
00026   
00027 */
00028 
00029 #ifndef __GizmoEvent_h
00030 #define __GizmoEvent_h
00031 
00032 #if HAVE_CONFIG_H
00033 #include "config.h"
00034 #endif
00035 
00036 #include "../libH/DynamicBuffer.hpp"
00037 #include <string>
00038 #include <boost/archive/text_oarchive.hpp>
00039 #include <boost/archive/text_iarchive.hpp>
00040 
00042 // Namespace
00044 
00045 namespace Gizmod {
00046 
00048 // Typedef, enum's
00050 
00068 typedef enum {
00069         GIZMO_EVENTCLASS_ATIX10,
00070         GIZMO_EVENTCLASS_CPUUSAGE,
00071         GIZMO_EVENTCLASS_LIRC,
00072         GIZMO_EVENTCLASS_POWERMATE,
00073         GIZMO_EVENTCLASS_SOUNDCARD,
00074         GIZMO_EVENTCLASS_SOUNDVISUALIZATION,
00075         GIZMO_EVENTCLASS_STANDARD,
00076         GIZMO_EVENTCLASS_WINDOWFOCUS,
00077 } GizmoEventClass;
00078 
00083 #define GIZMO_EVENTCLASS_MAX    GIZMO_EVENTCLASS_WINDOWFOCUS
00084         
00086 // Class Definition
00088 
00096 class GizmoEvent {
00097 public:
00098         // public functions
00099         GizmoEventClass                 getClass();                     
00100         bool                            isRemote();                     
00101         void                            setIsRemote(bool IsRemote);     
00102         
00103         // construction / deconstruction
00104         GizmoEvent();                                                   
00105         GizmoEvent(GizmoEventClass Class, bool IsRemote);               
00106         virtual ~GizmoEvent();                                          
00107         
00108 protected:
00109         // protected member variables
00110         GizmoEventClass                 mClass;                         
00111         bool                            mIsRemote;                      
00112         
00113 private:
00114         // private functions
00115         
00116 private: 
00117         // serialization
00118         friend class boost::serialization::access;
00119         template<class Archive>
00120         void serialize(Archive & ar, const unsigned int version) {
00121                 ar & mClass;
00122         }
00123 };
00124 
00126 
00127 } // Gizmod namespace
00128 
00129 #endif // __GizmoEvent_h

Generated on Wed Jun 27 12:41:53 2007 for gizmod by  doxygen 1.4.7