Index: pykota/trunk/pykota/cups.py
===================================================================
--- pykota/trunk/pykota/cups.py (revision 3249)
+++ pykota/trunk/pykota/cups.py (revision 3252)
@@ -30,13 +30,17 @@
     raise RuntimeError, "The python-pkipplib module is now mandatory. You can download pkipplib from http://www.pykota.com/"
 
-class Job :    
+class JobTicket :    
     """A class to hold CUPS print job informations."""
-    def __init__(self, jobid=None, copies=1, filename=None) :
+    def __init__(self, jobid=None, printername=None, copies=1, filename=None, \
+                       options=None) :
         """Initializes a print job's information."""
         self.JobId = jobid
+        self.PrinterName = printername
         self.Copies = copies
         self.FileName = filename
+        self.Options = options
         self.Charset = None
-        self.UserName = None
+        self.OriginatingUserName = None
+        self.OriginalUserName = None
         self.Title = None
         self.BillingCode = None
@@ -61,4 +65,8 @@
     def retrieveAttributesFromCUPS(self) :
         """Retrieve attribute's values from CUPS."""
+        import os
+        f = open("/tmp/debug", "w")
+        f.write("%s\n" % os.environ.get("CUPS_SERVER", ""))
+        f.close()
         server = pkipplib.CUPS() # TODO : username and password and/or encryption
         answer = server.getJobAttributes(self.JobId)
@@ -66,6 +74,6 @@
             raise PyKotaToolError, "Network error while querying the CUPS server : %s" \
                                       % server.lastErrorMessage
-        (dummy, self.Charset) = self.getAttributeTypeAndValue(answer, "attributes-charset", "operation")                              
-        (dummy, self.UserName) = self.getAttributeTypeAndValue(answer, "job-originating-user-name")
+        (dummy, self.Charset) = self.getAttributeTypeAndValue(answer, "attributes-charset", "operation")
+        (dummy, self.OriginatingUserName) = self.getAttributeTypeAndValue(answer, "job-originating-user-name")
         (dummy, self.Title) = self.getAttributeTypeAndValue(answer, "job-name")
         (dummy, self.BillingCode) = self.getAttributeTypeAndValue(answer, "job-billing")
@@ -75,4 +83,5 @@
         (dummy, self.TimeAtProcessing) = self.getAttributeTypeAndValue(answer, "time-at-processing")
         (dummy, self.MimeType) = self.getAttributeTypeAndValue(answer, "document-format")
+        self.OriginalUserName = self.OriginatingUserName[:]
     
 if __name__ == "__main__" :    
@@ -81,6 +90,6 @@
         sys.stderr.write("usage : python cups.py jobid\n")
     else :    
-        job = Job(int(sys.argv[1]))
-        for attribute in ("Charset", "JobId", "Copies", "FileName", "UserName", 
+        job = JobTicket(int(sys.argv[1]))
+        for attribute in ("Charset", "JobId", "Copies", "FileName", "OriginatingUserName", 
                           "Title", "BillingCode", "OriginatingHostName", 
                           "TimeAtCreation", "TimeAtProcessing", "UUID",
Index: pykota/trunk/pykota/accounters/software.py
===================================================================
--- pykota/trunk/pykota/accounters/software.py (revision 3245)
+++ pykota/trunk/pykota/accounters/software.py (revision 3252)
@@ -67,8 +67,8 @@
                 else :    
                     try :
-                        if self.filter.InputFile is not None :
+                        if self.filter.Ticket.FileName is not None :
                             # when a filename is passed as an argument, the backend 
                             # must generate the correct number of copies.
-                            jobsize *= self.filter.Copies
+                            jobsize *= self.filter.Ticket.Copies
                     except AttributeError : # When not run from the cupspykota backend        
                         pass
@@ -128,8 +128,8 @@
             
         pagecounter = pagecounter or 0    
-        if self.filter.InputFile is not None :
+        if self.filter.Ticket.FileName is not None :
             # when a filename is passed as an argument, the backend 
             # must generate the correct number of copies.
-            pagecounter *= self.filter.Copies
+            pagecounter *= self.filter.Ticket.Copies
                         
         return pagecounter
Index: pykota/trunk/pykota/accounters/ink.py
===================================================================
--- pykota/trunk/pykota/accounters/ink.py (revision 3245)
+++ pykota/trunk/pykota/accounters/ink.py (revision 3252)
@@ -88,9 +88,9 @@
                     jobsize = len(pages)
                     try :
-                        if self.filter.InputFile is not None :
+                        if self.filter.Ticket.FileName is not None :
                             # when a filename is passed as an argument, the backend 
                             # must generate the correct number of copies.
-                            jobsize *= self.filter.Copies
-                            self.inkUsage *= self.filter.Copies
+                            jobsize *= self.filter.Ticket.Copies
+                            self.inkUsage *= self.filter.Ticket.Copies
                     except AttributeError : # When not run from the cupspykota backend 
                         pass
