Index: source/ariba/utility/system/SystemEvent.h
===================================================================
--- source/ariba/utility/system/SystemEvent.h	(revision 12775)
+++ source/ariba/utility/system/SystemEvent.h	(revision 2378)
@@ -1,3 +1,3 @@
-// [License]
+// [Licence]
 // The Ariba-Underlay Copyright
 //
@@ -35,5 +35,5 @@
 // official policies, either expressed or implied, of the Institute of
 // Telematics.
-// [License]
+// [Licence]
 
 #ifndef SYSTEMEVENT_H_
@@ -49,10 +49,14 @@
 namespace utility {
 
-class SystemQueue;
 class SystemEventListener;
 
 class SystemEvent {
 	friend class SystemQueue;
+
 private:
+	ptime scheduledTime; //< time the event was originally given to the queue
+	uint32_t delayTime; //< time the event is scheduled at, or 0 if it is to be fired immediately
+	uint32_t remainingDelay; //< remaining delay time for sleeping
+
 	SystemEventListener* listener; //< handler of the event
 	SystemEventType type; //< type of the event
@@ -60,40 +64,32 @@
 
 public:
-	// TODO: these should be private, but the gcc 3.4 in scratchbox for cross-compiling
-	// for Maemo (Nokia N810) gets confused when the friend class SystemQueue has a 
-	// private class that accesses these variables. Therefore they are public for now.
-	ptime scheduledTime; //< time the event was originally given to the queue
-	ptime deadline; //< time when the event should be executed  TODO Mario 
-	uint32_t delayTime; //< time the event is scheduled at, or 0 if it is to be fired immediately
-	uint32_t remainingDelay; //< remaining delay time for sleeping
-
-public:
-	inline SystemEvent(SystemEventListener* mlistener, SystemEventType mtype =
-			SystemEventType::DEFAULT, void* mdata = NULL) :
-		listener(mlistener), 
-		type(mtype), 
-		data(mdata), 
-		scheduledTime(boost::posix_time::not_a_date_time),
-		deadline(boost::posix_time::not_a_date_time),
-		delayTime(0),
-		remainingDelay(0)
-	{
+	inline SystemEvent(
+			SystemEventListener* mlistener,
+			SystemEventType mtype = SystemEventType::DEFAULT,
+			void* mdata = NULL)
+			:	scheduledTime(boost::posix_time::not_a_date_time),
+				delayTime(0),
+				remainingDelay(0),
+				listener(mlistener),
+				type(mtype),
+				data(mdata) {
 	}
 
 	template<typename T>
-	inline SystemEvent(SystemEventListener* mlistener, SystemEventType mtype =
-			SystemEventType::DEFAULT, T* mdata = NULL) :
-		listener(mlistener), 
-		type(mtype), 
-		data((void*) mdata), 
-		scheduledTime(boost::posix_time::not_a_date_time),
-		deadline(boost::posix_time::not_a_date_time),
-		delayTime(0),
-		remainingDelay(0) {
+	inline SystemEvent( SystemEventListener* mlistener,
+			SystemEventType mtype = SystemEventType::DEFAULT,
+			T* mdata = NULL)
+				:	scheduledTime(boost::posix_time::not_a_date_time),
+					delayTime(0),
+					remainingDelay(0),
+					listener(mlistener),
+					type(mtype),
+					data((void*)mdata) {
 	}
+
+
 
 	inline SystemEvent(const SystemEvent& copy) {
 		this->scheduledTime = copy.scheduledTime;
-        this->deadline = copy.deadline;
 		this->delayTime = copy.delayTime;
 		this->remainingDelay = copy.remainingDelay;
@@ -105,5 +101,4 @@
 	inline void operator=(const SystemEvent& right) {
 		this->scheduledTime = right.scheduledTime;
-        this->deadline = right.deadline;
 		this->delayTime = right.delayTime;
 		this->remainingDelay = right.remainingDelay;
@@ -121,5 +116,5 @@
 	}
 
-	inline SystemEventListener* getListener() const {
+	inline const SystemEventListener* getListener() const {
 		return listener;
 	}
@@ -127,5 +122,5 @@
 	template<typename T>
 	inline T* getData() const {
-		return (T*) *this;
+		return (T*)*this;
 	}
 
@@ -142,18 +137,11 @@
 	}
 
-	bool operator<(const SystemEvent& right) const
-	{
-		return this->deadline < right.deadline;
+	inline bool operator<(const SystemEvent& right) const {
+		return remainingDelay < right.remainingDelay;
 	}
-
-    bool operator>(const SystemEvent& right) const
-    {
-        return this->deadline > right.deadline;
-    }
 
 };
 
-}
-} // spovnet, common
+}} // spovnet, common
 
 #endif /* SYSTEMEVENT_H_ */
