log_line.py
changeset 50 f13cf27a360b
parent 46 185504387370
child 64 cdb6403c2498
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/log_line.py	Mon Feb 09 00:24:13 2009 +0200
@@ -0,0 +1,39 @@
+"""
+    An IRC logfile consists of a series of lines/events
+"""
+
+class LogTypes :
+    """
+        Definitions of the various LogLines types
+    """
+    
+    # unknown type, may or may not have a timestamp, no source, only data
+    RAW         = 0x01
+
+class LogLine (object) :
+    """
+        An event on some specific channel
+    """
+
+    # the event type, as defiend in LogTypes
+    type = None
+
+    # the UTC timestamp of the event
+    timestamp = None
+
+    # the event source
+    source = None
+
+    # associated data (message, etc)
+    data = None
+    
+    def __init__ (self, type, timestamp, source, data) :
+        """
+            Initialize with given values
+        """
+
+        self.type = type
+        self.timestamp = timestamp
+        self.source = source
+        self.data = data
+