Index: server/lib/gutenbach/server/job.py
===================================================================
--- server/lib/gutenbach/server/job.py	(revision b2e077a94f58512ca52085a59f40ffecab7178d5)
+++ server/lib/gutenbach/server/job.py	(revision 1a63bf728dd925740ea6fd7f475103f8353efd34)
@@ -7,4 +7,5 @@
 class Job(object):
 
+    # for IPP
     attributes = [
         "job-id",
@@ -14,5 +15,5 @@
         "job-state",
         "job-printer-uri"
-        ]
+    ]
 
     def __init__(self, document=None):
@@ -23,80 +24,68 @@
 	"""
 	 
-	self._id = None
-        self._name = document
-	self._status = None
-	self._document = document
-	self._printer = None
+	self.jid = None
+        self.name = document
+	self.status = None
+	self.document = document
+	self.printer = None
+
+    def __getattr__(self, attr):
+        try:
+            return super(Job, self).__getattr__(attr)
+        except AttributeError:
+            pass
+
+        return super(Job, self).__getattr__(
+            attr.replace("-", "_"))
+
+    def __hasattr__(self, attr):
+        has = super(Job, self).__hasattr__(attr)
+        if not has:
+            has = super(Job, self).__hasattr__(
+                attr.replace("-", "_"))
+        return has
+
+    #### Job attributes
 
     @property
     def job_id(self):
-	return ipp.Attribute(
-            'job-id',
-            [ipp.Value(ipp.Tags.INTEGER, self._id)])
+        return self.jid
 
     @property
     def job_name(self):
-        return ipp.Attribute(
-            'job-name',
-            [ipp.Value(ipp.Tags.NAME_WITHOUT_LANGUAGE, self._name)])
+        return self.name
 
     # XXX: we need to actually calculate this!
     @property
     def job_originating_user_name(self):
-        return ipp.Attribute(
-            'job-originating-user-name',
-            [ipp.Value(ipp.Tags.NAME_WITHOUT_LANGUAGE, "jhamrick")])
+        return "jhamrick"
 
     # XXX: we need to actually calculate this!
     @property
     def job_k_octets(self):
-        return ipp.Attribute(
-            'job-k-octets',
-            [ipp.Value(ipp.Tags.INTEGER, 1)])
+        return "job-k-octets"
 
     @property
     def job_state(self):
-        return ipp.Attribute(
-            'job-state',
-            [ipp.Value(ipp.Tags.ENUM, self._status)])
+        return self.status
 
     @property
     def job_printer_uri(self):
-        return ipp.Attribute(
-            'job-printer-uri',
-            [ipp.Value(ipp.Tags.URI, self._printer._uri)])
+        return self.printer.uri
 
     def get_job_attributes(self, request):
-        attributes = [getattr(self, attr.replace("-", "_")) for attr in self.attributes]
+        attributes = [(attr, getattr(self, attr)) for attr in self.attributes]
         return attributes
-
     
     #######
-    @property
-    def document(self):
-	return self._document
-
-    @document.setter
-    def document(self, path):
-	if not os.path.exists(path):
-	    raise IOError("Document '%s' does not exist!" % path)
-	self._document = path
-
-    @property
-    def status(self):
-	return self._status
-
-    @property
-    def printer(self):
-	return self._printer
 
     def enqueue(self, printer, job_id):
-	if self._status != None:
+	if self.status != None:
 	    raise InvalidJobException(
 		"Cannot enqueue a job that has " + \
 		"already been initialized!")
-	self._printer = printer
-        self._job_id = job_id
-	self._status = const.JobStates.PENDING
+	self.printer = printer
+        self.jid = job_id
+	self.status = const.JobStates.PENDING
 
     def play(self):
@@ -105,11 +94,11 @@
 		"Cannot play an inactive job!")
 	
-	self._status = const.JobStates.PROCESSING
+	self.status = const.JobStates.PROCESSING
 	# TODO: add external call to music player
         print "Playing job %s" % str(self)
-	self._printer.complete_job(self._id)
+	self.printer.complete_job(self.jid)
 
     def finish(self):
-	self._status = const.JobStates.COMPLETE
+	self.status = const.JobStates.COMPLETE
 
     def __repr__(self):
@@ -118,4 +107,4 @@
     def __str__(self):
         return "<Job %d '%s'>" % \
-               (self._id if self._id is not None else -1, \
-                self._document)
+               (self.jid if self.jid is not None else -1, \
+                self.document)
Index: server/lib/gutenbach/server/printer.py
===================================================================
--- server/lib/gutenbach/server/printer.py	(revision b2e077a94f58512ca52085a59f40ffecab7178d5)
+++ server/lib/gutenbach/server/printer.py	(revision 1a63bf728dd925740ea6fd7f475103f8353efd34)
@@ -12,4 +12,5 @@
 class GutenbachPrinter(object):
 
+    # for IPP
     attributes = [
         "printer-uri-supported",
@@ -31,12 +32,14 @@
         "pdl-override-supported",
         "printer-up-time",
-        "compression-supported"]
+        "compression-supported"
+    ]
 
     #def __init__(self, name, card, mixer):
     def __init__(self, name):
 
-	self._name = name
-        self._uri = "ipp://localhost:8000/printers/" + self._name
-        self._time_created = int(time.time())
+	self.name = name
+        self.uri = "ipp://localhost:8000/printers/" + self.name
+        self.time_created = int(time.time())
+        self.state = "idle"
 
 	# if card >= len(aa.cards()):
@@ -56,124 +59,101 @@
 	self._next_jobid = 0
 
+    def __getattr__(self, attr):
+        try:
+            return super(Printer, self).__getattr__(attr)
+        except AttributeError:
+            pass
+
+        return super(Printer, self).__getattr__(
+            attr.replace("-", "_"))
+
+    def __hasattr__(self, attr):
+        has = super(Printer, self).__hasattr__(attr)
+        if not has:
+            has = super(Printer, self).__hasattr__(
+                attr.replace("-", "_"))
+        return has
+
     ## Printer attributes
+
     @property
     def printer_uri_supported(self):
-        return ipp.Attribute(
-            "printer-uri-supported",
-            [ipp.Value(ipp.Tags.URI, self._uri)])
-    
+        return self.uri
+
     @property
     def uri_authentication_supported(self):
-        return ipp.Attribute(
-            "uri-authentication-supported",
-            [ipp.Value(ipp.Tags.KEYWORD, "none")])
+        return "none"
 
     @property
     def uri_security_supported(self):
-        return ipp.Attribute(
-            "uri-security-supported",
-            [ipp.Value(ipp.Tags.KEYWORD, "none")])
+        return "none"
 
     @property
     def printer_name(self):
-        return ipp.Attribute(
-            "printer-name",
-            [ipp.Value(ipp.Tags.NAME_WITHOUT_LANGUAGE, self._name)])
-        
+        return self.name
+
     @property
     def printer_state(self):
-        return ipp.Attribute(
-            "printer-state",
-            [ipp.Value(ipp.Tags.ENUM, const.PrinterStates.IDLE)])
-        
+        return self.state
+
     @property
     def printer_state_reasons(self):
-        return ipp.Attribute(
-            "printer-state-reasons",
-            [ipp.Value(ipp.Tags.KEYWORD, "none")])
+        return "none"
 
     @property
     def ipp_versions_supported(self):
-        return ipp.Attribute(
-            "ipp-versions-supported",
-            [ipp.Value(ipp.Tags.KEYWORD, "1.0"),
-             ipp.Value(ipp.Tags.KEYWORD, "1.1")])
-
+        return ("1.0", "1.1")
     # XXX: We should query ourself for the supported operations
+
     @property
     def operations_supported(self):
-        return ipp.Attribute(
-            "operations-supported",
-            [ipp.Value(ipp.Tags.ENUM, const.Operations.GET_JOBS)])
+        return "get-jobs"
 
     @property
     def charset_configured(self):
-        return ipp.Attribute(
-            "charset-configured",
-            [ipp.Value(ipp.Tags.CHARSET, "utf-8")])
+        return "utf-8"
 
     @property
     def charset_supported(self):
-        return ipp.Attribute(
-            "charset-supported",
-            [ipp.Value(ipp.Tags.CHARSET, "utf-8")])
+        return "utf-8"
 
     @property
     def natural_language_configured(self):
-        return ipp.Attribute(
-            "natural-language-configured",
-            [ipp.Value(ipp.Tags.NATURAL_LANGUAGE, "en-us")])
+        return "en-us"
 
     @property
     def generated_natural_language_supported(self):
-        return ipp.Attribute(
-            "generated-natural-language-supported",
-            [ipp.Value(ipp.Tags.NATURAL_LANGUAGE, "en-us")])
+        return "en-us"
 
     @property
     def document_format_default(self):
-        return ipp.Attribute(
-            "document-format-default",
-            [ipp.Value(ipp.Tags.MIME_MEDIA_TYPE, "application/octet-stream")])
+        return "application/octet-stream"
 
     @property
     def document_format_supported(self):
-        return ipp.Attribute(
-            "document-format-supported",
-            [ipp.Value(ipp.Tags.MIME_MEDIA_TYPE, "application/octet-stream"),
-             ipp.Value(ipp.Tags.MIME_MEDIA_TYPE, "audio/mp3")])
+        return ("application/octet-stream", "audio/mp3")
 
     @property
     def printer_is_accepting_jobs(self):
-        return ipp.Attribute(
-            "printer-is-accepting-jobs",
-            [ipp.Value(ipp.Tags.BOOLEAN, True)])
+        return True
 
     @property
     def queued_job_count(self):
-        return ipp.Attribute(
-            "queued-job-count",
-            [ipp.Value(ipp.Tags.INTEGER, len(self.active_jobs))])
+        return len(self.active_jobs)
 
     @property
     def pdl_override_supported(self):
-        return ipp.Attribute(
-            "pdl-override-supported",
-            [ipp.Value(ipp.Tags.KEYWORD, "not-attempted")])
+        return "not-attempted"
 
     @property
     def printer_up_time(self):
-        return ipp.Attribute(
-            "printer-up-time",
-            [ipp.Value(ipp.Tags.INTEGER, int(time.time()) - self._time_created)])
+        return int(time.time()) - self.time_created
 
     @property
     def compression_supported(self):
-        return ipp.Attribute(
-            "compression-supported",
-            [ipp.Value(ipp.Tags.KEYWORD, "none")])
+        return "none"
 
     def get_printer_attributes(self, request):
-        attributes = [getattr(self, attr.replace("-", "_")) for attr in self.attributes]
+        attributes = [(attr, getattr(self, attr)) for attr in self.attributes]
         return attributes
 
@@ -229,3 +209,3 @@
 
     def __str__(self):
-	return "<Printer '%s'>" % self._name
+	return "<Printer '%s'>" % self.name
