             delegate?.printer(self, didChangeStatus: status)
         }
     }
+    public var printing: Bool
     
     public var portName: String {
         return portInfo.portName

        
        free(dataSentToPrinter)
        
        closeConnection()
    }

    private func establishConnection() throws {
        status = .Connecting
        var connected = false
        for _ in 0..<3 {
            connected = openPort()
            if connected {
                status = .Connected
                break
            }
            sleep(3)
        }
        if !connected {
            status = .Disconnected
            throw PrintingError.EstablishingConnection
        }
    }
    
    private func closeConnection() {

    init(portInfo: PortInfo) {
        self.portInfo = portInfo
        self.status = .Disconnected
        self.printing = false
        self.queue.maxConcurrentOperationCount = 1
    }
    
